fulldev-ui 0.11.1 → 0.13.0
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 +35 -0
- package/package.json +29 -21
- package/public/r/accordion.json +2 -2
- package/public/r/alert-dialog.json +2 -2
- package/public/r/aspect-ratio.json +23 -0
- package/public/r/attachment.json +66 -0
- package/public/r/banner.json +0 -4
- package/public/r/blocks-1.json +1 -1
- package/public/r/button-group.json +41 -0
- package/public/r/button.json +1 -1
- package/public/r/carousel.json +8 -8
- package/public/r/collapsible.json +2 -2
- package/public/r/combobox.json +6 -5
- package/public/r/command.json +5 -4
- package/public/r/components.json +8 -0
- package/public/r/dialog.json +2 -2
- package/public/r/doc-1.json +1 -1
- package/public/r/drawer.json +109 -0
- package/public/r/dropdown-menu.json +4 -4
- package/public/r/hover-card.json +4 -4
- package/public/r/init.json +1 -1
- package/public/r/input-group.json +0 -1
- package/public/r/layout.json +3 -0
- package/public/r/navigation-menu.json +3 -3
- package/public/r/pagination.json +59 -0
- package/public/r/popover.json +3 -3
- package/public/r/radio-group.json +2 -2
- package/public/r/registry.json +418 -28
- package/public/r/resizable.json +36 -0
- package/public/r/reviews-3.json +1 -1
- package/public/r/select.json +3 -3
- package/public/r/sheet.json +2 -2
- package/public/r/sidebar-1.json +1 -1
- package/public/r/sidebar.json +1 -1
- package/public/r/slider.json +2 -2
- package/public/r/switch.json +2 -2
- package/public/r/tabs.json +4 -4
- package/public/r/toast.json +80 -0
- package/public/r/toggle-group.json +34 -0
- package/public/r/toggle.json +2 -2
- package/public/r/tooltip.json +3 -3
- package/public/r/typography.json +21 -16
- package/registry/init/global.css +2 -0
- package/registry.json +384 -23
- package/src/components/blocks/blocks-1.astro +23 -23
- package/src/components/blocks/doc-1.astro +116 -26
- package/src/components/blocks/reviews-3.astro +1 -1
- package/src/components/blocks/sidebar-1.astro +46 -44
- package/src/components/ui/accordion/accordion.astro +8 -2
- package/src/components/ui/alert-dialog/alert-dialog.astro +8 -2
- package/src/components/ui/aspect-ratio/aspect-ratio.astro +25 -0
- package/src/components/ui/aspect-ratio/index.ts +1 -0
- package/src/components/ui/attachment/attachment-action.astro +20 -0
- package/src/components/ui/attachment/attachment-actions.astro +20 -0
- package/src/components/ui/attachment/attachment-content.astro +20 -0
- package/src/components/ui/attachment/attachment-description.astro +20 -0
- package/src/components/ui/attachment/attachment-group.astro +20 -0
- package/src/components/ui/attachment/attachment-media.astro +36 -0
- package/src/components/ui/attachment/attachment-title.astro +20 -0
- package/src/components/ui/attachment/attachment-trigger.astro +24 -0
- package/src/components/ui/attachment/attachment.astro +52 -0
- package/src/components/ui/attachment/index.ts +9 -0
- package/src/components/ui/button/button.astro +4 -1
- package/src/components/ui/button-group/button-group-separator.astro +29 -0
- package/src/components/ui/button-group/button-group-text.astro +20 -0
- package/src/components/ui/button-group/button-group-variants.ts +20 -0
- package/src/components/ui/button-group/button-group.astro +30 -0
- package/src/components/ui/button-group/index.ts +7 -0
- package/src/components/ui/carousel/carousel-content.astro +11 -13
- package/src/components/ui/carousel/carousel-item.astro +2 -5
- package/src/components/ui/carousel/carousel-next.astro +0 -3
- package/src/components/ui/carousel/carousel-previous.astro +0 -3
- package/src/components/ui/carousel/carousel.astro +19 -219
- package/src/components/ui/carousel/index.ts +1 -5
- package/src/components/ui/collapsible/collapsible.astro +8 -2
- package/src/components/ui/combobox/combobox-content.astro +1 -1
- package/src/components/ui/combobox/combobox-input.astro +11 -4
- package/src/components/ui/combobox/combobox-trigger.astro +7 -7
- package/src/components/ui/combobox/combobox.astro +9 -17
- package/src/components/ui/command/command-dialog.astro +1 -0
- package/src/components/ui/command/command.astro +40 -25
- package/src/components/ui/dialog/dialog.astro +8 -2
- package/src/components/ui/drawer/drawer-close.astro +13 -0
- package/src/components/ui/drawer/drawer-content.astro +43 -0
- package/src/components/ui/drawer/drawer-description.astro +17 -0
- package/src/components/ui/drawer/drawer-footer.astro +17 -0
- package/src/components/ui/drawer/drawer-header.astro +17 -0
- package/src/components/ui/drawer/drawer-indent-background.astro +11 -0
- package/src/components/ui/drawer/drawer-indent.astro +11 -0
- package/src/components/ui/drawer/drawer-overlay.astro +21 -0
- package/src/components/ui/drawer/drawer-popup.astro +36 -0
- package/src/components/ui/drawer/drawer-portal.astro +27 -0
- package/src/components/ui/drawer/drawer-provider.astro +11 -0
- package/src/components/ui/drawer/drawer-swipe-handle.astro +20 -0
- package/src/components/ui/drawer/drawer-title.astro +17 -0
- package/src/components/ui/drawer/drawer-trigger.astro +21 -0
- package/src/components/ui/drawer/drawer-viewport.astro +21 -0
- package/src/components/ui/drawer/drawer-virtual-keyboard-provider.astro +11 -0
- package/src/components/ui/drawer/drawer.astro +60 -0
- package/src/components/ui/drawer/index.ts +28 -0
- package/src/components/ui/dropdown-menu/dropdown-menu-content.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu-item.astro +40 -9
- package/src/components/ui/dropdown-menu/dropdown-menu.astro +8 -2
- package/src/components/ui/hover-card/hover-card-content.astro +1 -1
- package/src/components/ui/hover-card/hover-card.astro +15 -4
- package/src/components/ui/navigation-menu/navigation-menu-positioner.astro +1 -1
- package/src/components/ui/navigation-menu/navigation-menu.astro +13 -4
- package/src/components/ui/pagination/index.ts +7 -0
- package/src/components/ui/pagination/pagination-content.astro +17 -0
- package/src/components/ui/pagination/pagination-ellipsis.astro +22 -0
- package/src/components/ui/pagination/pagination-item.astro +11 -0
- package/src/components/ui/pagination/pagination-link.astro +41 -0
- package/src/components/ui/pagination/pagination-next.astro +27 -0
- package/src/components/ui/pagination/pagination-previous.astro +27 -0
- package/src/components/ui/pagination/pagination.astro +19 -0
- package/src/components/ui/popover/popover-content.astro +2 -1
- package/src/components/ui/popover/popover.astro +9 -2
- package/src/components/ui/radio-group/radio-group.astro +8 -2
- package/src/components/ui/resizable/index.ts +4 -0
- package/src/components/ui/resizable/resizable-handle.astro +32 -0
- package/src/components/ui/resizable/resizable-panel.astro +36 -0
- package/src/components/ui/resizable/resizable.astro +43 -0
- package/src/components/ui/select/select-content.astro +2 -2
- package/src/components/ui/select/select.astro +11 -7
- package/src/components/ui/sheet/sheet.astro +8 -2
- package/src/components/ui/slider/slider.astro +9 -3
- package/src/components/ui/switch/switch.astro +8 -2
- package/src/components/ui/tabs/tabs-content.astro +1 -1
- package/src/components/ui/tabs/tabs-trigger.astro +3 -2
- package/src/components/ui/tabs/tabs.astro +8 -2
- package/src/components/ui/toast/index.ts +26 -0
- package/src/components/ui/toast/toast-action.astro +25 -0
- package/src/components/ui/toast/toast-close.astro +27 -0
- package/src/components/ui/toast/toast-content.astro +20 -0
- package/src/components/ui/toast/toast-description.astro +18 -0
- package/src/components/ui/toast/toast-icon.astro +37 -0
- package/src/components/ui/toast/toast-item.astro +28 -0
- package/src/components/ui/toast/toast-template.astro +11 -0
- package/src/components/ui/toast/toast-title.astro +17 -0
- package/src/components/ui/toast/toast-viewport.astro +20 -0
- package/src/components/ui/toast/toast.astro +51 -0
- package/src/components/ui/toast/toaster.astro +37 -0
- package/src/components/ui/toggle/toggle.astro +8 -2
- package/src/components/ui/toggle-group/index.ts +2 -0
- package/src/components/ui/toggle-group/toggle-group-item.astro +44 -0
- package/src/components/ui/toggle-group/toggle-group.astro +74 -0
- package/src/components/ui/tooltip/tooltip-content.astro +1 -1
- package/src/components/ui/tooltip/tooltip.astro +11 -2
- package/src/components/ui/typography/typeset.css +441 -0
- package/src/components/ui/typography/typography-a.astro +13 -22
- package/src/components/ui/typography/typography-blockquote.astro +4 -23
- package/src/components/ui/typography/typography-h1.astro +13 -26
- package/src/components/ui/typography/typography-h2.astro +13 -31
- package/src/components/ui/typography/typography-h3.astro +9 -26
- package/src/components/ui/typography/typography-h4.astro +9 -26
- package/src/components/ui/typography/typography-inline-code.astro +8 -27
- package/src/components/ui/typography/typography-lead.astro +4 -26
- package/src/components/ui/typography/typography-list-item.astro +4 -24
- package/src/components/ui/typography/typography-list.astro +10 -40
- package/src/components/ui/typography/typography-p.astro +9 -28
- package/src/components/ui/typography/typography-table-cell.astro +9 -40
- package/src/components/ui/typography/typography-table-head.astro +9 -35
- package/src/components/ui/typography/typography-table-row.astro +4 -23
- package/src/components/ui/typography/typography-table.astro +8 -28
- package/src/components/ui/typography/typography.astro +10 -283
- package/src/styles/global.css +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Fulldev UI
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#197](https://github.com/fulldotdev/ui/pull/197) [`9ca89fb`](https://github.com/fulldotdev/ui/commit/9ca89fbb09bcf99fb380b9ddc6f1637759bd7a2d) Thanks [@silveltman](https://github.com/silveltman)! - Complete Data Slot component coverage with Drawer, Toast, Toggle Group and Resizable, and upgrade all Data Slot packages to 1.0.2. Add Attachment, Button Group, Pagination and Aspect Ratio as Astro components without their own client scripts.
|
|
8
|
+
|
|
9
|
+
Replace the Embla Carousel with Data Slot's native scrolling carousel. This is a breaking change: replace `opts` with `defaultIndex`, `orientation`, `drag` and `loop`; use `CarouselController` and `CarouselOptions` instead of Embla types; replace `carousel:init` and `carousel:select` with `carousel:change` and `carousel:set`. Carousel now displays one full-width slide at a time. Remove fractional slide widths and the old content/item spacing pattern. Examples and the reviews block use the new API.
|
|
10
|
+
|
|
11
|
+
Adopt shadcn Typeset for rendered prose while preserving the existing Typography component exports. Typography sizes now control the prose rhythm, with updated heading spacing, nested content styling and semantic tables. Keep docs-specific code controls out of installable Typography styles.
|
|
12
|
+
|
|
13
|
+
Improve Combobox trigger and clear focus styling, align Select popper placement and Slider thumb positioning with shadcn, and use a consistent 8px default Navigation Menu gap.
|
|
14
|
+
|
|
15
|
+
## 0.12.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#195](https://github.com/fulldotdev/ui/pull/195) [`74fcc47`](https://github.com/fulldotdev/ui/commit/74fcc47a2ba855729c15ffb163af7c60beeeae78) Thanks [@silveltman](https://github.com/silveltman)! - Upgrade all Data Slot primitives and registry dependencies to 1.0.1. Use recommended
|
|
20
|
+
lazy mounting for Select, Tooltip, Hover Card and Navigation Menu, with an explicit
|
|
21
|
+
mountStrategy="eager" opt-in for integrations that query closed content. Discover nested
|
|
22
|
+
comboboxes and hover cards in retained content without duplicate initialization.
|
|
23
|
+
|
|
24
|
+
Release outgoing controllers on Astro page swaps so open overlays cannot leave stale
|
|
25
|
+
modal stacks or scroll locks. Give CommandDialog a trigger slot and correct the
|
|
26
|
+
sidebar search composition for strict nested ownership.
|
|
27
|
+
|
|
28
|
+
Use native autofocus for command palettes and native link activation for keyboard
|
|
29
|
+
commands. Align Slider defaults and Tabs values with the upstream API, and make
|
|
30
|
+
block dropdown links actual accessible menu items.
|
|
31
|
+
|
|
32
|
+
Use shadcn button defaults and consistent overlay layers so nested popups receive
|
|
33
|
+
pointer input. Form submissions should explicitly set type="submit".
|
|
34
|
+
|
|
35
|
+
Keep Data Slot modal stack layers and place floating positioners above them so
|
|
36
|
+
Select and other popups remain clickable inside dialogs.
|
|
37
|
+
|
|
3
38
|
## 0.11.1
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fulldev-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.0",
|
|
5
5
|
"description": "Open-source Astro UI components and blocks",
|
|
6
6
|
"homepage": "https://ui.full.dev",
|
|
7
7
|
"bugs": "https://github.com/fulldotdev/ui/issues",
|
|
@@ -50,24 +50,29 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@astrojs/mdx": "^5.0.6",
|
|
52
52
|
"@astrojs/sitemap": "^3.7.3",
|
|
53
|
-
"@data-slot/accordion": "^0.2
|
|
54
|
-
"@data-slot/alert-dialog": "^0.2
|
|
55
|
-
"@data-slot/
|
|
56
|
-
"@data-slot/
|
|
57
|
-
"@data-slot/
|
|
58
|
-
"@data-slot/
|
|
59
|
-
"@data-slot/
|
|
60
|
-
"@data-slot/
|
|
61
|
-
"@data-slot/
|
|
62
|
-
"@data-slot/
|
|
63
|
-
"@data-slot/
|
|
64
|
-
"@data-slot/
|
|
65
|
-
"@data-slot/
|
|
66
|
-
"@data-slot/
|
|
67
|
-
"@data-slot/
|
|
68
|
-
"@data-slot/
|
|
69
|
-
"@data-slot/
|
|
70
|
-
"@data-slot/
|
|
53
|
+
"@data-slot/accordion": "^1.0.2",
|
|
54
|
+
"@data-slot/alert-dialog": "^1.0.2",
|
|
55
|
+
"@data-slot/carousel": "^1.0.2",
|
|
56
|
+
"@data-slot/collapsible": "^1.0.2",
|
|
57
|
+
"@data-slot/combobox": "^1.0.2",
|
|
58
|
+
"@data-slot/command": "^1.0.2",
|
|
59
|
+
"@data-slot/core": "^1.0.2",
|
|
60
|
+
"@data-slot/dialog": "^1.0.2",
|
|
61
|
+
"@data-slot/drawer": "^1.0.2",
|
|
62
|
+
"@data-slot/dropdown-menu": "^1.0.2",
|
|
63
|
+
"@data-slot/hover-card": "^1.0.2",
|
|
64
|
+
"@data-slot/navigation-menu": "^1.0.2",
|
|
65
|
+
"@data-slot/popover": "^1.0.2",
|
|
66
|
+
"@data-slot/radio-group": "^1.0.2",
|
|
67
|
+
"@data-slot/resizable": "^1.0.2",
|
|
68
|
+
"@data-slot/select": "^1.0.2",
|
|
69
|
+
"@data-slot/slider": "^1.0.2",
|
|
70
|
+
"@data-slot/switch": "^1.0.2",
|
|
71
|
+
"@data-slot/tabs": "^1.0.2",
|
|
72
|
+
"@data-slot/toast": "^1.0.2",
|
|
73
|
+
"@data-slot/toggle": "^1.0.2",
|
|
74
|
+
"@data-slot/toggle-group": "^1.0.2",
|
|
75
|
+
"@data-slot/tooltip": "^1.0.2",
|
|
71
76
|
"@fontsource-variable/geist": "^5.2.9",
|
|
72
77
|
"@fontsource-variable/geist-mono": "^5.2.8",
|
|
73
78
|
"@lexingtonthemes/seo": "^0.2.0",
|
|
@@ -79,7 +84,6 @@
|
|
|
79
84
|
"astro-robots-txt": "^1.0.0",
|
|
80
85
|
"class-variance-authority": "^0.7.1",
|
|
81
86
|
"clsx": "^2.1.1",
|
|
82
|
-
"embla-carousel": "^8.6.0",
|
|
83
87
|
"lucide-static": "^1.22.0",
|
|
84
88
|
"shadcn": "^4.12.0",
|
|
85
89
|
"simple-icons": "^16.24.1",
|
|
@@ -90,10 +94,12 @@
|
|
|
90
94
|
"typescript": "^6.0.3"
|
|
91
95
|
},
|
|
92
96
|
"devDependencies": {
|
|
97
|
+
"@argos-ci/playwright": "^7.6.0",
|
|
93
98
|
"@astrojs/check": "^0.9.9",
|
|
94
99
|
"@changesets/changelog-github": "^0.7.0",
|
|
95
100
|
"@changesets/cli": "^2.31.0",
|
|
96
101
|
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
102
|
+
"@playwright/test": "^1.63.0",
|
|
97
103
|
"prettier": "3.9.3",
|
|
98
104
|
"prettier-plugin-astro": "0.14.1",
|
|
99
105
|
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
@@ -106,6 +112,7 @@
|
|
|
106
112
|
"stop": "lsof -tiTCP:4321 -sTCP:LISTEN | xargs kill 2>/dev/null || true",
|
|
107
113
|
"preview": "pnpm stop && pnpm build && astro preview --host 127.0.0.1 --port 4321",
|
|
108
114
|
"typecheck": "astro check",
|
|
115
|
+
"test:interactions": "playwright test --config playwright.interactions.config.ts",
|
|
109
116
|
"check": "pnpm format:check && pnpm typecheck",
|
|
110
117
|
"build": "astro build",
|
|
111
118
|
"build:prod": "pnpm check && pnpm registry:build && pnpm build",
|
|
@@ -117,6 +124,7 @@
|
|
|
117
124
|
"format:check": "prettier --check .",
|
|
118
125
|
"release": "changeset version && pnpm install --lockfile-only",
|
|
119
126
|
"release:publish": "pnpm registry:check && pnpm build && changeset publish",
|
|
120
|
-
"registry:meta": "node scripts/registry-meta.mjs"
|
|
127
|
+
"registry:meta": "node scripts/registry-meta.mjs",
|
|
128
|
+
"test:visual": "pnpm build && playwright test"
|
|
121
129
|
}
|
|
122
130
|
}
|
package/public/r/accordion.json
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"title": "Accordion",
|
|
5
5
|
"description": "A vertically stacked set of interactive headings that each reveal a section of content.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/accordion",
|
|
7
|
+
"@data-slot/accordion@^1.0.2",
|
|
8
8
|
"@lucide/astro"
|
|
9
9
|
],
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "src/components/ui/accordion/accordion.astro",
|
|
13
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n<div\n data-slot=\"accordion\"\n data-multiple={multiple}\n data-default-value={serializedDefaultValue}\n data-disabled={disabled}\n data-orientation={orientation}\n data-loop-focus={loopFocus}\n data-hidden-until-found={hiddenUntilFound}\n data-collapsible={collapsible}\n class={cn(\"flex w-full flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/accordion\"\n\n create()\n document.addEventListener(\"astro:page-load\", () =>
|
|
13
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n<div\n data-slot=\"accordion\"\n data-multiple={multiple}\n data-default-value={serializedDefaultValue}\n data-disabled={disabled}\n data-orientation={orientation}\n data-loop-focus={loopFocus}\n data-hidden-until-found={hiddenUntilFound}\n data-collapsible={collapsible}\n class={cn(\"flex w-full flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/accordion\"\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",
|
|
14
14
|
"type": "registry:ui"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Alert Dialog",
|
|
5
5
|
"description": "A modal dialog for important confirmations that expects a response.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/alert-dialog"
|
|
7
|
+
"@data-slot/alert-dialog@^1.0.2"
|
|
8
8
|
],
|
|
9
9
|
"registryDependencies": [
|
|
10
10
|
"@fulldev/button"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
{
|
|
14
14
|
"path": "src/components/ui/alert-dialog/alert-dialog.astro",
|
|
15
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"alert-dialog\"\n data-default-open={defaultOpen}\n data-close-on-click-outside={closeOnClickOutside}\n data-close-on-escape={closeOnEscape}\n data-lock-scroll={lockScroll}\n class={className}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/alert-dialog\"\n\n create()\n document.addEventListener(\"astro:page-load\", () =>
|
|
15
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"alert-dialog\"\n data-default-open={defaultOpen}\n data-close-on-click-outside={closeOnClickOutside}\n data-close-on-escape={closeOnEscape}\n data-lock-scroll={lockScroll}\n class={className}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/alert-dialog\"\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",
|
|
16
16
|
"type": "registry:ui"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "aspect-ratio",
|
|
4
|
+
"title": "Aspect Ratio",
|
|
5
|
+
"description": "Displays content within a desired ratio.",
|
|
6
|
+
"files": [
|
|
7
|
+
{
|
|
8
|
+
"path": "src/components/ui/aspect-ratio/aspect-ratio.astro",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n ratio: number\n}\n\nconst { class: className, ratio, style, ...props } = Astro.props\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--ratio: ${ratio}; ${style}`\n : { \"--ratio\": ratio, ...(style ?? {}) }\n---\n\n<div\n data-slot=\"aspect-ratio\"\n style={resolvedStyle}\n class={cn(\"relative aspect-(--ratio)\", className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
10
|
+
"type": "registry:ui"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"path": "src/components/ui/aspect-ratio/index.ts",
|
|
14
|
+
"content": "export { default as AspectRatio } from \"./aspect-ratio.astro\"\n",
|
|
15
|
+
"type": "registry:ui"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"docs": "https://ui.full.dev/components/aspect-ratio/",
|
|
19
|
+
"categories": [
|
|
20
|
+
"ui"
|
|
21
|
+
],
|
|
22
|
+
"type": "registry:ui"
|
|
23
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "attachment",
|
|
4
|
+
"title": "Attachment",
|
|
5
|
+
"description": "Displays a file or image attachment with media, metadata, state, and actions.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@fulldev/button"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "src/components/ui/attachment/attachment-action.astro",
|
|
12
|
+
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { Button, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst { as, variant = \"ghost\", size = \"icon-xs\", ...props } = Astro.props\n---\n\n<Button\n as={as}\n data-slot=\"attachment-action\"\n variant={variant}\n size={size}\n {...props}\n>\n <slot />\n</Button>\n",
|
|
13
|
+
"type": "registry:ui"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"path": "src/components/ui/attachment/attachment-actions.astro",
|
|
17
|
+
"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=\"attachment-actions\"\n class={cn(\n \"relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
18
|
+
"type": "registry:ui"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "src/components/ui/attachment/attachment-content.astro",
|
|
22
|
+
"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=\"attachment-content\"\n class={cn(\n \"max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
23
|
+
"type": "registry:ui"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "src/components/ui/attachment/attachment-description.astro",
|
|
27
|
+
"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=\"attachment-description\"\n class={cn(\n \"text-muted-foreground group-data-[state=error]/attachment:text-destructive/80 mt-0.5 block max-w-full min-w-0 truncate text-xs\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
|
|
28
|
+
"type": "registry:ui"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "src/components/ui/attachment/attachment-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\n data-slot=\"attachment-group\"\n class={cn(\n \"flex min-w-0 snap-x snap-mandatory scroll-px-1 gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
33
|
+
"type": "registry:ui"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "src/components/ui/attachment/attachment-media.astro",
|
|
37
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst attachmentMediaVariants = cva(\n \"bg-muted text-foreground group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n variant: {\n icon: \"\",\n image:\n \"opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"icon\",\n },\n }\n)\n\ntype Props = HTMLAttributes<\"div\"> &\n VariantProps<typeof attachmentMediaVariants>\n\nconst { class: className, variant = \"icon\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"attachment-media\"\n data-variant={variant}\n class={cn(attachmentMediaVariants({ variant }), className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
38
|
+
"type": "registry:ui"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"path": "src/components/ui/attachment/attachment-title.astro",
|
|
42
|
+
"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=\"attachment-title\"\n class={cn(\n \"block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:animate-pulse group-data-[state=uploading]/attachment:animate-pulse\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
|
|
43
|
+
"type": "registry:ui"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "src/components/ui/attachment/attachment-trigger.astro",
|
|
47
|
+
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }>\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"attachment-trigger\"\n class={cn(\"absolute inset-0 z-10 outline-none\", className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
|
|
48
|
+
"type": "registry:ui"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "src/components/ui/attachment/attachment.astro",
|
|
52
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst attachmentVariants = cva(\n \"group/attachment bg-card text-card-foreground focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border transition-colors focus-within:ring-1 data-[state=idle]:border-dashed\",\n {\n variants: {\n size: {\n default:\n \"gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2\",\n sm: \"gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5\",\n xs: \"gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1\",\n },\n orientation: {\n horizontal: \"min-w-40 items-center\",\n vertical: \"w-24 flex-col has-data-[slot=attachment-content]:w-30\",\n },\n },\n defaultVariants: {\n size: \"default\",\n orientation: \"horizontal\",\n },\n }\n)\n\ntype Props = HTMLAttributes<\"div\"> &\n VariantProps<typeof attachmentVariants> & {\n state?: \"idle\" | \"uploading\" | \"processing\" | \"error\" | \"done\"\n }\n\nconst {\n class: className,\n state = \"done\",\n size = \"default\",\n orientation = \"horizontal\",\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"attachment\"\n data-state={state}\n data-size={size}\n data-orientation={orientation}\n class={cn(attachmentVariants({ size, orientation }), className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
53
|
+
"type": "registry:ui"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"path": "src/components/ui/attachment/index.ts",
|
|
57
|
+
"content": "export { default as Attachment } from \"./attachment.astro\"\nexport { default as AttachmentAction } from \"./attachment-action.astro\"\nexport { default as AttachmentActions } from \"./attachment-actions.astro\"\nexport { default as AttachmentContent } from \"./attachment-content.astro\"\nexport { default as AttachmentDescription } from \"./attachment-description.astro\"\nexport { default as AttachmentGroup } from \"./attachment-group.astro\"\nexport { default as AttachmentMedia } from \"./attachment-media.astro\"\nexport { default as AttachmentTitle } from \"./attachment-title.astro\"\nexport { default as AttachmentTrigger } from \"./attachment-trigger.astro\"\n",
|
|
58
|
+
"type": "registry:ui"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"docs": "https://ui.full.dev/components/attachment/",
|
|
62
|
+
"categories": [
|
|
63
|
+
"ui"
|
|
64
|
+
],
|
|
65
|
+
"type": "registry:ui"
|
|
66
|
+
}
|
package/public/r/banner.json
CHANGED
package/public/r/blocks-1.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/blocks/blocks-1.astro",
|
|
18
|
-
"content": "---\nimport ArrowLeft from \"@lucide/astro/icons/arrow-left\"\nimport ArrowRight from \"@lucide/astro/icons/arrow-right\"\nimport Check from \"@lucide/astro/icons/check\"\nimport ChevronDown from \"@lucide/astro/icons/chevron-down\"\nimport Copy from \"@lucide/astro/icons/copy\"\nimport ExternalLink from \"@lucide/astro/icons/external-link\"\nimport Claude from \"simple-icons-astro/Claude\"\nimport Cursor from \"simple-icons-astro/Cursor\"\nimport Markdown from \"simple-icons-astro/Markdown\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { buttonVariants } from \"@/components/ui/button/button-variants\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport { SectionContainer } from \"@/components/ui/section\"\nimport {\n Typography,\n TypographyH1,\n TypographyLead,\n} from \"@/components/ui/typography\"\n\ntype Props = {\n class?: string\n title: string\n description?: string\n copyButton?: {\n id: string\n source: string\n }\n markdownUrl?: string\n previousPage?: {\n href: string\n title: string\n }\n nextPage?: {\n href: string\n title: string\n }\n labels: {\n copyMarkdown: string\n openIn: string\n openInMarkdown: string\n openInChatGPT: string\n openInClaude: string\n openInCursor: string\n pagination: {\n previous: string\n next: string\n ariaLabel: string\n }\n }\n}\n\nconst {\n class: className,\n title,\n description,\n copyButton,\n markdownUrl,\n previousPage,\n nextPage,\n labels,\n} = Astro.props\nconst showCopyButton = Boolean(copyButton)\nconst showOpenButton = Boolean(markdownUrl)\nconst showPagination = Boolean(previousPage || nextPage)\nconst assistantPrompt = markdownUrl\n ? `Read ${new URL(markdownUrl, Astro.site ?? Astro.url.origin).href}, I want to ask questions about it.`\n : \"\"\nconst openLinks = markdownUrl\n ? [\n {\n label: labels.openInMarkdown,\n href: markdownUrl,\n icon: \"markdown\",\n },\n {\n label: labels.openInChatGPT,\n href: `https://chatgpt.com/?hints=search&q=${encodeURIComponent(assistantPrompt)}`,\n icon: \"chatgpt\",\n },\n {\n label: labels.openInClaude,\n href: `https://claude.ai/new?q=${encodeURIComponent(assistantPrompt)}`,\n icon: \"claude\",\n },\n {\n label: labels.openInCursor,\n href: `https://cursor.com/link/prompt?text=${encodeURIComponent(assistantPrompt)}`,\n icon: \"cursor\",\n },\n ]\n : []\n---\n\n<SectionContainer\n data-slot=\"blocks-page\"\n class={cn(\"gap-10 pt-10 pb-10 sm:pt-12 sm:pb-12\", className)}\n>\n <div class=\"mx-auto flex w-full max-w-[84rem] flex-col gap-10\">\n <header\n class=\"flex flex-col gap-4 border-b pb-8 sm:flex-row sm:items-start sm:justify-between\"\n >\n <div class=\"flex max-w-3xl min-w-0 flex-1 flex-col gap-2\">\n <TypographyH1\n class=\"text-foreground text-left text-3xl tracking-tight sm:text-4xl\"\n >\n {title}\n </TypographyH1>\n {\n description && (\n <TypographyLead class=\"max-w-2xl text-base leading-7\">\n {description}\n </TypographyLead>\n )\n }\n </div>\n <div class=\"flex shrink-0 items-center gap-2 self-start\">\n {\n showCopyButton && (\n <Button\n id={copyButton?.id}\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n data-source={copyButton?.source}\n aria-label={labels.copyMarkdown}\n >\n <Copy class=\"blocks-copy-icon size-3.5\" />\n <Check class=\"blocks-check-icon hidden size-3.5\" />\n <span>{labels.copyMarkdown}</span>\n </Button>\n )\n }\n {\n showOpenButton && (\n <DropdownMenu>\n <DropdownMenuTrigger\n class={buttonVariants({ variant: \"outline\", size: \"xs\" })}\n >\n <span>{labels.openIn}</span>\n <ChevronDown class=\"size-3.5 opacity-70\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" sideOffset={6} class=\"w-56\">\n {openLinks.map((link) => (\n <
|
|
18
|
+
"content": "---\nimport ArrowLeft from \"@lucide/astro/icons/arrow-left\"\nimport ArrowRight from \"@lucide/astro/icons/arrow-right\"\nimport Check from \"@lucide/astro/icons/check\"\nimport ChevronDown from \"@lucide/astro/icons/chevron-down\"\nimport Copy from \"@lucide/astro/icons/copy\"\nimport ExternalLink from \"@lucide/astro/icons/external-link\"\nimport Claude from \"simple-icons-astro/Claude\"\nimport Cursor from \"simple-icons-astro/Cursor\"\nimport Markdown from \"simple-icons-astro/Markdown\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { buttonVariants } from \"@/components/ui/button/button-variants\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport { SectionContainer } from \"@/components/ui/section\"\nimport {\n Typography,\n TypographyH1,\n TypographyLead,\n} from \"@/components/ui/typography\"\n\ntype Props = {\n class?: string\n title: string\n description?: string\n copyButton?: {\n id: string\n source: string\n }\n markdownUrl?: string\n previousPage?: {\n href: string\n title: string\n }\n nextPage?: {\n href: string\n title: string\n }\n labels: {\n copyMarkdown: string\n openIn: string\n openInMarkdown: string\n openInChatGPT: string\n openInClaude: string\n openInCursor: string\n pagination: {\n previous: string\n next: string\n ariaLabel: string\n }\n }\n}\n\nconst {\n class: className,\n title,\n description,\n copyButton,\n markdownUrl,\n previousPage,\n nextPage,\n labels,\n} = Astro.props\nconst showCopyButton = Boolean(copyButton)\nconst showOpenButton = Boolean(markdownUrl)\nconst showPagination = Boolean(previousPage || nextPage)\nconst assistantPrompt = markdownUrl\n ? `Read ${new URL(markdownUrl, Astro.site ?? Astro.url.origin).href}, I want to ask questions about it.`\n : \"\"\nconst openLinks = markdownUrl\n ? [\n {\n label: labels.openInMarkdown,\n href: markdownUrl,\n icon: \"markdown\",\n },\n {\n label: labels.openInChatGPT,\n href: `https://chatgpt.com/?hints=search&q=${encodeURIComponent(assistantPrompt)}`,\n icon: \"chatgpt\",\n },\n {\n label: labels.openInClaude,\n href: `https://claude.ai/new?q=${encodeURIComponent(assistantPrompt)}`,\n icon: \"claude\",\n },\n {\n label: labels.openInCursor,\n href: `https://cursor.com/link/prompt?text=${encodeURIComponent(assistantPrompt)}`,\n icon: \"cursor\",\n },\n ]\n : []\n---\n\n<SectionContainer\n data-slot=\"blocks-page\"\n class={cn(\"gap-10 pt-10 pb-10 sm:pt-12 sm:pb-12\", className)}\n>\n <div class=\"mx-auto flex w-full max-w-[84rem] flex-col gap-10\">\n <header\n class=\"flex flex-col gap-4 border-b pb-8 sm:flex-row sm:items-start sm:justify-between\"\n >\n <div class=\"flex max-w-3xl min-w-0 flex-1 flex-col gap-2\">\n <TypographyH1\n class=\"text-foreground text-left text-3xl tracking-tight sm:text-4xl\"\n >\n {title}\n </TypographyH1>\n {\n description && (\n <TypographyLead class=\"max-w-2xl text-base leading-7\">\n {description}\n </TypographyLead>\n )\n }\n </div>\n <div class=\"flex shrink-0 items-center gap-2 self-start\">\n {\n showCopyButton && (\n <Button\n id={copyButton?.id}\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n data-source={copyButton?.source}\n data-blocks-copy\n aria-label={labels.copyMarkdown}\n >\n <Copy class=\"blocks-copy-icon size-3.5\" />\n <Check class=\"blocks-check-icon hidden size-3.5\" />\n <span>{labels.copyMarkdown}</span>\n </Button>\n )\n }\n {\n showOpenButton && (\n <DropdownMenu>\n <DropdownMenuTrigger\n class={buttonVariants({ variant: \"outline\", size: \"xs\" })}\n >\n <span>{labels.openIn}</span>\n <ChevronDown class=\"size-3.5 opacity-70\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" sideOffset={6} class=\"w-56\">\n {openLinks.map((link) => (\n <DropdownMenuItem\n href={link.href}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n >\n {link.icon === \"markdown\" && <Markdown class=\"size-4\" />}\n {link.icon === \"chatgpt\" && (\n <svg\n role=\"img\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"size-4\"\n aria-hidden=\"true\"\n >\n <path d=\"M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.182a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .511 4.91 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.989 5.989 0 0 0 3.998-2.9 6.056 6.056 0 0 0-.748-7.073ZM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.142-.081 4.778-2.758a.795.795 0 0 0 .393-.681v-6.737l2.02 1.169a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.495 4.494Zm-9.66-4.125a4.471 4.471 0 0 1-.535-3.014l.142.085 4.783 2.758a.771.771 0 0 0 .781 0l5.843-3.368v2.332a.08.08 0 0 1-.034.062L9.74 19.95a4.499 4.499 0 0 1-6.14-1.646ZM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.677l5.814 3.354-2.02 1.169a.076.076 0 0 1-.071 0l-4.83-2.787A4.504 4.504 0 0 1 2.34 7.872Zm16.596 3.856-5.833-3.388L15.12 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.104v-5.677a.79.79 0 0 0-.407-.667Zm2.011-3.024-.142-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.499 4.499 0 0 1 6.68 4.66ZM8.307 12.863l-2.02-1.164a.08.08 0 0 1-.038-.057V6.074a4.499 4.499 0 0 1 7.376-3.453l-.142.08-4.778 2.758a.795.795 0 0 0-.393.681Zm1.097-2.365 2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5Z\" />\n </svg>\n )}\n {link.icon === \"claude\" && <Claude class=\"size-4\" />}\n {link.icon === \"cursor\" && <Cursor class=\"size-4\" />}\n <span>{link.label}</span>\n <ExternalLink class=\"text-muted-foreground ml-auto size-3.5\" />\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n }\n </div>\n </header>\n\n <Typography as=\"article\" class=\"w-full max-w-none\">\n <slot />\n </Typography>\n\n {\n showPagination && (\n <nav\n class=\"flex items-center justify-between gap-3\"\n aria-label={labels.pagination.ariaLabel}\n >\n {previousPage ? (\n <Button\n as=\"a\"\n href={previousPage.href}\n variant=\"outline\"\n class=\"h-auto min-w-0 items-center justify-start gap-2 px-3 py-2 whitespace-normal\"\n >\n <ArrowLeft class=\"size-4\" />\n <span class=\"truncate text-sm font-medium\">\n {previousPage.title}\n </span>\n </Button>\n ) : (\n <div aria-hidden=\"true\" />\n )}\n\n {nextPage ? (\n <Button\n as=\"a\"\n href={nextPage.href}\n variant=\"outline\"\n class=\"h-auto min-w-0 items-center justify-end gap-2 px-3 py-2 text-right whitespace-normal\"\n >\n <span class=\"truncate text-sm font-medium\">{nextPage.title}</span>\n <ArrowRight class=\"size-4\" />\n </Button>\n ) : (\n <div aria-hidden=\"true\" />\n )}\n </nav>\n )\n }\n </div>\n</SectionContainer>\n\n<script>\n document.addEventListener(\"click\", async (event) => {\n if (!(event.target instanceof Element)) return\n const button = event.target.closest(\"[data-blocks-copy]\")\n if (!(button instanceof HTMLButtonElement)) return\n\n const source = button.dataset.source\n if (!source) return\n\n try {\n await navigator.clipboard.writeText(source)\n button.querySelector(\".blocks-copy-icon\")?.classList.add(\"hidden\")\n button.querySelector(\".blocks-check-icon\")?.classList.remove(\"hidden\")\n\n window.setTimeout(() => {\n button.querySelector(\".blocks-copy-icon\")?.classList.remove(\"hidden\")\n button.querySelector(\".blocks-check-icon\")?.classList.add(\"hidden\")\n }, 1200)\n } catch {\n // Keep the copy state unchanged so the action can be retried.\n }\n })\n</script>\n",
|
|
19
19
|
"type": "registry:block"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "button-group",
|
|
4
|
+
"title": "Button Group",
|
|
5
|
+
"description": "Groups related controls with connected edges and consistent focus behavior.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@fulldev/separator"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "src/components/ui/button-group/button-group-separator.astro",
|
|
12
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n orientation?: \"horizontal\" | \"vertical\"\n decorative?: boolean\n}\n\nconst {\n class: className,\n orientation = \"vertical\",\n decorative = true,\n ...props\n} = Astro.props\n---\n\n<Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n decorative={decorative}\n class={cn(\n \"bg-input relative self-stretch data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto\",\n className\n )}\n {...props}\n/>\n",
|
|
13
|
+
"type": "registry:ui"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"path": "src/components/ui/button-group/button-group-text.astro",
|
|
17
|
+
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"button-group-text\"\n class={cn(\n \"bg-muted flex items-center gap-2 rounded-md border px-2.5 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n>\n <slot />\n</Tag>\n",
|
|
18
|
+
"type": "registry:ui"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "src/components/ui/button-group/button-group-variants.ts",
|
|
22
|
+
"content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const buttonGroupVariants = cva(\n \"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0\",\n vertical:\n \"flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\nexport type ButtonGroupVariantProps = VariantProps<typeof buttonGroupVariants>\n",
|
|
23
|
+
"type": "registry:ui"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "src/components/ui/button-group/button-group.astro",
|
|
27
|
+
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport {\n buttonGroupVariants,\n type ButtonGroupVariantProps,\n} from \"./button-group-variants\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }> &\n ButtonGroupVariantProps\n\nconst {\n as: Tag = \"div\",\n class: className,\n orientation = \"horizontal\",\n ...props\n} = Astro.props\n---\n\n<Tag\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n class={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n>\n <slot />\n</Tag>\n",
|
|
28
|
+
"type": "registry:ui"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "src/components/ui/button-group/index.ts",
|
|
32
|
+
"content": "export { default as ButtonGroup } from \"./button-group.astro\"\nexport { default as ButtonGroupSeparator } from \"./button-group-separator.astro\"\nexport { default as ButtonGroupText } from \"./button-group-text.astro\"\nexport {\n buttonGroupVariants,\n type ButtonGroupVariantProps,\n} from \"./button-group-variants\"\n",
|
|
33
|
+
"type": "registry:ui"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"docs": "https://ui.full.dev/components/button-group/",
|
|
37
|
+
"categories": [
|
|
38
|
+
"ui"
|
|
39
|
+
],
|
|
40
|
+
"type": "registry:ui"
|
|
41
|
+
}
|
package/public/r/button.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"path": "src/components/ui/button/button.astro",
|
|
14
|
-
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...
|
|
14
|
+
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
|
|
15
15
|
"type": "registry:ui"
|
|
16
16
|
},
|
|
17
17
|
{
|
package/public/r/carousel.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
3
|
"name": "carousel",
|
|
4
4
|
"title": "Carousel",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "An accessible carousel built on native scrolling with Data Slot.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"
|
|
7
|
+
"@data-slot/carousel@^1.0.2",
|
|
8
8
|
"@lucide/astro"
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [
|
|
@@ -13,32 +13,32 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "src/components/ui/carousel/carousel.astro",
|
|
16
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\
|
|
16
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultIndex?: number\n orientation?: \"horizontal\" | \"vertical\"\n drag?: boolean\n loop?: boolean\n}\n\nconst {\n class: className,\n defaultIndex,\n orientation = \"horizontal\",\n drag,\n loop,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"carousel\"\n data-default-index={defaultIndex}\n data-orientation={orientation}\n data-drag={drag}\n data-loop={loop}\n class={cn(\"group/carousel relative\", className)}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/carousel\"\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",
|
|
17
17
|
"type": "registry:ui"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "src/components/ui/carousel/carousel-content.astro",
|
|
21
|
-
"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
|
|
21
|
+
"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=\"carousel-content\"\n class={cn(\n \"no-scrollbar flex snap-x snap-mandatory overflow-x-auto overscroll-x-contain\",\n \"group-data-[dragging=true]/carousel:cursor-grabbing\",\n \"group-data-[orientation=vertical]/carousel:snap-y group-data-[orientation=vertical]/carousel:flex-col group-data-[orientation=vertical]/carousel:overflow-x-hidden group-data-[orientation=vertical]/carousel:overflow-y-auto group-data-[orientation=vertical]/carousel:overscroll-y-contain\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
22
22
|
"type": "registry:ui"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"path": "src/components/ui/carousel/carousel-item.astro",
|
|
26
|
-
"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=\"carousel-item\"\n
|
|
26
|
+
"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=\"carousel-item\"\n class={cn(\n \"min-w-0 shrink-0 grow-0 basis-full snap-start\",\n \"group-data-[orientation=vertical]/carousel:min-h-0\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
27
27
|
"type": "registry:ui"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"path": "src/components/ui/carousel/carousel-next.astro",
|
|
31
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronRightIcon from \"@lucide/astro/icons/chevron-right\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"type\"> & ButtonVariantProps\n\nconst {\n class: className,\n variant = \"outline\",\n size = \"icon-sm\",\n
|
|
31
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronRightIcon from \"@lucide/astro/icons/chevron-right\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"type\"> & ButtonVariantProps\n\nconst {\n class: className,\n variant = \"outline\",\n size = \"icon-sm\",\n ...props\n} = Astro.props\n---\n\n<button\n type=\"button\"\n data-slot=\"carousel-next\"\n class={cn(\n buttonVariants({ variant, size }),\n \"absolute touch-manipulation rounded-full group-data-[orientation=horizontal]/carousel:inset-y-0 group-data-[orientation=horizontal]/carousel:-right-12 group-data-[orientation=horizontal]/carousel:my-auto\",\n \"group-data-[orientation=vertical]/carousel:right-auto group-data-[orientation=vertical]/carousel:-bottom-12 group-data-[orientation=vertical]/carousel:left-1/2 group-data-[orientation=vertical]/carousel:-translate-x-1/2 group-data-[orientation=vertical]/carousel:translate-y-0 group-data-[orientation=vertical]/carousel:rotate-90\",\n className\n )}\n {...props}\n>\n <slot>\n <ChevronRightIcon aria-hidden=\"true\" />\n <span class=\"sr-only\">Next slide</span>\n </slot>\n</button>\n",
|
|
32
32
|
"type": "registry:ui"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "src/components/ui/carousel/carousel-previous.astro",
|
|
36
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronLeftIcon from \"@lucide/astro/icons/chevron-left\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"type\"> & ButtonVariantProps\n\nconst {\n class: className,\n variant = \"outline\",\n size = \"icon-sm\",\n
|
|
36
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronLeftIcon from \"@lucide/astro/icons/chevron-left\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"type\"> & ButtonVariantProps\n\nconst {\n class: className,\n variant = \"outline\",\n size = \"icon-sm\",\n ...props\n} = Astro.props\n---\n\n<button\n type=\"button\"\n data-slot=\"carousel-previous\"\n class={cn(\n buttonVariants({ variant, size }),\n \"absolute touch-manipulation rounded-full group-data-[orientation=horizontal]/carousel:inset-y-0 group-data-[orientation=horizontal]/carousel:-left-12 group-data-[orientation=horizontal]/carousel:my-auto\",\n \"group-data-[orientation=vertical]/carousel:-top-12 group-data-[orientation=vertical]/carousel:left-1/2 group-data-[orientation=vertical]/carousel:-translate-x-1/2 group-data-[orientation=vertical]/carousel:translate-y-0 group-data-[orientation=vertical]/carousel:rotate-90\",\n className\n )}\n {...props}\n>\n <slot>\n <ChevronLeftIcon aria-hidden=\"true\" />\n <span class=\"sr-only\">Previous slide</span>\n </slot>\n</button>\n",
|
|
37
37
|
"type": "registry:ui"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "src/components/ui/carousel/index.ts",
|
|
41
|
-
"content": "export type {
|
|
41
|
+
"content": "export type { CarouselController, CarouselOptions } from \"@data-slot/carousel\"\n\nexport { default as Carousel } from \"./carousel.astro\"\nexport { default as CarouselContent } from \"./carousel-content.astro\"\nexport { default as CarouselItem } from \"./carousel-item.astro\"\nexport { default as CarouselPrevious } from \"./carousel-previous.astro\"\nexport { default as CarouselNext } from \"./carousel-next.astro\"\n",
|
|
42
42
|
"type": "registry:ui"
|
|
43
43
|
}
|
|
44
44
|
],
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"title": "Collapsible",
|
|
5
5
|
"description": "An interactive component which expands/collapses a panel.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/collapsible"
|
|
7
|
+
"@data-slot/collapsible@^1.0.2"
|
|
8
8
|
],
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
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 defaultOpen?: boolean\n hiddenUntilFound?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n hiddenUntilFound,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"collapsible\"\n data-default-open={defaultOpen}\n data-hidden-until-found={hiddenUntilFound}\n class={cn(className)}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/collapsible\"\n\n create()\n document.addEventListener(\"astro:page-load\", () =>
|
|
12
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n hiddenUntilFound,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"collapsible\"\n data-default-open={defaultOpen}\n data-hidden-until-found={hiddenUntilFound}\n class={cn(className)}\n {...props}\n>\n <slot />\n</div>\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
13
|
"type": "registry:ui"
|
|
14
14
|
},
|
|
15
15
|
{
|
package/public/r/combobox.json
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"title": "Combobox",
|
|
5
5
|
"description": "Autocomplete input with a list of suggestions.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/combobox",
|
|
7
|
+
"@data-slot/combobox@^1.0.2",
|
|
8
|
+
"@data-slot/core@^1.0.2",
|
|
8
9
|
"@lucide/astro"
|
|
9
10
|
],
|
|
10
11
|
"registryDependencies": [
|
|
@@ -13,12 +14,12 @@
|
|
|
13
14
|
"files": [
|
|
14
15
|
{
|
|
15
16
|
"path": "src/components/ui/combobox/combobox.astro",
|
|
16
|
-
"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 {
|
|
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",
|
|
17
18
|
"type": "registry:ui"
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
21
|
"path": "src/components/ui/combobox/combobox-content.astro",
|
|
21
|
-
"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-
|
|
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 \"group/combobox-content bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 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) 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\",\n className\n )}\n {...props}\n >\n <slot />\n </div>\n </div>\n</div>\n",
|
|
22
23
|
"type": "registry:ui"
|
|
23
24
|
},
|
|
24
25
|
{
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
},
|
|
34
35
|
{
|
|
35
36
|
"path": "src/components/ui/combobox/combobox-input.astro",
|
|
36
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport InputGroupAddon from \"@/components/ui/input-group/input-group-addon.astro\"\nimport InputGroupInput from \"@/components/ui/input-group/input-group-input.astro\"\nimport InputGroup from \"@/components/ui/input-group/input-group.astro\"\n\nimport ComboboxTrigger from \"./combobox-trigger.astro\"\n\ntype Props = HTMLAttributes<\"input\"> & {\n showTrigger?: boolean\n showClear?: boolean\n}\n\nconst {\n class: className,\n type = \"text\",\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n} = Astro.props\n---\n\n<InputGroup
|
|
37
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport InputGroupAddon from \"@/components/ui/input-group/input-group-addon.astro\"\nimport InputGroupButton from \"@/components/ui/input-group/input-group-button.astro\"\nimport InputGroupInput from \"@/components/ui/input-group/input-group-input.astro\"\nimport InputGroup from \"@/components/ui/input-group/input-group.astro\"\n\nimport ComboboxTrigger from \"./combobox-trigger.astro\"\n\ntype Props = HTMLAttributes<\"input\"> & {\n showTrigger?: boolean\n showClear?: boolean\n}\n\nconst {\n class: className,\n type = \"text\",\n disabled = false,\n showTrigger = true,\n showClear = false,\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 {\n showTrigger && (\n <ComboboxTrigger\n class=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n />\n )\n }\n {\n showClear && (\n <InputGroupButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n data-slot=\"combobox-clear\"\n disabled={disabled}\n >\n <XIcon class=\"pointer-events-none\" />\n </InputGroupButton>\n )\n }\n </InputGroupAddon>\n <slot />\n</InputGroup>\n",
|
|
37
38
|
"type": "registry:ui"
|
|
38
39
|
},
|
|
39
40
|
{
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
},
|
|
59
60
|
{
|
|
60
61
|
"path": "src/components/ui/combobox/combobox-trigger.astro",
|
|
61
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\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<
|
|
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/input-group-button.astro\"\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 {\n showIcon && (\n <ChevronDownIcon class=\"text-muted-foreground pointer-events-none size-4\" />\n )\n }\n</InputGroupButton>\n",
|
|
62
63
|
"type": "registry:ui"
|
|
63
64
|
},
|
|
64
65
|
{
|