Skip to content

Commit 7ae55da

Browse files
authored
Merge pull request #163 from fulldotdev/0.8.3
Merging release 0.8.3.
2 parents 73dafc0 + bcba065 commit 7ae55da

93 files changed

Lines changed: 554 additions & 149 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Repository Rules
22

33
- Any change merged into `main` must include a version bump. Update the project version in `package.json` as part of the same change.
4+
- Any release to `main` must also publish GitHub Release notes for that version. This can be done via the GitHub CLI with `gh release create` or by editing the corresponding GitHub release if the tag already exists.

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,21 @@ npx shadcn@latest init
5656
}
5757
```
5858

59-
5. **Add components**:
59+
5. **Copy the base stylesheet** from [`src/styles/global.example.css`](./src/styles/global.example.css) to `src/styles/global.css`, then import it in your layout.
60+
61+
6. **Use a container-aware app shell** because fulldev/ui uses Tailwind v4 container-query variants like `@2xl:` and `@max-5xl:`:
62+
63+
```astro
64+
---
65+
import "@/styles/global.css"
66+
---
67+
68+
<body class="@container">
69+
<slot />
70+
</body>
71+
```
72+
73+
7. **Add components**:
6074

6175
```bash
6276
npx shadcn@latest add @fulldev/button

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fulldev-ui",
3-
"version": "0.8.2",
3+
"version": "0.8.3",
44
"description": "Astro UI component and block library compatible with shadcn/ui",
55
"homepage": "https://ui.full.dev",
66
"bugs": "https://github.com/fulldotdev/ui/issues",

public/r/all.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"@fulldev/banner",
1111
"@fulldev/button",
1212
"@fulldev/checkbox",
13+
"@fulldev/container",
1314
"@fulldev/empty",
1415
"@fulldev/field",
1516
"@fulldev/footer",

public/r/components.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@fulldev/button",
1313
"@fulldev/checkbox",
1414
"@fulldev/collapsible",
15+
"@fulldev/container",
1516
"@fulldev/empty",
1617
"@fulldev/field",
1718
"@fulldev/footer",
@@ -43,4 +44,4 @@
4344
"@fulldev/tile",
4445
"@fulldev/video"
4546
]
46-
}
47+
}

public/r/container.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
3+
"name": "container",
4+
"type": "registry:ui",
5+
"files": [
6+
{
7+
"path": "src/components/ui/container/container.astro",
8+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface Props extends HTMLAttributes<\"div\"> {}\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n class={cn(\"mx-auto w-full max-w-6xl px-6\", className)}\n data-slot=\"container\"\n {...props}\n>\n <slot />\n</div>\n",
9+
"type": "registry:ui"
10+
},
11+
{
12+
"path": "src/components/ui/container/index.ts",
13+
"content": "export { default as Container } from \"./container.astro\"\n",
14+
"type": "registry:ui"
15+
}
16+
]
17+
}

