fulldev-ui 0.25.5 → 0.27.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/liquid/assets/data-slot-command.js +1 -1
- package/liquid/assets/data-slot-toast.js +1 -1
- package/liquid/assets/ui-carousel.css +32 -0
- package/liquid/assets/ui-carousel.js +26 -1
- package/liquid/assets/ui-controls.js +112 -0
- package/liquid/assets/ui-licenses.json +1 -1
- package/liquid/assets/ui-manifest.json +11 -9
- package/liquid/contracts.json +14 -1
- package/liquid/examples/carousel.liquid +46 -0
- package/liquid/examples/dependencies.json +3 -1
- package/liquid/examples/number-field.liquid +67 -0
- package/liquid/examples/swatch.liquid +25 -0
- package/liquid/registry.json +39 -1
- package/liquid/snippets/ui-input-group.liquid +47 -8
- package/liquid/snippets/ui-input.liquid +3 -1
- package/liquid/snippets/ui-number-field.liquid +26 -0
- package/liquid/snippets/ui-swatch.liquid +19 -0
- package/liquid/snippets/ui.liquid +2 -0
- package/package.json +25 -25
- package/public/r/liquid/carousel.json +1 -1
- package/public/r/liquid/components.json +5 -3
- package/public/r/liquid/init.json +1 -1
- package/public/r/liquid/input-group.json +1 -1
- package/public/r/liquid/input.json +1 -1
- package/public/r/liquid/number-field.json +23 -0
- package/public/r/liquid/registry.json +41 -1
- package/public/r/liquid/runtime.json +4 -4
- package/public/r/liquid/swatch.json +19 -0
- package/public/r/react/styles/base-luma/carousel-indicator.json +24 -0
- package/public/r/react/styles/base-luma/components.json +3 -0
- package/public/r/react/styles/base-luma/number-field.json +26 -0
- package/public/r/react/styles/base-luma/registry.json +68 -0
- package/public/r/react/styles/base-luma/swatch.json +21 -0
- package/public/r/react/styles/base-lyra/carousel-indicator.json +24 -0
- package/public/r/react/styles/base-lyra/components.json +3 -0
- package/public/r/react/styles/base-lyra/number-field.json +26 -0
- package/public/r/react/styles/base-lyra/registry.json +68 -0
- package/public/r/react/styles/base-lyra/swatch.json +21 -0
- package/public/r/react/styles/base-maia/carousel-indicator.json +24 -0
- package/public/r/react/styles/base-maia/components.json +3 -0
- package/public/r/react/styles/base-maia/number-field.json +26 -0
- package/public/r/react/styles/base-maia/registry.json +68 -0
- package/public/r/react/styles/base-maia/swatch.json +21 -0
- package/public/r/react/styles/base-mira/carousel-indicator.json +24 -0
- package/public/r/react/styles/base-mira/components.json +3 -0
- package/public/r/react/styles/base-mira/number-field.json +26 -0
- package/public/r/react/styles/base-mira/registry.json +68 -0
- package/public/r/react/styles/base-mira/swatch.json +21 -0
- package/public/r/react/styles/base-nova/carousel-indicator.json +24 -0
- package/public/r/react/styles/base-nova/components.json +3 -0
- package/public/r/react/styles/base-nova/number-field.json +26 -0
- package/public/r/react/styles/base-nova/registry.json +68 -0
- package/public/r/react/styles/base-nova/swatch.json +21 -0
- package/public/r/react/styles/base-rhea/carousel-indicator.json +24 -0
- package/public/r/react/styles/base-rhea/components.json +3 -0
- package/public/r/react/styles/base-rhea/number-field.json +26 -0
- package/public/r/react/styles/base-rhea/registry.json +68 -0
- package/public/r/react/styles/base-rhea/swatch.json +21 -0
- package/public/r/react/styles/base-sera/carousel-indicator.json +24 -0
- package/public/r/react/styles/base-sera/components.json +3 -0
- package/public/r/react/styles/base-sera/number-field.json +26 -0
- package/public/r/react/styles/base-sera/registry.json +68 -0
- package/public/r/react/styles/base-sera/swatch.json +21 -0
- package/public/r/react/styles/base-vega/carousel-indicator.json +24 -0
- package/public/r/react/styles/base-vega/components.json +3 -0
- package/public/r/react/styles/base-vega/number-field.json +26 -0
- package/public/r/react/styles/base-vega/registry.json +68 -0
- package/public/r/react/styles/base-vega/swatch.json +21 -0
- package/public/r/styles/base-luma/accordion.json +2 -2
- package/public/r/styles/base-luma/alert-dialog.json +2 -2
- package/public/r/styles/base-luma/carousel.json +7 -2
- 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 +3 -3
- package/public/r/styles/base-luma/components.json +3 -0
- package/public/r/styles/base-luma/dialog.json +2 -2
- package/public/r/styles/base-luma/drawer.json +2 -2
- package/public/r/styles/base-luma/dropdown-menu.json +2 -2
- package/public/r/styles/base-luma/header-1.json +1 -1
- package/public/r/styles/base-luma/header-2.json +1 -1
- package/public/r/styles/base-luma/header-3.json +1 -1
- package/public/r/styles/base-luma/header-4.json +1 -1
- package/public/r/styles/base-luma/header-5.json +1 -1
- package/public/r/styles/base-luma/hover-card.json +3 -3
- package/public/r/styles/base-luma/image.json +23 -0
- package/public/r/styles/base-luma/navigation-menu.json +2 -2
- package/public/r/styles/base-luma/number-field.json +44 -0
- package/public/r/styles/base-luma/popover.json +2 -2
- package/public/r/styles/base-luma/radio-group.json +2 -2
- package/public/r/styles/base-luma/registry.json +111 -26
- package/public/r/styles/base-luma/resizable.json +2 -2
- package/public/r/styles/base-luma/select.json +2 -2
- package/public/r/styles/base-luma/sheet.json +2 -2
- package/public/r/styles/base-luma/sidebar.json +1 -1
- package/public/r/styles/base-luma/slider.json +2 -2
- package/public/r/styles/base-luma/swatch.json +23 -0
- package/public/r/styles/base-luma/switch.json +2 -2
- package/public/r/styles/base-luma/tabs.json +2 -2
- package/public/r/styles/base-luma/toast.json +2 -2
- package/public/r/styles/base-luma/toggle-group.json +2 -2
- package/public/r/styles/base-luma/toggle.json +2 -2
- package/public/r/styles/base-luma/tooltip.json +2 -2
- package/public/r/styles/base-lyra/accordion.json +2 -2
- package/public/r/styles/base-lyra/alert-dialog.json +2 -2
- package/public/r/styles/base-lyra/carousel.json +7 -2
- 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 +3 -3
- package/public/r/styles/base-lyra/components.json +3 -0
- package/public/r/styles/base-lyra/dialog.json +2 -2
- package/public/r/styles/base-lyra/drawer.json +2 -2
- package/public/r/styles/base-lyra/dropdown-menu.json +2 -2
- package/public/r/styles/base-lyra/header-1.json +1 -1
- package/public/r/styles/base-lyra/header-2.json +1 -1
- package/public/r/styles/base-lyra/header-3.json +1 -1
- package/public/r/styles/base-lyra/header-4.json +1 -1
- package/public/r/styles/base-lyra/header-5.json +1 -1
- package/public/r/styles/base-lyra/hover-card.json +3 -3
- package/public/r/styles/base-lyra/image.json +23 -0
- package/public/r/styles/base-lyra/navigation-menu.json +2 -2
- package/public/r/styles/base-lyra/number-field.json +44 -0
- package/public/r/styles/base-lyra/popover.json +2 -2
- package/public/r/styles/base-lyra/radio-group.json +2 -2
- package/public/r/styles/base-lyra/registry.json +111 -26
- package/public/r/styles/base-lyra/resizable.json +2 -2
- package/public/r/styles/base-lyra/select.json +2 -2
- package/public/r/styles/base-lyra/sheet.json +2 -2
- package/public/r/styles/base-lyra/sidebar.json +1 -1
- package/public/r/styles/base-lyra/slider.json +2 -2
- package/public/r/styles/base-lyra/swatch.json +23 -0
- package/public/r/styles/base-lyra/switch.json +2 -2
- package/public/r/styles/base-lyra/tabs.json +2 -2
- package/public/r/styles/base-lyra/toast.json +2 -2
- package/public/r/styles/base-lyra/toggle-group.json +2 -2
- package/public/r/styles/base-lyra/toggle.json +2 -2
- package/public/r/styles/base-lyra/tooltip.json +2 -2
- package/public/r/styles/base-maia/accordion.json +2 -2
- package/public/r/styles/base-maia/alert-dialog.json +2 -2
- package/public/r/styles/base-maia/carousel.json +7 -2
- 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 +3 -3
- package/public/r/styles/base-maia/components.json +3 -0
- package/public/r/styles/base-maia/dialog.json +2 -2
- package/public/r/styles/base-maia/drawer.json +2 -2
- package/public/r/styles/base-maia/dropdown-menu.json +2 -2
- package/public/r/styles/base-maia/header-1.json +1 -1
- package/public/r/styles/base-maia/header-2.json +1 -1
- package/public/r/styles/base-maia/header-3.json +1 -1
- package/public/r/styles/base-maia/header-4.json +1 -1
- package/public/r/styles/base-maia/header-5.json +1 -1
- package/public/r/styles/base-maia/hover-card.json +3 -3
- package/public/r/styles/base-maia/image.json +23 -0
- package/public/r/styles/base-maia/navigation-menu.json +2 -2
- package/public/r/styles/base-maia/number-field.json +44 -0
- package/public/r/styles/base-maia/popover.json +2 -2
- package/public/r/styles/base-maia/radio-group.json +2 -2
- package/public/r/styles/base-maia/registry.json +111 -26
- package/public/r/styles/base-maia/resizable.json +2 -2
- package/public/r/styles/base-maia/select.json +2 -2
- package/public/r/styles/base-maia/sheet.json +2 -2
- package/public/r/styles/base-maia/sidebar.json +1 -1
- package/public/r/styles/base-maia/slider.json +2 -2
- package/public/r/styles/base-maia/swatch.json +23 -0
- package/public/r/styles/base-maia/switch.json +2 -2
- package/public/r/styles/base-maia/tabs.json +2 -2
- package/public/r/styles/base-maia/toast.json +2 -2
- package/public/r/styles/base-maia/toggle-group.json +2 -2
- package/public/r/styles/base-maia/toggle.json +2 -2
- package/public/r/styles/base-maia/tooltip.json +2 -2
- package/public/r/styles/base-mira/accordion.json +2 -2
- package/public/r/styles/base-mira/alert-dialog.json +2 -2
- package/public/r/styles/base-mira/carousel.json +7 -2
- 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 +3 -3
- package/public/r/styles/base-mira/components.json +3 -0
- package/public/r/styles/base-mira/dialog.json +2 -2
- package/public/r/styles/base-mira/drawer.json +2 -2
- package/public/r/styles/base-mira/dropdown-menu.json +2 -2
- package/public/r/styles/base-mira/header-1.json +1 -1
- package/public/r/styles/base-mira/header-2.json +1 -1
- package/public/r/styles/base-mira/header-3.json +1 -1
- package/public/r/styles/base-mira/header-4.json +1 -1
- package/public/r/styles/base-mira/header-5.json +1 -1
- package/public/r/styles/base-mira/hover-card.json +3 -3
- package/public/r/styles/base-mira/image.json +23 -0
- package/public/r/styles/base-mira/navigation-menu.json +2 -2
- package/public/r/styles/base-mira/number-field.json +44 -0
- package/public/r/styles/base-mira/popover.json +2 -2
- package/public/r/styles/base-mira/radio-group.json +2 -2
- package/public/r/styles/base-mira/registry.json +111 -26
- package/public/r/styles/base-mira/resizable.json +2 -2
- package/public/r/styles/base-mira/select.json +2 -2
- package/public/r/styles/base-mira/sheet.json +2 -2
- package/public/r/styles/base-mira/sidebar.json +1 -1
- package/public/r/styles/base-mira/slider.json +2 -2
- package/public/r/styles/base-mira/swatch.json +23 -0
- package/public/r/styles/base-mira/switch.json +2 -2
- package/public/r/styles/base-mira/tabs.json +2 -2
- package/public/r/styles/base-mira/toast.json +2 -2
- package/public/r/styles/base-mira/toggle-group.json +2 -2
- package/public/r/styles/base-mira/toggle.json +2 -2
- package/public/r/styles/base-mira/tooltip.json +2 -2
- package/public/r/styles/base-nova/accordion.json +2 -2
- package/public/r/styles/base-nova/alert-dialog.json +2 -2
- package/public/r/styles/base-nova/carousel.json +7 -2
- 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 +3 -3
- package/public/r/styles/base-nova/components.json +3 -0
- package/public/r/styles/base-nova/dialog.json +2 -2
- package/public/r/styles/base-nova/drawer.json +2 -2
- package/public/r/styles/base-nova/dropdown-menu.json +2 -2
- package/public/r/styles/base-nova/header-1.json +1 -1
- package/public/r/styles/base-nova/header-2.json +1 -1
- package/public/r/styles/base-nova/header-3.json +1 -1
- package/public/r/styles/base-nova/header-4.json +1 -1
- package/public/r/styles/base-nova/header-5.json +1 -1
- package/public/r/styles/base-nova/hover-card.json +3 -3
- package/public/r/styles/base-nova/image.json +23 -0
- package/public/r/styles/base-nova/navigation-menu.json +2 -2
- package/public/r/styles/base-nova/number-field.json +44 -0
- package/public/r/styles/base-nova/popover.json +2 -2
- package/public/r/styles/base-nova/radio-group.json +2 -2
- package/public/r/styles/base-nova/registry.json +111 -26
- package/public/r/styles/base-nova/resizable.json +2 -2
- package/public/r/styles/base-nova/select.json +2 -2
- package/public/r/styles/base-nova/sheet.json +2 -2
- package/public/r/styles/base-nova/sidebar.json +1 -1
- package/public/r/styles/base-nova/slider.json +2 -2
- package/public/r/styles/base-nova/swatch.json +23 -0
- package/public/r/styles/base-nova/switch.json +2 -2
- package/public/r/styles/base-nova/tabs.json +2 -2
- package/public/r/styles/base-nova/toast.json +2 -2
- package/public/r/styles/base-nova/toggle-group.json +2 -2
- package/public/r/styles/base-nova/toggle.json +2 -2
- package/public/r/styles/base-nova/tooltip.json +2 -2
- package/public/r/styles/base-rhea/accordion.json +2 -2
- package/public/r/styles/base-rhea/alert-dialog.json +2 -2
- package/public/r/styles/base-rhea/carousel.json +7 -2
- 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 +3 -3
- package/public/r/styles/base-rhea/components.json +3 -0
- package/public/r/styles/base-rhea/dialog.json +2 -2
- package/public/r/styles/base-rhea/drawer.json +2 -2
- package/public/r/styles/base-rhea/dropdown-menu.json +2 -2
- package/public/r/styles/base-rhea/header-1.json +1 -1
- package/public/r/styles/base-rhea/header-2.json +1 -1
- package/public/r/styles/base-rhea/header-3.json +1 -1
- package/public/r/styles/base-rhea/header-4.json +1 -1
- package/public/r/styles/base-rhea/header-5.json +1 -1
- package/public/r/styles/base-rhea/hover-card.json +3 -3
- package/public/r/styles/base-rhea/image.json +23 -0
- package/public/r/styles/base-rhea/navigation-menu.json +2 -2
- package/public/r/styles/base-rhea/number-field.json +44 -0
- package/public/r/styles/base-rhea/popover.json +2 -2
- package/public/r/styles/base-rhea/radio-group.json +2 -2
- package/public/r/styles/base-rhea/registry.json +111 -26
- package/public/r/styles/base-rhea/resizable.json +2 -2
- package/public/r/styles/base-rhea/select.json +2 -2
- package/public/r/styles/base-rhea/sheet.json +2 -2
- package/public/r/styles/base-rhea/sidebar.json +1 -1
- package/public/r/styles/base-rhea/slider.json +2 -2
- package/public/r/styles/base-rhea/swatch.json +23 -0
- package/public/r/styles/base-rhea/switch.json +2 -2
- package/public/r/styles/base-rhea/tabs.json +2 -2
- package/public/r/styles/base-rhea/toast.json +2 -2
- package/public/r/styles/base-rhea/toggle-group.json +2 -2
- package/public/r/styles/base-rhea/toggle.json +2 -2
- package/public/r/styles/base-rhea/tooltip.json +2 -2
- package/public/r/styles/base-sera/accordion.json +2 -2
- package/public/r/styles/base-sera/alert-dialog.json +2 -2
- package/public/r/styles/base-sera/carousel.json +7 -2
- 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 +3 -3
- package/public/r/styles/base-sera/components.json +3 -0
- package/public/r/styles/base-sera/dialog.json +2 -2
- package/public/r/styles/base-sera/drawer.json +2 -2
- package/public/r/styles/base-sera/dropdown-menu.json +2 -2
- package/public/r/styles/base-sera/header-1.json +1 -1
- package/public/r/styles/base-sera/header-2.json +1 -1
- package/public/r/styles/base-sera/header-3.json +1 -1
- package/public/r/styles/base-sera/header-4.json +1 -1
- package/public/r/styles/base-sera/header-5.json +1 -1
- package/public/r/styles/base-sera/hover-card.json +3 -3
- package/public/r/styles/base-sera/image.json +23 -0
- package/public/r/styles/base-sera/navigation-menu.json +2 -2
- package/public/r/styles/base-sera/number-field.json +44 -0
- package/public/r/styles/base-sera/popover.json +2 -2
- package/public/r/styles/base-sera/radio-group.json +2 -2
- package/public/r/styles/base-sera/registry.json +111 -26
- package/public/r/styles/base-sera/resizable.json +2 -2
- package/public/r/styles/base-sera/select.json +2 -2
- package/public/r/styles/base-sera/sheet.json +2 -2
- package/public/r/styles/base-sera/sidebar.json +1 -1
- package/public/r/styles/base-sera/slider.json +2 -2
- package/public/r/styles/base-sera/swatch.json +23 -0
- package/public/r/styles/base-sera/switch.json +2 -2
- package/public/r/styles/base-sera/tabs.json +2 -2
- package/public/r/styles/base-sera/toast.json +2 -2
- package/public/r/styles/base-sera/toggle-group.json +2 -2
- package/public/r/styles/base-sera/toggle.json +2 -2
- package/public/r/styles/base-sera/tooltip.json +2 -2
- package/public/r/styles/base-vega/accordion.json +2 -2
- package/public/r/styles/base-vega/alert-dialog.json +2 -2
- package/public/r/styles/base-vega/carousel.json +7 -2
- 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 +3 -3
- package/public/r/styles/base-vega/components.json +3 -0
- package/public/r/styles/base-vega/dialog.json +2 -2
- package/public/r/styles/base-vega/drawer.json +2 -2
- package/public/r/styles/base-vega/dropdown-menu.json +2 -2
- package/public/r/styles/base-vega/header-1.json +1 -1
- package/public/r/styles/base-vega/header-2.json +1 -1
- package/public/r/styles/base-vega/header-3.json +1 -1
- package/public/r/styles/base-vega/header-4.json +1 -1
- package/public/r/styles/base-vega/header-5.json +1 -1
- package/public/r/styles/base-vega/hover-card.json +3 -3
- package/public/r/styles/base-vega/image.json +23 -0
- package/public/r/styles/base-vega/navigation-menu.json +2 -2
- package/public/r/styles/base-vega/number-field.json +44 -0
- package/public/r/styles/base-vega/popover.json +2 -2
- package/public/r/styles/base-vega/radio-group.json +2 -2
- package/public/r/styles/base-vega/registry.json +111 -26
- package/public/r/styles/base-vega/resizable.json +2 -2
- package/public/r/styles/base-vega/select.json +2 -2
- package/public/r/styles/base-vega/sheet.json +2 -2
- package/public/r/styles/base-vega/sidebar.json +1 -1
- package/public/r/styles/base-vega/slider.json +2 -2
- package/public/r/styles/base-vega/swatch.json +23 -0
- package/public/r/styles/base-vega/switch.json +2 -2
- package/public/r/styles/base-vega/tabs.json +2 -2
- package/public/r/styles/base-vega/toast.json +2 -2
- package/public/r/styles/base-vega/toggle-group.json +2 -2
- package/public/r/styles/base-vega/toggle.json +2 -2
- package/public/r/styles/base-vega/tooltip.json +2 -2
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"docs": "https://ui.full.dev/components/accordion/",
|
|
15
15
|
"dependencies": [
|
|
16
|
-
"@data-slot/accordion@^1.1.
|
|
16
|
+
"@data-slot/accordion@^1.1.3",
|
|
17
17
|
"@lucide/astro"
|
|
18
18
|
],
|
|
19
19
|
"files": [
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
],
|
|
82
82
|
"docs": "https://ui.full.dev/components/alert-dialog/",
|
|
83
83
|
"dependencies": [
|
|
84
|
-
"@data-slot/alert-dialog@^1.1.
|
|
84
|
+
"@data-slot/alert-dialog@^1.1.3"
|
|
85
85
|
],
|
|
86
86
|
"registryDependencies": [
|
|
87
87
|
"@fulldev/button"
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
],
|
|
433
433
|
"docs": "https://ui.full.dev/components/collapsible/",
|
|
434
434
|
"dependencies": [
|
|
435
|
-
"@data-slot/collapsible@^1.1.
|
|
435
|
+
"@data-slot/collapsible@^1.1.3"
|
|
436
436
|
],
|
|
437
437
|
"files": [
|
|
438
438
|
{
|
|
@@ -463,8 +463,8 @@
|
|
|
463
463
|
],
|
|
464
464
|
"docs": "https://ui.full.dev/components/combobox/",
|
|
465
465
|
"dependencies": [
|
|
466
|
-
"@data-slot/combobox@^1.1.
|
|
467
|
-
"@data-slot/core@^1.1.
|
|
466
|
+
"@data-slot/combobox@^1.1.3",
|
|
467
|
+
"@data-slot/core@^1.1.3",
|
|
468
468
|
"@lucide/astro"
|
|
469
469
|
],
|
|
470
470
|
"registryDependencies": [
|
|
@@ -531,9 +531,9 @@
|
|
|
531
531
|
],
|
|
532
532
|
"docs": "https://ui.full.dev/components/command/",
|
|
533
533
|
"dependencies": [
|
|
534
|
-
"@data-slot/command@^1.1.
|
|
534
|
+
"@data-slot/command@^1.1.3",
|
|
535
535
|
"@lucide/astro",
|
|
536
|
-
"@data-slot/core@^1.1.
|
|
536
|
+
"@data-slot/core@^1.1.3"
|
|
537
537
|
],
|
|
538
538
|
"registryDependencies": [
|
|
539
539
|
"@fulldev/dialog"
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
],
|
|
592
592
|
"docs": "https://ui.full.dev/components/dialog/",
|
|
593
593
|
"dependencies": [
|
|
594
|
-
"@data-slot/dialog@^1.1.
|
|
594
|
+
"@data-slot/dialog@^1.1.3",
|
|
595
595
|
"@lucide/astro"
|
|
596
596
|
],
|
|
597
597
|
"registryDependencies": [
|
|
@@ -654,7 +654,7 @@
|
|
|
654
654
|
],
|
|
655
655
|
"docs": "https://ui.full.dev/components/dropdown-menu/",
|
|
656
656
|
"dependencies": [
|
|
657
|
-
"@data-slot/dropdown-menu@^1.1.
|
|
657
|
+
"@data-slot/dropdown-menu@^1.1.3",
|
|
658
658
|
"@lucide/astro"
|
|
659
659
|
],
|
|
660
660
|
"files": [
|
|
@@ -873,8 +873,8 @@
|
|
|
873
873
|
],
|
|
874
874
|
"docs": "https://ui.full.dev/components/hover-card/",
|
|
875
875
|
"dependencies": [
|
|
876
|
-
"@data-slot/hover-card@^1.1.
|
|
877
|
-
"@data-slot/core@^1.1.
|
|
876
|
+
"@data-slot/hover-card@^1.1.3",
|
|
877
|
+
"@data-slot/core@^1.1.3"
|
|
878
878
|
],
|
|
879
879
|
"files": [
|
|
880
880
|
{
|
|
@@ -919,6 +919,26 @@
|
|
|
919
919
|
}
|
|
920
920
|
]
|
|
921
921
|
},
|
|
922
|
+
{
|
|
923
|
+
"name": "image",
|
|
924
|
+
"type": "registry:ui",
|
|
925
|
+
"title": "Image",
|
|
926
|
+
"description": "An optional image with responsive picture formats for existing Astro blocks.",
|
|
927
|
+
"categories": [
|
|
928
|
+
"ui"
|
|
929
|
+
],
|
|
930
|
+
"docs": "https://ui.full.dev/components/image/",
|
|
931
|
+
"files": [
|
|
932
|
+
{
|
|
933
|
+
"path": "src/components/ui/image/image.astro",
|
|
934
|
+
"type": "registry:ui"
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
"path": "src/components/ui/image/index.ts",
|
|
938
|
+
"type": "registry:ui"
|
|
939
|
+
}
|
|
940
|
+
]
|
|
941
|
+
},
|
|
922
942
|
{
|
|
923
943
|
"name": "input",
|
|
924
944
|
"type": "registry:ui",
|
|
@@ -1222,6 +1242,10 @@
|
|
|
1222
1242
|
"path": "src/components/ui/carousel/carousel-previous.astro",
|
|
1223
1243
|
"type": "registry:ui"
|
|
1224
1244
|
},
|
|
1245
|
+
{
|
|
1246
|
+
"path": "src/components/ui/carousel/carousel-indicator.astro",
|
|
1247
|
+
"type": "registry:ui"
|
|
1248
|
+
},
|
|
1225
1249
|
{
|
|
1226
1250
|
"path": "src/components/ui/carousel/index.ts",
|
|
1227
1251
|
"type": "registry:ui"
|
|
@@ -1238,7 +1262,7 @@
|
|
|
1238
1262
|
],
|
|
1239
1263
|
"docs": "https://ui.full.dev/components/navigation-menu/",
|
|
1240
1264
|
"dependencies": [
|
|
1241
|
-
"@data-slot/navigation-menu@^1.1.
|
|
1265
|
+
"@data-slot/navigation-menu@^1.1.3",
|
|
1242
1266
|
"@lucide/astro"
|
|
1243
1267
|
],
|
|
1244
1268
|
"files": [
|
|
@@ -1325,7 +1349,7 @@
|
|
|
1325
1349
|
],
|
|
1326
1350
|
"docs": "https://ui.full.dev/components/popover/",
|
|
1327
1351
|
"dependencies": [
|
|
1328
|
-
"@data-slot/popover@^1.1.
|
|
1352
|
+
"@data-slot/popover@^1.1.3"
|
|
1329
1353
|
],
|
|
1330
1354
|
"files": [
|
|
1331
1355
|
{
|
|
@@ -1420,7 +1444,7 @@
|
|
|
1420
1444
|
],
|
|
1421
1445
|
"docs": "https://ui.full.dev/components/radio-group/",
|
|
1422
1446
|
"dependencies": [
|
|
1423
|
-
"@data-slot/radio-group@^1.1.
|
|
1447
|
+
"@data-slot/radio-group@^1.1.3"
|
|
1424
1448
|
],
|
|
1425
1449
|
"files": [
|
|
1426
1450
|
{
|
|
@@ -1470,7 +1494,7 @@
|
|
|
1470
1494
|
],
|
|
1471
1495
|
"docs": "https://ui.full.dev/components/select/",
|
|
1472
1496
|
"dependencies": [
|
|
1473
|
-
"@data-slot/select@^1.1.
|
|
1497
|
+
"@data-slot/select@^1.1.3",
|
|
1474
1498
|
"@lucide/astro"
|
|
1475
1499
|
],
|
|
1476
1500
|
"files": [
|
|
@@ -1574,7 +1598,7 @@
|
|
|
1574
1598
|
],
|
|
1575
1599
|
"docs": "https://ui.full.dev/components/sheet/",
|
|
1576
1600
|
"dependencies": [
|
|
1577
|
-
"@data-slot/dialog@^1.1.
|
|
1601
|
+
"@data-slot/dialog@^1.1.3",
|
|
1578
1602
|
"@lucide/astro"
|
|
1579
1603
|
],
|
|
1580
1604
|
"registryDependencies": [
|
|
@@ -1630,7 +1654,7 @@
|
|
|
1630
1654
|
],
|
|
1631
1655
|
"docs": "https://ui.full.dev/components/sidebar/",
|
|
1632
1656
|
"dependencies": [
|
|
1633
|
-
"@data-slot/tooltip@^1.1.
|
|
1657
|
+
"@data-slot/tooltip@^1.1.3",
|
|
1634
1658
|
"@lucide/astro"
|
|
1635
1659
|
],
|
|
1636
1660
|
"registryDependencies": [
|
|
@@ -1751,7 +1775,7 @@
|
|
|
1751
1775
|
],
|
|
1752
1776
|
"docs": "https://ui.full.dev/components/slider/",
|
|
1753
1777
|
"dependencies": [
|
|
1754
|
-
"@data-slot/slider@^1.1.
|
|
1778
|
+
"@data-slot/slider@^1.1.3"
|
|
1755
1779
|
],
|
|
1756
1780
|
"files": [
|
|
1757
1781
|
{
|
|
@@ -1817,7 +1841,7 @@
|
|
|
1817
1841
|
],
|
|
1818
1842
|
"docs": "https://ui.full.dev/components/switch/",
|
|
1819
1843
|
"dependencies": [
|
|
1820
|
-
"@data-slot/switch@^1.1.
|
|
1844
|
+
"@data-slot/switch@^1.1.3"
|
|
1821
1845
|
],
|
|
1822
1846
|
"files": [
|
|
1823
1847
|
{
|
|
@@ -1888,7 +1912,7 @@
|
|
|
1888
1912
|
],
|
|
1889
1913
|
"docs": "https://ui.full.dev/components/tabs/",
|
|
1890
1914
|
"dependencies": [
|
|
1891
|
-
"@data-slot/tabs@^1.1.
|
|
1915
|
+
"@data-slot/tabs@^1.1.3"
|
|
1892
1916
|
],
|
|
1893
1917
|
"files": [
|
|
1894
1918
|
{
|
|
@@ -1963,7 +1987,7 @@
|
|
|
1963
1987
|
],
|
|
1964
1988
|
"docs": "https://ui.full.dev/components/toggle/",
|
|
1965
1989
|
"dependencies": [
|
|
1966
|
-
"@data-slot/toggle@^1.1.
|
|
1990
|
+
"@data-slot/toggle@^1.1.3"
|
|
1967
1991
|
],
|
|
1968
1992
|
"files": [
|
|
1969
1993
|
{
|
|
@@ -2010,7 +2034,7 @@
|
|
|
2010
2034
|
],
|
|
2011
2035
|
"docs": "https://ui.full.dev/components/tooltip/",
|
|
2012
2036
|
"dependencies": [
|
|
2013
|
-
"@data-slot/tooltip@^1.1.
|
|
2037
|
+
"@data-slot/tooltip@^1.1.3"
|
|
2014
2038
|
],
|
|
2015
2039
|
"files": [
|
|
2016
2040
|
{
|
|
@@ -2145,7 +2169,7 @@
|
|
|
2145
2169
|
],
|
|
2146
2170
|
"docs": "https://ui.full.dev/components/drawer/",
|
|
2147
2171
|
"dependencies": [
|
|
2148
|
-
"@data-slot/drawer@^1.1.
|
|
2172
|
+
"@data-slot/drawer@^1.1.3"
|
|
2149
2173
|
],
|
|
2150
2174
|
"registryDependencies": [
|
|
2151
2175
|
"@fulldev/button"
|
|
@@ -2235,7 +2259,7 @@
|
|
|
2235
2259
|
],
|
|
2236
2260
|
"docs": "https://ui.full.dev/components/resizable/",
|
|
2237
2261
|
"dependencies": [
|
|
2238
|
-
"@data-slot/resizable@^1.1.
|
|
2262
|
+
"@data-slot/resizable@^1.1.3"
|
|
2239
2263
|
],
|
|
2240
2264
|
"files": [
|
|
2241
2265
|
{
|
|
@@ -2266,7 +2290,7 @@
|
|
|
2266
2290
|
],
|
|
2267
2291
|
"docs": "https://ui.full.dev/components/toast/",
|
|
2268
2292
|
"dependencies": [
|
|
2269
|
-
"@data-slot/toast@^1.1.
|
|
2293
|
+
"@data-slot/toast@^1.1.3",
|
|
2270
2294
|
"@lucide/astro"
|
|
2271
2295
|
],
|
|
2272
2296
|
"registryDependencies": [
|
|
@@ -2333,7 +2357,7 @@
|
|
|
2333
2357
|
],
|
|
2334
2358
|
"docs": "https://ui.full.dev/components/toggle-group/",
|
|
2335
2359
|
"dependencies": [
|
|
2336
|
-
"@data-slot/toggle-group@^1.1.
|
|
2360
|
+
"@data-slot/toggle-group@^1.1.3"
|
|
2337
2361
|
],
|
|
2338
2362
|
"registryDependencies": [
|
|
2339
2363
|
"@fulldev/toggle"
|
|
@@ -2513,6 +2537,64 @@
|
|
|
2513
2537
|
}
|
|
2514
2538
|
]
|
|
2515
2539
|
},
|
|
2540
|
+
{
|
|
2541
|
+
"name": "number-field",
|
|
2542
|
+
"type": "registry:ui",
|
|
2543
|
+
"title": "Number Field",
|
|
2544
|
+
"description": "A number input with decrement and increment buttons.",
|
|
2545
|
+
"categories": [
|
|
2546
|
+
"ui"
|
|
2547
|
+
],
|
|
2548
|
+
"docs": "https://ui.full.dev/components/number-field/",
|
|
2549
|
+
"dependencies": [
|
|
2550
|
+
"@lucide/astro"
|
|
2551
|
+
],
|
|
2552
|
+
"registryDependencies": [
|
|
2553
|
+
"@fulldev/input-group"
|
|
2554
|
+
],
|
|
2555
|
+
"files": [
|
|
2556
|
+
{
|
|
2557
|
+
"path": "src/components/ui/number-field/number-field.astro",
|
|
2558
|
+
"type": "registry:ui"
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
"path": "src/components/ui/number-field/number-field-decrement.astro",
|
|
2562
|
+
"type": "registry:ui"
|
|
2563
|
+
},
|
|
2564
|
+
{
|
|
2565
|
+
"path": "src/components/ui/number-field/number-field-increment.astro",
|
|
2566
|
+
"type": "registry:ui"
|
|
2567
|
+
},
|
|
2568
|
+
{
|
|
2569
|
+
"path": "src/components/ui/number-field/number-field-input.astro",
|
|
2570
|
+
"type": "registry:ui"
|
|
2571
|
+
},
|
|
2572
|
+
{
|
|
2573
|
+
"path": "src/components/ui/number-field/index.ts",
|
|
2574
|
+
"type": "registry:ui"
|
|
2575
|
+
}
|
|
2576
|
+
]
|
|
2577
|
+
},
|
|
2578
|
+
{
|
|
2579
|
+
"name": "swatch",
|
|
2580
|
+
"type": "registry:ui",
|
|
2581
|
+
"title": "Swatch",
|
|
2582
|
+
"description": "A color or pattern beside an option or filter value.",
|
|
2583
|
+
"categories": [
|
|
2584
|
+
"ui"
|
|
2585
|
+
],
|
|
2586
|
+
"docs": "https://ui.full.dev/components/swatch/",
|
|
2587
|
+
"files": [
|
|
2588
|
+
{
|
|
2589
|
+
"path": "src/components/ui/swatch/swatch.astro",
|
|
2590
|
+
"type": "registry:ui"
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
"path": "src/components/ui/swatch/index.ts",
|
|
2594
|
+
"type": "registry:ui"
|
|
2595
|
+
}
|
|
2596
|
+
]
|
|
2597
|
+
},
|
|
2516
2598
|
{
|
|
2517
2599
|
"name": "components",
|
|
2518
2600
|
"type": "registry:item",
|
|
@@ -2547,6 +2629,7 @@
|
|
|
2547
2629
|
"@fulldev/header",
|
|
2548
2630
|
"@fulldev/hover-card",
|
|
2549
2631
|
"@fulldev/icon",
|
|
2632
|
+
"@fulldev/image",
|
|
2550
2633
|
"@fulldev/input",
|
|
2551
2634
|
"@fulldev/input-group",
|
|
2552
2635
|
"@fulldev/item",
|
|
@@ -2557,6 +2640,7 @@
|
|
|
2557
2640
|
"@fulldev/marquee",
|
|
2558
2641
|
"@fulldev/native-select",
|
|
2559
2642
|
"@fulldev/navigation-menu",
|
|
2643
|
+
"@fulldev/number-field",
|
|
2560
2644
|
"@fulldev/pagination",
|
|
2561
2645
|
"@fulldev/popover",
|
|
2562
2646
|
"@fulldev/price",
|
|
@@ -2572,6 +2656,7 @@
|
|
|
2572
2656
|
"@fulldev/skeleton",
|
|
2573
2657
|
"@fulldev/slider",
|
|
2574
2658
|
"@fulldev/spinner",
|
|
2659
|
+
"@fulldev/swatch",
|
|
2575
2660
|
"@fulldev/switch",
|
|
2576
2661
|
"@fulldev/table",
|
|
2577
2662
|
"@fulldev/tabs",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Resizable",
|
|
5
5
|
"description": "Accessible panel groups with pointer and keyboard resizing.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/resizable@^1.1.
|
|
7
|
+
"@data-slot/resizable@^1.1.3"
|
|
8
8
|
],
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"path": "src/components/ui/resizable/resizable.astro",
|
|
27
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"resizable\"\n data-direction={direction}\n data-keyboard-resize-by={keyboardResizeBy}\n class={cn(\n \"group/resizable flex h-full w-full data-[direction=vertical]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/resizable\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
27
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"resizable\"\n data-direction={direction}\n data-keyboard-resize-by={keyboardResizeBy}\n class={cn(\n \"group/resizable flex h-full w-full data-[direction=vertical]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/resizable\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:after-swap\", initialize)\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
28
28
|
"type": "registry:ui"
|
|
29
29
|
}
|
|
30
30
|
],
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"title": "Select",
|
|
5
5
|
"description": "Displays a list of options for the user to pick from, triggered by a button.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/select@^1.1.
|
|
7
|
+
"@data-slot/select@^1.1.3",
|
|
8
8
|
"@lucide/astro"
|
|
9
9
|
],
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "src/components/ui/select/select.astro",
|
|
13
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record<string, string> = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /<!--[\\s\\S]*?-->|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `&#${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n<div\n data-slot=\"select\"\n data-mount-strategy={mountStrategy}\n data-default-value={defaultValue}\n data-default-open={defaultOpen}\n data-placeholder={placeholder}\n data-disabled={disabled}\n data-required={required}\n data-name={name}\n data-position={position}\n data-side={side}\n data-align={align}\n data-side-offset={sideOffset}\n data-align-offset={alignOffset}\n data-avoid-collisions={avoidCollisions}\n data-collision-padding={collisionPadding}\n data-highlight-item-on-hover={highlightItemOnHover}\n data-lock-scroll={lockScroll}\n class={cn(\n \"group/select relative inline-flex w-fit flex-col gap-1.5\",\n className\n )}\n {...props}\n>\n <Fragment set:html={content} />\n</div>\n\n<script>\n import { create } from \"@data-slot/select\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
13
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record<string, string> = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /<!--[\\s\\S]*?-->|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `&#${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n<div\n data-slot=\"select\"\n data-mount-strategy={mountStrategy}\n data-default-value={defaultValue}\n data-default-open={defaultOpen}\n data-placeholder={placeholder}\n data-disabled={disabled}\n data-required={required}\n data-name={name}\n data-position={position}\n data-side={side}\n data-align={align}\n data-side-offset={sideOffset}\n data-align-offset={alignOffset}\n data-avoid-collisions={avoidCollisions}\n data-collision-padding={collisionPadding}\n data-highlight-item-on-hover={highlightItemOnHover}\n data-lock-scroll={lockScroll}\n class={cn(\n \"group/select relative inline-flex w-fit flex-col gap-1.5\",\n className\n )}\n {...props}\n>\n <Fragment set:html={content} />\n</div>\n\n<script>\n import { create } from \"@data-slot/select\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:after-swap\", initialize)\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
14
14
|
"type": "registry:ui"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Sheet",
|
|
5
5
|
"description": "A sliding panel component that appears from the edge of the screen.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/dialog@^1.1.
|
|
7
|
+
"@data-slot/dialog@^1.1.3",
|
|
8
8
|
"@lucide/astro"
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
{
|
|
16
16
|
"path": "src/components/ui/sheet/sheet.astro",
|
|
17
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"dialog\"\n class={className}\n data-default-open={defaultOpen}\n data-close-on-click-outside={closeOnClickOutside}\n data-close-on-escape={closeOnEscape}\n data-lock-scroll={lockScroll}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/dialog\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
17
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"dialog\"\n class={className}\n data-default-open={defaultOpen}\n data-close-on-click-outside={closeOnClickOutside}\n data-close-on-escape={closeOnEscape}\n data-lock-scroll={lockScroll}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/dialog\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:after-swap\", initialize)\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
18
18
|
"type": "registry:ui"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"title": "Slider",
|
|
5
5
|
"description": "An input where the user selects a value from within a given range.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/slider@^1.1.
|
|
7
|
+
"@data-slot/slider@^1.1.3"
|
|
8
8
|
],
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "src/components/ui/slider/slider.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n<div\n data-slot=\"slider\"\n data-default-value={serializedDefaultValue}\n data-min={min}\n data-max={max}\n data-step={step}\n data-large-step={largeStep}\n data-orientation={orientation}\n {...orientationAttributes}\n data-thumb-alignment={thumbAlignment}\n data-disabled={disabled ? \"true\" : undefined}\n class={cn(\"data-horizontal:w-full data-vertical:h-full\", className)}\n {...props}\n>\n <div\n data-slot=\"slider-control\"\n data-orientation={orientation}\n {...orientationAttributes}\n data-disabled={disabled ? \"true\" : undefined}\n class=\"data-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:w-auto data-vertical:flex-col\"\n >\n <div\n data-slot=\"slider-track\"\n {...orientationAttributes}\n class=\"bg-input/90 rounded-2xl data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1 relative grow overflow-hidden select-none\"\n >\n <div\n data-slot=\"slider-range\"\n {...orientationAttributes}\n class=\"bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n ></div>\n </div>\n {Array.from({ length: thumbCount }).map(() => (\n <div\n data-slot=\"slider-thumb\"\n class=\"ring-black/10 not-dark:bg-clip-padding ring-1 size-4 rounded-2xl bg-white shadow-md transition-[color,box-shadow] duration-200 hover:ring-4 hover:ring-ring/30 focus-visible:ring-4 focus-visible:ring-ring/30 focus-visible:outline-hidden block shrink-0 select-none data-disabled:pointer-events-none data-disabled:opacity-50\"\n />\n ))}\n </div>\n</div>\n\n<script>\n import { create } from \"@data-slot/slider\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
12
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n<div\n data-slot=\"slider\"\n data-default-value={serializedDefaultValue}\n data-min={min}\n data-max={max}\n data-step={step}\n data-large-step={largeStep}\n data-orientation={orientation}\n {...orientationAttributes}\n data-thumb-alignment={thumbAlignment}\n data-disabled={disabled ? \"true\" : undefined}\n class={cn(\"data-horizontal:w-full data-vertical:h-full\", className)}\n {...props}\n>\n <div\n data-slot=\"slider-control\"\n data-orientation={orientation}\n {...orientationAttributes}\n data-disabled={disabled ? \"true\" : undefined}\n class=\"data-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:w-auto data-vertical:flex-col\"\n >\n <div\n data-slot=\"slider-track\"\n {...orientationAttributes}\n class=\"bg-input/90 rounded-2xl data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1 relative grow overflow-hidden select-none\"\n >\n <div\n data-slot=\"slider-range\"\n {...orientationAttributes}\n class=\"bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n ></div>\n </div>\n {Array.from({ length: thumbCount }).map(() => (\n <div\n data-slot=\"slider-thumb\"\n class=\"ring-black/10 not-dark:bg-clip-padding ring-1 size-4 rounded-2xl bg-white shadow-md transition-[color,box-shadow] duration-200 hover:ring-4 hover:ring-ring/30 focus-visible:ring-4 focus-visible:ring-ring/30 focus-visible:outline-hidden block shrink-0 select-none data-disabled:pointer-events-none data-disabled:opacity-50\"\n />\n ))}\n </div>\n</div>\n\n<script>\n import { create } from \"@data-slot/slider\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:after-swap\", initialize)\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
13
13
|
"type": "registry:ui"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "swatch",
|
|
4
|
+
"title": "Swatch",
|
|
5
|
+
"description": "A color or pattern beside an option or filter value.",
|
|
6
|
+
"files": [
|
|
7
|
+
{
|
|
8
|
+
"path": "src/components/ui/swatch/swatch.astro",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\"> & {\n color?: string\n image?: string\n}\n\nconst { class: className, color, image, style, ...props } = Astro.props\n\nconst background = {\n \"background-color\": color,\n \"background-image\": image ? `url(${JSON.stringify(image)})` : undefined,\n}\nconst backgroundText = Object.entries(background)\n .filter(([, value]) => value)\n .map(([property, value]) => `${property}: ${value}`)\n .join(\"; \")\n---\n\n<span\n data-slot=\"swatch\"\n aria-hidden=\"true\"\n class={cn(\n \"rounded-full ring-1 ring-foreground/15 ring-inset inline-block size-4 shrink-0 bg-cover bg-center\",\n className\n )}\n style={\n typeof style === \"string\"\n ? [backgroundText, style].filter(Boolean).join(\"; \")\n : { ...background, ...style }\n }\n {...props}\n/>\n",
|
|
10
|
+
"type": "registry:ui"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"path": "src/components/ui/swatch/index.ts",
|
|
14
|
+
"content": "export { default as Swatch } from \"./swatch.astro\"\n",
|
|
15
|
+
"type": "registry:ui"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"docs": "https://ui.full.dev/components/swatch/",
|
|
19
|
+
"categories": [
|
|
20
|
+
"ui"
|
|
21
|
+
],
|
|
22
|
+
"type": "registry:ui"
|
|
23
|
+
}
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"title": "Switch",
|
|
5
5
|
"description": "A control that switches a setting on or off.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/switch@^1.1.
|
|
7
|
+
"@data-slot/switch@^1.1.3"
|
|
8
8
|
],
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "src/components/ui/switch/switch.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input/90 data-checked:border-primary border-2 data-unchecked:border-transparent focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 shrink-0 rounded-2xl focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:data-unchecked:border-transparent group-has-[:focus-visible]/field-label:data-checked:border-primary data-[size=default]:h-5 data-[size=default]:w-8 data-[size=sm]:h-4 data-[size=sm]:w-6 peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n<button\n type=\"button\"\n role=\"switch\"\n disabled={disabled}\n aria-checked={initialChecked ? \"true\" : \"false\"}\n aria-disabled={disabled ? \"true\" : undefined}\n aria-readonly={readOnly ? \"true\" : undefined}\n aria-required={required ? \"true\" : undefined}\n data-slot=\"switch\"\n data-size={size}\n data-checked={initialChecked ? \"\" : undefined}\n data-unchecked={initialChecked ? undefined : \"\"}\n data-default-checked={defaultChecked}\n data-disabled={disabled ? \"true\" : undefined}\n data-read-only={readOnly}\n data-readonly={readOnly ? \"\" : undefined}\n data-required={required}\n data-name={name}\n data-value={value}\n data-unchecked-value={uncheckedValue}\n class={cn(switchStyle, className)}\n {...props}\n>\n <span\n aria-hidden=\"true\"\n data-slot=\"switch-thumb\"\n data-checked={initialChecked ? \"\" : undefined}\n data-unchecked={initialChecked ? undefined : \"\"}\n class=\"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-2xl shadow-sm group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-checked:translate-x-[calc(100%-4px)] data-unchecked:translate-x-0 not-dark:bg-clip-padding pointer-events-none block ring-0 transition-transform\"\n ></span>\n</button>\n\n<script>\n import { create } from \"@data-slot/switch\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
12
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input/90 data-checked:border-primary border-2 data-unchecked:border-transparent focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 shrink-0 rounded-2xl focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:data-unchecked:border-transparent group-has-[:focus-visible]/field-label:data-checked:border-primary data-[size=default]:h-5 data-[size=default]:w-8 data-[size=sm]:h-4 data-[size=sm]:w-6 peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n<button\n type=\"button\"\n role=\"switch\"\n disabled={disabled}\n aria-checked={initialChecked ? \"true\" : \"false\"}\n aria-disabled={disabled ? \"true\" : undefined}\n aria-readonly={readOnly ? \"true\" : undefined}\n aria-required={required ? \"true\" : undefined}\n data-slot=\"switch\"\n data-size={size}\n data-checked={initialChecked ? \"\" : undefined}\n data-unchecked={initialChecked ? undefined : \"\"}\n data-default-checked={defaultChecked}\n data-disabled={disabled ? \"true\" : undefined}\n data-read-only={readOnly}\n data-readonly={readOnly ? \"\" : undefined}\n data-required={required}\n data-name={name}\n data-value={value}\n data-unchecked-value={uncheckedValue}\n class={cn(switchStyle, className)}\n {...props}\n>\n <span\n aria-hidden=\"true\"\n data-slot=\"switch-thumb\"\n data-checked={initialChecked ? \"\" : undefined}\n data-unchecked={initialChecked ? undefined : \"\"}\n class=\"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-2xl shadow-sm group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-checked:translate-x-[calc(100%-4px)] data-unchecked:translate-x-0 not-dark:bg-clip-padding pointer-events-none block ring-0 transition-transform\"\n ></span>\n</button>\n\n<script>\n import { create } from \"@data-slot/switch\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:after-swap\", initialize)\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
13
13
|
"type": "registry:ui"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"title": "Tabs",
|
|
5
5
|
"description": "A set of layered sections of content, known as tabs, that display one panel of content at a time.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/tabs@^1.1.
|
|
7
|
+
"@data-slot/tabs@^1.1.3"
|
|
8
8
|
],
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "src/components/ui/tabs/tabs.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record<string, string> = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /<!--[\\s\\S]*?-->|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n<div\n data-slot=\"tabs\"\n data-default-value={defaultValue}\n data-orientation={orientation}\n data-activation-mode={activationMode}\n data-horizontal={orientation === \"horizontal\" ? \"\" : undefined}\n data-vertical={orientation === \"vertical\" ? \"\" : undefined}\n class={cn(\"gap-2 group/tabs flex data-horizontal:flex-col\", className)}\n {...props}\n>\n <Fragment set:html={content} />\n</div>\n\n<script>\n import { create } from \"@data-slot/tabs\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
12
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record<string, string> = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /<!--[\\s\\S]*?-->|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n<div\n data-slot=\"tabs\"\n data-default-value={defaultValue}\n data-orientation={orientation}\n data-activation-mode={activationMode}\n data-horizontal={orientation === \"horizontal\" ? \"\" : undefined}\n data-vertical={orientation === \"vertical\" ? \"\" : undefined}\n class={cn(\"gap-2 group/tabs flex data-horizontal:flex-col\", className)}\n {...props}\n>\n <Fragment set:html={content} />\n</div>\n\n<script>\n import { create } from \"@data-slot/tabs\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:after-swap\", initialize)\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
13
13
|
"type": "registry:ui"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Toast",
|
|
5
5
|
"description": "A brief notification that appears without interrupting the user.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/toast@^1.1.
|
|
7
|
+
"@data-slot/toast@^1.1.3",
|
|
8
8
|
"@lucide/astro"
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"path": "src/components/ui/toast/toast.astro",
|
|
66
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"toast\"\n data-limit={limit}\n data-duration={duration}\n data-position={position}\n data-pause-on-hover={pauseOnHover}\n data-pause-on-focus={pauseOnFocus}\n data-portal={portal}\n class={className}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/toast\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
66
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"toast\"\n data-limit={limit}\n data-duration={duration}\n data-position={position}\n data-pause-on-hover={pauseOnHover}\n data-pause-on-focus={pauseOnFocus}\n data-portal={portal}\n class={className}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/toast\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:after-swap\", initialize)\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
67
67
|
"type": "registry:ui"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Toggle Group",
|
|
5
5
|
"description": "A set of two-state buttons that can be toggled independently or as a single choice.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/toggle-group@^1.1.
|
|
7
|
+
"@data-slot/toggle-group@^1.1.3"
|
|
8
8
|
],
|
|
9
9
|
"registryDependencies": [
|
|
10
10
|
"@fulldev/toggle"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"path": "src/components/ui/toggle-group/toggle-group.astro",
|
|
25
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n<div\n role=\"group\"\n data-slot=\"toggle-group\"\n data-default-value={serializedDefaultValue}\n data-multiple={multiple ? \"\" : undefined}\n data-orientation={orientation}\n data-horizontal={orientation === \"horizontal\" ? \"\" : undefined}\n data-vertical={orientation === \"vertical\" ? \"\" : undefined}\n data-loop={loop}\n data-disabled={disabled ? \"\" : undefined}\n data-variant={variant}\n data-size={size}\n data-spacing={spacing}\n style={resolvedStyle}\n class={cn(\n \"data-[spacing=0]:data-[variant=outline]:rounded-2xl group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-vertical:flex-col data-vertical:items-stretch [&[data-orientation=horizontal][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/toggle-group\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
25
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n<div\n role=\"group\"\n data-slot=\"toggle-group\"\n data-default-value={serializedDefaultValue}\n data-multiple={multiple ? \"\" : undefined}\n data-orientation={orientation}\n data-horizontal={orientation === \"horizontal\" ? \"\" : undefined}\n data-vertical={orientation === \"vertical\" ? \"\" : undefined}\n data-loop={loop}\n data-disabled={disabled ? \"\" : undefined}\n data-variant={variant}\n data-size={size}\n data-spacing={spacing}\n style={resolvedStyle}\n class={cn(\n \"data-[spacing=0]:data-[variant=outline]:rounded-2xl group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-vertical:flex-col data-vertical:items-stretch [&[data-orientation=horizontal][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/toggle-group\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:after-swap\", initialize)\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
26
26
|
"type": "registry:ui"
|
|
27
27
|
}
|
|
28
28
|
],
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"title": "Toggle",
|
|
5
5
|
"description": "A two-state button that can be either on or off.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/toggle@^1.1.
|
|
7
|
+
"@data-slot/toggle@^1.1.3"
|
|
8
8
|
],
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "src/components/ui/toggle/toggle.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n<button\n data-slot=\"toggle\"\n data-default-pressed={defaultPressed}\n data-disabled={disabled}\n type={type}\n disabled={disabled}\n aria-pressed={defaultPressed === true ? \"true\" : \"false\"}\n class={cn(toggleVariants({ variant, size }), className)}\n {...props}\n>\n <slot />\n</button>\n\n<script>\n import { create } from \"@data-slot/toggle\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
12
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n<button\n data-slot=\"toggle\"\n data-default-pressed={defaultPressed}\n data-disabled={disabled}\n type={type}\n disabled={disabled}\n aria-pressed={defaultPressed === true ? \"true\" : \"false\"}\n class={cn(toggleVariants({ variant, size }), className)}\n {...props}\n>\n <slot />\n</button>\n\n<script>\n import { create } from \"@data-slot/toggle\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:after-swap\", initialize)\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
13
13
|
"type": "registry:ui"
|
|
14
14
|
},
|
|
15
15
|
{
|