@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,46 @@
|
|
|
1
|
+
import type { AvatarImageProps } from 'reka-ui';
|
|
2
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import type { Component } from 'vue';
|
|
4
|
+
import type { AvatarThemeSlots } from '../theme/avatar.js';
|
|
5
|
+
import type { UiProp } from '../utils/ui.js';
|
|
6
|
+
import { avatarTheme } from '../theme/avatar.js';
|
|
7
|
+
type AvatarVariants = VariantProps<typeof avatarTheme>;
|
|
8
|
+
export interface AvatarProps {
|
|
9
|
+
/** A tag name ('a', 'span', ...) or a component reference - forwarded to the avatar's root element, so an avatar can be a link or whatever the consumer needs. */
|
|
10
|
+
as?: string | Component;
|
|
11
|
+
/** The avatar image's URL. When absent (or while it loads), the fallback content shows instead. */
|
|
12
|
+
src?: string;
|
|
13
|
+
/** The image's alt text. Also used as the avatar's accessible name when there's no image at all. */
|
|
14
|
+
alt?: string;
|
|
15
|
+
/** Short text (usually the person's initials) shown while (or instead of) an image. */
|
|
16
|
+
text?: string;
|
|
17
|
+
/** An icon shown in the fallback, in place of `text`. If neither is given, the default semantic `user` icon shows. */
|
|
18
|
+
icon?: string;
|
|
19
|
+
color?: AvatarVariants['color'];
|
|
20
|
+
/** The presence/status dot's own color - independent of `color`, since presence semantics rarely match the avatar's identity color. */
|
|
21
|
+
statusColor?: AvatarVariants['statusColor'];
|
|
22
|
+
size?: AvatarVariants['size'];
|
|
23
|
+
shape?: AvatarVariants['shape'];
|
|
24
|
+
/** Shows a small solid-colored presence dot at the avatar's bottom-right corner. */
|
|
25
|
+
status?: boolean;
|
|
26
|
+
referrerPolicy?: AvatarImageProps['referrerPolicy'];
|
|
27
|
+
crossOrigin?: AvatarImageProps['crossOrigin'];
|
|
28
|
+
ui?: UiProp<AvatarThemeSlots>;
|
|
29
|
+
}
|
|
30
|
+
declare var __VLS_19: {}, __VLS_21: {
|
|
31
|
+
class: unknown;
|
|
32
|
+
};
|
|
33
|
+
type __VLS_Slots = {} & {
|
|
34
|
+
fallback?: (props: typeof __VLS_19) => any;
|
|
35
|
+
} & {
|
|
36
|
+
icon?: (props: typeof __VLS_21) => any;
|
|
37
|
+
};
|
|
38
|
+
declare const __VLS_base: import("vue").DefineComponent<AvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { AvatarGroupThemeSlots } from '../theme/avatar-group.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { avatarGroupTheme } from '../theme/avatar-group.js';
|
|
5
|
+
type AvatarGroupVariants = VariantProps<typeof avatarGroupTheme>;
|
|
6
|
+
export interface AvatarGroupProps {
|
|
7
|
+
/** Maximum number of avatars to show. Extra avatars collapse into a "+N" count indicator. */
|
|
8
|
+
max?: number;
|
|
9
|
+
size?: AvatarGroupVariants['size'];
|
|
10
|
+
ui?: UiProp<AvatarGroupThemeSlots>;
|
|
11
|
+
}
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, provide, useSlots } from "vue";
|
|
3
|
+
import { useMessages } from "../composables/use-messages";
|
|
4
|
+
import { avatarGroupTheme } from "../theme/avatar-group";
|
|
5
|
+
import { AVATAR_SIZE_INJECTION_KEY } from "../utils/injection-keys";
|
|
6
|
+
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
7
|
+
defineOptions({ inheritAttrs: false });
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
max: { type: Number, required: false },
|
|
10
|
+
size: { type: null, required: false },
|
|
11
|
+
ui: { type: Object, required: false }
|
|
12
|
+
});
|
|
13
|
+
const slots = useSlots();
|
|
14
|
+
const messages = useMessages();
|
|
15
|
+
const theme = useComponentTheme("avatarGroup", avatarGroupTheme);
|
|
16
|
+
const ui = computed(() => theme.value({
|
|
17
|
+
size: props.size
|
|
18
|
+
}));
|
|
19
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
20
|
+
provide(AVATAR_SIZE_INJECTION_KEY, computed(() => props.size));
|
|
21
|
+
const slotChildren = computed(() => slots.default?.() ?? []);
|
|
22
|
+
const visibleChildren = computed(() => {
|
|
23
|
+
if (!props.max || slotChildren.value.length <= props.max)
|
|
24
|
+
return slotChildren.value;
|
|
25
|
+
return slotChildren.value.slice(0, props.max);
|
|
26
|
+
});
|
|
27
|
+
const overflowCount = computed(() => {
|
|
28
|
+
if (!props.max || slotChildren.value.length <= props.max)
|
|
29
|
+
return 0;
|
|
30
|
+
return slotChildren.value.length - props.max;
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<div v-bind="rootProps">
|
|
36
|
+
<span v-if="overflowCount" v-bind="resolveSlot(ui.count, props.ui?.count)">{{ messages.avatarGroupOverflow(overflowCount) }}</span>
|
|
37
|
+
<span v-for="(child, i) in visibleChildren" :key="i" v-bind="resolveSlot(ui.item, props.ui?.item)">
|
|
38
|
+
<component :is="child" />
|
|
39
|
+
</span>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { AvatarGroupThemeSlots } from '../theme/avatar-group.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { avatarGroupTheme } from '../theme/avatar-group.js';
|
|
5
|
+
type AvatarGroupVariants = VariantProps<typeof avatarGroupTheme>;
|
|
6
|
+
export interface AvatarGroupProps {
|
|
7
|
+
/** Maximum number of avatars to show. Extra avatars collapse into a "+N" count indicator. */
|
|
8
|
+
max?: number;
|
|
9
|
+
size?: AvatarGroupVariants['size'];
|
|
10
|
+
ui?: UiProp<AvatarGroupThemeSlots>;
|
|
11
|
+
}
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { BadgeThemeSlots } from '../theme/badge.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { badgeTheme } from '../theme/badge.js';
|
|
5
|
+
type BadgeVariants = VariantProps<typeof badgeTheme>;
|
|
6
|
+
export interface BadgeProps {
|
|
7
|
+
label?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
trailingIcon?: string;
|
|
10
|
+
/** A small solid-colored circle - a status indicator (online/offline, etc), shown alongside the label or alone without one. Always uses the color's solid shade, regardless of `variant`. */
|
|
11
|
+
dot?: boolean;
|
|
12
|
+
color?: BadgeVariants['color'];
|
|
13
|
+
variant?: BadgeVariants['variant'];
|
|
14
|
+
size?: BadgeVariants['size'];
|
|
15
|
+
ui?: UiProp<BadgeThemeSlots>;
|
|
16
|
+
}
|
|
17
|
+
declare var __VLS_1: {
|
|
18
|
+
class: unknown;
|
|
19
|
+
}, __VLS_8: {}, __VLS_10: {
|
|
20
|
+
class: unknown;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
icon?: (props: typeof __VLS_1) => any;
|
|
24
|
+
} & {
|
|
25
|
+
default?: (props: typeof __VLS_8) => any;
|
|
26
|
+
} & {
|
|
27
|
+
'trailing-icon'?: (props: typeof __VLS_10) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useSlots } from "vue";
|
|
3
|
+
import { badgeTheme } from "../theme/badge";
|
|
4
|
+
import { resolveSlot, useComponentTheme, useRootProps, useThemeProps } from "../utils/ui";
|
|
5
|
+
import Icon from "./Icon.vue";
|
|
6
|
+
defineOptions({ inheritAttrs: false });
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
label: { type: String, required: false },
|
|
9
|
+
icon: { type: String, required: false },
|
|
10
|
+
trailingIcon: { type: String, required: false },
|
|
11
|
+
dot: { type: Boolean, required: false },
|
|
12
|
+
color: { type: null, required: false },
|
|
13
|
+
variant: { type: null, required: false },
|
|
14
|
+
size: { type: null, required: false },
|
|
15
|
+
ui: { type: Object, required: false }
|
|
16
|
+
});
|
|
17
|
+
const slots = useSlots();
|
|
18
|
+
const hasLabel = computed(() => !!(props.label || slots.default));
|
|
19
|
+
const dotOnly = computed(() => !!props.dot && !hasLabel.value);
|
|
20
|
+
const iconOnly = computed(() => !hasLabel.value && !!props.icon && !props.dot);
|
|
21
|
+
const theme = useComponentTheme("badge", badgeTheme);
|
|
22
|
+
const themeProps = useThemeProps("badge");
|
|
23
|
+
const ui = computed(() => theme.value({
|
|
24
|
+
color: props.color ?? themeProps.value.color,
|
|
25
|
+
variant: props.variant,
|
|
26
|
+
size: props.size ?? themeProps.value.size,
|
|
27
|
+
iconOnly: iconOnly.value
|
|
28
|
+
}));
|
|
29
|
+
const rootProps = useRootProps(() => ui.value.base, () => props.ui?.base);
|
|
30
|
+
const dotOnlyProps = useRootProps(() => ui.value.dot, () => props.ui?.dot);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<span v-if="dotOnly" v-bind="dotOnlyProps" />
|
|
35
|
+
<span v-else v-bind="rootProps">
|
|
36
|
+
<span v-if="dot" v-bind="resolveSlot(ui.dot, props.ui?.dot)" />
|
|
37
|
+
<slot name="icon" :class="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon).class">
|
|
38
|
+
<Icon v-if="icon" :name="icon" v-bind="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon)" />
|
|
39
|
+
</slot>
|
|
40
|
+
<span v-if="hasLabel" v-bind="resolveSlot(ui.label, props.ui?.label)">
|
|
41
|
+
<slot>{{ label }}</slot>
|
|
42
|
+
</span>
|
|
43
|
+
<slot name="trailing-icon" :class="resolveSlot(ui.trailingIcon, props.ui?.trailingIcon).class">
|
|
44
|
+
<Icon v-if="trailingIcon" :name="trailingIcon" v-bind="resolveSlot(ui.trailingIcon, props.ui?.trailingIcon)" />
|
|
45
|
+
</slot>
|
|
46
|
+
</span>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { BadgeThemeSlots } from '../theme/badge.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { badgeTheme } from '../theme/badge.js';
|
|
5
|
+
type BadgeVariants = VariantProps<typeof badgeTheme>;
|
|
6
|
+
export interface BadgeProps {
|
|
7
|
+
label?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
trailingIcon?: string;
|
|
10
|
+
/** A small solid-colored circle - a status indicator (online/offline, etc), shown alongside the label or alone without one. Always uses the color's solid shade, regardless of `variant`. */
|
|
11
|
+
dot?: boolean;
|
|
12
|
+
color?: BadgeVariants['color'];
|
|
13
|
+
variant?: BadgeVariants['variant'];
|
|
14
|
+
size?: BadgeVariants['size'];
|
|
15
|
+
ui?: UiProp<BadgeThemeSlots>;
|
|
16
|
+
}
|
|
17
|
+
declare var __VLS_1: {
|
|
18
|
+
class: unknown;
|
|
19
|
+
}, __VLS_8: {}, __VLS_10: {
|
|
20
|
+
class: unknown;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
icon?: (props: typeof __VLS_1) => any;
|
|
24
|
+
} & {
|
|
25
|
+
default?: (props: typeof __VLS_8) => any;
|
|
26
|
+
} & {
|
|
27
|
+
'trailing-icon'?: (props: typeof __VLS_10) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { BreadcrumbThemeSlots } from '../theme/breadcrumb.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
type __VLS_Slots = BreadcrumbSlots;
|
|
4
|
+
export interface BreadcrumbItem {
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
to?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface BreadcrumbProps {
|
|
11
|
+
items: BreadcrumbItem[];
|
|
12
|
+
/** Collapses the middle items behind an overflow menu once items.length exceeds this - the first item plus the last (maxItems - 1) stay visible. */
|
|
13
|
+
maxItems?: number;
|
|
14
|
+
/** Truncates each item's label with an ellipsis. `true` caps at 12rem; a string sets a custom CSS max-width (e.g. '20rem', '300px'). @default false */
|
|
15
|
+
truncate?: boolean | string;
|
|
16
|
+
/** @default icons.chevronRight */
|
|
17
|
+
separatorIcon?: string;
|
|
18
|
+
ui?: UiProp<BreadcrumbThemeSlots>;
|
|
19
|
+
}
|
|
20
|
+
export interface BreadcrumbSlots {
|
|
21
|
+
/** Replaces one item's content, scoped with item, index, and whether it's the trail's last (current) item. */
|
|
22
|
+
item?: (props: {
|
|
23
|
+
item: BreadcrumbItem;
|
|
24
|
+
index: number;
|
|
25
|
+
current: boolean;
|
|
26
|
+
}) => any;
|
|
27
|
+
separator?: () => any;
|
|
28
|
+
}
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<BreadcrumbProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BreadcrumbProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { navigateTo } from "#imports";
|
|
4
|
+
import { useIcons } from "../composables/use-icons";
|
|
5
|
+
import { useMessages } from "../composables/use-messages";
|
|
6
|
+
import { breadcrumbTheme } from "../theme/breadcrumb";
|
|
7
|
+
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
8
|
+
import Dropdown from "./Dropdown.vue";
|
|
9
|
+
import Icon from "./Icon.vue";
|
|
10
|
+
defineOptions({ inheritAttrs: false });
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
items: { type: Array, required: true },
|
|
13
|
+
maxItems: { type: Number, required: false },
|
|
14
|
+
truncate: { type: [Boolean, String], required: false },
|
|
15
|
+
separatorIcon: { type: String, required: false },
|
|
16
|
+
ui: { type: Object, required: false }
|
|
17
|
+
});
|
|
18
|
+
defineSlots();
|
|
19
|
+
const icons = useIcons();
|
|
20
|
+
const messages = useMessages();
|
|
21
|
+
const theme = useComponentTheme("breadcrumb", breadcrumbTheme);
|
|
22
|
+
const ui = computed(() => theme.value());
|
|
23
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
24
|
+
const listProps = computed(() => resolveSlot(ui.value.list, props.ui?.list));
|
|
25
|
+
const itemProps = computed(() => resolveSlot(ui.value.item, props.ui?.item));
|
|
26
|
+
const linkProps = computed(() => resolveSlot(ui.value.link, props.ui?.link));
|
|
27
|
+
const currentProps = computed(() => resolveSlot(ui.value.current, props.ui?.current));
|
|
28
|
+
const disabledProps = computed(() => resolveSlot(ui.value.disabled, props.ui?.disabled));
|
|
29
|
+
const iconProps = computed(() => resolveSlot(ui.value.icon, props.ui?.icon));
|
|
30
|
+
const labelProps = computed(() => resolveSlot(ui.value.label, props.ui?.label));
|
|
31
|
+
const separatorProps = computed(() => resolveSlot(ui.value.separator, props.ui?.separator));
|
|
32
|
+
const separatorIconProps = computed(() => resolveSlot(ui.value.separatorIcon, props.ui?.separatorIcon));
|
|
33
|
+
const ellipsisProps = computed(() => resolveSlot(ui.value.ellipsis, props.ui?.ellipsis));
|
|
34
|
+
const hiddenItems = computed(() => {
|
|
35
|
+
if (!props.maxItems || props.items.length <= props.maxItems)
|
|
36
|
+
return [];
|
|
37
|
+
return props.items.slice(1, props.items.length - (props.maxItems - 1));
|
|
38
|
+
});
|
|
39
|
+
const visibleItems = computed(() => {
|
|
40
|
+
if (!hiddenItems.value.length)
|
|
41
|
+
return props.items;
|
|
42
|
+
const tailCount = props.maxItems - 1;
|
|
43
|
+
return [props.items[0], ...tailCount > 0 ? props.items.slice(-tailCount) : []];
|
|
44
|
+
});
|
|
45
|
+
const hiddenDropdownItems = computed(() => hiddenItems.value.map((item) => ({
|
|
46
|
+
label: item.label,
|
|
47
|
+
icon: item.icon,
|
|
48
|
+
disabled: item.disabled,
|
|
49
|
+
onSelect: () => {
|
|
50
|
+
if (item.to)
|
|
51
|
+
navigateTo(item.to);
|
|
52
|
+
}
|
|
53
|
+
})));
|
|
54
|
+
const isTruncating = computed(() => props.truncate === true || typeof props.truncate === "string");
|
|
55
|
+
const truncateStyle = computed(() => isTruncating.value ? { maxWidth: props.truncate === true ? "12rem" : props.truncate } : void 0);
|
|
56
|
+
function isLast(item) {
|
|
57
|
+
return item === props.items[props.items.length - 1];
|
|
58
|
+
}
|
|
59
|
+
function isLink(item) {
|
|
60
|
+
return !!item.to && !item.disabled && !isLast(item);
|
|
61
|
+
}
|
|
62
|
+
function realIndex(item) {
|
|
63
|
+
return props.items.indexOf(item);
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<template>
|
|
68
|
+
<nav :aria-label="messages.breadcrumb" v-bind="rootProps">
|
|
69
|
+
<ol v-bind="listProps">
|
|
70
|
+
<template v-for="(item, index) in visibleItems" :key="realIndex(item)">
|
|
71
|
+
<li v-bind="itemProps">
|
|
72
|
+
<slot name="item" :item="item" :index="realIndex(item)" :current="isLast(item)">
|
|
73
|
+
<NuxtLink v-if="isLink(item)" :to="item.to" v-bind="linkProps">
|
|
74
|
+
<Icon v-if="item.icon" :name="item.icon" v-bind="iconProps" />
|
|
75
|
+
<span v-bind="labelProps" :style="truncateStyle" :title="isTruncating ? item.label : void 0">{{ item.label }}</span>
|
|
76
|
+
</NuxtLink>
|
|
77
|
+
<span
|
|
78
|
+
v-else
|
|
79
|
+
v-bind="isLast(item) ? currentProps : disabledProps"
|
|
80
|
+
:aria-current="isLast(item) ? 'page' : void 0"
|
|
81
|
+
>
|
|
82
|
+
<Icon v-if="item.icon" :name="item.icon" v-bind="iconProps" />
|
|
83
|
+
<span v-bind="labelProps" :style="truncateStyle" :title="isTruncating ? item.label : void 0">{{ item.label }}</span>
|
|
84
|
+
</span>
|
|
85
|
+
</slot>
|
|
86
|
+
</li>
|
|
87
|
+
<li v-if="!isLast(item)" v-bind="separatorProps" aria-hidden="true">
|
|
88
|
+
<slot name="separator">
|
|
89
|
+
<Icon :name="separatorIcon ?? icons.chevronRight" v-bind="separatorIconProps" />
|
|
90
|
+
</slot>
|
|
91
|
+
</li>
|
|
92
|
+
<template v-if="index === 0 && hiddenItems.length">
|
|
93
|
+
<li v-bind="itemProps">
|
|
94
|
+
<Dropdown :items="[hiddenDropdownItems]">
|
|
95
|
+
<button type="button" v-bind="ellipsisProps" :aria-label="messages.showHiddenBreadcrumbItems">
|
|
96
|
+
<Icon :name="icons.more" v-bind="separatorIconProps" />
|
|
97
|
+
</button>
|
|
98
|
+
</Dropdown>
|
|
99
|
+
</li>
|
|
100
|
+
<li v-bind="separatorProps" aria-hidden="true">
|
|
101
|
+
<slot name="separator">
|
|
102
|
+
<Icon :name="separatorIcon ?? icons.chevronRight" v-bind="separatorIconProps" />
|
|
103
|
+
</slot>
|
|
104
|
+
</li>
|
|
105
|
+
</template>
|
|
106
|
+
</template>
|
|
107
|
+
</ol>
|
|
108
|
+
</nav>
|
|
109
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { BreadcrumbThemeSlots } from '../theme/breadcrumb.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
type __VLS_Slots = BreadcrumbSlots;
|
|
4
|
+
export interface BreadcrumbItem {
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
to?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface BreadcrumbProps {
|
|
11
|
+
items: BreadcrumbItem[];
|
|
12
|
+
/** Collapses the middle items behind an overflow menu once items.length exceeds this - the first item plus the last (maxItems - 1) stay visible. */
|
|
13
|
+
maxItems?: number;
|
|
14
|
+
/** Truncates each item's label with an ellipsis. `true` caps at 12rem; a string sets a custom CSS max-width (e.g. '20rem', '300px'). @default false */
|
|
15
|
+
truncate?: boolean | string;
|
|
16
|
+
/** @default icons.chevronRight */
|
|
17
|
+
separatorIcon?: string;
|
|
18
|
+
ui?: UiProp<BreadcrumbThemeSlots>;
|
|
19
|
+
}
|
|
20
|
+
export interface BreadcrumbSlots {
|
|
21
|
+
/** Replaces one item's content, scoped with item, index, and whether it's the trail's last (current) item. */
|
|
22
|
+
item?: (props: {
|
|
23
|
+
item: BreadcrumbItem;
|
|
24
|
+
index: number;
|
|
25
|
+
current: boolean;
|
|
26
|
+
}) => any;
|
|
27
|
+
separator?: () => any;
|
|
28
|
+
}
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<BreadcrumbProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BreadcrumbProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { Component } from 'vue';
|
|
3
|
+
import type { ButtonThemeSlots } from '../theme/button.js';
|
|
4
|
+
import type { UiProp } from '../utils/ui.js';
|
|
5
|
+
import { buttonTheme } from '../theme/button.js';
|
|
6
|
+
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
7
|
+
export interface ButtonProps {
|
|
8
|
+
/** A tag name ('a', 'span', ...) or a component reference (e.g. NuxtLink, via resolveComponent) - Primitive renders whichever is given. */
|
|
9
|
+
as?: string | Component;
|
|
10
|
+
color?: ButtonVariants['color'];
|
|
11
|
+
variant?: ButtonVariants['variant'];
|
|
12
|
+
size?: ButtonVariants['size'];
|
|
13
|
+
block?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Shows a spinner in the leading icon's place. Doesn't imply `disabled` - combine `:loading="x" :disabled="x"` if a busy button shouldn't be clickable. */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
/** Adds `--ui-shadow-md` - independent of `variant`, so it composes with any of them. */
|
|
18
|
+
raised?: boolean;
|
|
19
|
+
icon?: string;
|
|
20
|
+
trailingIcon?: string;
|
|
21
|
+
/** Forces (or blocks) the equal-width/height "icon button" shape - overrides the auto-detected default below either direction. Needed for a button whose content is short *text* rather than an icon (a calendar day, a page number) - `iconOnly` below only looks at whether there's a default slot at all, not how wide its content happens to be, so a grid of these would otherwise size to each cell's own digit count instead of forming a uniform grid. */
|
|
22
|
+
square?: boolean;
|
|
23
|
+
ui?: UiProp<ButtonThemeSlots>;
|
|
24
|
+
}
|
|
25
|
+
declare var __VLS_13: {
|
|
26
|
+
class: unknown;
|
|
27
|
+
}, __VLS_20: {}, __VLS_22: {
|
|
28
|
+
class: unknown;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_Slots = {} & {
|
|
31
|
+
icon?: (props: typeof __VLS_13) => any;
|
|
32
|
+
} & {
|
|
33
|
+
default?: (props: typeof __VLS_20) => any;
|
|
34
|
+
} & {
|
|
35
|
+
'trailing-icon'?: (props: typeof __VLS_22) => any;
|
|
36
|
+
};
|
|
37
|
+
declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { Primitive } from "reka-ui";
|
|
3
|
+
import { computed, useSlots } from "vue";
|
|
4
|
+
import { useIcons } from "../composables/use-icons";
|
|
5
|
+
import { useMessages } from "../composables/use-messages";
|
|
6
|
+
import { useRippleEnabled } from "../composables/use-ripple";
|
|
7
|
+
import { vRipple } from "../directives/ripple";
|
|
8
|
+
import { buttonTheme } from "../theme/button";
|
|
9
|
+
import { applyClassPrefix, resolveSlot, useComponentTheme, useRootProps, useThemeProps } from "../utils/ui";
|
|
10
|
+
import Icon from "./Icon.vue";
|
|
11
|
+
defineOptions({ inheritAttrs: false });
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
as: { type: null, required: false, default: "button" },
|
|
14
|
+
color: { type: null, required: false },
|
|
15
|
+
variant: { type: null, required: false },
|
|
16
|
+
size: { type: null, required: false },
|
|
17
|
+
block: { type: Boolean, required: false },
|
|
18
|
+
disabled: { type: Boolean, required: false },
|
|
19
|
+
loading: { type: Boolean, required: false },
|
|
20
|
+
raised: { type: Boolean, required: false },
|
|
21
|
+
icon: { type: String, required: false },
|
|
22
|
+
trailingIcon: { type: String, required: false },
|
|
23
|
+
square: { type: Boolean, required: false, default: void 0 },
|
|
24
|
+
ui: { type: Object, required: false }
|
|
25
|
+
});
|
|
26
|
+
const slots = useSlots();
|
|
27
|
+
const iconOnly = computed(() => !slots.default);
|
|
28
|
+
const icons = useIcons();
|
|
29
|
+
const messages = useMessages();
|
|
30
|
+
const rippleEnabledSetting = useRippleEnabled();
|
|
31
|
+
const rippleEnabled = computed(() => rippleEnabledSetting.value && props.variant !== "text");
|
|
32
|
+
const theme = useComponentTheme("button", buttonTheme);
|
|
33
|
+
const themeProps = useThemeProps("button");
|
|
34
|
+
const ui = computed(() => theme.value({
|
|
35
|
+
color: props.color ?? themeProps.value.color,
|
|
36
|
+
variant: props.variant,
|
|
37
|
+
size: props.size ?? themeProps.value.size,
|
|
38
|
+
block: props.block,
|
|
39
|
+
raised: props.raised,
|
|
40
|
+
square: props.square ?? iconOnly.value
|
|
41
|
+
}));
|
|
42
|
+
const rootProps = useRootProps(() => ui.value.base, () => props.ui?.base);
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<Primitive v-ripple="rippleEnabled" :as="as" :disabled="disabled" :aria-busy="loading || void 0" v-bind="rootProps">
|
|
47
|
+
<Icon v-if="loading" :name="icons.loading" :class="applyClassPrefix('animate-spin')" v-bind="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon)" />
|
|
48
|
+
<!--
|
|
49
|
+
A named slot (not just the `icon` prop) so a consumer building a
|
|
50
|
+
custom control on top of Button (Select's clear button, for one) can
|
|
51
|
+
swap the glyph entirely while still reusing Button's own size-driven
|
|
52
|
+
class via the scoped `class` - most callers never touch this and just
|
|
53
|
+
use `icon`, which the fallback below still handles unchanged.
|
|
54
|
+
-->
|
|
55
|
+
<slot v-else name="icon" :class="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon).class">
|
|
56
|
+
<Icon v-if="icon" :name="icon" v-bind="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon)" />
|
|
57
|
+
</slot>
|
|
58
|
+
<span v-if="loading" :class="applyClassPrefix('sr-only')">{{ messages.loading }}</span>
|
|
59
|
+
<slot />
|
|
60
|
+
<!-- Same reasoning as the leading `icon` slot above - a named slot so a
|
|
61
|
+
consumer can swap the trailing glyph entirely (DatePicker's button-mode
|
|
62
|
+
trigger, for one), while `trailingIcon` alone still covers the common case. -->
|
|
63
|
+
<slot name="trailing-icon" :class="resolveSlot(ui.trailingIcon, props.ui?.trailingIcon).class">
|
|
64
|
+
<Icon v-if="trailingIcon" :name="trailingIcon" v-bind="resolveSlot(ui.trailingIcon, props.ui?.trailingIcon)" />
|
|
65
|
+
</slot>
|
|
66
|
+
</Primitive>
|
|
67
|
+
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { Component } from 'vue';
|
|
3
|
+
import type { ButtonThemeSlots } from '../theme/button.js';
|
|
4
|
+
import type { UiProp } from '../utils/ui.js';
|
|
5
|
+
import { buttonTheme } from '../theme/button.js';
|
|
6
|
+
type ButtonVariants = VariantProps<typeof buttonTheme>;
|
|
7
|
+
export interface ButtonProps {
|
|
8
|
+
/** A tag name ('a', 'span', ...) or a component reference (e.g. NuxtLink, via resolveComponent) - Primitive renders whichever is given. */
|
|
9
|
+
as?: string | Component;
|
|
10
|
+
color?: ButtonVariants['color'];
|
|
11
|
+
variant?: ButtonVariants['variant'];
|
|
12
|
+
size?: ButtonVariants['size'];
|
|
13
|
+
block?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Shows a spinner in the leading icon's place. Doesn't imply `disabled` - combine `:loading="x" :disabled="x"` if a busy button shouldn't be clickable. */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
/** Adds `--ui-shadow-md` - independent of `variant`, so it composes with any of them. */
|
|
18
|
+
raised?: boolean;
|
|
19
|
+
icon?: string;
|
|
20
|
+
trailingIcon?: string;
|
|
21
|
+
/** Forces (or blocks) the equal-width/height "icon button" shape - overrides the auto-detected default below either direction. Needed for a button whose content is short *text* rather than an icon (a calendar day, a page number) - `iconOnly` below only looks at whether there's a default slot at all, not how wide its content happens to be, so a grid of these would otherwise size to each cell's own digit count instead of forming a uniform grid. */
|
|
22
|
+
square?: boolean;
|
|
23
|
+
ui?: UiProp<ButtonThemeSlots>;
|
|
24
|
+
}
|
|
25
|
+
declare var __VLS_13: {
|
|
26
|
+
class: unknown;
|
|
27
|
+
}, __VLS_20: {}, __VLS_22: {
|
|
28
|
+
class: unknown;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_Slots = {} & {
|
|
31
|
+
icon?: (props: typeof __VLS_13) => any;
|
|
32
|
+
} & {
|
|
33
|
+
default?: (props: typeof __VLS_20) => any;
|
|
34
|
+
} & {
|
|
35
|
+
'trailing-icon'?: (props: typeof __VLS_22) => any;
|
|
36
|
+
};
|
|
37
|
+
declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { ButtonGroupThemeSlots } from '../theme/button-group.js';
|
|
3
|
+
import type { UiProp } from '../utils/ui.js';
|
|
4
|
+
import { buttonGroupTheme } from '../theme/button-group.js';
|
|
5
|
+
type ButtonGroupVariants = VariantProps<typeof buttonGroupTheme>;
|
|
6
|
+
export interface ButtonGroupProps {
|
|
7
|
+
orientation?: ButtonGroupVariants['orientation'];
|
|
8
|
+
ui?: UiProp<ButtonGroupThemeSlots>;
|
|
9
|
+
}
|
|
10
|
+
declare var __VLS_1: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_1) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<ButtonGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { buttonGroupTheme } from "../theme/button-group";
|
|
4
|
+
import { useComponentTheme, useRootProps } from "../utils/ui";
|
|
5
|
+
defineOptions({ inheritAttrs: false });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
orientation: { type: null, required: false },
|
|
8
|
+
ui: { type: Object, required: false }
|
|
9
|
+
});
|
|
10
|
+
const theme = useComponentTheme("buttonGroup", buttonGroupTheme);
|
|
11
|
+
const ui = computed(() => theme.value({
|
|
12
|
+
orientation: props.orientation
|
|
13
|
+
}));
|
|
14
|
+
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div v-bind="rootProps">
|
|
19
|
+
<slot />
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|