@hina-ui/vue 1.7.12 → 1.7.14
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 +25634 -9251
- package/dist/index.js.map +1 -1
- package/dist/shared/lib/thumbhash.ts +12 -0
- package/dist/shared/lib/tour-engine.ts +721 -0
- package/dist/shared/lib/tour.ts +439 -0
- package/dist/shared/locale/en-US.ts +9 -0
- package/dist/shared/locale/index.ts +1 -0
- package/dist/shared/locale/ja-JP.ts +10 -0
- package/dist/shared/locale/types.ts +9 -0
- package/dist/shared/locale/zh-CN.ts +9 -0
- package/dist/shared/primitives/combobox/LICENSE +44 -0
- package/dist/shared/primitives/combobox/index.ts +49 -0
- package/dist/shared/primitives/date/LICENSE +21 -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/dismissable-layer/index.ts +48 -1
- package/dist/shared/primitives/focus-scope/index.ts +5 -3
- 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/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/semantic.css +1 -0
- package/dist/shared/styles/tokens.css +1 -0
- package/dist/shared/styles/tour.css +134 -0
- package/dist/shared/variants/image.ts +28 -0
- package/dist/shared/variants/nav-link.ts +6 -2
- package/dist/shared/variants/tour.ts +47 -0
- package/dist/types/shared/src/lib/thumbhash.d.ts +2 -0
- package/dist/types/shared/src/lib/thumbhash.d.ts.map +1 -0
- package/dist/types/shared/src/lib/tour-engine.d.ts +47 -0
- package/dist/types/shared/src/lib/tour-engine.d.ts.map +1 -0
- package/dist/types/shared/src/lib/tour.d.ts +137 -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 +9 -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/dismissable-layer/index.d.ts +1 -0
- package/dist/types/shared/src/primitives/dismissable-layer/index.d.ts.map +1 -1
- 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/focus-scope/index.d.ts.map +1 -1
- 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/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/image.d.ts +35 -0
- package/dist/types/shared/src/variants/image.d.ts.map +1 -1
- 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/tour.d.ts +15 -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/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/dialog/ModalContent.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/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 +2 -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 +2 -0
- 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/overlay-branch/OverlayBranch.vue.d.ts +17 -0
- package/dist/types/vue/src/components/overlay-branch/OverlayBranch.vue.d.ts.map +1 -0
- package/dist/types/vue/src/components/pagination/composables/usePaginationWindow.d.ts +6 -6
- 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 +4 -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 +43 -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 +39 -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 +6 -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/listbox/ListboxRoot.d.ts +156 -0
- 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/tags-input/TagsInputInput.d.ts +61 -0
- 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 +6 -5
- package/src/components/alert-dialog/AlertDialog.vue +1 -1
- package/src/components/button/Button.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 +15 -2
- package/src/components/dialog/ModalContent.vue +2 -1
- package/src/components/drawer/Drawer.vue +15 -2
- 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/Image.vue +58 -24
- package/src/components/image/composables/useImage.ts +46 -21
- 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/overlay-branch/OverlayBranch.vue +14 -0
- package/src/components/pagination/PaginationPopup.vue +1 -1
- 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 +15 -2
- 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 +608 -0
- package/src/components/tour/tour.variants.ts +1 -0
- package/src/components/tour/types.ts +74 -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 +26 -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/LICENSE +44 -0
- 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 +27 -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
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
computed,
|
|
4
|
+
nextTick,
|
|
5
|
+
onBeforeUnmount,
|
|
6
|
+
onMounted,
|
|
7
|
+
ref,
|
|
8
|
+
shallowRef,
|
|
9
|
+
useId,
|
|
10
|
+
watch,
|
|
11
|
+
watchEffect,
|
|
12
|
+
} from 'vue'
|
|
13
|
+
import { RotateCcw } from '@lucide/vue'
|
|
14
|
+
import {
|
|
15
|
+
beaconPoint,
|
|
16
|
+
clampTourStep,
|
|
17
|
+
hideOutsideTour,
|
|
18
|
+
listenTourKeys,
|
|
19
|
+
runTourChange,
|
|
20
|
+
spotlightMask,
|
|
21
|
+
spotlightShape,
|
|
22
|
+
TOUR_ARROW_HEIGHT,
|
|
23
|
+
TOUR_ARROW_PADDING,
|
|
24
|
+
TOUR_ARROW_PATH,
|
|
25
|
+
TOUR_ARROW_WIDTH,
|
|
26
|
+
TOUR_SIDE_OFFSET,
|
|
27
|
+
tourBeaconOnArrival,
|
|
28
|
+
tourKeyAction,
|
|
29
|
+
tourOwnsInput,
|
|
30
|
+
tourCardGap,
|
|
31
|
+
tourPageBlocked,
|
|
32
|
+
tourReference,
|
|
33
|
+
tourTargetBlocked,
|
|
34
|
+
trapTourFocus,
|
|
35
|
+
type TourCloseReason,
|
|
36
|
+
type TourPointerKind,
|
|
37
|
+
type TourRect,
|
|
38
|
+
type TourSpotlight,
|
|
39
|
+
} from '../../../../shared/src/lib/tour'
|
|
40
|
+
import { createTourEngine } from '../../../../shared/src/lib/tour-engine'
|
|
41
|
+
import { addBranch } from '../../../../shared/src/primitives/dismissable-layer'
|
|
42
|
+
import { DismissableLayer } from '../../primitives/dismissable-layer'
|
|
43
|
+
import { PopperArrow, PopperContent, PopperRoot } from '../../primitives/popper'
|
|
44
|
+
import { Presence } from '../../primitives/presence'
|
|
45
|
+
import { Teleport as TeleportPrimitive } from '../../primitives/teleport'
|
|
46
|
+
import { cn } from '../../lib/cn'
|
|
47
|
+
import { devWarn } from '../../lib/dev'
|
|
48
|
+
import { useDirection } from '../../lib/useDirection'
|
|
49
|
+
import { useUiLocale } from '../../locale'
|
|
50
|
+
import Button from '../button/Button.vue'
|
|
51
|
+
import Card from '../card/Card.vue'
|
|
52
|
+
import CloseButton from '../close-button/CloseButton.vue'
|
|
53
|
+
import IconButton from '../icon-button/IconButton.vue'
|
|
54
|
+
import Text from '../text/Text.vue'
|
|
55
|
+
import {
|
|
56
|
+
tourBeacon,
|
|
57
|
+
tourBeaconDot,
|
|
58
|
+
tourBeaconPulse,
|
|
59
|
+
tourBlocker,
|
|
60
|
+
tourCard,
|
|
61
|
+
tourCentered,
|
|
62
|
+
tourFooter,
|
|
63
|
+
tourHeader,
|
|
64
|
+
tourKey,
|
|
65
|
+
tourKeyCap,
|
|
66
|
+
tourMask,
|
|
67
|
+
tourPointer,
|
|
68
|
+
tourPointerArrow,
|
|
69
|
+
tourPointerTouch,
|
|
70
|
+
} from './tour.variants'
|
|
71
|
+
import type { TourExpose, TourProps, TourSlotProps, TourStep } from './types'
|
|
72
|
+
|
|
73
|
+
defineOptions({ name: 'HnTour' })
|
|
74
|
+
|
|
75
|
+
const props = withDefaults(defineProps<TourProps>(), {
|
|
76
|
+
mask: true,
|
|
77
|
+
blockTarget: false,
|
|
78
|
+
blockPage: false,
|
|
79
|
+
pointer: 'auto',
|
|
80
|
+
})
|
|
81
|
+
const emit = defineEmits<{
|
|
82
|
+
finish: []
|
|
83
|
+
skip: []
|
|
84
|
+
close: [reason: TourCloseReason]
|
|
85
|
+
stepEnter: [step: number]
|
|
86
|
+
stepLeave: [step: number]
|
|
87
|
+
}>()
|
|
88
|
+
defineSlots<{
|
|
89
|
+
content?(props: TourSlotProps): unknown
|
|
90
|
+
footer?(props: TourSlotProps): unknown
|
|
91
|
+
}>()
|
|
92
|
+
|
|
93
|
+
const open = defineModel<boolean>('open', { default: false })
|
|
94
|
+
const step = defineModel<number>('step', { default: 1 })
|
|
95
|
+
|
|
96
|
+
const t = useUiLocale()
|
|
97
|
+
const titleId = useId()
|
|
98
|
+
const descriptionId = useId()
|
|
99
|
+
const { root, direction } = useDirection(() => props.dir)
|
|
100
|
+
|
|
101
|
+
const total = computed(() => props.steps.length)
|
|
102
|
+
const current = computed(() => clampTourStep(step.value, total.value))
|
|
103
|
+
const currentStep = computed<TourStep>(() => props.steps[current.value - 1] ?? {})
|
|
104
|
+
const isLast = computed(() => current.value >= total.value)
|
|
105
|
+
const busy = ref(false)
|
|
106
|
+
const beaconPending = ref(false)
|
|
107
|
+
const entered = ref<number | null>(null)
|
|
108
|
+
const coarse = ref(false)
|
|
109
|
+
|
|
110
|
+
const pointerKind = computed<TourPointerKind>(() =>
|
|
111
|
+
props.pointer === 'auto' ? (coarse.value ? 'touch' : 'mouse') : props.pointer,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
const card = shallowRef<{ $el: HTMLElement } | null>(null)
|
|
115
|
+
const layer = shallowRef<{ $el: HTMLElement } | null>(null)
|
|
116
|
+
const beaconButton = shallowRef<HTMLButtonElement | null>(null)
|
|
117
|
+
const maskElement = shallowRef<HTMLElement | null>(null)
|
|
118
|
+
const blockerElement = shallowRef<HTMLElement | null>(null)
|
|
119
|
+
const pointerElement = shallowRef<HTMLElement | null>(null)
|
|
120
|
+
const keyElement = shallowRef<HTMLElement | null>(null)
|
|
121
|
+
|
|
122
|
+
const engine = createTourEngine({
|
|
123
|
+
pointer: () => pointerElement.value,
|
|
124
|
+
keyBadge: () => keyElement.value,
|
|
125
|
+
pointerKind: () => pointerKind.value,
|
|
126
|
+
cardGap: () => tourCardGap(card.value?.$el),
|
|
127
|
+
})
|
|
128
|
+
const tour = shallowRef(engine.getState())
|
|
129
|
+
const unsubscribe = engine.subscribe(() => (tour.value = engine.getState()))
|
|
130
|
+
|
|
131
|
+
const active = computed(() => open.value && total.value > 0)
|
|
132
|
+
const engaged = computed(() => active.value && entered.value !== null)
|
|
133
|
+
const live = computed(() => engaged.value && entered.value === current.value)
|
|
134
|
+
const status = computed(() => (engaged.value ? tour.value.status : 'idle'))
|
|
135
|
+
const beaconVisible = computed(
|
|
136
|
+
() => live.value && status.value === 'ready' && !!tour.value.hole && beaconPending.value,
|
|
137
|
+
)
|
|
138
|
+
const cardVisible = computed(
|
|
139
|
+
() =>
|
|
140
|
+
live.value &&
|
|
141
|
+
(status.value === 'ready' || status.value === 'missing') &&
|
|
142
|
+
tour.value.settled &&
|
|
143
|
+
!beaconVisible.value,
|
|
144
|
+
)
|
|
145
|
+
let anchoredWhenShown = false
|
|
146
|
+
const anchored = computed(() => {
|
|
147
|
+
if (!cardVisible.value) return anchoredWhenShown
|
|
148
|
+
anchoredWhenShown = status.value === 'ready' && !!tour.value.hole
|
|
149
|
+
return anchoredWhenShown
|
|
150
|
+
})
|
|
151
|
+
let stepWhenShown = current.value
|
|
152
|
+
const shown = computed(() => {
|
|
153
|
+
if (cardVisible.value) stepWhenShown = current.value
|
|
154
|
+
return clampTourStep(stepWhenShown, total.value)
|
|
155
|
+
})
|
|
156
|
+
const shownStep = computed<TourStep>(() => props.steps[shown.value - 1] ?? {})
|
|
157
|
+
const maskVisible = computed(
|
|
158
|
+
() =>
|
|
159
|
+
!!props.mask &&
|
|
160
|
+
status.value !== 'idle' &&
|
|
161
|
+
!beaconVisible.value &&
|
|
162
|
+
!(beaconPending.value && status.value === 'waiting'),
|
|
163
|
+
)
|
|
164
|
+
const modal = computed(() => !!props.mask)
|
|
165
|
+
const scripted = computed(() => !!currentStep.value.play)
|
|
166
|
+
const blocked = computed(() => tourTargetBlocked(currentStep.value, props.blockTarget))
|
|
167
|
+
const pageBlocked = computed(
|
|
168
|
+
() => engaged.value && tourPageBlocked(currentStep.value, props.blockPage),
|
|
169
|
+
)
|
|
170
|
+
const blocking = computed(() => cardVisible.value && !!tour.value.hole && blocked.value)
|
|
171
|
+
const targetElements = computed(() => tour.value.elements)
|
|
172
|
+
|
|
173
|
+
const spotlight = computed(() =>
|
|
174
|
+
tour.value.hole
|
|
175
|
+
? spotlightShape(tour.value.viewport, tour.value.hole, tour.value.radius)
|
|
176
|
+
: null,
|
|
177
|
+
)
|
|
178
|
+
const lastSpotlight = shallowRef<TourSpotlight | null>(null)
|
|
179
|
+
const spotlightState = computed(() => spotlightMask(spotlight.value, lastSpotlight.value))
|
|
180
|
+
const blockerStyle = computed(() => {
|
|
181
|
+
if (pageBlocked.value) return { left: '0px', top: '0px', width: '100%', height: '100%' }
|
|
182
|
+
const hole = tour.value.hole
|
|
183
|
+
if (!blocking.value || !hole) return undefined
|
|
184
|
+
return {
|
|
185
|
+
left: `${hole.x}px`,
|
|
186
|
+
top: `${hole.y}px`,
|
|
187
|
+
width: `${hole.width}px`,
|
|
188
|
+
height: `${hole.height}px`,
|
|
189
|
+
}
|
|
190
|
+
})
|
|
191
|
+
const beaconStyle = computed(() => {
|
|
192
|
+
if (!tour.value.targetRect) return undefined
|
|
193
|
+
const point = beaconPoint(tour.value.targetRect, direction.value)
|
|
194
|
+
return { left: `${point.x}px`, top: `${point.y}px` }
|
|
195
|
+
})
|
|
196
|
+
let holeWhenShown: TourRect | null = null
|
|
197
|
+
const reference = tourReference(() => {
|
|
198
|
+
if (cardVisible.value) holeWhenShown = engine.getState().hole
|
|
199
|
+
return holeWhenShown
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
let returnFocus: HTMLElement | null = null
|
|
203
|
+
let closeReason: TourCloseReason | null = null
|
|
204
|
+
let navigated = false
|
|
205
|
+
let refocusBeacon = false
|
|
206
|
+
const mounted = ref(false)
|
|
207
|
+
|
|
208
|
+
function enterStep() {
|
|
209
|
+
if (!mounted.value) return
|
|
210
|
+
if (!active.value) {
|
|
211
|
+
if (entered.value !== null) exitTour()
|
|
212
|
+
return
|
|
213
|
+
}
|
|
214
|
+
if (entered.value === current.value) return
|
|
215
|
+
const previous = entered.value
|
|
216
|
+
refocusBeacon = !!card.value?.$el.contains(document.activeElement)
|
|
217
|
+
if (previous !== null) {
|
|
218
|
+
engine.leave()
|
|
219
|
+
emit('stepLeave', previous)
|
|
220
|
+
} else {
|
|
221
|
+
returnFocus = document.activeElement as HTMLElement | null
|
|
222
|
+
closeReason = null
|
|
223
|
+
}
|
|
224
|
+
beaconPending.value = tourBeaconOnArrival(
|
|
225
|
+
currentStep.value,
|
|
226
|
+
!!props.beacon,
|
|
227
|
+
previous !== null && navigated,
|
|
228
|
+
)
|
|
229
|
+
navigated = false
|
|
230
|
+
const number = current.value
|
|
231
|
+
entered.value = number
|
|
232
|
+
emit('stepEnter', number)
|
|
233
|
+
void engine.enter(currentStep.value, number).then(result => {
|
|
234
|
+
if (result === 'missing' && entered.value === number)
|
|
235
|
+
devWarn('Tour', `the target of step ${number} was not found; the card is centered`)
|
|
236
|
+
})
|
|
237
|
+
if (!beaconPending.value) engine.play()
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function exitTour() {
|
|
241
|
+
const previous = entered.value
|
|
242
|
+
entered.value = null
|
|
243
|
+
engine.close()
|
|
244
|
+
lastSpotlight.value = null
|
|
245
|
+
if (previous !== null) emit('stepLeave', previous)
|
|
246
|
+
emit('close', closeReason ?? 'close')
|
|
247
|
+
closeReason = null
|
|
248
|
+
void nextTick(restoreFocus)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
watch([active, current], enterStep, { flush: 'post' })
|
|
252
|
+
|
|
253
|
+
onMounted(() => {
|
|
254
|
+
mounted.value = true
|
|
255
|
+
coarse.value = !!window.matchMedia?.('(pointer: coarse)').matches
|
|
256
|
+
enterStep()
|
|
257
|
+
})
|
|
258
|
+
|
|
259
|
+
onBeforeUnmount(() => {
|
|
260
|
+
unsubscribe()
|
|
261
|
+
engine.close()
|
|
262
|
+
})
|
|
263
|
+
|
|
264
|
+
watch([spotlight, maskVisible], ([value, visible]) => {
|
|
265
|
+
if (value && visible) lastSpotlight.value = value
|
|
266
|
+
})
|
|
267
|
+
|
|
268
|
+
watch(targetElements, elements => {
|
|
269
|
+
root.value = elements[0] ?? document.documentElement
|
|
270
|
+
})
|
|
271
|
+
|
|
272
|
+
watch(cardVisible, visible => {
|
|
273
|
+
if (visible) void nextTick(() => card.value?.$el.focus({ preventScroll: true }))
|
|
274
|
+
})
|
|
275
|
+
|
|
276
|
+
watch(beaconVisible, visible => {
|
|
277
|
+
if (!visible || !refocusBeacon) return
|
|
278
|
+
refocusBeacon = false
|
|
279
|
+
void nextTick(() => beaconButton.value?.focus())
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
function useBranch(element: () => HTMLElement | null | undefined) {
|
|
283
|
+
watch(
|
|
284
|
+
element,
|
|
285
|
+
(node, _, onCleanup) => {
|
|
286
|
+
if (node) onCleanup(addBranch(node))
|
|
287
|
+
},
|
|
288
|
+
{ immediate: true, flush: 'post' },
|
|
289
|
+
)
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
useBranch(() => layer.value?.$el)
|
|
293
|
+
useBranch(() => maskElement.value)
|
|
294
|
+
useBranch(() => blockerElement.value)
|
|
295
|
+
useBranch(() => beaconButton.value)
|
|
296
|
+
|
|
297
|
+
const owns = () => tourOwnsInput(layer.value?.$el, scripted.value || pageBlocked.value)
|
|
298
|
+
|
|
299
|
+
watchEffect(
|
|
300
|
+
onCleanup => {
|
|
301
|
+
if (!cardVisible.value || !modal.value) return
|
|
302
|
+
const layerElement = layer.value?.$el as HTMLElement | undefined
|
|
303
|
+
if (!layerElement?.isConnected) return
|
|
304
|
+
const reachable = !blocked.value && !pageBlocked.value
|
|
305
|
+
const elements = targetElements.value
|
|
306
|
+
onCleanup(hideOutsideTour([layerElement, ...elements]))
|
|
307
|
+
onCleanup(trapTourFocus(() => [card.value?.$el, ...(reachable ? elements : [])], owns))
|
|
308
|
+
},
|
|
309
|
+
{ flush: 'post' },
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
watchEffect(onCleanup => {
|
|
313
|
+
if (!engaged.value || beaconVisible.value) return
|
|
314
|
+
onCleanup(listenTourKeys(onKeydown))
|
|
315
|
+
})
|
|
316
|
+
|
|
317
|
+
function restoreFocus() {
|
|
318
|
+
const focus = returnFocus
|
|
319
|
+
returnFocus = null
|
|
320
|
+
if (!focus?.isConnected) return
|
|
321
|
+
const focused = document.activeElement
|
|
322
|
+
if (!focused || focused === document.body || focused.closest('[data-hn-tour]'))
|
|
323
|
+
focus.focus({ preventScroll: true })
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
async function goTo(value: number) {
|
|
327
|
+
if (busy.value || !total.value) return
|
|
328
|
+
const next = clampTourStep(value, total.value)
|
|
329
|
+
if (next === current.value) return
|
|
330
|
+
const allowed = await runTourChange(
|
|
331
|
+
props.beforeChange,
|
|
332
|
+
next,
|
|
333
|
+
current.value,
|
|
334
|
+
state => (busy.value = state),
|
|
335
|
+
)
|
|
336
|
+
if (!allowed) return
|
|
337
|
+
navigated = true
|
|
338
|
+
step.value = next
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
async function next() {
|
|
342
|
+
if (busy.value) return
|
|
343
|
+
if (isLast.value) {
|
|
344
|
+
finish()
|
|
345
|
+
return
|
|
346
|
+
}
|
|
347
|
+
await goTo(current.value + 1)
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
async function prev() {
|
|
351
|
+
await goTo(current.value - 1)
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
function finish() {
|
|
355
|
+
emit('finish')
|
|
356
|
+
closeReason = 'finish'
|
|
357
|
+
open.value = false
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
function skip(reason: 'skip' | 'escape' = 'skip') {
|
|
361
|
+
if (busy.value) return
|
|
362
|
+
emit('skip')
|
|
363
|
+
closeReason = reason
|
|
364
|
+
open.value = false
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
function close() {
|
|
368
|
+
closeReason = 'close'
|
|
369
|
+
open.value = false
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
function replay() {
|
|
373
|
+
if (live.value && !beaconPending.value) engine.replay()
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
function openBeacon() {
|
|
377
|
+
beaconPending.value = false
|
|
378
|
+
engine.play()
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
function preventDismiss(event: Event) {
|
|
382
|
+
event.preventDefault()
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
function onKeydown(event: KeyboardEvent) {
|
|
386
|
+
if (event.defaultPrevented || !owns()) return
|
|
387
|
+
if (event.key === 'Escape') {
|
|
388
|
+
event.preventDefault()
|
|
389
|
+
event.stopPropagation()
|
|
390
|
+
if (!props.locked) skip('escape')
|
|
391
|
+
return
|
|
392
|
+
}
|
|
393
|
+
const action = tourKeyAction(event, direction.value)
|
|
394
|
+
if (!action) return
|
|
395
|
+
event.preventDefault()
|
|
396
|
+
if (action === 'next') {
|
|
397
|
+
if (!isLast.value) void next()
|
|
398
|
+
} else if (current.value > 1) void prev()
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
const slotProps = computed<TourSlotProps>(() => ({
|
|
402
|
+
step: shownStep.value,
|
|
403
|
+
current: shown.value,
|
|
404
|
+
total: total.value,
|
|
405
|
+
busy: busy.value,
|
|
406
|
+
playing: tour.value.playing,
|
|
407
|
+
next: () => void next(),
|
|
408
|
+
prev: () => void prev(),
|
|
409
|
+
skip: () => skip(),
|
|
410
|
+
replay,
|
|
411
|
+
}))
|
|
412
|
+
|
|
413
|
+
const popperProps = computed(() =>
|
|
414
|
+
anchored.value
|
|
415
|
+
? {
|
|
416
|
+
asChild: true,
|
|
417
|
+
reference,
|
|
418
|
+
side: shownStep.value.side ?? 'bottom',
|
|
419
|
+
align: shownStep.value.align ?? 'center',
|
|
420
|
+
sideOffset: TOUR_SIDE_OFFSET,
|
|
421
|
+
collisionPadding: 16,
|
|
422
|
+
arrowPadding: TOUR_ARROW_PADDING,
|
|
423
|
+
prioritizePosition: true,
|
|
424
|
+
sticky: 'always' as const,
|
|
425
|
+
updatePositionStrategy: 'always' as const,
|
|
426
|
+
}
|
|
427
|
+
: {
|
|
428
|
+
class: cn(tourCentered(), 'hn-anim-pop'),
|
|
429
|
+
'data-state': cardVisible.value ? 'open' : 'closed',
|
|
430
|
+
},
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
defineExpose<TourExpose>({ next, prev, goTo, close, replay })
|
|
434
|
+
</script>
|
|
435
|
+
|
|
436
|
+
<template>
|
|
437
|
+
<TeleportPrimitive v-if="total > 0">
|
|
438
|
+
<div
|
|
439
|
+
ref="blockerElement"
|
|
440
|
+
data-hn-tour-blocker
|
|
441
|
+
aria-hidden="true"
|
|
442
|
+
:hidden="!blockerStyle"
|
|
443
|
+
:class="tourBlocker()"
|
|
444
|
+
:style="blockerStyle"
|
|
445
|
+
/>
|
|
446
|
+
<div
|
|
447
|
+
ref="pointerElement"
|
|
448
|
+
data-hn-tour-pointer
|
|
449
|
+
:data-kind="pointerKind"
|
|
450
|
+
data-state="hidden"
|
|
451
|
+
aria-hidden="true"
|
|
452
|
+
:class="tourPointer()"
|
|
453
|
+
>
|
|
454
|
+
<span data-hn-tour-pointer-ring />
|
|
455
|
+
<span data-hn-tour-pointer-ripples />
|
|
456
|
+
<svg
|
|
457
|
+
v-if="pointerKind === 'mouse'"
|
|
458
|
+
data-hn-tour-pointer-glyph
|
|
459
|
+
viewBox="0 0 24 24"
|
|
460
|
+
stroke-width="1.5"
|
|
461
|
+
stroke-linejoin="round"
|
|
462
|
+
:class="tourPointerArrow()"
|
|
463
|
+
>
|
|
464
|
+
<path d="M4 2.5v16.2l4.1-3.9 2.8 6.6 2.9-1.2-2.8-6.5h5.8z" />
|
|
465
|
+
</svg>
|
|
466
|
+
<span v-else data-hn-tour-pointer-glyph :class="tourPointerTouch()" />
|
|
467
|
+
</div>
|
|
468
|
+
<div
|
|
469
|
+
ref="keyElement"
|
|
470
|
+
data-hn-tour-key
|
|
471
|
+
data-state="hidden"
|
|
472
|
+
aria-hidden="true"
|
|
473
|
+
:class="tourKey()"
|
|
474
|
+
>
|
|
475
|
+
<kbd data-hn-tour-key-label :class="tourKeyCap()" />
|
|
476
|
+
</div>
|
|
477
|
+
<Presence :present="maskVisible">
|
|
478
|
+
<div
|
|
479
|
+
ref="maskElement"
|
|
480
|
+
data-hn-tour-mask
|
|
481
|
+
aria-hidden="true"
|
|
482
|
+
:data-state="maskVisible ? 'open' : 'closed'"
|
|
483
|
+
:data-mask="props.mask === 'dim' ? 'dim' : undefined"
|
|
484
|
+
:data-hn-tour-hole="spotlightState.hole"
|
|
485
|
+
:class="tourMask()"
|
|
486
|
+
:style="spotlightState.style"
|
|
487
|
+
/>
|
|
488
|
+
</Presence>
|
|
489
|
+
<button
|
|
490
|
+
v-if="beaconVisible"
|
|
491
|
+
ref="beaconButton"
|
|
492
|
+
type="button"
|
|
493
|
+
data-hn-tour-beacon
|
|
494
|
+
:aria-label="t.tour.beacon(current, currentStep.title ?? '')"
|
|
495
|
+
:class="tourBeacon()"
|
|
496
|
+
:style="beaconStyle"
|
|
497
|
+
@click="openBeacon"
|
|
498
|
+
>
|
|
499
|
+
<span :class="tourBeaconPulse()" />
|
|
500
|
+
<span :class="tourBeaconDot()" />
|
|
501
|
+
</button>
|
|
502
|
+
<PopperRoot>
|
|
503
|
+
<Presence :present="cardVisible">
|
|
504
|
+
<DismissableLayer
|
|
505
|
+
ref="layer"
|
|
506
|
+
as-child
|
|
507
|
+
@escape-key-down="preventDismiss"
|
|
508
|
+
@pointer-down-outside="preventDismiss"
|
|
509
|
+
@focus-outside="preventDismiss"
|
|
510
|
+
>
|
|
511
|
+
<component :is="anchored ? PopperContent : 'div'" v-bind="popperProps">
|
|
512
|
+
<Card
|
|
513
|
+
ref="card"
|
|
514
|
+
data-hn-tour
|
|
515
|
+
:data-step="shown"
|
|
516
|
+
:data-state="cardVisible ? 'open' : 'closed'"
|
|
517
|
+
:padded="false"
|
|
518
|
+
role="dialog"
|
|
519
|
+
tabindex="-1"
|
|
520
|
+
:dir="direction"
|
|
521
|
+
:aria-modal="modal ? 'true' : undefined"
|
|
522
|
+
:aria-labelledby="shownStep.title ? titleId : undefined"
|
|
523
|
+
:aria-describedby="
|
|
524
|
+
shownStep.description || $slots.content ? descriptionId : undefined
|
|
525
|
+
"
|
|
526
|
+
:aria-busy="busy || undefined"
|
|
527
|
+
:class="cn(tourCard(), anchored && 'hn-anim-pop', props.class)"
|
|
528
|
+
>
|
|
529
|
+
<div v-if="shownStep.title || !props.locked" :class="tourHeader()">
|
|
530
|
+
<Text v-if="shownStep.title" :id="titleId" weight="medium" class="min-w-0 flex-1">
|
|
531
|
+
{{ shownStep.title }}
|
|
532
|
+
</Text>
|
|
533
|
+
<CloseButton
|
|
534
|
+
v-if="!props.locked"
|
|
535
|
+
data-hn-tour-skip
|
|
536
|
+
class="ms-auto -me-1.5 -mt-1.5"
|
|
537
|
+
:label="props.skipText ?? t.tour.skip"
|
|
538
|
+
:disabled="busy"
|
|
539
|
+
@click="skip()"
|
|
540
|
+
/>
|
|
541
|
+
</div>
|
|
542
|
+
<div v-if="shownStep.description || $slots.content" :id="descriptionId">
|
|
543
|
+
<slot name="content" v-bind="slotProps">
|
|
544
|
+
<Text tone="muted" size="sm">{{ shownStep.description }}</Text>
|
|
545
|
+
</slot>
|
|
546
|
+
</div>
|
|
547
|
+
<PopperArrow
|
|
548
|
+
v-if="anchored"
|
|
549
|
+
data-hn-tour-arrow
|
|
550
|
+
:width="TOUR_ARROW_WIDTH"
|
|
551
|
+
:height="TOUR_ARROW_HEIGHT"
|
|
552
|
+
class="overflow-visible"
|
|
553
|
+
>
|
|
554
|
+
<path :d="`${TOUR_ARROW_PATH}Z`" class="fill-surface" />
|
|
555
|
+
<path
|
|
556
|
+
:d="TOUR_ARROW_PATH"
|
|
557
|
+
fill="none"
|
|
558
|
+
class="stroke-line"
|
|
559
|
+
vector-effect="non-scaling-stroke"
|
|
560
|
+
/>
|
|
561
|
+
</PopperArrow>
|
|
562
|
+
<slot name="footer" v-bind="slotProps">
|
|
563
|
+
<div :class="tourFooter()">
|
|
564
|
+
<Text as="span" tone="muted" size="sm" class="tabular-nums">
|
|
565
|
+
{{ t.tour.progress(shown, total) }}
|
|
566
|
+
</Text>
|
|
567
|
+
<IconButton
|
|
568
|
+
v-if="!!shownStep.play"
|
|
569
|
+
data-hn-tour-replay
|
|
570
|
+
:label="props.replayText ?? t.tour.replay"
|
|
571
|
+
:tooltip="false"
|
|
572
|
+
size="sm"
|
|
573
|
+
variant="ghost"
|
|
574
|
+
tone="neutral"
|
|
575
|
+
pill
|
|
576
|
+
@click="replay"
|
|
577
|
+
>
|
|
578
|
+
<RotateCcw />
|
|
579
|
+
</IconButton>
|
|
580
|
+
<div class="ms-auto flex gap-2">
|
|
581
|
+
<Button
|
|
582
|
+
v-if="shown > 1"
|
|
583
|
+
data-hn-tour-prev
|
|
584
|
+
size="sm"
|
|
585
|
+
variant="soft"
|
|
586
|
+
tone="neutral"
|
|
587
|
+
:disabled="busy"
|
|
588
|
+
@click="prev"
|
|
589
|
+
>
|
|
590
|
+
{{ props.prevText ?? t.tour.prev }}
|
|
591
|
+
</Button>
|
|
592
|
+
<Button data-hn-tour-next size="sm" :loading="busy" @click="next">
|
|
593
|
+
{{
|
|
594
|
+
shown >= total
|
|
595
|
+
? (props.finishText ?? t.tour.finish)
|
|
596
|
+
: (props.nextText ?? t.tour.next)
|
|
597
|
+
}}
|
|
598
|
+
</Button>
|
|
599
|
+
</div>
|
|
600
|
+
</div>
|
|
601
|
+
</slot>
|
|
602
|
+
</Card>
|
|
603
|
+
</component>
|
|
604
|
+
</DismissableLayer>
|
|
605
|
+
</Presence>
|
|
606
|
+
</PopperRoot>
|
|
607
|
+
</TeleportPrimitive>
|
|
608
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../../../shared/src/variants/tour'
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
TourAlign,
|
|
3
|
+
TourBeforeChange,
|
|
4
|
+
TourCloseReason,
|
|
5
|
+
TourPlay,
|
|
6
|
+
TourPlayContext,
|
|
7
|
+
TourPoint,
|
|
8
|
+
TourPointer,
|
|
9
|
+
TourPointerKind,
|
|
10
|
+
TourRectLike,
|
|
11
|
+
TourSide,
|
|
12
|
+
TourSpotlightOptions,
|
|
13
|
+
TourStepBase,
|
|
14
|
+
TourTarget,
|
|
15
|
+
TourTargetItem,
|
|
16
|
+
TourVirtualElement,
|
|
17
|
+
} from '../../../../shared/src/lib/tour'
|
|
18
|
+
|
|
19
|
+
export type {
|
|
20
|
+
TourAlign,
|
|
21
|
+
TourBeforeChange,
|
|
22
|
+
TourCloseReason,
|
|
23
|
+
TourPlay,
|
|
24
|
+
TourPlayContext,
|
|
25
|
+
TourPoint,
|
|
26
|
+
TourPointer,
|
|
27
|
+
TourPointerKind,
|
|
28
|
+
TourRectLike,
|
|
29
|
+
TourSide,
|
|
30
|
+
TourSpotlightOptions,
|
|
31
|
+
TourTarget,
|
|
32
|
+
TourTargetItem,
|
|
33
|
+
TourVirtualElement,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type TourStep = TourStepBase
|
|
37
|
+
|
|
38
|
+
export interface TourProps {
|
|
39
|
+
steps: TourStep[]
|
|
40
|
+
mask?: boolean | 'dim'
|
|
41
|
+
locked?: boolean
|
|
42
|
+
beacon?: boolean
|
|
43
|
+
blockTarget?: boolean
|
|
44
|
+
blockPage?: boolean
|
|
45
|
+
pointer?: 'auto' | TourPointerKind
|
|
46
|
+
nextText?: string
|
|
47
|
+
prevText?: string
|
|
48
|
+
finishText?: string
|
|
49
|
+
skipText?: string
|
|
50
|
+
replayText?: string
|
|
51
|
+
beforeChange?: TourBeforeChange
|
|
52
|
+
dir?: 'ltr' | 'rtl'
|
|
53
|
+
class?: string
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface TourSlotProps {
|
|
57
|
+
step: TourStep
|
|
58
|
+
current: number
|
|
59
|
+
total: number
|
|
60
|
+
busy: boolean
|
|
61
|
+
playing: boolean
|
|
62
|
+
next: () => void
|
|
63
|
+
prev: () => void
|
|
64
|
+
skip: () => void
|
|
65
|
+
replay: () => void
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface TourExpose {
|
|
69
|
+
next: () => Promise<void>
|
|
70
|
+
prev: () => Promise<void>
|
|
71
|
+
goTo: (step: number) => Promise<void>
|
|
72
|
+
close: () => void
|
|
73
|
+
replay: () => void
|
|
74
|
+
}
|
|
@@ -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'
|