fulldev-ui 0.25.0 → 0.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/liquid/README.md +1 -1
- package/liquid/assets/ui-licenses.json +1 -1
- package/liquid/assets/ui-manifest.json +1 -1
- package/package.json +4 -2
- package/public/r/liquid/components.json +1 -1
- package/public/r/liquid/init.json +1 -1
- package/public/r/styles/base-luma/button-examples.json +2 -2
- package/public/r/styles/base-luma/collapsible-examples.json +1 -1
- package/public/r/styles/base-luma/combobox-examples.json +1 -1
- package/public/r/styles/base-luma/combobox.json +1 -1
- package/public/r/styles/base-luma/input-group-examples.json +2 -2
- package/public/r/styles/base-luma/item-examples.json +1 -1
- package/public/r/styles/base-luma/select.json +1 -1
- package/public/r/styles/base-luma/tabs.json +1 -1
- package/public/r/styles/base-luma/tooltip-examples.json +1 -1
- package/public/r/styles/base-lyra/button-examples.json +2 -2
- package/public/r/styles/base-lyra/collapsible-examples.json +1 -1
- package/public/r/styles/base-lyra/combobox-examples.json +1 -1
- package/public/r/styles/base-lyra/combobox.json +1 -1
- package/public/r/styles/base-lyra/input-group-examples.json +2 -2
- package/public/r/styles/base-lyra/item-examples.json +1 -1
- package/public/r/styles/base-lyra/select.json +1 -1
- package/public/r/styles/base-lyra/tabs.json +1 -1
- package/public/r/styles/base-lyra/tooltip-examples.json +1 -1
- package/public/r/styles/base-maia/button-examples.json +2 -2
- package/public/r/styles/base-maia/collapsible-examples.json +1 -1
- package/public/r/styles/base-maia/combobox-examples.json +1 -1
- package/public/r/styles/base-maia/combobox.json +1 -1
- package/public/r/styles/base-maia/input-group-examples.json +2 -2
- package/public/r/styles/base-maia/item-examples.json +1 -1
- package/public/r/styles/base-maia/select.json +1 -1
- package/public/r/styles/base-maia/tabs.json +1 -1
- package/public/r/styles/base-maia/tooltip-examples.json +1 -1
- package/public/r/styles/base-mira/button-examples.json +2 -2
- package/public/r/styles/base-mira/collapsible-examples.json +1 -1
- package/public/r/styles/base-mira/combobox-examples.json +1 -1
- package/public/r/styles/base-mira/combobox.json +1 -1
- package/public/r/styles/base-mira/input-group-examples.json +2 -2
- package/public/r/styles/base-mira/item-examples.json +1 -1
- package/public/r/styles/base-mira/select.json +1 -1
- package/public/r/styles/base-mira/tabs.json +1 -1
- package/public/r/styles/base-mira/tooltip-examples.json +1 -1
- package/public/r/styles/base-nova/button-examples.json +2 -2
- package/public/r/styles/base-nova/collapsible-examples.json +1 -1
- package/public/r/styles/base-nova/combobox-examples.json +1 -1
- package/public/r/styles/base-nova/combobox.json +1 -1
- package/public/r/styles/base-nova/input-group-examples.json +2 -2
- package/public/r/styles/base-nova/item-examples.json +1 -1
- package/public/r/styles/base-nova/select.json +1 -1
- package/public/r/styles/base-nova/tabs.json +1 -1
- package/public/r/styles/base-nova/tooltip-examples.json +1 -1
- package/public/r/styles/base-rhea/button-examples.json +2 -2
- package/public/r/styles/base-rhea/collapsible-examples.json +1 -1
- package/public/r/styles/base-rhea/combobox-examples.json +1 -1
- package/public/r/styles/base-rhea/combobox.json +1 -1
- package/public/r/styles/base-rhea/input-group-examples.json +2 -2
- package/public/r/styles/base-rhea/item-examples.json +1 -1
- package/public/r/styles/base-rhea/select.json +1 -1
- package/public/r/styles/base-rhea/tabs.json +1 -1
- package/public/r/styles/base-rhea/tooltip-examples.json +1 -1
- package/public/r/styles/base-sera/button-examples.json +2 -2
- package/public/r/styles/base-sera/collapsible-examples.json +1 -1
- package/public/r/styles/base-sera/combobox-examples.json +1 -1
- package/public/r/styles/base-sera/combobox.json +1 -1
- package/public/r/styles/base-sera/input-group-examples.json +2 -2
- package/public/r/styles/base-sera/item-examples.json +1 -1
- package/public/r/styles/base-sera/select.json +1 -1
- package/public/r/styles/base-sera/tabs.json +1 -1
- package/public/r/styles/base-sera/tooltip-examples.json +1 -1
- package/public/r/styles/base-vega/button-examples.json +2 -2
- package/public/r/styles/base-vega/collapsible-examples.json +1 -1
- package/public/r/styles/base-vega/combobox-examples.json +1 -1
- package/public/r/styles/base-vega/combobox.json +1 -1
- package/public/r/styles/base-vega/input-group-examples.json +2 -2
- package/public/r/styles/base-vega/item-examples.json +1 -1
- package/public/r/styles/base-vega/select.json +1 -1
- package/public/r/styles/base-vega/tabs.json +1 -1
- package/public/r/styles/base-vega/tooltip-examples.json +1 -1
- package/liquid/vendor.json +0 -180
- package/public/r/accordion-examples.json +0 -49
- package/public/r/accordion.json +0 -42
- package/public/r/alert-dialog-examples.json +0 -51
- package/public/r/alert-dialog.json +0 -84
- package/public/r/alert-examples.json +0 -47
- package/public/r/alert.json +0 -38
- package/public/r/article-1.json +0 -22
- package/public/r/article-2.json +0 -22
- package/public/r/articles-1.json +0 -22
- package/public/r/articles-2.json +0 -23
- package/public/r/articles-3.json +0 -22
- package/public/r/articles-4.json +0 -22
- package/public/r/aspect-ratio-examples.json +0 -33
- package/public/r/aspect-ratio.json +0 -23
- package/public/r/attachment-examples.json +0 -48
- package/public/r/attachment.json +0 -66
- package/public/r/avatar-examples.json +0 -68
- package/public/r/avatar.json +0 -48
- package/public/r/badge-examples.json +0 -52
- package/public/r/badge.json +0 -28
- package/public/r/banner-1.json +0 -24
- package/public/r/banner-2.json +0 -22
- package/public/r/banner.json +0 -31
- package/public/r/base.json +0 -143
- package/public/r/blocks-1.json +0 -27
- package/public/r/blocks.json +0 -92
- package/public/r/breadcrumb-examples.json +0 -53
- package/public/r/breadcrumb.json +0 -56
- package/public/r/button-examples.json +0 -87
- package/public/r/button-group-examples.json +0 -75
- package/public/r/button-group.json +0 -41
- package/public/r/button.json +0 -28
- package/public/r/card-examples.json +0 -51
- package/public/r/card.json +0 -53
- package/public/r/carousel-examples.json +0 -49
- package/public/r/carousel.json +0 -50
- package/public/r/checkbox-examples.json +0 -56
- package/public/r/checkbox.json +0 -23
- package/public/r/code-block-examples.json +0 -33
- package/public/r/code-block.json +0 -65
- package/public/r/collapsible-examples.json +0 -51
- package/public/r/collapsible.json +0 -36
- package/public/r/combobox-examples.json +0 -69
- package/public/r/combobox.json +0 -81
- package/public/r/command-examples.json +0 -47
- package/public/r/command.json +0 -71
- package/public/r/components.json +0 -74
- package/public/r/contact-1.json +0 -23
- package/public/r/contact-2.json +0 -23
- package/public/r/contact-3.json +0 -29
- package/public/r/content-1.json +0 -31
- package/public/r/content-2.json +0 -31
- package/public/r/content-3.json +0 -28
- package/public/r/content-4.json +0 -31
- package/public/r/cta-1.json +0 -24
- package/public/r/cta-2.json +0 -30
- package/public/r/cta-3.json +0 -24
- package/public/r/cta-4.json +0 -30
- package/public/r/cta-5.json +0 -31
- package/public/r/cta-6.json +0 -30
- package/public/r/cta-7.json +0 -23
- package/public/r/cta-8.json +0 -22
- package/public/r/dialog-examples.json +0 -47
- package/public/r/dialog.json +0 -75
- package/public/r/doc-1.json +0 -30
- package/public/r/drawer-examples.json +0 -54
- package/public/r/drawer.json +0 -109
- package/public/r/dropdown-menu-examples.json +0 -63
- package/public/r/dropdown-menu.json +0 -77
- package/public/r/empty-examples.json +0 -55
- package/public/r/empty.json +0 -48
- package/public/r/faqs-1.json +0 -23
- package/public/r/faqs-2.json +0 -23
- package/public/r/faqs-3.json +0 -23
- package/public/r/faqs-4.json +0 -22
- package/public/r/features-1.json +0 -26
- package/public/r/features-2.json +0 -22
- package/public/r/features-3.json +0 -21
- package/public/r/features-4.json +0 -26
- package/public/r/features-5.json +0 -22
- package/public/r/features-6.json +0 -23
- package/public/r/field-examples.json +0 -86
- package/public/r/field.json +0 -72
- package/public/r/footer-1.json +0 -24
- package/public/r/footer-2.json +0 -24
- package/public/r/footer-3.json +0 -24
- package/public/r/form.json +0 -23
- package/public/r/header-1.json +0 -29
- package/public/r/header-2.json +0 -29
- package/public/r/header-3.json +0 -30
- package/public/r/header-4.json +0 -29
- package/public/r/header-5.json +0 -30
- package/public/r/header.json +0 -40
- package/public/r/hero-1.json +0 -23
- package/public/r/hero-10.json +0 -24
- package/public/r/hero-11.json +0 -24
- package/public/r/hero-12.json +0 -22
- package/public/r/hero-13.json +0 -22
- package/public/r/hero-2.json +0 -24
- package/public/r/hero-3.json +0 -22
- package/public/r/hero-4.json +0 -25
- package/public/r/hero-5.json +0 -27
- package/public/r/hero-6.json +0 -27
- package/public/r/hero-7.json +0 -27
- package/public/r/hero-8.json +0 -22
- package/public/r/hero-9.json +0 -27
- package/public/r/hover-card-examples.json +0 -29
- package/public/r/hover-card.json +0 -37
- package/public/r/icon.json +0 -27
- package/public/r/init.json +0 -44
- package/public/r/input-examples.json +0 -97
- package/public/r/input-group-examples.json +0 -91
- package/public/r/input-group.json +0 -53
- package/public/r/input.json +0 -23
- package/public/r/item-examples.json +0 -74
- package/public/r/item.json +0 -71
- package/public/r/kbd-examples.json +0 -50
- package/public/r/kbd.json +0 -28
- package/public/r/label-examples.json +0 -24
- package/public/r/label.json +0 -23
- package/public/r/layout.json +0 -41
- package/public/r/links-2.json +0 -24
- package/public/r/logo.json +0 -33
- package/public/r/logos-1.json +0 -22
- package/public/r/logos-2.json +0 -23
- package/public/r/logos-3.json +0 -22
- package/public/r/marquee.json +0 -46
- package/public/r/native-select-examples.json +0 -38
- package/public/r/native-select.json +0 -36
- package/public/r/navigation-menu-examples.json +0 -26
- package/public/r/navigation-menu.json +0 -67
- package/public/r/pagination-examples.json +0 -35
- package/public/r/pagination.json +0 -59
- package/public/r/popover-examples.json +0 -42
- package/public/r/popover.json +0 -51
- package/public/r/price.json +0 -38
- package/public/r/pricing-1.json +0 -29
- package/public/r/pricing-2.json +0 -28
- package/public/r/pricing-3.json +0 -29
- package/public/r/product-1.json +0 -24
- package/public/r/products-1.json +0 -24
- package/public/r/products-2.json +0 -24
- package/public/r/products-3.json +0 -24
- package/public/r/products-4.json +0 -24
- package/public/r/products-5.json +0 -25
- package/public/r/progress-examples.json +0 -33
- package/public/r/progress.json +0 -23
- package/public/r/radio-group-examples.json +0 -50
- package/public/r/radio-group.json +0 -31
- package/public/r/rating.json +0 -26
- package/public/r/registry.json +0 -6959
- package/public/r/resizable-examples.json +0 -33
- package/public/r/resizable.json +0 -36
- package/public/r/reviews-1.json +0 -27
- package/public/r/reviews-2.json +0 -27
- package/public/r/reviews-3.json +0 -27
- package/public/r/reviews-4.json +0 -25
- package/public/r/reviews-5.json +0 -27
- package/public/r/section.json +0 -38
- package/public/r/select-examples.json +0 -53
- package/public/r/select.json +0 -62
- package/public/r/separator-examples.json +0 -38
- package/public/r/separator.json +0 -23
- package/public/r/services-1.json +0 -32
- package/public/r/services-2.json +0 -29
- package/public/r/services-3.json +0 -29
- package/public/r/services-4.json +0 -31
- package/public/r/services-5.json +0 -26
- package/public/r/services-6.json +0 -32
- package/public/r/services-7.json +0 -32
- package/public/r/sheet-examples.json +0 -37
- package/public/r/sheet.json +0 -66
- package/public/r/sidebar-1.json +0 -35
- package/public/r/sidebar-examples.json +0 -24
- package/public/r/sidebar.json +0 -146
- package/public/r/skeleton-examples.json +0 -49
- package/public/r/skeleton.json +0 -23
- package/public/r/slider-examples.json +0 -44
- package/public/r/slider.json +0 -26
- package/public/r/spinner-examples.json +0 -61
- package/public/r/spinner.json +0 -26
- package/public/r/switch-examples.json +0 -50
- package/public/r/switch.json +0 -26
- package/public/r/table-examples.json +0 -38
- package/public/r/table.json +0 -58
- package/public/r/tabs-examples.json +0 -47
- package/public/r/tabs.json +0 -46
- package/public/r/textarea-examples.json +0 -45
- package/public/r/textarea.json +0 -23
- package/public/r/theme-toggle.json +0 -34
- package/public/r/toast-examples.json +0 -29
- package/public/r/toast.json +0 -80
- package/public/r/toc.json +0 -43
- package/public/r/toggle-examples.json +0 -46
- package/public/r/toggle-group-examples.json +0 -57
- package/public/r/toggle-group.json +0 -34
- package/public/r/toggle.json +0 -31
- package/public/r/tooltip-examples.json +0 -43
- package/public/r/tooltip.json +0 -36
- package/public/r/typography.json +0 -103
- package/public/r/video.json +0 -23
package/public/r/code-block.json
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "code-block",
|
|
4
|
-
"title": "Code Block",
|
|
5
|
-
"description": "Code and plain-text snippets with copy actions, line numbers and highlighted lines.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@lucide/astro",
|
|
8
|
-
"class-variance-authority"
|
|
9
|
-
],
|
|
10
|
-
"registryDependencies": [
|
|
11
|
-
"@fulldev/button"
|
|
12
|
-
],
|
|
13
|
-
"files": [
|
|
14
|
-
{
|
|
15
|
-
"path": "src/components/ui/code-block/code-block-actions.astro",
|
|
16
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"code-block-actions\"\n class={cn(\n \"-my-1 -me-1.5 gap-1 [[data-slot=code-block]>&]:m-0 [[data-slot=code-block]>&]:top-3 [[data-slot=code-block]>&]:end-3 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:top-2 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:end-2 [[data-slot=code-block]>&]:*:[button]:bg-background [[data-slot=code-block]>&]:*:[button]:ring-1 [[data-slot=code-block]>&]:*:[button]:ring-foreground/10 ms-auto flex shrink-0 items-center [[data-slot=code-block]>&]:absolute [[data-slot=code-block]>&]:z-10 [[data-slot=code-block]>&]:opacity-0 [[data-slot=code-block]>&]:transition-opacity [[data-slot=code-block]>&]:group-focus-within/code-block:opacity-100 [[data-slot=code-block]>&]:group-hover/code-block:opacity-100 [[data-slot=code-block]>&]:pointer-coarse:opacity-100\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
17
|
-
"type": "registry:ui"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"path": "src/components/ui/code-block/code-block-content.astro",
|
|
21
|
-
"content": "---\n/* eslint-disable astro/jsx-a11y/no-noninteractive-tabindex -- Focusable code supports keyboard scrolling, as in shadcn/ui. */\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport CodeBlockLine from \"./code-block-line.astro\"\n\ntype Props = HTMLAttributes<\"pre\"> & {\n code?: string\n wrap?: boolean\n lineNumbers?: boolean\n startLine?: number\n}\n\nconst {\n class: className,\n code,\n wrap = false,\n lineNumbers = false,\n startLine = 1,\n style,\n ...props\n} = Astro.props\n\nconst contentStyle =\n typeof style === \"string\"\n ? `counter-reset: line ${startLine - 1}; ${style}`\n : { counterReset: `line ${startLine - 1}`, ...style }\n---\n\n<pre\n data-slot=\"code-block-content\"\n data-wrap={wrap || undefined}\n data-numbered={lineNumbers || undefined}\n dir=\"ltr\"\n tabindex=\"0\"\n style={contentStyle}\n class={cn(\n \"px-4 py-4 leading-relaxed group-has-data-[slot=code-block-header]/code-block:pt-2 group-has-data-[slot=code-block-footer]/code-block:pb-2 group-data-[size=sm]/code-block:px-3 group-data-[size=sm]/code-block:py-3 group-data-[size=sm]/code-block:group-has-data-[slot=code-block-header]/code-block:pt-1.5 min-h-0 min-w-0 overflow-auto text-start font-mono outline-none data-wrap:wrap-break-word data-wrap:whitespace-pre-wrap\",\n className\n )}\n {...props}\n><code data-slot=\"code-block-code\" class=\"grid min-h-lh min-w-max content-start in-data-numbered:grid-cols-[auto_1fr] in-data-wrap:min-w-0\">{code !== undefined ? lineNumbers ? code.replace(/\\n$/, \"\").split(\"\\n\").map((line) => <CodeBlockLine>{line}</CodeBlockLine>) : code : <slot />}</code></pre>\n",
|
|
22
|
-
"type": "registry:ui"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"path": "src/components/ui/code-block/code-block-copy-button.astro",
|
|
26
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\nimport CopyIcon from \"@lucide/astro/icons/copy\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"value\" | \"type\"> &\n ButtonVariantProps & {\n value: string\n copyLabel?: string\n copiedLabel?: string\n errorLabel?: string\n }\n\nconst {\n class: className,\n value,\n variant = \"ghost\",\n size = \"icon-xs\",\n copyLabel = \"Copy\",\n copiedLabel = \"Copied\",\n errorLabel = \"Could not copy\",\n ...props\n} = Astro.props\n---\n\n<Button\n data-slot=\"code-block-copy-button\"\n data-copy-value={value}\n data-copy-label={copyLabel}\n data-copied-label={copiedLabel}\n data-error-label={errorLabel}\n aria-label={copyLabel}\n variant={variant}\n size={size}\n class={cn(\"group/code-copy\", className)}\n {...props}\n>\n <CopyIcon aria-hidden=\"true\" class=\"group-data-copied/code-copy:hidden\" />\n <CheckIcon\n aria-hidden=\"true\"\n class=\"hidden group-data-copied/code-copy:block\"\n />\n</Button>\n<span data-copy-status aria-live=\"polite\" class=\"sr-only\"></span>\n\n<script>\n const timers = new Map<HTMLButtonElement, ReturnType<typeof setTimeout>>()\n document.addEventListener(\"click\", async (event) => {\n if (!(event.target instanceof Element)) return\n const button = event.target.closest<HTMLButtonElement>(\n \"[data-slot=code-block-copy-button]\"\n )\n if (!button || button.disabled || event.defaultPrevented) return\n const status = button.nextElementSibling\n try {\n await navigator.clipboard.writeText(button.dataset.copyValue ?? \"\")\n if (!button.isConnected) return\n clearTimeout(timers.get(button))\n button.dataset.copied = \"\"\n button.setAttribute(\"aria-label\", button.dataset.copiedLabel ?? \"Copied\")\n if (status) status.textContent = button.dataset.copiedLabel ?? \"Copied\"\n timers.set(\n button,\n setTimeout(() => {\n delete button.dataset.copied\n button.setAttribute(\"aria-label\", button.dataset.copyLabel ?? \"Copy\")\n if (status) status.textContent = \"\"\n timers.delete(button)\n }, 2000)\n )\n } catch {\n if (!button.isConnected) return\n clearTimeout(timers.get(button))\n timers.delete(button)\n delete button.dataset.copied\n button.setAttribute(\"aria-label\", button.dataset.copyLabel ?? \"Copy\")\n if (status)\n status.textContent = button.dataset.errorLabel ?? \"Could not copy\"\n }\n })\n document.addEventListener(\"astro:before-swap\", () => {\n for (const timer of timers.values()) clearTimeout(timer)\n timers.clear()\n })\n</script>\n",
|
|
27
|
-
"type": "registry:ui"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"path": "src/components/ui/code-block/code-block-footer.astro",
|
|
31
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"code-block-footer\"\n class={cn(\n \"gap-2 px-4 pb-4 text-muted-foreground group-data-[size=sm]/code-block:px-3 group-data-[size=sm]/code-block:pb-3 flex min-w-0 shrink-0 items-center\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
32
|
-
"type": "registry:ui"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"path": "src/components/ui/code-block/code-block-header.astro",
|
|
36
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"code-block-header\"\n class={cn(\n \"gap-2 px-4 pt-4 text-muted-foreground group-data-[variant=destructive]/code-block:text-destructive group-data-[size=sm]/code-block:px-3 group-data-[size=sm]/code-block:pt-3 flex min-w-0 shrink-0 items-center *:has-[>[data-slot=code-block-title]]:min-w-0\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
37
|
-
"type": "registry:ui"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"path": "src/components/ui/code-block/code-block-line.astro",
|
|
41
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst variants = cva(\n \"-mx-4 px-4 in-data-numbered:gap-x-3 before:min-w-6 before:text-end before:text-muted-foreground after:start-1 after:text-muted-foreground group-data-[size=sm]/code-block:-mx-3 group-data-[size=sm]/code-block:px-3 relative block min-h-lh before:select-none after:absolute after:top-0 after:select-none in-data-numbered:col-span-2 in-data-numbered:grid in-data-numbered:grid-cols-subgrid in-data-numbered:[counter-increment:line] in-data-numbered:before:content-[counter(line)] in-data-numbered:supports-[content:counter(line)_/_'']:before:content-[counter(line)_/_'']\",\n {\n variants: {\n variant: {\n default: \"\",\n added: \"bg-muted after:content-['+']\",\n removed: \"bg-destructive/10 after:text-destructive after:content-['−']\",\n highlighted: \"bg-muted\",\n },\n },\n defaultVariants: { variant: \"default\" },\n }\n)\n\ntype Props = HTMLAttributes<\"span\"> & VariantProps<typeof variants>\nconst { class: className, variant = \"default\", ...props } = Astro.props\n---\n\n<span\n data-slot=\"code-block-line\"\n data-variant={variant}\n class={cn(variants({ variant }), className)}\n {...props}\n>\n <span data-slot=\"code-block-line-content\" class=\"min-w-0\">\n <slot />\n {\"\\n\"}\n </span>\n</span>\n",
|
|
42
|
-
"type": "registry:ui"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"path": "src/components/ui/code-block/code-block-title.astro",
|
|
46
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"code-block-title\"\n class={cn(\n \"font-sans text-sm font-medium text-foreground group-data-[variant=destructive]/code-block:text-destructive *:[svg]:me-1.5 [&_svg:not([class*='size-'])]:size-4 group-data-[size=sm]/code-block:text-xs group-data-[size=sm]/code-block:[&_svg:not([class*='size-'])]:size-3.5 min-w-0 truncate [&_svg]:pointer-events-none [&_svg]:inline-block [&_svg]:align-middle\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
47
|
-
"type": "registry:ui"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"path": "src/components/ui/code-block/code-block.astro",
|
|
51
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst variants = cva(\n \"rounded-lg text-sm data-[size=sm]:text-xs has-[>[data-slot=code-block-content]:focus-visible]:ring-3 has-[>[data-slot=code-block-content]:focus-visible]:ring-ring/50 group/code-block relative flex w-full min-w-0 flex-col overflow-hidden\",\n {\n variants: {\n variant: {\n default: \"border border-input text-foreground dark:bg-input/30 has-[>[data-slot=code-block-content]:focus-visible]:border-ring\",\n destructive: \"border border-destructive/30 text-destructive dark:border-destructive/40\",\n },\n },\n defaultVariants: { variant: \"default\" },\n }\n)\n\ntype Props = HTMLAttributes<\"div\"> &\n VariantProps<typeof variants> & {\n size?: \"default\" | \"sm\"\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"code-block\"\n data-variant={variant}\n data-size={size}\n class={cn(variants({ variant }), className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
52
|
-
"type": "registry:ui"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"path": "src/components/ui/code-block/index.ts",
|
|
56
|
-
"content": "export { default as CodeBlock } from \"./code-block.astro\"\nexport { default as CodeBlockHeader } from \"./code-block-header.astro\"\nexport { default as CodeBlockTitle } from \"./code-block-title.astro\"\nexport { default as CodeBlockActions } from \"./code-block-actions.astro\"\nexport { default as CodeBlockCopyButton } from \"./code-block-copy-button.astro\"\nexport { default as CodeBlockContent } from \"./code-block-content.astro\"\nexport { default as CodeBlockLine } from \"./code-block-line.astro\"\nexport { default as CodeBlockFooter } from \"./code-block-footer.astro\"\n",
|
|
57
|
-
"type": "registry:ui"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"docs": "https://ui.full.dev/components/code-block/",
|
|
61
|
-
"categories": [
|
|
62
|
-
"ui"
|
|
63
|
-
],
|
|
64
|
-
"type": "registry:ui"
|
|
65
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "collapsible-examples",
|
|
4
|
-
"title": "Collapsible examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Collapsible docs.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@lucide/astro"
|
|
8
|
-
],
|
|
9
|
-
"registryDependencies": [
|
|
10
|
-
"@fulldev/button",
|
|
11
|
-
"@fulldev/card",
|
|
12
|
-
"@fulldev/collapsible",
|
|
13
|
-
"@fulldev/field",
|
|
14
|
-
"@fulldev/input",
|
|
15
|
-
"@fulldev/tabs"
|
|
16
|
-
],
|
|
17
|
-
"files": [
|
|
18
|
-
{
|
|
19
|
-
"path": "src/components/examples/collapsible/collapsible-basic.astro",
|
|
20
|
-
"content": "---\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { Button, buttonVariants } from \"@/components/ui/button\"\nimport { Card, CardContent } from \"@/components/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\n---\n\n<Card class=\"mx-auto w-full max-w-sm\">\n <CardContent>\n <Collapsible class=\"data-[state=open]:bg-muted rounded-md\">\n <CollapsibleTrigger\n class={buttonVariants({ variant: \"ghost\", class: \"w-full\" })}\n >\n Product details\n <ChevronDownIcon class=\"ml-auto group-aria-expanded/button:rotate-180\" />\n </CollapsibleTrigger>\n <CollapsibleContent class=\"flex flex-col items-start gap-2 p-2.5 pt-0 text-sm\">\n <div>\n This panel can be expanded or collapsed to reveal additional content.\n </div>\n <Button size=\"xs\">Learn More</Button>\n </CollapsibleContent>\n </Collapsible>\n </CardContent>\n</Card>\n",
|
|
21
|
-
"type": "registry:component"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"path": "src/components/examples/collapsible/collapsible-demo.astro",
|
|
25
|
-
"content": "---\nimport ChevronsUpDown from \"@lucide/astro/icons/chevrons-up-down\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\n---\n\n<Collapsible class=\"flex w-[350px] flex-col gap-2\">\n <div class=\"flex items-center justify-between gap-4 px-4\">\n <p class=\"text-sm font-semibold\">Order #4189</p>\n <CollapsibleTrigger\n class={buttonVariants({\n variant: \"ghost\",\n size: \"icon\",\n class: \"size-8\",\n })}\n >\n <ChevronsUpDown />\n <span class=\"sr-only\">Toggle details</span>\n </CollapsibleTrigger>\n </div>\n <div class=\"flex items-center justify-between rounded-md border px-4 py-2 text-sm\">\n <span class=\"text-muted-foreground\">Status</span>\n <span class=\"font-medium\">Shipped</span>\n </div>\n <CollapsibleContent class=\"flex flex-col gap-2\">\n <div class=\"rounded-md border px-4 py-2 text-sm\">\n <p class=\"font-medium\">Shipping address</p>\n <p class=\"text-muted-foreground\">100 Market St, San Francisco</p>\n </div>\n <div class=\"rounded-md border px-4 py-2 text-sm\">\n <p class=\"font-medium\">Items</p>\n <p class=\"text-muted-foreground\">2x Studio Headphones</p>\n </div>\n </CollapsibleContent>\n</Collapsible>\n",
|
|
26
|
-
"type": "registry:component"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"path": "src/components/examples/collapsible/collapsible-dismissal.astro",
|
|
30
|
-
"content": "---\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\n---\n\n<div class=\"mx-auto flex w-full max-w-xs flex-col gap-4\">\n <Collapsible closeOnEscape closeOnClickOutside class=\"flex flex-col gap-2\">\n <CollapsibleTrigger\n class={buttonVariants({ variant: \"outline\", class: \"w-full\" })}\n >\n Browse documentation\n <ChevronDownIcon class=\"ml-auto group-aria-expanded/button:rotate-180\" />\n </CollapsibleTrigger>\n <CollapsibleContent>\n <nav aria-label=\"Documentation example\" class=\"flex flex-col gap-1\">\n <a\n href=\"/docs/installation/\"\n class={buttonVariants({ variant: \"ghost\", class: \"justify-start\" })}\n >\n Installation\n </a>\n <a\n href=\"/components/accordion/\"\n class={buttonVariants({ variant: \"ghost\", class: \"justify-start\" })}\n >\n Accordion\n </a>\n <a\n href=\"/components/collapsible/\"\n class={buttonVariants({ variant: \"ghost\", class: \"justify-start\" })}\n >\n Collapsible\n </a>\n </nav>\n </CollapsibleContent>\n </Collapsible>\n <p class=\"text-muted-foreground text-sm\">\n Open the panel, then press Escape or click outside it to close.\n </p>\n</div>\n",
|
|
31
|
-
"type": "registry:component"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"path": "src/components/examples/collapsible/collapsible-file-tree.astro",
|
|
35
|
-
"content": "---\nimport ChevronRightIcon from \"@lucide/astro/icons/chevron-right\"\nimport FileIcon from \"@lucide/astro/icons/file\"\nimport FolderIcon from \"@lucide/astro/icons/folder\"\n\nimport { Button, buttonVariants } from \"@/components/ui/button\"\nimport { Card, CardContent, CardHeader } from \"@/components/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Tabs, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\n\ntype FileTreeItem = { name: string } | { name: string; items: FileTreeItem[] }\n\nconst fileTree: FileTreeItem[] = [\n {\n name: \"components\",\n items: [\n {\n name: \"ui\",\n items: [\n { name: \"button.tsx\" },\n { name: \"card.tsx\" },\n { name: \"dialog.tsx\" },\n { name: \"input.tsx\" },\n { name: \"select.tsx\" },\n { name: \"table.tsx\" },\n ],\n },\n { name: \"login-form.tsx\" },\n { name: \"register-form.tsx\" },\n ],\n },\n {\n name: \"lib\",\n items: [{ name: \"utils.ts\" }, { name: \"cn.ts\" }, { name: \"api.ts\" }],\n },\n {\n name: \"hooks\",\n items: [\n { name: \"use-media-query.ts\" },\n { name: \"use-debounce.ts\" },\n { name: \"use-local-storage.ts\" },\n ],\n },\n {\n name: \"types\",\n items: [{ name: \"index.d.ts\" }, { name: \"api.d.ts\" }],\n },\n {\n name: \"public\",\n items: [{ name: \"favicon.ico\" }, { name: \"logo.svg\" }, { name: \"images\" }],\n },\n { name: \"app.tsx\" },\n { name: \"layout.tsx\" },\n { name: \"globals.css\" },\n { name: \"package.json\" },\n { name: \"tsconfig.json\" },\n { name: \"README.md\" },\n { name: \".gitignore\" },\n]\n\n// Renders the card, or one tree level when Astro.self passes `items`.\nconst { items } = Astro.props as { items?: FileTreeItem[] }\n---\n\n{items ? (\n items.map((fileItem) =>\n \"items\" in fileItem ? (\n <Collapsible>\n <CollapsibleTrigger\n class={buttonVariants({\n variant: \"ghost\",\n size: \"sm\",\n class:\n \"group hover:bg-accent hover:text-accent-foreground w-full justify-start transition-none\",\n })}\n >\n <ChevronRightIcon class=\"transition-transform group-data-[state=open]:rotate-90\" />\n <FolderIcon />\n {fileItem.name}\n </CollapsibleTrigger>\n <CollapsibleContent class=\"mt-1 ml-5\">\n <div class=\"flex flex-col gap-1\">\n <Astro.self items={fileItem.items} />\n </div>\n </CollapsibleContent>\n </Collapsible>\n ) : (\n <Button\n variant=\"link\"\n size=\"sm\"\n class=\"text-foreground w-full justify-start gap-2\"\n >\n <FileIcon />\n <span>{fileItem.name}</span>\n </Button>\n )\n )\n) : (\n <Card class=\"mx-auto w-full max-w-[16rem] gap-2\" size=\"sm\">\n <CardHeader>\n <Tabs defaultValue=\"explorer\">\n <TabsList class=\"w-full\">\n <TabsTrigger value=\"explorer\">Explorer</TabsTrigger>\n <TabsTrigger value=\"settings\">Outline</TabsTrigger>\n </TabsList>\n </Tabs>\n </CardHeader>\n <CardContent>\n <div class=\"flex flex-col gap-1\">\n <Astro.self items={fileTree} />\n </div>\n </CardContent>\n </Card>\n)}\n",
|
|
36
|
-
"type": "registry:component"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"path": "src/components/examples/collapsible/collapsible-rtl.astro",
|
|
40
|
-
"content": "---\nimport ChevronsUpDown from \"@lucide/astro/icons/chevrons-up-down\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {\n orderNumber: \"Order #4189\",\n status: \"Status\",\n shipped: \"Shipped\",\n shippingAddress: \"Shipping address\",\n address: \"100 Market St, San Francisco\",\n items: \"Items\",\n itemsDescription: \"2x Studio Headphones\",\n },\n },\n ar: {\n dir: \"rtl\",\n values: {\n orderNumber: \"الطلب #4189\",\n status: \"الحالة\",\n shipped: \"تم الشحن\",\n shippingAddress: \"عنوان الشحن\",\n address: \"100 Market St, San Francisco\",\n items: \"العناصر\",\n itemsDescription: \"2x سماعات الاستوديو\",\n },\n },\n he: {\n dir: \"rtl\",\n values: {\n orderNumber: \"הזמנה #4189\",\n status: \"סטטוס\",\n shipped: \"נשלח\",\n shippingAddress: \"כתובת משלוח\",\n address: \"100 Market St, San Francisco\",\n items: \"פריטים\",\n itemsDescription: \"2x אוזניות סטודיו\",\n },\n },\n}\n\nconst { dir, values: t } = translations.ar\n---\n\n<Collapsible class=\"flex w-[350px] flex-col gap-2\" dir={dir}>\n <div class=\"flex items-center justify-between gap-4 px-4\">\n <p class=\"text-sm font-semibold\">{t.orderNumber}</p>\n <CollapsibleTrigger\n class={buttonVariants({\n variant: \"ghost\",\n size: \"icon\",\n class: \"size-8\",\n })}\n >\n <ChevronsUpDown />\n <span class=\"sr-only\">Toggle details</span>\n </CollapsibleTrigger>\n </div>\n <div class=\"flex items-center justify-between rounded-md border px-4 py-2 text-sm\">\n <span class=\"text-muted-foreground\">{t.status}</span>\n <span class=\"font-medium\">{t.shipped}</span>\n </div>\n <CollapsibleContent class=\"flex flex-col gap-2\">\n <div class=\"rounded-md border px-4 py-2 text-sm\">\n <p class=\"font-medium\">{t.shippingAddress}</p>\n <p class=\"text-muted-foreground\">{t.address}</p>\n </div>\n <div class=\"rounded-md border px-4 py-2 text-sm\">\n <p class=\"font-medium\">{t.items}</p>\n <p class=\"text-muted-foreground\">{t.itemsDescription}</p>\n </div>\n </CollapsibleContent>\n</Collapsible>\n",
|
|
41
|
-
"type": "registry:component"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"path": "src/components/examples/collapsible/collapsible-settings.astro",
|
|
45
|
-
"content": "---\nimport MaximizeIcon from \"@lucide/astro/icons/maximize\"\nimport MinimizeIcon from \"@lucide/astro/icons/minimize\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Field, FieldGroup, FieldLabel } from \"@/components/ui/field\"\nimport { Input } from \"@/components/ui/input\"\n---\n\n<Card class=\"mx-auto w-full max-w-xs\" size=\"sm\">\n <CardHeader>\n <CardTitle>Radius</CardTitle>\n <CardDescription>Set the corner radius of the element.</CardDescription>\n </CardHeader>\n <CardContent>\n <Collapsible class=\"flex items-start gap-2\">\n <FieldGroup class=\"grid w-full grid-cols-2 gap-2\">\n <Field>\n <FieldLabel for=\"radius-x\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y\" placeholder=\"0\" value=\"0\" />\n </Field>\n <CollapsibleContent class=\"col-span-full grid grid-cols-subgrid gap-2\">\n <Field>\n <FieldLabel for=\"radius-x-2\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y-2\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n </CollapsibleContent>\n </FieldGroup>\n <CollapsibleTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon\" })}\n >\n <MaximizeIcon class=\"group-aria-expanded/button:hidden\" />\n <MinimizeIcon class=\"hidden group-aria-expanded/button:block\" />\n </CollapsibleTrigger>\n </Collapsible>\n </CardContent>\n</Card>\n",
|
|
46
|
-
"type": "registry:component"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"docs": "https://ui.full.dev/components/collapsible/",
|
|
50
|
-
"type": "registry:example"
|
|
51
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "collapsible",
|
|
4
|
-
"title": "Collapsible",
|
|
5
|
-
"description": "An interactive component which expands/collapses a panel.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@data-slot/collapsible@^1.1.2"
|
|
8
|
-
],
|
|
9
|
-
"files": [
|
|
10
|
-
{
|
|
11
|
-
"path": "src/components/ui/collapsible/collapsible.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"collapsible\"\n data-default-open={defaultOpen}\n data-hidden-until-found={hiddenUntilFound}\n data-close-on-escape={closeOnEscape}\n data-close-on-click-outside={closeOnClickOutside}\n class={cn(className)}\n {...props}\n>\n <slot />\n</Tag>\n\n<script>\n import { create } from \"@data-slot/collapsible\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
13
|
-
"type": "registry:ui"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"path": "src/components/ui/collapsible/collapsible-content.astro",
|
|
17
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, hidden: _hidden, ...props } = Astro.props\n---\n\n<div data-slot=\"collapsible-content\" hidden class={cn(className)} {...props}>\n <slot />\n</div>\n",
|
|
18
|
-
"type": "registry:ui"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"path": "src/components/ui/collapsible/collapsible-trigger.astro",
|
|
22
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\">\n\nconst { class: className, type = \"button\", ...props } = Astro.props\n---\n\n<button\n data-slot=\"collapsible-trigger\"\n type={type}\n class={cn(className)}\n {...props}\n>\n <slot />\n</button>\n",
|
|
23
|
-
"type": "registry:ui"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"path": "src/components/ui/collapsible/index.ts",
|
|
27
|
-
"content": "export { default as Collapsible } from \"./collapsible.astro\"\nexport { default as CollapsibleContent } from \"./collapsible-content.astro\"\nexport { default as CollapsibleTrigger } from \"./collapsible-trigger.astro\"\n",
|
|
28
|
-
"type": "registry:ui"
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"docs": "https://ui.full.dev/components/collapsible/",
|
|
32
|
-
"categories": [
|
|
33
|
-
"ui"
|
|
34
|
-
],
|
|
35
|
-
"type": "registry:ui"
|
|
36
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "combobox-examples",
|
|
4
|
-
"title": "Combobox examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Combobox docs.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@lucide/astro"
|
|
8
|
-
],
|
|
9
|
-
"registryDependencies": [
|
|
10
|
-
"@fulldev/button",
|
|
11
|
-
"@fulldev/combobox",
|
|
12
|
-
"@fulldev/input-group",
|
|
13
|
-
"@fulldev/item"
|
|
14
|
-
],
|
|
15
|
-
"files": [
|
|
16
|
-
{
|
|
17
|
-
"path": "src/components/examples/combobox/combobox-auto-highlight.astro",
|
|
18
|
-
"content": "---\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from \"@/components/ui/combobox\"\n\nconst frameworks = [\"Next.js\", \"SvelteKit\", \"Nuxt.js\", \"Remix\", \"Astro\"]\n---\n\n<Combobox autoHighlight>\n <ComboboxInput placeholder=\"Select a framework\" />\n <ComboboxContent>\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {frameworks.map((item) => (\n <ComboboxItem value={item}>{item}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
19
|
-
"type": "registry:component"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"path": "src/components/examples/combobox/combobox-basic.astro",
|
|
23
|
-
"content": "---\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from \"@/components/ui/combobox\"\n\nconst frameworks = [\"Next.js\", \"SvelteKit\", \"Nuxt.js\", \"Remix\", \"Astro\"]\n---\n\n<Combobox>\n <ComboboxInput placeholder=\"Select a framework\" />\n <ComboboxContent>\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {frameworks.map((item) => (\n <ComboboxItem value={item}>{item}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
24
|
-
"type": "registry:component"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"path": "src/components/examples/combobox/combobox-clear.astro",
|
|
28
|
-
"content": "---\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from \"@/components/ui/combobox\"\n\nconst frameworks = [\"Next.js\", \"SvelteKit\", \"Nuxt.js\", \"Remix\", \"Astro\"]\n---\n\n<Combobox defaultValue={frameworks[0]}>\n <ComboboxInput placeholder=\"Select a framework\" showClear />\n <ComboboxContent>\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {frameworks.map((item) => (\n <ComboboxItem value={item}>{item}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
29
|
-
"type": "registry:component"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"path": "src/components/examples/combobox/combobox-custom.astro",
|
|
33
|
-
"content": "---\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from \"@/components/ui/combobox\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/components/ui/item\"\n\nconst countries = [\n { code: \"\", value: \"\", continent: \"\", label: \"Select country\" },\n {\n code: \"ar\",\n value: \"argentina\",\n label: \"Argentina\",\n continent: \"South America\",\n },\n { code: \"au\", value: \"australia\", label: \"Australia\", continent: \"Oceania\" },\n { code: \"br\", value: \"brazil\", label: \"Brazil\", continent: \"South America\" },\n { code: \"ca\", value: \"canada\", label: \"Canada\", continent: \"North America\" },\n { code: \"cn\", value: \"china\", label: \"China\", continent: \"Asia\" },\n {\n code: \"co\",\n value: \"colombia\",\n label: \"Colombia\",\n continent: \"South America\",\n },\n { code: \"eg\", value: \"egypt\", label: \"Egypt\", continent: \"Africa\" },\n { code: \"fr\", value: \"france\", label: \"France\", continent: \"Europe\" },\n { code: \"de\", value: \"germany\", label: \"Germany\", continent: \"Europe\" },\n { code: \"it\", value: \"italy\", label: \"Italy\", continent: \"Europe\" },\n { code: \"jp\", value: \"japan\", label: \"Japan\", continent: \"Asia\" },\n { code: \"ke\", value: \"kenya\", label: \"Kenya\", continent: \"Africa\" },\n { code: \"mx\", value: \"mexico\", label: \"Mexico\", continent: \"North America\" },\n {\n code: \"nz\",\n value: \"new-zealand\",\n label: \"New Zealand\",\n continent: \"Oceania\",\n },\n { code: \"ng\", value: \"nigeria\", label: \"Nigeria\", continent: \"Africa\" },\n {\n code: \"za\",\n value: \"south-africa\",\n label: \"South Africa\",\n continent: \"Africa\",\n },\n { code: \"kr\", value: \"south-korea\", label: \"South Korea\", continent: \"Asia\" },\n {\n code: \"gb\",\n value: \"united-kingdom\",\n label: \"United Kingdom\",\n continent: \"Europe\",\n },\n {\n code: \"us\",\n value: \"united-states\",\n label: \"United States\",\n continent: \"North America\",\n },\n]\n---\n\n<Combobox>\n <ComboboxInput placeholder=\"Search countries...\" />\n <ComboboxContent>\n <ComboboxList>\n <ComboboxEmpty>No countries found.</ComboboxEmpty>\n {countries\n .filter((country) => country.code !== \"\")\n .map((country) => (\n <ComboboxItem value={country.value} data-label={country.label}>\n <Item size=\"xs\" class=\"p-0\">\n <ItemContent>\n <ItemTitle class=\"whitespace-nowrap\">{country.label}</ItemTitle>\n <ItemDescription>\n {country.continent} ({country.code})\n </ItemDescription>\n </ItemContent>\n </Item>\n </ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
34
|
-
"type": "registry:component"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"path": "src/components/examples/combobox/combobox-demo.astro",
|
|
38
|
-
"content": "---\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from \"@/components/ui/combobox\"\n\nconst frameworks = [\"Next.js\", \"SvelteKit\", \"Nuxt.js\", \"Remix\", \"Astro\"]\n---\n\n<Combobox>\n <ComboboxInput placeholder=\"Select a framework\" />\n <ComboboxContent>\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {frameworks.map((item) => (\n <ComboboxItem value={item}>{item}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
39
|
-
"type": "registry:component"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"path": "src/components/examples/combobox/combobox-disabled.astro",
|
|
43
|
-
"content": "---\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from \"@/components/ui/combobox\"\n\nconst frameworks = [\"Next.js\", \"SvelteKit\", \"Nuxt.js\", \"Remix\", \"Astro\"]\n---\n\n<Combobox>\n <ComboboxInput placeholder=\"Select a framework\" disabled />\n <ComboboxContent>\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {frameworks.map((item) => (\n <ComboboxItem value={item}>{item}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
44
|
-
"type": "registry:component"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"path": "src/components/examples/combobox/combobox-groups.astro",
|
|
48
|
-
"content": "---\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxSeparator,\n} from \"@/components/ui/combobox\"\n\nconst timezones = [\n {\n value: \"Americas\",\n items: [\n \"(GMT-5) New York\",\n \"(GMT-8) Los Angeles\",\n \"(GMT-6) Chicago\",\n \"(GMT-5) Toronto\",\n \"(GMT-8) Vancouver\",\n \"(GMT-3) São Paulo\",\n ],\n },\n {\n value: \"Europe\",\n items: [\n \"(GMT+0) London\",\n \"(GMT+1) Paris\",\n \"(GMT+1) Berlin\",\n \"(GMT+1) Rome\",\n \"(GMT+1) Madrid\",\n \"(GMT+1) Amsterdam\",\n ],\n },\n {\n value: \"Asia/Pacific\",\n items: [\n \"(GMT+9) Tokyo\",\n \"(GMT+8) Shanghai\",\n \"(GMT+8) Singapore\",\n \"(GMT+4) Dubai\",\n \"(GMT+11) Sydney\",\n \"(GMT+9) Seoul\",\n ],\n },\n]\n---\n\n<Combobox>\n <ComboboxInput placeholder=\"Select a timezone\" />\n <ComboboxContent>\n <ComboboxList>\n <ComboboxEmpty>No timezones found.</ComboboxEmpty>\n {timezones.map((group, index) => (\n <>\n <ComboboxGroup>\n <ComboboxLabel>{group.value}</ComboboxLabel>\n {group.items.map((item) => (\n <ComboboxItem value={item}>{item}</ComboboxItem>\n ))}\n </ComboboxGroup>\n {index < timezones.length - 1 && <ComboboxSeparator />}\n </>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
49
|
-
"type": "registry:component"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"path": "src/components/examples/combobox/combobox-input-group.astro",
|
|
53
|
-
"content": "---\nimport GlobeIcon from \"@lucide/astro/icons/globe\"\n\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n} from \"@/components/ui/combobox\"\nimport { InputGroupAddon } from \"@/components/ui/input-group\"\n\nconst timezones = [\n {\n value: \"Americas\",\n items: [\n \"(GMT-5) New York\",\n \"(GMT-8) Los Angeles\",\n \"(GMT-6) Chicago\",\n \"(GMT-5) Toronto\",\n \"(GMT-8) Vancouver\",\n \"(GMT-3) São Paulo\",\n ],\n },\n {\n value: \"Europe\",\n items: [\n \"(GMT+0) London\",\n \"(GMT+1) Paris\",\n \"(GMT+1) Berlin\",\n \"(GMT+1) Rome\",\n \"(GMT+1) Madrid\",\n \"(GMT+1) Amsterdam\",\n ],\n },\n {\n value: \"Asia/Pacific\",\n items: [\n \"(GMT+9) Tokyo\",\n \"(GMT+8) Shanghai\",\n \"(GMT+8) Singapore\",\n \"(GMT+4) Dubai\",\n \"(GMT+11) Sydney\",\n \"(GMT+9) Seoul\",\n ],\n },\n]\n---\n\n<Combobox>\n <ComboboxInput placeholder=\"Select a timezone\">\n <InputGroupAddon>\n <GlobeIcon />\n </InputGroupAddon>\n </ComboboxInput>\n <ComboboxContent alignOffset={-28} class=\"w-60\">\n <ComboboxList>\n <ComboboxEmpty>No timezones found.</ComboboxEmpty>\n {timezones.map((group) => (\n <ComboboxGroup>\n <ComboboxLabel>{group.value}</ComboboxLabel>\n {group.items.map((item) => (\n <ComboboxItem value={item}>{item}</ComboboxItem>\n ))}\n </ComboboxGroup>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
54
|
-
"type": "registry:component"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"path": "src/components/examples/combobox/combobox-invalid.astro",
|
|
58
|
-
"content": "---\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from \"@/components/ui/combobox\"\n\nconst frameworks = [\"Next.js\", \"SvelteKit\", \"Nuxt.js\", \"Remix\", \"Astro\"]\n---\n\n<Combobox>\n <ComboboxInput placeholder=\"Select a framework\" aria-invalid=\"true\" />\n <ComboboxContent>\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {frameworks.map((item) => (\n <ComboboxItem value={item}>{item}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
59
|
-
"type": "registry:component"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"path": "src/components/examples/combobox/combobox-popup.astro",
|
|
63
|
-
"content": "---\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxValue,\n} from \"@/components/ui/combobox\"\n\nconst countries = [\n { code: \"\", value: \"\", continent: \"\", label: \"Select country\" },\n {\n code: \"ar\",\n value: \"argentina\",\n label: \"Argentina\",\n continent: \"South America\",\n },\n { code: \"au\", value: \"australia\", label: \"Australia\", continent: \"Oceania\" },\n { code: \"br\", value: \"brazil\", label: \"Brazil\", continent: \"South America\" },\n { code: \"ca\", value: \"canada\", label: \"Canada\", continent: \"North America\" },\n { code: \"cn\", value: \"china\", label: \"China\", continent: \"Asia\" },\n {\n code: \"co\",\n value: \"colombia\",\n label: \"Colombia\",\n continent: \"South America\",\n },\n { code: \"eg\", value: \"egypt\", label: \"Egypt\", continent: \"Africa\" },\n { code: \"fr\", value: \"france\", label: \"France\", continent: \"Europe\" },\n { code: \"de\", value: \"germany\", label: \"Germany\", continent: \"Europe\" },\n { code: \"it\", value: \"italy\", label: \"Italy\", continent: \"Europe\" },\n { code: \"jp\", value: \"japan\", label: \"Japan\", continent: \"Asia\" },\n { code: \"ke\", value: \"kenya\", label: \"Kenya\", continent: \"Africa\" },\n { code: \"mx\", value: \"mexico\", label: \"Mexico\", continent: \"North America\" },\n {\n code: \"nz\",\n value: \"new-zealand\",\n label: \"New Zealand\",\n continent: \"Oceania\",\n },\n { code: \"ng\", value: \"nigeria\", label: \"Nigeria\", continent: \"Africa\" },\n {\n code: \"za\",\n value: \"south-africa\",\n label: \"South Africa\",\n continent: \"Africa\",\n },\n { code: \"kr\", value: \"south-korea\", label: \"South Korea\", continent: \"Asia\" },\n {\n code: \"gb\",\n value: \"united-kingdom\",\n label: \"United Kingdom\",\n continent: \"Europe\",\n },\n {\n code: \"us\",\n value: \"united-states\",\n label: \"United States\",\n continent: \"North America\",\n },\n]\n---\n\n<Combobox defaultValue={countries[0].value}>\n <Button\n variant=\"outline\"\n data-slot=\"combobox-trigger\"\n class=\"[&_svg:not([class*='size-'])]:size-4 w-64 justify-between font-normal\"\n >\n <ComboboxValue />\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n </Button>\n <ComboboxContent>\n <ComboboxInput showTrigger={false} placeholder=\"Search\" />\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {countries.map((item) => (\n <ComboboxItem value={item.value}>{item.label}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
64
|
-
"type": "registry:component"
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
"docs": "https://ui.full.dev/components/combobox/",
|
|
68
|
-
"type": "registry:example"
|
|
69
|
-
}
|
package/public/r/combobox.json
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "combobox",
|
|
4
|
-
"title": "Combobox",
|
|
5
|
-
"description": "Autocomplete input with a list of suggestions.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@data-slot/combobox@^1.1.2",
|
|
8
|
-
"@data-slot/core@^1.1.2",
|
|
9
|
-
"@lucide/astro"
|
|
10
|
-
],
|
|
11
|
-
"registryDependencies": [
|
|
12
|
-
"@fulldev/input-group"
|
|
13
|
-
],
|
|
14
|
-
"files": [
|
|
15
|
-
{
|
|
16
|
-
"path": "src/components/ui/combobox/combobox.astro",
|
|
17
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"combobox\"\n data-default-value={defaultValue}\n data-default-open={defaultOpen}\n data-placeholder={placeholder}\n data-disabled={disabled}\n data-required={required}\n data-name={name}\n data-open-on-focus={openOnFocus}\n data-auto-highlight={autoHighlight}\n data-side={side}\n data-align={align}\n data-side-offset={sideOffset}\n data-align-offset={alignOffset}\n data-avoid-collisions={avoidCollisions}\n data-collision-padding={collisionPadding}\n class={cn(\"group/combobox relative\", className)}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/combobox\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
18
|
-
"type": "registry:ui"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"path": "src/components/ui/combobox/combobox-content.astro",
|
|
22
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n hidden = true,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"combobox-portal\">\n <div\n data-slot=\"combobox-positioner\"\n data-side={side}\n data-align={align}\n data-side-offset={sideOffset}\n data-align-offset={alignOffset}\n data-avoid-collisions={avoidCollisions}\n data-collision-padding={collisionPadding}\n class=\"isolate z-[1000]\"\n >\n <div\n data-slot=\"combobox-content\"\n data-side={side}\n data-align={align}\n data-side-offset={sideOffset}\n data-align-offset={alignOffset}\n data-avoid-collisions={avoidCollisions}\n data-collision-padding={collisionPadding}\n hidden={hidden}\n class={cn(\n \"bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:border-input/30 overflow-hidden rounded-md shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 group/combobox-content relative z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin)\",\n className\n )}\n {...props}\n >\n <slot />\n </div>\n </div>\n</div>\n",
|
|
23
|
-
"type": "registry:ui"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"path": "src/components/ui/combobox/combobox-empty.astro",
|
|
27
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, hidden = true, ...props } = Astro.props\n---\n\n<div\n data-slot=\"combobox-empty\"\n hidden={hidden}\n class={cn(\"text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex items-center\", className)}\n {...props}\n>\n <slot>No results found.</slot>\n</div>\n",
|
|
28
|
-
"type": "registry:ui"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"path": "src/components/ui/combobox/combobox-group.astro",
|
|
32
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div data-slot=\"combobox-group\" class={cn(className)} {...props}>\n <slot />\n</div>\n",
|
|
33
|
-
"type": "registry:ui"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"path": "src/components/ui/combobox/combobox-input.astro",
|
|
37
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/components/ui/input-group\"\n\nimport ComboboxTrigger from \"./combobox-trigger.astro\"\n\ntype Props = HTMLAttributes<\"input\"> & {\n showTrigger?: boolean\n showClear?: boolean\n clearLabel?: string\n}\n\nconst {\n class: className,\n type = \"text\",\n disabled = false,\n showTrigger = true,\n showClear = false,\n clearLabel = \"Clear selection\",\n ...props\n} = Astro.props\n---\n\n<InputGroup\n class={cn(\n \"has-[[data-slot=combobox-input]:focus-visible]:border-ring has-[[data-slot=combobox-input]:focus-visible]:ring-ring/50 w-auto has-[[data-slot=combobox-input]:focus-visible]:ring-3\",\n className\n )}\n>\n <InputGroupInput\n type={type}\n data-slot=\"combobox-input\"\n disabled={disabled}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <ComboboxTrigger\n class={cn(\n \"data-pressed:bg-transparent\",\n showClear && \"group-data-[value]/combobox:hidden\"\n )}\n disabled={disabled}\n />\n )}\n {showClear && (\n <InputGroupButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n data-slot=\"combobox-clear\"\n aria-label={clearLabel}\n class=\"hidden group-data-[value]/combobox:inline-flex\"\n disabled={disabled}\n >\n <XIcon class=\"pointer-events-none\" aria-hidden=\"true\" />\n </InputGroupButton>\n )}\n </InputGroupAddon>\n <slot />\n</InputGroup>\n",
|
|
38
|
-
"type": "registry:ui"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"path": "src/components/ui/combobox/combobox-item.astro",
|
|
42
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: string\n disabled?: boolean\n showIndicator?: boolean\n}\n\nconst {\n class: className,\n value,\n disabled,\n showIndicator = true,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"combobox-item\"\n data-value={value}\n data-disabled={disabled ? \"\" : undefined}\n class={cn(\n \"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 group/combobox-item data-highlighted:**:[svg]:text-accent-foreground relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className\n )}\n {...props}\n>\n <slot />\n {showIndicator && (\n <span\n data-slot=\"combobox-item-indicator\"\n hidden={false}\n class=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center opacity-0 group-data-selected/combobox-item:opacity-100\"\n >\n <CheckIcon class=\"pointer-events-none\" />\n </span>\n )}\n</div>\n",
|
|
43
|
-
"type": "registry:ui"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"path": "src/components/ui/combobox/combobox-label.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"combobox-label\"\n class={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
48
|
-
"type": "registry:ui"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "src/components/ui/combobox/combobox-list.astro",
|
|
52
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"combobox-list\"\n class={cn(\n \"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0 overscroll-contain group-data-empty/combobox-content:p-0\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
53
|
-
"type": "registry:ui"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"path": "src/components/ui/combobox/combobox-separator.astro",
|
|
57
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"combobox-separator\"\n class={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n></div>\n",
|
|
58
|
-
"type": "registry:ui"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"path": "src/components/ui/combobox/combobox-trigger.astro",
|
|
62
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\nimport { InputGroupButton } from \"@/components/ui/input-group\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n showIcon?: boolean\n}\n\nconst {\n class: className,\n type = \"button\",\n showIcon = true,\n ...props\n} = Astro.props\n---\n\n<InputGroupButton\n type={type ?? \"button\"}\n variant=\"ghost\"\n size=\"icon-xs\"\n data-slot=\"combobox-trigger\"\n class={cn(\"[&_svg]:text-muted-foreground\", className)}\n {...props}\n>\n <slot />\n {showIcon && (\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n )}\n</InputGroupButton>\n",
|
|
63
|
-
"type": "registry:ui"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"path": "src/components/ui/combobox/combobox-value.astro",
|
|
67
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"combobox-value\"\n class={cn(\n \"data-placeholder:text-muted-foreground block flex-1 truncate text-left\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
|
|
68
|
-
"type": "registry:ui"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"path": "src/components/ui/combobox/index.ts",
|
|
72
|
-
"content": "export { default as Combobox } from \"./combobox.astro\"\nexport { default as ComboboxContent } from \"./combobox-content.astro\"\nexport { default as ComboboxEmpty } from \"./combobox-empty.astro\"\nexport { default as ComboboxGroup } from \"./combobox-group.astro\"\nexport { default as ComboboxInput } from \"./combobox-input.astro\"\nexport { default as ComboboxItem } from \"./combobox-item.astro\"\nexport { default as ComboboxLabel } from \"./combobox-label.astro\"\nexport { default as ComboboxList } from \"./combobox-list.astro\"\nexport { default as ComboboxSeparator } from \"./combobox-separator.astro\"\nexport { default as ComboboxTrigger } from \"./combobox-trigger.astro\"\nexport { default as ComboboxValue } from \"./combobox-value.astro\"\n",
|
|
73
|
-
"type": "registry:ui"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"docs": "https://ui.full.dev/components/combobox/",
|
|
77
|
-
"categories": [
|
|
78
|
-
"ui"
|
|
79
|
-
],
|
|
80
|
-
"type": "registry:ui"
|
|
81
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "command-examples",
|
|
4
|
-
"title": "Command examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Command docs.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@lucide/astro"
|
|
8
|
-
],
|
|
9
|
-
"registryDependencies": [
|
|
10
|
-
"@fulldev/command",
|
|
11
|
-
"@fulldev/dialog"
|
|
12
|
-
],
|
|
13
|
-
"files": [
|
|
14
|
-
{
|
|
15
|
-
"path": "src/components/examples/command/command-basic.astro",
|
|
16
|
-
"content": "---\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@/components/ui/command\"\nimport { DialogTrigger } from \"@/components/ui/dialog\"\n---\n\n<div class=\"flex flex-col gap-4\">\n <CommandDialog>\n <DialogTrigger slot=\"trigger\" variant=\"outline\" class=\"w-fit\">\n Open Menu\n </DialogTrigger>\n <Command>\n <CommandInput placeholder=\"Type a command or search...\" />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup heading=\"Suggestions\">\n <CommandItem>Calendar</CommandItem>\n <CommandItem>Search Emoji</CommandItem>\n <CommandItem>Calculator</CommandItem>\n </CommandGroup>\n </CommandList>\n </Command>\n </CommandDialog>\n</div>\n",
|
|
17
|
-
"type": "registry:component"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"path": "src/components/examples/command/command-demo.astro",
|
|
21
|
-
"content": "---\nimport Calculator from \"@lucide/astro/icons/calculator\"\nimport Calendar from \"@lucide/astro/icons/calendar\"\nimport CreditCard from \"@lucide/astro/icons/credit-card\"\nimport Smile from \"@lucide/astro/icons/face-slightly-smiling\"\nimport Settings from \"@lucide/astro/icons/settings\"\nimport User from \"@lucide/astro/icons/user\"\n\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/components/ui/command\"\n---\n\n<Command class=\"max-w-sm rounded-lg border\">\n <CommandInput placeholder=\"Type a command or search...\" />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup heading=\"Suggestions\">\n <CommandItem>\n <Calendar />\n <span>Calendar</span>\n </CommandItem>\n <CommandItem>\n <Smile />\n <span>Search Emoji</span>\n </CommandItem>\n <CommandItem disabled>\n <Calculator />\n <span>Calculator</span>\n </CommandItem>\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup heading=\"Settings\">\n <CommandItem>\n <User />\n <span>Profile</span>\n <CommandShortcut>⌘P</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <CreditCard />\n <span>Billing</span>\n <CommandShortcut>⌘B</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <Settings />\n <span>Settings</span>\n <CommandShortcut>⌘S</CommandShortcut>\n </CommandItem>\n </CommandGroup>\n </CommandList>\n</Command>\n",
|
|
22
|
-
"type": "registry:component"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"path": "src/components/examples/command/command-groups.astro",
|
|
26
|
-
"content": "---\nimport CalculatorIcon from \"@lucide/astro/icons/calculator\"\nimport CalendarIcon from \"@lucide/astro/icons/calendar\"\nimport CreditCardIcon from \"@lucide/astro/icons/credit-card\"\nimport SmileIcon from \"@lucide/astro/icons/face-slightly-smiling\"\nimport SettingsIcon from \"@lucide/astro/icons/settings\"\nimport UserIcon from \"@lucide/astro/icons/user\"\n\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/components/ui/command\"\nimport { DialogTrigger } from \"@/components/ui/dialog\"\n---\n\n<div class=\"flex flex-col gap-4\">\n <CommandDialog>\n <DialogTrigger slot=\"trigger\" variant=\"outline\" class=\"w-fit\">\n Open Menu\n </DialogTrigger>\n <Command>\n <CommandInput placeholder=\"Type a command or search...\" />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup heading=\"Suggestions\">\n <CommandItem>\n <CalendarIcon />\n <span>Calendar</span>\n </CommandItem>\n <CommandItem>\n <SmileIcon />\n <span>Search Emoji</span>\n </CommandItem>\n <CommandItem>\n <CalculatorIcon />\n <span>Calculator</span>\n </CommandItem>\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup heading=\"Settings\">\n <CommandItem>\n <UserIcon />\n <span>Profile</span>\n <CommandShortcut>⌘P</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <CreditCardIcon />\n <span>Billing</span>\n <CommandShortcut>⌘B</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <SettingsIcon />\n <span>Settings</span>\n <CommandShortcut>⌘S</CommandShortcut>\n </CommandItem>\n </CommandGroup>\n </CommandList>\n </Command>\n </CommandDialog>\n</div>\n",
|
|
27
|
-
"type": "registry:component"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"path": "src/components/examples/command/command-rtl.astro",
|
|
31
|
-
"content": "---\nimport Calculator from \"@lucide/astro/icons/calculator\"\nimport Calendar from \"@lucide/astro/icons/calendar\"\nimport CreditCard from \"@lucide/astro/icons/credit-card\"\nimport Smile from \"@lucide/astro/icons/face-slightly-smiling\"\nimport Settings from \"@lucide/astro/icons/settings\"\nimport User from \"@lucide/astro/icons/user\"\n\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/components/ui/command\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {\n placeholder: \"Type a command or search...\",\n empty: \"No results found.\",\n suggestions: \"Suggestions\",\n calendar: \"Calendar\",\n searchEmoji: \"Search Emoji\",\n calculator: \"Calculator\",\n settings: \"Settings\",\n profile: \"Profile\",\n billing: \"Billing\",\n },\n },\n ar: {\n dir: \"rtl\",\n values: {\n placeholder: \"اكتب أمرًا أو ابحث...\",\n empty: \"لم يتم العثور على نتائج.\",\n suggestions: \"اقتراحات\",\n calendar: \"التقويم\",\n searchEmoji: \"البحث عن الرموز التعبيرية\",\n calculator: \"الآلة الحاسبة\",\n settings: \"الإعدادات\",\n profile: \"الملف الشخصي\",\n billing: \"الفوترة\",\n },\n },\n he: {\n dir: \"rtl\",\n values: {\n placeholder: \"הקלד פקודה או חפש...\",\n empty: \"לא נמצאו תוצאות.\",\n suggestions: \"הצעות\",\n calendar: \"לוח שנה\",\n searchEmoji: \"חפש אמוג'י\",\n calculator: \"מחשבון\",\n settings: \"הגדרות\",\n profile: \"פרופיל\",\n billing: \"חיוב\",\n },\n },\n}\n\nconst { dir, values: t } = translations.ar\n---\n\n<Command class=\"max-w-sm rounded-lg border\" dir={dir}>\n <CommandInput placeholder={t.placeholder} dir={dir} />\n <CommandList>\n <CommandEmpty>{t.empty}</CommandEmpty>\n <CommandGroup heading={t.suggestions}>\n <CommandItem>\n <Calendar />\n <span>{t.calendar}</span>\n </CommandItem>\n <CommandItem>\n <Smile />\n <span>{t.searchEmoji}</span>\n </CommandItem>\n <CommandItem disabled>\n <Calculator />\n <span>{t.calculator}</span>\n </CommandItem>\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup heading={t.settings}>\n <CommandItem>\n <User />\n <span>{t.profile}</span>\n <CommandShortcut>⌘P</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <CreditCard />\n <span>{t.billing}</span>\n <CommandShortcut>⌘B</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <Settings />\n <span>{t.settings}</span>\n <CommandShortcut>⌘S</CommandShortcut>\n </CommandItem>\n </CommandGroup>\n </CommandList>\n</Command>\n",
|
|
32
|
-
"type": "registry:component"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"path": "src/components/examples/command/command-scrollable.astro",
|
|
36
|
-
"content": "---\nimport BellIcon from \"@lucide/astro/icons/bell\"\nimport CalculatorIcon from \"@lucide/astro/icons/calculator\"\nimport CalendarIcon from \"@lucide/astro/icons/calendar\"\nimport HelpCircleIcon from \"@lucide/astro/icons/circle-question-mark\"\nimport ClipboardPasteIcon from \"@lucide/astro/icons/clipboard-paste\"\nimport CodeIcon from \"@lucide/astro/icons/code\"\nimport CopyIcon from \"@lucide/astro/icons/copy\"\nimport CreditCardIcon from \"@lucide/astro/icons/credit-card\"\nimport FileTextIcon from \"@lucide/astro/icons/file-text\"\nimport FolderIcon from \"@lucide/astro/icons/folder\"\nimport FolderPlusIcon from \"@lucide/astro/icons/folder-plus\"\nimport HomeIcon from \"@lucide/astro/icons/house\"\nimport ImageIcon from \"@lucide/astro/icons/image\"\nimport InboxIcon from \"@lucide/astro/icons/inbox\"\nimport LayoutGridIcon from \"@lucide/astro/icons/layout-grid\"\nimport ListIcon from \"@lucide/astro/icons/list\"\nimport PlusIcon from \"@lucide/astro/icons/plus\"\nimport ScissorsIcon from \"@lucide/astro/icons/scissors\"\nimport SettingsIcon from \"@lucide/astro/icons/settings\"\nimport TrashIcon from \"@lucide/astro/icons/trash\"\nimport UserIcon from \"@lucide/astro/icons/user\"\nimport ZoomInIcon from \"@lucide/astro/icons/zoom-in\"\nimport ZoomOutIcon from \"@lucide/astro/icons/zoom-out\"\n\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/components/ui/command\"\nimport { DialogTrigger } from \"@/components/ui/dialog\"\n---\n\n<div class=\"flex flex-col gap-4\">\n <CommandDialog>\n <DialogTrigger slot=\"trigger\" variant=\"outline\" class=\"w-fit\">\n Open Menu\n </DialogTrigger>\n <Command>\n <CommandInput placeholder=\"Type a command or search...\" />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup heading=\"Navigation\">\n <CommandItem>\n <HomeIcon />\n <span>Home</span>\n <CommandShortcut>⌘H</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <InboxIcon />\n <span>Inbox</span>\n <CommandShortcut>⌘I</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <FileTextIcon />\n <span>Documents</span>\n <CommandShortcut>⌘D</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <FolderIcon />\n <span>Folders</span>\n <CommandShortcut>⌘F</CommandShortcut>\n </CommandItem>\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup heading=\"Actions\">\n <CommandItem>\n <PlusIcon />\n <span>New File</span>\n <CommandShortcut>⌘N</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <FolderPlusIcon />\n <span>New Folder</span>\n <CommandShortcut>⇧⌘N</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <CopyIcon />\n <span>Copy</span>\n <CommandShortcut>⌘C</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <ScissorsIcon />\n <span>Cut</span>\n <CommandShortcut>⌘X</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <ClipboardPasteIcon />\n <span>Paste</span>\n <CommandShortcut>⌘V</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <TrashIcon />\n <span>Delete</span>\n <CommandShortcut>⌫</CommandShortcut>\n </CommandItem>\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup heading=\"View\">\n <CommandItem>\n <LayoutGridIcon />\n <span>Grid View</span>\n </CommandItem>\n <CommandItem>\n <ListIcon />\n <span>List View</span>\n </CommandItem>\n <CommandItem>\n <ZoomInIcon />\n <span>Zoom In</span>\n <CommandShortcut>⌘+</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <ZoomOutIcon />\n <span>Zoom Out</span>\n <CommandShortcut>⌘-</CommandShortcut>\n </CommandItem>\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup heading=\"Account\">\n <CommandItem>\n <UserIcon />\n <span>Profile</span>\n <CommandShortcut>⌘P</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <CreditCardIcon />\n <span>Billing</span>\n <CommandShortcut>⌘B</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <SettingsIcon />\n <span>Settings</span>\n <CommandShortcut>⌘S</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <BellIcon />\n <span>Notifications</span>\n </CommandItem>\n <CommandItem>\n <HelpCircleIcon />\n <span>Help & Support</span>\n </CommandItem>\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup heading=\"Tools\">\n <CommandItem>\n <CalculatorIcon />\n <span>Calculator</span>\n </CommandItem>\n <CommandItem>\n <CalendarIcon />\n <span>Calendar</span>\n </CommandItem>\n <CommandItem>\n <ImageIcon />\n <span>Image Editor</span>\n </CommandItem>\n <CommandItem>\n <CodeIcon />\n <span>Code Editor</span>\n </CommandItem>\n </CommandGroup>\n </CommandList>\n </Command>\n </CommandDialog>\n</div>\n",
|
|
37
|
-
"type": "registry:component"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"path": "src/components/examples/command/command-shortcuts.astro",
|
|
41
|
-
"content": "---\nimport CreditCardIcon from \"@lucide/astro/icons/credit-card\"\nimport SettingsIcon from \"@lucide/astro/icons/settings\"\nimport UserIcon from \"@lucide/astro/icons/user\"\n\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandShortcut,\n} from \"@/components/ui/command\"\nimport { DialogTrigger } from \"@/components/ui/dialog\"\n---\n\n<div class=\"flex flex-col gap-4\">\n <CommandDialog>\n <DialogTrigger slot=\"trigger\" variant=\"outline\" class=\"w-fit\">\n Open Menu\n </DialogTrigger>\n <Command>\n <CommandInput placeholder=\"Type a command or search...\" />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup heading=\"Settings\">\n <CommandItem>\n <UserIcon />\n <span>Profile</span>\n <CommandShortcut>⌘P</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <CreditCardIcon />\n <span>Billing</span>\n <CommandShortcut>⌘B</CommandShortcut>\n </CommandItem>\n <CommandItem>\n <SettingsIcon />\n <span>Settings</span>\n <CommandShortcut>⌘S</CommandShortcut>\n </CommandItem>\n </CommandGroup>\n </CommandList>\n </Command>\n </CommandDialog>\n</div>\n",
|
|
42
|
-
"type": "registry:component"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"docs": "https://ui.full.dev/components/command/",
|
|
46
|
-
"type": "registry:example"
|
|
47
|
-
}
|
package/public/r/command.json
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "command",
|
|
4
|
-
"title": "Command",
|
|
5
|
-
"description": "Command menu for search and quick actions.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@data-slot/command@^1.1.2",
|
|
8
|
-
"@lucide/astro",
|
|
9
|
-
"@data-slot/core@^1.1.2"
|
|
10
|
-
],
|
|
11
|
-
"registryDependencies": [
|
|
12
|
-
"@fulldev/dialog"
|
|
13
|
-
],
|
|
14
|
-
"files": [
|
|
15
|
-
{
|
|
16
|
-
"path": "src/components/ui/command/command.astro",
|
|
17
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"command\"\n data-label={label}\n data-default-value={defaultValue}\n data-default-search={defaultSearch}\n data-should-filter={shouldFilter}\n data-loop={loop}\n data-disable-pointer-selection={disablePointerSelection}\n data-vim-bindings={vimBindings}\n class={cn(\"bg-popover text-popover-foreground rounded-xl! p-1 flex size-full flex-col overflow-hidden\", className)}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/command\"\n import { getParts } from \"@data-slot/core\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n\n const isCommandInput = (\n target: EventTarget | null\n ): target is HTMLInputElement =>\n target instanceof HTMLInputElement &&\n target.dataset.slot === \"command-input\"\n\n // Do not act on the Enter that confirms an IME composition. Safari fires\n // that keydown right after compositionend with isComposing set to false, so\n // treat the first keydown after compositionend as the confirming key when it\n // arrives within 50 ms. Any later keydown is a new key press.\n let composing = false\n let compositionEndedAt = -Infinity\n document.addEventListener(\n \"compositionstart\",\n (event) => {\n if (isCommandInput(event.target)) composing = true\n },\n true\n )\n document.addEventListener(\n \"compositionend\",\n (event) => {\n if (!isCommandInput(event.target)) return\n composing = false\n compositionEndedAt = event.timeStamp\n },\n true\n )\n const confirmsComposition = (event: KeyboardEvent) => {\n if (event.isComposing || composing) return true\n const confirming = event.timeStamp - compositionEndedAt < 50\n compositionEndedAt = -Infinity\n return confirming\n }\n\n // Data Slot selection does not activate links. Preserve native navigation.\n document.addEventListener(\n \"keydown\",\n (event) => {\n const input = event.target\n if (!isCommandInput(input)) return\n const confirming = confirmsComposition(event)\n if (event.key !== \"Enter\" || event.defaultPrevented || confirming) return\n const root = input.closest('[data-slot=\"command\"]')\n if (!root) return\n const item = getParts<HTMLAnchorElement>(root, \"command-item\").find(\n (item) =>\n item.hasAttribute(\"data-selected\") &&\n item.hasAttribute(\"href\") &&\n item.getAttribute(\"aria-disabled\") !== \"true\"\n )\n if (!item) return\n event.preventDefault()\n item.click()\n },\n true\n )\n</script>\n",
|
|
18
|
-
"type": "registry:ui"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"path": "src/components/ui/command/command-dialog.astro",
|
|
22
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogTitle,\n} from \"@/components/ui/dialog\"\n\ntype Props = ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n contentClass?: string\n showCloseButton?: boolean\n}\n\nconst {\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n contentClass,\n showCloseButton = false,\n ...props\n} = Astro.props\n---\n\n<Dialog {...props}>\n <slot name=\"trigger\" />\n <DialogContent\n class:list={[\n \"rounded-xl! top-1/3 translate-y-0 overflow-hidden p-0\",\n \"[&_[data-slot=command]]:border-0\",\n \"[&_[data-slot=command]]:bg-transparent\",\n \"[&_[data-slot=command-input-wrapper]]:h-12\",\n \"[&_[data-slot=command-input-wrapper]_svg]:size-5\",\n \"[&_[data-slot=command-input]]:h-12\",\n \"[&_[data-slot=command-item]]:px-2\",\n \"[&_[data-slot=command-item]]:py-3\",\n \"[&_[data-slot=command-item]_svg]:size-5\",\n \"[&_[data-slot=command-group-heading]]:text-muted-foreground\",\n \"[&_[data-slot=command-group-heading]]:px-2\",\n \"[&_[data-slot=command-group-heading]]:font-medium\",\n \"[&_[data-slot=command-group]]:px-2\",\n \"[&_[data-slot=command-group]:not([hidden])_~[data-slot=command-group]]:pt-0\",\n contentClass,\n ]}\n showCloseButton={showCloseButton}\n >\n <div class=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </div>\n <slot />\n </DialogContent>\n</Dialog>\n",
|
|
23
|
-
"type": "registry:ui"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"path": "src/components/ui/command/command-input.astro",
|
|
27
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport SearchIcon from \"@lucide/astro/icons/search\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"input\"> & {\n wrapperClass?: string\n}\n\nconst { class: className, wrapperClass, ...props } = Astro.props\n---\n\n<div\n data-slot=\"command-input-wrapper\"\n class={cn(\"p-1 pb-0\", wrapperClass)}\n>\n <div class=\"bg-input/30 border-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:pl-2! flex items-center border\">\n <div class=\"flex items-center pl-2\">\n <SearchIcon class=\"size-4 shrink-0 opacity-50\" />\n </div>\n <input\n type=\"text\"\n data-slot=\"command-input\"\n class={cn(\n \"text-sm placeholder:text-muted-foreground h-full min-w-0 flex-1 bg-transparent px-2.5 outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n</div>\n",
|
|
28
|
-
"type": "registry:ui"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"path": "src/components/ui/command/command-list.astro",
|
|
32
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"command-list\"\n class={cn(\n \"no-scrollbar max-h-72 scroll-py-1 outline-none h-[var(--command-list-height)] overflow-x-hidden overflow-y-auto transition-[height] duration-150 ease-out\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
33
|
-
"type": "registry:ui"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"path": "src/components/ui/command/command-empty.astro",
|
|
37
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, hidden = true, ...props } = Astro.props\n---\n\n<div\n data-slot=\"command-empty\"\n hidden={hidden}\n class={cn(\"py-6 text-center text-sm\", className)}\n {...props}\n>\n <slot>No results found.</slot>\n</div>\n",
|
|
38
|
-
"type": "registry:ui"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"path": "src/components/ui/command/command-group.astro",
|
|
42
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n heading?: string\n value?: string\n forceMount?: boolean\n}\n\nconst { class: className, heading, value, forceMount, ...props } = Astro.props\n---\n\n<div\n data-slot=\"command-group\"\n data-value={value}\n data-force-mount={forceMount ? \"true\" : undefined}\n class={cn(\"text-foreground [&_[data-slot=command-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[data-slot=command-group-heading]]:px-2 [&_[data-slot=command-group-heading]]:py-1.5 [&_[data-slot=command-group-heading]]:text-xs [&_[data-slot=command-group-heading]]:font-medium\", className)}\n {...props}\n>\n {heading && <div data-slot=\"command-group-heading\">{heading}</div>}\n <slot />\n</div>\n",
|
|
43
|
-
"type": "registry:ui"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"path": "src/components/ui/command/command-item.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:**:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! [&_svg:not([class*='size-'])]:size-4 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline\",\n className\n )}\n {...props}\n>\n <slot />\n <CheckIcon class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100\" />\n</Tag>\n",
|
|
48
|
-
"type": "registry:ui"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "src/components/ui/command/command-separator.astro",
|
|
52
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"command-separator\"\n class={cn(\"bg-border -mx-1 h-px w-auto\", className)}\n {...props}\n></div>\n",
|
|
53
|
-
"type": "registry:ui"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"path": "src/components/ui/command/command-shortcut.astro",
|
|
57
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"command-shortcut\"\n class={cn(\"text-muted-foreground group-data-selected/command-item:text-foreground ml-auto text-xs tracking-widest\", className)}\n {...props}\n>\n <slot />\n</span>\n",
|
|
58
|
-
"type": "registry:ui"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"path": "src/components/ui/command/index.ts",
|
|
62
|
-
"content": "export { default as Command } from \"./command.astro\"\nexport { default as CommandDialog } from \"./command-dialog.astro\"\nexport { default as CommandInput } from \"./command-input.astro\"\nexport { default as CommandList } from \"./command-list.astro\"\nexport { default as CommandEmpty } from \"./command-empty.astro\"\nexport { default as CommandGroup } from \"./command-group.astro\"\nexport { default as CommandItem } from \"./command-item.astro\"\nexport { default as CommandSeparator } from \"./command-separator.astro\"\nexport { default as CommandShortcut } from \"./command-shortcut.astro\"\n",
|
|
63
|
-
"type": "registry:ui"
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
"docs": "https://ui.full.dev/components/command/",
|
|
67
|
-
"categories": [
|
|
68
|
-
"ui"
|
|
69
|
-
],
|
|
70
|
-
"type": "registry:ui"
|
|
71
|
-
}
|