@soybeanjs/headless 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/accordion-content.vue.d.ts +2 -2
- package/dist/components/accordion/accordion-header.vue.d.ts +2 -2
- package/dist/components/accordion/accordion-item.vue.d.ts +5 -5
- package/dist/components/accordion/accordion-root.vue.d.ts +4 -4
- package/dist/components/accordion/accordion-trigger.js +1 -1
- package/dist/components/accordion/accordion-trigger.vue.d.ts +2 -2
- package/dist/components/alert/alert-close.vue.d.ts +2 -2
- package/dist/components/alert/alert-content.vue.d.ts +2 -2
- package/dist/components/alert/alert-description.vue.d.ts +2 -2
- package/dist/components/alert/alert-root.vue.d.ts +4 -4
- package/dist/components/alert/alert-title.vue.d.ts +2 -2
- package/dist/components/alert-dialog/alert-dialog-close.vue.d.ts +2 -2
- package/dist/components/alert-dialog/alert-dialog-content.js +1 -1
- package/dist/components/alert-dialog/alert-dialog-content.vue.d.ts +6 -6
- package/dist/components/alert-dialog/alert-dialog-root.vue.d.ts +4 -4
- package/dist/components/arrow/arrow.js +1 -1
- package/dist/components/arrow/arrow.vue.d.ts +2 -18
- package/dist/components/arrow/index.d.ts +1 -2
- package/dist/components/arrow/index.js +1 -1
- package/dist/components/arrow/types.d.ts +1 -15
- package/dist/components/aspect-ratio/aspect-ratio.vue.d.ts +3 -3
- package/dist/components/avatar/avatar-fallback.vue.d.ts +2 -2
- package/dist/components/avatar/avatar-image.vue.d.ts +4 -4
- package/dist/components/avatar/avatar-root.vue.d.ts +2 -2
- package/dist/components/badge/badge-content.vue.d.ts +2 -2
- package/dist/components/badge/badge-root.vue.d.ts +4 -4
- package/dist/components/breadcrumb/breadcrumb-ellipsis.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-link.vue.d.ts +4 -4
- package/dist/components/breadcrumb/breadcrumb-list.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-page.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-root.vue.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-separator.vue.d.ts +2 -2
- package/dist/components/button/button.vue.d.ts +5 -5
- package/dist/components/card/card-content.vue.d.ts +2 -2
- package/dist/components/card/card-description.vue.d.ts +2 -2
- package/dist/components/card/card-footer.vue.d.ts +2 -2
- package/dist/components/card/card-header.vue.d.ts +2 -2
- package/dist/components/card/card-root.vue.d.ts +2 -2
- package/dist/components/card/card-title-root.vue.d.ts +2 -2
- package/dist/components/card/card-title.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox-control.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox-group-root.vue.d.ts +4 -4
- package/dist/components/checkbox/checkbox-indicator.vue.d.ts +4 -4
- package/dist/components/checkbox/checkbox-label.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox-root.vue.d.ts +4 -4
- package/dist/components/collapsible/collapsible-content.vue.d.ts +2 -2
- package/dist/components/collapsible/collapsible-root.vue.d.ts +6 -6
- package/dist/components/collapsible/collapsible-trigger.js +1 -1
- package/dist/components/collapsible/collapsible-trigger.vue.d.ts +4 -4
- package/dist/components/collapsible/types.d.ts +4 -1
- package/dist/components/config-provider/config-provider.vue.d.ts +3 -3
- package/dist/components/context-menu/context-menu-content.js +1 -1
- package/dist/components/context-menu/context-menu-content.vue.d.ts +8 -8
- package/dist/components/context-menu/context-menu-root.vue.d.ts +4 -4
- package/dist/components/context-menu/context-menu-trigger.vue.d.ts +6 -6
- package/dist/components/context-menu/index.d.ts +3 -4
- package/dist/components/dialog/dialog-close.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-content-impl.js +1 -1
- package/dist/components/dialog/dialog-content.js +1 -1
- package/dist/components/dialog/dialog-content.vue.d.ts +8 -8
- package/dist/components/dialog/dialog-description.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-footer.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-header.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-overlay.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-root.vue.d.ts +4 -4
- package/dist/components/dialog/dialog-title.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-trigger.vue.d.ts +2 -2
- package/dist/components/dialog/types.d.ts +1 -1
- package/dist/components/dropdown-menu/context.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-content.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-content.vue.d.ts +8 -8
- package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +4 -4
- package/dist/components/dropdown-menu/dropdown-menu-trigger.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-trigger.vue.d.ts +4 -4
- package/dist/components/dropdown-menu/index.d.ts +3 -4
- package/dist/components/form/form-description.vue.d.ts +2 -2
- package/dist/components/form/form-error.vue.d.ts +2 -2
- package/dist/components/form/form-field-array.vue.d.ts +2 -2
- package/dist/components/form/form-field.vue.d.ts +2 -2
- package/dist/components/form/form-label.vue.d.ts +2 -2
- package/dist/components/input/input-control.vue.d.ts +2 -2
- package/dist/components/input/input-root.vue.d.ts +4 -4
- package/dist/components/kbd/kbd.vue.d.ts +2 -2
- package/dist/components/label/label.vue.d.ts +2 -2
- package/dist/components/layout/layout-footer.vue.d.ts +2 -2
- package/dist/components/layout/layout-header.vue.d.ts +2 -2
- package/dist/components/layout/layout-main.vue.d.ts +2 -2
- package/dist/components/layout/layout-mobile.vue.d.ts +4 -4
- package/dist/components/layout/layout-rail.vue.d.ts +2 -2
- package/dist/components/layout/layout-root.vue.d.ts +4 -4
- package/dist/components/layout/layout-sidebar.vue.d.ts +5 -5
- package/dist/components/layout/layout-tab.vue.d.ts +2 -2
- package/dist/components/layout/layout-trigger.vue.d.ts +2 -2
- package/dist/components/link/index.d.ts +2 -2
- package/dist/components/link/link.js +1 -1
- package/dist/components/link/link.vue.d.ts +6 -5
- package/dist/components/link/types.d.ts +6 -1
- package/dist/components/list/list-content.vue.d.ts +2 -2
- package/dist/components/list/list-description.vue.d.ts +2 -2
- package/dist/components/list/list-item.vue.d.ts +2 -2
- package/dist/components/list/list-root.vue.d.ts +2 -2
- package/dist/components/list/list-title.vue.d.ts +2 -2
- package/dist/components/listbox/listbox-content.vue.d.ts +2 -2
- package/dist/components/listbox/listbox-filter.vue.d.ts +6 -6
- package/dist/components/listbox/listbox-group-label.vue.d.ts +2 -2
- package/dist/components/listbox/listbox-group.vue.d.ts +2 -2
- package/dist/components/listbox/listbox-item-indicator.vue.d.ts +4 -4
- package/dist/components/listbox/listbox-item.vue.d.ts +5 -5
- package/dist/components/listbox/listbox-root.vue.d.ts +8 -8
- package/dist/components/listbox/listbox-virtualizer.vue.d.ts +2 -2
- package/dist/components/menu/context.js +1 -1
- package/dist/components/menu/index.d.ts +3 -4
- package/dist/components/menu/menu-checkbox-group.vue.d.ts +4 -4
- package/dist/components/menu/menu-checkbox-item.vue.d.ts +6 -6
- package/dist/components/menu/menu-content-impl.js +1 -1
- package/dist/components/menu/menu-content.js +1 -1
- package/dist/components/menu/menu-content.vue.d.ts +11 -11
- package/dist/components/menu/menu-group-label.vue.d.ts +2 -2
- package/dist/components/menu/menu-group.vue.d.ts +2 -2
- package/dist/components/menu/menu-item-indicator.vue.d.ts +4 -4
- package/dist/components/menu/menu-item.vue.d.ts +6 -6
- package/dist/components/menu/menu-radio-group.vue.d.ts +4 -4
- package/dist/components/menu/menu-radio-item.vue.d.ts +6 -6
- package/dist/components/menu/menu-root.js +1 -1
- package/dist/components/menu/menu-root.vue.d.ts +4 -4
- package/dist/components/menu/menu-sub-content.js +1 -1
- package/dist/components/menu/menu-sub-content.vue.d.ts +10 -10
- package/dist/components/menu/menu-sub-trigger.js +1 -1
- package/dist/components/menu/menu-sub-trigger.vue.d.ts +4 -4
- package/dist/components/menu/menu-sub.js +1 -1
- package/dist/components/menu/menu-sub.vue.d.ts +4 -4
- package/dist/components/menu/shared.js +1 -1
- package/dist/components/menu/types.d.ts +7 -12
- package/dist/components/navigation-menu/navigation-menu-content-impl.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-content.vue.d.ts +6 -6
- package/dist/components/navigation-menu/navigation-menu-indicator.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-indicator.vue.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu-item.vue.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu-link.vue.d.ts +6 -6
- package/dist/components/navigation-menu/navigation-menu-list.vue.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu-root.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-root.vue.d.ts +7 -6
- package/dist/components/navigation-menu/navigation-menu-sub-list.vue.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu-trigger.js +1 -1
- package/dist/components/navigation-menu/navigation-menu-trigger.vue.d.ts +4 -4
- package/dist/components/navigation-menu/navigation-menu-viewport.vue.d.ts +3 -3
- package/dist/components/navigation-menu/types.d.ts +3 -1
- package/dist/components/number-input/number-input-control.vue.d.ts +2 -2
- package/dist/components/number-input/number-input-decrement.vue.d.ts +4 -4
- package/dist/components/number-input/number-input-increment.vue.d.ts +4 -4
- package/dist/components/number-input/number-input-root.vue.d.ts +4 -4
- package/dist/components/pagination/pagination-ellipsis.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-first.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-last.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-list-item.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-list.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-next.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-prev.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-root.vue.d.ts +4 -4
- package/dist/components/popover/context.js +1 -1
- package/dist/components/popover/index.d.ts +7 -7
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover-anchor.vue.d.ts +2 -2
- package/dist/components/popover/popover-close.vue.d.ts +4 -4
- package/dist/components/popover/popover-popup.js +1 -0
- package/dist/components/popover/popover-popup.vue.d.ts +18 -0
- package/dist/components/popover/popover-positioner-impl.js +1 -0
- package/dist/components/popover/popover-positioner.js +1 -0
- package/dist/components/popover/{popover-content.vue.d.ts → popover-positioner.vue.d.ts} +10 -10
- package/dist/components/popover/popover-root.js +1 -1
- package/dist/components/popover/popover-root.vue.d.ts +5 -4
- package/dist/components/popover/popover-trigger.js +1 -1
- package/dist/components/popover/popover-trigger.vue.d.ts +4 -4
- package/dist/components/popover/types.d.ts +8 -7
- package/dist/components/popper/context.d.ts +6 -16
- package/dist/components/popper/context.js +1 -1
- package/dist/components/popper/index.d.ts +6 -6
- package/dist/components/popper/index.js +1 -1
- package/dist/components/popper/popper-anchor.vue.d.ts +2 -2
- package/dist/components/popper/popper-arrow.js +1 -1
- package/dist/components/popper/popper-arrow.vue.d.ts +3 -14
- package/dist/components/popper/popper-popup.js +1 -0
- package/dist/components/popper/popper-popup.vue.d.ts +18 -0
- package/dist/components/popper/popper-positioner.js +1 -0
- package/dist/components/popper/{popper-content.vue.d.ts → popper-positioner.vue.d.ts} +24 -24
- package/dist/components/popper/popper-root.vue.d.ts +2 -2
- package/dist/components/popper/shared.js +1 -1
- package/dist/components/popper/types.d.ts +10 -15
- package/dist/components/portal/portal.vue.d.ts +3 -3
- package/dist/components/primitive/primitive.d.ts +2 -2
- package/dist/components/radio-group/radio-group-control.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group-indicator.vue.d.ts +4 -4
- package/dist/components/radio-group/radio-group-item.vue.d.ts +4 -4
- package/dist/components/radio-group/radio-group-label.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group-root.vue.d.ts +4 -4
- package/dist/components/roving-focus/roving-focus-group.vue.d.ts +5 -5
- package/dist/components/roving-focus/roving-focus-item.vue.d.ts +3 -3
- package/dist/components/select/context.js +1 -1
- package/dist/components/select/index.d.ts +3 -3
- package/dist/components/select/select-arrow.js +1 -1
- package/dist/components/select/select-arrow.vue.d.ts +3 -3
- package/dist/components/select/select-bubble-select.js +1 -0
- package/dist/components/select/select-content-impl.js +1 -1
- package/dist/components/select/select-content.js +1 -1
- package/dist/components/select/select-content.vue.d.ts +11 -11
- package/dist/components/select/select-group-label.vue.d.ts +2 -2
- package/dist/components/select/select-group.vue.d.ts +2 -2
- package/dist/components/select/select-item-aligned-popup.js +1 -0
- package/dist/components/select/select-item-aligned-positioner.js +1 -0
- package/dist/components/select/select-item-indicator.vue.d.ts +4 -4
- package/dist/components/select/select-item-text.vue.d.ts +2 -2
- package/dist/components/select/select-item.vue.d.ts +4 -4
- package/dist/components/select/select-popper-popup.js +1 -0
- package/dist/components/select/select-root.js +1 -1
- package/dist/components/select/select-root.vue.d.ts +7 -7
- package/dist/components/select/select-scroll-down-button.vue.d.ts +4 -4
- package/dist/components/select/select-scroll-up-button.vue.d.ts +4 -4
- package/dist/components/select/select-separator.vue.d.ts +2 -2
- package/dist/components/select/select-teleport-provider.js +1 -1
- package/dist/components/select/select-trigger-icon.vue.d.ts +2 -2
- package/dist/components/select/select-trigger.vue.d.ts +4 -4
- package/dist/components/select/select-value.vue.d.ts +3 -3
- package/dist/components/select/select-viewport.js +1 -1
- package/dist/components/select/select-viewport.vue.d.ts +2 -2
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/types.d.ts +6 -5
- package/dist/components/separator/separator-label.vue.d.ts +2 -2
- package/dist/components/separator/separator-root.vue.d.ts +3 -3
- package/dist/components/separator/types.d.ts +1 -1
- package/dist/components/slot/slot.d.ts +2 -2
- package/dist/components/switch/switch-control.vue.d.ts +2 -2
- package/dist/components/switch/switch-root.vue.d.ts +4 -4
- package/dist/components/switch/switch-thumb.vue.d.ts +4 -4
- package/dist/components/tabs/tabs-content.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-indicator.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-list.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-root.vue.d.ts +5 -5
- package/dist/components/tabs/tabs-trigger.vue.d.ts +4 -4
- package/dist/components/tag/tag.vue.d.ts +4 -4
- package/dist/components/textarea/textarea-control.vue.d.ts +2 -2
- package/dist/components/textarea/textarea-counter.vue.d.ts +2 -2
- package/dist/components/textarea/textarea-root.vue.d.ts +4 -4
- package/dist/components/toast/toast-action.vue.d.ts +4 -4
- package/dist/components/toast/toast-close.vue.d.ts +4 -4
- package/dist/components/toast/toast-description.vue.d.ts +2 -2
- package/dist/components/toast/toast-provider.vue.d.ts +3 -3
- package/dist/components/toast/toast-root.vue.d.ts +7 -7
- package/dist/components/toast/toast-title.vue.d.ts +2 -2
- package/dist/components/toast/toast-viewport.vue.d.ts +4 -4
- package/dist/components/tooltip/context.js +1 -1
- package/dist/components/tooltip/index.d.ts +7 -7
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip-popup.js +1 -0
- package/dist/components/tooltip/tooltip-popup.vue.d.ts +18 -0
- package/dist/components/tooltip/tooltip-positioner-impl.js +1 -0
- package/dist/components/tooltip/tooltip-positioner.js +1 -0
- package/dist/components/tooltip/{tooltip-content.vue.d.ts → tooltip-positioner.vue.d.ts} +8 -8
- package/dist/components/tooltip/tooltip-root.vue.d.ts +4 -4
- package/dist/components/tooltip/tooltip-trigger.js +1 -1
- package/dist/components/tooltip/tooltip-trigger.vue.d.ts +4 -4
- package/dist/components/tooltip/types.d.ts +7 -6
- package/dist/components/tree/tree-item.vue.d.ts +7 -7
- package/dist/components/tree/tree-root.vue.d.ts +4 -4
- package/dist/components/tree/tree-virtualizer-item.vue.d.ts +6 -6
- package/dist/components/tree/tree-virtualizer-root.vue.d.ts +4 -4
- package/dist/components/tree-menu/context.d.ts +8 -0
- package/dist/components/tree-menu/context.js +1 -0
- package/dist/components/tree-menu/index.d.ts +11 -0
- package/dist/components/tree-menu/index.js +1 -0
- package/dist/components/tree-menu/tree-menu-button.js +1 -0
- package/dist/components/tree-menu/tree-menu-button.vue.d.ts +22 -0
- package/dist/components/tree-menu/tree-menu-collapsible.js +1 -0
- package/dist/components/tree-menu/tree-menu-collapsible.vue.d.ts +22 -0
- package/dist/components/tree-menu/tree-menu-group-label.js +1 -0
- package/dist/components/tree-menu/tree-menu-group-label.vue.d.ts +18 -0
- package/dist/components/tree-menu/tree-menu-group-root.js +1 -0
- package/dist/components/tree-menu/tree-menu-group-root.vue.d.ts +18 -0
- package/dist/components/tree-menu/tree-menu-group.js +1 -0
- package/dist/components/tree-menu/tree-menu-group.vue.d.ts +22 -0
- package/dist/components/tree-menu/tree-menu-item.js +1 -0
- package/dist/components/tree-menu/tree-menu-item.vue.d.ts +22 -0
- package/dist/components/tree-menu/tree-menu-root.js +1 -0
- package/dist/components/tree-menu/tree-menu-root.vue.d.ts +31 -0
- package/dist/components/tree-menu/tree-menu-sub.js +1 -0
- package/dist/components/tree-menu/tree-menu-sub.vue.d.ts +22 -0
- package/dist/components/tree-menu/types.d.ts +74 -0
- package/dist/components/virtualizer/virtualizer-content.vue.d.ts +2 -2
- package/dist/components/virtualizer/virtualizer-item.vue.d.ts +2 -2
- package/dist/components/virtualizer/virtualizer-root.vue.d.ts +3 -3
- package/dist/components/visually-hidden/visually-hidden-input.vue.d.ts +3 -3
- package/dist/components/visually-hidden/visually-hidden.vue.d.ts +4 -4
- package/dist/composables/index.d.ts +4 -2
- package/dist/composables/index.js +1 -1
- package/dist/composables/use-collection.d.ts +6 -6
- package/dist/composables/use-direction.d.ts +2 -2
- package/dist/composables/use-dismissable-layer.d.ts +6 -15
- package/dist/composables/use-dismissable-layer.js +1 -1
- package/dist/composables/use-exposed-element.d.ts +2 -2
- package/dist/composables/use-floating.d.ts +86 -0
- package/dist/composables/use-floating.js +1 -0
- package/dist/composables/use-focus-scope.d.ts +0 -3
- package/dist/composables/use-focus-scope.js +1 -1
- package/dist/composables/use-forward-element.d.ts +2 -2
- package/dist/composables/use-grace-area.d.ts +2 -2
- package/dist/composables/use-grace-area.js +1 -1
- package/dist/composables/use-image-loading-status.d.ts +2 -2
- package/dist/composables/use-is-using-keyboard.d.ts +2 -2
- package/dist/composables/use-kbd.d.ts +2 -2
- package/dist/composables/use-locale.d.ts +2 -2
- package/dist/composables/use-nonce.d.ts +2 -2
- package/dist/composables/use-popup-events.d.ts +23 -0
- package/dist/composables/use-popup-events.js +1 -0
- package/dist/composables/use-presence.d.ts +2 -2
- package/dist/composables/use-props.d.ts +3 -3
- package/dist/composables/use-selection.d.ts +4 -4
- package/dist/constants/components.js +1 -1
- package/dist/index.d.ts +83 -70
- package/dist/index.js +1 -1
- package/dist/namespaced/index.d.ts +395 -371
- package/dist/namespaced/index.js +1 -1
- package/dist/shared/event.js +1 -1
- package/package.json +12 -32
- package/dist/components/arrow/context.d.ts +0 -8
- package/dist/components/arrow/context.js +0 -1
- package/dist/components/dialog/shared.js +0 -1
- package/dist/components/popover/popover-content-impl.js +0 -1
- package/dist/components/popover/popover-content.js +0 -1
- package/dist/components/popper/popper-content.js +0 -1
- package/dist/components/select/bubble-select.js +0 -1
- package/dist/components/select/select-item-aligned-position.js +0 -1
- package/dist/components/select/select-popper-position.js +0 -1
- package/dist/components/tooltip/tooltip-content-impl.js +0 -1
- package/dist/components/tooltip/tooltip-content.js +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { MaybeRefOrGetter, Ref, ShallowRef } from "vue";
|
|
2
|
+
import { FloatingElement, Middleware, MiddlewareData, Placement, ReferenceElement, Strategy } from "@floating-ui/dom";
|
|
3
|
+
|
|
4
|
+
//#region src/composables/use-floating.d.ts
|
|
5
|
+
type UseFloatingOptions<T extends ReferenceElement = ReferenceElement> = {
|
|
6
|
+
/**
|
|
7
|
+
* Represents the open/close state of the floating element.
|
|
8
|
+
* @default true
|
|
9
|
+
*/
|
|
10
|
+
open?: MaybeRefOrGetter<boolean | undefined>;
|
|
11
|
+
/**
|
|
12
|
+
* Where to place the floating element relative to its reference element.
|
|
13
|
+
* @default 'bottom'
|
|
14
|
+
*/
|
|
15
|
+
placement?: MaybeRefOrGetter<Placement | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* The type of CSS position property to use.
|
|
18
|
+
* @default 'absolute'
|
|
19
|
+
*/
|
|
20
|
+
strategy?: MaybeRefOrGetter<Strategy | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* These are plain objects that modify the positioning coordinates in some fashion, or provide useful data for the consumer to use.
|
|
23
|
+
* @default undefined
|
|
24
|
+
*/
|
|
25
|
+
middleware?: MaybeRefOrGetter<Middleware[] | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to use `transform` instead of `top` and `left` styles to
|
|
28
|
+
* position the floating element (`floatingStyles`).
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
transform?: MaybeRefOrGetter<boolean | undefined>;
|
|
32
|
+
/**
|
|
33
|
+
* Callback to handle mounting/unmounting of the elements.
|
|
34
|
+
* @default undefined
|
|
35
|
+
*/
|
|
36
|
+
whileElementsMounted?: (reference: T, floating: FloatingElement, update: () => void) => () => void;
|
|
37
|
+
};
|
|
38
|
+
type UseFloatingReturn = {
|
|
39
|
+
/**
|
|
40
|
+
* The x-coord of the floating element.
|
|
41
|
+
*/
|
|
42
|
+
x: Readonly<Ref<number>>;
|
|
43
|
+
/**
|
|
44
|
+
* The y-coord of the floating element.
|
|
45
|
+
*/
|
|
46
|
+
y: Readonly<Ref<number>>;
|
|
47
|
+
/**
|
|
48
|
+
* The stateful placement, which can be different from the initial `placement` passed as options.
|
|
49
|
+
*/
|
|
50
|
+
placement: Readonly<Ref<Placement>>;
|
|
51
|
+
/**
|
|
52
|
+
* The type of CSS position property to use.
|
|
53
|
+
*/
|
|
54
|
+
strategy: Readonly<Ref<Strategy>>;
|
|
55
|
+
/**
|
|
56
|
+
* Additional data from middleware.
|
|
57
|
+
*/
|
|
58
|
+
middlewareData: Readonly<Ref<MiddlewareData>>;
|
|
59
|
+
/**
|
|
60
|
+
* The boolean that let you know if the floating element has been positioned.
|
|
61
|
+
*/
|
|
62
|
+
isPositioned: Readonly<Ref<boolean>>;
|
|
63
|
+
/**
|
|
64
|
+
* CSS styles to apply to the floating element to position it.
|
|
65
|
+
*/
|
|
66
|
+
floatingStyles: Readonly<Ref<{
|
|
67
|
+
position: Strategy;
|
|
68
|
+
top: string;
|
|
69
|
+
left: string;
|
|
70
|
+
transform?: string;
|
|
71
|
+
willChange?: string;
|
|
72
|
+
}>>;
|
|
73
|
+
/**
|
|
74
|
+
* The function to update floating position manually.
|
|
75
|
+
*/
|
|
76
|
+
update: () => void;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Computes the `x` and `y` coordinates that will place the floating element next to a reference element when it is given a certain CSS positioning strategy.
|
|
80
|
+
* @param reference The reference template ref.
|
|
81
|
+
* @param floating The floating template ref.
|
|
82
|
+
* @param options The floating options.
|
|
83
|
+
*/
|
|
84
|
+
declare function useFloating<T extends ReferenceElement = ReferenceElement>(referenceElement: ShallowRef<T | null | undefined>, floatingElement: ShallowRef<FloatingElement | null | undefined>, options?: UseFloatingOptions<T>): UseFloatingReturn;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { UseFloatingOptions, UseFloatingReturn, useFloating };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNullish as e}from"../shared/guard.js";import{computed as t,getCurrentScope as n,onScopeDispose as r,shallowReadonly as i,shallowRef as a,toValue as o,watch as s}from"vue";import{computePosition as c}from"@floating-ui/dom";function l(l,f,p={}){let m=p.whileElementsMounted,h=t(()=>o(p.open)??!0),g=t(()=>o(p.middleware)),_=t(()=>o(p.placement)??`bottom`),v=t(()=>o(p.strategy)??`absolute`),y=t(()=>o(p.transform)??!0),b=a(0),x=a(0),S=a(v.value),C=a(_.value),w=a({}),T=a(!1),E=t(()=>{let e={position:S.value,left:`0`,top:`0`};if(!f.value)return e;let t=d(f.value,b.value),n=d(f.value,x.value);return y.value?{...e,transform:`translate(${t}px, ${n}px)`,...u(f.value)>=1.5&&{willChange:`transform`}}:{position:S.value,left:`${t}px`,top:`${n}px`}}),D;function O(){if(e(l.value)||e(f.value))return;let t=h.value;c(l.value,f.value,{middleware:g.value,placement:_.value,strategy:v.value}).then(e=>{b.value=e.x,x.value=e.y,S.value=e.strategy,C.value=e.placement,w.value=e.middlewareData,T.value=t!==!1})}function k(){typeof D==`function`&&(D(),D=void 0)}function A(){if(k(),m===void 0){O();return}!e(l.value)&&!e(f.value)&&(D=m(l.value,f.value,O))}function j(){h.value||(T.value=!1)}return s([g,_,v,h],O,{flush:`sync`}),s([l,f],A,{flush:`sync`}),s(h,j,{flush:`sync`}),n()&&r(k),{x:i(b),y:i(x),strategy:i(S),placement:i(C),middlewareData:i(w),isPositioned:i(T),floatingStyles:E,update:O}}function u(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function d(e,t){let n=u(e);return Math.round(t*n)/n}export{l as useFloating};
|
|
@@ -21,9 +21,6 @@ interface UseFocusScopeOptions extends EmitsToHookProps<FocusScopeEmits> {
|
|
|
21
21
|
}
|
|
22
22
|
declare function useFocusScope(elRef: Ref<HTMLElement | undefined>, options?: UseFocusScopeOptions): {
|
|
23
23
|
onKeydown: (event: KeyboardEvent) => void;
|
|
24
|
-
focusScopeProps: {
|
|
25
|
-
tabindex: string;
|
|
26
|
-
};
|
|
27
24
|
};
|
|
28
25
|
//#endregion
|
|
29
26
|
export { UseFocusScopeOptions, useFocusScope };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayRemove as e}from"../shared/object.js";import{getActiveElement as t,removeLinks as n}from"../shared/dom.js";import{focus as r,focusFirstAndSelect as i,getTabbableCandidates as a,getTabbableEdges as o}from"../shared/focus.js";import{isClient as s}from"../shared/env.js";import{nextTick as c,onWatcherCleanup as l,toValue as u,watch as d,watchEffect as f}from"vue";const p=`focusScope.autoFocusOnOpen`,m={bubbles:!1,cancelable:!0},h=_();function g(e,g){let{loop:_,trapped:v,onOpenAutoFocus:y,onCloseAutoFocus:b}=g||{},x,S={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}};if(s){function o(t){if(S.paused||!e.value)return;let n=t.target;e.value.contains(n)?x=n:r(x,{select:!0})}function s(t){if(S.paused||!e.value)return;let n=t.relatedTarget;n!==null&&(e.value.contains(n)||r(x,{select:!0}))}function g(){e.value?.contains(x)||r(e.value)}f(()=>{if(!u(v))return;document.addEventListener(`focusin`,o),document.addEventListener(`focusout`,s);let t=new MutationObserver(g);e.value&&t.observe(e.value,{childList:!0,subtree:!0}),l(()=>{document.removeEventListener(`focusin`,o),document.removeEventListener(`focusout`,s),t.disconnect()})}),d(e,async(e,o,s)=>{if(await c(),!e)return;h.add(S);let l=t();if(!e.contains(l)){let o=new CustomEvent(p,m);y&&e.addEventListener(p,y),e.dispatchEvent(o),o.defaultPrevented||(i(n(a(e)),{select:!0}),t()===l&&r(e))}s(()=>{y&&e.removeEventListener(p,y),b&&e.removeEventListener(`focusScope.autoFocusOnClose`,b),h.remove(S)})})}function C(e){let n=u(_),i=u(v);if(!n&&!i||S.paused)return;let a=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,s=t();if(!a||!s)return;let c=e.currentTarget,[l,d]=o(c);l&&d?!e.shiftKey&&s===d?(e.preventDefault(),n&&r(l,{select:!0})):e.shiftKey&&s===l&&(e.preventDefault(),n&&r(d,{select:!0})):s===c&&e.preventDefault()}return{onKeydown:C
|
|
1
|
+
import{arrayRemove as e}from"../shared/object.js";import{getActiveElement as t,removeLinks as n}from"../shared/dom.js";import{focus as r,focusFirstAndSelect as i,getTabbableCandidates as a,getTabbableEdges as o}from"../shared/focus.js";import{isClient as s}from"../shared/env.js";import{nextTick as c,onWatcherCleanup as l,toValue as u,watch as d,watchEffect as f}from"vue";const p=`focusScope.autoFocusOnOpen`,m={bubbles:!1,cancelable:!0},h=_();function g(e,g){let{loop:_,trapped:v,onOpenAutoFocus:y,onCloseAutoFocus:b}=g||{},x,S={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}};if(s){function o(t){if(S.paused||!e.value)return;let n=t.target;e.value.contains(n)?x=n:r(x,{select:!0})}function s(t){if(S.paused||!e.value)return;let n=t.relatedTarget;n!==null&&(e.value.contains(n)||r(x,{select:!0}))}function g(){e.value?.contains(x)||r(e.value)}f(()=>{if(!u(v))return;document.addEventListener(`focusin`,o),document.addEventListener(`focusout`,s);let t=new MutationObserver(g);e.value&&t.observe(e.value,{childList:!0,subtree:!0}),l(()=>{document.removeEventListener(`focusin`,o),document.removeEventListener(`focusout`,s),t.disconnect()})}),d(e,async(e,o,s)=>{if(await c(),!e)return;h.add(S);let l=t();if(!e.contains(l)){let o=new CustomEvent(p,m);y&&e.addEventListener(p,y),e.dispatchEvent(o),o.defaultPrevented||(i(n(a(e)),{select:!0}),t()===l&&r(e))}s(()=>{y&&e.removeEventListener(p,y),b&&e.removeEventListener(`focusScope.autoFocusOnClose`,b),h.remove(S)})})}function C(e){let n=u(_),i=u(v);if(!n&&!i||S.paused)return;let a=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,s=t();if(!a||!s)return;let c=e.currentTarget,[l,d]=o(c);l&&d?!e.shiftKey&&s===d?(e.preventDefault(),n&&r(l,{select:!0})):e.shiftKey&&s===l&&(e.preventDefault(),n&&r(d,{select:!0})):s===c&&e.preventDefault()}return{onKeydown:C}}function _(){let t=[];return{add(n){let r=t[0];n!==r&&r?.pause(),t=e(t,n),t.unshift(n)},remove(n){t=e(t,n),t[0]?.resume()}}}export{g as useFocusScope};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VNodeRef } from "../types/vue.js";
|
|
2
2
|
import "../types/index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue9 from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/composables/use-forward-element.d.ts
|
|
6
6
|
|
|
@@ -9,6 +9,6 @@ import * as vue11 from "vue";
|
|
|
9
9
|
*
|
|
10
10
|
* @returns An object containing the element reference and a function to set the element reference.
|
|
11
11
|
*/
|
|
12
|
-
declare function useForwardElement<T extends HTMLElement = HTMLElement>(callback?: (el: T) => void): readonly [
|
|
12
|
+
declare function useForwardElement<T extends HTMLElement = HTMLElement>(callback?: (el: T) => void): readonly [vue9.ShallowRef<T | undefined, T | undefined>, (nodeRef: VNodeRef) => void];
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useForwardElement };
|
|
@@ -4,8 +4,8 @@ import { ShallowRef } from "vue";
|
|
|
4
4
|
interface UseGraceAreaOptions {
|
|
5
5
|
/** Reactive reference to the trigger element */
|
|
6
6
|
triggerElement: ShallowRef<HTMLElement | undefined>;
|
|
7
|
-
/** Reactive reference to the
|
|
8
|
-
|
|
7
|
+
/** Reactive reference to the area element */
|
|
8
|
+
areaElement: ShallowRef<HTMLElement | undefined>;
|
|
9
9
|
/** Callback invoked when the pointer in-transit state changes */
|
|
10
10
|
onPointerInTransitChange?: (v: boolean) => void;
|
|
11
11
|
/** Callback invoked when the pointer exits the grace area */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GRACE_AREA_TRIGGER_ATTR as e}from"../constants/attr.js";import{isClient as t}from"../shared/env.js";import{getExitSideFromRect as n,getHull as r,getPaddedExitPoints as i,getPointsFromRect as a,isPointInPolygon as o}from"../shared/geometry.js";import{onWatcherCleanup as s,ref as c,watchEffect as l}from"vue";import{refAutoReset as u}from"@vueuse/core";function d(n){let{triggerElement:r,
|
|
1
|
+
import{GRACE_AREA_TRIGGER_ATTR as e}from"../constants/attr.js";import{isClient as t}from"../shared/env.js";import{getExitSideFromRect as n,getHull as r,getPaddedExitPoints as i,getPointsFromRect as a,isPointInPolygon as o}from"../shared/geometry.js";import{onWatcherCleanup as s,ref as c,watchEffect as l}from"vue";import{refAutoReset as u}from"@vueuse/core";function d(n){let{triggerElement:r,areaElement:i,onPointerInTransitChange:a,onPointerExit:d,disabled:p,subAreaAttribute:m,onSubAreaEnter:h,onSubAreaExit:g}=n,_=u(!1,300),v=c(),y=c(),b=()=>{v.value=void 0,y.value=void 0,a?.(!1)};l(()=>{if(!t||p?.value===!0)return;let e=r.value,n=i.value;if(!e||!n)return;function a(e,t){let{currentTarget:n,clientX:r,clientY:i}=e;n instanceof HTMLElement&&(v.value=f({x:r,y:i},n,t),_.value=!0)}function o(t){if(!m)return;let n=t.target.closest(`[${m}]`);if(n&&i.value?.contains(n)){if(y.value!==n){y.value&&g?.(y.value),y.value=n,h?.(n);let{clientX:r,clientY:i}=t;v.value=f({x:r,y:i},e,n),_.value=!0}}else y.value&&=(g?.(y.value),void 0)}let c=e=>a(e,n),l=t=>a(t,e),u=e=>o(e);e.addEventListener(`pointerleave`,c),n.addEventListener(`pointerleave`,l),m&&n.addEventListener(`pointermove`,u),s(()=>{e.removeEventListener(`pointerleave`,c),n.removeEventListener(`pointerleave`,l),m&&n.removeEventListener(`pointermove`,u)})}),l(()=>{if(!t||p?.value===!0||!v.value)return;let n=t=>{if(!v.value)return;let n=t.target;if(!(n instanceof Element))return;let{clientX:a,clientY:s}=t,c=r.value?.contains(n)||i.value?.contains(n),l=m&&n.closest(`[${m}]`)&&i.value?.contains(n);if(c||l){c&&b();return}let u=!o({x:a,y:s},v.value),f=!!n.closest(`[${e}]`),p=!r.value?.contains(n)&&!i.value?.contains(n)&&!(m&&n.closest(`[${m}]`));(u&&p||f)&&(b(),d())};r.value?.ownerDocument.addEventListener(`pointermove`,n),s(()=>{r.value?.ownerDocument.removeEventListener(`pointermove`,n)})}),l(()=>{let e=_.value;a?.(e)})}function f(e,t,o){let s=i(e,n(e,t.getBoundingClientRect())),c=a(o.getBoundingClientRect());return r([...s,...c])}export{d as useGraceArea};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ImageLoadingStatus } from "../types/dom.js";
|
|
2
2
|
import "../types/index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue10 from "vue";
|
|
4
4
|
import { ImgHTMLAttributes, MaybeRefOrGetter } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/composables/use-image-loading-status.d.ts
|
|
@@ -15,6 +15,6 @@ interface ImageLoadingOptions {
|
|
|
15
15
|
* @param options - Additional image loading options
|
|
16
16
|
* @returns Reactive loading status
|
|
17
17
|
*/
|
|
18
|
-
declare function useImageLoadingStatus(options: ImageLoadingOptions):
|
|
18
|
+
declare function useImageLoadingStatus(options: ImageLoadingOptions): vue10.ShallowRef<ImageLoadingStatus, ImageLoadingStatus>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { useImageLoadingStatus };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue12 from "vue";
|
|
2
2
|
|
|
3
3
|
//#region src/composables/use-is-using-keyboard.d.ts
|
|
4
|
-
declare function useIsUsingKeyboard():
|
|
4
|
+
declare function useIsUsingKeyboard(): vue12.ComputedRef<boolean>;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { useIsUsingKeyboard };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { KbdKey } from "../types/common.js";
|
|
2
2
|
import "../types/index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue11 from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/composables/use-kbd.d.ts
|
|
6
6
|
declare const kbdMap: Record<KbdKey, string>;
|
|
7
7
|
declare function useKbdKey(): {
|
|
8
|
-
macOS:
|
|
8
|
+
macOS: vue11.ComputedRef<"" | RegExpMatchArray | null>;
|
|
9
9
|
getKeyboardKey: (value?: KbdKey | (string & {})) => string | undefined;
|
|
10
10
|
};
|
|
11
11
|
declare const useKbd: typeof useKbdKey;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue13 from "vue";
|
|
2
2
|
import { MaybeRefOrGetter } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/composables/use-locale.d.ts
|
|
5
|
-
declare function useLocale(locale?: MaybeRefOrGetter<string | undefined>):
|
|
5
|
+
declare function useLocale(locale?: MaybeRefOrGetter<string | undefined>): vue13.ComputedRef<string>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { useLocale };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue14 from "vue";
|
|
2
2
|
import { MaybeRefOrGetter } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/composables/use-nonce.d.ts
|
|
5
|
-
declare function useNonce(nonce?: MaybeRefOrGetter<string | undefined>):
|
|
5
|
+
declare function useNonce(nonce?: MaybeRefOrGetter<string | undefined>): vue14.ComputedRef<string | undefined>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { useNonce };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FocusOutsideEvent, PointerDownOutsideEvent } from "../types/event.js";
|
|
2
|
+
import "../types/index.js";
|
|
3
|
+
import { ComputedRef, ShallowRef } from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/composables/use-popup-events.d.ts
|
|
6
|
+
interface UsePopupEventsOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the popup is modal.
|
|
9
|
+
*/
|
|
10
|
+
modal: ComputedRef<boolean | undefined>;
|
|
11
|
+
/**
|
|
12
|
+
* The trigger element.
|
|
13
|
+
*/
|
|
14
|
+
triggerElement: ShallowRef<HTMLElement | undefined>;
|
|
15
|
+
}
|
|
16
|
+
declare function usePopupEvents(options: UsePopupEventsOptions): {
|
|
17
|
+
onPointerDownOutside: (event: PointerDownOutsideEvent) => void;
|
|
18
|
+
onFocusOutside: (event: FocusOutsideEvent) => void;
|
|
19
|
+
onInteractOutside: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
|
|
20
|
+
onCloseAutoFocus: (event: Event) => void;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { UsePopupEventsOptions, usePopupEvents };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let{modal:t,triggerElement:n}=e,r=!1,i=!1;return{onPointerDownOutside:e=>{if(!t.value||e.defaultPrevented)return;let n=e.detail.originalEvent,r=n.button===0&&n.ctrlKey===!0;(n.button===2||r)&&e.preventDefault()},onFocusOutside:e=>{t.value&&e.preventDefault()},onInteractOutside:e=>{if(t.value)return;e.defaultPrevented||(r=!0,e.detail.originalEvent.type===`pointerdown`&&(i=!0));let a=e.target;n.value?.contains(a)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&i&&e.preventDefault()},onCloseAutoFocus:e=>{if(t.value){e.defaultPrevented||(e.preventDefault(),n.value?.focus());return}e.defaultPrevented||(r||n.value?.focus(),e.preventDefault()),r=!1,i=!1}}}export{e as usePopupEvents};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue15 from "vue";
|
|
2
2
|
import { MaybeRefOrGetter, Ref } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/composables/use-presence.d.ts
|
|
5
|
-
declare function usePresence(elRef: Ref<HTMLElement | null | undefined>, present: MaybeRefOrGetter<boolean | undefined>, onChange?: (value: boolean) => void):
|
|
5
|
+
declare function usePresence(elRef: Ref<HTMLElement | null | undefined>, present: MaybeRefOrGetter<boolean | undefined>, onChange?: (value: boolean) => void): vue15.ComputedRef<boolean>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { usePresence };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue16 from "vue";
|
|
2
2
|
import { MaybeRefOrGetter } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/composables/use-props.d.ts
|
|
5
|
-
declare function usePickProps<T extends object, K extends keyof T>(props: T, keys: K[], ...extraProps: MaybeRefOrGetter<object>[]):
|
|
6
|
-
declare function useOmitProps<T extends object, K extends keyof T>(props: T, keys: K[], ...extraProps: MaybeRefOrGetter<object>[]):
|
|
5
|
+
declare function usePickProps<T extends object, K extends keyof T>(props: T, keys: K[], ...extraProps: MaybeRefOrGetter<object>[]): vue16.ComputedRef<Pick<T, K>>;
|
|
6
|
+
declare function useOmitProps<T extends object, K extends keyof T>(props: T, keys: K[], ...extraProps: MaybeRefOrGetter<object>[]): vue16.ComputedRef<Omit<T, K>>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { useOmitProps, usePickProps };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DefinedValue, SelectionProps } from "../types/common.js";
|
|
2
2
|
import "../types/index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue18 from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/composables/use-selection.d.ts
|
|
6
6
|
declare function useSelection<M extends boolean = false, N extends DefinedValue = string>(props: SelectionProps<M, N>, onUpdateModelValue: (value: NonNullable<SelectionProps<M, N>['modelValue']>) => void): {
|
|
7
|
-
modelValue:
|
|
7
|
+
modelValue: vue18.ShallowRef<(M extends true ? N[] : N) | undefined>;
|
|
8
8
|
onModelValueChange: (value: N) => void;
|
|
9
|
-
isMultiple:
|
|
10
|
-
isEmptyModelValue:
|
|
9
|
+
isMultiple: vue18.ComputedRef<boolean>;
|
|
10
|
+
isEmptyModelValue: vue18.ComputedRef<boolean>;
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
export { useSelection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={accordion:[`AccordionContent`,`AccordionHeader`,`AccordionItem`,`AccordionRoot`,`AccordionTrigger`],alert:[`AlertClose`,`AlertContent`,`AlertDescription`,`AlertRoot`,`AlertTitle`],alertDialog:[`AlertDialogClose`,`AlertDialogContent`,`AlertDialogDescription`,`AlertDialogFooter`,`AlertDialogHeader`,`AlertDialogOverlay`,`AlertDialogPortal`,`AlertDialogRoot`,`AlertDialogTitle`,`AlertDialogTrigger`],arrow:[`Arrow`],aspectRatio:[`AspectRatio`],avatar:[`AvatarFallback`,`AvatarImage`,`AvatarRoot`],badge:[`BadgeContent`,`BadgeRoot`],breadcrumb:[`BreadcrumbEllipsis`,`BreadcrumbItem`,`BreadcrumbLink`,`BreadcrumbList`,`BreadcrumbPage`,`BreadcrumbRoot`,`BreadcrumbSeparator`],button:[`Button`],card:[`CardContent`,`CardDescription`,`CardFooter`,`CardHeader`,`CardRoot`,`CardTitleRoot`,`CardTitle`],checkbox:[`CheckboxControl`,`CheckboxGroupRoot`,`CheckboxIndicator`,`CheckboxLabel`,`CheckboxRoot`],collapsible:[`CollapsibleContent`,`CollapsibleRoot`,`CollapsibleTrigger`],configProvider:[`ConfigProvider`],contextMenu:[`ContextMenuAnchor`,`ContextMenuArrow`,`ContextMenuCheckboxGroup`,`ContextMenuCheckboxItem`,`ContextMenuContent`,`ContextMenuGroup`,`ContextMenuGroupLabel`,`ContextMenuItem`,`ContextMenuItemIndicator`,`ContextMenuPortal`,`ContextMenuRadioGroup`,`ContextMenuRadioItem`,`ContextMenuRoot`,`ContextMenuSeparator`,`ContextMenuSub`,`ContextMenuSubContent`,`ContextMenuSubTrigger`,`ContextMenuTrigger`],dialog:[`DialogClose`,`DialogContent`,`DialogDescription`,`DialogFooter`,`DialogHeader`,`DialogOverlay`,`DialogPortal`,`DialogRoot`,`DialogTitle`,`DialogTrigger`],divider:[`DividerLabel`,`DividerRoot`],dropdownMenu:[`DropdownMenuAnchor`,`DropdownMenuArrow`,`DropdownMenuCheckboxGroup`,`DropdownMenuCheckboxItem`,`DropdownMenuContent`,`DropdownMenuGroup`,`DropdownMenuGroupLabel`,`DropdownMenuItem`,`DropdownMenuItemIndicator`,`DropdownMenuPortal`,`DropdownMenuRadioGroup`,`DropdownMenuRadioItem`,`DropdownMenuRoot`,`DropdownMenuSeparator`,`DropdownMenuSub`,`DropdownMenuSubContent`,`DropdownMenuSubTrigger`,`DropdownMenuTrigger`],form:[`FormDescription`,`FormError`,`FormFieldArray`,`FormField`,`FormLabel`],input:[`InputControl`,`InputRoot`],kbd:[`Kbd`],label:[`Label`],layout:[`LayoutFooter`,`LayoutHeader`,`LayoutMain`,`LayoutMobile`,`LayoutRail`,`LayoutRoot`,`LayoutSidebar`,`LayoutTab`,`LayoutTrigger`],link:[`Link`],list:[`ListContent`,`ListDescription`,`ListItem`,`ListRoot`,`ListTitle`],listbox:[`ListboxContent`,`ListboxFilter`,`ListboxGroupLabel`,`ListboxGroup`,`ListboxItemIndicator`,`ListboxItem`,`ListboxRoot`,`ListboxVirtualizer`],menu:[`MenuAnchor`,`MenuArrow`,`MenuCheckboxGroup`,`MenuCheckboxItem`,`MenuContent`,`MenuGroupLabel`,`MenuGroup`,`MenuItemIndicator`,`MenuItem`,`MenuPortal`,`MenuRadioGroup`,`MenuRadioItem`,`MenuRoot`,`MenuSub`,`MenuSeparator`,`MenuSubContent`,`MenuSubTrigger`],navigationMenu:[`NavigationMenuContent`,`NavigationMenuIndicator`,`NavigationMenuItem`,`NavigationMenuLink`,`NavigationMenuList`,`NavigationMenuRoot`,`NavigationMenuSubList`,`NavigationMenuTrigger`,`NavigationMenuViewport`],numberInput:[`NumberInputControl`,`NumberInputDecrement`,`NumberInputIncrement`,`NumberInputRoot`],pagination:[`PaginationEllipsis`,`PaginationFirst`,`PaginationLast`,`PaginationListItem`,`PaginationList`,`PaginationNext`,`PaginationPrev`,`PaginationRoot`],popover:[`PopoverAnchor`,`PopoverArrow`,`PopoverClose`,`
|
|
1
|
+
const e={accordion:[`AccordionContent`,`AccordionHeader`,`AccordionItem`,`AccordionRoot`,`AccordionTrigger`],alert:[`AlertClose`,`AlertContent`,`AlertDescription`,`AlertRoot`,`AlertTitle`],alertDialog:[`AlertDialogClose`,`AlertDialogContent`,`AlertDialogDescription`,`AlertDialogFooter`,`AlertDialogHeader`,`AlertDialogOverlay`,`AlertDialogPortal`,`AlertDialogRoot`,`AlertDialogTitle`,`AlertDialogTrigger`],arrow:[`Arrow`],aspectRatio:[`AspectRatio`],avatar:[`AvatarFallback`,`AvatarImage`,`AvatarRoot`],badge:[`BadgeContent`,`BadgeRoot`],breadcrumb:[`BreadcrumbEllipsis`,`BreadcrumbItem`,`BreadcrumbLink`,`BreadcrumbList`,`BreadcrumbPage`,`BreadcrumbRoot`,`BreadcrumbSeparator`],button:[`Button`],card:[`CardContent`,`CardDescription`,`CardFooter`,`CardHeader`,`CardRoot`,`CardTitleRoot`,`CardTitle`],checkbox:[`CheckboxControl`,`CheckboxGroupRoot`,`CheckboxIndicator`,`CheckboxLabel`,`CheckboxRoot`],collapsible:[`CollapsibleContent`,`CollapsibleRoot`,`CollapsibleTrigger`],configProvider:[`ConfigProvider`],contextMenu:[`ContextMenuAnchor`,`ContextMenuArrow`,`ContextMenuCheckboxGroup`,`ContextMenuCheckboxItem`,`ContextMenuContent`,`ContextMenuGroup`,`ContextMenuGroupLabel`,`ContextMenuItem`,`ContextMenuItemIndicator`,`ContextMenuPortal`,`ContextMenuRadioGroup`,`ContextMenuRadioItem`,`ContextMenuRoot`,`ContextMenuSeparator`,`ContextMenuSub`,`ContextMenuSubContent`,`ContextMenuSubTrigger`,`ContextMenuTrigger`],dialog:[`DialogClose`,`DialogContent`,`DialogDescription`,`DialogFooter`,`DialogHeader`,`DialogOverlay`,`DialogPortal`,`DialogRoot`,`DialogTitle`,`DialogTrigger`],divider:[`DividerLabel`,`DividerRoot`],dropdownMenu:[`DropdownMenuAnchor`,`DropdownMenuArrow`,`DropdownMenuCheckboxGroup`,`DropdownMenuCheckboxItem`,`DropdownMenuContent`,`DropdownMenuGroup`,`DropdownMenuGroupLabel`,`DropdownMenuItem`,`DropdownMenuItemIndicator`,`DropdownMenuPortal`,`DropdownMenuRadioGroup`,`DropdownMenuRadioItem`,`DropdownMenuRoot`,`DropdownMenuSeparator`,`DropdownMenuSub`,`DropdownMenuSubContent`,`DropdownMenuSubTrigger`,`DropdownMenuTrigger`],form:[`FormDescription`,`FormError`,`FormFieldArray`,`FormField`,`FormLabel`],input:[`InputControl`,`InputRoot`],kbd:[`Kbd`],label:[`Label`],layout:[`LayoutFooter`,`LayoutHeader`,`LayoutMain`,`LayoutMobile`,`LayoutRail`,`LayoutRoot`,`LayoutSidebar`,`LayoutTab`,`LayoutTrigger`],link:[`Link`],list:[`ListContent`,`ListDescription`,`ListItem`,`ListRoot`,`ListTitle`],listbox:[`ListboxContent`,`ListboxFilter`,`ListboxGroupLabel`,`ListboxGroup`,`ListboxItemIndicator`,`ListboxItem`,`ListboxRoot`,`ListboxVirtualizer`],menu:[`MenuAnchor`,`MenuArrow`,`MenuCheckboxGroup`,`MenuCheckboxItem`,`MenuContent`,`MenuGroupLabel`,`MenuGroup`,`MenuItemIndicator`,`MenuItem`,`MenuPortal`,`MenuRadioGroup`,`MenuRadioItem`,`MenuRoot`,`MenuSub`,`MenuSeparator`,`MenuSubContent`,`MenuSubTrigger`],navigationMenu:[`NavigationMenuContent`,`NavigationMenuIndicator`,`NavigationMenuItem`,`NavigationMenuLink`,`NavigationMenuList`,`NavigationMenuRoot`,`NavigationMenuSubList`,`NavigationMenuTrigger`,`NavigationMenuViewport`],numberInput:[`NumberInputControl`,`NumberInputDecrement`,`NumberInputIncrement`,`NumberInputRoot`],pagination:[`PaginationEllipsis`,`PaginationFirst`,`PaginationLast`,`PaginationListItem`,`PaginationList`,`PaginationNext`,`PaginationPrev`,`PaginationRoot`],popover:[`PopoverAnchor`,`PopoverArrow`,`PopoverClose`,`PopoverPopup`,`PopoverPortal`,`PopoverPositioner`,`PopoverRoot`,`PopoverTrigger`],popper:[`PopperAnchor`,`PopperArrow`,`PopperPopup`,`PopperPositioner`,`PopperRoot`],portal:[`Portal`],primitive:[`Primitive`],radioGroup:[`RadioGroupControl`,`RadioGroupIndicator`,`RadioGroupItem`,`RadioGroupLabel`,`RadioGroupRoot`],rovingFocus:[`RovingFocusGroup`,`RovingFocusItem`],select:[`SelectArrow`,`SelectContent`,`SelectGroupLabel`,`SelectGroup`,`SelectItem`,`SelectItemIndicator`,`SelectItemText`,`SelectPortal`,`SelectRoot`,`SelectScrollDownButton`,`SelectScrollUpButton`,`SelectSeparator`,`SelectTrigger`,`SelectTriggerIcon`,`SelectValue`,`SelectViewport`],slot:[`Slot`],switch:[`SwitchControl`,`SwitchRoot`,`SwitchThumb`],tabs:[`TabsContent`,`TabsIndicator`,`TabsList`,`TabsRoot`,`TabsTrigger`],tag:[`Tag`],textarea:[`TextareaControl`,`TextareaCounter`,`TextareaRoot`],toast:[`ToastRoot`,`ToastViewport`,`ToastPortal`,`ToastClose`,`ToastAction`,`ToastTitle`,`ToastDescription`],tooltip:[`TooltipArrow`,`TooltipPopup`,`TooltipPortal`,`TooltipPositioner`,`TooltipRoot`,`TooltipTrigger`],tree:[`TreeItem`,`TreeRoot`,`TreeVirtualizerItem`,`TreeVirtualizerRoot`],virtualizer:[`VirtualizerContent`,`VirtualizerItem`,`VirtualizerRoot`],visuallyHidden:[`VisuallyHiddenInput`,`VisuallyHidden`]};export{e as components};
|