public/r/header-1.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
33
"name": "header-1",
4-
"type": "registry:block",
54
"registryDependencies": [
65
"@fulldev/button",
76
"@fulldev/collapsible",
@@ -16,8 +15,9 @@
1615
"files": [
1716
{
1817
"path": "src/components/blocks/header-1.astro",
19-
"content": "---\nimport MenuIcon from \"lucide-static/icons/menu.svg\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Header, HeaderActions } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n} from \"@/components/ui/navigation-menu\"\nimport { Sheet, SheetContent, SheetTrigger } from \"@/components/ui/sheet\"\nimport {\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n} from \"@/components/ui/sidebar\"\nimport { ThemeToggle } from \"@/components/ui/theme-toggle\"\n\ninterface Props {\n logo?: {\n src?: string\n alt?: string\n text?: string\n href?: string\n }\n links?: {\n icon?: string\n text?: string\n href?: string\n target?: string\n }[]\n socials?: string[]\n menus?: {\n text?: string\n href?: string\n links?: {\n text?: string\n href?: string\n }[]\n }[]\n}\n\nconst { logo, menus, links, socials } = Astro.props\n---\n\n<Header>\n <Logo href={logo?.href || \"/\"}>\n <LogoImage src={logo?.src} alt={logo?.alt} />\n <LogoText>{logo?.text}</LogoText>\n </Logo>\n <NavigationMenu class=\"mr-auto @max-5xl:hidden\">\n <NavigationMenuList>\n {\n menus?.map((menu, index) => (\n <NavigationMenuItem value={`menu-${index}`}>\n {menu.links && menu.links.length > 0 ? (\n <>\n <NavigationMenuTrigger class=\"inline-flex h-8 items-center bg-transparent px-3 py-0\">\n {menu.text}\n </NavigationMenuTrigger>\n <NavigationMenuContent>\n <ul class=\"grid min-w-48 gap-1\">\n {menu.links?.map((link) => (\n <li>\n <NavigationMenuLink href={link.href} class=\"w-full\">\n {link.text}\n </NavigationMenuLink>\n </li>\n ))}\n </ul>\n </NavigationMenuContent>\n </>\n ) : (\n <NavigationMenuLink\n class=\"inline-flex h-8 items-center bg-transparent px-3 py-0\"\n href={menu.href}\n >\n {menu.text}\n </NavigationMenuLink>\n )}\n </NavigationMenuItem>\n ))\n }\n </NavigationMenuList>\n </NavigationMenu>\n <HeaderActions class=\"@max-5xl:hidden\">\n {\n socials?.map((social) => (\n <>\n <Button\n as=\"a\"\n variant=\"ghost\"\n size=\"icon-sm\"\n href={social}\n target=\"_blank\"\n >\n <Icon href={social} />\n </Button>\n </>\n ))\n }\n <ThemeToggle />\n {\n links?.map(({ icon, text, ...link }, i) => (\n <Button\n variant={i === links.length - 1 ? \"default\" : \"outline\"}\n size=\"sm\"\n {...link}\n >\n {icon && <Icon name={icon} />}\n {text}\n </Button>\n ))\n }\n </HeaderActions>\n <Sheet class=\"first:ml-auto\">\n <SheetTrigger\n class=\"@5xl:hidden\"\n variant=\"ghost\"\n size=\"icon\"\n name=\"open-menu-button\"\n >\n <MenuIcon class=\"size-5\" />\n </SheetTrigger>\n <SheetContent class=\"overflow-y-auto px-4 py-12\">\n <SidebarMenu>\n {\n menus?.map((menu) => (\n <SidebarMenuItem>\n {menu.links && menu.links.length > 0 ? (\n <Collapsible>\n <CollapsibleTrigger>\n <SidebarMenuButton class=\"h-10 rounded-md px-4 text-xl\">\n {menu.text}\n </SidebarMenuButton>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <SidebarMenuSub>\n {menu.links?.map((link) => (\n <SidebarMenuSubItem>\n <SidebarMenuSubButton href={link.href}>\n {link.text}\n </SidebarMenuSubButton>\n </SidebarMenuSubItem>\n ))}\n </SidebarMenuSub>\n </CollapsibleContent>\n </Collapsible>\n ) : (\n <SidebarMenuButton\n class=\"h-10 w-full rounded-md px-4 text-xl has-[>svg]:px-4\"\n href={menu.href}\n >\n {menu.text}\n </SidebarMenuButton>\n )}\n </SidebarMenuItem>\n ))\n }\n </SidebarMenu>\n <HeaderActions class=\"flex flex-col gap-2\">\n {\n links?.map(({ icon, text, ...link }, i) => (\n <Button\n variant={i === links.length - 1 ? \"default\" : \"secondary\"}\n class=\"w-full\"\n {...link}\n >\n {icon && <Icon name={icon} />}\n {text}\n </Button>\n ))\n }\n </HeaderActions>\n <HeaderActions>\n {\n socials?.map((social) => (\n <Button as=\"a\" variant=\"ghost\" size=\"icon\" href={social}>\n <Icon href={social} />\n </Button>\n ))\n }\n </HeaderActions>\n </SheetContent>\n </Sheet>\n</Header>\n",
18+
"content": "---\nimport MenuIcon from \"lucide-static/icons/menu.svg\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Header, HeaderActions } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n} from \"@/components/ui/navigation-menu\"\nimport { Sheet, SheetContent, SheetTrigger } from \"@/components/ui/sheet\"\nimport {\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n} from \"@/components/ui/sidebar\"\nimport { ThemeToggle } from \"@/components/ui/theme-toggle\"\n\ninterface Props {\n logo?: {\n src?: string\n alt?: string\n text?: string\n href?: string\n }\n links?: {\n icon?: string\n text?: string\n href?: string\n target?: string\n }[]\n socials?: string[]\n menus?: {\n text?: string\n href?: string\n links?: {\n text?: string\n href?: string\n }[]\n }[]\n}\n\nconst { logo, menus, links, socials } = Astro.props\n\nconst desktopMenuItemClass =\n \"inline-flex h-8 items-center bg-transparent px-3 py-0 text-sm font-medium\"\n---\n\n<Header>\n <Logo href={logo?.href || \"/\"}>\n <LogoImage src={logo?.src} alt={logo?.alt} />\n <LogoText>{logo?.text}</LogoText>\n </Logo>\n <NavigationMenu class=\"mr-auto @max-5xl:hidden\">\n <NavigationMenuList>\n {\n menus?.map((menu, index) => (\n <NavigationMenuItem value={`menu-${index}`}>\n {menu.links && menu.links.length > 0 ? (\n <>\n <NavigationMenuTrigger class={desktopMenuItemClass}>\n {menu.text}\n </NavigationMenuTrigger>\n <NavigationMenuContent>\n <ul class=\"grid min-w-48 gap-1\">\n {menu.links?.map((link) => (\n <li>\n <NavigationMenuLink href={link.href} class=\"w-full\">\n {link.text}\n </NavigationMenuLink>\n </li>\n ))}\n </ul>\n </NavigationMenuContent>\n </>\n ) : (\n <NavigationMenuLink\n class={desktopMenuItemClass}\n href={menu.href}\n >\n {menu.text}\n </NavigationMenuLink>\n )}\n </NavigationMenuItem>\n ))\n }\n </NavigationMenuList>\n </NavigationMenu>\n <HeaderActions class=\"@max-5xl:hidden\">\n {\n socials?.map((social) => (\n <>\n <Button\n as=\"a\"\n variant=\"ghost\"\n size=\"icon-sm\"\n href={social}\n target=\"_blank\"\n >\n <Icon href={social} />\n </Button>\n </>\n ))\n }\n <ThemeToggle />\n {\n links?.map(({ icon, text, ...link }, i) => (\n <Button\n variant={i === links.length - 1 ? \"default\" : \"outline\"}\n size=\"sm\"\n {...link}\n >\n {icon && <Icon name={icon} />}\n {text}\n </Button>\n ))\n }\n </HeaderActions>\n <Sheet class=\"first:ml-auto\">\n <SheetTrigger\n class=\"@5xl:hidden\"\n variant=\"ghost\"\n size=\"icon\"\n name=\"open-menu-button\"\n >\n <MenuIcon class=\"size-5\" />\n </SheetTrigger>\n <SheetContent class=\"overflow-y-auto px-4 py-12\">\n <SidebarMenu>\n {\n menus?.map((menu) => (\n <SidebarMenuItem>\n {menu.links && menu.links.length > 0 ? (\n <Collapsible>\n <CollapsibleTrigger>\n <SidebarMenuButton\n as=\"div\"\n class=\"h-10 rounded-md px-4 text-xl\"\n >\n {menu.text}\n </SidebarMenuButton>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <SidebarMenuSub>\n {menu.links?.map((link) => (\n <SidebarMenuSubItem>\n <SidebarMenuSubButton href={link.href}>\n {link.text}\n </SidebarMenuSubButton>\n </SidebarMenuSubItem>\n ))}\n </SidebarMenuSub>\n </CollapsibleContent>\n </Collapsible>\n ) : (\n <SidebarMenuButton\n class=\"h-10 w-full rounded-md px-4 text-xl has-[>svg]:px-4\"\n href={menu.href}\n >\n {menu.text}\n </SidebarMenuButton>\n )}\n </SidebarMenuItem>\n ))\n }\n </SidebarMenu>\n <HeaderActions class=\"flex flex-col gap-2\">\n {\n links?.map(({ icon, text, ...link }, i) => (\n <Button\n variant={i === links.length - 1 ? \"default\" : \"secondary\"}\n class=\"w-full\"\n {...link}\n >\n {icon && <Icon name={icon} />}\n {text}\n </Button>\n ))\n }\n </HeaderActions>\n <HeaderActions>\n {\n socials?.map((social) => (\n <Button as=\"a\" variant=\"ghost\" size=\"icon\" href={social}>\n <Icon href={social} />\n </Button>\n ))\n }\n </HeaderActions>\n </SheetContent>\n </Sheet>\n</Header>\n",
2019
"type": "registry:block"
2120
}
22-
]
21+
],
22+
"type": "registry:block"
2323
}

0 commit comments

Comments
 (0)