@skewedaspect/sleekspace-ui 0.2.0-beta.1 → 0.2.0-beta.3
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/dist/components/Accordion/SkAccordion.vue.d.ts +65 -0
- package/dist/components/Accordion/SkAccordionItem.vue.d.ts +52 -0
- package/dist/components/Accordion/index.d.ts +3 -0
- package/dist/components/Accordion/types.d.ts +3 -0
- package/dist/components/Alert/SkAlert.vue.d.ts +39 -0
- package/dist/components/Alert/types.d.ts +4 -0
- package/dist/components/Avatar/SkAvatar.vue.d.ts +75 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/types.d.ts +20 -0
- package/dist/components/Breadcrumbs/SkBreadcrumbItem.vue.d.ts +51 -0
- package/dist/components/Breadcrumbs/SkBreadcrumbSeparator.vue.d.ts +13 -0
- package/dist/components/Breadcrumbs/SkBreadcrumbs.vue.d.ts +24 -0
- package/dist/components/Breadcrumbs/index.d.ts +4 -0
- package/dist/components/Breadcrumbs/types.d.ts +18 -0
- package/dist/components/Button/SkButton.vue.d.ts +97 -0
- package/dist/components/Button/types.d.ts +5 -0
- package/dist/components/Card/SkCard.vue.d.ts +88 -0
- package/dist/components/Card/types.d.ts +2 -0
- package/dist/components/Checkbox/SkCheckbox.vue.d.ts +71 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/types.d.ts +3 -0
- package/dist/components/Collapsible/SkCollapsible.vue.d.ts +70 -0
- package/dist/components/Collapsible/index.d.ts +2 -0
- package/dist/components/Collapsible/types.d.ts +2 -0
- package/dist/components/Divider/SkDivider.vue.d.ts +39 -0
- package/dist/components/Divider/types.d.ts +8 -0
- package/dist/components/Dropdown/SkDropdown.vue.d.ts +63 -0
- package/dist/components/Dropdown/SkDropdownMenuItem.vue.d.ts +32 -0
- package/dist/components/Dropdown/SkDropdownMenuSeparator.vue.d.ts +2 -0
- package/dist/components/Dropdown/SkDropdownSubmenu.vue.d.ts +34 -0
- package/dist/components/Dropdown/index.d.ts +5 -0
- package/dist/components/Dropdown/types.d.ts +4 -0
- package/dist/components/Field/SkField.vue.d.ts +99 -0
- package/dist/components/Field/index.d.ts +2 -0
- package/dist/components/Field/types.d.ts +1 -0
- package/dist/components/Group/SkGroup.vue.d.ts +29 -0
- package/dist/components/Group/types.d.ts +4 -0
- package/dist/components/Input/SkInput.vue.d.ts +84 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/types.d.ts +4 -0
- package/dist/components/Listbox/SkListbox.vue.d.ts +62 -0
- package/dist/components/Listbox/SkListboxItem.vue.d.ts +34 -0
- package/dist/components/Listbox/SkListboxSeparator.vue.d.ts +2 -0
- package/dist/components/Listbox/index.d.ts +4 -0
- package/dist/components/Listbox/types.d.ts +3 -0
- package/dist/components/Modal/SkModal.vue.d.ts +108 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/types.d.ts +3 -0
- package/dist/components/NavBar/SkNavBar.vue.d.ts +40 -0
- package/dist/components/NavBar/index.d.ts +2 -0
- package/dist/components/NavBar/types.d.ts +6 -0
- package/dist/components/NumberInput/SkNumberInput.vue.d.ts +93 -0
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/NumberInput/types.d.ts +3 -0
- package/dist/components/Page/SkPage.vue.d.ts +55 -0
- package/dist/components/Page/index.d.ts +2 -0
- package/dist/components/Page/types.d.ts +13 -0
- package/dist/components/Pagination/SkPagination.vue.d.ts +79 -0
- package/dist/components/Pagination/SkPaginationItem.vue.d.ts +44 -0
- package/dist/components/Pagination/index.d.ts +3 -0
- package/dist/components/Pagination/types.d.ts +24 -0
- package/dist/components/Panel/SkPanel.vue.d.ts +55 -0
- package/dist/components/Panel/types.d.ts +3 -0
- package/dist/components/Popover/SkPopover.vue.d.ts +94 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/types.d.ts +4 -0
- package/dist/components/Progress/SkProgress.vue.d.ts +66 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Progress/types.d.ts +22 -0
- package/dist/components/Radio/SkRadio.vue.d.ts +59 -0
- package/dist/components/Radio/SkRadioGroup.vue.d.ts +85 -0
- package/dist/components/Radio/index.d.ts +3 -0
- package/dist/components/Radio/types.d.ts +4 -0
- package/dist/components/Sidebar/SkSidebar.vue.d.ts +38 -0
- package/dist/components/Sidebar/SkSidebarItem.vue.d.ts +37 -0
- package/dist/components/Sidebar/SkSidebarSection.vue.d.ts +44 -0
- package/dist/components/Sidebar/types.d.ts +2 -0
- package/dist/components/Skeleton/SkSkeleton.vue.d.ts +55 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/types.d.ts +21 -0
- package/dist/components/Slider/SkSlider.vue.d.ts +100 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/types.d.ts +32 -0
- package/dist/components/Spinner/SkSpinner.vue.d.ts +39 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/types.d.ts +16 -0
- package/dist/components/Switch/SkSwitch.vue.d.ts +120 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/types.d.ts +3 -0
- package/dist/components/Table/SkTable.vue.d.ts +86 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/types.d.ts +3 -0
- package/dist/components/Tabs/SkTab.vue.d.ts +49 -0
- package/dist/components/Tabs/SkTabList.vue.d.ts +28 -0
- package/dist/components/Tabs/SkTabPanel.vue.d.ts +33 -0
- package/dist/components/Tabs/SkTabPanels.vue.d.ts +17 -0
- package/dist/components/Tabs/SkTabs.vue.d.ts +60 -0
- package/dist/components/Tabs/types.d.ts +5 -0
- package/dist/components/Tag/SkTag.vue.d.ts +58 -0
- package/dist/components/Tag/types.d.ts +8 -0
- package/dist/components/TagsInput/SkTagsInput.vue.d.ts +77 -0
- package/dist/components/TagsInput/index.d.ts +2 -0
- package/dist/components/TagsInput/types.d.ts +3 -0
- package/dist/components/Textarea/SkTextarea.vue.d.ts +85 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Textarea/types.d.ts +3 -0
- package/dist/components/Theme/SkTheme.vue.d.ts +20 -0
- package/dist/components/Theme/types.d.ts +16 -0
- package/dist/components/Theme/useTheme.d.ts +84 -0
- package/dist/components/Toast/SkToast.vue.d.ts +42 -0
- package/dist/components/Toast/SkToastProvider.vue.d.ts +62 -0
- package/dist/components/Toast/index.d.ts +3 -0
- package/dist/components/Toast/types.d.ts +35 -0
- package/dist/components/Toast/useToast.d.ts +33 -0
- package/dist/components/Tooltip/SkTooltip.vue.d.ts +81 -0
- package/dist/components/Tooltip/SkTooltipProvider.vue.d.ts +70 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/types.d.ts +4 -0
- package/dist/composables/useCustomColors.d.ts +74 -0
- package/dist/composables/useCustomColors.test.d.ts +1 -0
- package/dist/composables/usePortalContext.d.ts +75 -0
- package/dist/composables/usePortalContext.test.d.ts +1 -0
- package/dist/index.d.ts +149 -0
- package/dist/sleekspace-ui.css +2 -16
- package/dist/sleekspace-ui.es.js +43 -42
- package/dist/sleekspace-ui.umd.js +43 -42
- package/dist/tokens.css +968 -0
- package/dist/types.d.ts +29 -0
- package/docs/components/accordion/_meta.yaml +9 -0
- package/docs/components/accordion/custom-colors.md +20 -0
- package/docs/components/accordion/intro.md +8 -0
- package/docs/components/accordion/kinds.md +30 -0
- package/docs/components/accordion/multiple.md +28 -0
- package/docs/components/accordion/real-world.md +31 -0
- package/docs/components/accordion/usage.md +28 -0
- package/docs/components/alert/_meta.yaml +10 -0
- package/docs/components/alert/custom-colors.md +30 -0
- package/docs/components/alert/custom-icons.md +17 -0
- package/docs/components/alert/intro.md +8 -0
- package/docs/components/alert/kinds.md +24 -0
- package/docs/components/alert/prominent.md +16 -0
- package/docs/components/alert/rich-content.md +19 -0
- package/docs/components/alert/usage.md +12 -0
- package/docs/components/avatar/_meta.yaml +10 -0
- package/docs/components/avatar/custom-colors.md +14 -0
- package/docs/components/avatar/images.md +12 -0
- package/docs/components/avatar/intro.md +8 -0
- package/docs/components/avatar/kinds.md +16 -0
- package/docs/components/avatar/real-world.md +25 -0
- package/docs/components/avatar/sizes.md +14 -0
- package/docs/components/avatar/usage.md +15 -0
- package/docs/components/breadcrumbs/_meta.yaml +9 -0
- package/docs/components/breadcrumbs/custom-colors.md +14 -0
- package/docs/components/breadcrumbs/intro.md +8 -0
- package/docs/components/breadcrumbs/kinds.md +16 -0
- package/docs/components/breadcrumbs/real-world.md +33 -0
- package/docs/components/breadcrumbs/separators.md +13 -0
- package/docs/components/breadcrumbs/usage.md +15 -0
- package/docs/components/card/_meta.yaml +10 -0
- package/docs/components/card/intro.md +8 -0
- package/docs/components/card/kinds.md +24 -0
- package/docs/components/card/media.md +25 -0
- package/docs/components/card/neon-kinds.md +24 -0
- package/docs/components/card/no-decoration.md +15 -0
- package/docs/components/card/scrollable.md +23 -0
- package/docs/components/card/usage.md +12 -0
- package/docs/components/checkbox/_meta.yaml +11 -0
- package/docs/components/checkbox/color-kinds.md +17 -0
- package/docs/components/checkbox/custom-colors.md +21 -0
- package/docs/components/checkbox/form-example.md +24 -0
- package/docs/components/checkbox/intro.md +8 -0
- package/docs/components/checkbox/kinds.md +16 -0
- package/docs/components/checkbox/sizes.md +13 -0
- package/docs/components/checkbox/states.md +14 -0
- package/docs/components/checkbox/usage.md +17 -0
- package/docs/components/collapsible/_meta.yaml +9 -0
- package/docs/components/collapsible/accessibility.md +6 -0
- package/docs/components/collapsible/custom-colors.md +16 -0
- package/docs/components/collapsible/custom-trigger.md +35 -0
- package/docs/components/collapsible/intro.md +8 -0
- package/docs/components/collapsible/kinds.md +16 -0
- package/docs/components/collapsible/usage.md +22 -0
- package/docs/components/divider/_meta.yaml +10 -0
- package/docs/components/divider/accessibility.md +6 -0
- package/docs/components/divider/intro.md +8 -0
- package/docs/components/divider/kinds.md +16 -0
- package/docs/components/divider/orientation.md +18 -0
- package/docs/components/divider/sizes.md +24 -0
- package/docs/components/divider/usage.md +14 -0
- package/docs/components/divider/variants.md +14 -0
- package/docs/components/dropdown/_meta.yaml +11 -0
- package/docs/components/dropdown/accessibility.md +6 -0
- package/docs/components/dropdown/custom-colors.md +17 -0
- package/docs/components/dropdown/custom-trigger.md +18 -0
- package/docs/components/dropdown/intro.md +8 -0
- package/docs/components/dropdown/kinds.md +23 -0
- package/docs/components/dropdown/positioning.md +23 -0
- package/docs/components/dropdown/submenus.md +28 -0
- package/docs/components/dropdown/usage.md +24 -0
- package/docs/components/field/_meta.yaml +10 -0
- package/docs/components/field/accessibility.md +6 -0
- package/docs/components/field/description.md +15 -0
- package/docs/components/field/intro.md +8 -0
- package/docs/components/field/label-position.md +16 -0
- package/docs/components/field/required.md +12 -0
- package/docs/components/field/usage.md +19 -0
- package/docs/components/field/validation.md +32 -0
- package/docs/components/group/_meta.yaml +7 -0
- package/docs/components/group/accessibility.md +6 -0
- package/docs/components/group/intro.md +8 -0
- package/docs/components/group/orientation.md +22 -0
- package/docs/components/group/usage.md +14 -0
- package/docs/components/input/_meta.yaml +11 -0
- package/docs/components/input/accessibility.md +6 -0
- package/docs/components/input/custom-colors.md +21 -0
- package/docs/components/input/intro.md +8 -0
- package/docs/components/input/kinds.md +16 -0
- package/docs/components/input/sizes.md +13 -0
- package/docs/components/input/states.md +12 -0
- package/docs/components/input/types.md +15 -0
- package/docs/components/input/usage.md +17 -0
- package/docs/components/listbox/_meta.yaml +12 -0
- package/docs/components/listbox/color-kinds.md +27 -0
- package/docs/components/listbox/custom-colors.md +18 -0
- package/docs/components/listbox/form-example.md +36 -0
- package/docs/components/listbox/intro.md +8 -0
- package/docs/components/listbox/kinds.md +30 -0
- package/docs/components/listbox/separators.md +19 -0
- package/docs/components/listbox/sizes.md +24 -0
- package/docs/components/listbox/states.md +19 -0
- package/docs/components/listbox/usage.md +23 -0
- package/docs/components/modal/_meta.yaml +13 -0
- package/docs/components/modal/close-behaviors.md +49 -0
- package/docs/components/modal/confirmation.md +19 -0
- package/docs/components/modal/controlled-state.md +29 -0
- package/docs/components/modal/custom-colors.md +25 -0
- package/docs/components/modal/custom-trigger.md +28 -0
- package/docs/components/modal/form-modal.md +23 -0
- package/docs/components/modal/intro.md +8 -0
- package/docs/components/modal/kinds.md +30 -0
- package/docs/components/modal/sizes.md +21 -0
- package/docs/components/modal/usage.md +15 -0
- package/docs/components/navbar/_meta.yaml +11 -0
- package/docs/components/navbar/complex-layouts.md +34 -0
- package/docs/components/navbar/custom-colors.md +24 -0
- package/docs/components/navbar/icons.md +33 -0
- package/docs/components/navbar/intro.md +8 -0
- package/docs/components/navbar/kinds.md +24 -0
- package/docs/components/navbar/neon-colors.md +24 -0
- package/docs/components/navbar/sticky.md +22 -0
- package/docs/components/navbar/usage.md +25 -0
- package/docs/components/number-input/_meta.yaml +12 -0
- package/docs/components/number-input/color-kinds.md +17 -0
- package/docs/components/number-input/custom-colors.md +21 -0
- package/docs/components/number-input/form-example.md +55 -0
- package/docs/components/number-input/intro.md +8 -0
- package/docs/components/number-input/kinds.md +16 -0
- package/docs/components/number-input/min-max-step.md +11 -0
- package/docs/components/number-input/sizes.md +13 -0
- package/docs/components/number-input/states.md +12 -0
- package/docs/components/number-input/usage.md +18 -0
- package/docs/components/page/_meta.yaml +9 -0
- package/docs/components/page/custom-width.md +17 -0
- package/docs/components/page/fixed-header.md +17 -0
- package/docs/components/page/intro.md +8 -0
- package/docs/components/page/real-world.md +37 -0
- package/docs/components/page/sidebar-position.md +18 -0
- package/docs/components/page/usage.md +33 -0
- package/docs/components/pagination/_meta.yaml +12 -0
- package/docs/components/pagination/config-options.md +17 -0
- package/docs/components/pagination/custom-colors.md +15 -0
- package/docs/components/pagination/intro.md +8 -0
- package/docs/components/pagination/kinds.md +13 -0
- package/docs/components/pagination/sizes.md +14 -0
- package/docs/components/pagination/states.md +10 -0
- package/docs/components/pagination/table-example.md +28 -0
- package/docs/components/pagination/usage.md +10 -0
- package/docs/components/pagination/variants.md +13 -0
- package/docs/components/panel/_meta.yaml +10 -0
- package/docs/components/panel/custom-colors.md +18 -0
- package/docs/components/panel/decoration.md +20 -0
- package/docs/components/panel/intro.md +8 -0
- package/docs/components/panel/kinds.md +23 -0
- package/docs/components/panel/scrollable.md +18 -0
- package/docs/components/panel/sizes.md +20 -0
- package/docs/components/panel/usage.md +13 -0
- package/docs/components/popover/_meta.yaml +9 -0
- package/docs/components/popover/arrow.md +15 -0
- package/docs/components/popover/custom-colors.md +19 -0
- package/docs/components/popover/intro.md +8 -0
- package/docs/components/popover/kinds.md +24 -0
- package/docs/components/popover/positioning.md +36 -0
- package/docs/components/popover/usage.md +15 -0
- package/docs/components/progress/_meta.yaml +10 -0
- package/docs/components/progress/custom-colors.md +14 -0
- package/docs/components/progress/indeterminate.md +11 -0
- package/docs/components/progress/intro.md +8 -0
- package/docs/components/progress/kinds.md +16 -0
- package/docs/components/progress/sizes.md +14 -0
- package/docs/components/progress/usage.md +13 -0
- package/docs/components/progress/value-label.md +12 -0
- package/docs/components/radio/_meta.yaml +10 -0
- package/docs/components/radio/custom-colors.md +24 -0
- package/docs/components/radio/intro.md +8 -0
- package/docs/components/radio/kinds.md +23 -0
- package/docs/components/radio/orientation.md +22 -0
- package/docs/components/radio/sizes.md +23 -0
- package/docs/components/radio/states.md +21 -0
- package/docs/components/radio/usage.md +21 -0
- package/docs/components/sidebar/_meta.yaml +10 -0
- package/docs/components/sidebar/active-state.md +35 -0
- package/docs/components/sidebar/custom-colors.md +20 -0
- package/docs/components/sidebar/intro.md +8 -0
- package/docs/components/sidebar/kinds.md +22 -0
- package/docs/components/sidebar/router.md +24 -0
- package/docs/components/sidebar/sections.md +24 -0
- package/docs/components/sidebar/usage.md +25 -0
- package/docs/components/skeleton/_meta.yaml +8 -0
- package/docs/components/skeleton/animations.md +17 -0
- package/docs/components/skeleton/composition.md +22 -0
- package/docs/components/skeleton/intro.md +8 -0
- package/docs/components/skeleton/usage.md +12 -0
- package/docs/components/skeleton/variants.md +17 -0
- package/docs/components/slider/_meta.yaml +12 -0
- package/docs/components/slider/accessibility.md +6 -0
- package/docs/components/slider/custom-colors.md +14 -0
- package/docs/components/slider/intro.md +8 -0
- package/docs/components/slider/kinds.md +16 -0
- package/docs/components/slider/range.md +16 -0
- package/docs/components/slider/sizes.md +14 -0
- package/docs/components/slider/step.md +13 -0
- package/docs/components/slider/usage.md +16 -0
- package/docs/components/slider/vertical.md +14 -0
- package/docs/components/spinner/_meta.yaml +10 -0
- package/docs/components/spinner/accessibility.md +6 -0
- package/docs/components/spinner/custom-colors.md +13 -0
- package/docs/components/spinner/intro.md +8 -0
- package/docs/components/spinner/kinds.md +16 -0
- package/docs/components/spinner/sizes.md +14 -0
- package/docs/components/spinner/usage.md +10 -0
- package/docs/components/spinner/variants.md +12 -0
- package/docs/components/switch/_meta.yaml +12 -0
- package/docs/components/switch/accessibility.md +6 -0
- package/docs/components/switch/custom-colors.md +29 -0
- package/docs/components/switch/disabled.md +11 -0
- package/docs/components/switch/dynamic-labels.md +12 -0
- package/docs/components/switch/intro.md +8 -0
- package/docs/components/switch/kinds.md +16 -0
- package/docs/components/switch/sizes.md +14 -0
- package/docs/components/switch/thumb-color.md +16 -0
- package/docs/components/switch/usage.md +18 -0
- package/docs/components/table/_meta.yaml +12 -0
- package/docs/components/table/accessibility.md +6 -0
- package/docs/components/table/borders.md +17 -0
- package/docs/components/table/hoverable.md +26 -0
- package/docs/components/table/intro.md +8 -0
- package/docs/components/table/kinds.md +18 -0
- package/docs/components/table/striped.md +28 -0
- package/docs/components/table/subtle.md +26 -0
- package/docs/components/table/usage.md +30 -0
- package/docs/components/table/variants.md +23 -0
- package/docs/components/tabs/_meta.yaml +10 -0
- package/docs/components/tabs/accessibility.md +6 -0
- package/docs/components/tabs/custom-colors.md +23 -0
- package/docs/components/tabs/icons.md +23 -0
- package/docs/components/tabs/intro.md +8 -0
- package/docs/components/tabs/kinds.md +30 -0
- package/docs/components/tabs/usage.md +38 -0
- package/docs/components/tabs/vertical.md +23 -0
- package/docs/components/tag/_meta.yaml +11 -0
- package/docs/components/tag/accessibility.md +6 -0
- package/docs/components/tag/custom-colors.md +32 -0
- package/docs/components/tag/intro.md +8 -0
- package/docs/components/tag/kinds.md +16 -0
- package/docs/components/tag/removable.md +33 -0
- package/docs/components/tag/sizes.md +13 -0
- package/docs/components/tag/usage.md +13 -0
- package/docs/components/tag/variants.md +13 -0
- package/docs/components/tags-input/_meta.yaml +13 -0
- package/docs/components/tags-input/color-kinds.md +17 -0
- package/docs/components/tags-input/custom-colors.md +21 -0
- package/docs/components/tags-input/form-example.md +30 -0
- package/docs/components/tags-input/intro.md +8 -0
- package/docs/components/tags-input/kinds.md +16 -0
- package/docs/components/tags-input/max-tags.md +10 -0
- package/docs/components/tags-input/sizes.md +13 -0
- package/docs/components/tags-input/states.md +10 -0
- package/docs/components/tags-input/tag-customization.md +17 -0
- package/docs/components/tags-input/usage.md +17 -0
- package/docs/components/textarea/_meta.yaml +12 -0
- package/docs/components/textarea/color-kinds.md +17 -0
- package/docs/components/textarea/custom-colors.md +21 -0
- package/docs/components/textarea/form-example.md +37 -0
- package/docs/components/textarea/intro.md +8 -0
- package/docs/components/textarea/kinds.md +16 -0
- package/docs/components/textarea/rows.md +12 -0
- package/docs/components/textarea/sizes.md +13 -0
- package/docs/components/textarea/states.md +12 -0
- package/docs/components/textarea/usage.md +17 -0
- package/docs/components/theme/_meta.yaml +9 -0
- package/docs/components/theme/available-themes.md +16 -0
- package/docs/components/theme/intro.md +8 -0
- package/docs/components/theme/nested-themes.md +16 -0
- package/docs/components/theme/portal-components.md +19 -0
- package/docs/components/theme/programmatic-switching.md +19 -0
- package/docs/components/theme/usage.md +16 -0
- package/docs/components/toast/_meta.yaml +11 -0
- package/docs/components/toast/dismiss.md +15 -0
- package/docs/components/toast/duration.md +23 -0
- package/docs/components/toast/intro.md +8 -0
- package/docs/components/toast/kinds.md +13 -0
- package/docs/components/toast/real-world.md +23 -0
- package/docs/components/toast/setup.md +16 -0
- package/docs/components/toast/usage.md +18 -0
- package/docs/components/toast/with-title.md +14 -0
- package/docs/components/tooltip/_meta.yaml +14 -0
- package/docs/components/tooltip/alignment.md +24 -0
- package/docs/components/tooltip/app-level-provider.md +21 -0
- package/docs/components/tooltip/arrow.md +21 -0
- package/docs/components/tooltip/custom-colors.md +24 -0
- package/docs/components/tooltip/delay.md +27 -0
- package/docs/components/tooltip/intro.md +8 -0
- package/docs/components/tooltip/kinds.md +27 -0
- package/docs/components/tooltip/positioning.md +24 -0
- package/docs/components/tooltip/provider.md +26 -0
- package/docs/components/tooltip/real-world.md +32 -0
- package/docs/components/tooltip/usage.md +15 -0
- package/docs/guides/ai-llms.md +63 -0
- package/docs/guides/design-tokens/_meta.yaml +14 -0
- package/docs/guides/design-tokens/advanced.md +60 -0
- package/docs/guides/design-tokens/architecture.md +11 -0
- package/docs/guides/design-tokens/best-practices.md +21 -0
- package/docs/guides/design-tokens/component-tokens.md +37 -0
- package/docs/guides/design-tokens/foundation-colors.md +13 -0
- package/docs/guides/design-tokens/foundation-other.md +41 -0
- package/docs/guides/design-tokens/intro.md +19 -0
- package/docs/guides/design-tokens/semantic-kinds.md +33 -0
- package/docs/guides/design-tokens/semantic-states.md +55 -0
- package/docs/guides/design-tokens/themes.md +38 -0
- package/docs/guides/design-tokens/usage.md +55 -0
- package/package.json +3 -5
- package/src/components/Accordion/SkAccordion.vue +51 -37
- package/src/components/Accordion/SkAccordionItem.vue +40 -20
- package/src/components/Alert/SkAlert.vue +37 -27
- package/src/components/Avatar/SkAvatar.vue +69 -10
- package/src/components/Breadcrumbs/SkBreadcrumbItem.vue +63 -1
- package/src/components/Breadcrumbs/SkBreadcrumbSeparator.vue +32 -3
- package/src/components/Breadcrumbs/SkBreadcrumbs.vue +36 -0
- package/src/components/Button/SkButton.vue +83 -17
- package/src/components/Card/SkCard.vue +84 -17
- package/src/components/Checkbox/SkCheckbox.vue +52 -12
- package/src/components/Collapsible/SkCollapsible.vue +65 -27
- package/src/components/Divider/SkDivider.vue +51 -11
- package/src/components/Dropdown/SkDropdown.vue +54 -11
- package/src/components/Dropdown/SkDropdownMenuItem.vue +25 -6
- package/src/components/Dropdown/SkDropdownMenuSeparator.vue +16 -2
- package/src/components/Dropdown/SkDropdownSubmenu.vue +30 -8
- package/src/components/Field/SkField.vue +83 -15
- package/src/components/Group/SkGroup.vue +24 -9
- package/src/components/Input/SkInput.vue +77 -15
- package/src/components/Listbox/SkListbox.vue +48 -10
- package/src/components/Listbox/SkListboxItem.vue +28 -7
- package/src/components/Listbox/SkListboxSeparator.vue +16 -2
- package/src/components/Modal/SkModal.vue +85 -36
- package/src/components/NavBar/SkNavBar.vue +39 -9
- package/src/components/NumberInput/SkNumberInput.vue +85 -16
- package/src/components/Page/SkPage.vue +55 -6
- package/src/components/Pagination/SkPagination.vue +88 -0
- package/src/components/Pagination/SkPaginationItem.vue +51 -1
- package/src/components/Panel/SkPanel.vue +46 -12
- package/src/components/Popover/SkPopover.vue +91 -36
- package/src/components/Progress/SkProgress.vue +74 -10
- package/src/components/Radio/SkRadio.vue +48 -12
- package/src/components/Radio/SkRadioGroup.vue +69 -13
- package/src/components/Sidebar/SkSidebar.vue +36 -29
- package/src/components/Sidebar/SkSidebarItem.vue +34 -9
- package/src/components/Sidebar/SkSidebarSection.vue +22 -8
- package/src/components/Skeleton/SkSkeleton.vue +75 -8
- package/src/components/Slider/SkSlider.vue +91 -15
- package/src/components/Spinner/SkSpinner.vue +50 -6
- package/src/components/Switch/SkSwitch.vue +98 -35
- package/src/components/Table/SkTable.vue +79 -15
- package/src/components/Tabs/SkTab.vue +41 -11
- package/src/components/Tabs/SkTabList.vue +24 -8
- package/src/components/Tabs/SkTabPanel.vue +31 -9
- package/src/components/Tabs/SkTabPanels.vue +21 -4
- package/src/components/Tabs/SkTabs.vue +49 -37
- package/src/components/Tag/SkTag.vue +57 -32
- package/src/components/TagsInput/SkTagsInput.vue +75 -14
- package/src/components/Textarea/SkTextarea.vue +78 -15
- package/src/components/Theme/SkTheme.vue +27 -3
- package/src/components/Theme/types.ts +14 -5
- package/src/components/Toast/SkToast.vue +56 -9
- package/src/components/Toast/SkToastProvider.vue +43 -17
- package/src/components/Tooltip/SkTooltip.vue +66 -35
- package/src/components/Tooltip/SkTooltipProvider.vue +36 -36
- package/src/composables/usePortalContext.test.ts +2 -0
- package/src/styles/components/_alert.scss +0 -22
- package/web-types.json +302 -282
- package/docs/components/accordion.md +0 -92
- package/docs/components/alert.md +0 -72
- package/docs/components/avatar.md +0 -69
- package/docs/components/breadcrumbs.md +0 -65
- package/docs/components/button.md +0 -110
- package/docs/components/card.md +0 -87
- package/docs/components/checkbox.md +0 -77
- package/docs/components/collapsible.md +0 -71
- package/docs/components/divider.md +0 -62
- package/docs/components/dropdown.md +0 -88
- package/docs/components/field.md +0 -80
- package/docs/components/group.md +0 -41
- package/docs/components/input.md +0 -84
- package/docs/components/listbox.md +0 -82
- package/docs/components/modal.md +0 -101
- package/docs/components/navbar.md +0 -64
- package/docs/components/number-input.md +0 -78
- package/docs/components/page.md +0 -77
- package/docs/components/pagination.md +0 -88
- package/docs/components/panel.md +0 -74
- package/docs/components/popover.md +0 -93
- package/docs/components/progress.md +0 -76
- package/docs/components/radio.md +0 -86
- package/docs/components/sidebar.md +0 -74
- package/docs/components/skeleton.md +0 -76
- package/docs/components/slider.md +0 -94
- package/docs/components/spinner.md +0 -59
- package/docs/components/switch.md +0 -97
- package/docs/components/table.md +0 -91
- package/docs/components/tabs.md +0 -108
- package/docs/components/tag.md +0 -75
- package/docs/components/tags-input.md +0 -88
- package/docs/components/textarea.md +0 -80
- package/docs/components/theme.md +0 -65
- package/docs/components/toast.md +0 -95
- package/docs/components/tooltip.md +0 -90
- package/docs/guides/design-tokens.md +0 -105
|
@@ -28,9 +28,19 @@
|
|
|
28
28
|
|
|
29
29
|
<script setup lang="ts">
|
|
30
30
|
/**
|
|
31
|
-
* @component
|
|
32
|
-
* A multiline
|
|
33
|
-
*
|
|
31
|
+
* @component SkTextarea
|
|
32
|
+
* @description A multiline text input component for longer form content like descriptions, comments, or messages.
|
|
33
|
+
* Features semantic color theming, validation state support, and configurable height via the rows prop.
|
|
34
|
+
* Integrates with SkField for labels and error messages. Use with `v-model` for two-way data binding.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```vue
|
|
38
|
+
* <SkTextarea v-model="description" placeholder="Enter a description..." :rows="6" />
|
|
39
|
+
* <SkTextarea v-model="notes" kind="primary" size="lg" />
|
|
40
|
+
* <SkField label="Bio" :error="errors.bio">
|
|
41
|
+
* <SkTextarea v-model="bio" name="bio" :rows="4" />
|
|
42
|
+
* </SkField>
|
|
43
|
+
* ```
|
|
34
44
|
*/
|
|
35
45
|
|
|
36
46
|
import { type ComputedRef, computed, inject, toRef } from 'vue';
|
|
@@ -44,28 +54,76 @@
|
|
|
44
54
|
|
|
45
55
|
//------------------------------------------------------------------------------------------------------------------
|
|
46
56
|
|
|
47
|
-
/**
|
|
48
|
-
* A multiline textarea component with validation states and semantic color support.
|
|
49
|
-
*/
|
|
50
57
|
export interface SkTextareaComponentProps extends ComponentCustomColors
|
|
51
58
|
{
|
|
52
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Semantic color kind for the textarea border and focus ring. Use semantic kinds like
|
|
61
|
+
* 'success' or 'danger' to indicate validation states. When used inside an SkField with
|
|
62
|
+
* a `state` prop, the field's kind automatically overrides this value.
|
|
63
|
+
* @default 'neutral'
|
|
64
|
+
*/
|
|
53
65
|
kind ?: SkTextareaKind;
|
|
54
|
-
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Textarea size controlling padding and font size. The height is primarily controlled
|
|
69
|
+
* by the `rows` prop. Available sizes: 'sm' (small), 'md' (medium, default), 'lg' (large),
|
|
70
|
+
* 'xl' (extra large).
|
|
71
|
+
* @default 'md'
|
|
72
|
+
*/
|
|
55
73
|
size ?: SkTextareaSize;
|
|
56
|
-
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Placeholder text displayed when the textarea is empty. Use to provide hints about
|
|
77
|
+
* expected content or formatting. The placeholder disappears when the user begins typing.
|
|
78
|
+
* @default undefined
|
|
79
|
+
*/
|
|
57
80
|
placeholder ?: string;
|
|
58
|
-
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* When true, disables the textarea preventing all user interaction. The textarea appears
|
|
84
|
+
* with reduced opacity and the cursor changes to not-allowed. Disabled textareas are
|
|
85
|
+
* excluded from form submission.
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
59
88
|
disabled ?: boolean;
|
|
60
|
-
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* When true, makes the textarea read-only. The user can select and copy text but cannot
|
|
92
|
+
* modify it. Unlike disabled, read-only textareas are still included in form submission
|
|
93
|
+
* and maintain normal visual appearance.
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
61
96
|
readonly ?: boolean;
|
|
62
|
-
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* When true, marks the textarea as required for form validation. The browser will prevent
|
|
100
|
+
* form submission if the textarea is empty. For visual required indicators, wrap the
|
|
101
|
+
* textarea in an SkField component with `required` prop.
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
63
104
|
required ?: boolean;
|
|
64
|
-
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The form field name used when submitting the textarea value. Required for native form
|
|
108
|
+
* submission and useful for form libraries that track fields by name.
|
|
109
|
+
* @default undefined
|
|
110
|
+
*/
|
|
65
111
|
name ?: string;
|
|
66
|
-
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The number of visible text lines (rows) for the textarea. This sets the initial height
|
|
115
|
+
* of the textarea. Users can still resize it vertically if the CSS allows. Use more rows
|
|
116
|
+
* for content that typically requires more space (e.g., descriptions, messages).
|
|
117
|
+
* @default 4
|
|
118
|
+
*/
|
|
67
119
|
rows ?: number;
|
|
68
|
-
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Autocomplete hint for the browser's autofill feature. For textareas, common values
|
|
123
|
+
* include 'off' to disable autofill, or 'street-address' for address fields. Most
|
|
124
|
+
* other autocomplete values are more relevant for single-line inputs.
|
|
125
|
+
* @default undefined
|
|
126
|
+
*/
|
|
69
127
|
autocomplete ?: string;
|
|
70
128
|
}
|
|
71
129
|
|
|
@@ -85,6 +143,11 @@
|
|
|
85
143
|
|
|
86
144
|
//------------------------------------------------------------------------------------------------------------------
|
|
87
145
|
|
|
146
|
+
/**
|
|
147
|
+
* The textarea value. Use with `v-model` for two-way binding. Always a string value
|
|
148
|
+
* representing the multiline text content.
|
|
149
|
+
* @default ''
|
|
150
|
+
*/
|
|
88
151
|
const modelValue = defineModel<string>({ default: '' });
|
|
89
152
|
|
|
90
153
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -12,17 +12,41 @@
|
|
|
12
12
|
|
|
13
13
|
<script setup lang="ts">
|
|
14
14
|
/**
|
|
15
|
-
* @component
|
|
16
|
-
* A theme provider component that
|
|
17
|
-
*
|
|
15
|
+
* @component SkTheme
|
|
16
|
+
* @description A theme provider component that establishes the color scheme context for all child components.
|
|
17
|
+
* Place SkTheme at the root of your application or wrap specific sections to apply different themes.
|
|
18
|
+
* The component sets the `data-scheme` attribute and provides theme context to portal components
|
|
19
|
+
* (SkDropdown, SkModal, SkTooltip, etc.) so they render with correct colors even when portaled to the body.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```vue
|
|
23
|
+
* <SkTheme theme="colorful">
|
|
24
|
+
* <SkButton kind="primary">Themed Button</SkButton>
|
|
25
|
+
* <SkDropdown trigger-text="Menu">
|
|
26
|
+
* <SkDropdownMenuItem>Item 1</SkDropdownMenuItem>
|
|
27
|
+
* </SkDropdown>
|
|
28
|
+
* </SkTheme>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @slot default - All application content that should inherit this theme context. Nested SkTheme components
|
|
32
|
+
* can override the theme for subsections of the UI.
|
|
18
33
|
*/
|
|
19
34
|
|
|
20
35
|
import { provide, watch } from 'vue';
|
|
36
|
+
|
|
37
|
+
// Types
|
|
21
38
|
import type { SkThemeComponentProps } from './types';
|
|
39
|
+
|
|
40
|
+
// Composables
|
|
22
41
|
import { provideTheme } from './useTheme';
|
|
23
42
|
|
|
24
43
|
//------------------------------------------------------------------------------------------------------------------
|
|
25
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Props interface is defined in ./types.ts and includes:
|
|
47
|
+
* - `theme`: The theme name ('greyscale' or 'colorful') that controls the overall color scheme.
|
|
48
|
+
* The theme value is reactive and can be changed dynamically to switch themes at runtime.
|
|
49
|
+
*/
|
|
26
50
|
const props = withDefaults(defineProps<SkThemeComponentProps>(), {
|
|
27
51
|
theme: 'greyscale',
|
|
28
52
|
});
|
|
@@ -2,15 +2,24 @@
|
|
|
2
2
|
// Theme Component Types
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
export type SkThemeName = 'greyscale' | 'colorful';
|
|
6
|
-
|
|
7
5
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Available theme names that control the overall color scheme of the application.
|
|
7
|
+
* - 'greyscale': A monochromatic theme with neutral grays and subtle accents
|
|
8
|
+
* - 'colorful': A vibrant theme with saturated colors and stronger contrasts
|
|
10
9
|
*/
|
|
10
|
+
export type SkThemeName = 'greyscale' | 'colorful';
|
|
11
|
+
|
|
12
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
13
|
+
|
|
11
14
|
export interface SkThemeComponentProps
|
|
12
15
|
{
|
|
13
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* The active theme name that controls the color scheme for all child components.
|
|
18
|
+
* Changing this prop reactively updates the theme across the entire subtree.
|
|
19
|
+
* Portal components (dropdowns, modals, tooltips) automatically inherit this
|
|
20
|
+
* theme even though they render outside the DOM hierarchy.
|
|
21
|
+
* @default 'greyscale'
|
|
22
|
+
*/
|
|
14
23
|
theme ?: SkThemeName;
|
|
15
24
|
}
|
|
16
25
|
|
|
@@ -93,9 +93,25 @@
|
|
|
93
93
|
|
|
94
94
|
<script setup lang="ts">
|
|
95
95
|
/**
|
|
96
|
-
* @component
|
|
97
|
-
* Internal toast component used by SkToastProvider.
|
|
98
|
-
*
|
|
96
|
+
* @component SkToast
|
|
97
|
+
* @description Internal toast notification component used by SkToastProvider. This component renders individual
|
|
98
|
+
* toast messages with an icon, title, message, and optional close button. Built on RekaUI's Toast primitive
|
|
99
|
+
* with semantic color variants and auto-dismiss functionality. Not exported directly - use the `useToast()`
|
|
100
|
+
* composable to create toasts programmatically.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```vue
|
|
104
|
+
* <!-- Used internally by SkToastProvider - do not use directly -->
|
|
105
|
+
* <SkToast
|
|
106
|
+
* id="toast-1"
|
|
107
|
+
* kind="success"
|
|
108
|
+
* title="Success!"
|
|
109
|
+
* message="Your changes have been saved."
|
|
110
|
+
* :duration="5000"
|
|
111
|
+
* :closable="true"
|
|
112
|
+
* @dismiss="handleDismiss"
|
|
113
|
+
* />
|
|
114
|
+
* ```
|
|
99
115
|
*/
|
|
100
116
|
|
|
101
117
|
import { computed } from 'vue';
|
|
@@ -113,17 +129,43 @@
|
|
|
113
129
|
|
|
114
130
|
interface SkToastProps
|
|
115
131
|
{
|
|
116
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Unique identifier for this toast instance. Used internally for tracking and dismissing
|
|
134
|
+
* specific toasts. Generated automatically by SkToastProvider when using useToast().
|
|
135
|
+
*/
|
|
117
136
|
id : string;
|
|
118
|
-
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Semantic color kind that determines the toast's visual appearance and icon. Each kind
|
|
140
|
+
* displays a contextually appropriate icon: info (circle-i), success (checkmark),
|
|
141
|
+
* warning (triangle), danger (x-circle). The kind also sets the background and text colors.
|
|
142
|
+
*/
|
|
119
143
|
kind : SkToastKind;
|
|
120
|
-
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Optional bold title text displayed above the message. Use for brief headings like
|
|
147
|
+
* "Success!", "Error", or "Warning". When omitted, only the message is displayed.
|
|
148
|
+
*/
|
|
121
149
|
title ?: string;
|
|
122
|
-
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The main toast message content. This is the primary text users will read, describing
|
|
153
|
+
* what happened or what action was taken. Keep messages concise and actionable.
|
|
154
|
+
*/
|
|
123
155
|
message : string;
|
|
124
|
-
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Time in milliseconds before the toast automatically dismisses. Set to 0 or undefined
|
|
159
|
+
* to disable auto-dismiss and require manual closure. When set, a progress indicator
|
|
160
|
+
* may show remaining time. Overrides the provider's default duration.
|
|
161
|
+
*/
|
|
125
162
|
duration ?: number;
|
|
126
|
-
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* When true, displays an X button allowing users to manually dismiss the toast before
|
|
166
|
+
* the duration expires. Essential for toasts with important information users may need
|
|
167
|
+
* more time to read, or when auto-dismiss is disabled.
|
|
168
|
+
*/
|
|
127
169
|
closable : boolean;
|
|
128
170
|
}
|
|
129
171
|
|
|
@@ -131,6 +173,11 @@
|
|
|
131
173
|
|
|
132
174
|
const props = defineProps<SkToastProps>();
|
|
133
175
|
|
|
176
|
+
/**
|
|
177
|
+
* @event dismiss - Emitted when the toast is dismissed, either by auto-dismiss timeout,
|
|
178
|
+
* user clicking the close button, or swipe gesture. The toast ID is passed to allow
|
|
179
|
+
* the provider to remove it from the active toasts list.
|
|
180
|
+
*/
|
|
134
181
|
const emit = defineEmits<{
|
|
135
182
|
dismiss : [ id : string ];
|
|
136
183
|
}>();
|
|
@@ -35,11 +35,33 @@
|
|
|
35
35
|
|
|
36
36
|
<script setup lang="ts">
|
|
37
37
|
/**
|
|
38
|
-
* @component
|
|
39
|
-
* Toast provider and
|
|
38
|
+
* @component SkToastProvider
|
|
39
|
+
* @description Toast notification system provider that manages and displays toast messages. Wrap your application
|
|
40
|
+
* (or a section of it) with this component to enable toast notifications. Use the `useToast()` composable from
|
|
41
|
+
* anywhere within the provider tree to show notifications programmatically. Supports swipe-to-dismiss, keyboard
|
|
42
|
+
* navigation, and configurable positioning.
|
|
40
43
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```vue
|
|
46
|
+
* <!-- In your App.vue or layout component -->
|
|
47
|
+
* <SkTheme>
|
|
48
|
+
* <SkToastProvider position="bottom-right" :duration="5000">
|
|
49
|
+
* <RouterView />
|
|
50
|
+
* </SkToastProvider>
|
|
51
|
+
* </SkTheme>
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @example Using the toast API in any child component
|
|
55
|
+
* ```ts
|
|
56
|
+
* import { useToast } from 'sleekspace-ui';
|
|
57
|
+
*
|
|
58
|
+
* const toast = useToast();
|
|
59
|
+
* toast.add({ kind: 'success', message: 'Settings saved!' });
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @slot default - Your application content. All child components can access the toast API via useToast().
|
|
63
|
+
*
|
|
64
|
+
* @see useToast - Composable for showing toasts from any component
|
|
43
65
|
*/
|
|
44
66
|
|
|
45
67
|
import { computed, provide, ref } from 'vue';
|
|
@@ -57,41 +79,45 @@
|
|
|
57
79
|
|
|
58
80
|
//------------------------------------------------------------------------------------------------------------------
|
|
59
81
|
|
|
60
|
-
/**
|
|
61
|
-
* Toast provider that manages and displays toast notifications.
|
|
62
|
-
*
|
|
63
|
-
* Wrap your app with this component to enable toasts. Use useToast() composable
|
|
64
|
-
* to show notifications from anywhere in the tree.
|
|
65
|
-
*
|
|
66
|
-
* @see useToast - Composable for showing toasts
|
|
67
|
-
*/
|
|
68
82
|
export interface SkToastProviderComponentProps
|
|
69
83
|
{
|
|
70
84
|
/**
|
|
71
|
-
* Preset position for the viewport.
|
|
85
|
+
* Preset position for the toast viewport on the screen. Controls where toasts appear
|
|
86
|
+
* and stack. Choose a position that doesn't obstruct important UI elements. Common
|
|
87
|
+
* choices are 'bottom-right' for desktop apps and 'top-center' for mobile-first designs.
|
|
88
|
+
* When omitted, you can position the viewport via custom CSS instead.
|
|
89
|
+
* @default undefined
|
|
72
90
|
*/
|
|
73
91
|
position ?: SkToastPosition;
|
|
74
92
|
|
|
75
93
|
/**
|
|
76
|
-
* Default duration
|
|
94
|
+
* Default duration in milliseconds before toasts automatically dismiss. Individual
|
|
95
|
+
* toasts can override this value. Set to 0 to disable auto-dismiss by default,
|
|
96
|
+
* requiring users to manually close each toast. Recommended range: 3000-7000ms.
|
|
77
97
|
* @default 5000
|
|
78
98
|
*/
|
|
79
99
|
duration ?: number;
|
|
80
100
|
|
|
81
101
|
/**
|
|
82
|
-
* Direction
|
|
102
|
+
* Direction users can swipe to dismiss toasts on touch devices. The natural direction
|
|
103
|
+
* often matches the toast position - 'right' for right-positioned toasts, 'up' for
|
|
104
|
+
* top-positioned, etc. Set to the direction that feels like "dismissing" the toast.
|
|
83
105
|
* @default 'right'
|
|
84
106
|
*/
|
|
85
107
|
swipeDirection ?: SkToastSwipeDirection;
|
|
86
108
|
|
|
87
109
|
/**
|
|
88
|
-
*
|
|
110
|
+
* Minimum distance in pixels a user must swipe before the toast dismisses. Lower values
|
|
111
|
+
* make dismissal easier but may cause accidental dismissals. Higher values require more
|
|
112
|
+
* intentional swipes. Balance based on your target devices and user needs.
|
|
89
113
|
* @default 50
|
|
90
114
|
*/
|
|
91
115
|
swipeThreshold ?: number;
|
|
92
116
|
|
|
93
117
|
/**
|
|
94
|
-
* Keyboard shortcut to focus
|
|
118
|
+
* Keyboard shortcut(s) to focus the toast region for screen reader users and keyboard
|
|
119
|
+
* navigation. When pressed, focus moves to the toast viewport. Use an array to define
|
|
120
|
+
* multiple shortcuts. Keys use standard keyboard event key names.
|
|
95
121
|
* @default ['F8']
|
|
96
122
|
*/
|
|
97
123
|
hotkey ?: string[];
|
|
@@ -52,8 +52,26 @@
|
|
|
52
52
|
|
|
53
53
|
<script setup lang="ts">
|
|
54
54
|
/**
|
|
55
|
-
* @component
|
|
56
|
-
*
|
|
55
|
+
* @component SkTooltip
|
|
56
|
+
* @description A tooltip component for displaying contextual hints on hover or focus. Built on RekaUI's Tooltip
|
|
57
|
+
* primitive with beveled corner styling and full accessibility support. Works standalone with its own timing,
|
|
58
|
+
* or wrap multiple tooltips in SkTooltipProvider for coordinated "skip delay" behavior where moving quickly
|
|
59
|
+
* between tooltips shows them instantly.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```vue
|
|
63
|
+
* <SkTooltip side="right" kind="primary">
|
|
64
|
+
* <template #trigger>
|
|
65
|
+
* <SkButton icon>?</SkButton>
|
|
66
|
+
* </template>
|
|
67
|
+
* Click here to learn more about this feature.
|
|
68
|
+
* </SkTooltip>
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @slot trigger - The element that triggers the tooltip on hover/focus. Use `as-child` behavior - the trigger
|
|
72
|
+
* slot content becomes the actual trigger element. Required slot.
|
|
73
|
+
* @slot default - The tooltip content to display. Can include text, formatted content, or simple components.
|
|
74
|
+
* Keep content brief for tooltips; use SkPopover for richer interactions.
|
|
57
75
|
*/
|
|
58
76
|
|
|
59
77
|
import { computed, inject, toRef } from 'vue';
|
|
@@ -76,49 +94,62 @@
|
|
|
76
94
|
|
|
77
95
|
//------------------------------------------------------------------------------------------------------------------
|
|
78
96
|
|
|
79
|
-
/**
|
|
80
|
-
* Tooltip component for displaying hover hints.
|
|
81
|
-
*
|
|
82
|
-
* Works in two modes:
|
|
83
|
-
* - **Standalone**: Each tooltip manages its own timing (default)
|
|
84
|
-
* - **With Provider**: Wrap tooltips in SkTooltipProvider for coordinated behavior
|
|
85
|
-
*
|
|
86
|
-
* The provider enables "skip delay" - moving quickly between tooltips shows them instantly.
|
|
87
|
-
*
|
|
88
|
-
* @example Standalone (works out of the box)
|
|
89
|
-
* ```vue
|
|
90
|
-
* <SkTooltip>
|
|
91
|
-
* <template #trigger><SkButton>Hover me</SkButton></template>
|
|
92
|
-
* Tooltip content
|
|
93
|
-
* </SkTooltip>
|
|
94
|
-
* ```
|
|
95
|
-
*
|
|
96
|
-
* @example With provider (coordinated tooltips)
|
|
97
|
-
* ```vue
|
|
98
|
-
* <SkTooltipProvider :delay-duration="300">
|
|
99
|
-
* <SkTooltip>...</SkTooltip>
|
|
100
|
-
* <SkTooltip>...</SkTooltip>
|
|
101
|
-
* </SkTooltipProvider>
|
|
102
|
-
* ```
|
|
103
|
-
*/
|
|
104
97
|
export interface SkTooltipComponentProps extends ComponentCustomColors
|
|
105
98
|
{
|
|
106
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Semantic color kind that controls the tooltip's background and text colors. Semantic kinds
|
|
101
|
+
* (neutral, primary, accent, info, success, warning, danger) adapt to your theme. Use 'neutral'
|
|
102
|
+
* for general hints, or match the kind to contextual meaning (e.g., 'warning' for caution tips).
|
|
103
|
+
* @default 'neutral'
|
|
104
|
+
*/
|
|
107
105
|
kind ?: ComponentKind;
|
|
108
|
-
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Visual variant that controls the tooltip's appearance. 'solid' shows a filled background
|
|
109
|
+
* with the kind color, ideal for high-contrast visibility. 'outline' shows a bordered style
|
|
110
|
+
* with transparent background, useful for subtle hints that don't distract from content.
|
|
111
|
+
* @default 'solid'
|
|
112
|
+
*/
|
|
109
113
|
variant ?: 'solid' | 'outline';
|
|
110
|
-
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Which side of the trigger element to display the tooltip. The tooltip automatically
|
|
117
|
+
* flips to the opposite side if there isn't enough space. Common choices: 'top' for
|
|
118
|
+
* buttons, 'right' for inline help icons, 'bottom' for navigation items.
|
|
119
|
+
* @default 'top'
|
|
120
|
+
*/
|
|
111
121
|
side ?: SkTooltipSide;
|
|
112
|
-
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Alignment of the tooltip along its side. 'center' centers the tooltip on the trigger,
|
|
125
|
+
* 'start' aligns to the left/top edge, 'end' aligns to the right/bottom edge. Use 'start'
|
|
126
|
+
* or 'end' when the trigger is near a screen edge to prevent clipping.
|
|
127
|
+
* @default 'center'
|
|
128
|
+
*/
|
|
113
129
|
align ?: 'start' | 'center' | 'end';
|
|
114
|
-
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Distance in pixels between the tooltip and its trigger element. Increase for more
|
|
133
|
+
* breathing room, decrease for tighter coupling. The arrow (if shown) extends from
|
|
134
|
+
* this offset toward the trigger.
|
|
135
|
+
* @default 5
|
|
136
|
+
*/
|
|
115
137
|
sideOffset ?: number;
|
|
138
|
+
|
|
116
139
|
/**
|
|
117
|
-
* Delay before
|
|
118
|
-
*
|
|
140
|
+
* Delay in milliseconds before the tooltip appears after hovering the trigger. Only used
|
|
141
|
+
* in standalone mode - when inside SkTooltipProvider, the provider's delayDuration takes
|
|
142
|
+
* precedence. Set to 0 for instant tooltips, or higher values to avoid accidental triggers.
|
|
143
|
+
* @default 400
|
|
119
144
|
*/
|
|
120
145
|
delayDuration ?: number;
|
|
121
|
-
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Whether to display a small arrow pointing from the tooltip toward its trigger element.
|
|
149
|
+
* Arrows help visually connect the tooltip to its trigger, especially useful when multiple
|
|
150
|
+
* interactive elements are close together. Disable for a cleaner, more minimal appearance.
|
|
151
|
+
* @default true
|
|
152
|
+
*/
|
|
122
153
|
showArrow ?: boolean;
|
|
123
154
|
}
|
|
124
155
|
|
|
@@ -15,80 +15,80 @@
|
|
|
15
15
|
|
|
16
16
|
<script setup lang="ts">
|
|
17
17
|
/**
|
|
18
|
-
* @component
|
|
19
|
-
* Provider component
|
|
18
|
+
* @component SkTooltipProvider
|
|
19
|
+
* @description Provider component that enables coordinated tooltip behavior across all child SkTooltip instances.
|
|
20
|
+
* When tooltips share a provider, they gain "skip delay" functionality - users can quickly move between tooltips
|
|
21
|
+
* without waiting for the delay each time. Also centralizes configuration like delay duration and accessibility
|
|
22
|
+
* options. Optional but recommended for apps with multiple tooltips.
|
|
20
23
|
*
|
|
21
|
-
*
|
|
22
|
-
* - **Skip delay**: Moving quickly between tooltips shows the next one immediately
|
|
23
|
-
* - **Shared configuration**: Set delay duration once for all tooltips
|
|
24
|
-
* - **Consistent behavior**: All tooltips behave as a coordinated group
|
|
25
|
-
*
|
|
26
|
-
* Without a provider, each SkTooltip creates its own isolated context and works independently.
|
|
27
|
-
* Both patterns are valid - use the provider when you want coordinated tooltip behavior.
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
import { provide } from 'vue';
|
|
31
|
-
import { TooltipProvider } from 'reka-ui';
|
|
32
|
-
|
|
33
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Provider component for tooltips that enables shared behavior.
|
|
37
|
-
*
|
|
38
|
-
* @example Basic usage - wrap your app or a section
|
|
39
|
-
* ```vue
|
|
40
|
-
* <SkTooltipProvider :delay-duration="300" :skip-delay-duration="100">
|
|
41
|
-
* <MyApp />
|
|
42
|
-
* </SkTooltipProvider>
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @example In App.vue for app-wide tooltip coordination
|
|
24
|
+
* @example
|
|
46
25
|
* ```vue
|
|
47
26
|
* <template>
|
|
48
27
|
* <SkTheme theme="colorful">
|
|
49
|
-
* <SkTooltipProvider>
|
|
28
|
+
* <SkTooltipProvider :delay-duration="300" :skip-delay-duration="100">
|
|
50
29
|
* <RouterView />
|
|
51
30
|
* </SkTooltipProvider>
|
|
52
31
|
* </SkTheme>
|
|
53
32
|
* </template>
|
|
54
33
|
* ```
|
|
34
|
+
*
|
|
35
|
+
* @slot default - Your application content containing SkTooltip components. All descendant tooltips
|
|
36
|
+
* will share the provider's timing and behavior configuration.
|
|
55
37
|
*/
|
|
38
|
+
|
|
39
|
+
import { provide } from 'vue';
|
|
40
|
+
import { TooltipProvider } from 'reka-ui';
|
|
41
|
+
|
|
42
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
43
|
+
|
|
56
44
|
export interface SkTooltipProviderProps
|
|
57
45
|
{
|
|
58
46
|
/**
|
|
59
|
-
*
|
|
47
|
+
* Delay in milliseconds from when the pointer enters a tooltip trigger until the tooltip
|
|
48
|
+
* opens. Applies to all SkTooltip components within this provider. A short delay (200-400ms)
|
|
49
|
+
* prevents tooltips from flashing when users move the mouse across the UI. Set to 0 for
|
|
50
|
+
* instant tooltips, though this may feel jarring.
|
|
60
51
|
* @default 400
|
|
61
52
|
*/
|
|
62
53
|
delayDuration ?: number;
|
|
63
54
|
|
|
64
55
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
56
|
+
* Time window in milliseconds during which moving to another tooltip skips the delay entirely.
|
|
57
|
+
* After showing one tooltip, if the user hovers another trigger within this window, it appears
|
|
58
|
+
* instantly. This creates smooth "scanning" behavior when exploring a toolbar or menu. Set to
|
|
59
|
+
* 0 to disable skip delay behavior.
|
|
67
60
|
* @default 300
|
|
68
61
|
*/
|
|
69
62
|
skipDelayDuration ?: number;
|
|
70
63
|
|
|
71
64
|
/**
|
|
72
|
-
* When true,
|
|
65
|
+
* When true, moving the pointer from the trigger onto the tooltip content closes the tooltip.
|
|
66
|
+
* By default, users can hover over tooltip content (useful for links or selectable text).
|
|
67
|
+
* Enable this for simpler tooltips where you want strict trigger-only behavior.
|
|
73
68
|
* @default false
|
|
74
69
|
*/
|
|
75
70
|
disableHoverableContent ?: boolean;
|
|
76
71
|
|
|
77
72
|
/**
|
|
78
|
-
* When true, clicking
|
|
73
|
+
* When true, clicking the trigger element does not close an open tooltip. By default,
|
|
74
|
+
* clicking the trigger dismisses the tooltip. Enable this if your trigger performs an
|
|
75
|
+
* action where the tooltip should remain visible for confirmation feedback.
|
|
79
76
|
* @default false
|
|
80
77
|
*/
|
|
81
78
|
disableClosingTrigger ?: boolean;
|
|
82
79
|
|
|
83
80
|
/**
|
|
84
|
-
* When true, tooltips only
|
|
85
|
-
*
|
|
81
|
+
* When true, tooltips only appear on keyboard focus (Tab navigation), not on mouse focus.
|
|
82
|
+
* Uses the `:focus-visible` heuristic to distinguish intentional keyboard focus from
|
|
83
|
+
* programmatic or mouse-triggered focus. Enable for reduced visual noise on mouse-heavy UIs.
|
|
86
84
|
* @default false
|
|
87
85
|
*/
|
|
88
86
|
ignoreNonKeyboardFocus ?: boolean;
|
|
89
87
|
|
|
90
88
|
/**
|
|
91
|
-
* When true, disables all tooltips within this provider.
|
|
89
|
+
* When true, completely disables all tooltips within this provider. Useful for temporarily
|
|
90
|
+
* suppressing tooltips during certain UI states (like drag operations or touch interactions)
|
|
91
|
+
* or for user preference settings. Tooltips remain in the DOM but won't open.
|
|
92
92
|
* @default false
|
|
93
93
|
*/
|
|
94
94
|
disabled ?: boolean;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Portal Context Composable Tests
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
+
/* eslint-disable vue/one-component-per-file */
|
|
6
|
+
|
|
5
7
|
import { describe, expect, it } from 'vitest';
|
|
6
8
|
import { defineComponent, h, inject, provide, ref } from 'vue';
|
|
7
9
|
import { mount } from '@vue/test-utils';
|