@hina-ui/vue 1.7.12 → 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 +23318 -7947
- package/dist/index.js.map +1 -1
- 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/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/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/tokens.css +1 -0
- package/dist/shared/styles/tour.css +29 -0
- package/dist/shared/variants/nav-link.ts +6 -2
- package/dist/shared/variants/tour.ts +29 -0
- 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/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/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/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/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/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 +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/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/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/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 +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
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
defineComponent,
|
|
4
|
+
h,
|
|
5
|
+
mergeProps,
|
|
6
|
+
normalizeStyle,
|
|
7
|
+
ref,
|
|
8
|
+
renderSlot,
|
|
9
|
+
watchEffect,
|
|
10
|
+
watchPostEffect,
|
|
11
|
+
withCtx,
|
|
12
|
+
withMemo,
|
|
13
|
+
type PropType,
|
|
14
|
+
type VNode,
|
|
15
|
+
} from 'vue'
|
|
16
|
+
import { autoUpdate, useFloating, type ReferenceElement } from '@floating-ui/vue'
|
|
17
|
+
import {
|
|
18
|
+
getSideAndAlignFromPlacement,
|
|
19
|
+
POPPER_CONTENT_DEFAULTS,
|
|
20
|
+
popperMiddleware,
|
|
21
|
+
popperPlacement,
|
|
22
|
+
popperWrapperStyle,
|
|
23
|
+
shouldHidePopperArrow,
|
|
24
|
+
type Align,
|
|
25
|
+
type PopperSticky,
|
|
26
|
+
type PopperStrategy,
|
|
27
|
+
type PopperUpdateStrategy,
|
|
28
|
+
type Side,
|
|
29
|
+
} from '../../../../shared/src/primitives/popper'
|
|
30
|
+
import { Primitive, type PrimitiveProps } from '../primitive'
|
|
31
|
+
import { useDirection, type Direction } from '../utils/useDirection'
|
|
32
|
+
import { useForwardExpose } from '../utils/useForwardExpose'
|
|
33
|
+
import { useSize } from '../utils/useSize'
|
|
34
|
+
import { injectPopperRootContext, providePopperContentContext } from './context'
|
|
35
|
+
|
|
36
|
+
export interface PopperContentProps {
|
|
37
|
+
memoDependencies?: unknown[]
|
|
38
|
+
side?: Side
|
|
39
|
+
sideOffset?: number
|
|
40
|
+
sideFlip?: boolean
|
|
41
|
+
align?: Align
|
|
42
|
+
alignOffset?: number
|
|
43
|
+
alignFlip?: boolean
|
|
44
|
+
avoidCollisions?: boolean
|
|
45
|
+
collisionBoundary?: Element | null | Array<Element | null>
|
|
46
|
+
collisionPadding?: number | Partial<Record<Side, number>>
|
|
47
|
+
arrowPadding?: number
|
|
48
|
+
hideShiftedArrow?: boolean
|
|
49
|
+
sticky?: PopperSticky
|
|
50
|
+
hideWhenDetached?: boolean
|
|
51
|
+
positionStrategy?: PopperStrategy
|
|
52
|
+
updatePositionStrategy?: PopperUpdateStrategy
|
|
53
|
+
disableUpdateOnLayoutShift?: boolean
|
|
54
|
+
prioritizePosition?: boolean
|
|
55
|
+
reference?: ReferenceElement
|
|
56
|
+
dir?: Direction
|
|
57
|
+
asChild?: boolean
|
|
58
|
+
as?: PrimitiveProps['as']
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const popperContentProps = {
|
|
62
|
+
memoDependencies: { type: Array as PropType<unknown[]>, required: false },
|
|
63
|
+
side: {
|
|
64
|
+
type: null as unknown as PropType<Side>,
|
|
65
|
+
required: false,
|
|
66
|
+
default: POPPER_CONTENT_DEFAULTS.side,
|
|
67
|
+
},
|
|
68
|
+
sideOffset: { type: Number, required: false, default: POPPER_CONTENT_DEFAULTS.sideOffset },
|
|
69
|
+
sideFlip: { type: Boolean, required: false, default: POPPER_CONTENT_DEFAULTS.sideFlip },
|
|
70
|
+
align: {
|
|
71
|
+
type: null as unknown as PropType<Align>,
|
|
72
|
+
required: false,
|
|
73
|
+
default: POPPER_CONTENT_DEFAULTS.align,
|
|
74
|
+
},
|
|
75
|
+
alignOffset: { type: Number, required: false, default: POPPER_CONTENT_DEFAULTS.alignOffset },
|
|
76
|
+
alignFlip: { type: Boolean, required: false, default: POPPER_CONTENT_DEFAULTS.alignFlip },
|
|
77
|
+
avoidCollisions: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
required: false,
|
|
80
|
+
default: POPPER_CONTENT_DEFAULTS.avoidCollisions,
|
|
81
|
+
},
|
|
82
|
+
collisionBoundary: {
|
|
83
|
+
type: null as unknown as PropType<Element | null | Array<Element | null>>,
|
|
84
|
+
required: false,
|
|
85
|
+
default: POPPER_CONTENT_DEFAULTS.collisionBoundary,
|
|
86
|
+
},
|
|
87
|
+
collisionPadding: {
|
|
88
|
+
type: [Number, Object] as PropType<number | Partial<Record<Side, number>>>,
|
|
89
|
+
required: false,
|
|
90
|
+
default: POPPER_CONTENT_DEFAULTS.collisionPadding,
|
|
91
|
+
},
|
|
92
|
+
arrowPadding: { type: Number, required: false, default: POPPER_CONTENT_DEFAULTS.arrowPadding },
|
|
93
|
+
hideShiftedArrow: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
required: false,
|
|
96
|
+
default: POPPER_CONTENT_DEFAULTS.hideShiftedArrow,
|
|
97
|
+
},
|
|
98
|
+
sticky: {
|
|
99
|
+
type: String as PropType<PopperSticky>,
|
|
100
|
+
required: false,
|
|
101
|
+
default: POPPER_CONTENT_DEFAULTS.sticky,
|
|
102
|
+
},
|
|
103
|
+
hideWhenDetached: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
required: false,
|
|
106
|
+
default: POPPER_CONTENT_DEFAULTS.hideWhenDetached,
|
|
107
|
+
},
|
|
108
|
+
positionStrategy: {
|
|
109
|
+
type: String as PropType<PopperStrategy>,
|
|
110
|
+
required: false,
|
|
111
|
+
default: POPPER_CONTENT_DEFAULTS.positionStrategy,
|
|
112
|
+
},
|
|
113
|
+
updatePositionStrategy: {
|
|
114
|
+
type: String as PropType<PopperUpdateStrategy>,
|
|
115
|
+
required: false,
|
|
116
|
+
default: POPPER_CONTENT_DEFAULTS.updatePositionStrategy,
|
|
117
|
+
},
|
|
118
|
+
disableUpdateOnLayoutShift: { type: Boolean, required: false },
|
|
119
|
+
prioritizePosition: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
required: false,
|
|
122
|
+
default: POPPER_CONTENT_DEFAULTS.prioritizePosition,
|
|
123
|
+
},
|
|
124
|
+
reference: { type: null as unknown as PropType<ReferenceElement>, required: false },
|
|
125
|
+
dir: { type: String as PropType<Direction>, required: false },
|
|
126
|
+
asChild: { type: Boolean, required: false },
|
|
127
|
+
as: { type: null as unknown as PropType<PrimitiveProps['as']>, required: false },
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const PopperContent = defineComponent({
|
|
131
|
+
name: 'PopperContent',
|
|
132
|
+
inheritAttrs: false,
|
|
133
|
+
props: popperContentProps,
|
|
134
|
+
emits: ['placed'],
|
|
135
|
+
setup(props, { emit, attrs, slots }) {
|
|
136
|
+
const rootContext = injectPopperRootContext()
|
|
137
|
+
const { forwardRef, currentElement: contentElement } = useForwardExpose()
|
|
138
|
+
const dir = useDirection(computed(() => props.dir))
|
|
139
|
+
const floatingRef = ref<HTMLElement>()
|
|
140
|
+
const arrow = ref<HTMLElement>()
|
|
141
|
+
const { width: arrowWidth, height: arrowHeight } = useSize(arrow)
|
|
142
|
+
const desiredPlacement = computed(() => popperPlacement(props.side, props.align))
|
|
143
|
+
|
|
144
|
+
const computedMiddleware = computed(() =>
|
|
145
|
+
popperMiddleware({
|
|
146
|
+
sideOffset: props.sideOffset,
|
|
147
|
+
alignOffset: props.alignOffset,
|
|
148
|
+
sideFlip: props.sideFlip,
|
|
149
|
+
alignFlip: props.alignFlip,
|
|
150
|
+
avoidCollisions: props.avoidCollisions,
|
|
151
|
+
prioritizePosition: props.prioritizePosition,
|
|
152
|
+
sticky: props.sticky,
|
|
153
|
+
collisionPadding: props.collisionPadding,
|
|
154
|
+
collisionBoundary: props.collisionBoundary,
|
|
155
|
+
arrow: arrow.value,
|
|
156
|
+
arrowWidth: arrowWidth.value,
|
|
157
|
+
arrowHeight: arrowHeight.value,
|
|
158
|
+
arrowPadding: props.arrowPadding,
|
|
159
|
+
hideWhenDetached: props.hideWhenDetached,
|
|
160
|
+
dir: dir.value,
|
|
161
|
+
prefix: 'reka',
|
|
162
|
+
}),
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
const reference = computed(() => props.reference ?? rootContext.anchor.value)
|
|
166
|
+
const { floatingStyles, placement, isPositioned, middlewareData } = useFloating(
|
|
167
|
+
reference,
|
|
168
|
+
floatingRef,
|
|
169
|
+
{
|
|
170
|
+
strategy: props.positionStrategy,
|
|
171
|
+
placement: desiredPlacement,
|
|
172
|
+
whileElementsMounted: (...args) =>
|
|
173
|
+
autoUpdate(...args, {
|
|
174
|
+
layoutShift: !props.disableUpdateOnLayoutShift,
|
|
175
|
+
animationFrame: props.updatePositionStrategy === 'always',
|
|
176
|
+
}),
|
|
177
|
+
middleware: computedMiddleware,
|
|
178
|
+
},
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
const placedSide = computed(() => getSideAndAlignFromPlacement(placement.value)[0])
|
|
182
|
+
const placedAlign = computed(() => getSideAndAlignFromPlacement(placement.value)[1])
|
|
183
|
+
|
|
184
|
+
watchPostEffect(() => {
|
|
185
|
+
if (isPositioned.value) emit('placed')
|
|
186
|
+
})
|
|
187
|
+
|
|
188
|
+
const shouldHideArrow = computed(() =>
|
|
189
|
+
shouldHidePopperArrow(props.hideShiftedArrow, middlewareData.value),
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
const contentZIndex = ref('')
|
|
193
|
+
watchEffect(() => {
|
|
194
|
+
if (contentElement.value)
|
|
195
|
+
contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex
|
|
196
|
+
})
|
|
197
|
+
|
|
198
|
+
const arrowX = computed(() => middlewareData.value.arrow?.x ?? 0)
|
|
199
|
+
const arrowY = computed(() => middlewareData.value.arrow?.y ?? 0)
|
|
200
|
+
|
|
201
|
+
providePopperContentContext({
|
|
202
|
+
placedSide,
|
|
203
|
+
onArrowChange: element => (arrow.value = element),
|
|
204
|
+
arrowX,
|
|
205
|
+
arrowY,
|
|
206
|
+
shouldHideArrow,
|
|
207
|
+
})
|
|
208
|
+
|
|
209
|
+
const cache: VNode[] = []
|
|
210
|
+
|
|
211
|
+
function content(key: number, withDir: boolean) {
|
|
212
|
+
return h(
|
|
213
|
+
Primitive,
|
|
214
|
+
mergeProps({ key, ref: forwardRef }, attrs, {
|
|
215
|
+
'as-child': props.asChild,
|
|
216
|
+
as: props.as,
|
|
217
|
+
'data-side': placedSide.value,
|
|
218
|
+
'data-align': placedAlign.value,
|
|
219
|
+
...(withDir ? { dir: dir.value } : {}),
|
|
220
|
+
style: { animation: !isPositioned.value ? 'none' : undefined },
|
|
221
|
+
}),
|
|
222
|
+
{ default: withCtx(() => [renderSlot(slots, 'default')]) },
|
|
223
|
+
)
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return () =>
|
|
227
|
+
h(
|
|
228
|
+
'div',
|
|
229
|
+
{
|
|
230
|
+
ref: floatingRef,
|
|
231
|
+
'data-reka-popper-content-wrapper': '',
|
|
232
|
+
dir: dir.value,
|
|
233
|
+
style: normalizeStyle(
|
|
234
|
+
popperWrapperStyle(floatingStyles.value, {
|
|
235
|
+
isPositioned: isPositioned.value,
|
|
236
|
+
zIndex: contentZIndex.value,
|
|
237
|
+
middlewareData: middlewareData.value,
|
|
238
|
+
prefix: 'reka',
|
|
239
|
+
}),
|
|
240
|
+
),
|
|
241
|
+
},
|
|
242
|
+
[
|
|
243
|
+
props.memoDependencies
|
|
244
|
+
? withMemo(
|
|
245
|
+
[
|
|
246
|
+
props.asChild,
|
|
247
|
+
props.as,
|
|
248
|
+
placedSide.value,
|
|
249
|
+
placedAlign.value,
|
|
250
|
+
isPositioned.value,
|
|
251
|
+
...Object.values(attrs),
|
|
252
|
+
...props.memoDependencies,
|
|
253
|
+
],
|
|
254
|
+
() => content(0, false),
|
|
255
|
+
cache,
|
|
256
|
+
0,
|
|
257
|
+
)
|
|
258
|
+
: content(1, true),
|
|
259
|
+
],
|
|
260
|
+
)
|
|
261
|
+
},
|
|
262
|
+
})
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineComponent, ref, renderSlot } from 'vue'
|
|
2
|
+
import type { ReferenceElement } from '@floating-ui/vue'
|
|
3
|
+
import { providePopperRootContext } from './context'
|
|
4
|
+
|
|
5
|
+
export const PopperRoot = defineComponent({
|
|
6
|
+
name: 'PopperRoot',
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
setup(_, { slots }) {
|
|
9
|
+
const anchor = ref<ReferenceElement>()
|
|
10
|
+
providePopperRootContext({
|
|
11
|
+
anchor,
|
|
12
|
+
onAnchorChange: element => (anchor.value = element),
|
|
13
|
+
})
|
|
14
|
+
return () => renderSlot(slots, 'default')
|
|
15
|
+
},
|
|
16
|
+
})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue'
|
|
2
|
+
import type { Side } from '../../../../shared/src/primitives/popper'
|
|
3
|
+
import type { ReferenceElement } from '@floating-ui/vue'
|
|
4
|
+
import { createContext } from '../utils/createContext'
|
|
5
|
+
|
|
6
|
+
export interface PopperRootContext {
|
|
7
|
+
anchor: Ref<ReferenceElement | undefined>
|
|
8
|
+
onAnchorChange: (element: ReferenceElement | undefined) => void
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const [injectPopperRootContext, providePopperRootContext] =
|
|
12
|
+
createContext<PopperRootContext>('PopperRoot')
|
|
13
|
+
|
|
14
|
+
export interface PopperContentContext {
|
|
15
|
+
placedSide: Ref<Side>
|
|
16
|
+
onArrowChange: (arrow: HTMLElement | undefined) => void
|
|
17
|
+
arrowX?: ComputedRef<number>
|
|
18
|
+
arrowY?: ComputedRef<number>
|
|
19
|
+
shouldHideArrow: Ref<boolean>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const [injectPopperContentContext, providePopperContentContext] =
|
|
23
|
+
createContext<PopperContentContext>('PopperContent')
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export {
|
|
2
|
+
injectPopperContentContext,
|
|
3
|
+
injectPopperRootContext,
|
|
4
|
+
type PopperContentContext,
|
|
5
|
+
type PopperRootContext,
|
|
6
|
+
} from './context'
|
|
7
|
+
export { Arrow, type ArrowProps } from './Arrow'
|
|
8
|
+
export { PopperAnchor, type PopperAnchorProps } from './PopperAnchor'
|
|
9
|
+
export { PopperArrow, type PopperArrowProps } from './PopperArrow'
|
|
10
|
+
export { PopperContent, popperContentProps, type PopperContentProps } from './PopperContent'
|
|
11
|
+
export { PopperRoot } from './PopperRoot'
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 UnoVue <https://github.com/unovue>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Portions adapted from VueUse:
|
|
24
|
+
MIT License
|
|
25
|
+
|
|
26
|
+
Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
|
|
27
|
+
|
|
28
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
29
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
30
|
+
in the Software without restriction, including without limitation the rights
|
|
31
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
32
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
33
|
+
furnished to do so, subject to the following conditions:
|
|
34
|
+
|
|
35
|
+
The above copyright notice and this permission notice shall be included in all
|
|
36
|
+
copies or substantial portions of the Software.
|
|
37
|
+
|
|
38
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
39
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
40
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
41
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
42
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
43
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
44
|
+
SOFTWARE.
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
createTextVNode,
|
|
4
|
+
defineComponent,
|
|
5
|
+
h,
|
|
6
|
+
nextTick,
|
|
7
|
+
renderSlot,
|
|
8
|
+
toDisplayString,
|
|
9
|
+
withCtx,
|
|
10
|
+
withKeys,
|
|
11
|
+
type PropType,
|
|
12
|
+
} from 'vue'
|
|
13
|
+
import { getLocalTimeZone, isSameMonth, isToday, type DateValue } from '@internationalized/date'
|
|
14
|
+
import {
|
|
15
|
+
calendarArrowShift,
|
|
16
|
+
calendarCellTabIndex,
|
|
17
|
+
calendarShiftCandidate,
|
|
18
|
+
} from '../../../../shared/src/primitives/date/calendar-view'
|
|
19
|
+
import { isBetweenInclusive, toDate } from '../../../../shared/src/primitives/date/comparators'
|
|
20
|
+
import {
|
|
21
|
+
isRangeFocusedDate,
|
|
22
|
+
nextRangeSelection,
|
|
23
|
+
} from '../../../../shared/src/primitives/date/range-calendar-view'
|
|
24
|
+
import { kbd } from '../../../../shared/src/primitives/date/utils'
|
|
25
|
+
import { Primitive, type PrimitiveProps } from '../primitive'
|
|
26
|
+
import { usePrimitiveElement } from '../utils/usePrimitiveElement'
|
|
27
|
+
import { injectRangeCalendarRootContext } from './context'
|
|
28
|
+
|
|
29
|
+
export interface RangeCalendarCellTriggerProps {
|
|
30
|
+
day: DateValue
|
|
31
|
+
month: DateValue
|
|
32
|
+
asChild?: boolean
|
|
33
|
+
as?: PrimitiveProps['as']
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const RangeCalendarCellTrigger = defineComponent({
|
|
37
|
+
name: 'RangeCalendarCellTrigger',
|
|
38
|
+
props: {
|
|
39
|
+
day: { type: null as unknown as PropType<DateValue>, required: true },
|
|
40
|
+
month: { type: null as unknown as PropType<DateValue>, required: true },
|
|
41
|
+
asChild: { type: Boolean, required: false },
|
|
42
|
+
as: {
|
|
43
|
+
type: null as unknown as PropType<PrimitiveProps['as']>,
|
|
44
|
+
required: false,
|
|
45
|
+
default: 'div',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
setup(props, { slots }) {
|
|
49
|
+
const rootContext = injectRangeCalendarRootContext()
|
|
50
|
+
const { primitiveElement } = usePrimitiveElement()
|
|
51
|
+
|
|
52
|
+
const labelText = computed(() =>
|
|
53
|
+
rootContext.formatter.custom(toDate(props.day), {
|
|
54
|
+
weekday: 'long',
|
|
55
|
+
month: 'long',
|
|
56
|
+
day: 'numeric',
|
|
57
|
+
year: 'numeric',
|
|
58
|
+
}),
|
|
59
|
+
)
|
|
60
|
+
const isUnavailable = computed(() => rootContext.isDateUnavailable?.(props.day) ?? false)
|
|
61
|
+
const isSelectedDate = computed(() => rootContext.isSelected(props.day))
|
|
62
|
+
const isSelectionStart = computed(() => rootContext.isSelectionStart(props.day))
|
|
63
|
+
const isSelectionEnd = computed(() => rootContext.isSelectionEnd(props.day))
|
|
64
|
+
const isHighlightStart = computed(() => rootContext.isHighlightedStart(props.day))
|
|
65
|
+
const isHighlightEnd = computed(() => rootContext.isHighlightedEnd(props.day))
|
|
66
|
+
const isHighlighted = computed(() =>
|
|
67
|
+
rootContext.highlightedRange.value
|
|
68
|
+
? isBetweenInclusive(
|
|
69
|
+
props.day,
|
|
70
|
+
rootContext.highlightedRange.value.start,
|
|
71
|
+
rootContext.highlightedRange.value.end,
|
|
72
|
+
)
|
|
73
|
+
: false,
|
|
74
|
+
)
|
|
75
|
+
const allowNonContiguousRanges = computed(() => rootContext.allowNonContiguousRanges.value)
|
|
76
|
+
const isDateToday = computed(() => isToday(props.day, getLocalTimeZone()))
|
|
77
|
+
const isOutsideView = computed(() => !isSameMonth(props.day, props.month))
|
|
78
|
+
const isOutsideVisibleView = computed(() => rootContext.isOutsideVisibleView(props.day))
|
|
79
|
+
const isDisabled = computed(
|
|
80
|
+
() =>
|
|
81
|
+
rootContext.isDateDisabled(props.day) ||
|
|
82
|
+
(rootContext.disableDaysOutsideCurrentView.value && isOutsideView.value),
|
|
83
|
+
)
|
|
84
|
+
const dayValue = computed(() => props.day.day.toLocaleString(rootContext.locale.value))
|
|
85
|
+
const isFocusedDate = computed(() =>
|
|
86
|
+
isRangeFocusedDate({
|
|
87
|
+
day: props.day,
|
|
88
|
+
outsideView: isOutsideView.value,
|
|
89
|
+
disabled: isDisabled.value,
|
|
90
|
+
rootDisabled: rootContext.disabled.value,
|
|
91
|
+
placeholderFocusable: rootContext.isPlaceholderFocusable.value,
|
|
92
|
+
placeholder: rootContext.placeholder.value,
|
|
93
|
+
selectedFocusableDate: rootContext.selectedFocusableDate.value,
|
|
94
|
+
hasSelectedDate: rootContext.hasSelectedDate.value,
|
|
95
|
+
selectedDisabled: rootContext.isSelectedDisabled.value,
|
|
96
|
+
firstFocusableDate: rootContext.firstFocusableDate.value,
|
|
97
|
+
}),
|
|
98
|
+
)
|
|
99
|
+
const shown = (value: boolean) =>
|
|
100
|
+
value && (allowNonContiguousRanges.value || !isUnavailable.value)
|
|
101
|
+
|
|
102
|
+
function changeDate(event: Event, date: DateValue) {
|
|
103
|
+
if (rootContext.readonly.value) return
|
|
104
|
+
if (rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date)) return
|
|
105
|
+
const change = nextRangeSelection(date, {
|
|
106
|
+
start: rootContext.startValue.value,
|
|
107
|
+
end: rootContext.endValue.value,
|
|
108
|
+
highlighted: rootContext.highlightedRange.value !== null,
|
|
109
|
+
lastPressed: rootContext.lastPressedDateValue.value,
|
|
110
|
+
preventDeselect: rootContext.preventDeselect.value,
|
|
111
|
+
fixedDate: rootContext.fixedDate.value,
|
|
112
|
+
})
|
|
113
|
+
if (change.preventDefault) event.preventDefault()
|
|
114
|
+
if (change.start) rootContext.startValue.value = change.start.value
|
|
115
|
+
if (change.end) rootContext.endValue.value = change.end.value
|
|
116
|
+
if (change.placeholder) rootContext.onPlaceholderChange(change.placeholder)
|
|
117
|
+
if (change.lastPressed) rootContext.lastPressedDateValue.value = change.lastPressed
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function handleClick(event: MouseEvent) {
|
|
121
|
+
if (isDisabled.value) return
|
|
122
|
+
changeDate(event, props.day)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function handleFocus() {
|
|
126
|
+
if (isDisabled.value || rootContext.isDateUnavailable?.(props.day)) return
|
|
127
|
+
rootContext.focusedValue.value = props.day.copy()
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function shiftFocus(day: DateValue, add: number) {
|
|
131
|
+
const candidateDayValue = calendarShiftCandidate(
|
|
132
|
+
day,
|
|
133
|
+
add,
|
|
134
|
+
rootContext.minValue.value,
|
|
135
|
+
rootContext.maxValue.value,
|
|
136
|
+
)
|
|
137
|
+
if (!candidateDayValue) return
|
|
138
|
+
const candidateDay = rootContext.parentElement.value!.querySelector<HTMLElement>(
|
|
139
|
+
`[data-value='${candidateDayValue.toString()}']:not([data-outside-view])`,
|
|
140
|
+
)
|
|
141
|
+
if (!candidateDay) {
|
|
142
|
+
if (add > 0) {
|
|
143
|
+
if (rootContext.isNextButtonDisabled()) return
|
|
144
|
+
rootContext.nextPage()
|
|
145
|
+
} else {
|
|
146
|
+
if (rootContext.isPrevButtonDisabled()) return
|
|
147
|
+
rootContext.prevPage()
|
|
148
|
+
}
|
|
149
|
+
void nextTick(() => shiftFocus(day, add))
|
|
150
|
+
return
|
|
151
|
+
}
|
|
152
|
+
if (candidateDay.hasAttribute('data-disabled')) return shiftFocus(candidateDayValue, add)
|
|
153
|
+
rootContext.onPlaceholderChange(candidateDayValue)
|
|
154
|
+
candidateDay.focus()
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function handleArrowKey(event: KeyboardEvent) {
|
|
158
|
+
if (isDisabled.value) return
|
|
159
|
+
if (
|
|
160
|
+
(event.code === kbd.ENTER || event.code === kbd.SPACE_CODE) &&
|
|
161
|
+
(event.ctrlKey || event.metaKey || event.altKey)
|
|
162
|
+
)
|
|
163
|
+
return
|
|
164
|
+
event.preventDefault()
|
|
165
|
+
event.stopPropagation()
|
|
166
|
+
const shift = calendarArrowShift(event.code, rootContext.dir.value)
|
|
167
|
+
if (shift !== undefined) shiftFocus(props.day, shift)
|
|
168
|
+
else if (event.code === kbd.ENTER || event.code === kbd.SPACE_CODE)
|
|
169
|
+
changeDate(event, props.day)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const onKeydown = withKeys(handleArrowKey as (event: Event) => void, [
|
|
173
|
+
'up',
|
|
174
|
+
'down',
|
|
175
|
+
'left',
|
|
176
|
+
'right',
|
|
177
|
+
'enter',
|
|
178
|
+
'space',
|
|
179
|
+
])
|
|
180
|
+
|
|
181
|
+
return () =>
|
|
182
|
+
h(
|
|
183
|
+
Primitive,
|
|
184
|
+
{
|
|
185
|
+
ref: primitiveElement,
|
|
186
|
+
as: props.as,
|
|
187
|
+
'as-child': props.asChild,
|
|
188
|
+
role: 'button',
|
|
189
|
+
'aria-label': labelText.value,
|
|
190
|
+
'data-reka-calendar-cell-trigger': '',
|
|
191
|
+
'aria-pressed': shown(isSelectedDate.value) ? true : undefined,
|
|
192
|
+
'aria-disabled': isDisabled.value || isUnavailable.value ? true : undefined,
|
|
193
|
+
'data-highlighted': shown(isHighlighted.value) ? '' : undefined,
|
|
194
|
+
'data-selection-start': isSelectionStart.value ? true : undefined,
|
|
195
|
+
'data-selection-end': isSelectionEnd.value ? true : undefined,
|
|
196
|
+
'data-highlighted-start': isHighlightStart.value ? true : undefined,
|
|
197
|
+
'data-highlighted-end': isHighlightEnd.value ? true : undefined,
|
|
198
|
+
'data-selected': shown(isSelectedDate.value) ? true : undefined,
|
|
199
|
+
'data-outside-visible-view': isOutsideVisibleView.value ? '' : undefined,
|
|
200
|
+
'data-value': props.day.toString(),
|
|
201
|
+
'data-disabled': isDisabled.value ? '' : undefined,
|
|
202
|
+
'data-unavailable': isUnavailable.value ? '' : undefined,
|
|
203
|
+
'data-today': isDateToday.value ? '' : undefined,
|
|
204
|
+
'data-outside-view': isOutsideView.value ? '' : undefined,
|
|
205
|
+
'data-focused': isFocusedDate.value ? '' : undefined,
|
|
206
|
+
tabindex: calendarCellTabIndex(
|
|
207
|
+
isFocusedDate.value,
|
|
208
|
+
isOutsideView.value,
|
|
209
|
+
isDisabled.value,
|
|
210
|
+
),
|
|
211
|
+
onClick: handleClick,
|
|
212
|
+
onFocusin: handleFocus,
|
|
213
|
+
onMouseenter: handleFocus,
|
|
214
|
+
onKeydown,
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
default: withCtx(() => [
|
|
218
|
+
renderSlot(
|
|
219
|
+
slots,
|
|
220
|
+
'default',
|
|
221
|
+
{
|
|
222
|
+
dayValue: dayValue.value,
|
|
223
|
+
disabled: isDisabled.value,
|
|
224
|
+
today: isDateToday.value,
|
|
225
|
+
selected: isSelectedDate.value,
|
|
226
|
+
outsideView: isOutsideView.value,
|
|
227
|
+
outsideVisibleView: isOutsideVisibleView.value,
|
|
228
|
+
unavailable: isUnavailable.value,
|
|
229
|
+
highlighted: shown(isHighlighted.value),
|
|
230
|
+
highlightedStart: isHighlightStart.value,
|
|
231
|
+
highlightedEnd: isHighlightEnd.value,
|
|
232
|
+
selectionStart: isSelectionStart.value,
|
|
233
|
+
selectionEnd: isSelectionEnd.value,
|
|
234
|
+
},
|
|
235
|
+
() => [createTextVNode(toDisplayString(dayValue.value), 1)],
|
|
236
|
+
),
|
|
237
|
+
]),
|
|
238
|
+
},
|
|
239
|
+
)
|
|
240
|
+
},
|
|
241
|
+
})
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { computed, defineComponent, h, mergeProps, renderSlot, withCtx, type PropType } from 'vue'
|
|
2
|
+
import type { DateValue } from '@internationalized/date'
|
|
3
|
+
import { createPagingButton } from '../calendar/CalendarNav'
|
|
4
|
+
import { createGridGroup } from '../calendar/CalendarGrid'
|
|
5
|
+
import { Primitive, type PrimitiveProps } from '../primitive'
|
|
6
|
+
import { injectRangeCalendarRootContext } from './context'
|
|
7
|
+
|
|
8
|
+
export const RangeCalendarGrid = defineComponent({
|
|
9
|
+
name: 'RangeCalendarGrid',
|
|
10
|
+
props: {
|
|
11
|
+
asChild: { type: Boolean, required: false },
|
|
12
|
+
as: {
|
|
13
|
+
type: null as unknown as PropType<PrimitiveProps['as']>,
|
|
14
|
+
required: false,
|
|
15
|
+
default: 'table',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
setup(props, { slots }) {
|
|
19
|
+
const rootContext = injectRangeCalendarRootContext()
|
|
20
|
+
const disabled = computed(() => (rootContext.disabled.value ? true : undefined))
|
|
21
|
+
const readonly = computed(() => (rootContext.readonly.value ? true : undefined))
|
|
22
|
+
const onMouseleave = () => {
|
|
23
|
+
rootContext.focusedValue.value = undefined
|
|
24
|
+
}
|
|
25
|
+
return () =>
|
|
26
|
+
h(
|
|
27
|
+
Primitive,
|
|
28
|
+
mergeProps(props, {
|
|
29
|
+
tabindex: '-1',
|
|
30
|
+
role: 'application',
|
|
31
|
+
'aria-readonly': readonly.value,
|
|
32
|
+
'aria-disabled': disabled.value,
|
|
33
|
+
'data-readonly': readonly.value && '',
|
|
34
|
+
'data-disabled': disabled.value && '',
|
|
35
|
+
onMouseleave,
|
|
36
|
+
}),
|
|
37
|
+
{ default: withCtx(() => [renderSlot(slots, 'default')]) },
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
export const RangeCalendarGridHead = createGridGroup('RangeCalendarGridHead', 'thead', {
|
|
43
|
+
'aria-hidden': 'true',
|
|
44
|
+
})
|
|
45
|
+
export const RangeCalendarGridBody = createGridGroup('RangeCalendarGridBody', 'tbody')
|
|
46
|
+
export const RangeCalendarGridRow = createGridGroup('RangeCalendarGridRow', 'tr')
|
|
47
|
+
export const RangeCalendarHeadCell = createGridGroup('RangeCalendarHeadCell', 'th')
|
|
48
|
+
|
|
49
|
+
export const RangeCalendarCell = defineComponent({
|
|
50
|
+
name: 'RangeCalendarCell',
|
|
51
|
+
props: {
|
|
52
|
+
date: { type: null as unknown as PropType<DateValue>, required: true },
|
|
53
|
+
asChild: { type: Boolean, required: false },
|
|
54
|
+
as: { type: null as unknown as PropType<PrimitiveProps['as']>, required: false, default: 'td' },
|
|
55
|
+
},
|
|
56
|
+
setup(props, { slots }) {
|
|
57
|
+
const rootContext = injectRangeCalendarRootContext()
|
|
58
|
+
return () =>
|
|
59
|
+
h(
|
|
60
|
+
Primitive,
|
|
61
|
+
{
|
|
62
|
+
as: props.as,
|
|
63
|
+
'as-child': props.asChild,
|
|
64
|
+
role: 'gridcell',
|
|
65
|
+
'aria-selected': rootContext.isSelected(props.date) ? true : undefined,
|
|
66
|
+
'aria-disabled':
|
|
67
|
+
rootContext.isDateDisabled(props.date) ||
|
|
68
|
+
rootContext.isDateUnavailable?.(props.date) ||
|
|
69
|
+
rootContext.disableDaysOutsideCurrentView.value,
|
|
70
|
+
'data-disabled':
|
|
71
|
+
rootContext.isDateDisabled(props.date) ||
|
|
72
|
+
rootContext.disableDaysOutsideCurrentView.value
|
|
73
|
+
? ''
|
|
74
|
+
: undefined,
|
|
75
|
+
},
|
|
76
|
+
{ default: withCtx(() => [renderSlot(slots, 'default')]) },
|
|
77
|
+
)
|
|
78
|
+
},
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
export const RangeCalendarNext = createPagingButton(
|
|
82
|
+
'RangeCalendarNext',
|
|
83
|
+
'next',
|
|
84
|
+
injectRangeCalendarRootContext,
|
|
85
|
+
)
|
|
86
|
+
export const RangeCalendarPrev = createPagingButton(
|
|
87
|
+
'RangeCalendarPrev',
|
|
88
|
+
'prev',
|
|
89
|
+
injectRangeCalendarRootContext,
|
|
90
|
+
)
|