@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,66 @@
|
|
|
1
|
+
import type { AlertDialogThemeSlots } from '../theme/alert-dialog.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
import type { ButtonProps } from './Button.vue.js';
|
|
4
|
+
export interface AlertDialogProps {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Label for the default Cancel button - only rendered when no `footer` slot is given. @default 'Cancel' */
|
|
9
|
+
cancelLabel?: string;
|
|
10
|
+
/** Label for the default action button - only rendered when no `footer` slot is given. @default 'Continue' */
|
|
11
|
+
actionLabel?: string;
|
|
12
|
+
/** Color for the default action button - e.g. `'danger'` for a destructive confirmation. */
|
|
13
|
+
actionColor?: ButtonProps['color'];
|
|
14
|
+
/** When `false`, Escape no longer closes the dialog - the `escapeKeyDown` event still fires either way. An outside click never closes it regardless of this: Reka's AlertDialogContent blocks that unconditionally, matching the "must make an explicit choice" semantic this component exists for (unlike Modal, which allows both by default). */
|
|
15
|
+
dismissible?: boolean;
|
|
16
|
+
/** Set `false` to render no backdrop behind the dialog at all. */
|
|
17
|
+
overlay?: boolean;
|
|
18
|
+
/** Set `false` to skip the open/close animation entirely - this library's animation is CSS-only, so this just omits those classes rather than toggling a JS transition system. */
|
|
19
|
+
transition?: boolean;
|
|
20
|
+
ui?: UiProp<AlertDialogThemeSlots>;
|
|
21
|
+
}
|
|
22
|
+
export interface AlertDialogEmits {
|
|
23
|
+
'update:open': [value: boolean];
|
|
24
|
+
/** Fired when the default Cancel button is clicked - not fired for a custom `footer` slot, which owns its own buttons/handlers entirely. */
|
|
25
|
+
'cancel': [];
|
|
26
|
+
/** Fired when the default action button is clicked. */
|
|
27
|
+
'confirm': [];
|
|
28
|
+
'escapeKeyDown': [event: KeyboardEvent];
|
|
29
|
+
/** A pointer went down outside the dialog - this can never actually close it (Reka blocks that unconditionally), but still useful for something like a shake animation to signal it won't. */
|
|
30
|
+
'pointerDownOutside': [event: Event];
|
|
31
|
+
/** Fires once the close transition has actually finished (or immediately, if `transition` is off) - the signal a programmatic caller needs before it's safe to unmount this instance without cutting its exit animation short. */
|
|
32
|
+
'afterLeave': [];
|
|
33
|
+
}
|
|
34
|
+
declare var __VLS_16: {}, __VLS_39: {}, __VLS_53: {}, __VLS_55: {};
|
|
35
|
+
type __VLS_Slots = {} & {
|
|
36
|
+
default?: (props: typeof __VLS_16) => any;
|
|
37
|
+
} & {
|
|
38
|
+
header?: (props: typeof __VLS_39) => any;
|
|
39
|
+
} & {
|
|
40
|
+
body?: (props: typeof __VLS_53) => any;
|
|
41
|
+
} & {
|
|
42
|
+
footer?: (props: typeof __VLS_55) => any;
|
|
43
|
+
};
|
|
44
|
+
declare const __VLS_base: import("vue").DefineComponent<AlertDialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
|
+
cancel: () => any;
|
|
46
|
+
"update:open": (value: boolean) => any;
|
|
47
|
+
confirm: () => any;
|
|
48
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
49
|
+
pointerDownOutside: (event: Event) => any;
|
|
50
|
+
afterLeave: () => any;
|
|
51
|
+
}, string, import("vue").PublicProps, Readonly<AlertDialogProps> & Readonly<{
|
|
52
|
+
onCancel?: (() => any) | undefined;
|
|
53
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
54
|
+
onConfirm?: (() => any) | undefined;
|
|
55
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
56
|
+
onPointerDownOutside?: ((event: Event) => any) | undefined;
|
|
57
|
+
onAfterLeave?: (() => any) | undefined;
|
|
58
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
59
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
60
|
+
declare const _default: typeof __VLS_export;
|
|
61
|
+
export default _default;
|
|
62
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
63
|
+
new (): {
|
|
64
|
+
$slots: S;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogPortal, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger } from "reka-ui";
|
|
3
|
+
import { computed, ref, useSlots, watch, watchEffect } from "vue";
|
|
4
|
+
import { useMessages } from "../composables/use-messages";
|
|
5
|
+
import { alertDialogTheme } from "../theme/alert-dialog";
|
|
6
|
+
import { resolveSlot, useComponentTheme } from "../utils/ui";
|
|
7
|
+
import Button from "./Button.vue";
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
open: { type: Boolean, required: false },
|
|
10
|
+
title: { type: String, required: false },
|
|
11
|
+
description: { type: String, required: false },
|
|
12
|
+
cancelLabel: { type: String, required: false },
|
|
13
|
+
actionLabel: { type: String, required: false },
|
|
14
|
+
actionColor: { type: null, required: false },
|
|
15
|
+
dismissible: { type: Boolean, required: false, default: true },
|
|
16
|
+
overlay: { type: Boolean, required: false, default: true },
|
|
17
|
+
transition: { type: Boolean, required: false, default: true },
|
|
18
|
+
ui: { type: Object, required: false }
|
|
19
|
+
});
|
|
20
|
+
const emit = defineEmits(["update:open", "cancel", "confirm", "escapeKeyDown", "pointerDownOutside", "afterLeave"]);
|
|
21
|
+
function onEscapeKeyDown(event) {
|
|
22
|
+
if (!props.dismissible)
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
emit("escapeKeyDown", event);
|
|
25
|
+
}
|
|
26
|
+
function onPointerDownOutside(event) {
|
|
27
|
+
emit("pointerDownOutside", event);
|
|
28
|
+
}
|
|
29
|
+
function onContentAnimationEnd(event) {
|
|
30
|
+
if (event.target !== event.currentTarget)
|
|
31
|
+
return;
|
|
32
|
+
if (event.target.getAttribute("data-state") === "closed")
|
|
33
|
+
emit("afterLeave");
|
|
34
|
+
}
|
|
35
|
+
const internalOpen = ref(props.open ?? false);
|
|
36
|
+
watch(() => props.open, (value) => {
|
|
37
|
+
if (value !== void 0)
|
|
38
|
+
internalOpen.value = value;
|
|
39
|
+
});
|
|
40
|
+
function onUpdateOpen(value) {
|
|
41
|
+
internalOpen.value = value;
|
|
42
|
+
emit("update:open", value);
|
|
43
|
+
}
|
|
44
|
+
watch(internalOpen, (value) => {
|
|
45
|
+
if (!value && !props.transition)
|
|
46
|
+
emit("afterLeave");
|
|
47
|
+
});
|
|
48
|
+
function onCancel() {
|
|
49
|
+
emit("cancel");
|
|
50
|
+
}
|
|
51
|
+
function onConfirm() {
|
|
52
|
+
emit("confirm");
|
|
53
|
+
}
|
|
54
|
+
const slots = useSlots();
|
|
55
|
+
if (import.meta.dev) {
|
|
56
|
+
watchEffect(() => {
|
|
57
|
+
if (!props.title && !slots.header)
|
|
58
|
+
console.warn("[SAlertDialog] no accessible name - pass a `title` prop, or a `header` slot containing a heading, so screen readers can announce this dialog.");
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const messages = useMessages();
|
|
62
|
+
const theme = useComponentTheme("alertDialog", alertDialogTheme);
|
|
63
|
+
const ui = computed(() => theme.value({ transition: props.transition }));
|
|
64
|
+
const overlayProps = computed(() => resolveSlot(ui.value.overlay, props.ui?.overlay));
|
|
65
|
+
const contentProps = computed(() => resolveSlot(ui.value.content, props.ui?.content));
|
|
66
|
+
const headerProps = computed(() => resolveSlot(ui.value.header, props.ui?.header));
|
|
67
|
+
const titleProps = computed(() => resolveSlot(ui.value.title, props.ui?.title));
|
|
68
|
+
const descriptionProps = computed(() => resolveSlot(ui.value.description, props.ui?.description));
|
|
69
|
+
const bodyProps = computed(() => resolveSlot(ui.value.body, props.ui?.body));
|
|
70
|
+
const footerProps = computed(() => resolveSlot(ui.value.footer, props.ui?.footer));
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<template>
|
|
74
|
+
<AlertDialogRoot :open="internalOpen" @update:open="onUpdateOpen">
|
|
75
|
+
<AlertDialogTrigger v-if="$slots.default" as-child>
|
|
76
|
+
<slot />
|
|
77
|
+
</AlertDialogTrigger>
|
|
78
|
+
<AlertDialogPortal>
|
|
79
|
+
<AlertDialogOverlay v-if="overlay" v-bind="overlayProps" />
|
|
80
|
+
<AlertDialogContent
|
|
81
|
+
v-bind="contentProps"
|
|
82
|
+
@escape-key-down="onEscapeKeyDown"
|
|
83
|
+
@pointer-down-outside="onPointerDownOutside"
|
|
84
|
+
@animationend="onContentAnimationEnd"
|
|
85
|
+
>
|
|
86
|
+
<div v-if="title || description || $slots.header" v-bind="headerProps">
|
|
87
|
+
<slot name="header">
|
|
88
|
+
<AlertDialogTitle v-if="title" v-bind="titleProps">
|
|
89
|
+
{{ title }}
|
|
90
|
+
</AlertDialogTitle>
|
|
91
|
+
<AlertDialogDescription v-if="description" v-bind="descriptionProps">
|
|
92
|
+
{{ description }}
|
|
93
|
+
</AlertDialogDescription>
|
|
94
|
+
</slot>
|
|
95
|
+
</div>
|
|
96
|
+
<div v-if="$slots.body" v-bind="bodyProps">
|
|
97
|
+
<slot name="body" />
|
|
98
|
+
</div>
|
|
99
|
+
<div v-bind="footerProps">
|
|
100
|
+
<slot name="footer">
|
|
101
|
+
<AlertDialogCancel as-child>
|
|
102
|
+
<Button variant="ghost" color="neutral" @click="onCancel">
|
|
103
|
+
{{ cancelLabel ?? messages.cancel }}
|
|
104
|
+
</Button>
|
|
105
|
+
</AlertDialogCancel>
|
|
106
|
+
<AlertDialogAction as-child>
|
|
107
|
+
<Button :color="actionColor" @click="onConfirm">
|
|
108
|
+
{{ actionLabel ?? messages.continue }}
|
|
109
|
+
</Button>
|
|
110
|
+
</AlertDialogAction>
|
|
111
|
+
</slot>
|
|
112
|
+
</div>
|
|
113
|
+
</AlertDialogContent>
|
|
114
|
+
</AlertDialogPortal>
|
|
115
|
+
</AlertDialogRoot>
|
|
116
|
+
</template>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { AlertDialogThemeSlots } from '../theme/alert-dialog.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
import type { ButtonProps } from './Button.vue.js';
|
|
4
|
+
export interface AlertDialogProps {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Label for the default Cancel button - only rendered when no `footer` slot is given. @default 'Cancel' */
|
|
9
|
+
cancelLabel?: string;
|
|
10
|
+
/** Label for the default action button - only rendered when no `footer` slot is given. @default 'Continue' */
|
|
11
|
+
actionLabel?: string;
|
|
12
|
+
/** Color for the default action button - e.g. `'danger'` for a destructive confirmation. */
|
|
13
|
+
actionColor?: ButtonProps['color'];
|
|
14
|
+
/** When `false`, Escape no longer closes the dialog - the `escapeKeyDown` event still fires either way. An outside click never closes it regardless of this: Reka's AlertDialogContent blocks that unconditionally, matching the "must make an explicit choice" semantic this component exists for (unlike Modal, which allows both by default). */
|
|
15
|
+
dismissible?: boolean;
|
|
16
|
+
/** Set `false` to render no backdrop behind the dialog at all. */
|
|
17
|
+
overlay?: boolean;
|
|
18
|
+
/** Set `false` to skip the open/close animation entirely - this library's animation is CSS-only, so this just omits those classes rather than toggling a JS transition system. */
|
|
19
|
+
transition?: boolean;
|
|
20
|
+
ui?: UiProp<AlertDialogThemeSlots>;
|
|
21
|
+
}
|
|
22
|
+
export interface AlertDialogEmits {
|
|
23
|
+
'update:open': [value: boolean];
|
|
24
|
+
/** Fired when the default Cancel button is clicked - not fired for a custom `footer` slot, which owns its own buttons/handlers entirely. */
|
|
25
|
+
'cancel': [];
|
|
26
|
+
/** Fired when the default action button is clicked. */
|
|
27
|
+
'confirm': [];
|
|
28
|
+
'escapeKeyDown': [event: KeyboardEvent];
|
|
29
|
+
/** A pointer went down outside the dialog - this can never actually close it (Reka blocks that unconditionally), but still useful for something like a shake animation to signal it won't. */
|
|
30
|
+
'pointerDownOutside': [event: Event];
|
|
31
|
+
/** Fires once the close transition has actually finished (or immediately, if `transition` is off) - the signal a programmatic caller needs before it's safe to unmount this instance without cutting its exit animation short. */
|
|
32
|
+
'afterLeave': [];
|
|
33
|
+
}
|
|
34
|
+
declare var __VLS_16: {}, __VLS_39: {}, __VLS_53: {}, __VLS_55: {};
|
|
35
|
+
type __VLS_Slots = {} & {
|
|
36
|
+
default?: (props: typeof __VLS_16) => any;
|
|
37
|
+
} & {
|
|
38
|
+
header?: (props: typeof __VLS_39) => any;
|
|
39
|
+
} & {
|
|
40
|
+
body?: (props: typeof __VLS_53) => any;
|
|
41
|
+
} & {
|
|
42
|
+
footer?: (props: typeof __VLS_55) => any;
|
|
43
|
+
};
|
|
44
|
+
declare const __VLS_base: import("vue").DefineComponent<AlertDialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
|
+
cancel: () => any;
|
|
46
|
+
"update:open": (value: boolean) => any;
|
|
47
|
+
confirm: () => any;
|
|
48
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
49
|
+
pointerDownOutside: (event: Event) => any;
|
|
50
|
+
afterLeave: () => any;
|
|
51
|
+
}, string, import("vue").PublicProps, Readonly<AlertDialogProps> & Readonly<{
|
|
52
|
+
onCancel?: (() => any) | undefined;
|
|
53
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
54
|
+
onConfirm?: (() => any) | undefined;
|
|
55
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
56
|
+
onPointerDownOutside?: ((event: Event) => any) | undefined;
|
|
57
|
+
onAfterLeave?: (() => any) | undefined;
|
|
58
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
59
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
60
|
+
declare const _default: typeof __VLS_export;
|
|
61
|
+
export default _default;
|
|
62
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
63
|
+
new (): {
|
|
64
|
+
$slots: S;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface AppProps {
|
|
2
|
+
/**
|
|
3
|
+
* Reading direction for the whole app. Does two distinct things at once,
|
|
4
|
+
* both needed for real RTL support: passed to Reka UI's ConfigProvider,
|
|
5
|
+
* which every primitive underneath inherits for its own internal
|
|
6
|
+
* direction-aware logic (e.g. RadioGroup/Tabs' roving-tabindex arrow-key
|
|
7
|
+
* handling, floating-ui positioning) - and set as the real `dir`
|
|
8
|
+
* attribute on `<html>` via useHead, since ConfigProvider itself renders
|
|
9
|
+
* no DOM element at all (confirmed: it, ToastProvider, and
|
|
10
|
+
* TooltipProvider are all bare `<slot />` passthrough - there's no
|
|
11
|
+
* element inside SApp to attach a `dir` attribute to even if we wanted
|
|
12
|
+
* one there instead). The `<html>` attribute is what actually drives
|
|
13
|
+
* native browser behavior (text direction, scrollbar side) and any CSS
|
|
14
|
+
* logical-property utility (`ms-*`/`ps-*`/`text-start`/...) - those
|
|
15
|
+
* resolve against the nearest `dir` in the DOM, not Reka's own Vue-level
|
|
16
|
+
* context, so ConfigProvider alone doesn't make anything look RTL.
|
|
17
|
+
*/
|
|
18
|
+
dir?: 'ltr' | 'rtl';
|
|
19
|
+
}
|
|
20
|
+
declare var __VLS_20: {};
|
|
21
|
+
type __VLS_Slots = {} & {
|
|
22
|
+
default?: (props: typeof __VLS_20) => any;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<AppProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AppProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ConfigProvider, ToastProvider, TooltipProvider } from "reka-ui";
|
|
3
|
+
import { useHead } from "#imports";
|
|
4
|
+
import { useLocale } from "../composables/use-locale";
|
|
5
|
+
import DrawerRenderer from "./DrawerRenderer.vue";
|
|
6
|
+
import ModalRenderer from "./ModalRenderer.vue";
|
|
7
|
+
import SlideoverRenderer from "./SlideoverRenderer.vue";
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
dir: { type: String, required: false, default: "ltr" }
|
|
10
|
+
});
|
|
11
|
+
const locale = useLocale();
|
|
12
|
+
useHead({ htmlAttrs: { dir: () => props.dir, lang: () => locale.value } });
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<ConfigProvider :dir="dir">
|
|
17
|
+
<ToastProvider>
|
|
18
|
+
<TooltipProvider>
|
|
19
|
+
<slot />
|
|
20
|
+
</TooltipProvider>
|
|
21
|
+
</ToastProvider>
|
|
22
|
+
<ModalRenderer />
|
|
23
|
+
<SlideoverRenderer />
|
|
24
|
+
<DrawerRenderer />
|
|
25
|
+
</ConfigProvider>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface AppProps {
|
|
2
|
+
/**
|
|
3
|
+
* Reading direction for the whole app. Does two distinct things at once,
|
|
4
|
+
* both needed for real RTL support: passed to Reka UI's ConfigProvider,
|
|
5
|
+
* which every primitive underneath inherits for its own internal
|
|
6
|
+
* direction-aware logic (e.g. RadioGroup/Tabs' roving-tabindex arrow-key
|
|
7
|
+
* handling, floating-ui positioning) - and set as the real `dir`
|
|
8
|
+
* attribute on `<html>` via useHead, since ConfigProvider itself renders
|
|
9
|
+
* no DOM element at all (confirmed: it, ToastProvider, and
|
|
10
|
+
* TooltipProvider are all bare `<slot />` passthrough - there's no
|
|
11
|
+
* element inside SApp to attach a `dir` attribute to even if we wanted
|
|
12
|
+
* one there instead). The `<html>` attribute is what actually drives
|
|
13
|
+
* native browser behavior (text direction, scrollbar side) and any CSS
|
|
14
|
+
* logical-property utility (`ms-*`/`ps-*`/`text-start`/...) - those
|
|
15
|
+
* resolve against the nearest `dir` in the DOM, not Reka's own Vue-level
|
|
16
|
+
* context, so ConfigProvider alone doesn't make anything look RTL.
|
|
17
|
+
*/
|
|
18
|
+
dir?: 'ltr' | 'rtl';
|
|
19
|
+
}
|
|
20
|
+
declare var __VLS_20: {};
|
|
21
|
+
type __VLS_Slots = {} & {
|
|
22
|
+
default?: (props: typeof __VLS_20) => any;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<AppProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AppProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { SelectItems } from '../composables/use-combobox-select.js';
|
|
3
|
+
import type { selectTheme, SelectThemeSlots } from '../theme/select.js';
|
|
4
|
+
import type { UiProp } from '../utils/ui.js';
|
|
5
|
+
type SelectVariants = VariantProps<typeof selectTheme>;
|
|
6
|
+
export interface AutocompleteProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
items: SelectItems;
|
|
10
|
+
valueKey?: string;
|
|
11
|
+
labelKey?: string;
|
|
12
|
+
modelValue?: string | string[];
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
virtualize?: boolean | {
|
|
15
|
+
estimateSize?: number;
|
|
16
|
+
overscan?: number;
|
|
17
|
+
};
|
|
18
|
+
displayMode?: 'comma' | 'chip';
|
|
19
|
+
maxChips?: number;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
size?: SelectVariants['size'];
|
|
24
|
+
invalid?: boolean;
|
|
25
|
+
/** The focus-ring color - the resting (unfocused) ring stays neutral regardless. */
|
|
26
|
+
color?: SelectVariants['color'];
|
|
27
|
+
clearable?: boolean;
|
|
28
|
+
dropdown?: boolean;
|
|
29
|
+
forceSelection?: boolean;
|
|
30
|
+
searchTerm?: string;
|
|
31
|
+
resetSearchTermOnBlur?: boolean;
|
|
32
|
+
resetSearchTermOnSelect?: boolean;
|
|
33
|
+
/** Shows a small pointer triangle connecting the panel to its trigger. */
|
|
34
|
+
arrow?: boolean;
|
|
35
|
+
/** Below 768px viewport width, presents the dropdown as a centered Modal instead of a small anchored panel - easier to tap with a finger. Opt-in (defaults `false`) rather than automatic, so an existing usage's look never changes without asking for it. */
|
|
36
|
+
mobileModal?: boolean;
|
|
37
|
+
ui?: UiProp<SelectThemeSlots>;
|
|
38
|
+
}
|
|
39
|
+
export interface AutocompleteEmits {
|
|
40
|
+
'update:modelValue': [value: string | string[] | undefined];
|
|
41
|
+
'update:searchTerm': [value: string];
|
|
42
|
+
}
|
|
43
|
+
declare var __VLS_10: string, __VLS_11: any;
|
|
44
|
+
type __VLS_Slots = {} & {
|
|
45
|
+
[K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
|
|
46
|
+
};
|
|
47
|
+
declare const __VLS_base: import("vue").DefineComponent<AutocompleteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
48
|
+
"update:modelValue": (value: string | string[] | undefined) => any;
|
|
49
|
+
"update:searchTerm": (value: string) => any;
|
|
50
|
+
}, string, import("vue").PublicProps, Readonly<AutocompleteProps> & Readonly<{
|
|
51
|
+
"onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
|
|
52
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
53
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
54
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
55
|
+
declare const _default: typeof __VLS_export;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useForwardPropsEmits } from "reka-ui";
|
|
3
|
+
import ComboboxSelectBase from "../internal/ComboboxSelectBase.vue";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
id: { type: String, required: false },
|
|
6
|
+
name: { type: String, required: false },
|
|
7
|
+
items: { type: Array, required: true },
|
|
8
|
+
valueKey: { type: String, required: false },
|
|
9
|
+
labelKey: { type: String, required: false },
|
|
10
|
+
modelValue: { type: [String, Array], required: false },
|
|
11
|
+
multiple: { type: Boolean, required: false },
|
|
12
|
+
virtualize: { type: [Boolean, Object], required: false },
|
|
13
|
+
displayMode: { type: String, required: false },
|
|
14
|
+
maxChips: { type: Number, required: false },
|
|
15
|
+
loading: { type: Boolean, required: false },
|
|
16
|
+
placeholder: { type: String, required: false },
|
|
17
|
+
disabled: { type: Boolean, required: false },
|
|
18
|
+
size: { type: null, required: false },
|
|
19
|
+
invalid: { type: Boolean, required: false },
|
|
20
|
+
color: { type: null, required: false },
|
|
21
|
+
clearable: { type: Boolean, required: false },
|
|
22
|
+
dropdown: { type: Boolean, required: false },
|
|
23
|
+
forceSelection: { type: Boolean, required: false },
|
|
24
|
+
searchTerm: { type: String, required: false },
|
|
25
|
+
resetSearchTermOnBlur: { type: Boolean, required: false },
|
|
26
|
+
resetSearchTermOnSelect: { type: Boolean, required: false },
|
|
27
|
+
arrow: { type: Boolean, required: false },
|
|
28
|
+
mobileModal: { type: Boolean, required: false },
|
|
29
|
+
ui: { type: Object, required: false }
|
|
30
|
+
});
|
|
31
|
+
const emit = defineEmits(["update:modelValue", "update:searchTerm"]);
|
|
32
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<ComboboxSelectBase v-bind="forwarded" :creatable="true" :searchable="true">
|
|
37
|
+
<template v-for="(_, slotName) in $slots" #[slotName]="slotProps">
|
|
38
|
+
<slot :name="slotName" v-bind="slotProps ?? {}" />
|
|
39
|
+
</template>
|
|
40
|
+
</ComboboxSelectBase>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { SelectItems } from '../composables/use-combobox-select.js';
|
|
3
|
+
import type { selectTheme, SelectThemeSlots } from '../theme/select.js';
|
|
4
|
+
import type { UiProp } from '../utils/ui.js';
|
|
5
|
+
type SelectVariants = VariantProps<typeof selectTheme>;
|
|
6
|
+
export interface AutocompleteProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
items: SelectItems;
|
|
10
|
+
valueKey?: string;
|
|
11
|
+
labelKey?: string;
|
|
12
|
+
modelValue?: string | string[];
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
virtualize?: boolean | {
|
|
15
|
+
estimateSize?: number;
|
|
16
|
+
overscan?: number;
|
|
17
|
+
};
|
|
18
|
+
displayMode?: 'comma' | 'chip';
|
|
19
|
+
maxChips?: number;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
size?: SelectVariants['size'];
|
|
24
|
+
invalid?: boolean;
|
|
25
|
+
/** The focus-ring color - the resting (unfocused) ring stays neutral regardless. */
|
|
26
|
+
color?: SelectVariants['color'];
|
|
27
|
+
clearable?: boolean;
|
|
28
|
+
dropdown?: boolean;
|
|
29
|
+
forceSelection?: boolean;
|
|
30
|
+
searchTerm?: string;
|
|
31
|
+
resetSearchTermOnBlur?: boolean;
|
|
32
|
+
resetSearchTermOnSelect?: boolean;
|
|
33
|
+
/** Shows a small pointer triangle connecting the panel to its trigger. */
|
|
34
|
+
arrow?: boolean;
|
|
35
|
+
/** Below 768px viewport width, presents the dropdown as a centered Modal instead of a small anchored panel - easier to tap with a finger. Opt-in (defaults `false`) rather than automatic, so an existing usage's look never changes without asking for it. */
|
|
36
|
+
mobileModal?: boolean;
|
|
37
|
+
ui?: UiProp<SelectThemeSlots>;
|
|
38
|
+
}
|
|
39
|
+
export interface AutocompleteEmits {
|
|
40
|
+
'update:modelValue': [value: string | string[] | undefined];
|
|
41
|
+
'update:searchTerm': [value: string];
|
|
42
|
+
}
|
|
43
|
+
declare var __VLS_10: string, __VLS_11: any;
|
|
44
|
+
type __VLS_Slots = {} & {
|
|
45
|
+
[K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
|
|
46
|
+
};
|
|
47
|
+
declare const __VLS_base: import("vue").DefineComponent<AutocompleteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
48
|
+
"update:modelValue": (value: string | string[] | undefined) => any;
|
|
49
|
+
"update:searchTerm": (value: string) => any;
|
|
50
|
+
}, string, import("vue").PublicProps, Readonly<AutocompleteProps> & Readonly<{
|
|
51
|
+
"onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
|
|
52
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
53
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
54
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
55
|
+
declare const _default: typeof __VLS_export;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -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,64 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { AvatarFallback, AvatarImage, AvatarRoot } from "reka-ui";
|
|
3
|
+
import { computed, inject } from "vue";
|
|
4
|
+
import { useIcons } from "../composables/use-icons";
|
|
5
|
+
import { avatarTheme } from "../theme/avatar";
|
|
6
|
+
import { AVATAR_SIZE_INJECTION_KEY } from "../utils/injection-keys";
|
|
7
|
+
import { resolveSlot, useComponentTheme, useRootProps, useThemeProps } from "../utils/ui";
|
|
8
|
+
import Icon from "./Icon.vue";
|
|
9
|
+
defineOptions({ inheritAttrs: false });
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
as: { type: null, required: false },
|
|
12
|
+
src: { type: String, required: false },
|
|
13
|
+
alt: { type: String, required: false },
|
|
14
|
+
text: { type: String, required: false },
|
|
15
|
+
icon: { type: String, required: false },
|
|
16
|
+
color: { type: null, required: false },
|
|
17
|
+
statusColor: { type: null, required: false },
|
|
18
|
+
size: { type: null, required: false },
|
|
19
|
+
shape: { type: null, required: false },
|
|
20
|
+
status: { type: Boolean, required: false },
|
|
21
|
+
referrerPolicy: { type: null, required: false },
|
|
22
|
+
crossOrigin: { type: null, required: false },
|
|
23
|
+
ui: { type: Object, required: false }
|
|
24
|
+
});
|
|
25
|
+
const icons = useIcons();
|
|
26
|
+
const theme = useComponentTheme("avatar", avatarTheme);
|
|
27
|
+
const themeProps = useThemeProps("avatar");
|
|
28
|
+
const groupSize = inject(AVATAR_SIZE_INJECTION_KEY, void 0);
|
|
29
|
+
const ui = computed(() => theme.value({
|
|
30
|
+
color: props.color ?? themeProps.value.color,
|
|
31
|
+
statusColor: props.statusColor,
|
|
32
|
+
// AvatarGroup's own size (the more locally-specific ancestor) wins over
|
|
33
|
+
// an STheme prop default before falling all the way back to tv()'s own
|
|
34
|
+
// defaultVariants.
|
|
35
|
+
size: props.size ?? groupSize?.value ?? themeProps.value.size,
|
|
36
|
+
shape: props.shape
|
|
37
|
+
}));
|
|
38
|
+
const rootProps = useRootProps(() => ui.value.base, () => props.ui?.base);
|
|
39
|
+
const rootAriaLabel = computed(() => props.src ? void 0 : (props.alt ?? props.text) || void 0);
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<AvatarRoot :as="as" :aria-label="rootAriaLabel" v-bind="rootProps">
|
|
44
|
+
<span v-bind="resolveSlot(ui.content, props.ui?.content)">
|
|
45
|
+
<AvatarImage
|
|
46
|
+
v-if="src"
|
|
47
|
+
:src="src"
|
|
48
|
+
:alt="alt"
|
|
49
|
+
:referrer-policy="referrerPolicy"
|
|
50
|
+
:crossorigin="crossOrigin"
|
|
51
|
+
v-bind="resolveSlot(ui.image, props.ui?.image)"
|
|
52
|
+
/>
|
|
53
|
+
<AvatarFallback>
|
|
54
|
+
<slot name="fallback">
|
|
55
|
+
<span v-if="text" v-bind="resolveSlot(ui.fallback, props.ui?.fallback)">{{ text }}</span>
|
|
56
|
+
<slot v-else name="icon" :class="resolveSlot(ui.icon, props.ui?.icon).class">
|
|
57
|
+
<Icon :name="icon || icons.user" v-bind="resolveSlot(ui.icon, props.ui?.icon)" />
|
|
58
|
+
</slot>
|
|
59
|
+
</slot>
|
|
60
|
+
</AvatarFallback>
|
|
61
|
+
</span>
|
|
62
|
+
<span v-if="status" v-bind="resolveSlot(ui.status, props.ui?.status)" />
|
|
63
|
+
</AvatarRoot>
|
|
64
|
+
</template>
|