@hina-ui/vue 1.7.6 → 1.7.8
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/index.js +7952 -663
- package/dist/index.js.map +1 -1
- package/dist/shared/behavior/anchor-follow.ts +20 -11
- package/dist/shared/lib/command-palette/match.ts +9 -0
- package/dist/shared/lib/float-button.ts +14 -0
- package/dist/shared/lib/line-clamp.ts +76 -0
- package/dist/shared/lib/scroll-restore.ts +145 -0
- package/dist/shared/locale/en-US.ts +4 -0
- package/dist/shared/locale/index.ts +2 -0
- package/dist/shared/locale/ja-JP.ts +229 -0
- package/dist/shared/locale/types.ts +4 -0
- package/dist/shared/locale/zh-CN.ts +4 -0
- package/dist/shared/primitives/accordion/LICENSE +21 -0
- package/dist/shared/primitives/accordion/index.ts +34 -0
- package/dist/shared/primitives/arrow-navigation/LICENSE +21 -0
- package/dist/shared/primitives/arrow-navigation/index.ts +90 -0
- package/dist/shared/primitives/body-scroll-lock/LICENSE +21 -0
- package/dist/shared/primitives/body-scroll-lock/index.ts +115 -0
- package/dist/shared/primitives/checkbox/LICENSE +21 -0
- package/dist/shared/primitives/checkbox/index.ts +23 -0
- package/dist/shared/primitives/collapsible/LICENSE +21 -0
- package/dist/shared/primitives/collapsible/index.ts +31 -0
- package/dist/shared/primitives/collection/LICENSE +21 -0
- package/dist/shared/primitives/collection/index.ts +19 -0
- package/dist/shared/primitives/dismissable-layer/LICENSE +21 -0
- package/dist/shared/primitives/dismissable-layer/index.ts +203 -0
- package/dist/shared/primitives/focus-guards/LICENSE +21 -0
- package/dist/shared/primitives/focus-guards/index.ts +24 -0
- package/dist/shared/primitives/focus-scope/LICENSE +21 -0
- package/dist/shared/primitives/focus-scope/index.ts +216 -0
- package/dist/shared/primitives/label/LICENSE +21 -0
- package/dist/shared/primitives/label/index.ts +4 -0
- package/dist/shared/primitives/pagination/LICENSE +21 -0
- package/dist/shared/primitives/pagination/index.ts +99 -0
- package/dist/shared/primitives/pin-input/LICENSE +21 -0
- package/dist/shared/primitives/pin-input/index.ts +126 -0
- package/dist/shared/primitives/presence/LICENSE +21 -0
- package/dist/shared/primitives/presence/index.ts +135 -0
- package/dist/shared/primitives/progress/LICENSE +21 -0
- package/dist/shared/primitives/progress/index.ts +41 -0
- package/dist/shared/primitives/radio-group/LICENSE +21 -0
- package/dist/shared/primitives/radio-group/index.ts +46 -0
- package/dist/shared/primitives/rating/LICENSE +21 -0
- package/dist/shared/primitives/rating/index.ts +37 -0
- package/dist/shared/primitives/roving-focus/LICENSE +21 -0
- package/dist/shared/primitives/roving-focus/index.ts +44 -0
- package/dist/shared/primitives/separator/LICENSE +21 -0
- package/dist/shared/primitives/separator/index.ts +14 -0
- package/dist/shared/primitives/size/LICENSE +21 -0
- package/dist/shared/primitives/size/index.ts +19 -0
- package/dist/shared/primitives/slider/LICENSE +21 -0
- package/dist/shared/primitives/slider/index.ts +183 -0
- package/dist/shared/primitives/splitter/LICENSE +21 -0
- package/dist/shared/primitives/splitter/arrays.ts +6 -0
- package/dist/shared/primitives/splitter/assert.ts +9 -0
- package/dist/shared/primitives/splitter/calculate.ts +139 -0
- package/dist/shared/primitives/splitter/callPanelCallbacks.ts +40 -0
- package/dist/shared/primitives/splitter/compare.ts +13 -0
- package/dist/shared/primitives/splitter/constants.ts +1 -0
- package/dist/shared/primitives/splitter/debounce.ts +10 -0
- package/dist/shared/primitives/splitter/dom.ts +64 -0
- package/dist/shared/primitives/splitter/events.ts +29 -0
- package/dist/shared/primitives/splitter/flags.ts +4 -0
- package/dist/shared/primitives/splitter/layout.ts +153 -0
- package/dist/shared/primitives/splitter/pivot.ts +10 -0
- package/dist/shared/primitives/splitter/rects.ts +24 -0
- package/dist/shared/primitives/splitter/registry.ts +231 -0
- package/dist/shared/primitives/splitter/resizePanel.ts +30 -0
- package/dist/shared/primitives/splitter/stackingOrder.ts +88 -0
- package/dist/shared/primitives/splitter/storage.ts +95 -0
- package/dist/shared/primitives/splitter/style.ts +95 -0
- package/dist/shared/primitives/splitter/types.ts +48 -0
- package/dist/shared/primitives/splitter/units.ts +123 -0
- package/dist/shared/primitives/splitter/validation.ts +55 -0
- package/dist/shared/primitives/stepper/LICENSE +21 -0
- package/dist/shared/primitives/stepper/index.ts +58 -0
- package/dist/shared/primitives/tabs/LICENSE +21 -0
- package/dist/shared/primitives/tabs/index.ts +18 -0
- package/dist/shared/primitives/toggle/LICENSE +21 -0
- package/dist/shared/primitives/toggle/index.ts +5 -0
- package/dist/shared/primitives/value/LICENSE +21 -0
- package/dist/shared/primitives/value/index.ts +80 -0
- package/dist/shared/primitives/visually-hidden/LICENSE +21 -0
- package/dist/shared/primitives/visually-hidden/index.ts +25 -0
- package/dist/shared/styles/density.css +4 -0
- package/dist/shared/styles/float-button.css +20 -6
- package/dist/shared/styles/line-clamp.css +98 -0
- package/dist/shared/styles/tokens.css +1 -0
- package/dist/shared/styles/typography.css +18 -0
- package/dist/shared/variants/button.ts +2 -0
- package/dist/shared/variants/command-palette.ts +4 -0
- package/dist/shared/variants/line-clamp.ts +13 -0
- package/dist/shared/variants/panel.ts +5 -0
- package/dist/shared/variants/tag.ts +1 -0
- package/dist/types/shared/src/behavior/anchor-follow.d.ts.map +1 -1
- package/dist/types/shared/src/lib/command-palette/match.d.ts +5 -0
- package/dist/types/shared/src/lib/command-palette/match.d.ts.map +1 -1
- package/dist/types/shared/src/lib/float-button.d.ts +15 -0
- package/dist/types/shared/src/lib/float-button.d.ts.map +1 -0
- package/dist/types/shared/src/lib/line-clamp.d.ts +6 -0
- package/dist/types/shared/src/lib/line-clamp.d.ts.map +1 -0
- package/dist/types/shared/src/lib/scroll-restore.d.ts +14 -0
- package/dist/types/shared/src/lib/scroll-restore.d.ts.map +1 -1
- package/dist/types/shared/src/locale/en-US.d.ts.map +1 -1
- package/dist/types/shared/src/locale/index.d.ts +1 -0
- package/dist/types/shared/src/locale/index.d.ts.map +1 -1
- package/dist/types/shared/src/locale/ja-JP.d.ts +3 -0
- package/dist/types/shared/src/locale/ja-JP.d.ts.map +1 -0
- package/dist/types/shared/src/locale/types.d.ts +4 -0
- package/dist/types/shared/src/locale/types.d.ts.map +1 -1
- package/dist/types/shared/src/locale/zh-CN.d.ts.map +1 -1
- package/dist/types/shared/src/primitives/accordion/index.d.ts +9 -0
- package/dist/types/shared/src/primitives/accordion/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/arrow-navigation/index.d.ts +12 -0
- package/dist/types/shared/src/primitives/arrow-navigation/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/checkbox/index.d.ts +6 -0
- package/dist/types/shared/src/primitives/checkbox/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/collapsible/index.d.ts +12 -0
- package/dist/types/shared/src/primitives/collapsible/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/collection/index.d.ts +6 -0
- package/dist/types/shared/src/primitives/collection/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/dismissable-layer/index.d.ts +41 -0
- package/dist/types/shared/src/primitives/dismissable-layer/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/focus-scope/index.d.ts +51 -0
- package/dist/types/shared/src/primitives/focus-scope/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/label/index.d.ts +2 -0
- package/dist/types/shared/src/primitives/label/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/pagination/index.d.ts +17 -0
- package/dist/types/shared/src/primitives/pagination/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/pin-input/index.d.ts +31 -0
- package/dist/types/shared/src/primitives/pin-input/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/presence/index.d.ts +14 -0
- package/dist/types/shared/src/primitives/presence/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/progress/index.d.ts +10 -0
- package/dist/types/shared/src/primitives/progress/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/radio-group/index.d.ts +12 -0
- package/dist/types/shared/src/primitives/radio-group/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/rating/index.d.ts +8 -0
- package/dist/types/shared/src/primitives/rating/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/roving-focus/index.d.ts +13 -0
- package/dist/types/shared/src/primitives/roving-focus/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/separator/index.d.ts +10 -0
- package/dist/types/shared/src/primitives/separator/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/size/index.d.ts +7 -0
- package/dist/types/shared/src/primitives/size/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/slider/index.d.ts +60 -0
- package/dist/types/shared/src/primitives/slider/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/arrays.d.ts +2 -0
- package/dist/types/shared/src/primitives/splitter/arrays.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/assert.d.ts +2 -0
- package/dist/types/shared/src/primitives/splitter/assert.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/calculate.d.ts +15 -0
- package/dist/types/shared/src/primitives/splitter/calculate.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/callPanelCallbacks.d.ts +3 -0
- package/dist/types/shared/src/primitives/splitter/callPanelCallbacks.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/compare.d.ts +3 -0
- package/dist/types/shared/src/primitives/splitter/compare.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/constants.d.ts +2 -0
- package/dist/types/shared/src/primitives/splitter/constants.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/debounce.d.ts +2 -0
- package/dist/types/shared/src/primitives/splitter/debounce.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/dom.d.ts +8 -0
- package/dist/types/shared/src/primitives/splitter/dom.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/events.d.ts +10 -0
- package/dist/types/shared/src/primitives/splitter/events.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/flags.d.ts +5 -0
- package/dist/types/shared/src/primitives/splitter/flags.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/layout.d.ts +10 -0
- package/dist/types/shared/src/primitives/splitter/layout.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/pivot.d.ts +2 -0
- package/dist/types/shared/src/primitives/splitter/pivot.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/rects.d.ts +8 -0
- package/dist/types/shared/src/primitives/splitter/rects.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/registry.d.ts +5 -0
- package/dist/types/shared/src/primitives/splitter/registry.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/resizePanel.d.ts +7 -0
- package/dist/types/shared/src/primitives/splitter/resizePanel.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/stackingOrder.d.ts +2 -0
- package/dist/types/shared/src/primitives/splitter/stackingOrder.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/storage.d.ts +9 -0
- package/dist/types/shared/src/primitives/splitter/storage.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/style.d.ts +21 -0
- package/dist/types/shared/src/primitives/splitter/style.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/types.d.ts +42 -0
- package/dist/types/shared/src/primitives/splitter/types.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/units.d.ts +13 -0
- package/dist/types/shared/src/primitives/splitter/units.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/splitter/validation.d.ts +6 -0
- package/dist/types/shared/src/primitives/splitter/validation.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/stepper/index.d.ts +21 -0
- package/dist/types/shared/src/primitives/stepper/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/tabs/index.d.ts +7 -0
- package/dist/types/shared/src/primitives/tabs/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/toggle/index.d.ts +3 -0
- package/dist/types/shared/src/primitives/toggle/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/value/index.d.ts +15 -0
- package/dist/types/shared/src/primitives/value/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/visually-hidden/index.d.ts +19 -0
- package/dist/types/shared/src/primitives/visually-hidden/index.d.ts.map +1 -0
- package/dist/types/shared/src/variants/button.d.ts +6 -0
- package/dist/types/shared/src/variants/button.d.ts.map +1 -1
- package/dist/types/shared/src/variants/command-palette.d.ts +1 -0
- package/dist/types/shared/src/variants/command-palette.d.ts.map +1 -1
- package/dist/types/shared/src/variants/line-clamp.d.ts +4 -0
- package/dist/types/shared/src/variants/line-clamp.d.ts.map +1 -0
- package/dist/types/shared/src/variants/panel.d.ts +13 -1
- package/dist/types/shared/src/variants/panel.d.ts.map +1 -1
- package/dist/types/shared/src/variants/tag.d.ts +3 -0
- package/dist/types/shared/src/variants/tag.d.ts.map +1 -1
- package/dist/types/shared/src/variants/toggle.d.ts +7 -0
- package/dist/types/shared/src/variants/toggle.d.ts.map +1 -1
- package/dist/types/vue/src/components/accordion/Accordion.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/app-shell/AppShell.vue.d.ts +2 -2
- package/dist/types/vue/src/components/app-shell/AppShell.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/breadcrumb/BreadcrumbItem.vue.d.ts +2 -2
- package/dist/types/vue/src/components/breadcrumb/BreadcrumbItem.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/button/Button.vue.d.ts +2 -2
- package/dist/types/vue/src/components/button/Button.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/card/Card.vue.d.ts +2 -2
- package/dist/types/vue/src/components/card/Card.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/carousel/composables/useCarousel.d.ts +1 -1
- package/dist/types/vue/src/components/chip/Chip.vue.d.ts +1 -1
- package/dist/types/vue/src/components/chip/Chip.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/chip/composables/useChipRoot.d.ts +2 -2
- package/dist/types/vue/src/components/chip/composables/useChipRoot.d.ts.map +1 -1
- package/dist/types/vue/src/components/close-button/CloseButton.vue.d.ts +1 -1
- package/dist/types/vue/src/components/collapsible/Collapsible.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/command-palette/CommandPalette.vue.d.ts +40 -34
- package/dist/types/vue/src/components/command-palette/CommandPalette.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/command-palette/CommandPaletteInput.vue.d.ts +8 -0
- package/dist/types/vue/src/components/command-palette/CommandPaletteInput.vue.d.ts.map +1 -0
- package/dist/types/vue/src/components/command-palette/CommandPaletteItem.vue.d.ts +21 -7
- package/dist/types/vue/src/components/command-palette/CommandPaletteItem.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/command-palette/CommandPalettePanel.vue.d.ts +37 -31
- package/dist/types/vue/src/components/command-palette/CommandPalettePanel.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/command-palette/composables/useCommandItems.d.ts +6 -6
- package/dist/types/vue/src/components/command-palette/composables/useCommandItems.d.ts.map +1 -1
- package/dist/types/vue/src/components/command-palette/context.d.ts +11 -0
- package/dist/types/vue/src/components/command-palette/context.d.ts.map +1 -0
- package/dist/types/vue/src/components/command-palette/types.d.ts +16 -5
- package/dist/types/vue/src/components/command-palette/types.d.ts.map +1 -1
- package/dist/types/vue/src/components/command-palette/utils/match.d.ts +3 -3
- package/dist/types/vue/src/components/command-palette/utils/match.d.ts.map +1 -1
- package/dist/types/vue/src/components/copy-button/CopyButton.vue.d.ts +1 -1
- package/dist/types/vue/src/components/data-list/DataList.vue.d.ts +2 -2
- package/dist/types/vue/src/components/data-table/DataTable.vue.d.ts +2 -2
- package/dist/types/vue/src/components/description-list/DescriptionList.vue.d.ts +1 -0
- package/dist/types/vue/src/components/description-list/DescriptionList.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/dialog/Dialog.vue.d.ts +3 -0
- package/dist/types/vue/src/components/dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/drawer/Drawer.vue.d.ts +3 -0
- package/dist/types/vue/src/components/drawer/Drawer.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/float-button/FloatButton.vue.d.ts +1 -1
- package/dist/types/vue/src/components/float-button/FloatButton.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/float-button/types.d.ts +3 -2
- package/dist/types/vue/src/components/float-button/types.d.ts.map +1 -1
- package/dist/types/vue/src/components/form/Form.vue.d.ts +5 -0
- package/dist/types/vue/src/components/form/Form.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/form/scope.d.ts +4 -0
- package/dist/types/vue/src/components/form/scope.d.ts.map +1 -0
- package/dist/types/vue/src/components/heading/Heading.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/icon-button/IconButton.vue.d.ts +2 -2
- package/dist/types/vue/src/components/icon-button/IconButton.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/image/Image.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/indicator/Indicator.vue.d.ts +2 -2
- package/dist/types/vue/src/components/indicator/Indicator.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/line-clamp/LineClamp.vue.d.ts +28 -0
- package/dist/types/vue/src/components/line-clamp/LineClamp.vue.d.ts.map +1 -0
- package/dist/types/vue/src/components/line-clamp/line-clamp.variants.d.ts +2 -0
- package/dist/types/vue/src/components/line-clamp/line-clamp.variants.d.ts.map +1 -0
- package/dist/types/vue/src/components/link/Link.vue.d.ts +2 -2
- package/dist/types/vue/src/components/link/Link.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/multi-select/MultiSelect.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/nav-link/NavLink.vue.d.ts +9 -5
- package/dist/types/vue/src/components/nav-link/NavLink.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/nav-link/NavLinkChild.d.ts +27 -0
- package/dist/types/vue/src/components/nav-link/NavLinkChild.d.ts.map +1 -0
- package/dist/types/vue/src/components/navigation-menu/NavigationMenuLink.vue.d.ts +2 -2
- package/dist/types/vue/src/components/navigation-menu/NavigationMenuLink.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/pagination/PaginationControl.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/prev-next/PrevNextLink.vue.d.ts +2 -2
- package/dist/types/vue/src/components/prev-next/PrevNextLink.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/prose/Prose.vue.d.ts +2 -2
- package/dist/types/vue/src/components/prose/Prose.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/section/Section.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/segmented-control/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/sheet/Sheet.vue.d.ts +3 -0
- package/dist/types/vue/src/components/sheet/Sheet.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/sidebar/context.d.ts +2 -0
- package/dist/types/vue/src/components/sidebar/context.d.ts.map +1 -1
- package/dist/types/vue/src/components/slider/SliderHandle.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/split-button/SplitButton.vue.d.ts +1 -1
- package/dist/types/vue/src/components/split-button/types.d.ts +1 -1
- package/dist/types/vue/src/components/split-button/types.d.ts.map +1 -1
- package/dist/types/vue/src/components/tag/Tag.vue.d.ts +2 -2
- package/dist/types/vue/src/components/tag/Tag.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/text/Text.vue.d.ts +2 -2
- package/dist/types/vue/src/components/text/Text.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/time/Time.vue.d.ts +2 -0
- package/dist/types/vue/src/components/time/Time.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/toast/Toaster.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/toggle/Toggle.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/toolbar/ToolbarControl.vue.d.ts +1 -1
- package/dist/types/vue/src/components/toolbar/ToolbarLink.vue.d.ts +1 -1
- package/dist/types/vue/src/components/toolbar/ToolbarToggleGroup.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/toolbar/types.d.ts +1 -1
- package/dist/types/vue/src/components/toolbar/types.d.ts.map +1 -1
- package/dist/types/vue/src/components/virtual-list/composables/useVirtualList.d.ts +1 -1
- package/dist/types/vue/src/components/visually-hidden/VisuallyHidden.vue.d.ts +2 -2
- package/dist/types/vue/src/components/visually-hidden/VisuallyHidden.vue.d.ts.map +1 -1
- package/dist/types/vue/src/index.d.ts +6 -4
- package/dist/types/vue/src/index.d.ts.map +1 -1
- package/dist/types/vue/src/lib/useDirection.d.ts +2 -2
- package/dist/types/vue/src/lib/useDirection.d.ts.map +1 -1
- package/dist/types/vue/src/locale/index.d.ts +1 -1
- package/dist/types/vue/src/locale/index.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/accordion/AccordionContent.d.ts +40 -0
- package/dist/types/vue/src/primitives/accordion/AccordionContent.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/accordion/AccordionHeader.d.ts +33 -0
- package/dist/types/vue/src/primitives/accordion/AccordionHeader.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/accordion/AccordionItem.d.ts +61 -0
- package/dist/types/vue/src/primitives/accordion/AccordionItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/accordion/AccordionRoot.d.ts +122 -0
- package/dist/types/vue/src/primitives/accordion/AccordionRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/accordion/AccordionTrigger.d.ts +30 -0
- package/dist/types/vue/src/primitives/accordion/AccordionTrigger.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/accordion/context.d.ts +27 -0
- package/dist/types/vue/src/primitives/accordion/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/accordion/index.d.ts +7 -0
- package/dist/types/vue/src/primitives/accordion/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/aspect-ratio/AspectRatio.d.ts +42 -0
- package/dist/types/vue/src/primitives/aspect-ratio/AspectRatio.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/aspect-ratio/index.d.ts +2 -0
- package/dist/types/vue/src/primitives/aspect-ratio/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/checkbox/CheckboxGroupRoot.d.ts +121 -0
- package/dist/types/vue/src/primitives/checkbox/CheckboxGroupRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/checkbox/CheckboxRoot.d.ts +127 -0
- package/dist/types/vue/src/primitives/checkbox/CheckboxRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/checkbox/context.d.ts +14 -0
- package/dist/types/vue/src/primitives/checkbox/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/checkbox/index.d.ts +4 -0
- package/dist/types/vue/src/primitives/checkbox/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/collapsible/CollapsibleContent.d.ts +45 -0
- package/dist/types/vue/src/primitives/collapsible/CollapsibleContent.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/collapsible/CollapsibleRoot.d.ts +81 -0
- package/dist/types/vue/src/primitives/collapsible/CollapsibleRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/collapsible/CollapsibleTrigger.d.ts +33 -0
- package/dist/types/vue/src/primitives/collapsible/CollapsibleTrigger.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/collapsible/context.d.ts +10 -0
- package/dist/types/vue/src/primitives/collapsible/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/collapsible/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/collapsible/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/collection/index.d.ts +28 -0
- package/dist/types/vue/src/primitives/collection/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/number-field/NumberFieldDecrement.vue.d.ts +2 -2
- package/dist/types/vue/src/primitives/number-field/NumberFieldDecrement.vue.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/number-field/NumberFieldIncrement.vue.d.ts +2 -2
- package/dist/types/vue/src/primitives/number-field/NumberFieldIncrement.vue.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/number-field/NumberFieldInput.vue.d.ts +2 -2
- package/dist/types/vue/src/primitives/number-field/NumberFieldInput.vue.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/number-field/NumberFieldRoot.vue.d.ts +2 -2
- package/dist/types/vue/src/primitives/number-field/NumberFieldRoot.vue.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/pagination/PaginationEdge.d.ts +111 -0
- package/dist/types/vue/src/primitives/pagination/PaginationEdge.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/pagination/PaginationList.d.ts +30 -0
- package/dist/types/vue/src/primitives/pagination/PaginationList.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/pagination/PaginationListItem.d.ts +42 -0
- package/dist/types/vue/src/primitives/pagination/PaginationListItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/pagination/PaginationRoot.d.ts +114 -0
- package/dist/types/vue/src/primitives/pagination/PaginationRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/pagination/context.d.ts +11 -0
- package/dist/types/vue/src/primitives/pagination/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/pagination/index.d.ts +6 -0
- package/dist/types/vue/src/primitives/pagination/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/pin-input/PinInputInput.d.ts +52 -0
- package/dist/types/vue/src/primitives/pin-input/PinInputInput.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/pin-input/PinInputRoot.d.ts +149 -0
- package/dist/types/vue/src/primitives/pin-input/PinInputRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/pin-input/context.d.ts +20 -0
- package/dist/types/vue/src/primitives/pin-input/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/pin-input/index.d.ts +4 -0
- package/dist/types/vue/src/primitives/pin-input/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/presence/Presence.d.ts +31 -0
- package/dist/types/vue/src/primitives/presence/Presence.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/presence/index.d.ts +3 -0
- package/dist/types/vue/src/primitives/presence/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/presence/usePresence.d.ts +5 -0
- package/dist/types/vue/src/primitives/presence/usePresence.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/primitive/Primitive.d.ts +31 -0
- package/dist/types/vue/src/primitives/primitive/Primitive.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/primitive/Slot.d.ts +6 -0
- package/dist/types/vue/src/primitives/primitive/Slot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/primitive/index.d.ts +3 -0
- package/dist/types/vue/src/primitives/primitive/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/progress/ProgressIndicator.vue.d.ts +14 -0
- package/dist/types/vue/src/primitives/progress/ProgressIndicator.vue.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/progress/ProgressRoot.vue.d.ts +33 -0
- package/dist/types/vue/src/primitives/progress/ProgressRoot.vue.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/progress/context.d.ts +9 -0
- package/dist/types/vue/src/primitives/progress/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/progress/index.d.ts +4 -0
- package/dist/types/vue/src/primitives/progress/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/radio-group/Radio.d.ts +88 -0
- package/dist/types/vue/src/primitives/radio-group/Radio.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/radio-group/RadioGroupIndicator.d.ts +43 -0
- package/dist/types/vue/src/primitives/radio-group/RadioGroupIndicator.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/radio-group/RadioGroupItem.d.ts +85 -0
- package/dist/types/vue/src/primitives/radio-group/RadioGroupItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/radio-group/RadioGroupRoot.d.ts +119 -0
- package/dist/types/vue/src/primitives/radio-group/RadioGroupRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/radio-group/context.d.ts +19 -0
- package/dist/types/vue/src/primitives/radio-group/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/radio-group/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/radio-group/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/rating/RatingItem.d.ts +42 -0
- package/dist/types/vue/src/primitives/rating/RatingItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/rating/RatingItemIndicator.d.ts +39 -0
- package/dist/types/vue/src/primitives/rating/RatingItemIndicator.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/rating/RatingRoot.d.ts +159 -0
- package/dist/types/vue/src/primitives/rating/RatingRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/rating/context.d.ts +16 -0
- package/dist/types/vue/src/primitives/rating/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/rating/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/rating/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/roving-focus/RovingFocusGroup.vue.d.ts +38 -0
- package/dist/types/vue/src/primitives/roving-focus/RovingFocusGroup.vue.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/roving-focus/RovingFocusItem.vue.d.ts +21 -0
- package/dist/types/vue/src/primitives/roving-focus/RovingFocusItem.vue.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/roving-focus/context.d.ts +15 -0
- package/dist/types/vue/src/primitives/roving-focus/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/roving-focus/index.d.ts +4 -0
- package/dist/types/vue/src/primitives/roving-focus/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/separator/Separator.vue.d.ts +19 -0
- package/dist/types/vue/src/primitives/separator/Separator.vue.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/separator/index.d.ts +2 -0
- package/dist/types/vue/src/primitives/separator/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/slider/SliderImpl.d.ts +36 -0
- package/dist/types/vue/src/primitives/slider/SliderImpl.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/slider/SliderOrientation.d.ts +91 -0
- package/dist/types/vue/src/primitives/slider/SliderOrientation.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/slider/SliderRoot.d.ts +187 -0
- package/dist/types/vue/src/primitives/slider/SliderRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/slider/SliderThumb.d.ts +33 -0
- package/dist/types/vue/src/primitives/slider/SliderThumb.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/slider/SliderTrack.d.ts +33 -0
- package/dist/types/vue/src/primitives/slider/SliderTrack.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/slider/context.d.ts +22 -0
- package/dist/types/vue/src/primitives/slider/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/slider/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/slider/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/splitter/SplitterGroup.d.ts +90 -0
- package/dist/types/vue/src/primitives/splitter/SplitterGroup.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/splitter/SplitterPanel.d.ts +113 -0
- package/dist/types/vue/src/primitives/splitter/SplitterPanel.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/splitter/SplitterResizeHandle.d.ts +85 -0
- package/dist/types/vue/src/primitives/splitter/SplitterResizeHandle.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/splitter/behaviors.d.ts +22 -0
- package/dist/types/vue/src/primitives/splitter/behaviors.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/splitter/context.d.ts +23 -0
- package/dist/types/vue/src/primitives/splitter/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/splitter/index.d.ts +6 -0
- package/dist/types/vue/src/primitives/splitter/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/stepper/StepperItem.d.ts +63 -0
- package/dist/types/vue/src/primitives/stepper/StepperItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/stepper/StepperParts.d.ts +130 -0
- package/dist/types/vue/src/primitives/stepper/StepperParts.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/stepper/StepperRoot.d.ts +91 -0
- package/dist/types/vue/src/primitives/stepper/StepperRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/stepper/StepperTrigger.d.ts +33 -0
- package/dist/types/vue/src/primitives/stepper/StepperTrigger.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/stepper/context.d.ts +23 -0
- package/dist/types/vue/src/primitives/stepper/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/stepper/index.d.ts +6 -0
- package/dist/types/vue/src/primitives/stepper/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/switch/SwitchRoot.d.ts +133 -0
- package/dist/types/vue/src/primitives/switch/SwitchRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/switch/index.d.ts +2 -0
- package/dist/types/vue/src/primitives/switch/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tabs/TabsContent.d.ts +50 -0
- package/dist/types/vue/src/primitives/tabs/TabsContent.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tabs/TabsList.d.ts +42 -0
- package/dist/types/vue/src/primitives/tabs/TabsList.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tabs/TabsRoot.d.ts +101 -0
- package/dist/types/vue/src/primitives/tabs/TabsRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tabs/TabsTrigger.d.ts +55 -0
- package/dist/types/vue/src/primitives/tabs/TabsTrigger.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tabs/context.d.ts +19 -0
- package/dist/types/vue/src/primitives/tabs/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tabs/index.d.ts +6 -0
- package/dist/types/vue/src/primitives/tabs/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toggle/Toggle.d.ts +91 -0
- package/dist/types/vue/src/primitives/toggle/Toggle.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toggle/index.d.ts +2 -0
- package/dist/types/vue/src/primitives/toggle/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toggle-group/ToggleGroupItem.d.ts +53 -0
- package/dist/types/vue/src/primitives/toggle-group/ToggleGroupItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toggle-group/ToggleGroupRoot.d.ts +141 -0
- package/dist/types/vue/src/primitives/toggle-group/ToggleGroupRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toggle-group/context.d.ts +16 -0
- package/dist/types/vue/src/primitives/toggle-group/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toggle-group/index.d.ts +4 -0
- package/dist/types/vue/src/primitives/toggle-group/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toolbar/ToolbarButton.d.ts +43 -0
- package/dist/types/vue/src/primitives/toolbar/ToolbarButton.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toolbar/ToolbarRoot.d.ts +63 -0
- package/dist/types/vue/src/primitives/toolbar/ToolbarRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toolbar/ToolbarToggleGroup.d.ts +135 -0
- package/dist/types/vue/src/primitives/toolbar/ToolbarToggleGroup.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toolbar/ToolbarToggleItem.d.ts +50 -0
- package/dist/types/vue/src/primitives/toolbar/ToolbarToggleItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toolbar/context.d.ts +9 -0
- package/dist/types/vue/src/primitives/toolbar/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toolbar/index.d.ts +6 -0
- package/dist/types/vue/src/primitives/toolbar/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/config.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/config.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/createContext.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/createContext.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/renderSlotFragments.d.ts +3 -0
- package/dist/types/vue/src/primitives/utils/renderSlotFragments.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/types.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/types.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useComposing.d.ts +8 -0
- package/dist/types/vue/src/primitives/utils/useComposing.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useDirection.d.ts +4 -0
- package/dist/types/vue/src/primitives/utils/useDirection.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useEmitAsProps.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/useEmitAsProps.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useFormControl.d.ts +4 -0
- package/dist/types/vue/src/primitives/utils/useFormControl.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useForwardExpose.d.ts +7 -0
- package/dist/types/vue/src/primitives/utils/useForwardExpose.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useForwardProps.d.ts +3 -0
- package/dist/types/vue/src/primitives/utils/useForwardProps.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useForwardPropsEmits.d.ts +3 -0
- package/dist/types/vue/src/primitives/utils/useForwardPropsEmits.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useForwardScopeId.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/useForwardScopeId.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useId.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/useId.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useNonce.d.ts +3 -0
- package/dist/types/vue/src/primitives/utils/useNonce.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useSingleOrMultipleValue.d.ts +12 -0
- package/dist/types/vue/src/primitives/utils/useSingleOrMultipleValue.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useSize.d.ts +7 -0
- package/dist/types/vue/src/primitives/utils/useSize.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/visually-hidden/VisuallyHidden.vue.d.ts +19 -0
- package/dist/types/vue/src/primitives/visually-hidden/VisuallyHidden.vue.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInput.d.ts +2 -2
- package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInput.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInputBubble.vue.d.ts +1 -1
- package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInputBubble.vue.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/visually-hidden/index.d.ts +3 -0
- package/dist/types/vue/src/primitives/visually-hidden/index.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/accordion/Accordion.vue +2 -1
- package/src/components/accordion/AccordionContent.vue +1 -1
- package/src/components/accordion/AccordionItem.vue +1 -1
- package/src/components/accordion/AccordionTrigger.vue +3 -3
- package/src/components/app-shell/AppShell.vue +54 -4
- package/src/components/aspect-ratio/AspectRatio.vue +1 -1
- package/src/components/breadcrumb/BreadcrumbItem.vue +2 -1
- package/src/components/button/Button.vue +2 -1
- package/src/components/card/Card.vue +2 -1
- package/src/components/checkbox/Checkbox.vue +1 -1
- package/src/components/checkbox-group/CheckboxGroup.vue +1 -1
- package/src/components/chip/Chip.vue +2 -1
- package/src/components/chip/composables/useChipRoot.ts +1 -1
- package/src/components/collapsible/Collapsible.vue +2 -1
- package/src/components/collapsible/CollapsibleContent.vue +1 -1
- package/src/components/collapsible/CollapsibleTrigger.vue +2 -2
- package/src/components/command-palette/CommandPalette.vue +53 -16
- package/src/components/command-palette/CommandPaletteInput.vue +32 -0
- package/src/components/command-palette/CommandPaletteItem.vue +7 -5
- package/src/components/command-palette/CommandPalettePanel.vue +95 -34
- package/src/components/command-palette/composables/useCommandItems.ts +16 -14
- package/src/components/command-palette/context.ts +28 -0
- package/src/components/command-palette/types.ts +21 -5
- package/src/components/command-palette/utils/match.ts +6 -3
- package/src/components/description-list/DescriptionList.vue +8 -2
- package/src/components/dialog/Dialog.vue +13 -8
- package/src/components/divider/Divider.vue +1 -1
- package/src/components/drawer/Drawer.vue +13 -8
- package/src/components/float-button/FloatButton.vue +4 -11
- package/src/components/float-button/types.ts +3 -2
- package/src/components/form/Form.vue +14 -1
- package/src/components/form/scope.ts +39 -0
- package/src/components/heading/Heading.vue +1 -1
- package/src/components/icon-button/IconButton.vue +2 -1
- package/src/components/image/Image.vue +1 -1
- package/src/components/indicator/Indicator.vue +2 -1
- package/src/components/input/InputAction.vue +1 -1
- package/src/components/line-clamp/LineClamp.vue +105 -0
- package/src/components/line-clamp/line-clamp.variants.ts +1 -0
- package/src/components/link/Link.vue +2 -1
- package/src/components/multi-select/MultiSelect.vue +4 -1
- package/src/components/nav-link/NavLink.vue +33 -4
- package/src/components/nav-link/NavLinkChild.ts +57 -0
- package/src/components/navigation-menu/NavigationMenuLink.vue +1 -1
- package/src/components/pagination/Pagination.vue +1 -1
- package/src/components/pagination/PaginationContent.vue +1 -1
- package/src/components/pagination/PaginationControl.vue +6 -1
- package/src/components/pagination/PaginationPage.vue +1 -1
- package/src/components/panel/Panel.vue +1 -1
- package/src/components/pin-input/PinInput.vue +1 -1
- package/src/components/prev-next/PrevNextLink.vue +2 -1
- package/src/components/progress/Progress.vue +1 -1
- package/src/components/prose/Prose.vue +2 -1
- package/src/components/radio-group/RadioGroup.vue +1 -1
- package/src/components/range-slider/RangeSlider.vue +1 -1
- package/src/components/rating/Rating.vue +1 -1
- package/src/components/ring-progress/RingProgress.vue +1 -1
- package/src/components/section/Section.vue +13 -2
- package/src/components/segmented-control/SegmentedControl.vue +2 -1
- package/src/components/sheet/Sheet.vue +14 -10
- package/src/components/sidebar/Sidebar.vue +2 -1
- package/src/components/sidebar/context.ts +9 -0
- package/src/components/slider/Slider.vue +1 -1
- package/src/components/slider/SliderHandle.vue +2 -1
- package/src/components/split-button/types.ts +1 -1
- package/src/components/splitter/Splitter.vue +1 -1
- package/src/components/splitter/SplitterHandle.vue +1 -1
- package/src/components/splitter/SplitterPanel.vue +1 -1
- package/src/components/statistic/Statistic.vue +2 -2
- package/src/components/stepper/Stepper.vue +1 -1
- package/src/components/stepper/StepperStep.vue +1 -1
- package/src/components/switch/Switch.vue +1 -1
- package/src/components/tabs/Tabs.vue +1 -1
- package/src/components/tabs/TabsContent.vue +1 -1
- package/src/components/tabs/TabsList.vue +1 -1
- package/src/components/tabs/TabsTrigger.vue +1 -1
- package/src/components/tag/Tag.vue +2 -1
- package/src/components/text/Text.vue +2 -1
- package/src/components/time/Time.vue +22 -5
- package/src/components/toast/Toaster.vue +1 -0
- package/src/components/toggle/Toggle.vue +2 -1
- package/src/components/toolbar/Toolbar.vue +1 -1
- package/src/components/toolbar/ToolbarButton.vue +1 -1
- package/src/components/toolbar/ToolbarLink.vue +1 -1
- package/src/components/toolbar/ToolbarSeparator.vue +1 -1
- package/src/components/toolbar/ToolbarToggleGroup.vue +2 -1
- package/src/components/toolbar/ToolbarToggleItem.vue +1 -1
- package/src/components/toolbar/types.ts +1 -1
- package/src/components/visually-hidden/VisuallyHidden.vue +4 -18
- package/src/index.ts +15 -2
- package/src/lib/useDirection.ts +2 -1
- package/src/locale/index.ts +1 -1
- package/src/primitives/accordion/AccordionContent.ts +47 -0
- package/src/primitives/accordion/AccordionHeader.ts +35 -0
- package/src/primitives/accordion/AccordionItem.ts +83 -0
- package/src/primitives/accordion/AccordionRoot.ts +75 -0
- package/src/primitives/accordion/AccordionTrigger.ts +55 -0
- package/src/primitives/accordion/LICENSE +44 -0
- package/src/primitives/accordion/context.ts +34 -0
- package/src/primitives/accordion/index.ts +11 -0
- package/src/primitives/aspect-ratio/AspectRatio.ts +47 -0
- package/src/primitives/aspect-ratio/LICENSE +44 -0
- package/src/primitives/aspect-ratio/index.ts +1 -0
- package/src/primitives/checkbox/CheckboxGroupRoot.ts +93 -0
- package/src/primitives/checkbox/CheckboxRoot.ts +170 -0
- package/src/primitives/checkbox/LICENSE +44 -0
- package/src/primitives/checkbox/context.ts +20 -0
- package/src/primitives/checkbox/index.ts +8 -0
- package/src/primitives/collapsible/CollapsibleContent.ts +124 -0
- package/src/primitives/collapsible/CollapsibleRoot.ts +63 -0
- package/src/primitives/collapsible/CollapsibleTrigger.ts +43 -0
- package/src/primitives/collapsible/LICENSE +44 -0
- package/src/primitives/collapsible/context.ts +13 -0
- package/src/primitives/collapsible/index.ts +12 -0
- package/src/primitives/collection/LICENSE +44 -0
- package/src/primitives/collection/index.ts +82 -0
- package/src/primitives/number-field/NumberFieldDecrement.vue +2 -3
- package/src/primitives/number-field/NumberFieldIncrement.vue +2 -3
- package/src/primitives/number-field/NumberFieldInput.vue +2 -3
- package/src/primitives/number-field/NumberFieldRoot.vue +3 -3
- package/src/primitives/pagination/LICENSE +44 -0
- package/src/primitives/pagination/PaginationEdge.ts +77 -0
- package/src/primitives/pagination/PaginationList.ts +46 -0
- package/src/primitives/pagination/PaginationListItem.ts +61 -0
- package/src/primitives/pagination/PaginationRoot.ts +73 -0
- package/src/primitives/pagination/context.ts +14 -0
- package/src/primitives/pagination/index.ts +15 -0
- package/src/primitives/pin-input/LICENSE +44 -0
- package/src/primitives/pin-input/PinInputInput.ts +218 -0
- package/src/primitives/pin-input/PinInputRoot.ts +136 -0
- package/src/primitives/pin-input/context.ts +24 -0
- package/src/primitives/pin-input/index.ts +3 -0
- package/src/primitives/presence/LICENSE +44 -0
- package/src/primitives/presence/Presence.ts +70 -0
- package/src/primitives/presence/index.ts +2 -0
- package/src/primitives/presence/usePresence.ts +28 -0
- package/src/primitives/primitive/LICENSE +44 -0
- package/src/primitives/primitive/Primitive.ts +45 -0
- package/src/primitives/primitive/Slot.ts +22 -0
- package/src/primitives/primitive/index.ts +2 -0
- package/src/primitives/progress/LICENSE +44 -0
- package/src/primitives/progress/ProgressIndicator.vue +24 -0
- package/src/primitives/progress/ProgressRoot.vue +95 -0
- package/src/primitives/progress/context.ts +12 -0
- package/src/primitives/progress/index.ts +7 -0
- package/src/primitives/radio-group/LICENSE +44 -0
- package/src/primitives/radio-group/Radio.ts +110 -0
- package/src/primitives/radio-group/RadioGroupIndicator.ts +54 -0
- package/src/primitives/radio-group/RadioGroupItem.ts +116 -0
- package/src/primitives/radio-group/RadioGroupRoot.ts +108 -0
- package/src/primitives/radio-group/context.ts +25 -0
- package/src/primitives/radio-group/index.ts +9 -0
- package/src/primitives/rating/LICENSE +44 -0
- package/src/primitives/rating/RatingItem.ts +35 -0
- package/src/primitives/rating/RatingItemIndicator.ts +87 -0
- package/src/primitives/rating/RatingRoot.ts +111 -0
- package/src/primitives/rating/context.ts +22 -0
- package/src/primitives/rating/index.ts +9 -0
- package/src/primitives/roving-focus/LICENSE +44 -0
- package/src/primitives/roving-focus/RovingFocusGroup.vue +125 -0
- package/src/primitives/roving-focus/RovingFocusItem.vue +99 -0
- package/src/primitives/roving-focus/context.ts +18 -0
- package/src/primitives/roving-focus/index.ts +7 -0
- package/src/primitives/separator/LICENSE +44 -0
- package/src/primitives/separator/Separator.vue +26 -0
- package/src/primitives/separator/index.ts +1 -0
- package/src/primitives/slider/LICENSE +44 -0
- package/src/primitives/slider/SliderImpl.ts +66 -0
- package/src/primitives/slider/SliderOrientation.ts +100 -0
- package/src/primitives/slider/SliderRoot.ts +214 -0
- package/src/primitives/slider/SliderThumb.ts +139 -0
- package/src/primitives/slider/SliderTrack.ts +37 -0
- package/src/primitives/slider/context.ts +31 -0
- package/src/primitives/slider/index.ts +8 -0
- package/src/primitives/splitter/LICENSE +44 -0
- package/src/primitives/splitter/SplitterGroup.ts +642 -0
- package/src/primitives/splitter/SplitterPanel.ts +170 -0
- package/src/primitives/splitter/SplitterResizeHandle.ts +170 -0
- package/src/primitives/splitter/behaviors.ts +173 -0
- package/src/primitives/splitter/context.ts +33 -0
- package/src/primitives/splitter/index.ts +13 -0
- package/src/primitives/stepper/LICENSE +44 -0
- package/src/primitives/stepper/StepperItem.ts +68 -0
- package/src/primitives/stepper/StepperParts.ts +103 -0
- package/src/primitives/stepper/StepperRoot.ts +171 -0
- package/src/primitives/stepper/StepperTrigger.ts +119 -0
- package/src/primitives/stepper/context.ts +29 -0
- package/src/primitives/stepper/index.ts +17 -0
- package/src/primitives/switch/LICENSE +44 -0
- package/src/primitives/switch/SwitchRoot.ts +151 -0
- package/src/primitives/switch/index.ts +6 -0
- package/src/primitives/tabs/LICENSE +44 -0
- package/src/primitives/tabs/TabsContent.ts +94 -0
- package/src/primitives/tabs/TabsList.ts +52 -0
- package/src/primitives/tabs/TabsRoot.ts +99 -0
- package/src/primitives/tabs/TabsTrigger.ts +97 -0
- package/src/primitives/tabs/context.ts +22 -0
- package/src/primitives/tabs/index.ts +5 -0
- package/src/primitives/toggle/LICENSE +44 -0
- package/src/primitives/toggle/Toggle.ts +116 -0
- package/src/primitives/toggle/index.ts +1 -0
- package/src/primitives/toggle-group/LICENSE +44 -0
- package/src/primitives/toggle-group/ToggleGroupItem.ts +80 -0
- package/src/primitives/toggle-group/ToggleGroupRoot.ts +113 -0
- package/src/primitives/toggle-group/context.ts +19 -0
- package/src/primitives/toggle-group/index.ts +7 -0
- package/src/primitives/toolbar/LICENSE +44 -0
- package/src/primitives/toolbar/ToolbarButton.ts +44 -0
- package/src/primitives/toolbar/ToolbarRoot.ts +53 -0
- package/src/primitives/toolbar/ToolbarToggleGroup.ts +69 -0
- package/src/primitives/toolbar/ToolbarToggleItem.ts +43 -0
- package/src/primitives/toolbar/context.ts +12 -0
- package/src/primitives/toolbar/index.ts +9 -0
- package/src/primitives/utils/config.ts +1 -0
- package/src/primitives/utils/createContext.ts +34 -0
- package/src/primitives/utils/renderSlotFragments.ts +8 -0
- package/src/primitives/utils/types.ts +1 -0
- package/src/primitives/utils/useComposing.ts +44 -0
- package/src/primitives/utils/useDirection.ts +9 -0
- package/src/primitives/utils/useEmitAsProps.ts +13 -0
- package/src/primitives/utils/useFormControl.ts +6 -0
- package/src/primitives/utils/useForwardExpose.ts +78 -0
- package/src/primitives/utils/useForwardProps.ts +29 -0
- package/src/primitives/utils/useForwardPropsEmits.ts +12 -0
- package/src/primitives/utils/useForwardScopeId.ts +6 -0
- package/src/primitives/utils/useId.ts +9 -0
- package/src/primitives/utils/useNonce.ts +7 -0
- package/src/primitives/utils/useSingleOrMultipleValue.ts +36 -0
- package/src/primitives/utils/useSize.ts +25 -0
- package/src/primitives/visually-hidden/VisuallyHidden.vue +30 -0
- package/src/primitives/visually-hidden/VisuallyHiddenInput.ts +1 -1
- package/src/primitives/visually-hidden/VisuallyHiddenInputBubble.vue +2 -2
- package/src/primitives/visually-hidden/index.ts +2 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
defineComponent,
|
|
4
|
+
h,
|
|
5
|
+
normalizeStyle,
|
|
6
|
+
onMounted,
|
|
7
|
+
onUnmounted,
|
|
8
|
+
renderSlot,
|
|
9
|
+
watch,
|
|
10
|
+
withCtx,
|
|
11
|
+
type PropType,
|
|
12
|
+
} from 'vue'
|
|
13
|
+
import { PRECISION } from '../../../../shared/src/primitives/splitter/constants'
|
|
14
|
+
import type { PanelData, SizeUnit } from '../../../../shared/src/primitives/splitter/types'
|
|
15
|
+
import { Primitive, type PrimitiveProps } from '../primitive'
|
|
16
|
+
import { useId } from '../utils/useId'
|
|
17
|
+
import { injectPanelGroupContext } from './context'
|
|
18
|
+
|
|
19
|
+
export interface SplitterPanelProps {
|
|
20
|
+
collapsedSize?: number
|
|
21
|
+
collapsible?: boolean
|
|
22
|
+
defaultSize?: number
|
|
23
|
+
id?: string
|
|
24
|
+
maxSize?: number
|
|
25
|
+
minSize?: number
|
|
26
|
+
order?: number
|
|
27
|
+
sizeUnit?: SizeUnit
|
|
28
|
+
asChild?: boolean
|
|
29
|
+
as?: PrimitiveProps['as']
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type SplitterPanelEmits = {
|
|
33
|
+
collapse: []
|
|
34
|
+
expand: []
|
|
35
|
+
resize: [size: number, prevSize: number | undefined]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const SplitterPanel = defineComponent({
|
|
39
|
+
name: 'SplitterPanel',
|
|
40
|
+
props: {
|
|
41
|
+
collapsedSize: { type: Number, required: false },
|
|
42
|
+
collapsible: { type: Boolean, required: false },
|
|
43
|
+
defaultSize: { type: Number, required: false },
|
|
44
|
+
id: { type: String, required: false },
|
|
45
|
+
maxSize: { type: Number, required: false },
|
|
46
|
+
minSize: { type: Number, required: false },
|
|
47
|
+
order: { type: Number, required: false },
|
|
48
|
+
sizeUnit: { type: String as PropType<SizeUnit>, required: false },
|
|
49
|
+
asChild: { type: Boolean, required: false },
|
|
50
|
+
as: { type: null as unknown as PropType<PrimitiveProps['as']>, required: false },
|
|
51
|
+
},
|
|
52
|
+
emits: ['collapse', 'expand', 'resize'],
|
|
53
|
+
setup(props, { emit, expose, slots }) {
|
|
54
|
+
const panelGroupContext = injectPanelGroupContext()
|
|
55
|
+
if (panelGroupContext === null)
|
|
56
|
+
throw new Error('SplitterPanel components must be rendered within a SplitterGroup container')
|
|
57
|
+
const {
|
|
58
|
+
collapsePanel,
|
|
59
|
+
expandPanel,
|
|
60
|
+
getPanelSize,
|
|
61
|
+
getPanelStyle,
|
|
62
|
+
isPanelCollapsed,
|
|
63
|
+
resizePanel,
|
|
64
|
+
groupId,
|
|
65
|
+
reevaluatePanelConstraints,
|
|
66
|
+
registerPanel,
|
|
67
|
+
unregisterPanel,
|
|
68
|
+
} = panelGroupContext
|
|
69
|
+
const panelId = useId(props.id, 'reka-splitter-panel')
|
|
70
|
+
|
|
71
|
+
const panelDataRef = computed<PanelData>(() => ({
|
|
72
|
+
callbacks: {
|
|
73
|
+
onCollapse: () => emit('collapse'),
|
|
74
|
+
onExpand: () => emit('expand'),
|
|
75
|
+
onResize: (...args: [number, number | undefined]) => emit('resize', ...args),
|
|
76
|
+
},
|
|
77
|
+
constraints: {
|
|
78
|
+
collapsedSize:
|
|
79
|
+
props.collapsedSize && Number.parseFloat(props.collapsedSize.toFixed(PRECISION)),
|
|
80
|
+
collapsible: props.collapsible,
|
|
81
|
+
defaultSize: props.defaultSize,
|
|
82
|
+
maxSize: props.maxSize,
|
|
83
|
+
minSize: props.minSize,
|
|
84
|
+
sizeUnit: props.sizeUnit ?? '%',
|
|
85
|
+
},
|
|
86
|
+
id: panelId,
|
|
87
|
+
idIsFromProps: props.id !== undefined,
|
|
88
|
+
order: props.order,
|
|
89
|
+
}))
|
|
90
|
+
|
|
91
|
+
watch(
|
|
92
|
+
() => panelDataRef.value.constraints,
|
|
93
|
+
(constraints, prevConstraints) => {
|
|
94
|
+
if (
|
|
95
|
+
prevConstraints.collapsedSize !== constraints.collapsedSize ||
|
|
96
|
+
prevConstraints.collapsible !== constraints.collapsible ||
|
|
97
|
+
prevConstraints.maxSize !== constraints.maxSize ||
|
|
98
|
+
prevConstraints.minSize !== constraints.minSize ||
|
|
99
|
+
prevConstraints.sizeUnit !== constraints.sizeUnit
|
|
100
|
+
)
|
|
101
|
+
reevaluatePanelConstraints(panelDataRef.value, prevConstraints)
|
|
102
|
+
},
|
|
103
|
+
{ deep: true },
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
onMounted(() => {
|
|
107
|
+
registerPanel(panelDataRef.value)
|
|
108
|
+
})
|
|
109
|
+
onUnmounted(() => {
|
|
110
|
+
unregisterPanel(panelDataRef.value)
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
const style = computed(() => getPanelStyle(panelDataRef.value, props.defaultSize))
|
|
114
|
+
const isCollapsed = computed(() => isPanelCollapsed(panelDataRef.value))
|
|
115
|
+
const isExpanded = computed(() => !isCollapsed.value)
|
|
116
|
+
|
|
117
|
+
function collapse() {
|
|
118
|
+
collapsePanel(panelDataRef.value)
|
|
119
|
+
}
|
|
120
|
+
function expand() {
|
|
121
|
+
expandPanel(panelDataRef.value)
|
|
122
|
+
}
|
|
123
|
+
function resize(size: number) {
|
|
124
|
+
resizePanel(panelDataRef.value, size)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
expose({
|
|
128
|
+
collapse,
|
|
129
|
+
expand,
|
|
130
|
+
getSize() {
|
|
131
|
+
return getPanelSize(panelDataRef.value)
|
|
132
|
+
},
|
|
133
|
+
resize,
|
|
134
|
+
isCollapsed,
|
|
135
|
+
isExpanded,
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
return () =>
|
|
139
|
+
h(
|
|
140
|
+
Primitive,
|
|
141
|
+
{
|
|
142
|
+
id: panelId,
|
|
143
|
+
style: normalizeStyle(style.value),
|
|
144
|
+
as: props.as,
|
|
145
|
+
'as-child': props.asChild,
|
|
146
|
+
'data-panel': '',
|
|
147
|
+
'data-panel-collapsible': props.collapsible || undefined,
|
|
148
|
+
'data-panel-group-id': groupId,
|
|
149
|
+
'data-panel-id': panelId,
|
|
150
|
+
'data-panel-size': Number.parseFloat(`${style.value.flexGrow}`).toFixed(1),
|
|
151
|
+
'data-state': props.collapsible
|
|
152
|
+
? isCollapsed.value
|
|
153
|
+
? 'collapsed'
|
|
154
|
+
: 'expanded'
|
|
155
|
+
: undefined,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
default: withCtx(() => [
|
|
159
|
+
renderSlot(slots, 'default', {
|
|
160
|
+
isCollapsed: isCollapsed.value,
|
|
161
|
+
isExpanded: isExpanded.value,
|
|
162
|
+
expand,
|
|
163
|
+
collapse,
|
|
164
|
+
resize,
|
|
165
|
+
}),
|
|
166
|
+
]),
|
|
167
|
+
},
|
|
168
|
+
)
|
|
169
|
+
},
|
|
170
|
+
})
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineComponent,
|
|
3
|
+
h,
|
|
4
|
+
ref,
|
|
5
|
+
renderSlot,
|
|
6
|
+
toRefs,
|
|
7
|
+
watch,
|
|
8
|
+
watchEffect,
|
|
9
|
+
withCtx,
|
|
10
|
+
type PropType,
|
|
11
|
+
} from 'vue'
|
|
12
|
+
import { assert } from '../../../../shared/src/primitives/splitter/assert'
|
|
13
|
+
import { registerResizeHandle } from '../../../../shared/src/primitives/splitter/registry'
|
|
14
|
+
import type {
|
|
15
|
+
PointerHitAreaMargins,
|
|
16
|
+
ResizeEvent,
|
|
17
|
+
ResizeHandler,
|
|
18
|
+
ResizeHandlerAction,
|
|
19
|
+
ResizeHandlerState,
|
|
20
|
+
} from '../../../../shared/src/primitives/splitter/types'
|
|
21
|
+
import { Primitive, type PrimitiveProps } from '../primitive'
|
|
22
|
+
import { useForwardExpose } from '../utils/useForwardExpose'
|
|
23
|
+
import { useId } from '../utils/useId'
|
|
24
|
+
import { useNonce } from '../utils/useNonce'
|
|
25
|
+
import { useWindowSplitterResizeHandlerBehavior } from './behaviors'
|
|
26
|
+
import { injectPanelGroupContext } from './context'
|
|
27
|
+
|
|
28
|
+
export interface SplitterResizeHandleProps {
|
|
29
|
+
id?: string
|
|
30
|
+
hitAreaMargins?: PointerHitAreaMargins
|
|
31
|
+
tabindex?: number
|
|
32
|
+
disabled?: boolean
|
|
33
|
+
nonce?: string
|
|
34
|
+
asChild?: boolean
|
|
35
|
+
as?: PrimitiveProps['as']
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type SplitterResizeHandleEmits = {
|
|
39
|
+
dragging: [isDragging: boolean]
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const isBrowser = typeof document !== 'undefined'
|
|
43
|
+
|
|
44
|
+
export const SplitterResizeHandle = defineComponent({
|
|
45
|
+
name: 'SplitterResizeHandle',
|
|
46
|
+
props: {
|
|
47
|
+
id: { type: String, required: false },
|
|
48
|
+
hitAreaMargins: { type: Object as PropType<PointerHitAreaMargins>, required: false },
|
|
49
|
+
tabindex: { type: Number, required: false, default: 0 },
|
|
50
|
+
disabled: { type: Boolean, required: false },
|
|
51
|
+
nonce: { type: String, required: false },
|
|
52
|
+
asChild: { type: Boolean, required: false },
|
|
53
|
+
as: { type: null as unknown as PropType<PrimitiveProps['as']>, required: false },
|
|
54
|
+
},
|
|
55
|
+
emits: ['dragging'],
|
|
56
|
+
setup(props, { emit, slots }) {
|
|
57
|
+
const { forwardRef, currentElement } = useForwardExpose()
|
|
58
|
+
const { disabled } = toRefs(props)
|
|
59
|
+
const panelGroupContext = injectPanelGroupContext()
|
|
60
|
+
if (panelGroupContext === null)
|
|
61
|
+
throw new Error('PanelResizeHandle components must be rendered within a PanelGroup container')
|
|
62
|
+
const {
|
|
63
|
+
direction,
|
|
64
|
+
groupId,
|
|
65
|
+
registerResizeHandle: registerResizeHandleWithParentGroup,
|
|
66
|
+
startDragging,
|
|
67
|
+
stopDragging,
|
|
68
|
+
panelGroupElement,
|
|
69
|
+
} = panelGroupContext
|
|
70
|
+
const resizeHandleId = useId(props.id, 'reka-splitter-resize-handle')
|
|
71
|
+
const state = ref<ResizeHandlerState>('inactive')
|
|
72
|
+
const isFocused = ref(false)
|
|
73
|
+
const resizeHandler = ref<ResizeHandler | null>(null)
|
|
74
|
+
const { nonce: propNonce } = toRefs(props)
|
|
75
|
+
const nonce = useNonce(propNonce)
|
|
76
|
+
|
|
77
|
+
watch(
|
|
78
|
+
disabled,
|
|
79
|
+
() => {
|
|
80
|
+
if (!isBrowser) return
|
|
81
|
+
if (disabled.value) resizeHandler.value = null
|
|
82
|
+
else resizeHandler.value = registerResizeHandleWithParentGroup(resizeHandleId)
|
|
83
|
+
},
|
|
84
|
+
{ immediate: true },
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
watchEffect(onCleanup => {
|
|
88
|
+
if (disabled.value || resizeHandler.value === null) return
|
|
89
|
+
const element = currentElement.value
|
|
90
|
+
if (!element) return
|
|
91
|
+
assert(element)
|
|
92
|
+
const setResizeHandlerState = (
|
|
93
|
+
action: ResizeHandlerAction,
|
|
94
|
+
isActive: boolean,
|
|
95
|
+
event: ResizeEvent,
|
|
96
|
+
) => {
|
|
97
|
+
if (!isActive) {
|
|
98
|
+
state.value = 'inactive'
|
|
99
|
+
return
|
|
100
|
+
}
|
|
101
|
+
switch (action) {
|
|
102
|
+
case 'down':
|
|
103
|
+
state.value = 'drag'
|
|
104
|
+
startDragging(resizeHandleId, event)
|
|
105
|
+
emit('dragging', true)
|
|
106
|
+
break
|
|
107
|
+
case 'move':
|
|
108
|
+
if (state.value !== 'drag') state.value = 'hover'
|
|
109
|
+
resizeHandler.value?.(event)
|
|
110
|
+
break
|
|
111
|
+
case 'up':
|
|
112
|
+
state.value = 'hover'
|
|
113
|
+
stopDragging()
|
|
114
|
+
emit('dragging', false)
|
|
115
|
+
break
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
onCleanup(
|
|
119
|
+
registerResizeHandle(
|
|
120
|
+
resizeHandleId,
|
|
121
|
+
element,
|
|
122
|
+
() => direction.value,
|
|
123
|
+
{
|
|
124
|
+
coarse: props.hitAreaMargins?.coarse ?? 15,
|
|
125
|
+
fine: props.hitAreaMargins?.fine ?? 5,
|
|
126
|
+
},
|
|
127
|
+
() => nonce.value,
|
|
128
|
+
setResizeHandlerState,
|
|
129
|
+
),
|
|
130
|
+
)
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
useWindowSplitterResizeHandlerBehavior({
|
|
134
|
+
disabled,
|
|
135
|
+
resizeHandler,
|
|
136
|
+
handleId: resizeHandleId,
|
|
137
|
+
panelGroupElement,
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
const onBlur = () => (isFocused.value = false)
|
|
141
|
+
const onFocus = () => (isFocused.value = false)
|
|
142
|
+
|
|
143
|
+
return () =>
|
|
144
|
+
h(
|
|
145
|
+
Primitive,
|
|
146
|
+
{
|
|
147
|
+
id: resizeHandleId,
|
|
148
|
+
ref: forwardRef,
|
|
149
|
+
style: { touchAction: 'none', userSelect: 'none' },
|
|
150
|
+
as: props.as,
|
|
151
|
+
'as-child': props.asChild,
|
|
152
|
+
role: 'separator',
|
|
153
|
+
'data-resize-handle': '',
|
|
154
|
+
tabindex: props.tabindex,
|
|
155
|
+
'data-state': state.value,
|
|
156
|
+
'data-disabled': disabled.value ? '' : undefined,
|
|
157
|
+
'data-orientation': direction.value,
|
|
158
|
+
'data-panel-group-id': groupId,
|
|
159
|
+
'data-resize-handle-active':
|
|
160
|
+
state.value === 'drag' ? 'pointer' : isFocused.value ? 'keyboard' : undefined,
|
|
161
|
+
'data-resize-handle-state': state.value,
|
|
162
|
+
'data-panel-resize-handle-enabled': !disabled.value,
|
|
163
|
+
'data-panel-resize-handle-id': resizeHandleId,
|
|
164
|
+
onBlur,
|
|
165
|
+
onFocus,
|
|
166
|
+
},
|
|
167
|
+
{ default: withCtx(() => [renderSlot(slots, 'default')]) },
|
|
168
|
+
)
|
|
169
|
+
},
|
|
170
|
+
})
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { watchEffect, type Ref } from 'vue'
|
|
2
|
+
import { assert } from '../../../../shared/src/primitives/splitter/assert'
|
|
3
|
+
import { calculateAriaValues } from '../../../../shared/src/primitives/splitter/calculate'
|
|
4
|
+
import { fuzzyNumbersEqual } from '../../../../shared/src/primitives/splitter/compare'
|
|
5
|
+
import {
|
|
6
|
+
getPanelGroupElement,
|
|
7
|
+
getResizeHandleElement,
|
|
8
|
+
getResizeHandleElementIndex,
|
|
9
|
+
getResizeHandleElementsForGroup,
|
|
10
|
+
getResizeHandlePanelIds,
|
|
11
|
+
} from '../../../../shared/src/primitives/splitter/dom'
|
|
12
|
+
import { adjustLayoutByDelta } from '../../../../shared/src/primitives/splitter/layout'
|
|
13
|
+
import { determinePivotIndices } from '../../../../shared/src/primitives/splitter/pivot'
|
|
14
|
+
import type { PanelData, ResizeHandler } from '../../../../shared/src/primitives/splitter/types'
|
|
15
|
+
|
|
16
|
+
export interface EagerValues {
|
|
17
|
+
layout: number[]
|
|
18
|
+
panelDataArray: PanelData[]
|
|
19
|
+
panelDataArrayChanged: boolean
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function useWindowSplitterPanelGroupBehavior({
|
|
23
|
+
eagerValuesRef,
|
|
24
|
+
groupId,
|
|
25
|
+
layout,
|
|
26
|
+
panelGroupElement,
|
|
27
|
+
setLayout,
|
|
28
|
+
getPanelDataWithPercentConstraints,
|
|
29
|
+
}: {
|
|
30
|
+
eagerValuesRef: Ref<EagerValues>
|
|
31
|
+
groupId: string
|
|
32
|
+
layout: Ref<number[]>
|
|
33
|
+
panelGroupElement: Ref<ParentNode | null | undefined>
|
|
34
|
+
setLayout: (value: number[]) => void
|
|
35
|
+
getPanelDataWithPercentConstraints: () => PanelData[] | null
|
|
36
|
+
}) {
|
|
37
|
+
watchEffect(onCleanup => {
|
|
38
|
+
const groupElement = panelGroupElement.value
|
|
39
|
+
if (!groupElement) return
|
|
40
|
+
const panels = getPanelDataWithPercentConstraints()
|
|
41
|
+
if (!panels) return
|
|
42
|
+
const handles = getResizeHandleElementsForGroup(groupId, groupElement)
|
|
43
|
+
for (let index = 0; index < panels.length - 1; index++) {
|
|
44
|
+
const { valueMax, valueMin, valueNow } = calculateAriaValues({
|
|
45
|
+
layout: layout.value,
|
|
46
|
+
panelsArray: panels,
|
|
47
|
+
pivotIndices: [index, index + 1],
|
|
48
|
+
})
|
|
49
|
+
const handle = handles[index]
|
|
50
|
+
if (handle != null) {
|
|
51
|
+
const panelData = panels[index]
|
|
52
|
+
assert(panelData)
|
|
53
|
+
handle.setAttribute('aria-controls', panelData.id)
|
|
54
|
+
handle.setAttribute('aria-valuemax', `${Math.round(valueMax)}`)
|
|
55
|
+
handle.setAttribute('aria-valuemin', `${Math.round(valueMin)}`)
|
|
56
|
+
handle.setAttribute('aria-valuenow', valueNow != null ? `${Math.round(valueNow)}` : '')
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
onCleanup(() => {
|
|
60
|
+
handles.forEach(handle => {
|
|
61
|
+
handle.removeAttribute('aria-controls')
|
|
62
|
+
handle.removeAttribute('aria-valuemax')
|
|
63
|
+
handle.removeAttribute('aria-valuemin')
|
|
64
|
+
handle.removeAttribute('aria-valuenow')
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
watchEffect(onCleanup => {
|
|
70
|
+
const groupElement = panelGroupElement.value
|
|
71
|
+
if (!groupElement) return
|
|
72
|
+
const eagerValues = eagerValuesRef.value
|
|
73
|
+
assert(eagerValues)
|
|
74
|
+
const panels = getPanelDataWithPercentConstraints()
|
|
75
|
+
if (!panels) return
|
|
76
|
+
const { panelDataArray } = eagerValues
|
|
77
|
+
assert(
|
|
78
|
+
getPanelGroupElement(groupId, groupElement) != null,
|
|
79
|
+
`No group found for id "${groupId}"`,
|
|
80
|
+
)
|
|
81
|
+
const handles = getResizeHandleElementsForGroup(groupId, groupElement)
|
|
82
|
+
assert(handles)
|
|
83
|
+
const cleanups = handles.map(handle => {
|
|
84
|
+
const handleId = handle.getAttribute('data-panel-resize-handle-id')
|
|
85
|
+
assert(handleId)
|
|
86
|
+
const [idBefore, idAfter] = getResizeHandlePanelIds(
|
|
87
|
+
groupId,
|
|
88
|
+
handleId,
|
|
89
|
+
panelDataArray,
|
|
90
|
+
groupElement,
|
|
91
|
+
)
|
|
92
|
+
if (idBefore == null || idAfter == null) return () => {}
|
|
93
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
94
|
+
if (event.defaultPrevented) return
|
|
95
|
+
if (event.key !== 'Enter') return
|
|
96
|
+
event.preventDefault()
|
|
97
|
+
const index = panels.findIndex(panelData => panelData.id === idBefore)
|
|
98
|
+
if (index < 0) return
|
|
99
|
+
const panelData = panels[index]
|
|
100
|
+
assert(panelData)
|
|
101
|
+
const size = layout.value[index]
|
|
102
|
+
const { collapsedSize = 0, collapsible, minSize = 0 } = panelData.constraints
|
|
103
|
+
if (size == null || !collapsible) return
|
|
104
|
+
const nextLayout = adjustLayoutByDelta({
|
|
105
|
+
delta: fuzzyNumbersEqual(size, collapsedSize)
|
|
106
|
+
? minSize - collapsedSize
|
|
107
|
+
: collapsedSize - size,
|
|
108
|
+
layout: layout.value,
|
|
109
|
+
panelConstraints: panels.map(panel => panel.constraints),
|
|
110
|
+
pivotIndices: determinePivotIndices(groupId, handleId, groupElement),
|
|
111
|
+
trigger: 'keyboard',
|
|
112
|
+
})
|
|
113
|
+
if (layout.value !== nextLayout) setLayout(nextLayout)
|
|
114
|
+
}
|
|
115
|
+
handle.addEventListener('keydown', onKeyDown)
|
|
116
|
+
return () => handle.removeEventListener('keydown', onKeyDown)
|
|
117
|
+
})
|
|
118
|
+
onCleanup(() => cleanups.forEach(cleanup => cleanup()))
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function useWindowSplitterResizeHandlerBehavior({
|
|
123
|
+
disabled,
|
|
124
|
+
handleId,
|
|
125
|
+
resizeHandler,
|
|
126
|
+
panelGroupElement,
|
|
127
|
+
}: {
|
|
128
|
+
disabled: Ref<boolean>
|
|
129
|
+
handleId: string
|
|
130
|
+
resizeHandler: Ref<ResizeHandler | null>
|
|
131
|
+
panelGroupElement: Ref<ParentNode | null | undefined>
|
|
132
|
+
}) {
|
|
133
|
+
watchEffect(onCleanup => {
|
|
134
|
+
const groupElement = panelGroupElement.value
|
|
135
|
+
if (disabled.value || resizeHandler.value === null || groupElement === null) return
|
|
136
|
+
const handleElement = getResizeHandleElement(handleId, groupElement)
|
|
137
|
+
if (handleElement == null) return
|
|
138
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
139
|
+
if (event.defaultPrevented) return
|
|
140
|
+
switch (event.key) {
|
|
141
|
+
case 'ArrowDown':
|
|
142
|
+
case 'ArrowLeft':
|
|
143
|
+
case 'ArrowRight':
|
|
144
|
+
case 'ArrowUp':
|
|
145
|
+
case 'End':
|
|
146
|
+
case 'Home': {
|
|
147
|
+
event.preventDefault()
|
|
148
|
+
resizeHandler.value?.(event)
|
|
149
|
+
break
|
|
150
|
+
}
|
|
151
|
+
case 'F6': {
|
|
152
|
+
event.preventDefault()
|
|
153
|
+
const groupId = handleElement.getAttribute('data-panel-group-id')
|
|
154
|
+
assert(groupId)
|
|
155
|
+
const handles = getResizeHandleElementsForGroup(groupId, groupElement)
|
|
156
|
+
const index = getResizeHandleElementIndex(groupId, handleId, groupElement)
|
|
157
|
+
assert(index !== null)
|
|
158
|
+
const nextIndex = event.shiftKey
|
|
159
|
+
? index > 0
|
|
160
|
+
? index - 1
|
|
161
|
+
: handles.length - 1
|
|
162
|
+
: index + 1 < handles.length
|
|
163
|
+
? index + 1
|
|
164
|
+
: 0
|
|
165
|
+
handles[nextIndex]!.focus()
|
|
166
|
+
break
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
handleElement.addEventListener('keydown', onKeyDown)
|
|
171
|
+
onCleanup(() => handleElement.removeEventListener('keydown', onKeyDown))
|
|
172
|
+
})
|
|
173
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Ref } from 'vue'
|
|
2
|
+
import type {
|
|
3
|
+
Direction,
|
|
4
|
+
DragState,
|
|
5
|
+
PanelConstraints,
|
|
6
|
+
PanelData,
|
|
7
|
+
ResizeEvent,
|
|
8
|
+
ResizeHandler,
|
|
9
|
+
} from '../../../../shared/src/primitives/splitter/types'
|
|
10
|
+
import { createContext } from '../utils/createContext'
|
|
11
|
+
|
|
12
|
+
export interface PanelGroupContext {
|
|
13
|
+
direction: Ref<Direction>
|
|
14
|
+
dragState: DragState | null
|
|
15
|
+
groupId: string
|
|
16
|
+
reevaluatePanelConstraints: (panelData: PanelData, prevConstraints: PanelConstraints) => void
|
|
17
|
+
registerPanel: (panelData: PanelData) => void
|
|
18
|
+
registerResizeHandle: (dragHandleId: string) => ResizeHandler
|
|
19
|
+
resizePanel: (panelData: PanelData, size: number) => void
|
|
20
|
+
startDragging: (dragHandleId: string, event: ResizeEvent) => void
|
|
21
|
+
stopDragging: () => void
|
|
22
|
+
unregisterPanel: (panelData: PanelData) => void
|
|
23
|
+
panelGroupElement: Ref<ParentNode | null | undefined>
|
|
24
|
+
collapsePanel: (panelData: PanelData) => void
|
|
25
|
+
expandPanel: (panelData: PanelData) => void
|
|
26
|
+
isPanelCollapsed: (panelData: PanelData) => boolean
|
|
27
|
+
isPanelExpanded: (panelData: PanelData) => boolean
|
|
28
|
+
getPanelSize: (panelData: PanelData) => number
|
|
29
|
+
getPanelStyle: (panelData: PanelData, defaultSize: number | undefined) => Record<string, unknown>
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const [injectPanelGroupContext, providePanelGroupContext] =
|
|
33
|
+
createContext<PanelGroupContext>('PanelGroup')
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
Direction,
|
|
3
|
+
PanelGroupStorage,
|
|
4
|
+
SizeUnit,
|
|
5
|
+
} from '../../../../shared/src/primitives/splitter/types'
|
|
6
|
+
export { injectPanelGroupContext, type PanelGroupContext } from './context'
|
|
7
|
+
export { SplitterGroup, type SplitterGroupEmits, type SplitterGroupProps } from './SplitterGroup'
|
|
8
|
+
export { SplitterPanel, type SplitterPanelEmits, type SplitterPanelProps } from './SplitterPanel'
|
|
9
|
+
export {
|
|
10
|
+
SplitterResizeHandle,
|
|
11
|
+
type SplitterResizeHandleEmits,
|
|
12
|
+
type SplitterResizeHandleProps,
|
|
13
|
+
} from './SplitterResizeHandle'
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 UnoVue <https://github.com/unovue>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Portions adapted from VueUse:
|
|
24
|
+
MIT License
|
|
25
|
+
|
|
26
|
+
Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
|
|
27
|
+
|
|
28
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
29
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
30
|
+
in the Software without restriction, including without limitation the rights
|
|
31
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
32
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
33
|
+
furnished to do so, subject to the following conditions:
|
|
34
|
+
|
|
35
|
+
The above copyright notice and this permission notice shall be included in all
|
|
36
|
+
copies or substantial portions of the Software.
|
|
37
|
+
|
|
38
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
39
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
40
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
41
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
42
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
43
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
44
|
+
SOFTWARE.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { computed, defineComponent, h, renderSlot, toRefs, withCtx, type PropType } from 'vue'
|
|
2
|
+
import { isStepFocusable, stepperItemState } from '../../../../shared/src/primitives/stepper'
|
|
3
|
+
import { Primitive, type PrimitiveProps } from '../primitive'
|
|
4
|
+
import { useForwardExpose } from '../utils/useForwardExpose'
|
|
5
|
+
import { useId } from '../utils/useId'
|
|
6
|
+
import { injectStepperRootContext, provideStepperItemContext } from './context'
|
|
7
|
+
|
|
8
|
+
export interface StepperItemProps {
|
|
9
|
+
step: number
|
|
10
|
+
disabled?: boolean
|
|
11
|
+
completed?: boolean
|
|
12
|
+
asChild?: boolean
|
|
13
|
+
as?: PrimitiveProps['as']
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const StepperItem = defineComponent({
|
|
17
|
+
name: 'StepperItem',
|
|
18
|
+
props: {
|
|
19
|
+
step: { type: Number, required: true },
|
|
20
|
+
disabled: { type: Boolean, required: false, default: false },
|
|
21
|
+
completed: { type: Boolean, required: false, default: false },
|
|
22
|
+
asChild: { type: Boolean, required: false },
|
|
23
|
+
as: { type: null as unknown as PropType<PrimitiveProps['as']>, required: false },
|
|
24
|
+
},
|
|
25
|
+
setup(props, { slots }) {
|
|
26
|
+
const { disabled, step, completed } = toRefs(props)
|
|
27
|
+
const { forwardRef } = useForwardExpose()
|
|
28
|
+
const rootContext = injectStepperRootContext()
|
|
29
|
+
const titleId = useId(undefined, 'reka-stepper-item-title')
|
|
30
|
+
const descriptionId = useId(undefined, 'reka-stepper-item-description')
|
|
31
|
+
const itemState = computed(() =>
|
|
32
|
+
stepperItemState(completed.value, rootContext.modelValue.value!, step.value),
|
|
33
|
+
)
|
|
34
|
+
const isFocusable = computed(() =>
|
|
35
|
+
isStepFocusable(
|
|
36
|
+
disabled.value,
|
|
37
|
+
rootContext.linear.value,
|
|
38
|
+
step.value,
|
|
39
|
+
rootContext.modelValue.value!,
|
|
40
|
+
),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
provideStepperItemContext({
|
|
44
|
+
titleId,
|
|
45
|
+
descriptionId,
|
|
46
|
+
state: itemState,
|
|
47
|
+
disabled,
|
|
48
|
+
step,
|
|
49
|
+
isFocusable,
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
return () =>
|
|
53
|
+
h(
|
|
54
|
+
Primitive,
|
|
55
|
+
{
|
|
56
|
+
ref: forwardRef,
|
|
57
|
+
as: props.as,
|
|
58
|
+
'as-child': props.asChild,
|
|
59
|
+
'aria-current': itemState.value === 'active' ? 'true' : undefined,
|
|
60
|
+
'data-state': itemState.value,
|
|
61
|
+
disabled: disabled.value || !isFocusable.value ? '' : undefined,
|
|
62
|
+
'data-disabled': disabled.value || !isFocusable.value ? '' : undefined,
|
|
63
|
+
'data-orientation': rootContext.orientation.value,
|
|
64
|
+
},
|
|
65
|
+
{ default: withCtx(() => [renderSlot(slots, 'default', { state: itemState.value })]) },
|
|
66
|
+
)
|
|
67
|
+
},
|
|
68
|
+
})
|