diff --git a/apps/web/astro.config.mjs b/apps/web/astro.config.mjs index dc3a3f8..1037398 100644 --- a/apps/web/astro.config.mjs +++ b/apps/web/astro.config.mjs @@ -244,7 +244,7 @@ export default defineConfig({ vite: { plugins: [tailwindcss()], ssr: { - noExternal: ["zod"], + noExternal: ["zod", "nanoid"], }, }, adapter: vercel({ diff --git a/apps/web/package.json b/apps/web/package.json index 848af87..a8ab5f0 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -34,6 +34,7 @@ "alpinejs": "^3.15.4", "astro": "^5.16.4", "astro-robots-txt": "^1.0.0", + "class-variance-authority": "^0.7.1", "culori": "^4.0.2", "expressive-code-collapsible": "^0.1.0", "nanoid": "^5.0.9", diff --git a/apps/web/public/r/avatar.json b/apps/web/public/r/avatar.json index db69151..0d8f942 100644 --- a/apps/web/public/r/avatar.json +++ b/apps/web/public/r/avatar.json @@ -5,22 +5,37 @@ "files": [ { "path": "ui/avatar/Avatar.astro", - "content": "---\n/**\n * @component Avatar\n * @title Avatar\n * @description An image representing a user or entity, with fallback support when unavailable.\n * @figmaUrl https://www.figma.com/design/koxai7zw5vIuBzuVxe5T2l/BejamasUI---Design-System?node-id=2531-2620&t=YFStJ3V8fXEO8QD8-4\n *\n * @preview\n *
\n * \n * \n * \"@bejamas\"\n * \n * BJ\n * \n * \n * \n * \"@thomkrupa\"\n * \n * TK\n * \n *
\n * \n * \n * \"@withastro\"\n * \n * WA\n * \n * \n * \n * \"@shadcn\"\n * \n * SH\n * \n * \n * \n * \"@fredkschott\"\n * \n * FS\n * \n *
\n *
\n * \n * @usage\n * \n * ```astro nocollapse\n * ---\n * import { Avatar, AvatarImage, AvatarFallback } from '@bejamas/ui/components/avatar';\n * ---\n * \n * \n * \n * \"@thomkrupa\"\n * \n * TK\n * \n * ```\n */\n\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n as: Tag = \"div\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n\n\n", + "content": "---\n/**\n * @component Avatar\n * @title Avatar\n * @description An image representing a user or entity, with fallback support when unavailable.\n * @figmaUrl https://www.figma.com/design/koxai7zw5vIuBzuVxe5T2l/BejamasUI---Design-System?node-id=2531-2620&t=YFStJ3V8fXEO8QD8-4\n *\n * @preview\n *
\n * \n * \n * TK\n * \n * \n * \n * \n * \n * WA\n * \n * \n * \n * BJ\n * \n * +2\n * \n *
\n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import {\n * Avatar,\n * AvatarImage,\n * AvatarFallback,\n * AvatarBadge,\n * AvatarGroup,\n * AvatarGroupCount,\n * } from '@bejamas/ui/components/avatar';\n * ---\n *\n * \n * \n * TK\n * \n * \n * ```\n *\n * @examples\n *\n * ### Sizes\n *\n *
\n * \n * \n * SM\n * \n * \n * \n * MD\n * \n * \n * \n * LG\n * \n *
\n *\n * ### Badge\n *\n * \n * \n * TK\n * \n * \n *\n * ### Group\n *\n * \n * \n * \n * WA\n * \n * \n * \n * BJ\n * \n * \n * FS\n * \n * +3\n * \n *\n * ### With `astro:assets` Image\n *\n * ```astro nopreview nocollapse\n * ---\n * import { Image } from \"astro:assets\";\n * import profile from \"@/assets/profile.jpg\";\n * import { Avatar, AvatarImage, AvatarFallback } from \"@bejamas/ui/components/avatar\";\n * ---\n *\n * \n * \n * \"Profile\n * \n * PR\n * \n * ```\n */\n\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\n\ntype Props = {\n class?: string;\n size?: \"default\" | \"sm\" | \"lg\";\n} & HTMLAttributes<\"span\">;\n\nconst {\n class: className = \"\",\n size = \"default\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n\n", "type": "registry:ui" }, { "path": "ui/avatar/AvatarImage.astro", - "content": "---\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n as: Tag = \"div\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n\n\n", + "content": "---\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n src?: string;\n alt?: string;\n} & HTMLAttributes<\"img\">;\n\nconst {\n as,\n class: className = \"\",\n src,\n alt = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst Tag = (as ?? \"div\") as HTMLTag;\n---\n\n{\n src || as === \"img\" ? (\n \n ) : (\n \n \n \n )\n}\n", "type": "registry:ui" }, { "path": "ui/avatar/AvatarFallback.astro", - "content": "---\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n as: Tag = \"div\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n\n\n", + "content": "---\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n as: Tag = \"div\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n\n", + "type": "registry:ui" + }, + { + "path": "ui/avatar/AvatarBadge.astro", + "content": "---\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"span\">;\n\nconst {\n as: Tag = \"span\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n---\n\nsvg]:hidden\",\n \"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2\",\n \"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2\",\n className,\n )}\n>\n \n\n", + "type": "registry:ui" + }, + { + "path": "ui/avatar/AvatarGroup.astro", + "content": "---\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n as: Tag = \"div\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n\n", + "type": "registry:ui" + }, + { + "path": "ui/avatar/AvatarGroupCount.astro", + "content": "---\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n as: Tag = \"div\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n---\n\nsvg]:size-4\",\n \"group-has-data-[size=sm]/avatar-group:size-6 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3\",\n \"group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5\",\n className,\n )}\n>\n \n\n", "type": "registry:ui" }, { "path": "ui/avatar/index.ts", - "content": "export { default as Avatar } from \"./Avatar.astro\";\nexport { default as AvatarImage } from \"./AvatarImage.astro\";\nexport { default as AvatarFallback } from \"./AvatarFallback.astro\";\n\n", + "content": "export { default as Avatar } from \"./Avatar.astro\";\nexport { default as AvatarImage } from \"./AvatarImage.astro\";\nexport { default as AvatarFallback } from \"./AvatarFallback.astro\";\nexport { default as AvatarBadge } from \"./AvatarBadge.astro\";\nexport { default as AvatarGroup } from \"./AvatarGroup.astro\";\nexport { default as AvatarGroupCount } from \"./AvatarGroupCount.astro\";\n", "type": "registry:ui" } ], diff --git a/apps/web/public/r/card.json b/apps/web/public/r/card.json index 060dc03..60a7f18 100644 --- a/apps/web/public/r/card.json +++ b/apps/web/public/r/card.json @@ -5,7 +5,7 @@ "files": [ { "path": "ui/card/Card.astro", - "content": "---\n/**\n * @component Card\n * @title Card\n * @description UI container for grouping content with header, footer, etc.\n * @figmaUrl https://www.figma.com/design/koxai7zw5vIuBzuVxe5T2l/bejamas-ui?node-id=2543-3884&t=YFStJ3V8fXEO8QD8-4\n *\n * @preview\n *\n * \n * \n * \"Gradient\n * \n * \n *
\n *
\n * \n * \n * \"grdient\n * \n * AW\n * \n *
\n * \n *
\n *
\n * \n * Strong Foundations, Built to Scale\n * Like any enduring system, a scalable design system relies on clear structure, solid foundations, and careful layering over time.\n * \n * \n * \n * \n *

Categories

\n *
\n * Marketing\n * UI Design\n *
\n *
\n *
\n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '@bejamas/ui/components/card';\n * ---\n *\n * \n * \n * Card Title\n * Card Description\n * \n * \n * Card content goes here.\n * \n * \n * \n * \n * \n * ```\n */\n\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes } from \"astro/types\";\n\ntype CardVariant = \"default\" | \"ghost\";\n\ntype Props = {\n variant?: CardVariant;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n variant = \"default\",\n ...rest\n} = Astro.props as Props;\n\nconst cardVariants = cva(\n \"group/card relative bg-card overflow-clip text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm group/card [&:has(>_[data-slot=card-media]:first-child_img)]:pt-0 [a]:hover:bg-accent/5 [a]:transition-colors duration-100\",\n {\n variants: {\n variant: {\n default: \"\",\n ghost: \"border-transparent bg-transparent shadow-none\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n---\n\n\n \n\n", + "content": "---\n/**\n * @component Card\n * @title Card\n * @description UI container for grouping content with header, footer, etc.\n * @figmaUrl https://www.figma.com/design/koxai7zw5vIuBzuVxe5T2l/bejamas-ui?node-id=2543-3884&t=YFStJ3V8fXEO8QD8-4\n *\n * @preview\n *\n * \n * \n * \"Gradient\n * \n * \n *
\n *
\n * \n * \n * \"grdient\n * \n * AW\n * \n *
\n * \n *
\n *
\n * \n * Strong Foundations, Built to Scale\n * Like any enduring system, a scalable design system relies on clear structure, solid foundations, and careful layering over time.\n * \n * \n * \n * \n *

Categories

\n *
\n * Marketing\n * UI Design\n *
\n *
\n *
\n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '@bejamas/ui/components/card';\n * ---\n *\n * \n * \n * Card Title\n * Card Description\n * \n * \n * Card content goes here.\n * \n * \n * \n * \n * \n * ```\n */\n\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes } from \"astro/types\";\n\ntype CardVariant = \"default\" | \"ghost\";\n\ntype Props = {\n variant?: CardVariant;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n variant = \"default\",\n ...rest\n} = Astro.props as Props;\n\nconst cardVariants = cva(\n \"group/card bg-card overflow-clip text-card-foreground flex flex-col gap-6 rounded-xl ring-1 ring-border py-6 shadow-sm group/card [&:has(>_[data-slot=card-media]:first-child_img)]:pt-0 [a]:hover:bg-accent/5 [a]:transition-colors duration-100\",\n {\n variants: {\n variant: {\n default: \"\",\n ghost: \"ring-transparent bg-transparent shadow-none\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n---\n\n\n \n\n", "type": "registry:ui" }, { diff --git a/apps/web/public/r/combobox.json b/apps/web/public/r/combobox.json index 7a3aba4..6e0a9b1 100644 --- a/apps/web/public/r/combobox.json +++ b/apps/web/public/r/combobox.json @@ -10,17 +10,17 @@ "files": [ { "path": "ui/combobox/Combobox.astro", - "content": "---\n/**\n * @component Combobox\n * @title Combobox\n * @description A searchable dropdown (autocomplete) that lets users filter and select from a list of options with full keyboard navigation and accessibility support.\n *\n * @preview\n * \n * \n * \n * \n * No results found.\n * Astro\n * Next.js\n * Nuxt\n * Remix\n * SvelteKit\n * \n * \n * \n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import {\n * Combobox,\n * ComboboxInput,\n * ComboboxContent,\n * ComboboxList,\n * ComboboxItem,\n * ComboboxEmpty,\n * ComboboxGroup,\n * ComboboxLabel,\n * ComboboxSeparator,\n * } from '@bejamas/ui/components/combobox';\n * ---\n *\n * \n * \n * \n * \n * No results found.\n * Astro\n * Next.js\n * \n * \n * \n * ```\n *\n * @api\n *\n * ### Events\n *\n * The combobox emits custom events that you can listen to:\n *\n * | Event | Detail | Description |\n * |-------|--------|-------------|\n * | `combobox:change` | `{ value: string \\| null }` | Fired when a new value is selected |\n * | `combobox:open-change` | `{ open: boolean }` | Fired when the dropdown opens or closes |\n * | `combobox:input-change` | `{ inputValue: string }` | Fired when the user types in the input |\n *\n * ```astro nocollapse\n * \n * \n * \n * \n * Option 1\n * Option 2\n * \n * \n * \n *\n * \n * ```\n *\n * ### Programmatic Control\n *\n * You can control the combobox programmatically by dispatching a `combobox:set` event:\n *\n * ```js nocollapse\n * const combobox = document.getElementById('my-combobox');\n *\n * // Set a specific value\n * combobox.dispatchEvent(new CustomEvent('combobox:set', {\n * detail: { value: 'option2' }\n * }));\n *\n * // Clear the value\n * combobox.dispatchEvent(new CustomEvent('combobox:set', {\n * detail: { value: null }\n * }));\n *\n * // Open the dropdown\n * combobox.dispatchEvent(new CustomEvent('combobox:set', {\n * detail: { open: true }\n * }));\n *\n * // Set the input text\n * combobox.dispatchEvent(new CustomEvent('combobox:set', {\n * detail: { inputValue: 'search term' }\n * }));\n *\n * // Custom display text for selected value\n * // itemToStringValue — (item: HTMLElement | null, value: string | null) => string\n * // Controls what text appears in the input after selection.\n * // Useful when items contain rich content (icons, descriptions).\n * combobox.dispatchEvent(new CustomEvent('combobox:set', {\n * detail: {\n * itemToStringValue: (item, value) => value ? `TZ: ${value}` : ''\n * }\n * }));\n * ```\n *\n * ### Data Attributes\n *\n * The combobox sets these data attributes that you can use for styling or querying state:\n *\n * | Attribute | Element | Description |\n * |-----------|---------|-------------|\n * | `data-state` | combobox, combobox-content | Current state (`open` or `closed`) |\n * | `data-value` | combobox | Currently selected value |\n * | `data-selected` | combobox-item | Present when item is selected |\n * | `data-highlighted` | combobox-item | Present when item is focused/highlighted |\n * | `data-disabled` | combobox, combobox-item | Present when disabled |\n * | `data-empty` | combobox-content | Present when no items match the filter |\n *\n * ### Positioning\n *\n * Placement options are configured on `ComboboxContent`:\n *\n * ```astro nocollapse nopreview\n * \n * \n * \n * ...\n * \n * \n * ```\n *\n * @examples\n *\n * ### Clear Button\n *\n * Use the `showClear` prop to show a clear button in the input.\n *\n * \n * \n * \n * \n * No results found.\n * Astro\n * Next.js\n * Nuxt\n * Remix\n * \n * \n * \n *\n * ### Groups\n *\n * Use the `ComboboxGroup` and `ComboboxLabel` to group items and add a label to the group.\n *\n * \n * \n * \n * \n * No results found.\n * \n * Frontend\n * Astro\n * Next.js\n * Nuxt\n * \n * \n * \n * Backend\n * Express\n * Hono\n * \n * \n * \n * \n *\n * ### Invalid\n *\n * Use the `aria-invalid=\"true\"` attribute on the `ComboboxInput` to mark the combobox as invalid.\n *\n * \n * \n * \n * \n * Astro\n * Next.js\n * \n * \n * \n *\n * ### Disabled\n *\n * Use the `disabled` prop to disable the combobox.\n *\n * \n * \n * \n * \n * Astro\n * Next.js\n * \n * \n * \n *\n * ### Auto Highlight\n *\n * Use the `autoHighlight` prop to automatically highlight the first item on filter.\n *\n * \n * \n * \n * \n * No results found.\n * Astro\n * Next.js\n * Nuxt\n * Remix\n * \n * \n * \n *\n * ### Search in Popup\n *\n * You can trigger the combobox from a button or any other component by using the render prop. Move the `ComboboxInput` inside the `ComboboxContent`.\n *\n * \n * \n * \n * \n * \n * \n * \n * No countries found.\n * Brazil\n * Canada\n * France\n * Germany\n * Japan\n * \n * \n * \n */\n\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\n\ntype Props = {\n class?: string;\n name?: string;\n defaultValue?: string;\n placeholder?: string;\n disabled?: boolean;\n required?: boolean;\n openOnFocus?: boolean;\n autoHighlight?: boolean;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n name,\n defaultValue,\n placeholder,\n disabled = false,\n required = false,\n openOnFocus,\n autoHighlight,\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n\n\n\n", + "content": "---\n/**\n * @component Combobox\n * @title Combobox\n * @description A searchable dropdown (autocomplete) that lets users filter and select from a list of options with full keyboard navigation and accessibility support.\n *\n * @preview\n * \n * \n * \n * \n * No results found.\n * Astro\n * Next.js\n * Nuxt\n * Remix\n * SvelteKit\n * \n * \n * \n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import {\n * Combobox,\n * ComboboxInput,\n * ComboboxContent,\n * ComboboxList,\n * ComboboxItem,\n * ComboboxEmpty,\n * ComboboxGroup,\n * ComboboxLabel,\n * ComboboxSeparator,\n * } from '@bejamas/ui/components/combobox';\n * ---\n *\n * \n * \n * \n * \n * No results found.\n * Astro\n * Next.js\n * \n * \n * \n * ```\n *\n * @api\n *\n * ### Events\n *\n * The combobox emits custom events that you can listen to:\n *\n * | Event | Detail | Description |\n * |-------|--------|-------------|\n * | `combobox:change` | `{ value: string \\| null }` | Fired when a new value is selected |\n * | `combobox:open-change` | `{ open: boolean }` | Fired when the dropdown opens or closes |\n * | `combobox:input-change` | `{ inputValue: string }` | Fired when the user types in the input |\n *\n * ```astro nocollapse\n * \n * \n * \n * \n * Option 1\n * Option 2\n * \n * \n * \n *\n * \n * ```\n *\n * ### Programmatic Control\n *\n * You can control the combobox programmatically by dispatching a `combobox:set` event:\n *\n * ```js nocollapse\n * const combobox = document.getElementById('my-combobox');\n *\n * // Set a specific value\n * combobox.dispatchEvent(new CustomEvent('combobox:set', {\n * detail: { value: 'option2' }\n * }));\n *\n * // Clear the value\n * combobox.dispatchEvent(new CustomEvent('combobox:set', {\n * detail: { value: null }\n * }));\n *\n * // Open the dropdown\n * combobox.dispatchEvent(new CustomEvent('combobox:set', {\n * detail: { open: true }\n * }));\n *\n * // Set the input text\n * combobox.dispatchEvent(new CustomEvent('combobox:set', {\n * detail: { inputValue: 'search term' }\n * }));\n *\n * // Custom display text for selected value\n * // itemToStringValue — (item: HTMLElement | null, value: string | null) => string\n * // Controls what text appears in the input after selection.\n * // Useful when items contain rich content (icons, descriptions).\n * combobox.dispatchEvent(new CustomEvent('combobox:set', {\n * detail: {\n * itemToStringValue: (item, value) => value ? `TZ: ${value}` : ''\n * }\n * }));\n * ```\n *\n * ### Data Attributes\n *\n * The combobox sets these data attributes that you can use for styling or querying state:\n *\n * | Attribute | Element | Description |\n * |-----------|---------|-------------|\n * | `data-state` | combobox, combobox-content | Current state (`open` or `closed`) |\n * | `data-value` | combobox | Currently selected value |\n * | `data-selected` | combobox-item | Present when item is selected |\n * | `data-highlighted` | combobox-item | Present when item is focused/highlighted |\n * | `data-disabled` | combobox, combobox-item | Present when disabled |\n * | `data-empty` | combobox-content | Present when no items match the filter |\n *\n * ### Positioning\n *\n * Placement options are configured on `ComboboxContent`:\n *\n * ```astro nocollapse nopreview\n * \n * \n * \n * ...\n * \n * \n * ```\n *\n * @examples\n *\n * ### Clear Button\n *\n * Use the `showClear` prop to show a clear button in the input.\n *\n * \n * \n * \n * \n * No results found.\n * Astro\n * Next.js\n * Nuxt\n * Remix\n * \n * \n * \n *\n * ### Sizing\n *\n * Use the `size` prop on `ComboboxInput` to match button/input sizing.\n *\n *
\n * \n * \n * \n * \n * Astro\n * Next.js\n * \n * \n * \n * \n * \n * \n * \n * Astro\n * Next.js\n * \n * \n * \n * \n * \n * \n * \n * Astro\n * Next.js\n * \n * \n * \n *
\n *\n * ### Groups\n *\n * Use the `ComboboxGroup` and `ComboboxLabel` to group items and add a label to the group.\n *\n * \n * \n * \n * \n * No results found.\n * \n * Frontend\n * Astro\n * Next.js\n * Nuxt\n * \n * \n * \n * Backend\n * Express\n * Hono\n * \n * \n * \n * \n *\n * ### Invalid\n *\n * Use the `aria-invalid=\"true\"` attribute on the `ComboboxInput` to mark the combobox as invalid.\n *\n * \n * \n * \n * \n * Astro\n * Next.js\n * \n * \n * \n *\n * ### Disabled\n *\n * Use the `disabled` prop to disable the combobox.\n *\n * \n * \n * \n * \n * Astro\n * Next.js\n * \n * \n * \n *\n * ### Auto Highlight\n *\n * Use the `autoHighlight` prop to automatically highlight the first item on filter.\n *\n * \n * \n * \n * \n * No results found.\n * Astro\n * Next.js\n * Nuxt\n * Remix\n * \n * \n * \n *\n * ### Search in Popup\n *\n * You can trigger the combobox from a button or any other component by using the render prop. Move the `ComboboxInput` inside the `ComboboxContent`.\n *\n * \n * \n * \n * \n * \n * \n * \n * No countries found.\n * Brazil\n * Canada\n * France\n * Germany\n * Japan\n * \n * \n * \n */\n\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\n\ntype Props = {\n class?: string;\n name?: string;\n defaultValue?: string;\n placeholder?: string;\n disabled?: boolean;\n required?: boolean;\n openOnFocus?: boolean;\n autoHighlight?: boolean;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n name,\n defaultValue,\n placeholder,\n disabled = false,\n required = false,\n openOnFocus,\n autoHighlight,\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n\n\n\n", "type": "registry:ui" }, { "path": "ui/combobox/ComboboxInput.astro", - "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport {\n InputGroup,\n InputGroupInput,\n InputGroupAddon,\n InputGroupButton,\n} from \"../input-group\";\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\";\nimport XIcon from \"@lucide/astro/icons/x\";\n\ntype Props = {\n class?: string;\n placeholder?: string;\n disabled?: boolean;\n showTrigger?: boolean;\n showClear?: boolean;\n} & HTMLAttributes<\"input\">;\n\nconst {\n class: className = \"\",\n placeholder,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n {\n (showTrigger || showClear) && (\n \n {showClear && (\n \n \n \n )}\n {showTrigger && (\n \n \n \n )}\n \n )\n }\n\n", + "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport {\n InputGroup,\n InputGroupInput,\n InputGroupAddon,\n InputGroupButton,\n} from \"../input-group\";\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\";\nimport XIcon from \"@lucide/astro/icons/x\";\n\ntype Props = {\n class?: string;\n size?: \"sm\" | \"default\" | \"lg\";\n placeholder?: string;\n disabled?: boolean;\n showTrigger?: boolean;\n showClear?: boolean;\n} & Omit, \"size\">;\n\nconst {\n class: className = \"\",\n size = \"default\",\n placeholder,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n {\n (showTrigger || showClear) && (\n \n {showClear && (\n \n \n \n )}\n {showTrigger && (\n \n \n \n )}\n \n )\n }\n\n", "type": "registry:ui" }, { "path": "ui/combobox/ComboboxContent.astro", - "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n class?: string;\n side?: \"top\" | \"bottom\";\n align?: \"start\" | \"center\" | \"end\";\n sideOffset?: number;\n alignOffset?: number;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n side = \"bottom\",\n align = \"start\",\n sideOffset = 4,\n alignOffset = 0,\n ...rest\n} = Astro.props as Props;\n\nconst contentVariants = cva(\n [\n \"z-50 hidden data-[state=open]:block [transition:display_150ms_allow-discrete] starting:data-[state=closed]:block outline-hidden\",\n \"bg-popover text-popover-foreground min-w-[var(--combobox-input-width,8rem)] overflow-hidden rounded-lg shadow-md ring-1 ring-foreground/10\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"origin-(--transform-origin)\",\n \"*:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none\",\n \"[--tw-animation-fill-mode:both]\",\n ],\n {\n variants: {\n side: {\n top: \"data-[side=top]:slide-in-from-bottom-2\",\n bottom: \"data-[side=bottom]:slide-in-from-top-2\",\n },\n },\n defaultVariants: {\n side: \"bottom\",\n },\n },\n);\n---\n\n\n \n\n", + "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n class?: string;\n side?: \"top\" | \"bottom\";\n align?: \"start\" | \"center\" | \"end\";\n sideOffset?: number;\n alignOffset?: number;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n side = \"bottom\",\n align = \"start\",\n sideOffset = 4,\n alignOffset = 0,\n ...rest\n} = Astro.props as Props;\n\nconst contentVariants = cva(\n [\n \"z-50 outline-hidden\",\n \"bg-popover text-popover-foreground min-w-[var(--combobox-input-width,8rem)] overflow-hidden rounded-lg shadow-md ring-1 ring-foreground/10\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"origin-(--transform-origin)\",\n \"*:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:shadow-none\",\n \"[--tw-animation-fill-mode:both]\",\n ],\n {\n variants: {\n side: {\n top: \"data-[side=top]:slide-in-from-bottom-2\",\n bottom: \"data-[side=bottom]:slide-in-from-top-2\",\n },\n },\n defaultVariants: {\n side: \"bottom\",\n },\n },\n);\n---\n\n\n \n\n", "type": "registry:ui" }, { @@ -55,7 +55,7 @@ }, { "path": "ui/combobox/ComboboxTrigger.astro", - "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\";\n\ntype Props = {\n class?: string;\n size?: \"sm\" | \"default\" | \"lg\";\n} & HTMLAttributes<\"button\">;\n\nconst {\n class: className = \"\",\n size = \"default\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n \n\n", + "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\";\n\ntype Props = {\n class?: string;\n size?: \"sm\" | \"default\" | \"lg\";\n} & HTMLAttributes<\"button\">;\n\nconst {\n class: className = \"\",\n size = \"default\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n \n \n \n\n", "type": "registry:ui" }, { diff --git a/apps/web/public/r/dropdown-menu.json b/apps/web/public/r/dropdown-menu.json index 1c88acb..5cfd778 100644 --- a/apps/web/public/r/dropdown-menu.json +++ b/apps/web/public/r/dropdown-menu.json @@ -15,7 +15,7 @@ }, { "path": "ui/dropdown-menu/DropdownMenuContent.astro", - "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n align?: \"start\" | \"center\" | \"end\";\n alignOffset?: number;\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n sideOffset?: number;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n align = \"start\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst contentVariants = cva([\n \"z-50 hidden data-[state=open]:block [transition:display_150ms_allow-discrete] starting:data-[state=closed]:block outline-hidden\",\n \"min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n \"origin-(--transform-origin) [--tw-animation-fill-mode:both]\",\n]);\n---\n\n\n \n\n", + "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n align?: \"start\" | \"center\" | \"end\";\n alignOffset?: number;\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n sideOffset?: number;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n align = \"start\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst contentVariants = cva([\n \"z-50 outline-hidden\",\n \"min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n \"origin-(--transform-origin) [--tw-animation-fill-mode:both]\",\n]);\n---\n\n\n \n\n", "type": "registry:ui" }, { diff --git a/apps/web/public/r/hover-card.json b/apps/web/public/r/hover-card.json index 1d05068..932ddc4 100644 --- a/apps/web/public/r/hover-card.json +++ b/apps/web/public/r/hover-card.json @@ -12,7 +12,7 @@ }, { "path": "ui/hover-card/HoverCardContent.astro", - "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n sideOffset?: number;\n align?: \"start\" | \"center\" | \"end\";\n alignOffset?: number;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n side = \"bottom\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n ...rest\n} = Astro.props as Props;\n\nconst contentVariants = cva([\n // visibility\n \"duration-150 ease transition-discrete outline-hidden\",\n // animations\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n // styles\n \"ring-foreground/10 bg-popover text-popover-foreground w-64 rounded-lg p-2.5 text-sm shadow-md ring-1\",\n // origin from positioner\n \"origin-(--transform-origin)\",\n]);\n---\n\n
\n
\n \n \n
\n
\n\n", + "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n sideOffset?: number;\n align?: \"start\" | \"center\" | \"end\";\n alignOffset?: number;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n side = \"bottom\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n ...rest\n} = Astro.props as Props;\n\nconst contentVariants = cva([\n // visibility\n \"duration-150 ease data-instant:duration-0 transition-discrete outline-hidden\",\n // animations\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n \"data-[instant]:transition-none! data-[instant]:animate-none!\",\n \"data-instant:data-[state=closed]:animate-none! data-instant:data-[state=closed]:fade-out-0! data-instant:data-[state=closed]:opacity-100! data-instant:data-[state=closed]:scale-100! data-instant:data-[state=closed]:translate-x-0! data-instant:data-[state=closed]:translate-y-0!\",\n // styles\n \"ring-foreground/10 bg-popover text-popover-foreground w-64 rounded-lg p-2.5 text-sm shadow-md ring-1\",\n // origin from positioner\n \"origin-(--transform-origin)\",\n]);\n---\n\n
\n
\n \n \n
\n
\n\n", "type": "registry:ui" }, { diff --git a/apps/web/public/r/input-group.json b/apps/web/public/r/input-group.json index 1cf7780..7719ed0 100644 --- a/apps/web/public/r/input-group.json +++ b/apps/web/public/r/input-group.json @@ -5,32 +5,32 @@ "files": [ { "path": "ui/input-group/InputGroup.astro", - "content": "---\n/**\n * @component InputGroup\n * @title Input Group\n * @description An input field with attached addons like icons, buttons, or text labels.\n * @figmaUrl https://www.figma.com/design/koxai7zw5vIuBzuVxe5T2l/bejamas-ui?node-id=2549-20918&t=YFStJ3V8fXEO8QD8-4\n *\n * @preview\n *\n *
\n * \n * \n * \n * \n * \n * 12 results\n * \n *\n * \n * \n * \n * https://\n * \n * \n * Check\n * \n * \n *\n * \n * \n * \n * \n * \n * \n * Auto\n * 52% used\n * \n * \n * \n * Send\n * \n * \n * \n *
\n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import { InputGroup, InputGroupInput, InputGroupAddon, InputGroupButton, InputGroupText } from '@bejamas/ui/components/input-group';\n * ---\n *\n * \n * \n * \n * \n * ```\n */\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n as: Tag = \"div\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst rootClasses =\n \"border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-lg border transition-colors in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto\";\n---\n\n\n \n\n\n\n", + "content": "---\n/**\n * @component InputGroup\n * @title Input Group\n * @description An input field with attached addons like icons, buttons, or text labels.\n * @figmaUrl https://www.figma.com/design/koxai7zw5vIuBzuVxe5T2l/bejamas-ui?node-id=2549-20918&t=YFStJ3V8fXEO8QD8-4\n *\n * @preview\n *\n *
\n * \n * \n * \n * \n * \n * 12 results\n * \n *\n * \n * \n * \n * https://\n * \n * \n * Check\n * \n * \n *\n * \n * \n * \n * \n * \n * \n * Auto\n * 52% used\n * \n * \n * \n * Send\n * \n * \n * \n *
\n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import { InputGroup, InputGroupInput, InputGroupAddon, InputGroupButton, InputGroupText } from '@bejamas/ui/components/input-group';\n * ---\n *\n * \n * \n * \n * \n * ```\n *\n * @examples\n *\n * ### Sizes\n *\n *
\n * \n * \n * \n * \n * \n * \n * \n * \n * \n *
\n *\n * @api\n *\n * | Prop | Type | Default |\n * | --- | --- | --- |\n * | `size` | `\"sm\" \\| \"default\" \\| \"lg\"` | `\"default\"` |\n */\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\n\ntype Props = {\n as?: HTMLTag;\n size?: VariantProps[\"size\"];\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n as: Tag = \"div\",\n size = \"default\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst inputGroupVariants = cva(\n \"border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 rounded-lg border transition-colors in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto group/input-group relative flex w-full min-w-0 items-center outline-none\",\n {\n variants: {\n size: {\n sm: \"h-8 has-[>[data-align=block-end]]:[&>input[data-slot=input-group-control]]:pt-2 has-[>[data-align=block-start]]:[&>input[data-slot=input-group-control]]:pb-2 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-1.5 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-1.5\",\n default:\n \"h-9 has-[>[data-align=block-end]]:[&>input[data-slot=input-group-control]]:pt-2.5 has-[>[data-align=block-start]]:[&>input[data-slot=input-group-control]]:pb-2.5 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-1.5 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-1.5\",\n lg: \"h-10 has-[>[data-align=block-end]]:[&>input[data-slot=input-group-control]]:pt-3 has-[>[data-align=block-start]]:[&>input[data-slot=input-group-control]]:pb-3 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-2 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-2\",\n },\n },\n defaultVariants: {\n size: \"default\",\n },\n },\n);\n---\n\n\n \n\n\n\n", "type": "registry:ui" }, { "path": "ui/input-group/InputGroupAddon.astro", - "content": "---\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\n\ntype Align = \"inline-start\" | \"inline-end\" | \"block-start\" | \"block-end\";\n\ntype Props = {\n align?: Align;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n align = \"inline-start\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst addonVariants = cva(\n \"text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none\",\n {\n variants: {\n align: {\n \"inline-start\":\n \"pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first\",\n \"inline-end\":\n \"pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last\",\n \"block-start\":\n \"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:mb-2 order-first w-full justify-start\",\n \"block-end\":\n \"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:mt-2 order-last w-full justify-start\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n },\n);\n---\n\n\n \n\n", + "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\n\ntype Align = \"inline-start\" | \"inline-end\" | \"block-start\" | \"block-end\";\n\ntype Props = {\n align?: Align;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n align = \"inline-start\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst addonVariants = cva(\n \"text-muted-foreground h-auto group-data-[size=sm]/input-group:py-1.5 group-data-[size=default]/input-group:py-2 group-data-[size=lg]/input-group:py-2.5 gap-2 font-medium group-data-[size=sm]/input-group:text-xs group-data-[size=default]/input-group:text-sm group-data-[size=lg]/input-group:text-base group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 group-data-[size=sm]/input-group:[&>svg:not([class*='size-'])]:size-3.5 flex cursor-text items-center justify-center select-none\",\n {\n variants: {\n align: {\n \"inline-start\":\n \"order-first pl-2 has-[button]:ml-[-0.3rem] has-[[data-slot=input-group-button]]:ml-[-0.3rem] has-[kbd]:ml-[-0.15rem]\",\n \"inline-end\":\n \"order-last pr-2 has-[button]:mr-[-0.3rem] has-[[data-slot=input-group-button]]:mr-[-0.3rem] has-[kbd]:mr-[-0.15rem]\",\n \"block-start\":\n \"order-first w-full justify-start group-data-[size=sm]/input-group:px-2.5 group-data-[size=default]/input-group:px-3 group-data-[size=lg]/input-group:px-3.5 pt-2 group-has-[>[data-slot=input-group-control]]/input-group:pt-2 [.border-b]:mb-2\",\n \"block-end\":\n \"order-last w-full justify-start group-data-[size=sm]/input-group:px-2.5 group-data-[size=default]/input-group:px-3 group-data-[size=lg]/input-group:px-3.5 pb-2 group-has-[>[data-slot=input-group-control]]/input-group:pb-2 [.border-t]:mt-2\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n },\n);\n---\n\n\n \n\n", "type": "registry:ui" }, { "path": "ui/input-group/InputGroupButton.astro", - "content": "---\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"../button\";\n\ntype GroupButtonSize = \"xs\" | \"sm\" | \"icon-xs\" | \"icon-sm\";\n\ntype Props = {\n as?: HTMLTag;\n size?: GroupButtonSize;\n variant?:\n | \"default\"\n | \"secondary\"\n | \"outline\"\n | \"ghost\"\n | \"destructive\"\n | \"link\";\n type?: \"button\" | \"submit\" | \"reset\";\n class?: string;\n} & HTMLAttributes<\"button\">;\n\nconst {\n as: rawTag,\n size = \"xs\",\n variant = \"ghost\",\n type = \"button\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst inputGroupButtonVariants = cva(\n \"gap-2 text-sm shadow-none flex items-center\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\":\n \"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n },\n);\n\nconst Tag = rawTag ?? undefined;\n---\n\n{\n Tag ? (\n \n \n \n ) : (\n \n \n \n )\n}\n", + "content": "---\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"../button\";\n\ntype GroupButtonSize = \"xs\" | \"sm\" | \"icon-xs\" | \"icon-sm\";\n\ntype Props = {\n as?: HTMLTag;\n size?: GroupButtonSize;\n variant?:\n | \"default\"\n | \"secondary\"\n | \"outline\"\n | \"ghost\"\n | \"destructive\"\n | \"link\";\n type?: \"button\" | \"submit\" | \"reset\";\n class?: string;\n} & HTMLAttributes<\"button\">;\n\nconst {\n as: rawTag,\n size = \"xs\",\n variant = \"ghost\",\n type = \"button\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst inputGroupButtonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center shadow-none\",\n {\n variants: {\n size: {\n xs: \"rounded-[calc(var(--radius)-3px)] group-data-[size=sm]/input-group:h-6 group-data-[size=sm]/input-group:gap-1 group-data-[size=sm]/input-group:px-1.5 group-data-[size=sm]/input-group:text-xs group-data-[size=sm]/input-group:[&>svg:not([class*='size-'])]:size-3.5 group-data-[size=default]/input-group:h-7 group-data-[size=default]/input-group:gap-1.5 group-data-[size=default]/input-group:px-2 group-data-[size=default]/input-group:text-sm group-data-[size=default]/input-group:[&>svg:not([class*='size-'])]:size-4 group-data-[size=lg]/input-group:h-8 group-data-[size=lg]/input-group:gap-1.5 group-data-[size=lg]/input-group:px-2.5 group-data-[size=lg]/input-group:text-base group-data-[size=lg]/input-group:[&>svg:not([class*='size-'])]:size-4\",\n sm: \"rounded-[calc(var(--radius)-2px)] group-data-[size=sm]/input-group:h-7 group-data-[size=sm]/input-group:gap-1.5 group-data-[size=sm]/input-group:px-2.5 group-data-[size=sm]/input-group:text-xs group-data-[size=default]/input-group:h-8 group-data-[size=default]/input-group:gap-1.5 group-data-[size=default]/input-group:px-3 group-data-[size=default]/input-group:text-sm group-data-[size=lg]/input-group:h-9 group-data-[size=lg]/input-group:gap-2 group-data-[size=lg]/input-group:px-3.5 group-data-[size=lg]/input-group:text-base\",\n \"icon-xs\":\n \"rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0 group-data-[size=sm]/input-group:size-6 group-data-[size=default]/input-group:size-7 group-data-[size=lg]/input-group:size-8\",\n \"icon-sm\":\n \"p-0 has-[>svg]:p-0 group-data-[size=sm]/input-group:size-7 group-data-[size=default]/input-group:size-8 group-data-[size=lg]/input-group:size-9\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n },\n);\n\nconst Tag = rawTag ?? undefined;\n---\n\n{\n Tag ? (\n \n \n \n ) : (\n \n \n \n )\n}\n", "type": "registry:ui" }, { "path": "ui/input-group/InputGroupInput.astro", - "content": "---\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { Input } from \"../input\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"input\">;\n\nconst { as: rawTag, class: className = \"\", ...rest } = Astro.props as Props;\n\nconst Tag = rawTag ?? undefined;\n---\n\n{\n Tag ? (\n \n ) : (\n \n )\n}\n", + "content": "---\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { Input } from \"../input\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"input\">;\n\nconst { as: rawTag, class: className = \"\", ...rest } = Astro.props as Props;\n\nconst Tag = rawTag ?? undefined;\n\nconst controlClasses =\n \"rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent flex-1 min-w-0 group-data-[size=sm]/input-group:h-8 group-data-[size=sm]/input-group:px-2.5 group-data-[size=sm]/input-group:py-1 group-data-[size=sm]/input-group:text-xs group-data-[size=default]/input-group:h-9 group-data-[size=default]/input-group:px-3 group-data-[size=default]/input-group:py-1 group-data-[size=default]/input-group:text-sm group-data-[size=lg]/input-group:h-10 group-data-[size=lg]/input-group:px-3.5 group-data-[size=lg]/input-group:py-1.5 group-data-[size=lg]/input-group:text-base\";\n---\n\n{\n Tag ? (\n \n ) : (\n \n )\n}\n", "type": "registry:ui" }, { "path": "ui/input-group/InputGroupText.astro", - "content": "---\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\n\ntype Props = {\n class?: string;\n} & HTMLAttributes<\"span\">;\n\nconst { class: className = \"\", ...rest } = Astro.props as Props;\n---\n\n\n \n\n", + "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\n\ntype Props = {\n class?: string;\n} & HTMLAttributes<\"span\">;\n\nconst { class: className = \"\", ...rest } = Astro.props as Props;\n---\n\n\n \n\n", "type": "registry:ui" }, { "path": "ui/input-group/InputGroupTextarea.astro", - "content": "---\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { Textarea } from \"../textarea\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"textarea\">;\n\nconst {\n as: rawTag,\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst Tag = rawTag ?? undefined;\n---\n\n{Tag ? (\n \n) : (\n \n)}\n\n", + "content": "---\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { Textarea } from \"../textarea\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"textarea\">;\n\nconst { as: rawTag, class: className = \"\", ...rest } = Astro.props as Props;\n\nconst Tag = rawTag ?? undefined;\n\nconst textareaClasses =\n \"flex-1 min-w-0 resize-none rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent dark:disabled:bg-transparent group-data-[size=sm]/input-group:px-2.5 group-data-[size=sm]/input-group:py-2 group-data-[size=sm]/input-group:text-xs group-data-[size=default]/input-group:px-3 group-data-[size=default]/input-group:py-2.5 group-data-[size=default]/input-group:text-sm group-data-[size=lg]/input-group:px-3.5 group-data-[size=lg]/input-group:py-3 group-data-[size=lg]/input-group:text-base\";\n---\n\n{\n Tag ? (\n \n ) : (\n \n )\n}\n", "type": "registry:ui" }, { diff --git a/apps/web/public/r/link-group.json b/apps/web/public/r/link-group.json index 74cbef2..8668370 100644 --- a/apps/web/public/r/link-group.json +++ b/apps/web/public/r/link-group.json @@ -5,7 +5,7 @@ "files": [ { "path": "ui/link-group/LinkGroup.astro", - "content": "---\n/**\n * @component LinkGroup\n * @title Link Group\n * @description A group of related links with optional title for navigation or footer sections.\n * @figmaUrl https://www.figma.com/design/koxai7zw5vIuBzuVxe5T2l/bejamas-ui?node-id=2166-6001&t=YFStJ3V8fXEO8QD8-4\n *\n * @preview\n *\n * \n * Company\n * \n * Home\n * About\n * \n * \n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import { LinkGroup, LinkGroupTitle, LinkGroupList, LinkGroupItem } from '@bejamas/ui/components/link-group';\n * ---\n *\n * \n * Company\n * \n * Home\n * \n * \n * ```\n */\n\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n as: Tag = \"div\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n\n\n", + "content": "---\n/**\n * @component LinkGroup\n * @title Link Group\n * @description A group of related links with optional title for navigation or footer sections.\n * @figmaUrl https://www.figma.com/design/koxai7zw5vIuBzuVxe5T2l/bejamas-ui?node-id=2166-6001&t=YFStJ3V8fXEO8QD8-4\n *\n * @preview\n *\n * \n * Company\n * \n * Home\n * About\n * \n * \n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import { LinkGroup, LinkGroupTitle, LinkGroupList, LinkGroupItem } from '@bejamas/ui/components/link-group';\n * ---\n *\n * \n * Company\n * \n * Home\n * \n * \n * ```\n */\n\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n as: Tag = \"div\",\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n\n\n", "type": "registry:ui" }, { diff --git a/apps/web/public/r/navigation-menu.json b/apps/web/public/r/navigation-menu.json index 4793ef9..28dea4b 100644 --- a/apps/web/public/r/navigation-menu.json +++ b/apps/web/public/r/navigation-menu.json @@ -7,7 +7,7 @@ "files": [ { "path": "ui/navigation-menu/NavigationMenu.astro", - "content": "---\n/**\n * @component NavigationMenu\n * @title Navigation Menu\n * @description A menu with dropdown content and optional viewport transitions.\n *\n * @preview\n *\n * \n * \n * \n * Products\n * \n *
\n * \n *
Analytics
\n *
Real-time insights
\n *
\n * \n *
Automation
\n *
Workflow builders
\n *
\n * \n *
Security
\n *
Enterprise-grade
\n *
\n * \n *
Integrations
\n *
Connect tools
\n *
\n *
\n *
\n *
\n * \n * Solutions\n * \n *
\n * \n *
Startups
\n *
Move fast
\n *
\n * \n *
Enterprise
\n *
Scale securely
\n *
\n * \n *
Agencies
\n *
Client delivery
\n *
\n * \n *
E-commerce
\n *
Sell online
\n *
\n *
\n *
\n *
\n * \n * Resources\n * \n *
\n * \n *
Docs
\n *
Get started
\n *
\n * \n *
Blog
\n *
Latest updates
\n *
\n * \n *
Support
\n *
Get help
\n *
\n * \n *
Events
\n *
Upcoming webinars
\n *
\n * \n *
Guides
\n *
Best practices
\n *
\n * \n *
Contact
\n *
Talk to us
\n *
\n *
\n *
\n *
\n * \n * Company\n * \n *
\n * \n *
About
\n *
Our story
\n *
\n * \n *
Careers
\n *
Join the team
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import {\n * NavigationMenu,\n * NavigationMenuList,\n * NavigationMenuItem,\n * NavigationMenuTrigger,\n * NavigationMenuContent,\n * NavigationMenuLink,\n * } from '@bejamas/ui/components/navigation-menu';\n * ---\n *\n * \n * \n * \n * Products\n * \n *
\n * \n *
Analytics
\n *
Real-time insights
\n *
\n * \n *
Automation
\n *
Workflow builders
\n *
\n *
\n *
\n *
\n * \n * Resources\n * \n *
\n * \n *
Docs
\n *
Get started
\n *
\n * \n *
Support
\n *
Get help
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n * ```\n *\n * @api\n *\n * ### NavigationMenu Props\n *\n * | Prop | Type | Default | Description |\n * |------|------|---------|-------------|\n * | `viewport` | `boolean` | `true` | Enable animated viewport container for content |\n * | `delayOpen` | `number` | `0` | Delay in ms before opening menu |\n * | `delayClose` | `number` | `0` | Delay in ms before closing menu |\n * | `openOnFocus` | `boolean` | `false` | Open menu on keyboard focus |\n * | `as` | `HTMLTag` | `\"nav\"` | HTML element to render |\n *\n * ### NavigationMenuItem Props\n *\n * | Prop | Type | Default | Description |\n * |------|------|---------|-------------|\n * | `value` | `string` | — | Unique identifier for the item |\n * | `align` | `\"start\" \\| \"center\" \\| \"end\"` | `\"start\"` | Content alignment relative to trigger |\n *\n * ### Events\n *\n * | Event | Detail | Description |\n * |-------|--------|-------------|\n * | `navigation-menu:change` | `{ value: string \\| null }` | Fired when active item changes |\n *\n * ### Programmatic Control\n *\n * ```js nocollapse\n * // Open a specific item\n * element.dispatchEvent(\n * new CustomEvent(\"navigation-menu:set\", { detail: { value: \"products\" } })\n * );\n *\n * // Close the menu\n * element.dispatchEvent(\n * new CustomEvent(\"navigation-menu:set\", { detail: { value: null } })\n * );\n * ```\n *\n * @examples\n *\n * ### With Icons\n *\n * Links with Lucide icons for visual enhancement.\n *\n * \n * \n * \n * Features\n * \n *
\n * \n * \n *
\n *
Analytics
\n *
Track your metrics
\n *
\n *
\n * \n * \n *
\n *
Automation
\n *
Streamline workflows
\n *
\n *
\n * \n * \n *
\n *
Security
\n *
Enterprise-grade protection
\n *
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n *\n * ### Featured Card\n *\n * Hero-style layout with a featured item alongside regular links.\n *\n * \n * \n * \n * Getting Started\n * \n *
\n *
\n * \n *
Introduction
\n *

Learn the basics and get up to speed quickly with our comprehensive guides.

\n *
\n *
\n * \n *
Installation
\n *
Step-by-step setup
\n *
\n * \n *
Configuration
\n *
Customize settings
\n *
\n * \n *
Examples
\n *
Code samples
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n *\n * ### With Simple Links\n *\n * Use `navigationMenuTriggerStyle()` to style regular links to match triggers.\n *\n * \n * \n * \n * Products\n * \n *
\n * Product One\n * Product Two\n *
\n *
\n *
\n * \n * \n * Pricing\n * \n * \n * \n * \n * Docs\n * \n * \n * \n *
\n *
\n *\n * ### Without Viewport\n *\n * Set `viewport={false}` to render content directly without the animated viewport container.\n *\n * \n * \n * \n * Menu\n * \n *
\n * Option One\n * Option Two\n *
\n *
\n *
\n *
\n *
\n */\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport NavigationMenuViewport from \"./NavigationMenuViewport.astro\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n viewport?: boolean;\n delayOpen?: number;\n delayClose?: number;\n openOnFocus?: boolean;\n} & HTMLAttributes<\"nav\">;\n\nconst {\n as: Tag = \"nav\",\n class: className = \"\",\n viewport = true,\n delayOpen = 0,\n delayClose = 50,\n openOnFocus,\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n {viewport && }\n\n\n\n", + "content": "---\n/**\n * @component NavigationMenu\n * @title Navigation Menu\n * @description A menu with dropdown content and optional viewport transitions.\n *\n * @preview\n *\n * \n * \n * \n * Products\n * \n *
\n * \n *
Analytics
\n *
Real-time insights
\n *
\n * \n *
Automation
\n *
Workflow builders
\n *
\n * \n *
Security
\n *
Enterprise-grade
\n *
\n * \n *
Integrations
\n *
Connect tools
\n *
\n *
\n *
\n *
\n * \n * Solutions\n * \n *
\n * \n *
Startups
\n *
Move fast
\n *
\n * \n *
Enterprise
\n *
Scale securely
\n *
\n * \n *
Agencies
\n *
Client delivery
\n *
\n * \n *
E-commerce
\n *
Sell online
\n *
\n *
\n *
\n *
\n * \n * Resources\n * \n *
\n * \n *
Docs
\n *
Get started
\n *
\n * \n *
Blog
\n *
Latest updates
\n *
\n * \n *
Support
\n *
Get help
\n *
\n * \n *
Events
\n *
Upcoming webinars
\n *
\n * \n *
Guides
\n *
Best practices
\n *
\n * \n *
Contact
\n *
Talk to us
\n *
\n *
\n *
\n *
\n * \n * Company\n * \n *
\n * \n *
About
\n *
Our story
\n *
\n * \n *
Careers
\n *
Join the team
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n *\n * @usage\n *\n * ```astro nocollapse\n * ---\n * import {\n * NavigationMenu,\n * NavigationMenuList,\n * NavigationMenuItem,\n * NavigationMenuTrigger,\n * NavigationMenuContent,\n * NavigationMenuLink,\n * } from '@bejamas/ui/components/navigation-menu';\n * ---\n *\n * \n * \n * \n * Products\n * \n *
\n * \n *
Analytics
\n *
Real-time insights
\n *
\n * \n *
Automation
\n *
Workflow builders
\n *
\n *
\n *
\n *
\n * \n * Resources\n * \n *
\n * \n *
Docs
\n *
Get started
\n *
\n * \n *
Support
\n *
Get help
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n * ```\n *\n * @api\n *\n * ### NavigationMenu Props\n *\n * | Prop | Type | Default | Description |\n * |------|------|---------|-------------|\n * | `viewport` | `boolean` | `true` | Enable animated viewport container for content |\n * | `delayOpen` | `number` | `0` | Delay in ms before opening menu |\n * | `delayClose` | `number` | `0` | Delay in ms before closing menu |\n * | `openOnFocus` | `boolean` | `false` | Open menu on keyboard focus |\n * | `as` | `HTMLTag` | `\"nav\"` | HTML element to render |\n *\n * ### NavigationMenuItem Props\n *\n * | Prop | Type | Default | Description |\n * |------|------|---------|-------------|\n * | `value` | `string` | — | Unique identifier for the item |\n * | `align` | `\"start\" \\| \"center\" \\| \"end\"` | `\"start\"` | Content alignment relative to trigger |\n *\n * ### Events\n *\n * | Event | Detail | Description |\n * |-------|--------|-------------|\n * | `navigation-menu:change` | `{ value: string \\| null }` | Fired when active item changes |\n *\n * ### Programmatic Control\n *\n * ```js nocollapse\n * // Open a specific item\n * element.dispatchEvent(\n * new CustomEvent(\"navigation-menu:set\", { detail: { value: \"products\" } })\n * );\n *\n * // Close the menu\n * element.dispatchEvent(\n * new CustomEvent(\"navigation-menu:set\", { detail: { value: null } })\n * );\n * ```\n *\n * @examples\n *\n * ### With Icons\n *\n * Links with Lucide icons for visual enhancement.\n *\n * \n * \n * \n * Features\n * \n *
\n * \n * \n *
\n *
Analytics
\n *
Track your metrics
\n *
\n *
\n * \n * \n *
\n *
Automation
\n *
Streamline workflows
\n *
\n *
\n * \n * \n *
\n *
Security
\n *
Enterprise-grade protection
\n *
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n *\n * ### Featured Card\n *\n * Hero-style layout with a featured item alongside regular links.\n *\n * \n * \n * \n * Getting Started\n * \n *
\n *
\n * \n *
Introduction
\n *

Learn the basics and get up to speed quickly with our comprehensive guides.

\n *
\n *
\n * \n *
Installation
\n *
Step-by-step setup
\n *
\n * \n *
Configuration
\n *
Customize settings
\n *
\n * \n *
Examples
\n *
Code samples
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n *\n * ### With Simple Links\n *\n * Use `navigationMenuTriggerStyle()` to style regular links to match triggers.\n *\n * \n * \n * \n * Products\n * \n *
\n * Product One\n * Product Two\n *
\n *
\n *
\n * \n * \n * Pricing\n * \n * \n * \n * \n * Docs\n * \n * \n * \n *
\n *
\n *\n * ### Without Viewport\n *\n * Set `viewport={false}` to render content directly without the animated viewport container.\n *\n * \n * \n * \n * Menu\n * \n *
\n * Option One\n * Option Two\n *
\n *
\n *
\n *
\n *
\n */\nimport type { HTMLAttributes, HTMLTag } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport NavigationMenuViewport from \"./NavigationMenuViewport.astro\";\n\ntype Props = {\n as?: HTMLTag;\n class?: string;\n viewport?: boolean;\n delayOpen?: number;\n delayClose?: number;\n openOnFocus?: boolean;\n} & HTMLAttributes<\"nav\">;\n\nconst {\n as: Tag = \"nav\",\n class: className = \"\",\n viewport = true,\n delayOpen = 0,\n delayClose = 50,\n openOnFocus,\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n {viewport && }\n\n\n\n", "type": "registry:ui" }, { diff --git a/apps/web/public/r/popover.json b/apps/web/public/r/popover.json index 0ae8f0a..6da960f 100644 --- a/apps/web/public/r/popover.json +++ b/apps/web/public/r/popover.json @@ -20,7 +20,7 @@ }, { "path": "ui/popover/PopoverContent.astro", - "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n align?: \"start\" | \"center\" | \"end\";\n alignOffset?: number;\n sideOffset?: number;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n side = \"bottom\",\n align = \"center\",\n sideOffset = 6,\n alignOffset = 0,\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst contentVariants = cva([\n \"z-50 hidden data-[state=open]:block duration-150 ease transition-discrete starting:data-[state=closed]:block outline-hidden\",\n \"bg-popover text-popover-foreground ring-foreground/10 ring-1\",\n \"flex w-72 flex-col gap-2.5 rounded-lg p-4 text-sm shadow-md\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n \"origin-(--transform-origin) [--tw-animation-fill-mode:both]\",\n]);\n---\n\n\n \n\n", + "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n align?: \"start\" | \"center\" | \"end\";\n alignOffset?: number;\n sideOffset?: number;\n class?: string;\n} & HTMLAttributes<\"div\">;\n\nconst {\n side = \"bottom\",\n align = \"center\",\n sideOffset = 6,\n alignOffset = 0,\n class: className = \"\",\n ...rest\n} = Astro.props as Props;\n\nconst contentVariants = cva([\n \"z-50 duration-150 ease transition-discrete outline-hidden\",\n \"bg-popover text-popover-foreground ring-foreground/10 ring-1\",\n \"flex w-72 flex-col gap-2.5 rounded-lg p-4 text-sm shadow-md\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n \"origin-(--transform-origin) [--tw-animation-fill-mode:both]\",\n]);\n---\n\n\n \n\n", "type": "registry:ui" }, { diff --git a/apps/web/public/r/registry.json b/apps/web/public/r/registry.json index f974879..ccd6109 100644 --- a/apps/web/public/r/registry.json +++ b/apps/web/public/r/registry.json @@ -67,6 +67,18 @@ "path": "ui/avatar/AvatarFallback.astro", "type": "registry:ui" }, + { + "path": "ui/avatar/AvatarBadge.astro", + "type": "registry:ui" + }, + { + "path": "ui/avatar/AvatarGroup.astro", + "type": "registry:ui" + }, + { + "path": "ui/avatar/AvatarGroupCount.astro", + "type": "registry:ui" + }, { "path": "ui/avatar/index.ts", "type": "registry:ui" diff --git a/apps/web/public/r/select.json b/apps/web/public/r/select.json index 9336bed..e2d66c6 100644 --- a/apps/web/public/r/select.json +++ b/apps/web/public/r/select.json @@ -12,7 +12,7 @@ }, { "path": "ui/select/SelectTrigger.astro", - "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\";\n\ntype Props = {\n class?: string;\n size?: \"sm\" | \"default\" | \"lg\";\n} & HTMLAttributes<\"button\">;\n\nconst {\n class: className = \"\",\n size = \"default\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n \n\n", + "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\";\n\ntype Props = {\n class?: string;\n size?: \"sm\" | \"default\" | \"lg\";\n} & HTMLAttributes<\"button\">;\n\nconst {\n class: className = \"\",\n size = \"default\",\n ...rest\n} = Astro.props as Props;\n---\n\n\n \n \n\n", "type": "registry:ui" }, { @@ -22,7 +22,7 @@ }, { "path": "ui/select/SelectContent.astro", - "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n class?: string;\n size?: \"sm\" | \"default\" | \"lg\";\n position?: \"item-aligned\" | \"popper\";\n align?: \"start\" | \"center\" | \"end\";\n alignOffset?: number;\n side?: \"top\" | \"bottom\";\n sideOffset?: number;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n size = \"default\",\n position = \"item-aligned\",\n align = \"start\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n ...rest\n} = Astro.props as Props;\n\nconst contentVariants = cva(\n [\n \"group/select-content focus-visible:outline-none z-50 hidden data-[state=open]:block\",\n \"bg-popover text-popover-foreground min-w-24 rounded-lg shadow-md ring-1 ring-foreground/10\",\n \"p-1 max-h-[var(--select-content-available-height,300px)] overflow-x-hidden overflow-y-auto\",\n ],\n {\n variants: {\n position: {\n \"item-aligned\": \"relative\",\n popper:\n \"fixed transition-discrete starting:data-[state=closed]:block min-w-[var(--select-trigger-width)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 origin-(--transform-origin) [--tw-animation-fill-mode:both]\",\n },\n side: {\n top: \"\",\n bottom: \"\",\n },\n },\n compoundVariants: [\n {\n position: \"popper\",\n side: \"top\",\n class: \"data-[side=top]:slide-in-from-bottom-2\",\n },\n {\n position: \"popper\",\n side: \"bottom\",\n class: \"data-[side=bottom]:slide-in-from-top-2\",\n },\n ],\n defaultVariants: {\n position: \"item-aligned\",\n side: \"bottom\",\n },\n },\n);\n---\n\n\n \n\n", + "content": "---\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cn } from \"@/lib/utils\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n class?: string;\n size?: \"sm\" | \"default\" | \"lg\";\n position?: \"item-aligned\" | \"popper\";\n align?: \"start\" | \"center\" | \"end\";\n alignOffset?: number;\n side?: \"top\" | \"bottom\";\n sideOffset?: number;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n size = \"default\",\n position = \"item-aligned\",\n align = \"start\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n ...rest\n} = Astro.props as Props;\n\nconst contentVariants = cva(\n [\n \"group/select-content focus-visible:outline-none z-50\",\n \"bg-popover text-popover-foreground min-w-24 rounded-lg shadow-md ring-1 ring-foreground/10\",\n \"p-1 max-h-[var(--select-content-available-height,300px)] overflow-x-hidden overflow-y-auto\",\n ],\n {\n variants: {\n position: {\n \"item-aligned\": \"relative\",\n popper:\n \"fixed min-w-[var(--select-trigger-width)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 origin-(--transform-origin) [--tw-animation-fill-mode:both]\",\n },\n side: {\n top: \"\",\n bottom: \"\",\n },\n },\n compoundVariants: [\n {\n position: \"popper\",\n side: \"top\",\n class: \"data-[side=top]:slide-in-from-bottom-2\",\n },\n {\n position: \"popper\",\n side: \"bottom\",\n class: \"data-[side=bottom]:slide-in-from-top-2\",\n },\n ],\n defaultVariants: {\n position: \"item-aligned\",\n side: \"bottom\",\n },\n },\n);\n---\n\n\n \n\n", "type": "registry:ui" }, { diff --git a/apps/web/public/r/tooltip.json b/apps/web/public/r/tooltip.json index 9a99307..7b3b0b9 100644 --- a/apps/web/public/r/tooltip.json +++ b/apps/web/public/r/tooltip.json @@ -17,7 +17,7 @@ }, { "path": "ui/tooltip/TooltipContent.astro", - "content": "---\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n class?: string;\n sideOffset?: number;\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n align?: \"start\" | \"center\" | \"end\";\n alignOffset?: number;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n sideOffset,\n side = \"top\",\n align = \"center\",\n alignOffset,\n ...rest\n} = Astro.props as Props;\n\nconst indicatorVariants = cva(\"pointer-events-none absolute border-4\", {\n variants: {\n side: {\n top: \"border-foreground border-b-0 border-r-transparent border-l-transparent top-full\",\n bottom:\n \"border-foreground border-t-0 border-r-transparent border-l-transparent bottom-full\",\n left: \"border-foreground border-r-0 border-t-transparent border-b-transparent left-full\",\n right:\n \"border-foreground border-l-0 border-t-transparent border-b-transparent right-full\",\n },\n align: {\n start: \"\",\n center: \"\",\n end: \"\",\n },\n },\n compoundVariants: [\n { side: \"top\", align: \"start\", class: \"left-2\" },\n { side: \"top\", align: \"center\", class: \"left-1/2 -translate-x-1/2\" },\n { side: \"top\", align: \"end\", class: \"right-2\" },\n { side: \"bottom\", align: \"start\", class: \"left-2\" },\n { side: \"bottom\", align: \"center\", class: \"left-1/2 -translate-x-1/2\" },\n { side: \"bottom\", align: \"end\", class: \"right-2\" },\n { side: \"left\", align: \"start\", class: \"top-2\" },\n { side: \"left\", align: \"center\", class: \"top-1/2 -translate-y-1/2\" },\n { side: \"left\", align: \"end\", class: \"bottom-2\" },\n { side: \"right\", align: \"start\", class: \"top-2\" },\n { side: \"right\", align: \"center\", class: \"top-1/2 -translate-y-1/2\" },\n { side: \"right\", align: \"end\", class: \"bottom-2\" },\n ],\n defaultVariants: {\n side: \"top\",\n align: \"center\",\n },\n});\n\nconst contentVariants = cva([\n \"z-50 duration-150 ease outline-hidden\",\n \"relative w-fit max-w-xs rounded-md bg-foreground px-3 py-1.5 text-xs text-background shadow-md\",\n \"data-[open]:animate-in data-[closed]:animate-out\",\n \"data-[closed]:fade-out-0 data-[open]:fade-in-0\",\n \"data-[closed]:zoom-out-95 data-[open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n \"data-[instant]:transition-none! data-[instant]:animate-none! data-instant:data-closed:animate-none! data-instant:data-closed:fade-out-0!\",\n \"origin-(--transform-origin) [--tw-animation-fill-mode:both]\",\n]);\n---\n\n
\n
\n \n \n \n
\n
\n \n\n", + "content": "---\nimport { cn } from \"@/lib/utils\";\nimport type { HTMLAttributes } from \"astro/types\";\nimport { cva } from \"class-variance-authority\";\n\ntype Props = {\n class?: string;\n sideOffset?: number;\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n align?: \"start\" | \"center\" | \"end\";\n alignOffset?: number;\n} & HTMLAttributes<\"div\">;\n\nconst {\n class: className = \"\",\n sideOffset,\n side = \"top\",\n align = \"center\",\n alignOffset,\n ...rest\n} = Astro.props as Props;\n\nconst indicatorVariants = cva(\"pointer-events-none absolute border-4\", {\n variants: {\n side: {\n top: \"border-foreground border-b-0 border-r-transparent border-l-transparent top-full\",\n bottom:\n \"border-foreground border-t-0 border-r-transparent border-l-transparent bottom-full\",\n left: \"border-foreground border-r-0 border-t-transparent border-b-transparent left-full\",\n right:\n \"border-foreground border-l-0 border-t-transparent border-b-transparent right-full\",\n },\n align: {\n start: \"\",\n center: \"\",\n end: \"\",\n },\n },\n compoundVariants: [\n { side: \"top\", align: \"start\", class: \"left-2\" },\n { side: \"top\", align: \"center\", class: \"left-1/2 -translate-x-1/2\" },\n { side: \"top\", align: \"end\", class: \"right-2\" },\n { side: \"bottom\", align: \"start\", class: \"left-2\" },\n { side: \"bottom\", align: \"center\", class: \"left-1/2 -translate-x-1/2\" },\n { side: \"bottom\", align: \"end\", class: \"right-2\" },\n { side: \"left\", align: \"start\", class: \"top-2\" },\n { side: \"left\", align: \"center\", class: \"top-1/2 -translate-y-1/2\" },\n { side: \"left\", align: \"end\", class: \"bottom-2\" },\n { side: \"right\", align: \"start\", class: \"top-2\" },\n { side: \"right\", align: \"center\", class: \"top-1/2 -translate-y-1/2\" },\n { side: \"right\", align: \"end\", class: \"bottom-2\" },\n ],\n defaultVariants: {\n side: \"top\",\n align: \"center\",\n },\n});\n\nconst contentVariants = cva([\n \"z-50 outline-hidden\",\n \"relative w-fit max-w-xs rounded-md bg-foreground px-3 py-1.5 text-xs text-background shadow-md\",\n \"data-[open]:animate-in data-[closed]:animate-out\",\n \"data-[closed]:fade-out-0 data-[open]:fade-in-0\",\n \"data-[closed]:zoom-out-95 data-[open]:zoom-in-95\",\n \"data-instant:animate-none! data-instant:transition-none!\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n \"origin-(--transform-origin) [--tw-animation-fill-mode:both]\",\n]);\n---\n\n
\n
\n \n \n \n
\n
\n \n\n", "type": "registry:ui" }, { diff --git a/bun.lock b/bun.lock index c661bb4..5eae55b 100644 --- a/bun.lock +++ b/bun.lock @@ -58,6 +58,7 @@ "alpinejs": "^3.15.4", "astro": "^5.16.4", "astro-robots-txt": "^1.0.0", + "class-variance-authority": "^0.7.1", "culori": "^4.0.2", "expressive-code-collapsible": "^0.1.0", "nanoid": "^5.0.9", @@ -120,20 +121,20 @@ "name": "@bejamas/ui", "version": "0.1.0", "dependencies": { - "@data-slot/accordion": "^0.2.96", - "@data-slot/collapsible": "^0.2.96", - "@data-slot/combobox": "^0.2.96", - "@data-slot/dialog": "^0.2.96", - "@data-slot/dropdown-menu": "^0.2.96", - "@data-slot/hover-card": "^0.2.96", - "@data-slot/navigation-menu": "^0.2.96", - "@data-slot/popover": "^0.2.96", - "@data-slot/select": "^0.2.96", - "@data-slot/slider": "^0.2.96", - "@data-slot/tabs": "^0.2.96", - "@data-slot/toggle": "^0.2.96", - "@data-slot/toggle-group": "^0.2.96", - "@data-slot/tooltip": "^0.2.96", + "@data-slot/accordion": "^0.2.98", + "@data-slot/collapsible": "^0.2.98", + "@data-slot/combobox": "^0.2.98", + "@data-slot/dialog": "^0.2.98", + "@data-slot/dropdown-menu": "^0.2.98", + "@data-slot/hover-card": "^0.2.98", + "@data-slot/navigation-menu": "^0.2.98", + "@data-slot/popover": "^0.2.98", + "@data-slot/select": "^0.2.98", + "@data-slot/slider": "^0.2.98", + "@data-slot/tabs": "^0.2.98", + "@data-slot/toggle": "^0.2.98", + "@data-slot/toggle-group": "^0.2.98", + "@data-slot/tooltip": "^0.2.98", "@lucide/astro": "^0.540.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1",