fulldev-ui 0.25.0 → 0.25.1
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 +8 -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 +2 -1
- package/public/r/liquid/components.json +1 -1
- package/public/r/liquid/init.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/sidebar.json
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "sidebar",
|
|
4
|
-
"title": "Sidebar",
|
|
5
|
-
"description": "A composable, themeable, and customizable Astro sidebar component.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@data-slot/tooltip@^1.1.2",
|
|
8
|
-
"@lucide/astro"
|
|
9
|
-
],
|
|
10
|
-
"registryDependencies": [
|
|
11
|
-
"@fulldev/layout",
|
|
12
|
-
"@fulldev/button",
|
|
13
|
-
"@fulldev/input",
|
|
14
|
-
"@fulldev/separator",
|
|
15
|
-
"@fulldev/sheet",
|
|
16
|
-
"@fulldev/skeleton",
|
|
17
|
-
"@fulldev/tooltip"
|
|
18
|
-
],
|
|
19
|
-
"files": [
|
|
20
|
-
{
|
|
21
|
-
"path": "src/components/ui/sidebar/sidebar-provider.astro",
|
|
22
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n}\n\nconst {\n class: className,\n style,\n defaultOpen = true,\n open,\n ...props\n} = Astro.props\n\nconst resolvedStyle = [\n `--sidebar-width: ${SIDEBAR_WIDTH}`,\n `--sidebar-width-mobile: ${SIDEBAR_WIDTH_MOBILE}`,\n `--sidebar-width-icon: ${SIDEBAR_WIDTH_ICON}`,\n typeof style === \"string\" ? style : undefined,\n]\n .filter(Boolean)\n .join(\"; \")\n---\n\n<div\n data-slot=\"sidebar-wrapper\"\n data-default-open={defaultOpen ? \"true\" : \"false\"}\n data-open={open === undefined ? undefined : open ? \"true\" : \"false\"}\n style={resolvedStyle}\n class={cn(\n \"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full\",\n className\n )}\n {...props}\n>\n <slot />\n <script is:inline>\n ;(() => {\n // Only the parts of this provider, not of a sidebar nested inside it.\n const owned = (provider, selector) =>\n [...provider.querySelectorAll(selector)].filter(\n (element) =>\n element.closest(\"[data-slot='sidebar-wrapper']\") === provider\n )\n\n window.__fulldevSyncSidebarProvider ??= (provider, open) => {\n const state = open ? \"expanded\" : \"collapsed\"\n const [sidebar] = owned(\n provider,\n \"[data-slot='sidebar']:not([data-mobile='true'])\"\n )\n const collapsible = sidebar?.dataset.sidebarCollapsible ?? \"offcanvas\"\n\n provider.dataset.open = open ? \"true\" : \"false\"\n provider.dataset.state = state\n\n if (sidebar) {\n sidebar.dataset.state = collapsible === \"none\" ? \"expanded\" : state\n sidebar.dataset.collapsible =\n collapsible === \"none\" ? \"none\" : open ? \"\" : collapsible\n }\n\n owned(\n provider,\n \"[data-sidebar='trigger'], [data-sidebar='rail']\"\n ).forEach((control) => {\n control.setAttribute(\"aria-expanded\", String(open))\n })\n\n owned(provider, \"[data-slot='tooltip']\").forEach((tooltip) => {\n if (\n state !== \"collapsed\" &&\n tooltip.querySelector(\"[data-sidebar='menu-button']\")\n ) {\n tooltip.dispatchEvent(\n new CustomEvent(\"tooltip:set\", { detail: { open: false } })\n )\n }\n })\n }\n\n // A sidebar inside a page that has one, such as an example, keeps its\n // state out of the shared cookie.\n window.__fulldevInitSidebarProvider ??= (provider) => {\n const controlledOpen = provider.dataset.open\n const nested = provider.parentElement?.closest(\n \"[data-slot='sidebar-wrapper']\"\n )\n const cookieValue = nested\n ? undefined\n : document.cookie\n .split(\"; \")\n .find((entry) => entry.startsWith(\"sidebar_state=\"))\n ?.slice(\"sidebar_state=\".length)\n\n const isOpen =\n controlledOpen === \"true\" || controlledOpen === \"false\"\n ? controlledOpen === \"true\"\n : cookieValue === \"true\" || cookieValue === \"false\"\n ? cookieValue === \"true\"\n : provider.dataset.defaultOpen !== \"false\"\n\n provider.dataset.openMobile = \"false\"\n window.__fulldevSyncSidebarProvider(provider, isOpen)\n }\n\n const provider = document.currentScript?.closest(\n \"[data-slot='sidebar-wrapper']\"\n )\n if (provider instanceof HTMLElement)\n window.__fulldevInitSidebarProvider(provider)\n })()\n </script>\n</div>\n\n<script is:inline>\n ;(() => {\n const scrollTop = Number(sessionStorage.getItem(\"sidebar_scroll\") || 0)\n\n document.querySelectorAll(\"[data-sidebar='content']\").forEach((content) => {\n if (\n content.closest(\n \"[data-slot='sidebar-wrapper'] [data-slot='sidebar-wrapper']\"\n )\n )\n return\n content.scrollTop = scrollTop\n })\n })()\n</script>\n\n<script is:inline>\n ;(() => {\n if (window.__fulldevSidebarInitialized) return\n window.__fulldevSidebarInitialized = true\n\n // Markup added without running its inline script, such as a swapped\n // preview, initializes here.\n document.addEventListener(\"astro:page-load\", () => {\n document\n .querySelectorAll(\"[data-slot='sidebar-wrapper']:not([data-state])\")\n .forEach((provider) => window.__fulldevInitSidebarProvider?.(provider))\n })\n\n const SIDEBAR_COOKIE_NAME = \"sidebar_state\"\n const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\n\n const toggleSidebar = (provider) => {\n if (!window.matchMedia(\"(min-width: 768px)\").matches) {\n const openMobile = provider.dataset.openMobile !== \"true\"\n provider.dataset.openMobile = openMobile ? \"true\" : \"false\"\n provider\n .querySelector(\"[data-sidebar='sheet']\")\n ?.dispatchEvent(\n new CustomEvent(\"dialog:set\", { detail: { open: openMobile } })\n )\n return\n }\n\n const open = provider.dataset.open === \"false\"\n if (!provider.parentElement?.closest(\"[data-slot='sidebar-wrapper']\"))\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${open}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n window.__fulldevSyncSidebarProvider?.(provider, open)\n }\n\n document.addEventListener(\"dialog:change\", (event) => {\n const root = event.target\n if (!(root instanceof HTMLElement) || root.dataset.sidebar !== \"sheet\")\n return\n const provider = root.closest(\"[data-slot='sidebar-wrapper']\")\n if (provider)\n provider.dataset.openMobile = String(Boolean(event.detail?.open))\n })\n\n document.addEventListener(\"tooltip:change\", (event) => {\n if (!event.detail?.open) return\n const root = event.target\n if (!(root instanceof HTMLElement)) return\n if (!root.querySelector(\"[data-sidebar='menu-button']\")) return\n const provider = root.closest(\"[data-slot='sidebar-wrapper']\")\n const sidebar = root.closest(\"[data-slot='sidebar']\")\n if (\n provider?.dataset.state !== \"collapsed\" ||\n sidebar?.dataset.collapsible !== \"icon\" ||\n !window.matchMedia(\"(min-width: 768px)\").matches\n ) {\n root.dispatchEvent(\n new CustomEvent(\"tooltip:set\", { detail: { open: false } })\n )\n }\n })\n\n document.addEventListener(\"click\", (event) => {\n const control = event.target?.closest?.(\n \"[data-sidebar='trigger'], [data-sidebar='rail']\"\n )\n if (!control || control.matches(\":disabled, [aria-disabled='true']\")) {\n return\n }\n\n const provider = control.closest(\"[data-slot='sidebar-wrapper']\")\n if (!provider) return\n\n toggleSidebar(provider)\n })\n\n document.addEventListener(\"keydown\", (event) => {\n if (event.key.toLowerCase() !== \"b\") return\n if (!(event.metaKey || event.ctrlKey) || event.shiftKey || event.altKey) {\n return\n }\n if (event.defaultPrevented) return\n\n const target = event.target\n const isTyping =\n target instanceof HTMLElement &&\n (target.isContentEditable ||\n target.matches(\"input, textarea, select, [role='textbox']\"))\n if (isTyping) return\n\n const provider = document.querySelector(\"[data-slot='sidebar-wrapper']\")\n if (!(provider instanceof HTMLElement)) return\n\n event.preventDefault()\n toggleSidebar(provider)\n })\n\n document.addEventListener(\n \"scroll\",\n (event) => {\n if (\n event.target?.dataset?.sidebar === \"content\" &&\n !event.target.closest(\n \"[data-slot='sidebar-wrapper'] [data-slot='sidebar-wrapper']\"\n )\n ) {\n sessionStorage.setItem(\"sidebar_scroll\", event.target.scrollTop)\n }\n },\n true\n )\n })()\n</script>\n",
|
|
23
|
-
"type": "registry:ui"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"path": "src/components/ui/sidebar/sidebar.astro",
|
|
27
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/components/ui/sheet\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"dir\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n state?: \"expanded\" | \"collapsed\"\n mobileTitle?: string\n mobileDescription?: string\n}\n\nconst {\n class: className,\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n state = \"expanded\",\n mobileTitle = \"Sidebar\",\n mobileDescription = \"Displays the mobile sidebar.\",\n ...props\n} = Astro.props\n\nconst desktopState = collapsible === \"none\" ? \"expanded\" : state\nconst desktopCollapsible = desktopState === \"collapsed\" ? collapsible : \"\"\n---\n\n{collapsible === \"none\" ? (\n <div\n data-slot=\"sidebar\"\n data-state=\"expanded\"\n data-collapsible=\"none\"\n data-variant={variant}\n data-side={side}\n data-sidebar-collapsible=\"none\"\n class={cn(\n \"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col\",\n className\n )}\n {...props}\n >\n <slot />\n </div>\n) : (\n <>\n <Sheet data-sidebar=\"sheet\" defaultOpen={false}>\n <SheetContent\n side={side}\n showCloseButton={false}\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n style=\"--sidebar-width: var(--sidebar-width-mobile);\"\n class={cn(\n \"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 md:hidden\",\n className\n )}\n >\n <SheetHeader class=\"sr-only\">\n <SheetTitle>{mobileTitle}</SheetTitle>\n <SheetDescription>{mobileDescription}</SheetDescription>\n </SheetHeader>\n <div class=\"flex h-full w-full flex-col\">\n <slot />\n </div>\n </SheetContent>\n </Sheet>\n\n <div\n data-slot=\"sidebar\"\n data-state={desktopState}\n data-collapsible={desktopCollapsible}\n data-variant={variant}\n data-side={side}\n data-sidebar-collapsible={collapsible}\n class=\"group peer text-sidebar-foreground hidden md:block\"\n >\n <div\n data-slot=\"sidebar-gap\"\n class={cn(\n \"transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n <aside\n data-slot=\"sidebar-container\"\n data-side={side}\n class={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex\",\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n class=\"bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col\"\n >\n <slot />\n </div>\n </aside>\n </div>\n </>\n)}\n",
|
|
28
|
-
"type": "registry:ui"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"path": "src/components/ui/sidebar/sidebar-trigger.astro",
|
|
32
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport PanelLeftIcon from \"@lucide/astro/icons/panel-left\"\n\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n variant?: \"ghost\" | \"secondary\"\n}\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n aria-keyshortcuts=\"Control+B Meta+B\"\n {...props}\n>\n <PanelLeftIcon />\n <span class=\"sr-only\">Toggle Sidebar</span>\n <slot />\n</Button>\n",
|
|
33
|
-
"type": "registry:ui"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"path": "src/components/ui/sidebar/sidebar-rail.astro",
|
|
37
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\">\n\nconst {\n class: className,\n type = \"button\",\n \"aria-label\": ariaLabel = \"Toggle Sidebar\",\n title = ariaLabel,\n ...props\n} = Astro.props\n---\n\n<button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label={ariaLabel}\n tabindex={-1}\n title={title}\n type={type}\n class={cn(\n \"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n></button>\n",
|
|
38
|
-
"type": "registry:ui"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"path": "src/components/ui/sidebar/sidebar-inset.astro",
|
|
42
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"main\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<main\n data-slot=\"sidebar-inset\"\n class={cn(\"bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 relative flex w-full flex-1 flex-col\", className)}\n {...props}\n>\n <slot />\n</main>\n",
|
|
43
|
-
"type": "registry:ui"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"path": "src/components/ui/sidebar/sidebar-input.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"input\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n class={cn(\n \"dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border px-2.5 py-1 text-base transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm bg-background h-8 w-full shadow-none file:text-foreground placeholder:text-muted-foreground min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n/>\n",
|
|
48
|
-
"type": "registry:ui"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "src/components/ui/sidebar/sidebar-header.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=\"sidebar-header\"\n data-sidebar=\"header\"\n class={cn(\"gap-2 p-2 flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
53
|
-
"type": "registry:ui"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"path": "src/components/ui/sidebar/sidebar-footer.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=\"sidebar-footer\"\n data-sidebar=\"footer\"\n class={cn(\"gap-2 p-2 flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
58
|
-
"type": "registry:ui"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"path": "src/components/ui/sidebar/sidebar-separator.astro",
|
|
62
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\ntype Props = ComponentProps<typeof Separator>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n class={cn(\"bg-sidebar-border mx-2 w-auto\", className)}\n {...props}\n/>\n",
|
|
63
|
-
"type": "registry:ui"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"path": "src/components/ui/sidebar/sidebar-content.astro",
|
|
67
|
-
"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=\"sidebar-content\"\n data-sidebar=\"content\"\n class={cn(\n \"no-scrollbar gap-2 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
68
|
-
"type": "registry:ui"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"path": "src/components/ui/sidebar/sidebar-group.astro",
|
|
72
|
-
"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=\"sidebar-group\"\n data-sidebar=\"group\"\n class={cn(\n \"p-2 relative flex w-full min-w-0 flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
73
|
-
"type": "registry:ui"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"path": "src/components/ui/sidebar/sidebar-group-label.astro",
|
|
77
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> &\n HTMLAttributes<\"button\"> &\n HTMLAttributes<\"span\"> & {\n as?: \"div\" | \"button\" | \"span\"\n }\n\nconst { as: Tag = \"div\", class: className, type, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"sidebar-group-label\"\n data-sidebar=\"group-label\"\n type={Tag === \"button\" ? type || \"button\" : undefined}\n class={cn(\n \"text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n>\n <slot />\n</Tag>\n",
|
|
78
|
-
"type": "registry:ui"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"path": "src/components/ui/sidebar/sidebar-group-action.astro",
|
|
82
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> &\n HTMLAttributes<\"a\"> &\n HTMLAttributes<\"div\"> &\n HTMLAttributes<\"span\"> & {\n as?: \"button\" | \"a\" | \"div\" | \"span\"\n href?: string\n }\n\nconst { as: explicitTag, class: className, type, ...props } = Astro.props\n\nconst Tag = explicitTag || (\"href\" in Astro.props ? \"a\" : \"button\")\nconst resolvedType = Tag === \"button\" ? type || \"button\" : undefined\n---\n\n<Tag\n data-slot=\"sidebar-group-action\"\n data-sidebar=\"group-action\"\n type={resolvedType}\n class={cn(\n \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 w-5 rounded-md p-0 focus-visible:ring-2 [&>svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n>\n <slot />\n</Tag>\n",
|
|
83
|
-
"type": "registry:ui"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"path": "src/components/ui/sidebar/sidebar-group-content.astro",
|
|
87
|
-
"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=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n class={cn(\"text-sm w-full\", className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
88
|
-
"type": "registry:ui"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"path": "src/components/ui/sidebar/sidebar-menu.astro",
|
|
92
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"ul\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n class={cn(\"gap-1 flex w-full min-w-0 flex-col\", className)}\n {...props}\n>\n <slot />\n</ul>\n",
|
|
93
|
-
"type": "registry:ui"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"path": "src/components/ui/sidebar/sidebar-menu-button.astro",
|
|
97
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\"\n\n// Keep Props above the cva() call. Astro's compiler does not find Props when a\n// Tailwind child selector string comes first, and then leaves the props untyped.\ntype TooltipValue =\n | string\n | (HTMLAttributes<\"div\"> & {\n content?: string\n children?: string\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n })\n\ntype Props = VariantProps<typeof variants> &\n HTMLAttributes<\"button\"> &\n HTMLAttributes<\"a\"> &\n HTMLAttributes<\"div\"> &\n HTMLAttributes<\"span\"> & {\n as?: \"a\" | \"button\" | \"div\" | \"span\"\n href?: string\n isActive?: boolean\n active?: boolean\n tooltip?: TooltipValue\n }\n\nconst variants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button group/menu-button flex w-full items-center overflow-hidden outline-hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst {\n as: explicitTag,\n class: className,\n variant = \"default\",\n size = \"default\",\n isActive,\n active = false,\n tooltip,\n type,\n ...props\n} = Astro.props\n\nconst Tag = explicitTag || (\"href\" in Astro.props ? \"a\" : \"button\")\nconst resolvedActive = isActive ?? active\nconst baseClassName = cn(variants({ variant, size }), className)\nconst resolvedTooltip =\n typeof tooltip === \"string\" ? { children: tooltip } : tooltip\nconst tooltipText =\n resolvedTooltip?.content ??\n (typeof resolvedTooltip?.children === \"string\"\n ? resolvedTooltip.children\n : undefined)\nconst {\n content: _tooltipContent,\n children: _tooltipChildren,\n ...tooltipProps\n} = resolvedTooltip ?? {}\n---\n\n{tooltipText ? (\n <Tooltip>\n <TooltipTrigger\n as={Tag}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={resolvedActive ? \"true\" : undefined}\n aria-current={resolvedActive ? \"page\" : undefined}\n type={Tag === \"button\" ? type || \"button\" : undefined}\n class={baseClassName}\n {...props}\n >\n <slot />\n </TooltipTrigger>\n <TooltipContent\n data-sidebar=\"menu-tooltip\"\n side=\"right\"\n align=\"center\"\n hidden\n {...tooltipProps}\n >\n {tooltipText}\n </TooltipContent>\n </Tooltip>\n) : (\n <Tag\n data-slot=\"sidebar-menu-button\"\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={resolvedActive ? \"true\" : undefined}\n aria-current={resolvedActive ? \"page\" : undefined}\n type={Tag === \"button\" ? type || \"button\" : undefined}\n class={baseClassName}\n {...props}\n >\n <slot />\n </Tag>\n)}\n",
|
|
98
|
-
"type": "registry:ui"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"path": "src/components/ui/sidebar/sidebar-menu-item.astro",
|
|
102
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"li\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n class={cn(\"group/menu-item relative\", className)}\n {...props}\n>\n <slot />\n</li>\n",
|
|
103
|
-
"type": "registry:ui"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"path": "src/components/ui/sidebar/sidebar-menu-action.astro",
|
|
107
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> &\n HTMLAttributes<\"a\"> &\n HTMLAttributes<\"div\"> &\n HTMLAttributes<\"span\"> & {\n as?: \"button\" | \"a\" | \"div\" | \"span\"\n href?: string\n showOnHover?: boolean\n }\n\nconst {\n as: explicitTag,\n class: className,\n showOnHover = false,\n type,\n ...props\n} = Astro.props\n\nconst Tag = explicitTag || (\"href\" in Astro.props ? \"a\" : \"button\")\nconst resolvedType = Tag === \"button\" ? type || \"button\" : undefined\n---\n\n<Tag\n data-slot=\"sidebar-menu-action\"\n data-sidebar=\"menu-action\"\n type={resolvedType}\n class={cn(\n \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 aspect-square w-5 rounded-md p-0 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 focus-visible:ring-2 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n>\n <slot />\n</Tag>\n",
|
|
108
|
-
"type": "registry:ui"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"path": "src/components/ui/sidebar/sidebar-menu-badge.astro",
|
|
112
|
-
"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=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n class={cn(\n \"text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 rounded-md px-1 text-xs font-medium peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 items-center justify-center tabular-nums select-none group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
113
|
-
"type": "registry:ui"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"path": "src/components/ui/sidebar/sidebar-menu-skeleton.astro",
|
|
117
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Skeleton } from \"@/components/ui/skeleton\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n showIcon?: boolean\n}\n\nconst { class: className, showIcon = false, ...props } = Astro.props\nconst width = `${Math.floor(Math.random() * 40) + 50}%`\n---\n\n<div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n class={cn(\"h-8 gap-2 rounded-md px-2 flex items-center\", className)}\n {...props}\n>\n {showIcon && (\n <Skeleton\n class=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n class=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={`--skeleton-width: ${width};`}\n />\n</div>\n",
|
|
118
|
-
"type": "registry:ui"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"path": "src/components/ui/sidebar/sidebar-menu-sub.astro",
|
|
122
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"ul\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n class={cn(\"border-sidebar-border mx-3.5 translate-x-px gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col\", className)}\n {...props}\n>\n <slot />\n</ul>\n",
|
|
123
|
-
"type": "registry:ui"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"path": "src/components/ui/sidebar/sidebar-menu-sub-button.astro",
|
|
127
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n// Keep Props above the cva() call. Astro's compiler does not find Props when a\n// Tailwind child selector string comes first, and then leaves the props untyped.\ntype Props = VariantProps<typeof variants> &\n HTMLAttributes<\"button\"> &\n HTMLAttributes<\"a\"> &\n HTMLAttributes<\"span\"> & {\n as?: \"a\" | \"button\" | \"span\"\n href?: string\n isActive?: boolean\n active?: boolean\n }\n\nconst variants = cva(\n \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n {\n variants: {\n size: {\n sm: \"text-xs\",\n md: \"text-sm\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n)\n\nconst {\n as: explicitTag,\n class: className,\n size = \"md\",\n isActive,\n active = false,\n type,\n ...props\n} = Astro.props\n\nconst Tag = explicitTag || \"a\"\nconst resolvedActive = isActive ?? active\n---\n\n<Tag\n data-slot=\"sidebar-menu-sub-button\"\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={resolvedActive ? \"true\" : undefined}\n aria-current={resolvedActive ? \"page\" : undefined}\n type={Tag === \"button\" ? type || \"button\" : undefined}\n class={cn(variants({ size }), className)}\n {...props}\n>\n <slot />\n</Tag>\n",
|
|
128
|
-
"type": "registry:ui"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"path": "src/components/ui/sidebar/sidebar-menu-sub-item.astro",
|
|
132
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"li\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n class={cn(\"group/menu-sub-item relative\", className)}\n {...props}\n>\n <slot />\n</li>\n",
|
|
133
|
-
"type": "registry:ui"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"path": "src/components/ui/sidebar/index.ts",
|
|
137
|
-
"content": "export { default as SidebarProvider } from \"./sidebar-provider.astro\"\nexport { default as Sidebar } from \"./sidebar.astro\"\nexport { default as SidebarTrigger } from \"./sidebar-trigger.astro\"\nexport { default as SidebarRail } from \"./sidebar-rail.astro\"\nexport { default as SidebarInset } from \"./sidebar-inset.astro\"\nexport { default as SidebarInput } from \"./sidebar-input.astro\"\nexport { default as SidebarHeader } from \"./sidebar-header.astro\"\nexport { default as SidebarFooter } from \"./sidebar-footer.astro\"\nexport { default as SidebarSeparator } from \"./sidebar-separator.astro\"\nexport { default as SidebarContent } from \"./sidebar-content.astro\"\nexport { default as SidebarGroup } from \"./sidebar-group.astro\"\nexport { default as SidebarGroupLabel } from \"./sidebar-group-label.astro\"\nexport { default as SidebarGroupAction } from \"./sidebar-group-action.astro\"\nexport { default as SidebarGroupContent } from \"./sidebar-group-content.astro\"\nexport { default as SidebarMenu } from \"./sidebar-menu.astro\"\nexport { default as SidebarMenuItem } from \"./sidebar-menu-item.astro\"\nexport { default as SidebarMenuButton } from \"./sidebar-menu-button.astro\"\nexport { default as SidebarMenuAction } from \"./sidebar-menu-action.astro\"\nexport { default as SidebarMenuBadge } from \"./sidebar-menu-badge.astro\"\nexport { default as SidebarMenuSkeleton } from \"./sidebar-menu-skeleton.astro\"\nexport { default as SidebarMenuSub } from \"./sidebar-menu-sub.astro\"\nexport { default as SidebarMenuSubButton } from \"./sidebar-menu-sub-button.astro\"\nexport { default as SidebarMenuSubItem } from \"./sidebar-menu-sub-item.astro\"\n",
|
|
138
|
-
"type": "registry:ui"
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
"docs": "https://ui.full.dev/components/sidebar/",
|
|
142
|
-
"categories": [
|
|
143
|
-
"ui"
|
|
144
|
-
],
|
|
145
|
-
"type": "registry:ui"
|
|
146
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "skeleton-examples",
|
|
4
|
-
"title": "Skeleton examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Skeleton docs.",
|
|
6
|
-
"registryDependencies": [
|
|
7
|
-
"@fulldev/card",
|
|
8
|
-
"@fulldev/skeleton"
|
|
9
|
-
],
|
|
10
|
-
"files": [
|
|
11
|
-
{
|
|
12
|
-
"path": "src/components/examples/skeleton/skeleton-avatar.astro",
|
|
13
|
-
"content": "---\nimport { Skeleton } from \"@/components/ui/skeleton\"\n---\n\n<div class=\"flex w-fit items-center gap-4\">\n <Skeleton class=\"size-10 shrink-0 rounded-full\" />\n <div class=\"grid gap-2\">\n <Skeleton class=\"h-4 w-[150px]\" />\n <Skeleton class=\"h-4 w-[100px]\" />\n </div>\n</div>\n",
|
|
14
|
-
"type": "registry:component"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"path": "src/components/examples/skeleton/skeleton-card.astro",
|
|
18
|
-
"content": "---\nimport { Card, CardContent, CardHeader } from \"@/components/ui/card\"\nimport { Skeleton } from \"@/components/ui/skeleton\"\n---\n\n<Card class=\"w-full max-w-xs\">\n <CardHeader>\n <Skeleton class=\"h-4 w-2/3\" />\n <Skeleton class=\"h-4 w-1/2\" />\n </CardHeader>\n <CardContent>\n <Skeleton class=\"aspect-video w-full\" />\n </CardContent>\n</Card>\n",
|
|
19
|
-
"type": "registry:component"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"path": "src/components/examples/skeleton/skeleton-demo.astro",
|
|
23
|
-
"content": "---\nimport { Skeleton } from \"@/components/ui/skeleton\"\n---\n\n<div class=\"flex items-center gap-4\">\n <Skeleton class=\"h-12 w-12 rounded-full\" />\n <div class=\"space-y-2\">\n <Skeleton class=\"h-4 w-[250px]\" />\n <Skeleton class=\"h-4 w-[200px]\" />\n </div>\n</div>\n",
|
|
24
|
-
"type": "registry:component"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"path": "src/components/examples/skeleton/skeleton-form.astro",
|
|
28
|
-
"content": "---\nimport { Skeleton } from \"@/components/ui/skeleton\"\n---\n\n<div class=\"flex w-full max-w-xs flex-col gap-7\">\n <div class=\"flex flex-col gap-3\">\n <Skeleton class=\"h-4 w-20\" />\n <Skeleton class=\"h-8 w-full\" />\n </div>\n <div class=\"flex flex-col gap-3\">\n <Skeleton class=\"h-4 w-24\" />\n <Skeleton class=\"h-8 w-full\" />\n </div>\n <Skeleton class=\"h-8 w-24\" />\n</div>\n",
|
|
29
|
-
"type": "registry:component"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"path": "src/components/examples/skeleton/skeleton-rtl.astro",
|
|
33
|
-
"content": "---\nimport { Skeleton } from \"@/components/ui/skeleton\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {},\n },\n ar: {\n dir: \"rtl\",\n values: {},\n },\n he: {\n dir: \"rtl\",\n values: {},\n },\n} as const\n\nconst { dir } = translations.ar\n---\n\n<div class=\"flex items-center gap-4\" dir={dir}>\n <Skeleton class=\"h-12 w-12 rounded-full\" />\n <div class=\"space-y-2\">\n <Skeleton class=\"h-4 w-[250px]\" />\n <Skeleton class=\"h-4 w-[200px]\" />\n </div>\n</div>\n",
|
|
34
|
-
"type": "registry:component"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"path": "src/components/examples/skeleton/skeleton-table.astro",
|
|
38
|
-
"content": "---\nimport { Skeleton } from \"@/components/ui/skeleton\"\n---\n\n<div class=\"flex w-full max-w-sm flex-col gap-2\">\n {Array.from({ length: 5 }).map(() => (\n <div class=\"flex gap-4\">\n <Skeleton class=\"h-4 flex-1\" />\n <Skeleton class=\"h-4 w-24\" />\n <Skeleton class=\"h-4 w-20\" />\n </div>\n ))}\n</div>\n",
|
|
39
|
-
"type": "registry:component"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"path": "src/components/examples/skeleton/skeleton-text.astro",
|
|
43
|
-
"content": "---\nimport { Skeleton } from \"@/components/ui/skeleton\"\n---\n\n<div class=\"flex w-full max-w-xs flex-col gap-2\">\n <Skeleton class=\"h-4 w-full\" />\n <Skeleton class=\"h-4 w-full\" />\n <Skeleton class=\"h-4 w-3/4\" />\n</div>\n",
|
|
44
|
-
"type": "registry:component"
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"docs": "https://ui.full.dev/components/skeleton/",
|
|
48
|
-
"type": "registry:example"
|
|
49
|
-
}
|
package/public/r/skeleton.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "skeleton",
|
|
4
|
-
"title": "Skeleton",
|
|
5
|
-
"description": "Use a skeleton as a placeholder while content is loading.",
|
|
6
|
-
"files": [
|
|
7
|
-
{
|
|
8
|
-
"path": "src/components/ui/skeleton/skeleton.astro",
|
|
9
|
-
"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=\"skeleton\"\n class={cn(\"bg-muted rounded-md animate-pulse\", className)}\n {...props}\n></div>\n",
|
|
10
|
-
"type": "registry:ui"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"path": "src/components/ui/skeleton/index.ts",
|
|
14
|
-
"content": "export { default as Skeleton } from \"./skeleton.astro\"\n",
|
|
15
|
-
"type": "registry:ui"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"docs": "https://ui.full.dev/components/skeleton/",
|
|
19
|
-
"categories": [
|
|
20
|
-
"ui"
|
|
21
|
-
],
|
|
22
|
-
"type": "registry:ui"
|
|
23
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "slider-examples",
|
|
4
|
-
"title": "Slider examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Slider docs.",
|
|
6
|
-
"registryDependencies": [
|
|
7
|
-
"@fulldev/label",
|
|
8
|
-
"@fulldev/slider"
|
|
9
|
-
],
|
|
10
|
-
"files": [
|
|
11
|
-
{
|
|
12
|
-
"path": "src/components/examples/slider/slider-controlled.astro",
|
|
13
|
-
"content": "---\nimport { Label } from \"@/components/ui/label\"\nimport { Slider } from \"@/components/ui/slider\"\n\nconst value = [0.3, 0.7]\n---\n\n<div class=\"mx-auto grid w-full max-w-xs gap-3\" data-slider-controlled>\n <div class=\"flex items-center justify-between gap-2\">\n <Label data-slider-label>Temperature</Label>\n <span class=\"text-sm text-muted-foreground\" data-slider-value>\n {value.join(\", \")}\n </span>\n </div>\n <Slider defaultValue={[value[0], value[1]]} min={0} max={1} step={0.1} />\n</div>\n\n<script>\n const initialize = () => {\n for (const root of document.querySelectorAll(\"[data-slider-controlled]\")) {\n if (root.hasAttribute(\"data-bound\")) continue\n root.setAttribute(\"data-bound\", \"\")\n // Name each thumb after the visible label: the thumbs are the\n // focusable sliders, not the root.\n const name = root\n .querySelector(\"[data-slider-label]\")\n ?.textContent?.trim()\n const thumbs = root.querySelectorAll('[data-slot=\"slider-thumb\"]')\n thumbs.forEach((thumb, index) =>\n thumb.setAttribute(\n \"aria-label\",\n thumbs.length > 1\n ? `${name} ${index === 0 ? \"minimum\" : \"maximum\"}`\n : `${name}`\n )\n )\n const output = root.querySelector(\"[data-slider-value]\")\n root\n .querySelector('[data-slot=\"slider\"]')\n ?.addEventListener(\"slider:change\", (event) => {\n const { value } = (event as CustomEvent<{ value: number | number[] }>)\n .detail\n if (output) output.textContent = [value].flat().join(\", \")\n })\n }\n }\n\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n</script>\n",
|
|
14
|
-
"type": "registry:component"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"path": "src/components/examples/slider/slider-demo.astro",
|
|
18
|
-
"content": "---\nimport { Slider } from \"@/components/ui/slider\"\n---\n\n<Slider defaultValue={75} max={100} step={1} class=\"mx-auto w-full max-w-xs\" />\n",
|
|
19
|
-
"type": "registry:component"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"path": "src/components/examples/slider/slider-disabled.astro",
|
|
23
|
-
"content": "---\nimport { Slider } from \"@/components/ui/slider\"\n---\n\n<Slider\n defaultValue={50}\n max={100}\n step={1}\n disabled\n class=\"mx-auto w-full max-w-xs\"\n/>\n",
|
|
24
|
-
"type": "registry:component"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"path": "src/components/examples/slider/slider-range.astro",
|
|
28
|
-
"content": "---\nimport { Slider } from \"@/components/ui/slider\"\n---\n\n<Slider\n defaultValue={[25, 50]}\n max={100}\n step={5}\n class=\"mx-auto w-full max-w-xs\"\n/>\n",
|
|
29
|
-
"type": "registry:component"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"path": "src/components/examples/slider/slider-rtl.astro",
|
|
33
|
-
"content": "---\nimport { Slider } from \"@/components/ui/slider\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {},\n },\n ar: {\n dir: \"rtl\",\n values: {},\n },\n he: {\n dir: \"rtl\",\n values: {},\n },\n} as const\n\nconst { dir } = translations.ar\n---\n\n<Slider\n defaultValue={75}\n max={100}\n step={1}\n class=\"mx-auto w-full max-w-xs\"\n dir={dir}\n/>\n",
|
|
34
|
-
"type": "registry:component"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"path": "src/components/examples/slider/slider-vertical.astro",
|
|
38
|
-
"content": "---\nimport { Slider } from \"@/components/ui/slider\"\n---\n\n<div class=\"mx-auto flex w-full max-w-xs items-center justify-center gap-6\">\n <Slider\n defaultValue={50}\n max={100}\n step={1}\n orientation=\"vertical\"\n class=\"h-40\"\n />\n <Slider\n defaultValue={25}\n max={100}\n step={1}\n orientation=\"vertical\"\n class=\"h-40\"\n />\n</div>\n",
|
|
39
|
-
"type": "registry:component"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"docs": "https://ui.full.dev/components/slider/",
|
|
43
|
-
"type": "registry:example"
|
|
44
|
-
}
|
package/public/r/slider.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "slider",
|
|
4
|
-
"title": "Slider",
|
|
5
|
-
"description": "An input where the user selects a value from within a given range.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@data-slot/slider@^1.1.2"
|
|
8
|
-
],
|
|
9
|
-
"files": [
|
|
10
|
-
{
|
|
11
|
-
"path": "src/components/ui/slider/slider.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n<div\n data-slot=\"slider\"\n data-default-value={serializedDefaultValue}\n data-min={min}\n data-max={max}\n data-step={step}\n data-large-step={largeStep}\n data-orientation={orientation}\n {...orientationAttributes}\n data-thumb-alignment={thumbAlignment}\n data-disabled={disabled ? \"true\" : undefined}\n class={cn(\"data-horizontal:w-full data-vertical:h-full\", className)}\n {...props}\n>\n <div\n data-slot=\"slider-control\"\n data-orientation={orientation}\n {...orientationAttributes}\n data-disabled={disabled ? \"true\" : undefined}\n class=\"data-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:w-auto data-vertical:flex-col\"\n >\n <div\n data-slot=\"slider-track\"\n {...orientationAttributes}\n class=\"bg-muted rounded-full data-horizontal:h-1.5 data-horizontal:w-full data-vertical:h-full data-vertical:w-1.5 relative grow overflow-hidden select-none\"\n >\n <div\n data-slot=\"slider-range\"\n {...orientationAttributes}\n class=\"bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n ></div>\n </div>\n {Array.from({ length: thumbCount }).map(() => (\n <div\n data-slot=\"slider-thumb\"\n class=\"border-primary ring-ring/50 size-4 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden block shrink-0 select-none data-disabled:pointer-events-none data-disabled:opacity-50\"\n />\n ))}\n </div>\n</div>\n\n<script>\n import { create } from \"@data-slot/slider\"\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/slider/index.ts",
|
|
17
|
-
"content": "export { default as Slider } from \"./slider.astro\"\n",
|
|
18
|
-
"type": "registry:ui"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"docs": "https://ui.full.dev/components/slider/",
|
|
22
|
-
"categories": [
|
|
23
|
-
"ui"
|
|
24
|
-
],
|
|
25
|
-
"type": "registry:ui"
|
|
26
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "spinner-examples",
|
|
4
|
-
"title": "Spinner examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Spinner docs.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@lucide/astro"
|
|
8
|
-
],
|
|
9
|
-
"registryDependencies": [
|
|
10
|
-
"@fulldev/badge",
|
|
11
|
-
"@fulldev/button",
|
|
12
|
-
"@fulldev/empty",
|
|
13
|
-
"@fulldev/input-group",
|
|
14
|
-
"@fulldev/item",
|
|
15
|
-
"@fulldev/spinner"
|
|
16
|
-
],
|
|
17
|
-
"files": [
|
|
18
|
-
{
|
|
19
|
-
"path": "src/components/examples/spinner/spinner-badge.astro",
|
|
20
|
-
"content": "---\nimport { Badge } from \"@/components/ui/badge\"\nimport { Spinner } from \"@/components/ui/spinner\"\n---\n\n<div class=\"flex items-center gap-4 [--radius:1.2rem]\">\n <Badge>\n <Spinner data-icon=\"inline-start\" />\n Syncing\n </Badge>\n <Badge variant=\"secondary\">\n <Spinner data-icon=\"inline-start\" />\n Updating\n </Badge>\n <Badge variant=\"outline\">\n <Spinner data-icon=\"inline-start\" />\n Processing\n </Badge>\n</div>\n",
|
|
21
|
-
"type": "registry:component"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"path": "src/components/examples/spinner/spinner-button.astro",
|
|
25
|
-
"content": "---\nimport { Button } from \"@/components/ui/button\"\nimport { Spinner } from \"@/components/ui/spinner\"\n---\n\n<div class=\"flex flex-col items-center gap-4\">\n <Button disabled size=\"sm\">\n <Spinner data-icon=\"inline-start\" />\n Loading...\n </Button>\n <Button variant=\"outline\" disabled size=\"sm\">\n <Spinner data-icon=\"inline-start\" />\n Please wait\n </Button>\n <Button variant=\"secondary\" disabled size=\"sm\">\n <Spinner data-icon=\"inline-start\" />\n Processing\n </Button>\n</div>\n",
|
|
26
|
-
"type": "registry:component"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"path": "src/components/examples/spinner/spinner-custom.astro",
|
|
30
|
-
"content": "---\nimport LoaderIcon from \"@lucide/astro/icons/loader\"\n---\n\n<div class=\"flex items-center gap-4\">\n <LoaderIcon role=\"status\" aria-label=\"Loading\" class=\"size-4 animate-spin\" />\n</div>\n",
|
|
31
|
-
"type": "registry:component"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"path": "src/components/examples/spinner/spinner-demo.astro",
|
|
35
|
-
"content": "---\nimport { Item, ItemContent, ItemMedia, ItemTitle } from \"@/components/ui/item\"\nimport { Spinner } from \"@/components/ui/spinner\"\n---\n\n<div class=\"flex w-full max-w-xs flex-col gap-4 [--radius:1rem]\">\n <Item variant=\"muted\">\n <ItemMedia>\n <Spinner />\n </ItemMedia>\n <ItemContent>\n <ItemTitle class=\"line-clamp-1\">Processing payment...</ItemTitle>\n </ItemContent>\n <ItemContent class=\"flex-none justify-end\">\n <span class=\"text-sm tabular-nums\">$100.00</span>\n </ItemContent>\n </Item>\n</div>\n",
|
|
36
|
-
"type": "registry:component"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"path": "src/components/examples/spinner/spinner-empty.astro",
|
|
40
|
-
"content": "---\nimport { Button } from \"@/components/ui/button\"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from \"@/components/ui/empty\"\nimport { Spinner } from \"@/components/ui/spinner\"\n---\n\n<Empty class=\"w-full\">\n <EmptyHeader>\n <EmptyMedia variant=\"icon\">\n <Spinner />\n </EmptyMedia>\n <EmptyTitle>Processing your request</EmptyTitle>\n <EmptyDescription>\n Please wait while we process your request. Do not refresh the page.\n </EmptyDescription>\n </EmptyHeader>\n <EmptyContent>\n <Button variant=\"outline\" size=\"sm\">\n Cancel\n </Button>\n </EmptyContent>\n</Empty>\n",
|
|
41
|
-
"type": "registry:component"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"path": "src/components/examples/spinner/spinner-input-group.astro",
|
|
45
|
-
"content": "---\nimport ArrowUpIcon from \"@lucide/astro/icons/arrow-up\"\n\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n InputGroupTextarea,\n} from \"@/components/ui/input-group\"\nimport { Spinner } from \"@/components/ui/spinner\"\n---\n\n<div class=\"flex w-full max-w-md flex-col gap-4\">\n <InputGroup>\n <InputGroupInput placeholder=\"Send a message...\" disabled />\n <InputGroupAddon align=\"inline-end\">\n <Spinner />\n </InputGroupAddon>\n </InputGroup>\n <InputGroup>\n <InputGroupTextarea placeholder=\"Send a message...\" disabled />\n <InputGroupAddon align=\"block-end\">\n <Spinner /> Validating...\n <InputGroupButton class=\"ml-auto\" variant=\"default\">\n <ArrowUpIcon />\n <span class=\"sr-only\">Send</span>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n</div>\n",
|
|
46
|
-
"type": "registry:component"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"path": "src/components/examples/spinner/spinner-rtl.astro",
|
|
50
|
-
"content": "---\nimport { Item, ItemContent, ItemMedia, ItemTitle } from \"@/components/ui/item\"\nimport { Spinner } from \"@/components/ui/spinner\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {\n title: \"Processing payment...\",\n amount: \"$100.00\",\n },\n },\n ar: {\n dir: \"rtl\",\n values: {\n title: \"جاري معالجة الدفع...\",\n amount: \"١٠٠.٠٠ دولار\",\n },\n },\n he: {\n dir: \"rtl\",\n values: {\n title: \"מעבד תשלום...\",\n amount: \"$100.00\",\n },\n },\n} as const\n\nconst { dir, values: t } = translations.ar\n---\n\n<div class=\"flex w-full max-w-xs flex-col gap-4 [--radius:1rem]\" dir={dir}>\n <Item variant=\"muted\" dir={dir}>\n <ItemMedia>\n <Spinner />\n </ItemMedia>\n <ItemContent>\n <ItemTitle class=\"line-clamp-1\">{t.title}</ItemTitle>\n </ItemContent>\n <ItemContent class=\"flex-none justify-end\">\n <span class=\"text-sm tabular-nums\">{t.amount}</span>\n </ItemContent>\n </Item>\n</div>\n",
|
|
51
|
-
"type": "registry:component"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"path": "src/components/examples/spinner/spinner-size.astro",
|
|
55
|
-
"content": "---\nimport { Spinner } from \"@/components/ui/spinner\"\n---\n\n<div class=\"flex items-center gap-6\">\n <Spinner class=\"size-3\" />\n <Spinner class=\"size-4\" />\n <Spinner class=\"size-6\" />\n <Spinner class=\"size-8\" />\n</div>\n",
|
|
56
|
-
"type": "registry:component"
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
"docs": "https://ui.full.dev/components/spinner/",
|
|
60
|
-
"type": "registry:example"
|
|
61
|
-
}
|
package/public/r/spinner.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "spinner",
|
|
4
|
-
"title": "Spinner",
|
|
5
|
-
"description": "An animated loading indicator.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@lucide/astro"
|
|
8
|
-
],
|
|
9
|
-
"files": [
|
|
10
|
-
{
|
|
11
|
-
"path": "src/components/ui/spinner/spinner.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport LoaderCircle from \"@lucide/astro/icons/loader-circle\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"svg\"> & {\n color?: string\n size?: number | string\n \"stroke-width\"?: number | string\n absoluteStrokeWidth?: boolean\n title?: string\n}\n\nconst { class: className, ...props } = Astro.props\n---\n\n<LoaderCircle\n data-slot=\"spinner\"\n role=\"status\"\n aria-label=\"Loading\"\n class={cn(\"size-4 animate-spin\", className)}\n {...props}\n/>\n",
|
|
13
|
-
"type": "registry:ui"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"path": "src/components/ui/spinner/index.ts",
|
|
17
|
-
"content": "export { default as Spinner } from \"./spinner.astro\"\n",
|
|
18
|
-
"type": "registry:ui"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"docs": "https://ui.full.dev/components/spinner/",
|
|
22
|
-
"categories": [
|
|
23
|
-
"ui"
|
|
24
|
-
],
|
|
25
|
-
"type": "registry:ui"
|
|
26
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "switch-examples",
|
|
4
|
-
"title": "Switch examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Switch docs.",
|
|
6
|
-
"registryDependencies": [
|
|
7
|
-
"@fulldev/field",
|
|
8
|
-
"@fulldev/label",
|
|
9
|
-
"@fulldev/switch"
|
|
10
|
-
],
|
|
11
|
-
"files": [
|
|
12
|
-
{
|
|
13
|
-
"path": "src/components/examples/switch/switch-choice-card.astro",
|
|
14
|
-
"content": "---\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldTitle,\n} from \"@/components/ui/field\"\nimport { Switch } from \"@/components/ui/switch\"\n---\n\n<FieldGroup class=\"w-full max-w-sm\">\n <FieldLabel>\n <Field as=\"span\" orientation=\"horizontal\">\n <FieldContent as=\"span\">\n <FieldTitle as=\"span\">Share across devices</FieldTitle>\n <FieldDescription as=\"span\">\n Focus is shared across devices, and turns off when you leave the app.\n </FieldDescription>\n </FieldContent>\n <Switch id=\"switch-share\" />\n </Field>\n </FieldLabel>\n <FieldLabel>\n <Field as=\"span\" orientation=\"horizontal\">\n <FieldContent as=\"span\">\n <FieldTitle as=\"span\">Enable notifications</FieldTitle>\n <FieldDescription as=\"span\">\n Receive notifications when focus mode is enabled or disabled.\n </FieldDescription>\n </FieldContent>\n <Switch id=\"switch-notifications\" defaultChecked />\n </Field>\n </FieldLabel>\n</FieldGroup>\n",
|
|
15
|
-
"type": "registry:component"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"path": "src/components/examples/switch/switch-demo.astro",
|
|
19
|
-
"content": "---\nimport { Label } from \"@/components/ui/label\"\nimport { Switch } from \"@/components/ui/switch\"\n---\n\n<div class=\"flex items-center space-x-2\">\n <Switch id=\"airplane-mode\" />\n <Label for=\"airplane-mode\">Airplane Mode</Label>\n</div>\n",
|
|
20
|
-
"type": "registry:component"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"path": "src/components/examples/switch/switch-description.astro",
|
|
24
|
-
"content": "---\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n} from \"@/components/ui/field\"\nimport { Switch } from \"@/components/ui/switch\"\n---\n\n<Field orientation=\"horizontal\" class=\"max-w-sm\">\n <FieldContent>\n <FieldLabel for=\"switch-focus-mode\">Share across devices</FieldLabel>\n <FieldDescription>\n Focus is shared across devices, and turns off when you leave the app.\n </FieldDescription>\n </FieldContent>\n <Switch id=\"switch-focus-mode\" />\n</Field>\n",
|
|
25
|
-
"type": "registry:component"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"path": "src/components/examples/switch/switch-disabled.astro",
|
|
29
|
-
"content": "---\nimport { Field, FieldLabel } from \"@/components/ui/field\"\nimport { Switch } from \"@/components/ui/switch\"\n---\n\n<Field orientation=\"horizontal\" data-disabled class=\"w-fit\">\n <Switch id=\"switch-disabled-unchecked\" disabled />\n <FieldLabel for=\"switch-disabled-unchecked\">Disabled</FieldLabel>\n</Field>\n",
|
|
30
|
-
"type": "registry:component"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"path": "src/components/examples/switch/switch-invalid.astro",
|
|
34
|
-
"content": "---\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n} from \"@/components/ui/field\"\nimport { Switch } from \"@/components/ui/switch\"\n---\n\n<Field orientation=\"horizontal\" class=\"max-w-sm\" data-invalid>\n <FieldContent>\n <FieldLabel for=\"switch-terms\">Accept terms and conditions</FieldLabel>\n <FieldDescription>\n You must accept the terms and conditions to continue.\n </FieldDescription>\n </FieldContent>\n <Switch id=\"switch-terms\" aria-invalid=\"true\" />\n</Field>\n",
|
|
35
|
-
"type": "registry:component"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"path": "src/components/examples/switch/switch-rtl.astro",
|
|
39
|
-
"content": "---\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n} from \"@/components/ui/field\"\nimport { Switch } from \"@/components/ui/switch\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {\n label: \"Share across devices\",\n description:\n \"Focus is shared across devices, and turns off when you leave the app.\",\n },\n },\n ar: {\n dir: \"rtl\",\n values: {\n label: \"المشاركة عبر الأجهزة\",\n description:\n \"يتم مشاركة التركيز عبر الأجهزة، ويتم إيقاف تشغيله عند مغادرة التطبيق.\",\n },\n },\n he: {\n dir: \"rtl\",\n values: {\n label: \"שיתוף בין מכשירים\",\n description: \"המיקוד משותף בין מכשירים, וכבה כשאתה עוזב את האפליקציה.\",\n },\n },\n} as const\n\nconst { dir, values: t } = translations.ar\n---\n\n<Field orientation=\"horizontal\" class=\"max-w-sm\" dir={dir}>\n <FieldContent>\n <FieldLabel for=\"switch-focus-mode-rtl\" dir={dir}>\n {t.label}\n </FieldLabel>\n <FieldDescription dir={dir}>{t.description}</FieldDescription>\n </FieldContent>\n <Switch id=\"switch-focus-mode-rtl\" dir={dir} />\n</Field>\n",
|
|
40
|
-
"type": "registry:component"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"path": "src/components/examples/switch/switch-sizes.astro",
|
|
44
|
-
"content": "---\nimport { Field, FieldGroup, FieldLabel } from \"@/components/ui/field\"\nimport { Switch } from \"@/components/ui/switch\"\n---\n\n<FieldGroup class=\"w-full max-w-[10rem]\">\n <Field orientation=\"horizontal\">\n <Switch id=\"switch-size-sm\" size=\"sm\" />\n <FieldLabel for=\"switch-size-sm\">Small</FieldLabel>\n </Field>\n <Field orientation=\"horizontal\">\n <Switch id=\"switch-size-default\" size=\"default\" />\n <FieldLabel for=\"switch-size-default\">Default</FieldLabel>\n </Field>\n</FieldGroup>\n",
|
|
45
|
-
"type": "registry:component"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"docs": "https://ui.full.dev/components/switch/",
|
|
49
|
-
"type": "registry:example"
|
|
50
|
-
}
|
package/public/r/switch.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "switch",
|
|
4
|
-
"title": "Switch",
|
|
5
|
-
"description": "A control that switches a setting on or off.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@data-slot/switch@^1.1.2"
|
|
8
|
-
],
|
|
9
|
-
"files": [
|
|
10
|
-
{
|
|
11
|
-
"path": "src/components/ui/switch/switch.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n<button\n type=\"button\"\n role=\"switch\"\n disabled={disabled}\n aria-checked={initialChecked ? \"true\" : \"false\"}\n aria-disabled={disabled ? \"true\" : undefined}\n aria-readonly={readOnly ? \"true\" : undefined}\n aria-required={required ? \"true\" : undefined}\n data-slot=\"switch\"\n data-size={size}\n data-checked={initialChecked ? \"\" : undefined}\n data-unchecked={initialChecked ? undefined : \"\"}\n data-default-checked={defaultChecked}\n data-disabled={disabled ? \"true\" : undefined}\n data-read-only={readOnly}\n data-readonly={readOnly ? \"\" : undefined}\n data-required={required}\n data-name={name}\n data-value={value}\n data-unchecked-value={uncheckedValue}\n class={cn(switchStyle, className)}\n {...props}\n>\n <span\n aria-hidden=\"true\"\n data-slot=\"switch-thumb\"\n data-checked={initialChecked ? \"\" : undefined}\n data-unchecked={initialChecked ? undefined : \"\"}\n class=\"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform\"\n ></span>\n</button>\n\n<script>\n import { create } from \"@data-slot/switch\"\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/switch/index.ts",
|
|
17
|
-
"content": "export { default as Switch } from \"./switch.astro\"\n",
|
|
18
|
-
"type": "registry:ui"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"docs": "https://ui.full.dev/components/switch/",
|
|
22
|
-
"categories": [
|
|
23
|
-
"ui"
|
|
24
|
-
],
|
|
25
|
-
"type": "registry:ui"
|
|
26
|
-
}
|