@skewedaspect/sleekspace-ui 0.2.0-beta.1 → 0.2.0-beta.2
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 -2
- 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 +2 -4
- 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/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
|
@@ -18,8 +18,21 @@
|
|
|
18
18
|
|
|
19
19
|
<script setup lang="ts">
|
|
20
20
|
/**
|
|
21
|
-
* @component
|
|
22
|
-
*
|
|
21
|
+
* @component SkDropdownMenuItem
|
|
22
|
+
* @description An individual menu item for use inside SkDropdown or SkDropdownSubmenu. Provides keyboard
|
|
23
|
+
* navigation support (arrow keys, Enter/Space to select) and proper focus management. Menu items automatically
|
|
24
|
+
* close the dropdown when clicked unless the event is prevented.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```vue
|
|
28
|
+
* <SkDropdown trigger-text="File">
|
|
29
|
+
* <SkDropdownMenuItem @click="handleNew">New Document</SkDropdownMenuItem>
|
|
30
|
+
* <SkDropdownMenuItem @click="handleOpen">Open...</SkDropdownMenuItem>
|
|
31
|
+
* <SkDropdownMenuItem disabled>Save (disabled)</SkDropdownMenuItem>
|
|
32
|
+
* </SkDropdown>
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @slot default - The menu item label content. Can include text, icons, keyboard shortcuts, or any inline elements.
|
|
23
36
|
*/
|
|
24
37
|
|
|
25
38
|
import { computed } from 'vue';
|
|
@@ -27,12 +40,14 @@
|
|
|
27
40
|
|
|
28
41
|
//------------------------------------------------------------------------------------------------------------------
|
|
29
42
|
|
|
30
|
-
/**
|
|
31
|
-
* A menu item component for use within SkDropdown.
|
|
32
|
-
*/
|
|
33
43
|
export interface SkDropdownMenuItemComponentProps
|
|
34
44
|
{
|
|
35
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* When true, the menu item is visually dimmed and cannot be interacted with.
|
|
47
|
+
* Disabled items are skipped during keyboard navigation. Use for actions that
|
|
48
|
+
* are temporarily unavailable based on application state.
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
36
51
|
disabled ?: boolean;
|
|
37
52
|
}
|
|
38
53
|
|
|
@@ -44,6 +59,10 @@
|
|
|
44
59
|
|
|
45
60
|
//------------------------------------------------------------------------------------------------------------------
|
|
46
61
|
|
|
62
|
+
/**
|
|
63
|
+
* @event click - Emitted when the menu item is clicked or activated via keyboard (Enter/Space).
|
|
64
|
+
* The dropdown menu automatically closes after this event unless `event.preventDefault()` is called.
|
|
65
|
+
*/
|
|
47
66
|
defineEmits<{
|
|
48
67
|
click : [event : Event];
|
|
49
68
|
}>();
|
|
@@ -16,8 +16,22 @@
|
|
|
16
16
|
|
|
17
17
|
<script setup lang="ts">
|
|
18
18
|
/**
|
|
19
|
-
* @component
|
|
20
|
-
* A
|
|
19
|
+
* @component SkDropdownMenuSeparator
|
|
20
|
+
* @description A visual divider line for grouping related menu items within SkDropdown or SkDropdownSubmenu.
|
|
21
|
+
* Use separators to create logical sections in longer menus, improving scannability and organization.
|
|
22
|
+
* This is a purely visual component with no interactive behavior.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```vue
|
|
26
|
+
* <SkDropdown trigger-text="Edit">
|
|
27
|
+
* <SkDropdownMenuItem>Undo</SkDropdownMenuItem>
|
|
28
|
+
* <SkDropdownMenuItem>Redo</SkDropdownMenuItem>
|
|
29
|
+
* <SkDropdownMenuSeparator />
|
|
30
|
+
* <SkDropdownMenuItem>Cut</SkDropdownMenuItem>
|
|
31
|
+
* <SkDropdownMenuItem>Copy</SkDropdownMenuItem>
|
|
32
|
+
* <SkDropdownMenuItem>Paste</SkDropdownMenuItem>
|
|
33
|
+
* </SkDropdown>
|
|
34
|
+
* ```
|
|
21
35
|
*/
|
|
22
36
|
|
|
23
37
|
import { DropdownMenuSeparator } from 'reka-ui';
|
|
@@ -40,9 +40,25 @@
|
|
|
40
40
|
|
|
41
41
|
<script setup lang="ts">
|
|
42
42
|
/**
|
|
43
|
-
* @component
|
|
44
|
-
* A
|
|
45
|
-
*
|
|
43
|
+
* @component SkDropdownSubmenu
|
|
44
|
+
* @description A nested submenu component that expands from a parent SkDropdown or another SkDropdownSubmenu.
|
|
45
|
+
* The submenu opens to the side when the trigger item is hovered or focused, with full keyboard navigation
|
|
46
|
+
* support (arrow keys to navigate, Enter/Space or Right arrow to open, Left arrow or Escape to close).
|
|
47
|
+
* Content is portaled to prevent overflow clipping.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```vue
|
|
51
|
+
* <SkDropdown trigger-text="Options">
|
|
52
|
+
* <SkDropdownMenuItem>Simple Action</SkDropdownMenuItem>
|
|
53
|
+
* <SkDropdownSubmenu trigger-text="More Actions">
|
|
54
|
+
* <SkDropdownMenuItem>Nested Item 1</SkDropdownMenuItem>
|
|
55
|
+
* <SkDropdownMenuItem>Nested Item 2</SkDropdownMenuItem>
|
|
56
|
+
* </SkDropdownSubmenu>
|
|
57
|
+
* </SkDropdown>
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @slot default - Menu content containing SkDropdownMenuItem, SkDropdownMenuSeparator, or further
|
|
61
|
+
* nested SkDropdownSubmenu components.
|
|
46
62
|
*/
|
|
47
63
|
|
|
48
64
|
import { computed, inject } from 'vue';
|
|
@@ -61,14 +77,20 @@
|
|
|
61
77
|
|
|
62
78
|
//------------------------------------------------------------------------------------------------------------------
|
|
63
79
|
|
|
64
|
-
/**
|
|
65
|
-
* A dropdown submenu component for nested menus.
|
|
66
|
-
*/
|
|
67
80
|
export interface SkDropdownSubmenuComponentProps
|
|
68
81
|
{
|
|
69
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* The label text displayed on the submenu trigger item. This appears as a menu
|
|
84
|
+
* item in the parent menu with a right-pointing caret indicating it opens a submenu.
|
|
85
|
+
*/
|
|
70
86
|
triggerText : string;
|
|
71
|
-
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Semantic color kind for the submenu content. When not specified, the submenu
|
|
90
|
+
* automatically inherits the kind from its parent SkDropdown, ensuring visual
|
|
91
|
+
* consistency throughout nested menu structures.
|
|
92
|
+
* @default inherited from parent
|
|
93
|
+
*/
|
|
72
94
|
kind ?: SkDropdownKind;
|
|
73
95
|
}
|
|
74
96
|
|
|
@@ -33,9 +33,26 @@
|
|
|
33
33
|
|
|
34
34
|
<script setup lang="ts">
|
|
35
35
|
/**
|
|
36
|
-
* @component
|
|
37
|
-
* A form field wrapper that provides label, description, and error message
|
|
38
|
-
* Automatically wires up
|
|
36
|
+
* @component SkField
|
|
37
|
+
* @description A form field wrapper that provides consistent label, description, and error message layout.
|
|
38
|
+
* Automatically generates unique IDs and wires up ARIA attributes (aria-describedby, aria-invalid) for
|
|
39
|
+
* accessibility. Child input components (SkInput, SkTextarea, etc.) automatically inherit the validation
|
|
40
|
+
* kind based on the `state` prop.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```vue
|
|
44
|
+
* <SkField label="Email" description="We'll never share your email" :error="errors.email">
|
|
45
|
+
* <SkInput v-model="email" type="email" />
|
|
46
|
+
* </SkField>
|
|
47
|
+
*
|
|
48
|
+
* <SkField label="Username" required :state="isValid" label-position="left">
|
|
49
|
+
* <SkInput v-model="username" />
|
|
50
|
+
* </SkField>
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @slot default - The form input component (SkInput, SkTextarea, SkNumberInput, etc.). Receives slot props:
|
|
54
|
+
* `id` (string) - unique ID for the input, `aria-describedby` (string) - ID of description/error element,
|
|
55
|
+
* `aria-invalid` (string) - "true" when error present, `kind` (string) - semantic kind based on state.
|
|
39
56
|
*/
|
|
40
57
|
|
|
41
58
|
import { computed, provide } from 'vue';
|
|
@@ -45,28 +62,79 @@
|
|
|
45
62
|
|
|
46
63
|
//------------------------------------------------------------------------------------------------------------------
|
|
47
64
|
|
|
48
|
-
/**
|
|
49
|
-
* A form field wrapper that provides label, description, and error message support.
|
|
50
|
-
*/
|
|
51
65
|
export interface SkFieldComponentProps
|
|
52
66
|
{
|
|
53
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* Label text displayed above or beside the input. The label is automatically associated
|
|
69
|
+
* with the input via the `for` attribute using the generated or provided ID. Leave empty
|
|
70
|
+
* for inputs that don't need a visible label (use aria-label on the input instead).
|
|
71
|
+
* @default undefined
|
|
72
|
+
*/
|
|
54
73
|
label ?: string;
|
|
55
|
-
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Help text displayed below the input providing additional context or instructions.
|
|
77
|
+
* When an error message is present, the description is hidden and replaced by the error.
|
|
78
|
+
* Connected to the input via aria-describedby for screen reader accessibility.
|
|
79
|
+
* @default undefined
|
|
80
|
+
*/
|
|
56
81
|
description ?: string;
|
|
57
|
-
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Error message displayed below the input in a danger/red color. When present, replaces
|
|
85
|
+
* the description text and sets aria-invalid="true" on the input. Typically populated
|
|
86
|
+
* from form validation results.
|
|
87
|
+
* @default undefined
|
|
88
|
+
*/
|
|
58
89
|
error ?: string;
|
|
59
|
-
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* When true, displays a red asterisk (*) after the label to indicate the field is required.
|
|
93
|
+
* This is a visual indicator only—you must also set the `required` attribute on the input
|
|
94
|
+
* itself for form validation.
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
60
97
|
required ?: boolean;
|
|
61
|
-
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Position of the label relative to the input. 'top' places the label above the input
|
|
101
|
+
* (default, best for most forms). 'left' places the label to the left of the input
|
|
102
|
+
* (useful for horizontal form layouts or settings panels).
|
|
103
|
+
* @default 'top'
|
|
104
|
+
*/
|
|
62
105
|
labelPosition ?: SkFieldLabelPosition;
|
|
63
|
-
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Custom ID for the field. When provided, this ID is passed to the slotted input and
|
|
109
|
+
* used for label association. When not provided, a unique ID is auto-generated. Use
|
|
110
|
+
* custom IDs when you need to reference the input from elsewhere in your code.
|
|
111
|
+
* @default undefined (auto-generated)
|
|
112
|
+
*/
|
|
64
113
|
id ?: string;
|
|
65
|
-
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Validation state that controls the visual kind of the child input. `true` applies the
|
|
117
|
+
* `validKind` (default: 'success'), `false` applies the `invalidKind` (default: 'danger'),
|
|
118
|
+
* and `null`/`undefined` lets the input use its own kind prop. Child inputs automatically
|
|
119
|
+
* inherit this via provide/inject.
|
|
120
|
+
* @default null
|
|
121
|
+
*/
|
|
66
122
|
state ?: boolean | null;
|
|
67
|
-
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Semantic kind to apply to the child input when `state` is `true` (valid). Typically
|
|
126
|
+
* 'success' for green styling indicating valid input. The kind is provided to child
|
|
127
|
+
* inputs via Vue's provide/inject system.
|
|
128
|
+
* @default 'success'
|
|
129
|
+
*/
|
|
68
130
|
validKind ?: string;
|
|
69
|
-
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Semantic kind to apply to the child input when `state` is `false` (invalid). Typically
|
|
134
|
+
* 'danger' for red styling indicating validation errors. The kind is provided to child
|
|
135
|
+
* inputs via Vue's provide/inject system.
|
|
136
|
+
* @default 'danger'
|
|
137
|
+
*/
|
|
70
138
|
invalidKind ?: string;
|
|
71
139
|
}
|
|
72
140
|
|
|
@@ -12,23 +12,38 @@
|
|
|
12
12
|
|
|
13
13
|
<script setup lang="ts">
|
|
14
14
|
/**
|
|
15
|
-
* @component
|
|
16
|
-
* A layout container that groups child elements with consistent spacing.
|
|
17
|
-
*
|
|
15
|
+
* @component SkGroup
|
|
16
|
+
* @description A flexbox-based layout container that groups child elements with consistent spacing and alignment.
|
|
17
|
+
* Use SkGroup to arrange buttons, form controls, or any elements that should be visually grouped together.
|
|
18
|
+
* The component uses CSS gap for reliable spacing that works correctly regardless of conditional rendering.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```vue
|
|
22
|
+
* <SkGroup orientation="horizontal">
|
|
23
|
+
* <SkButton>Save</SkButton>
|
|
24
|
+
* <SkButton variant="outline">Cancel</SkButton>
|
|
25
|
+
* </SkGroup>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @slot default - The child elements to be grouped. All direct children will be arranged according to the
|
|
29
|
+
* orientation prop with consistent spacing between them.
|
|
18
30
|
*/
|
|
19
31
|
|
|
20
32
|
import { computed } from 'vue';
|
|
21
|
-
|
|
33
|
+
|
|
34
|
+
// Types
|
|
35
|
+
import type { SkGroupOrientation } from './types';
|
|
22
36
|
|
|
23
37
|
//------------------------------------------------------------------------------------------------------------------
|
|
24
38
|
|
|
25
|
-
/**
|
|
26
|
-
* A layout container that groups child elements with consistent spacing.
|
|
27
|
-
* Automatically arranges children in horizontal or vertical orientation.
|
|
28
|
-
*/
|
|
29
39
|
export interface SkGroupComponentProps
|
|
30
40
|
{
|
|
31
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Controls how child elements are arranged within the group. Use 'horizontal' for
|
|
43
|
+
* side-by-side layouts (like button groups or inline form controls), or 'vertical'
|
|
44
|
+
* for stacked layouts (like form field groups or menu items).
|
|
45
|
+
* @default 'horizontal'
|
|
46
|
+
*/
|
|
32
47
|
orientation ?: SkGroupOrientation;
|
|
33
48
|
}
|
|
34
49
|
|
|
@@ -28,9 +28,19 @@
|
|
|
28
28
|
|
|
29
29
|
<script setup lang="ts">
|
|
30
30
|
/**
|
|
31
|
-
* @component
|
|
32
|
-
* A text input component with
|
|
33
|
-
* Supports various input types and
|
|
31
|
+
* @component SkInput
|
|
32
|
+
* @description A single-line text input component with semantic color theming and validation state support.
|
|
33
|
+
* Supports various HTML input types (text, email, password, etc.) and integrates with SkField for labels
|
|
34
|
+
* and error messages. Use with `v-model` for two-way data binding of the input value.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```vue
|
|
38
|
+
* <SkInput v-model="email" type="email" placeholder="Enter your email" />
|
|
39
|
+
* <SkInput v-model="search" kind="primary" size="lg" />
|
|
40
|
+
* <SkField label="Username" :error="errors.username">
|
|
41
|
+
* <SkInput v-model="username" name="username" required />
|
|
42
|
+
* </SkField>
|
|
43
|
+
* ```
|
|
34
44
|
*/
|
|
35
45
|
|
|
36
46
|
import { type ComputedRef, computed, inject, toRef } from 'vue';
|
|
@@ -44,28 +54,75 @@
|
|
|
44
54
|
|
|
45
55
|
//------------------------------------------------------------------------------------------------------------------
|
|
46
56
|
|
|
47
|
-
/**
|
|
48
|
-
* A text input component with validation states and semantic color support.
|
|
49
|
-
*/
|
|
50
57
|
export interface SkInputComponentProps extends ComponentCustomColors
|
|
51
58
|
{
|
|
52
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* The HTML input type attribute controlling the input behavior and keyboard on mobile devices.
|
|
61
|
+
* Common types include 'text', 'email', 'password', 'tel', 'url', 'search', and 'number'.
|
|
62
|
+
* Note: For numeric inputs with stepper buttons, consider using SkNumberInput instead.
|
|
63
|
+
* @default 'text'
|
|
64
|
+
*/
|
|
53
65
|
type ?: SkInputType;
|
|
54
|
-
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Semantic color kind for the input border and focus ring. Use semantic kinds like 'success'
|
|
69
|
+
* or 'danger' to indicate validation states. When used inside an SkField with a `state` prop,
|
|
70
|
+
* the field's kind automatically overrides this value.
|
|
71
|
+
* @default 'neutral'
|
|
72
|
+
*/
|
|
55
73
|
kind ?: SkInputKind;
|
|
56
|
-
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Input size controlling height, padding, and font size. Available sizes: 'sm' (small,
|
|
77
|
+
* compact forms), 'md' (medium, default), 'lg' (large), 'xl' (extra large, prominent inputs).
|
|
78
|
+
* @default 'md'
|
|
79
|
+
*/
|
|
57
80
|
size ?: SkInputSize;
|
|
58
|
-
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Placeholder text displayed when the input is empty. Use to provide hints about expected
|
|
84
|
+
* input format or example values. The placeholder disappears when the user begins typing.
|
|
85
|
+
* @default undefined
|
|
86
|
+
*/
|
|
59
87
|
placeholder ?: string;
|
|
60
|
-
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* When true, disables the input preventing all user interaction. The input appears with
|
|
91
|
+
* reduced opacity and the cursor changes to not-allowed. Disabled inputs are excluded
|
|
92
|
+
* from form submission.
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
61
95
|
disabled ?: boolean;
|
|
62
|
-
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* When true, makes the input read-only. The user can select and copy text but cannot
|
|
99
|
+
* modify it. Unlike disabled, read-only inputs are still included in form submission
|
|
100
|
+
* and maintain normal visual appearance.
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
63
103
|
readonly ?: boolean;
|
|
64
|
-
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* When true, marks the input as required for form validation. The browser will prevent
|
|
107
|
+
* form submission if the input is empty. For visual required indicators, wrap the input
|
|
108
|
+
* in an SkField component with `required` prop.
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
65
111
|
required ?: boolean;
|
|
66
|
-
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The form field name used when submitting the input value. Required for native form
|
|
115
|
+
* submission and useful for form libraries that track fields by name.
|
|
116
|
+
* @default undefined
|
|
117
|
+
*/
|
|
67
118
|
name ?: string;
|
|
68
|
-
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Autocomplete hint for the browser's autofill feature. Common values include 'off',
|
|
122
|
+
* 'email', 'username', 'current-password', 'new-password', 'given-name', 'family-name',
|
|
123
|
+
* 'street-address', etc. See MDN for the complete list of valid values.
|
|
124
|
+
* @default undefined
|
|
125
|
+
*/
|
|
69
126
|
autocomplete ?: string;
|
|
70
127
|
}
|
|
71
128
|
|
|
@@ -85,6 +142,11 @@
|
|
|
85
142
|
|
|
86
143
|
//------------------------------------------------------------------------------------------------------------------
|
|
87
144
|
|
|
145
|
+
/**
|
|
146
|
+
* The input value. Use with `v-model` for two-way binding. Accepts both string and number
|
|
147
|
+
* values to support various input types.
|
|
148
|
+
* @default ''
|
|
149
|
+
*/
|
|
88
150
|
const modelValue = defineModel<string | number>({ default: '' });
|
|
89
151
|
|
|
90
152
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -53,9 +53,22 @@
|
|
|
53
53
|
|
|
54
54
|
<script setup lang="ts">
|
|
55
55
|
/**
|
|
56
|
-
* @component
|
|
57
|
-
* A searchable listbox
|
|
58
|
-
*
|
|
56
|
+
* @component SkListbox
|
|
57
|
+
* @description A searchable dropdown listbox for selecting from predefined options. Features a text input
|
|
58
|
+
* for filtering options and a dropdown panel displaying matching items. Built on RekaUI's Combobox
|
|
59
|
+
* primitive with full keyboard navigation, type-ahead search, and portal rendering for proper z-index.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```vue
|
|
63
|
+
* <SkListbox v-model="selectedCountry" kind="primary" placeholder="Select a country...">
|
|
64
|
+
* <SkListboxItem value="us">United States</SkListboxItem>
|
|
65
|
+
* <SkListboxItem value="uk">United Kingdom</SkListboxItem>
|
|
66
|
+
* <SkListboxItem value="ca">Canada</SkListboxItem>
|
|
67
|
+
* </SkListbox>
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @slot default - SkListboxItem components representing the available options. Use SkListboxSeparator
|
|
71
|
+
* to create visual dividers between groups of options.
|
|
59
72
|
*/
|
|
60
73
|
|
|
61
74
|
import { type ComputedRef, computed, inject, toRef } from 'vue';
|
|
@@ -79,18 +92,38 @@
|
|
|
79
92
|
|
|
80
93
|
//------------------------------------------------------------------------------------------------------------------
|
|
81
94
|
|
|
82
|
-
/**
|
|
83
|
-
* A searchable listbox component for selecting from predefined options.
|
|
84
|
-
*/
|
|
85
95
|
export interface SkListboxComponentProps extends ComponentCustomColors
|
|
86
96
|
{
|
|
87
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* Semantic color kind that controls the input border, focus ring, and selected
|
|
99
|
+
* item highlight appearance. When used inside SkField, inherits the field's
|
|
100
|
+
* kind if not explicitly set.
|
|
101
|
+
* @default 'neutral' (or inherited from parent SkField)
|
|
102
|
+
*/
|
|
88
103
|
kind ?: SkListboxKind;
|
|
89
|
-
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Size of the input field and dropdown content. Controls the input height,
|
|
107
|
+
* text size, and option item dimensions. Available sizes: 'sm' (small),
|
|
108
|
+
* 'md' (medium), 'lg' (large).
|
|
109
|
+
* @default 'md'
|
|
110
|
+
*/
|
|
90
111
|
size ?: SkListboxSize;
|
|
91
|
-
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Placeholder text displayed in the input field when no option is selected
|
|
115
|
+
* and no search text is entered. Use to guide users on what type of selection
|
|
116
|
+
* to make or to indicate the field purpose.
|
|
117
|
+
* @default 'Search...'
|
|
118
|
+
*/
|
|
92
119
|
placeholder ?: string;
|
|
93
|
-
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* When true, the listbox is disabled and cannot be interacted with. The input
|
|
123
|
+
* field is non-editable and the dropdown cannot be opened. The component
|
|
124
|
+
* appears with reduced opacity and the cursor changes to not-allowed.
|
|
125
|
+
* @default false
|
|
126
|
+
*/
|
|
94
127
|
disabled ?: boolean;
|
|
95
128
|
}
|
|
96
129
|
|
|
@@ -105,6 +138,11 @@
|
|
|
105
138
|
|
|
106
139
|
//------------------------------------------------------------------------------------------------------------------
|
|
107
140
|
|
|
141
|
+
/**
|
|
142
|
+
* The selected value(s). Use with `v-model` for two-way binding. Pass a string
|
|
143
|
+
* for single selection mode, or an array of strings for multi-select mode.
|
|
144
|
+
* The value corresponds to the `value` prop of the selected SkListboxItem(s).
|
|
145
|
+
*/
|
|
108
146
|
const modelValue = defineModel<string | string[]>();
|
|
109
147
|
|
|
110
148
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -32,8 +32,22 @@
|
|
|
32
32
|
|
|
33
33
|
<script setup lang="ts">
|
|
34
34
|
/**
|
|
35
|
-
* @component
|
|
36
|
-
* A
|
|
35
|
+
* @component SkListboxItem
|
|
36
|
+
* @description A selectable option within an SkListbox dropdown. When selected, the item displays a
|
|
37
|
+
* checkmark indicator and its value is set as the listbox's v-model. Built on RekaUI's ComboboxItem
|
|
38
|
+
* with keyboard navigation and type-ahead search support.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```vue
|
|
42
|
+
* <SkListbox v-model="selected">
|
|
43
|
+
* <SkListboxItem value="option1">First Option</SkListboxItem>
|
|
44
|
+
* <SkListboxItem value="option2">Second Option</SkListboxItem>
|
|
45
|
+
* <SkListboxItem value="option3" disabled>Unavailable Option</SkListboxItem>
|
|
46
|
+
* </SkListbox>
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @slot default - The display content for this option. Can be plain text or rich content including
|
|
50
|
+
* icons, formatted text, or custom layouts. This is what users see in the dropdown.
|
|
37
51
|
*/
|
|
38
52
|
|
|
39
53
|
import { computed } from 'vue';
|
|
@@ -41,14 +55,21 @@
|
|
|
41
55
|
|
|
42
56
|
//------------------------------------------------------------------------------------------------------------------
|
|
43
57
|
|
|
44
|
-
/**
|
|
45
|
-
* A listbox item for use within SkListbox.
|
|
46
|
-
*/
|
|
47
58
|
export interface SkListboxItemComponentProps
|
|
48
59
|
{
|
|
49
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* The value this option represents. When selected, the parent SkListbox's v-model
|
|
62
|
+
* will be set to this value. Can be a string, number, or object for complex data.
|
|
63
|
+
* Must be unique within the listbox to ensure proper selection behavior.
|
|
64
|
+
*/
|
|
50
65
|
value : string | number | object;
|
|
51
|
-
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* When true, this option is disabled and cannot be selected. The item appears
|
|
69
|
+
* with reduced opacity and is skipped during keyboard navigation. Use for
|
|
70
|
+
* temporarily unavailable options that should still be visible.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
52
73
|
disabled ?: boolean;
|
|
53
74
|
}
|
|
54
75
|
|
|
@@ -16,8 +16,22 @@
|
|
|
16
16
|
|
|
17
17
|
<script setup lang="ts">
|
|
18
18
|
/**
|
|
19
|
-
* @component
|
|
20
|
-
* A
|
|
19
|
+
* @component SkListboxSeparator
|
|
20
|
+
* @description A visual divider for organizing options within an SkListbox dropdown. Use to create
|
|
21
|
+
* logical groups of related options without affecting selection behavior. Renders as a horizontal
|
|
22
|
+
* line between items with appropriate spacing.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```vue
|
|
26
|
+
* <SkListbox v-model="selected">
|
|
27
|
+
* <SkListboxItem value="recent1">Recent Document 1</SkListboxItem>
|
|
28
|
+
* <SkListboxItem value="recent2">Recent Document 2</SkListboxItem>
|
|
29
|
+
* <SkListboxSeparator />
|
|
30
|
+
* <SkListboxItem value="all">Browse All Documents...</SkListboxItem>
|
|
31
|
+
* </SkListbox>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @slot - Not applicable. This component does not accept slot content.
|
|
21
35
|
*/
|
|
22
36
|
|
|
23
37
|
import { ComboboxSeparator } from 'reka-ui';
|