@sewadah/selaras 0.1.1
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/LICENSE +21 -0
- package/README.md +131 -0
- package/dist/module.d.mts +22 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +127 -0
- package/dist/runtime/components/Accordion.d.vue.ts +59 -0
- package/dist/runtime/components/Accordion.vue +65 -0
- package/dist/runtime/components/Accordion.vue.d.ts +59 -0
- package/dist/runtime/components/Alert.d.vue.ts +39 -0
- package/dist/runtime/components/Alert.vue +64 -0
- package/dist/runtime/components/Alert.vue.d.ts +39 -0
- package/dist/runtime/components/AlertDialog.d.vue.ts +66 -0
- package/dist/runtime/components/AlertDialog.vue +116 -0
- package/dist/runtime/components/AlertDialog.vue.d.ts +66 -0
- package/dist/runtime/components/App.d.vue.ts +32 -0
- package/dist/runtime/components/App.vue +26 -0
- package/dist/runtime/components/App.vue.d.ts +32 -0
- package/dist/runtime/components/Autocomplete.d.vue.ts +61 -0
- package/dist/runtime/components/Autocomplete.vue +41 -0
- package/dist/runtime/components/Autocomplete.vue.d.ts +61 -0
- package/dist/runtime/components/Avatar.d.vue.ts +46 -0
- package/dist/runtime/components/Avatar.vue +64 -0
- package/dist/runtime/components/Avatar.vue.d.ts +46 -0
- package/dist/runtime/components/AvatarGroup.d.vue.ts +14 -0
- package/dist/runtime/components/AvatarGroup.vue +41 -0
- package/dist/runtime/components/AvatarGroup.vue.d.ts +14 -0
- package/dist/runtime/components/Badge.d.vue.ts +37 -0
- package/dist/runtime/components/Badge.vue +47 -0
- package/dist/runtime/components/Badge.vue.d.ts +37 -0
- package/dist/runtime/components/Breadcrumb.d.vue.ts +37 -0
- package/dist/runtime/components/Breadcrumb.vue +109 -0
- package/dist/runtime/components/Breadcrumb.vue.d.ts +37 -0
- package/dist/runtime/components/Button.d.vue.ts +45 -0
- package/dist/runtime/components/Button.vue +67 -0
- package/dist/runtime/components/Button.vue.d.ts +45 -0
- package/dist/runtime/components/ButtonGroup.d.vue.ts +22 -0
- package/dist/runtime/components/ButtonGroup.vue +21 -0
- package/dist/runtime/components/ButtonGroup.vue.d.ts +22 -0
- package/dist/runtime/components/Callout.d.vue.ts +27 -0
- package/dist/runtime/components/Callout.vue +47 -0
- package/dist/runtime/components/Callout.vue.d.ts +27 -0
- package/dist/runtime/components/Card.d.vue.ts +25 -0
- package/dist/runtime/components/Card.vue +30 -0
- package/dist/runtime/components/Card.vue.d.ts +25 -0
- package/dist/runtime/components/CardGroup.d.vue.ts +23 -0
- package/dist/runtime/components/CardGroup.vue +19 -0
- package/dist/runtime/components/CardGroup.vue.d.ts +23 -0
- package/dist/runtime/components/Checkbox.d.vue.ts +45 -0
- package/dist/runtime/components/Checkbox.vue +76 -0
- package/dist/runtime/components/Checkbox.vue.d.ts +45 -0
- package/dist/runtime/components/Chip.d.vue.ts +50 -0
- package/dist/runtime/components/Chip.vue +75 -0
- package/dist/runtime/components/Chip.vue.d.ts +50 -0
- package/dist/runtime/components/CodeButton.d.vue.ts +21 -0
- package/dist/runtime/components/CodeButton.vue +33 -0
- package/dist/runtime/components/CodeButton.vue.d.ts +21 -0
- package/dist/runtime/components/CodeGroup.d.vue.ts +3 -0
- package/dist/runtime/components/CodeGroup.vue +46 -0
- package/dist/runtime/components/CodeGroup.vue.d.ts +3 -0
- package/dist/runtime/components/CodeTree.d.vue.ts +17 -0
- package/dist/runtime/components/CodeTree.vue +56 -0
- package/dist/runtime/components/CodeTree.vue.d.ts +17 -0
- package/dist/runtime/components/Collapsible.d.vue.ts +44 -0
- package/dist/runtime/components/Collapsible.vue +52 -0
- package/dist/runtime/components/Collapsible.vue.d.ts +44 -0
- package/dist/runtime/components/ColorModeToggle.d.vue.ts +3 -0
- package/dist/runtime/components/ColorModeToggle.vue +24 -0
- package/dist/runtime/components/ColorModeToggle.vue.d.ts +3 -0
- package/dist/runtime/components/ColorPicker.d.vue.ts +30 -0
- package/dist/runtime/components/ColorPicker.vue +112 -0
- package/dist/runtime/components/ColorPicker.vue.d.ts +30 -0
- package/dist/runtime/components/Column.d.ts +72 -0
- package/dist/runtime/components/Column.js +34 -0
- package/dist/runtime/components/ColumnGroup.d.ts +33 -0
- package/dist/runtime/components/ColumnGroup.js +17 -0
- package/dist/runtime/components/CommandPalette.d.vue.ts +41 -0
- package/dist/runtime/components/CommandPalette.vue +208 -0
- package/dist/runtime/components/CommandPalette.vue.d.ts +41 -0
- package/dist/runtime/components/Container.d.vue.ts +22 -0
- package/dist/runtime/components/Container.vue +21 -0
- package/dist/runtime/components/Container.vue.d.ts +22 -0
- package/dist/runtime/components/ContentNavigation.d.vue.ts +31 -0
- package/dist/runtime/components/ContentNavigation.vue +64 -0
- package/dist/runtime/components/ContentNavigation.vue.d.ts +31 -0
- package/dist/runtime/components/ContentSurround.d.vue.ts +16 -0
- package/dist/runtime/components/ContentSurround.vue +46 -0
- package/dist/runtime/components/ContentSurround.vue.d.ts +16 -0
- package/dist/runtime/components/ContentToc.d.vue.ts +35 -0
- package/dist/runtime/components/ContentToc.vue +265 -0
- package/dist/runtime/components/ContentToc.vue.d.ts +35 -0
- package/dist/runtime/components/ContextMenu.d.vue.ts +33 -0
- package/dist/runtime/components/ContextMenu.vue +49 -0
- package/dist/runtime/components/ContextMenu.vue.d.ts +33 -0
- package/dist/runtime/components/DashboardGroup.d.vue.ts +24 -0
- package/dist/runtime/components/DashboardGroup.vue +52 -0
- package/dist/runtime/components/DashboardGroup.vue.d.ts +24 -0
- package/dist/runtime/components/DashboardNavbar.d.vue.ts +23 -0
- package/dist/runtime/components/DashboardNavbar.vue +33 -0
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +23 -0
- package/dist/runtime/components/DashboardPanel.d.vue.ts +22 -0
- package/dist/runtime/components/DashboardPanel.vue +26 -0
- package/dist/runtime/components/DashboardPanel.vue.d.ts +22 -0
- package/dist/runtime/components/DashboardResizeHandle.d.vue.ts +8 -0
- package/dist/runtime/components/DashboardResizeHandle.vue +19 -0
- package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +8 -0
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +40 -0
- package/dist/runtime/components/DashboardSidebar.vue +117 -0
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +40 -0
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +21 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue +42 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +21 -0
- package/dist/runtime/components/DatePicker.d.vue.ts +165 -0
- package/dist/runtime/components/DatePicker.vue +796 -0
- package/dist/runtime/components/DatePicker.vue.d.ts +165 -0
- package/dist/runtime/components/Drawer.d.vue.ts +74 -0
- package/dist/runtime/components/Drawer.vue +157 -0
- package/dist/runtime/components/Drawer.vue.d.ts +74 -0
- package/dist/runtime/components/DrawerRenderer.d.vue.ts +3 -0
- package/dist/runtime/components/DrawerRenderer.vue +30 -0
- package/dist/runtime/components/DrawerRenderer.vue.d.ts +3 -0
- package/dist/runtime/components/Dropdown.d.vue.ts +35 -0
- package/dist/runtime/components/Dropdown.vue +51 -0
- package/dist/runtime/components/Dropdown.vue.d.ts +35 -0
- package/dist/runtime/components/FileTree.d.vue.ts +28 -0
- package/dist/runtime/components/FileTree.vue +68 -0
- package/dist/runtime/components/FileTree.vue.d.ts +28 -0
- package/dist/runtime/components/FileUpload.d.vue.ts +68 -0
- package/dist/runtime/components/FileUpload.vue +226 -0
- package/dist/runtime/components/FileUpload.vue.d.ts +68 -0
- package/dist/runtime/components/FormField.d.vue.ts +37 -0
- package/dist/runtime/components/FormField.vue +72 -0
- package/dist/runtime/components/FormField.vue.d.ts +37 -0
- package/dist/runtime/components/Header.d.vue.ts +20 -0
- package/dist/runtime/components/Header.vue +23 -0
- package/dist/runtime/components/Header.vue.d.ts +20 -0
- package/dist/runtime/components/Icon.d.vue.ts +14 -0
- package/dist/runtime/components/Icon.vue +18 -0
- package/dist/runtime/components/Icon.vue.d.ts +14 -0
- package/dist/runtime/components/Input.d.vue.ts +41 -0
- package/dist/runtime/components/Input.vue +86 -0
- package/dist/runtime/components/Input.vue.d.ts +41 -0
- package/dist/runtime/components/InputGroup.d.vue.ts +22 -0
- package/dist/runtime/components/InputGroup.vue +21 -0
- package/dist/runtime/components/InputGroup.vue.d.ts +22 -0
- package/dist/runtime/components/InputNumber.d.vue.ts +37 -0
- package/dist/runtime/components/InputNumber.vue +173 -0
- package/dist/runtime/components/InputNumber.vue.d.ts +37 -0
- package/dist/runtime/components/Kbd.d.vue.ts +24 -0
- package/dist/runtime/components/Kbd.vue +42 -0
- package/dist/runtime/components/Kbd.vue.d.ts +24 -0
- package/dist/runtime/components/Modal.d.vue.ts +72 -0
- package/dist/runtime/components/Modal.vue +178 -0
- package/dist/runtime/components/Modal.vue.d.ts +72 -0
- package/dist/runtime/components/ModalRenderer.d.vue.ts +3 -0
- package/dist/runtime/components/ModalRenderer.vue +25 -0
- package/dist/runtime/components/ModalRenderer.vue.d.ts +3 -0
- package/dist/runtime/components/NavigationMenu.d.vue.ts +108 -0
- package/dist/runtime/components/NavigationMenu.vue +166 -0
- package/dist/runtime/components/NavigationMenu.vue.d.ts +108 -0
- package/dist/runtime/components/NavigationMenuAccordionItem.d.vue.ts +23 -0
- package/dist/runtime/components/NavigationMenuAccordionItem.vue +106 -0
- package/dist/runtime/components/NavigationMenuAccordionItem.vue.d.ts +23 -0
- package/dist/runtime/components/NavigationMenuFlyoutList.d.vue.ts +19 -0
- package/dist/runtime/components/NavigationMenuFlyoutList.vue +44 -0
- package/dist/runtime/components/NavigationMenuFlyoutList.vue.d.ts +19 -0
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.d.vue.ts +49 -0
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue +116 -0
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue.d.ts +49 -0
- package/dist/runtime/components/PageAside.d.vue.ts +20 -0
- package/dist/runtime/components/PageAside.vue +26 -0
- package/dist/runtime/components/PageAside.vue.d.ts +20 -0
- package/dist/runtime/components/PageHeader.d.vue.ts +24 -0
- package/dist/runtime/components/PageHeader.vue +30 -0
- package/dist/runtime/components/PageHeader.vue.d.ts +24 -0
- package/dist/runtime/components/Pagination.d.vue.ts +42 -0
- package/dist/runtime/components/Pagination.vue +113 -0
- package/dist/runtime/components/Pagination.vue.d.ts +42 -0
- package/dist/runtime/components/PinInput.d.vue.ts +40 -0
- package/dist/runtime/components/PinInput.vue +66 -0
- package/dist/runtime/components/PinInput.vue.d.ts +40 -0
- package/dist/runtime/components/Popover.d.vue.ts +52 -0
- package/dist/runtime/components/Popover.vue +77 -0
- package/dist/runtime/components/Popover.vue.d.ts +52 -0
- package/dist/runtime/components/Progress.d.vue.ts +32 -0
- package/dist/runtime/components/Progress.vue +76 -0
- package/dist/runtime/components/Progress.vue.d.ts +32 -0
- package/dist/runtime/components/ProseH1.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH1.vue +21 -0
- package/dist/runtime/components/ProseH1.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH2.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH2.vue +21 -0
- package/dist/runtime/components/ProseH2.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH3.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH3.vue +21 -0
- package/dist/runtime/components/ProseH3.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH4.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH4.vue +21 -0
- package/dist/runtime/components/ProseH4.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH5.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH5.vue +21 -0
- package/dist/runtime/components/ProseH5.vue.d.ts +18 -0
- package/dist/runtime/components/ProseH6.d.vue.ts +18 -0
- package/dist/runtime/components/ProseH6.vue +21 -0
- package/dist/runtime/components/ProseH6.vue.d.ts +18 -0
- package/dist/runtime/components/ProsePre.d.vue.ts +20 -0
- package/dist/runtime/components/ProsePre.vue +50 -0
- package/dist/runtime/components/ProsePre.vue.d.ts +20 -0
- package/dist/runtime/components/RadioGroup.d.vue.ts +50 -0
- package/dist/runtime/components/RadioGroup.vue +82 -0
- package/dist/runtime/components/RadioGroup.vue.d.ts +50 -0
- package/dist/runtime/components/Rating.d.vue.ts +36 -0
- package/dist/runtime/components/Rating.vue +83 -0
- package/dist/runtime/components/Rating.vue.d.ts +36 -0
- package/dist/runtime/components/ReadMore.d.vue.ts +20 -0
- package/dist/runtime/components/ReadMore.vue +59 -0
- package/dist/runtime/components/ReadMore.vue.d.ts +20 -0
- package/dist/runtime/components/ScrollArea.d.vue.ts +19 -0
- package/dist/runtime/components/ScrollArea.vue +37 -0
- package/dist/runtime/components/ScrollArea.vue.d.ts +19 -0
- package/dist/runtime/components/Select.d.vue.ts +60 -0
- package/dist/runtime/components/Select.vue +40 -0
- package/dist/runtime/components/Select.vue.d.ts +60 -0
- package/dist/runtime/components/Separator.d.vue.ts +27 -0
- package/dist/runtime/components/Separator.vue +36 -0
- package/dist/runtime/components/Separator.vue.d.ts +27 -0
- package/dist/runtime/components/Skeleton.d.vue.ts +13 -0
- package/dist/runtime/components/Skeleton.vue +17 -0
- package/dist/runtime/components/Skeleton.vue.d.ts +13 -0
- package/dist/runtime/components/Slideover.d.vue.ts +65 -0
- package/dist/runtime/components/Slideover.vue +140 -0
- package/dist/runtime/components/Slideover.vue.d.ts +65 -0
- package/dist/runtime/components/SlideoverRenderer.d.vue.ts +3 -0
- package/dist/runtime/components/SlideoverRenderer.vue +27 -0
- package/dist/runtime/components/SlideoverRenderer.vue.d.ts +3 -0
- package/dist/runtime/components/Slider.d.vue.ts +60 -0
- package/dist/runtime/components/Slider.vue +186 -0
- package/dist/runtime/components/Slider.vue.d.ts +60 -0
- package/dist/runtime/components/Splitter.d.vue.ts +41 -0
- package/dist/runtime/components/Splitter.vue +31 -0
- package/dist/runtime/components/Splitter.vue.d.ts +41 -0
- package/dist/runtime/components/SplitterPanel.d.vue.ts +55 -0
- package/dist/runtime/components/SplitterPanel.vue +52 -0
- package/dist/runtime/components/SplitterPanel.vue.d.ts +55 -0
- package/dist/runtime/components/SplitterResizeHandle.d.vue.ts +14 -0
- package/dist/runtime/components/SplitterResizeHandle.vue +22 -0
- package/dist/runtime/components/SplitterResizeHandle.vue.d.ts +14 -0
- package/dist/runtime/components/Stepper.d.vue.ts +57 -0
- package/dist/runtime/components/Stepper.vue +101 -0
- package/dist/runtime/components/Stepper.vue.d.ts +57 -0
- package/dist/runtime/components/Switch.d.vue.ts +49 -0
- package/dist/runtime/components/Switch.vue +73 -0
- package/dist/runtime/components/Switch.vue.d.ts +49 -0
- package/dist/runtime/components/Table.d.vue.ts +83 -0
- package/dist/runtime/components/Table.vue +339 -0
- package/dist/runtime/components/Table.vue.d.ts +83 -0
- package/dist/runtime/components/Tabs.d.vue.ts +43 -0
- package/dist/runtime/components/Tabs.vue +60 -0
- package/dist/runtime/components/Tabs.vue.d.ts +43 -0
- package/dist/runtime/components/Textarea.d.vue.ts +45 -0
- package/dist/runtime/components/Textarea.vue +110 -0
- package/dist/runtime/components/Textarea.vue.d.ts +45 -0
- package/dist/runtime/components/Theme.d.vue.ts +19 -0
- package/dist/runtime/components/Theme.vue +18 -0
- package/dist/runtime/components/Theme.vue.d.ts +19 -0
- package/dist/runtime/components/Toast.d.vue.ts +8 -0
- package/dist/runtime/components/Toast.vue +58 -0
- package/dist/runtime/components/Toast.vue.d.ts +8 -0
- package/dist/runtime/components/Toggle.d.vue.ts +38 -0
- package/dist/runtime/components/Toggle.vue +44 -0
- package/dist/runtime/components/Toggle.vue.d.ts +38 -0
- package/dist/runtime/components/ToggleGroup.d.vue.ts +48 -0
- package/dist/runtime/components/ToggleGroup.vue +61 -0
- package/dist/runtime/components/ToggleGroup.vue.d.ts +48 -0
- package/dist/runtime/components/Tooltip.d.vue.ts +28 -0
- package/dist/runtime/components/Tooltip.vue +40 -0
- package/dist/runtime/components/Tooltip.vue.d.ts +28 -0
- package/dist/runtime/components/Tree.d.vue.ts +64 -0
- package/dist/runtime/components/Tree.vue +139 -0
- package/dist/runtime/components/Tree.vue.d.ts +64 -0
- package/dist/runtime/composables/use-combobox-select.d.ts +45 -0
- package/dist/runtime/composables/use-combobox-select.js +80 -0
- package/dist/runtime/composables/use-command-palette.d.ts +8 -0
- package/dist/runtime/composables/use-command-palette.js +14 -0
- package/dist/runtime/composables/use-drawer.d.ts +42 -0
- package/dist/runtime/composables/use-drawer.js +44 -0
- package/dist/runtime/composables/use-form-field.d.ts +10 -0
- package/dist/runtime/composables/use-form-field.js +8 -0
- package/dist/runtime/composables/use-icons.d.ts +10 -0
- package/dist/runtime/composables/use-icons.js +7 -0
- package/dist/runtime/composables/use-locale.d.ts +12 -0
- package/dist/runtime/composables/use-locale.js +6 -0
- package/dist/runtime/composables/use-media-query.d.ts +11 -0
- package/dist/runtime/composables/use-media-query.js +15 -0
- package/dist/runtime/composables/use-messages.d.ts +12 -0
- package/dist/runtime/composables/use-messages.js +7 -0
- package/dist/runtime/composables/use-modal.d.ts +32 -0
- package/dist/runtime/composables/use-modal.js +39 -0
- package/dist/runtime/composables/use-ripple.d.ts +15 -0
- package/dist/runtime/composables/use-ripple.js +6 -0
- package/dist/runtime/composables/use-slideover.d.ts +36 -0
- package/dist/runtime/composables/use-slideover.js +41 -0
- package/dist/runtime/composables/use-table.d.ts +63 -0
- package/dist/runtime/composables/use-table.js +142 -0
- package/dist/runtime/composables/use-toast.d.ts +15 -0
- package/dist/runtime/composables/use-toast.js +16 -0
- package/dist/runtime/directives/index.d.ts +1 -0
- package/dist/runtime/directives/index.js +1 -0
- package/dist/runtime/directives/ripple.d.ts +16 -0
- package/dist/runtime/directives/ripple.js +80 -0
- package/dist/runtime/internal/ColorPickerBody.d.vue.ts +26 -0
- package/dist/runtime/internal/ColorPickerBody.vue +111 -0
- package/dist/runtime/internal/ColorPickerBody.vue.d.ts +26 -0
- package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +122 -0
- package/dist/runtime/internal/ComboboxSelectBase.vue +590 -0
- package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +122 -0
- package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +71 -0
- package/dist/runtime/internal/ComboboxSelectBody.vue +146 -0
- package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +71 -0
- package/dist/runtime/internal/DatePickerCalendarBody.d.vue.ts +71 -0
- package/dist/runtime/internal/DatePickerCalendarBody.vue +215 -0
- package/dist/runtime/internal/DatePickerCalendarBody.vue.d.ts +71 -0
- package/dist/runtime/internal/DatePickerRangeCalendarBody.d.vue.ts +37 -0
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +96 -0
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue.d.ts +37 -0
- package/dist/runtime/internal/DatePickerTimeBody.d.vue.ts +33 -0
- package/dist/runtime/internal/DatePickerTimeBody.vue +53 -0
- package/dist/runtime/internal/DatePickerTimeBody.vue.d.ts +33 -0
- package/dist/runtime/internal/TimeStepper.d.vue.ts +28 -0
- package/dist/runtime/internal/TimeStepper.vue +99 -0
- package/dist/runtime/internal/TimeStepper.vue.d.ts +28 -0
- package/dist/runtime/prose.css +1 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/theme/accordion.d.ts +131 -0
- package/dist/runtime/theme/accordion.js +60 -0
- package/dist/runtime/theme/alert-dialog.d.ts +50 -0
- package/dist/runtime/theme/alert-dialog.js +30 -0
- package/dist/runtime/theme/alert.d.ts +62 -0
- package/dist/runtime/theme/alert.js +52 -0
- package/dist/runtime/theme/avatar-group.d.ts +59 -0
- package/dist/runtime/theme/avatar-group.js +18 -0
- package/dist/runtime/theme/avatar.d.ts +206 -0
- package/dist/runtime/theme/avatar.js +67 -0
- package/dist/runtime/theme/badge.d.ts +140 -0
- package/dist/runtime/theme/badge.js +90 -0
- package/dist/runtime/theme/breadcrumb.d.ts +86 -0
- package/dist/runtime/theme/breadcrumb.js +22 -0
- package/dist/runtime/theme/button-group.d.ts +53 -0
- package/dist/runtime/theme/button-group.js +21 -0
- package/dist/runtime/theme/button.d.ts +155 -0
- package/dist/runtime/theme/button.js +99 -0
- package/dist/runtime/theme/callout.d.ts +74 -0
- package/dist/runtime/theme/callout.js +23 -0
- package/dist/runtime/theme/card-group.d.ts +44 -0
- package/dist/runtime/theme/card-group.js +19 -0
- package/dist/runtime/theme/card.d.ts +62 -0
- package/dist/runtime/theme/card.js +23 -0
- package/dist/runtime/theme/checkbox.d.ts +218 -0
- package/dist/runtime/theme/checkbox.js +113 -0
- package/dist/runtime/theme/chip.d.ts +155 -0
- package/dist/runtime/theme/chip.js +86 -0
- package/dist/runtime/theme/code-button.d.ts +32 -0
- package/dist/runtime/theme/code-button.js +7 -0
- package/dist/runtime/theme/code-tree.d.ts +50 -0
- package/dist/runtime/theme/code-tree.js +13 -0
- package/dist/runtime/theme/collapsible.d.ts +95 -0
- package/dist/runtime/theme/collapsible.js +46 -0
- package/dist/runtime/theme/color-picker.d.ts +152 -0
- package/dist/runtime/theme/color-picker.js +83 -0
- package/dist/runtime/theme/command-palette.d.ts +110 -0
- package/dist/runtime/theme/command-palette.js +23 -0
- package/dist/runtime/theme/container.d.ts +62 -0
- package/dist/runtime/theme/container.js +18 -0
- package/dist/runtime/theme/content-navigation.d.ts +47 -0
- package/dist/runtime/theme/content-navigation.js +38 -0
- package/dist/runtime/theme/content-surround.d.ts +53 -0
- package/dist/runtime/theme/content-surround.js +22 -0
- package/dist/runtime/theme/content-toc.d.ts +56 -0
- package/dist/runtime/theme/content-toc.js +41 -0
- package/dist/runtime/theme/context-menu.d.ts +38 -0
- package/dist/runtime/theme/context-menu.js +21 -0
- package/dist/runtime/theme/dashboard-group.d.ts +26 -0
- package/dist/runtime/theme/dashboard-group.js +9 -0
- package/dist/runtime/theme/dashboard-navbar.d.ts +44 -0
- package/dist/runtime/theme/dashboard-navbar.js +9 -0
- package/dist/runtime/theme/dashboard-panel.d.ts +26 -0
- package/dist/runtime/theme/dashboard-panel.js +6 -0
- package/dist/runtime/theme/dashboard-resize-handle.d.ts +26 -0
- package/dist/runtime/theme/dashboard-resize-handle.js +17 -0
- package/dist/runtime/theme/dashboard-sidebar.d.ts +50 -0
- package/dist/runtime/theme/dashboard-sidebar.js +40 -0
- package/dist/runtime/theme/date-picker.d.ts +119 -0
- package/dist/runtime/theme/date-picker.js +75 -0
- package/dist/runtime/theme/drawer.d.ts +95 -0
- package/dist/runtime/theme/drawer.js +57 -0
- package/dist/runtime/theme/dropdown.d.ts +41 -0
- package/dist/runtime/theme/dropdown.js +21 -0
- package/dist/runtime/theme/file-tree.d.ts +56 -0
- package/dist/runtime/theme/file-tree.js +33 -0
- package/dist/runtime/theme/file-upload.d.ts +233 -0
- package/dist/runtime/theme/file-upload.js +63 -0
- package/dist/runtime/theme/form-field.d.ts +95 -0
- package/dist/runtime/theme/form-field.js +37 -0
- package/dist/runtime/theme/header.d.ts +38 -0
- package/dist/runtime/theme/header.js +8 -0
- package/dist/runtime/theme/icon.d.ts +80 -0
- package/dist/runtime/theme/icon.js +26 -0
- package/dist/runtime/theme/input-group.d.ts +95 -0
- package/dist/runtime/theme/input-group.js +39 -0
- package/dist/runtime/theme/input-number.d.ts +164 -0
- package/dist/runtime/theme/input-number.js +76 -0
- package/dist/runtime/theme/input.d.ts +185 -0
- package/dist/runtime/theme/input.js +72 -0
- package/dist/runtime/theme/kbd.d.ts +44 -0
- package/dist/runtime/theme/kbd.js +16 -0
- package/dist/runtime/theme/modal.d.ts +74 -0
- package/dist/runtime/theme/modal.js +58 -0
- package/dist/runtime/theme/navigation-menu.d.ts +224 -0
- package/dist/runtime/theme/navigation-menu.js +232 -0
- package/dist/runtime/theme/page-aside.d.ts +44 -0
- package/dist/runtime/theme/page-aside.js +17 -0
- package/dist/runtime/theme/page-header.d.ts +38 -0
- package/dist/runtime/theme/page-header.js +8 -0
- package/dist/runtime/theme/pagination.d.ts +68 -0
- package/dist/runtime/theme/pagination.js +21 -0
- package/dist/runtime/theme/pin-input.d.ts +131 -0
- package/dist/runtime/theme/pin-input.js +40 -0
- package/dist/runtime/theme/popover.d.ts +32 -0
- package/dist/runtime/theme/popover.js +7 -0
- package/dist/runtime/theme/progress.d.ts +185 -0
- package/dist/runtime/theme/progress.js +54 -0
- package/dist/runtime/theme/prose.d.ts +92 -0
- package/dist/runtime/theme/prose.js +17 -0
- package/dist/runtime/theme/radio-group.d.ts +239 -0
- package/dist/runtime/theme/radio-group.js +134 -0
- package/dist/runtime/theme/rating.d.ts +167 -0
- package/dist/runtime/theme/rating.js +77 -0
- package/dist/runtime/theme/read-more.d.ts +38 -0
- package/dist/runtime/theme/read-more.js +21 -0
- package/dist/runtime/theme/scroll-area.d.ts +50 -0
- package/dist/runtime/theme/scroll-area.js +10 -0
- package/dist/runtime/theme/select.d.ts +176 -0
- package/dist/runtime/theme/select.js +74 -0
- package/dist/runtime/theme/separator.d.ts +158 -0
- package/dist/runtime/theme/separator.js +63 -0
- package/dist/runtime/theme/skeleton.d.ts +35 -0
- package/dist/runtime/theme/skeleton.js +27 -0
- package/dist/runtime/theme/slideover.d.ts +107 -0
- package/dist/runtime/theme/slideover.js +62 -0
- package/dist/runtime/theme/slider.d.ts +227 -0
- package/dist/runtime/theme/slider.js +73 -0
- package/dist/runtime/theme/splitter-panel.d.ts +26 -0
- package/dist/runtime/theme/splitter-panel.js +9 -0
- package/dist/runtime/theme/splitter-resize-handle.d.ts +44 -0
- package/dist/runtime/theme/splitter-resize-handle.js +18 -0
- package/dist/runtime/theme/splitter.d.ts +35 -0
- package/dist/runtime/theme/splitter.js +15 -0
- package/dist/runtime/theme/stepper.d.ts +221 -0
- package/dist/runtime/theme/stepper.js +106 -0
- package/dist/runtime/theme/switch.d.ts +206 -0
- package/dist/runtime/theme/switch.js +84 -0
- package/dist/runtime/theme/table.d.ts +176 -0
- package/dist/runtime/theme/table.js +59 -0
- package/dist/runtime/theme/tabs.d.ts +59 -0
- package/dist/runtime/theme/tabs.js +44 -0
- package/dist/runtime/theme/textarea.d.ts +212 -0
- package/dist/runtime/theme/textarea.js +56 -0
- package/dist/runtime/theme/toast.d.ts +80 -0
- package/dist/runtime/theme/toast.js +31 -0
- package/dist/runtime/theme/toggle-group.d.ts +110 -0
- package/dist/runtime/theme/toggle-group.js +48 -0
- package/dist/runtime/theme/toggle.d.ts +92 -0
- package/dist/runtime/theme/toggle.js +48 -0
- package/dist/runtime/theme/tooltip.d.ts +44 -0
- package/dist/runtime/theme/tooltip.js +14 -0
- package/dist/runtime/theme/tree.d.ts +80 -0
- package/dist/runtime/theme/tree.js +32 -0
- package/dist/runtime/theme.css +1 -0
- package/dist/runtime/types/app-config.d.ts +15 -0
- package/dist/runtime/types/index.d.ts +82 -0
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/utils/format-bytes.d.ts +2 -0
- package/dist/runtime/utils/format-bytes.js +9 -0
- package/dist/runtime/utils/fuzzy-match.d.ts +12 -0
- package/dist/runtime/utils/fuzzy-match.js +21 -0
- package/dist/runtime/utils/icons.d.ts +38 -0
- package/dist/runtime/utils/icons.js +51 -0
- package/dist/runtime/utils/injection-keys.d.ts +69 -0
- package/dist/runtime/utils/injection-keys.js +3 -0
- package/dist/runtime/utils/messages.d.ts +70 -0
- package/dist/runtime/utils/messages.js +68 -0
- package/dist/runtime/utils/navigation-menu.d.ts +32 -0
- package/dist/runtime/utils/navigation-menu.js +5 -0
- package/dist/runtime/utils/table-columns.d.ts +30 -0
- package/dist/runtime/utils/table-columns.js +89 -0
- package/dist/runtime/utils/table-export.d.ts +12 -0
- package/dist/runtime/utils/table-export.js +29 -0
- package/dist/runtime/utils/ui.d.ts +124 -0
- package/dist/runtime/utils/ui.js +74 -0
- package/dist/types.d.mts +3 -0
- package/package.json +99 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useSlideover } from "../composables/use-slideover";
|
|
3
|
+
import Slideover from "./Slideover.vue";
|
|
4
|
+
const { slideovers, close, remove } = useSlideover();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<Slideover
|
|
9
|
+
v-for="instance in slideovers"
|
|
10
|
+
:key="instance.id"
|
|
11
|
+
:open="instance.isOpen"
|
|
12
|
+
:title="instance.title"
|
|
13
|
+
:description="instance.description"
|
|
14
|
+
:side="instance.side"
|
|
15
|
+
:inset="instance.inset"
|
|
16
|
+
:dismissible="instance.dismissible"
|
|
17
|
+
:modal="instance.modal"
|
|
18
|
+
:overlay="instance.overlay"
|
|
19
|
+
:transition="instance.transition"
|
|
20
|
+
@update:open="(open) => !open && close(instance.id)"
|
|
21
|
+
@after-leave="remove(instance.id)"
|
|
22
|
+
>
|
|
23
|
+
<template #content>
|
|
24
|
+
<component :is="instance.component" v-bind="instance.props" @close="(value) => close(instance.id, value)" />
|
|
25
|
+
</template>
|
|
26
|
+
</Slideover>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { SliderThemeSlots } from '../theme/slider.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { sliderTheme } from '../theme/slider.js';
|
|
5
|
+
type SliderVariants = VariantProps<typeof sliderTheme>;
|
|
6
|
+
type __VLS_Slots = SliderSlots;
|
|
7
|
+
export interface SliderProps {
|
|
8
|
+
modelValue?: number | number[];
|
|
9
|
+
defaultValue?: number | number[];
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
step?: number;
|
|
13
|
+
/** The minimum permitted number of steps between adjacent thumbs on a multi-thumb (range) slider. */
|
|
14
|
+
minStepsBetweenThumbs?: number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
orientation?: SliderVariants['orientation'];
|
|
17
|
+
/** Visually (and directionally) flips the slider - the max end renders where the min end normally would. */
|
|
18
|
+
inverted?: boolean;
|
|
19
|
+
/** Shows a tick mark at every step along the track - own addition, Reka's primitive has no tick/mark concept of its own. */
|
|
20
|
+
showTicks?: boolean;
|
|
21
|
+
size?: SliderVariants['size'];
|
|
22
|
+
color?: SliderVariants['color'];
|
|
23
|
+
/** @default 'circle' */
|
|
24
|
+
thumbVariant?: SliderVariants['thumbVariant'];
|
|
25
|
+
/** Shows the current value in a tooltip on hover/focus of each thumb - reuses Tooltip, not a bespoke floating label. */
|
|
26
|
+
tooltip?: boolean;
|
|
27
|
+
/** Renders -/+ buttons flanking the track, stepping by `step` - only meaningful (and only rendered) for a single-value slider, since stepping two independent range thumbs with one shared button pair has no obvious single meaning. */
|
|
28
|
+
controls?: boolean;
|
|
29
|
+
/** Accessible name for each thumb - a single string applies to all of them (fine for a single-thumb slider), an array maps one per thumb by index (e.g. `['Minimum', 'Maximum']` for a range slider). */
|
|
30
|
+
ariaLabel?: string | string[];
|
|
31
|
+
/** Submitted with an owning `<form>` under this name, via a real hidden input Reka renders internally - only takes effect when actually inside a form. */
|
|
32
|
+
name?: string;
|
|
33
|
+
ui?: UiProp<SliderThemeSlots>;
|
|
34
|
+
}
|
|
35
|
+
export interface SliderEmits {
|
|
36
|
+
'update:modelValue': [value: number | number[]];
|
|
37
|
+
/** Fires once, when a drag/interaction finishes with a changed value - unlike update:modelValue, which fires continuously while dragging. Useful for only acting once the user lets go (e.g. a debounced request). */
|
|
38
|
+
'valueCommit': [value: number | number[]];
|
|
39
|
+
}
|
|
40
|
+
export interface SliderSlots {
|
|
41
|
+
/** Content flanking the start of the track (an icon, an emoji, a unit label). */
|
|
42
|
+
start?: () => any;
|
|
43
|
+
/** Content flanking the end of the track. */
|
|
44
|
+
end?: () => any;
|
|
45
|
+
}
|
|
46
|
+
declare const __VLS_base: import("vue").DefineComponent<SliderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
+
"update:modelValue": (value: number | number[]) => any;
|
|
48
|
+
valueCommit: (value: number | number[]) => any;
|
|
49
|
+
}, string, import("vue").PublicProps, Readonly<SliderProps> & Readonly<{
|
|
50
|
+
"onUpdate:modelValue"?: ((value: number | number[]) => any) | undefined;
|
|
51
|
+
onValueCommit?: ((value: number | number[]) => any) | undefined;
|
|
52
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
54
|
+
declare const _default: typeof __VLS_export;
|
|
55
|
+
export default _default;
|
|
56
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { SliderRange, SliderRoot, SliderThumb, SliderTrack } from "reka-ui";
|
|
3
|
+
import { computed, ref, watch } from "vue";
|
|
4
|
+
import { useIcons } from "../composables/use-icons";
|
|
5
|
+
import { useMessages } from "../composables/use-messages";
|
|
6
|
+
import { sliderTheme } from "../theme/slider";
|
|
7
|
+
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
8
|
+
import Button from "./Button.vue";
|
|
9
|
+
import Tooltip from "./Tooltip.vue";
|
|
10
|
+
defineOptions({ inheritAttrs: false });
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
modelValue: { type: [Number, Array], required: false },
|
|
13
|
+
defaultValue: { type: [Number, Array], required: false },
|
|
14
|
+
min: { type: Number, required: false, default: 0 },
|
|
15
|
+
max: { type: Number, required: false, default: 100 },
|
|
16
|
+
step: { type: Number, required: false, default: 1 },
|
|
17
|
+
minStepsBetweenThumbs: { type: Number, required: false },
|
|
18
|
+
disabled: { type: Boolean, required: false },
|
|
19
|
+
orientation: { type: null, required: false },
|
|
20
|
+
inverted: { type: Boolean, required: false },
|
|
21
|
+
showTicks: { type: Boolean, required: false },
|
|
22
|
+
size: { type: null, required: false },
|
|
23
|
+
color: { type: null, required: false },
|
|
24
|
+
thumbVariant: { type: null, required: false },
|
|
25
|
+
tooltip: { type: Boolean, required: false },
|
|
26
|
+
controls: { type: Boolean, required: false },
|
|
27
|
+
ariaLabel: { type: [String, Array], required: false },
|
|
28
|
+
name: { type: String, required: false },
|
|
29
|
+
ui: { type: Object, required: false }
|
|
30
|
+
});
|
|
31
|
+
const emit = defineEmits(["update:modelValue", "valueCommit"]);
|
|
32
|
+
defineSlots();
|
|
33
|
+
function toArray(value) {
|
|
34
|
+
if (value === void 0)
|
|
35
|
+
return void 0;
|
|
36
|
+
return Array.isArray(value) ? value : [value];
|
|
37
|
+
}
|
|
38
|
+
const isRange = computed(() => {
|
|
39
|
+
if (props.modelValue !== void 0)
|
|
40
|
+
return Array.isArray(props.modelValue);
|
|
41
|
+
if (props.defaultValue !== void 0)
|
|
42
|
+
return Array.isArray(props.defaultValue);
|
|
43
|
+
return false;
|
|
44
|
+
});
|
|
45
|
+
const internalValue = ref(toArray(props.modelValue) ?? toArray(props.defaultValue) ?? [props.min]);
|
|
46
|
+
watch(() => props.modelValue, (value) => {
|
|
47
|
+
if (value !== void 0)
|
|
48
|
+
internalValue.value = toArray(value);
|
|
49
|
+
});
|
|
50
|
+
function fromArray(value) {
|
|
51
|
+
return isRange.value ? value : value[0] ?? props.min;
|
|
52
|
+
}
|
|
53
|
+
function onUpdateModelValue(value) {
|
|
54
|
+
if (!value)
|
|
55
|
+
return;
|
|
56
|
+
internalValue.value = value;
|
|
57
|
+
emit("update:modelValue", fromArray(value));
|
|
58
|
+
}
|
|
59
|
+
function onValueCommit(value) {
|
|
60
|
+
emit("valueCommit", fromArray(value));
|
|
61
|
+
}
|
|
62
|
+
function ariaLabelFor(index) {
|
|
63
|
+
return Array.isArray(props.ariaLabel) ? props.ariaLabel[index] : props.ariaLabel;
|
|
64
|
+
}
|
|
65
|
+
const canDecrement = computed(() => !props.disabled && (internalValue.value[0] ?? props.min) > props.min);
|
|
66
|
+
const canIncrement = computed(() => !props.disabled && (internalValue.value[0] ?? props.min) < props.max);
|
|
67
|
+
function stepBy(delta) {
|
|
68
|
+
const next = Math.min(props.max, Math.max(props.min, (internalValue.value[0] ?? props.min) + delta));
|
|
69
|
+
onUpdateModelValue([next]);
|
|
70
|
+
onValueCommit([next]);
|
|
71
|
+
}
|
|
72
|
+
const icons = useIcons();
|
|
73
|
+
const messages = useMessages();
|
|
74
|
+
const buttonSize = computed(() => ({ sm: "sm", md: "sm", lg: "md" })[props.size ?? "md"]);
|
|
75
|
+
const controlButtonUi = { base: "shrink-0" };
|
|
76
|
+
const ticks = computed(() => {
|
|
77
|
+
if (!props.showTicks)
|
|
78
|
+
return [];
|
|
79
|
+
const count = Math.floor((props.max - props.min) / props.step) + 1;
|
|
80
|
+
return Array.from({ length: count }, (_, i) => {
|
|
81
|
+
const value = props.min + i * props.step;
|
|
82
|
+
return { value, percent: (value - props.min) / (props.max - props.min) * 100 };
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
const theme = useComponentTheme("slider", sliderTheme);
|
|
86
|
+
const ui = computed(() => theme.value({
|
|
87
|
+
size: props.size,
|
|
88
|
+
color: props.color,
|
|
89
|
+
orientation: props.orientation,
|
|
90
|
+
thumbVariant: props.thumbVariant
|
|
91
|
+
}));
|
|
92
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
93
|
+
const trackProps = computed(() => resolveSlot(ui.value.track, props.ui?.track));
|
|
94
|
+
const rangeProps = computed(() => resolveSlot(ui.value.range, props.ui?.range));
|
|
95
|
+
const thumbProps = computed(() => resolveSlot(ui.value.thumb, props.ui?.thumb));
|
|
96
|
+
const tickProps = computed(() => resolveSlot(ui.value.tick, props.ui?.tick));
|
|
97
|
+
const startProps = computed(() => resolveSlot(ui.value.start, props.ui?.start));
|
|
98
|
+
const endProps = computed(() => resolveSlot(ui.value.end, props.ui?.end));
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<template>
|
|
102
|
+
<SliderRoot
|
|
103
|
+
:model-value="internalValue"
|
|
104
|
+
:min="min"
|
|
105
|
+
:max="max"
|
|
106
|
+
:step="step"
|
|
107
|
+
:min-steps-between-thumbs="minStepsBetweenThumbs"
|
|
108
|
+
:disabled="disabled"
|
|
109
|
+
:orientation="orientation"
|
|
110
|
+
:inverted="inverted"
|
|
111
|
+
:name="name"
|
|
112
|
+
v-bind="rootProps"
|
|
113
|
+
@update:model-value="onUpdateModelValue"
|
|
114
|
+
@value-commit="onValueCommit"
|
|
115
|
+
>
|
|
116
|
+
<span v-if="$slots.start" v-bind="startProps">
|
|
117
|
+
<slot name="start" />
|
|
118
|
+
</span>
|
|
119
|
+
<!--
|
|
120
|
+
@pointerdown.stop on both control buttons: Reka's SliderRoot listens
|
|
121
|
+
for pointerdown on its own rendered element with no target filtering
|
|
122
|
+
beyond its own thumbs (confirmed by reading its compiled source) - any
|
|
123
|
+
other descendant's pointerdown, these buttons included, bubbles up and
|
|
124
|
+
gets treated as a drag-to-position gesture computed off the *whole
|
|
125
|
+
root's* bounding box, which silently overrides the click and jumps
|
|
126
|
+
the value to whatever edge that button happens to sit at. Stopping
|
|
127
|
+
propagation here keeps the click from ever reaching that listener.
|
|
128
|
+
-->
|
|
129
|
+
<Button
|
|
130
|
+
v-if="controls && !isRange"
|
|
131
|
+
variant="text"
|
|
132
|
+
color="neutral"
|
|
133
|
+
:size="buttonSize"
|
|
134
|
+
:icon="icons.minus"
|
|
135
|
+
:aria-label="messages.decrement"
|
|
136
|
+
:disabled="!canDecrement"
|
|
137
|
+
:ui="controlButtonUi"
|
|
138
|
+
tabindex="-1"
|
|
139
|
+
@pointerdown.stop
|
|
140
|
+
@click="stepBy(-step)"
|
|
141
|
+
/>
|
|
142
|
+
|
|
143
|
+
<SliderTrack v-bind="trackProps">
|
|
144
|
+
<span
|
|
145
|
+
v-for="tick in ticks"
|
|
146
|
+
:key="tick.value"
|
|
147
|
+
v-bind="tickProps"
|
|
148
|
+
:style="orientation === 'vertical' ? { bottom: `${tick.percent}%` } : { left: `${tick.percent}%` }"
|
|
149
|
+
/>
|
|
150
|
+
<SliderRange v-bind="rangeProps" />
|
|
151
|
+
</SliderTrack>
|
|
152
|
+
<template v-if="tooltip">
|
|
153
|
+
<Tooltip
|
|
154
|
+
v-for="(_, index) in internalValue"
|
|
155
|
+
:key="index"
|
|
156
|
+
:text="String(internalValue[index])"
|
|
157
|
+
>
|
|
158
|
+
<SliderThumb v-bind="thumbProps" :aria-label="ariaLabelFor(index)" />
|
|
159
|
+
</Tooltip>
|
|
160
|
+
</template>
|
|
161
|
+
<SliderThumb
|
|
162
|
+
v-for="(_, index) in internalValue"
|
|
163
|
+
v-else
|
|
164
|
+
:key="index"
|
|
165
|
+
v-bind="thumbProps"
|
|
166
|
+
:aria-label="ariaLabelFor(index)"
|
|
167
|
+
/>
|
|
168
|
+
|
|
169
|
+
<Button
|
|
170
|
+
v-if="controls && !isRange"
|
|
171
|
+
variant="text"
|
|
172
|
+
color="neutral"
|
|
173
|
+
:size="buttonSize"
|
|
174
|
+
:icon="icons.plus"
|
|
175
|
+
:aria-label="messages.increment"
|
|
176
|
+
:disabled="!canIncrement"
|
|
177
|
+
:ui="controlButtonUi"
|
|
178
|
+
tabindex="-1"
|
|
179
|
+
@pointerdown.stop
|
|
180
|
+
@click="stepBy(step)"
|
|
181
|
+
/>
|
|
182
|
+
<span v-if="$slots.end" v-bind="endProps">
|
|
183
|
+
<slot name="end" />
|
|
184
|
+
</span>
|
|
185
|
+
</SliderRoot>
|
|
186
|
+
</template>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { SliderThemeSlots } from '../theme/slider.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { sliderTheme } from '../theme/slider.js';
|
|
5
|
+
type SliderVariants = VariantProps<typeof sliderTheme>;
|
|
6
|
+
type __VLS_Slots = SliderSlots;
|
|
7
|
+
export interface SliderProps {
|
|
8
|
+
modelValue?: number | number[];
|
|
9
|
+
defaultValue?: number | number[];
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
step?: number;
|
|
13
|
+
/** The minimum permitted number of steps between adjacent thumbs on a multi-thumb (range) slider. */
|
|
14
|
+
minStepsBetweenThumbs?: number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
orientation?: SliderVariants['orientation'];
|
|
17
|
+
/** Visually (and directionally) flips the slider - the max end renders where the min end normally would. */
|
|
18
|
+
inverted?: boolean;
|
|
19
|
+
/** Shows a tick mark at every step along the track - own addition, Reka's primitive has no tick/mark concept of its own. */
|
|
20
|
+
showTicks?: boolean;
|
|
21
|
+
size?: SliderVariants['size'];
|
|
22
|
+
color?: SliderVariants['color'];
|
|
23
|
+
/** @default 'circle' */
|
|
24
|
+
thumbVariant?: SliderVariants['thumbVariant'];
|
|
25
|
+
/** Shows the current value in a tooltip on hover/focus of each thumb - reuses Tooltip, not a bespoke floating label. */
|
|
26
|
+
tooltip?: boolean;
|
|
27
|
+
/** Renders -/+ buttons flanking the track, stepping by `step` - only meaningful (and only rendered) for a single-value slider, since stepping two independent range thumbs with one shared button pair has no obvious single meaning. */
|
|
28
|
+
controls?: boolean;
|
|
29
|
+
/** Accessible name for each thumb - a single string applies to all of them (fine for a single-thumb slider), an array maps one per thumb by index (e.g. `['Minimum', 'Maximum']` for a range slider). */
|
|
30
|
+
ariaLabel?: string | string[];
|
|
31
|
+
/** Submitted with an owning `<form>` under this name, via a real hidden input Reka renders internally - only takes effect when actually inside a form. */
|
|
32
|
+
name?: string;
|
|
33
|
+
ui?: UiProp<SliderThemeSlots>;
|
|
34
|
+
}
|
|
35
|
+
export interface SliderEmits {
|
|
36
|
+
'update:modelValue': [value: number | number[]];
|
|
37
|
+
/** Fires once, when a drag/interaction finishes with a changed value - unlike update:modelValue, which fires continuously while dragging. Useful for only acting once the user lets go (e.g. a debounced request). */
|
|
38
|
+
'valueCommit': [value: number | number[]];
|
|
39
|
+
}
|
|
40
|
+
export interface SliderSlots {
|
|
41
|
+
/** Content flanking the start of the track (an icon, an emoji, a unit label). */
|
|
42
|
+
start?: () => any;
|
|
43
|
+
/** Content flanking the end of the track. */
|
|
44
|
+
end?: () => any;
|
|
45
|
+
}
|
|
46
|
+
declare const __VLS_base: import("vue").DefineComponent<SliderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
+
"update:modelValue": (value: number | number[]) => any;
|
|
48
|
+
valueCommit: (value: number | number[]) => any;
|
|
49
|
+
}, string, import("vue").PublicProps, Readonly<SliderProps> & Readonly<{
|
|
50
|
+
"onUpdate:modelValue"?: ((value: number | number[]) => any) | undefined;
|
|
51
|
+
onValueCommit?: ((value: number | number[]) => any) | undefined;
|
|
52
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
54
|
+
declare const _default: typeof __VLS_export;
|
|
55
|
+
export default _default;
|
|
56
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { SplitterThemeSlots } from '../theme/splitter.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { splitterTheme } from '../theme/splitter.js';
|
|
5
|
+
type SplitterVariants = VariantProps<typeof splitterTheme>;
|
|
6
|
+
export interface SplitterStorage {
|
|
7
|
+
getItem: (name: string) => string | null;
|
|
8
|
+
setItem: (name: string, value: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface SplitterProps {
|
|
11
|
+
/** @default 'horizontal' */
|
|
12
|
+
direction?: SplitterVariants['direction'];
|
|
13
|
+
/** Persists each panel's size under this key once set - via `storage` below, or Reka's own `localStorage`-backed default when that's left unset. */
|
|
14
|
+
autoSaveId?: string;
|
|
15
|
+
/** How many pixels an arrow-key press resizes the focused handle by. @default 10 */
|
|
16
|
+
keyboardResizeBy?: number;
|
|
17
|
+
/** Overrides where `autoSaveId` persists to - `localStorage` by default. */
|
|
18
|
+
storage?: SplitterStorage;
|
|
19
|
+
ui?: UiProp<SplitterThemeSlots>;
|
|
20
|
+
}
|
|
21
|
+
export interface SplitterEmits {
|
|
22
|
+
/** Fires on every layout change (drag, keyboard resize, collapse/expand) with each panel's own current size. */
|
|
23
|
+
layout: [sizes: number[]];
|
|
24
|
+
}
|
|
25
|
+
declare var __VLS_10: {};
|
|
26
|
+
type __VLS_Slots = {} & {
|
|
27
|
+
default?: (props: typeof __VLS_10) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<SplitterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
layout: (sizes: number[]) => any;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<SplitterProps> & Readonly<{
|
|
32
|
+
onLayout?: ((sizes: number[]) => any) | undefined;
|
|
33
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { SplitterGroup } from "reka-ui";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { splitterTheme } from "../theme/splitter";
|
|
5
|
+
import { useComponentTheme, useRootProps } from "../utils/ui";
|
|
6
|
+
defineOptions({ inheritAttrs: false });
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
direction: { type: null, required: false, default: "horizontal" },
|
|
9
|
+
autoSaveId: { type: String, required: false },
|
|
10
|
+
keyboardResizeBy: { type: Number, required: false },
|
|
11
|
+
storage: { type: Object, required: false },
|
|
12
|
+
ui: { type: Object, required: false }
|
|
13
|
+
});
|
|
14
|
+
const emit = defineEmits(["layout"]);
|
|
15
|
+
const theme = useComponentTheme("splitter", splitterTheme);
|
|
16
|
+
const ui = computed(() => theme.value({ direction: props.direction }));
|
|
17
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<SplitterGroup
|
|
22
|
+
:direction="direction"
|
|
23
|
+
:auto-save-id="autoSaveId"
|
|
24
|
+
:keyboard-resize-by="keyboardResizeBy"
|
|
25
|
+
:storage="storage"
|
|
26
|
+
v-bind="rootProps"
|
|
27
|
+
@layout="(sizes) => emit('layout', sizes)"
|
|
28
|
+
>
|
|
29
|
+
<slot />
|
|
30
|
+
</SplitterGroup>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { SplitterThemeSlots } from '../theme/splitter.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { splitterTheme } from '../theme/splitter.js';
|
|
5
|
+
type SplitterVariants = VariantProps<typeof splitterTheme>;
|
|
6
|
+
export interface SplitterStorage {
|
|
7
|
+
getItem: (name: string) => string | null;
|
|
8
|
+
setItem: (name: string, value: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface SplitterProps {
|
|
11
|
+
/** @default 'horizontal' */
|
|
12
|
+
direction?: SplitterVariants['direction'];
|
|
13
|
+
/** Persists each panel's size under this key once set - via `storage` below, or Reka's own `localStorage`-backed default when that's left unset. */
|
|
14
|
+
autoSaveId?: string;
|
|
15
|
+
/** How many pixels an arrow-key press resizes the focused handle by. @default 10 */
|
|
16
|
+
keyboardResizeBy?: number;
|
|
17
|
+
/** Overrides where `autoSaveId` persists to - `localStorage` by default. */
|
|
18
|
+
storage?: SplitterStorage;
|
|
19
|
+
ui?: UiProp<SplitterThemeSlots>;
|
|
20
|
+
}
|
|
21
|
+
export interface SplitterEmits {
|
|
22
|
+
/** Fires on every layout change (drag, keyboard resize, collapse/expand) with each panel's own current size. */
|
|
23
|
+
layout: [sizes: number[]];
|
|
24
|
+
}
|
|
25
|
+
declare var __VLS_10: {};
|
|
26
|
+
type __VLS_Slots = {} & {
|
|
27
|
+
default?: (props: typeof __VLS_10) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<SplitterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
layout: (sizes: number[]) => any;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<SplitterProps> & Readonly<{
|
|
32
|
+
onLayout?: ((sizes: number[]) => any) | undefined;
|
|
33
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { SplitterPanelThemeSlots } from '../theme/splitter-panel.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
type __VLS_Slots = SplitterPanelSlots;
|
|
4
|
+
export interface SplitterPanelProps {
|
|
5
|
+
/** Initial size - a percentage of the group's total by default (`sizeUnit="%"`), or pixels with `sizeUnit="px"`. */
|
|
6
|
+
defaultSize?: number;
|
|
7
|
+
minSize?: number;
|
|
8
|
+
maxSize?: number;
|
|
9
|
+
/** How wide/tall the panel stays once collapsed - `0` hides it entirely. */
|
|
10
|
+
collapsedSize?: number;
|
|
11
|
+
/** Whether dragging past `minSize` snaps the panel fully closed instead of stopping there. */
|
|
12
|
+
collapsible?: boolean;
|
|
13
|
+
/** @default '%' */
|
|
14
|
+
sizeUnit?: 'px' | '%';
|
|
15
|
+
/** Where this panel sits among its siblings when they aren't already in that order in the template. */
|
|
16
|
+
order?: number;
|
|
17
|
+
ui?: UiProp<SplitterPanelThemeSlots>;
|
|
18
|
+
}
|
|
19
|
+
export interface SplitterPanelEmits {
|
|
20
|
+
collapse: [];
|
|
21
|
+
expand: [];
|
|
22
|
+
resize: [size: number];
|
|
23
|
+
}
|
|
24
|
+
export interface SplitterPanelSlots {
|
|
25
|
+
default?: (props: {
|
|
26
|
+
isCollapsed: boolean;
|
|
27
|
+
isExpanded: boolean;
|
|
28
|
+
collapse: () => void;
|
|
29
|
+
expand: () => void;
|
|
30
|
+
}) => any;
|
|
31
|
+
}
|
|
32
|
+
declare const __VLS_base: import("vue").DefineComponent<SplitterPanelProps, {
|
|
33
|
+
collapse: () => void | undefined;
|
|
34
|
+
expand: () => void | undefined;
|
|
35
|
+
resize: (size: number) => void | undefined;
|
|
36
|
+
getSize: () => number | undefined;
|
|
37
|
+
isCollapsed: import("vue").ComputedRef<boolean>;
|
|
38
|
+
isExpanded: import("vue").ComputedRef<boolean>;
|
|
39
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
40
|
+
resize: (size: number) => any;
|
|
41
|
+
collapse: () => any;
|
|
42
|
+
expand: () => any;
|
|
43
|
+
}, string, import("vue").PublicProps, Readonly<SplitterPanelProps> & Readonly<{
|
|
44
|
+
onResize?: ((size: number) => any) | undefined;
|
|
45
|
+
onCollapse?: (() => any) | undefined;
|
|
46
|
+
onExpand?: (() => any) | undefined;
|
|
47
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
50
|
+
export default _default;
|
|
51
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
52
|
+
new (): {
|
|
53
|
+
$slots: S;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { SplitterPanel as RekaSplitterPanel } from "reka-ui";
|
|
3
|
+
import { computed, ref } from "vue";
|
|
4
|
+
import { splitterPanelTheme } from "../theme/splitter-panel";
|
|
5
|
+
import { useComponentTheme, useRootProps } from "../utils/ui";
|
|
6
|
+
defineOptions({ inheritAttrs: false });
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
defaultSize: { type: Number, required: false },
|
|
9
|
+
minSize: { type: Number, required: false },
|
|
10
|
+
maxSize: { type: Number, required: false },
|
|
11
|
+
collapsedSize: { type: Number, required: false },
|
|
12
|
+
collapsible: { type: Boolean, required: false },
|
|
13
|
+
sizeUnit: { type: String, required: false },
|
|
14
|
+
order: { type: Number, required: false },
|
|
15
|
+
ui: { type: Object, required: false }
|
|
16
|
+
});
|
|
17
|
+
const emit = defineEmits(["collapse", "expand", "resize"]);
|
|
18
|
+
defineSlots();
|
|
19
|
+
const panelRef = ref();
|
|
20
|
+
defineExpose({
|
|
21
|
+
collapse: () => panelRef.value?.collapse(),
|
|
22
|
+
expand: () => panelRef.value?.expand(),
|
|
23
|
+
resize: (size) => panelRef.value?.resize(size),
|
|
24
|
+
getSize: () => panelRef.value?.getSize(),
|
|
25
|
+
isCollapsed: computed(() => panelRef.value?.isCollapsed ?? false),
|
|
26
|
+
isExpanded: computed(() => panelRef.value?.isExpanded ?? true)
|
|
27
|
+
});
|
|
28
|
+
const theme = useComponentTheme("splitterPanel", splitterPanelTheme);
|
|
29
|
+
const ui = computed(() => theme.value());
|
|
30
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<RekaSplitterPanel
|
|
35
|
+
ref="panelRef"
|
|
36
|
+
:default-size="defaultSize"
|
|
37
|
+
:min-size="minSize"
|
|
38
|
+
:max-size="maxSize"
|
|
39
|
+
:collapsed-size="collapsedSize"
|
|
40
|
+
:collapsible="collapsible"
|
|
41
|
+
:size-unit="sizeUnit"
|
|
42
|
+
:order="order"
|
|
43
|
+
v-bind="rootProps"
|
|
44
|
+
@collapse="emit('collapse')"
|
|
45
|
+
@expand="emit('expand')"
|
|
46
|
+
@resize="(size) => emit('resize', size)"
|
|
47
|
+
>
|
|
48
|
+
<template #default="{ isCollapsed, isExpanded, collapse, expand }">
|
|
49
|
+
<slot :is-collapsed="isCollapsed" :is-expanded="isExpanded" :collapse="collapse" :expand="expand" />
|
|
50
|
+
</template>
|
|
51
|
+
</RekaSplitterPanel>
|
|
52
|
+
</template>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { SplitterPanelThemeSlots } from '../theme/splitter-panel.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
type __VLS_Slots = SplitterPanelSlots;
|
|
4
|
+
export interface SplitterPanelProps {
|
|
5
|
+
/** Initial size - a percentage of the group's total by default (`sizeUnit="%"`), or pixels with `sizeUnit="px"`. */
|
|
6
|
+
defaultSize?: number;
|
|
7
|
+
minSize?: number;
|
|
8
|
+
maxSize?: number;
|
|
9
|
+
/** How wide/tall the panel stays once collapsed - `0` hides it entirely. */
|
|
10
|
+
collapsedSize?: number;
|
|
11
|
+
/** Whether dragging past `minSize` snaps the panel fully closed instead of stopping there. */
|
|
12
|
+
collapsible?: boolean;
|
|
13
|
+
/** @default '%' */
|
|
14
|
+
sizeUnit?: 'px' | '%';
|
|
15
|
+
/** Where this panel sits among its siblings when they aren't already in that order in the template. */
|
|
16
|
+
order?: number;
|
|
17
|
+
ui?: UiProp<SplitterPanelThemeSlots>;
|
|
18
|
+
}
|
|
19
|
+
export interface SplitterPanelEmits {
|
|
20
|
+
collapse: [];
|
|
21
|
+
expand: [];
|
|
22
|
+
resize: [size: number];
|
|
23
|
+
}
|
|
24
|
+
export interface SplitterPanelSlots {
|
|
25
|
+
default?: (props: {
|
|
26
|
+
isCollapsed: boolean;
|
|
27
|
+
isExpanded: boolean;
|
|
28
|
+
collapse: () => void;
|
|
29
|
+
expand: () => void;
|
|
30
|
+
}) => any;
|
|
31
|
+
}
|
|
32
|
+
declare const __VLS_base: import("vue").DefineComponent<SplitterPanelProps, {
|
|
33
|
+
collapse: () => void | undefined;
|
|
34
|
+
expand: () => void | undefined;
|
|
35
|
+
resize: (size: number) => void | undefined;
|
|
36
|
+
getSize: () => number | undefined;
|
|
37
|
+
isCollapsed: import("vue").ComputedRef<boolean>;
|
|
38
|
+
isExpanded: import("vue").ComputedRef<boolean>;
|
|
39
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
40
|
+
resize: (size: number) => any;
|
|
41
|
+
collapse: () => any;
|
|
42
|
+
expand: () => any;
|
|
43
|
+
}, string, import("vue").PublicProps, Readonly<SplitterPanelProps> & Readonly<{
|
|
44
|
+
onResize?: ((size: number) => any) | undefined;
|
|
45
|
+
onCollapse?: (() => any) | undefined;
|
|
46
|
+
onExpand?: (() => any) | undefined;
|
|
47
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
50
|
+
export default _default;
|
|
51
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
52
|
+
new (): {
|
|
53
|
+
$slots: S;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { SplitterResizeHandleThemeSlots } from '../theme/splitter-resize-handle.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { splitterResizeHandleTheme } from '../theme/splitter-resize-handle.js';
|
|
5
|
+
type SplitterResizeHandleVariants = VariantProps<typeof splitterResizeHandleTheme>;
|
|
6
|
+
export interface SplitterResizeHandleProps {
|
|
7
|
+
/** Match the parent Splitter's own `direction` - this isn't read from it automatically. @default 'horizontal' */
|
|
8
|
+
direction?: SplitterResizeHandleVariants['direction'];
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
ui?: UiProp<SplitterResizeHandleThemeSlots>;
|
|
11
|
+
}
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<SplitterResizeHandleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SplitterResizeHandleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { SplitterResizeHandle as RekaSplitterResizeHandle } from "reka-ui";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { splitterResizeHandleTheme } from "../theme/splitter-resize-handle";
|
|
5
|
+
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
6
|
+
defineOptions({ inheritAttrs: false });
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
direction: { type: null, required: false, default: "horizontal" },
|
|
9
|
+
disabled: { type: Boolean, required: false },
|
|
10
|
+
ui: { type: Object, required: false }
|
|
11
|
+
});
|
|
12
|
+
const theme = useComponentTheme("splitterResizeHandle", splitterResizeHandleTheme);
|
|
13
|
+
const ui = computed(() => theme.value({ direction: props.direction }));
|
|
14
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
15
|
+
const lineProps = computed(() => resolveSlot(ui.value.line, props.ui?.line));
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<RekaSplitterResizeHandle :disabled="disabled" v-bind="rootProps">
|
|
20
|
+
<div v-bind="lineProps" />
|
|
21
|
+
</RekaSplitterResizeHandle>
|
|
22
|
+
</template>
|