fulldev-ui 0.25.1 → 0.25.3
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 +14 -0
- package/README.md +4 -5
- package/liquid/assets/ui-manifest.json +2 -2
- package/liquid/snippets/ui-alert.liquid +2 -1
- package/liquid/snippets/ui-button.liquid +2 -2
- package/package.json +12 -11
- package/public/r/liquid/alert.json +1 -1
- package/public/r/liquid/button.json +1 -1
- package/public/r/liquid/components.json +1 -1
- package/public/r/styles/base-luma/alert.json +1 -1
- package/public/r/styles/base-luma/attachment-examples.json +1 -1
- package/public/r/styles/base-luma/attachment.json +2 -2
- package/public/r/styles/base-luma/button-examples.json +2 -2
- package/public/r/styles/base-luma/button.json +1 -1
- package/public/r/styles/base-luma/collapsible-examples.json +1 -1
- package/public/r/styles/base-luma/combobox-examples.json +1 -1
- package/public/r/styles/base-luma/combobox.json +1 -1
- package/public/r/styles/base-luma/input-group-examples.json +2 -2
- package/public/r/styles/base-luma/item-examples.json +1 -1
- package/public/r/styles/base-luma/select.json +1 -1
- package/public/r/styles/base-luma/tabs.json +1 -1
- package/public/r/styles/base-luma/tooltip-examples.json +1 -1
- package/public/r/styles/base-lyra/alert.json +1 -1
- package/public/r/styles/base-lyra/attachment-examples.json +1 -1
- package/public/r/styles/base-lyra/attachment.json +2 -2
- package/public/r/styles/base-lyra/button-examples.json +2 -2
- package/public/r/styles/base-lyra/button.json +1 -1
- package/public/r/styles/base-lyra/collapsible-examples.json +1 -1
- package/public/r/styles/base-lyra/combobox-examples.json +1 -1
- package/public/r/styles/base-lyra/combobox.json +1 -1
- package/public/r/styles/base-lyra/input-group-examples.json +2 -2
- package/public/r/styles/base-lyra/item-examples.json +1 -1
- package/public/r/styles/base-lyra/select.json +1 -1
- package/public/r/styles/base-lyra/tabs.json +1 -1
- package/public/r/styles/base-lyra/tooltip-examples.json +1 -1
- package/public/r/styles/base-maia/alert.json +1 -1
- package/public/r/styles/base-maia/attachment-examples.json +1 -1
- package/public/r/styles/base-maia/attachment.json +2 -2
- package/public/r/styles/base-maia/button-examples.json +2 -2
- package/public/r/styles/base-maia/button.json +1 -1
- package/public/r/styles/base-maia/collapsible-examples.json +1 -1
- package/public/r/styles/base-maia/combobox-examples.json +1 -1
- package/public/r/styles/base-maia/combobox.json +1 -1
- package/public/r/styles/base-maia/input-group-examples.json +2 -2
- package/public/r/styles/base-maia/item-examples.json +1 -1
- package/public/r/styles/base-maia/select.json +1 -1
- package/public/r/styles/base-maia/tabs.json +1 -1
- package/public/r/styles/base-maia/tooltip-examples.json +1 -1
- package/public/r/styles/base-mira/alert.json +1 -1
- package/public/r/styles/base-mira/attachment-examples.json +1 -1
- package/public/r/styles/base-mira/attachment.json +2 -2
- package/public/r/styles/base-mira/button-examples.json +2 -2
- package/public/r/styles/base-mira/button.json +1 -1
- package/public/r/styles/base-mira/collapsible-examples.json +1 -1
- package/public/r/styles/base-mira/combobox-examples.json +1 -1
- package/public/r/styles/base-mira/combobox.json +1 -1
- package/public/r/styles/base-mira/input-group-examples.json +2 -2
- package/public/r/styles/base-mira/item-examples.json +1 -1
- package/public/r/styles/base-mira/select.json +1 -1
- package/public/r/styles/base-mira/tabs.json +1 -1
- package/public/r/styles/base-mira/tooltip-examples.json +1 -1
- package/public/r/styles/base-nova/alert.json +1 -1
- package/public/r/styles/base-nova/attachment-examples.json +1 -1
- package/public/r/styles/base-nova/attachment.json +2 -2
- package/public/r/styles/base-nova/button-examples.json +2 -2
- package/public/r/styles/base-nova/button.json +1 -1
- package/public/r/styles/base-nova/collapsible-examples.json +1 -1
- package/public/r/styles/base-nova/combobox-examples.json +1 -1
- package/public/r/styles/base-nova/combobox.json +1 -1
- package/public/r/styles/base-nova/input-group-examples.json +2 -2
- package/public/r/styles/base-nova/item-examples.json +1 -1
- package/public/r/styles/base-nova/select.json +1 -1
- package/public/r/styles/base-nova/tabs.json +1 -1
- package/public/r/styles/base-nova/tooltip-examples.json +1 -1
- package/public/r/styles/base-rhea/alert.json +1 -1
- package/public/r/styles/base-rhea/attachment-examples.json +1 -1
- package/public/r/styles/base-rhea/attachment.json +2 -2
- package/public/r/styles/base-rhea/button-examples.json +2 -2
- package/public/r/styles/base-rhea/button.json +1 -1
- package/public/r/styles/base-rhea/collapsible-examples.json +1 -1
- package/public/r/styles/base-rhea/combobox-examples.json +1 -1
- package/public/r/styles/base-rhea/combobox.json +1 -1
- package/public/r/styles/base-rhea/input-group-examples.json +2 -2
- package/public/r/styles/base-rhea/item-examples.json +1 -1
- package/public/r/styles/base-rhea/select.json +1 -1
- package/public/r/styles/base-rhea/tabs.json +1 -1
- package/public/r/styles/base-rhea/tooltip-examples.json +1 -1
- package/public/r/styles/base-sera/alert.json +1 -1
- package/public/r/styles/base-sera/attachment-examples.json +1 -1
- package/public/r/styles/base-sera/attachment.json +2 -2
- package/public/r/styles/base-sera/button-examples.json +2 -2
- package/public/r/styles/base-sera/button.json +1 -1
- package/public/r/styles/base-sera/collapsible-examples.json +1 -1
- package/public/r/styles/base-sera/combobox-examples.json +1 -1
- package/public/r/styles/base-sera/combobox.json +1 -1
- package/public/r/styles/base-sera/input-group-examples.json +2 -2
- package/public/r/styles/base-sera/item-examples.json +1 -1
- package/public/r/styles/base-sera/select.json +1 -1
- package/public/r/styles/base-sera/tabs.json +1 -1
- package/public/r/styles/base-sera/tooltip-examples.json +1 -1
- package/public/r/styles/base-vega/alert.json +1 -1
- package/public/r/styles/base-vega/attachment-examples.json +1 -1
- package/public/r/styles/base-vega/attachment.json +2 -2
- package/public/r/styles/base-vega/button-examples.json +2 -2
- package/public/r/styles/base-vega/button.json +1 -1
- package/public/r/styles/base-vega/collapsible-examples.json +1 -1
- package/public/r/styles/base-vega/combobox-examples.json +1 -1
- package/public/r/styles/base-vega/combobox.json +1 -1
- package/public/r/styles/base-vega/input-group-examples.json +2 -2
- package/public/r/styles/base-vega/item-examples.json +1 -1
- package/public/r/styles/base-vega/select.json +1 -1
- package/public/r/styles/base-vega/tabs.json +1 -1
- package/public/r/styles/base-vega/tooltip-examples.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Fulldev UI
|
|
2
2
|
|
|
3
|
+
## 0.25.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#311](https://github.com/fulldotdev/ui/pull/311) [`d622fe2`](https://github.com/fulldotdev/ui/commit/d622fe2245b35dd9659f52865347e8fb18505730) Thanks [@silveltman](https://github.com/silveltman)! - Error and destructive text use the full destructive color, as shadcn/ui's `FieldError` does. `AttachmentDescription` in an attachment with an error was at 80%, about 4.1:1 in light mode and 4.3:1 in dark mode, and the description of a destructive `Alert` at 90%, in Astro and native Liquid, below the 4.5:1 WCAG AA asks for. The destructive `Button` mixes a fifth of the foreground into its text, because the destructive color on the button's own tint is about 3.9:1. The native Liquid button already mixed in the foreground; it now uses the same mix, in oklab, which keeps the text red in dark mode instead of orange. `AttachmentTitle` shimmers while an attachment uploads or processes, as in shadcn/ui, instead of pulsing to half opacity, where the name fell to about 3.7:1; the shimmer comes from `shadcn/tailwind.css`, so update the `shadcn` package if the name stays still. The attachment demo's `AttachmentGroup` takes keyboard focus, so it can be scrolled without a pointer, and the Typography docs now say that a `typeset-scroll` wrapper needs `tabindex="0"` for the same reason.
|
|
8
|
+
|
|
9
|
+
## 0.25.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#305](https://github.com/fulldotdev/ui/pull/305) [`18063bb`](https://github.com/fulldotdev/ui/commit/18063bb16e6e2d2329ed2dfae85200ae5876a748) Thanks [@silveltman](https://github.com/silveltman)! - Select triggers show their text in the server-rendered HTML: an empty `SelectValue` gets the label of the `defaultValue` item, or the `placeholder`, the text Data Slot shows when it starts. Before, the trigger stayed empty, and had no accessible name, until the select script ran. `ComboboxTrigger` is named "Toggle" in the HTML, the name Data Slot gives it. Icon-only buttons in the button, collapsible, combobox, input group, item and tooltip examples have an accessible name.
|
|
14
|
+
|
|
15
|
+
- [#305](https://github.com/fulldotdev/ui/pull/305) [`18063bb`](https://github.com/fulldotdev/ui/commit/18063bb16e6e2d2329ed2dfae85200ae5876a748) Thanks [@silveltman](https://github.com/silveltman)! - Tabs show their initial panel in the server-rendered HTML, the one Data Slot selects: the `defaultValue` when its trigger is enabled, or else the first enabled trigger. Before, every panel stayed hidden until the tabs script started, so the page shifted when it did; it also works without JavaScript now.
|
|
16
|
+
|
|
3
17
|
## 0.25.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -92,18 +92,17 @@ Requires Node 24 (`.node-version`), pnpm 12 and [Vite+](https://viteplus.dev) (`
|
|
|
92
92
|
pnpm install # frozen lockfile in CI and on Netlify
|
|
93
93
|
pnpm dev # docs site at http://127.0.0.1:4321
|
|
94
94
|
vp run build # builds the docs and the React previews
|
|
95
|
-
vp run check
|
|
96
|
-
vp run check:source # the source checks every Ready PR runs
|
|
95
|
+
vp run check # the source checks every Ready PR runs
|
|
97
96
|
vp run test:unit # the tests in tests, which Ready PRs also run
|
|
98
|
-
vp run fix
|
|
97
|
+
vp run fix # Prettier and ESLint fixes
|
|
99
98
|
pnpm images # converts source photos in src to WebP
|
|
100
99
|
pnpm ui:add @shadcn/card # installs with the shadcn CLI, then runs Prettier
|
|
101
100
|
pnpm registry:build # regenerates public/r after registry changes
|
|
102
101
|
```
|
|
103
102
|
|
|
104
|
-
`vp run check
|
|
103
|
+
`vp run check` runs Prettier, TypeScript and `astro check`, ESLint, knip, the source photo check, and, specific to this registry, `registry:check` (the committed `public/r` must match a fresh build). `vp run test:unit` runs the tests in `tests`.
|
|
105
104
|
|
|
106
|
-
`pnpm ui:add` formats the project right after the install, so a later `vp run fix
|
|
105
|
+
`pnpm ui:add` formats the project right after the install, so a later `vp run fix` or `vp run check` does not change the installed components. A plain `pnpm dlx shadcn@latest add` leaves the CLI's own formatting, which the next format run may change.
|
|
107
106
|
|
|
108
107
|
## Contributing
|
|
109
108
|
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"snippets/ui-spinner.liquid": "84d48693f10cb8af4549cc0d71cd847a85da0e111f2ad64dae309c128c2a8c4a",
|
|
45
45
|
"snippets/ui-video.liquid": "14acea7c523198269a9165270decac21a43a5d69bf12bd248a76aceb2e9b26ed",
|
|
46
46
|
"assets/ui-video.css": "c1572853f48474f6291a70ccdb1085512700fc3dcbbdaebd71374b838ec67fee",
|
|
47
|
-
"snippets/ui-button.liquid": "
|
|
47
|
+
"snippets/ui-button.liquid": "22af5766cfc0eae2bb0a49c0209e89114efcd166006c37f1fc7501e473baebcb",
|
|
48
48
|
"snippets/ui-toggle.liquid": "c86100cf7c163c0d5bc81976fd794788f68fab2ebc5c0887d8042958ce020912",
|
|
49
49
|
"snippets/ui-logo.liquid": "5d6de7be3f7aab9e05c9533afef39ea0e9dce1b4ee12a13bf7b82780c973b126",
|
|
50
50
|
"snippets/ui-kbd.liquid": "024f34ed2932d183671f7fa44ff724a70ec17b766cf7e0d3f565f46f33ab2cf2",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"snippets/ui-dialog.liquid": "779bbcd609a69ed29a984df1f26f9ed80fd24d71c4ee3ead5f4daa055b28e9fb",
|
|
77
77
|
"snippets/ui-drawer.liquid": "16120fdd70fac393470c3936223e78ad5f81164e2b7616fd075e8e82098a17d5",
|
|
78
78
|
"snippets/ui-badge.liquid": "13d8b46cd5432783a9b986de76365c9fcc0e7fb30ad4f956ec386c1ae549ce99",
|
|
79
|
-
"snippets/ui-alert.liquid": "
|
|
79
|
+
"snippets/ui-alert.liquid": "392bf006b427178d4699272115317e0db934d881be9534b4638c492fa1825a83",
|
|
80
80
|
"snippets/ui-table.liquid": "6599d8b3bd193761571c2b71e499f78546ba5c2768d4e0a0a60cd0e348632e5b",
|
|
81
81
|
"snippets/ui-breadcrumb.liquid": "dafdeaf03286b386c90f8e72777de1946fba4718ee568bd85ca7bc768483a3ca",
|
|
82
82
|
"snippets/ui-aspect-ratio.liquid": "c8aae05fcd76af7ae768aedafd7e758533e2b52135b00ff72940896ad793f177",
|
|
@@ -35,8 +35,9 @@
|
|
|
35
35
|
color: var(--muted-foreground);
|
|
36
36
|
text-wrap: balance;
|
|
37
37
|
}
|
|
38
|
+
/* Vega's description at 90% falls below 4.5:1 on the card; it keeps the full color. */
|
|
38
39
|
[data-slot='alert'][data-variant='destructive'] [data-slot='alert-description'] {
|
|
39
|
-
color:
|
|
40
|
+
color: var(--destructive);
|
|
40
41
|
}
|
|
41
42
|
[data-slot='alert'] ul {
|
|
42
43
|
margin: 0;
|
|
@@ -145,8 +145,8 @@
|
|
|
145
145
|
color-mix(in oklch, var(--destructive) 10%, transparent),
|
|
146
146
|
color-mix(in oklch, var(--destructive) 20%, transparent)
|
|
147
147
|
);
|
|
148
|
-
/* Vega's destructive text on its own tint is about 4:1;
|
|
149
|
-
color: color-mix(in
|
|
148
|
+
/* Vega's destructive text on its own tint is about 4:1; a fifth of the foreground keeps 4.5:1, also on hover. In oklab it stays red. */
|
|
149
|
+
color: color-mix(in oklab, var(--destructive) 80%, var(--foreground));
|
|
150
150
|
}
|
|
151
151
|
:is([data-slot='button'], [data-button])[data-variant='destructive']:hover {
|
|
152
152
|
background-color: light-dark(
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fulldev-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.25.
|
|
4
|
+
"version": "0.25.3",
|
|
5
5
|
"description": "Open-source UI components for Astro, React and native Liquid",
|
|
6
6
|
"homepage": "https://ui.full.dev",
|
|
7
7
|
"bugs": "https://github.com/fulldotdev/ui/issues",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"imports": {
|
|
45
45
|
"#styles": "./scripts/styles.mjs",
|
|
46
|
-
"#liquid-fixture": "./tests/helpers/liquid.mjs"
|
|
46
|
+
"#liquid-fixture": "./tests/helpers/liquid.mjs",
|
|
47
|
+
"#analytics-exceptions": "./src/lib/analytics-exceptions.js"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@astrojs/check": "^0.9.10",
|
|
@@ -113,22 +114,21 @@
|
|
|
113
114
|
"tailwindcss": "^4.3.3",
|
|
114
115
|
"tw-animate-css": "^1.4.0",
|
|
115
116
|
"typescript": "~6.0.3",
|
|
116
|
-
"typescript-eslint": "^8.71.0"
|
|
117
|
+
"typescript-eslint": "^8.71.0",
|
|
118
|
+
"@netlify/vite-plugin": "3.0.1"
|
|
117
119
|
},
|
|
118
120
|
"scripts": {
|
|
119
121
|
"astro": "astro",
|
|
120
|
-
"dev": "
|
|
121
|
-
"
|
|
122
|
-
"preview": "pnpm stop && pnpm build && astro preview --host 127.0.0.1 --port 4321",
|
|
122
|
+
"dev": "astro dev --host 127.0.0.1 --port 4321",
|
|
123
|
+
"preview": "vp dlx --package=netlify-cli@27.12.1 netlify serve --context deploy-preview",
|
|
123
124
|
"typecheck": "tsc --noEmit --noCheck && astro check --minimumFailingSeverity hint && tsc --noEmit -p react",
|
|
124
|
-
"check
|
|
125
|
+
"check": "prettier --check . && pnpm typecheck && eslint . && knip && node scripts/images.ts --check && node scripts/liquid-theme-check.mjs && pnpm registry:check",
|
|
125
126
|
"test:unit": "node --test tests/*.test.mjs",
|
|
126
127
|
"test:browser": "node --test tests/browser/*.test.mjs",
|
|
127
|
-
"fix
|
|
128
|
+
"fix": "prettier --write . && eslint . --fix",
|
|
128
129
|
"images": "node scripts/images.ts",
|
|
129
130
|
"ui:add": "node scripts/ui-add.ts",
|
|
130
|
-
"build": "astro build && pnpm --dir react build",
|
|
131
|
-
"check:build": "html-validate dist && linkinator dist",
|
|
131
|
+
"build": "astro build && pnpm --dir react build && node scripts/check-build.ts",
|
|
132
132
|
"a11y": "pnpm build && playwright install chromium --only-shell && node scripts/a11y.mjs",
|
|
133
133
|
"registry:build": "pnpm registry:meta && node scripts/registry-adapt.mjs && shadcn build --output node_modules/.cache/fulldev-registry && node scripts/registry-styles.mjs && shadcn build -c react -o ../node_modules/.cache/fulldev-registry-react && node scripts/registry-styles.mjs node_modules/.cache/fulldev-registry-react react/registry.json public/r/react && pnpm registry:liquid && prettier --write registry.json react/registry.json liquid/registry.json public/r registry/styles/adapted --log-level warn",
|
|
134
134
|
"registry:check": "pnpm registry:validate && pnpm registry:build && git diff --exit-code -- registry.json react/registry.json liquid public/r registry/styles/adapted",
|
|
@@ -136,6 +136,7 @@
|
|
|
136
136
|
"release": "changeset version && pnpm install --lockfile-only",
|
|
137
137
|
"release:publish": "pnpm registry:check && changeset publish",
|
|
138
138
|
"registry:meta": "node scripts/registry-meta.mjs",
|
|
139
|
-
"registry:liquid": "node scripts/registry-liquid.mjs && shadcn build -c liquid -o ../public/r/liquid"
|
|
139
|
+
"registry:liquid": "node scripts/registry-liquid.mjs && shadcn build -c liquid -o ../public/r/liquid",
|
|
140
|
+
"test": "vp run test:unit"
|
|
140
141
|
}
|
|
141
142
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "snippets/ui-alert.liquid",
|
|
12
|
-
"content": "{% doc %}\n Fulldev UI alert styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n [data-slot='alert'] {\n display: grid;\n gap: calc(var(--spacing) * 0.5);\n padding: calc(var(--spacing) * 3) calc(var(--spacing) * 4);\n border: 1px solid var(--border);\n border-radius: var(--radius-lg);\n background: var(--card);\n color: var(--card-foreground);\n font-size: 0.875rem;\n text-align: left;\n }\n [data-slot='alert']:has(> .icon) {\n grid-template-columns: auto 1fr;\n column-gap: calc(var(--spacing) * 2.5);\n }\n [data-slot='alert'] > .icon {\n grid-row: span 2;\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n translate: 0 calc(var(--spacing) * 0.5);\n color: currentcolor;\n }\n [data-slot='alert'][data-variant='destructive'] {\n color: var(--destructive);\n }\n [data-slot='alert-title'] {\n font-weight: 500;\n }\n [data-slot='alert-description'] {\n color: var(--muted-foreground);\n text-wrap: balance;\n }\n [data-slot='alert'][data-variant='destructive'] [data-slot='alert-description'] {\n color:
|
|
12
|
+
"content": "{% doc %}\n Fulldev UI alert styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n [data-slot='alert'] {\n display: grid;\n gap: calc(var(--spacing) * 0.5);\n padding: calc(var(--spacing) * 3) calc(var(--spacing) * 4);\n border: 1px solid var(--border);\n border-radius: var(--radius-lg);\n background: var(--card);\n color: var(--card-foreground);\n font-size: 0.875rem;\n text-align: left;\n }\n [data-slot='alert']:has(> .icon) {\n grid-template-columns: auto 1fr;\n column-gap: calc(var(--spacing) * 2.5);\n }\n [data-slot='alert'] > .icon {\n grid-row: span 2;\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n translate: 0 calc(var(--spacing) * 0.5);\n color: currentcolor;\n }\n [data-slot='alert'][data-variant='destructive'] {\n color: var(--destructive);\n }\n [data-slot='alert-title'] {\n font-weight: 500;\n }\n [data-slot='alert-description'] {\n color: var(--muted-foreground);\n text-wrap: balance;\n }\n /* Vega's description at 90% falls below 4.5:1 on the card; it keeps the full color. */\n [data-slot='alert'][data-variant='destructive'] [data-slot='alert-description'] {\n color: var(--destructive);\n }\n [data-slot='alert'] ul {\n margin: 0;\n padding-left: calc(var(--spacing) * 4.5);\n }\n{% endstylesheet %}\n",
|
|
13
13
|
"type": "registry:file",
|
|
14
14
|
"target": "~/snippets/ui-alert.liquid"
|
|
15
15
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "snippets/ui-button.liquid",
|
|
12
|
-
"content": "{% doc %}\n A button or link. Omitting label registers its styles for native data-slot markup.\n\n @param {string} [label] - Plain text label, escaped.\n @param {string} [href] - Link destination.\n @param {string} [variant] - Visual variant.\n @param {string} [size] - Button size.\n @param {string} [type] - Native button type, defaults to button.\n @param {boolean} [disabled] - Disable the button.\n{% enddoc %}\n\n{% if label != blank %}\n {% if href != blank %}\n <a\n href='{{ href | escape }}'\n data-slot='button'\n data-variant='{{ variant | default: 'default' | escape }}'\n data-size='{{ size | default: 'default' | escape }}'\n >\n {{- label | escape -}}\n </a>\n {% else %}\n <button\n type='{{ type | default: 'button' | escape }}'\n data-slot='button'\n data-variant='{{ variant | default: 'default' | escape }}'\n data-size='{{ size | default: 'default' | escape }}'\n {% if disabled %}\n disabled\n {% endif %}\n >\n {{ label | escape }}\n </button>\n {% endif %}\n{% endif %}\n\n{% stylesheet %}\n /* A part that keeps a behavioral data-slot of its own, such as dialog-close or carousel-next,\n takes the button look with data-button and the same data-variant and data-size values. */\n /* Merchant labels can be long: a label wider than its container wraps inside the button, which\n then grows from its fixed height. One line keeps the Vega height in every size. */\n :is([data-slot='button'], [data-button]) {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n gap: calc(var(--spacing) * 1.5);\n max-width: 100%;\n min-height: calc(var(--spacing) * 9);\n padding: calc(var(--spacing) * 2) calc(var(--spacing) * 2.5);\n border: 1px solid transparent;\n border-radius: var(--radius-md);\n background: var(--primary);\n background-clip: padding-box;\n color: var(--primary-foreground);\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25;\n text-align: center;\n overflow-wrap: anywhere;\n text-decoration: none;\n text-underline-offset: 4px;\n cursor: pointer;\n user-select: none;\n outline: none;\n transition:\n background-color 150ms,\n color 150ms,\n border-color 150ms,\n box-shadow 150ms,\n translate 150ms;\n }\n :is([data-slot='button'], [data-button]) > .icon {\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n pointer-events: none;\n }\n :is([data-slot='button'], [data-button]):where(:has(> .icon:last-child:not(:first-child))) {\n padding-right: calc(var(--spacing) * 2);\n }\n :is([data-slot='button'], [data-button]):where(:has(> .icon:first-child:not(:last-child))) {\n padding-left: calc(var(--spacing) * 2);\n }\n :is([data-slot='button'], [data-button]):hover {\n background-color: color-mix(in oklch, var(--primary) 80%, transparent);\n }\n :is([data-slot='button'], [data-button]):focus-visible {\n border-color: var(--ring);\n box-shadow: var(--focus-ring);\n }\n :is([data-slot='button'], [data-button])[aria-invalid='true'] {\n border-color: light-dark(var(--destructive), color-mix(in oklch, var(--destructive) 50%, transparent));\n box-shadow: 0 0 0 3px\n light-dark(\n color-mix(in oklch, var(--destructive) 20%, transparent),\n color-mix(in oklch, var(--destructive) 40%, transparent)\n );\n }\n :is([data-slot='button'], [data-button]):active:not([aria-haspopup]) {\n translate: 0 1px;\n }\n :is([data-slot='button'], [data-button]):disabled,\n :is([data-slot='button'], [data-button])[aria-disabled='true'] {\n opacity: 0.5;\n pointer-events: none;\n }\n :is([data-slot='button'], [data-button])[data-variant='outline'] {\n border-color: light-dark(var(--border), var(--input));\n background-color: light-dark(var(--background), color-mix(in oklch, var(--input) 30%, transparent));\n color: var(--foreground);\n box-shadow: var(--shadow-xs);\n }\n :is([data-slot='button'], [data-button])[data-variant='outline']:hover {\n background-color: light-dark(var(--muted), color-mix(in oklch, var(--input) 50%, transparent));\n color: var(--foreground);\n }\n :is([data-slot='button'], [data-button])[data-variant='outline'][aria-expanded='true'] {\n background-color: var(--muted);\n }\n :is([data-slot='button'], [data-button])[data-variant='outline']:focus-visible {\n border-color: var(--ring);\n box-shadow: var(--focus-ring);\n }\n :is([data-slot='button'], [data-button])[data-variant='secondary'] {\n background-color: var(--secondary);\n color: var(--secondary-foreground);\n }\n :is([data-slot='button'], [data-button])[data-variant='secondary']:hover {\n background-color: color-mix(in oklch, var(--secondary), var(--foreground) 5%);\n }\n :is([data-slot='button'], [data-button])[data-variant='ghost'] {\n background-color: transparent;\n color: inherit;\n }\n :is([data-slot='button'], [data-button])[data-variant='ghost']:hover {\n background-color: light-dark(var(--muted), color-mix(in oklch, var(--muted) 50%, transparent));\n color: var(--foreground);\n }\n :is([data-slot='button'], [data-button])[data-variant='ghost'][aria-expanded='true'] {\n background-color: var(--muted);\n color: var(--foreground);\n }\n :is([data-slot='button'], [data-button])[data-variant='destructive'] {\n background-color: light-dark(\n color-mix(in oklch, var(--destructive) 10%, transparent),\n color-mix(in oklch, var(--destructive) 20%, transparent)\n );\n /* Vega's destructive text on its own tint is about 4:1;
|
|
12
|
+
"content": "{% doc %}\n A button or link. Omitting label registers its styles for native data-slot markup.\n\n @param {string} [label] - Plain text label, escaped.\n @param {string} [href] - Link destination.\n @param {string} [variant] - Visual variant.\n @param {string} [size] - Button size.\n @param {string} [type] - Native button type, defaults to button.\n @param {boolean} [disabled] - Disable the button.\n{% enddoc %}\n\n{% if label != blank %}\n {% if href != blank %}\n <a\n href='{{ href | escape }}'\n data-slot='button'\n data-variant='{{ variant | default: 'default' | escape }}'\n data-size='{{ size | default: 'default' | escape }}'\n >\n {{- label | escape -}}\n </a>\n {% else %}\n <button\n type='{{ type | default: 'button' | escape }}'\n data-slot='button'\n data-variant='{{ variant | default: 'default' | escape }}'\n data-size='{{ size | default: 'default' | escape }}'\n {% if disabled %}\n disabled\n {% endif %}\n >\n {{ label | escape }}\n </button>\n {% endif %}\n{% endif %}\n\n{% stylesheet %}\n /* A part that keeps a behavioral data-slot of its own, such as dialog-close or carousel-next,\n takes the button look with data-button and the same data-variant and data-size values. */\n /* Merchant labels can be long: a label wider than its container wraps inside the button, which\n then grows from its fixed height. One line keeps the Vega height in every size. */\n :is([data-slot='button'], [data-button]) {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n gap: calc(var(--spacing) * 1.5);\n max-width: 100%;\n min-height: calc(var(--spacing) * 9);\n padding: calc(var(--spacing) * 2) calc(var(--spacing) * 2.5);\n border: 1px solid transparent;\n border-radius: var(--radius-md);\n background: var(--primary);\n background-clip: padding-box;\n color: var(--primary-foreground);\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25;\n text-align: center;\n overflow-wrap: anywhere;\n text-decoration: none;\n text-underline-offset: 4px;\n cursor: pointer;\n user-select: none;\n outline: none;\n transition:\n background-color 150ms,\n color 150ms,\n border-color 150ms,\n box-shadow 150ms,\n translate 150ms;\n }\n :is([data-slot='button'], [data-button]) > .icon {\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n pointer-events: none;\n }\n :is([data-slot='button'], [data-button]):where(:has(> .icon:last-child:not(:first-child))) {\n padding-right: calc(var(--spacing) * 2);\n }\n :is([data-slot='button'], [data-button]):where(:has(> .icon:first-child:not(:last-child))) {\n padding-left: calc(var(--spacing) * 2);\n }\n :is([data-slot='button'], [data-button]):hover {\n background-color: color-mix(in oklch, var(--primary) 80%, transparent);\n }\n :is([data-slot='button'], [data-button]):focus-visible {\n border-color: var(--ring);\n box-shadow: var(--focus-ring);\n }\n :is([data-slot='button'], [data-button])[aria-invalid='true'] {\n border-color: light-dark(var(--destructive), color-mix(in oklch, var(--destructive) 50%, transparent));\n box-shadow: 0 0 0 3px\n light-dark(\n color-mix(in oklch, var(--destructive) 20%, transparent),\n color-mix(in oklch, var(--destructive) 40%, transparent)\n );\n }\n :is([data-slot='button'], [data-button]):active:not([aria-haspopup]) {\n translate: 0 1px;\n }\n :is([data-slot='button'], [data-button]):disabled,\n :is([data-slot='button'], [data-button])[aria-disabled='true'] {\n opacity: 0.5;\n pointer-events: none;\n }\n :is([data-slot='button'], [data-button])[data-variant='outline'] {\n border-color: light-dark(var(--border), var(--input));\n background-color: light-dark(var(--background), color-mix(in oklch, var(--input) 30%, transparent));\n color: var(--foreground);\n box-shadow: var(--shadow-xs);\n }\n :is([data-slot='button'], [data-button])[data-variant='outline']:hover {\n background-color: light-dark(var(--muted), color-mix(in oklch, var(--input) 50%, transparent));\n color: var(--foreground);\n }\n :is([data-slot='button'], [data-button])[data-variant='outline'][aria-expanded='true'] {\n background-color: var(--muted);\n }\n :is([data-slot='button'], [data-button])[data-variant='outline']:focus-visible {\n border-color: var(--ring);\n box-shadow: var(--focus-ring);\n }\n :is([data-slot='button'], [data-button])[data-variant='secondary'] {\n background-color: var(--secondary);\n color: var(--secondary-foreground);\n }\n :is([data-slot='button'], [data-button])[data-variant='secondary']:hover {\n background-color: color-mix(in oklch, var(--secondary), var(--foreground) 5%);\n }\n :is([data-slot='button'], [data-button])[data-variant='ghost'] {\n background-color: transparent;\n color: inherit;\n }\n :is([data-slot='button'], [data-button])[data-variant='ghost']:hover {\n background-color: light-dark(var(--muted), color-mix(in oklch, var(--muted) 50%, transparent));\n color: var(--foreground);\n }\n :is([data-slot='button'], [data-button])[data-variant='ghost'][aria-expanded='true'] {\n background-color: var(--muted);\n color: var(--foreground);\n }\n :is([data-slot='button'], [data-button])[data-variant='destructive'] {\n background-color: light-dark(\n color-mix(in oklch, var(--destructive) 10%, transparent),\n color-mix(in oklch, var(--destructive) 20%, transparent)\n );\n /* Vega's destructive text on its own tint is about 4:1; a fifth of the foreground keeps 4.5:1, also on hover. In oklab it stays red. */\n color: color-mix(in oklab, var(--destructive) 80%, var(--foreground));\n }\n :is([data-slot='button'], [data-button])[data-variant='destructive']:hover {\n background-color: light-dark(\n color-mix(in oklch, var(--destructive) 20%, transparent),\n color-mix(in oklch, var(--destructive) 30%, transparent)\n );\n }\n :is([data-slot='button'], [data-button])[data-variant='destructive']:focus-visible {\n border-color: color-mix(in oklch, var(--destructive) 40%, transparent);\n box-shadow: 0 0 0 3px\n light-dark(\n color-mix(in oklch, var(--destructive) 20%, transparent),\n color-mix(in oklch, var(--destructive) 40%, transparent)\n );\n }\n :is([data-slot='button'], [data-button])[data-variant='link'] {\n background: none;\n color: var(--primary);\n }\n :is([data-slot='button'], [data-button])[data-variant='link']:hover {\n text-decoration: underline;\n }\n /* A fixed white button on photos and video. */\n :is([data-slot='button'], [data-button])[data-variant='media'] {\n background-color: var(--media-button);\n color: var(--media-button-foreground);\n }\n :is([data-slot='button'], [data-button])[data-variant='media']:hover {\n background-color: var(--media-button-hover);\n }\n /* The secondary button on photos: a translucent white fill. */\n :is([data-slot='button'], [data-button])[data-variant='media-secondary'] {\n background-color: var(--media-secondary);\n color: var(--on-media);\n }\n :is([data-slot='button'], [data-button])[data-variant='media-secondary']:hover {\n background-color: var(--media-secondary-hover);\n }\n :is([data-slot='button'], [data-button])[data-size='xs'] {\n gap: var(--spacing);\n min-height: calc(var(--spacing) * 6);\n padding: calc(var(--spacing) * 0.75) calc(var(--spacing) * 2);\n border-radius: min(var(--radius-md), 8px);\n font-size: 0.75rem;\n }\n :is([data-slot='button'], [data-button])[data-size='xs'] > .icon {\n width: calc(var(--spacing) * 3);\n height: calc(var(--spacing) * 3);\n }\n :is([data-slot='button'], [data-button])[data-size='sm'] {\n gap: var(--spacing);\n min-height: calc(var(--spacing) * 8);\n padding-block: calc(var(--spacing) * 1.5);\n border-radius: min(var(--radius-md), 10px);\n }\n :is([data-slot='button'], [data-button])[data-size='lg'] {\n min-height: calc(var(--spacing) * 10);\n }\n :is([data-slot='button'], [data-button])[data-size^='icon'] {\n width: calc(var(--spacing) * 9);\n height: calc(var(--spacing) * 9);\n min-height: 0;\n padding: 0;\n }\n :is([data-slot='button'], [data-button])[data-size='icon-xs'] {\n width: calc(var(--spacing) * 6);\n height: calc(var(--spacing) * 6);\n border-radius: min(var(--radius-md), 8px);\n }\n :is([data-slot='button'], [data-button])[data-size='icon-xs'] > .icon {\n width: calc(var(--spacing) * 3);\n height: calc(var(--spacing) * 3);\n }\n :is([data-slot='button'], [data-button])[data-size='icon-sm'] {\n width: calc(var(--spacing) * 8);\n height: calc(var(--spacing) * 8);\n border-radius: min(var(--radius-md), 10px);\n }\n :is([data-slot='button'], [data-button])[data-size='icon-lg'] {\n width: calc(var(--spacing) * 10);\n height: calc(var(--spacing) * 10);\n }\n{% endstylesheet %}\n",
|
|
13
13
|
"type": "registry:file",
|
|
14
14
|
"target": "~/snippets/ui-button.liquid"
|
|
15
15
|
}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"path": "assets/ui-manifest.json",
|
|
77
|
-
"content": "{\n \"registry\": \"https://ui.full.dev/r/liquid/\",\n \"files\": {\n \"assets/ui-tokens.css\": \"55a8f2810ab4a1498ca3dd2f6e7dc89009c60e2402ddfcb95783b6eba996c374\",\n \"snippets/ui-base.liquid\": \"bc55195b5b6c82e63deeeed1255fd19b434c47866815f82b95b9202421256d34\",\n \"snippets/ui-init.liquid\": \"98f56067cf51e4cb2cd3e10ede7c00304c73ce57fe5b5a0270c0d8a9e448f7af\",\n \"assets/ui-licenses.json\": \"a1fad640a342c9ccd79d233a3aed9631cbf5525ee81e67f49322d0a0f0c2effc\",\n \"assets/ui-carousel.js\": \"3337447a9e0051cebbc1726bca7c7966de1035819fb8e0b676383b85f1917632\",\n \"assets/ui-controls.js\": \"cf51f6d8b23c93e30d3355e993ff21a1aee79f38facfa413bed64e9815df255d\",\n \"assets/ui-lifecycle.js\": \"78c975473620171c01b1289bf5cdce56a5626c847437fa5168fb91a4300260d6\",\n \"assets/ui-start.js\": \"738d7e171b5d7993bfd0a169e4382b2db08340f52a87059b94d27e1fe3606500\",\n \"assets/data-slot-core.js\": \"d2879cc3a2f05a7867763b937bad3bd4a369f54670989ce535367cb690fb66e6\",\n \"assets/data-slot-dialog.js\": \"a5201f452700d04145b5156cc46880d2b5bdf7521b03ff9521c3f7693ee1b5d5\",\n \"assets/data-slot-command.js\": \"f7944120617676b14dfda2ea3f3e8a15767e0766d5312b4ed9519affe9b7444a\",\n \"assets/data-slot-navigation-menu.js\": \"f9b42a9bceca8e1103718d43aa5f0d141ab63d38278cb121e790a2c80e827b68\",\n \"assets/data-slot-accordion.js\": \"fe6b0ac2c87a2e31582e5e88c509e0b508f41d0065d0a420407999ad210e6a27\",\n \"assets/data-slot-tabs.js\": \"1f187134bba755cfda9d35cf9f16174c1a183862d32d100f270f4177033058c7\",\n \"assets/data-slot-combobox.js\": \"b5f2ed9d65a43d836c59c0d4dc33c16ab12ef9fa05d510078b5d62517d854db6\",\n \"assets/data-slot-carousel.js\": \"d83ef938d3b62dc3652b123428ca2261e03fb2ba1133992b0f5545a974238d03\",\n \"assets/data-slot-alert-dialog.js\": \"1caee9a86bb2a816ea32bc1a48b82f3cc588ec3c563ebc443f836ab1dae2f618\",\n \"assets/data-slot-collapsible.js\": \"c42f76e3dfeff4570eb2f5104434fbffd3ef55710833e888965c590ce59f4f9f\",\n \"assets/data-slot-drawer.js\": \"c9343b26ea27193cc1d2da3e41bf452005bc2e534151fa1a762b2b6535de28d0\",\n \"assets/data-slot-dropdown-menu.js\": \"543c5717c9ba8363bbab4c0a11005980d75d4baaed79cf7123c7bcfe3ec8720b\",\n \"assets/data-slot-hover-card.js\": \"86e1bfa5d4822f180f3501ca7cc51bf044d4e917a7ebdb7a10b70006dba6467f\",\n \"assets/data-slot-popover.js\": \"526e30d663381329a7a6394eae886224024034d0abf96f888c932bb4b8c1b1cb\",\n \"assets/data-slot-radio-group.js\": \"7a9b90166de80d79ee42aa2df73e4d8179e9d291cb30b3095c7d8332375b0499\",\n \"assets/data-slot-select.js\": \"13d1a3fbe90f4b3b830d987b6a28267897faa3589bf00e64edca4938acbf406b\",\n \"assets/data-slot-slider.js\": \"0d10131aa95450aa1269234103ead8d805d6abdf9e0683510f4fcf58ab0f1efa\",\n \"assets/data-slot-switch.js\": \"0d5b09a89429880f61aeb540be5f87383ba5c6beb261ad468e9a6cf18e45b6a0\",\n \"assets/data-slot-toast.js\": \"acfd86824d0ff37fbd62d0c48672e527d7391412780730e9a3a8d61268b3aaf2\",\n \"assets/data-slot-toggle.js\": \"7a651d578cb83be842c8e59fe1a2cd124594b1fd6c942faf0a33cf9e57326947\",\n \"assets/data-slot-toggle-group.js\": \"c1f2fc9712974e63e4e44c97ab2a1ec8bc3c3cb73c1afb4578b085fed11977f1\",\n \"assets/data-slot-tooltip.js\": \"5a9e51a54669153620eb3512e74487eac12ababe3331aff7dfed6c717b8b93c0\",\n \"snippets/ui-runtime.liquid\": \"62ae98f4ad16dc0ca406d96bbabb373cd30a63dd385e3614da0dcd2e63d0f17c\",\n \"assets/ui-motion.js\": \"2252a6794ddb162b73ee1640af212292b8c520e98ae09ea862b479078f81d3d1\",\n \"snippets/ui-banner.liquid\": \"9965b12e9a2036aca6e35f1327da8a240c894a6fd91d99f37e77107818d271a3\",\n \"snippets/ui-tabs.liquid\": \"5b57bb3d6400e44ef9343f7b45d9baf2d8581d678ccc64764be60164160687eb\",\n \"snippets/ui-form.liquid\": \"1c002d21c441e217a8f3d64268d429c97e4785af118eb7f7abb5ff1c3d10a3b6\",\n \"assets/ui-form.css\": \"ab0dd70553818fe0799e393f6811e949884eca9f44d9ceff4c2b333c0bf724b4\",\n \"snippets/ui-select.liquid\": \"2d8c99759161a024285d1b54c0ca166dc7b13c97596497351253e945b5e52ee2\",\n \"snippets/ui-field.liquid\": \"cf73aaaf3e27bc9d121dd089317610fbd08b9550a1d5fb0738337c6817879309\",\n \"assets/ui-field.css\": \"96f846a52ab0b832a9eca70ef430e5fd14664a3367d04842de320a82e622722b\",\n \"snippets/ui-item.liquid\": \"fe03c1a3e6df09192c3ac7a08520b0fc1c629a597a029d193ff91655cb7ceac0\",\n \"snippets/ui-spinner.liquid\": \"84d48693f10cb8af4549cc0d71cd847a85da0e111f2ad64dae309c128c2a8c4a\",\n \"snippets/ui-video.liquid\": \"14acea7c523198269a9165270decac21a43a5d69bf12bd248a76aceb2e9b26ed\",\n \"assets/ui-video.css\": \"c1572853f48474f6291a70ccdb1085512700fc3dcbbdaebd71374b838ec67fee\",\n \"snippets/ui-button.liquid\": \"5dd981b8e5de94d5dac3fd367a3d31c0553a2ea2f72aefda6ee2e07fde876af8\",\n \"snippets/ui-toggle.liquid\": \"c86100cf7c163c0d5bc81976fd794788f68fab2ebc5c0887d8042958ce020912\",\n \"snippets/ui-logo.liquid\": \"5d6de7be3f7aab9e05c9533afef39ea0e9dce1b4ee12a13bf7b82780c973b126\",\n \"snippets/ui-kbd.liquid\": \"024f34ed2932d183671f7fa44ff724a70ec17b766cf7e0d3f565f46f33ab2cf2\",\n \"snippets/ui-rating.liquid\": \"aa57adc5a5508b368da78023b242694e6ce924b6e9e5407c141a5030a414bf1d\",\n \"assets/ui-rating.css\": \"e5efea2a9edaea78522f20ebd9e9d01abe8a2fcd310c193239adf80ec33b4975\",\n \"snippets/ui-tooltip.liquid\": \"d2863a0da3090c73dda10d8615b84fc50fab64373a466fbf4e4e743cfb083c96\",\n \"snippets/ui-avatar.liquid\": \"9bfb5d5f535857cc45f31afbc91c855e94972bab07ad3b4fe2dc0d241106385d\",\n \"snippets/ui-empty.liquid\": \"0e7fb5b68d50abcf7213304034762b4dd535c791dd6f4dc517100145e04b0cde\",\n \"snippets/ui-alert-dialog.liquid\": \"f739374035ffa0f3bca2c4b6d946710751c8268c8f1dde535251be9c2c7b0cd0\",\n \"snippets/ui-navigation-menu.liquid\": \"52aecbb36b0031810a85a99f5d4439e852dc1ba3a872b9525dd75c8df8b5a84e\",\n \"assets/ui-navigation-menu.css\": \"29a47ce0eb549e58cc8195dcb656bd2cef56360178c76acfc2d481a110463ca6\",\n \"snippets/ui-typography.liquid\": \"b03dc93c4de6636164a206c95979caa6fe9ab7cf8d1c24d75611416259da7979\",\n \"assets/ui-typography.css\": \"4363ea0774e3c76a0154b1c586a6270a4fbd31b7794fe9549977f41563f54d78\",\n \"snippets/ui-toc.liquid\": \"04038e0870112b2335b80b4092814915105b31d08cdd36ecf1f4de1761f66acf\",\n \"snippets/ui-icon.liquid\": \"ca75a9485eb33cdb31a3a4e2e5ca03ce74d4995dbd1696d964832a87602bf3ca\",\n \"assets/ui-icon.css\": \"cfb1a47905cbd9c25b635c96926a77f8eed983a4aca62fdce758345dcc792add\",\n \"snippets/ui-combobox.liquid\": \"bacd605b44237512a74d34119d01432440b76ae60218dae6a6f37f98b32e3e00\",\n \"snippets/ui-toast.liquid\": \"bb032d90d6084fb15e12da22777635b80d09a06402513c46c89e853e3ede0405\",\n \"assets/ui-toast.css\": \"c322fab210a202fa434695025550495dbdc93e688ed7ae39303fea9830864d0b\",\n \"snippets/ui-header.liquid\": \"cc14effb4e3b6c4ac397e306e4ebd270a31b3415cc12ffbeb6cd38f411eaba80\",\n \"snippets/ui-command.liquid\": \"4a37f59dc0039fa1505de764472212d6cd7c4e5c52b737a1700e928db286f233\",\n \"snippets/ui-accordion.liquid\": \"4b58c83ae13e14e03a3129a2dccbd02eeafa90c1e48edbbf9af2dc412bf3aabf\",\n \"assets/ui-accordion.css\": \"430924440bd0f1d49ceb72baffc77404c9411c31c24b940d75861daba2649e83\",\n \"snippets/ui-slider.liquid\": \"f2de1fb9099de77bf291455447bc86b2578781e7cf0efdf12117fb4575e0b0e6\",\n \"snippets/ui-input.liquid\": \"d29e280ce1d08c7450902e69a73a0b7aa125f1cb662c50dbfc80a4a4fef0a85e\",\n \"snippets/ui-input-group.liquid\": \"b862a0c63e23dc7ae4ffe3a8e057a87f38fa8e6c8842ddf3c86b826de0283d70\",\n \"snippets/ui-triggers.liquid\": \"ba9c7b802fb0a2aba0e9cc145a9dd44134964afb53e5363cf9e0ae138b906cc9\",\n \"snippets/ui-toggle-group.liquid\": \"2d61e0b9bc746e05834157f5a75d23123f02bc2df737412e4f6099844afc4f49\",\n \"snippets/ui-dialog.liquid\": \"779bbcd609a69ed29a984df1f26f9ed80fd24d71c4ee3ead5f4daa055b28e9fb\",\n \"snippets/ui-drawer.liquid\": \"16120fdd70fac393470c3936223e78ad5f81164e2b7616fd075e8e82098a17d5\",\n \"snippets/ui-badge.liquid\": \"13d8b46cd5432783a9b986de76365c9fcc0e7fb30ad4f956ec386c1ae549ce99\",\n \"snippets/ui-alert.liquid\": \"7530d324ac1fb4645bba0a23780fbeacc67544f8bad3ed9e367debd88c0365b5\",\n \"snippets/ui-table.liquid\": \"6599d8b3bd193761571c2b71e499f78546ba5c2768d4e0a0a60cd0e348632e5b\",\n \"snippets/ui-breadcrumb.liquid\": \"dafdeaf03286b386c90f8e72777de1946fba4718ee568bd85ca7bc768483a3ca\",\n \"snippets/ui-aspect-ratio.liquid\": \"c8aae05fcd76af7ae768aedafd7e758533e2b52135b00ff72940896ad793f177\",\n \"snippets/ui-price.liquid\": \"96156754aee3a04aa3ae7084a14470000213e8be14468c4937e9f3a87e348234\",\n \"assets/ui-price.css\": \"95c947e219621102b704164e48a83e381e6e2b27b99311a294e076745b39a36f\",\n \"snippets/ui-radio-group.liquid\": \"af9978e18716cc86d03ed21dece8304992e74a4fab88e12069b0648cfd944492\",\n \"snippets/ui-checkbox.liquid\": \"0e4dd1738b355c5a93533e0b813e2e6c72f7491c289d65aa7b6435be1c599006\",\n \"snippets/ui-switch.liquid\": \"84ed60c777e77daec8b5fe6f2ee434877d51224235dc1bc2e17927cd182fe646\",\n \"snippets/ui-skeleton.liquid\": \"1e30245f6577f73d28f4badbc293934656882a29d5dec1d2f74ef95f3bcede2c\",\n \"snippets/ui-separator.liquid\": \"90b1d2795666b6c51f35645ca8d07659f2c4868fe9553e233cddb4e962095f6e\",\n \"snippets/ui-card.liquid\": \"581a46843f1280ebace0423ee84289b40fbd46142e6a9ab3940f63eca0e4c5f2\",\n \"assets/ui-card.css\": \"ee7e4192ec814066d0c9838f810ae4ca267b9f071b7fa945c43226d46b0f8dc9\",\n \"snippets/ui-pagination.liquid\": \"30943c00686e1a23d92865465b38c964e059b14ae3a20fb7fe151824a73773eb\",\n \"snippets/ui-popup.liquid\": \"840f938aa2a331e4e7d55c659f25e841dcfb1bf5c5cadace6263243352ff8359\",\n \"snippets/ui-sheet.liquid\": \"0de705bed685bf78fa3af4517c947b38d62a1aa56bf29356c0a201b64db17614\",\n \"snippets/ui-carousel.liquid\": \"59dc0c06b2a9f2f779ca22b3ff4b005071d4909aba052d6f8f0a1aa19e84c2ce\",\n \"assets/ui-carousel.css\": \"5317c251b3d3599ba330947fc9709ea50acfb858a5d7e08573b5d34ada2f3bf4\",\n \"snippets/ui-attachment.liquid\": \"6881df7cdb1b27462d8cce7c17c0b4ed4dd860d62535e1daa81378a57bb69ddf\",\n \"snippets/ui-marquee.liquid\": \"47d5df8f1ff46a2cd48a132986c2ba199c9e19b485e62fc3e0d19091d4baaab1\",\n \"assets/ui-marquee.css\": \"ef13b83f3dbcd6685fcee3dba14238386d0f34bc2266a5326c0b6f2d40a23fce\",\n \"snippets/ui-invalid-controls.liquid\": \"a169e8244cc86f5431f902f7a73b37188051ba8f2ef3e323830462dae5aed066\",\n \"snippets/ui-section.liquid\": \"da358cd87447457f3675b035b48556103d86cd11e0b2240ae2800e4c9ea54bdc\",\n \"assets/ui-section.css\": \"f4936a02aaf1927ccced898886857855e4b5e95fafe5c2a52748ecbbe87b6621\",\n \"snippets/ui-button-group.liquid\": \"a2790f8da0f8b37acc1ed558ba1548ea250a5b93e1b2dfbd11eb150f3f02783a\",\n \"snippets/ui-collapsible.liquid\": \"e6107a03d00b8cc75bb03206e64b9aa7f2989d982c0408b398b62067c6df450a\",\n \"snippets/ui-dropdown-menu.liquid\": \"25b31e09e3e7bfee9a397ca4de6e310754844c55e71639eadba917b0f4e6d2e5\",\n \"snippets/ui-popover.liquid\": \"44ff93d72eaad409f56f8a84ce25715e2c3633f2ac49ba7a414767c6dbe2ee47\",\n \"snippets/ui-hover-card.liquid\": \"ba4133d352fa14296743138c99f3694015bafe953751b8e42155f047c4beb9f0\",\n \"snippets/ui.liquid\": \"30679056b2eafefbaeef5ecd271604951676893a65a8eccb0f970c787a67b900\"\n }\n}\n",
|
|
77
|
+
"content": "{\n \"registry\": \"https://ui.full.dev/r/liquid/\",\n \"files\": {\n \"assets/ui-tokens.css\": \"55a8f2810ab4a1498ca3dd2f6e7dc89009c60e2402ddfcb95783b6eba996c374\",\n \"snippets/ui-base.liquid\": \"bc55195b5b6c82e63deeeed1255fd19b434c47866815f82b95b9202421256d34\",\n \"snippets/ui-init.liquid\": \"98f56067cf51e4cb2cd3e10ede7c00304c73ce57fe5b5a0270c0d8a9e448f7af\",\n \"assets/ui-licenses.json\": \"a1fad640a342c9ccd79d233a3aed9631cbf5525ee81e67f49322d0a0f0c2effc\",\n \"assets/ui-carousel.js\": \"3337447a9e0051cebbc1726bca7c7966de1035819fb8e0b676383b85f1917632\",\n \"assets/ui-controls.js\": \"cf51f6d8b23c93e30d3355e993ff21a1aee79f38facfa413bed64e9815df255d\",\n \"assets/ui-lifecycle.js\": \"78c975473620171c01b1289bf5cdce56a5626c847437fa5168fb91a4300260d6\",\n \"assets/ui-start.js\": \"738d7e171b5d7993bfd0a169e4382b2db08340f52a87059b94d27e1fe3606500\",\n \"assets/data-slot-core.js\": \"d2879cc3a2f05a7867763b937bad3bd4a369f54670989ce535367cb690fb66e6\",\n \"assets/data-slot-dialog.js\": \"a5201f452700d04145b5156cc46880d2b5bdf7521b03ff9521c3f7693ee1b5d5\",\n \"assets/data-slot-command.js\": \"f7944120617676b14dfda2ea3f3e8a15767e0766d5312b4ed9519affe9b7444a\",\n \"assets/data-slot-navigation-menu.js\": \"f9b42a9bceca8e1103718d43aa5f0d141ab63d38278cb121e790a2c80e827b68\",\n \"assets/data-slot-accordion.js\": \"fe6b0ac2c87a2e31582e5e88c509e0b508f41d0065d0a420407999ad210e6a27\",\n \"assets/data-slot-tabs.js\": \"1f187134bba755cfda9d35cf9f16174c1a183862d32d100f270f4177033058c7\",\n \"assets/data-slot-combobox.js\": \"b5f2ed9d65a43d836c59c0d4dc33c16ab12ef9fa05d510078b5d62517d854db6\",\n \"assets/data-slot-carousel.js\": \"d83ef938d3b62dc3652b123428ca2261e03fb2ba1133992b0f5545a974238d03\",\n \"assets/data-slot-alert-dialog.js\": \"1caee9a86bb2a816ea32bc1a48b82f3cc588ec3c563ebc443f836ab1dae2f618\",\n \"assets/data-slot-collapsible.js\": \"c42f76e3dfeff4570eb2f5104434fbffd3ef55710833e888965c590ce59f4f9f\",\n \"assets/data-slot-drawer.js\": \"c9343b26ea27193cc1d2da3e41bf452005bc2e534151fa1a762b2b6535de28d0\",\n \"assets/data-slot-dropdown-menu.js\": \"543c5717c9ba8363bbab4c0a11005980d75d4baaed79cf7123c7bcfe3ec8720b\",\n \"assets/data-slot-hover-card.js\": \"86e1bfa5d4822f180f3501ca7cc51bf044d4e917a7ebdb7a10b70006dba6467f\",\n \"assets/data-slot-popover.js\": \"526e30d663381329a7a6394eae886224024034d0abf96f888c932bb4b8c1b1cb\",\n \"assets/data-slot-radio-group.js\": \"7a9b90166de80d79ee42aa2df73e4d8179e9d291cb30b3095c7d8332375b0499\",\n \"assets/data-slot-select.js\": \"13d1a3fbe90f4b3b830d987b6a28267897faa3589bf00e64edca4938acbf406b\",\n \"assets/data-slot-slider.js\": \"0d10131aa95450aa1269234103ead8d805d6abdf9e0683510f4fcf58ab0f1efa\",\n \"assets/data-slot-switch.js\": \"0d5b09a89429880f61aeb540be5f87383ba5c6beb261ad468e9a6cf18e45b6a0\",\n \"assets/data-slot-toast.js\": \"acfd86824d0ff37fbd62d0c48672e527d7391412780730e9a3a8d61268b3aaf2\",\n \"assets/data-slot-toggle.js\": \"7a651d578cb83be842c8e59fe1a2cd124594b1fd6c942faf0a33cf9e57326947\",\n \"assets/data-slot-toggle-group.js\": \"c1f2fc9712974e63e4e44c97ab2a1ec8bc3c3cb73c1afb4578b085fed11977f1\",\n \"assets/data-slot-tooltip.js\": \"5a9e51a54669153620eb3512e74487eac12ababe3331aff7dfed6c717b8b93c0\",\n \"snippets/ui-runtime.liquid\": \"62ae98f4ad16dc0ca406d96bbabb373cd30a63dd385e3614da0dcd2e63d0f17c\",\n \"assets/ui-motion.js\": \"2252a6794ddb162b73ee1640af212292b8c520e98ae09ea862b479078f81d3d1\",\n \"snippets/ui-banner.liquid\": \"9965b12e9a2036aca6e35f1327da8a240c894a6fd91d99f37e77107818d271a3\",\n \"snippets/ui-tabs.liquid\": \"5b57bb3d6400e44ef9343f7b45d9baf2d8581d678ccc64764be60164160687eb\",\n \"snippets/ui-form.liquid\": \"1c002d21c441e217a8f3d64268d429c97e4785af118eb7f7abb5ff1c3d10a3b6\",\n \"assets/ui-form.css\": \"ab0dd70553818fe0799e393f6811e949884eca9f44d9ceff4c2b333c0bf724b4\",\n \"snippets/ui-select.liquid\": \"2d8c99759161a024285d1b54c0ca166dc7b13c97596497351253e945b5e52ee2\",\n \"snippets/ui-field.liquid\": \"cf73aaaf3e27bc9d121dd089317610fbd08b9550a1d5fb0738337c6817879309\",\n \"assets/ui-field.css\": \"96f846a52ab0b832a9eca70ef430e5fd14664a3367d04842de320a82e622722b\",\n \"snippets/ui-item.liquid\": \"fe03c1a3e6df09192c3ac7a08520b0fc1c629a597a029d193ff91655cb7ceac0\",\n \"snippets/ui-spinner.liquid\": \"84d48693f10cb8af4549cc0d71cd847a85da0e111f2ad64dae309c128c2a8c4a\",\n \"snippets/ui-video.liquid\": \"14acea7c523198269a9165270decac21a43a5d69bf12bd248a76aceb2e9b26ed\",\n \"assets/ui-video.css\": \"c1572853f48474f6291a70ccdb1085512700fc3dcbbdaebd71374b838ec67fee\",\n \"snippets/ui-button.liquid\": \"22af5766cfc0eae2bb0a49c0209e89114efcd166006c37f1fc7501e473baebcb\",\n \"snippets/ui-toggle.liquid\": \"c86100cf7c163c0d5bc81976fd794788f68fab2ebc5c0887d8042958ce020912\",\n \"snippets/ui-logo.liquid\": \"5d6de7be3f7aab9e05c9533afef39ea0e9dce1b4ee12a13bf7b82780c973b126\",\n \"snippets/ui-kbd.liquid\": \"024f34ed2932d183671f7fa44ff724a70ec17b766cf7e0d3f565f46f33ab2cf2\",\n \"snippets/ui-rating.liquid\": \"aa57adc5a5508b368da78023b242694e6ce924b6e9e5407c141a5030a414bf1d\",\n \"assets/ui-rating.css\": \"e5efea2a9edaea78522f20ebd9e9d01abe8a2fcd310c193239adf80ec33b4975\",\n \"snippets/ui-tooltip.liquid\": \"d2863a0da3090c73dda10d8615b84fc50fab64373a466fbf4e4e743cfb083c96\",\n \"snippets/ui-avatar.liquid\": \"9bfb5d5f535857cc45f31afbc91c855e94972bab07ad3b4fe2dc0d241106385d\",\n \"snippets/ui-empty.liquid\": \"0e7fb5b68d50abcf7213304034762b4dd535c791dd6f4dc517100145e04b0cde\",\n \"snippets/ui-alert-dialog.liquid\": \"f739374035ffa0f3bca2c4b6d946710751c8268c8f1dde535251be9c2c7b0cd0\",\n \"snippets/ui-navigation-menu.liquid\": \"52aecbb36b0031810a85a99f5d4439e852dc1ba3a872b9525dd75c8df8b5a84e\",\n \"assets/ui-navigation-menu.css\": \"29a47ce0eb549e58cc8195dcb656bd2cef56360178c76acfc2d481a110463ca6\",\n \"snippets/ui-typography.liquid\": \"b03dc93c4de6636164a206c95979caa6fe9ab7cf8d1c24d75611416259da7979\",\n \"assets/ui-typography.css\": \"4363ea0774e3c76a0154b1c586a6270a4fbd31b7794fe9549977f41563f54d78\",\n \"snippets/ui-toc.liquid\": \"04038e0870112b2335b80b4092814915105b31d08cdd36ecf1f4de1761f66acf\",\n \"snippets/ui-icon.liquid\": \"ca75a9485eb33cdb31a3a4e2e5ca03ce74d4995dbd1696d964832a87602bf3ca\",\n \"assets/ui-icon.css\": \"cfb1a47905cbd9c25b635c96926a77f8eed983a4aca62fdce758345dcc792add\",\n \"snippets/ui-combobox.liquid\": \"bacd605b44237512a74d34119d01432440b76ae60218dae6a6f37f98b32e3e00\",\n \"snippets/ui-toast.liquid\": \"bb032d90d6084fb15e12da22777635b80d09a06402513c46c89e853e3ede0405\",\n \"assets/ui-toast.css\": \"c322fab210a202fa434695025550495dbdc93e688ed7ae39303fea9830864d0b\",\n \"snippets/ui-header.liquid\": \"cc14effb4e3b6c4ac397e306e4ebd270a31b3415cc12ffbeb6cd38f411eaba80\",\n \"snippets/ui-command.liquid\": \"4a37f59dc0039fa1505de764472212d6cd7c4e5c52b737a1700e928db286f233\",\n \"snippets/ui-accordion.liquid\": \"4b58c83ae13e14e03a3129a2dccbd02eeafa90c1e48edbbf9af2dc412bf3aabf\",\n \"assets/ui-accordion.css\": \"430924440bd0f1d49ceb72baffc77404c9411c31c24b940d75861daba2649e83\",\n \"snippets/ui-slider.liquid\": \"f2de1fb9099de77bf291455447bc86b2578781e7cf0efdf12117fb4575e0b0e6\",\n \"snippets/ui-input.liquid\": \"d29e280ce1d08c7450902e69a73a0b7aa125f1cb662c50dbfc80a4a4fef0a85e\",\n \"snippets/ui-input-group.liquid\": \"b862a0c63e23dc7ae4ffe3a8e057a87f38fa8e6c8842ddf3c86b826de0283d70\",\n \"snippets/ui-triggers.liquid\": \"ba9c7b802fb0a2aba0e9cc145a9dd44134964afb53e5363cf9e0ae138b906cc9\",\n \"snippets/ui-toggle-group.liquid\": \"2d61e0b9bc746e05834157f5a75d23123f02bc2df737412e4f6099844afc4f49\",\n \"snippets/ui-dialog.liquid\": \"779bbcd609a69ed29a984df1f26f9ed80fd24d71c4ee3ead5f4daa055b28e9fb\",\n \"snippets/ui-drawer.liquid\": \"16120fdd70fac393470c3936223e78ad5f81164e2b7616fd075e8e82098a17d5\",\n \"snippets/ui-badge.liquid\": \"13d8b46cd5432783a9b986de76365c9fcc0e7fb30ad4f956ec386c1ae549ce99\",\n \"snippets/ui-alert.liquid\": \"392bf006b427178d4699272115317e0db934d881be9534b4638c492fa1825a83\",\n \"snippets/ui-table.liquid\": \"6599d8b3bd193761571c2b71e499f78546ba5c2768d4e0a0a60cd0e348632e5b\",\n \"snippets/ui-breadcrumb.liquid\": \"dafdeaf03286b386c90f8e72777de1946fba4718ee568bd85ca7bc768483a3ca\",\n \"snippets/ui-aspect-ratio.liquid\": \"c8aae05fcd76af7ae768aedafd7e758533e2b52135b00ff72940896ad793f177\",\n \"snippets/ui-price.liquid\": \"96156754aee3a04aa3ae7084a14470000213e8be14468c4937e9f3a87e348234\",\n \"assets/ui-price.css\": \"95c947e219621102b704164e48a83e381e6e2b27b99311a294e076745b39a36f\",\n \"snippets/ui-radio-group.liquid\": \"af9978e18716cc86d03ed21dece8304992e74a4fab88e12069b0648cfd944492\",\n \"snippets/ui-checkbox.liquid\": \"0e4dd1738b355c5a93533e0b813e2e6c72f7491c289d65aa7b6435be1c599006\",\n \"snippets/ui-switch.liquid\": \"84ed60c777e77daec8b5fe6f2ee434877d51224235dc1bc2e17927cd182fe646\",\n \"snippets/ui-skeleton.liquid\": \"1e30245f6577f73d28f4badbc293934656882a29d5dec1d2f74ef95f3bcede2c\",\n \"snippets/ui-separator.liquid\": \"90b1d2795666b6c51f35645ca8d07659f2c4868fe9553e233cddb4e962095f6e\",\n \"snippets/ui-card.liquid\": \"581a46843f1280ebace0423ee84289b40fbd46142e6a9ab3940f63eca0e4c5f2\",\n \"assets/ui-card.css\": \"ee7e4192ec814066d0c9838f810ae4ca267b9f071b7fa945c43226d46b0f8dc9\",\n \"snippets/ui-pagination.liquid\": \"30943c00686e1a23d92865465b38c964e059b14ae3a20fb7fe151824a73773eb\",\n \"snippets/ui-popup.liquid\": \"840f938aa2a331e4e7d55c659f25e841dcfb1bf5c5cadace6263243352ff8359\",\n \"snippets/ui-sheet.liquid\": \"0de705bed685bf78fa3af4517c947b38d62a1aa56bf29356c0a201b64db17614\",\n \"snippets/ui-carousel.liquid\": \"59dc0c06b2a9f2f779ca22b3ff4b005071d4909aba052d6f8f0a1aa19e84c2ce\",\n \"assets/ui-carousel.css\": \"5317c251b3d3599ba330947fc9709ea50acfb858a5d7e08573b5d34ada2f3bf4\",\n \"snippets/ui-attachment.liquid\": \"6881df7cdb1b27462d8cce7c17c0b4ed4dd860d62535e1daa81378a57bb69ddf\",\n \"snippets/ui-marquee.liquid\": \"47d5df8f1ff46a2cd48a132986c2ba199c9e19b485e62fc3e0d19091d4baaab1\",\n \"assets/ui-marquee.css\": \"ef13b83f3dbcd6685fcee3dba14238386d0f34bc2266a5326c0b6f2d40a23fce\",\n \"snippets/ui-invalid-controls.liquid\": \"a169e8244cc86f5431f902f7a73b37188051ba8f2ef3e323830462dae5aed066\",\n \"snippets/ui-section.liquid\": \"da358cd87447457f3675b035b48556103d86cd11e0b2240ae2800e4c9ea54bdc\",\n \"assets/ui-section.css\": \"f4936a02aaf1927ccced898886857855e4b5e95fafe5c2a52748ecbbe87b6621\",\n \"snippets/ui-button-group.liquid\": \"a2790f8da0f8b37acc1ed558ba1548ea250a5b93e1b2dfbd11eb150f3f02783a\",\n \"snippets/ui-collapsible.liquid\": \"e6107a03d00b8cc75bb03206e64b9aa7f2989d982c0408b398b62067c6df450a\",\n \"snippets/ui-dropdown-menu.liquid\": \"25b31e09e3e7bfee9a397ca4de6e310754844c55e71639eadba917b0f4e6d2e5\",\n \"snippets/ui-popover.liquid\": \"44ff93d72eaad409f56f8a84ce25715e2c3633f2ac49ba7a414767c6dbe2ee47\",\n \"snippets/ui-hover-card.liquid\": \"ba4133d352fa14296743138c99f3694015bafe953751b8e42155f047c4beb9f0\",\n \"snippets/ui.liquid\": \"30679056b2eafefbaeef5ecd271604951676893a65a8eccb0f970c787a67b900\"\n }\n}\n",
|
|
78
78
|
"type": "registry:file",
|
|
79
79
|
"target": "~/assets/ui-manifest.json"
|
|
80
80
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/alert/alert.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = VariantProps<typeof variants> & HTMLAttributes<\"div\">\n\nconst variants = cva(\"grid gap-0.5 rounded-2xl border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full\", {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive: \"text-destructive bg-card *:data-[slot=alert-description]:text-destructive
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = VariantProps<typeof variants> & HTMLAttributes<\"div\">\n\nconst variants = cva(\"grid gap-0.5 rounded-2xl border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full\", {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n // shadcn/ui shows the description at text-destructive/90. Like its\n // FieldError, this uses the full destructive color, for 4.5:1 contrast.\n destructive: \"text-destructive bg-card *:data-[slot=alert-description]:text-destructive *:[svg]:text-current\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n})\n\nconst { class: className, variant, ...props } = Astro.props\n---\n\n<div\n data-slot=\"alert\"\n role=\"alert\"\n class={cn(variants({ variant }), className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
{
|
|
16
16
|
"path": "src/components/examples/attachment/attachment-demo.astro",
|
|
17
|
-
"content": "---\nimport FileCodeIcon from \"@lucide/astro/icons/file-code\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport {\n Attachment,\n AttachmentAction,\n AttachmentActions,\n AttachmentContent,\n AttachmentDescription,\n AttachmentGroup,\n AttachmentMedia,\n AttachmentTitle,\n} from \"@/components/ui/attachment\"\nimport { Spinner } from \"@/components/ui/spinner\"\n\nconst images = [\n {\n name: \"workspace.png\",\n meta: \"PNG · 820 KB\",\n src: \"https://images.unsplash.com/photo-1497366754035-f200968a6e72?w=900&auto=format&fit=crop&q=80\",\n alt: \"Workspace\",\n },\n {\n name: \"desk-reference.jpg\",\n meta: \"JPG · 1.1 MB\",\n src: \"https://images.unsplash.com/photo-1497215728101-856f4ea42174?w=900&auto=format&fit=crop&q=80\",\n alt: \"Desk\",\n },\n {\n name: \"office-reference.jpg\",\n meta: \"JPG · 940 KB\",\n src: \"https://images.unsplash.com/photo-1497366811353-6870744d04b2?w=900&auto=format&fit=crop&q=80\",\n alt: \"Office\",\n },\n]\n---\n\n<div class=\"mx-auto flex w-full max-w-sm flex-col gap-3 py-12\">\n <AttachmentGroup>\n {images.map((image) => (\n <Attachment orientation=\"vertical\">\n <AttachmentMedia variant=\"image\">\n <img src={image.src} alt={image.alt} />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>{image.name}</AttachmentTitle>\n <AttachmentDescription>{image.meta}</AttachmentDescription>\n </AttachmentContent>\n </Attachment>\n ))}\n </AttachmentGroup>\n <Attachment state=\"uploading\" class=\"w-full\">\n <AttachmentMedia>\n <Spinner />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>sales-dashboard.pdf</AttachmentTitle>\n <AttachmentDescription>Uploading · 64%</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Cancel upload\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n <Attachment class=\"w-full\">\n <AttachmentMedia>\n <FileCodeIcon />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>message-renderer.tsx</AttachmentTitle>\n <AttachmentDescription>TypeScript · 12 KB</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Remove message-renderer.tsx\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n</div>\n",
|
|
17
|
+
"content": "---\nimport FileCodeIcon from \"@lucide/astro/icons/file-code\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport {\n Attachment,\n AttachmentAction,\n AttachmentActions,\n AttachmentContent,\n AttachmentDescription,\n AttachmentGroup,\n AttachmentMedia,\n AttachmentTitle,\n} from \"@/components/ui/attachment\"\nimport { Spinner } from \"@/components/ui/spinner\"\n\nconst images = [\n {\n name: \"workspace.png\",\n meta: \"PNG · 820 KB\",\n src: \"https://images.unsplash.com/photo-1497366754035-f200968a6e72?w=900&auto=format&fit=crop&q=80\",\n alt: \"Workspace\",\n },\n {\n name: \"desk-reference.jpg\",\n meta: \"JPG · 1.1 MB\",\n src: \"https://images.unsplash.com/photo-1497215728101-856f4ea42174?w=900&auto=format&fit=crop&q=80\",\n alt: \"Desk\",\n },\n {\n name: \"office-reference.jpg\",\n meta: \"JPG · 940 KB\",\n src: \"https://images.unsplash.com/photo-1497366811353-6870744d04b2?w=900&auto=format&fit=crop&q=80\",\n alt: \"Office\",\n },\n]\n---\n\n<div class=\"mx-auto flex w-full max-w-sm flex-col gap-3 py-12\">\n {/* Unlike shadcn/ui's demo, the group takes focus: its attachments have no\n controls, so a keyboard could not scroll it otherwise. */}\n <AttachmentGroup tabindex=\"0\">\n {images.map((image) => (\n <Attachment orientation=\"vertical\">\n <AttachmentMedia variant=\"image\">\n <img src={image.src} alt={image.alt} />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>{image.name}</AttachmentTitle>\n <AttachmentDescription>{image.meta}</AttachmentDescription>\n </AttachmentContent>\n </Attachment>\n ))}\n </AttachmentGroup>\n <Attachment state=\"uploading\" class=\"w-full\">\n <AttachmentMedia>\n <Spinner />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>sales-dashboard.pdf</AttachmentTitle>\n <AttachmentDescription>Uploading · 64%</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Cancel upload\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n <Attachment class=\"w-full\">\n <AttachmentMedia>\n <FileCodeIcon />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>message-renderer.tsx</AttachmentTitle>\n <AttachmentDescription>TypeScript · 12 KB</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Remove message-renderer.tsx\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n</div>\n",
|
|
18
18
|
"type": "registry:component"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
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 \"mt-0.5 text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive
|
|
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// shadcn/ui uses text-destructive/80 for the error description. Like its\n// FieldError, this uses the full destructive color, so the small text keeps a\n// 4.5:1 contrast.\n---\n\n<span\n data-slot=\"attachment-description\"\n class={cn(\n \"mt-0.5 text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive block max-w-full min-w-0 truncate\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
|
|
28
28
|
"type": "registry:ui"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
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 \"font-medium block max-w-full min-w-0 truncate group-data-[state=processing]/attachment:
|
|
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 \"font-medium block max-w-full min-w-0 truncate group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
|
|
43
43
|
"type": "registry:ui"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "src/components/examples/button/button-icon.astro",
|
|
36
|
-
"content": "---\nimport CircleFadingArrowUpIcon from \"@lucide/astro/icons/circle-fading-arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<Button variant=\"outline\" size=\"icon\">\n <CircleFadingArrowUpIcon />\n</Button>\n",
|
|
36
|
+
"content": "---\nimport CircleFadingArrowUpIcon from \"@lucide/astro/icons/circle-fading-arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<Button variant=\"outline\" size=\"icon\" aria-label=\"Upgrade\">\n <CircleFadingArrowUpIcon />\n</Button>\n",
|
|
37
37
|
"type": "registry:component"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"path": "src/components/examples/button/button-rounded.astro",
|
|
56
|
-
"content": "---\nimport ArrowUpIcon from \"@lucide/astro/icons/arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<div class=\"flex gap-2\">\n <Button class=\"rounded-full\">Get Started</Button>\n <Button
|
|
56
|
+
"content": "---\nimport ArrowUpIcon from \"@lucide/astro/icons/arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<div class=\"flex gap-2\">\n <Button class=\"rounded-full\">Get Started</Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n class=\"rounded-full\"\n aria-label=\"Submit\"\n >\n <ArrowUpIcon />\n </Button>\n</div>\n",
|
|
57
57
|
"type": "registry:component"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/button/button-variants.ts",
|
|
9
|
-
"content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-4xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline: \"border-border bg-background dark:bg-transparent hover:bg-muted hover:text-foreground dark:hover:bg-input/30 aria-expanded:bg-muted aria-expanded:text-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost: \"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground\",\n destructive: \"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5\",\n xs: \"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n lg: \"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n icon: \"size-9\",\n \"icon-xs\": \"size-6 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>\n",
|
|
9
|
+
"content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-4xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline: \"border-border bg-background dark:bg-transparent hover:bg-muted hover:text-foreground dark:hover:bg-input/30 aria-expanded:bg-muted aria-expanded:text-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost: \"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground\",\n // shadcn/ui uses text-destructive, about 4:1 on the button's tint.\n // Mixing in a fifth of the foreground keeps 4.5:1, as the native Liquid\n // button does.\n destructive: \"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))] focus-visible:border-destructive/40 dark:hover:bg-destructive/30\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5\",\n xs: \"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n lg: \"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n icon: \"size-9\",\n \"icon-xs\": \"size-6 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "src/components/examples/collapsible/collapsible-settings.astro",
|
|
45
|
-
"content": "---\nimport MaximizeIcon from \"@lucide/astro/icons/maximize\"\nimport MinimizeIcon from \"@lucide/astro/icons/minimize\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Field, FieldGroup, FieldLabel } from \"@/components/ui/field\"\nimport { Input } from \"@/components/ui/input\"\n---\n\n<Card class=\"mx-auto w-full max-w-xs\" size=\"sm\">\n <CardHeader>\n <CardTitle>Radius</CardTitle>\n <CardDescription>Set the corner radius of the element.</CardDescription>\n </CardHeader>\n <CardContent>\n <Collapsible class=\"flex items-start gap-2\">\n <FieldGroup class=\"grid w-full grid-cols-2 gap-2\">\n <Field>\n <FieldLabel for=\"radius-x\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y\" placeholder=\"0\" value=\"0\" />\n </Field>\n <CollapsibleContent class=\"col-span-full grid grid-cols-subgrid gap-2\">\n <Field>\n <FieldLabel for=\"radius-x-2\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y-2\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n </CollapsibleContent>\n </FieldGroup>\n <CollapsibleTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon\" })}\n >\n <MaximizeIcon class=\"group-aria-expanded/button:hidden\" />\n <MinimizeIcon class=\"hidden group-aria-expanded/button:block\" />\n </CollapsibleTrigger>\n </Collapsible>\n </CardContent>\n</Card>\n",
|
|
45
|
+
"content": "---\nimport MaximizeIcon from \"@lucide/astro/icons/maximize\"\nimport MinimizeIcon from \"@lucide/astro/icons/minimize\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Field, FieldGroup, FieldLabel } from \"@/components/ui/field\"\nimport { Input } from \"@/components/ui/input\"\n---\n\n<Card class=\"mx-auto w-full max-w-xs\" size=\"sm\">\n <CardHeader>\n <CardTitle>Radius</CardTitle>\n <CardDescription>Set the corner radius of the element.</CardDescription>\n </CardHeader>\n <CardContent>\n <Collapsible class=\"flex items-start gap-2\">\n <FieldGroup class=\"grid w-full grid-cols-2 gap-2\">\n <Field>\n <FieldLabel for=\"radius-x\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y\" placeholder=\"0\" value=\"0\" />\n </Field>\n <CollapsibleContent class=\"col-span-full grid grid-cols-subgrid gap-2\">\n <Field>\n <FieldLabel for=\"radius-x-2\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y-2\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n </CollapsibleContent>\n </FieldGroup>\n <CollapsibleTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon\" })}\n >\n <MaximizeIcon class=\"group-aria-expanded/button:hidden\" />\n <MinimizeIcon class=\"hidden group-aria-expanded/button:block\" />\n <span class=\"sr-only\">Toggle details</span>\n </CollapsibleTrigger>\n </Collapsible>\n </CardContent>\n</Card>\n",
|
|
46
46
|
"type": "registry:component"
|
|
47
47
|
}
|
|
48
48
|
],
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"path": "src/components/examples/combobox/combobox-popup.astro",
|
|
63
|
-
"content": "---\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxValue,\n} from \"@/components/ui/combobox\"\n\nconst countries = [\n { code: \"\", value: \"\", continent: \"\", label: \"Select country\" },\n {\n code: \"ar\",\n value: \"argentina\",\n label: \"Argentina\",\n continent: \"South America\",\n },\n { code: \"au\", value: \"australia\", label: \"Australia\", continent: \"Oceania\" },\n { code: \"br\", value: \"brazil\", label: \"Brazil\", continent: \"South America\" },\n { code: \"ca\", value: \"canada\", label: \"Canada\", continent: \"North America\" },\n { code: \"cn\", value: \"china\", label: \"China\", continent: \"Asia\" },\n {\n code: \"co\",\n value: \"colombia\",\n label: \"Colombia\",\n continent: \"South America\",\n },\n { code: \"eg\", value: \"egypt\", label: \"Egypt\", continent: \"Africa\" },\n { code: \"fr\", value: \"france\", label: \"France\", continent: \"Europe\" },\n { code: \"de\", value: \"germany\", label: \"Germany\", continent: \"Europe\" },\n { code: \"it\", value: \"italy\", label: \"Italy\", continent: \"Europe\" },\n { code: \"jp\", value: \"japan\", label: \"Japan\", continent: \"Asia\" },\n { code: \"ke\", value: \"kenya\", label: \"Kenya\", continent: \"Africa\" },\n { code: \"mx\", value: \"mexico\", label: \"Mexico\", continent: \"North America\" },\n {\n code: \"nz\",\n value: \"new-zealand\",\n label: \"New Zealand\",\n continent: \"Oceania\",\n },\n { code: \"ng\", value: \"nigeria\", label: \"Nigeria\", continent: \"Africa\" },\n {\n code: \"za\",\n value: \"south-africa\",\n label: \"South Africa\",\n continent: \"Africa\",\n },\n { code: \"kr\", value: \"south-korea\", label: \"South Korea\", continent: \"Asia\" },\n {\n code: \"gb\",\n value: \"united-kingdom\",\n label: \"United Kingdom\",\n continent: \"Europe\",\n },\n {\n code: \"us\",\n value: \"united-states\",\n label: \"United States\",\n continent: \"North America\",\n },\n]\n---\n\n<Combobox defaultValue={countries[0].value}>\n <Button\n variant=\"outline\"\n data-slot=\"combobox-trigger\"\n class=\"[&_svg:not([class*='size-'])]:size-4 w-64 justify-between font-normal\"\n >\n <ComboboxValue
|
|
63
|
+
"content": "---\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxValue,\n} from \"@/components/ui/combobox\"\n\nconst countries = [\n { code: \"\", value: \"\", continent: \"\", label: \"Select country\" },\n {\n code: \"ar\",\n value: \"argentina\",\n label: \"Argentina\",\n continent: \"South America\",\n },\n { code: \"au\", value: \"australia\", label: \"Australia\", continent: \"Oceania\" },\n { code: \"br\", value: \"brazil\", label: \"Brazil\", continent: \"South America\" },\n { code: \"ca\", value: \"canada\", label: \"Canada\", continent: \"North America\" },\n { code: \"cn\", value: \"china\", label: \"China\", continent: \"Asia\" },\n {\n code: \"co\",\n value: \"colombia\",\n label: \"Colombia\",\n continent: \"South America\",\n },\n { code: \"eg\", value: \"egypt\", label: \"Egypt\", continent: \"Africa\" },\n { code: \"fr\", value: \"france\", label: \"France\", continent: \"Europe\" },\n { code: \"de\", value: \"germany\", label: \"Germany\", continent: \"Europe\" },\n { code: \"it\", value: \"italy\", label: \"Italy\", continent: \"Europe\" },\n { code: \"jp\", value: \"japan\", label: \"Japan\", continent: \"Asia\" },\n { code: \"ke\", value: \"kenya\", label: \"Kenya\", continent: \"Africa\" },\n { code: \"mx\", value: \"mexico\", label: \"Mexico\", continent: \"North America\" },\n {\n code: \"nz\",\n value: \"new-zealand\",\n label: \"New Zealand\",\n continent: \"Oceania\",\n },\n { code: \"ng\", value: \"nigeria\", label: \"Nigeria\", continent: \"Africa\" },\n {\n code: \"za\",\n value: \"south-africa\",\n label: \"South Africa\",\n continent: \"Africa\",\n },\n { code: \"kr\", value: \"south-korea\", label: \"South Korea\", continent: \"Asia\" },\n {\n code: \"gb\",\n value: \"united-kingdom\",\n label: \"United Kingdom\",\n continent: \"Europe\",\n },\n {\n code: \"us\",\n value: \"united-states\",\n label: \"United States\",\n continent: \"North America\",\n },\n]\n---\n\n<Combobox defaultValue={countries[0].value}>\n <Button\n variant=\"outline\"\n data-slot=\"combobox-trigger\"\n class=\"[&_svg:not([class*='size-'])]:size-4 w-64 justify-between font-normal\"\n >\n <ComboboxValue>{countries[0].label}</ComboboxValue>\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n </Button>\n <ComboboxContent>\n <ComboboxInput showTrigger={false} placeholder=\"Search\" />\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {countries.map((item) => (\n <ComboboxItem value={item.value}>{item.label}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
|
|
64
64
|
"type": "registry:component"
|
|
65
65
|
}
|
|
66
66
|
],
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"path": "src/components/ui/combobox/combobox-trigger.astro",
|
|
62
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\nimport { InputGroupButton } from \"@/components/ui/input-group\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n showIcon?: boolean\n}\n\nconst {\n class: className,\n type = \"button\",\n showIcon = true,\n ...props\n} = Astro.props\n---\n\n<InputGroupButton\n type={type ?? \"button\"}\n variant=\"ghost\"\n size=\"icon-xs\"\n data-slot=\"combobox-trigger\"\n class={cn(\"[&_svg]:text-muted-foreground\", className)}\n {...props}\n>\n <slot />\n {showIcon && (\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n )}\n</InputGroupButton>\n",
|
|
62
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\nimport { InputGroupButton } from \"@/components/ui/input-group\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n showIcon?: boolean\n}\n\nconst {\n class: className,\n type = \"button\",\n showIcon = true,\n ...props\n} = Astro.props\n\n// Data Slot names the trigger \"Toggle\" when it starts. Name it the same in the\n// HTML, so it has a name before the script runs.\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 aria-label=\"Toggle\"\n {...props}\n>\n <slot />\n {showIcon && (\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n )}\n</InputGroupButton>\n",
|
|
63
63
|
"type": "registry:ui"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"path": "src/components/examples/input-group/input-group-button.astro",
|
|
30
|
-
"content": "---\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/components/ui/input-group\"\nimport { Popover, PopoverContent } from \"@/components/ui/popover\"\n---\n\n<div class=\"grid w-full max-w-sm gap-6\" data-input-group-button-example>\n <InputGroup>\n <InputGroupInput placeholder=\"https://x.com/shadcn\" readonly />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n aria-label=\"Copy\"\n title=\"Copy\"\n size=\"icon-xs\"\n data-copy-value=\"https://x.com/shadcn\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-check hidden\"\n data-copied-icon\n >\n <path d=\"M5 12l5 5l10 -10\"></path>\n </svg>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-copy\"\n data-copy-icon\n >\n <path d=\"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666\"></path>\n <path d=\"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n <InputGroup class=\"[--radius:9999px]\">\n <InputGroupAddon>\n <Popover>\n <InputGroupButton\n data-slot=\"popover-trigger\"\n variant=\"secondary\"\n size=\"icon-xs\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-info-circle\"\n >\n <path d=\"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0\"></path>\n <path d=\"M12 9h.01\"></path>\n <path d=\"M11 12h1v4h1\"></path>\n </svg>\n </InputGroupButton>\n <PopoverContent\n align=\"start\"\n class=\"flex flex-col gap-1 rounded-xl text-sm\"\n >\n <p class=\"font-medium\">Your connection is not secure.</p>\n <p>You should not enter any sensitive information on this site.</p>\n </PopoverContent>\n </Popover>\n </InputGroupAddon>\n <InputGroupAddon class=\"pl-1.5 text-muted-foreground\">\n https://\n </InputGroupAddon>\n <InputGroupInput id=\"input-secure-19\" />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton
|
|
30
|
+
"content": "---\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/components/ui/input-group\"\nimport { Popover, PopoverContent } from \"@/components/ui/popover\"\n---\n\n<div class=\"grid w-full max-w-sm gap-6\" data-input-group-button-example>\n <InputGroup>\n <InputGroupInput placeholder=\"https://x.com/shadcn\" readonly />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n aria-label=\"Copy\"\n title=\"Copy\"\n size=\"icon-xs\"\n data-copy-value=\"https://x.com/shadcn\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-check hidden\"\n data-copied-icon\n >\n <path d=\"M5 12l5 5l10 -10\"></path>\n </svg>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-copy\"\n data-copy-icon\n >\n <path d=\"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666\"></path>\n <path d=\"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n <InputGroup class=\"[--radius:9999px]\">\n <InputGroupAddon>\n <Popover>\n <InputGroupButton\n data-slot=\"popover-trigger\"\n variant=\"secondary\"\n size=\"icon-xs\"\n aria-label=\"Info\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-info-circle\"\n >\n <path d=\"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0\"></path>\n <path d=\"M12 9h.01\"></path>\n <path d=\"M11 12h1v4h1\"></path>\n </svg>\n </InputGroupButton>\n <PopoverContent\n align=\"start\"\n class=\"flex flex-col gap-1 rounded-xl text-sm\"\n >\n <p class=\"font-medium\">Your connection is not secure.</p>\n <p>You should not enter any sensitive information on this site.</p>\n </PopoverContent>\n </Popover>\n </InputGroupAddon>\n <InputGroupAddon class=\"pl-1.5 text-muted-foreground\">\n https://\n </InputGroupAddon>\n <InputGroupInput id=\"input-secure-19\" />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n size=\"icon-xs\"\n aria-label=\"Favorite\"\n data-favorite-toggle\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-star data-[favorite=true]:fill-blue-600 data-[favorite=true]:stroke-blue-600\"\n data-favorite=\"false\"\n >\n <path d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n <InputGroup>\n <InputGroupInput placeholder=\"Type to search...\" />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton variant=\"secondary\">Search</InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n</div>\n\n<script>\n const initialize = () => {\n for (const root of document.querySelectorAll<HTMLElement>(\n \"[data-input-group-button-example]\"\n )) {\n if (root.hasAttribute(\"data-bound\")) continue\n root.setAttribute(\"data-bound\", \"\")\n\n const copy = root.querySelector<HTMLElement>(\"[data-copy-value]\")!\n const copyIcon = copy.querySelector(\"[data-copy-icon]\")!\n const copiedIcon = copy.querySelector(\"[data-copied-icon]\")!\n let timeout: ReturnType<typeof setTimeout> | undefined\n const setCopied = (copied: boolean) => {\n copiedIcon.classList.toggle(\"hidden\", !copied)\n copyIcon.classList.toggle(\"hidden\", copied)\n }\n copy.addEventListener(\"click\", async () => {\n try {\n await navigator.clipboard.writeText(copy.dataset.copyValue!)\n } catch {\n return\n }\n setCopied(true)\n clearTimeout(timeout)\n timeout = setTimeout(() => setCopied(false), 2000)\n })\n\n const favorite = root.querySelector(\"[data-favorite-toggle]\")!\n const star = favorite.querySelector<SVGElement>(\"[data-favorite]\")!\n favorite.addEventListener(\"click\", () => {\n star.dataset.favorite = String(star.dataset.favorite !== \"true\")\n })\n }\n }\n\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n</script>\n",
|
|
31
31
|
"type": "registry:component"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
"path": "src/components/examples/input-group/input-group-textarea.astro",
|
|
85
|
-
"content": "---\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupTextarea,\n} from \"@/components/ui/input-group\"\n---\n\n<div class=\"grid w-full max-w-md gap-4\">\n <InputGroup>\n <InputGroupTextarea\n id=\"textarea-code-32\"\n placeholder=\"console.log('Hello, world!');\"\n class=\"min-h-[200px]\"\n />\n <InputGroupAddon align=\"block-end\" class=\"border-t\">\n <InputGroupText>Line 1, Column 1</InputGroupText>\n <InputGroupButton size=\"sm\" class=\"ml-auto\" variant=\"default\">\n Run\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-corner-down-left\"\n >\n <path d=\"M18 6v6a3 3 0 0 1 -3 3h-10l4 -4m0 8l-4 -4\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n <InputGroupAddon align=\"block-start\" class=\"border-b\">\n <InputGroupText class=\"font-mono font-medium\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-brand-javascript\"\n >\n <path d=\"M20 4l-2 14.5l-6 2l-6 -2l-2 -14.5l16 0\"></path>\n <path d=\"M7.5 8h3v8l-2 -1\"></path>\n <path d=\"M16.5 8h-2.5a.5 .5 0 0 0 -.5 .5v3a.5 .5 0 0 0 .5 .5h1.423a.5 .5 0 0 1 .495 .57l-.418 2.93l-2 .5\"></path>\n </svg>\n script.js\n </InputGroupText>\n <InputGroupButton class=\"ml-auto\" size=\"icon-xs\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-refresh\"\n >\n <path d=\"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4\"></path>\n <path d=\"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4\"></path>\n </svg>\n </InputGroupButton>\n <InputGroupButton variant=\"ghost\" size=\"icon-xs\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-copy\"\n >\n <path d=\"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666\"></path>\n <path d=\"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n</div>\n",
|
|
85
|
+
"content": "---\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupTextarea,\n} from \"@/components/ui/input-group\"\n---\n\n<div class=\"grid w-full max-w-md gap-4\">\n <InputGroup>\n <InputGroupTextarea\n id=\"textarea-code-32\"\n placeholder=\"console.log('Hello, world!');\"\n class=\"min-h-[200px]\"\n />\n <InputGroupAddon align=\"block-end\" class=\"border-t\">\n <InputGroupText>Line 1, Column 1</InputGroupText>\n <InputGroupButton size=\"sm\" class=\"ml-auto\" variant=\"default\">\n Run\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-corner-down-left\"\n >\n <path d=\"M18 6v6a3 3 0 0 1 -3 3h-10l4 -4m0 8l-4 -4\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n <InputGroupAddon align=\"block-start\" class=\"border-b\">\n <InputGroupText class=\"font-mono font-medium\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-brand-javascript\"\n >\n <path d=\"M20 4l-2 14.5l-6 2l-6 -2l-2 -14.5l16 0\"></path>\n <path d=\"M7.5 8h3v8l-2 -1\"></path>\n <path d=\"M16.5 8h-2.5a.5 .5 0 0 0 -.5 .5v3a.5 .5 0 0 0 .5 .5h1.423a.5 .5 0 0 1 .495 .57l-.418 2.93l-2 .5\"></path>\n </svg>\n script.js\n </InputGroupText>\n <InputGroupButton class=\"ml-auto\" size=\"icon-xs\" aria-label=\"Refresh\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-refresh\"\n >\n <path d=\"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4\"></path>\n <path d=\"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4\"></path>\n </svg>\n </InputGroupButton>\n <InputGroupButton variant=\"ghost\" size=\"icon-xs\" aria-label=\"Copy\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-copy\"\n >\n <path d=\"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666\"></path>\n <path d=\"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n</div>\n",
|
|
86
86
|
"type": "registry:component"
|
|
87
87
|
}
|
|
88
88
|
],
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"path": "src/components/examples/item/item-group.astro",
|
|
33
|
-
"content": "---\nimport PlusIcon from \"@lucide/astro/icons/plus\"\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from \"@/components/ui/item\"\n\nconst people = [\n {\n username: \"shadcn\",\n avatar: \"https://github.com/shadcn.png\",\n email: \"shadcn@vercel.com\",\n },\n {\n username: \"maxleiter\",\n avatar: \"https://github.com/maxleiter.png\",\n email: \"maxleiter@vercel.com\",\n },\n {\n username: \"evilrabbit\",\n avatar: \"https://github.com/evilrabbit.png\",\n email: \"evilrabbit@vercel.com\",\n },\n]\n---\n\n<ItemGroup class=\"max-w-sm\">\n {people.map((person) => (\n <Item variant=\"outline\">\n <ItemMedia>\n <Avatar>\n <AvatarImage src={person.avatar} class=\"grayscale\" />\n <AvatarFallback>{person.username.charAt(0)}</AvatarFallback>\n </Avatar>\n </ItemMedia>\n <ItemContent class=\"gap-1\">\n <ItemTitle>{person.username}</ItemTitle>\n <ItemDescription>{person.email}</ItemDescription>\n </ItemContent>\n <ItemActions>\n <Button
|
|
33
|
+
"content": "---\nimport PlusIcon from \"@lucide/astro/icons/plus\"\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from \"@/components/ui/item\"\n\nconst people = [\n {\n username: \"shadcn\",\n avatar: \"https://github.com/shadcn.png\",\n email: \"shadcn@vercel.com\",\n },\n {\n username: \"maxleiter\",\n avatar: \"https://github.com/maxleiter.png\",\n email: \"maxleiter@vercel.com\",\n },\n {\n username: \"evilrabbit\",\n avatar: \"https://github.com/evilrabbit.png\",\n email: \"evilrabbit@vercel.com\",\n },\n]\n---\n\n<ItemGroup class=\"max-w-sm\">\n {people.map((person) => (\n <Item variant=\"outline\">\n <ItemMedia>\n <Avatar>\n <AvatarImage src={person.avatar} class=\"grayscale\" />\n <AvatarFallback>{person.username.charAt(0)}</AvatarFallback>\n </Avatar>\n </ItemMedia>\n <ItemContent class=\"gap-1\">\n <ItemTitle>{person.username}</ItemTitle>\n <ItemDescription>{person.email}</ItemDescription>\n </ItemContent>\n <ItemActions>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n class=\"rounded-full\"\n aria-label=\"Invite\"\n >\n <PlusIcon />\n </Button>\n </ItemActions>\n </Item>\n ))}\n</ItemGroup>\n",
|
|
34
34
|
"type": "registry:component"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "src/components/ui/select/select.astro",
|
|
13
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"select\"\n data-mount-strategy={mountStrategy}\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-position={position}\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 data-highlight-item-on-hover={highlightItemOnHover}\n data-lock-scroll={lockScroll}\n class={cn(\n \"group/select relative inline-flex w-fit flex-col gap-1.5\",\n className\n )}\n {...props}\n>\n <
|
|
13
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record<string, string> = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /<!--[\\s\\S]*?-->|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `&#${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n<div\n data-slot=\"select\"\n data-mount-strategy={mountStrategy}\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-position={position}\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 data-highlight-item-on-hover={highlightItemOnHover}\n data-lock-scroll={lockScroll}\n class={cn(\n \"group/select relative inline-flex w-fit flex-col gap-1.5\",\n className\n )}\n {...props}\n>\n <Fragment set:html={content} />\n</div>\n\n<script>\n import { create } from \"@data-slot/select\"\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
|
{
|