fulldev-ui 0.22.2 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +6 -2
- package/liquid/LICENSE-DATA-SLOT.md +21 -0
- package/liquid/LICENSE-FULLDEV.txt +21 -0
- package/liquid/LICENSE-SHADCN.md +21 -0
- package/liquid/README.md +17 -0
- package/liquid/components/accordion.liquid +5 -0
- package/liquid/components/alert-dialog.liquid +116 -0
- package/liquid/components/alert.liquid +45 -0
- package/liquid/components/aspect-ratio.liquid +28 -0
- package/liquid/components/attachment.liquid +134 -0
- package/liquid/components/avatar.liquid +52 -0
- package/liquid/components/badge.liquid +86 -0
- package/liquid/components/banner.liquid +40 -0
- package/liquid/components/base.liquid +112 -0
- package/liquid/components/breadcrumb.liquid +46 -0
- package/liquid/components/button-group.liquid +56 -0
- package/liquid/components/button.liquid +232 -0
- package/liquid/components/card.liquid +5 -0
- package/liquid/components/carousel.liquid +5 -0
- package/liquid/components/checkbox.liquid +54 -0
- package/liquid/components/collapsible.liquid +3 -0
- package/liquid/components/combobox.liquid +87 -0
- package/liquid/components/command.liquid +86 -0
- package/liquid/components/dialog.liquid +80 -0
- package/liquid/components/drawer.liquid +97 -0
- package/liquid/components/dropdown-menu.liquid +3 -0
- package/liquid/components/empty.liquid +77 -0
- package/liquid/components/field.liquid +5 -0
- package/liquid/components/form.liquid +5 -0
- package/liquid/components/header.liquid +33 -0
- package/liquid/components/hover-card.liquid +3 -0
- package/liquid/components/icon.liquid +5 -0
- package/liquid/components/input-group.liquid +53 -0
- package/liquid/components/input.liquid +84 -0
- package/liquid/components/invalid-controls.liquid +18 -0
- package/liquid/components/item.liquid +114 -0
- package/liquid/components/kbd.liquid +20 -0
- package/liquid/components/logo.liquid +33 -0
- package/liquid/components/marquee.liquid +5 -0
- package/liquid/components/navigation-menu.liquid +5 -0
- package/liquid/components/pagination.liquid +32 -0
- package/liquid/components/popover.liquid +3 -0
- package/liquid/components/popup.liquid +189 -0
- package/liquid/components/price.liquid +5 -0
- package/liquid/components/radio-group.liquid +53 -0
- package/liquid/components/rating.liquid +5 -0
- package/liquid/components/section.liquid +5 -0
- package/liquid/components/select.liquid +51 -0
- package/liquid/components/separator.liquid +19 -0
- package/liquid/components/sheet.liquid +68 -0
- package/liquid/components/skeleton.liquid +17 -0
- package/liquid/components/slider.liquid +50 -0
- package/liquid/components/spinner.liquid +28 -0
- package/liquid/components/switch.liquid +54 -0
- package/liquid/components/table.liquid +64 -0
- package/liquid/components/tabs.liquid +88 -0
- package/liquid/components/toast.liquid +5 -0
- package/liquid/components/toc.liquid +45 -0
- package/liquid/components/toggle-group.liquid +77 -0
- package/liquid/components/toggle.liquid +61 -0
- package/liquid/components/tooltip.liquid +45 -0
- package/liquid/components/triggers.liquid +20 -0
- package/liquid/components/typography.liquid +5 -0
- package/liquid/components/video.liquid +5 -0
- package/liquid/contracts.json +428 -0
- package/liquid/examples/accordion.liquid +10 -0
- package/liquid/examples/alert-dialog.liquid +40 -0
- package/liquid/examples/alert.liquid +4 -0
- package/liquid/examples/aspect-ratio.liquid +1 -0
- package/liquid/examples/attachment.liquid +22 -0
- package/liquid/examples/avatar.liquid +1 -0
- package/liquid/examples/badge.liquid +5 -0
- package/liquid/examples/banner.liquid +3 -0
- package/liquid/examples/breadcrumb.liquid +7 -0
- package/liquid/examples/button-group.liquid +6 -0
- package/liquid/examples/button.liquid +8 -0
- package/liquid/examples/card.liquid +11 -0
- package/liquid/examples/carousel.liquid +12 -0
- package/liquid/examples/checkbox.liquid +4 -0
- package/liquid/examples/collapsible.liquid +29 -0
- package/liquid/examples/combobox.liquid +13 -0
- package/liquid/examples/command.liquid +10 -0
- package/liquid/examples/dependencies.json +60 -0
- package/liquid/examples/dialog.liquid +11 -0
- package/liquid/examples/drawer.liquid +18 -0
- package/liquid/examples/dropdown-menu.liquid +88 -0
- package/liquid/examples/empty.liquid +9 -0
- package/liquid/examples/field.liquid +105 -0
- package/liquid/examples/form.liquid +9 -0
- package/liquid/examples/header.liquid +8 -0
- package/liquid/examples/hover-card.liquid +16 -0
- package/liquid/examples/icon.liquid +3 -0
- package/liquid/examples/input-group.liquid +6 -0
- package/liquid/examples/input.liquid +4 -0
- package/liquid/examples/item.liquid +72 -0
- package/liquid/examples/kbd.liquid +1 -0
- package/liquid/examples/label.liquid +3 -0
- package/liquid/examples/logo.liquid +3 -0
- package/liquid/examples/marquee.liquid +5 -0
- package/liquid/examples/native-select.liquid +8 -0
- package/liquid/examples/navigation-menu.liquid +11 -0
- package/liquid/examples/pagination.liquid +11 -0
- package/liquid/examples/popover.liquid +14 -0
- package/liquid/examples/price.liquid +1 -0
- package/liquid/examples/radio-group.liquid +62 -0
- package/liquid/examples/rating.liquid +17 -0
- package/liquid/examples/section.liquid +9 -0
- package/liquid/examples/select.liquid +105 -0
- package/liquid/examples/separator.liquid +3 -0
- package/liquid/examples/sheet.liquid +11 -0
- package/liquid/examples/skeleton.liquid +5 -0
- package/liquid/examples/slider.liquid +46 -0
- package/liquid/examples/spinner.liquid +11 -0
- package/liquid/examples/switch.liquid +7 -0
- package/liquid/examples/table.liquid +37 -0
- package/liquid/examples/tabs.liquid +21 -0
- package/liquid/examples/textarea.liquid +9 -0
- package/liquid/examples/toast.liquid +47 -0
- package/liquid/examples/toc.liquid +11 -0
- package/liquid/examples/toggle-group.liquid +50 -0
- package/liquid/examples/toggle.liquid +21 -0
- package/liquid/examples/tooltip.liquid +33 -0
- package/liquid/examples/typography.liquid +9 -0
- package/liquid/examples/video.liquid +7 -0
- package/liquid/licenses.json +14 -0
- package/liquid/manifest.json +110 -0
- package/liquid/registry.json +1295 -0
- package/liquid/runtime/ui-carousel.js +44 -0
- package/liquid/runtime/ui-controls.js +195 -0
- package/liquid/runtime/ui-lifecycle.js +107 -0
- package/liquid/runtime/ui-motion.js +45 -0
- package/liquid/runtime/ui-start.js +37 -0
- package/liquid/snippets/init.liquid +6 -0
- package/liquid/snippets/runtime.liquid +9 -0
- package/liquid/snippets/ui.liquid +68 -0
- package/liquid/styles/accordion.css +66 -0
- package/liquid/styles/card.css +114 -0
- package/liquid/styles/carousel.css +58 -0
- package/liquid/styles/field.css +70 -0
- package/liquid/styles/form.css +14 -0
- package/liquid/styles/icon.css +32 -0
- package/liquid/styles/marquee.css +65 -0
- package/liquid/styles/navigation-menu.css +235 -0
- package/liquid/styles/price.css +41 -0
- package/liquid/styles/primitives.css +53 -0
- package/liquid/styles/rating.css +23 -0
- package/liquid/styles/section.css +92 -0
- package/liquid/styles/toast.css +125 -0
- package/liquid/styles/tokens.css +118 -0
- package/liquid/styles/typography.css +670 -0
- package/liquid/styles/video.css +10 -0
- package/liquid/vendor/data-slot-accordion.js +1 -0
- package/liquid/vendor/data-slot-alert-dialog.js +1 -0
- package/liquid/vendor/data-slot-carousel.js +1 -0
- package/liquid/vendor/data-slot-collapsible.js +1 -0
- package/liquid/vendor/data-slot-combobox.js +1 -0
- package/liquid/vendor/data-slot-command.js +1 -0
- package/liquid/vendor/data-slot-core.js +1 -0
- package/liquid/vendor/data-slot-dialog.js +1 -0
- package/liquid/vendor/data-slot-drawer.js +1 -0
- package/liquid/vendor/data-slot-dropdown-menu.js +1 -0
- package/liquid/vendor/data-slot-hover-card.js +1 -0
- package/liquid/vendor/data-slot-navigation-menu.js +1 -0
- package/liquid/vendor/data-slot-popover.js +1 -0
- package/liquid/vendor/data-slot-radio-group.js +1 -0
- package/liquid/vendor/data-slot-select.js +1 -0
- package/liquid/vendor/data-slot-slider.js +1 -0
- package/liquid/vendor/data-slot-switch.js +1 -0
- package/liquid/vendor/data-slot-tabs.js +1 -0
- package/liquid/vendor/data-slot-toast.js +8 -0
- package/liquid/vendor/data-slot-toggle-group.js +1 -0
- package/liquid/vendor/data-slot-toggle.js +1 -0
- package/liquid/vendor/data-slot-tooltip.js +1 -0
- package/liquid/vendor.json +180 -0
- package/package.json +16 -10
- package/public/r/liquid/accordion.json +25 -0
- package/public/r/liquid/alert-dialog.json +21 -0
- package/public/r/liquid/alert.json +18 -0
- package/public/r/liquid/aspect-ratio.json +18 -0
- package/public/r/liquid/attachment.json +20 -0
- package/public/r/liquid/avatar.json +18 -0
- package/public/r/liquid/badge.json +18 -0
- package/public/r/liquid/banner.json +18 -0
- package/public/r/liquid/breadcrumb.json +18 -0
- package/public/r/liquid/button-group.json +19 -0
- package/public/r/liquid/button.json +18 -0
- package/public/r/liquid/card.json +25 -0
- package/public/r/liquid/carousel.json +26 -0
- package/public/r/liquid/checkbox.json +19 -0
- package/public/r/liquid/collapsible.json +19 -0
- package/public/r/liquid/combobox.json +21 -0
- package/public/r/liquid/command.json +19 -0
- package/public/r/liquid/components.json +83 -0
- package/public/r/liquid/dialog.json +19 -0
- package/public/r/liquid/drawer.json +21 -0
- package/public/r/liquid/dropdown-menu.json +21 -0
- package/public/r/liquid/empty.json +18 -0
- package/public/r/liquid/field.json +25 -0
- package/public/r/liquid/form.json +25 -0
- package/public/r/liquid/header.json +19 -0
- package/public/r/liquid/hover-card.json +20 -0
- package/public/r/liquid/icon.json +24 -0
- package/public/r/liquid/init.json +34 -0
- package/public/r/liquid/input-group.json +20 -0
- package/public/r/liquid/input.json +18 -0
- package/public/r/liquid/invalid-controls.json +18 -0
- package/public/r/liquid/item.json +18 -0
- package/public/r/liquid/kbd.json +18 -0
- package/public/r/liquid/label.json +11 -0
- package/public/r/liquid/logo.json +18 -0
- package/public/r/liquid/marquee.json +25 -0
- package/public/r/liquid/native-select.json +11 -0
- package/public/r/liquid/navigation-menu.json +26 -0
- package/public/r/liquid/pagination.json +18 -0
- package/public/r/liquid/popover.json +21 -0
- package/public/r/liquid/popup.json +18 -0
- package/public/r/liquid/price.json +24 -0
- package/public/r/liquid/radio-group.json +20 -0
- package/public/r/liquid/rating.json +24 -0
- package/public/r/liquid/registry.json +1295 -0
- package/public/r/liquid/runtime.json +180 -0
- package/public/r/liquid/section.json +24 -0
- package/public/r/liquid/select.json +22 -0
- package/public/r/liquid/separator.json +18 -0
- package/public/r/liquid/sheet.json +20 -0
- package/public/r/liquid/skeleton.json +18 -0
- package/public/r/liquid/slider.json +19 -0
- package/public/r/liquid/spinner.json +18 -0
- package/public/r/liquid/switch.json +20 -0
- package/public/r/liquid/table.json +18 -0
- package/public/r/liquid/tabs.json +20 -0
- package/public/r/liquid/textarea.json +11 -0
- package/public/r/liquid/toast.json +27 -0
- package/public/r/liquid/toc.json +18 -0
- package/public/r/liquid/toggle-group.json +21 -0
- package/public/r/liquid/toggle.json +20 -0
- package/public/r/liquid/tooltip.json +20 -0
- package/public/r/liquid/triggers.json +18 -0
- package/public/r/liquid/typography.json +24 -0
- package/public/r/liquid/video.json +25 -0
- package/public/r/styles/base-luma/theme-toggle.json +1 -1
- package/public/r/styles/base-lyra/theme-toggle.json +1 -1
- package/public/r/styles/base-maia/theme-toggle.json +1 -1
- package/public/r/styles/base-mira/theme-toggle.json +1 -1
- package/public/r/styles/base-nova/theme-toggle.json +1 -1
- package/public/r/styles/base-rhea/theme-toggle.json +1 -1
- package/public/r/styles/base-sera/theme-toggle.json +1 -1
- package/public/r/styles/base-vega/theme-toggle.json +1 -1
- package/public/r/theme-toggle.json +1 -1
- package/src/components/ui/theme-toggle/theme-provider.astro +14 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "section",
|
|
4
|
+
"title": "Section",
|
|
5
|
+
"description": "Native Liquid section with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "components/section.liquid",
|
|
12
|
+
"content": "{% doc %}\n Fulldev UI section styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{{ 'ui-section.css' | asset_url | stylesheet_tag }}\n",
|
|
13
|
+
"type": "registry:file",
|
|
14
|
+
"target": "~/snippets/ui-section.liquid"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "styles/section.css",
|
|
18
|
+
"content": "[data-slot='section'] {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: var(--section-gap);\n padding-block: var(--section-padding);\n background: var(--background);\n color: var(--foreground);\n scroll-margin-top: 48px;\n}\n[data-slot='section'][data-variant='bordered'] {\n padding-block: 32px;\n border-block: 1px solid var(--border);\n}\n/* The first section of a template page, below the header. */\n[data-slot='section'][data-variant='page'] {\n padding-top: 32px;\n}\n/* A framed panel inset by the gutter, as Fulldev UI's floating section. */\n[data-slot='section'][data-variant='floating'] {\n width: calc(100% - 2 * var(--gutter));\n max-width: calc(var(--container) - 2 * var(--gutter));\n margin: 64px auto;\n overflow: hidden;\n border: 1px solid var(--border);\n border-radius: var(--radius-xl);\n box-shadow: var(--shadow-md);\n}\n/* The container only sets the width and gutters; each section lays out its own children. */\n[data-slot='section-container'],\n[data-slot='header-container'] {\n position: relative;\n width: 100%;\n min-width: 0;\n max-width: var(--container);\n margin-inline: auto;\n padding-inline: var(--gutter);\n}\n[data-slot='header-container'] {\n display: flex;\n gap: 16px;\n}\n[data-slot='section-title'] {\n font-size: 1.875rem;\n line-height: 2.25rem;\n text-wrap: balance;\n}\n[data-slot='section-description'] {\n font-size: 1.125rem;\n line-height: 1.625;\n color: var(--muted-foreground);\n text-wrap: balance;\n}\n/* Display headline of centered heroes and banners. */\n.display-title {\n max-width: 56rem;\n font-size: 2.25rem;\n line-height: 1.1;\n text-wrap: balance;\n}\n\n/* The actions of a section intro, wrapping when they do not fit beside each other. */\n.section-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n/* A section title set tight, as in Fulldev UI's call to action and content blocks. */\n[data-slot='section-title'].tight-title {\n line-height: 1.1;\n}\n/* The display headline of split heroes: 36px, 48px from 640px. */\n.hero-title {\n font-size: 2.25rem;\n line-height: 1.1;\n text-wrap: balance;\n}\n@media (min-width: 640px) {\n [data-slot='section-title'] {\n font-size: 2.25rem;\n line-height: 2.5rem;\n }\n .display-title,\n .hero-title {\n font-size: 3rem;\n }\n}\n@media (min-width: 1024px) {\n .display-title {\n font-size: 3.75rem;\n }\n}\n",
|
|
19
|
+
"type": "registry:file",
|
|
20
|
+
"target": "~/assets/ui-section.css"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"type": "registry:item"
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "select",
|
|
4
|
+
"title": "Select",
|
|
5
|
+
"description": "Native Liquid select with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json",
|
|
8
|
+
"https://ui.full.dev/r/liquid/input.json",
|
|
9
|
+
"https://ui.full.dev/r/liquid/popup.json",
|
|
10
|
+
"https://ui.full.dev/r/liquid/invalid-controls.json",
|
|
11
|
+
"https://ui.full.dev/r/liquid/runtime.json"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "components/select.liquid",
|
|
16
|
+
"content": "{% doc %}\n Fulldev UI select styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* The data-slot select: a trigger like the native select and a listbox popup, as Vega's select. */\n [data-slot='select-trigger'] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--spacing) * 1.5);\n width: 100%;\n height: calc(var(--spacing) * 9);\n padding: calc(var(--spacing) * 2) calc(var(--spacing) * 2) calc(var(--spacing) * 2) calc(var(--spacing) * 2.5);\n border: 1px solid var(--input);\n border-radius: var(--radius-md);\n background: light-dark(transparent, color-mix(in oklch, var(--input) 30%, transparent));\n font-size: 0.875rem;\n white-space: nowrap;\n box-shadow: var(--shadow-xs);\n outline: none;\n transition:\n color 150ms,\n box-shadow 150ms;\n }\n [data-slot='select-trigger'][data-placeholder] {\n color: var(--muted-foreground);\n }\n [data-slot='select-trigger']:focus-visible {\n border-color: var(--ring);\n box-shadow: var(--focus-ring);\n }\n [data-slot='select-trigger']:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n [data-slot='select-trigger'] > .icon {\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n color: var(--muted-foreground);\n }\n [data-slot='select'][data-size='sm'] [data-slot='select-trigger'] {\n height: calc(var(--spacing) * 8);\n }\n [data-slot='select-value'] {\n flex: 1;\n overflow: hidden;\n text-align: left;\n text-overflow: ellipsis;\n }\n{% endstylesheet %}\n",
|
|
17
|
+
"type": "registry:file",
|
|
18
|
+
"target": "~/snippets/ui-select.liquid"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"type": "registry:item"
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "separator",
|
|
4
|
+
"title": "Separator",
|
|
5
|
+
"description": "Native Liquid separator with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "components/separator.liquid",
|
|
12
|
+
"content": "{% doc %}\n Fulldev UI separator styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n [data-slot='separator'] {\n flex-shrink: 0;\n width: 100%;\n height: 1px;\n margin: 0;\n border: 0;\n background: var(--border);\n }\n [data-slot='separator'][data-orientation='vertical'] {\n width: 1px;\n height: auto;\n align-self: stretch;\n }\n{% endstylesheet %}\n",
|
|
13
|
+
"type": "registry:file",
|
|
14
|
+
"target": "~/snippets/ui-separator.liquid"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"type": "registry:item"
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "sheet",
|
|
4
|
+
"title": "Sheet",
|
|
5
|
+
"description": "Native Liquid sheet with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json",
|
|
8
|
+
"https://ui.full.dev/r/liquid/dialog.json",
|
|
9
|
+
"https://ui.full.dev/r/liquid/runtime.json"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
{
|
|
13
|
+
"path": "components/sheet.liquid",
|
|
14
|
+
"content": "{% doc %}\n Fulldev UI sheet styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* Dialog content with data-side='right' is a sheet, as shadcn's SheetContent. */\n [data-slot='dialog-content'][data-side='right'] {\n position: fixed;\n inset: 0 0 0 auto;\n z-index: calc(var(--dialog-content-stack-index, 0) * 2 + 101);\n display: flex;\n flex-direction: column;\n gap: 0;\n width: 75%;\n max-width: 24rem;\n height: 100%;\n max-height: none;\n overflow-y: auto;\n padding: 0;\n border-left: 1px solid var(--border);\n border-radius: 0;\n background: var(--popover);\n color: var(--popover-foreground);\n font-size: 0.875rem;\n box-shadow: var(--shadow-lg);\n opacity: 1;\n transform: translateX(0);\n transition:\n opacity 200ms ease-in-out,\n transform 200ms ease-in-out;\n }\n [data-slot='dialog-content'][data-side='right'][data-starting-style],\n [data-slot='dialog-content'][data-side='right'][data-ending-style] {\n opacity: 0;\n transform: translateX(2.5rem);\n }\n [data-slot='sheet-header'] {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--spacing) * 3);\n padding: calc(var(--spacing) * 4);\n background: var(--popover);\n }\n [data-slot='sheet-header'] [data-slot='dialog-title'] {\n font-size: 1rem;\n font-weight: 500;\n letter-spacing: var(--tracking-normal);\n line-height: 1.5;\n }\n [data-slot='sheet-header'] [data-slot='dialog-close'] {\n color: var(--muted-foreground);\n }\n [data-slot='sheet-footer'] {\n position: sticky;\n bottom: 0;\n display: flex;\n flex-direction: column;\n gap: calc(var(--spacing) * 2);\n margin-top: auto;\n padding: calc(var(--spacing) * 4);\n border-top: 1px solid var(--border);\n background: var(--popover);\n }\n{% endstylesheet %}\n",
|
|
15
|
+
"type": "registry:file",
|
|
16
|
+
"target": "~/snippets/ui-sheet.liquid"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"type": "registry:item"
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "skeleton",
|
|
4
|
+
"title": "Skeleton",
|
|
5
|
+
"description": "Native Liquid skeleton with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "components/skeleton.liquid",
|
|
12
|
+
"content": "{% doc %}\n Fulldev UI skeleton styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* A placeholder while content loads, as Fulldev UI's skeleton. */\n [data-slot='skeleton'] {\n border-radius: var(--radius-md);\n background: var(--muted);\n animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n }\n @keyframes skeleton-pulse {\n 50% {\n opacity: 0.5;\n }\n }\n{% endstylesheet %}\n",
|
|
13
|
+
"type": "registry:file",
|
|
14
|
+
"target": "~/snippets/ui-skeleton.liquid"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"type": "registry:item"
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "slider",
|
|
4
|
+
"title": "Slider",
|
|
5
|
+
"description": "Native Liquid slider with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json",
|
|
8
|
+
"https://ui.full.dev/r/liquid/runtime.json"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "components/slider.liquid",
|
|
13
|
+
"content": "{% doc %}\n Fulldev UI slider styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* The controller positions the range and thumbs; these rules only draw them. */\n [data-slot='slider'] {\n width: 100%;\n }\n [data-slot='slider-control'] {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: calc(var(--spacing) * 4);\n touch-action: none;\n user-select: none;\n }\n [data-slot='slider-control'][data-disabled] {\n opacity: 0.5;\n }\n [data-slot='slider-track'] {\n position: relative;\n flex-grow: 1;\n height: 6px;\n overflow: hidden;\n border-radius: 9999px;\n background: var(--muted);\n }\n [data-slot='slider-range'] {\n height: 100%;\n background: var(--primary);\n }\n [data-slot='slider-thumb'] {\n display: block;\n flex-shrink: 0;\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n border: 1px solid var(--primary);\n border-radius: 50%;\n background: var(--background);\n box-shadow: var(--shadow-sm);\n outline: none;\n transition: box-shadow 150ms;\n }\n [data-slot='slider-thumb']:hover,\n [data-slot='slider-thumb']:focus-visible {\n box-shadow: 0 0 0 4px color-mix(in oklch, var(--ring) 50%, transparent);\n }\n{% endstylesheet %}\n",
|
|
14
|
+
"type": "registry:file",
|
|
15
|
+
"target": "~/snippets/ui-slider.liquid"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"type": "registry:item"
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "spinner",
|
|
4
|
+
"title": "Spinner",
|
|
5
|
+
"description": "Native Liquid spinner with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "components/spinner.liquid",
|
|
12
|
+
"content": "{% doc %}\n Fulldev UI spinner styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* Fulldev UI's spinner: a turning loader icon in a role=status element with a translated label. */\n [data-slot='spinner'] {\n display: inline-flex;\n flex-shrink: 0;\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n animation: spinner-turn 1s linear infinite;\n }\n [data-slot='spinner'] > .icon {\n width: 100%;\n height: 100%;\n }\n @keyframes spinner-turn {\n to {\n rotate: 360deg;\n }\n }\n @media (prefers-reduced-motion: reduce) {\n [data-slot='spinner'] {\n animation-duration: 3s;\n }\n }\n{% endstylesheet %}\n",
|
|
13
|
+
"type": "registry:file",
|
|
14
|
+
"target": "~/snippets/ui-spinner.liquid"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"type": "registry:item"
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "switch",
|
|
4
|
+
"title": "Switch",
|
|
5
|
+
"description": "Native Liquid switch with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json",
|
|
8
|
+
"https://ui.full.dev/r/liquid/invalid-controls.json",
|
|
9
|
+
"https://ui.full.dev/r/liquid/runtime.json"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
{
|
|
13
|
+
"path": "components/switch.liquid",
|
|
14
|
+
"content": "{% doc %}\n Fulldev UI switch styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n [data-slot='switch'] {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n width: 32px;\n height: 18.4px;\n border: 1px solid transparent;\n border-radius: 9999px;\n background: light-dark(var(--input), color-mix(in oklch, var(--input) 80%, transparent));\n box-shadow: var(--shadow-xs);\n cursor: pointer;\n outline: none;\n transition:\n background-color 150ms,\n box-shadow 150ms;\n }\n [data-slot='switch'][data-checked] {\n background: var(--primary);\n }\n [data-slot='switch']:focus-visible {\n border-color: var(--ring);\n box-shadow: var(--focus-ring);\n }\n [data-slot='switch'][data-disabled] {\n cursor: not-allowed;\n opacity: 0.5;\n }\n [data-slot='switch-thumb'] {\n display: block;\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n border-radius: 50%;\n background: light-dark(var(--background), var(--foreground));\n pointer-events: none;\n transition: translate 150ms;\n }\n [data-slot='switch-thumb'][data-checked] {\n background: light-dark(var(--background), var(--primary-foreground));\n translate: calc(100% - 2px) 0;\n }\n [data-slot='switch'][data-size='sm'] {\n width: 24px;\n height: 14px;\n }\n [data-slot='switch'][data-size='sm'] [data-slot='switch-thumb'] {\n width: calc(var(--spacing) * 3);\n height: calc(var(--spacing) * 3);\n }\n{% endstylesheet %}\n",
|
|
15
|
+
"type": "registry:file",
|
|
16
|
+
"target": "~/snippets/ui-switch.liquid"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"type": "registry:item"
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "table",
|
|
4
|
+
"title": "Table",
|
|
5
|
+
"description": "Native Liquid table with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "components/table.liquid",
|
|
12
|
+
"content": "{% doc %}\n Fulldev UI table styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* Vega's table: rows between rules, a muted footer and the caption below. */\n [data-slot='table-container'] {\n position: relative;\n width: 100%;\n overflow-x: auto;\n }\n [data-slot='table'] {\n width: 100%;\n border-collapse: collapse;\n caption-side: bottom;\n font-size: 0.875rem;\n }\n [data-slot='table-header'] [data-slot='table-row'] {\n border-bottom: 1px solid var(--border);\n }\n [data-slot='table-row'] {\n border-bottom: 1px solid var(--border);\n transition: background-color 150ms;\n }\n [data-slot='table-body'] [data-slot='table-row']:last-child {\n border-bottom: 0;\n }\n [data-slot='table-body'] [data-slot='table-row']:hover {\n background: color-mix(in oklch, var(--muted) 50%, transparent);\n }\n [data-slot='table-row'][data-state='selected'] {\n background: var(--muted);\n }\n [data-slot='table-footer'] {\n border-top: 1px solid var(--border);\n background: color-mix(in oklch, var(--muted) 50%, transparent);\n font-weight: 500;\n }\n [data-slot='table-footer'] [data-slot='table-row']:last-child {\n border-bottom: 0;\n }\n [data-slot='table-head'] {\n height: calc(var(--spacing) * 10);\n padding-inline: calc(var(--spacing) * 2);\n color: var(--foreground);\n font-weight: 500;\n text-align: left;\n vertical-align: middle;\n white-space: nowrap;\n }\n [data-slot='table-cell'] {\n padding: calc(var(--spacing) * 2);\n vertical-align: middle;\n white-space: nowrap;\n }\n :is([data-slot='table-head'], [data-slot='table-cell']):has([data-slot='checkbox']) {\n padding-right: 0;\n }\n [data-slot='table-caption'] {\n margin-top: calc(var(--spacing) * 4);\n color: var(--muted-foreground);\n font-size: 0.875rem;\n }\n{% endstylesheet %}\n",
|
|
13
|
+
"type": "registry:file",
|
|
14
|
+
"target": "~/snippets/ui-table.liquid"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"type": "registry:item"
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "tabs",
|
|
4
|
+
"title": "Tabs",
|
|
5
|
+
"description": "Native Liquid tabs with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json",
|
|
8
|
+
"https://ui.full.dev/r/liquid/triggers.json",
|
|
9
|
+
"https://ui.full.dev/r/liquid/runtime.json"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
{
|
|
13
|
+
"path": "components/tabs.liquid",
|
|
14
|
+
"content": "{% doc %}\n Fulldev UI tabs styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* Vega's tabs. The controller sets data-state='active' on the selected trigger and its content. */\n [data-slot='tabs'] {\n display: flex;\n flex-direction: column;\n gap: calc(var(--spacing) * 2);\n }\n [data-slot='tabs-list'] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: calc(var(--spacing) * 9);\n padding: 3px;\n border-radius: var(--radius-lg);\n background: var(--muted);\n color: var(--muted-foreground);\n }\n [data-slot='tabs-trigger'] {\n position: relative;\n display: inline-flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n gap: calc(var(--spacing) * 1.5);\n height: calc(100% - 1px);\n padding: var(--spacing) calc(var(--spacing) * 2);\n border: 1px solid transparent;\n border-radius: var(--radius-md);\n color: color-mix(in oklch, var(--foreground) 60%, transparent);\n font-size: 0.875rem;\n font-weight: 500;\n white-space: nowrap;\n outline: none;\n transition:\n color 150ms,\n background-color 150ms,\n box-shadow 150ms;\n }\n [data-slot='tabs-trigger']:hover {\n color: var(--foreground);\n }\n [data-slot='tabs-trigger']:focus-visible {\n border-color: var(--ring);\n box-shadow: var(--focus-ring);\n }\n [data-slot='tabs-trigger'][data-state='active'] {\n border-color: light-dark(transparent, var(--input));\n background: light-dark(var(--background), color-mix(in oklch, var(--input) 30%, transparent));\n color: var(--foreground);\n box-shadow: var(--shadow-sm);\n }\n [data-slot='tabs-trigger']:disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n [data-slot='tabs-trigger'] > .icon {\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n }\n [data-slot='tabs-list'][data-variant='line'] {\n gap: var(--spacing);\n border-radius: 0;\n background: transparent;\n }\n [data-slot='tabs-list'][data-variant='line'] [data-slot='tabs-trigger'][data-state='active'] {\n border-color: transparent;\n background: transparent;\n box-shadow: none;\n }\n [data-slot='tabs-list'][data-variant='line'] [data-slot='tabs-trigger'][data-state='active']::after {\n content: '';\n position: absolute;\n inset-inline: 0;\n bottom: -5px;\n height: 2px;\n background: var(--foreground);\n }\n [data-slot='tabs-content'] {\n flex: 1;\n font-size: 0.875rem;\n outline: none;\n }\n{% endstylesheet %}\n",
|
|
15
|
+
"type": "registry:file",
|
|
16
|
+
"target": "~/snippets/ui-tabs.liquid"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"type": "registry:item"
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "textarea",
|
|
4
|
+
"title": "Textarea",
|
|
5
|
+
"description": "Native Liquid textarea with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/input.json"
|
|
8
|
+
],
|
|
9
|
+
"files": [],
|
|
10
|
+
"type": "registry:item"
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "toast",
|
|
4
|
+
"title": "Toast",
|
|
5
|
+
"description": "Native Liquid toast with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json",
|
|
8
|
+
"https://ui.full.dev/r/liquid/triggers.json",
|
|
9
|
+
"https://ui.full.dev/r/liquid/button.json",
|
|
10
|
+
"https://ui.full.dev/r/liquid/runtime.json"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "components/toast.liquid",
|
|
15
|
+
"content": "{% doc %}\n Fulldev UI toast styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{{ 'ui-toast.css' | asset_url | stylesheet_tag }}\n",
|
|
16
|
+
"type": "registry:file",
|
|
17
|
+
"target": "~/snippets/ui-toast.liquid"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "styles/toast.css",
|
|
21
|
+
"content": "/* Stacked notifications, after Fulldev UI's toaster. The controller measures the stack and writes\n the offsets; collapsed toasts behind the front one show only their edge. */\n[data-slot='toast-viewport'] {\n --toast-gap: 0.75rem;\n --toast-collapsed-peek: 0.75rem;\n\n position: fixed;\n right: 1rem;\n bottom: 1rem;\n z-index: 1100;\n width: min(24rem, calc(100vw - 2rem));\n height: var(--toast-stack-size, 0);\n pointer-events: none;\n outline: none;\n}\n[data-slot='toast-item'] {\n position: absolute;\n inset-inline: 0;\n bottom: 0;\n z-index: calc(1000 - var(--toast-index, 0));\n border-radius: var(--radius-2xl);\n background: var(--popover);\n color: var(--popover-foreground);\n box-shadow:\n 0 0 0 1px color-mix(in oklch, var(--foreground) 10%, transparent),\n var(--shadow-lg);\n opacity: 0;\n transform: translate3d(0, calc(var(--toast-lift, -1) * -100%), 0);\n transform-origin: bottom;\n pointer-events: auto;\n outline: none;\n user-select: none;\n transition:\n transform 300ms cubic-bezier(0.22, 1, 0.36, 1),\n opacity 300ms cubic-bezier(0.22, 1, 0.36, 1),\n height 300ms cubic-bezier(0.22, 1, 0.36, 1);\n}\n/* Keeps the pointer on the stack between toasts, so hovering it keeps it expanded. */\n[data-slot='toast-item']::after {\n content: '';\n position: absolute;\n bottom: 100%;\n left: 0;\n width: 100%;\n height: calc(var(--toast-gap, 0px) + 1px);\n}\n[data-slot='toast-item']:focus-visible {\n box-shadow: var(--focus-ring);\n}\n[data-slot='toast-item'][data-mounted='true'] {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n}\n[data-slot='toast-item'][data-mounted='true'][data-expanded='true'] {\n height: var(--toast-initial-height);\n transform: translate3d(0, calc(var(--toast-offset, 0px) * var(--toast-lift, -1)), 0);\n}\n[data-slot='toast-item'][data-mounted='true'][data-expanded='false'][data-front='false'] {\n height: var(--toast-front-height);\n transform: translate3d(0, calc(var(--toast-collapsed-offset-y, 0px) * var(--toast-lift, -1)), 0)\n scale(calc(1 - var(--toast-index, 0) * 0.05));\n}\n[data-slot='toast-item'][data-expanded='false'][data-front='false'][data-open] > * {\n opacity: 0;\n}\n[data-slot='toast-item'][data-visible='false'] {\n opacity: 0;\n pointer-events: none;\n}\n[data-slot='toast-item'][data-removed='true'] {\n opacity: 0;\n}\n[data-slot='toast-item'][data-removed='true'][data-front='true'] {\n transform: translate3d(0, calc(var(--toast-lift, -1) * -100%), 0);\n}\n[data-slot='toast-item'][data-swiping='true'] {\n transition: none;\n transform: translate3d(var(--toast-swipe-amount-x, 0), var(--toast-swipe-amount-y, 0), 0);\n}\n[data-slot='toast-item'][data-removed='true'][data-swipe-out='true'] {\n transform: translate3d(var(--toast-swipe-end-x, 0), var(--toast-swipe-end-y, 0), 0);\n}\n[data-slot='toast-content'] {\n display: flex;\n align-items: center;\n gap: calc(var(--spacing) * 3);\n min-height: calc(var(--spacing) * 16);\n padding: calc(var(--spacing) * 4);\n overflow: hidden;\n transition: opacity 200ms;\n}\n/* The title and description beside the toast's icon. */\n.toast-text {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: var(--spacing);\n min-width: 0;\n}\n[data-slot='toast-title'] {\n font-size: 0.875rem;\n font-weight: 500;\n}\n[data-slot='toast-description'] {\n color: var(--muted-foreground);\n font-size: 0.875rem;\n}\n[data-slot='toast-description']:empty,\n[data-slot='toast-action']:empty {\n display: none;\n}\n[data-slot='toast-close'] {\n flex-shrink: 0;\n color: var(--muted-foreground);\n}\n[data-slot='toast-close']:hover {\n color: var(--foreground);\n}\n@media (prefers-reduced-motion: reduce) {\n [data-slot='toast-item'],\n [data-slot='drawer-popup'],\n [data-slot='drawer-backdrop'] {\n transition-duration: 0ms;\n }\n}\n",
|
|
22
|
+
"type": "registry:file",
|
|
23
|
+
"target": "~/assets/ui-toast.css"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"type": "registry:item"
|
|
27
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "toc",
|
|
4
|
+
"title": "Toc",
|
|
5
|
+
"description": "Native Liquid toc with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "components/toc.liquid",
|
|
12
|
+
"content": "{% doc %}\n Fulldev UI toc styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* Fulldev UI's toc: links to the headings of a page, the current one in the foreground. */\n [data-slot='toc'] {\n display: flex;\n flex-direction: column;\n gap: calc(var(--spacing) * 3);\n }\n [data-slot='toc-title'] {\n font-size: 0.875rem;\n font-weight: 500;\n letter-spacing: var(--tracking-tight);\n }\n [data-slot='toc-menu'] {\n display: flex;\n flex-direction: column;\n gap: var(--spacing);\n margin: 0;\n padding: 0;\n list-style: none;\n }\n [data-slot='toc-menu-item'] {\n position: relative;\n }\n [data-slot='toc-menu-link'] {\n display: block;\n color: var(--muted-foreground);\n font-size: 0.875rem;\n line-height: 1.5rem;\n transition: color 150ms;\n }\n [data-slot='toc-menu-link']:hover,\n [data-slot='toc-menu-link'][aria-current] {\n color: var(--foreground);\n }\n [data-slot='toc-menu-link'][data-depth='3'] {\n padding-inline-start: calc(var(--spacing) * 4);\n }\n [data-slot='toc-menu-link'][data-depth='4'] {\n padding-inline-start: calc(var(--spacing) * 8);\n }\n{% endstylesheet %}\n",
|
|
13
|
+
"type": "registry:file",
|
|
14
|
+
"target": "~/snippets/ui-toc.liquid"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"type": "registry:item"
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "toggle-group",
|
|
4
|
+
"title": "Toggle Group",
|
|
5
|
+
"description": "Native Liquid toggle-group with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json",
|
|
8
|
+
"https://ui.full.dev/r/liquid/toggle.json",
|
|
9
|
+
"https://ui.full.dev/r/liquid/triggers.json",
|
|
10
|
+
"https://ui.full.dev/r/liquid/runtime.json"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "components/toggle-group.liquid",
|
|
15
|
+
"content": "{% doc %}\n Fulldev UI toggle-group styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* Joined toggles, as Vega's toggle group without spacing. The group sets the variant and size. */\n [data-slot='toggle-group'] {\n display: flex;\n align-items: center;\n width: fit-content;\n border-radius: var(--radius-md);\n }\n [data-slot='toggle-group'][data-variant='outline'] {\n box-shadow: var(--shadow-xs);\n }\n [data-slot='toggle-group-item'] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing);\n min-width: calc(var(--spacing) * 9);\n height: calc(var(--spacing) * 9);\n padding-inline: calc(var(--spacing) * 2);\n border: 1px solid transparent;\n border-radius: 0;\n background: transparent;\n font-size: 0.875rem;\n font-weight: 500;\n white-space: nowrap;\n outline: none;\n transition:\n background-color 150ms,\n color 150ms,\n box-shadow 150ms;\n }\n [data-slot='toggle-group-item']:first-child {\n border-top-left-radius: var(--radius-md);\n border-bottom-left-radius: var(--radius-md);\n }\n [data-slot='toggle-group-item']:last-child {\n border-top-right-radius: var(--radius-md);\n border-bottom-right-radius: var(--radius-md);\n }\n [data-slot='toggle-group-item']:hover,\n [data-slot='toggle-group-item'][data-state='on'] {\n background: var(--muted);\n color: var(--foreground);\n }\n [data-slot='toggle-group-item']:focus-visible {\n position: relative;\n z-index: 1;\n border-color: var(--ring);\n box-shadow: var(--focus-ring);\n }\n [data-slot='toggle-group-item']:disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n [data-slot='toggle-group-item'] > .icon {\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n }\n [data-slot='toggle-group'][data-variant='outline'] [data-slot='toggle-group-item'] {\n border-color: var(--input);\n }\n [data-slot='toggle-group'][data-variant='outline'] [data-slot='toggle-group-item'] + [data-slot='toggle-group-item'] {\n border-left-width: 0;\n }\n [data-slot='toggle-group'][data-size='sm'] [data-slot='toggle-group-item'] {\n min-width: calc(var(--spacing) * 8);\n height: calc(var(--spacing) * 8);\n }\n [data-slot='toggle-group'][data-size='lg'] [data-slot='toggle-group-item'] {\n min-width: calc(var(--spacing) * 10);\n height: calc(var(--spacing) * 10);\n }\n{% endstylesheet %}\n",
|
|
16
|
+
"type": "registry:file",
|
|
17
|
+
"target": "~/snippets/ui-toggle-group.liquid"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"type": "registry:item"
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "toggle",
|
|
4
|
+
"title": "Toggle",
|
|
5
|
+
"description": "Native Liquid toggle with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json",
|
|
8
|
+
"https://ui.full.dev/r/liquid/triggers.json",
|
|
9
|
+
"https://ui.full.dev/r/liquid/runtime.json"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
{
|
|
13
|
+
"path": "components/toggle.liquid",
|
|
14
|
+
"content": "{% doc %}\n Fulldev UI toggle styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* Option values and filter values: links or labels with the toggle look. The selected value\n also takes a primary border, so it stands out beyond the fill. */\n [data-slot='toggle'] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing);\n min-width: calc(var(--spacing) * 9);\n height: calc(var(--spacing) * 9);\n padding-inline: calc(var(--spacing) * 2.5);\n border: 1px solid transparent;\n border-radius: var(--radius-md);\n background: transparent;\n font-size: 0.875rem;\n font-weight: 500;\n white-space: nowrap;\n text-decoration: none;\n outline: none;\n transition:\n background-color 150ms,\n border-color 150ms,\n color 150ms,\n box-shadow 150ms;\n }\n [data-slot='toggle'] > .icon {\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n }\n [data-slot='toggle']:hover {\n background: var(--muted);\n color: var(--foreground);\n }\n [data-slot='toggle']:focus-visible,\n [data-slot='toggle']:has(:focus-visible) {\n border-color: var(--ring);\n box-shadow: var(--focus-ring);\n }\n [data-slot='toggle']:is([aria-current], [aria-pressed='true'], :has(:checked)) {\n background: var(--muted);\n }\n [data-slot='toggle'][data-variant='outline'] {\n border-color: var(--input);\n box-shadow: var(--shadow-xs);\n }\n [data-slot='toggle'][data-variant='outline']:is([aria-current], [aria-pressed='true'], :has(:checked)) {\n border-color: var(--primary);\n }\n [data-slot='toggle'][data-size='sm'] {\n min-width: calc(var(--spacing) * 8);\n height: calc(var(--spacing) * 8);\n }\n [data-slot='toggle'][data-size='lg'] {\n min-width: calc(var(--spacing) * 10);\n height: calc(var(--spacing) * 10);\n }\n{% endstylesheet %}\n",
|
|
15
|
+
"type": "registry:file",
|
|
16
|
+
"target": "~/snippets/ui-toggle.liquid"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"type": "registry:item"
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "tooltip",
|
|
4
|
+
"title": "Tooltip",
|
|
5
|
+
"description": "Native Liquid tooltip with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json",
|
|
8
|
+
"https://ui.full.dev/r/liquid/popup.json",
|
|
9
|
+
"https://ui.full.dev/r/liquid/runtime.json"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
{
|
|
13
|
+
"path": "components/tooltip.liquid",
|
|
14
|
+
"content": "{% doc %}\n Fulldev UI tooltip styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* Inverted colors: the scheme's foreground as the fill, as Fulldev UI's tooltip. */\n [data-slot='tooltip-content'] {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: calc(var(--spacing) * 1.5);\n width: fit-content;\n max-width: 20rem;\n padding: calc(var(--spacing) * 1.5) calc(var(--spacing) * 3);\n border-radius: var(--radius-md);\n background: var(--foreground);\n color: var(--background);\n font-size: 0.75rem;\n line-height: 1.33;\n transform-origin: var(--transform-origin, center);\n transition:\n opacity 100ms,\n scale 100ms;\n }\n [data-slot='tooltip-arrow'] {\n position: absolute;\n width: 10px;\n height: 10px;\n border-radius: 2px;\n background: var(--foreground);\n rotate: 45deg;\n }\n [data-slot='tooltip-arrow'][data-side='bottom'] {\n top: -4px;\n }\n [data-slot='tooltip-arrow'][data-side='top'] {\n bottom: -4px;\n }\n [data-slot='tooltip-arrow'][data-side='left'] {\n right: -4px;\n }\n [data-slot='tooltip-arrow'][data-side='right'] {\n left: -4px;\n }\n{% endstylesheet %}\n",
|
|
15
|
+
"type": "registry:file",
|
|
16
|
+
"target": "~/snippets/ui-tooltip.liquid"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"type": "registry:item"
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "triggers",
|
|
4
|
+
"title": "Triggers",
|
|
5
|
+
"description": "Native Liquid triggers with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "components/triggers.liquid",
|
|
12
|
+
"content": "{% doc %}\n Fulldev UI triggers styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* A control that only works with its controller, such as a popup trigger, a toggle or a tab list,\n shows once the controller has started, which theme.js marks with data-enhanced. Without it, the\n page keeps the content available: collapsible and tab panels stay open. */\n [data-slot='popover']:not([data-enhanced]) > [data-slot='popover-trigger'],\n [data-slot='dropdown-menu']:not([data-enhanced]) > [data-slot='dropdown-menu-trigger'],\n [data-slot='alert-dialog']:not([data-enhanced]) > [data-slot='alert-dialog-trigger'],\n [data-slot='drawer']:not([data-enhanced]) > [data-slot='drawer-trigger'],\n [data-slot='toast']:not([data-enhanced]) [data-toast-title],\n [data-slot='collapsible']:not([data-enhanced]) > [data-slot='collapsible-trigger'],\n [data-slot='tabs']:not([data-enhanced]) > [data-slot='tabs-list'],\n [data-slot='toggle-group']:not([data-enhanced]),\n button[data-slot='toggle']:not([data-enhanced]) {\n display: none;\n }\n{% endstylesheet %}\n",
|
|
13
|
+
"type": "registry:file",
|
|
14
|
+
"target": "~/snippets/ui-triggers.liquid"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"type": "registry:item"
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "typography",
|
|
4
|
+
"title": "Typography",
|
|
5
|
+
"description": "Native Liquid typography with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "components/typography.liquid",
|
|
12
|
+
"content": "{% doc %}\n Fulldev UI typography styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{{ 'ui-typography.css' | asset_url | stylesheet_tag }}\n",
|
|
13
|
+
"type": "registry:file",
|
|
14
|
+
"target": "~/snippets/ui-typography.liquid"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "styles/typography.css",
|
|
18
|
+
"content": "h1,\nh2,\nh3,\nh4 {\n font-family: var(--font-heading);\n font-weight: var(--heading-weight);\n letter-spacing: var(--tracking-tight);\n scroll-margin-top: 80px;\n}\nh1 {\n font-size: 2.25rem;\n line-height: 2.5rem;\n text-wrap: balance;\n}\nh2 {\n font-size: 1.875rem;\n line-height: 2.25rem;\n}\nh3 {\n font-size: 1.5rem;\n line-height: 2rem;\n}\nh4 {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n[data-size='sm']:is(h1) {\n font-size: 1.875rem;\n line-height: 2.25rem;\n}\n[data-size='sm']:is(h2) {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n[data-size='sm']:is(h3) {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n[data-size='sm']:is(h4) {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n[data-size='lg']:is(h1) {\n font-size: 3rem;\n line-height: 1;\n}\n.muted {\n color: var(--muted-foreground);\n}\n.link {\n font-weight: 500;\n text-decoration: underline;\n}\n.link:hover {\n text-decoration-thickness: 2px;\n}\n\n/* Rich text from the editor or Shopify content: Fulldev UI's typography, shadcn/ui's typeset.\n Text is 18px below 768px and 16px from there (sm 14px, lg 18px), headings scale in em, and the\n flow sets the space between blocks. Theme tokens set the colors and fonts, images and videos\n keep square corners, and a wide table scrolls. [data-not-typeset] keeps a part out.\n The typeset class gives merchant rich text inside another part, such as a section or card\n description, the same flow, headings, lists and links at that part's size, leading and color. */\n:is([data-slot='typography'], .typeset) {\n --typeset-font-heading: var(--font-heading);\n --typeset-font-mono: var(--font-mono);\n --typeset-flow: 1.25em;\n --typeset-heading: currentcolor;\n --typeset-muted: currentcolor;\n --typeset-rule: var(--border);\n\n overflow-wrap: break-word;\n}\n[data-slot='typography'] {\n --typeset-font-body: inherit;\n --typeset-size: 1rem;\n --typeset-leading: 1.75;\n --typeset-heading: var(--foreground);\n --typeset-muted: var(--muted-foreground);\n\n font-family: var(--typeset-font-body);\n font-size: calc(var(--typeset-size) * 1.125);\n line-height: var(--typeset-leading);\n color: var(--foreground);\n}\n@media (min-width: 768px), print {\n [data-slot='typography'] {\n font-size: var(--typeset-size);\n }\n}\n[data-slot='typography'][data-size='sm'] {\n --typeset-size: 0.875rem;\n --typeset-leading: 1.7;\n --typeset-flow: 1.125em;\n}\n[data-slot='typography'][data-size='lg'] {\n --typeset-size: 1.125rem;\n --typeset-leading: 1.8;\n --typeset-flow: 1.5em;\n}\n[data-slot='typography'][data-variant='muted'] {\n color: var(--muted-foreground);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(p) {\n margin-block: var(--typeset-flow) 0;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h1),\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h2),\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h3),\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h4),\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h5),\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h6) {\n color: var(--typeset-heading);\n font-family: var(--typeset-font-heading);\n font-weight: var(--heading-weight);\n letter-spacing: var(--tracking-normal);\n margin-block-end: 0;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h1) {\n font-size: 1.75em;\n line-height: 1.3;\n margin-block-start: var(--typeset-flow);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h2) {\n font-size: 1.25em;\n line-height: 1.4;\n margin-block-start: calc(var(--typeset-flow) * 1.4);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h3) {\n font-size: 1.125em;\n line-height: 1.45;\n margin-block-start: var(--typeset-flow);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h4) {\n font-size: 1em;\n line-height: 1.5;\n margin-block-start: var(--typeset-flow);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h5) {\n font-size: 0.875em;\n line-height: 1.5;\n font-weight: 500;\n color: var(--typeset-muted);\n margin-block-start: calc(var(--typeset-flow) / 0.875);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h6) {\n font-size: 0.8125em;\n line-height: 1.5;\n font-weight: 500;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--typeset-muted);\n margin-block-start: calc(var(--typeset-flow) / 0.8125);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where([id]) {\n scroll-margin-block-start: var(--typeset-flow);\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + *) {\n margin-block-start: 1em;\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(:is(h1, h2, h3, h4) :is(code)) {\n font-size: 0.9em;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(a) {\n color: inherit;\n font-weight: 500;\n text-decoration-line: underline;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(a:hover) {\n text-decoration-thickness: 2px;\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(:is(h1, h2, h3, h4, h5, h6) :is(a)) {\n font-weight: inherit;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(strong, b) {\n font-weight: 600;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(mark) {\n padding: 0.05em 0.15em;\n border-radius: 0.2em;\n background-color: color-mix(in oklab, var(--primary) 15%, transparent);\n color: inherit;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(abbr[title]) {\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-underline-offset: 0.2em;\n cursor: help;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(del, s) {\n color: var(--typeset-muted);\n text-decoration-line: line-through;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(sup, sub) {\n position: relative;\n font-size: 0.75em;\n line-height: 0;\n vertical-align: baseline;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(sup) {\n top: -0.5em;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(sub) {\n bottom: -0.25em;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(sup a) {\n text-decoration-line: none;\n font-weight: 500;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ul) {\n list-style-type: disc;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ol) {\n list-style-type: decimal;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ul ul) {\n list-style-type: circle;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ul ul ul) {\n list-style-type: square;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ol[type='a' i]) {\n list-style-type: lower-alpha;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ol[type='i' i]) {\n list-style-type: lower-roman;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ol[type='A' s]) {\n list-style-type: upper-alpha;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ol[type='I' s]) {\n list-style-type: upper-roman;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ul, ol) {\n margin-block: var(--typeset-flow) 0;\n padding-inline-start: 1.5em;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(li) {\n margin-block-start: 0.5em;\n padding-inline-start: 0.4em;\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(li > p, li > ul, li > ol) {\n margin-block-start: 0.5em;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ul > li)::marker,\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(ol > li)::marker {\n color: var(--typeset-muted);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(details) {\n margin-block: var(--typeset-flow) 0;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(summary) {\n cursor: pointer;\n font-weight: 500;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(summary)::marker {\n color: var(--typeset-muted);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(kbd) {\n padding: 0.0625em 0.35em;\n border: 1px solid var(--typeset-rule);\n border-block-end-width: 2px;\n border-radius: min(calc(var(--radius) * 0.6), 0.35em);\n font-family: inherit;\n font-size: 0.85em;\n font-weight: 500;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(dl) {\n margin-block: var(--typeset-flow) 0;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(dt) {\n margin-block-start: 1em;\n font-weight: 500;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(dt + dt) {\n margin-block-start: 0.25em;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(dd) {\n margin-block-start: 0.25em;\n margin-inline-start: 0;\n padding-inline-start: 1em;\n color: var(--typeset-muted);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(:not(pre) > code) {\n padding: 0.125em 0.3em;\n border-radius: min(calc(var(--radius) * 0.6), 0.35em);\n background-color: var(--muted);\n font-family: var(--typeset-font-mono);\n font-size: 0.85em;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(pre) {\n margin-block: calc(var(--typeset-flow) / 0.875) 0;\n overflow-x: auto;\n padding: 0.75em 1em;\n border-radius: var(--radius);\n background-color: var(--muted);\n font-family: var(--typeset-font-mono);\n font-size: 0.875em;\n line-height: 1.5;\n tab-size: 2;\n direction: ltr;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(pre code) {\n padding: 0;\n border-radius: 0;\n background-color: transparent;\n font-family: inherit;\n font-size: inherit;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(blockquote) {\n margin-block: var(--typeset-flow) 0;\n margin-inline: 0;\n padding-inline-start: 1em;\n border-inline-start: 2px solid var(--typeset-rule);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(hr) {\n margin-block: calc(var(--typeset-flow) * 2.4) 0;\n border: 0;\n border-block-start: 1px solid var(--typeset-rule);\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(hr + h1, hr + h2, hr + h3, hr + h4) {\n margin-block-start: var(--typeset-flow);\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(img, video) {\n max-width: 100%;\n height: auto;\n margin-block: var(--typeset-flow) 0;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(iframe) {\n max-width: 100%;\n margin-block: var(--typeset-flow) 0;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(p img) {\n margin-block-start: 0;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(figure) {\n margin-block: var(--typeset-flow) 0;\n margin-inline: 0;\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(figcaption, caption) {\n margin-block-start: calc(0.75em / 0.875);\n color: var(--typeset-muted);\n font-size: 0.875em;\n text-align: center;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(caption) {\n caption-side: bottom;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(table) {\n display: block;\n width: max-content;\n max-width: 100%;\n margin-block: var(--typeset-flow) 0;\n overflow-x: auto;\n border-block-end: 1px solid var(--typeset-rule);\n border-collapse: separate;\n border-spacing: 0;\n font-size: 1em;\n line-height: 1.5;\n font-variant-numeric: tabular-nums;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(thead th) {\n padding: 0.65em 1em;\n font-weight: 500;\n text-align: start;\n white-space: nowrap;\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(:is(tbody, tfoot) :is(td, th)) {\n padding: 0.75em 1em;\n border-block-start: 1px solid var(--typeset-rule);\n text-align: start;\n vertical-align: top;\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(tbody th, tfoot th) {\n font-weight: 500;\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(th:first-child, td:first-child) {\n padding-inline-start: 0;\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(th[align='center'], td[align='center']) {\n text-align: center;\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(th[align='right'], td[align='right']) {\n text-align: end;\n}\n:is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(li > blockquote, li > table, li > figure) {\n margin-block-start: 0.5em;\n}\n:is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(li > pre) {\n margin-block-start: calc(0.5em / 0.875);\n}\n@media print {\n :is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(pre, table, blockquote, figure) {\n break-inside: avoid;\n }\n :is([data-slot='typography'], .typeset) :not(:where([data-not-typeset], [data-not-typeset] *)):where(h1, h2, h3, h4) {\n break-after: avoid;\n }\n}\n@media (forced-colors: active) {\n :is([data-slot='typography'], .typeset)\n :not(:where([data-not-typeset], [data-not-typeset] *)):where(:not(pre) > code) {\n border: 1px solid;\n }\n}\n:is([data-slot='typography'], .typeset) > :where(:first-child):not(:where([data-not-typeset], [data-not-typeset] *)),\n:is([data-slot='typography'], .typeset)\n > :where(:first-child)\n > :where(:first-child):not(:where([data-not-typeset], [data-not-typeset] *)),\n:is([data-slot='typography'], .typeset)\n :where(\n li > :first-child,\n blockquote > :first-child,\n td > :first-child,\n th > :first-child,\n dd > :first-child,\n figure > :first-child,\n figure > picture > img\n ):not(:where([data-not-typeset], [data-not-typeset] *)) {\n margin-block-start: 0;\n}\n\n/* Typography parts, as Fulldev UI's typography components: the same roles outside rich text,\n each with the sm and lg sizes. Large, small and muted are shadcn/ui's typography roles. */\n[data-slot='typography-h1'],\n[data-slot='typography-h2'],\n[data-slot='typography-h3'],\n[data-slot='typography-h4'] {\n font-family: var(--font-heading);\n font-weight: var(--heading-weight);\n letter-spacing: var(--tracking-tight);\n scroll-margin-top: 80px;\n}\n[data-slot='typography-h1'] {\n text-wrap: balance;\n font-size: 2.25rem;\n line-height: 2.5rem;\n}\n[data-slot='typography-h1'][data-size='sm'] {\n font-size: 1.875rem;\n line-height: 2.25rem;\n}\n[data-slot='typography-h1'][data-size='lg'] {\n font-size: 3rem;\n line-height: 1;\n}\n[data-slot='typography-h2'] {\n font-size: 1.875rem;\n line-height: 2.25rem;\n}\n[data-slot='typography-h2'][data-size='sm'] {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n[data-slot='typography-h2'][data-size='lg'] {\n font-size: 2.25rem;\n line-height: 2.5rem;\n}\n[data-slot='typography-h3'] {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n[data-slot='typography-h3'][data-size='sm'] {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n[data-slot='typography-h3'][data-size='lg'] {\n font-size: 1.875rem;\n line-height: 2.25rem;\n}\n[data-slot='typography-h4'] {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n[data-slot='typography-h4'][data-size='sm'] {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n[data-slot='typography-h4'][data-size='lg'] {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n[data-slot='typography-p'],\n[data-slot='typography-blockquote'],\n[data-slot='typography-list'] {\n font-size: 1rem;\n line-height: 1.75rem;\n}\n[data-slot='typography-p']:not(:first-child) {\n margin-top: 1.5rem;\n}\n[data-slot='typography-lead'] {\n font-size: 1.125rem;\n line-height: 1.75rem;\n color: var(--muted-foreground);\n}\n[data-slot='typography-lead'][data-size='sm'] {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n[data-slot='typography-lead'][data-size='lg'] {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n[data-slot='typography-large'] {\n font-size: 1.125rem;\n font-weight: 600;\n line-height: 1.75rem;\n}\n[data-slot='typography-small'] {\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1;\n}\n[data-slot='typography-muted'] {\n font-size: 0.875rem;\n line-height: 1.25rem;\n color: var(--muted-foreground);\n}\n[data-slot='typography-blockquote'] {\n margin-top: 1.5rem;\n padding-inline-start: 1.5rem;\n border-inline-start: 2px solid var(--border);\n font-style: italic;\n}\n[data-slot='typography-list'] {\n margin-block: 1.5rem;\n padding-inline-start: 1.5rem;\n}\n[data-slot='typography-list'] > li + li {\n margin-top: 0.5rem;\n}\n[data-slot='typography-p'][data-size='sm'] {\n font-size: 0.875rem;\n line-height: 1.5rem;\n}\n[data-slot='typography-p'][data-size='lg'] {\n font-size: 1.125rem;\n line-height: 1.875rem;\n}\n[data-slot='typography-blockquote'][data-size='sm'] {\n font-size: 0.875rem;\n line-height: 1.5rem;\n}\n[data-slot='typography-blockquote'][data-size='lg'] {\n font-size: 1.125rem;\n line-height: 1.875rem;\n}\n[data-slot='typography-list'][data-size='sm'] {\n font-size: 0.875rem;\n line-height: 1.5rem;\n}\n[data-slot='typography-list'][data-size='lg'] {\n font-size: 1.125rem;\n line-height: 1.875rem;\n}\n[data-slot='typography-inline-code'] {\n padding: 0.2rem 0.3rem;\n border-radius: var(--radius-sm);\n background: var(--muted);\n font-family: var(--font-mono);\n font-size: 0.875rem;\n font-weight: 600;\n}\n[data-slot='typography-inline-code'][data-size='sm'] {\n font-size: 0.75rem;\n}\n[data-slot='typography-inline-code'][data-size='lg'] {\n font-size: 1rem;\n}\n[data-slot='typography-a'] {\n color: var(--primary);\n font-size: 1rem;\n font-weight: 500;\n line-height: 1.5rem;\n text-decoration: underline;\n text-underline-offset: 4px;\n}\n[data-slot='typography-a'][data-size='sm'] {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n[data-slot='typography-a'][data-size='lg'] {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n[data-slot='typography-a']:hover {\n text-decoration-thickness: 2px;\n}\n\n/* A table in running text, as Fulldev UI's typography table: framed, with striped rows. */\n[data-slot='typography-table-container'] {\n width: 100%;\n margin-block: 1.5rem;\n overflow-x: auto;\n border: 1px solid var(--border);\n border-radius: var(--radius-xl);\n}\n[data-slot='typography-table'] {\n width: 100%;\n border-collapse: collapse;\n font-size: 1rem;\n line-height: 1.5rem;\n}\n[data-slot='typography-table'][data-size='sm'] {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n[data-slot='typography-table'][data-size='lg'] {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n[data-slot='typography-table-row']:nth-child(even) {\n background: var(--muted);\n}\n[data-slot='typography-table-head'],\n[data-slot='typography-table-cell'] {\n padding: 0.75rem 1rem;\n text-align: start;\n}\n[data-slot='typography-table-head'] {\n border-bottom: 1px solid var(--border);\n font-weight: 600;\n}\n[data-slot='typography-table-cell'] {\n border-top: 1px solid var(--border);\n}\n:is([data-slot='typography-table-head'], [data-slot='typography-table-cell'])[align='left'] {\n text-align: left;\n}\n:is([data-slot='typography-table-head'], [data-slot='typography-table-cell'])[align='center'] {\n text-align: center;\n}\n:is([data-slot='typography-table-head'], [data-slot='typography-table-cell'])[align='right'] {\n text-align: right;\n}\n\n.check-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: 0.875rem;\n}\n.check-list > li {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n}\n.check-list .icon {\n width: 16px;\n height: 16px;\n margin-top: 2px;\n color: var(--primary);\n}\n",
|
|
19
|
+
"type": "registry:file",
|
|
20
|
+
"target": "~/assets/ui-typography.css"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"type": "registry:item"
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "video",
|
|
4
|
+
"title": "Video",
|
|
5
|
+
"description": "Native Liquid video with readable CSS and data-slot parts.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://ui.full.dev/r/liquid/init.json",
|
|
8
|
+
"https://ui.full.dev/r/liquid/aspect-ratio.json"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "components/video.liquid",
|
|
13
|
+
"content": "{% doc %}\n Fulldev UI video styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{{ 'ui-video.css' | asset_url | stylesheet_tag }}\n",
|
|
14
|
+
"type": "registry:file",
|
|
15
|
+
"target": "~/snippets/ui-video.liquid"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"path": "styles/video.css",
|
|
19
|
+
"content": "/* The playing media of a video: a Shopify video, an embed, or the click-to-load cover that becomes\n one. It fills its aspect-ratio frame, which carries Fulldev UI's border and radius. */\n[data-slot='video'] {\n display: block;\n width: 100%;\n height: 100%;\n border: 0;\n background: var(--muted);\n object-fit: cover;\n}\n",
|
|
20
|
+
"type": "registry:file",
|
|
21
|
+
"target": "~/assets/ui-video.css"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"type": "registry:item"
|
|
25
|
+
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"path": "src/components/ui/theme-toggle/theme-provider.astro",
|
|
20
|
-
"content": "<script is:inline>\n // A stored \"dark\" or \"light\" is the visitor's choice. Without one, such as\n // no value or \"system\", the theme follows the system.\n const getStoredTheme = () => {\n if (typeof localStorage === \"undefined\") return null\n const theme = localStorage.getItem(\"theme\")\n return theme === \"dark\" || theme === \"light\" ? theme : null\n }\n\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\")\n\n const getThemePreference = () =>\n getStoredTheme() ?? (media.matches ? \"dark\" : \"light\")\n\n const disableTransitionsTemporarily = () => {\n const style = document.createElement(\"style\")\n\n style.appendChild(\n document.createTextNode(\n \"*, *::before, *::after { transition: none !important; }\"\n )\n )\n\n document.head.appendChild(style)\n\n return () => {\n void document.documentElement.offsetHeight\n\n requestAnimationFrame(() => {\n style.remove()\n })\n }\n }\n\n // The theme this provider applied last. A class change to another theme\n // comes from outside, such as a toggle without the provider, and is saved\n // as the visitor's choice.\n let appliedTheme\n\n const applyTheme = (theme, disableTransitions = false) => {\n const restoreTransitions = disableTransitions\n ? disableTransitionsTemporarily()\n : null\n\n appliedTheme = theme\n document.documentElement.classList[theme === \"dark\" ? \"add\" : \"remove\"](\n \"dark\"\n )\n\n restoreTransitions?.()\n }\n\n // \"dark\" or \"light\" saves a choice; \"system\" follows the system again.\n window.__setTheme = (theme) => {\n if (typeof localStorage !== \"undefined\")\n localStorage.setItem(\"theme\", theme)\n applyTheme(getThemePreference(), true)\n }\n\n applyTheme(getThemePreference())\n\n // Follow the system while there is no choice, and a choice made in\n // another window or frame of the site.\n media.addEventListener(\"change\", () => {\n if (!getStoredTheme()) applyTheme(getThemePreference(), true)\n })\n window.addEventListener(\"storage\", (event) => {\n if (event.storageArea !== localStorage) return\n if (event.key === \"theme\" || event.key === null)\n applyTheme(getThemePreference(), true)\n })\n\n if (typeof localStorage !== \"undefined\") {\n const observer = new MutationObserver(() => {\n const theme = document.documentElement.classList.contains(\"dark\")\n ? \"dark\"\n : \"light\"\n if (theme === appliedTheme) return\n appliedTheme = theme\n localStorage.setItem(\"theme\", theme)\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\"],\n })\n }\n</script>\n",
|
|
20
|
+
"content": "<script is:inline>\n // A stored \"dark\" or \"light\" is the visitor's choice. Without one, such as\n // no value or \"system\", the theme follows the system.\n const getStoredTheme = () => {\n if (typeof localStorage === \"undefined\") return null\n const theme = localStorage.getItem(\"theme\")\n return theme === \"dark\" || theme === \"light\" ? theme : null\n }\n\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\")\n\n const getThemePreference = () =>\n getStoredTheme() ?? (media.matches ? \"dark\" : \"light\")\n\n const disableTransitionsTemporarily = () => {\n const style = document.createElement(\"style\")\n\n style.appendChild(\n document.createTextNode(\n \"*, *::before, *::after { transition: none !important; }\"\n )\n )\n\n document.head.appendChild(style)\n\n return () => {\n void document.documentElement.offsetHeight\n\n requestAnimationFrame(() => {\n style.remove()\n })\n }\n }\n\n // The theme this provider applied last. A class change to another theme\n // comes from outside, such as a toggle without the provider, and is saved\n // as the visitor's choice.\n let appliedTheme\n\n const applyTheme = (theme, disableTransitions = false) => {\n const restoreTransitions = disableTransitions\n ? disableTransitionsTemporarily()\n : null\n\n appliedTheme = theme\n document.documentElement.classList[theme === \"dark\" ? \"add\" : \"remove\"](\n \"dark\"\n )\n\n restoreTransitions?.()\n }\n\n // \"dark\" or \"light\" saves a choice; \"system\" follows the system again.\n window.__setTheme = (theme) => {\n if (typeof localStorage !== \"undefined\")\n localStorage.setItem(\"theme\", theme)\n applyTheme(getThemePreference(), true)\n }\n\n applyTheme(getThemePreference())\n\n // Follow the system while there is no choice, and a choice made in\n // another window or frame of the site.\n media.addEventListener(\"change\", () => {\n if (!getStoredTheme()) applyTheme(getThemePreference(), true)\n })\n window.addEventListener(\"storage\", (event) => {\n if (event.storageArea !== localStorage) return\n if (event.key === \"theme\" || event.key === null)\n applyTheme(getThemePreference(), true)\n })\n\n // Astro's <ClientRouter /> replaces the <html> attributes with those of the\n // next page, which cannot know the theme. Carry the theme over before the\n // swap, so it neither flashes nor reaches the observer below as a choice.\n document.addEventListener(\"astro:before-swap\", (event) => {\n const swap = event.swap\n event.swap = function (...args) {\n event.newDocument.documentElement.classList.toggle(\n \"dark\",\n appliedTheme === \"dark\"\n )\n return swap.apply(this, args)\n }\n })\n\n if (typeof localStorage !== \"undefined\") {\n const observer = new MutationObserver(() => {\n const theme = document.documentElement.classList.contains(\"dark\")\n ? \"dark\"\n : \"light\"\n if (theme === appliedTheme) return\n appliedTheme = theme\n localStorage.setItem(\"theme\", theme)\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\"],\n })\n }\n</script>\n",
|
|
21
21
|
"type": "registry:ui"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"path": "src/components/ui/theme-toggle/theme-provider.astro",
|
|
20
|
-
"content": "<script is:inline>\n // A stored \"dark\" or \"light\" is the visitor's choice. Without one, such as\n // no value or \"system\", the theme follows the system.\n const getStoredTheme = () => {\n if (typeof localStorage === \"undefined\") return null\n const theme = localStorage.getItem(\"theme\")\n return theme === \"dark\" || theme === \"light\" ? theme : null\n }\n\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\")\n\n const getThemePreference = () =>\n getStoredTheme() ?? (media.matches ? \"dark\" : \"light\")\n\n const disableTransitionsTemporarily = () => {\n const style = document.createElement(\"style\")\n\n style.appendChild(\n document.createTextNode(\n \"*, *::before, *::after { transition: none !important; }\"\n )\n )\n\n document.head.appendChild(style)\n\n return () => {\n void document.documentElement.offsetHeight\n\n requestAnimationFrame(() => {\n style.remove()\n })\n }\n }\n\n // The theme this provider applied last. A class change to another theme\n // comes from outside, such as a toggle without the provider, and is saved\n // as the visitor's choice.\n let appliedTheme\n\n const applyTheme = (theme, disableTransitions = false) => {\n const restoreTransitions = disableTransitions\n ? disableTransitionsTemporarily()\n : null\n\n appliedTheme = theme\n document.documentElement.classList[theme === \"dark\" ? \"add\" : \"remove\"](\n \"dark\"\n )\n\n restoreTransitions?.()\n }\n\n // \"dark\" or \"light\" saves a choice; \"system\" follows the system again.\n window.__setTheme = (theme) => {\n if (typeof localStorage !== \"undefined\")\n localStorage.setItem(\"theme\", theme)\n applyTheme(getThemePreference(), true)\n }\n\n applyTheme(getThemePreference())\n\n // Follow the system while there is no choice, and a choice made in\n // another window or frame of the site.\n media.addEventListener(\"change\", () => {\n if (!getStoredTheme()) applyTheme(getThemePreference(), true)\n })\n window.addEventListener(\"storage\", (event) => {\n if (event.storageArea !== localStorage) return\n if (event.key === \"theme\" || event.key === null)\n applyTheme(getThemePreference(), true)\n })\n\n if (typeof localStorage !== \"undefined\") {\n const observer = new MutationObserver(() => {\n const theme = document.documentElement.classList.contains(\"dark\")\n ? \"dark\"\n : \"light\"\n if (theme === appliedTheme) return\n appliedTheme = theme\n localStorage.setItem(\"theme\", theme)\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\"],\n })\n }\n</script>\n",
|
|
20
|
+
"content": "<script is:inline>\n // A stored \"dark\" or \"light\" is the visitor's choice. Without one, such as\n // no value or \"system\", the theme follows the system.\n const getStoredTheme = () => {\n if (typeof localStorage === \"undefined\") return null\n const theme = localStorage.getItem(\"theme\")\n return theme === \"dark\" || theme === \"light\" ? theme : null\n }\n\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\")\n\n const getThemePreference = () =>\n getStoredTheme() ?? (media.matches ? \"dark\" : \"light\")\n\n const disableTransitionsTemporarily = () => {\n const style = document.createElement(\"style\")\n\n style.appendChild(\n document.createTextNode(\n \"*, *::before, *::after { transition: none !important; }\"\n )\n )\n\n document.head.appendChild(style)\n\n return () => {\n void document.documentElement.offsetHeight\n\n requestAnimationFrame(() => {\n style.remove()\n })\n }\n }\n\n // The theme this provider applied last. A class change to another theme\n // comes from outside, such as a toggle without the provider, and is saved\n // as the visitor's choice.\n let appliedTheme\n\n const applyTheme = (theme, disableTransitions = false) => {\n const restoreTransitions = disableTransitions\n ? disableTransitionsTemporarily()\n : null\n\n appliedTheme = theme\n document.documentElement.classList[theme === \"dark\" ? \"add\" : \"remove\"](\n \"dark\"\n )\n\n restoreTransitions?.()\n }\n\n // \"dark\" or \"light\" saves a choice; \"system\" follows the system again.\n window.__setTheme = (theme) => {\n if (typeof localStorage !== \"undefined\")\n localStorage.setItem(\"theme\", theme)\n applyTheme(getThemePreference(), true)\n }\n\n applyTheme(getThemePreference())\n\n // Follow the system while there is no choice, and a choice made in\n // another window or frame of the site.\n media.addEventListener(\"change\", () => {\n if (!getStoredTheme()) applyTheme(getThemePreference(), true)\n })\n window.addEventListener(\"storage\", (event) => {\n if (event.storageArea !== localStorage) return\n if (event.key === \"theme\" || event.key === null)\n applyTheme(getThemePreference(), true)\n })\n\n // Astro's <ClientRouter /> replaces the <html> attributes with those of the\n // next page, which cannot know the theme. Carry the theme over before the\n // swap, so it neither flashes nor reaches the observer below as a choice.\n document.addEventListener(\"astro:before-swap\", (event) => {\n const swap = event.swap\n event.swap = function (...args) {\n event.newDocument.documentElement.classList.toggle(\n \"dark\",\n appliedTheme === \"dark\"\n )\n return swap.apply(this, args)\n }\n })\n\n if (typeof localStorage !== \"undefined\") {\n const observer = new MutationObserver(() => {\n const theme = document.documentElement.classList.contains(\"dark\")\n ? \"dark\"\n : \"light\"\n if (theme === appliedTheme) return\n appliedTheme = theme\n localStorage.setItem(\"theme\", theme)\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\"],\n })\n }\n</script>\n",
|
|
21
21
|
"type": "registry:ui"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"path": "src/components/ui/theme-toggle/theme-provider.astro",
|
|
20
|
-
"content": "<script is:inline>\n // A stored \"dark\" or \"light\" is the visitor's choice. Without one, such as\n // no value or \"system\", the theme follows the system.\n const getStoredTheme = () => {\n if (typeof localStorage === \"undefined\") return null\n const theme = localStorage.getItem(\"theme\")\n return theme === \"dark\" || theme === \"light\" ? theme : null\n }\n\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\")\n\n const getThemePreference = () =>\n getStoredTheme() ?? (media.matches ? \"dark\" : \"light\")\n\n const disableTransitionsTemporarily = () => {\n const style = document.createElement(\"style\")\n\n style.appendChild(\n document.createTextNode(\n \"*, *::before, *::after { transition: none !important; }\"\n )\n )\n\n document.head.appendChild(style)\n\n return () => {\n void document.documentElement.offsetHeight\n\n requestAnimationFrame(() => {\n style.remove()\n })\n }\n }\n\n // The theme this provider applied last. A class change to another theme\n // comes from outside, such as a toggle without the provider, and is saved\n // as the visitor's choice.\n let appliedTheme\n\n const applyTheme = (theme, disableTransitions = false) => {\n const restoreTransitions = disableTransitions\n ? disableTransitionsTemporarily()\n : null\n\n appliedTheme = theme\n document.documentElement.classList[theme === \"dark\" ? \"add\" : \"remove\"](\n \"dark\"\n )\n\n restoreTransitions?.()\n }\n\n // \"dark\" or \"light\" saves a choice; \"system\" follows the system again.\n window.__setTheme = (theme) => {\n if (typeof localStorage !== \"undefined\")\n localStorage.setItem(\"theme\", theme)\n applyTheme(getThemePreference(), true)\n }\n\n applyTheme(getThemePreference())\n\n // Follow the system while there is no choice, and a choice made in\n // another window or frame of the site.\n media.addEventListener(\"change\", () => {\n if (!getStoredTheme()) applyTheme(getThemePreference(), true)\n })\n window.addEventListener(\"storage\", (event) => {\n if (event.storageArea !== localStorage) return\n if (event.key === \"theme\" || event.key === null)\n applyTheme(getThemePreference(), true)\n })\n\n if (typeof localStorage !== \"undefined\") {\n const observer = new MutationObserver(() => {\n const theme = document.documentElement.classList.contains(\"dark\")\n ? \"dark\"\n : \"light\"\n if (theme === appliedTheme) return\n appliedTheme = theme\n localStorage.setItem(\"theme\", theme)\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\"],\n })\n }\n</script>\n",
|
|
20
|
+
"content": "<script is:inline>\n // A stored \"dark\" or \"light\" is the visitor's choice. Without one, such as\n // no value or \"system\", the theme follows the system.\n const getStoredTheme = () => {\n if (typeof localStorage === \"undefined\") return null\n const theme = localStorage.getItem(\"theme\")\n return theme === \"dark\" || theme === \"light\" ? theme : null\n }\n\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\")\n\n const getThemePreference = () =>\n getStoredTheme() ?? (media.matches ? \"dark\" : \"light\")\n\n const disableTransitionsTemporarily = () => {\n const style = document.createElement(\"style\")\n\n style.appendChild(\n document.createTextNode(\n \"*, *::before, *::after { transition: none !important; }\"\n )\n )\n\n document.head.appendChild(style)\n\n return () => {\n void document.documentElement.offsetHeight\n\n requestAnimationFrame(() => {\n style.remove()\n })\n }\n }\n\n // The theme this provider applied last. A class change to another theme\n // comes from outside, such as a toggle without the provider, and is saved\n // as the visitor's choice.\n let appliedTheme\n\n const applyTheme = (theme, disableTransitions = false) => {\n const restoreTransitions = disableTransitions\n ? disableTransitionsTemporarily()\n : null\n\n appliedTheme = theme\n document.documentElement.classList[theme === \"dark\" ? \"add\" : \"remove\"](\n \"dark\"\n )\n\n restoreTransitions?.()\n }\n\n // \"dark\" or \"light\" saves a choice; \"system\" follows the system again.\n window.__setTheme = (theme) => {\n if (typeof localStorage !== \"undefined\")\n localStorage.setItem(\"theme\", theme)\n applyTheme(getThemePreference(), true)\n }\n\n applyTheme(getThemePreference())\n\n // Follow the system while there is no choice, and a choice made in\n // another window or frame of the site.\n media.addEventListener(\"change\", () => {\n if (!getStoredTheme()) applyTheme(getThemePreference(), true)\n })\n window.addEventListener(\"storage\", (event) => {\n if (event.storageArea !== localStorage) return\n if (event.key === \"theme\" || event.key === null)\n applyTheme(getThemePreference(), true)\n })\n\n // Astro's <ClientRouter /> replaces the <html> attributes with those of the\n // next page, which cannot know the theme. Carry the theme over before the\n // swap, so it neither flashes nor reaches the observer below as a choice.\n document.addEventListener(\"astro:before-swap\", (event) => {\n const swap = event.swap\n event.swap = function (...args) {\n event.newDocument.documentElement.classList.toggle(\n \"dark\",\n appliedTheme === \"dark\"\n )\n return swap.apply(this, args)\n }\n })\n\n if (typeof localStorage !== \"undefined\") {\n const observer = new MutationObserver(() => {\n const theme = document.documentElement.classList.contains(\"dark\")\n ? \"dark\"\n : \"light\"\n if (theme === appliedTheme) return\n appliedTheme = theme\n localStorage.setItem(\"theme\", theme)\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\"],\n })\n }\n</script>\n",
|
|
21
21
|
"type": "registry:ui"
|
|
22
22
|
},
|
|
23
23
|
{
|