@soybeanjs/headless 0.15.0-beta.2 → 0.15.0-beta.3
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/_common/dynamic-render.js +1 -0
- package/dist/components/_icon/icon.js +1 -0
- package/dist/components/_icon/icon.vue.d.ts +8 -0
- package/dist/components/_icon/index.d.ts +3 -0
- package/dist/components/_icon/index.js +1 -0
- package/dist/components/{icon → _icon}/types.d.ts +3 -3
- package/dist/components/accordion/accordion-compact.js +1 -1
- package/dist/components/accordion/accordion-description.js +1 -0
- package/dist/components/accordion/accordion-description.vue.d.ts +18 -0
- package/dist/components/accordion/accordion-root.js +1 -1
- package/dist/components/accordion/context.d.ts +3 -2
- package/dist/components/accordion/index.d.ts +7 -6
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/types.d.ts +12 -12
- package/dist/components/affix/affix-compact.js +1 -0
- package/dist/components/affix/affix-compact.vue.d.ts +24 -0
- package/dist/components/affix/affix-root.js +1 -1
- package/dist/components/affix/context.d.ts +3 -2
- package/dist/components/affix/index.d.ts +6 -5
- package/dist/components/affix/index.js +1 -1
- package/dist/components/affix/types.d.ts +9 -10
- package/dist/components/alert/alert-close.js +1 -1
- package/dist/components/alert/alert-close.vue.d.ts +4 -1
- package/dist/components/alert/alert-compact.js +1 -0
- package/dist/components/alert/alert-compact.vue.d.ts +21 -0
- package/dist/components/alert/context.d.ts +3 -2
- package/dist/components/alert/index.d.ts +7 -6
- package/dist/components/alert/index.js +1 -1
- package/dist/components/alert/types.d.ts +23 -3
- package/dist/components/anchor/anchor-compact-item.js +1 -0
- package/dist/components/anchor/anchor-compact.js +1 -0
- package/dist/components/anchor/anchor-compact.vue.d.ts +20 -0
- package/dist/components/anchor/context.d.ts +3 -2
- package/dist/components/anchor/index.d.ts +5 -4
- package/dist/components/anchor/index.js +1 -1
- package/dist/components/anchor/types.d.ts +22 -2
- package/dist/components/autocomplete/autocomplete-compact.js +1 -0
- package/dist/components/autocomplete/autocomplete-compact.vue.d.ts +24 -0
- package/dist/components/autocomplete/autocomplete-root.vue.d.ts +3 -3
- package/dist/components/autocomplete/context.d.ts +3 -2
- package/dist/components/autocomplete/index.d.ts +14 -13
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/autocomplete/shared.js +1 -0
- package/dist/components/autocomplete/types.d.ts +77 -3
- package/dist/components/avatar/context.d.ts +3 -2
- package/dist/components/backtop/backtop.js +1 -0
- package/dist/components/backtop/backtop.vue.d.ts +33 -0
- package/dist/components/backtop/index.d.ts +3 -0
- package/dist/components/backtop/index.js +1 -0
- package/dist/components/backtop/shared.js +1 -0
- package/dist/components/backtop/types.d.ts +43 -0
- package/dist/components/badge/context.d.ts +3 -2
- package/dist/components/breadcrumb/breadcrumb-compact.js +1 -0
- package/dist/components/breadcrumb/breadcrumb-compact.vue.d.ts +21 -0
- package/dist/components/breadcrumb/context.d.ts +3 -2
- package/dist/components/breadcrumb/index.d.ts +10 -9
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/breadcrumb/shared.js +1 -0
- package/dist/components/breadcrumb/types.d.ts +48 -2
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/button.vue.d.ts +1 -2
- package/dist/components/card/context.d.ts +3 -2
- package/dist/components/carousel/context.d.ts +3 -2
- package/dist/components/checkbox/checkbox-card-compact.js +1 -0
- package/dist/components/checkbox/checkbox-card-compact.vue.d.ts +31 -0
- package/dist/components/checkbox/checkbox-card-group-compact.js +1 -0
- package/dist/components/checkbox/checkbox-card-group-compact.vue.d.ts +21 -0
- package/dist/components/checkbox/checkbox-compact.js +1 -0
- package/dist/components/checkbox/checkbox-compact.vue.d.ts +34 -0
- package/dist/components/checkbox/checkbox-control.js +1 -1
- package/dist/components/checkbox/checkbox-group-compact.js +1 -0
- package/dist/components/checkbox/checkbox-group-compact.vue.d.ts +21 -0
- package/dist/components/checkbox/checkbox-group-root.js +1 -1
- package/dist/components/checkbox/checkbox-root.js +1 -1
- package/dist/components/checkbox/context.d.ts +6 -4
- package/dist/components/checkbox/context.js +1 -1
- package/dist/components/checkbox/index.d.ts +12 -8
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/types.d.ts +38 -3
- package/dist/components/clipboard/clipboard.js +1 -0
- package/dist/components/clipboard/clipboard.vue.d.ts +66 -0
- package/dist/components/clipboard/index.d.ts +3 -0
- package/dist/components/clipboard/index.js +1 -0
- package/dist/components/clipboard/types.d.ts +63 -0
- package/dist/components/collapsible/collapsible-root.vue.d.ts +1 -1
- package/dist/components/collapsible/context.d.ts +3 -2
- package/dist/components/color-area/color-area-root.vue.d.ts +1 -1
- package/dist/components/color-area/context.d.ts +3 -2
- package/dist/components/color-field/color-field-root.vue.d.ts +2 -2
- package/dist/components/color-field/context.d.ts +3 -2
- package/dist/components/color-picker/color-picker-root.vue.d.ts +1 -1
- package/dist/components/color-slider/color-slider-root.vue.d.ts +2 -2
- package/dist/components/color-slider/context.d.ts +3 -2
- package/dist/components/color-swatch-picker/color-swatch-picker-root.js +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker-root.vue.d.ts +2 -2
- package/dist/components/color-swatch-picker/context.d.ts +3 -2
- package/dist/components/combobox/combobox-anchor.js +1 -0
- package/dist/components/combobox/combobox-anchor.vue.d.ts +18 -0
- package/dist/components/combobox/combobox-arrow.js +1 -0
- package/dist/components/combobox/combobox-arrow.vue.d.ts +18 -0
- package/dist/components/combobox/combobox-cancel.js +1 -0
- package/dist/components/combobox/combobox-cancel.vue.d.ts +21 -0
- package/dist/components/combobox/combobox-compact.js +1 -0
- package/dist/components/combobox/combobox-compact.vue.d.ts +34 -0
- package/dist/components/combobox/combobox-content-impl.js +1 -0
- package/dist/components/combobox/combobox-content.js +1 -1
- package/dist/components/combobox/combobox-content.vue.d.ts +7 -4
- package/dist/components/combobox/combobox-empty.js +1 -1
- package/dist/components/combobox/combobox-empty.vue.d.ts +4 -1
- package/dist/components/combobox/combobox-group-label.js +1 -1
- package/dist/components/combobox/combobox-group.js +1 -1
- package/dist/components/combobox/combobox-input.js +1 -1
- package/dist/components/combobox/combobox-input.vue.d.ts +4 -4
- package/dist/components/combobox/combobox-item-indicator.js +1 -1
- package/dist/components/combobox/combobox-item.js +1 -1
- package/dist/components/combobox/combobox-root.js +1 -1
- package/dist/components/combobox/combobox-root.vue.d.ts +15 -7
- package/dist/components/combobox/combobox-separator.js +1 -1
- package/dist/components/combobox/combobox-trigger.js +1 -1
- package/dist/components/combobox/combobox-trigger.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-viewport.js +1 -1
- package/dist/components/combobox/combobox-virtualizer.js +1 -0
- package/dist/components/combobox/combobox-virtualizer.vue.d.ts +23 -0
- package/dist/components/combobox/context.d.ts +4 -3
- package/dist/components/combobox/context.js +1 -1
- package/dist/components/combobox/index.d.ts +19 -14
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/combobox/shared.js +1 -0
- package/dist/components/combobox/types.d.ts +117 -17
- package/dist/components/command/command-compact.js +1 -0
- package/dist/components/command/command-compact.vue.d.ts +29 -0
- package/dist/components/command/context.d.ts +9 -0
- package/dist/components/command/context.js +1 -0
- package/dist/components/command/index.d.ts +5 -0
- package/dist/components/command/index.js +1 -0
- package/dist/components/command/shared.js +1 -0
- package/dist/components/command/types.d.ts +68 -0
- package/dist/components/config-provider/types.d.ts +1 -1
- package/dist/components/context-menu/context-menu-checkbox-compact.js +1 -1
- package/dist/components/context-menu/context-menu-checkbox-compact.vue.d.ts +3 -3
- package/dist/components/context-menu/context-menu-compact.js +1 -1
- package/dist/components/context-menu/context-menu-compact.vue.d.ts +3 -3
- package/dist/components/context-menu/context-menu-content.vue.d.ts +4 -4
- package/dist/components/context-menu/context-menu-radio-compact.js +1 -1
- package/dist/components/context-menu/context-menu-radio-compact.vue.d.ts +3 -3
- package/dist/components/context-menu/context-menu-root.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper-compact.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper-compact.vue.d.ts +4 -4
- package/dist/components/context-menu/index.d.ts +2 -2
- package/dist/components/context-menu/index.js +1 -1
- package/dist/components/context-menu/types.d.ts +1 -1
- package/dist/components/dialog/context.d.ts +3 -2
- package/dist/components/dialog/context.js +1 -1
- package/dist/components/dialog/dialog-cancel.js +1 -0
- package/dist/components/dialog/dialog-cancel.vue.d.ts +25 -0
- package/dist/components/dialog/dialog-close.js +1 -1
- package/dist/components/dialog/dialog-close.vue.d.ts +6 -3
- package/dist/components/dialog/dialog-compact.js +1 -0
- package/dist/components/dialog/dialog-compact.vue.d.ts +47 -0
- package/dist/components/dialog/dialog-confirm.js +1 -0
- package/dist/components/dialog/dialog-confirm.vue.d.ts +25 -0
- package/dist/components/dialog/dialog-content.js +1 -1
- package/dist/components/dialog/dialog-content.vue.d.ts +3 -18
- package/dist/components/dialog/dialog-popup-impl.js +1 -0
- package/dist/components/dialog/dialog-popup.js +1 -0
- package/dist/components/{alert-dialog/alert-dialog-content.vue.d.ts → dialog/dialog-popup.vue.d.ts} +8 -8
- package/dist/components/dialog/dialog-provider.js +1 -0
- package/dist/components/dialog/dialog-provider.vue.d.ts +17 -0
- package/dist/components/dialog/dialog-root.js +1 -1
- package/dist/components/dialog/dialog-root.vue.d.ts +1 -2
- package/dist/components/dialog/dialog-trigger.js +1 -1
- package/dist/components/dialog/index.d.ts +18 -12
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/state.d.ts +14 -0
- package/dist/components/dialog/state.js +1 -0
- package/dist/components/dialog/types.d.ts +133 -16
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.vue.d.ts +3 -3
- package/dist/components/dropdown-menu/dropdown-menu-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-compact.vue.d.ts +3 -3
- package/dist/components/dropdown-menu/dropdown-menu-content.vue.d.ts +4 -4
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.vue.d.ts +3 -3
- package/dist/components/dropdown-menu/dropdown-menu-root.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.vue.d.ts +4 -4
- package/dist/components/dropdown-menu/index.d.ts +2 -2
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/dropdown-menu/types.d.ts +1 -1
- package/dist/components/editable/context.d.ts +3 -2
- package/dist/components/editable/editable-root.js +1 -1
- package/dist/components/editable/editable-root.vue.d.ts +1 -1
- package/dist/components/empty/context.d.ts +3 -2
- package/dist/components/form/context.d.ts +3 -2
- package/dist/components/form/core/use-form-state.js +1 -1
- package/dist/components/hover-card/index.d.ts +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/hover-card/types.d.ts +1 -1
- package/dist/components/input/context.d.ts +3 -2
- package/dist/components/input-number/context.d.ts +3 -2
- package/dist/components/input-otp/context.d.ts +9 -0
- package/dist/components/input-otp/context.js +1 -0
- package/dist/components/input-otp/index.d.ts +8 -0
- package/dist/components/input-otp/index.js +1 -0
- package/dist/components/input-otp/input-otp-compact.js +1 -0
- package/dist/components/input-otp/input-otp-compact.vue.d.ts +37 -0
- package/dist/components/input-otp/input-otp-input.js +1 -0
- package/dist/components/input-otp/input-otp-input.vue.d.ts +8 -0
- package/dist/components/input-otp/input-otp-positioner.js +1 -0
- package/dist/components/input-otp/input-otp-positioner.vue.d.ts +18 -0
- package/dist/components/input-otp/input-otp-root.js +1 -0
- package/dist/components/input-otp/input-otp-root.vue.d.ts +55 -0
- package/dist/components/input-otp/regexp.d.ts +6 -0
- package/dist/components/input-otp/regexp.js +1 -0
- package/dist/components/input-otp/shared.js +1 -0
- package/dist/components/input-otp/types.d.ts +113 -0
- package/dist/components/input-otp/use-password-manager-badge.js +1 -0
- package/dist/components/layout/context.d.ts +3 -2
- package/dist/components/layout/layout-mobile.js +1 -1
- package/dist/components/layout/layout-root.vue.d.ts +1 -1
- package/dist/components/link/link.js +1 -1
- package/dist/components/link/link.vue.d.ts +1 -1
- package/dist/components/list/context.d.ts +3 -2
- package/dist/components/listbox/context.d.ts +3 -2
- package/dist/components/listbox/context.js +1 -1
- package/dist/components/listbox/listbox-root.js +1 -1
- package/dist/components/listbox/listbox-root.vue.d.ts +2 -2
- package/dist/components/listbox/types.d.ts +0 -6
- package/dist/components/menu/context.d.ts +3 -2
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/menu-checkbox-options-compact.js +1 -1
- package/dist/components/menu/menu-content.vue.d.ts +4 -4
- package/dist/components/menu/menu-item-slot-compact.js +1 -1
- package/dist/components/menu/menu-option-compact.js +1 -1
- package/dist/components/menu/menu-option-compact.vue.d.ts +3 -3
- package/dist/components/menu/menu-options-compact.vue.d.ts +3 -3
- package/dist/components/menu/menu-radio-options-compact.js +1 -1
- package/dist/components/menu/menu-root.js +1 -1
- package/dist/components/menu/menu-sub-content.vue.d.ts +4 -4
- package/dist/components/menu/types.d.ts +3 -3
- package/dist/components/menubar/context.d.ts +3 -2
- package/dist/components/menubar/index.js +1 -1
- package/dist/components/menubar/menubar-compact.js +1 -1
- package/dist/components/menubar/menubar-compact.vue.d.ts +3 -3
- package/dist/components/menubar/menubar-content.vue.d.ts +4 -4
- package/dist/components/menubar/menubar-sub-content.vue.d.ts +4 -4
- package/dist/components/menubar/types.d.ts +1 -1
- package/dist/components/navigation-menu/context.d.ts +3 -2
- package/dist/components/navigation-menu/navigation-menu-root.vue.d.ts +1 -1
- package/dist/components/page-tabs/context.d.ts +3 -2
- package/dist/components/pagination/context.d.ts +3 -2
- package/dist/components/pagination/pagination-root.vue.d.ts +2 -2
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover-positioner.vue.d.ts +2 -2
- package/dist/components/popover/popover-root.js +1 -1
- package/dist/components/popover/types.d.ts +1 -1
- package/dist/components/popper/context.d.ts +3 -2
- package/dist/components/popper/popper-positioner.vue.d.ts +3 -3
- package/dist/components/popper/types.d.ts +5 -1
- package/dist/components/progress/context.d.ts +6 -4
- package/dist/components/progress/context.js +1 -1
- package/dist/components/progress/index.d.ts +6 -4
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/progress-circle.js +1 -1
- package/dist/components/progress/progress-indicator.js +1 -1
- package/dist/components/progress/progress-provider.js +1 -0
- package/dist/components/progress/progress-provider.vue.d.ts +8 -0
- package/dist/components/progress/progress-root.js +1 -1
- package/dist/components/progress/shared.js +1 -1
- package/dist/components/progress/state.d.ts +52 -0
- package/dist/components/progress/state.js +1 -0
- package/dist/components/progress/types.d.ts +15 -2
- package/dist/components/radio-group/context.d.ts +3 -2
- package/dist/components/radio-group/index.d.ts +8 -7
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group-compact.js +1 -0
- package/dist/components/radio-group/radio-group-compact.vue.d.ts +22 -0
- package/dist/components/radio-group/radio-group-root.js +1 -1
- package/dist/components/radio-group/types.d.ts +14 -1
- package/dist/components/scroll-area/context.d.ts +3 -2
- package/dist/components/scroll-area/scroll-area-root.js +1 -1
- package/dist/components/scroll-area/scroll-area-viewport.js +1 -1
- package/dist/components/segment/index.d.ts +8 -0
- package/dist/components/segment/index.js +1 -0
- package/dist/components/segment/segment-compact.js +1 -0
- package/dist/components/segment/segment-compact.vue.d.ts +22 -0
- package/dist/components/segment/types.d.ts +22 -0
- package/dist/components/select/context.d.ts +3 -2
- package/dist/components/select/index.d.ts +19 -18
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select-compact.js +1 -0
- package/dist/components/select/select-compact.vue.d.ts +28 -0
- package/dist/components/select/select-content.vue.d.ts +4 -4
- package/dist/components/select/select-root.js +1 -1
- package/dist/components/select/select-viewport.js +1 -1
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/types.d.ts +61 -1
- package/dist/components/separator/context.d.ts +3 -2
- package/dist/components/slider/context.d.ts +3 -2
- package/dist/components/slider/slider-root.js +1 -1
- package/dist/components/slider/slider-root.vue.d.ts +2 -2
- package/dist/components/splitter/context.d.ts +3 -2
- package/dist/components/splitter/splitter-group.vue.d.ts +1 -1
- package/dist/components/splitter/splitter-panel.vue.d.ts +4 -4
- package/dist/components/stepper/context.d.ts +3 -2
- package/dist/components/switch/context.d.ts +3 -2
- package/dist/components/table/context.d.ts +3 -2
- package/dist/components/tabs/context.d.ts +3 -2
- package/dist/components/tabs/index.d.ts +8 -7
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tabs-compact.js +1 -0
- package/dist/components/tabs/tabs-compact.vue.d.ts +21 -0
- package/dist/components/tabs/tabs-root.vue.d.ts +1 -1
- package/dist/components/tabs/types.d.ts +25 -2
- package/dist/components/tags-input/context.d.ts +3 -2
- package/dist/components/textarea/context.d.ts +3 -2
- package/dist/components/toast/context.d.ts +3 -2
- package/dist/components/toast/shared.js +1 -1
- package/dist/components/toast/state.js +1 -1
- package/dist/components/toast/toast.js +1 -1
- package/dist/components/toast/toaster.js +1 -1
- package/dist/components/toast/toaster.vue.d.ts +3 -3
- package/dist/components/toast/types.d.ts +3 -19
- package/dist/components/toggle-group/context.d.ts +3 -2
- package/dist/components/toggle-group/toggle-group-root.js +1 -1
- package/dist/components/toolbar/context.d.ts +3 -2
- package/dist/components/toolbar/toolbar-toggle-group.js +1 -1
- package/dist/components/toolbar/types.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tree-menu/context.d.ts +3 -2
- package/dist/components/tree-menu/tree-menu-root.vue.d.ts +1 -1
- package/dist/components/visually-hidden/visually-hidden-input.vue.d.ts +1 -1
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/use-selection.js +1 -1
- package/dist/composables/use-ui-context.d.ts +1 -1
- package/dist/constants/components.d.ts +8 -4
- package/dist/constants/components.js +1 -1
- package/dist/date/calendar.d.ts +52 -0
- package/dist/date/calendar.js +1 -0
- package/dist/date/comparators.d.ts +30 -0
- package/dist/date/comparators.js +1 -0
- package/dist/date/index.d.ts +5 -0
- package/dist/date/index.js +1 -0
- package/dist/date/types.d.ts +36 -0
- package/dist/date/utils.d.ts +4 -0
- package/dist/date/utils.js +1 -0
- package/dist/index.d.ts +397 -355
- package/dist/index.js +1 -1
- package/dist/namespaced/index.d.ts +759 -689
- package/dist/namespaced/index.js +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/shared/value.d.ts +1 -1
- package/dist/shared/vue.d.ts +2 -1
- package/dist/shared/vue.js +1 -1
- package/dist/types/common.d.ts +9 -2
- package/dist/types/index.d.ts +1 -1
- package/package.json +10 -5
- package/dist/components/alert-dialog/alert-dialog-close.js +0 -1
- package/dist/components/alert-dialog/alert-dialog-close.vue.d.ts +0 -22
- package/dist/components/alert-dialog/alert-dialog-content.js +0 -1
- package/dist/components/alert-dialog/alert-dialog-root.js +0 -1
- package/dist/components/alert-dialog/alert-dialog-root.vue.d.ts +0 -28
- package/dist/components/alert-dialog/context.js +0 -1
- package/dist/components/alert-dialog/index.d.ts +0 -15
- package/dist/components/alert-dialog/index.js +0 -1
- package/dist/components/alert-dialog/types.d.ts +0 -9
- package/dist/components/dialog/dialog-content-impl.js +0 -1
- package/dist/components/icon/icon-render.js +0 -1
- package/dist/components/icon/icon-render.vue.d.ts +0 -8
- package/dist/components/icon/index.d.ts +0 -3
- package/dist/components/icon/index.js +0 -1
- /package/dist/_virtual/{_@oxc-project_runtime@0.126.0 → _@oxc-project_runtime@0.127.0}/helpers/defineProperty.js +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.126.0 → _@oxc-project_runtime@0.127.0}/helpers/toPrimitive.js +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.126.0 → _@oxc-project_runtime@0.127.0}/helpers/toPropertyKey.js +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.126.0 → _@oxc-project_runtime@0.127.0}/helpers/typeof.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as n}from"../../composables/use-controllable-state.js";import{useFocusOutside as r,usePointerdownOutside as i}from"../../composables/use-dismissable-layer.js";import{useForwardElement as a}from"../../composables/use-forward-element.js";import{useOmitProps as o}from"../../composables/use-props.js";import"../../composables/index.js";import{
|
|
1
|
+
import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as n}from"../../composables/use-controllable-state.js";import{useFocusOutside as r,usePointerdownOutside as i}from"../../composables/use-dismissable-layer.js";import{useForwardElement as a}from"../../composables/use-forward-element.js";import{useOmitProps as o}from"../../composables/use-props.js";import"../../composables/index.js";import{useDirection as s}from"../config-provider/context.js";import{Primitive as c}from"../primitive/primitive.js";import"../primitive/index.js";import l from"../visually-hidden/visually-hidden-input.js";import{provideEditableRootContext as u,useEditableUi as d}from"./context.js";import{computed as f,createBlock as p,createCommentVNode as m,defineComponent as h,mergeProps as g,openBlock as _,renderSlot as v,shallowRef as y,unref as b,watch as x,withCtx as S}from"vue";const C=h({name:`EditableRoot`,__name:`editable-root`,props:{defaultValue:{},modelValue:{default:void 0},placeholder:{},dir:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},activationMode:{default:`focus`},selectOnFocus:{type:Boolean,default:!1},submitMode:{default:`blur`},startWithEditMode:{type:Boolean,default:!1},maxLength:{},autoResize:{type:Boolean,default:!1},id:{},asChild:{type:Boolean},as:{default:`div`},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`submit`,`update:state`],setup(h,{expose:C,emit:w}){let T=h,E=w,[D,O]=a(),k=d(`root`),A=o(T,[`defaultValue`,`modelValue`,`placeholder`,`dir`,`disabled`,`readonly`,`activationMode`,`selectOnFocus`,`submitMode`,`startWithEditMode`,`maxLength`,`id`,`name`,`required`,`autoResize`]),j=s(()=>T.dir),M=n(()=>T.modelValue,e=>{E(`update:modelValue`,e??``)},T.defaultValue??``),N=y(M.value??``),P=y(T.startWithEditMode),F=f(()=>e(D.value)),I=f(()=>typeof T.placeholder==`string`?{edit:T.placeholder,preview:T.placeholder}:T.placeholder??{}),L=f(()=>P.value?N.value:M.value),R=f(()=>!L.value);x(M,e=>{N.value=e??``},{immediate:!0});function z(){T.disabled||T.readonly||P.value||(N.value=M.value??``,P.value=!0,E(`update:state`,`edit`))}function B(){P.value&&(N.value=M.value??``,P.value=!1,E(`update:state`,`cancel`))}function V(){if(!P.value)return;let e=N.value??``;M.value=e,P.value=!1,E(`update:state`,`submit`),E(`submit`,e)}function H(){if(P.value){if(T.submitMode===`blur`||T.submitMode===`both`){V();return}B()}}let U=i(D,()=>{H()},P),W=r(D,()=>{H()},P),{dataDisabled:G,dataReadonly:K,dataState:q}=u({...t(T,[`id`,`name`,`maxLength`,`disabled`,`readonly`,`activationMode`,`submitMode`,`selectOnFocus`,`startWithEditMode`,`dir`,`required`,`autoResize`]),modelValue:M,inputValue:N,placeholder:I,isEditing:P,isEmpty:R,edit:z,cancel:B,submit:V});return C({edit:z,cancel:B,submit:V}),(e,t)=>(_(),p(b(c),g(b(A),{ref:b(O),class:b(k),dir:b(j),"data-dismissable-layer":``,"data-disabled":b(G),"data-readonly":b(K),"data-state":b(q),onFocusCapture:b(W).onFocusCapture,onBlurCapture:b(W).onBlurCapture,onPointerdownCapture:b(U).onPointerdownCapture}),{default:S(()=>[v(e.$slots,`default`,{modelValue:b(M),inputValue:N.value,isEditing:P.value,isEmpty:R.value,edit:z,cancel:B,submit:V}),F.value&&h.name?(_(),p(l,{key:0,type:`text`,value:b(M),name:h.name,disabled:h.disabled,readonly:h.readonly,required:h.required},null,8,[`value`,`name`,`disabled`,`readonly`,`required`])):m(`v-if`,!0)]),_:3},16,[`class`,`dir`,`data-disabled`,`data-readonly`,`data-state`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}});export{C as default};
|
|
@@ -34,8 +34,8 @@ declare const __VLS_base: _$vue.DefineComponent<EditableRootProps, {
|
|
|
34
34
|
disabled: boolean;
|
|
35
35
|
modelValue: string;
|
|
36
36
|
as: AsTag | _$vue.Component;
|
|
37
|
-
activationMode: EditableActivationMode;
|
|
38
37
|
readonly: boolean;
|
|
38
|
+
activationMode: EditableActivationMode;
|
|
39
39
|
selectOnFocus: boolean;
|
|
40
40
|
submitMode: EditableSubmitMode;
|
|
41
41
|
startWithEditMode: boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { UseUiConsumer } from "../../composables/use-ui-context.js";
|
|
2
3
|
import { EmptyUiSlot } from "./types.js";
|
|
3
4
|
import * as _$vue from "vue";
|
|
4
5
|
|
|
5
6
|
//#region src/components/empty/context.d.ts
|
|
6
|
-
declare const provideEmptyUi: (ui: _$vue.ComputedRef<Partial<UiClass<EmptyUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<EmptyUiSlot>>>, useEmptyUi: <
|
|
7
|
+
declare const provideEmptyUi: (ui: _$vue.ComputedRef<Partial<UiClass<EmptyUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<EmptyUiSlot>>>, useEmptyUi: UseUiConsumer<EmptyUiSlot>;
|
|
7
8
|
//#endregion
|
|
8
9
|
export { provideEmptyUi };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { UseUiConsumer } from "../../composables/use-ui-context.js";
|
|
2
3
|
import { FormFieldUiSlot } from "./types.js";
|
|
3
4
|
import * as _$vue from "vue";
|
|
4
5
|
|
|
5
6
|
//#region src/components/form/context.d.ts
|
|
6
|
-
declare const provideFormFieldUi: (ui: _$vue.ComputedRef<Partial<UiClass<FormFieldUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<FormFieldUiSlot>>>, useFormFieldUi: <
|
|
7
|
+
declare const provideFormFieldUi: (ui: _$vue.ComputedRef<Partial<UiClass<FormFieldUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<FormFieldUiSlot>>>, useFormFieldUi: UseUiConsumer<FormFieldUiSlot>;
|
|
7
8
|
//#endregion
|
|
8
9
|
export { provideFormFieldUi };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFunction as e,isNullish as t,isString as n,keysOf as r}from"../../../shared/guard.js";import{getValue as i,setValue as a}from"../../../shared/value.js";import"../../../shared/index.js";import{updateFormState as o}from"./shared.js";import{validateStandardSchema as s}from"./standard.js";import{computed as c,onMounted as l,reactive as u,ref as d,shallowRef as f,toRef as p}from"vue";import{isEqual as m}from"ohash";import{
|
|
1
|
+
import{isFunction as e,isNullish as t,isString as n,keysOf as r}from"../../../shared/guard.js";import{getValue as i,setValue as a}from"../../../shared/value.js";import"../../../shared/index.js";import{updateFormState as o}from"./shared.js";import{validateStandardSchema as s}from"./standard.js";import{computed as c,onMounted as l,reactive as u,ref as d,shallowRef as f,toRef as p}from"vue";import{isEqual as m}from"ohash";import{defu as h}from"defu";import{klona as g}from"klona/full";function _(_){let{validateOnMounted:v=!1,validateMode:y=`submit`,reValidateMode:b=`change`}=_,x=g(_.initialValues||{}),S=g(_.initialErrors||{}),C=g(_.initialTouched||{}),w={values:u(g(x)),touched:d(g(C)),errors:d(g(S)),submitCount:f(0),isSubmitting:f(!1),isValidating:f(!1)},T=c(()=>!m(w.values,x)),E={},D={},O=c(()=>w.submitCount.value===0?y:b);function k(e,t,n){let r=e;r in w.values||a(w.values,r,n?[]:void 0);let{validate:i}=t||{};return i&&(E[r]={validate:i}),K(e)}function A(e,t){let n=k(e,t,!0),r=e,{reset:i}=t||{};return i&&(D[r]={reset:i}),n}function j(e,n=!0){return o(w,{type:`SetValues`,payload:e}),(t(n)?O.value===`change`:n)?Z(w.values):Promise.resolve()}function M(e){o(w,{type:`SetErrors`,payload:e})}function N(e,t,n=!0){return o(w,{type:`SetFieldValue`,payload:{name:e,value:t}}),n?Z(w.values):Promise.resolve()}function P(e,t){o(w,{type:`SetTouched`,payload:{name:e,touched:t}})}function F(e,t){o(w,{type:`SetFieldError`,payload:{name:e,error:t}})}function I(e,t,n,a,s=!0){if(n&&a){if(r(w.errors.value).length&&Array.isArray(i(w.errors.value,e))){let t=n(i(w.errors.value,e),a.argA,a.argB);s&&F(e,t)}if(r(w.touched.value).length&&Array.isArray(i(w.touched.value,e))){let t=n(i(w.touched.value,e),a.argA,a.argB);s&&o(w,{type:`SetTouched`,payload:{name:e,touched:t}})}}return N(e,t)}function L(e){return c({get(){return i(w.values,e)},set(t){N(e,t)}})}function R(e){return p({dirty:c(()=>V(e)),error:c(()=>z(e)),touched:c(()=>B(e))})}function z(e){return i(w.errors.value,e)}function B(e){return i(w.touched.value,e,!1)}function V(e){return!m(i(x,e),i(w.values,e))}async function H(t){if(E[t]&&e(E[t].validate)){o(w,{type:`SetIsValidating`,payload:!0});let e=await X(t,i(w.values,t));return F(t,e),o(w,{type:`SetIsValidating`,payload:!1}),e}return Promise.resolve()}let U=(e,t)=>{if((e=>n(e))(e)){P(e,!0);return}let{name:r,id:i}=e.target,a=t??(r||i);a&&P(a,!0)},W=()=>{O.value===`change`&&Z(w.values)},G=()=>{O.value===`input`&&Z(w.values)};function K(e){let t=R(e);return p({name:e,value:L(e),meta:t,onBlur:U,onChange:W,onInput:G})}function q(e){o(w,{type:`SetIsSubmitting`,payload:e})}let J={setSubmitting:q,get initialValues(){return g(x||{})}};async function Y(t){let n=r(E).filter(t=>e(E?.[t]?.validate)),o=n.map(e=>X(e,i(t,e)));return Promise.all(o).then(e=>e.reduce((e,t,r)=>(t&&a(e,n[r],t),e),{}))}function X(e,t){return Promise.resolve(E[e]?.validate?.(t))}async function Z(e=w.values){return o(w,{type:`SetIsValidating`,payload:!0}),Promise.all([Y(e),s(e,_.schema)]).then(([e,t])=>{let n=h(e,t);return M(n),n}).finally(()=>{o(w,{type:`SetIsValidating`,payload:!1})})}function Q(e){let t=g(e?.values||x),n=g(e?.errors||S),r=g(e?.touched||C);x=g(t),S=g(n),C=g(r),o(w,{type:`ResetForm`,payload:{values:t,touched:r,errors:n,submitCount:typeof e?.submitCount==`number`?e.submitCount:0}}),Object.values(D).forEach(e=>{e?.reset?.()})}return l(()=>{v&&Z(x)}),{formState:w,dirty:T,submitHelper:J,setSubmitting:q,registerField:k,registerFieldArray:A,validateField:H,getFieldValue:L,getFieldMeta:R,getFieldError:z,getFieldTouched:B,getFieldDirty:V,getFieldState:K,setValues:j,setErrors:M,setFieldValue:N,setFieldTouched:P,setFieldError:F,setFieldArrayValue:I,validateForm:Z,resetForm:Q}}export{_ as useFormState};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { PopperAnchorProps, PopperArrowProps, PopperUi, PopperUiSlot } from "../popper/types.js";
|
|
1
2
|
import { PortalProps } from "../portal/types.js";
|
|
2
3
|
import { _default as _default$2 } from "../portal/portal.vue.js";
|
|
3
|
-
import { PopperAnchorProps, PopperArrowProps, PopperUi, PopperUiSlot } from "../popper/types.js";
|
|
4
4
|
import { _default } from "../popper/popper-arrow.vue.js";
|
|
5
5
|
import { HoverCardPopupProps, HoverCardPositionerEmits, HoverCardPositionerProps, HoverCardRootEmits, HoverCardRootProps } from "./types.js";
|
|
6
6
|
import { _default as _default$4 } from "./hover-card-root.vue.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e
|
|
1
|
+
import{providePopperUi as e}from"../popper/context.js";import t from"../popper/popper-arrow.js";import n from"../portal/portal.js";import r from"./hover-card-root.js";import i from"./hover-card-trigger.js";import a from"./hover-card-positioner.js";import o from"./hover-card-popup.js";export{t as HoverCardArrow,o as HoverCardPopup,n as HoverCardPortal,a as HoverCardPositioner,r as HoverCardRoot,i as HoverCardTrigger,e as provideHoverCardUi};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DismissableLayerEmits, ForceMountProps } from "../../types/component.js";
|
|
2
|
-
import { PortalProps } from "../portal/types.js";
|
|
3
2
|
import { PopperAnchorProps, PopperArrowProps, PopperPopupProps, PopperPositionerProps, PopperUi, PopperUiSlot } from "../popper/types.js";
|
|
3
|
+
import { PortalProps } from "../portal/types.js";
|
|
4
4
|
import { ComputedRef, ShallowRef } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/components/hover-card/types.d.ts
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { UseUiConsumer } from "../../composables/use-ui-context.js";
|
|
2
3
|
import { InputUiSlot } from "./types.js";
|
|
3
4
|
import * as _$vue from "vue";
|
|
4
5
|
|
|
5
6
|
//#region src/components/input/context.d.ts
|
|
6
|
-
declare const provideInputUi: (ui: _$vue.ComputedRef<Partial<UiClass<InputUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<InputUiSlot>>>, useInputUi: <
|
|
7
|
+
declare const provideInputUi: (ui: _$vue.ComputedRef<Partial<UiClass<InputUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<InputUiSlot>>>, useInputUi: UseUiConsumer<InputUiSlot>;
|
|
7
8
|
//#endregion
|
|
8
9
|
export { provideInputUi };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { UseUiConsumer } from "../../composables/use-ui-context.js";
|
|
2
3
|
import { InputNumberUiSlot } from "./types.js";
|
|
3
4
|
import * as _$vue from "vue";
|
|
4
5
|
|
|
5
6
|
//#region src/components/input-number/context.d.ts
|
|
6
|
-
declare const provideInputNumberUi: (ui: _$vue.ComputedRef<Partial<UiClass<InputNumberUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<InputNumberUiSlot>>>, useInputNumberUi: <
|
|
7
|
+
declare const provideInputNumberUi: (ui: _$vue.ComputedRef<Partial<UiClass<InputNumberUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<InputNumberUiSlot>>>, useInputNumberUi: UseUiConsumer<InputNumberUiSlot>;
|
|
7
8
|
//#endregion
|
|
8
9
|
export { provideInputNumberUi };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { UseUiConsumer } from "../../composables/use-ui-context.js";
|
|
3
|
+
import { InputOtpUiSlot } from "./types.js";
|
|
4
|
+
import * as _$vue from "vue";
|
|
5
|
+
|
|
6
|
+
//#region src/components/input-otp/context.d.ts
|
|
7
|
+
declare const provideInputOtpUi: (ui: _$vue.ComputedRef<Partial<UiClass<InputOtpUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<InputOtpUiSlot>>>, useInputOtpUi: UseUiConsumer<InputOtpUiSlot>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { provideInputOtpUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as e}from"../../composables/use-context.js";import{useUiContext as t}from"../../composables/use-ui-context.js";import"../../composables/index.js";const[n,r]=e(`InputOtpRoot`),[i,a]=t(`InputOtpUi`);export{n as provideInputOtpRootContext,i as provideInputOtpUi,r as useInputOtpRootContext,a as useInputOtpUi};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputOtpCompactEmits, InputOtpCompactProps, InputOtpCompactSlots, InputOtpInputMode, InputOtpInputProps, InputOtpPositionerProps, InputOtpPushPasswordManagerStrategy, InputOtpRootContext, InputOtpRootEmits, InputOtpRootProps, InputOtpRootSlotProps, InputOtpSlotProps, InputOtpUi, InputOtpUiSlot } from "./types.js";
|
|
2
|
+
import { _default } from "./input-otp-compact.vue.js";
|
|
3
|
+
import { _default as _default$1 } from "./input-otp-input.vue.js";
|
|
4
|
+
import { _default as _default$2 } from "./input-otp-positioner.vue.js";
|
|
5
|
+
import { _default as _default$3 } from "./input-otp-root.vue.js";
|
|
6
|
+
import { provideInputOtpUi } from "./context.js";
|
|
7
|
+
import { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "./regexp.js";
|
|
8
|
+
export { _default as InputOtpCompact, type InputOtpCompactEmits, type InputOtpCompactProps, type InputOtpCompactSlots, _default$1 as InputOtpInput, type InputOtpInputMode, type InputOtpInputProps, _default$2 as InputOtpPositioner, type InputOtpPositionerProps, type InputOtpPushPasswordManagerStrategy, _default$3 as InputOtpRoot, type InputOtpRootContext, type InputOtpRootEmits, type InputOtpRootProps, type InputOtpRootSlotProps, type InputOtpSlotProps, type InputOtpUi, type InputOtpUiSlot, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, provideInputOtpUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{provideInputOtpUi as e}from"./context.js";import t from"./input-otp-input.js";import n from"./input-otp-positioner.js";import r from"./input-otp-root.js";import i from"./input-otp-compact.js";import{REGEXP_ONLY_CHARS as a,REGEXP_ONLY_DIGITS as o,REGEXP_ONLY_DIGITS_AND_CHARS as s}from"./regexp.js";export{i as InputOtpCompact,t as InputOtpInput,n as InputOtpPositioner,r as InputOtpRoot,a as REGEXP_ONLY_CHARS,o as REGEXP_ONLY_DIGITS,s as REGEXP_ONLY_DIGITS_AND_CHARS,e as provideInputOtpUi};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useForwardListeners as e}from"../../composables/use-forward-listeners.js";import{usePickProps as t}from"../../composables/use-props.js";import"../../composables/index.js";import{useInputOtpUi as n}from"./context.js";import r from"./input-otp-input.js";import i from"./input-otp-positioner.js";import a from"./input-otp-root.js";import{Fragment as o,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createVNode as f,defineComponent as p,guardReactiveProps as m,mergeProps as h,normalizeClass as g,normalizeProps as _,normalizeStyle as v,openBlock as y,renderList as b,renderSlot as x,toDisplayString as S,toHandlers as C,unref as w,withCtx as T}from"vue";const E=[`data-state`],D=p({name:`InputOtpCompact`,__name:`input-otp-compact`,props:{id:{},autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},minlength:{},placeholder:{},readonly:{type:Boolean},"aria-label":{},modelValue:{},defaultValue:{},maxlength:{},inputmode:{},pattern:{},pushPasswordManagerStrategy:{},pasteTransformer:{type:Function},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`complete`,`input`,`change`,`select`,`focus`,`blur`,`mouseover`,`mouseleave`,`paste`],setup(p,{emit:D}){let O=p,k=e(D),A=n(),j=t(O,[`id`,`autocomplete`,`autofocus`,`disabled`,`minlength`,`placeholder`,`readonly`,`aria-label`,`modelValue`,`defaultValue`,`maxlength`,`inputmode`,`pattern`,`pushPasswordManagerStrategy`,`pasteTransformer`,`name`,`required`]),M=s(()=>Math.max(O.maxlength,1)),N=s(()=>({"--columns":M.value})),P=e=>e.isActive?`active`:e.char?`filled`:`idle`;return(e,t)=>(y(),c(a,h(w(j),C(w(k))),{default:T(t=>[x(e.$slots,`default`,_(m(t)),()=>[d(`div`,{"data-slot":`group`,"aria-hidden":`true`,class:g(w(A).group),style:v(N.value)},[(y(!0),u(o,null,b(t.slots,(e,t)=>(y(),u(`div`,{key:t,"data-slot":`slot`,class:g(w(A).slot),"data-state":P(e)},[e.char?(y(),u(`span`,{key:0,"data-slot":`char`,class:g(w(A).char)},S(e.char),3)):e.placeholderChar?(y(),u(`span`,{key:1,"data-slot":`placeholder`,class:g(w(A).placeholder)},S(e.placeholderChar),3)):l(`v-if`,!0),e.hasFakeCaret?(y(),u(`span`,{key:2,"data-slot":`caret`,class:g(w(A).caret)},null,2)):l(`v-if`,!0)],10,E))),128))],6)]),f(i,null,{default:T(()=>[f(r)]),_:1})]),_:3},16))}});export{D as default};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InputOtpCompactProps, InputOtpCompactSlots } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/input-otp/input-otp-compact.vue.d.ts
|
|
5
|
+
type __VLS_Slots = InputOtpCompactSlots;
|
|
6
|
+
declare const __VLS_base: _$vue.DefineComponent<InputOtpCompactProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
7
|
+
input: (value: string) => any;
|
|
8
|
+
select: (event: Event) => any;
|
|
9
|
+
"update:modelValue": (value: string) => any;
|
|
10
|
+
complete: (value: string) => any;
|
|
11
|
+
change: (event: Event) => any;
|
|
12
|
+
focus: (event: FocusEvent) => any;
|
|
13
|
+
blur: (event: FocusEvent) => any;
|
|
14
|
+
mouseover: (event: MouseEvent) => any;
|
|
15
|
+
mouseleave: (event: MouseEvent) => any;
|
|
16
|
+
paste: (event: ClipboardEvent) => any;
|
|
17
|
+
}, string, _$vue.PublicProps, Readonly<InputOtpCompactProps> & Readonly<{
|
|
18
|
+
onInput?: ((value: string) => any) | undefined;
|
|
19
|
+
onSelect?: ((event: Event) => any) | undefined;
|
|
20
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
21
|
+
onComplete?: ((value: string) => any) | undefined;
|
|
22
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
23
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
24
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
25
|
+
onMouseover?: ((event: MouseEvent) => any) | undefined;
|
|
26
|
+
onMouseleave?: ((event: MouseEvent) => any) | undefined;
|
|
27
|
+
onPaste?: ((event: ClipboardEvent) => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useInputOtpRootContext as e,useInputOtpUi as t}from"./context.js";import{createElementBlock as n,defineComponent as r,mergeProps as i,openBlock as a,unref as o}from"vue";const s=[`id`,`data-password-manager-badge`,`value`,`data-input-otp-placeholder-shown`,`data-input-otp-mss`,`data-input-otp-mse`,`aria-label`,`aria-placeholder`,`autocomplete`,`autofocus`,`disabled`,`inputmode`,`maxlength`,`minlength`,`name`,`pattern`,`placeholder`,`readonly`,`required`],c=r({name:`InputOtpInput`,__name:`input-otp-input`,setup(r){let c=t(`input`),{autocomplete:l,autofocus:u,disabled:d,inputAttrs:f,inputElement:p,inputmode:m,maxlength:h,minlength:g,mirrorSelectionStart:_,mirrorSelectionEnd:v,modelValue:y,name:b,pattern:x,readonly:S,required:C,resolvedAccessibleLabel:w,resolvedId:T,resolvedPlaceholder:E,willPushPWMBadge:D,onBeforeInput:O,onNativeChange:k,onNativeSelect:A,onMouseOver:j,onMouseLeave:M,onPaste:N,onInput:P,onFocus:F,onBlur:I}=e(`InputOtpInput`),L=e=>{p.value=e instanceof HTMLInputElement?e:null};return(e,t)=>(a(),n(`input`,i(o(f),{id:o(T),ref:L,"data-slot":`input`,"data-input-otp":``,"data-password-manager-badge":o(D)?``:void 0,type:`text`,class:o(c),value:o(y),"data-input-otp-placeholder-shown":o(y).length===0||void 0,"data-input-otp-mss":o(_),"data-input-otp-mse":o(v),"aria-label":o(w),"aria-placeholder":o(E),autocomplete:o(l),autocorrect:`off`,spellcheck:`false`,autofocus:o(u),disabled:o(d),inputmode:o(m),maxlength:o(h),minlength:o(g),name:o(b),pattern:o(x),placeholder:o(E),readonly:o(S),required:o(C),onBeforeinput:t[0]||(t[0]=(...e)=>o(O)&&o(O)(...e)),onChange:t[1]||(t[1]=(...e)=>o(k)&&o(k)(...e)),onSelect:t[2]||(t[2]=(...e)=>o(A)&&o(A)(...e)),onMouseover:t[3]||(t[3]=(...e)=>o(j)&&o(j)(...e)),onMouseleave:t[4]||(t[4]=(...e)=>o(M)&&o(M)(...e)),onPaste:t[5]||(t[5]=(...e)=>o(N)&&o(N)(...e)),onInput:t[6]||(t[6]=(...e)=>o(P)&&o(P)(...e)),onFocus:t[7]||(t[7]=(...e)=>o(F)&&o(F)(...e)),onBlur:t[8]||(t[8]=(...e)=>o(I)&&o(I)(...e))}),null,16,s))}});export{c as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputOtpInputProps } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/input-otp/input-otp-input.vue.d.ts
|
|
5
|
+
declare const __VLS_export: _$vue.DefineComponent<InputOtpInputProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<InputOtpInputProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useInputOtpUi as e}from"./context.js";import{createElementBlock as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";const s=n({name:`InputOtpPositioner`,__name:`input-otp-positioner`,setup(n){let s=e(`positioner`);return(e,n)=>(i(),t(`div`,{"data-slot":`positioner`,class:r(o(s))},[a(e.$slots,`default`)],2))}});export{s as default};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InputOtpPositionerProps } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/input-otp/input-otp-positioner.vue.d.ts
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: _$vue.DefineComponent<InputOtpPositionerProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<InputOtpPositionerProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{omit as e}from"../../shared/object.js";import{transformPropsToContext as t}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as n}from"../../composables/use-controllable-state.js";import"../../composables/index.js";import{provideInputOtpRootContext as r,useInputOtpUi as i}from"./context.js";import{createInputOtpSlots as a,getClampedOtpValue as o,isInputOtpValueValid as s,resolveInputOtpPattern as c,resolveInputOtpSelection as l,syncTimeouts as u}from"./shared.js";import{usePasswordManagerBadge as d}from"./use-password-manager-badge.js";import{computed as f,createElementBlock as p,defineComponent as m,guardReactiveProps as h,normalizeClass as ee,normalizeProps as te,normalizeStyle as ne,onBeforeUnmount as re,onMounted as g,openBlock as _,renderSlot as v,shallowRef as y,unref as ie,useAttrs as ae,watch as oe,watchEffect as se}from"vue";import{defaultDocument as b,defaultWindow as x,useEventListener as S,usePrevious as C}from"@vueuse/core";const w=[`data-disabled`,`data-focused`,`data-hovering`,`data-complete`],T=m({name:`InputOtpRoot`,inheritAttrs:!1,__name:`input-otp-root`,props:{id:{},autocomplete:{default:`one-time-code`},autofocus:{type:Boolean},disabled:{type:Boolean},minlength:{},placeholder:{},readonly:{type:Boolean},"aria-label":{},modelValue:{default:void 0},defaultValue:{default:``},maxlength:{},inputmode:{default:`numeric`},pattern:{},pushPasswordManagerStrategy:{default:`increase-width`},pasteTransformer:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`complete`,`input`,`change`,`select`,`focus`,`blur`,`mouseover`,`mouseleave`,`paste`],setup(m,{expose:T,emit:ce}){let E=m,D=ce,O=ae(),le=i(`root`),k=n(()=>E.modelValue,e=>{D(`update:modelValue`,e)},E.defaultValue),A=C(k),j=f(()=>k.value??``),M=t(E,[`autocomplete`,`autofocus`,`disabled`,`inputmode`,`maxlength`,`minlength`,`name`,`readonly`,`required`]);function N(e){return typeof e==`string`?e:void 0}let P=f(()=>N(E.id)??N(O.id)),F=f(()=>N(E.placeholder)??N(O.placeholder)),I=f(()=>N(E[`aria-label`])??N(O[`aria-label`])??`One-time password`),L=f(()=>c(E.pattern)),R=f(()=>e(O,[`class`,`style`,`id`,`placeholder`,`aria-label`])),z=f(()=>L.value?.source),B=y(!1),V=y(!1),H=y(null),U=y(null),W=y(null),G=y(null),ue=x?.CSS?.supports?.(`-webkit-touch-callout`,`none`)??!1,K=[null,null,null],de=f(()=>[le.value,O.class]),{willPushPWMBadge:fe}=d({containerElement:W,inputElement:G,pushPasswordManagerStrategy:()=>E.pushPasswordManagerStrategy,isFocused:V}),q=f(()=>({slots:a({value:j.value,maxlength:E.maxlength,placeholder:F.value,isFocused:V.value,selectionStart:H.value,selectionEnd:U.value}),isFocused:V.value,isHovering:!E.disabled&&B.value})),J=()=>{G.value?.focus()},Y=()=>{G.value?.blur()},X=()=>{G.value?.select()},Z=()=>{let e=G.value;if(!e)return;if(b?.activeElement!==e){H.value=null,U.value=null;return}let t=l({selectionStart:e.selectionStart,selectionEnd:e.selectionEnd,selectionDirection:e.selectionDirection,maxlength:E.maxlength,value:e.value,previousSelection:K});t.start!==null&&t.end!==null&&t.start!==t.end&&t.start>=0&&t.end<=E.maxlength&&e.setSelectionRange(t.start,t.end,t.direction??void 0),H.value=t.start,U.value=t.end,K=[t.start,t.end,t.direction]},pe=e=>{if(e.inputType!==`insertText`||e.data===null)return;let t=e.currentTarget,n=t.selectionStart??0,r=t.selectionEnd??0;s(o(n===r?`${t.value.slice(0,n)}${e.data}${t.value.slice(n)}`:`${t.value.slice(0,n)}${e.data}${t.value.slice(r)}`,E.maxlength),L.value)||e.preventDefault()},Q=e=>{let t=e.currentTarget;if(E.disabled||E.readonly){t.value=j.value;return}let n=o(t.value,E.maxlength);if(!s(n,L.value)){t.value=j.value,e.preventDefault();return}typeof A.value==`string`&&n.length<A.value.length&&b?.dispatchEvent(new Event(`selectionchange`)),k.value=n,D(`input`,n)},me=e=>{D(`change`,e)},he=e=>{D(`select`,e)},ge=e=>{B.value=!0,D(`mouseover`,e)},_e=e=>{B.value=!1,D(`mouseleave`,e)},ve=e=>{let t=G.value;if(!t)return;let n=Math.max(Math.min(t.value.length,E.maxlength-1),0),r=t.value.length;t.setSelectionRange(n,r),H.value=n,U.value=r,V.value=!0,D(`focus`,e)},ye=e=>{V.value=!1,D(`blur`,e)},be=e=>{let t=G.value;if(!t)return;if(!E.pasteTransformer&&(!ue||!e.clipboardData)){D(`paste`,e);return}let n=e.clipboardData?.getData(`text/plain`),r=E.pasteTransformer?E.pasteTransformer(n):n;e.preventDefault();let i=t.selectionStart??0,a=t.selectionEnd??0,c=o(i===a?`${j.value.slice(0,i)}${r??``}${j.value.slice(i)}`:`${j.value.slice(0,i)}${r??``}${j.value.slice(a)}`,E.maxlength);if(!s(c,L.value)){D(`paste`,e);return}k.value=c,D(`input`,c);let l=Math.max(Math.min(c.length,E.maxlength-1),0),u=c.length;t.setSelectionRange(l,u),H.value=l,U.value=u,D(`paste`,e)};r({...M,inputAttrs:R,willPushPWMBadge:fe,mirrorSelectionStart:H,mirrorSelectionEnd:U,modelValue:j,pattern:z,resolvedAccessibleLabel:I,resolvedId:P,resolvedPlaceholder:F,slots:f(()=>q.value.slots),isFocused:V,isHovering:B,inputElement:G,focus:J,blur:Y,select:X,onBeforeInput:pe,onNativeChange:me,onNativeSelect:he,onMouseOver:ge,onMouseLeave:_e,onPaste:be,onInput:Q,onFocus:ve,onBlur:ye});let $;return g(()=>{let e=G.value;e&&(K=[e.selectionStart,e.selectionEnd,e.selectionDirection],$=S(b,`selectionchange`,Z,{capture:!0}),Z(),b?.activeElement===e&&(V.value=!0))}),re(()=>{$?.()}),oe(()=>k.value,(e,t,n)=>{let r=u(()=>{let e=G.value;e&&e.selectionStart!==null&&e.selectionEnd!==null&&(H.value=e.selectionStart,U.value=e.selectionEnd,K=[e.selectionStart,e.selectionEnd,e.selectionDirection])});n(()=>{let e=x;e&&r.forEach(t=>e.clearTimeout(t))})},{immediate:!0}),se(()=>{A.value!==void 0&&j.value!==A.value&&A.value.length<E.maxlength&&j.value.length===E.maxlength&&D(`complete`,j.value)}),T({focus:J,blur:Y,select:X,get $el(){return G.value}}),(e,t)=>(_(),p(`div`,{ref_key:`containerElement`,ref:W,"data-slot":`root`,"data-input-otp-container":``,"data-disabled":m.disabled?``:void 0,"data-focused":V.value?``:void 0,"data-hovering":!m.disabled&&B.value?``:void 0,"data-complete":j.value.length===m.maxlength?``:void 0,class:ee(de.value),style:ne(ie(O).style)},[v(e.$slots,`default`,te(h(q.value)))],14,w))}});export{T as default};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { InputOtpInputMode, InputOtpPushPasswordManagerStrategy, InputOtpRootProps, InputOtpSlotProps } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/input-otp/input-otp-root.vue.d.ts
|
|
5
|
+
declare var __VLS_1: {
|
|
6
|
+
slots: InputOtpSlotProps[];
|
|
7
|
+
isFocused: boolean;
|
|
8
|
+
isHovering: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: _$vue.DefineComponent<InputOtpRootProps, {
|
|
14
|
+
focus: () => void;
|
|
15
|
+
blur: () => void;
|
|
16
|
+
select: () => void;
|
|
17
|
+
readonly $el: HTMLInputElement | null;
|
|
18
|
+
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
19
|
+
input: (value: string) => any;
|
|
20
|
+
select: (event: Event) => any;
|
|
21
|
+
"update:modelValue": (value: string) => any;
|
|
22
|
+
complete: (value: string) => any;
|
|
23
|
+
change: (event: Event) => any;
|
|
24
|
+
focus: (event: FocusEvent) => any;
|
|
25
|
+
blur: (event: FocusEvent) => any;
|
|
26
|
+
mouseover: (event: MouseEvent) => any;
|
|
27
|
+
mouseleave: (event: MouseEvent) => any;
|
|
28
|
+
paste: (event: ClipboardEvent) => any;
|
|
29
|
+
}, string, _$vue.PublicProps, Readonly<InputOtpRootProps> & Readonly<{
|
|
30
|
+
onInput?: ((value: string) => any) | undefined;
|
|
31
|
+
onSelect?: ((event: Event) => any) | undefined;
|
|
32
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
33
|
+
onComplete?: ((value: string) => any) | undefined;
|
|
34
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
35
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
36
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
37
|
+
onMouseover?: ((event: MouseEvent) => any) | undefined;
|
|
38
|
+
onMouseleave?: ((event: MouseEvent) => any) | undefined;
|
|
39
|
+
onPaste?: ((event: ClipboardEvent) => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
autocomplete: string;
|
|
42
|
+
inputmode: InputOtpInputMode;
|
|
43
|
+
modelValue: string;
|
|
44
|
+
defaultValue: string;
|
|
45
|
+
pushPasswordManagerStrategy: InputOtpPushPasswordManagerStrategy;
|
|
46
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
47
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
48
|
+
declare const _default: typeof __VLS_export;
|
|
49
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
export { _default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/components/input-otp/regexp.d.ts
|
|
2
|
+
declare const REGEXP_ONLY_DIGITS = "^\\d+$";
|
|
3
|
+
declare const REGEXP_ONLY_CHARS = "^[a-zA-Z]+$";
|
|
4
|
+
declare const REGEXP_ONLY_DIGITS_AND_CHARS = "^[a-zA-Z0-9]+$";
|
|
5
|
+
//#endregion
|
|
6
|
+
export { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=`^\\d+$`,t=`^[a-zA-Z]+$`,n=`^[a-zA-Z0-9]+$`;export{t as REGEXP_ONLY_CHARS,e as REGEXP_ONLY_DIGITS,n as REGEXP_ONLY_DIGITS_AND_CHARS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return e?typeof e==`string`?new RegExp(e):e:null}function t(e,t){return e.slice(0,Math.max(t,0))}function n(e,t){return!e||!t?!0:(t.lastIndex=0,t.test(e))}function r(e){let{value:t,maxlength:n,placeholder:r,isFocused:i,selectionStart:a,selectionEnd:o}=e;return Array.from({length:n}).map((e,n)=>{let s=i&&a!==null&&o!==null&&(a===o&&n===a||n>=a&&n<o),c=t[n]??null;return{char:c,placeholderChar:c??r?.[n]??null,isActive:s,hasFakeCaret:s&&c===null}})}function i(e){let{selectionStart:t,selectionEnd:n,selectionDirection:r,maxlength:i,value:a,previousSelection:o}=e,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0,n=o[1];if(o[0]!==null&&n!=null){l=e<n?`backward`:`forward`;let r=o[0]===o[1]&&Number(o[0])<i;l===`backward`&&!r&&(t=-1)}s=t+e,c=t+e+1}}}return{start:s===-1?t:s,end:c===-1?n:c,direction:l??r}}function a(e){return typeof window>`u`?[]:[0,10,50].map(t=>window.setTimeout(e,t))}export{r as createInputOtpSlots,t as getClampedOtpValue,n as isInputOtpValueValid,e as resolveInputOtpPattern,i as resolveInputOtpSelection,a as syncTimeouts};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { FormFieldCommonProps } from "../../types/component.js";
|
|
3
|
+
import { ComputedRef, HTMLAttributes, InputHTMLAttributes, ShallowRef } from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/input-otp/types.d.ts
|
|
6
|
+
type InputOtpInputMode = 'numeric' | 'text';
|
|
7
|
+
type InputOtpPushPasswordManagerStrategy = 'increase-width' | 'none';
|
|
8
|
+
interface InputOtpRootProps extends FormFieldCommonProps, /** @vue-ignore */Omit<HTMLAttributes, 'onInput'> {
|
|
9
|
+
/** The id of the native input element. */
|
|
10
|
+
id?: string;
|
|
11
|
+
/** Autocomplete hint passed to the native input. */
|
|
12
|
+
autocomplete?: string;
|
|
13
|
+
/** Whether the input should be focused on mount. */
|
|
14
|
+
autofocus?: boolean;
|
|
15
|
+
/** Whether the input is disabled. */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Minimum length forwarded to the native input. */
|
|
18
|
+
minlength?: number;
|
|
19
|
+
/** Placeholder characters used by the visual slots. */
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
/** Whether the input is readonly. */
|
|
22
|
+
readonly?: boolean;
|
|
23
|
+
/** Accessible label forwarded to the native input. */
|
|
24
|
+
'aria-label'?: string;
|
|
25
|
+
/** The controlled value of the OTP input. */
|
|
26
|
+
modelValue?: string;
|
|
27
|
+
/** The uncontrolled default value of the OTP input. */
|
|
28
|
+
defaultValue?: string;
|
|
29
|
+
/** The number of OTP slots. */
|
|
30
|
+
maxlength: number;
|
|
31
|
+
/** Virtual keyboard mode for mobile devices. */
|
|
32
|
+
inputmode?: InputOtpInputMode;
|
|
33
|
+
/** Pattern used to validate the whole OTP value. */
|
|
34
|
+
pattern?: string | RegExp;
|
|
35
|
+
/** Strategy used to avoid overlapping password manager badges. */
|
|
36
|
+
pushPasswordManagerStrategy?: InputOtpPushPasswordManagerStrategy;
|
|
37
|
+
/** Transform pasted content before it is inserted. */
|
|
38
|
+
pasteTransformer?: (pasted: string | undefined) => string;
|
|
39
|
+
}
|
|
40
|
+
type InputOtpRootEmits = {
|
|
41
|
+
'update:modelValue': [value: string];
|
|
42
|
+
complete: [value: string];
|
|
43
|
+
input: [value: string];
|
|
44
|
+
change: [event: Event];
|
|
45
|
+
select: [event: Event];
|
|
46
|
+
focus: [event: FocusEvent];
|
|
47
|
+
blur: [event: FocusEvent];
|
|
48
|
+
mouseover: [event: MouseEvent];
|
|
49
|
+
mouseleave: [event: MouseEvent];
|
|
50
|
+
paste: [event: ClipboardEvent];
|
|
51
|
+
};
|
|
52
|
+
interface InputOtpPositionerProps extends /** @vue-ignore */HTMLAttributes {}
|
|
53
|
+
interface InputOtpInputProps extends /** @vue-ignore */InputHTMLAttributes {}
|
|
54
|
+
interface InputOtpCompactProps extends InputOtpRootProps {}
|
|
55
|
+
type InputOtpCompactEmits = InputOtpRootEmits;
|
|
56
|
+
type InputOtpCompactSlots = {
|
|
57
|
+
default?: (props: InputOtpRootSlotProps) => any;
|
|
58
|
+
};
|
|
59
|
+
interface InputOtpSlotProps {
|
|
60
|
+
/** The typed character at the current slot. */
|
|
61
|
+
char: string | null;
|
|
62
|
+
/** Placeholder character rendered when the slot is empty. */
|
|
63
|
+
placeholderChar: string | null;
|
|
64
|
+
/** Whether the slot is covered by the current selection or caret. */
|
|
65
|
+
isActive: boolean;
|
|
66
|
+
/** Whether the slot should render a fake caret. */
|
|
67
|
+
hasFakeCaret: boolean;
|
|
68
|
+
}
|
|
69
|
+
interface InputOtpRootSlotProps {
|
|
70
|
+
slots: InputOtpSlotProps[];
|
|
71
|
+
isFocused: boolean;
|
|
72
|
+
isHovering: boolean;
|
|
73
|
+
}
|
|
74
|
+
interface InputOtpRootContext {
|
|
75
|
+
autocomplete: ComputedRef<string | undefined>;
|
|
76
|
+
autofocus: ComputedRef<boolean | undefined>;
|
|
77
|
+
disabled: ComputedRef<boolean | undefined>;
|
|
78
|
+
inputAttrs: ComputedRef<Record<string, unknown>>;
|
|
79
|
+
modelValue: ComputedRef<string>;
|
|
80
|
+
slots: ComputedRef<InputOtpSlotProps[]>;
|
|
81
|
+
willPushPWMBadge: ComputedRef<boolean>;
|
|
82
|
+
isFocused: ShallowRef<boolean>;
|
|
83
|
+
isHovering: ShallowRef<boolean>;
|
|
84
|
+
inputElement: ShallowRef<HTMLInputElement | null>;
|
|
85
|
+
inputmode: ComputedRef<InputOtpInputMode | undefined>;
|
|
86
|
+
maxlength: ComputedRef<number>;
|
|
87
|
+
minlength: ComputedRef<number | undefined>;
|
|
88
|
+
mirrorSelectionStart: ShallowRef<number | null>;
|
|
89
|
+
mirrorSelectionEnd: ShallowRef<number | null>;
|
|
90
|
+
name: ComputedRef<string | undefined>;
|
|
91
|
+
pattern: ComputedRef<string | undefined>;
|
|
92
|
+
readonly: ComputedRef<boolean | undefined>;
|
|
93
|
+
required: ComputedRef<boolean | undefined>;
|
|
94
|
+
resolvedAccessibleLabel: ComputedRef<string>;
|
|
95
|
+
resolvedId: ComputedRef<string | undefined>;
|
|
96
|
+
resolvedPlaceholder: ComputedRef<string | undefined>;
|
|
97
|
+
focus: () => void;
|
|
98
|
+
blur: () => void;
|
|
99
|
+
select: () => void;
|
|
100
|
+
onBeforeInput: (event: InputEvent) => void;
|
|
101
|
+
onNativeChange: (event: Event) => void;
|
|
102
|
+
onNativeSelect: (event: Event) => void;
|
|
103
|
+
onMouseOver: (event: MouseEvent) => void;
|
|
104
|
+
onMouseLeave: (event: MouseEvent) => void;
|
|
105
|
+
onPaste: (event: ClipboardEvent) => void;
|
|
106
|
+
onInput: (event: Event) => void;
|
|
107
|
+
onFocus: (event: FocusEvent) => void;
|
|
108
|
+
onBlur: (event: FocusEvent) => void;
|
|
109
|
+
}
|
|
110
|
+
type InputOtpUiSlot = 'root' | 'positioner' | 'input' | 'group' | 'slot' | 'char' | 'placeholder' | 'caret';
|
|
111
|
+
type InputOtpUi = UiClass<InputOtpUiSlot>;
|
|
112
|
+
//#endregion
|
|
113
|
+
export { InputOtpCompactEmits, InputOtpCompactProps, InputOtpCompactSlots, InputOtpInputMode, InputOtpInputProps, InputOtpPositionerProps, InputOtpPushPasswordManagerStrategy, InputOtpRootContext, InputOtpRootEmits, InputOtpRootProps, InputOtpRootSlotProps, InputOtpSlotProps, InputOtpUi, InputOtpUiSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{computed as e,onMounted as t,onUnmounted as n,shallowRef as r,watch as i}from"vue";const a=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function o(o){let{containerElement:s,inputElement:c,pushPasswordManagerStrategy:l,isFocused:u}=o,d=r(!1),f=r(!1),p=r(!1),m=r(!1),h=e(()=>l()===`none`?!1:d.value&&f.value),g=()=>{if(l()===`none`)return;let e=s.value,t=globalThis.window;!e||!t||(f.value=t.innerWidth-e.getBoundingClientRect().right>=40)},_=()=>{let e=globalThis.document,t=s.value,n=c.value;if(!e||!t||!n||p.value||l()===`none`)return;let r=t.getBoundingClientRect().left+t.offsetWidth,i=t.getBoundingClientRect().top+t.offsetHeight/2,o=e.elementFromPoint(r-18,i);if(!(e.querySelectorAll(a).length===0&&o===t)&&(d.value=!0,p.value=!0,!m.value&&e.activeElement===n)){let e=n.selectionStart,t=n.selectionEnd;n.blur(),n.focus(),e!==null&&t!==null&&n.setSelectionRange(e,t),m.value=!0}},v=0;return t(()=>{g(),v=window.setInterval(g,1e3)}),n(()=>{window.clearInterval(v)}),i([u,c],([e,t],n,r)=>{let i=globalThis.document,a=l(),o=e||i?.activeElement===t;if(a===`none`||!o)return;let s=[0,2e3,5e3].map(e=>window.setTimeout(_,e)),c=window.setTimeout(()=>{p.value=!0},6e3);r(()=>{s.forEach(e=>window.clearTimeout(e)),window.clearTimeout(c)})}),{willPushPWMBadge:h,PASSWORD_MANAGER_BADGE_SPACE_WIDTH:`40px`}}export{o as usePasswordManagerBadge};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { UseUiConsumer } from "../../composables/use-ui-context.js";
|
|
2
3
|
import { LayoutUiSlot } from "./types.js";
|
|
3
4
|
import * as _$vue from "vue";
|
|
4
5
|
|
|
5
6
|
//#region src/components/layout/context.d.ts
|
|
6
|
-
declare const provideLayoutUi: (ui: _$vue.ComputedRef<Partial<UiClass<LayoutUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<LayoutUiSlot>>>, useLayoutUi: <
|
|
7
|
+
declare const provideLayoutUi: (ui: _$vue.ComputedRef<Partial<UiClass<LayoutUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<LayoutUiSlot>>>, useLayoutUi: UseUiConsumer<LayoutUiSlot>;
|
|
7
8
|
//#endregion
|
|
8
9
|
export { provideLayoutUi };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../
|
|
1
|
+
import e from"../portal/portal.js";import t from"../dialog/dialog-content.js";import n from"../dialog/dialog-overlay.js";import r from"../dialog/dialog-root.js";import"../dialog/index.js";import{useLayoutRootContext as i,useLayoutUi as a}from"./context.js";import{layoutCssVars as o}from"./shared.js";import{computed as s,createBlock as c,createElementVNode as l,createVNode as u,defineComponent as d,mergeProps as f,normalizeClass as p,normalizeStyle as m,openBlock as h,renderSlot as g,unref as _,useAttrs as v,withCtx as y}from"vue";const b=d({name:`LayoutMobile`,inheritAttrs:!1,__name:`layout-mobile`,setup(d){let b=v(),{mobileOpen:x,mobileSidebarWidth:S,onMobileOpenChange:C}=i(`LayoutMobile`),w=a(),T=s(()=>({[o.sidebarWidth]:`${S.value}rem`}));return(i,a)=>(h(),c(_(r),{open:_(x),"onUpdate:open":_(C)},{default:y(()=>[u(_(e),null,{default:y(()=>[u(_(n),{class:p(_(w).mobileOverlay)},null,8,[`class`]),u(_(t),{class:p(_(w).mobileDrawer),style:m(T.value)},{default:y(()=>[l(`div`,f(_(b),{class:_(w).mobile,"data-sidebar":`sidebar`,"data-mobile":``}),[g(i.$slots,`default`)],16)]),_:3},8,[`class`,`style`])]),_:3})]),_:3},8,[`open`,`onUpdate:open`]))}});export{b as default};
|
|
@@ -16,9 +16,9 @@ declare const __VLS_base: _$vue.DefineComponent<LayoutRootProps, {}, {}, {}, {},
|
|
|
16
16
|
}>, {
|
|
17
17
|
collapsible: LayoutCollapsible;
|
|
18
18
|
open: boolean;
|
|
19
|
-
variant: LayoutVariant;
|
|
20
19
|
defaultOpen: boolean;
|
|
21
20
|
side: LayoutSide;
|
|
21
|
+
variant: LayoutVariant;
|
|
22
22
|
sidebarWidth: number;
|
|
23
23
|
collapsedSidebarWidth: number;
|
|
24
24
|
isMobile: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useConfigProvider as e}from"../config-provider/context.js";import{Primitive as t}from"../primitive/primitive.js";import"../primitive/index.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,renderSlot as s,resolveComponent as c,resolveDynamicComponent as l,unref as u,useAttrs as d,withCtx as f}from"vue";const p=i({name:`Link`,inheritAttrs:!1,__name:`link`,props:{to:{},replace:{type:Boolean,default:void 0},href:{},disabled:{type:Boolean,default:void 0},activeClass:{},exactActiveClass:{},inactiveClass:{},prefetchedClass:{},external:{type:Boolean,default:void 0},ariaCurrentValue:{},viewTransition:{type:Boolean,default:void 0},target:{},rel:{default:`noopener noreferrer`},noRel:{type:Boolean,default:void 0},prefetch:{type:Boolean,default:void 0},prefetchOn:{},noPrefetch:{type:Boolean,default:void 0},trailingSlash:{},asChild:{type:Boolean},as:{default:`a`}},setup(i){let p=i,m=d(),{nuxt:h}=e(`Link`),g=n(()=>h.value?c(`NuxtLink`):c(`RouterLink`)),_=n(()=>!!(p.external||p.disabled||typeof p.to==`string`&&p.to.startsWith(`http`)||!p.to)),v=n(()=>p.target?p.target:_.value?`_blank`:`_self`),y=n(()=>{let{as:e,asChild:t,href:n,to:r,...i}=p,a=typeof p.to==`string`&&p.to||p.href,o={};return _.value||(o.to=p.to),(_.value||!h.value)&&a&&(o.href=a),Object.assign(o,{...i,target:v.value,"data-disabled":p.disabled?``:void 0,"aria-disabled":p.disabled?`true`:void 0,role:p.disabled?`link`:void 0,tabindex:p.disabled?`-1`:p.tabindex,...m}),o}),b=e=>{p.disabled&&(e.preventDefault(),e.stopPropagation())};return(e,n)=>_.value?(o(),r(u(t),a({key:0},y.value,{as:i.as,"as-child":i.asChild,"data-link":``,onClick:b}),{default:f(()=>[s(e.$slots,`default`,{isHref:!0})]),_:3},16,[`as`,`as-child`])):(o(),r(l(g.value),a({key:1},y.value,{"data-link":``,onClick:b}),{default:f(t=>[s(e.$slots,`default`,{isHref:!1,isActive:t?.isActive,isExactActive:t?.isExactActive})]),_:3},16))}});export{p as default};
|
|
@@ -13,8 +13,8 @@ type Slots = {
|
|
|
13
13
|
type __VLS_Slots = Slots;
|
|
14
14
|
declare const __VLS_base: _$vue.DefineComponent<LinkProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<LinkProps> & Readonly<{}>, {
|
|
15
15
|
disabled: boolean;
|
|
16
|
-
as: AsTag | _$vue.Component;
|
|
17
16
|
replace: boolean;
|
|
17
|
+
as: AsTag | _$vue.Component;
|
|
18
18
|
external: boolean;
|
|
19
19
|
viewTransition: boolean;
|
|
20
20
|
rel: "noopener" | "noreferrer" | "nofollow" | "sponsored" | "ugc" | (string & {}) | null;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { UseUiConsumer } from "../../composables/use-ui-context.js";
|
|
2
3
|
import { ListUiSlot } from "./types.js";
|
|
3
4
|
import * as _$vue from "vue";
|
|
4
5
|
|
|
5
6
|
//#region src/components/list/context.d.ts
|
|
6
|
-
declare const provideListUi: (ui: _$vue.ComputedRef<Partial<UiClass<ListUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<ListUiSlot>>>, useListUi: <
|
|
7
|
+
declare const provideListUi: (ui: _$vue.ComputedRef<Partial<UiClass<ListUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<ListUiSlot>>>, useListUi: UseUiConsumer<ListUiSlot>;
|
|
7
8
|
//#endregion
|
|
8
9
|
export { provideListUi };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { UseUiConsumer } from "../../composables/use-ui-context.js";
|
|
2
3
|
import { ListboxUiSlot } from "./types.js";
|
|
3
4
|
import * as _$vue from "vue";
|
|
4
5
|
//#region src/components/listbox/context.d.ts
|
|
5
|
-
declare const provideListboxUi: (ui: _$vue.ComputedRef<Partial<UiClass<ListboxUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<ListboxUiSlot>>>, useListboxUi: <
|
|
6
|
+
declare const provideListboxUi: (ui: _$vue.ComputedRef<Partial<UiClass<ListboxUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<ListboxUiSlot>>>, useListboxUi: UseUiConsumer<ListboxUiSlot>;
|
|
6
7
|
//#endregion
|
|
7
8
|
export { provideListboxUi };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{findValuesBetween as e}from"../../shared/object.js";import{getFocusIntent as t}from"../../shared/focus.js";import"../../shared/index.js";import{useContext as n}from"../../composables/use-context.js";import{useCollection as r}from"../../composables/use-collection.js";import{useForwardElement as i}from"../../composables/use-forward-element.js";import{useTypeahead as a}from"../../composables/use-typeahead.js";import{useUiContext as o}from"../../composables/use-ui-context.js";import"../../composables/index.js";import{useDirection as s}from"../config-provider/context.js";import{provideInputUi as c}from"../input/context.js";import{computed as l,nextTick as u,shallowRef as d,useId as f}from"vue";import{createEventHook as p}from"@vueuse/core";const{provideCollectionContext:m,useCollectionContext:h,useCollectionItem:g}=r(`Listbox`),[_,v]=n(`ListboxRoot`,n=>{let[r,o]=i(),{getOrderedItems:c,getOrderedElements:l}=m(),{handleTypeaheadSearch:f}=a(),{modelValue:h,orientation:g,selectionBehavior:_,isMultiple:v,
|
|
1
|
+
import{findValuesBetween as e}from"../../shared/object.js";import{getFocusIntent as t}from"../../shared/focus.js";import"../../shared/index.js";import{useContext as n}from"../../composables/use-context.js";import{useCollection as r}from"../../composables/use-collection.js";import{useForwardElement as i}from"../../composables/use-forward-element.js";import{useTypeahead as a}from"../../composables/use-typeahead.js";import{useUiContext as o}from"../../composables/use-ui-context.js";import"../../composables/index.js";import{useDirection as s}from"../config-provider/context.js";import{provideInputUi as c}from"../input/context.js";import{computed as l,nextTick as u,shallowRef as d,useId as f}from"vue";import{createEventHook as p}from"@vueuse/core";const{provideCollectionContext:m,useCollectionContext:h,useCollectionItem:g}=r(`Listbox`),[_,v]=n(`ListboxRoot`,n=>{let[r,o]=i(),{getOrderedItems:c,getOrderedElements:l}=m(),{handleTypeaheadSearch:f}=a(),{modelValue:h,orientation:g,selectionBehavior:_,isMultiple:v,onModelValueChange:y,onHighlight:b,onEntryFocus:x}=n,S=s(n.dir),C=d(),w=d(!1),T=d(!0),E=d(null),D=d(null),O=d(!1),k=d(!1),A=p(),j=p(),M=p(),N=e=>{w.value=!0,v.value&&_.value===`replace`&&(C.value=e),y(e),setTimeout(()=>{w.value=!1},1)},P=(e,t=!0)=>{e&&(E.value=e,T.value&&E.value.focus(),t&&E.value.scrollIntoView({block:`nearest`}),b(c().find(t=>t.element===e)))},F=e=>{if(O.value)M.trigger(e);else{let t=c().find(t=>t.data.value===e);t&&(E.value=t.element,P(t.element))}},I=e=>{E.value?.isConnected&&(e.preventDefault(),e.stopPropagation(),!k.value&&E.value.click())},L=e=>{if(w.value=!0,O.value)j.trigger(e);else{let t=e.altKey||e.ctrlKey||e.metaKey,n=c();if(t&&e.key===`a`&&v.value){h.value=[...n.map(e=>e.data.value)],e.preventDefault();let t=n[n.length-1]?.element;t&&P(t)}else if(!t){let t=f(e.key,n);t&&P(t)}}setTimeout(()=>{w.value=!1},1)},R=()=>{k.value=!0},z=()=>{u(()=>{k.value=!1})},B=e=>{let t=E.value;t?.isConnected&&(D.value=t),E.value=null,n.onLeave(e)},V=e=>{let t=new CustomEvent(`listbox.entryFocus`,{bubbles:!1,cancelable:!0});if(e.currentTarget?.dispatchEvent(t),x(t),!t.defaultPrevented)if(D.value)P(D.value);else{let e=l()?.[0];e&&P(e)}},H=e=>{let n=t(e,g.value,S.value);if(!n)return;let r=l();if(E.value){if(n===`last`)r.reverse();else if(n===`prev`||n===`next`){n===`prev`&&r.reverse();let e=r.indexOf(E.value);r=r.slice(e+1)}let t=r[0];t&&W(e,t)}if(r.length){let e=!E.value&&n===`prev`?r.length-1:0,t=r[e];t&&P(t)}O.value&&j.trigger(e)},U=()=>{u(()=>{H(new KeyboardEvent(`keydown`,{key:`PageUp`}))})};function W(t,n){if(O.value||_.value!==`replace`||!v.value||!Array.isArray(h.value)||(t.altKey||t.ctrlKey||t.metaKey)&&!t.shiftKey||!t.shiftKey)return;let r=c(),i=r.find(e=>e.element===n)?.data?.value;t.key===`End`?i=r[r.length-1]?.data?.value:t.key===`Home`&&(i=r[0]?.data?.value),!(!i||!C.value)&&(h.value=e(r.map(e=>e.data.value),C.value,i))}let G=async e=>{if(await u(),O.value)A.trigger(e);else{let e=l(),t=e.find(e=>e.dataset.state===`checked`);t?P(t):e[0]&&P(e[0])}},K=async e=>{let t=e.relatedTarget||e.target;await u(),!(!E.value||r.value?.contains(t))&&B(e)};return{...n,rootElement:r,setRootElement:o,isUserAction:w,isVirtual:O,virtualFocusHook:A,virtualKeydownHook:j,virtualHighlightHook:M,firstValue:C,focusable:T,onModelValueChange:N,onLeave:B,onEnter:V,highlightedElement:E,changeHighlight:P,highlightItem:F,highlightSelected:G,highlightFirstItem:U,onKeydownEnter:I,onKeydownNavigation:H,onKeydownTypeahead:L,onCompositionStart:R,onCompositionEnd:z,onFocusOut:K,getItems:c}}),[y,b]=n(`ListboxGroup`,()=>({id:`soybean-listbox-group-${f()}`})),[x,S]=n(`ListboxItem`,e=>e),[C,w]=o(`ListboxUi`,e=>(c(l(()=>({root:e.value?.filterRoot,control:e.value?.filterControl}))),e));export{y as provideListboxGroupContext,x as provideListboxItemContext,_ as provideListboxRootContext,C as provideListboxUi,h as useCollectionContext,g as useCollectionItem,b as useListboxGroupContext,S as useListboxItemContext,v as useListboxRootContext,w as useListboxUi};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import"../../shared/index.js";import{useSelection as n}from"../../composables/use-selection.js";import"../../composables/index.js";import r from"../visually-hidden/visually-hidden-input.js";import{provideListboxRootContext as i,useListboxUi as a}from"./context.js";import{computed as o,createBlock as s,createCommentVNode as c,createElementBlock as l,defineComponent as u,nextTick as d,normalizeClass as f,openBlock as p,renderSlot as m,unref as h,watch as g}from"vue";const _=[`data-disabled`,`dir`],v=u({name:`ListboxRoot`,__name:`listbox-root`,props:{orientation:{default:`vertical`},dir:{},disabled:{type:Boolean},
|
|
1
|
+
import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import"../../shared/index.js";import{useSelection as n}from"../../composables/use-selection.js";import"../../composables/index.js";import r from"../visually-hidden/visually-hidden-input.js";import{provideListboxRootContext as i,useListboxUi as a}from"./context.js";import{computed as o,createBlock as s,createCommentVNode as c,createElementBlock as l,defineComponent as u,nextTick as d,normalizeClass as f,openBlock as p,renderSlot as m,unref as h,watch as g}from"vue";const _=[`data-disabled`,`dir`],v=u({name:`ListboxRoot`,__name:`listbox-root`,props:{orientation:{default:`vertical`},dir:{},disabled:{type:Boolean},highlightOnHover:{type:Boolean},modelValue:{default:void 0},defaultValue:{},multiple:{},clearable:{type:Boolean,default:!0},selectionBehavior:{default:`toggle`},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`highlight`,`entryFocus`,`leave`],setup(u,{expose:v,emit:y}){let b=u,x=y,S=a(`root`),{modelValue:C,isMultiple:w,onModelValueChange:T}=n(b,e=>{x(`update:modelValue`,e)}),{rootElement:E,setRootElement:D,isUserAction:O,highlightedElement:k,highlightSelected:A,highlightFirstItem:j,highlightItem:M,getItems:N}=i({...t(b,[`dir`,`orientation`,`disabled`,`highlightOnHover`,`selectionBehavior`]),modelValue:C,isMultiple:w,onModelValueChange:T,onHighlight(e){x(`highlight`,e)},onEntryFocus(e){x(`entryFocus`,e)},onLeave(e){x(`leave`,e)}}),P=o(()=>e(E.value));return g(C,()=>{O.value||d(()=>{A()})},{immediate:!0,deep:!0}),v({highlightedElement:k,highlightItem:M,highlightFirstItem:j,highlightSelected:A,getItems:N}),(e,t)=>(p(),l(`div`,{ref:h(D),class:f(h(S)),"data-disabled":u.disabled?``:void 0,dir:u.dir,onPointerleave:t[0]||(t[0]=(...t)=>e.onLeave&&e.onLeave(...t)),onFocusout:t[1]||(t[1]=(...t)=>e.onFocusout&&e.onFocusout(...t))},[m(e.$slots,`default`,{modelValue:h(C)}),P.value&&u.name?(p(),s(r,{key:0,name:u.name,value:h(C),disabled:u.disabled,required:u.required},null,8,[`name`,`value`,`disabled`,`required`])):c(`v-if`,!0)],42,_))}});export{v as default};
|