@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,68 @@
|
|
|
1
|
+
export const defaultMessages = {
|
|
2
|
+
loading: "Loading",
|
|
3
|
+
clear: "Clear",
|
|
4
|
+
close: "Close",
|
|
5
|
+
cancel: "Cancel",
|
|
6
|
+
continue: "Continue",
|
|
7
|
+
colorModeToggle: "Toggle color mode",
|
|
8
|
+
colorPicker: "Color picker",
|
|
9
|
+
colorPickerDescription: "Drag to adjust hue, saturation, and lightness",
|
|
10
|
+
search: "Search...",
|
|
11
|
+
searchDescription: "Type to filter, then use arrow keys and enter to select",
|
|
12
|
+
columns: "Columns",
|
|
13
|
+
filterPlaceholder: "Filter...",
|
|
14
|
+
previous: "Previous",
|
|
15
|
+
next: "Next",
|
|
16
|
+
first: "First",
|
|
17
|
+
last: "Last",
|
|
18
|
+
pagination: "Pagination",
|
|
19
|
+
datePicker: "Date picker",
|
|
20
|
+
datePickerDescription: "Use arrow keys to navigate days, enter to select",
|
|
21
|
+
dateRangePicker: "Date range picker",
|
|
22
|
+
dateRangePickerDescription: "Use arrow keys to navigate days, enter to select a start and end date",
|
|
23
|
+
timePicker: "Time picker",
|
|
24
|
+
timePickerDescription: "Use arrow keys to adjust the highlighted field",
|
|
25
|
+
pickTime: "Pick a time",
|
|
26
|
+
previousMonth: "Previous month",
|
|
27
|
+
nextMonth: "Next month",
|
|
28
|
+
previousYear: "Previous year",
|
|
29
|
+
nextYear: "Next year",
|
|
30
|
+
previousDecade: "Previous decade",
|
|
31
|
+
nextDecade: "Next decade",
|
|
32
|
+
pickDate: "Pick a date",
|
|
33
|
+
chooseMonth: "Choose month",
|
|
34
|
+
chooseYear: "Choose year",
|
|
35
|
+
hour: "Hour",
|
|
36
|
+
minute: "Minute",
|
|
37
|
+
done: "Done",
|
|
38
|
+
increment: "Increment",
|
|
39
|
+
decrement: "Decrement",
|
|
40
|
+
noOptions: "No options",
|
|
41
|
+
noResultsFound: "No results found",
|
|
42
|
+
noData: "No data",
|
|
43
|
+
expandRow: "Expand row",
|
|
44
|
+
collapseRow: "Collapse row",
|
|
45
|
+
maximize: "Maximize",
|
|
46
|
+
minimize: "Minimize",
|
|
47
|
+
removeItem: (label) => label ? `Remove ${label}` : "Remove",
|
|
48
|
+
moreItems: (count) => `+${count} more`,
|
|
49
|
+
avatarGroupOverflow: (count) => `+${count}`,
|
|
50
|
+
paginationInfo: (page, total) => `Page ${page} of ${total}`,
|
|
51
|
+
codeTabFallback: (index) => `Tab ${index}`,
|
|
52
|
+
dropFiles: "Drop files here or click to browse",
|
|
53
|
+
invalidFileType: (name) => `${name}: invalid file type`,
|
|
54
|
+
invalidFileSize: (name, max) => `${name}: exceeds the ${max} size limit`,
|
|
55
|
+
tooManyFiles: (max) => `Only ${max} file${max === 1 ? "" : "s"} allowed`,
|
|
56
|
+
showMore: "Show more",
|
|
57
|
+
showLess: "Show less",
|
|
58
|
+
selectFile: "Select a file to view its content",
|
|
59
|
+
toggleSidebar: "Toggle sidebar",
|
|
60
|
+
breadcrumb: "Breadcrumb",
|
|
61
|
+
showHiddenBreadcrumbItems: "Show hidden breadcrumb items",
|
|
62
|
+
commandPalette: "Command palette",
|
|
63
|
+
commandPaletteDescription: "Search for a command and press enter",
|
|
64
|
+
navigate: "Navigate",
|
|
65
|
+
select: "Select",
|
|
66
|
+
onThisPage: "On this page",
|
|
67
|
+
upToSize: (size) => `Up to ${size}`
|
|
68
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface NavigationMenuItem {
|
|
2
|
+
label: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
to?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** Force active state - otherwise auto-detected against the current route when `to` is set. */
|
|
7
|
+
active?: boolean;
|
|
8
|
+
/** One level for horizontal (Reka's own real limit for its shared-viewport flyout); arbitrary depth for vertical, which falls back to a recursive accordion instead. */
|
|
9
|
+
children?: NavigationMenuItem[];
|
|
10
|
+
onSelect?: (event: Event) => void;
|
|
11
|
+
/** Targets this item's own named slots (`#{slot}`, `#{slot}-leading`, `#{slot}-label`, `#{slot}-trailing`, `#{slot}-content`) ahead of the generic `#item`/`#item-leading`/etc, when the named one is actually provided. */
|
|
12
|
+
slot?: string;
|
|
13
|
+
/**
|
|
14
|
+
* `'link'` (default) is a real navigable/selectable item - everything
|
|
15
|
+
* above applies. `'label'` renders a non-interactive section heading
|
|
16
|
+
* above the items that follow it in the same top-level array - only
|
|
17
|
+
* `label` (and optionally `icon`) are read, everything else is
|
|
18
|
+
* ignored. `'separator'` renders a thin divider line and reads nothing
|
|
19
|
+
* but still needs a unique `label` (unused for display) since every
|
|
20
|
+
* item's `label` doubles as its list key.
|
|
21
|
+
*
|
|
22
|
+
* Top-level only - a `children` array doesn't check this, so a nested
|
|
23
|
+
* tree can't group its own children under a sub-heading. A comparable
|
|
24
|
+
* reference's own "group" concept isn't a separate type here either -
|
|
25
|
+
* it's just a `'label'` item followed by the ordinary items it's meant
|
|
26
|
+
* to introduce, no wrapping structure needed for a flat array.
|
|
27
|
+
*/
|
|
28
|
+
type?: 'link' | 'label' | 'separator';
|
|
29
|
+
/** Not read by NavigationMenu's own default rendering - carried purely so a custom #item-content/#{slot}-content slot override can display one (a "mega menu" style description under each link, say). */
|
|
30
|
+
description?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function isNavigationMenuItemActive(item: NavigationMenuItem, currentPath: string): boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Builds TanStack ColumnDef-shaped plain objects from <SColumn>/<SColumnGroup>
|
|
4
|
+
* VNodes - read directly off slots.default(), before either component ever
|
|
5
|
+
* mounts. A ColumnGroup VNode always becomes a group def (columns: [...]
|
|
6
|
+
* recursing over its own children); a Column VNode always becomes a leaf
|
|
7
|
+
* def, forwarding its own default-slot function as the cell renderer.
|
|
8
|
+
*
|
|
9
|
+
* Loosely typed (`any`) rather than `ColumnDef<TFeatures, TData>` - this path
|
|
10
|
+
* can't statically connect a runtime-scanned column list back to a specific
|
|
11
|
+
* TData, the same accepted trade-off as SColumn's `field: string` prop. Power
|
|
12
|
+
* users who want full TanStack type inference use STable's `columns` prop
|
|
13
|
+
* instead of <SColumn> children.
|
|
14
|
+
*/
|
|
15
|
+
export declare function convertChildrenToColumns(vnodes: VNode[] | undefined): any[];
|
|
16
|
+
/**
|
|
17
|
+
* Reads each leaf column's own `meta.pinned` (set from <SColumn pinned="...">
|
|
18
|
+
* by convertChildrenToColumns above) into the { start, end } shape
|
|
19
|
+
* TanStack v9's columnPinningFeature wants as table-level state - "start"/
|
|
20
|
+
* "end" is its own (RTL-aware) naming; `pinned="left"|"right"` is the
|
|
21
|
+
* public <SColumn> API since that's the more familiar term (matching a
|
|
22
|
+
* comparable reference's own column-freezing option), mapped 1:1
|
|
23
|
+
* assuming LTR. Declarative, one-way: pin arrangement comes from which
|
|
24
|
+
* columns you marked pinned in your template, not a separate piece of
|
|
25
|
+
* state to manage yourself.
|
|
26
|
+
*/
|
|
27
|
+
export declare function collectColumnPinning(columns: any[]): {
|
|
28
|
+
start: string[];
|
|
29
|
+
end: string[];
|
|
30
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Comment, Fragment, h, Text } from "vue";
|
|
2
|
+
import Column from "../components/Column.js";
|
|
3
|
+
import ColumnGroup from "../components/ColumnGroup.js";
|
|
4
|
+
function toBooleanProp(value, defaultValue) {
|
|
5
|
+
if (value === void 0)
|
|
6
|
+
return defaultValue;
|
|
7
|
+
if (value === "")
|
|
8
|
+
return true;
|
|
9
|
+
return !!value;
|
|
10
|
+
}
|
|
11
|
+
function buildHeaderOrFooter(slot, fallback) {
|
|
12
|
+
if (!slot)
|
|
13
|
+
return fallback;
|
|
14
|
+
return (context) => h(Fragment, slot({ column: context.column }));
|
|
15
|
+
}
|
|
16
|
+
function flattenColumnChildren(vnodes) {
|
|
17
|
+
const result = [];
|
|
18
|
+
for (const vnode of vnodes) {
|
|
19
|
+
if (vnode.type === Comment) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (vnode.type === Fragment) {
|
|
23
|
+
const children = vnode.children;
|
|
24
|
+
if (Array.isArray(children))
|
|
25
|
+
result.push(...flattenColumnChildren(children));
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (vnode.type === Text) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
result.push(vnode);
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
export function convertChildrenToColumns(vnodes) {
|
|
36
|
+
if (!vnodes?.length)
|
|
37
|
+
return [];
|
|
38
|
+
return flattenColumnChildren(vnodes).map((vnode) => {
|
|
39
|
+
if (vnode.type === ColumnGroup) {
|
|
40
|
+
const props = vnode.props ?? {};
|
|
41
|
+
const slots = vnode.children ?? {};
|
|
42
|
+
const slotChildren = slots.default?.();
|
|
43
|
+
return {
|
|
44
|
+
header: buildHeaderOrFooter(slots.header, props.header),
|
|
45
|
+
footer: buildHeaderOrFooter(slots.footer, props.footer),
|
|
46
|
+
columns: convertChildrenToColumns(slotChildren)
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
if (vnode.type === Column) {
|
|
50
|
+
const props = vnode.props ?? {};
|
|
51
|
+
const slots = vnode.children ?? {};
|
|
52
|
+
return {
|
|
53
|
+
id: props.field,
|
|
54
|
+
accessorKey: props.field,
|
|
55
|
+
header: buildHeaderOrFooter(slots.header, props.header ?? props.field),
|
|
56
|
+
footer: buildHeaderOrFooter(slots.footer, props.footer),
|
|
57
|
+
enableSorting: toBooleanProp(props.sortable, true),
|
|
58
|
+
sortFn: "alphanumeric",
|
|
59
|
+
enableColumnFilter: toBooleanProp(props.filterable, false),
|
|
60
|
+
filterFn: "includesString",
|
|
61
|
+
meta: { pinned: props.pinned },
|
|
62
|
+
// A slot always returns an array of VNodes, even for a single
|
|
63
|
+
// child - TanStack's flexRender only recognizes a single VNode
|
|
64
|
+
// (isVNode check) or a component/string, so an array falls into
|
|
65
|
+
// its object branch and gets wrongly treated as a component
|
|
66
|
+
// (h(array, props)), rendering nothing. Wrapping in a Fragment
|
|
67
|
+
// gives flexRender one real VNode to render.
|
|
68
|
+
cell: slots.default ? (context) => h(Fragment, slots.default({ row: context.row.original, value: context.getValue() })) : (context) => context.getValue()
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}).filter((column) => column !== null);
|
|
73
|
+
}
|
|
74
|
+
export function collectColumnPinning(columns) {
|
|
75
|
+
const start = [];
|
|
76
|
+
const end = [];
|
|
77
|
+
function visit(column) {
|
|
78
|
+
if (Array.isArray(column.columns)) {
|
|
79
|
+
column.columns.forEach(visit);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (column.meta?.pinned === "left")
|
|
83
|
+
start.push(column.id);
|
|
84
|
+
else if (column.meta?.pinned === "right")
|
|
85
|
+
end.push(column.id);
|
|
86
|
+
}
|
|
87
|
+
columns.forEach(visit);
|
|
88
|
+
return { start, end };
|
|
89
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a CSV string from a table's current filtered+sorted rows (every
|
|
3
|
+
* matching row across all pages, not just the current page -
|
|
4
|
+
* getPrePaginatedRowModel is the row model before pagination slices it
|
|
5
|
+
* down). Synthetic columns (the selection checkbox, the expand toggle) are
|
|
6
|
+
* skipped since they carry no exportable data. Pure and side-effect-free,
|
|
7
|
+
* separated from exportTableToCsv's actual download trigger so it's
|
|
8
|
+
* testable without a real DOM/Blob/anchor-click environment.
|
|
9
|
+
*/
|
|
10
|
+
export declare function tableToCsvString(table: any): string;
|
|
11
|
+
/** Serializes the table to CSV via tableToCsvString and triggers a browser download. */
|
|
12
|
+
export declare function exportTableToCsv(table: any, filename?: string): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export function tableToCsvString(table) {
|
|
2
|
+
const columns = table.getVisibleLeafColumns().filter((column) => !column.id.startsWith("__"));
|
|
3
|
+
const rows = table.getPrePaginatedRowModel().rows;
|
|
4
|
+
function escapeCsvValue(value) {
|
|
5
|
+
const text = value === null || value === void 0 ? "" : String(value);
|
|
6
|
+
if (/[",\n]/.test(text))
|
|
7
|
+
return `"${text.replace(/"/g, '""')}"`;
|
|
8
|
+
return text;
|
|
9
|
+
}
|
|
10
|
+
function headerText(column) {
|
|
11
|
+
const header = column.columnDef.header;
|
|
12
|
+
return typeof header === "string" ? header : column.id;
|
|
13
|
+
}
|
|
14
|
+
const lines = [
|
|
15
|
+
columns.map(headerText).map(escapeCsvValue).join(","),
|
|
16
|
+
...rows.map((row) => columns.map((column) => escapeCsvValue(row.getValue(column.id))).join(","))
|
|
17
|
+
];
|
|
18
|
+
return lines.join("\n");
|
|
19
|
+
}
|
|
20
|
+
export function exportTableToCsv(table, filename = "table.csv") {
|
|
21
|
+
const csv = tableToCsvString(table);
|
|
22
|
+
const blob = new Blob([csv], { type: "text/csv;charset=utf-8;" });
|
|
23
|
+
const url = URL.createObjectURL(blob);
|
|
24
|
+
const link = document.createElement("a");
|
|
25
|
+
link.href = url;
|
|
26
|
+
link.download = filename;
|
|
27
|
+
link.click();
|
|
28
|
+
URL.revokeObjectURL(url);
|
|
29
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
export type UiSlotValue = string | ({
|
|
3
|
+
class?: string;
|
|
4
|
+
} & Record<string, unknown>);
|
|
5
|
+
export type UiProp<Slots extends string = string> = Partial<Record<Slots, UiSlotValue>>;
|
|
6
|
+
/**
|
|
7
|
+
* tailwind-variants' own generated slot-function type is a union of several
|
|
8
|
+
* variant-prop shapes (one per possible variant combination, more of them
|
|
9
|
+
* the fewer variants a theme declares), each intersected with its `ClassProp`
|
|
10
|
+
* union (`{class} | {className}`, never both). No single hand-written object
|
|
11
|
+
* type is structurally assignable to every branch of that union at once, so
|
|
12
|
+
* `resolveSlot`/`useRootProps` are generic over the slot fn's real type
|
|
13
|
+
* instead of pinning it to one - avoiding a wrong-in-every-direction manual
|
|
14
|
+
* approximation (and the `as any` it previously forced on every call site).
|
|
15
|
+
* `any` in this constraint's parameter position is what makes the match
|
|
16
|
+
* trivially succeed regardless of that union's shape; the cast just inside
|
|
17
|
+
* each function body does the same for the one call they each make.
|
|
18
|
+
*/
|
|
19
|
+
type AnySlotFn = (opts?: any) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Applies a Tailwind v4 class-prefix (`@import "tailwindcss" prefix(tw);`)
|
|
22
|
+
* to a class string. The prefix always lands as the outermost segment of
|
|
23
|
+
* a class (`tw:hover:bg-red-500`, never `hover:tw:bg-red-500`), so this is
|
|
24
|
+
* a plain per-token prepend - no variant-aware parsing needed. `selaras-*`
|
|
25
|
+
* classes are hand-authored literal selectors (see theme.css), not
|
|
26
|
+
* Tailwind utilities, and must be skipped or they stop matching their own
|
|
27
|
+
* CSS. A token that already starts with `${prefix}:` is left alone too -
|
|
28
|
+
* a consumer's own `:ui` override or custom component can't be covered by
|
|
29
|
+
* Selaras's build-time safelist (module.ts only scans Selaras's own shipped
|
|
30
|
+
* files), so writing it already-prefixed themselves is the documented way
|
|
31
|
+
* to make Tailwind generate CSS for it; without this guard that would get
|
|
32
|
+
* double-prefixed into garbage instead of passing through untouched.
|
|
33
|
+
*
|
|
34
|
+
* `prefix` defaults to the `classPrefix` module option (threaded through
|
|
35
|
+
* via a build-time virtual module, `#build/selaras-class-prefix.mjs` -
|
|
36
|
+
* see module.ts) when omitted, so call sites wrapping a hardcoded literal
|
|
37
|
+
* class (`applyClassPrefix('sr-only')`) don't each need to read it
|
|
38
|
+
* themselves. Pass it explicitly only where the prefix is already in hand
|
|
39
|
+
* (as `resolveSlot` does) or in a unit test.
|
|
40
|
+
*
|
|
41
|
+
* `classString` itself is nullable despite the type: a `tv()` slot with no
|
|
42
|
+
* base classes and no active override (an empty-string slot like
|
|
43
|
+
* Accordion's `header`/`label`) resolves to `undefined`, not `''` - passed
|
|
44
|
+
* straight through here rather than crashing, the same as it would if
|
|
45
|
+
* this function didn't exist at all.
|
|
46
|
+
*/
|
|
47
|
+
export declare function applyClassPrefix(classString: string, prefix?: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Strips a leading `${prefix}:` from each space-separated token of a class
|
|
50
|
+
* string - the inverse of `applyClassPrefix`'s per-token prepend. `resolveSlot`
|
|
51
|
+
* applies this to a `:ui` override *before* handing it to the slot function,
|
|
52
|
+
* because `tailwind-merge` (bundled by `tailwind-variants`) has no concept
|
|
53
|
+
* of Tailwind v4's `tw:`-style prefix syntax: a mixed merge - an unprefixed
|
|
54
|
+
* base class (`bg-[var(--ui-primary)]`) against an already-prefixed override
|
|
55
|
+
* (`tw:bg-red-500`, exactly what a consumer is documented to write once a
|
|
56
|
+
* prefix is configured) - never dedupes, confirmed directly (both classes
|
|
57
|
+
* survive as-is). Since Selaras's own safelist stylesheet loads after the
|
|
58
|
+
* consumer's own, that would mean Selaras's default silently wins over the
|
|
59
|
+
* consumer's override - the opposite of what `:ui` is for. Normalizing the
|
|
60
|
+
* override back to its unprefixed form before merging (where tailwind-merge
|
|
61
|
+
* already works correctly), then letting `applyClassPrefix` re-prefix the
|
|
62
|
+
* whole merged result afterward, sidesteps this - correct regardless of
|
|
63
|
+
* whether the bundled tailwind-merge version understands `tw:` syntax at all.
|
|
64
|
+
*/
|
|
65
|
+
export declare function stripClassPrefix(classString: string | undefined, prefix: string | null | undefined): string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Resolves a single slot's classes/attrs from a `:ui` override.
|
|
68
|
+
* A string override is treated as extra classes (tailwind-merge'd by the slot fn).
|
|
69
|
+
* An object override's `class` is merged the same way, everything else is
|
|
70
|
+
* applied as raw attrs/handlers via `mergeProps` (never tailwind-merged).
|
|
71
|
+
*/
|
|
72
|
+
export declare function resolveSlot<T extends AnySlotFn>(slotFn: T, override?: UiSlotValue): {
|
|
73
|
+
[x: string]: unknown;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Vue always merges a parent's fallthrough `class` onto a single-root
|
|
77
|
+
* component's root element via raw string concatenation - completely
|
|
78
|
+
* separate from (and unaware of) the tailwind-merge resolveSlot does. That
|
|
79
|
+
* means a plain `class="w-40"` on a component whose root slot has `w-full`
|
|
80
|
+
* can silently lose depending on Tailwind's generated CSS order, not source
|
|
81
|
+
* order - defeating the whole point of the :ui system.
|
|
82
|
+
*
|
|
83
|
+
* A component styling its root/base slot via resolveSlot should instead set
|
|
84
|
+
* `inheritAttrs: false`, fold the fallthrough class into that slot's :ui
|
|
85
|
+
* override with `withFallthroughClass` so it goes through tailwind-merge too,
|
|
86
|
+
* and bind `attrsWithoutClass` (not raw $attrs) alongside it so every other
|
|
87
|
+
* fallthrough attr still passes through untouched.
|
|
88
|
+
*/
|
|
89
|
+
export declare function useRootFallthrough(): {
|
|
90
|
+
fallthroughClass: ComputedRef<string | undefined>;
|
|
91
|
+
attrsWithoutClass: ComputedRef<{
|
|
92
|
+
[x: string]: unknown;
|
|
93
|
+
style?: import("vue").StyleValue;
|
|
94
|
+
}>;
|
|
95
|
+
};
|
|
96
|
+
/** Folds a fallthrough class into a slot's `:ui` override, ahead of resolveSlot. */
|
|
97
|
+
export declare function withFallthroughClass(fallthroughClass: string | undefined, override?: UiSlotValue): UiSlotValue | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Combines resolveSlot with useRootFallthrough for a component's root/base
|
|
100
|
+
* slot in one call - requires `defineOptions({ inheritAttrs: false })` on the
|
|
101
|
+
* component. Bind the result with a single `v-bind` (Vue's template compiler
|
|
102
|
+
* rejects two bare v-bind spreads on the same element).
|
|
103
|
+
*/
|
|
104
|
+
export declare function useRootProps<T extends AnySlotFn>(slotFn: () => T, override: () => UiSlotValue | undefined): ComputedRef<{
|
|
105
|
+
[x: string]: unknown;
|
|
106
|
+
}>;
|
|
107
|
+
/**
|
|
108
|
+
* Merges a component's global `app.config.ui.<key>` override, then any
|
|
109
|
+
* ancestor STheme's scoped `ui.<key>` override, into its base `tv()`
|
|
110
|
+
* theme - each layered via tv()'s own `extend` composition, so an
|
|
111
|
+
* override only needs to name the slots it actually changes. Falls back
|
|
112
|
+
* to the base theme untouched when neither exists.
|
|
113
|
+
*/
|
|
114
|
+
export declare function useComponentTheme<T extends (...args: any[]) => any>(key: string, base: T): ComputedRef<T>;
|
|
115
|
+
/**
|
|
116
|
+
* The nearest (chain-merged) STheme `props.<key>` override, if any - a
|
|
117
|
+
* component reads this as its own prop's fallback, one level below its
|
|
118
|
+
* own explicit prop but above whatever hardcoded/tv() default it'd
|
|
119
|
+
* otherwise use (`props.size ?? useThemeProps('button').value.size`),
|
|
120
|
+
* mirroring the existing AvatarGroup/FormField "inject a default" precedent
|
|
121
|
+
* generically instead of each needing its own bespoke injection key.
|
|
122
|
+
*/
|
|
123
|
+
export declare function useThemeProps(key: string): ComputedRef<Record<string, unknown>>;
|
|
124
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
import { computed, inject, mergeProps, useAttrs } from "vue";
|
|
3
|
+
import { classPrefix as globalClassPrefix } from "#build/selaras-class-prefix.mjs";
|
|
4
|
+
import { useAppConfig } from "#imports";
|
|
5
|
+
import { THEME_INJECTION_KEY } from "./injection-keys.js";
|
|
6
|
+
export function applyClassPrefix(classString, prefix) {
|
|
7
|
+
if (!classString)
|
|
8
|
+
return classString;
|
|
9
|
+
const resolvedPrefix = prefix ?? globalClassPrefix ?? void 0;
|
|
10
|
+
if (!resolvedPrefix)
|
|
11
|
+
return classString;
|
|
12
|
+
return classString.split(/\s+/).filter(Boolean).map((cls) => cls.startsWith("selaras-") || cls.startsWith(`${resolvedPrefix}:`) ? cls : `${resolvedPrefix}:${cls}`).join(" ");
|
|
13
|
+
}
|
|
14
|
+
export function stripClassPrefix(classString, prefix) {
|
|
15
|
+
if (!classString || !prefix)
|
|
16
|
+
return classString;
|
|
17
|
+
return classString.split(/\s+/).filter(Boolean).map((cls) => cls.startsWith(`${prefix}:`) ? cls.slice(prefix.length + 1) : cls).join(" ");
|
|
18
|
+
}
|
|
19
|
+
export function resolveSlot(slotFn, override) {
|
|
20
|
+
const call = slotFn;
|
|
21
|
+
if (typeof override !== "object" || override === null) {
|
|
22
|
+
return { class: applyClassPrefix(call({ class: stripClassPrefix(override, globalClassPrefix) })) };
|
|
23
|
+
}
|
|
24
|
+
const { class: overrideClass, ...attrs } = override;
|
|
25
|
+
return mergeProps({ class: applyClassPrefix(call({ class: stripClassPrefix(overrideClass, globalClassPrefix) })) }, attrs);
|
|
26
|
+
}
|
|
27
|
+
export function useRootFallthrough() {
|
|
28
|
+
const attrs = useAttrs();
|
|
29
|
+
const fallthroughClass = computed(() => typeof attrs.class === "string" ? attrs.class : void 0);
|
|
30
|
+
const attrsWithoutClass = computed(() => {
|
|
31
|
+
const { class: _class, ...rest } = attrs;
|
|
32
|
+
return rest;
|
|
33
|
+
});
|
|
34
|
+
return { fallthroughClass, attrsWithoutClass };
|
|
35
|
+
}
|
|
36
|
+
export function withFallthroughClass(fallthroughClass, override) {
|
|
37
|
+
if (typeof override === "object" && override !== null) {
|
|
38
|
+
return { ...override, class: [fallthroughClass, override.class].filter(Boolean).join(" ") || void 0 };
|
|
39
|
+
}
|
|
40
|
+
return [fallthroughClass, override].filter(Boolean).join(" ") || void 0;
|
|
41
|
+
}
|
|
42
|
+
export function useRootProps(slotFn, override) {
|
|
43
|
+
const { fallthroughClass, attrsWithoutClass } = useRootFallthrough();
|
|
44
|
+
return computed(() => mergeProps(
|
|
45
|
+
attrsWithoutClass.value,
|
|
46
|
+
resolveSlot(slotFn(), withFallthroughClass(fallthroughClass.value, override()))
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
function collectThemeChain(context, pick, key) {
|
|
50
|
+
const chain = [];
|
|
51
|
+
for (let current = context; current; current = current.parent) {
|
|
52
|
+
const value = pick(current)?.[key];
|
|
53
|
+
if (value)
|
|
54
|
+
chain.unshift(value);
|
|
55
|
+
}
|
|
56
|
+
return chain;
|
|
57
|
+
}
|
|
58
|
+
export function useComponentTheme(key, base) {
|
|
59
|
+
const appConfig = useAppConfig();
|
|
60
|
+
const themeContext = inject(THEME_INJECTION_KEY, void 0);
|
|
61
|
+
return computed(() => {
|
|
62
|
+
let result = base;
|
|
63
|
+
const globalOverride = appConfig.ui?.[key];
|
|
64
|
+
if (globalOverride)
|
|
65
|
+
result = tv({ extend: result, ...globalOverride });
|
|
66
|
+
for (const override of collectThemeChain(themeContext?.value, (c) => c.ui, key))
|
|
67
|
+
result = tv({ extend: result, ...override });
|
|
68
|
+
return result;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
export function useThemeProps(key) {
|
|
72
|
+
const themeContext = inject(THEME_INJECTION_KEY, void 0);
|
|
73
|
+
return computed(() => Object.assign({}, ...collectThemeChain(themeContext?.value, (c) => c.props, key)));
|
|
74
|
+
}
|
package/dist/types.d.mts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sewadah/selaras",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.1",
|
|
5
|
+
"description": "A UI component library for Nuxt",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": "sewadahapp/selaras",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/types.d.mts",
|
|
11
|
+
"style": "./dist/runtime/theme.css",
|
|
12
|
+
"import": "./dist/module.mjs"
|
|
13
|
+
},
|
|
14
|
+
"./directives": {
|
|
15
|
+
"types": "./dist/runtime/directives/index.d.ts",
|
|
16
|
+
"import": "./dist/runtime/directives/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./types": {
|
|
19
|
+
"types": "./dist/runtime/types/index.d.ts",
|
|
20
|
+
"import": "./dist/runtime/types/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./components/*": "./dist/runtime/components/*",
|
|
23
|
+
"./theme.css": "./dist/runtime/theme.css",
|
|
24
|
+
"./prose.css": "./dist/runtime/prose.css"
|
|
25
|
+
},
|
|
26
|
+
"main": "./dist/module.mjs",
|
|
27
|
+
"style": "./dist/runtime/theme.css",
|
|
28
|
+
"typesVersions": {
|
|
29
|
+
"*": {
|
|
30
|
+
".": [
|
|
31
|
+
"./dist/types.d.mts"
|
|
32
|
+
],
|
|
33
|
+
"directives": [
|
|
34
|
+
"./dist/runtime/directives/index.d.ts"
|
|
35
|
+
],
|
|
36
|
+
"types": [
|
|
37
|
+
"./dist/runtime/types/index.d.ts"
|
|
38
|
+
],
|
|
39
|
+
"components/*": [
|
|
40
|
+
"./dist/runtime/components/*"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist"
|
|
46
|
+
],
|
|
47
|
+
"workspaces": [
|
|
48
|
+
"playground"
|
|
49
|
+
],
|
|
50
|
+
"scripts": {
|
|
51
|
+
"prepack": "nuxt-module-build build",
|
|
52
|
+
"dev": "bun run dev:prepare && nuxt dev playground",
|
|
53
|
+
"dev:build": "nuxt build playground",
|
|
54
|
+
"dev:generate": "nuxt generate playground",
|
|
55
|
+
"dev:preview": "NODE_ENV=production bun playground/.output/server/index.mjs",
|
|
56
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
|
|
57
|
+
"release": "bun run lint && bun run test && changelogen --bump && bun run prepack && npm publish --access public && bash scripts/tag-and-push-release.sh && changelogen gh release",
|
|
58
|
+
"lint": "eslint .",
|
|
59
|
+
"lint:fix": "eslint --fix",
|
|
60
|
+
"test": "vitest run",
|
|
61
|
+
"test:watch": "vitest watch",
|
|
62
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"tailwindcss": "^4.1.11"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@internationalized/date": "^3.5.0",
|
|
69
|
+
"@nuxt/icon": "^1.10.3",
|
|
70
|
+
"@nuxt/kit": "^4.5.2",
|
|
71
|
+
"@nuxtjs/color-mode": "^4.0.1",
|
|
72
|
+
"@tailwindcss/oxide": "^4.1.11",
|
|
73
|
+
"@tailwindcss/vite": "^4.1.11",
|
|
74
|
+
"@tanstack/vue-table": "^9.1.2",
|
|
75
|
+
"@tanstack/vue-virtual": "^3.13.36",
|
|
76
|
+
"reka-ui": "^2.2.0",
|
|
77
|
+
"tailwind-merge": "^3.6.0",
|
|
78
|
+
"tailwind-variants": "^3.3.1",
|
|
79
|
+
"tw-animate-css": "^1.4.0"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@antfu/eslint-config": "^9.3.0",
|
|
83
|
+
"@nuxt/devtools": "^3.4.1",
|
|
84
|
+
"@nuxt/module-builder": "^1.0.3",
|
|
85
|
+
"@nuxt/schema": "^4.5.2",
|
|
86
|
+
"@nuxt/test-utils": "^4.1.0",
|
|
87
|
+
"@types/node": "latest",
|
|
88
|
+
"@vue/test-utils": "^2.4.11",
|
|
89
|
+
"better-sqlite3": "^13.0.3",
|
|
90
|
+
"changelogen": "^0.6.2",
|
|
91
|
+
"eslint": "^10.8.1",
|
|
92
|
+
"happy-dom": "^20.11.6",
|
|
93
|
+
"nuxt": "^4.5.2",
|
|
94
|
+
"tailwindcss": "^4.1.11",
|
|
95
|
+
"typescript": "^6.0.3",
|
|
96
|
+
"vitest": "^4.1.10",
|
|
97
|
+
"vue-tsc": "^3.3.9"
|
|
98
|
+
}
|
|
99
|
+
}
|