@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,32 @@
|
|
|
1
|
+
import type { Component, Ref } from 'vue';
|
|
2
|
+
export interface ModalInstance {
|
|
3
|
+
id: number;
|
|
4
|
+
component: Component;
|
|
5
|
+
props: Record<string, unknown>;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
dismissible?: boolean;
|
|
10
|
+
modal?: boolean;
|
|
11
|
+
overlay?: boolean;
|
|
12
|
+
transition?: boolean;
|
|
13
|
+
resolve: (value: unknown) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface UseModalOpenOptions {
|
|
16
|
+
props?: Record<string, unknown>;
|
|
17
|
+
/** Registered with Reka as the dialog's accessible name, visually hidden - the opened component still supplies its own visible header via the content slot. */
|
|
18
|
+
title?: string;
|
|
19
|
+
/** Registered with Reka as the dialog's accessible description, visually hidden. */
|
|
20
|
+
description?: string;
|
|
21
|
+
dismissible?: boolean;
|
|
22
|
+
modal?: boolean;
|
|
23
|
+
overlay?: boolean;
|
|
24
|
+
transition?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface UseModalReturn {
|
|
27
|
+
modals: Ref<ModalInstance[]>;
|
|
28
|
+
open: <T = void>(component: Component, options?: UseModalOpenOptions) => Promise<T | undefined>;
|
|
29
|
+
close: (id: number, value?: unknown) => void;
|
|
30
|
+
remove: (id: number) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function useModal(): UseModalReturn;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { markRaw, ref } from "vue";
|
|
2
|
+
const modals = ref([]);
|
|
3
|
+
let counter = 0;
|
|
4
|
+
export function useModal() {
|
|
5
|
+
function open(component, options) {
|
|
6
|
+
return new Promise((resolve) => {
|
|
7
|
+
modals.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
|
+
dismissible: options?.dismissible,
|
|
19
|
+
modal: options?.modal,
|
|
20
|
+
overlay: options?.overlay,
|
|
21
|
+
transition: options?.transition,
|
|
22
|
+
resolve
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function close(id, value) {
|
|
27
|
+
const instance = modals.value.find((m) => m.id === id);
|
|
28
|
+
if (!instance)
|
|
29
|
+
return;
|
|
30
|
+
instance.isOpen = false;
|
|
31
|
+
instance.resolve(value);
|
|
32
|
+
}
|
|
33
|
+
function remove(id) {
|
|
34
|
+
const index = modals.value.findIndex((m) => m.id === id);
|
|
35
|
+
if (index !== -1)
|
|
36
|
+
modals.value.splice(index, 1);
|
|
37
|
+
}
|
|
38
|
+
return { modals, open, close, remove };
|
|
39
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Whether v-ripple should actually spawn a ripple - mirrors useIcons' own
|
|
4
|
+
* app.config merge (see use-icons.ts), just a single top-level boolean
|
|
5
|
+
* instead of a registry object. Defaults to enabled; app.config.ripple =
|
|
6
|
+
* false turns it off globally for every component that binds v-ripple to
|
|
7
|
+
* this rather than hardcoding it unconditionally on.
|
|
8
|
+
*
|
|
9
|
+
* Deliberately not read inside the directive itself (directives/ripple.ts)
|
|
10
|
+
* - useAppConfig() is a Nuxt composable meant to run in a component's own
|
|
11
|
+
* setup context, not a directive lifecycle hook, so each consuming
|
|
12
|
+
* component reads this itself and passes the result as v-ripple's binding
|
|
13
|
+
* value (`v-ripple="rippleEnabled"`) instead.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useRippleEnabled(): ComputedRef<boolean>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Component, Ref } from 'vue';
|
|
2
|
+
export interface SlideoverInstance {
|
|
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
|
+
inset?: boolean;
|
|
11
|
+
dismissible?: boolean;
|
|
12
|
+
modal?: boolean;
|
|
13
|
+
overlay?: boolean;
|
|
14
|
+
transition?: boolean;
|
|
15
|
+
resolve: (value: unknown) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface UseSlideoverOpenOptions {
|
|
18
|
+
props?: Record<string, unknown>;
|
|
19
|
+
/** Registered with Reka as the panel's accessible name, visually hidden - the opened component still supplies its own visible header via the content slot. */
|
|
20
|
+
title?: string;
|
|
21
|
+
/** Registered with Reka as the panel's accessible description, visually hidden. */
|
|
22
|
+
description?: string;
|
|
23
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
24
|
+
inset?: boolean;
|
|
25
|
+
dismissible?: boolean;
|
|
26
|
+
modal?: boolean;
|
|
27
|
+
overlay?: boolean;
|
|
28
|
+
transition?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface UseSlideoverReturn {
|
|
31
|
+
slideovers: Ref<SlideoverInstance[]>;
|
|
32
|
+
open: <T = void>(component: Component, options?: UseSlideoverOpenOptions) => Promise<T | undefined>;
|
|
33
|
+
close: (id: number, value?: unknown) => void;
|
|
34
|
+
remove: (id: number) => void;
|
|
35
|
+
}
|
|
36
|
+
export declare function useSlideover(): UseSlideoverReturn;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { markRaw, ref } from "vue";
|
|
2
|
+
const slideovers = ref([]);
|
|
3
|
+
let counter = 0;
|
|
4
|
+
export function useSlideover() {
|
|
5
|
+
function open(component, options) {
|
|
6
|
+
return new Promise((resolve) => {
|
|
7
|
+
slideovers.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
|
+
inset: options?.inset,
|
|
20
|
+
dismissible: options?.dismissible,
|
|
21
|
+
modal: options?.modal,
|
|
22
|
+
overlay: options?.overlay,
|
|
23
|
+
transition: options?.transition,
|
|
24
|
+
resolve
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function close(id, value) {
|
|
29
|
+
const instance = slideovers.value.find((s) => s.id === id);
|
|
30
|
+
if (!instance)
|
|
31
|
+
return;
|
|
32
|
+
instance.isOpen = false;
|
|
33
|
+
instance.resolve(value);
|
|
34
|
+
}
|
|
35
|
+
function remove(id) {
|
|
36
|
+
const index = slideovers.value.findIndex((s) => s.id === id);
|
|
37
|
+
if (index !== -1)
|
|
38
|
+
slideovers.value.splice(index, 1);
|
|
39
|
+
}
|
|
40
|
+
return { slideovers, open, close, remove };
|
|
41
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
interface UseTableProps {
|
|
3
|
+
data: unknown[];
|
|
4
|
+
selectable?: boolean;
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
virtualize?: unknown;
|
|
7
|
+
sorting?: any[];
|
|
8
|
+
defaultSorting?: any[];
|
|
9
|
+
rowSelection?: Record<string, boolean>;
|
|
10
|
+
globalFilter?: string;
|
|
11
|
+
pageIndex?: number;
|
|
12
|
+
expanded?: any;
|
|
13
|
+
columnVisibility?: Record<string, boolean>;
|
|
14
|
+
manualSorting?: boolean;
|
|
15
|
+
manualFiltering?: boolean;
|
|
16
|
+
manualPagination?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface UseTableEmit {
|
|
19
|
+
(event: 'update:sorting', value: any[]): void;
|
|
20
|
+
(event: 'update:rowSelection', value: Record<string, boolean>): void;
|
|
21
|
+
(event: 'update:globalFilter', value: string): void;
|
|
22
|
+
(event: 'update:pageIndex', value: number): void;
|
|
23
|
+
(event: 'update:expanded', value: any): void;
|
|
24
|
+
(event: 'update:columnVisibility', value: Record<string, boolean>): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Pure TanStack wiring - the final column defs (including any synthetic
|
|
28
|
+
* selection/expand column, which need to render SCheckbox/an expand button
|
|
29
|
+
* and so live in Table.vue instead) are passed in already built.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useTable(props: UseTableProps, emit: UseTableEmit, columns: ComputedRef<any[]>, columnPinning: ComputedRef<{
|
|
32
|
+
start: string[];
|
|
33
|
+
end: string[];
|
|
34
|
+
}>): {
|
|
35
|
+
table: import("@tanstack/vue-table").AppVueTable<{
|
|
36
|
+
rowSortingFeature: import("@tanstack/vue-table").TableFeature;
|
|
37
|
+
rowSelectionFeature: import("@tanstack/vue-table").TableFeature;
|
|
38
|
+
rowPaginationFeature: import("@tanstack/vue-table").TableFeature;
|
|
39
|
+
rowExpandingFeature: import("@tanstack/vue-table").TableFeature;
|
|
40
|
+
columnFilteringFeature: import("@tanstack/vue-table").TableFeature;
|
|
41
|
+
columnVisibilityFeature: import("@tanstack/vue-table").TableFeature;
|
|
42
|
+
columnPinningFeature: import("@tanstack/vue-table").TableFeature;
|
|
43
|
+
globalFilteringFeature: import("@tanstack/vue-table").TableFeature;
|
|
44
|
+
sortedRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
45
|
+
paginatedRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
46
|
+
filteredRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
47
|
+
expandedRowModel: (table: import("@tanstack/vue-table").Table<any, any>) => () => import("@tanstack/vue-table").RowModel<any, any>;
|
|
48
|
+
sortFns: {
|
|
49
|
+
alphanumeric: import("@tanstack/vue-table").CreatedSortFn<any, any>;
|
|
50
|
+
};
|
|
51
|
+
filterFns: {
|
|
52
|
+
includesString: import("@tanstack/vue-table").CreatedFilterFn<any, any>;
|
|
53
|
+
};
|
|
54
|
+
}, import("@tanstack/vue-table").RowData, Record<string, import("@tanstack/vue-table").ComponentType<any>>, Record<string, import("@tanstack/vue-table").ComponentType<any>>, Record<string, import("@tanstack/vue-table").ComponentType<any>>>;
|
|
55
|
+
sorting: import("vue").WritableComputedRef<any[], any[]>;
|
|
56
|
+
rowSelection: import("vue").WritableComputedRef<Record<string, boolean>, Record<string, boolean>>;
|
|
57
|
+
globalFilter: import("vue").WritableComputedRef<string, string>;
|
|
58
|
+
pageIndex: import("vue").WritableComputedRef<number, number>;
|
|
59
|
+
expanded: import("vue").WritableComputedRef<any, any>;
|
|
60
|
+
columnVisibility: import("vue").WritableComputedRef<Record<string, boolean>, Record<string, boolean>>;
|
|
61
|
+
effectivePageSize: ComputedRef<number>;
|
|
62
|
+
};
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import {
|
|
2
|
+
columnFilteringFeature,
|
|
3
|
+
columnPinningFeature,
|
|
4
|
+
columnVisibilityFeature,
|
|
5
|
+
createExpandedRowModel,
|
|
6
|
+
createFilteredRowModel,
|
|
7
|
+
createPaginatedRowModel,
|
|
8
|
+
createSortedRowModel,
|
|
9
|
+
createTableHook,
|
|
10
|
+
filterFn_includesString,
|
|
11
|
+
globalFilteringFeature,
|
|
12
|
+
rowExpandingFeature,
|
|
13
|
+
rowPaginationFeature,
|
|
14
|
+
rowSelectionFeature,
|
|
15
|
+
rowSortingFeature,
|
|
16
|
+
sortFn_alphanumeric
|
|
17
|
+
} from "@tanstack/vue-table";
|
|
18
|
+
import { computed, ref } from "vue";
|
|
19
|
+
const { useAppTable } = createTableHook({
|
|
20
|
+
features: {
|
|
21
|
+
rowSortingFeature,
|
|
22
|
+
rowSelectionFeature,
|
|
23
|
+
rowPaginationFeature,
|
|
24
|
+
rowExpandingFeature,
|
|
25
|
+
columnFilteringFeature,
|
|
26
|
+
columnVisibilityFeature,
|
|
27
|
+
columnPinningFeature,
|
|
28
|
+
globalFilteringFeature,
|
|
29
|
+
sortedRowModel: createSortedRowModel(),
|
|
30
|
+
paginatedRowModel: createPaginatedRowModel(),
|
|
31
|
+
filteredRowModel: createFilteredRowModel(),
|
|
32
|
+
expandedRowModel: createExpandedRowModel(),
|
|
33
|
+
sortFns: { alphanumeric: sortFn_alphanumeric },
|
|
34
|
+
filterFns: { includesString: filterFn_includesString }
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export function useTable(props, emit, columns, columnPinning) {
|
|
38
|
+
const internalSorting = ref(props.defaultSorting ?? []);
|
|
39
|
+
const sorting = computed({
|
|
40
|
+
get: () => props.sorting ?? internalSorting.value,
|
|
41
|
+
set: (value) => {
|
|
42
|
+
internalSorting.value = value;
|
|
43
|
+
emit("update:sorting", value);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const internalRowSelection = ref({});
|
|
47
|
+
const rowSelection = computed({
|
|
48
|
+
get: () => props.rowSelection ?? internalRowSelection.value,
|
|
49
|
+
set: (value) => {
|
|
50
|
+
internalRowSelection.value = value;
|
|
51
|
+
emit("update:rowSelection", value);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
const internalGlobalFilter = ref("");
|
|
55
|
+
const globalFilter = computed({
|
|
56
|
+
get: () => props.globalFilter ?? internalGlobalFilter.value,
|
|
57
|
+
set: (value) => {
|
|
58
|
+
internalGlobalFilter.value = value;
|
|
59
|
+
emit("update:globalFilter", value);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const internalPageIndex = ref(0);
|
|
63
|
+
const pageIndex = computed({
|
|
64
|
+
get: () => props.pageIndex ?? internalPageIndex.value,
|
|
65
|
+
set: (value) => {
|
|
66
|
+
internalPageIndex.value = value;
|
|
67
|
+
emit("update:pageIndex", value);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const effectivePageSize = computed(() => props.virtualize || props.pageSize === void 0 ? Math.max(props.data.length, 1) : props.pageSize);
|
|
71
|
+
const internalExpanded = ref({});
|
|
72
|
+
const expanded = computed({
|
|
73
|
+
get: () => props.expanded ?? internalExpanded.value,
|
|
74
|
+
set: (value) => {
|
|
75
|
+
internalExpanded.value = value;
|
|
76
|
+
emit("update:expanded", value);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
const internalColumnVisibility = ref({});
|
|
80
|
+
const columnVisibility = computed({
|
|
81
|
+
get: () => props.columnVisibility ?? internalColumnVisibility.value,
|
|
82
|
+
set: (value) => {
|
|
83
|
+
internalColumnVisibility.value = value;
|
|
84
|
+
emit("update:columnVisibility", value);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const table = useAppTable({
|
|
88
|
+
data: computed(() => props.data),
|
|
89
|
+
columns,
|
|
90
|
+
enableRowSelection: computed(() => !!props.selectable),
|
|
91
|
+
// Row expansion otherwise only allows expanding rows that already have
|
|
92
|
+
// real hierarchical subRows - this table's own expansion is manual
|
|
93
|
+
// (detail content via the `expanded` slot), not a subRow tree.
|
|
94
|
+
getRowCanExpand: () => true,
|
|
95
|
+
// Opts out of the local sorted/filtered/paginated row models - state
|
|
96
|
+
// still lives here (sorting/globalFilter/pageIndex above, still
|
|
97
|
+
// emitting their own update:* events the normal way), only the row
|
|
98
|
+
// model itself defers to whatever `data` already is. Captured once at
|
|
99
|
+
// setup, not wrapped in `computed()` - a table's manual/local mode
|
|
100
|
+
// isn't realistically expected to flip reactively mid-session (it's
|
|
101
|
+
// established once, alongside how `data` itself is sourced), and
|
|
102
|
+
// wrapping `manualPagination` specifically in a reactive computed was
|
|
103
|
+
// found to corrupt @tanstack/vue-table's own internal page-index
|
|
104
|
+
// auto-reset tracking (Previous/Next silently stopped changing pages,
|
|
105
|
+
// even though the resolved boolean value was identical either way) -
|
|
106
|
+
// a real bug in this exact adapter version, not a misuse on our part.
|
|
107
|
+
// Kept all three plain for consistency rather than reactive-except-one.
|
|
108
|
+
manualSorting: !!props.manualSorting,
|
|
109
|
+
manualFiltering: !!props.manualFiltering,
|
|
110
|
+
manualPagination: !!props.manualPagination,
|
|
111
|
+
state: computed(() => ({
|
|
112
|
+
sorting: sorting.value,
|
|
113
|
+
rowSelection: rowSelection.value,
|
|
114
|
+
globalFilter: globalFilter.value,
|
|
115
|
+
pagination: { pageIndex: pageIndex.value, pageSize: effectivePageSize.value },
|
|
116
|
+
expanded: expanded.value,
|
|
117
|
+
columnVisibility: columnVisibility.value,
|
|
118
|
+
columnPinning: columnPinning.value
|
|
119
|
+
})),
|
|
120
|
+
onSortingChange: (updater) => {
|
|
121
|
+
sorting.value = typeof updater === "function" ? updater(sorting.value) : updater;
|
|
122
|
+
},
|
|
123
|
+
onRowSelectionChange: (updater) => {
|
|
124
|
+
rowSelection.value = typeof updater === "function" ? updater(rowSelection.value) : updater;
|
|
125
|
+
},
|
|
126
|
+
onGlobalFilterChange: (updater) => {
|
|
127
|
+
globalFilter.value = typeof updater === "function" ? updater(globalFilter.value) : updater;
|
|
128
|
+
},
|
|
129
|
+
onPaginationChange: (updater) => {
|
|
130
|
+
const current = { pageIndex: pageIndex.value, pageSize: effectivePageSize.value };
|
|
131
|
+
const next = typeof updater === "function" ? updater(current) : updater;
|
|
132
|
+
pageIndex.value = next.pageIndex;
|
|
133
|
+
},
|
|
134
|
+
onExpandedChange: (updater) => {
|
|
135
|
+
expanded.value = typeof updater === "function" ? updater(expanded.value) : updater;
|
|
136
|
+
},
|
|
137
|
+
onColumnVisibilityChange: (updater) => {
|
|
138
|
+
columnVisibility.value = typeof updater === "function" ? updater(columnVisibility.value) : updater;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
return { table, sorting, rowSelection, globalFilter, pageIndex, expanded, columnVisibility, effectivePageSize };
|
|
142
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ToastItem {
|
|
2
|
+
id: number;
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
duration?: number;
|
|
6
|
+
/** Status - tints the icon and adds a matching left-edge accent. Scoped to just these four (not the full color palette Button/Badge/Chip expose) since a toast's color only ever means "what kind of status is this." */
|
|
7
|
+
color?: 'success' | 'danger' | 'warning' | 'info';
|
|
8
|
+
/** Overrides the color's own default icon (or shows an icon with no color set at all). */
|
|
9
|
+
icon?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function useToast(): {
|
|
12
|
+
toasts: import("vue").Ref<ToastItem[], ToastItem[]>;
|
|
13
|
+
add: (toast: Omit<ToastItem, "id">) => number;
|
|
14
|
+
remove: (id: number) => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useState } from "#imports";
|
|
2
|
+
export function useToast() {
|
|
3
|
+
const toasts = useState("selaras-toasts", () => []);
|
|
4
|
+
const counter = useState("selaras-toast-counter", () => 0);
|
|
5
|
+
function add(toast) {
|
|
6
|
+
const id = counter.value++;
|
|
7
|
+
toasts.value.push({ id, ...toast });
|
|
8
|
+
return id;
|
|
9
|
+
}
|
|
10
|
+
function remove(id) {
|
|
11
|
+
const index = toasts.value.findIndex((t) => t.id === id);
|
|
12
|
+
if (index !== -1)
|
|
13
|
+
toasts.value.splice(index, 1);
|
|
14
|
+
}
|
|
15
|
+
return { toasts, add, remove };
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ripple.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ripple.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Directive } from 'vue';
|
|
2
|
+
export interface RippleOptions {
|
|
3
|
+
/** Fill color for the ripple. @default 'currentColor' */
|
|
4
|
+
color?: string;
|
|
5
|
+
/** Peak opacity the ripple reaches before fading out. @default 0.25 */
|
|
6
|
+
opacity?: number;
|
|
7
|
+
/** How long the ripple takes to grow and fade, in ms. @default 500 */
|
|
8
|
+
duration?: number;
|
|
9
|
+
}
|
|
10
|
+
/** `v-ripple` (defaults on) / `v-ripple="false"` (opt out) / `v-ripple="{ color, opacity, duration }"` (override any default). */
|
|
11
|
+
export type RippleValue = boolean | RippleOptions;
|
|
12
|
+
interface RippleHost extends HTMLElement {
|
|
13
|
+
_rippleHandler?: (event: PointerEvent) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const vRipple: Directive<RippleHost, RippleValue | undefined>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const RIPPLE_DEFAULTS = {
|
|
2
|
+
color: "currentColor",
|
|
3
|
+
opacity: 0.25,
|
|
4
|
+
duration: 500
|
|
5
|
+
};
|
|
6
|
+
function resolveOptions(value) {
|
|
7
|
+
if (value === false)
|
|
8
|
+
return void 0;
|
|
9
|
+
if (value === true || value === void 0)
|
|
10
|
+
return RIPPLE_DEFAULTS;
|
|
11
|
+
return { ...RIPPLE_DEFAULTS, ...value };
|
|
12
|
+
}
|
|
13
|
+
function spawnRipple(host, event, options) {
|
|
14
|
+
const rect = host.getBoundingClientRect();
|
|
15
|
+
const x = event.clientX - rect.left;
|
|
16
|
+
const y = event.clientY - rect.top;
|
|
17
|
+
const radius = Math.max(
|
|
18
|
+
Math.hypot(x, y),
|
|
19
|
+
Math.hypot(rect.width - x, y),
|
|
20
|
+
Math.hypot(x, rect.height - y),
|
|
21
|
+
Math.hypot(rect.width - x, rect.height - y)
|
|
22
|
+
);
|
|
23
|
+
const span = document.createElement("span");
|
|
24
|
+
span.setAttribute("aria-hidden", "true");
|
|
25
|
+
Object.assign(span.style, {
|
|
26
|
+
position: "absolute",
|
|
27
|
+
left: `${x - radius}px`,
|
|
28
|
+
top: `${y - radius}px`,
|
|
29
|
+
width: `${radius * 2}px`,
|
|
30
|
+
height: `${radius * 2}px`,
|
|
31
|
+
borderRadius: "9999px",
|
|
32
|
+
background: options.color,
|
|
33
|
+
opacity: String(options.opacity),
|
|
34
|
+
transform: "scale(0)",
|
|
35
|
+
pointerEvents: "none",
|
|
36
|
+
// The grow+fade motion itself lives in theme.css's selaras-ripple
|
|
37
|
+
// @keyframes (a shared, single definition rather than one per ripple
|
|
38
|
+
// instance) - this just points a specific instance at it with this
|
|
39
|
+
// click's own duration. Runs through the same global
|
|
40
|
+
// prefers-reduced-motion kill-switch every other animation/transition
|
|
41
|
+
// in this library already goes through (see theme.css), so it needs no
|
|
42
|
+
// separate reduced-motion handling of its own.
|
|
43
|
+
animation: `selaras-ripple ${options.duration}ms cubic-bezier(0, 0, 0.2, 1)`
|
|
44
|
+
});
|
|
45
|
+
span.addEventListener("animationend", () => span.remove());
|
|
46
|
+
host.appendChild(span);
|
|
47
|
+
}
|
|
48
|
+
function ensureContainment(host) {
|
|
49
|
+
const style = getComputedStyle(host);
|
|
50
|
+
if (style.position === "static")
|
|
51
|
+
host.style.position = "relative";
|
|
52
|
+
if (style.overflow === "visible")
|
|
53
|
+
host.style.overflow = "hidden";
|
|
54
|
+
}
|
|
55
|
+
export const vRipple = {
|
|
56
|
+
// The ripple itself is purely a client-side pointerdown effect with no
|
|
57
|
+
// server-renderable output (nothing about the host element's own SSR
|
|
58
|
+
// markup needs to change) - but Vue's server-renderer calls
|
|
59
|
+
// dir.getSSRProps(...) unconditionally on every directive bound in a
|
|
60
|
+
// template it's rendering, with no existence check first, so omitting
|
|
61
|
+
// this entirely crashes SSR outright ("dir.getSSRProps is not a
|
|
62
|
+
// function") rather than just skipping the directive.
|
|
63
|
+
getSSRProps() {
|
|
64
|
+
return void 0;
|
|
65
|
+
},
|
|
66
|
+
mounted(el, binding) {
|
|
67
|
+
const options = resolveOptions(binding.value);
|
|
68
|
+
if (!options)
|
|
69
|
+
return;
|
|
70
|
+
ensureContainment(el);
|
|
71
|
+
el._rippleHandler = (event) => spawnRipple(el, event, options);
|
|
72
|
+
el.addEventListener("pointerdown", el._rippleHandler);
|
|
73
|
+
},
|
|
74
|
+
beforeUnmount(el) {
|
|
75
|
+
if (el._rippleHandler) {
|
|
76
|
+
el.removeEventListener("pointerdown", el._rippleHandler);
|
|
77
|
+
delete el._rippleHandler;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ColorPickerBodyProps {
|
|
2
|
+
modelValue: string;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
alpha?: boolean;
|
|
5
|
+
swatches?: string[];
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
areaProps?: Record<string, unknown>;
|
|
8
|
+
thumbProps?: Record<string, unknown>;
|
|
9
|
+
sliderRootProps?: Record<string, unknown>;
|
|
10
|
+
trackProps?: Record<string, unknown>;
|
|
11
|
+
fieldProps?: Record<string, unknown>;
|
|
12
|
+
swatchListProps?: Record<string, unknown>;
|
|
13
|
+
swatchProps?: Record<string, unknown>;
|
|
14
|
+
swatchFillProps?: Record<string, unknown>;
|
|
15
|
+
swatchIndicatorProps?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface ColorPickerBodyEmits {
|
|
18
|
+
'update:modelValue': [value: string];
|
|
19
|
+
}
|
|
20
|
+
declare const __VLS_export: import("vue").DefineComponent<ColorPickerBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
"update:modelValue": (value: string) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<ColorPickerBodyProps> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
ColorAreaArea,
|
|
4
|
+
ColorAreaRoot,
|
|
5
|
+
ColorAreaThumb,
|
|
6
|
+
ColorFieldInput,
|
|
7
|
+
ColorFieldRoot,
|
|
8
|
+
ColorSliderRoot,
|
|
9
|
+
ColorSliderThumb,
|
|
10
|
+
ColorSliderTrack,
|
|
11
|
+
ColorSwatchPickerItem,
|
|
12
|
+
ColorSwatchPickerItemIndicator,
|
|
13
|
+
ColorSwatchPickerItemSwatch,
|
|
14
|
+
ColorSwatchPickerRoot
|
|
15
|
+
} from "reka-ui";
|
|
16
|
+
import Icon from "../components/Icon.vue";
|
|
17
|
+
import { useIcons } from "../composables/use-icons";
|
|
18
|
+
defineProps({
|
|
19
|
+
modelValue: { type: String, required: true },
|
|
20
|
+
disabled: { type: Boolean, required: false },
|
|
21
|
+
alpha: { type: Boolean, required: false },
|
|
22
|
+
swatches: { type: Array, required: false },
|
|
23
|
+
placeholder: { type: String, required: false },
|
|
24
|
+
areaProps: { type: Object, required: false },
|
|
25
|
+
thumbProps: { type: Object, required: false },
|
|
26
|
+
sliderRootProps: { type: Object, required: false },
|
|
27
|
+
trackProps: { type: Object, required: false },
|
|
28
|
+
fieldProps: { type: Object, required: false },
|
|
29
|
+
swatchListProps: { type: Object, required: false },
|
|
30
|
+
swatchProps: { type: Object, required: false },
|
|
31
|
+
swatchFillProps: { type: Object, required: false },
|
|
32
|
+
swatchIndicatorProps: { type: Object, required: false }
|
|
33
|
+
});
|
|
34
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
35
|
+
const icons = useIcons();
|
|
36
|
+
function onUpdateColor(value) {
|
|
37
|
+
if (typeof value === "string")
|
|
38
|
+
emit("update:modelValue", value);
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<ColorAreaRoot
|
|
44
|
+
:model-value="modelValue"
|
|
45
|
+
color-space="hsb"
|
|
46
|
+
x-channel="saturation"
|
|
47
|
+
y-channel="brightness"
|
|
48
|
+
:disabled="disabled"
|
|
49
|
+
@update:model-value="onUpdateColor"
|
|
50
|
+
>
|
|
51
|
+
<template #default="{ style }">
|
|
52
|
+
<ColorAreaArea :style="style" v-bind="areaProps">
|
|
53
|
+
<ColorAreaThumb v-bind="thumbProps" />
|
|
54
|
+
</ColorAreaArea>
|
|
55
|
+
</template>
|
|
56
|
+
</ColorAreaRoot>
|
|
57
|
+
|
|
58
|
+
<ColorSliderRoot
|
|
59
|
+
:model-value="modelValue"
|
|
60
|
+
channel="hue"
|
|
61
|
+
:disabled="disabled"
|
|
62
|
+
v-bind="sliderRootProps"
|
|
63
|
+
@update:model-value="onUpdateColor"
|
|
64
|
+
>
|
|
65
|
+
<ColorSliderTrack v-bind="trackProps">
|
|
66
|
+
<ColorSliderThumb v-bind="thumbProps" />
|
|
67
|
+
</ColorSliderTrack>
|
|
68
|
+
</ColorSliderRoot>
|
|
69
|
+
|
|
70
|
+
<ColorSliderRoot
|
|
71
|
+
v-if="alpha"
|
|
72
|
+
:model-value="modelValue"
|
|
73
|
+
channel="alpha"
|
|
74
|
+
:disabled="disabled"
|
|
75
|
+
v-bind="sliderRootProps"
|
|
76
|
+
@update:model-value="onUpdateColor"
|
|
77
|
+
>
|
|
78
|
+
<ColorSliderTrack v-bind="trackProps">
|
|
79
|
+
<ColorSliderThumb v-bind="thumbProps" />
|
|
80
|
+
</ColorSliderTrack>
|
|
81
|
+
</ColorSliderRoot>
|
|
82
|
+
|
|
83
|
+
<ColorFieldRoot
|
|
84
|
+
:model-value="modelValue"
|
|
85
|
+
:placeholder="placeholder"
|
|
86
|
+
:disabled="disabled"
|
|
87
|
+
@update:model-value="onUpdateColor"
|
|
88
|
+
>
|
|
89
|
+
<ColorFieldInput v-bind="fieldProps" />
|
|
90
|
+
</ColorFieldRoot>
|
|
91
|
+
|
|
92
|
+
<ColorSwatchPickerRoot
|
|
93
|
+
v-if="swatches?.length"
|
|
94
|
+
:model-value="modelValue"
|
|
95
|
+
:disabled="disabled"
|
|
96
|
+
v-bind="swatchListProps"
|
|
97
|
+
@update:model-value="onUpdateColor"
|
|
98
|
+
>
|
|
99
|
+
<ColorSwatchPickerItem
|
|
100
|
+
v-for="hex in swatches"
|
|
101
|
+
:key="hex"
|
|
102
|
+
:value="hex"
|
|
103
|
+
v-bind="swatchProps"
|
|
104
|
+
>
|
|
105
|
+
<ColorSwatchPickerItemSwatch v-bind="swatchFillProps" />
|
|
106
|
+
<ColorSwatchPickerItemIndicator v-bind="swatchIndicatorProps">
|
|
107
|
+
<Icon :name="icons.check" class="size-3" />
|
|
108
|
+
</ColorSwatchPickerItemIndicator>
|
|
109
|
+
</ColorSwatchPickerItem>
|
|
110
|
+
</ColorSwatchPickerRoot>
|
|
111
|
+
</template>
|