fulldev-ui 0.22.3 → 0.24.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 +17 -0
- package/README.md +5 -1
- 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 +36 -30
- package/public/r/accordion.json +1 -1
- package/public/r/alert-dialog.json +1 -1
- package/public/r/code-block-examples.json +33 -0
- package/public/r/code-block.json +65 -0
- package/public/r/collapsible-examples.json +5 -0
- package/public/r/collapsible.json +2 -2
- package/public/r/combobox.json +3 -3
- package/public/r/command.json +2 -2
- package/public/r/components.json +2 -0
- package/public/r/dialog.json +1 -1
- package/public/r/drawer.json +1 -1
- package/public/r/dropdown-menu.json +1 -1
- package/public/r/hover-card.json +2 -2
- 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/navigation-menu.json +1 -1
- package/public/r/popover.json +1 -1
- package/public/r/progress-examples.json +33 -0
- package/public/r/progress.json +23 -0
- package/public/r/radio-group.json +1 -1
- package/public/r/registry.json +163 -26
- package/public/r/resizable.json +1 -1
- package/public/r/select.json +1 -1
- package/public/r/sheet.json +1 -1
- package/public/r/sidebar.json +1 -1
- package/public/r/slider.json +1 -1
- package/public/r/styles/base-luma/accordion.json +1 -1
- package/public/r/styles/base-luma/alert-dialog.json +1 -1
- package/public/r/styles/base-luma/code-block-examples.json +33 -0
- package/public/r/styles/base-luma/code-block.json +65 -0
- package/public/r/styles/base-luma/collapsible-examples.json +5 -0
- package/public/r/styles/base-luma/collapsible.json +2 -2
- package/public/r/styles/base-luma/combobox.json +3 -3
- package/public/r/styles/base-luma/command.json +2 -2
- package/public/r/styles/base-luma/components.json +2 -0
- package/public/r/styles/base-luma/dialog.json +1 -1
- package/public/r/styles/base-luma/drawer.json +1 -1
- package/public/r/styles/base-luma/dropdown-menu.json +1 -1
- package/public/r/styles/base-luma/hover-card.json +2 -2
- package/public/r/styles/base-luma/navigation-menu.json +1 -1
- package/public/r/styles/base-luma/popover.json +1 -1
- package/public/r/styles/base-luma/progress-examples.json +33 -0
- package/public/r/styles/base-luma/progress.json +23 -0
- package/public/r/styles/base-luma/radio-group.json +1 -1
- package/public/r/styles/base-luma/registry.json +163 -26
- package/public/r/styles/base-luma/resizable.json +1 -1
- package/public/r/styles/base-luma/select.json +1 -1
- package/public/r/styles/base-luma/sheet.json +1 -1
- package/public/r/styles/base-luma/sidebar.json +1 -1
- package/public/r/styles/base-luma/slider.json +1 -1
- package/public/r/styles/base-luma/switch.json +1 -1
- package/public/r/styles/base-luma/tabs.json +1 -1
- package/public/r/styles/base-luma/toast.json +1 -1
- package/public/r/styles/base-luma/toggle-group.json +1 -1
- package/public/r/styles/base-luma/toggle.json +1 -1
- package/public/r/styles/base-luma/tooltip.json +1 -1
- package/public/r/styles/base-lyra/accordion.json +1 -1
- package/public/r/styles/base-lyra/alert-dialog.json +1 -1
- package/public/r/styles/base-lyra/code-block-examples.json +33 -0
- package/public/r/styles/base-lyra/code-block.json +65 -0
- package/public/r/styles/base-lyra/collapsible-examples.json +5 -0
- package/public/r/styles/base-lyra/collapsible.json +2 -2
- package/public/r/styles/base-lyra/combobox.json +3 -3
- package/public/r/styles/base-lyra/command.json +2 -2
- package/public/r/styles/base-lyra/components.json +2 -0
- package/public/r/styles/base-lyra/dialog.json +1 -1
- package/public/r/styles/base-lyra/drawer.json +1 -1
- package/public/r/styles/base-lyra/dropdown-menu.json +1 -1
- package/public/r/styles/base-lyra/hover-card.json +2 -2
- package/public/r/styles/base-lyra/navigation-menu.json +1 -1
- package/public/r/styles/base-lyra/popover.json +1 -1
- package/public/r/styles/base-lyra/progress-examples.json +33 -0
- package/public/r/styles/base-lyra/progress.json +23 -0
- package/public/r/styles/base-lyra/radio-group.json +1 -1
- package/public/r/styles/base-lyra/registry.json +163 -26
- package/public/r/styles/base-lyra/resizable.json +1 -1
- package/public/r/styles/base-lyra/select.json +1 -1
- package/public/r/styles/base-lyra/sheet.json +1 -1
- package/public/r/styles/base-lyra/sidebar.json +1 -1
- package/public/r/styles/base-lyra/slider.json +1 -1
- package/public/r/styles/base-lyra/switch.json +1 -1
- package/public/r/styles/base-lyra/tabs.json +1 -1
- package/public/r/styles/base-lyra/toast.json +1 -1
- package/public/r/styles/base-lyra/toggle-group.json +1 -1
- package/public/r/styles/base-lyra/toggle.json +1 -1
- package/public/r/styles/base-lyra/tooltip.json +1 -1
- package/public/r/styles/base-maia/accordion.json +1 -1
- package/public/r/styles/base-maia/alert-dialog.json +1 -1
- package/public/r/styles/base-maia/code-block-examples.json +33 -0
- package/public/r/styles/base-maia/code-block.json +65 -0
- package/public/r/styles/base-maia/collapsible-examples.json +5 -0
- package/public/r/styles/base-maia/collapsible.json +2 -2
- package/public/r/styles/base-maia/combobox.json +3 -3
- package/public/r/styles/base-maia/command.json +2 -2
- package/public/r/styles/base-maia/components.json +2 -0
- package/public/r/styles/base-maia/dialog.json +1 -1
- package/public/r/styles/base-maia/drawer.json +1 -1
- package/public/r/styles/base-maia/dropdown-menu.json +1 -1
- package/public/r/styles/base-maia/hover-card.json +2 -2
- package/public/r/styles/base-maia/navigation-menu.json +1 -1
- package/public/r/styles/base-maia/popover.json +1 -1
- package/public/r/styles/base-maia/progress-examples.json +33 -0
- package/public/r/styles/base-maia/progress.json +23 -0
- package/public/r/styles/base-maia/radio-group.json +1 -1
- package/public/r/styles/base-maia/registry.json +163 -26
- package/public/r/styles/base-maia/resizable.json +1 -1
- package/public/r/styles/base-maia/select.json +1 -1
- package/public/r/styles/base-maia/sheet.json +1 -1
- package/public/r/styles/base-maia/sidebar.json +1 -1
- package/public/r/styles/base-maia/slider.json +1 -1
- package/public/r/styles/base-maia/switch.json +1 -1
- package/public/r/styles/base-maia/tabs.json +1 -1
- package/public/r/styles/base-maia/toast.json +1 -1
- package/public/r/styles/base-maia/toggle-group.json +1 -1
- package/public/r/styles/base-maia/toggle.json +1 -1
- package/public/r/styles/base-maia/tooltip.json +1 -1
- package/public/r/styles/base-mira/accordion.json +1 -1
- package/public/r/styles/base-mira/alert-dialog.json +1 -1
- package/public/r/styles/base-mira/code-block-examples.json +33 -0
- package/public/r/styles/base-mira/code-block.json +65 -0
- package/public/r/styles/base-mira/collapsible-examples.json +5 -0
- package/public/r/styles/base-mira/collapsible.json +2 -2
- package/public/r/styles/base-mira/combobox.json +3 -3
- package/public/r/styles/base-mira/command.json +2 -2
- package/public/r/styles/base-mira/components.json +2 -0
- package/public/r/styles/base-mira/dialog.json +1 -1
- package/public/r/styles/base-mira/drawer.json +1 -1
- package/public/r/styles/base-mira/dropdown-menu.json +1 -1
- package/public/r/styles/base-mira/hover-card.json +2 -2
- package/public/r/styles/base-mira/navigation-menu.json +1 -1
- package/public/r/styles/base-mira/popover.json +1 -1
- package/public/r/styles/base-mira/progress-examples.json +33 -0
- package/public/r/styles/base-mira/progress.json +23 -0
- package/public/r/styles/base-mira/radio-group.json +1 -1
- package/public/r/styles/base-mira/registry.json +163 -26
- package/public/r/styles/base-mira/resizable.json +1 -1
- package/public/r/styles/base-mira/select.json +1 -1
- package/public/r/styles/base-mira/sheet.json +1 -1
- package/public/r/styles/base-mira/sidebar.json +1 -1
- package/public/r/styles/base-mira/slider.json +1 -1
- package/public/r/styles/base-mira/switch.json +1 -1
- package/public/r/styles/base-mira/tabs.json +1 -1
- package/public/r/styles/base-mira/toast.json +1 -1
- package/public/r/styles/base-mira/toggle-group.json +1 -1
- package/public/r/styles/base-mira/toggle.json +1 -1
- package/public/r/styles/base-mira/tooltip.json +1 -1
- package/public/r/styles/base-nova/accordion.json +1 -1
- package/public/r/styles/base-nova/alert-dialog.json +1 -1
- package/public/r/styles/base-nova/code-block-examples.json +33 -0
- package/public/r/styles/base-nova/code-block.json +65 -0
- package/public/r/styles/base-nova/collapsible-examples.json +5 -0
- package/public/r/styles/base-nova/collapsible.json +2 -2
- package/public/r/styles/base-nova/combobox.json +3 -3
- package/public/r/styles/base-nova/command.json +2 -2
- package/public/r/styles/base-nova/components.json +2 -0
- package/public/r/styles/base-nova/dialog.json +1 -1
- package/public/r/styles/base-nova/drawer.json +1 -1
- package/public/r/styles/base-nova/dropdown-menu.json +1 -1
- package/public/r/styles/base-nova/hover-card.json +2 -2
- package/public/r/styles/base-nova/navigation-menu.json +1 -1
- package/public/r/styles/base-nova/popover.json +1 -1
- package/public/r/styles/base-nova/progress-examples.json +33 -0
- package/public/r/styles/base-nova/progress.json +23 -0
- package/public/r/styles/base-nova/radio-group.json +1 -1
- package/public/r/styles/base-nova/registry.json +163 -26
- package/public/r/styles/base-nova/resizable.json +1 -1
- package/public/r/styles/base-nova/select.json +1 -1
- package/public/r/styles/base-nova/sheet.json +1 -1
- package/public/r/styles/base-nova/sidebar.json +1 -1
- package/public/r/styles/base-nova/slider.json +1 -1
- package/public/r/styles/base-nova/switch.json +1 -1
- package/public/r/styles/base-nova/tabs.json +1 -1
- package/public/r/styles/base-nova/toast.json +1 -1
- package/public/r/styles/base-nova/toggle-group.json +1 -1
- package/public/r/styles/base-nova/toggle.json +1 -1
- package/public/r/styles/base-nova/tooltip.json +1 -1
- package/public/r/styles/base-rhea/accordion.json +1 -1
- package/public/r/styles/base-rhea/alert-dialog.json +1 -1
- package/public/r/styles/base-rhea/code-block-examples.json +33 -0
- package/public/r/styles/base-rhea/code-block.json +65 -0
- package/public/r/styles/base-rhea/collapsible-examples.json +5 -0
- package/public/r/styles/base-rhea/collapsible.json +2 -2
- package/public/r/styles/base-rhea/combobox.json +3 -3
- package/public/r/styles/base-rhea/command.json +2 -2
- package/public/r/styles/base-rhea/components.json +2 -0
- package/public/r/styles/base-rhea/dialog.json +1 -1
- package/public/r/styles/base-rhea/drawer.json +1 -1
- package/public/r/styles/base-rhea/dropdown-menu.json +1 -1
- package/public/r/styles/base-rhea/hover-card.json +2 -2
- package/public/r/styles/base-rhea/navigation-menu.json +1 -1
- package/public/r/styles/base-rhea/popover.json +1 -1
- package/public/r/styles/base-rhea/progress-examples.json +33 -0
- package/public/r/styles/base-rhea/progress.json +23 -0
- package/public/r/styles/base-rhea/radio-group.json +1 -1
- package/public/r/styles/base-rhea/registry.json +163 -26
- package/public/r/styles/base-rhea/resizable.json +1 -1
- package/public/r/styles/base-rhea/select.json +1 -1
- package/public/r/styles/base-rhea/sheet.json +1 -1
- package/public/r/styles/base-rhea/sidebar.json +1 -1
- package/public/r/styles/base-rhea/slider.json +1 -1
- package/public/r/styles/base-rhea/switch.json +1 -1
- package/public/r/styles/base-rhea/tabs.json +1 -1
- package/public/r/styles/base-rhea/toast.json +1 -1
- package/public/r/styles/base-rhea/toggle-group.json +1 -1
- package/public/r/styles/base-rhea/toggle.json +1 -1
- package/public/r/styles/base-rhea/tooltip.json +1 -1
- package/public/r/styles/base-sera/accordion.json +1 -1
- package/public/r/styles/base-sera/alert-dialog.json +1 -1
- package/public/r/styles/base-sera/code-block-examples.json +33 -0
- package/public/r/styles/base-sera/code-block.json +65 -0
- package/public/r/styles/base-sera/collapsible-examples.json +5 -0
- package/public/r/styles/base-sera/collapsible.json +2 -2
- package/public/r/styles/base-sera/combobox.json +3 -3
- package/public/r/styles/base-sera/command.json +2 -2
- package/public/r/styles/base-sera/components.json +2 -0
- package/public/r/styles/base-sera/dialog.json +1 -1
- package/public/r/styles/base-sera/drawer.json +1 -1
- package/public/r/styles/base-sera/dropdown-menu.json +1 -1
- package/public/r/styles/base-sera/hover-card.json +2 -2
- package/public/r/styles/base-sera/navigation-menu.json +1 -1
- package/public/r/styles/base-sera/popover.json +1 -1
- package/public/r/styles/base-sera/progress-examples.json +33 -0
- package/public/r/styles/base-sera/progress.json +23 -0
- package/public/r/styles/base-sera/radio-group.json +1 -1
- package/public/r/styles/base-sera/registry.json +163 -26
- package/public/r/styles/base-sera/resizable.json +1 -1
- package/public/r/styles/base-sera/select.json +1 -1
- package/public/r/styles/base-sera/sheet.json +1 -1
- package/public/r/styles/base-sera/sidebar.json +1 -1
- package/public/r/styles/base-sera/slider.json +1 -1
- package/public/r/styles/base-sera/switch.json +1 -1
- package/public/r/styles/base-sera/tabs.json +1 -1
- package/public/r/styles/base-sera/toast.json +1 -1
- package/public/r/styles/base-sera/toggle-group.json +1 -1
- package/public/r/styles/base-sera/toggle.json +1 -1
- package/public/r/styles/base-sera/tooltip.json +1 -1
- package/public/r/styles/base-vega/accordion.json +1 -1
- package/public/r/styles/base-vega/alert-dialog.json +1 -1
- package/public/r/styles/base-vega/code-block-examples.json +33 -0
- package/public/r/styles/base-vega/code-block.json +65 -0
- package/public/r/styles/base-vega/collapsible-examples.json +5 -0
- package/public/r/styles/base-vega/collapsible.json +2 -2
- package/public/r/styles/base-vega/combobox.json +3 -3
- package/public/r/styles/base-vega/command.json +2 -2
- package/public/r/styles/base-vega/components.json +2 -0
- package/public/r/styles/base-vega/dialog.json +1 -1
- package/public/r/styles/base-vega/drawer.json +1 -1
- package/public/r/styles/base-vega/dropdown-menu.json +1 -1
- package/public/r/styles/base-vega/hover-card.json +2 -2
- package/public/r/styles/base-vega/navigation-menu.json +1 -1
- package/public/r/styles/base-vega/popover.json +1 -1
- package/public/r/styles/base-vega/progress-examples.json +33 -0
- package/public/r/styles/base-vega/progress.json +23 -0
- package/public/r/styles/base-vega/radio-group.json +1 -1
- package/public/r/styles/base-vega/registry.json +163 -26
- package/public/r/styles/base-vega/resizable.json +1 -1
- package/public/r/styles/base-vega/select.json +1 -1
- package/public/r/styles/base-vega/sheet.json +1 -1
- package/public/r/styles/base-vega/sidebar.json +1 -1
- package/public/r/styles/base-vega/slider.json +1 -1
- package/public/r/styles/base-vega/switch.json +1 -1
- package/public/r/styles/base-vega/tabs.json +1 -1
- package/public/r/styles/base-vega/toast.json +1 -1
- package/public/r/styles/base-vega/toggle-group.json +1 -1
- package/public/r/styles/base-vega/toggle.json +1 -1
- package/public/r/styles/base-vega/tooltip.json +1 -1
- package/public/r/switch.json +1 -1
- package/public/r/tabs.json +1 -1
- package/public/r/toast.json +1 -1
- package/public/r/toggle-group.json +1 -1
- package/public/r/toggle.json +1 -1
- package/public/r/tooltip.json +1 -1
- package/registry.json +150 -26
- package/src/components/examples/code-block/code-block-demo.astro +24 -0
- package/src/components/examples/code-block/code-block-lines.astro +20 -0
- package/src/components/examples/code-block/code-block-numbered.astro +13 -0
- package/src/components/examples/code-block/code-block-wrap.astro +20 -0
- package/src/components/examples/collapsible/collapsible-dismissal.astro +46 -0
- package/src/components/examples/progress/progress-custom-max.astro +12 -0
- package/src/components/examples/progress/progress-demo.astro +10 -0
- package/src/components/examples/progress/progress-indeterminate.astro +5 -0
- package/src/components/examples/progress/progress-rtl.astro +11 -0
- package/src/components/ui/code-block/code-block-actions.astro +19 -0
- package/src/components/ui/code-block/code-block-content.astro +44 -0
- package/src/components/ui/code-block/code-block-copy-button.astro +88 -0
- package/src/components/ui/code-block/code-block-footer.astro +19 -0
- package/src/components/ui/code-block/code-block-header.astro +19 -0
- package/src/components/ui/code-block/code-block-line.astro +36 -0
- package/src/components/ui/code-block/code-block-title.astro +19 -0
- package/src/components/ui/code-block/code-block.astro +41 -0
- package/src/components/ui/code-block/index.ts +8 -0
- package/src/components/ui/collapsible/collapsible.astro +6 -0
- package/src/components/ui/combobox/combobox-input.astro +9 -2
- package/src/components/ui/progress/index.ts +1 -0
- package/src/components/ui/progress/progress.astro +83 -0
- package/src/styles/global.css +5 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createCarousel } from '@data-slot/carousel';
|
|
2
|
+
|
|
3
|
+
// @data-slot/carousel owns scrolling, snapping, dragging, the arrow keys and the previous and next
|
|
4
|
+
// buttons, and keeps every visible card interactive. It writes English ARIA descriptions and slide
|
|
5
|
+
// labels, so the translated ones from Liquid are put back after binding and slide updates.
|
|
6
|
+
export function initializeCarousel(root) {
|
|
7
|
+
const content = root.querySelector('[data-slot="carousel-content"]');
|
|
8
|
+
const items = () => [...content.children].filter((item) => item.matches('[data-slot="carousel-item"]'));
|
|
9
|
+
const rootDescription = root.getAttribute('aria-roledescription');
|
|
10
|
+
const descriptions = new WeakMap(items().map((item) => [item, item.getAttribute('aria-roledescription')]));
|
|
11
|
+
let destroyed = false;
|
|
12
|
+
const translate = () => {
|
|
13
|
+
if (destroyed) return;
|
|
14
|
+
if (rootDescription) root.setAttribute('aria-roledescription', rootDescription);
|
|
15
|
+
const slides = items();
|
|
16
|
+
const template = root.dataset.slideLabel;
|
|
17
|
+
slides.forEach((item, index) => {
|
|
18
|
+
const description = descriptions.get(item);
|
|
19
|
+
if (description) item.setAttribute('aria-roledescription', description);
|
|
20
|
+
if (template)
|
|
21
|
+
item.setAttribute('aria-label', template.replace('[index]', index + 1).replace('[total]', slides.length));
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
// Observe first to capture authored descriptions before data-slot rewrites them.
|
|
25
|
+
const observer = new MutationObserver((mutations) => {
|
|
26
|
+
for (const mutation of mutations)
|
|
27
|
+
for (const node of mutation.addedNodes)
|
|
28
|
+
if (node instanceof Element && node.matches('[data-slot="carousel-item"]'))
|
|
29
|
+
descriptions.set(node, node.getAttribute('aria-roledescription'));
|
|
30
|
+
queueMicrotask(translate);
|
|
31
|
+
});
|
|
32
|
+
observer.observe(content, { childList: true });
|
|
33
|
+
const carousel = createCarousel(root, { slides: 'multiple', drag: true, loop: false });
|
|
34
|
+
translate();
|
|
35
|
+
for (const button of root.querySelectorAll('[data-slot="carousel-previous"], [data-slot="carousel-next"]'))
|
|
36
|
+
button.hidden = false;
|
|
37
|
+
const destroy = carousel.destroy.bind(carousel);
|
|
38
|
+
carousel.destroy = () => {
|
|
39
|
+
destroyed = true;
|
|
40
|
+
observer.disconnect();
|
|
41
|
+
destroy();
|
|
42
|
+
};
|
|
43
|
+
return carousel;
|
|
44
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// The data-slot controllers that few pages use, imported when theme.js finds their markup. Each
|
|
2
|
+
// entry starts one root and returns its controller with destroy(). Behavior is the vendored
|
|
3
|
+
// controller's; the adapters here only connect it to native forms and theme state.
|
|
4
|
+
|
|
5
|
+
// A composite input renders hidden after its native fallback, such as a select or radio inputs,
|
|
6
|
+
// which the form submits until the controller runs. Then the fallback leaves the document, so
|
|
7
|
+
// labels and the form see only the field the controller generates, and the fallback's id moves to
|
|
8
|
+
// the labelled element, so a label[for] still reaches the control. start() creates the controller
|
|
9
|
+
// with the fallback's reset default and the value a shopper chose while it loaded; its destroy()
|
|
10
|
+
// writes the current value back, and the fallback returns with its own reset default.
|
|
11
|
+
function replaceFallback(root, labelled, start) {
|
|
12
|
+
const fallback = root.previousElementSibling?.matches('[data-fallback]') ? root.previousElementSibling : null;
|
|
13
|
+
const attributes = ['id', 'aria-labelledby'].map((name) => [name, labelled.getAttribute(name)]);
|
|
14
|
+
const restore = () => {
|
|
15
|
+
root.hidden = true;
|
|
16
|
+
for (const [name, value] of attributes) {
|
|
17
|
+
if (value === null) labelled.removeAttribute(name);
|
|
18
|
+
else labelled.setAttribute(name, value);
|
|
19
|
+
}
|
|
20
|
+
if (fallback) root.before(fallback);
|
|
21
|
+
};
|
|
22
|
+
fallback?.remove();
|
|
23
|
+
if (fallback?.id) labelled.id = fallback.id;
|
|
24
|
+
root.hidden = false;
|
|
25
|
+
let controller;
|
|
26
|
+
try {
|
|
27
|
+
controller = start(fallback);
|
|
28
|
+
} catch (error) {
|
|
29
|
+
restore();
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
destroy() {
|
|
34
|
+
controller.destroy();
|
|
35
|
+
restore();
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function initializeSelect({ createSelect }, root) {
|
|
41
|
+
return replaceFallback(root, root.querySelector('[data-slot="select-trigger"]'), (select) => {
|
|
42
|
+
const options = [...(select?.options ?? [])];
|
|
43
|
+
const initial = options.find((option) => option.defaultSelected) ?? options.find((option) => !option.disabled);
|
|
44
|
+
const controller = createSelect(root, { mountStrategy: 'eager', defaultValue: initial?.value || undefined });
|
|
45
|
+
const value = select?.value || null;
|
|
46
|
+
if (select && value !== controller.value) root.dispatchEvent(new CustomEvent('select:set', { detail: { value } }));
|
|
47
|
+
return {
|
|
48
|
+
destroy() {
|
|
49
|
+
if (select) select.value = controller.value ?? '';
|
|
50
|
+
controller.destroy();
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function initializeRadioGroup({ createRadioGroup }, root) {
|
|
57
|
+
return replaceFallback(root, root, (fallback) => {
|
|
58
|
+
const inputs = [...(fallback?.querySelectorAll('input[type="radio"]') ?? [])];
|
|
59
|
+
const initial = inputs.find((input) => input.defaultChecked)?.value ?? '';
|
|
60
|
+
const controller = createRadioGroup(root, fallback ? { defaultValue: initial } : {});
|
|
61
|
+
const value = inputs.find((input) => input.checked)?.value ?? null;
|
|
62
|
+
if (fallback && value !== controller.value) {
|
|
63
|
+
if (value === null) controller.clear();
|
|
64
|
+
else controller.select(value);
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
destroy() {
|
|
68
|
+
for (const input of inputs) input.checked = input.value === controller.value;
|
|
69
|
+
controller.destroy();
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function initializeSwitch({ createSwitch }, root) {
|
|
76
|
+
return replaceFallback(root, root, (checkbox) => {
|
|
77
|
+
const controller = createSwitch(root, checkbox ? { defaultChecked: checkbox.defaultChecked } : {});
|
|
78
|
+
if (checkbox) controller.setChecked(checkbox.checked);
|
|
79
|
+
return {
|
|
80
|
+
destroy() {
|
|
81
|
+
if (checkbox) checkbox.checked = controller.checked;
|
|
82
|
+
controller.destroy();
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// The slider has no form field of its own, so its native range inputs stay in the form, hidden,
|
|
89
|
+
// and follow its value. A form reset moves the slider back to the inputs' reset values.
|
|
90
|
+
function initializeSlider({ createSlider }, root) {
|
|
91
|
+
const fallback = root.previousElementSibling?.matches('[data-fallback]') ? root.previousElementSibling : null;
|
|
92
|
+
const inputs = fallback ? [...fallback.querySelectorAll('input[type="range"]')] : [];
|
|
93
|
+
const read = () => (inputs.length > 1 ? inputs.map((input) => Number(input.value)) : Number(inputs[0]?.value));
|
|
94
|
+
const write = (value) => {
|
|
95
|
+
[value].flat().forEach((number, index) => {
|
|
96
|
+
if (!inputs[index] || inputs[index].value === String(number)) return;
|
|
97
|
+
inputs[index].value = String(number);
|
|
98
|
+
inputs[index].dispatchEvent(new Event('input', { bubbles: true }));
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
const slider = createSlider(root, {
|
|
102
|
+
...(inputs.length ? { defaultValue: read() } : {}),
|
|
103
|
+
onValueChange: write,
|
|
104
|
+
onValueCommit: () => inputs.forEach((input) => input.dispatchEvent(new Event('change', { bubbles: true }))),
|
|
105
|
+
});
|
|
106
|
+
const events = new AbortController();
|
|
107
|
+
inputs[0]?.form?.addEventListener('reset', () => setTimeout(() => slider.setValue(read())), {
|
|
108
|
+
signal: events.signal,
|
|
109
|
+
});
|
|
110
|
+
if (fallback) fallback.hidden = true;
|
|
111
|
+
root.hidden = false;
|
|
112
|
+
return {
|
|
113
|
+
destroy() {
|
|
114
|
+
events.abort();
|
|
115
|
+
slider.destroy();
|
|
116
|
+
root.hidden = true;
|
|
117
|
+
if (fallback) fallback.hidden = false;
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// The action of an alert dialog is a native link or submit or reset button, and the controller
|
|
123
|
+
// leaves closing to the caller. A link closes the dialog on click; a submit or reset button once its
|
|
124
|
+
// form submits or resets, so an invalid form keeps its native validation and the dialog stays open.
|
|
125
|
+
function initializeAlertDialog({ createAlertDialog }, root) {
|
|
126
|
+
const dialog = createAlertDialog(root);
|
|
127
|
+
const events = new AbortController();
|
|
128
|
+
for (const action of root.querySelectorAll('[data-slot="alert-dialog-action"]')) {
|
|
129
|
+
action.addEventListener(
|
|
130
|
+
'click',
|
|
131
|
+
() => {
|
|
132
|
+
const form = ['submit', 'reset'].includes(action.type) ? action.form : null;
|
|
133
|
+
if (form) form.addEventListener(action.type, () => dialog.close(), { once: true, signal: events.signal });
|
|
134
|
+
else dialog.close();
|
|
135
|
+
},
|
|
136
|
+
{ signal: events.signal },
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
destroy() {
|
|
141
|
+
events.abort();
|
|
142
|
+
dialog.destroy();
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Buttons inside a toaster show a toast with their translated title and description. Like other
|
|
148
|
+
// triggers that only open a popup, they show once the component has started (data-enhanced).
|
|
149
|
+
function initializeToaster({ createToast }, root) {
|
|
150
|
+
const toaster = createToast(root);
|
|
151
|
+
const events = new AbortController();
|
|
152
|
+
for (const button of root.querySelectorAll('[data-toast-title]')) {
|
|
153
|
+
button.addEventListener(
|
|
154
|
+
'click',
|
|
155
|
+
() => toaster.show({ title: button.dataset.toastTitle, description: button.dataset.toastDescription }),
|
|
156
|
+
{ signal: events.signal },
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
destroy() {
|
|
161
|
+
events.abort();
|
|
162
|
+
toaster.destroy();
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Each entry loads its data-slot package, then starts one root with it and returns a controller
|
|
168
|
+
// with destroy(). theme.js starts the root only if it is still current once the package has
|
|
169
|
+
// loaded. Select, tooltip and hover card keep their closed content connected (eager), so nested
|
|
170
|
+
// components and the lifecycle in theme.js never see it leave the document.
|
|
171
|
+
export const controls = {
|
|
172
|
+
select: [() => import('@data-slot/select'), initializeSelect],
|
|
173
|
+
'radio-group': [() => import('@data-slot/radio-group'), initializeRadioGroup],
|
|
174
|
+
switch: [() => import('@data-slot/switch'), initializeSwitch],
|
|
175
|
+
slider: [() => import('@data-slot/slider'), initializeSlider],
|
|
176
|
+
toggle: [() => import('@data-slot/toggle'), ({ createToggle }, root) => createToggle(root)],
|
|
177
|
+
'toggle-group': [() => import('@data-slot/toggle-group'), ({ createToggleGroup }, root) => createToggleGroup(root)],
|
|
178
|
+
collapsible: [() => import('@data-slot/collapsible'), ({ createCollapsible }, root) => createCollapsible(root)],
|
|
179
|
+
popover: [() => import('@data-slot/popover'), ({ createPopover }, root) => createPopover(root)],
|
|
180
|
+
'hover-card': [
|
|
181
|
+
() => import('@data-slot/hover-card'),
|
|
182
|
+
({ createHoverCard }, root) => createHoverCard(root, { mountStrategy: 'eager' }),
|
|
183
|
+
],
|
|
184
|
+
tooltip: [
|
|
185
|
+
() => import('@data-slot/tooltip'),
|
|
186
|
+
({ createTooltip }, root) => createTooltip(root, { mountStrategy: 'eager' }),
|
|
187
|
+
],
|
|
188
|
+
'dropdown-menu': [
|
|
189
|
+
() => import('@data-slot/dropdown-menu'),
|
|
190
|
+
({ createDropdownMenu }, root) => createDropdownMenu(root),
|
|
191
|
+
],
|
|
192
|
+
'alert-dialog': [() => import('@data-slot/alert-dialog'), initializeAlertDialog],
|
|
193
|
+
drawer: [() => import('@data-slot/drawer'), ({ createDrawer }, root) => createDrawer(root)],
|
|
194
|
+
toast: [() => import('@data-slot/toast'), initializeToaster],
|
|
195
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// One owner per root, including asynchronous imports and Shopify editor replacements.
|
|
2
|
+
export function createLifecycle(factories, scope = document) {
|
|
3
|
+
const components = new Map();
|
|
4
|
+
const events = new AbortController();
|
|
5
|
+
|
|
6
|
+
function initialize(parent) {
|
|
7
|
+
for (const [selector, factory] of factories) {
|
|
8
|
+
const roots = [...parent.querySelectorAll(selector)];
|
|
9
|
+
if (parent.matches?.(selector)) roots.unshift(parent);
|
|
10
|
+
for (const root of roots) {
|
|
11
|
+
if (components.has(root) || !root.isConnected) continue;
|
|
12
|
+
try {
|
|
13
|
+
const controller = factory(root);
|
|
14
|
+
components.set(root, controller);
|
|
15
|
+
if (!controller.ready) root.dataset.enhanced = '';
|
|
16
|
+
controller.ready?.then(
|
|
17
|
+
() => {
|
|
18
|
+
if (components.get(root) === controller) root.dataset.enhanced = '';
|
|
19
|
+
},
|
|
20
|
+
(error) => {
|
|
21
|
+
console.error(error);
|
|
22
|
+
if (components.get(root) === controller) components.delete(root);
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error(error);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function destroy(predicate) {
|
|
33
|
+
for (const [root, controller] of components) {
|
|
34
|
+
if (!predicate(root)) continue;
|
|
35
|
+
// Drop ownership before a fallback is restored and the observer sees it.
|
|
36
|
+
components.delete(root);
|
|
37
|
+
controller.destroy?.();
|
|
38
|
+
delete root.dataset.enhanced;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function reveal(root, method, value) {
|
|
43
|
+
const owner = components.get(root);
|
|
44
|
+
const apply = (controller) => {
|
|
45
|
+
if (owner && components.get(root) === owner) controller?.[method]?.(value);
|
|
46
|
+
};
|
|
47
|
+
// A selected block can arrive while its controller is still loading.
|
|
48
|
+
if (owner?.ready)
|
|
49
|
+
owner.ready.then(
|
|
50
|
+
(controller) => apply(controller ?? owner),
|
|
51
|
+
() => {},
|
|
52
|
+
);
|
|
53
|
+
else apply(owner);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
initialize(scope);
|
|
57
|
+
const observer = new MutationObserver((mutations) => {
|
|
58
|
+
for (const mutation of mutations) {
|
|
59
|
+
for (const node of mutation.addedNodes) {
|
|
60
|
+
if (node.nodeType === Node.ELEMENT_NODE && node.isConnected) initialize(node);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (mutations.some((mutation) => mutation.removedNodes.length)) destroy((root) => !root.isConnected);
|
|
64
|
+
});
|
|
65
|
+
observer.observe(scope === document ? document.body : scope, { childList: true, subtree: true });
|
|
66
|
+
document.addEventListener('shopify:section:load', (event) => initialize(event.target), { signal: events.signal });
|
|
67
|
+
document.addEventListener('shopify:section:unload', (event) => destroy((root) => event.target.contains(root)), {
|
|
68
|
+
signal: events.signal,
|
|
69
|
+
});
|
|
70
|
+
document.addEventListener(
|
|
71
|
+
'shopify:block:select',
|
|
72
|
+
(event) => {
|
|
73
|
+
const item = event.target.closest('[data-slot="accordion-item"]');
|
|
74
|
+
if (item) reveal(item.closest('[data-slot="accordion"]'), 'expand', item.dataset.value);
|
|
75
|
+
const slide = event.target.closest('[data-slot="carousel-item"]');
|
|
76
|
+
if (slide)
|
|
77
|
+
reveal(slide.closest('[data-slot="carousel"]'), 'goTo', [...slide.parentElement.children].indexOf(slide));
|
|
78
|
+
},
|
|
79
|
+
{ signal: events.signal },
|
|
80
|
+
);
|
|
81
|
+
return {
|
|
82
|
+
components,
|
|
83
|
+
initialize,
|
|
84
|
+
destroy() {
|
|
85
|
+
observer.disconnect();
|
|
86
|
+
events.abort();
|
|
87
|
+
destroy(() => true);
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function deferred(load, start) {
|
|
93
|
+
return (root) => {
|
|
94
|
+
let controller;
|
|
95
|
+
let destroyed = false;
|
|
96
|
+
const ready = load().then((module) => {
|
|
97
|
+
if (!destroyed && root.isConnected) return (controller = start(module, root));
|
|
98
|
+
});
|
|
99
|
+
return {
|
|
100
|
+
ready,
|
|
101
|
+
destroy() {
|
|
102
|
+
destroyed = true;
|
|
103
|
+
controller?.destroy();
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const reducedMotion = matchMedia('(prefers-reduced-motion: reduce)');
|
|
2
|
+
|
|
3
|
+
// A pause button for a CSS animation that runs on its own, such as a marquee. Its label stays Pause
|
|
4
|
+
// and aria-pressed carries the state: pressed while the animation is paused.
|
|
5
|
+
export function initializeMotionPause(button) {
|
|
6
|
+
const root = button.closest('[data-motion]');
|
|
7
|
+
const events = new AbortController();
|
|
8
|
+
// CSS animates the root only from here on, so it never moves without a working pause button.
|
|
9
|
+
root.dataset.motionReady = '';
|
|
10
|
+
const sync = () => {
|
|
11
|
+
button.hidden = reducedMotion.matches;
|
|
12
|
+
};
|
|
13
|
+
button.addEventListener(
|
|
14
|
+
'click',
|
|
15
|
+
() => {
|
|
16
|
+
const paused = button.getAttribute('aria-pressed') !== 'true';
|
|
17
|
+
button.setAttribute('aria-pressed', String(paused));
|
|
18
|
+
root.toggleAttribute('data-paused', paused);
|
|
19
|
+
},
|
|
20
|
+
{ signal: events.signal },
|
|
21
|
+
);
|
|
22
|
+
reducedMotion.addEventListener('change', sync, { signal: events.signal });
|
|
23
|
+
sync();
|
|
24
|
+
return {
|
|
25
|
+
destroy() {
|
|
26
|
+
events.abort();
|
|
27
|
+
delete root.dataset.motionReady;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Muted autoplay videos stay still for visitors who prefer reduced motion; they keep their controls.
|
|
33
|
+
export function initializeAutoplayVideo(video) {
|
|
34
|
+
const events = new AbortController();
|
|
35
|
+
const sync = () => {
|
|
36
|
+
if (reducedMotion.matches) video.pause();
|
|
37
|
+
};
|
|
38
|
+
reducedMotion.addEventListener('change', sync, { signal: events.signal });
|
|
39
|
+
sync();
|
|
40
|
+
return {
|
|
41
|
+
destroy() {
|
|
42
|
+
events.abort();
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { controls } from '@fulldev/controls';
|
|
2
|
+
import { createLifecycle, deferred } from '@fulldev/lifecycle';
|
|
3
|
+
import { initializeAutoplayVideo, initializeMotionPause } from '@fulldev/motion';
|
|
4
|
+
|
|
5
|
+
const simple = [
|
|
6
|
+
['accordion', () => import('@data-slot/accordion'), 'createAccordion'],
|
|
7
|
+
['tabs', () => import('@data-slot/tabs'), 'createTabs'],
|
|
8
|
+
['dialog', () => import('@data-slot/dialog'), 'createDialog'],
|
|
9
|
+
['combobox', () => import('@data-slot/combobox'), 'createCombobox'],
|
|
10
|
+
['command', () => import('@data-slot/command'), 'createCommand'],
|
|
11
|
+
['navigation-menu', () => import('@data-slot/navigation-menu'), 'createNavigationMenu'],
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
export const lifecycle = createLifecycle([
|
|
15
|
+
['[data-motion-pause]', initializeMotionPause],
|
|
16
|
+
['video[autoplay]', initializeAutoplayVideo],
|
|
17
|
+
...simple.map(([name, load, factory]) => [
|
|
18
|
+
`[data-slot="${name}"]`,
|
|
19
|
+
deferred(load, (module, root) =>
|
|
20
|
+
module[factory](root, {
|
|
21
|
+
mountStrategy: 'eager',
|
|
22
|
+
...(name === 'accordion' ? { multiple: root.dataset.multiple !== 'false' } : {}),
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
]),
|
|
26
|
+
[
|
|
27
|
+
'[data-slot="carousel"]',
|
|
28
|
+
deferred(
|
|
29
|
+
() => import('@fulldev/carousel'),
|
|
30
|
+
(module, root) => module.initializeCarousel(root),
|
|
31
|
+
),
|
|
32
|
+
],
|
|
33
|
+
...Object.entries(controls).map(([name, [load, start]]) => [
|
|
34
|
+
name === 'toggle' ? 'button[data-slot="toggle"]' : `[data-slot="${name}"]`,
|
|
35
|
+
deferred(load, start),
|
|
36
|
+
]),
|
|
37
|
+
]);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{% doc %}
|
|
2
|
+
Default Fulldev UI runtime. Render once in the head, before other module scripts.
|
|
3
|
+
Use your own import map and createLifecycle when the theme supplies Shopify adapters.
|
|
4
|
+
{% enddoc %}
|
|
5
|
+
|
|
6
|
+
<script type='importmap'>
|
|
7
|
+
{"imports": {"@fulldev/motion":{{ 'ui-motion.js' | asset_url | json }},"@fulldev/lifecycle":{{ 'ui-lifecycle.js' | asset_url | json }},"@fulldev/controls":{{ 'ui-controls.js' | asset_url | json }},"@fulldev/carousel":{{ 'ui-carousel.js' | asset_url | json }},"@data-slot/core":{{ 'data-slot-core.js' | asset_url | json }},"@data-slot/dialog":{{ 'data-slot-dialog.js' | asset_url | json }},"@data-slot/command":{{ 'data-slot-command.js' | asset_url | json }},"@data-slot/navigation-menu":{{ 'data-slot-navigation-menu.js' | asset_url | json }},"@data-slot/accordion":{{ 'data-slot-accordion.js' | asset_url | json }},"@data-slot/tabs":{{ 'data-slot-tabs.js' | asset_url | json }},"@data-slot/combobox":{{ 'data-slot-combobox.js' | asset_url | json }},"@data-slot/carousel":{{ 'data-slot-carousel.js' | asset_url | json }},"@data-slot/alert-dialog":{{ 'data-slot-alert-dialog.js' | asset_url | json }},"@data-slot/collapsible":{{ 'data-slot-collapsible.js' | asset_url | json }},"@data-slot/drawer":{{ 'data-slot-drawer.js' | asset_url | json }},"@data-slot/dropdown-menu":{{ 'data-slot-dropdown-menu.js' | asset_url | json }},"@data-slot/hover-card":{{ 'data-slot-hover-card.js' | asset_url | json }},"@data-slot/popover":{{ 'data-slot-popover.js' | asset_url | json }},"@data-slot/radio-group":{{ 'data-slot-radio-group.js' | asset_url | json }},"@data-slot/select":{{ 'data-slot-select.js' | asset_url | json }},"@data-slot/slider":{{ 'data-slot-slider.js' | asset_url | json }},"@data-slot/switch":{{ 'data-slot-switch.js' | asset_url | json }},"@data-slot/toast":{{ 'data-slot-toast.js' | asset_url | json }},"@data-slot/toggle":{{ 'data-slot-toggle.js' | asset_url | json }},"@data-slot/toggle-group":{{ 'data-slot-toggle-group.js' | asset_url | json }},"@data-slot/tooltip":{{ 'data-slot-tooltip.js' | asset_url | json }}}}
|
|
8
|
+
</script>
|
|
9
|
+
<script src='{{ 'ui-start.js' | asset_url }}' type='module'></script>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{% doc %}
|
|
2
|
+
All Fulldev UI styles. Render once in the head before theme styles.
|
|
3
|
+
|
|
4
|
+
@param {boolean} [runtime] - False when the theme owns its import map and initialization.
|
|
5
|
+
{% enddoc %}
|
|
6
|
+
|
|
7
|
+
{% render 'ui-init' %}
|
|
8
|
+
{% render 'ui-banner' %}
|
|
9
|
+
{% render 'ui-tabs' %}
|
|
10
|
+
{% render 'ui-form' %}
|
|
11
|
+
{% render 'ui-select' %}
|
|
12
|
+
{% render 'ui-field' %}
|
|
13
|
+
{% render 'ui-item' %}
|
|
14
|
+
{% render 'ui-spinner' %}
|
|
15
|
+
{% render 'ui-video' %}
|
|
16
|
+
{% render 'ui-button' %}
|
|
17
|
+
{% render 'ui-toggle' %}
|
|
18
|
+
{% render 'ui-logo' %}
|
|
19
|
+
{% render 'ui-kbd' %}
|
|
20
|
+
{% render 'ui-rating' %}
|
|
21
|
+
{% render 'ui-tooltip' %}
|
|
22
|
+
{% render 'ui-avatar' %}
|
|
23
|
+
{% render 'ui-empty' %}
|
|
24
|
+
{% render 'ui-alert-dialog' %}
|
|
25
|
+
{% render 'ui-navigation-menu' %}
|
|
26
|
+
{% render 'ui-typography' %}
|
|
27
|
+
{% render 'ui-toc' %}
|
|
28
|
+
{% render 'ui-icon' %}
|
|
29
|
+
{% render 'ui-combobox' %}
|
|
30
|
+
{% render 'ui-toast' %}
|
|
31
|
+
{% render 'ui-header' %}
|
|
32
|
+
{% render 'ui-command' %}
|
|
33
|
+
{% render 'ui-accordion' %}
|
|
34
|
+
{% render 'ui-slider' %}
|
|
35
|
+
{% render 'ui-input' %}
|
|
36
|
+
{% render 'ui-input-group' %}
|
|
37
|
+
{% render 'ui-triggers' %}
|
|
38
|
+
{% render 'ui-toggle-group' %}
|
|
39
|
+
{% render 'ui-dialog' %}
|
|
40
|
+
{% render 'ui-drawer' %}
|
|
41
|
+
{% render 'ui-badge' %}
|
|
42
|
+
{% render 'ui-alert' %}
|
|
43
|
+
{% render 'ui-table' %}
|
|
44
|
+
{% render 'ui-breadcrumb' %}
|
|
45
|
+
{% render 'ui-aspect-ratio' %}
|
|
46
|
+
{% render 'ui-price' %}
|
|
47
|
+
{% render 'ui-radio-group' %}
|
|
48
|
+
{% render 'ui-checkbox' %}
|
|
49
|
+
{% render 'ui-switch' %}
|
|
50
|
+
{% render 'ui-skeleton' %}
|
|
51
|
+
{% render 'ui-separator' %}
|
|
52
|
+
{% render 'ui-card' %}
|
|
53
|
+
{% render 'ui-pagination' %}
|
|
54
|
+
{% render 'ui-popup' %}
|
|
55
|
+
{% render 'ui-sheet' %}
|
|
56
|
+
{% render 'ui-carousel' %}
|
|
57
|
+
{% render 'ui-attachment' %}
|
|
58
|
+
{% render 'ui-marquee' %}
|
|
59
|
+
{% render 'ui-invalid-controls' %}
|
|
60
|
+
{% render 'ui-section' %}
|
|
61
|
+
{% render 'ui-button-group' %}
|
|
62
|
+
{% render 'ui-collapsible' %}
|
|
63
|
+
{% render 'ui-dropdown-menu' %}
|
|
64
|
+
{% render 'ui-popover' %}
|
|
65
|
+
{% render 'ui-hover-card' %}
|
|
66
|
+
{% if runtime != false %}
|
|
67
|
+
{% render 'ui-runtime' %}
|
|
68
|
+
{% endif %}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* The data-slot accordion, and the same parts on native <details> and <summary>, which open
|
|
2
|
+
without JavaScript. */
|
|
3
|
+
[data-slot='accordion'] {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
[data-slot='accordion-item']:not(:last-child) {
|
|
9
|
+
border-bottom: 1px solid var(--border);
|
|
10
|
+
}
|
|
11
|
+
.accordion__heading {
|
|
12
|
+
font: inherit;
|
|
13
|
+
letter-spacing: var(--tracking-normal);
|
|
14
|
+
}
|
|
15
|
+
[data-slot='accordion-trigger'] {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
gap: calc(var(--spacing) * 4);
|
|
20
|
+
width: 100%;
|
|
21
|
+
padding-block: calc(var(--spacing) * 4);
|
|
22
|
+
border: 1px solid transparent;
|
|
23
|
+
border-radius: var(--radius-md);
|
|
24
|
+
font-size: 0.875rem;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
line-height: 1.43;
|
|
27
|
+
text-align: left;
|
|
28
|
+
list-style: none;
|
|
29
|
+
outline: none;
|
|
30
|
+
}
|
|
31
|
+
summary[data-slot='accordion-trigger']::-webkit-details-marker {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
[data-slot='accordion-trigger']:hover {
|
|
35
|
+
text-decoration: underline;
|
|
36
|
+
}
|
|
37
|
+
[data-slot='accordion-trigger']:focus-visible {
|
|
38
|
+
border-color: var(--ring);
|
|
39
|
+
box-shadow: var(--focus-ring);
|
|
40
|
+
}
|
|
41
|
+
[data-slot='accordion-trigger'] > .icon {
|
|
42
|
+
width: calc(var(--spacing) * 4);
|
|
43
|
+
height: calc(var(--spacing) * 4);
|
|
44
|
+
margin-left: auto;
|
|
45
|
+
color: var(--muted-foreground);
|
|
46
|
+
transition: rotate 200ms;
|
|
47
|
+
}
|
|
48
|
+
[data-slot='accordion-item'][data-state='open'] [data-slot='accordion-trigger'] > .icon,
|
|
49
|
+
details[open] > [data-slot='accordion-trigger'] > .icon {
|
|
50
|
+
rotate: 180deg;
|
|
51
|
+
}
|
|
52
|
+
[data-slot='accordion-content'] {
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
font-size: 0.875rem;
|
|
55
|
+
}
|
|
56
|
+
[data-slot='accordion'] [data-slot='accordion-content'] {
|
|
57
|
+
height: var(--accordion-panel-height);
|
|
58
|
+
transition: height 200ms ease;
|
|
59
|
+
}
|
|
60
|
+
[data-slot='accordion-content'][data-starting-style],
|
|
61
|
+
[data-slot='accordion-content'][data-ending-style] {
|
|
62
|
+
height: 0;
|
|
63
|
+
}
|
|
64
|
+
[data-slot='accordion-content-inner'] {
|
|
65
|
+
padding-bottom: calc(var(--spacing) * 4);
|
|
66
|
+
}
|