@hina-ui/vue 1.7.11 → 1.7.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +25614 -10189
- package/dist/index.js.map +1 -1
- package/dist/shared/lib/css-time.ts +6 -0
- package/dist/shared/lib/line-clamp.ts +8 -8
- package/dist/shared/lib/tour.ts +261 -0
- package/dist/shared/locale/en-US.ts +8 -0
- package/dist/shared/locale/index.ts +1 -0
- package/dist/shared/locale/ja-JP.ts +9 -0
- package/dist/shared/locale/types.ts +8 -0
- package/dist/shared/locale/zh-CN.ts +8 -0
- package/dist/shared/primitives/combobox/LICENSE +44 -0
- package/dist/shared/primitives/combobox/index.ts +49 -0
- package/dist/shared/primitives/date/calendar-view.ts +264 -0
- package/dist/shared/primitives/date/calendar.ts +126 -0
- package/dist/shared/primitives/date/comparators.ts +144 -0
- package/dist/shared/primitives/date/field.ts +551 -0
- package/dist/shared/primitives/date/formatter.ts +110 -0
- package/dist/shared/primitives/date/parser.ts +182 -0
- package/dist/shared/primitives/date/parts.ts +16 -0
- package/dist/shared/primitives/date/picker-view.ts +186 -0
- package/dist/shared/primitives/date/placeholders.ts +485 -0
- package/dist/shared/primitives/date/range-calendar-view.ts +181 -0
- package/dist/shared/primitives/date/segment.ts +44 -0
- package/dist/shared/primitives/date/utils.ts +169 -0
- package/dist/shared/primitives/dialog/LICENSE +21 -0
- package/dist/shared/primitives/dialog/index.ts +73 -0
- package/dist/shared/primitives/grace-area/LICENSE +21 -0
- package/dist/shared/primitives/grace-area/index.ts +112 -0
- package/dist/shared/primitives/listbox/LICENSE +21 -0
- package/dist/shared/primitives/listbox/index.ts +213 -0
- package/dist/shared/primitives/menu/LICENSE +21 -0
- package/dist/shared/primitives/menu/index.ts +66 -0
- package/dist/shared/primitives/navigation-menu/LICENSE +44 -0
- package/dist/shared/primitives/navigation-menu/index.ts +125 -0
- package/dist/shared/primitives/pin-input/index.ts +394 -97
- package/dist/shared/primitives/popper/LICENSE +21 -0
- package/dist/shared/primitives/popper/index.ts +246 -0
- package/dist/shared/primitives/select/index.ts +98 -0
- package/dist/shared/primitives/tags-input/LICENSE +21 -0
- package/dist/shared/primitives/tags-input/index.ts +113 -0
- package/dist/shared/primitives/toast/LICENSE +44 -0
- package/dist/shared/primitives/toast/index.ts +106 -0
- package/dist/shared/primitives/tree/LICENSE +21 -0
- package/dist/shared/primitives/tree/index.ts +248 -0
- package/dist/shared/styles/interaction.css +6 -2
- package/dist/shared/styles/line-clamp.css +6 -2
- package/dist/shared/styles/pin-input.css +84 -0
- package/dist/shared/styles/tokens.css +2 -0
- package/dist/shared/styles/tour.css +29 -0
- package/dist/shared/variants/nav-link.ts +6 -2
- package/dist/shared/variants/pin-input.ts +26 -7
- package/dist/shared/variants/tour.ts +29 -0
- package/dist/types/shared/src/lib/css-time.d.ts +2 -0
- package/dist/types/shared/src/lib/css-time.d.ts.map +1 -0
- package/dist/types/shared/src/lib/line-clamp.d.ts.map +1 -1
- package/dist/types/shared/src/lib/tour.d.ts +81 -0
- package/dist/types/shared/src/lib/tour.d.ts.map +1 -0
- package/dist/types/shared/src/lib/virtual/filter.d.ts +6 -0
- package/dist/types/shared/src/lib/virtual/filter.d.ts.map +1 -0
- package/dist/types/shared/src/locale/en-US.d.ts.map +1 -1
- package/dist/types/shared/src/locale/index.d.ts.map +1 -1
- package/dist/types/shared/src/locale/ja-JP.d.ts.map +1 -1
- package/dist/types/shared/src/locale/types.d.ts +8 -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/body-scroll-lock/index.d.ts +10 -0
- package/dist/types/shared/src/primitives/body-scroll-lock/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/collapsible/index.d.ts +1 -1
- package/dist/types/shared/src/primitives/combobox/index.d.ts +9 -0
- package/dist/types/shared/src/primitives/combobox/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/calendar-view.d.ts +53 -0
- package/dist/types/shared/src/primitives/date/calendar-view.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/calendar.d.ts +39 -0
- package/dist/types/shared/src/primitives/date/calendar.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/comparators.d.ts +31 -0
- package/dist/types/shared/src/primitives/date/comparators.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/field.d.ts +46 -0
- package/dist/types/shared/src/primitives/date/field.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/formatter.d.ts +20 -0
- package/dist/types/shared/src/primitives/date/formatter.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/parser.d.ts +49 -0
- package/dist/types/shared/src/primitives/date/parser.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/parts.d.ts +10 -0
- package/dist/types/shared/src/primitives/date/parts.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/picker-view.d.ts +34 -0
- package/dist/types/shared/src/primitives/date/picker-view.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/placeholders.d.ts +2 -0
- package/dist/types/shared/src/primitives/date/placeholders.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/range-calendar-view.d.ts +67 -0
- package/dist/types/shared/src/primitives/date/range-calendar-view.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/segment.d.ts +6 -0
- package/dist/types/shared/src/primitives/date/segment.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/date/utils.d.ts +37 -0
- package/dist/types/shared/src/primitives/date/utils.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/dialog/index.d.ts +32 -0
- package/dist/types/shared/src/primitives/dialog/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/focus-guards/index.d.ts +2 -0
- package/dist/types/shared/src/primitives/focus-guards/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/grace-area/index.d.ts +13 -0
- package/dist/types/shared/src/primitives/grace-area/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/listbox/index.d.ts +55 -0
- package/dist/types/shared/src/primitives/listbox/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/menu/index.d.ts +35 -0
- package/dist/types/shared/src/primitives/menu/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/navigation-menu/index.d.ts +23 -0
- package/dist/types/shared/src/primitives/navigation-menu/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/pin-input/index.d.ts +35 -27
- package/dist/types/shared/src/primitives/pin-input/index.d.ts.map +1 -1
- package/dist/types/shared/src/primitives/popper/index.d.ts +83 -0
- package/dist/types/shared/src/primitives/popper/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/select/index.d.ts +24 -0
- package/dist/types/shared/src/primitives/select/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/tags-input/index.d.ts +36 -0
- package/dist/types/shared/src/primitives/tags-input/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/toast/index.d.ts +42 -0
- package/dist/types/shared/src/primitives/toast/index.d.ts.map +1 -0
- package/dist/types/shared/src/primitives/tree/index.d.ts +72 -0
- package/dist/types/shared/src/primitives/tree/index.d.ts.map +1 -0
- package/dist/types/shared/src/variants/nav-link.d.ts +2 -1
- package/dist/types/shared/src/variants/nav-link.d.ts.map +1 -1
- package/dist/types/shared/src/variants/pin-input.d.ts +30 -10
- package/dist/types/shared/src/variants/pin-input.d.ts.map +1 -1
- package/dist/types/shared/src/variants/tour.d.ts +10 -0
- package/dist/types/shared/src/variants/tour.d.ts.map +1 -0
- package/dist/types/vue/src/components/app-shell/AppShell.vue.d.ts +6 -6
- package/dist/types/vue/src/components/button/Button.vue.d.ts +1 -1
- package/dist/types/vue/src/components/button/Button.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/calendar/Calendar.vue.d.ts +1 -1
- package/dist/types/vue/src/components/calendar/Calendar.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/combobox/Combobox.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/command-palette/CommandPalettePanel.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/config-provider/ConfigProvider.vue.d.ts +20 -0
- package/dist/types/vue/src/components/config-provider/ConfigProvider.vue.d.ts.map +1 -0
- package/dist/types/vue/src/components/config-provider/types.d.ts +10 -0
- package/dist/types/vue/src/components/config-provider/types.d.ts.map +1 -0
- package/dist/types/vue/src/components/config-provider/useConfig.d.ts +2 -0
- package/dist/types/vue/src/components/config-provider/useConfig.d.ts.map +1 -0
- package/dist/types/vue/src/components/date-range-field/DateRangeField.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/date-time-picker/DateTimePicker.vue.d.ts +1 -1
- package/dist/types/vue/src/components/date-time-picker/DateTimePicker.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/dialog/ModalContent.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/dropdown-menu/DropdownMenu.vue.d.ts +20 -8
- package/dist/types/vue/src/components/dropdown-menu/DropdownMenu.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/float-button/FloatButton.vue.d.ts +2 -2
- package/dist/types/vue/src/components/hover-card/HoverCard.vue.d.ts +1 -1
- package/dist/types/vue/src/components/hover-card/HoverCard.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 +1 -1
- package/dist/types/vue/src/components/image/Image.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/image/composables/useImage.d.ts.map +1 -1
- package/dist/types/vue/src/components/lightbox/Lightbox.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/menubar/MenubarMenu.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/menubar/MenubarSub.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/month-grid/MonthGrid.vue.d.ts +1 -1
- package/dist/types/vue/src/components/multi-combobox/MultiCombobox.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/nav-link/NavLink.vue.d.ts +5 -10
- 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 +8 -0
- package/dist/types/vue/src/components/nav-link/NavLinkChild.d.ts.map +1 -1
- package/dist/types/vue/src/components/navigation-menu/NavigationMenu.vue.d.ts +2 -2
- package/dist/types/vue/src/components/navigation-menu/NavigationMenu.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/navigation-menu/NavigationMenuContent.vue.d.ts +6 -6
- package/dist/types/vue/src/components/pagination/composables/usePaginationWindow.d.ts +6 -6
- package/dist/types/vue/src/components/pin-input/PinInput.vue.d.ts +2 -0
- package/dist/types/vue/src/components/pin-input/PinInput.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/popconfirm/Popconfirm.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/popover/Popover.vue.d.ts +9 -9
- package/dist/types/vue/src/components/popover/Popover.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/popover/PopoverContent.vue.d.ts +9 -9
- package/dist/types/vue/src/components/popover/PopoverContent.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/range-calendar/RangeCalendar.vue.d.ts +1 -1
- package/dist/types/vue/src/components/range-calendar/RangeCalendar.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/range-slider/RangeSlider.vue.d.ts +2 -2
- package/dist/types/vue/src/components/scroll-area/ScrollArea.vue.d.ts +1 -1
- package/dist/types/vue/src/components/scroll-area/ScrollArea.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/select/Select.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/sheet/Sheet.vue.d.ts +1 -1
- package/dist/types/vue/src/components/sheet/Sheet.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/slider/Slider.vue.d.ts +2 -2
- package/dist/types/vue/src/components/split-button/SplitButton.vue.d.ts +1 -1
- package/dist/types/vue/src/components/tags-input/TagsInput.vue.d.ts +1 -1
- package/dist/types/vue/src/components/tags-input/TagsInput.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/toolbar/Toolbar.vue.d.ts +1 -1
- package/dist/types/vue/src/components/toolbar/ToolbarControl.vue.d.ts +1 -1
- package/dist/types/vue/src/components/tour/Tour.vue.d.ts +34 -0
- package/dist/types/vue/src/components/tour/Tour.vue.d.ts.map +1 -0
- package/dist/types/vue/src/components/tour/tour.variants.d.ts +2 -0
- package/dist/types/vue/src/components/tour/tour.variants.d.ts.map +1 -0
- package/dist/types/vue/src/components/tour/types.d.ts +33 -0
- package/dist/types/vue/src/components/tour/types.d.ts.map +1 -0
- package/dist/types/vue/src/components/tree/TreeRows.vue.d.ts +1 -1
- package/dist/types/vue/src/components/tree/TreeRows.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/tree/VirtualTreeWindow.vue.d.ts +1 -1
- package/dist/types/vue/src/components/tree/VirtualTreeWindow.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/tree-select/TreeSelect.vue.d.ts.map +1 -1
- package/dist/types/vue/src/components/virtual-list/composables/useVirtualList.d.ts +7 -7
- package/dist/types/vue/src/index.d.ts +5 -0
- package/dist/types/vue/src/index.d.ts.map +1 -1
- package/dist/types/vue/src/lib/anchored-overlay.d.ts +11 -5
- package/dist/types/vue/src/lib/anchored-overlay.d.ts.map +1 -1
- package/dist/types/vue/src/lib/reka/useVirtualChoices.d.ts +6 -6
- package/dist/types/vue/src/lib/reka/useVirtualChoices.d.ts.map +1 -1
- package/dist/types/vue/src/lib/reka/useVirtualTree.d.ts +1 -1
- package/dist/types/vue/src/lib/reka/useVirtualTree.d.ts.map +1 -1
- package/dist/types/vue/src/lib/useDirection.d.ts +1 -1
- package/dist/types/vue/src/primitives/alert-dialog/index.d.ts +133 -0
- package/dist/types/vue/src/primitives/alert-dialog/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/calendar/CalendarCellTrigger.d.ts +52 -0
- package/dist/types/vue/src/primitives/calendar/CalendarCellTrigger.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/calendar/CalendarGrid.d.ts +227 -0
- package/dist/types/vue/src/primitives/calendar/CalendarGrid.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/calendar/CalendarNav.d.ts +140 -0
- package/dist/types/vue/src/primitives/calendar/CalendarNav.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/calendar/CalendarRoot.d.ts +313 -0
- package/dist/types/vue/src/primitives/calendar/CalendarRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/calendar/context.d.ts +48 -0
- package/dist/types/vue/src/primitives/calendar/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/calendar/index.d.ts +6 -0
- package/dist/types/vue/src/primitives/calendar/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/calendar/useCalendar.d.ts +65 -0
- package/dist/types/vue/src/primitives/calendar/useCalendar.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/combobox/ComboboxContent.d.ts +273 -0
- package/dist/types/vue/src/primitives/combobox/ComboboxContent.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/combobox/ComboboxItem.d.ts +166 -0
- package/dist/types/vue/src/primitives/combobox/ComboboxItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/combobox/ComboboxRoot.d.ts +376 -0
- package/dist/types/vue/src/primitives/combobox/ComboboxRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/combobox/context.d.ts +68 -0
- package/dist/types/vue/src/primitives/combobox/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/combobox/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/combobox/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/context-menu/index.d.ts +949 -0
- package/dist/types/vue/src/primitives/context-menu/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/date-field/DateFieldInput.d.ts +40 -0
- package/dist/types/vue/src/primitives/date-field/DateFieldInput.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/date-field/DateFieldRoot.d.ts +233 -0
- package/dist/types/vue/src/primitives/date-field/DateFieldRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/date-field/context.d.ts +26 -0
- package/dist/types/vue/src/primitives/date-field/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/date-field/index.d.ts +4 -0
- package/dist/types/vue/src/primitives/date-field/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/date-field/segmentInput.d.ts +36 -0
- package/dist/types/vue/src/primitives/date-field/segmentInput.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/date-field/useDateFieldSegment.d.ts +32 -0
- package/dist/types/vue/src/primitives/date-field/useDateFieldSegment.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldInput.d.ts +51 -0
- package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldInput.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldRoot.d.ts +221 -0
- package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/date-range-field/context.d.ts +31 -0
- package/dist/types/vue/src/primitives/date-range-field/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/date-range-field/index.d.ts +4 -0
- package/dist/types/vue/src/primitives/date-range-field/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dialog/DialogContent.d.ts +54 -0
- package/dist/types/vue/src/primitives/dialog/DialogContent.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dialog/DialogContentImpl.d.ts +65 -0
- package/dist/types/vue/src/primitives/dialog/DialogContentImpl.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dialog/DialogOverlay.d.ts +40 -0
- package/dist/types/vue/src/primitives/dialog/DialogOverlay.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dialog/DialogPortal.d.ts +49 -0
- package/dist/types/vue/src/primitives/dialog/DialogPortal.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dialog/DialogRoot.d.ts +62 -0
- package/dist/types/vue/src/primitives/dialog/DialogRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dialog/DialogText.d.ts +85 -0
- package/dist/types/vue/src/primitives/dialog/DialogText.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dialog/DialogTrigger.d.ts +33 -0
- package/dist/types/vue/src/primitives/dialog/DialogTrigger.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dialog/context.d.ts +16 -0
- package/dist/types/vue/src/primitives/dialog/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dialog/index.d.ts +8 -0
- package/dist/types/vue/src/primitives/dialog/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayer.d.ts +76 -0
- package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayer.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayerBranch.d.ts +26 -0
- package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayerBranch.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dismissable-layer/index.d.ts +3 -0
- package/dist/types/vue/src/primitives/dismissable-layer/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/dropdown-menu/index.d.ts +1033 -0
- package/dist/types/vue/src/primitives/dropdown-menu/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/focus-scope/FocusScope.d.ts +72 -0
- package/dist/types/vue/src/primitives/focus-scope/FocusScope.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/focus-scope/index.d.ts +2 -0
- package/dist/types/vue/src/primitives/focus-scope/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/hover-card/index.d.ts +442 -0
- package/dist/types/vue/src/primitives/hover-card/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/listbox/ListboxContent.d.ts +30 -0
- package/dist/types/vue/src/primitives/listbox/ListboxContent.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/listbox/ListboxFilter.d.ts +67 -0
- package/dist/types/vue/src/primitives/listbox/ListboxFilter.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/listbox/ListboxGroup.d.ts +82 -0
- package/dist/types/vue/src/primitives/listbox/ListboxGroup.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/listbox/ListboxItem.d.ts +58 -0
- package/dist/types/vue/src/primitives/listbox/ListboxItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/{pin-input/PinInputRoot.d.ts → listbox/ListboxRoot.d.ts} +60 -53
- package/dist/types/vue/src/primitives/listbox/ListboxRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/listbox/context.d.ts +49 -0
- package/dist/types/vue/src/primitives/listbox/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/listbox/index.d.ts +7 -0
- package/dist/types/vue/src/primitives/listbox/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/menu/MenuContentImpl.d.ts +394 -0
- package/dist/types/vue/src/primitives/menu/MenuContentImpl.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/menu/MenuItem.d.ts +396 -0
- package/dist/types/vue/src/primitives/menu/MenuItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/menu/MenuRoot.d.ts +746 -0
- package/dist/types/vue/src/primitives/menu/MenuRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/menu/context.d.ts +74 -0
- package/dist/types/vue/src/primitives/menu/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/menu/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/menu/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/menu/wrap.d.ts +14 -0
- package/dist/types/vue/src/primitives/menu/wrap.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/menubar/index.d.ts +1036 -0
- package/dist/types/vue/src/primitives/menubar/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuContent.d.ts +101 -0
- package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuContent.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuParts.d.ts +165 -0
- package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuParts.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuRoot.d.ts +187 -0
- package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/navigation-menu/context.d.ts +40 -0
- package/dist/types/vue/src/primitives/navigation-menu/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/navigation-menu/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/navigation-menu/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/number-field/NumberFieldRoot.vue.d.ts +1 -1
- package/dist/types/vue/src/primitives/number-field/NumberFieldRoot.vue.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/picker/createPicker.d.ts +247 -0
- package/dist/types/vue/src/primitives/picker/createPicker.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/picker/index.d.ts +414 -0
- package/dist/types/vue/src/primitives/picker/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popover/PopoverContent.d.ts +257 -0
- package/dist/types/vue/src/primitives/popover/PopoverContent.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popover/PopoverParts.d.ts +183 -0
- package/dist/types/vue/src/primitives/popover/PopoverParts.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popover/PopoverRoot.d.ts +50 -0
- package/dist/types/vue/src/primitives/popover/PopoverRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popover/context.d.ts +13 -0
- package/dist/types/vue/src/primitives/popover/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popover/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/popover/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popper/Arrow.d.ts +67 -0
- package/dist/types/vue/src/primitives/popper/Arrow.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popper/PopperAnchor.d.ts +40 -0
- package/dist/types/vue/src/primitives/popper/PopperAnchor.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popper/PopperArrow.d.ts +61 -0
- package/dist/types/vue/src/primitives/popper/PopperArrow.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popper/PopperContent.d.ts +370 -0
- package/dist/types/vue/src/primitives/popper/PopperContent.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popper/PopperRoot.d.ts +4 -0
- package/dist/types/vue/src/primitives/popper/PopperRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popper/context.d.ts +17 -0
- package/dist/types/vue/src/primitives/popper/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/popper/index.d.ts +7 -0
- package/dist/types/vue/src/primitives/popper/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/radio-group/RadioGroupRoot.d.ts +1 -1
- package/dist/types/vue/src/primitives/range-calendar/RangeCalendarCellTrigger.d.ts +52 -0
- package/dist/types/vue/src/primitives/range-calendar/RangeCalendarCellTrigger.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/range-calendar/RangeCalendarGrid.d.ts +252 -0
- package/dist/types/vue/src/primitives/range-calendar/RangeCalendarGrid.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/range-calendar/RangeCalendarRoot.d.ts +345 -0
- package/dist/types/vue/src/primitives/range-calendar/RangeCalendarRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/range-calendar/context.d.ts +64 -0
- package/dist/types/vue/src/primitives/range-calendar/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/range-calendar/index.d.ts +6 -0
- package/dist/types/vue/src/primitives/range-calendar/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/rating/RatingRoot.d.ts +1 -1
- package/dist/types/vue/src/primitives/roving-focus/RovingFocusGroup.vue.d.ts +3 -3
- package/dist/types/vue/src/primitives/roving-focus/RovingFocusGroup.vue.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/select/SelectContent.d.ts +265 -0
- package/dist/types/vue/src/primitives/select/SelectContent.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/select/SelectItem.d.ts +107 -0
- package/dist/types/vue/src/primitives/select/SelectItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/select/SelectRoot.d.ts +275 -0
- package/dist/types/vue/src/primitives/select/SelectRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/select/context.d.ts +73 -0
- package/dist/types/vue/src/primitives/select/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/select/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/select/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/slider/SliderRoot.d.ts +1 -1
- package/dist/types/vue/src/primitives/stepper/StepperRoot.d.ts +1 -1
- package/dist/types/vue/src/primitives/{pin-input/PinInputInput.d.ts → tags-input/TagsInputInput.d.ts} +23 -14
- package/dist/types/vue/src/primitives/tags-input/TagsInputInput.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tags-input/TagsInputItem.d.ts +76 -0
- package/dist/types/vue/src/primitives/tags-input/TagsInputItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tags-input/TagsInputRoot.d.ts +196 -0
- package/dist/types/vue/src/primitives/tags-input/TagsInputRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tags-input/context.d.ts +30 -0
- package/dist/types/vue/src/primitives/tags-input/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tags-input/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/tags-input/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/teleport/Teleport.d.ts +49 -0
- package/dist/types/vue/src/primitives/teleport/Teleport.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/teleport/index.d.ts +2 -0
- package/dist/types/vue/src/primitives/teleport/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/time-field/TimeFieldInput.d.ts +40 -0
- package/dist/types/vue/src/primitives/time-field/TimeFieldInput.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/time-field/TimeFieldRoot.d.ts +220 -0
- package/dist/types/vue/src/primitives/time-field/TimeFieldRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/time-field/context.d.ts +25 -0
- package/dist/types/vue/src/primitives/time-field/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/time-field/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/time-field/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toast/ToastProvider.d.ts +177 -0
- package/dist/types/vue/src/primitives/toast/ToastProvider.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toast/ToastRoot.d.ts +233 -0
- package/dist/types/vue/src/primitives/toast/ToastRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toast/index.d.ts +3 -0
- package/dist/types/vue/src/primitives/toast/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/toolbar/ToolbarRoot.d.ts +1 -1
- package/dist/types/vue/src/primitives/tooltip/TooltipParts.d.ts +267 -0
- package/dist/types/vue/src/primitives/tooltip/TooltipParts.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tooltip/TooltipRoot.d.ts +162 -0
- package/dist/types/vue/src/primitives/tooltip/TooltipRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tooltip/context.d.ts +32 -0
- package/dist/types/vue/src/primitives/tooltip/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tooltip/index.d.ts +4 -0
- package/dist/types/vue/src/primitives/tooltip/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tree/TreeItem.d.ts +40 -0
- package/dist/types/vue/src/primitives/tree/TreeItem.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tree/TreeRoot.d.ts +50 -0
- package/dist/types/vue/src/primitives/tree/TreeRoot.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tree/context.d.ts +29 -0
- package/dist/types/vue/src/primitives/tree/context.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/tree/index.d.ts +5 -0
- package/dist/types/vue/src/primitives/tree/index.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/config.d.ts +14 -1
- package/dist/types/vue/src/primitives/utils/config.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/utils/defu.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/defu.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/env.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/env.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/layers.d.ts +5 -0
- package/dist/types/vue/src/primitives/utils/layers.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/propsWithoutDefaults.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/propsWithoutDefaults.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useBodyScrollLock.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/useBodyScrollLock.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useDirection.d.ts +1 -1
- package/dist/types/vue/src/primitives/utils/useDirection.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/utils/useFocusGuards.d.ts +2 -0
- package/dist/types/vue/src/primitives/utils/useFocusGuards.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useGraceArea.d.ts +6 -0
- package/dist/types/vue/src/primitives/utils/useGraceArea.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useHideOthers.d.ts +4 -0
- package/dist/types/vue/src/primitives/utils/useHideOthers.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useIsUsingKeyboard.d.ts +4 -0
- package/dist/types/vue/src/primitives/utils/useIsUsingKeyboard.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useLocale.d.ts +3 -0
- package/dist/types/vue/src/primitives/utils/useLocale.d.ts.map +1 -0
- package/dist/types/vue/src/primitives/utils/useVModel.d.ts +1 -0
- package/dist/types/vue/src/primitives/utils/useVModel.d.ts.map +1 -1
- package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInput.d.ts +1 -1
- package/dist/types/vue/src/singletons.d.ts +1 -1
- package/dist/types/vue/src/singletons.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/alert-dialog/AlertDialog.vue +1 -1
- package/src/components/calendar/Calendar.vue +1 -1
- package/src/components/calendar/CalendarLevels.vue +1 -1
- package/src/components/combobox/Combobox.vue +6 -1
- package/src/components/combobox/ComboboxList.vue +1 -1
- package/src/components/command-palette/CommandPalette.vue +2 -2
- package/src/components/command-palette/CommandPaletteInput.vue +1 -1
- package/src/components/command-palette/CommandPaletteItem.vue +1 -1
- package/src/components/command-palette/CommandPalettePanel.vue +6 -1
- package/src/components/config-provider/ConfigProvider.vue +24 -0
- package/src/components/config-provider/types.ts +11 -0
- package/src/components/config-provider/useConfig.ts +5 -0
- package/src/components/context-menu/ContextMenu.vue +1 -1
- package/src/components/context-menu/ContextMenuCheckboxItem.vue +1 -1
- package/src/components/context-menu/ContextMenuGroup.vue +1 -1
- package/src/components/context-menu/ContextMenuItem.vue +1 -1
- package/src/components/context-menu/ContextMenuLabel.vue +1 -1
- package/src/components/context-menu/ContextMenuRadioGroup.vue +1 -1
- package/src/components/context-menu/ContextMenuRadioItem.vue +1 -1
- package/src/components/context-menu/ContextMenuSeparator.vue +1 -1
- package/src/components/context-menu/ContextMenuSub.vue +1 -1
- package/src/components/data-table/DataTableDragPreview.vue +1 -1
- package/src/components/date-field/DateField.vue +1 -1
- package/src/components/date-picker/DatePicker.vue +1 -1
- package/src/components/date-range-field/DateRangeField.vue +5 -1
- package/src/components/date-range-picker/DateRangePicker.vue +1 -1
- package/src/components/date-time-picker/DateTimePicker.vue +1 -1
- package/src/components/dialog/Dialog.vue +1 -1
- package/src/components/dialog/ModalContent.vue +2 -1
- package/src/components/drawer/Drawer.vue +1 -1
- package/src/components/dropdown-menu/DropdownMenu.vue +1 -1
- package/src/components/dropdown-menu/DropdownMenuCheckboxItem.vue +4 -1
- package/src/components/dropdown-menu/DropdownMenuGroup.vue +1 -1
- package/src/components/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/src/components/dropdown-menu/DropdownMenuLabel.vue +1 -1
- package/src/components/dropdown-menu/DropdownMenuRadioGroup.vue +1 -1
- package/src/components/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
- package/src/components/dropdown-menu/DropdownMenuSeparator.vue +1 -1
- package/src/components/dropdown-menu/DropdownMenuSub.vue +1 -1
- package/src/components/hover-card/HoverCard.vue +6 -1
- package/src/components/hover-card/composables/useHoverCardAnchor.ts +1 -1
- package/src/components/icon-button/IconButton.vue +1 -1
- package/src/components/image/composables/useImage.ts +2 -1
- package/src/components/lightbox/Lightbox.vue +2 -1
- package/src/components/lightbox/LightboxChrome.vue +1 -1
- package/src/components/listbox/Listbox.vue +1 -1
- package/src/components/listbox/ListboxOptionContent.vue +1 -1
- package/src/components/menubar/Menubar.vue +1 -1
- package/src/components/menubar/MenubarCheckboxItem.vue +1 -1
- package/src/components/menubar/MenubarGroup.vue +1 -1
- package/src/components/menubar/MenubarItem.vue +1 -1
- package/src/components/menubar/MenubarLabel.vue +1 -1
- package/src/components/menubar/MenubarMenu.vue +6 -1
- package/src/components/menubar/MenubarRadioGroup.vue +1 -1
- package/src/components/menubar/MenubarRadioItem.vue +1 -1
- package/src/components/menubar/MenubarSeparator.vue +1 -1
- package/src/components/menubar/MenubarSub.vue +6 -1
- package/src/components/multi-combobox/MultiCombobox.vue +6 -1
- package/src/components/multi-select/MultiSelect.vue +1 -1
- package/src/components/nav-link/NavLink.vue +21 -2
- package/src/components/nav-link/NavLinkChild.ts +2 -0
- package/src/components/navigation-menu/NavigationMenu.vue +5 -1
- package/src/components/navigation-menu/NavigationMenuContent.vue +2 -2
- package/src/components/navigation-menu/NavigationMenuItem.vue +1 -1
- package/src/components/navigation-menu/NavigationMenuLink.vue +1 -1
- package/src/components/navigation-menu/NavigationMenuTrigger.vue +1 -1
- package/src/components/number-input/NumberInput.vue +1 -1
- package/src/components/pagination/PaginationPopup.vue +1 -1
- package/src/components/pin-input/PinInput.vue +103 -33
- package/src/components/popconfirm/Popconfirm.vue +6 -1
- package/src/components/popover/Popover.vue +6 -1
- package/src/components/popover/PopoverContent.vue +2 -2
- package/src/components/popover/composables/usePopoverCloseFocus.ts +1 -1
- package/src/components/range-calendar/RangeCalendar.vue +1 -1
- package/src/components/select/Select.vue +2 -1
- package/src/components/select/SelectList.vue +1 -1
- package/src/components/sheet/Sheet.vue +1 -1
- package/src/components/slider/SliderHandle.vue +1 -1
- package/src/components/tags-input/TagsInput.vue +1 -1
- package/src/components/tags-input/TagsInputChip.vue +1 -1
- package/src/components/time/Time.vue +1 -1
- package/src/components/time-field/TimeField.vue +1 -1
- package/src/components/toast/Toaster.vue +1 -1
- package/src/components/toggle/Toggle.vue +1 -1
- package/src/components/toolbar/ToolbarControl.vue +1 -1
- package/src/components/tooltip/Tooltip.vue +1 -1
- package/src/components/tooltip/TooltipBubble.vue +1 -1
- package/src/components/tooltip/TooltipDirectiveRoot.ts +1 -1
- package/src/components/tooltip/TooltipProvider.vue +1 -1
- package/src/components/tooltip/composables/useTooltipTarget.ts +1 -1
- package/src/components/tour/Tour.vue +447 -0
- package/src/components/tour/tour.variants.ts +1 -0
- package/src/components/tour/types.ts +43 -0
- package/src/components/tree/Tree.vue +1 -1
- package/src/components/tree/TreeRows.vue +1 -1
- package/src/components/tree/VirtualTreeWindow.vue +1 -1
- package/src/components/tree-select/TreeSelect.vue +2 -3
- package/src/components/tree-select/composables/useTreeSelect.ts +2 -2
- package/src/index.ts +15 -0
- package/src/lib/anchored-overlay.ts +2 -1
- package/src/lib/dialog-focus.ts +1 -1
- package/src/lib/reka/useVirtualChoices.ts +7 -8
- package/src/lib/reka/useVirtualTree.ts +1 -1
- package/src/primitives/alert-dialog/index.ts +166 -0
- package/src/primitives/calendar/CalendarCellTrigger.ts +190 -0
- package/src/primitives/calendar/CalendarGrid.ts +101 -0
- package/src/primitives/calendar/CalendarNav.ts +88 -0
- package/src/primitives/calendar/CalendarRoot.ts +324 -0
- package/src/primitives/calendar/LICENSE +44 -0
- package/src/primitives/calendar/context.ts +55 -0
- package/src/primitives/calendar/index.ts +12 -0
- package/src/primitives/calendar/useCalendar.ts +164 -0
- package/src/primitives/combobox/ComboboxContent.ts +199 -0
- package/src/primitives/combobox/ComboboxItem.ts +209 -0
- package/src/primitives/combobox/ComboboxRoot.ts +489 -0
- package/src/primitives/combobox/LICENSE +44 -0
- package/src/primitives/combobox/context.ts +47 -0
- package/src/primitives/combobox/index.ts +23 -0
- package/src/primitives/context-menu/LICENSE +44 -0
- package/src/primitives/context-menu/index.ts +388 -0
- package/src/primitives/date-field/DateFieldInput.ts +29 -0
- package/src/primitives/date-field/DateFieldRoot.ts +343 -0
- package/src/primitives/date-field/LICENSE +44 -0
- package/src/primitives/date-field/context.ts +29 -0
- package/src/primitives/date-field/index.ts +3 -0
- package/src/primitives/date-field/segmentInput.ts +96 -0
- package/src/primitives/date-field/useDateFieldSegment.ts +63 -0
- package/src/primitives/date-range-field/DateRangeFieldInput.ts +42 -0
- package/src/primitives/date-range-field/DateRangeFieldRoot.ts +389 -0
- package/src/primitives/date-range-field/LICENSE +44 -0
- package/src/primitives/date-range-field/context.ts +36 -0
- package/src/primitives/date-range-field/index.ts +12 -0
- package/src/primitives/dialog/DialogContent.ts +193 -0
- package/src/primitives/dialog/DialogContentImpl.ts +114 -0
- package/src/primitives/dialog/DialogOverlay.ts +99 -0
- package/src/primitives/dialog/DialogPortal.ts +33 -0
- package/src/primitives/dialog/DialogRoot.ts +61 -0
- package/src/primitives/dialog/DialogText.ts +59 -0
- package/src/primitives/dialog/DialogTrigger.ts +46 -0
- package/src/primitives/dialog/LICENSE +44 -0
- package/src/primitives/dialog/context.ts +19 -0
- package/src/primitives/dialog/index.ts +7 -0
- package/src/primitives/dismissable-layer/DismissableLayer.ts +212 -0
- package/src/primitives/dismissable-layer/DismissableLayerBranch.ts +36 -0
- package/src/primitives/dismissable-layer/LICENSE +44 -0
- package/src/primitives/dismissable-layer/index.ts +11 -0
- package/src/primitives/dropdown-menu/LICENSE +44 -0
- package/src/primitives/dropdown-menu/index.ts +344 -0
- package/src/primitives/focus-scope/FocusScope.ts +118 -0
- package/src/primitives/focus-scope/LICENSE +44 -0
- package/src/primitives/focus-scope/index.ts +1 -0
- package/src/primitives/hover-card/LICENSE +44 -0
- package/src/primitives/hover-card/index.ts +357 -0
- package/src/primitives/listbox/LICENSE +44 -0
- package/src/primitives/listbox/ListboxContent.ts +80 -0
- package/src/primitives/listbox/ListboxFilter.ts +130 -0
- package/src/primitives/listbox/ListboxGroup.ts +67 -0
- package/src/primitives/listbox/ListboxItem.ts +125 -0
- package/src/primitives/listbox/ListboxRoot.ts +376 -0
- package/src/primitives/listbox/context.ts +62 -0
- package/src/primitives/listbox/index.ts +17 -0
- package/src/primitives/menu/LICENSE +44 -0
- package/src/primitives/menu/MenuContentImpl.ts +304 -0
- package/src/primitives/menu/MenuItem.ts +495 -0
- package/src/primitives/menu/MenuRoot.ts +295 -0
- package/src/primitives/menu/context.ts +72 -0
- package/src/primitives/menu/index.ts +26 -0
- package/src/primitives/menu/wrap.ts +53 -0
- package/src/primitives/menubar/index.ts +494 -0
- package/src/primitives/navigation-menu/LICENSE +44 -0
- package/src/primitives/navigation-menu/NavigationMenuContent.ts +375 -0
- package/src/primitives/navigation-menu/NavigationMenuParts.ts +432 -0
- package/src/primitives/navigation-menu/NavigationMenuRoot.ts +260 -0
- package/src/primitives/navigation-menu/context.ts +50 -0
- package/src/primitives/navigation-menu/index.ts +20 -0
- package/src/primitives/number-field/__snapshots__/NumberField.test.ts.snap +288 -0
- package/src/primitives/picker/LICENSE +44 -0
- package/src/primitives/picker/createPicker.ts +618 -0
- package/src/primitives/picker/index.ts +26 -0
- package/src/primitives/popover/LICENSE +44 -0
- package/src/primitives/popover/PopoverContent.ts +243 -0
- package/src/primitives/popover/PopoverParts.ts +143 -0
- package/src/primitives/popover/PopoverRoot.ts +58 -0
- package/src/primitives/popover/context.ts +16 -0
- package/src/primitives/popover/index.ts +14 -0
- package/src/primitives/popper/Arrow.ts +49 -0
- package/src/primitives/popper/LICENSE +44 -0
- package/src/primitives/popper/PopperAnchor.ts +33 -0
- package/src/primitives/popper/PopperArrow.ts +77 -0
- package/src/primitives/popper/PopperContent.ts +262 -0
- package/src/primitives/popper/PopperRoot.ts +16 -0
- package/src/primitives/popper/context.ts +23 -0
- package/src/primitives/popper/index.ts +11 -0
- package/src/primitives/range-calendar/LICENSE +44 -0
- package/src/primitives/range-calendar/RangeCalendarCellTrigger.ts +241 -0
- package/src/primitives/range-calendar/RangeCalendarGrid.ts +90 -0
- package/src/primitives/range-calendar/RangeCalendarRoot.ts +413 -0
- package/src/primitives/range-calendar/context.ts +71 -0
- package/src/primitives/range-calendar/index.ts +21 -0
- package/src/primitives/select/LICENSE +44 -0
- package/src/primitives/select/SelectContent.ts +330 -0
- package/src/primitives/select/SelectItem.ts +204 -0
- package/src/primitives/select/SelectRoot.ts +408 -0
- package/src/primitives/select/context.ts +74 -0
- package/src/primitives/select/index.ts +17 -0
- package/src/primitives/tags-input/LICENSE +44 -0
- package/src/primitives/tags-input/TagsInputInput.ts +148 -0
- package/src/primitives/tags-input/TagsInputItem.ts +105 -0
- package/src/primitives/tags-input/TagsInputRoot.ts +215 -0
- package/src/primitives/tags-input/context.ts +36 -0
- package/src/primitives/tags-input/index.ts +9 -0
- package/src/primitives/teleport/LICENSE +44 -0
- package/src/primitives/teleport/Teleport.ts +41 -0
- package/src/primitives/teleport/index.ts +1 -0
- package/src/primitives/time-field/LICENSE +44 -0
- package/src/primitives/time-field/TimeFieldInput.ts +29 -0
- package/src/primitives/time-field/TimeFieldRoot.ts +379 -0
- package/src/primitives/time-field/context.ts +28 -0
- package/src/primitives/time-field/index.ts +4 -0
- package/src/primitives/toast/LICENSE +44 -0
- package/src/primitives/toast/ToastProvider.ts +311 -0
- package/src/primitives/toast/ToastRoot.ts +518 -0
- package/src/primitives/toast/index.ts +16 -0
- package/src/primitives/tooltip/LICENSE +44 -0
- package/src/primitives/tooltip/TooltipParts.ts +351 -0
- package/src/primitives/tooltip/TooltipRoot.ts +170 -0
- package/src/primitives/tooltip/context.ts +39 -0
- package/src/primitives/tooltip/index.ts +9 -0
- package/src/primitives/tree/LICENSE +44 -0
- package/src/primitives/tree/TreeItem.ts +256 -0
- package/src/primitives/tree/TreeRoot.ts +273 -0
- package/src/primitives/tree/context.ts +34 -0
- package/src/primitives/tree/index.ts +4 -0
- package/src/primitives/utils/config.ts +19 -1
- package/src/primitives/utils/defu.ts +26 -0
- package/src/primitives/utils/env.ts +5 -0
- package/src/primitives/utils/layers.ts +4 -0
- package/src/primitives/utils/propsWithoutDefaults.ts +8 -0
- package/src/primitives/utils/useBodyScrollLock.ts +29 -0
- package/src/primitives/utils/useFocusGuards.ts +10 -0
- package/src/primitives/utils/useGraceArea.ts +85 -0
- package/src/primitives/utils/useHideOthers.ts +18 -0
- package/src/primitives/utils/useIsUsingKeyboard.ts +25 -0
- package/src/primitives/utils/useLocale.ts +7 -0
- package/src/primitives/utils/useVModel.ts +8 -3
- package/src/singletons.ts +1 -1
- package/dist/types/vue/src/primitives/pin-input/PinInputInput.d.ts.map +0 -1
- package/dist/types/vue/src/primitives/pin-input/PinInputRoot.d.ts.map +0 -1
- package/dist/types/vue/src/primitives/pin-input/context.d.ts +0 -20
- package/dist/types/vue/src/primitives/pin-input/context.d.ts.map +0 -1
- package/dist/types/vue/src/primitives/pin-input/index.d.ts +0 -4
- package/dist/types/vue/src/primitives/pin-input/index.d.ts.map +0 -1
- package/src/primitives/pin-input/PinInputInput.ts +0 -218
- package/src/primitives/pin-input/PinInputRoot.ts +0 -136
- package/src/primitives/pin-input/context.ts +0 -24
- package/src/primitives/pin-input/index.ts +0 -3
- /package/dist/shared/primitives/{pin-input → date}/LICENSE +0 -0
- /package/src/primitives/{pin-input → alert-dialog}/LICENSE +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
ToastTitle,
|
|
8
8
|
ToastDescription,
|
|
9
9
|
ToastClose,
|
|
10
|
-
} from '
|
|
10
|
+
} from '../../primitives/toast'
|
|
11
11
|
import { CircleCheck, CircleX, TriangleAlert, Info } from '@lucide/vue'
|
|
12
12
|
import Button from '../button/Button.vue'
|
|
13
13
|
import CloseButton from '../close-button/CloseButton.vue'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { injectTooltipProviderContext } from '
|
|
2
|
+
import { injectTooltipProviderContext } from '../../primitives/tooltip'
|
|
3
3
|
import { Toggle as ToggleRoot } from '../../primitives/toggle'
|
|
4
4
|
import { computed, useSlots } from 'vue'
|
|
5
5
|
import { cn } from '../../lib/cn'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { injectTooltipProviderContext } from '
|
|
2
|
+
import { injectTooltipProviderContext } from '../../primitives/tooltip'
|
|
3
3
|
import { Passthrough } from '../../lib/passthrough'
|
|
4
4
|
import Button from '../button/Button.vue'
|
|
5
5
|
import Tooltip from '../tooltip/Tooltip.vue'
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
TooltipRoot,
|
|
5
5
|
injectTooltipProviderContext,
|
|
6
6
|
injectTooltipRootContext,
|
|
7
|
-
} from '
|
|
7
|
+
} from '../../primitives/tooltip'
|
|
8
8
|
import TooltipBubble from './TooltipBubble.vue'
|
|
9
9
|
import { useTooltipTarget } from './composables/useTooltipTarget'
|
|
10
10
|
import type { TooltipDirectiveOptions } from './types'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onScopeDispose, watch, watchPostEffect } from 'vue'
|
|
2
2
|
import { useEventListener } from '@vueuse/core'
|
|
3
|
-
import { injectTooltipProviderContext, injectTooltipRootContext } from '
|
|
3
|
+
import { injectTooltipProviderContext, injectTooltipRootContext } from '../../../primitives/tooltip'
|
|
4
4
|
|
|
5
5
|
type Handler = (event: Event) => void
|
|
6
6
|
|
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, nextTick, onMounted, ref, shallowRef, useId, watch, watchEffect } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
beaconPoint,
|
|
5
|
+
clampTourStep,
|
|
6
|
+
hideOutsideTour,
|
|
7
|
+
resolveTourTarget,
|
|
8
|
+
revealTourTarget,
|
|
9
|
+
runTourChange,
|
|
10
|
+
spotlightMask,
|
|
11
|
+
spotlightRect,
|
|
12
|
+
spotlightShape,
|
|
13
|
+
TOUR_ARROW_HEIGHT,
|
|
14
|
+
TOUR_ARROW_PADDING,
|
|
15
|
+
TOUR_ARROW_PATH,
|
|
16
|
+
TOUR_ARROW_WIDTH,
|
|
17
|
+
TOUR_PADDING,
|
|
18
|
+
TOUR_RADIUS,
|
|
19
|
+
TOUR_SIDE_OFFSET,
|
|
20
|
+
tourBeaconOnArrival,
|
|
21
|
+
tourKeyAction,
|
|
22
|
+
tourReference,
|
|
23
|
+
tourTargetBlocked,
|
|
24
|
+
trapTourFocus,
|
|
25
|
+
watchTourTarget,
|
|
26
|
+
type TourRect,
|
|
27
|
+
type TourSpotlight,
|
|
28
|
+
} from '../../../../shared/src/lib/tour'
|
|
29
|
+
import { DismissableLayer } from '../../primitives/dismissable-layer'
|
|
30
|
+
import { PopperArrow, PopperContent, PopperRoot } from '../../primitives/popper'
|
|
31
|
+
import { Presence } from '../../primitives/presence'
|
|
32
|
+
import { Teleport as TeleportPrimitive } from '../../primitives/teleport'
|
|
33
|
+
import { cn } from '../../lib/cn'
|
|
34
|
+
import { devWarn } from '../../lib/dev'
|
|
35
|
+
import { useDirection } from '../../lib/useDirection'
|
|
36
|
+
import { useUiLocale } from '../../locale'
|
|
37
|
+
import Button from '../button/Button.vue'
|
|
38
|
+
import Card from '../card/Card.vue'
|
|
39
|
+
import CloseButton from '../close-button/CloseButton.vue'
|
|
40
|
+
import Text from '../text/Text.vue'
|
|
41
|
+
import {
|
|
42
|
+
tourBeacon,
|
|
43
|
+
tourBeaconDot,
|
|
44
|
+
tourBeaconPulse,
|
|
45
|
+
tourBlocker,
|
|
46
|
+
tourCard,
|
|
47
|
+
tourCentered,
|
|
48
|
+
tourFooter,
|
|
49
|
+
tourHeader,
|
|
50
|
+
tourMask,
|
|
51
|
+
} from './tour.variants'
|
|
52
|
+
import type { TourExpose, TourProps, TourSlotProps, TourStep } from './types'
|
|
53
|
+
|
|
54
|
+
defineOptions({ name: 'HnTour' })
|
|
55
|
+
|
|
56
|
+
const props = withDefaults(defineProps<TourProps>(), { mask: true, blockTarget: false })
|
|
57
|
+
const emit = defineEmits<{ finish: []; skip: [] }>()
|
|
58
|
+
defineSlots<{
|
|
59
|
+
content?(props: TourSlotProps): unknown
|
|
60
|
+
footer?(props: TourSlotProps): unknown
|
|
61
|
+
}>()
|
|
62
|
+
|
|
63
|
+
const open = defineModel<boolean>('open', { default: false })
|
|
64
|
+
const step = defineModel<number>('step', { default: 1 })
|
|
65
|
+
|
|
66
|
+
const t = useUiLocale()
|
|
67
|
+
const titleId = useId()
|
|
68
|
+
const descriptionId = useId()
|
|
69
|
+
const { root, direction } = useDirection(() => props.dir)
|
|
70
|
+
|
|
71
|
+
const total = computed(() => props.steps.length)
|
|
72
|
+
const current = computed(() => clampTourStep(step.value, total.value))
|
|
73
|
+
const currentStep = computed<TourStep>(() => props.steps[current.value - 1] ?? {})
|
|
74
|
+
const isLast = computed(() => current.value >= total.value)
|
|
75
|
+
const busy = ref(false)
|
|
76
|
+
const beaconPending = ref(false)
|
|
77
|
+
const resolvedFor = ref<number | null>(null)
|
|
78
|
+
const target = shallowRef<HTMLElement | null>(null)
|
|
79
|
+
const hole = ref<TourRect | null>(null)
|
|
80
|
+
const targetRect = ref<TourRect | null>(null)
|
|
81
|
+
const viewport = ref({ width: 0, height: 0 })
|
|
82
|
+
|
|
83
|
+
const padding = computed(() => currentStep.value.padding ?? TOUR_PADDING)
|
|
84
|
+
const active = computed(() => open.value && total.value > 0)
|
|
85
|
+
const resolved = computed(() => active.value && resolvedFor.value !== null)
|
|
86
|
+
const beaconVisible = computed(() => resolved.value && !!target.value && beaconPending.value)
|
|
87
|
+
const cardVisible = computed(() => resolved.value && !beaconVisible.value)
|
|
88
|
+
const maskVisible = computed(() => cardVisible.value && props.mask)
|
|
89
|
+
const modal = computed(() => props.mask)
|
|
90
|
+
const blocked = computed(() => tourTargetBlocked(currentStep.value, props.blockTarget))
|
|
91
|
+
const blocking = computed(() => cardVisible.value && !!hole.value && blocked.value)
|
|
92
|
+
|
|
93
|
+
const spotlight = computed(() =>
|
|
94
|
+
hole.value
|
|
95
|
+
? spotlightShape(viewport.value, hole.value, currentStep.value.radius ?? TOUR_RADIUS)
|
|
96
|
+
: null,
|
|
97
|
+
)
|
|
98
|
+
const lastSpotlight = shallowRef<TourSpotlight | null>(null)
|
|
99
|
+
const spotlightState = computed(() => spotlightMask(spotlight.value, lastSpotlight.value))
|
|
100
|
+
const holeStyle = computed(() =>
|
|
101
|
+
hole.value
|
|
102
|
+
? {
|
|
103
|
+
left: `${hole.value.x}px`,
|
|
104
|
+
top: `${hole.value.y}px`,
|
|
105
|
+
width: `${hole.value.width}px`,
|
|
106
|
+
height: `${hole.value.height}px`,
|
|
107
|
+
}
|
|
108
|
+
: undefined,
|
|
109
|
+
)
|
|
110
|
+
const beaconStyle = computed(() => {
|
|
111
|
+
if (!targetRect.value) return undefined
|
|
112
|
+
const point = beaconPoint(targetRect.value, direction.value)
|
|
113
|
+
return { left: `${point.x}px`, top: `${point.y}px` }
|
|
114
|
+
})
|
|
115
|
+
const reference = computed(() =>
|
|
116
|
+
target.value ? tourReference(target.value, padding.value) : undefined,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
const card = shallowRef<{ $el: HTMLElement } | null>(null)
|
|
120
|
+
const layer = shallowRef<{ $el: HTMLElement } | null>(null)
|
|
121
|
+
const beaconButton = shallowRef<HTMLButtonElement | null>(null)
|
|
122
|
+
let returnFocus: HTMLElement | null = null
|
|
123
|
+
|
|
124
|
+
const mounted = ref(false)
|
|
125
|
+
let navigated = false
|
|
126
|
+
|
|
127
|
+
function resolveTarget() {
|
|
128
|
+
if (!mounted.value || !active.value) return
|
|
129
|
+
const definition = currentStep.value.target
|
|
130
|
+
const element = resolveTourTarget(definition)
|
|
131
|
+
if (definition && !element)
|
|
132
|
+
devWarn('Tour', `the target of step ${current.value} was not found; the card is centered`)
|
|
133
|
+
target.value = element
|
|
134
|
+
root.value = element ?? document.documentElement
|
|
135
|
+
resolvedFor.value = current.value
|
|
136
|
+
if (element && currentStep.value.scroll !== false) revealTourTarget(element)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
watch([active, current, () => props.steps], resolveTarget, { flush: 'post' })
|
|
140
|
+
|
|
141
|
+
onMounted(() => {
|
|
142
|
+
mounted.value = true
|
|
143
|
+
beaconPending.value = tourBeaconOnArrival(currentStep.value, !!props.beacon, false)
|
|
144
|
+
resolveTarget()
|
|
145
|
+
if (!active.value) return
|
|
146
|
+
returnFocus = document.activeElement as HTMLElement | null
|
|
147
|
+
void nextTick(() => {
|
|
148
|
+
if (cardVisible.value) card.value?.$el.focus({ preventScroll: true })
|
|
149
|
+
})
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
watch([active, current], ([isActive], [wasActive]) => {
|
|
153
|
+
const focusInCard = !!card.value?.$el.contains(document.activeElement)
|
|
154
|
+
beaconPending.value = tourBeaconOnArrival(
|
|
155
|
+
currentStep.value,
|
|
156
|
+
!!props.beacon,
|
|
157
|
+
!!isActive && !!wasActive && navigated,
|
|
158
|
+
)
|
|
159
|
+
navigated = false
|
|
160
|
+
if (!isActive) {
|
|
161
|
+
resolvedFor.value = null
|
|
162
|
+
lastSpotlight.value = null
|
|
163
|
+
}
|
|
164
|
+
if (isActive && !wasActive) returnFocus = document.activeElement as HTMLElement | null
|
|
165
|
+
if (!isActive && wasActive) void nextTick(restoreFocus)
|
|
166
|
+
if (isActive && wasActive && focusInCard)
|
|
167
|
+
void nextTick(() => {
|
|
168
|
+
if (beaconVisible.value) beaconButton.value?.focus()
|
|
169
|
+
})
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
watch([spotlight, maskVisible], ([value, visible]) => {
|
|
173
|
+
if (value && visible) lastSpotlight.value = value
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
watch(cardVisible, visible => {
|
|
177
|
+
if (visible) void nextTick(() => card.value?.$el.focus({ preventScroll: true }))
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
watchEffect(onCleanup => {
|
|
181
|
+
const element = target.value
|
|
182
|
+
if (!mounted.value || !active.value) return
|
|
183
|
+
const update = () => {
|
|
184
|
+
viewport.value = { width: window.innerWidth, height: window.innerHeight }
|
|
185
|
+
if (!element) {
|
|
186
|
+
hole.value = null
|
|
187
|
+
targetRect.value = null
|
|
188
|
+
return
|
|
189
|
+
}
|
|
190
|
+
const rect = element.getBoundingClientRect()
|
|
191
|
+
targetRect.value = spotlightRect(rect, 0)
|
|
192
|
+
hole.value = spotlightRect(rect, padding.value)
|
|
193
|
+
}
|
|
194
|
+
if (!element) {
|
|
195
|
+
update()
|
|
196
|
+
window.addEventListener('resize', update)
|
|
197
|
+
onCleanup(() => window.removeEventListener('resize', update))
|
|
198
|
+
return
|
|
199
|
+
}
|
|
200
|
+
onCleanup(watchTourTarget(element, update))
|
|
201
|
+
})
|
|
202
|
+
|
|
203
|
+
watchEffect(
|
|
204
|
+
onCleanup => {
|
|
205
|
+
if (!cardVisible.value || !modal.value) return
|
|
206
|
+
const layerElement = layer.value?.$el as HTMLElement | undefined
|
|
207
|
+
if (!layerElement?.isConnected) return
|
|
208
|
+
const reachable = !blocked.value
|
|
209
|
+
const element = target.value
|
|
210
|
+
onCleanup(hideOutsideTour([layerElement, element]))
|
|
211
|
+
onCleanup(
|
|
212
|
+
trapTourFocus(
|
|
213
|
+
() => [card.value?.$el, reachable ? element : null],
|
|
214
|
+
() => layer.value?.$el,
|
|
215
|
+
),
|
|
216
|
+
)
|
|
217
|
+
},
|
|
218
|
+
{ flush: 'post' },
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
function restoreFocus() {
|
|
222
|
+
const focus = returnFocus
|
|
223
|
+
returnFocus = null
|
|
224
|
+
if (!focus?.isConnected) return
|
|
225
|
+
const focused = document.activeElement
|
|
226
|
+
if (!focused || focused === document.body || focused.closest('[data-hn-tour]'))
|
|
227
|
+
focus.focus({ preventScroll: true })
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
async function goTo(value: number) {
|
|
231
|
+
if (busy.value || !total.value) return
|
|
232
|
+
const next = clampTourStep(value, total.value)
|
|
233
|
+
if (next === current.value) return
|
|
234
|
+
const allowed = await runTourChange(
|
|
235
|
+
props.beforeChange,
|
|
236
|
+
next,
|
|
237
|
+
current.value,
|
|
238
|
+
state => (busy.value = state),
|
|
239
|
+
)
|
|
240
|
+
if (!allowed) return
|
|
241
|
+
navigated = true
|
|
242
|
+
step.value = next
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
async function next() {
|
|
246
|
+
if (busy.value) return
|
|
247
|
+
if (isLast.value) {
|
|
248
|
+
finish()
|
|
249
|
+
return
|
|
250
|
+
}
|
|
251
|
+
await goTo(current.value + 1)
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
async function prev() {
|
|
255
|
+
await goTo(current.value - 1)
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function finish() {
|
|
259
|
+
emit('finish')
|
|
260
|
+
open.value = false
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function skip() {
|
|
264
|
+
if (busy.value) return
|
|
265
|
+
emit('skip')
|
|
266
|
+
open.value = false
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
function close() {
|
|
270
|
+
open.value = false
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function onEscape(event: KeyboardEvent) {
|
|
274
|
+
if (props.locked || busy.value) event.preventDefault()
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function preventDismiss(event: Event) {
|
|
278
|
+
event.preventDefault()
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function onKeydown(event: KeyboardEvent) {
|
|
282
|
+
const action = tourKeyAction(event, direction.value)
|
|
283
|
+
if (!action) return
|
|
284
|
+
event.preventDefault()
|
|
285
|
+
if (action === 'next') {
|
|
286
|
+
if (!isLast.value) void next()
|
|
287
|
+
} else if (current.value > 1) void prev()
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
const slotProps = computed<TourSlotProps>(() => ({
|
|
291
|
+
step: currentStep.value,
|
|
292
|
+
current: current.value,
|
|
293
|
+
total: total.value,
|
|
294
|
+
busy: busy.value,
|
|
295
|
+
next: () => void next(),
|
|
296
|
+
prev: () => void prev(),
|
|
297
|
+
skip,
|
|
298
|
+
}))
|
|
299
|
+
|
|
300
|
+
const popperProps = computed(() =>
|
|
301
|
+
target.value
|
|
302
|
+
? {
|
|
303
|
+
asChild: true,
|
|
304
|
+
reference: reference.value,
|
|
305
|
+
side: currentStep.value.side ?? 'bottom',
|
|
306
|
+
align: currentStep.value.align ?? 'center',
|
|
307
|
+
sideOffset: TOUR_SIDE_OFFSET,
|
|
308
|
+
collisionPadding: 16,
|
|
309
|
+
arrowPadding: TOUR_ARROW_PADDING,
|
|
310
|
+
}
|
|
311
|
+
: {
|
|
312
|
+
class: cn(tourCentered(), 'hn-anim-pop'),
|
|
313
|
+
'data-state': cardVisible.value ? 'open' : 'closed',
|
|
314
|
+
},
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
defineExpose<TourExpose>({ next, prev, goTo, close })
|
|
318
|
+
</script>
|
|
319
|
+
|
|
320
|
+
<template>
|
|
321
|
+
<TeleportPrimitive v-if="total > 0">
|
|
322
|
+
<div
|
|
323
|
+
data-hn-tour-blocker
|
|
324
|
+
aria-hidden="true"
|
|
325
|
+
:hidden="!blocking"
|
|
326
|
+
:class="tourBlocker()"
|
|
327
|
+
:style="blocking ? holeStyle : undefined"
|
|
328
|
+
/>
|
|
329
|
+
<Presence :present="maskVisible">
|
|
330
|
+
<div
|
|
331
|
+
data-hn-tour-mask
|
|
332
|
+
aria-hidden="true"
|
|
333
|
+
:data-state="maskVisible ? 'open' : 'closed'"
|
|
334
|
+
:data-hn-tour-hole="spotlightState.hole"
|
|
335
|
+
:class="tourMask()"
|
|
336
|
+
:style="spotlightState.style"
|
|
337
|
+
/>
|
|
338
|
+
</Presence>
|
|
339
|
+
<button
|
|
340
|
+
v-if="beaconVisible"
|
|
341
|
+
ref="beaconButton"
|
|
342
|
+
type="button"
|
|
343
|
+
data-hn-tour-beacon
|
|
344
|
+
:aria-label="t.tour.beacon(current, currentStep.title ?? '')"
|
|
345
|
+
:class="tourBeacon()"
|
|
346
|
+
:style="beaconStyle"
|
|
347
|
+
@click="beaconPending = false"
|
|
348
|
+
>
|
|
349
|
+
<span :class="tourBeaconPulse()" />
|
|
350
|
+
<span :class="tourBeaconDot()" />
|
|
351
|
+
</button>
|
|
352
|
+
<PopperRoot>
|
|
353
|
+
<Presence :present="cardVisible">
|
|
354
|
+
<DismissableLayer
|
|
355
|
+
ref="layer"
|
|
356
|
+
as-child
|
|
357
|
+
@escape-key-down="onEscape"
|
|
358
|
+
@pointer-down-outside="preventDismiss"
|
|
359
|
+
@focus-outside="preventDismiss"
|
|
360
|
+
@dismiss="skip"
|
|
361
|
+
>
|
|
362
|
+
<component :is="target ? PopperContent : 'div'" v-bind="popperProps">
|
|
363
|
+
<Card
|
|
364
|
+
ref="card"
|
|
365
|
+
data-hn-tour
|
|
366
|
+
:data-step="current"
|
|
367
|
+
:data-state="cardVisible ? 'open' : 'closed'"
|
|
368
|
+
:padded="false"
|
|
369
|
+
role="dialog"
|
|
370
|
+
tabindex="-1"
|
|
371
|
+
:dir="direction"
|
|
372
|
+
:aria-modal="modal ? 'true' : undefined"
|
|
373
|
+
:aria-labelledby="currentStep.title ? titleId : undefined"
|
|
374
|
+
:aria-describedby="
|
|
375
|
+
currentStep.description || $slots.content ? descriptionId : undefined
|
|
376
|
+
"
|
|
377
|
+
:aria-busy="busy || undefined"
|
|
378
|
+
:class="cn(tourCard(), target && 'hn-anim-pop', props.class)"
|
|
379
|
+
@keydown="onKeydown"
|
|
380
|
+
>
|
|
381
|
+
<div v-if="currentStep.title || !props.locked" :class="tourHeader()">
|
|
382
|
+
<Text v-if="currentStep.title" :id="titleId" weight="medium" class="min-w-0 flex-1">
|
|
383
|
+
{{ currentStep.title }}
|
|
384
|
+
</Text>
|
|
385
|
+
<CloseButton
|
|
386
|
+
v-if="!props.locked"
|
|
387
|
+
data-hn-tour-skip
|
|
388
|
+
class="ms-auto -me-1.5 -mt-1.5"
|
|
389
|
+
:label="props.skipText ?? t.tour.skip"
|
|
390
|
+
:disabled="busy"
|
|
391
|
+
@click="skip"
|
|
392
|
+
/>
|
|
393
|
+
</div>
|
|
394
|
+
<div v-if="currentStep.description || $slots.content" :id="descriptionId">
|
|
395
|
+
<slot name="content" v-bind="slotProps">
|
|
396
|
+
<Text tone="muted" size="sm">{{ currentStep.description }}</Text>
|
|
397
|
+
</slot>
|
|
398
|
+
</div>
|
|
399
|
+
<PopperArrow
|
|
400
|
+
v-if="target"
|
|
401
|
+
data-hn-tour-arrow
|
|
402
|
+
:width="TOUR_ARROW_WIDTH"
|
|
403
|
+
:height="TOUR_ARROW_HEIGHT"
|
|
404
|
+
class="overflow-visible"
|
|
405
|
+
>
|
|
406
|
+
<path :d="`${TOUR_ARROW_PATH}Z`" class="fill-surface" />
|
|
407
|
+
<path
|
|
408
|
+
:d="TOUR_ARROW_PATH"
|
|
409
|
+
fill="none"
|
|
410
|
+
class="stroke-line"
|
|
411
|
+
vector-effect="non-scaling-stroke"
|
|
412
|
+
/>
|
|
413
|
+
</PopperArrow>
|
|
414
|
+
<slot name="footer" v-bind="slotProps">
|
|
415
|
+
<div :class="tourFooter()">
|
|
416
|
+
<Text as="span" tone="muted" size="sm" class="tabular-nums">
|
|
417
|
+
{{ t.tour.progress(current, total) }}
|
|
418
|
+
</Text>
|
|
419
|
+
<div class="ms-auto flex gap-2">
|
|
420
|
+
<Button
|
|
421
|
+
v-if="current > 1"
|
|
422
|
+
data-hn-tour-prev
|
|
423
|
+
size="sm"
|
|
424
|
+
variant="soft"
|
|
425
|
+
tone="neutral"
|
|
426
|
+
:disabled="busy"
|
|
427
|
+
@click="prev"
|
|
428
|
+
>
|
|
429
|
+
{{ props.prevText ?? t.tour.prev }}
|
|
430
|
+
</Button>
|
|
431
|
+
<Button data-hn-tour-next size="sm" :loading="busy" @click="next">
|
|
432
|
+
{{
|
|
433
|
+
isLast
|
|
434
|
+
? (props.finishText ?? t.tour.finish)
|
|
435
|
+
: (props.nextText ?? t.tour.next)
|
|
436
|
+
}}
|
|
437
|
+
</Button>
|
|
438
|
+
</div>
|
|
439
|
+
</div>
|
|
440
|
+
</slot>
|
|
441
|
+
</Card>
|
|
442
|
+
</component>
|
|
443
|
+
</DismissableLayer>
|
|
444
|
+
</Presence>
|
|
445
|
+
</PopperRoot>
|
|
446
|
+
</TeleportPrimitive>
|
|
447
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../../../shared/src/variants/tour'
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
TourAlign,
|
|
3
|
+
TourBeforeChange,
|
|
4
|
+
TourSide,
|
|
5
|
+
TourStepBase,
|
|
6
|
+
TourTarget,
|
|
7
|
+
} from '../../../../shared/src/lib/tour'
|
|
8
|
+
|
|
9
|
+
export type { TourAlign, TourBeforeChange, TourSide, TourTarget }
|
|
10
|
+
|
|
11
|
+
export type TourStep = TourStepBase
|
|
12
|
+
|
|
13
|
+
export interface TourProps {
|
|
14
|
+
steps: TourStep[]
|
|
15
|
+
mask?: boolean
|
|
16
|
+
locked?: boolean
|
|
17
|
+
beacon?: boolean
|
|
18
|
+
blockTarget?: boolean
|
|
19
|
+
nextText?: string
|
|
20
|
+
prevText?: string
|
|
21
|
+
finishText?: string
|
|
22
|
+
skipText?: string
|
|
23
|
+
beforeChange?: TourBeforeChange
|
|
24
|
+
dir?: 'ltr' | 'rtl'
|
|
25
|
+
class?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface TourSlotProps {
|
|
29
|
+
step: TourStep
|
|
30
|
+
current: number
|
|
31
|
+
total: number
|
|
32
|
+
busy: boolean
|
|
33
|
+
next: () => void
|
|
34
|
+
prev: () => void
|
|
35
|
+
skip: () => void
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface TourExpose {
|
|
39
|
+
next: () => Promise<void>
|
|
40
|
+
prev: () => Promise<void>
|
|
41
|
+
goTo: (step: number) => Promise<void>
|
|
42
|
+
close: () => void
|
|
43
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { TreeItem, TreeRoot } from '
|
|
2
|
+
import { TreeItem, TreeRoot } from '../../primitives/tree'
|
|
3
3
|
import { cn } from '../../lib/cn'
|
|
4
4
|
import { useUiLocale } from '../../locale'
|
|
5
5
|
import { useFieldControl } from '../form-field/context'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts" generic="T extends { label: string; disabled?: boolean }">
|
|
2
2
|
import { shallowRef, watch } from 'vue'
|
|
3
|
-
import type { FlattenedItem } from '
|
|
3
|
+
import type { FlattenedItem } from '../../primitives/tree'
|
|
4
4
|
import type { VirtualizeOptions } from '../../lib/virtual/types'
|
|
5
5
|
import ScrollArea from '../scroll-area/ScrollArea.vue'
|
|
6
6
|
import VirtualTreeWindow from './VirtualTreeWindow.vue'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts" generic="T extends { label: string; disabled?: boolean }">
|
|
2
2
|
import { toRef } from 'vue'
|
|
3
|
-
import type { FlattenedItem } from '
|
|
3
|
+
import type { FlattenedItem } from '../../primitives/tree'
|
|
4
4
|
import type { VirtualizeOptions } from '../../lib/virtual/types'
|
|
5
5
|
import { useVirtualTree } from '../../lib/reka/useVirtualTree'
|
|
6
6
|
import { virtualListContent, virtualListItem } from '../virtual-list/virtual-list.variants'
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
PopoverPortal,
|
|
7
7
|
PopoverRoot,
|
|
8
8
|
PopoverTrigger,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from 'reka-ui'
|
|
9
|
+
} from '../../primitives/popover'
|
|
10
|
+
import { TreeItem, TreeRoot } from '../../primitives/tree'
|
|
12
11
|
import { cn } from '../../lib/cn'
|
|
13
12
|
import { rekaPopoverStyle } from '../../lib/reka/styles'
|
|
14
13
|
import { useUiLocale } from '../../locale'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, ref, shallowRef, watch, type Ref } from 'vue'
|
|
2
|
-
import {
|
|
2
|
+
import { createCollatorFilter } from '../../../../../shared/src/lib/virtual/filter'
|
|
3
3
|
import { findNode, pathTo, type TreeSelectNode } from '../types'
|
|
4
4
|
import { filterTree } from '../utils/filterTree'
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ export function useTreeSelect(
|
|
|
26
26
|
focusLast(): void
|
|
27
27
|
isFirst(element: EventTarget | null): boolean
|
|
28
28
|
}>()
|
|
29
|
-
const { contains } =
|
|
29
|
+
const { contains } = createCollatorFilter({ sensitivity: 'base' })
|
|
30
30
|
const query = computed(() => (props.searchable ? search.value.trim() : ''))
|
|
31
31
|
const filtered = computed(() =>
|
|
32
32
|
query.value ? filterTree(props.items, node => contains(node.label, query.value)) : null,
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,10 @@ export type { Bezier, TransitionName } from './motion'
|
|
|
8
8
|
export { provideUiLocale, useUiLocale, zhCN, enUS, jaJP } from './locale'
|
|
9
9
|
export type { UiMessages, PartialUiMessages } from './locale'
|
|
10
10
|
|
|
11
|
+
export { default as ConfigProvider } from './components/config-provider/ConfigProvider.vue'
|
|
12
|
+
export { useConfig } from './components/config-provider/useConfig'
|
|
13
|
+
export type { ConfigProviderProps, ScrollBodyOption } from './components/config-provider/types'
|
|
14
|
+
|
|
11
15
|
export { REQUIRED_SINGLETONS } from './singletons'
|
|
12
16
|
export type { RequiredSingleton } from './singletons'
|
|
13
17
|
|
|
@@ -139,6 +143,17 @@ export { default as Rating } from './components/rating/Rating.vue'
|
|
|
139
143
|
export { default as FileUpload } from './components/file-upload/FileUpload.vue'
|
|
140
144
|
export { default as AlertDialog } from './components/alert-dialog/AlertDialog.vue'
|
|
141
145
|
export { default as Popconfirm } from './components/popconfirm/Popconfirm.vue'
|
|
146
|
+
export { default as Tour } from './components/tour/Tour.vue'
|
|
147
|
+
export type {
|
|
148
|
+
TourAlign,
|
|
149
|
+
TourBeforeChange,
|
|
150
|
+
TourExpose,
|
|
151
|
+
TourProps,
|
|
152
|
+
TourSide,
|
|
153
|
+
TourSlotProps,
|
|
154
|
+
TourStep,
|
|
155
|
+
TourTarget,
|
|
156
|
+
} from './components/tour/types'
|
|
142
157
|
export { default as HoverCard } from './components/hover-card/HoverCard.vue'
|
|
143
158
|
export { default as ContextMenu } from './components/context-menu/ContextMenu.vue'
|
|
144
159
|
export { default as ContextMenuItem } from './components/context-menu/ContextMenuItem.vue'
|
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
type OverlayAnchor,
|
|
9
9
|
type OverlayPositionStrategy,
|
|
10
10
|
} from './overlay-anchor'
|
|
11
|
-
import {
|
|
11
|
+
import { type DropdownMenuContentEmits } from '../primitives/dropdown-menu'
|
|
12
|
+
import { useForwardExpose } from '../primitives/utils/useForwardExpose'
|
|
12
13
|
|
|
13
14
|
export function useAnchoredOverlay(
|
|
14
15
|
props: {
|
package/src/lib/dialog-focus.ts
CHANGED