@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,28 @@
|
|
|
1
|
+
import type { TooltipThemeSlots } from '../theme/tooltip.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
export interface TooltipProps {
|
|
4
|
+
text?: string;
|
|
5
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
6
|
+
delayDuration?: number;
|
|
7
|
+
/** Keyboard shortcut hint shown alongside the text, e.g. `['⌘', 'K']` - each entry renders as its own small key badge. Takes the literal display strings, not semantic key names - there's no platform-specific symbol mapping. */
|
|
8
|
+
kbds?: string[];
|
|
9
|
+
/** Set `false` to hide the little pointer triangle. */
|
|
10
|
+
arrow?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
ui?: UiProp<TooltipThemeSlots>;
|
|
13
|
+
}
|
|
14
|
+
declare var __VLS_14: {}, __VLS_28: {};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
default?: (props: typeof __VLS_14) => any;
|
|
17
|
+
} & {
|
|
18
|
+
content?: (props: typeof __VLS_28) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<TooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TooltipProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { TreeThemeSlots } from '../theme/tree.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { treeTheme } from '../theme/tree.js';
|
|
5
|
+
type TreeVariants = VariantProps<typeof treeTheme>;
|
|
6
|
+
export interface TreeItemType {
|
|
7
|
+
label: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
children?: TreeItemType[];
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Slots = TreeSlots;
|
|
15
|
+
export interface TreeProps {
|
|
16
|
+
items: TreeItemType[];
|
|
17
|
+
modelValue?: TreeItemType | TreeItemType[];
|
|
18
|
+
defaultValue?: TreeItemType | TreeItemType[];
|
|
19
|
+
expanded?: string[];
|
|
20
|
+
defaultExpanded?: string[];
|
|
21
|
+
multiple?: boolean;
|
|
22
|
+
/** Shows a tri-state checkbox per row (reusing Checkbox.vue's own boolean|'indeterminate' model) - also turns on `multiple`/`propagateSelect`/`bubbleSelect` together, since checkbox mode's whole point is parent<->children selection propagation. */
|
|
23
|
+
checkbox?: boolean;
|
|
24
|
+
/** Selecting a parent also selects/deselects every one of its descendants. */
|
|
25
|
+
propagateSelect?: boolean;
|
|
26
|
+
/** Selecting all of a parent's children also selects the parent (and marks it indeterminate for a partial selection). */
|
|
27
|
+
bubbleSelect?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/** @default item => item.value ?? item.label */
|
|
30
|
+
getKey?: (item: TreeItemType) => string;
|
|
31
|
+
/** @default item => item.children */
|
|
32
|
+
getChildren?: (item: TreeItemType) => TreeItemType[] | undefined;
|
|
33
|
+
size?: TreeVariants['size'];
|
|
34
|
+
ui?: UiProp<TreeThemeSlots>;
|
|
35
|
+
}
|
|
36
|
+
export interface TreeEmits {
|
|
37
|
+
'update:modelValue': [value: TreeItemType | TreeItemType[]];
|
|
38
|
+
'update:expanded': [value: string[]];
|
|
39
|
+
}
|
|
40
|
+
export interface TreeSlots {
|
|
41
|
+
/** Replaces a row's default icon+label content - scoped with the node itself plus its live expanded/selected/indeterminate state. */
|
|
42
|
+
item?: (props: {
|
|
43
|
+
item: TreeItemType;
|
|
44
|
+
level: number;
|
|
45
|
+
expanded: boolean;
|
|
46
|
+
selected: boolean;
|
|
47
|
+
indeterminate: boolean;
|
|
48
|
+
}) => any;
|
|
49
|
+
}
|
|
50
|
+
declare const __VLS_base: import("vue").DefineComponent<TreeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
"update:modelValue": (value: TreeItemType | TreeItemType[]) => any;
|
|
52
|
+
"update:expanded": (value: string[]) => any;
|
|
53
|
+
}, string, import("vue").PublicProps, Readonly<TreeProps> & Readonly<{
|
|
54
|
+
"onUpdate:modelValue"?: ((value: TreeItemType | TreeItemType[]) => any) | undefined;
|
|
55
|
+
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
56
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
57
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
58
|
+
declare const _default: typeof __VLS_export;
|
|
59
|
+
export default _default;
|
|
60
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
61
|
+
new (): {
|
|
62
|
+
$slots: S;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { TreeItem, TreeRoot } from "reka-ui";
|
|
3
|
+
import { computed, mergeProps, ref, watch } from "vue";
|
|
4
|
+
import { useIcons } from "../composables/use-icons";
|
|
5
|
+
import { treeTheme } from "../theme/tree";
|
|
6
|
+
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
7
|
+
import Checkbox from "./Checkbox.vue";
|
|
8
|
+
import Icon from "./Icon.vue";
|
|
9
|
+
defineOptions({ inheritAttrs: false });
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
items: { type: Array, required: true },
|
|
12
|
+
modelValue: { type: [Object, Array], required: false },
|
|
13
|
+
defaultValue: { type: [Object, Array], required: false },
|
|
14
|
+
expanded: { type: Array, required: false },
|
|
15
|
+
defaultExpanded: { type: Array, required: false },
|
|
16
|
+
multiple: { type: Boolean, required: false },
|
|
17
|
+
checkbox: { type: Boolean, required: false },
|
|
18
|
+
propagateSelect: { type: Boolean, required: false },
|
|
19
|
+
bubbleSelect: { type: Boolean, required: false },
|
|
20
|
+
disabled: { type: Boolean, required: false },
|
|
21
|
+
getKey: { type: Function, required: false },
|
|
22
|
+
getChildren: { type: Function, required: false },
|
|
23
|
+
size: { type: null, required: false },
|
|
24
|
+
ui: { type: Object, required: false }
|
|
25
|
+
});
|
|
26
|
+
const emit = defineEmits(["update:modelValue", "update:expanded"]);
|
|
27
|
+
defineSlots();
|
|
28
|
+
const icons = useIcons();
|
|
29
|
+
const getKey = props.getKey ?? ((item) => item.value ?? item.label);
|
|
30
|
+
const getChildren = props.getChildren ?? ((item) => item.children);
|
|
31
|
+
const isMultiple = computed(() => props.multiple || props.checkbox || false);
|
|
32
|
+
const propagateSelect = computed(() => props.propagateSelect || props.checkbox || false);
|
|
33
|
+
const bubbleSelect = computed(() => props.bubbleSelect || props.checkbox || false);
|
|
34
|
+
const internalModelValue = ref(props.modelValue ?? props.defaultValue ?? (isMultiple.value ? [] : void 0));
|
|
35
|
+
watch(() => props.modelValue, (value) => {
|
|
36
|
+
if (value !== void 0)
|
|
37
|
+
internalModelValue.value = value;
|
|
38
|
+
});
|
|
39
|
+
const internalExpanded = ref(props.expanded ?? props.defaultExpanded ?? []);
|
|
40
|
+
watch(() => props.expanded, (value) => {
|
|
41
|
+
if (value !== void 0)
|
|
42
|
+
internalExpanded.value = value;
|
|
43
|
+
});
|
|
44
|
+
function onUpdateModelValue(value) {
|
|
45
|
+
internalModelValue.value = value;
|
|
46
|
+
emit("update:modelValue", value);
|
|
47
|
+
}
|
|
48
|
+
function onUpdateExpanded(value) {
|
|
49
|
+
internalExpanded.value = value;
|
|
50
|
+
emit("update:expanded", value);
|
|
51
|
+
}
|
|
52
|
+
const theme = useComponentTheme("tree", treeTheme);
|
|
53
|
+
const ui = computed(() => theme.value({ size: props.size }));
|
|
54
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
55
|
+
const itemProps = computed(() => resolveSlot(ui.value.item, props.ui?.item));
|
|
56
|
+
const toggleProps = computed(() => resolveSlot(ui.value.toggle, props.ui?.toggle));
|
|
57
|
+
const spacerProps = computed(() => resolveSlot(ui.value.spacer, props.ui?.spacer));
|
|
58
|
+
const checkboxProps = computed(() => resolveSlot(ui.value.checkbox, props.ui?.checkbox));
|
|
59
|
+
const iconProps = computed(() => resolveSlot(ui.value.icon, props.ui?.icon));
|
|
60
|
+
const labelProps = computed(() => resolveSlot(ui.value.label, props.ui?.label));
|
|
61
|
+
function indentStyle(level) {
|
|
62
|
+
return { paddingInlineStart: `${(level - 1) * 1.25}rem` };
|
|
63
|
+
}
|
|
64
|
+
function treeItemProps(entry, level) {
|
|
65
|
+
return mergeProps(entry.bind, itemProps.value, { style: indentStyle(level) });
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<template>
|
|
70
|
+
<TreeRoot
|
|
71
|
+
:items="items"
|
|
72
|
+
:get-key="getKey"
|
|
73
|
+
:get-children="getChildren"
|
|
74
|
+
:model-value="internalModelValue"
|
|
75
|
+
:expanded="internalExpanded"
|
|
76
|
+
:multiple="isMultiple"
|
|
77
|
+
:propagate-select="propagateSelect"
|
|
78
|
+
:bubble-select="bubbleSelect"
|
|
79
|
+
:disabled="disabled"
|
|
80
|
+
v-bind="rootProps"
|
|
81
|
+
@update:model-value="onUpdateModelValue"
|
|
82
|
+
@update:expanded="onUpdateExpanded"
|
|
83
|
+
>
|
|
84
|
+
<template #default="{ flattenItems }">
|
|
85
|
+
<TreeItem
|
|
86
|
+
v-for="entry in flattenItems"
|
|
87
|
+
:key="entry._id"
|
|
88
|
+
v-slot="{ isExpanded, isSelected, isIndeterminate }"
|
|
89
|
+
:disabled="entry.value.disabled"
|
|
90
|
+
v-bind="treeItemProps(entry, entry.level)"
|
|
91
|
+
>
|
|
92
|
+
<Icon
|
|
93
|
+
v-if="entry.hasChildren"
|
|
94
|
+
:name="icons.chevronRight"
|
|
95
|
+
:data-expanded="isExpanded ? '' : void 0"
|
|
96
|
+
v-bind="toggleProps"
|
|
97
|
+
/>
|
|
98
|
+
<span v-else v-bind="spacerProps" />
|
|
99
|
+
|
|
100
|
+
<!--
|
|
101
|
+
A read-only echo of TreeItem's own isSelected/isIndeterminate,
|
|
102
|
+
not a second control of its own - the row itself (TreeItem's
|
|
103
|
+
own rendered root, already the roving-tabindex/click target
|
|
104
|
+
via Reka) is the one real way to select. pointer-events-none
|
|
105
|
+
makes a real mouse click pass through to that row instead of
|
|
106
|
+
toggling the checkbox in place; Checkbox.vue has no prop of
|
|
107
|
+
its own to also pull its inner CheckboxRoot out of tab order
|
|
108
|
+
(a real, if minor, gap - out of scope to add here), so it
|
|
109
|
+
stays independently focusable via keyboard. Harmless if
|
|
110
|
+
reached that way: modelValue is always a concrete value
|
|
111
|
+
(never left undefined), so Reka's own controlled-mode getter
|
|
112
|
+
keeps reading it straight from this prop regardless of what
|
|
113
|
+
the inner control tries to toggle locally - nothing to
|
|
114
|
+
observably desync.
|
|
115
|
+
-->
|
|
116
|
+
<Checkbox
|
|
117
|
+
v-if="checkbox"
|
|
118
|
+
:model-value="isIndeterminate ? 'indeterminate' : isSelected"
|
|
119
|
+
v-bind="checkboxProps"
|
|
120
|
+
/>
|
|
121
|
+
|
|
122
|
+
<Icon v-if="entry.value.icon" :name="entry.value.icon" v-bind="iconProps" />
|
|
123
|
+
|
|
124
|
+
<span v-bind="labelProps">
|
|
125
|
+
<slot
|
|
126
|
+
name="item"
|
|
127
|
+
:item="entry.value"
|
|
128
|
+
:level="entry.level"
|
|
129
|
+
:expanded="isExpanded"
|
|
130
|
+
:selected="isSelected"
|
|
131
|
+
:indeterminate="isIndeterminate ?? false"
|
|
132
|
+
>
|
|
133
|
+
{{ entry.value.label }}
|
|
134
|
+
</slot>
|
|
135
|
+
</span>
|
|
136
|
+
</TreeItem>
|
|
137
|
+
</template>
|
|
138
|
+
</TreeRoot>
|
|
139
|
+
</template>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { TreeThemeSlots } from '../theme/tree.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { treeTheme } from '../theme/tree.js';
|
|
5
|
+
type TreeVariants = VariantProps<typeof treeTheme>;
|
|
6
|
+
export interface TreeItemType {
|
|
7
|
+
label: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
children?: TreeItemType[];
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Slots = TreeSlots;
|
|
15
|
+
export interface TreeProps {
|
|
16
|
+
items: TreeItemType[];
|
|
17
|
+
modelValue?: TreeItemType | TreeItemType[];
|
|
18
|
+
defaultValue?: TreeItemType | TreeItemType[];
|
|
19
|
+
expanded?: string[];
|
|
20
|
+
defaultExpanded?: string[];
|
|
21
|
+
multiple?: boolean;
|
|
22
|
+
/** Shows a tri-state checkbox per row (reusing Checkbox.vue's own boolean|'indeterminate' model) - also turns on `multiple`/`propagateSelect`/`bubbleSelect` together, since checkbox mode's whole point is parent<->children selection propagation. */
|
|
23
|
+
checkbox?: boolean;
|
|
24
|
+
/** Selecting a parent also selects/deselects every one of its descendants. */
|
|
25
|
+
propagateSelect?: boolean;
|
|
26
|
+
/** Selecting all of a parent's children also selects the parent (and marks it indeterminate for a partial selection). */
|
|
27
|
+
bubbleSelect?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/** @default item => item.value ?? item.label */
|
|
30
|
+
getKey?: (item: TreeItemType) => string;
|
|
31
|
+
/** @default item => item.children */
|
|
32
|
+
getChildren?: (item: TreeItemType) => TreeItemType[] | undefined;
|
|
33
|
+
size?: TreeVariants['size'];
|
|
34
|
+
ui?: UiProp<TreeThemeSlots>;
|
|
35
|
+
}
|
|
36
|
+
export interface TreeEmits {
|
|
37
|
+
'update:modelValue': [value: TreeItemType | TreeItemType[]];
|
|
38
|
+
'update:expanded': [value: string[]];
|
|
39
|
+
}
|
|
40
|
+
export interface TreeSlots {
|
|
41
|
+
/** Replaces a row's default icon+label content - scoped with the node itself plus its live expanded/selected/indeterminate state. */
|
|
42
|
+
item?: (props: {
|
|
43
|
+
item: TreeItemType;
|
|
44
|
+
level: number;
|
|
45
|
+
expanded: boolean;
|
|
46
|
+
selected: boolean;
|
|
47
|
+
indeterminate: boolean;
|
|
48
|
+
}) => any;
|
|
49
|
+
}
|
|
50
|
+
declare const __VLS_base: import("vue").DefineComponent<TreeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
"update:modelValue": (value: TreeItemType | TreeItemType[]) => any;
|
|
52
|
+
"update:expanded": (value: string[]) => any;
|
|
53
|
+
}, string, import("vue").PublicProps, Readonly<TreeProps> & Readonly<{
|
|
54
|
+
"onUpdate:modelValue"?: ((value: TreeItemType | TreeItemType[]) => any) | undefined;
|
|
55
|
+
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
56
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
57
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
58
|
+
declare const _default: typeof __VLS_export;
|
|
59
|
+
export default _default;
|
|
60
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
61
|
+
new (): {
|
|
62
|
+
$slots: S;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface SelectOptionGroup {
|
|
7
|
+
label: string;
|
|
8
|
+
items: SelectOption[];
|
|
9
|
+
}
|
|
10
|
+
export type SelectItems = (SelectOption | SelectOptionGroup)[];
|
|
11
|
+
export declare function isOptionGroup(entry: SelectOption | SelectOptionGroup): entry is SelectOptionGroup;
|
|
12
|
+
/** Flattens groups into a plain option list - groups lose their header when virtualized. */
|
|
13
|
+
export declare function flattenItems(items: SelectItems): SelectOption[];
|
|
14
|
+
interface SelectLikeProps {
|
|
15
|
+
items: SelectItems;
|
|
16
|
+
valueKey?: string;
|
|
17
|
+
labelKey?: string;
|
|
18
|
+
modelValue?: string | string[];
|
|
19
|
+
multiple?: boolean;
|
|
20
|
+
displayMode?: 'comma' | 'chip';
|
|
21
|
+
maxChips?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ResolvedOption {
|
|
24
|
+
value: string;
|
|
25
|
+
label: string;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
raw: SelectOption;
|
|
28
|
+
}
|
|
29
|
+
export declare function useComboboxSelect(props: SelectLikeProps, emit: (event: 'update:modelValue', value: string | string[] | undefined) => void, { creatable }?: {
|
|
30
|
+
creatable?: boolean;
|
|
31
|
+
}): {
|
|
32
|
+
flatOptions: ComputedRef<ResolvedOption[]>;
|
|
33
|
+
selectedValues: ComputedRef<string[]>;
|
|
34
|
+
selectedOptions: ComputedRef<ResolvedOption[]>;
|
|
35
|
+
visibleOptions: ComputedRef<ResolvedOption[]>;
|
|
36
|
+
overflowOptions: ComputedRef<ResolvedOption[]>;
|
|
37
|
+
commaText: ComputedRef<string>;
|
|
38
|
+
resolveOption: (value: string) => ResolvedOption;
|
|
39
|
+
toOption: (raw: SelectOption) => ResolvedOption;
|
|
40
|
+
setValue: (value: string | string[] | undefined) => void;
|
|
41
|
+
removeValue: (value: string) => void;
|
|
42
|
+
hasMatchingOption: (text: string) => boolean;
|
|
43
|
+
commitCreatableText: (rawText: string) => boolean;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
export function isOptionGroup(entry) {
|
|
3
|
+
return "items" in entry && Array.isArray(entry.items);
|
|
4
|
+
}
|
|
5
|
+
export function flattenItems(items) {
|
|
6
|
+
return items.flatMap((entry) => isOptionGroup(entry) ? entry.items : [entry]);
|
|
7
|
+
}
|
|
8
|
+
export function useComboboxSelect(props, emit, { creatable = false } = {}) {
|
|
9
|
+
const valueKey = computed(() => props.valueKey ?? "value");
|
|
10
|
+
const labelKey = computed(() => props.labelKey ?? "label");
|
|
11
|
+
const flatOptions = computed(() => flattenItems(props.items).map((raw) => ({
|
|
12
|
+
value: String(raw[valueKey.value] ?? ""),
|
|
13
|
+
label: String(raw[labelKey.value] ?? raw[valueKey.value] ?? ""),
|
|
14
|
+
disabled: !!raw.disabled,
|
|
15
|
+
raw
|
|
16
|
+
})));
|
|
17
|
+
const selectedValues = computed(() => {
|
|
18
|
+
const v = props.modelValue;
|
|
19
|
+
if (v === void 0)
|
|
20
|
+
return [];
|
|
21
|
+
return Array.isArray(v) ? v : [v];
|
|
22
|
+
});
|
|
23
|
+
function resolveOption(value) {
|
|
24
|
+
return flatOptions.value.find((o) => o.value === value) ?? { value, label: value, disabled: false, raw: { [valueKey.value]: value, [labelKey.value]: value } };
|
|
25
|
+
}
|
|
26
|
+
function toOption(raw) {
|
|
27
|
+
return {
|
|
28
|
+
value: String(raw[valueKey.value] ?? ""),
|
|
29
|
+
label: String(raw[labelKey.value] ?? raw[valueKey.value] ?? ""),
|
|
30
|
+
disabled: !!raw.disabled,
|
|
31
|
+
raw
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const selectedOptions = computed(() => selectedValues.value.map(resolveOption));
|
|
35
|
+
const maxChips = computed(() => props.maxChips ?? 3);
|
|
36
|
+
const visibleOptions = computed(() => selectedOptions.value.slice(0, maxChips.value));
|
|
37
|
+
const overflowOptions = computed(() => selectedOptions.value.slice(maxChips.value));
|
|
38
|
+
const commaText = computed(() => visibleOptions.value.map((o) => o.label).join(", "));
|
|
39
|
+
function setValue(value) {
|
|
40
|
+
emit("update:modelValue", value);
|
|
41
|
+
}
|
|
42
|
+
function removeValue(value) {
|
|
43
|
+
if (!props.multiple) {
|
|
44
|
+
setValue(void 0);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
setValue(selectedValues.value.filter((v) => v !== value));
|
|
48
|
+
}
|
|
49
|
+
function hasMatchingOption(text) {
|
|
50
|
+
const lower = text.toLowerCase();
|
|
51
|
+
return flatOptions.value.some((o) => o.value.toLowerCase().includes(lower) || o.label.toLowerCase().includes(lower));
|
|
52
|
+
}
|
|
53
|
+
function commitCreatableText(rawText) {
|
|
54
|
+
const text = rawText.trim();
|
|
55
|
+
if (!creatable || !text || hasMatchingOption(text))
|
|
56
|
+
return false;
|
|
57
|
+
if (props.multiple) {
|
|
58
|
+
if (selectedValues.value.some((v) => v.toLowerCase() === text.toLowerCase()))
|
|
59
|
+
return false;
|
|
60
|
+
setValue([...selectedValues.value, text]);
|
|
61
|
+
} else {
|
|
62
|
+
setValue(text);
|
|
63
|
+
}
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
flatOptions,
|
|
68
|
+
selectedValues,
|
|
69
|
+
selectedOptions,
|
|
70
|
+
visibleOptions,
|
|
71
|
+
overflowOptions,
|
|
72
|
+
commaText,
|
|
73
|
+
resolveOption,
|
|
74
|
+
toOption,
|
|
75
|
+
setValue,
|
|
76
|
+
removeValue,
|
|
77
|
+
hasMatchingOption,
|
|
78
|
+
commitCreatableText
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useState } from "#imports";
|
|
2
|
+
export function useCommandPalette() {
|
|
3
|
+
const isOpen = useState("selaras-command-palette-open", () => false);
|
|
4
|
+
function open() {
|
|
5
|
+
isOpen.value = true;
|
|
6
|
+
}
|
|
7
|
+
function close() {
|
|
8
|
+
isOpen.value = false;
|
|
9
|
+
}
|
|
10
|
+
function toggle() {
|
|
11
|
+
isOpen.value = !isOpen.value;
|
|
12
|
+
}
|
|
13
|
+
return { isOpen, open, close, toggle };
|
|
14
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Component, Ref } from 'vue';
|
|
2
|
+
export interface DrawerInstance {
|
|
3
|
+
id: number;
|
|
4
|
+
component: Component;
|
|
5
|
+
props: Record<string, unknown>;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
10
|
+
handle?: boolean;
|
|
11
|
+
snapPoints?: (number | string)[];
|
|
12
|
+
snapPoint?: number | string | null;
|
|
13
|
+
snapToSequentialPoints?: boolean;
|
|
14
|
+
dismissible?: boolean;
|
|
15
|
+
modal?: boolean | 'trap-focus';
|
|
16
|
+
overlay?: boolean;
|
|
17
|
+
transition?: boolean;
|
|
18
|
+
resolve: (value: unknown) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface UseDrawerOpenOptions {
|
|
21
|
+
props?: Record<string, unknown>;
|
|
22
|
+
/** Registered with Reka as the drawer's accessible name, visually hidden - the opened component still supplies its own visible header via the content slot. */
|
|
23
|
+
title?: string;
|
|
24
|
+
/** Registered with Reka as the drawer's accessible description, visually hidden. */
|
|
25
|
+
description?: string;
|
|
26
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
27
|
+
handle?: boolean;
|
|
28
|
+
snapPoints?: (number | string)[];
|
|
29
|
+
snapPoint?: number | string | null;
|
|
30
|
+
snapToSequentialPoints?: boolean;
|
|
31
|
+
dismissible?: boolean;
|
|
32
|
+
modal?: boolean | 'trap-focus';
|
|
33
|
+
overlay?: boolean;
|
|
34
|
+
transition?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface UseDrawerReturn {
|
|
37
|
+
drawers: Ref<DrawerInstance[]>;
|
|
38
|
+
open: <T = void>(component: Component, options?: UseDrawerOpenOptions) => Promise<T | undefined>;
|
|
39
|
+
close: (id: number, value?: unknown) => void;
|
|
40
|
+
remove: (id: number) => void;
|
|
41
|
+
}
|
|
42
|
+
export declare function useDrawer(): UseDrawerReturn;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { markRaw, ref } from "vue";
|
|
2
|
+
const drawers = ref([]);
|
|
3
|
+
let counter = 0;
|
|
4
|
+
export function useDrawer() {
|
|
5
|
+
function open(component, options) {
|
|
6
|
+
return new Promise((resolve) => {
|
|
7
|
+
drawers.value.push({
|
|
8
|
+
id: counter++,
|
|
9
|
+
// Vue components are meant to stay an opaque, non-reactive value -
|
|
10
|
+
// without this, pushing one into this reactive array wraps it in
|
|
11
|
+
// a reactive proxy too, which Vue's own dev warning flags as
|
|
12
|
+
// wasted overhead for no benefit.
|
|
13
|
+
component: markRaw(component),
|
|
14
|
+
props: options?.props ?? {},
|
|
15
|
+
isOpen: true,
|
|
16
|
+
title: options?.title,
|
|
17
|
+
description: options?.description,
|
|
18
|
+
side: options?.side,
|
|
19
|
+
handle: options?.handle,
|
|
20
|
+
snapPoints: options?.snapPoints,
|
|
21
|
+
snapPoint: options?.snapPoint,
|
|
22
|
+
snapToSequentialPoints: options?.snapToSequentialPoints,
|
|
23
|
+
dismissible: options?.dismissible,
|
|
24
|
+
modal: options?.modal,
|
|
25
|
+
overlay: options?.overlay,
|
|
26
|
+
transition: options?.transition,
|
|
27
|
+
resolve
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function close(id, value) {
|
|
32
|
+
const instance = drawers.value.find((d) => d.id === id);
|
|
33
|
+
if (!instance)
|
|
34
|
+
return;
|
|
35
|
+
instance.isOpen = false;
|
|
36
|
+
instance.resolve(value);
|
|
37
|
+
}
|
|
38
|
+
function remove(id) {
|
|
39
|
+
const index = drawers.value.findIndex((d) => d.id === id);
|
|
40
|
+
if (index !== -1)
|
|
41
|
+
drawers.value.splice(index, 1);
|
|
42
|
+
}
|
|
43
|
+
return { drawers, open, close, remove };
|
|
44
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
export interface FormFieldContext {
|
|
3
|
+
id: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6
|
+
invalid: ComputedRef<boolean>;
|
|
7
|
+
describedBy: ComputedRef<string | undefined>;
|
|
8
|
+
}
|
|
9
|
+
export declare function provideFormField(context: FormFieldContext): void;
|
|
10
|
+
export declare function useFormField(): FormFieldContext | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { inject, provide } from "vue";
|
|
2
|
+
const formFieldInjectionKey = Symbol("selaras-form-field");
|
|
3
|
+
export function provideFormField(context) {
|
|
4
|
+
provide(formFieldInjectionKey, context);
|
|
5
|
+
}
|
|
6
|
+
export function useFormField() {
|
|
7
|
+
return inject(formFieldInjectionKey, void 0);
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
import type { IconRegistry } from '../utils/icons.js';
|
|
3
|
+
/**
|
|
4
|
+
* Merges a consumer's app.config.icons override onto the default (Hugeicons)
|
|
5
|
+
* registry - mirrors useComponentTheme's app.config.ui.<key> merge (see
|
|
6
|
+
* ../utils/ui.ts), just for icon name strings instead of tv() themes, so a
|
|
7
|
+
* single semantic key (e.g. close) can be overridden once for every
|
|
8
|
+
* component that uses it rather than per component.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useIcons(): ComputedRef<IconRegistry>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* The app-wide default BCP-47 locale code, overridable via
|
|
4
|
+
* `app.config.locale` - mirrors useIcons()/useMessages()'s own
|
|
5
|
+
* app.config.<key> merge (see use-icons.ts), just for a single string
|
|
6
|
+
* instead of a registry. DatePicker/InputNumber/TimeStepper each read
|
|
7
|
+
* this as their own `locale` prop's fallback instead of hardcoding
|
|
8
|
+
* 'en-US' independently, so a consumer sets the locale once instead of
|
|
9
|
+
* repeating it on every instance - an explicit per-instance `locale`
|
|
10
|
+
* prop still overrides this.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useLocale(): ComputedRef<string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Whether the viewport is currently at or below `breakpoint` px wide.
|
|
4
|
+
* Defaults to `false` on SSR/first render (no `window` there) - corrected
|
|
5
|
+
* once mounted, the same "safer default, corrected client-side" precedent
|
|
6
|
+
* DashboardGroup's own inline version of this (and ReadMore's `truncated`
|
|
7
|
+
* default) already use. Tracks a `matchMedia` `change` listener rather
|
|
8
|
+
* than a one-off check, so a live resize across the breakpoint updates
|
|
9
|
+
* reactively instead of only being read once at mount.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useIsMobile(breakpoint?: number): Ref<boolean>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { onMounted, onUnmounted, ref } from "vue";
|
|
2
|
+
export function useIsMobile(breakpoint = 768) {
|
|
3
|
+
const isMobile = ref(false);
|
|
4
|
+
let mediaQuery;
|
|
5
|
+
function update() {
|
|
6
|
+
isMobile.value = mediaQuery?.matches ?? false;
|
|
7
|
+
}
|
|
8
|
+
onMounted(() => {
|
|
9
|
+
mediaQuery = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
|
|
10
|
+
update();
|
|
11
|
+
mediaQuery.addEventListener("change", update);
|
|
12
|
+
});
|
|
13
|
+
onUnmounted(() => mediaQuery?.removeEventListener("change", update));
|
|
14
|
+
return isMobile;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
import type { MessageRegistry } from '../utils/messages.js';
|
|
3
|
+
/**
|
|
4
|
+
* Merges a consumer's app.config.messages override onto the default
|
|
5
|
+
* (English) registry - mirrors useIcons' own app.config.icons merge (see
|
|
6
|
+
* use-icons.ts), just for UI copy instead of icon names. This is where a
|
|
7
|
+
* consuming app wires up real translation: override every key with
|
|
8
|
+
* locale-aware text (or functions, for the interpolated ones), typically
|
|
9
|
+
* computed from whatever i18n library the app itself already uses -
|
|
10
|
+
* this library doesn't ship one itself, just the override surface.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useMessages(): ComputedRef<MessageRegistry>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useAppConfig } from "#imports";
|
|
3
|
+
import { defaultMessages } from "../utils/messages.js";
|
|
4
|
+
export function useMessages() {
|
|
5
|
+
const appConfig = useAppConfig();
|
|
6
|
+
return computed(() => ({ ...defaultMessages, ...appConfig.messages }));
|
|
7
|
+
}
|