@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
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ref, watchEffect, type Ref } from 'vue'
|
|
2
|
+
import { createEventHook, refAutoReset, tryOnScopeDispose } from '@vueuse/core'
|
|
3
|
+
import {
|
|
4
|
+
exitSideFromRect,
|
|
5
|
+
hull,
|
|
6
|
+
isPointInPolygon,
|
|
7
|
+
paddedExitPoints,
|
|
8
|
+
pointsFromRect,
|
|
9
|
+
type Polygon,
|
|
10
|
+
} from '../../../../shared/src/primitives/grace-area'
|
|
11
|
+
|
|
12
|
+
export function useGraceArea(
|
|
13
|
+
triggerElement: Ref<HTMLElement | undefined>,
|
|
14
|
+
containerElement: Ref<HTMLElement | undefined>,
|
|
15
|
+
) {
|
|
16
|
+
const isPointerInTransit = refAutoReset(false, 300)
|
|
17
|
+
tryOnScopeDispose(() => {
|
|
18
|
+
isPointerInTransit.value = false
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const pointerGraceArea = ref<Polygon | null>(null)
|
|
22
|
+
const pointerExit = createEventHook<void>()
|
|
23
|
+
|
|
24
|
+
function handleRemoveGraceArea() {
|
|
25
|
+
pointerGraceArea.value = null
|
|
26
|
+
isPointerInTransit.value = false
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function handleCreateGraceArea(event: PointerEvent, hoverTarget: HTMLElement | undefined) {
|
|
30
|
+
if (!hoverTarget) return
|
|
31
|
+
const currentTarget = event.currentTarget as HTMLElement
|
|
32
|
+
const exitPoint = { x: event.clientX, y: event.clientY }
|
|
33
|
+
const exitSide = exitSideFromRect(exitPoint, currentTarget.getBoundingClientRect())
|
|
34
|
+
pointerGraceArea.value = hull([
|
|
35
|
+
...paddedExitPoints(exitPoint, exitSide, 1),
|
|
36
|
+
...pointsFromRect(hoverTarget.getBoundingClientRect()),
|
|
37
|
+
])
|
|
38
|
+
isPointerInTransit.value = true
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
watchEffect(onCleanup => {
|
|
42
|
+
const trigger = triggerElement.value
|
|
43
|
+
const container = containerElement.value
|
|
44
|
+
if (!trigger || !container) return
|
|
45
|
+
const handleTriggerLeave = (event: PointerEvent) =>
|
|
46
|
+
handleCreateGraceArea(event, containerElement.value)
|
|
47
|
+
const handleContentLeave = (event: PointerEvent) =>
|
|
48
|
+
handleCreateGraceArea(event, triggerElement.value)
|
|
49
|
+
trigger.addEventListener('pointerleave', handleTriggerLeave)
|
|
50
|
+
container.addEventListener('pointerleave', handleContentLeave)
|
|
51
|
+
onCleanup(() => {
|
|
52
|
+
triggerElement.value?.removeEventListener('pointerleave', handleTriggerLeave)
|
|
53
|
+
containerElement.value?.removeEventListener('pointerleave', handleContentLeave)
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
watchEffect(onCleanup => {
|
|
58
|
+
if (!pointerGraceArea.value) return
|
|
59
|
+
const handleTrackPointerGrace = (event: PointerEvent) => {
|
|
60
|
+
if (!pointerGraceArea.value || !(event.target instanceof Element)) return
|
|
61
|
+
const target = event.target
|
|
62
|
+
const hasEnteredTarget =
|
|
63
|
+
triggerElement.value?.contains(target) || containerElement.value?.contains(target)
|
|
64
|
+
const isPointerOutsideGraceArea = !isPointInPolygon(
|
|
65
|
+
{ x: event.clientX, y: event.clientY },
|
|
66
|
+
pointerGraceArea.value,
|
|
67
|
+
)
|
|
68
|
+
const isAnotherGraceAreaTrigger = !!target.closest('[data-grace-area-trigger]')
|
|
69
|
+
if (hasEnteredTarget) handleRemoveGraceArea()
|
|
70
|
+
else if (isPointerOutsideGraceArea || isAnotherGraceAreaTrigger) {
|
|
71
|
+
handleRemoveGraceArea()
|
|
72
|
+
void pointerExit.trigger()
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
triggerElement.value?.ownerDocument.addEventListener('pointermove', handleTrackPointerGrace)
|
|
76
|
+
onCleanup(() =>
|
|
77
|
+
triggerElement.value?.ownerDocument.removeEventListener(
|
|
78
|
+
'pointermove',
|
|
79
|
+
handleTrackPointerGrace,
|
|
80
|
+
),
|
|
81
|
+
)
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
return { isPointerInTransit, onPointerExit: pointerExit.on }
|
|
85
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { onUnmounted, watch, type MaybeRefOrGetter } from 'vue'
|
|
2
|
+
import { unrefElement, type MaybeElement } from '@vueuse/core'
|
|
3
|
+
import { hideOutside } from '../../../../shared/src/primitives/dialog'
|
|
4
|
+
|
|
5
|
+
export function useHideOthers(target: MaybeRefOrGetter<MaybeElement>) {
|
|
6
|
+
let undo: (() => void) | undefined
|
|
7
|
+
watch(
|
|
8
|
+
() => unrefElement(target),
|
|
9
|
+
element => {
|
|
10
|
+
const next = element ? hideOutside(element) : undefined
|
|
11
|
+
if (next) undo = next
|
|
12
|
+
else if (undo) undo()
|
|
13
|
+
},
|
|
14
|
+
)
|
|
15
|
+
onUnmounted(() => {
|
|
16
|
+
if (undo) undo()
|
|
17
|
+
})
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { onMounted, ref } from 'vue'
|
|
2
|
+
import { createSharedComposable, useEventListener } from '@vueuse/core'
|
|
3
|
+
|
|
4
|
+
function useIsUsingKeyboardImpl() {
|
|
5
|
+
const isUsingKeyboard = ref(false)
|
|
6
|
+
onMounted(() => {
|
|
7
|
+
useEventListener(
|
|
8
|
+
'keydown',
|
|
9
|
+
() => {
|
|
10
|
+
isUsingKeyboard.value = true
|
|
11
|
+
},
|
|
12
|
+
{ capture: true, passive: true },
|
|
13
|
+
)
|
|
14
|
+
useEventListener(
|
|
15
|
+
['pointerdown', 'pointermove'],
|
|
16
|
+
() => {
|
|
17
|
+
isUsingKeyboard.value = false
|
|
18
|
+
},
|
|
19
|
+
{ capture: true, passive: true },
|
|
20
|
+
)
|
|
21
|
+
})
|
|
22
|
+
return isUsingKeyboard
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const useIsUsingKeyboard = createSharedComposable(useIsUsingKeyboardImpl)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { computed, ref, type Ref } from 'vue'
|
|
2
|
+
import { injectConfigProviderContext } from './config'
|
|
3
|
+
|
|
4
|
+
export function useLocale(locale?: Ref<string | undefined>) {
|
|
5
|
+
const context = injectConfigProviderContext({ locale: ref('en') })
|
|
6
|
+
return computed(() => locale?.value || context.locale?.value || 'en')
|
|
7
|
+
}
|
|
@@ -3,6 +3,7 @@ import { computed, nextTick, ref, watch, type Ref } from 'vue'
|
|
|
3
3
|
export interface VModelOptions<V> {
|
|
4
4
|
defaultValue?: V
|
|
5
5
|
passive?: boolean
|
|
6
|
+
deep?: boolean
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
export function useVModel<P extends object, K extends keyof P & string, V = P[K]>(
|
|
@@ -30,8 +31,12 @@ export function useVModel<P extends object, K extends keyof P & string, V = P[K]
|
|
|
30
31
|
void nextTick(() => (updating = false))
|
|
31
32
|
},
|
|
32
33
|
)
|
|
33
|
-
watch(
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
watch(
|
|
35
|
+
proxy,
|
|
36
|
+
value => {
|
|
37
|
+
if (!updating && (value !== (props[key] as unknown) || options.deep)) emit(event, value)
|
|
38
|
+
},
|
|
39
|
+
{ deep: options.deep },
|
|
40
|
+
)
|
|
36
41
|
return proxy
|
|
37
42
|
}
|
package/src/singletons.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PinInputInput.d.ts","sourceRoot":"","sources":["../../../../../../src/primitives/pin-input/PinInputInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,KAAK,QAAQ,EACd,MAAM,KAAK,CAAA;AAcZ,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAK7D,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,EAAE,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;CAC1B;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;cAOK,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;cAA9B,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;;;;;;;;4EA4K3D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PinInputRoot.d.ts","sourceRoot":"","sources":["../../../../../../src/primitives/pin-input/PinInputRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,QAAQ,EACd,MAAM,KAAK,CAAA;AACZ,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,6CAA6C,CAAA;AACpD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAIpE,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;AAEzE,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;IACjC,YAAY,CAAC,EAAE,aAAa,CAAA;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,GAAG,CAAC,EAAE,SAAS,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,EAAE,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,mBAAmB,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;IAC3C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,YAAY;;cAIkB,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAC;;;;cAC5B,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;cAI/B,QAAQ,CAAC,YAAY,CAAC;;;;;cAChC,QAAQ,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;cAIX,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;;;;;;;;;;;;;;;cAVtB,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAC;;;;cAC5B,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;cAI/B,QAAQ,CAAC,YAAY,CAAC;;;;;cAChC,QAAQ,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;cAIX,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;4EA4E/D,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type { PinInputValue } from '../../../../shared/src/primitives/pin-input';
|
|
3
|
-
import type { Direction } from '../utils/useDirection';
|
|
4
|
-
export type PinInputType = 'text' | 'number';
|
|
5
|
-
export interface PinInputRootContext {
|
|
6
|
-
modelValue: Ref<PinInputValue>;
|
|
7
|
-
currentModelValue: ComputedRef<PinInputValue>;
|
|
8
|
-
mask: Ref<boolean>;
|
|
9
|
-
otp: Ref<boolean>;
|
|
10
|
-
placeholder: Ref<string>;
|
|
11
|
-
type: Ref<PinInputType>;
|
|
12
|
-
dir: Ref<Direction>;
|
|
13
|
-
disabled: Ref<boolean>;
|
|
14
|
-
isCompleted: ComputedRef<boolean>;
|
|
15
|
-
inputElements?: Ref<Set<HTMLInputElement>>;
|
|
16
|
-
onInputElementChange: (element: HTMLInputElement) => void;
|
|
17
|
-
isNumericMode: ComputedRef<boolean>;
|
|
18
|
-
}
|
|
19
|
-
export declare const injectPinInputRootContext: <T extends PinInputRootContext | null | undefined = PinInputRootContext>(fallback?: T | undefined) => T extends null ? PinInputRootContext | null : PinInputRootContext, providePinInputRootContext: (value: PinInputRootContext) => PinInputRootContext;
|
|
20
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../../src/primitives/pin-input/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAEhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEtD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAA;AAE5C,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,GAAG,CAAC,aAAa,CAAC,CAAA;IAC9B,iBAAiB,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;IAC7C,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACjB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACxB,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,CAAA;IACvB,GAAG,EAAE,GAAG,CAAC,SAAS,CAAC,CAAA;IACnB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IACjC,aAAa,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAA;IAC1C,oBAAoB,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACzD,aAAa,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CACpC;AAED,eAAO,MAAO,yBAAyB,2KAAE,0BAA0B,qDACf,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { injectPinInputRootContext, type PinInputRootContext, type PinInputType } from './context';
|
|
2
|
-
export { PinInputInput, type PinInputInputProps } from './PinInputInput';
|
|
3
|
-
export { PinInputRoot, type PinInputRootEmits, type PinInputRootProps } from './PinInputRoot';
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/primitives/pin-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;AAClG,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
computed,
|
|
3
|
-
defineComponent,
|
|
4
|
-
h,
|
|
5
|
-
nextTick,
|
|
6
|
-
onMounted,
|
|
7
|
-
onUnmounted,
|
|
8
|
-
renderSlot,
|
|
9
|
-
watch,
|
|
10
|
-
withCtx,
|
|
11
|
-
withKeys,
|
|
12
|
-
type PropType,
|
|
13
|
-
} from 'vue'
|
|
14
|
-
import { getActiveElement } from '../../../../shared/src/primitives/focus-scope'
|
|
15
|
-
import {
|
|
16
|
-
navigatePin,
|
|
17
|
-
pinFocusRedirect,
|
|
18
|
-
pinInputLabel,
|
|
19
|
-
pinPlaceholder,
|
|
20
|
-
resolvePinComposition,
|
|
21
|
-
resolvePinInput,
|
|
22
|
-
resolvePinPaste,
|
|
23
|
-
setPinValueAt,
|
|
24
|
-
spreadPinValue,
|
|
25
|
-
type PinTextAction,
|
|
26
|
-
} from '../../../../shared/src/primitives/pin-input'
|
|
27
|
-
import { Primitive, type PrimitiveProps } from '../primitive'
|
|
28
|
-
import { useComposing } from '../utils/useComposing'
|
|
29
|
-
import { usePrimitiveElement } from '../utils/usePrimitiveElement'
|
|
30
|
-
import { injectPinInputRootContext } from './context'
|
|
31
|
-
|
|
32
|
-
export interface PinInputInputProps {
|
|
33
|
-
index: number
|
|
34
|
-
disabled?: boolean
|
|
35
|
-
asChild?: boolean
|
|
36
|
-
as?: PrimitiveProps['as']
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const PinInputInput = defineComponent({
|
|
40
|
-
name: 'PinInputInput',
|
|
41
|
-
props: {
|
|
42
|
-
index: { type: Number, required: true },
|
|
43
|
-
disabled: { type: Boolean, required: false },
|
|
44
|
-
asChild: { type: Boolean, required: false },
|
|
45
|
-
as: {
|
|
46
|
-
type: null as unknown as PropType<PrimitiveProps['as']>,
|
|
47
|
-
required: false,
|
|
48
|
-
default: 'input',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
setup(props, { slots }) {
|
|
52
|
-
const context = injectPinInputRootContext()
|
|
53
|
-
const inputElements = computed(() => [...context.inputElements!.value])
|
|
54
|
-
const currentValue = computed(() => context.currentModelValue.value[props.index])
|
|
55
|
-
const disabled = computed(() => props.disabled || context.disabled.value)
|
|
56
|
-
const isOtpMode = computed(() => context.otp.value)
|
|
57
|
-
const isPasswordMode = computed(() => context.mask.value)
|
|
58
|
-
const { primitiveElement, currentElement } = usePrimitiveElement()
|
|
59
|
-
|
|
60
|
-
function updateModelValueAt(index: number, value: string) {
|
|
61
|
-
context.modelValue.value = setPinValueAt(
|
|
62
|
-
context.currentModelValue.value,
|
|
63
|
-
index,
|
|
64
|
-
value,
|
|
65
|
-
context.isNumericMode.value,
|
|
66
|
-
)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function handleMultipleCharacter(characters: string) {
|
|
70
|
-
const { values, filled, end } = spreadPinValue(
|
|
71
|
-
context.currentModelValue.value,
|
|
72
|
-
characters,
|
|
73
|
-
props.index,
|
|
74
|
-
inputElements.value.length,
|
|
75
|
-
context.isNumericMode.value,
|
|
76
|
-
)
|
|
77
|
-
for (const at of filled) inputElements.value[at]!.focus()
|
|
78
|
-
context.modelValue.value = values
|
|
79
|
-
inputElements.value[end]?.focus()
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function apply(target: HTMLInputElement, action: PinTextAction) {
|
|
83
|
-
if (action.kind === 'clear') target.value = ''
|
|
84
|
-
else if (action.kind === 'filter') target.value = action.value
|
|
85
|
-
else if (action.kind === 'spread') handleMultipleCharacter(action.characters)
|
|
86
|
-
else {
|
|
87
|
-
target.value = action.character
|
|
88
|
-
updateModelValueAt(props.index, target.value)
|
|
89
|
-
inputElements.value[props.index + 1]?.focus()
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing(event => {
|
|
94
|
-
const target = event.target as HTMLInputElement
|
|
95
|
-
apply(target, resolvePinComposition(event.data || target.value, context.isNumericMode.value))
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
function handleInput(event: InputEvent) {
|
|
99
|
-
if (isComposing.value || event.isComposing) return
|
|
100
|
-
const target = event.target as HTMLInputElement
|
|
101
|
-
apply(target, resolvePinInput(event.data, target.value, context.isNumericMode.value))
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function updatePlaceholder() {
|
|
105
|
-
void nextTick(() => {
|
|
106
|
-
const target = currentElement.value as HTMLInputElement | undefined
|
|
107
|
-
if (!target) return
|
|
108
|
-
pinPlaceholder(target, getActiveElement(), context.placeholder.value)
|
|
109
|
-
})
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function handleKeydown(event: KeyboardEvent) {
|
|
113
|
-
if (isComposing.value || event.isComposing) return
|
|
114
|
-
navigatePin(
|
|
115
|
-
event,
|
|
116
|
-
getActiveElement() as HTMLElement | null,
|
|
117
|
-
inputElements.value,
|
|
118
|
-
context.dir.value,
|
|
119
|
-
)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function handleBackspace(event: KeyboardEvent) {
|
|
123
|
-
event.preventDefault()
|
|
124
|
-
const target = event.target as HTMLInputElement
|
|
125
|
-
if (target.value) updateModelValueAt(props.index, '')
|
|
126
|
-
else {
|
|
127
|
-
const previous = inputElements.value[props.index - 1]
|
|
128
|
-
if (previous) {
|
|
129
|
-
previous.focus()
|
|
130
|
-
updateModelValueAt(props.index - 1, '')
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function handleDelete(event: KeyboardEvent) {
|
|
136
|
-
if (event.key === 'Delete') {
|
|
137
|
-
event.preventDefault()
|
|
138
|
-
updateModelValueAt(props.index, '')
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function handleFocus(event: FocusEvent) {
|
|
143
|
-
if (context.otp.value) {
|
|
144
|
-
const redirect = pinFocusRedirect(
|
|
145
|
-
context.currentModelValue.value,
|
|
146
|
-
inputElements.value.length,
|
|
147
|
-
props.index,
|
|
148
|
-
)
|
|
149
|
-
if (redirect !== -1) {
|
|
150
|
-
inputElements.value[redirect]!.focus()
|
|
151
|
-
return
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
;(event.target as HTMLInputElement).setSelectionRange(1, 1)
|
|
155
|
-
updatePlaceholder()
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function handlePaste(event: ClipboardEvent) {
|
|
159
|
-
event.preventDefault()
|
|
160
|
-
const clipboardData = event.clipboardData
|
|
161
|
-
if (!clipboardData) return
|
|
162
|
-
handleMultipleCharacter(
|
|
163
|
-
resolvePinPaste(clipboardData.getData('text'), context.isNumericMode.value),
|
|
164
|
-
)
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
watch(currentValue, updatePlaceholder)
|
|
168
|
-
onMounted(() => {
|
|
169
|
-
context.onInputElementChange(currentElement.value as HTMLInputElement)
|
|
170
|
-
})
|
|
171
|
-
onUnmounted(() => {
|
|
172
|
-
context.inputElements?.value.delete(currentElement.value as HTMLInputElement)
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
const onInput = (event: Event) => handleInput(event as InputEvent)
|
|
176
|
-
const onKeydown = [
|
|
177
|
-
withKeys(handleKeydown as (event: Event) => void, [
|
|
178
|
-
'left',
|
|
179
|
-
'right',
|
|
180
|
-
'up',
|
|
181
|
-
'down',
|
|
182
|
-
'home',
|
|
183
|
-
'end',
|
|
184
|
-
]),
|
|
185
|
-
withKeys(handleBackspace as (event: Event) => void, ['backspace']),
|
|
186
|
-
withKeys(handleDelete as (event: Event) => void, ['delete']),
|
|
187
|
-
]
|
|
188
|
-
|
|
189
|
-
return () =>
|
|
190
|
-
h(
|
|
191
|
-
Primitive,
|
|
192
|
-
{
|
|
193
|
-
ref: primitiveElement,
|
|
194
|
-
autocapitalize: 'none',
|
|
195
|
-
as: props.as,
|
|
196
|
-
'as-child': props.asChild,
|
|
197
|
-
autocomplete: isOtpMode.value ? 'one-time-code' : 'false',
|
|
198
|
-
type: isPasswordMode.value ? 'password' : 'text',
|
|
199
|
-
inputmode: context.isNumericMode.value ? 'numeric' : 'text',
|
|
200
|
-
pattern: context.isNumericMode.value ? '[0-9]*' : undefined,
|
|
201
|
-
placeholder: context.placeholder.value,
|
|
202
|
-
value: currentValue.value,
|
|
203
|
-
disabled: disabled.value,
|
|
204
|
-
'data-disabled': disabled.value ? '' : undefined,
|
|
205
|
-
'data-complete': context.isCompleted.value ? '' : undefined,
|
|
206
|
-
'aria-label': pinInputLabel(props.index, inputElements.value.length),
|
|
207
|
-
onInput,
|
|
208
|
-
onKeydown,
|
|
209
|
-
onFocus: handleFocus,
|
|
210
|
-
onBlur: updatePlaceholder,
|
|
211
|
-
onPaste: handlePaste,
|
|
212
|
-
onCompositionstart: handleCompositionStart,
|
|
213
|
-
onCompositionend: handleCompositionEnd,
|
|
214
|
-
},
|
|
215
|
-
{ default: withCtx(() => [renderSlot(slots, 'default')]) },
|
|
216
|
-
)
|
|
217
|
-
},
|
|
218
|
-
})
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
computed,
|
|
3
|
-
defineComponent,
|
|
4
|
-
h,
|
|
5
|
-
mergeProps,
|
|
6
|
-
ref,
|
|
7
|
-
renderSlot,
|
|
8
|
-
toRefs,
|
|
9
|
-
watch,
|
|
10
|
-
withCtx,
|
|
11
|
-
type PropType,
|
|
12
|
-
} from 'vue'
|
|
13
|
-
import {
|
|
14
|
-
isPinInputComplete,
|
|
15
|
-
pinInputValues,
|
|
16
|
-
type PinInputValue,
|
|
17
|
-
} from '../../../../shared/src/primitives/pin-input'
|
|
18
|
-
import { Primitive, type PrimitiveProps } from '../primitive'
|
|
19
|
-
import { useDirection, type Direction } from '../utils/useDirection'
|
|
20
|
-
import { useForwardExpose } from '../utils/useForwardExpose'
|
|
21
|
-
import { useVModel } from '../utils/useVModel'
|
|
22
|
-
import { VisuallyHiddenInput } from '../visually-hidden'
|
|
23
|
-
import { providePinInputRootContext, type PinInputType } from './context'
|
|
24
|
-
|
|
25
|
-
export interface PinInputRootProps {
|
|
26
|
-
modelValue?: PinInputValue | null
|
|
27
|
-
defaultValue?: PinInputValue
|
|
28
|
-
placeholder?: string
|
|
29
|
-
mask?: boolean
|
|
30
|
-
otp?: boolean
|
|
31
|
-
type?: PinInputType
|
|
32
|
-
dir?: Direction
|
|
33
|
-
disabled?: boolean
|
|
34
|
-
id?: string
|
|
35
|
-
asChild?: boolean
|
|
36
|
-
as?: PrimitiveProps['as']
|
|
37
|
-
name?: string
|
|
38
|
-
required?: boolean
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type PinInputRootEmits = {
|
|
42
|
-
'update:modelValue': [value: PinInputValue]
|
|
43
|
-
complete: [value: PinInputValue]
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export const PinInputRoot = defineComponent({
|
|
47
|
-
name: 'PinInputRoot',
|
|
48
|
-
inheritAttrs: false,
|
|
49
|
-
props: {
|
|
50
|
-
modelValue: { type: null as unknown as PropType<PinInputValue | null>, required: false },
|
|
51
|
-
defaultValue: { type: null as unknown as PropType<PinInputValue>, required: false },
|
|
52
|
-
placeholder: { type: String, required: false, default: '' },
|
|
53
|
-
mask: { type: Boolean, required: false },
|
|
54
|
-
otp: { type: Boolean, required: false },
|
|
55
|
-
type: { type: null as unknown as PropType<PinInputType>, required: false, default: 'text' },
|
|
56
|
-
dir: { type: String as PropType<Direction>, required: false },
|
|
57
|
-
disabled: { type: Boolean, required: false },
|
|
58
|
-
id: { type: String, required: false },
|
|
59
|
-
asChild: { type: Boolean, required: false },
|
|
60
|
-
as: { type: null as unknown as PropType<PrimitiveProps['as']>, required: false },
|
|
61
|
-
name: { type: String, required: false },
|
|
62
|
-
required: { type: Boolean, required: false },
|
|
63
|
-
},
|
|
64
|
-
emits: ['update:modelValue', 'complete'],
|
|
65
|
-
setup(props, { emit, attrs, slots }) {
|
|
66
|
-
const { mask, otp, placeholder, type, disabled, dir: propDir } = toRefs(props)
|
|
67
|
-
const { forwardRef } = useForwardExpose()
|
|
68
|
-
const dir = useDirection(propDir)
|
|
69
|
-
const modelValue = useVModel(
|
|
70
|
-
props,
|
|
71
|
-
'modelValue',
|
|
72
|
-
(_, value) => emit('update:modelValue', value as PinInputValue),
|
|
73
|
-
{ defaultValue: props.defaultValue ?? [], passive: true },
|
|
74
|
-
)
|
|
75
|
-
const currentModelValue = computed(() => pinInputValues(modelValue.value))
|
|
76
|
-
const inputElements = ref(new Set<HTMLInputElement>())
|
|
77
|
-
function onInputElementChange(element: HTMLInputElement) {
|
|
78
|
-
inputElements.value.add(element)
|
|
79
|
-
}
|
|
80
|
-
const isNumericMode = computed(() => props.type === 'number')
|
|
81
|
-
const isCompleted = computed(() =>
|
|
82
|
-
isPinInputComplete(currentModelValue.value, inputElements.value.size, isNumericMode.value),
|
|
83
|
-
)
|
|
84
|
-
watch(
|
|
85
|
-
modelValue,
|
|
86
|
-
() => {
|
|
87
|
-
if (isCompleted.value) emit('complete', modelValue.value as PinInputValue)
|
|
88
|
-
},
|
|
89
|
-
{ deep: true },
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
providePinInputRootContext({
|
|
93
|
-
modelValue: modelValue as never,
|
|
94
|
-
currentModelValue,
|
|
95
|
-
mask,
|
|
96
|
-
otp,
|
|
97
|
-
placeholder,
|
|
98
|
-
type,
|
|
99
|
-
dir,
|
|
100
|
-
disabled,
|
|
101
|
-
isCompleted,
|
|
102
|
-
inputElements: inputElements as never,
|
|
103
|
-
onInputElementChange,
|
|
104
|
-
isNumericMode,
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
const onFocus = () => Array.from(inputElements.value)?.[0]?.focus()
|
|
108
|
-
|
|
109
|
-
return () =>
|
|
110
|
-
h(
|
|
111
|
-
Primitive,
|
|
112
|
-
mergeProps(attrs, {
|
|
113
|
-
ref: forwardRef,
|
|
114
|
-
dir: dir.value,
|
|
115
|
-
'data-complete': isCompleted.value ? '' : undefined,
|
|
116
|
-
'data-disabled': disabled.value ? '' : undefined,
|
|
117
|
-
}),
|
|
118
|
-
{
|
|
119
|
-
default: withCtx(() => [
|
|
120
|
-
renderSlot(slots, 'default', { modelValue: modelValue.value }),
|
|
121
|
-
h(VisuallyHiddenInput, {
|
|
122
|
-
id: props.id,
|
|
123
|
-
as: 'input',
|
|
124
|
-
feature: 'focusable',
|
|
125
|
-
tabindex: '-1',
|
|
126
|
-
value: currentModelValue.value.join(''),
|
|
127
|
-
name: props.name ?? '',
|
|
128
|
-
disabled: disabled.value,
|
|
129
|
-
required: props.required,
|
|
130
|
-
onFocus,
|
|
131
|
-
}),
|
|
132
|
-
]),
|
|
133
|
-
},
|
|
134
|
-
)
|
|
135
|
-
},
|
|
136
|
-
})
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef, Ref } from 'vue'
|
|
2
|
-
import type { PinInputValue } from '../../../../shared/src/primitives/pin-input'
|
|
3
|
-
import { createContext } from '../utils/createContext'
|
|
4
|
-
import type { Direction } from '../utils/useDirection'
|
|
5
|
-
|
|
6
|
-
export type PinInputType = 'text' | 'number'
|
|
7
|
-
|
|
8
|
-
export interface PinInputRootContext {
|
|
9
|
-
modelValue: Ref<PinInputValue>
|
|
10
|
-
currentModelValue: ComputedRef<PinInputValue>
|
|
11
|
-
mask: Ref<boolean>
|
|
12
|
-
otp: Ref<boolean>
|
|
13
|
-
placeholder: Ref<string>
|
|
14
|
-
type: Ref<PinInputType>
|
|
15
|
-
dir: Ref<Direction>
|
|
16
|
-
disabled: Ref<boolean>
|
|
17
|
-
isCompleted: ComputedRef<boolean>
|
|
18
|
-
inputElements?: Ref<Set<HTMLInputElement>>
|
|
19
|
-
onInputElementChange: (element: HTMLInputElement) => void
|
|
20
|
-
isNumericMode: ComputedRef<boolean>
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const [injectPinInputRootContext, providePinInputRootContext] =
|
|
24
|
-
createContext<PinInputRootContext>('PinInputRoot')
|
|
File without changes
|
|
File without changes
|