@sewadah/selaras 0.1.1 → 0.3.0
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/README.md +67 -20
- package/dist/module.d.mts +10 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +123 -36
- package/dist/runtime/components/Accordion.d.vue.ts +3 -0
- package/dist/runtime/components/Accordion.vue +5 -1
- package/dist/runtime/components/Accordion.vue.d.ts +3 -0
- package/dist/runtime/components/Alert.d.vue.ts +2 -1
- package/dist/runtime/components/Alert.vue +6 -3
- package/dist/runtime/components/Alert.vue.d.ts +2 -1
- package/dist/runtime/components/AlertDialog.d.vue.ts +2 -0
- package/dist/runtime/components/AlertDialog.vue +21 -8
- package/dist/runtime/components/AlertDialog.vue.d.ts +2 -0
- package/dist/runtime/components/App.vue +9 -2
- package/dist/runtime/components/Autocomplete.d.vue.ts +22 -58
- package/dist/runtime/components/Autocomplete.vue +50 -11
- package/dist/runtime/components/Autocomplete.vue.d.ts +22 -58
- package/dist/runtime/components/Avatar.d.vue.ts +2 -1
- package/dist/runtime/components/Avatar.vue +4 -2
- package/dist/runtime/components/Avatar.vue.d.ts +2 -1
- package/dist/runtime/components/Badge.d.vue.ts +3 -2
- package/dist/runtime/components/Badge.vue +8 -5
- package/dist/runtime/components/Badge.vue.d.ts +3 -2
- package/dist/runtime/components/Breadcrumb.d.vue.ts +3 -0
- package/dist/runtime/components/Breadcrumb.vue +5 -2
- package/dist/runtime/components/Breadcrumb.vue.d.ts +3 -0
- package/dist/runtime/components/Button.d.vue.ts +5 -2
- package/dist/runtime/components/Button.vue +5 -2
- package/dist/runtime/components/Button.vue.d.ts +5 -2
- package/dist/runtime/components/Checkbox.d.vue.ts +2 -1
- package/dist/runtime/components/Checkbox.vue +4 -2
- package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
- package/dist/runtime/components/Chip.d.vue.ts +2 -1
- package/dist/runtime/components/Chip.vue +4 -2
- package/dist/runtime/components/Chip.vue.d.ts +2 -1
- package/dist/runtime/components/Collapsible.d.vue.ts +3 -0
- package/dist/runtime/components/Collapsible.vue +11 -6
- package/dist/runtime/components/Collapsible.vue.d.ts +3 -0
- package/dist/runtime/components/ColorPicker.d.vue.ts +13 -3
- package/dist/runtime/components/ColorPicker.vue +60 -14
- package/dist/runtime/components/ColorPicker.vue.d.ts +13 -3
- package/dist/runtime/components/Column.d.ts +1 -1
- package/dist/runtime/components/CommandPalette.vue +18 -16
- package/dist/runtime/components/ContentNavigation.d.vue.ts +3 -0
- package/dist/runtime/components/ContentNavigation.vue +6 -3
- package/dist/runtime/components/ContentNavigation.vue.d.ts +3 -0
- package/dist/runtime/components/ContentSurround.d.vue.ts +3 -0
- package/dist/runtime/components/ContentSurround.vue +7 -4
- package/dist/runtime/components/ContentSurround.vue.d.ts +3 -0
- package/dist/runtime/components/ContentToc.d.vue.ts +3 -0
- package/dist/runtime/components/ContentToc.vue +22 -12
- package/dist/runtime/components/ContentToc.vue.d.ts +3 -0
- package/dist/runtime/components/ContextMenu.vue +3 -2
- package/dist/runtime/components/DashboardSidebar.vue +1 -1
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +1 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue +3 -1
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -0
- package/dist/runtime/components/DatePicker.d.vue.ts +32 -23
- package/dist/runtime/components/DatePicker.vue +130 -60
- package/dist/runtime/components/DatePicker.vue.d.ts +32 -23
- package/dist/runtime/components/Drawer.d.vue.ts +2 -0
- package/dist/runtime/components/Drawer.vue +21 -8
- package/dist/runtime/components/Drawer.vue.d.ts +2 -0
- package/dist/runtime/components/DrawerRenderer.vue +28 -21
- package/dist/runtime/components/Dropdown.d.vue.ts +14 -4
- package/dist/runtime/components/Dropdown.vue +19 -4
- package/dist/runtime/components/Dropdown.vue.d.ts +14 -4
- package/dist/runtime/components/FileTree.d.vue.ts +3 -0
- package/dist/runtime/components/FileTree.vue +7 -3
- package/dist/runtime/components/FileTree.vue.d.ts +3 -0
- package/dist/runtime/components/FileUpload.d.vue.ts +2 -1
- package/dist/runtime/components/FileUpload.vue +75 -32
- package/dist/runtime/components/FileUpload.vue.d.ts +2 -1
- package/dist/runtime/components/FormField.d.vue.ts +2 -0
- package/dist/runtime/components/FormField.vue +12 -9
- package/dist/runtime/components/FormField.vue.d.ts +2 -0
- package/dist/runtime/components/Icon.d.vue.ts +2 -4
- package/dist/runtime/components/Icon.vue +7 -2
- package/dist/runtime/components/Icon.vue.d.ts +2 -4
- package/dist/runtime/components/Input.d.vue.ts +2 -1
- package/dist/runtime/components/Input.vue +12 -6
- package/dist/runtime/components/Input.vue.d.ts +2 -1
- package/dist/runtime/components/InputNumber.d.vue.ts +4 -1
- package/dist/runtime/components/InputNumber.vue +21 -8
- package/dist/runtime/components/InputNumber.vue.d.ts +4 -1
- package/dist/runtime/components/Modal.d.vue.ts +2 -0
- package/dist/runtime/components/Modal.vue +21 -8
- package/dist/runtime/components/Modal.vue.d.ts +2 -0
- package/dist/runtime/components/ModalRenderer.vue +23 -16
- package/dist/runtime/components/NavigationMenu.d.vue.ts +2 -4
- package/dist/runtime/components/NavigationMenu.vue +8 -4
- package/dist/runtime/components/NavigationMenu.vue.d.ts +2 -4
- package/dist/runtime/components/NavigationMenuAccordionItem.d.vue.ts +2 -4
- package/dist/runtime/components/NavigationMenuAccordionItem.vue +5 -3
- package/dist/runtime/components/NavigationMenuAccordionItem.vue.d.ts +2 -4
- package/dist/runtime/components/NavigationMenuFlyoutList.d.vue.ts +2 -4
- package/dist/runtime/components/NavigationMenuFlyoutList.vue +7 -4
- package/dist/runtime/components/NavigationMenuFlyoutList.vue.d.ts +2 -4
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.d.vue.ts +2 -4
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue +9 -2
- package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue.d.ts +2 -4
- package/dist/runtime/components/Pagination.d.vue.ts +3 -2
- package/dist/runtime/components/Pagination.vue.d.ts +3 -2
- package/dist/runtime/components/PinInput.d.vue.ts +2 -1
- package/dist/runtime/components/PinInput.vue +17 -6
- package/dist/runtime/components/PinInput.vue.d.ts +2 -1
- package/dist/runtime/components/Popover.d.vue.ts +2 -0
- package/dist/runtime/components/Popover.vue +14 -7
- package/dist/runtime/components/Popover.vue.d.ts +2 -0
- package/dist/runtime/components/Progress.d.vue.ts +2 -1
- package/dist/runtime/components/Progress.vue +6 -4
- package/dist/runtime/components/Progress.vue.d.ts +2 -1
- package/dist/runtime/components/ProseH1.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH1.vue +7 -4
- package/dist/runtime/components/ProseH1.vue.d.ts +2 -0
- package/dist/runtime/components/ProseH2.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH2.vue +7 -4
- package/dist/runtime/components/ProseH2.vue.d.ts +2 -0
- package/dist/runtime/components/ProseH3.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH3.vue +7 -4
- package/dist/runtime/components/ProseH3.vue.d.ts +2 -0
- package/dist/runtime/components/ProseH4.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH4.vue +7 -4
- package/dist/runtime/components/ProseH4.vue.d.ts +2 -0
- package/dist/runtime/components/ProseH5.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH5.vue +7 -4
- package/dist/runtime/components/ProseH5.vue.d.ts +2 -0
- package/dist/runtime/components/ProseH6.d.vue.ts +2 -0
- package/dist/runtime/components/ProseH6.vue +7 -4
- package/dist/runtime/components/ProseH6.vue.d.ts +2 -0
- package/dist/runtime/components/ProsePre.d.vue.ts +4 -2
- package/dist/runtime/components/ProsePre.vue +9 -3
- package/dist/runtime/components/ProsePre.vue.d.ts +4 -2
- package/dist/runtime/components/RadioGroup.d.vue.ts +2 -1
- package/dist/runtime/components/RadioGroup.vue +9 -5
- package/dist/runtime/components/RadioGroup.vue.d.ts +2 -1
- package/dist/runtime/components/Rating.d.vue.ts +2 -1
- package/dist/runtime/components/Rating.vue +4 -1
- package/dist/runtime/components/Rating.vue.d.ts +2 -1
- package/dist/runtime/components/ReadMore.d.vue.ts +3 -0
- package/dist/runtime/components/ReadMore.vue +24 -6
- package/dist/runtime/components/ReadMore.vue.d.ts +3 -0
- package/dist/runtime/components/Select.d.vue.ts +21 -57
- package/dist/runtime/components/Select.vue +58 -9
- package/dist/runtime/components/Select.vue.d.ts +21 -57
- package/dist/runtime/components/Separator.d.vue.ts +2 -1
- package/dist/runtime/components/Separator.vue +4 -2
- package/dist/runtime/components/Separator.vue.d.ts +2 -1
- package/dist/runtime/components/Slideover.d.vue.ts +2 -0
- package/dist/runtime/components/Slideover.vue +21 -8
- package/dist/runtime/components/Slideover.vue.d.ts +2 -0
- package/dist/runtime/components/SlideoverRenderer.vue +25 -18
- package/dist/runtime/components/Slider.d.vue.ts +2 -1
- package/dist/runtime/components/Slider.vue +4 -1
- package/dist/runtime/components/Slider.vue.d.ts +2 -1
- package/dist/runtime/components/SplitterResizeHandle.d.vue.ts +3 -0
- package/dist/runtime/components/SplitterResizeHandle.vue +5 -2
- package/dist/runtime/components/SplitterResizeHandle.vue.d.ts +3 -0
- package/dist/runtime/components/Stepper.d.vue.ts +2 -1
- package/dist/runtime/components/Stepper.vue +4 -1
- package/dist/runtime/components/Stepper.vue.d.ts +2 -1
- package/dist/runtime/components/Switch.d.vue.ts +2 -1
- package/dist/runtime/components/Switch.vue +4 -2
- package/dist/runtime/components/Switch.vue.d.ts +2 -1
- package/dist/runtime/components/Table.d.vue.ts +28 -80
- package/dist/runtime/components/Table.vue +25 -13
- package/dist/runtime/components/Table.vue.d.ts +28 -80
- package/dist/runtime/components/Tabs.d.vue.ts +3 -0
- package/dist/runtime/components/Tabs.vue +5 -1
- package/dist/runtime/components/Tabs.vue.d.ts +3 -0
- package/dist/runtime/components/Textarea.d.vue.ts +2 -1
- package/dist/runtime/components/Textarea.vue +11 -6
- package/dist/runtime/components/Textarea.vue.d.ts +2 -1
- package/dist/runtime/components/Theme.d.vue.ts +16 -5
- package/dist/runtime/components/Theme.vue +30 -5
- package/dist/runtime/components/Theme.vue.d.ts +16 -5
- package/dist/runtime/components/Toast.vue +11 -39
- package/dist/runtime/components/Toggle.d.vue.ts +2 -1
- package/dist/runtime/components/Toggle.vue +4 -1
- package/dist/runtime/components/Toggle.vue.d.ts +2 -1
- package/dist/runtime/components/ToggleGroup.d.vue.ts +2 -1
- package/dist/runtime/components/ToggleGroup.vue +4 -1
- package/dist/runtime/components/ToggleGroup.vue.d.ts +2 -1
- package/dist/runtime/components/Tooltip.vue +3 -2
- package/dist/runtime/components/Tree.d.vue.ts +5 -2
- package/dist/runtime/components/Tree.vue +5 -1
- package/dist/runtime/components/Tree.vue.d.ts +5 -2
- package/dist/runtime/composables/use-drawer.d.ts +1 -22
- package/dist/runtime/composables/use-drawer.js +12 -18
- package/dist/runtime/composables/use-form-field.d.ts +1 -0
- package/dist/runtime/composables/use-icons.d.ts +2 -2
- package/dist/runtime/composables/use-icons.js +1 -1
- package/dist/runtime/composables/use-locale.d.ts +2 -2
- package/dist/runtime/composables/use-locale.js +1 -1
- package/dist/runtime/composables/use-media-query.d.ts +6 -8
- package/dist/runtime/composables/use-media-query.js +7 -2
- package/dist/runtime/composables/use-messages.d.ts +2 -2
- package/dist/runtime/composables/use-messages.js +1 -1
- package/dist/runtime/composables/use-modal.d.ts +1 -17
- package/dist/runtime/composables/use-modal.js +12 -18
- package/dist/runtime/composables/use-ripple.d.ts +2 -2
- package/dist/runtime/composables/use-ripple.js +1 -1
- package/dist/runtime/composables/use-slideover.d.ts +1 -19
- package/dist/runtime/composables/use-slideover.js +12 -18
- package/dist/runtime/composables/use-table.d.ts +74 -17
- package/dist/runtime/composables/use-table.js +4 -1
- package/dist/runtime/composables/use-toast.d.ts +8 -8
- package/dist/runtime/composables/use-toast.js +9 -11
- package/dist/runtime/default-color-metadata.d.ts +4 -0
- package/dist/runtime/default-color-metadata.js +4 -0
- package/dist/runtime/default-colors.css +1 -0
- package/dist/runtime/internal/ColorPickerBody.d.vue.ts +1 -0
- package/dist/runtime/internal/ColorPickerBody.vue +24 -1
- package/dist/runtime/internal/ColorPickerBody.vue.d.ts +1 -0
- package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +50 -46
- package/dist/runtime/internal/ComboboxSelectBase.vue +340 -93
- package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +50 -46
- package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +29 -23
- package/dist/runtime/internal/ComboboxSelectBody.vue +74 -40
- package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +29 -23
- package/dist/runtime/internal/DatePickerCalendarBody.d.vue.ts +3 -5
- package/dist/runtime/internal/DatePickerCalendarBody.vue +2 -2
- package/dist/runtime/internal/DatePickerCalendarBody.vue.d.ts +3 -5
- package/dist/runtime/internal/DatePickerRangeCalendarBody.d.vue.ts +3 -5
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +1 -1
- package/dist/runtime/internal/DatePickerRangeCalendarBody.vue.d.ts +3 -5
- package/dist/runtime/internal/DatePickerTimeBody.d.vue.ts +2 -4
- package/dist/runtime/internal/DatePickerTimeBody.vue.d.ts +2 -4
- package/dist/runtime/internal/ProgrammaticTheme.d.vue.ts +17 -0
- package/dist/runtime/internal/ProgrammaticTheme.vue +41 -0
- package/dist/runtime/internal/ProgrammaticTheme.vue.d.ts +17 -0
- package/dist/runtime/internal/TimeStepper.vue +1 -1
- package/dist/runtime/internal/ToastItemRenderer.d.vue.ts +14 -0
- package/dist/runtime/internal/ToastItemRenderer.vue +54 -0
- package/dist/runtime/internal/ToastItemRenderer.vue.d.ts +14 -0
- package/dist/runtime/internal/combobox-select.d.ts +52 -0
- package/dist/runtime/{composables/use-combobox-select.js → internal/combobox-select.js} +26 -11
- package/dist/runtime/internal/programmatic-services.d.ts +71 -0
- package/dist/runtime/internal/programmatic-services.js +61 -0
- package/dist/runtime/prose.css +1 -1
- package/dist/runtime/structural.css +1 -0
- package/dist/runtime/table.d.ts +3 -0
- package/dist/runtime/table.js +1 -0
- package/dist/runtime/theme/accordion.d.ts +27 -0
- package/dist/runtime/theme/accordion.js +15 -6
- package/dist/runtime/theme/alert-dialog.js +5 -5
- package/dist/runtime/theme/alert.js +6 -15
- package/dist/runtime/theme/avatar-group.js +2 -2
- package/dist/runtime/theme/avatar.js +12 -18
- package/dist/runtime/theme/badge.d.ts +39 -9
- package/dist/runtime/theme/badge.js +11 -40
- package/dist/runtime/theme/breadcrumb.d.ts +29 -47
- package/dist/runtime/theme/breadcrumb.js +16 -5
- package/dist/runtime/theme/button.d.ts +45 -15
- package/dist/runtime/theme/button.js +10 -57
- package/dist/runtime/theme/callout.js +7 -7
- package/dist/runtime/theme/card.js +7 -7
- package/dist/runtime/theme/checkbox.d.ts +21 -84
- package/dist/runtime/theme/checkbox.js +15 -36
- package/dist/runtime/theme/chip.js +4 -22
- package/dist/runtime/theme/code-button.js +2 -2
- package/dist/runtime/theme/code-tree.d.ts +3 -3
- package/dist/runtime/theme/code-tree.js +4 -4
- package/dist/runtime/theme/collapsible.d.ts +27 -0
- package/dist/runtime/theme/collapsible.js +12 -3
- package/dist/runtime/theme/color-picker.d.ts +18 -54
- package/dist/runtime/theme/color-picker.js +19 -18
- package/dist/runtime/theme/command-palette.d.ts +6 -6
- package/dist/runtime/theme/command-palette.js +12 -10
- package/dist/runtime/theme/content-navigation.d.ts +27 -0
- package/dist/runtime/theme/content-navigation.js +14 -5
- package/dist/runtime/theme/content-surround.d.ts +27 -0
- package/dist/runtime/theme/content-surround.js +13 -4
- package/dist/runtime/theme/content-toc.d.ts +27 -0
- package/dist/runtime/theme/content-toc.js +14 -5
- package/dist/runtime/theme/context-menu.js +7 -7
- package/dist/runtime/theme/dashboard-navbar.d.ts +6 -6
- package/dist/runtime/theme/dashboard-navbar.js +2 -2
- package/dist/runtime/theme/dashboard-resize-handle.js +3 -3
- package/dist/runtime/theme/dashboard-sidebar.js +3 -3
- package/dist/runtime/theme/date-picker.js +10 -10
- package/dist/runtime/theme/drawer.js +9 -9
- package/dist/runtime/theme/dropdown.js +7 -7
- package/dist/runtime/theme/file-tree.d.ts +27 -0
- package/dist/runtime/theme/file-tree.js +12 -3
- package/dist/runtime/theme/file-upload.d.ts +18 -72
- package/dist/runtime/theme/file-upload.js +20 -19
- package/dist/runtime/theme/form-field.js +5 -5
- package/dist/runtime/theme/header.d.ts +3 -3
- package/dist/runtime/theme/header.js +1 -1
- package/dist/runtime/theme/icon.d.ts +30 -57
- package/dist/runtime/theme/icon.js +19 -9
- package/dist/runtime/theme/input-number.d.ts +21 -63
- package/dist/runtime/theme/input-number.js +12 -12
- package/dist/runtime/theme/input.d.ts +21 -63
- package/dist/runtime/theme/input.js +12 -12
- package/dist/runtime/theme/kbd.js +1 -1
- package/dist/runtime/theme/modal.js +4 -4
- package/dist/runtime/theme/navigation-menu.d.ts +2 -0
- package/dist/runtime/theme/navigation-menu.js +17 -28
- package/dist/runtime/theme/page-header.js +3 -3
- package/dist/runtime/theme/pagination.js +1 -1
- package/dist/runtime/theme/pin-input.d.ts +21 -63
- package/dist/runtime/theme/pin-input.js +13 -11
- package/dist/runtime/theme/popover.js +2 -2
- package/dist/runtime/theme/progress.d.ts +21 -84
- package/dist/runtime/theme/progress.js +12 -12
- package/dist/runtime/theme/prose.d.ts +35 -50
- package/dist/runtime/theme/prose.js +24 -11
- package/dist/runtime/theme/radio-group.d.ts +21 -84
- package/dist/runtime/theme/radio-group.js +16 -22
- package/dist/runtime/theme/rating.d.ts +21 -63
- package/dist/runtime/theme/rating.js +10 -10
- package/dist/runtime/theme/read-more.d.ts +27 -0
- package/dist/runtime/theme/read-more.js +13 -4
- package/dist/runtime/theme/scroll-area.d.ts +3 -3
- package/dist/runtime/theme/scroll-area.js +2 -2
- package/dist/runtime/theme/select.d.ts +21 -54
- package/dist/runtime/theme/select.js +32 -24
- package/dist/runtime/theme/separator.d.ts +18 -54
- package/dist/runtime/theme/separator.js +16 -12
- package/dist/runtime/theme/skeleton.js +4 -4
- package/dist/runtime/theme/slideover.js +5 -5
- package/dist/runtime/theme/slider.d.ts +21 -84
- package/dist/runtime/theme/slider.js +14 -14
- package/dist/runtime/theme/splitter-resize-handle.d.ts +27 -0
- package/dist/runtime/theme/splitter-resize-handle.js +11 -1
- package/dist/runtime/theme/stepper.d.ts +21 -84
- package/dist/runtime/theme/stepper.js +12 -33
- package/dist/runtime/theme/switch.d.ts +21 -84
- package/dist/runtime/theme/switch.js +13 -13
- package/dist/runtime/theme/table.d.ts +27 -0
- package/dist/runtime/theme/table.js +31 -21
- package/dist/runtime/theme/tabs.d.ts +27 -0
- package/dist/runtime/theme/tabs.js +17 -7
- package/dist/runtime/theme/textarea.d.ts +21 -63
- package/dist/runtime/theme/textarea.js +12 -12
- package/dist/runtime/theme/toast.d.ts +12 -48
- package/dist/runtime/theme/toast.js +9 -9
- package/dist/runtime/theme/toggle-group.js +5 -11
- package/dist/runtime/theme/toggle.js +2 -12
- package/dist/runtime/theme/tooltip.d.ts +3 -3
- package/dist/runtime/theme/tooltip.js +3 -3
- package/dist/runtime/theme/tree.d.ts +27 -0
- package/dist/runtime/theme/tree.js +13 -3
- package/dist/runtime/theme-api.d.ts +15 -0
- package/dist/runtime/theme-api.js +12 -0
- package/dist/runtime/theme-config.d.ts +470 -0
- package/dist/runtime/theme-config.js +0 -0
- package/dist/runtime/theme.css +1 -1
- package/dist/runtime/types/app-config.d.ts +11 -8
- package/dist/runtime/types/index.d.ts +19 -1
- package/dist/runtime/utils/app-scoped-state.d.ts +2 -0
- package/dist/runtime/utils/app-scoped-state.js +13 -0
- package/dist/runtime/utils/autocomplete-contracts.d.ts +24 -0
- package/dist/runtime/utils/autocomplete-contracts.js +0 -0
- package/dist/runtime/utils/color-registry.d.ts +62 -0
- package/dist/runtime/utils/color-registry.js +191 -0
- package/dist/runtime/utils/dtcg-colors.d.ts +25 -0
- package/dist/runtime/utils/dtcg-colors.js +40 -0
- package/dist/runtime/utils/file-icons.d.ts +8 -0
- package/dist/runtime/utils/file-icons.js +131 -0
- package/dist/runtime/utils/functional-tokens.d.ts +26 -0
- package/dist/runtime/utils/functional-tokens.js +54 -0
- package/dist/runtime/utils/icons.d.ts +3 -0
- package/dist/runtime/utils/icons.js +4 -0
- package/dist/runtime/utils/injection-keys.d.ts +12 -3
- package/dist/runtime/utils/native-input.d.ts +5 -0
- package/dist/runtime/utils/native-input.js +32 -0
- package/dist/runtime/utils/navigation-menu.d.ts +3 -0
- package/dist/runtime/utils/programmatic-theme.d.ts +17 -0
- package/dist/runtime/utils/programmatic-theme.js +59 -0
- package/dist/runtime/utils/registered-colors.d.ts +3 -0
- package/dist/runtime/utils/registered-colors.js +14 -0
- package/dist/runtime/utils/seed-colors.d.ts +19 -0
- package/dist/runtime/utils/seed-colors.js +207 -0
- package/dist/runtime/utils/select-contracts.d.ts +101 -0
- package/dist/runtime/utils/select-contracts.js +0 -0
- package/dist/runtime/utils/table-contracts.d.ts +60 -0
- package/dist/runtime/utils/table-contracts.js +0 -0
- package/dist/runtime/utils/ui.d.ts +26 -4
- package/dist/runtime/utils/ui.js +38 -5
- package/dist/tokens/default-colors.tokens.json +879 -0
- package/package.json +83 -16
- package/dist/runtime/composables/use-combobox-select.d.ts +0 -45
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ProgrammaticThemeSnapshot } from '../utils/programmatic-theme.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
snapshot: ProgrammaticThemeSnapshot;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, provide, useId } from "vue";
|
|
3
|
+
import { useHead } from "#imports";
|
|
4
|
+
import { generateRuntimeTokenOverrideCss } from "../utils/color-registry";
|
|
5
|
+
import { THEME_INJECTION_KEY } from "../utils/injection-keys";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
snapshot: { type: Object, required: true }
|
|
8
|
+
});
|
|
9
|
+
const scopeId = `p${useId()}`;
|
|
10
|
+
const context = computed(() => {
|
|
11
|
+
let current;
|
|
12
|
+
for (const layer of props.snapshot.layers) {
|
|
13
|
+
current = {
|
|
14
|
+
ui: layer.ui,
|
|
15
|
+
defaults: layer.defaults,
|
|
16
|
+
parent: current
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
ui: current?.ui,
|
|
21
|
+
defaults: current?.defaults,
|
|
22
|
+
parent: current?.parent,
|
|
23
|
+
scopeId,
|
|
24
|
+
tokens: props.snapshot.tokens,
|
|
25
|
+
mode: props.snapshot.mode,
|
|
26
|
+
replaceGlobal: true
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
provide(THEME_INJECTION_KEY, context);
|
|
30
|
+
const css = computed(() => generateRuntimeTokenOverrideCss(
|
|
31
|
+
props.snapshot.tokens ?? {},
|
|
32
|
+
`[data-selaras-theme="${scopeId}"]`
|
|
33
|
+
));
|
|
34
|
+
useHead({
|
|
35
|
+
style: [{ key: `selaras-programmatic-theme-${scopeId}`, textContent: () => css.value || void 0 }]
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<slot />
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ProgrammaticThemeSnapshot } from '../utils/programmatic-theme.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
snapshot: ProgrammaticThemeSnapshot;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -73,7 +73,7 @@ const effectiveSize = computed(() => props.size ?? "sm");
|
|
|
73
73
|
class="w-28"
|
|
74
74
|
@update:model-value="setHour"
|
|
75
75
|
/>
|
|
76
|
-
<span v-if="granularity === 'minute'" class="text-[var(--
|
|
76
|
+
<span v-if="granularity === 'minute'" class="text-[var(--selaras-resolved-text-muted)]">:</span>
|
|
77
77
|
<InputNumber
|
|
78
78
|
v-if="granularity === 'minute'"
|
|
79
79
|
:id="minuteId"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ToastThemeSlots } from '../theme/toast.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
import type { ToastItem } from './programmatic-services.js';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
toast: ToastItem;
|
|
6
|
+
ui?: UiProp<ToastThemeSlots>;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
remove: (id: number) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onRemove?: ((id: number) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ToastClose, ToastDescription, ToastRoot, ToastTitle } from "reka-ui";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import Button from "../components/Button.vue";
|
|
5
|
+
import Icon from "../components/Icon.vue";
|
|
6
|
+
import { useIcons } from "../composables/use-icons";
|
|
7
|
+
import { useMessages } from "../composables/use-messages";
|
|
8
|
+
import { toastTheme } from "../theme/toast";
|
|
9
|
+
import { isFeedbackIntent } from "../utils/icons";
|
|
10
|
+
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
11
|
+
import { resolveSlot, useComponentTheme, useThemeBindings } from "../utils/ui";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
toast: { type: Object, required: true },
|
|
14
|
+
ui: { type: Object, required: false }
|
|
15
|
+
});
|
|
16
|
+
const emit = defineEmits(["remove"]);
|
|
17
|
+
const icons = useIcons();
|
|
18
|
+
const messages = useMessages();
|
|
19
|
+
const theme = useComponentTheme("toast", toastTheme);
|
|
20
|
+
const themeBindings = useThemeBindings();
|
|
21
|
+
const effectiveColor = computed(() => props.toast.color ? resolveRegisteredColorRole(props.toast.color, "info") : void 0);
|
|
22
|
+
const itemUi = computed(() => theme.value({ color: effectiveColor.value }));
|
|
23
|
+
const rootProps = computed(() => resolveSlot(itemUi.value.root, props.ui?.root));
|
|
24
|
+
const iconProps = computed(() => resolveSlot(itemUi.value.icon, props.ui?.icon));
|
|
25
|
+
const titleProps = computed(() => resolveSlot(itemUi.value.title, props.ui?.title));
|
|
26
|
+
const descriptionProps = computed(() => resolveSlot(itemUi.value.description, props.ui?.description));
|
|
27
|
+
const closeProps = computed(() => resolveSlot(itemUi.value.close, props.ui?.close));
|
|
28
|
+
const iconName = computed(() => props.toast.icon ?? (effectiveColor.value && isFeedbackIntent(effectiveColor.value) ? icons.value[effectiveColor.value] : void 0));
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<ToastRoot
|
|
33
|
+
:duration="toast.duration ?? 5e3"
|
|
34
|
+
:data-selaras-theme="themeBindings['data-selaras-theme']"
|
|
35
|
+
:data-selaras-mode="themeBindings['data-selaras-mode']"
|
|
36
|
+
:data-selaras-color="effectiveColor"
|
|
37
|
+
:style="themeBindings.style"
|
|
38
|
+
v-bind="rootProps"
|
|
39
|
+
@update:open="(open) => !open && emit('remove', toast.id)"
|
|
40
|
+
>
|
|
41
|
+
<Icon v-if="iconName" :name="iconName" v-bind="iconProps" />
|
|
42
|
+
<div>
|
|
43
|
+
<ToastTitle v-if="toast.title" v-bind="titleProps">
|
|
44
|
+
{{ toast.title }}
|
|
45
|
+
</ToastTitle>
|
|
46
|
+
<ToastDescription v-if="toast.description" v-bind="descriptionProps">
|
|
47
|
+
{{ toast.description }}
|
|
48
|
+
</ToastDescription>
|
|
49
|
+
</div>
|
|
50
|
+
<ToastClose as-child>
|
|
51
|
+
<Button size="sm" variant="ghost" color="neutral" :icon="icons.close" :aria-label="messages.close" v-bind="closeProps" />
|
|
52
|
+
</ToastClose>
|
|
53
|
+
</ToastRoot>
|
|
54
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ToastThemeSlots } from '../theme/toast.js';
|
|
2
|
+
import type { UiProp } from '../utils/ui.js';
|
|
3
|
+
import type { ToastItem } from './programmatic-services.js';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
toast: ToastItem;
|
|
6
|
+
ui?: UiProp<ToastThemeSlots>;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
remove: (id: number) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onRemove?: ((id: number) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
import type { SelectValue } from '../utils/select-contracts.js';
|
|
3
|
+
/** Erased runtime records for the shared implementation, not authoring types. */
|
|
4
|
+
export interface SelectOption<Value extends SelectValue = SelectValue> {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
/** The default option key. Custom `valueKey` fields use the same primitive contract. */
|
|
7
|
+
value?: Value;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface SelectOptionGroup<Value extends SelectValue = SelectValue> {
|
|
11
|
+
label: string;
|
|
12
|
+
items: readonly SelectOption<Value>[];
|
|
13
|
+
}
|
|
14
|
+
export type SelectItems<Value extends SelectValue = SelectValue> = readonly (SelectOption<Value> | SelectOptionGroup<Value>)[];
|
|
15
|
+
export declare function isOptionGroup<Value extends SelectValue = SelectValue>(entry: SelectOption<Value> | SelectOptionGroup<Value>): entry is SelectOptionGroup<Value>;
|
|
16
|
+
/** Flattens groups into a plain option list - groups lose their header when virtualized. */
|
|
17
|
+
export declare function flattenItems<Value extends SelectValue = SelectValue>(items: SelectItems<Value>): SelectOption<Value>[];
|
|
18
|
+
interface SelectLikeProps {
|
|
19
|
+
items: SelectItems;
|
|
20
|
+
valueKey?: string;
|
|
21
|
+
labelKey?: string;
|
|
22
|
+
modelValue?: SelectValue | SelectValue[];
|
|
23
|
+
multiple?: boolean;
|
|
24
|
+
displayMode?: 'comma' | 'chip';
|
|
25
|
+
maxChips?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface ResolvedOption {
|
|
28
|
+
value: SelectValue;
|
|
29
|
+
label: string;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
raw: SelectOption | undefined;
|
|
32
|
+
}
|
|
33
|
+
export interface ResolvedItemOption extends ResolvedOption {
|
|
34
|
+
raw: SelectOption;
|
|
35
|
+
}
|
|
36
|
+
export declare function useComboboxSelect(props: SelectLikeProps, emit: (event: 'update:modelValue', value: SelectValue | SelectValue[] | undefined) => void, { creatable }?: {
|
|
37
|
+
creatable?: boolean;
|
|
38
|
+
}): {
|
|
39
|
+
flatOptions: ComputedRef<ResolvedItemOption[]>;
|
|
40
|
+
selectedValues: ComputedRef<SelectValue[]>;
|
|
41
|
+
selectedOptions: ComputedRef<ResolvedOption[]>;
|
|
42
|
+
visibleOptions: ComputedRef<ResolvedOption[]>;
|
|
43
|
+
overflowOptions: ComputedRef<ResolvedOption[]>;
|
|
44
|
+
commaText: ComputedRef<string>;
|
|
45
|
+
resolveOption: (value: SelectValue) => ResolvedOption;
|
|
46
|
+
toOption: (raw: SelectOption) => ResolvedItemOption;
|
|
47
|
+
setValue: (value: SelectValue | SelectValue[] | undefined) => void;
|
|
48
|
+
removeValue: (value: SelectValue) => void;
|
|
49
|
+
hasMatchingOption: (text: string) => boolean;
|
|
50
|
+
commitCreatableText: (rawText: string) => boolean;
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
|
+
function optionValue(value) {
|
|
3
|
+
if (typeof value === "string" || typeof value === "number" && Number.isFinite(value))
|
|
4
|
+
return value;
|
|
5
|
+
throw new TypeError("[selaras] Select option values must be strings or finite numbers.");
|
|
6
|
+
}
|
|
2
7
|
export function isOptionGroup(entry) {
|
|
3
|
-
return "items" in entry && Array.isArray(entry.items);
|
|
8
|
+
return typeof entry.label === "string" && "items" in entry && Array.isArray(entry.items);
|
|
4
9
|
}
|
|
5
10
|
export function flattenItems(items) {
|
|
6
11
|
return items.flatMap((entry) => isOptionGroup(entry) ? entry.items : [entry]);
|
|
@@ -8,12 +13,22 @@ export function flattenItems(items) {
|
|
|
8
13
|
export function useComboboxSelect(props, emit, { creatable = false } = {}) {
|
|
9
14
|
const valueKey = computed(() => props.valueKey ?? "value");
|
|
10
15
|
const labelKey = computed(() => props.labelKey ?? "label");
|
|
11
|
-
const flatOptions = computed(() =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const flatOptions = computed(() => {
|
|
17
|
+
const identities = /* @__PURE__ */ new Set();
|
|
18
|
+
return flattenItems(props.items).map((raw) => {
|
|
19
|
+
const value = optionValue(raw[valueKey.value]);
|
|
20
|
+
if (identities.has(value)) {
|
|
21
|
+
throw new TypeError(`[selaras] Select option identities must be unique across all groups. Duplicate ${valueKey.value}: ${typeof value} ${JSON.stringify(value)}.`);
|
|
22
|
+
}
|
|
23
|
+
identities.add(value);
|
|
24
|
+
return {
|
|
25
|
+
value,
|
|
26
|
+
label: String(raw[labelKey.value] ?? value),
|
|
27
|
+
disabled: !!raw.disabled,
|
|
28
|
+
raw
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
});
|
|
17
32
|
const selectedValues = computed(() => {
|
|
18
33
|
const v = props.modelValue;
|
|
19
34
|
if (v === void 0)
|
|
@@ -21,11 +36,11 @@ export function useComboboxSelect(props, emit, { creatable = false } = {}) {
|
|
|
21
36
|
return Array.isArray(v) ? v : [v];
|
|
22
37
|
});
|
|
23
38
|
function resolveOption(value) {
|
|
24
|
-
return flatOptions.value.find((o) => o.value === value) ?? { value, label: value, disabled: false, raw:
|
|
39
|
+
return flatOptions.value.find((o) => o.value === value) ?? { value, label: String(value), disabled: false, raw: void 0 };
|
|
25
40
|
}
|
|
26
41
|
function toOption(raw) {
|
|
27
42
|
return {
|
|
28
|
-
value:
|
|
43
|
+
value: optionValue(raw[valueKey.value]),
|
|
29
44
|
label: String(raw[labelKey.value] ?? raw[valueKey.value] ?? ""),
|
|
30
45
|
disabled: !!raw.disabled,
|
|
31
46
|
raw
|
|
@@ -48,14 +63,14 @@ export function useComboboxSelect(props, emit, { creatable = false } = {}) {
|
|
|
48
63
|
}
|
|
49
64
|
function hasMatchingOption(text) {
|
|
50
65
|
const lower = text.toLowerCase();
|
|
51
|
-
return flatOptions.value.some((o) => o.value.toLowerCase().includes(lower) || o.label.toLowerCase().includes(lower));
|
|
66
|
+
return flatOptions.value.some((o) => String(o.value).toLowerCase().includes(lower) || o.label.toLowerCase().includes(lower));
|
|
52
67
|
}
|
|
53
68
|
function commitCreatableText(rawText) {
|
|
54
69
|
const text = rawText.trim();
|
|
55
70
|
if (!creatable || !text || hasMatchingOption(text))
|
|
56
71
|
return false;
|
|
57
72
|
if (props.multiple) {
|
|
58
|
-
if (selectedValues.value.some((v) => v.toLowerCase() === text.toLowerCase()))
|
|
73
|
+
if (selectedValues.value.some((v) => typeof v === "string" && v.toLowerCase() === text.toLowerCase()))
|
|
59
74
|
return false;
|
|
60
75
|
setValue([...selectedValues.value, text]);
|
|
61
76
|
} else {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Component, Ref } from 'vue';
|
|
2
|
+
import type { ToastOptions } from '../composables/use-toast.js';
|
|
3
|
+
import type { ProgrammaticThemeSnapshot } from '../utils/programmatic-theme.js';
|
|
4
|
+
interface ProgrammaticOverlayInstance {
|
|
5
|
+
id: number;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
_settled: boolean;
|
|
8
|
+
resolve: (value: unknown) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface ModalInstance extends ProgrammaticOverlayInstance {
|
|
11
|
+
component: Component;
|
|
12
|
+
props: Record<string, unknown>;
|
|
13
|
+
title?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
dismissible?: boolean;
|
|
16
|
+
modal?: boolean;
|
|
17
|
+
overlay?: boolean;
|
|
18
|
+
transition?: boolean;
|
|
19
|
+
_theme: ProgrammaticThemeSnapshot;
|
|
20
|
+
}
|
|
21
|
+
export interface DrawerInstance extends ProgrammaticOverlayInstance {
|
|
22
|
+
component: Component;
|
|
23
|
+
props: Record<string, unknown>;
|
|
24
|
+
title?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
27
|
+
handle?: boolean;
|
|
28
|
+
snapPoints?: (number | string)[];
|
|
29
|
+
snapPoint?: number | string | null;
|
|
30
|
+
snapToSequentialPoints?: boolean;
|
|
31
|
+
dismissible?: boolean;
|
|
32
|
+
modal?: boolean | 'trap-focus';
|
|
33
|
+
overlay?: boolean;
|
|
34
|
+
transition?: boolean;
|
|
35
|
+
_theme: ProgrammaticThemeSnapshot;
|
|
36
|
+
}
|
|
37
|
+
export interface SlideoverInstance extends ProgrammaticOverlayInstance {
|
|
38
|
+
component: Component;
|
|
39
|
+
props: Record<string, unknown>;
|
|
40
|
+
title?: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
43
|
+
inset?: boolean;
|
|
44
|
+
dismissible?: boolean;
|
|
45
|
+
modal?: boolean;
|
|
46
|
+
overlay?: boolean;
|
|
47
|
+
transition?: boolean;
|
|
48
|
+
_theme: ProgrammaticThemeSnapshot;
|
|
49
|
+
}
|
|
50
|
+
export interface ToastItem extends ToastOptions {
|
|
51
|
+
id: number;
|
|
52
|
+
_theme: ProgrammaticThemeSnapshot;
|
|
53
|
+
}
|
|
54
|
+
export interface ProgrammaticOverlayService<T extends ProgrammaticOverlayInstance> {
|
|
55
|
+
instances: Ref<T[]>;
|
|
56
|
+
nextId: () => number;
|
|
57
|
+
close: (id: number, value?: unknown) => void;
|
|
58
|
+
remove: (id: number) => void;
|
|
59
|
+
dispose: () => void;
|
|
60
|
+
}
|
|
61
|
+
export interface ToastService {
|
|
62
|
+
toasts: Ref<ToastItem[]>;
|
|
63
|
+
nextId: () => number;
|
|
64
|
+
remove: (id: number) => void;
|
|
65
|
+
dispose: () => void;
|
|
66
|
+
}
|
|
67
|
+
export declare const useModalService: () => ProgrammaticOverlayService<ModalInstance>;
|
|
68
|
+
export declare const useDrawerService: () => ProgrammaticOverlayService<DrawerInstance>;
|
|
69
|
+
export declare const useSlideoverService: () => ProgrammaticOverlayService<SlideoverInstance>;
|
|
70
|
+
export declare function useToastService(): ToastService;
|
|
71
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
import { createAppScopedState } from "../utils/app-scoped-state.js";
|
|
3
|
+
function createOverlayService() {
|
|
4
|
+
const useState = createAppScopedState(() => ({
|
|
5
|
+
instances: ref([]),
|
|
6
|
+
counter: 0
|
|
7
|
+
}));
|
|
8
|
+
return function useOverlayService() {
|
|
9
|
+
const state = useState();
|
|
10
|
+
function nextId() {
|
|
11
|
+
return state.counter++;
|
|
12
|
+
}
|
|
13
|
+
function close(id, value) {
|
|
14
|
+
const instance = state.instances.value.find((item) => item.id === id);
|
|
15
|
+
if (!instance)
|
|
16
|
+
return;
|
|
17
|
+
instance.isOpen = false;
|
|
18
|
+
if (!instance._settled) {
|
|
19
|
+
instance._settled = true;
|
|
20
|
+
instance.resolve(value);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function remove(id) {
|
|
24
|
+
const index = state.instances.value.findIndex((item) => item.id === id);
|
|
25
|
+
if (index !== -1)
|
|
26
|
+
state.instances.value.splice(index, 1);
|
|
27
|
+
}
|
|
28
|
+
function dispose() {
|
|
29
|
+
for (const instance of state.instances.value) {
|
|
30
|
+
if (!instance._settled) {
|
|
31
|
+
instance._settled = true;
|
|
32
|
+
instance.resolve(void 0);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
state.instances.value = [];
|
|
36
|
+
}
|
|
37
|
+
return { instances: state.instances, nextId, close, remove, dispose };
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export const useModalService = createOverlayService();
|
|
41
|
+
export const useDrawerService = createOverlayService();
|
|
42
|
+
export const useSlideoverService = createOverlayService();
|
|
43
|
+
const useToastState = createAppScopedState(() => ({
|
|
44
|
+
toasts: ref([]),
|
|
45
|
+
counter: 0
|
|
46
|
+
}));
|
|
47
|
+
export function useToastService() {
|
|
48
|
+
const state = useToastState();
|
|
49
|
+
return {
|
|
50
|
+
toasts: state.toasts,
|
|
51
|
+
nextId: () => state.counter++,
|
|
52
|
+
remove(id) {
|
|
53
|
+
const index = state.toasts.value.findIndex((toast) => toast.id === id);
|
|
54
|
+
if (index !== -1)
|
|
55
|
+
state.toasts.value.splice(index, 1);
|
|
56
|
+
},
|
|
57
|
+
dispose() {
|
|
58
|
+
state.toasts.value = [];
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
package/dist/runtime/prose.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer base, selaras-prose, utilities;@layer selaras-prose{:root{--selaras-prose-font-body:inherit;--selaras-prose-font-heading:inherit;--selaras-prose-font-mono:var(--font-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace)}.selaras-prose{color:var(--
|
|
1
|
+
@layer base, selaras-prose, utilities;@layer selaras-prose{:root{--selaras-prose-font-body:inherit;--selaras-prose-font-heading:inherit;--selaras-prose-font-mono:var(--font-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace)}.selaras-prose{color:var(--selaras-resolved-text-default);font-family:var(--selaras-prose-font-body);font-size:1rem;line-height:1.75;overflow-wrap:break-word}.selaras-prose :where(.not-prose){line-height:1.5}.selaras-prose>:where(*+*){margin-block-start:1.25em}.selaras-prose :where(h1,h2,h3,h4,h5,h6):not(:where(.not-prose,.not-prose *)){color:var(--selaras-resolved-text-default);font-family:var(--selaras-prose-font-heading);font-weight:600;letter-spacing:-.025em;margin-block-start:2em;scroll-margin-top:5rem}.selaras-prose :where(h1):not(:where(.not-prose,.not-prose *)){font-size:1.875rem;line-height:2.25rem}.selaras-prose :where(h2):not(:where(.not-prose,.not-prose *)){font-size:1.5rem;line-height:2rem}.selaras-prose :where(h3):not(:where(.not-prose,.not-prose *)){font-size:1.25rem;line-height:1.75rem}.selaras-prose :where(h4):not(:where(.not-prose,.not-prose *)){font-size:1.125rem;line-height:1.75rem}.selaras-prose :where(h5,h6):not(:where(.not-prose,.not-prose *)){font-size:1rem;line-height:1.5rem}.selaras-prose :where(a):not(:where(.not-prose,.not-prose *)){color:var(--selaras-resolved-color-primary-text);font-weight:500;text-decoration-line:underline;text-underline-offset:4px}.selaras-prose :where(a:hover):not(:where(.not-prose,.not-prose *)){color:var(--selaras-resolved-color-primary-text-hover)}.selaras-prose :where(h1,h2,h3,h4,h5,h6) :where(a):not(:where(.not-prose,.not-prose *)){color:inherit;font-weight:inherit}.selaras-prose :where(strong):not(:where(.not-prose,.not-prose *)){color:var(--selaras-resolved-text-default);font-weight:600}.selaras-prose :where(em):not(:where(.not-prose,.not-prose *)){font-style:italic}.selaras-prose :where(blockquote):not(:where(.not-prose,.not-prose *)){border-inline-start:2px solid var(--selaras-resolved-border-default);color:var(--selaras-resolved-text-muted);font-style:italic;padding-inline-start:1rem}.selaras-prose :where(hr):not(:where(.not-prose,.not-prose *)){border-color:var(--selaras-resolved-border-default)}.selaras-prose :where(img):not(:where(.not-prose,.not-prose *)){border-radius:var(--selaras-resolved-radius-md);max-width:100%}.selaras-prose :where(ul,ol):not(:where(.not-prose,.not-prose *)){color:var(--selaras-resolved-text-default);padding-inline-start:1.5rem}.selaras-prose :where(ul):not(:where(.not-prose,.not-prose *)){list-style-type:disc}.selaras-prose :where(ol):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.selaras-prose :where(li+li):not(:where(.not-prose,.not-prose *)){margin-block-start:.25em}.selaras-prose :where(code):not(:where(.not-prose,.not-prose *)){background-color:var(--selaras-resolved-surface-elevated);border-radius:var(--selaras-resolved-radius-sm);color:var(--selaras-resolved-text-default);font-family:var(--selaras-prose-font-mono);font-size:.875em;padding-block:.125rem;padding-inline:.375rem}.selaras-prose :where(pre):not(:where(.not-prose,.not-prose *)){background-color:var(--selaras-resolved-surface-elevated);border-radius:var(--selaras-resolved-radius-md);font-family:var(--selaras-prose-font-mono);font-size:.875rem;line-height:1.625;overflow-x:auto;padding:1rem}.selaras-prose :where(pre code):not(:where(.not-prose,.not-prose *)){background-color:transparent;border-radius:0;font-size:1em;padding:0}.selaras-prose :where(table):not(:where(.not-prose,.not-prose *)){border-collapse:collapse;display:block;font-size:.875rem;overflow-x:auto;width:100%}.selaras-prose :where(thead):not(:where(.not-prose,.not-prose *)){background-color:var(--selaras-resolved-surface-elevated)}.selaras-prose :where(th):not(:where(.not-prose,.not-prose *)){border-bottom:1px solid var(--selaras-resolved-border-default);color:var(--selaras-resolved-text-muted);font-weight:500;padding-block:.5rem;padding-inline:.75rem;text-align:start}.selaras-prose :where(td):not(:where(.not-prose,.not-prose *)){border-bottom:1px solid var(--selaras-resolved-border-muted);color:var(--selaras-resolved-text-default);padding-block:.5rem;padding-inline:.75rem}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "tw-animate-css";@source "./components";@source "./internal";@source "./theme";@source "./utils";@custom-variant dark (&:where(.dark, .dark *));@layer base{a:focus-visible{outline-offset:0}}@keyframes selaras-ripple{to{opacity:0;transform:scale(1)}}@keyframes selaras-accordion-down{0%{height:0}to{height:var(--reka-accordion-content-height)}}@keyframes selaras-accordion-up{0%{height:var(--reka-accordion-content-height)}to{height:0}}@keyframes selaras-collapsible-down{0%{height:0}to{height:var(--reka-collapsible-content-height)}}@keyframes selaras-collapsible-up{0%{height:var(--reka-collapsible-content-height)}to{height:0}}@keyframes selaras-skeleton-shimmer{0%{background-position:150% 0}to{background-position:-50% 0}}@keyframes selaras-progress-indeterminate{0%{transform:translateX(-100%)}to{transform:translateX(300%)}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}.selaras-nav-elbow{position:relative}.selaras-nav-elbow:before{inset-inline-start:-16px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;width:16px}.selaras-nav-elbow:after,.selaras-nav-elbow:before{background-color:var(--selaras-resolved-border-default);content:"";position:absolute;top:0}.selaras-nav-elbow:after{inset-inline-start:-15px;width:1.5px}.selaras-nav-elbow--content-navigation:before{height:40px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 40'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 14a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 40'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 14a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E")}.selaras-nav-elbow--content-navigation:after{bottom:-2px}.selaras-nav-elbow--content-navigation:last-child:after{bottom:auto;height:14px}.selaras-nav-elbow--navigation-menu:before{height:32px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 32'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 10a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 32'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 10a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E")}.selaras-nav-elbow--navigation-menu:after{bottom:-4px}.selaras-nav-elbow--navigation-menu:last-child:after{bottom:auto;height:10px}.selaras-nav-elbow--file-tree:before{height:28px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 28'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 8a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 28'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 8a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E")}.selaras-nav-elbow--file-tree:after{bottom:-2px}.selaras-nav-elbow--file-tree:last-child:after{bottom:auto;height:8px}@layer theme{:root,[data-selaras-theme]{--selaras-resolved-surface-canvas:var(--selaras-surface-canvas,var(--_selaras-default-surface-canvas));--selaras-resolved-surface-default:var(--selaras-surface-default,var(--_selaras-default-surface-default));--selaras-resolved-surface-elevated:var(--selaras-surface-elevated,var(--_selaras-default-surface-elevated));--selaras-resolved-surface-inverted:var(--selaras-surface-inverted,var(--_selaras-default-surface-inverted));--selaras-resolved-text-default:var(--selaras-text-default,var(--_selaras-default-text-default));--selaras-resolved-text-muted:var(--selaras-text-muted,var(--_selaras-default-text-muted));--selaras-resolved-text-inverted:var(--selaras-text-inverted,var(--_selaras-default-text-inverted));--selaras-resolved-border-default:var(--selaras-border-default,var(--_selaras-default-border-default));--selaras-resolved-border-muted:var(--selaras-border-muted,var(--_selaras-default-border-muted));--selaras-resolved-border-hover:var(--selaras-border-hover,var(--_selaras-default-border-hover));--selaras-resolved-scrim:var(--selaras-scrim,rgba(0,0,0,.5));--selaras-resolved-radius-base:var(--selaras-radius-base,8px);--selaras-resolved-radius-sm:var(--selaras-radius-sm,calc(var(--selaras-resolved-radius-base)*0.75));--selaras-resolved-radius-md:var(--selaras-radius-md,var(--selaras-resolved-radius-base));--selaras-resolved-radius-lg:var(--selaras-radius-lg,calc(var(--selaras-resolved-radius-base)*2));--selaras-resolved-radius-full:var(--selaras-radius-full,9999px);--selaras-resolved-shadow-sm:var(--selaras-shadow-sm,0 1px 2px 0 rgba(0,0,0,.06));--selaras-resolved-shadow-md:var(--selaras-shadow-md,0 4px 16px -2px rgba(0,0,0,.12));--selaras-resolved-shadow-lg:var(--selaras-shadow-lg,0 12px 32px -4px rgba(0,0,0,.16));--selaras-resolved-z-modal-overlay:var(--selaras-z-modal-overlay,40);--selaras-resolved-z-modal:var(--selaras-z-modal,50);--selaras-resolved-z-dropdown:var(--selaras-z-dropdown,60);--selaras-resolved-z-tooltip:var(--selaras-z-tooltip,70);--selaras-resolved-z-toast:var(--selaras-z-toast,80)}:root.dark,:root.dark [data-selaras-theme]:where(:not([data-selaras-mode]),[data-selaras-mode=root]),[data-selaras-theme]:where([data-selaras-mode=dark]){--selaras-resolved-surface-canvas:var(--selaras-surface-canvas,var(--_selaras-default-surface-canvas));--selaras-resolved-surface-default:var(--selaras-surface-default,var(--_selaras-default-surface-default));--selaras-resolved-surface-elevated:var(--selaras-surface-elevated,var(--_selaras-default-surface-elevated));--selaras-resolved-surface-inverted:var(--selaras-surface-inverted,var(--_selaras-default-surface-inverted));--selaras-resolved-text-default:var(--selaras-text-default,var(--_selaras-default-text-default));--selaras-resolved-text-muted:var(--selaras-text-muted,var(--_selaras-default-text-muted));--selaras-resolved-text-inverted:var(--selaras-text-inverted,var(--_selaras-default-text-inverted));--selaras-resolved-border-default:var(--selaras-border-default,var(--_selaras-default-border-default));--selaras-resolved-border-muted:var(--selaras-border-muted,var(--_selaras-default-border-muted));--selaras-resolved-border-hover:var(--selaras-border-hover,var(--_selaras-default-border-hover))}}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { TableColumnDef, TableColumnVisibilityState, TableExpandedState, TableGetRowId, TableRowSelectionState, TableSortingState } from './composables/use-table.js';
|
|
2
|
+
export { createTableColumnHelper } from './composables/use-table.js';
|
|
3
|
+
export type { TableEmits, TableProps, TableSlots } from './utils/table-contracts.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createTableColumnHelper } from "./composables/use-table.js";
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export declare const accordionTheme: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
color: {
|
|
3
|
+
primary: "";
|
|
4
|
+
neutral: "";
|
|
5
|
+
secondary: "";
|
|
6
|
+
success: "";
|
|
7
|
+
danger: "";
|
|
8
|
+
info: "";
|
|
9
|
+
warning: "";
|
|
10
|
+
};
|
|
2
11
|
size: {
|
|
3
12
|
sm: {
|
|
4
13
|
trigger: string;
|
|
@@ -42,6 +51,15 @@ export declare const accordionTheme: import("tailwind-variants").TVReturnType<{
|
|
|
42
51
|
content: string;
|
|
43
52
|
contentInner: string;
|
|
44
53
|
}, undefined, {
|
|
54
|
+
color: {
|
|
55
|
+
primary: "";
|
|
56
|
+
neutral: "";
|
|
57
|
+
secondary: "";
|
|
58
|
+
success: "";
|
|
59
|
+
danger: "";
|
|
60
|
+
info: "";
|
|
61
|
+
warning: "";
|
|
62
|
+
};
|
|
45
63
|
size: {
|
|
46
64
|
sm: {
|
|
47
65
|
trigger: string;
|
|
@@ -85,6 +103,15 @@ export declare const accordionTheme: import("tailwind-variants").TVReturnType<{
|
|
|
85
103
|
content: string;
|
|
86
104
|
contentInner: string;
|
|
87
105
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
106
|
+
color: {
|
|
107
|
+
primary: "";
|
|
108
|
+
neutral: "";
|
|
109
|
+
secondary: "";
|
|
110
|
+
success: "";
|
|
111
|
+
danger: "";
|
|
112
|
+
info: "";
|
|
113
|
+
warning: "";
|
|
114
|
+
};
|
|
88
115
|
size: {
|
|
89
116
|
sm: {
|
|
90
117
|
trigger: string;
|
|
@@ -8,14 +8,14 @@ export const accordionTheme = tv({
|
|
|
8
8
|
root: "w-full flex flex-col",
|
|
9
9
|
item: "",
|
|
10
10
|
header: "",
|
|
11
|
-
trigger: "group flex w-full items-center gap-2 text-start font-medium text-[var(--
|
|
11
|
+
trigger: "group flex w-full items-center gap-2 text-start font-medium text-[var(--selaras-resolved-text-default)] transition-colors hover:text-[var(--_selaras-color-text-hover)] disabled:opacity-50 disabled:pointer-events-none",
|
|
12
12
|
label: "",
|
|
13
|
-
chevron: "size-4 shrink-0 text-[var(--
|
|
13
|
+
chevron: "size-4 shrink-0 text-[var(--selaras-resolved-text-muted)] transition-transform group-data-[state=open]:rotate-180",
|
|
14
14
|
// overflow-hidden clips the panel to its own animated height (without
|
|
15
15
|
// it, content would visibly spill out mid-animation); the two
|
|
16
16
|
// data-state keyframes interpolate between 0 and Reka's own measured
|
|
17
17
|
// --reka-accordion-content-height, so this never hardcodes a height.
|
|
18
|
-
content: "overflow-hidden text-[var(--
|
|
18
|
+
content: "overflow-hidden text-[var(--selaras-resolved-text-muted)] data-[state=open]:animate-[selaras-accordion-down_200ms_ease-out] data-[state=closed]:animate-[selaras-accordion-up_200ms_ease-out]",
|
|
19
19
|
// A separate slot (not `content` itself) for the padding that used to
|
|
20
20
|
// live on `content` directly - the padding must NOT be part of the
|
|
21
21
|
// height being animated (animating a 0-to-N height with vertical
|
|
@@ -24,6 +24,15 @@ export const accordionTheme = tv({
|
|
|
24
24
|
contentInner: "pb-3"
|
|
25
25
|
},
|
|
26
26
|
variants: {
|
|
27
|
+
color: {
|
|
28
|
+
primary: "",
|
|
29
|
+
neutral: "",
|
|
30
|
+
secondary: "",
|
|
31
|
+
success: "",
|
|
32
|
+
danger: "",
|
|
33
|
+
info: "",
|
|
34
|
+
warning: ""
|
|
35
|
+
},
|
|
27
36
|
size: {
|
|
28
37
|
sm: { trigger: "py-2 text-sm", content: "text-sm" },
|
|
29
38
|
md: { trigger: "py-3 text-sm", content: "text-sm" },
|
|
@@ -43,11 +52,11 @@ export const accordionTheme = tv({
|
|
|
43
52
|
// instead of a shared divider - overflow-hidden on `item` clips the
|
|
44
53
|
// content panel's corners to match, the same way Card's root does.
|
|
45
54
|
variant: {
|
|
46
|
-
list: { item: "border-b border-[var(--
|
|
55
|
+
list: { item: "border-b border-[var(--selaras-resolved-border-default)] last:border-b-0" },
|
|
47
56
|
pill: {
|
|
48
57
|
root: "gap-2",
|
|
49
|
-
item: "rounded-[var(--
|
|
50
|
-
trigger: "px-3 hover:bg-[var(--
|
|
58
|
+
item: "rounded-[var(--selaras-resolved-radius-md)] bg-[var(--selaras-resolved-surface-default)] ring-1 ring-[var(--selaras-resolved-border-default)] overflow-hidden",
|
|
59
|
+
trigger: "px-3 hover:bg-[var(--selaras-resolved-surface-elevated)] hover:text-[var(--selaras-resolved-text-default)]",
|
|
51
60
|
contentInner: "px-3"
|
|
52
61
|
}
|
|
53
62
|
}
|
|
@@ -5,12 +5,12 @@ export const alertDialogTheme = tv({
|
|
|
5
5
|
// same kind of centered, blocking surface, just a distinct semantic
|
|
6
6
|
// (Reka's AlertDialogContent unconditionally blocks outside-click
|
|
7
7
|
// dismissal itself, so there's no need for a second z-index tier).
|
|
8
|
-
overlay: "fixed inset-0 z-[var(--
|
|
9
|
-
content: "fixed left-1/2 top-1/2 z-[var(--
|
|
8
|
+
overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)]",
|
|
9
|
+
content: "fixed left-1/2 top-1/2 z-[var(--selaras-resolved-z-modal)] flex max-h-[calc(100vh-2rem)] w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 flex-col gap-4 rounded-[var(--selaras-resolved-radius-lg)] bg-[var(--selaras-resolved-surface-default)] p-6 shadow-[var(--selaras-resolved-shadow-lg)] focus:outline-none",
|
|
10
10
|
header: "flex flex-col gap-1",
|
|
11
|
-
title: "text-base font-semibold text-[var(--
|
|
12
|
-
description: "text-sm text-[var(--
|
|
13
|
-
body: "text-sm text-[var(--
|
|
11
|
+
title: "text-base font-semibold text-[var(--selaras-resolved-text-default)]",
|
|
12
|
+
description: "text-sm text-[var(--selaras-resolved-text-muted)]",
|
|
13
|
+
body: "text-sm text-[var(--selaras-resolved-text-muted)]",
|
|
14
14
|
footer: "flex items-center justify-end gap-2"
|
|
15
15
|
},
|
|
16
16
|
variants: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const alertTheme = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
root: "relative flex items-start gap-3 rounded-[var(--
|
|
4
|
+
root: "relative flex items-start gap-3 rounded-[var(--selaras-resolved-radius-md)] p-4",
|
|
5
5
|
icon: "size-5 shrink-0",
|
|
6
6
|
content: "min-w-0 flex-1",
|
|
7
|
-
title: "text-sm font-medium text-[var(--
|
|
8
|
-
description: "mt-1 text-sm text-[var(--
|
|
7
|
+
title: "text-sm font-medium text-[var(--selaras-resolved-text-default)]",
|
|
8
|
+
description: "mt-1 text-sm text-[var(--selaras-resolved-text-muted)]",
|
|
9
9
|
actions: "mt-3 flex items-center gap-2",
|
|
10
10
|
// Rendered as an <SButton> (ghost/neutral) - matches Toast's own
|
|
11
11
|
// close slot exactly (theme/toast.ts).
|
|
@@ -32,18 +32,9 @@ export const alertTheme = tv({
|
|
|
32
32
|
// so title/description have to flip to that color's own
|
|
33
33
|
// `-foreground` token to stay legible, the same pairing Button's
|
|
34
34
|
// own solid variant already uses.
|
|
35
|
-
{
|
|
36
|
-
{
|
|
37
|
-
{
|
|
38
|
-
{ color: "danger", variant: "soft", class: { root: "bg-[var(--ui-danger-soft)]", icon: "text-[var(--ui-danger)]" } },
|
|
39
|
-
{ color: "danger", variant: "outline", class: { root: "bg-[var(--ui-bg)] ring-1 ring-[var(--ui-danger)]", icon: "text-[var(--ui-danger)]" } },
|
|
40
|
-
{ color: "danger", variant: "solid", class: { root: "bg-[var(--ui-danger)]", icon: "text-[var(--ui-danger-foreground)]", title: "text-[var(--ui-danger-foreground)]", description: "text-[var(--ui-danger-foreground)] opacity-80" } },
|
|
41
|
-
{ color: "warning", variant: "soft", class: { root: "bg-[var(--ui-warning-soft)]", icon: "text-[var(--ui-warning)]" } },
|
|
42
|
-
{ color: "warning", variant: "outline", class: { root: "bg-[var(--ui-bg)] ring-1 ring-[var(--ui-warning)]", icon: "text-[var(--ui-warning)]" } },
|
|
43
|
-
{ color: "warning", variant: "solid", class: { root: "bg-[var(--ui-warning)]", icon: "text-[var(--ui-warning-foreground)]", title: "text-[var(--ui-warning-foreground)]", description: "text-[var(--ui-warning-foreground)] opacity-80" } },
|
|
44
|
-
{ color: "info", variant: "soft", class: { root: "bg-[var(--ui-info-soft)]", icon: "text-[var(--ui-info)]" } },
|
|
45
|
-
{ color: "info", variant: "outline", class: { root: "bg-[var(--ui-bg)] ring-1 ring-[var(--ui-info)]", icon: "text-[var(--ui-info)]" } },
|
|
46
|
-
{ color: "info", variant: "solid", class: { root: "bg-[var(--ui-info)]", icon: "text-[var(--ui-info-foreground)]", title: "text-[var(--ui-info-foreground)]", description: "text-[var(--ui-info-foreground)] opacity-80" } }
|
|
35
|
+
{ variant: "soft", class: { root: "bg-[var(--_selaras-color-subtle)]", icon: "text-[var(--_selaras-color-text)]" } },
|
|
36
|
+
{ variant: "outline", class: { root: "bg-[var(--selaras-resolved-surface-default)] ring-1 ring-[var(--_selaras-color-border)]", icon: "text-[var(--_selaras-color-text)]" } },
|
|
37
|
+
{ variant: "solid", class: { root: "bg-[var(--_selaras-color-fill)]", icon: "text-[var(--_selaras-color-on-fill)]", title: "text-[var(--_selaras-color-on-fill)]", description: "text-[var(--_selaras-color-on-fill)] opacity-80" } }
|
|
47
38
|
],
|
|
48
39
|
defaultVariants: {
|
|
49
40
|
color: "info",
|