vft 0.0.249 → 0.0.252
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/index.css +1 -1
- package/es/components/alert/alert.vue.d.ts +1 -11
- package/es/components/alert/alert.vue2.js +13 -65
- package/es/components/alert/index.d.ts +28 -76
- package/es/components/autocomplete/autocomplete.vue.d.ts +14 -14
- package/es/components/autocomplete/autocomplete.vue2.js +194 -199
- package/es/components/autocomplete/index.d.ts +42 -42
- package/es/components/backtop/backtop.vue.d.ts +1 -15
- package/es/components/backtop/backtop.vue2.js +17 -106
- package/es/components/backtop/index.d.ts +3 -9
- package/es/components/backtop/types.d.ts +14 -0
- package/es/components/backtop/types.js +1 -0
- package/es/components/button/button-custom.d.ts +1 -1
- package/es/components/button/button.vue.d.ts +3 -50
- package/es/components/button/button.vue2.js +1 -1
- package/es/components/button/index.d.ts +39 -40
- package/es/components/button/types.d.ts +47 -1
- package/es/components/button/use-button.d.ts +5 -5
- package/es/components/card/index.d.ts +3 -3
- package/es/components/carousel/carousel.vue.d.ts +1 -1
- package/es/components/carousel/index.d.ts +18 -18
- package/es/components/carousel/use-carousel.js +2 -3
- package/es/components/checkbox/checkbox-group.vue.d.ts +1 -1
- package/es/components/checkbox/index.d.ts +42 -42
- package/es/components/color-picker/components/hue-slider.vue.d.ts +3 -3
- package/es/components/color-picker/components/predefine.vue.d.ts +3 -3
- package/es/components/color-picker/components/sv-panel.vue.d.ts +3 -3
- package/es/components/config-provider/hooks/use-global-config.d.ts +3 -3
- package/es/components/context-menu/context-menu.vue2.js +36 -124
- package/es/components/context-menu/index.js +5 -101
- package/es/components/context-menu/types.d.ts +1 -1
- package/es/components/context-menu/types.js +1 -98
- package/es/components/date-picker/composables/use-basic-date-table.d.ts +188 -0
- package/es/components/date-picker/composables/use-basic-date-table.js +183 -0
- package/es/components/date-picker/composables/use-month-range-header.d.ts +1 -1
- package/es/components/date-picker/composables/use-panel-date-range.d.ts +29 -0
- package/es/components/date-picker/composables/use-panel-date-range.js +72 -0
- package/es/components/date-picker/composables/use-range-picker.d.ts +46 -42
- package/es/components/date-picker/composables/use-range-picker.js +65 -52
- package/es/components/date-picker/composables/use-shortcut.js +4 -4
- package/es/components/date-picker/composables/use-year-range-header.d.ts +16 -0
- package/es/components/date-picker/composables/use-year-range-header.js +35 -0
- package/es/components/date-picker/constants.d.ts +2 -15
- package/es/components/date-picker/constants.js +3 -16
- package/es/components/date-picker/date-picker-com/basic-cell-render.d.ts +3 -1
- package/es/components/date-picker/date-picker-com/basic-cell-render.js +16 -19
- package/es/components/date-picker/date-picker-com/basic-date-table.vue.d.ts +14 -23
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +73 -176
- package/es/components/date-picker/date-picker-com/basic-month-table.vue.d.ts +2 -2
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +93 -71
- package/es/components/date-picker/date-picker-com/basic-year-table.vue.d.ts +50 -9
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +108 -57
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue.d.ts +13 -3
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +329 -277
- package/es/components/date-picker/date-picker-com/panel-date-range.vue.d.ts +16 -3
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +422 -281
- package/es/components/date-picker/date-picker-com/panel-month-range.vue.d.ts +6 -3
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +137 -113
- package/es/components/date-picker/date-picker-com/panel-year-range.vue.d.ts +35 -0
- package/es/components/date-picker/date-picker-com/panel-year-range.vue.js +4 -0
- package/es/components/date-picker/date-picker-com/panel-year-range.vue2.js +210 -0
- package/es/components/date-picker/date-picker.d.ts +70 -40
- package/es/components/date-picker/date-picker.js +59 -50
- package/es/components/date-picker/date-picker.type.d.ts +2 -1
- package/es/components/date-picker/index.d.ts +126 -68
- package/es/components/date-picker/index.js +7 -7
- package/es/components/date-picker/instance.d.ts +9 -0
- package/es/components/date-picker/instance.js +1 -0
- package/es/components/date-picker/panel-utils.d.ts +48 -0
- package/es/components/date-picker/panel-utils.js +9 -6
- package/es/components/date-picker/props/basic-cell.d.ts +2 -1
- package/es/components/date-picker/props/basic-date-table.d.ts +7 -2
- package/es/components/date-picker/props/basic-date-table.js +6 -5
- package/es/components/date-picker/props/basic-month-table.d.ts +3 -2
- package/es/components/date-picker/props/basic-year-table.d.ts +23 -5
- package/es/components/date-picker/props/basic-year-table.js +5 -6
- package/es/components/date-picker/props/date-picker.d.ts +26 -12
- package/es/components/date-picker/props/date-picker.js +3 -0
- package/es/components/date-picker/props/panel-date-pick.d.ts +6 -1
- package/es/components/date-picker/props/panel-date-range.d.ts +7 -1
- package/es/components/date-picker/props/panel-month-range.d.ts +3 -1
- package/es/components/date-picker/props/panel-month-range.js +7 -3
- package/es/components/date-picker/props/panel-year-range.d.ts +14 -0
- package/es/components/date-picker/props/panel-year-range.js +17 -0
- package/es/components/date-picker/props/shared.d.ts +9 -2
- package/es/components/date-picker/props/shared.js +29 -12
- package/es/components/date-picker/style/css.d.ts +4 -0
- package/es/components/date-picker/style/css.js +5 -0
- package/es/components/date-picker/utils.d.ts +9 -2
- package/es/components/date-picker/utils.js +66 -33
- package/es/components/date-time-select/date-time-select.vue2.js +1 -1
- package/es/components/date-time-select/index.d.ts +1 -0
- package/es/components/date-time-select/types.d.ts +4 -0
- package/es/components/dialog/dialog-content.vue2.js +2 -3
- package/es/components/dropdown/dropdown-item-impl.vue.d.ts +4 -4
- package/es/components/dropdown/dropdown-item-impl.vue.js +12 -12
- package/es/components/dropdown/dropdown-item-impl.vue2.js +6 -6
- package/es/components/dropdown/dropdown.vue.d.ts +6 -29
- package/es/components/dropdown/dropdown.vue2.js +146 -149
- package/es/components/footer-layout/footer-layout.vue2.js +19 -108
- package/es/components/form/form-item.vue.d.ts +2 -3
- package/es/components/form/form-item.vue2.js +140 -135
- package/es/components/form/form-label-wrap.js +27 -27
- package/es/components/form/form.vue2.js +71 -65
- package/es/components/form/hooks/use-form-common-props.js +3 -4
- package/es/components/form/hooks/use-form-item.js +12 -13
- package/es/components/form/index.d.ts +75 -48
- package/es/components/form/types.d.ts +7 -1
- package/es/components/form/utils.d.ts +1 -1
- package/es/components/form/utils.js +33 -28
- package/es/components/header-layout/header-layout.vue2.js +26 -114
- package/es/components/icon/icon.vue2.js +20 -19
- package/es/components/icon/index.d.ts +0 -1
- package/es/components/icon/index.js +3 -4
- package/es/components/index.js +323 -319
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/link/index.d.ts +3 -3
- package/es/components/md-code-demo/md-code-demo.js +12 -13
- package/es/components/md-container/md-container.vue2.js +52 -138
- package/es/components/md-vue-playground/md-vue-playground.vue2.js +17 -17
- package/es/components/menu/index.js +1 -1
- package/es/components/menu/menu-item.vue.d.ts +1 -1
- package/es/components/menu/menu-item.vue2.js +45 -132
- package/es/components/menu/sub-menu.vue.d.ts +2 -1
- package/es/components/menu/sub-menu.vue2.js +76 -163
- package/es/components/modal/index.d.ts +33 -45
- package/es/components/modal/modal-footer-action.vue2.js +26 -112
- package/es/components/modal/modal.vue.d.ts +2 -2
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +57 -144
- package/es/components/multiple-tabs/tab-content.vue2.js +19 -113
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +37 -132
- package/es/components/popconfirm/index.d.ts +24 -24
- package/es/components/popconfirm/popconfirm.vue.d.ts +2 -2
- package/es/components/popover/index.d.ts +5 -5
- package/es/components/popover/popover.vue.d.ts +2 -2
- package/es/components/popper/composables/use-content.js +2 -3
- package/es/components/popper/trigger.vue2.js +7 -8
- package/es/components/progress/index.d.ts +3 -3
- package/es/components/result/result.vue.d.ts +1 -1
- package/es/components/result/result.vue2.js +20 -109
- package/es/components/roving-focus-group/index.js +11 -11
- package/es/components/roving-focus-group/roving-focus-group.vue.js +5 -5
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +2 -3
- package/es/components/scrollbar/index.js +9 -10
- package/es/components/select/defaults.d.ts +99 -15
- package/es/components/select/defaults.js +90 -12
- package/es/components/select/group-item.vue.d.ts +10 -5
- package/es/components/select/group-item.vue.js +9 -19
- package/es/components/select/group-item.vue2.js +4 -2
- package/es/components/select/index.d.ts +2782 -0
- package/es/components/select/index.js +2 -2
- package/es/components/select/option-item.vue.d.ts +40 -26
- package/es/components/select/option-item.vue.js +12 -12
- package/es/components/select/option-item.vue2.js +15 -12
- package/es/components/select/select-dropdown.d.ts +29 -3
- package/es/components/select/select-dropdown.js +120 -129
- package/es/components/select/select.types.d.ts +19 -11
- package/es/components/select/select.vue.d.ts +2778 -0
- package/es/components/select/select.vue.js +261 -251
- package/es/components/select/select.vue2.js +49 -45
- package/es/components/select/token.d.ts +10 -12
- package/es/components/select/token.js +4 -2
- package/es/components/select/useAllowCreate.d.ts +3 -3
- package/es/components/select/useAllowCreate.js +32 -29
- package/es/components/select/useOption.d.ts +3 -3
- package/es/components/select/useProps.d.ts +21 -0
- package/es/components/select/useProps.js +22 -0
- package/es/components/select/useSelect.d.ts +940 -121
- package/es/components/select/useSelect.js +396 -302
- package/es/components/side-menu/side-menu.vue2.js +77 -165
- package/es/components/steps/index.d.ts +12 -12
- package/es/components/super-form/component-map.js +52 -141
- package/es/components/super-form/style/css.js +4 -4
- package/es/components/super-form/super-form-action.vue2.js +39 -126
- package/es/components/super-form/super-form-item.vue2.js +161 -248
- package/es/components/super-form/super-form.vue.d.ts +1 -1
- package/es/components/super-form/super-form.vue2.js +116 -202
- package/es/components/super-form/types.d.ts +3 -1
- package/es/components/switch/index.d.ts +6 -6
- package/es/components/table/field.js +82 -176
- package/es/components/table/index.d.ts +24 -24
- package/es/components/table/table.vue.d.ts +1 -1
- package/es/components/tabs/tab-nav.vue.d.ts +2 -2
- package/es/components/tabs/tab-nav.vue2.js +98 -187
- package/es/components/tabs/tabs.vue.d.ts +2 -1
- package/es/components/time-picker/common/picker-range-trigger.vue.d.ts +84 -0
- package/es/components/time-picker/common/picker-range-trigger.vue.js +4 -0
- package/es/components/time-picker/common/picker-range-trigger.vue2.js +100 -0
- package/es/components/time-picker/common/picker.vue.d.ts +71 -41
- package/es/components/time-picker/common/picker.vue2.js +285 -289
- package/es/components/time-picker/common/props.d.ts +76 -12
- package/es/components/time-picker/common/props.js +78 -35
- package/es/components/time-picker/composables/use-time-panel.d.ts +4 -4
- package/es/components/time-picker/composables/use-time-picker.d.ts +28 -29
- package/es/components/time-picker/constants.d.ts +5 -0
- package/es/components/time-picker/constants.js +15 -10
- package/es/components/time-picker/index.d.ts +120 -74
- package/es/components/time-picker/index.js +28 -23
- package/es/components/time-picker/props/basic-time-spinner.d.ts +5 -4
- package/es/components/time-picker/props/panel-time-picker.d.ts +2 -1
- package/es/components/time-picker/props/panel-time-range.d.ts +2 -1
- package/es/components/time-picker/props/shared.d.ts +4 -5
- package/es/components/time-picker/style/css.d.ts +3 -0
- package/es/components/time-picker/style/css.js +3 -0
- package/es/components/time-picker/style/index.d.ts +3 -0
- package/es/components/time-picker/style/index.js +3 -0
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue.d.ts +6 -6
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +135 -128
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue.d.ts +4 -4
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +36 -35
- package/es/components/time-picker/time-picker-com/panel-time-range.vue.d.ts +4 -4
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +109 -108
- package/es/components/time-picker/time-picker.d.ts +60 -37
- package/es/components/time-picker/time-picker.js +28 -30
- package/es/components/time-picker/utils.d.ts +5 -2
- package/es/components/time-picker/utils.js +17 -16
- package/es/components/time-select/time-select.vue.d.ts +1 -1
- package/es/components/timeline/index.d.ts +6 -6
- package/es/components/tooltip/content.vue2.js +47 -48
- package/es/components/tooltip/index.d.ts +3 -3
- package/es/components/tooltip/tooltip.vue.d.ts +1 -1
- package/es/components/tooltip/tooltip.vue2.js +77 -78
- package/es/components/tooltip/utils.js +4 -5
- package/es/components/tree/tree-node.vue.d.ts +33 -33
- package/es/components/tree/tree-node.vue.js +11 -11
- package/es/components/tree/tree-node.vue2.js +15 -15
- package/es/components/upload/index.d.ts +15 -15
- package/es/components/upload/upload-content.vue.d.ts +1 -1
- package/es/components/upload/upload.vue.d.ts +1 -1
- package/es/components/virtual-list/builders/build-grid.d.ts +9 -9
- package/es/components/virtual-list/builders/build-grid.js +222 -214
- package/es/components/virtual-list/builders/build-list.d.ts +13 -13
- package/es/components/virtual-list/builders/build-list.js +206 -198
- package/es/components/virtual-list/components/dynamic-size-grid.d.ts +6 -6
- package/es/components/virtual-list/components/dynamic-size-grid.js +12 -12
- package/es/components/virtual-list/components/dynamic-size-list.d.ts +13 -12
- package/es/components/virtual-list/components/dynamic-size-list.js +7 -7
- package/es/components/virtual-list/components/fixed-size-grid.d.ts +6 -6
- package/es/components/virtual-list/components/fixed-size-list.d.ts +13 -12
- package/es/components/virtual-list/components/fixed-size-list.js +8 -8
- package/es/components/virtual-list/components/scrollbar.js +59 -66
- package/es/components/virtual-list/defaults.d.ts +0 -4
- package/es/components/virtual-list/defaults.js +11 -15
- package/es/components/virtual-list/hooks/use-cache.d.ts +1 -1
- package/es/components/virtual-list/hooks/use-cache.js +6 -6
- package/es/components/virtual-list/hooks/use-wheel.js +1 -1
- package/es/components/virtual-list/index.d.ts +6 -4
- package/es/components/virtual-list/index.js +4 -4
- package/es/components/virtual-list/props.d.ts +11 -7
- package/es/components/virtual-list/props.js +24 -30
- package/es/components/virtual-list/types.d.ts +1 -1
- package/es/components/virtual-list/utils.d.ts +1 -2
- package/es/components/virtual-list/utils.js +16 -18
- package/es/hooks/index.d.ts +3 -1
- package/es/hooks/index.js +49 -46
- package/es/hooks/use-calc-input-width/index.d.ts +7 -0
- package/es/hooks/use-calc-input-width/index.js +17 -0
- package/es/hooks/use-composition/index.d.ts +12 -0
- package/es/hooks/use-composition/index.js +28 -0
- package/es/hooks/use-delayed-toggle/index.d.ts +8 -4
- package/es/hooks/use-delayed-toggle/index.js +52 -17
- package/es/hooks/use-empty-values/index.d.ts +16 -0
- package/es/hooks/use-empty-values/index.js +37 -0
- package/es/hooks/use-focus-controller/index.d.ts +27 -0
- package/es/hooks/use-focus-controller/index.js +38 -0
- package/es/hooks/use-id/index.d.ts +1 -1
- package/es/hooks/use-id/index.js +11 -11
- package/es/hooks/use-namespace/index.d.ts +5 -6
- package/es/hooks/use-namespace/index.js +13 -15
- package/es/index.js +459 -451
- package/es/package.json.d.ts +2 -2
- package/es/package.json.js +1 -1
- package/es/utils/helper.d.ts +1 -0
- package/es/utils/helper.js +3 -2
- package/es/utils/index.js +49 -48
- package/lib/components/alert/alert.vue.d.ts +1 -11
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/alert/index.d.ts +28 -76
- package/lib/components/autocomplete/autocomplete.vue.d.ts +14 -14
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/autocomplete/index.d.ts +42 -42
- package/lib/components/backtop/backtop.vue.d.ts +1 -15
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/backtop/index.d.ts +3 -9
- package/lib/components/backtop/types.cjs +1 -0
- package/lib/components/backtop/types.d.ts +14 -0
- package/lib/components/button/button-custom.d.ts +1 -1
- package/lib/components/button/button.vue.d.ts +3 -50
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/button/index.d.ts +39 -40
- package/lib/components/button/types.d.ts +47 -1
- package/lib/components/button/use-button.d.ts +5 -5
- package/lib/components/card/index.d.ts +3 -3
- package/lib/components/carousel/carousel.vue.d.ts +1 -1
- package/lib/components/carousel/index.d.ts +18 -18
- package/lib/components/carousel/use-carousel.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue.d.ts +1 -1
- package/lib/components/checkbox/index.d.ts +42 -42
- package/lib/components/color-picker/components/hue-slider.vue.d.ts +3 -3
- package/lib/components/color-picker/components/predefine.vue.d.ts +3 -3
- package/lib/components/color-picker/components/sv-panel.vue.d.ts +3 -3
- package/lib/components/config-provider/hooks/use-global-config.d.ts +3 -3
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/context-menu/index.cjs +1 -1
- package/lib/components/context-menu/types.cjs +1 -1
- package/lib/components/context-menu/types.d.ts +1 -1
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -0
- package/lib/components/date-picker/composables/use-basic-date-table.d.ts +188 -0
- package/lib/components/date-picker/composables/use-month-range-header.d.ts +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -0
- package/lib/components/date-picker/composables/use-panel-date-range.d.ts +29 -0
- package/lib/components/date-picker/composables/use-range-picker.cjs +1 -1
- package/lib/components/date-picker/composables/use-range-picker.d.ts +46 -42
- package/lib/components/date-picker/composables/use-shortcut.cjs +1 -1
- package/lib/components/date-picker/composables/use-year-range-header.cjs +1 -0
- package/lib/components/date-picker/composables/use-year-range-header.d.ts +16 -0
- package/lib/components/date-picker/constants.cjs +1 -1
- package/lib/components/date-picker/constants.d.ts +2 -15
- package/lib/components/date-picker/date-picker-com/basic-cell-render.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-cell-render.d.ts +3 -1
- package/lib/components/date-picker/date-picker-com/basic-date-table.vue.d.ts +14 -23
- package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue.d.ts +2 -2
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue.d.ts +50 -9
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue.d.ts +13 -3
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue.d.ts +16 -3
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-month-range.vue.d.ts +6 -3
- package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-year-range.vue.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/panel-year-range.vue.d.ts +35 -0
- package/lib/components/date-picker/date-picker-com/panel-year-range.vue2.cjs +1 -0
- package/lib/components/date-picker/date-picker.cjs +1 -1
- package/lib/components/date-picker/date-picker.d.ts +70 -40
- package/lib/components/date-picker/date-picker.type.d.ts +2 -1
- package/lib/components/date-picker/index.cjs +1 -1
- package/lib/components/date-picker/index.d.ts +126 -68
- package/lib/components/date-picker/instance.cjs +1 -0
- package/lib/components/date-picker/instance.d.ts +9 -0
- package/lib/components/date-picker/panel-utils.cjs +1 -1
- package/lib/components/date-picker/panel-utils.d.ts +48 -0
- package/lib/components/date-picker/props/basic-cell.d.ts +2 -1
- package/lib/components/date-picker/props/basic-date-table.cjs +1 -1
- package/lib/components/date-picker/props/basic-date-table.d.ts +7 -2
- package/lib/components/date-picker/props/basic-month-table.d.ts +3 -2
- package/lib/components/date-picker/props/basic-year-table.cjs +1 -1
- package/lib/components/date-picker/props/basic-year-table.d.ts +23 -5
- package/lib/components/date-picker/props/date-picker.d.ts +26 -12
- package/lib/components/date-picker/props/panel-date-pick.d.ts +6 -1
- package/lib/components/date-picker/props/panel-date-range.d.ts +7 -1
- package/lib/components/date-picker/props/panel-month-range.cjs +1 -1
- package/lib/components/date-picker/props/panel-month-range.d.ts +3 -1
- package/lib/components/date-picker/props/panel-year-range.cjs +1 -0
- package/lib/components/date-picker/props/panel-year-range.d.ts +14 -0
- package/lib/components/date-picker/props/shared.cjs +1 -1
- package/lib/components/date-picker/props/shared.d.ts +9 -2
- package/lib/components/date-picker/style/css.cjs +1 -1
- package/lib/components/date-picker/style/css.d.ts +4 -0
- package/lib/components/date-picker/utils.cjs +1 -1
- package/lib/components/date-picker/utils.d.ts +9 -2
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/date-time-select/index.d.ts +1 -0
- package/lib/components/date-time-select/types.d.ts +4 -0
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +4 -4
- package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +6 -29
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue.d.ts +2 -3
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/form/form-label-wrap.cjs +1 -1
- package/lib/components/form/form.vue2.cjs +1 -1
- package/lib/components/form/hooks/use-form-common-props.cjs +1 -1
- package/lib/components/form/hooks/use-form-item.cjs +1 -1
- package/lib/components/form/index.d.ts +75 -48
- package/lib/components/form/types.d.ts +7 -1
- package/lib/components/form/utils.cjs +1 -1
- package/lib/components/form/utils.d.ts +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon/index.cjs +1 -1
- package/lib/components/icon/index.d.ts +0 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/link/index.d.ts +3 -3
- package/lib/components/md-code-demo/md-code-demo.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue.d.ts +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue.d.ts +2 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/modal/index.d.ts +33 -45
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue.d.ts +2 -2
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +24 -24
- package/lib/components/popconfirm/popconfirm.vue.d.ts +2 -2
- package/lib/components/popover/index.d.ts +5 -5
- package/lib/components/popover/popover.vue.d.ts +2 -2
- package/lib/components/popper/composables/use-content.cjs +1 -1
- package/lib/components/popper/trigger.vue2.cjs +1 -1
- package/lib/components/progress/index.d.ts +3 -3
- package/lib/components/result/result.vue.d.ts +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
- package/lib/components/scrollbar/index.cjs +1 -1
- package/lib/components/select/defaults.cjs +1 -1
- package/lib/components/select/defaults.d.ts +99 -15
- package/lib/components/select/group-item.vue.cjs +1 -1
- package/lib/components/select/group-item.vue.d.ts +10 -5
- package/lib/components/select/group-item.vue2.cjs +1 -1
- package/lib/components/select/index.cjs +1 -1
- package/lib/components/select/index.d.ts +2782 -0
- package/lib/components/select/option-item.vue.cjs +1 -1
- package/lib/components/select/option-item.vue.d.ts +40 -26
- package/lib/components/select/option-item.vue2.cjs +1 -1
- package/lib/components/select/select-dropdown.cjs +1 -1
- package/lib/components/select/select-dropdown.d.ts +29 -3
- package/lib/components/select/select.types.d.ts +19 -11
- package/lib/components/select/select.vue.cjs +1 -1
- package/lib/components/select/select.vue.d.ts +2778 -0
- package/lib/components/select/select.vue2.cjs +1 -1
- package/lib/components/select/token.cjs +1 -1
- package/lib/components/select/token.d.ts +10 -12
- package/lib/components/select/useAllowCreate.cjs +1 -1
- package/lib/components/select/useAllowCreate.d.ts +3 -3
- package/lib/components/select/useOption.d.ts +3 -3
- package/lib/components/select/useProps.cjs +1 -0
- package/lib/components/select/useProps.d.ts +21 -0
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/select/useSelect.d.ts +940 -121
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/steps/index.d.ts +12 -12
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/style/css.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue.d.ts +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +3 -1
- package/lib/components/switch/index.d.ts +6 -6
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/index.d.ts +24 -24
- package/lib/components/table/table.vue.d.ts +1 -1
- package/lib/components/tabs/tab-nav.vue.d.ts +2 -2
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tabs/tabs.vue.d.ts +2 -1
- package/lib/components/time-picker/common/picker-range-trigger.vue.cjs +1 -0
- package/lib/components/time-picker/common/picker-range-trigger.vue.d.ts +84 -0
- package/lib/components/time-picker/common/picker-range-trigger.vue2.cjs +1 -0
- package/lib/components/time-picker/common/picker.vue.d.ts +71 -41
- package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
- package/lib/components/time-picker/common/props.cjs +1 -1
- package/lib/components/time-picker/common/props.d.ts +76 -12
- package/lib/components/time-picker/composables/use-time-panel.d.ts +4 -4
- package/lib/components/time-picker/composables/use-time-picker.d.ts +28 -29
- package/lib/components/time-picker/constants.cjs +1 -1
- package/lib/components/time-picker/constants.d.ts +5 -0
- package/lib/components/time-picker/index.cjs +1 -1
- package/lib/components/time-picker/index.d.ts +120 -74
- package/lib/components/time-picker/props/basic-time-spinner.d.ts +5 -4
- package/lib/components/time-picker/props/panel-time-picker.d.ts +2 -1
- package/lib/components/time-picker/props/panel-time-range.d.ts +2 -1
- package/lib/components/time-picker/props/shared.d.ts +4 -5
- package/lib/components/time-picker/style/css.cjs +1 -1
- package/lib/components/time-picker/style/css.d.ts +3 -0
- package/lib/components/time-picker/style/index.cjs +1 -1
- package/lib/components/time-picker/style/index.d.ts +3 -0
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue.d.ts +6 -6
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue.d.ts +4 -4
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue.d.ts +4 -4
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker.cjs +1 -1
- package/lib/components/time-picker/time-picker.d.ts +60 -37
- package/lib/components/time-picker/utils.cjs +1 -1
- package/lib/components/time-picker/utils.d.ts +5 -2
- package/lib/components/time-select/time-select.vue.d.ts +1 -1
- package/lib/components/timeline/index.d.ts +6 -6
- package/lib/components/tooltip/content.vue2.cjs +1 -1
- package/lib/components/tooltip/index.d.ts +3 -3
- package/lib/components/tooltip/tooltip.vue.d.ts +1 -1
- package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
- package/lib/components/tooltip/utils.cjs +1 -1
- package/lib/components/tree/tree-node.vue.cjs +1 -1
- package/lib/components/tree/tree-node.vue.d.ts +33 -33
- package/lib/components/tree/tree-node.vue2.cjs +1 -1
- package/lib/components/upload/index.d.ts +15 -15
- package/lib/components/upload/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/upload.vue.d.ts +1 -1
- package/lib/components/virtual-list/builders/build-grid.cjs +1 -1
- package/lib/components/virtual-list/builders/build-grid.d.ts +9 -9
- package/lib/components/virtual-list/builders/build-list.cjs +1 -1
- package/lib/components/virtual-list/builders/build-list.d.ts +13 -13
- package/lib/components/virtual-list/components/dynamic-size-grid.cjs +1 -1
- package/lib/components/virtual-list/components/dynamic-size-grid.d.ts +6 -6
- package/lib/components/virtual-list/components/dynamic-size-list.cjs +1 -1
- package/lib/components/virtual-list/components/dynamic-size-list.d.ts +13 -12
- package/lib/components/virtual-list/components/fixed-size-grid.d.ts +6 -6
- package/lib/components/virtual-list/components/fixed-size-list.cjs +1 -1
- package/lib/components/virtual-list/components/fixed-size-list.d.ts +13 -12
- package/lib/components/virtual-list/components/scrollbar.cjs +1 -1
- package/lib/components/virtual-list/defaults.cjs +1 -1
- package/lib/components/virtual-list/defaults.d.ts +0 -4
- package/lib/components/virtual-list/hooks/use-cache.cjs +1 -1
- package/lib/components/virtual-list/hooks/use-cache.d.ts +1 -1
- package/lib/components/virtual-list/hooks/use-wheel.cjs +1 -1
- package/lib/components/virtual-list/index.cjs +1 -1
- package/lib/components/virtual-list/index.d.ts +6 -4
- package/lib/components/virtual-list/props.cjs +1 -1
- package/lib/components/virtual-list/props.d.ts +11 -7
- package/lib/components/virtual-list/types.d.ts +1 -1
- package/lib/components/virtual-list/utils.cjs +1 -1
- package/lib/components/virtual-list/utils.d.ts +1 -2
- package/lib/hooks/index.cjs +1 -1
- package/lib/hooks/index.d.ts +3 -1
- package/lib/hooks/use-calc-input-width/index.cjs +1 -0
- package/lib/hooks/use-calc-input-width/index.d.ts +7 -0
- package/lib/hooks/use-composition/index.cjs +1 -0
- package/lib/hooks/use-composition/index.d.ts +12 -0
- package/lib/hooks/use-delayed-toggle/index.cjs +1 -1
- package/lib/hooks/use-delayed-toggle/index.d.ts +8 -4
- package/lib/hooks/use-empty-values/index.cjs +1 -0
- package/lib/hooks/use-empty-values/index.d.ts +16 -0
- package/lib/hooks/use-focus-controller/index.cjs +1 -0
- package/lib/hooks/use-focus-controller/index.d.ts +27 -0
- package/lib/hooks/use-id/index.cjs +2 -2
- package/lib/hooks/use-id/index.d.ts +1 -1
- package/lib/hooks/use-namespace/index.cjs +1 -1
- package/lib/hooks/use-namespace/index.d.ts +5 -6
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +2 -2
- package/lib/utils/helper.cjs +1 -1
- package/lib/utils/helper.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/var.scss +41 -0
- package/theme-style/src/date-picker/date-picker.scss +31 -31
- package/theme-style/src/date-picker/date-range-picker.scss +60 -37
- package/theme-style/src/date-picker/date-table.scss +20 -20
- package/theme-style/src/date-picker/month-table.scss +40 -25
- package/theme-style/src/date-picker/picker-panel.scss +27 -28
- package/theme-style/src/date-picker/picker.scss +60 -56
- package/theme-style/src/date-picker/time-picker.scss +21 -21
- package/theme-style/src/date-picker/time-range-picker.scss +6 -6
- package/theme-style/src/date-picker/time-spinner.scss +24 -22
- package/theme-style/src/date-picker/year-table.scss +61 -14
- package/theme-style/src/option-group.scss +7 -28
- package/theme-style/src/option.scss +46 -12
- package/theme-style/src/select-dropdown-v2.scss +31 -37
- package/theme-style/src/select.scss +136 -220
- package/theme-style/src/tabs.scss +6 -66
- package/theme-style/src/tabss.scss +4 -4
- package/theme-style/vft-date-picker.css +1 -1
- package/theme-style/vft-option-group.css +1 -1
- package/theme-style/vft-option.css +1 -1
- package/theme-style/vft-select-dropdown-v2.css +1 -1
- package/theme-style/vft-select.css +1 -1
- package/theme-style/vft-tabs.css +1 -1
- package/theme-style/vft-tabss.css +1 -1
- package/theme-style/vft-time-picker.css +1 -1
- package/theme-style/vft-time-select.css +1 -1
- package/web-types.json +1 -1
- package/es/components/select/useInput.d.ts +0 -5
- package/es/components/select/useInput.js +0 -20
- package/es/components/select/util.d.ts +0 -2
- package/es/components/select/util.js +0 -18
- package/lib/components/select/useInput.cjs +0 -1
- package/lib/components/select/useInput.d.ts +0 -5
- package/lib/components/select/util.cjs +0 -1
- package/lib/components/select/util.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),q=require("@vueuse/core"),N=require("@vft/utils"),_=require("../../utils/error.cjs");require("../../utils/ns-cover.cjs");require("lodash-es");const V=require("../icon/index.cjs"),F=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const y=require("@vft/constants"),ee=require("./types.cjs"),te=require("./tab-bar.vue2.cjs"),ae=e.defineComponent({name:"vft-tab-nav"}),ne=e.defineComponent({...ae,props:{panes:{},editable:{type:Boolean},addable:{type:Boolean},stretch:{type:Boolean},showBar:{type:Boolean,default:!1},closeIconCfg:{},addIconCfg:{},arrowLeftIconCfg:{},arrowRightIconCfg:{},fixTabCount:{default:0},fixExtraScrollWidth:{default:0},trigger:{default:"click"},currentName:{default:""}},emits:["tabClick","tabRemove","tabAdd","tabContextmenu"],setup(n,{expose:A,emit:M}){const C=M,D=F.useNamespace("tab-nav"),L=e.getCurrentInstance(),g=e.inject(ee.TabsRootContextKey);g||_.throwError(D.b(),"<vft-tabs><tab-nav /></vft-tabs>");const o=F.useNamespace("tabs"),W=q.useDocumentVisibility(),K=q.useWindowFocus(),I=e.ref(),d=e.ref(),h=e.ref(),B=e.ref(),R=e.ref({}),E=e.ref(),u=e.ref(!1),f=e.ref(0),S=e.ref(!1),w=e.ref(!0),k=e.shallowRef(),x=e.computed(()=>["top","bottom"].includes(g.props.tabPosition)?"width":"height"),j=e.computed(()=>({transform:`translate${x.value==="width"?"X":"Y"}(-${f.value}px)`})),H=()=>{if(!d.value)return;const t=d.value[`offset${N.capitalize(x.value)}`],a=f.value;a&&(f.value=a>t?a-t:0)},U=()=>{if(!d.value||!h.value)return;const t=h.value[`offset${N.capitalize(x.value)}`],a=d.value[`offset${N.capitalize(x.value)}`],l=f.value;t-l<=a||(f.value=t-l>a*2?l+a:t-a)},O=async()=>{const t=h.value,a=B.value;if(!u.value||!I.value||!d.value||!t)return;await e.nextTick();const l=R.value[n.currentName];if(!l)return;const T=d.value,v=["top","bottom"].includes(g.props.tabPosition),c=l.getBoundingClientRect(),s=T.getBoundingClientRect(),m=v?t.offsetWidth-s.width:t.offsetHeight-s.height,r=f.value;let b=r;const i=n.fixTabCount?(a?.offsetWidth||0)+n.fixExtraScrollWidth:0;v?(c.left-i<s.left&&(b=r-(s.left-c.left+i)),c.right>s.right&&(b=r+c.right-s.right)):(c.top<s.top&&(b=r-(s.top-c.top)),c.bottom>s.bottom&&(b=r+(c.bottom-s.bottom))),b=Math.max(b,0),f.value=Math.min(b,m)},z=()=>{if(!h.value||!d.value)return;const t=h.value[`offset${N.capitalize(x.value)}`],a=d.value[`offset${N.capitalize(x.value)}`],l=f.value;a<t?(u.value=u.value||{},u.value.prev=l,u.value.next=l+a<t,t-l<a&&(f.value=t-a)):(u.value=!1,l>0&&(f.value=0))},X=t=>{const a=t.code,{up:l,down:T,left:v,right:c}=y.EVENT_CODE;if(![l,T,v,c].includes(a))return;const s=Array.from(t.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),m=s.indexOf(t.target);let r;a===v||a===l?m===0?r=s.length-1:r=m-1:m<s.length-1?r=m+1:r=0,s[r].focus(),s[r].click(),$()},$=()=>{w.value&&(S.value=!0)},p=()=>S.value=!1,Y=(t,a)=>{R.value[a]=t},G=async()=>{await e.nextTick(),R.value[n.currentName]?.focus({preventScroll:!0})};e.watch(W,t=>{t==="hidden"?w.value=!1:t==="visible"&&setTimeout(()=>w.value=!0,50)}),e.watch(K,t=>{t?setTimeout(()=>w.value=!0,50):w.value=!1}),q.useResizeObserver(I,z),e.onMounted(()=>setTimeout(()=>O(),0)),e.onUpdated(()=>z()),A({scrollToActiveTab:O,removeFocus:p,focusActiveTab:G,tabListRef:h,tabBarRef:E,scheduleRender:()=>e.triggerRef(k)}),e.watch(()=>n.panes,()=>L.update(),{flush:"post"});const J=e.computed(()=>u.value?[e.createVNode("span",{class:[o.e("nav-prev"),o.is("disabled",!u.value.prev)],onClick:H},[n.arrowLeftIconCfg?.icon?e.createVNode(V.VftIcon,n.arrowLeftIconCfg,null):null]),e.createVNode("span",{class:[o.e("nav-next"),o.is("disabled",!u.value.next)],onClick:U},[n.arrowRightIconCfg?.icon?e.createVNode(V.VftIcon,n.arrowRightIconCfg,null):null])]:null),Q=e.computed(()=>t=>n.panes.slice(0,t)?.map((a,l)=>{const T=a.uid,v=a.props.disabled,c=a.props.name??a.index??`${l}`,s=!v&&(a.isClosable||n.editable);a.index=`${l}`;const m=s?e.createVNode("span",{class:"is-icon-close",onClick:i=>C("tabRemove",a,i)},[n.closeIconCfg?.icon?e.createVNode(V.VftIcon,n.closeIconCfg,null):null]):null,r=a.slots.label?.()||a.props.label,b=!v&&a.active?0:-1;return e.createVNode("div",e.mergeProps({ref:i=>Y(i,c),class:[o.e("item"),o.is(g.props.tabPosition),o.is("active",a.active),o.is("disabled",v),o.is("closable",s),o.is("focus",S.value)],id:`tab-${c}`,key:`tab-${T}`,"aria-controls":`pane-${c}`,role:"tab","aria-selected":a.active,tabindex:b,onFocus:()=>$(),onBlur:()=>p()},{[n.trigger==="click"?"onClick":"onMouseenter"]:i=>{p(),C("tabClick",a,c,i)}},{onContextmenu:i=>{i.preventDefault(),C("tabContextmenu",{pane:a,index:l,event:i})},onKeydown:i=>{s&&(i.code===y.EVENT_CODE.delete||i.code===y.EVENT_CODE.backspace)&&C("tabRemove",a,i)}}),[r,m])})),Z=n.editable||n.addable?e.createVNode("span",{class:o.e("new-tab"),tabindex:"0",onClick:()=>C("tabAdd"),onKeydown:t=>{t.code===y.EVENT_CODE.enter&&C("tabAdd")}},[n.addIconCfg?.icon?e.createVNode(V.VftIcon,n.addIconCfg,null):null]):null;e.useSlots();const P=(t=!1)=>(k.value,n.panes.length>0?e.createVNode("div",{class:[o.e("nav"),o.is(g.props.tabPosition),o.is("fixed-nav",t),o.is("stretch",n.stretch&&["top","bottom"].includes(g.props.tabPosition))],ref:t?B:h,style:t?{}:j.value,role:"tablist",onKeydown:X},[n.showBar?e.createVNode(te.default,{ref:E,tabs:[...n.panes],tabRefs:R.value},null):null,Q.value(t?n.fixTabCount:void 0)]):null);return()=>(k.value,e.createVNode("div",{ref:I,class:[o.e("nav-wrap"),o.is("scrollable",!!u.value),o.is(g.props.tabPosition)]},[J.value,e.createVNode("div",{class:[o.e("nav-scroll"),o.is("have-fixed-tab",!!n.fixTabCount)],ref:d},[P(),n.fixTabCount?P(!0):null,Z])]))}});exports.default=ne;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type IconProps
|
|
1
|
+
import { type IconProps } from 'vft/es/components/icon';
|
|
2
|
+
import { type TabPaneName } from 'vft/es/components/tabs';
|
|
2
3
|
import { type VNode } from 'vue';
|
|
3
4
|
export interface TabsProps {
|
|
4
5
|
/** 标签是否可关闭 */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./picker-range-trigger.vue2.cjs");exports.default=e.default;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
prefix?(_: {}): any;
|
|
3
|
+
"range-separator"?(_: {}): any;
|
|
4
|
+
suffix?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
|
+
readonly id: {
|
|
8
|
+
readonly type: import("vue").PropType<string[]>;
|
|
9
|
+
readonly required: false;
|
|
10
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
11
|
+
__epPropKey: true;
|
|
12
|
+
};
|
|
13
|
+
readonly name: {
|
|
14
|
+
readonly type: import("vue").PropType<string[]>;
|
|
15
|
+
readonly required: false;
|
|
16
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
17
|
+
__epPropKey: true;
|
|
18
|
+
};
|
|
19
|
+
readonly modelValue: {
|
|
20
|
+
readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string | null, string | null]) | (() => import("./props").UserInput) | (((new (...args: any[]) => string | [string | null, string | null]) | (() => import("./props").UserInput)) | null)[], unknown, unknown>>;
|
|
21
|
+
readonly required: false;
|
|
22
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
23
|
+
__epPropKey: true;
|
|
24
|
+
};
|
|
25
|
+
readonly startPlaceholder: StringConstructor;
|
|
26
|
+
readonly endPlaceholder: StringConstructor;
|
|
27
|
+
readonly disabled: BooleanConstructor;
|
|
28
|
+
}>, {
|
|
29
|
+
focus: () => void;
|
|
30
|
+
blur: () => void;
|
|
31
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
blur: (...args: any[]) => void;
|
|
33
|
+
click: (...args: any[]) => void;
|
|
34
|
+
focus: (...args: any[]) => void;
|
|
35
|
+
mouseenter: (...args: any[]) => void;
|
|
36
|
+
mouseleave: (...args: any[]) => void;
|
|
37
|
+
touchstart: (...args: any[]) => void;
|
|
38
|
+
startInput: (...args: any[]) => void;
|
|
39
|
+
endInput: (...args: any[]) => void;
|
|
40
|
+
startChange: (...args: any[]) => void;
|
|
41
|
+
endChange: (...args: any[]) => void;
|
|
42
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
readonly id: {
|
|
44
|
+
readonly type: import("vue").PropType<string[]>;
|
|
45
|
+
readonly required: false;
|
|
46
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
47
|
+
__epPropKey: true;
|
|
48
|
+
};
|
|
49
|
+
readonly name: {
|
|
50
|
+
readonly type: import("vue").PropType<string[]>;
|
|
51
|
+
readonly required: false;
|
|
52
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
53
|
+
__epPropKey: true;
|
|
54
|
+
};
|
|
55
|
+
readonly modelValue: {
|
|
56
|
+
readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string | null, string | null]) | (() => import("./props").UserInput) | (((new (...args: any[]) => string | [string | null, string | null]) | (() => import("./props").UserInput)) | null)[], unknown, unknown>>;
|
|
57
|
+
readonly required: false;
|
|
58
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
59
|
+
__epPropKey: true;
|
|
60
|
+
};
|
|
61
|
+
readonly startPlaceholder: StringConstructor;
|
|
62
|
+
readonly endPlaceholder: StringConstructor;
|
|
63
|
+
readonly disabled: BooleanConstructor;
|
|
64
|
+
}>> & Readonly<{
|
|
65
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
67
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
onMouseenter?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
onMouseleave?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
onTouchstart?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
onStartInput?: ((...args: any[]) => any) | undefined;
|
|
72
|
+
onEndInput?: ((...args: any[]) => any) | undefined;
|
|
73
|
+
onStartChange?: ((...args: any[]) => any) | undefined;
|
|
74
|
+
onEndChange?: ((...args: any[]) => any) | undefined;
|
|
75
|
+
}>, {
|
|
76
|
+
readonly disabled: boolean;
|
|
77
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
78
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
79
|
+
export default _default;
|
|
80
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
81
|
+
new (): {
|
|
82
|
+
$slots: S;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),P=require("../../../hooks/use-attrs/index.cjs");require("@vft/utils");require("@vueuse/core");require("../../../utils/ns-cover.cjs");require("lodash-es");const l=require("../../../hooks/use-namespace/index.cjs");require("../../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../../hooks/use-z-index/index.cjs");const R=require("../../../hooks/use-focus-controller/index.cjs"),S=require("./props.cjs"),y=["id","name","placeholder","value","disabled"],$=["id","name","placeholder","value","disabled"],E=n.defineComponent({name:"PickerRangeTrigger",inheritAttrs:!1}),M=n.defineComponent({...E,props:S.timePickerRangeTriggerProps,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(u,{expose:d,emit:i}){const c=u,r=i,a=P.useAttrs(),p=l.useNamespace("date"),t=l.useNamespace("range"),s=n.ref(),o=n.ref(),{wrapperRef:m,isFocused:f}=R.useFocusController(s,{disabled:n.computed(()=>c.disabled)}),h=e=>{r("click",e)},g=e=>{r("mouseenter",e)},b=e=>{r("mouseleave",e)},v=e=>{r("mouseenter",e)},C=e=>{r("startInput",e)},q=e=>{r("endInput",e)},k=e=>{r("startChange",e)},I=e=>{r("endChange",e)};return d({focus:()=>{s.value?.focus()},blur:()=>{s.value?.blur(),o.value?.blur()}}),(e,N)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"wrapperRef",ref:m,class:n.normalizeClass([n.unref(p).is("active",n.unref(f)),e.$attrs.class]),style:n.normalizeStyle(e.$attrs.style),onClick:h,onMouseenter:g,onMouseleave:b,onTouchstartPassive:v},[n.renderSlot(e.$slots,"prefix"),n.createElementVNode("input",n.mergeProps(n.unref(a),{id:e.id&&e.id[0],ref_key:"inputRef",ref:s,name:e.name&&e.name[0],placeholder:e.startPlaceholder,value:e.modelValue&&e.modelValue[0],class:n.unref(t).b("input"),disabled:e.disabled,onInput:C,onChange:k}),null,16,y),n.renderSlot(e.$slots,"range-separator"),n.createElementVNode("input",n.mergeProps(n.unref(a),{id:e.id&&e.id[1],ref_key:"endInputRef",ref:o,name:e.name&&e.name[1],placeholder:e.endPlaceholder,value:e.modelValue&&e.modelValue[1],class:n.unref(t).b("input"),disabled:e.disabled,onInput:q,onChange:I}),null,16,$),n.renderSlot(e.$slots,"suffix")],38))}});exports.default=M;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Options } from '@popperjs/core';
|
|
2
1
|
import type { Dayjs } from 'dayjs';
|
|
2
|
+
import type { Options } from '@popperjs/core';
|
|
3
3
|
import type { DateModelType, DayOrDays, PickerOptions, SingleOrRange } from './props';
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
"range-separator"?(_: {}): any;
|
|
@@ -8,15 +8,18 @@ declare function __VLS_template(): {
|
|
|
8
8
|
actualVisible: boolean;
|
|
9
9
|
parsedValue: DayOrDays;
|
|
10
10
|
format: string | undefined;
|
|
11
|
+
dateFormat: string | undefined;
|
|
12
|
+
timeFormat: string | undefined;
|
|
11
13
|
unlinkPanels: boolean;
|
|
12
14
|
type: string;
|
|
13
15
|
defaultValue: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => SingleOrRange<Date>) | (((new (...args: any[]) => Date | [Date, Date]) | (() => SingleOrRange<Date>)) | null)[], unknown, unknown> | undefined;
|
|
16
|
+
showNow: import("vft/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
17
|
+
showWeekNumber: boolean;
|
|
14
18
|
pick: (date?: any, visible?: boolean) => void;
|
|
15
19
|
"select-range": (start: number, end: number, pos?: "min" | "max") => void;
|
|
16
20
|
"set-picker-option": <T extends keyof PickerOptions>(e: [T, PickerOptions[T]]) => void;
|
|
17
|
-
"calendar-change": (e: [Date,
|
|
21
|
+
"calendar-change": (e: [Date, null | Date]) => void;
|
|
18
22
|
"panel-change": (value: [Dayjs, Dayjs], mode: "month" | "year", view: unknown) => void;
|
|
19
|
-
keydown: (event: KeyboardEvent) => void;
|
|
20
23
|
}): any;
|
|
21
24
|
};
|
|
22
25
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -33,25 +36,31 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
33
36
|
__epPropKey: true;
|
|
34
37
|
};
|
|
35
38
|
readonly shortcuts: import("vft/es/utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
36
|
-
readonly arrowControl:
|
|
37
|
-
readonly label: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
39
|
+
readonly arrowControl: BooleanConstructor;
|
|
38
40
|
readonly tabindex: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown, 0, boolean>;
|
|
39
41
|
readonly validateEvent: import("vft/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
40
42
|
readonly unlinkPanels: BooleanConstructor;
|
|
43
|
+
readonly placement: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement) | (((new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement)) | null)[], import("@popperjs/core").Placement, unknown, "bottom", boolean>;
|
|
44
|
+
readonly fallbackPlacements: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => import("@popperjs/core").Placement[]) | (() => import("@popperjs/core").Placement[]) | (((new (...args: any[]) => import("@popperjs/core").Placement[]) | (() => import("@popperjs/core").Placement[])) | null)[], unknown, unknown, readonly ["bottom", "top", "right", "left"], boolean>;
|
|
45
|
+
readonly emptyValues: ArrayConstructor;
|
|
46
|
+
readonly valueOnClear: import("vft/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown, undefined, boolean>;
|
|
47
|
+
readonly ariaLabel: StringConstructor;
|
|
48
|
+
readonly showNow: import("vft/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
49
|
+
readonly showWeekNumber: BooleanConstructor;
|
|
41
50
|
readonly disabledHours: {
|
|
42
|
-
readonly type: import("vue").PropType<import("
|
|
51
|
+
readonly type: import("vue").PropType<import("./props").GetDisabledHours>;
|
|
43
52
|
readonly required: false;
|
|
44
53
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
45
54
|
__epPropKey: true;
|
|
46
55
|
};
|
|
47
56
|
readonly disabledMinutes: {
|
|
48
|
-
readonly type: import("vue").PropType<import("
|
|
57
|
+
readonly type: import("vue").PropType<import("./props").GetDisabledMinutes>;
|
|
49
58
|
readonly required: false;
|
|
50
59
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
51
60
|
__epPropKey: true;
|
|
52
61
|
};
|
|
53
62
|
readonly disabledSeconds: {
|
|
54
|
-
readonly type: import("vue").PropType<import("
|
|
63
|
+
readonly type: import("vue").PropType<import("./props").GetDisabledSeconds>;
|
|
55
64
|
readonly required: false;
|
|
56
65
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
57
66
|
__epPropKey: true;
|
|
@@ -62,10 +71,17 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
62
71
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
63
72
|
__epPropKey: true;
|
|
64
73
|
};
|
|
65
|
-
readonly name:
|
|
74
|
+
readonly name: {
|
|
75
|
+
readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>) | (((new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>)) | null)[], unknown, unknown>>;
|
|
76
|
+
readonly required: false;
|
|
77
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
78
|
+
__epPropKey: true;
|
|
79
|
+
};
|
|
66
80
|
readonly popperClass: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
67
81
|
readonly format: StringConstructor;
|
|
68
82
|
readonly valueFormat: StringConstructor;
|
|
83
|
+
readonly dateFormat: StringConstructor;
|
|
84
|
+
readonly timeFormat: StringConstructor;
|
|
69
85
|
readonly type: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
70
86
|
readonly clearable: import("vft/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
71
87
|
readonly clearIcon: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, "icon-circle-close", boolean>;
|
|
@@ -77,11 +93,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
77
93
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
78
94
|
__epPropKey: true;
|
|
79
95
|
};
|
|
80
|
-
readonly readonly:
|
|
81
|
-
readonly disabled:
|
|
96
|
+
readonly readonly: BooleanConstructor;
|
|
97
|
+
readonly disabled: BooleanConstructor;
|
|
82
98
|
readonly placeholder: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
83
99
|
readonly popperOptions: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<Options>) | (() => Partial<Options>) | (((new (...args: any[]) => Partial<Options>) | (() => Partial<Options>)) | null)[], unknown, unknown, () => {}, boolean>;
|
|
84
|
-
readonly modelValue: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType) | (((new (...args: any[]) => string | number | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType)) | null)[], unknown, unknown, "", boolean>;
|
|
100
|
+
readonly modelValue: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType) | (((new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType)) | null)[], unknown, unknown, "", boolean>;
|
|
85
101
|
readonly rangeSeparator: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "-", boolean>;
|
|
86
102
|
readonly startPlaceholder: StringConstructor;
|
|
87
103
|
readonly endPlaceholder: StringConstructor;
|
|
@@ -97,20 +113,16 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
97
113
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
98
114
|
__epPropKey: true;
|
|
99
115
|
};
|
|
100
|
-
readonly isRange:
|
|
116
|
+
readonly isRange: BooleanConstructor;
|
|
101
117
|
}>, {
|
|
102
118
|
/**
|
|
103
119
|
* @description focus input box.
|
|
104
120
|
*/
|
|
105
|
-
focus: (
|
|
106
|
-
/**
|
|
107
|
-
* @description emit focus event
|
|
108
|
-
*/
|
|
109
|
-
handleFocusInput: (e?: FocusEvent) => void;
|
|
121
|
+
focus: () => void;
|
|
110
122
|
/**
|
|
111
|
-
* @description
|
|
123
|
+
* @description blur input box.
|
|
112
124
|
*/
|
|
113
|
-
|
|
125
|
+
blur: () => void;
|
|
114
126
|
/**
|
|
115
127
|
* @description opens picker
|
|
116
128
|
*/
|
|
@@ -124,6 +136,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
124
136
|
*/
|
|
125
137
|
onPick: (date?: any, visible?: boolean) => void;
|
|
126
138
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
139
|
+
clear: (...args: any[]) => void;
|
|
127
140
|
blur: (...args: any[]) => void;
|
|
128
141
|
change: (...args: any[]) => void;
|
|
129
142
|
focus: (...args: any[]) => void;
|
|
@@ -146,25 +159,31 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
146
159
|
__epPropKey: true;
|
|
147
160
|
};
|
|
148
161
|
readonly shortcuts: import("vft/es/utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
149
|
-
readonly arrowControl:
|
|
150
|
-
readonly label: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
162
|
+
readonly arrowControl: BooleanConstructor;
|
|
151
163
|
readonly tabindex: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown, 0, boolean>;
|
|
152
164
|
readonly validateEvent: import("vft/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
153
165
|
readonly unlinkPanels: BooleanConstructor;
|
|
166
|
+
readonly placement: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement) | (((new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement)) | null)[], import("@popperjs/core").Placement, unknown, "bottom", boolean>;
|
|
167
|
+
readonly fallbackPlacements: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => import("@popperjs/core").Placement[]) | (() => import("@popperjs/core").Placement[]) | (((new (...args: any[]) => import("@popperjs/core").Placement[]) | (() => import("@popperjs/core").Placement[])) | null)[], unknown, unknown, readonly ["bottom", "top", "right", "left"], boolean>;
|
|
168
|
+
readonly emptyValues: ArrayConstructor;
|
|
169
|
+
readonly valueOnClear: import("vft/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown, undefined, boolean>;
|
|
170
|
+
readonly ariaLabel: StringConstructor;
|
|
171
|
+
readonly showNow: import("vft/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
172
|
+
readonly showWeekNumber: BooleanConstructor;
|
|
154
173
|
readonly disabledHours: {
|
|
155
|
-
readonly type: import("vue").PropType<import("
|
|
174
|
+
readonly type: import("vue").PropType<import("./props").GetDisabledHours>;
|
|
156
175
|
readonly required: false;
|
|
157
176
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
158
177
|
__epPropKey: true;
|
|
159
178
|
};
|
|
160
179
|
readonly disabledMinutes: {
|
|
161
|
-
readonly type: import("vue").PropType<import("
|
|
180
|
+
readonly type: import("vue").PropType<import("./props").GetDisabledMinutes>;
|
|
162
181
|
readonly required: false;
|
|
163
182
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
164
183
|
__epPropKey: true;
|
|
165
184
|
};
|
|
166
185
|
readonly disabledSeconds: {
|
|
167
|
-
readonly type: import("vue").PropType<import("
|
|
186
|
+
readonly type: import("vue").PropType<import("./props").GetDisabledSeconds>;
|
|
168
187
|
readonly required: false;
|
|
169
188
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
170
189
|
__epPropKey: true;
|
|
@@ -175,10 +194,17 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
175
194
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
176
195
|
__epPropKey: true;
|
|
177
196
|
};
|
|
178
|
-
readonly name:
|
|
197
|
+
readonly name: {
|
|
198
|
+
readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>) | (((new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>)) | null)[], unknown, unknown>>;
|
|
199
|
+
readonly required: false;
|
|
200
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
201
|
+
__epPropKey: true;
|
|
202
|
+
};
|
|
179
203
|
readonly popperClass: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
180
204
|
readonly format: StringConstructor;
|
|
181
205
|
readonly valueFormat: StringConstructor;
|
|
206
|
+
readonly dateFormat: StringConstructor;
|
|
207
|
+
readonly timeFormat: StringConstructor;
|
|
182
208
|
readonly type: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
183
209
|
readonly clearable: import("vft/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
184
210
|
readonly clearIcon: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, "icon-circle-close", boolean>;
|
|
@@ -190,11 +216,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
190
216
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
191
217
|
__epPropKey: true;
|
|
192
218
|
};
|
|
193
|
-
readonly readonly:
|
|
194
|
-
readonly disabled:
|
|
219
|
+
readonly readonly: BooleanConstructor;
|
|
220
|
+
readonly disabled: BooleanConstructor;
|
|
195
221
|
readonly placeholder: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
196
222
|
readonly popperOptions: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<Options>) | (() => Partial<Options>) | (((new (...args: any[]) => Partial<Options>) | (() => Partial<Options>)) | null)[], unknown, unknown, () => {}, boolean>;
|
|
197
|
-
readonly modelValue: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType) | (((new (...args: any[]) => string | number | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType)) | null)[], unknown, unknown, "", boolean>;
|
|
223
|
+
readonly modelValue: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType) | (((new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType)) | null)[], unknown, unknown, "", boolean>;
|
|
198
224
|
readonly rangeSeparator: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "-", boolean>;
|
|
199
225
|
readonly startPlaceholder: StringConstructor;
|
|
200
226
|
readonly endPlaceholder: StringConstructor;
|
|
@@ -210,8 +236,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
210
236
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
211
237
|
__epPropKey: true;
|
|
212
238
|
};
|
|
213
|
-
readonly isRange:
|
|
239
|
+
readonly isRange: BooleanConstructor;
|
|
214
240
|
}>> & Readonly<{
|
|
241
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
215
242
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
216
243
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
217
244
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
@@ -221,26 +248,29 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
221
248
|
"onPanel-change"?: ((...args: any[]) => any) | undefined;
|
|
222
249
|
"onVisible-change"?: ((...args: any[]) => any) | undefined;
|
|
223
250
|
}>, {
|
|
224
|
-
readonly label: string;
|
|
225
|
-
readonly name: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>) | (((new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>)) | null)[], unknown, unknown>;
|
|
226
251
|
readonly type: string;
|
|
227
|
-
readonly disabled:
|
|
228
|
-
readonly modelValue: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType) | (((new (...args: any[]) => string | number | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType)) | null)[], unknown, unknown>;
|
|
229
|
-
readonly
|
|
230
|
-
readonly placeholder: string;
|
|
231
|
-
readonly clearable: import("vft/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
232
|
-
readonly prefixIcon: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>;
|
|
233
|
-
readonly clearIcon: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>;
|
|
252
|
+
readonly disabled: boolean;
|
|
253
|
+
readonly modelValue: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType) | (((new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("./props").ModelValueType)) | null)[], unknown, unknown>;
|
|
254
|
+
readonly placement: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement) | (((new (...args: any[]) => "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement)) | null)[], import("@popperjs/core").Placement, unknown>;
|
|
234
255
|
readonly tabindex: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown>;
|
|
256
|
+
readonly readonly: boolean;
|
|
257
|
+
readonly placeholder: string;
|
|
235
258
|
readonly validateEvent: import("vft/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
259
|
+
readonly fallbackPlacements: import("@popperjs/core").Placement[];
|
|
236
260
|
readonly popperOptions: Partial<Options>;
|
|
237
261
|
readonly popperClass: string;
|
|
262
|
+
readonly clearable: import("vft/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
263
|
+
readonly prefixIcon: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>;
|
|
264
|
+
readonly clearIcon: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>;
|
|
265
|
+
readonly valueOnClear: import("vft/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown>;
|
|
238
266
|
readonly editable: import("vft/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
239
267
|
readonly rangeSeparator: string;
|
|
240
|
-
readonly isRange: import("vft/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
241
268
|
readonly shortcuts: unknown[];
|
|
242
|
-
readonly
|
|
269
|
+
readonly showNow: import("vft/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
270
|
+
readonly arrowControl: boolean;
|
|
243
271
|
readonly unlinkPanels: boolean;
|
|
272
|
+
readonly showWeekNumber: boolean;
|
|
273
|
+
readonly isRange: boolean;
|
|
244
274
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
245
275
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
246
276
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),v=require("@vft/utils");require("../../form/index.cjs");const R=require("../../icon/index.cjs"),De=require("../../input/index.cjs"),Te=require("../../tooltip/index.cjs"),g=require("../../../constants/aria.cjs"),Be=require("@vueuse/core"),ae=require("../../../utils/error.cjs");require("../../../utils/ns-cover.cjs");const Se=require("lodash-es"),H=require("../../../hooks/use-namespace/index.cjs");require("../../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../../hooks/use-z-index/index.cjs");const k=require("../utils.cjs"),qe=require("./props.cjs"),Me=require("../../form/hooks/use-form-item.cjs"),Ne=require("../../form/hooks/use-form-common-props.cjs"),Re=["id","name","placeholder","value","disabled","readonly"],ze=["id","name","placeholder","value","disabled","readonly"],Fe=a.defineComponent({name:"Picker"}),Oe=a.defineComponent({...Fe,props:qe.timePickerDefaultProps,emits:["update:modelValue","change","focus","blur","calendar-change","panel-change","visible-change","keydown"],setup(ne,{expose:le,emit:oe}){const t=ne,c=oe,b=a.ref("zh-cn"),d=H.useNamespace("date"),C=H.useNamespace("input"),p=H.useNamespace("range"),{form:te,formItem:L}=Me.useFormItem(),ue=a.inject("VftPopperOptions",{}),z=a.ref(),m=a.ref(),u=a.ref(!1),F=a.ref(!1),J=a.ref(null);let O=!1,V=!1;a.watch(u,e=>{e?a.nextTick(()=>{e&&(J.value=t.modelValue)}):(o.value=null,a.nextTick(()=>{$(t.modelValue)}))});const $=(e,n)=>{(n||!k.valueEquals(e,J.value))&&(c("change",e),t.validateEvent&&L?.validate("change").catch(l=>ae.debugWarn(l)))},h=e=>{if(!k.valueEquals(t.modelValue,e)){let n;v.isArray(e)?n=e.map(l=>k.formatter(l,t.valueFormat,b.value)):e&&(n=k.formatter(e,t.valueFormat,b.value)),c("update:modelValue",e&&n,b.value)}},re=e=>{c("keydown",e)},I=a.computed(()=>{if(m.value){const e=q.value?m.value:m.value.$el;return Array.from(e.querySelectorAll("input"))}return[]}),se=(e,n,l)=>{const s=I.value;s.length&&(!l||l==="min"?(s[0].setSelectionRange(e,n),s[0].focus()):l==="max"&&(s[1].setSelectionRange(e,n),s[1].focus()))},ie=()=>{A(!0,!0),a.nextTick(()=>{V=!1})},G=(e="",n=!1)=>{n||(V=!0),u.value=n;let l;v.isArray(e)?l=e.map(s=>s.toDate()):l=e&&e.toDate(),o.value=null,h(l)},ce=()=>{F.value=!0},fe=()=>{c("visible-change",!0)},de=e=>{e?.key===g.EVENT_CODE.esc&&A(!0,!0)},pe=()=>{F.value=!1,u.value=!1,V=!1,c("visible-change",!1)},ve=()=>{u.value=!0},me=()=>{u.value=!1},A=(e=!0,n=!1)=>{V=n;const[l,s]=a.unref(I);let W=l;!e&&q.value&&(W=s),W&&W.focus()},E=e=>{t.readonly||i.value||u.value||V||(u.value=!0,c("focus",e))};let Q;const P=e=>{const n=async()=>{setTimeout(()=>{Q===n&&(!(z.value?.isFocusInsideContent()&&!O)&&I.value.filter(l=>l.contains(document.activeElement)).length===0&&(j(),u.value=!1,c("blur",e),t.validateEvent&&L?.validate("blur").catch(l=>ae.debugWarn(l))),O=!1)},0)};Q=n,n()},i=a.computed(()=>t.disabled||te?.disabled),D=a.computed(()=>{let e;if(B.value?r.value.getDefaultValue&&(e=r.value.getDefaultValue()):v.isArray(t.modelValue)?e=t.modelValue.map(n=>k.parseDate(n,t.valueFormat,b.value)):e=k.parseDate(t.modelValue,t.valueFormat,b.value),r.value.getRangeAvailableTime){const n=r.value.getRangeAvailableTime(e);Se.isEqual(n,e)||(e=n,h(v.isArray(e)?e.map(l=>l.toDate()):e.toDate()))}return v.isArray(e)&&e.some(n=>!n)&&(e=[]),e}),f=a.computed(()=>{if(!r.value.panelReady)return"";const e=U(D.value);return v.isArray(o.value)?[o.value[0]||e&&e[0]||"",o.value[1]||e&&e[1]||""]:o.value!==null?o.value:!ye.value&&B.value||!u.value&&B.value?"":e?X.value?e.join(", "):e:""}),he=a.computed(()=>t.type.includes("time")),ye=a.computed(()=>t.type.startsWith("time")),X=a.computed(()=>t.type==="dates"),T=a.computed(()=>t.prefixIcon||(he.value?"icon-clock":"icon-calendar")),y=a.ref(!1),Y=e=>{t.readonly||i.value||y.value&&(e.stopPropagation(),ie(),h(null),$(null,!0),y.value=!1,u.value=!1,r.value.handleClear&&r.value.handleClear())},B=a.computed(()=>{const{modelValue:e}=t;return!e||v.isArray(e)&&!e.filter(Boolean).length}),w=async e=>{t.readonly||i.value||(e.target?.tagName!=="INPUT"||I.value.includes(document.activeElement))&&(u.value=!0)},Z=()=>{t.readonly||i.value||!B.value&&t.clearable&&(y.value=!0)},_=()=>{y.value=!1},S=e=>{t.readonly||i.value||(e.touches[0].target?.tagName!=="INPUT"||I.value.includes(document.activeElement))&&(u.value=!0)},q=a.computed(()=>t.type.includes("range")),K=Ne.useFormSize(),ge=a.computed(()=>a.unref(z)?.popperRef?.contentRef),x=a.computed(()=>a.unref(q)?a.unref(m):a.unref(m)?.$el);Be.onClickOutside(x,e=>{const n=a.unref(ge),l=a.unref(x);n&&(e.target===n||e.composedPath().includes(n))||e.target===l||e.composedPath().includes(l)||(u.value=!1)});const o=a.ref(null),j=()=>{if(o.value){const e=M(f.value);e&&N(e)&&(h(v.isArray(e)?e.map(n=>n.toDate()):e.toDate()),o.value=null)}o.value===""&&(h(null),$(null),o.value=null)},M=e=>e?r.value.parseUserInput(e):null,U=e=>e?r.value.formatToString(e):null,N=e=>r.value.isValidValue(e),ee=async e=>{if(t.readonly||i.value)return;const{code:n}=e;if(re(e),n===g.EVENT_CODE.esc){u.value===!0&&(u.value=!1,e.preventDefault(),e.stopPropagation());return}if(n===g.EVENT_CODE.down&&(r.value.handleFocusPicker&&(e.preventDefault(),e.stopPropagation()),u.value===!1&&(u.value=!0,await a.nextTick()),r.value.handleFocusPicker)){r.value.handleFocusPicker();return}if(n===g.EVENT_CODE.tab){O=!0;return}if(n===g.EVENT_CODE.enter||n===g.EVENT_CODE.numpadEnter){(o.value===null||o.value===""||N(M(f.value)))&&(j(),u.value=!1),e.stopPropagation();return}if(o.value){e.stopPropagation();return}r.value.handleKeydownInput&&r.value.handleKeydownInput(e)},ke=e=>{o.value=e,u.value||(u.value=!0)},be=e=>{const n=e.target;o.value?o.value=[n.value,o.value[1]]:o.value=[n.value,null]},Ce=e=>{const n=e.target;o.value?o.value=[o.value[0],n.value]:o.value=[null,n.value]},Ve=()=>{const e=o.value,n=M(e&&e[0]),l=a.unref(D);if(n&&n.isValid()){o.value=[U(n),f.value?.[1]||null];const s=[n,l&&(l[1]||null)];N(s)&&(h(s),o.value=null)}},Ie=()=>{const e=a.unref(o),n=M(e&&e[1]),l=a.unref(D);if(n&&n.isValid()){o.value=[a.unref(f)?.[0]||null,U(n)];const s=[l&&l[0],n];N(s)&&(h(s),o.value=null)}},r=a.ref({}),Ee=e=>{r.value[e[0]]=e[1],r.value.panelReady=!0},we=e=>{c("calendar-change",e)},Pe=(e,n,l)=>{c("panel-change",e,n,l)};return a.provide("EP_PICKER_BASE",{props:t}),le({focus:A,handleFocusInput:E,handleBlurInput:P,handleOpen:ve,handleClose:me,onPick:G}),(e,n)=>(a.openBlock(),a.createBlock(a.unref(Te.VftTooltip),a.mergeProps({ref_key:"refPopper",ref:z,visible:u.value,effect:"light",pure:"",trigger:"click"},e.$attrs,{role:"dialog",teleported:"",transition:`${a.unref(d).namespace.value}-zoom-in-top`,"popper-class":[`${a.unref(d).namespace.value}-picker__popper`,e.popperClass],"popper-options":a.unref(ue),"fallback-placements":["bottom","top","right","left"],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:ce,onShow:fe,onHide:pe}),{default:a.withCtx(()=>[q.value?(a.openBlock(),a.createElementBlock("div",{key:1,ref_key:"inputRef",ref:m,class:a.normalizeClass([a.unref(d).b("editor"),a.unref(d).bm("editor",e.type),a.unref(C).e("wrapper"),a.unref(d).is("disabled",i.value),a.unref(d).is("active",u.value),a.unref(p).b("editor"),a.unref(K)?a.unref(p).bm("editor",a.unref(K)):"",e.$attrs.class]),style:a.normalizeStyle(e.$attrs.style),onClick:E,onMouseenter:Z,onMouseleave:_,onTouchstart:S,onKeydown:ee},[T.value?(a.openBlock(),a.createBlock(a.unref(R.VftIcon),{key:0,icon:T.value,class:a.normalizeClass([a.unref(C).e("icon"),a.unref(p).e("icon")]),onMousedown:a.withModifiers(w,["prevent"]),onTouchstart:S},null,8,["icon","class"])):a.createCommentVNode("",!0),a.createElementVNode("input",{id:e.id&&e.id[0],autocomplete:"off",name:e.name&&e.name[0],placeholder:e.startPlaceholder,value:f.value&&f.value[0],disabled:i.value,readonly:!e.editable||e.readonly,class:a.normalizeClass(a.unref(p).b("input")),onMousedown:w,onInput:be,onChange:Ve,onFocus:E,onBlur:P},null,42,Re),a.renderSlot(e.$slots,"range-separator",{},()=>[a.createElementVNode("span",{class:a.normalizeClass(a.unref(p).b("separator"))},a.toDisplayString(e.rangeSeparator),3)]),a.createElementVNode("input",{id:e.id&&e.id[1],autocomplete:"off",name:e.name&&e.name[1],placeholder:e.endPlaceholder,value:f.value&&f.value[1],disabled:i.value,readonly:!e.editable||e.readonly,class:a.normalizeClass(a.unref(p).b("input")),onMousedown:w,onFocus:E,onBlur:P,onInput:Ce,onChange:Ie},null,42,ze),e.clearIcon?(a.openBlock(),a.createBlock(a.unref(R.VftIcon),{key:1,icon:e.clearIcon,class:a.normalizeClass([a.unref(C).e("icon"),a.unref(p).e("close-icon"),{[a.unref(p).e("close-icon--hidden")]:!y.value}]),onClick:Y},null,8,["icon","class"])):a.createCommentVNode("",!0)],38)):(a.openBlock(),a.createBlock(a.unref(De.VftInput),{key:0,id:e.id,ref_key:"inputRef",ref:m,"container-role":"combobox","model-value":f.value,name:e.name,size:a.unref(K),disabled:i.value,placeholder:e.placeholder,class:a.normalizeClass([a.unref(d).b("editor"),a.unref(d).bm("editor",e.type),e.$attrs.class]),style:a.normalizeStyle(e.$attrs.style),readonly:!e.editable||e.readonly||X.value||e.type==="week",label:e.label,tabindex:e.tabindex,"validate-event":!1,onInput:ke,onFocus:E,onBlur:P,onKeydown:ee,onChange:j,onMousedown:w,onMouseenter:Z,onMouseleave:_,onTouchstart:S,onClick:n[0]||(n[0]=a.withModifiers(()=>{},["stop"]))},{prefix:a.withCtx(()=>[T.value?(a.openBlock(),a.createBlock(a.unref(R.VftIcon),{key:0,icon:T.value,class:a.normalizeClass(a.unref(C).e("icon")),onMousedown:a.withModifiers(w,["prevent"]),onTouchstart:S},null,8,["icon","class"])):a.createCommentVNode("",!0)]),suffix:a.withCtx(()=>[y.value&&e.clearIcon?(a.openBlock(),a.createBlock(a.unref(R.VftIcon),{key:0,icon:e.clearIcon,class:a.normalizeClass(`${a.unref(C).e("icon")} clear-icon`),onClick:a.withModifiers(Y,["stop"])},null,8,["icon","class"])):a.createCommentVNode("",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","label","tabindex","onKeydown"]))]),content:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{visible:u.value,actualVisible:F.value,parsedValue:D.value,format:e.format,unlinkPanels:e.unlinkPanels,type:e.type,defaultValue:e.defaultValue,onPick:G,onSelectRange:se,onSetPickerOption:Ee,onCalendarChange:we,onPanelChange:Pe,onKeydown:de,onMousedown:n[1]||(n[1]=a.withModifiers(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-options"]))}});exports.default=Oe;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),Be=require("lodash-es"),ee=require("@vueuse/core"),v=require("@vft/utils"),ae=require("../../../utils/error.cjs"),C=require("../../../constants/aria.cjs"),N=require("../../../constants/event.cjs");require("../../../utils/ns-cover.cjs");const K=require("../../../hooks/use-namespace/index.cjs");require("../../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../../hooks/use-z-index/index.cjs");const Fe=require("../../../hooks/use-focus-controller/index.cjs"),Me=require("../../../hooks/use-empty-values/index.cjs");require("../../form/index.cjs");const Re=require("../../input/index.cjs"),q=require("../../icon/index.cjs"),Ae=require("../../tooltip/index.cjs"),i=require("../utils.cjs"),le=require("../constants.cjs"),$e=require("./props.cjs"),ze=require("./picker-range-trigger.vue2.cjs"),Ke=require("../../form/hooks/use-form-item.cjs"),Ue=require("../../form/hooks/use-form-common-props.cjs"),Le=a.defineComponent({name:"Picker"}),je=a.defineComponent({...Le,props:$e.timePickerDefaultProps,emits:[N.UPDATE_MODEL_EVENT,N.CHANGE_EVENT,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(ne,{expose:oe,emit:te}){const n=ne,f=te,b=a.ref("zh-cn"),re=a.useAttrs(),p=K.useNamespace("date"),k=K.useNamespace("input"),h=K.useNamespace("range"),{form:ue,formItem:U}=Ke.useFormItem(),se=a.inject(le.PICKER_POPPER_OPTIONS_INJECTION_KEY,{}),{valueOnClear:V}=Me.useEmptyValues(n,null),S=a.ref(),c=a.ref(),r=a.ref(!1),O=a.ref(!1),B=a.ref(null);let F=!1;const d=a.computed(()=>n.disabled||!!ue?.disabled),{isFocused:L,handleFocus:j,handleBlur:W}=Fe.useFocusController(c,{disabled:d,beforeFocus(){return n.readonly},afterFocus(){r.value=!0},beforeBlur(e){return!F&&S.value?.isFocusInsideContent(e)},afterBlur(){$(),r.value=!1,F=!1,n.validateEvent&&U?.validate("blur").catch(e=>ae.debugWarn(e))}}),ie=a.computed(()=>[p.b("editor"),p.bm("editor",n.type),k.e("wrapper"),p.is("disabled",d.value),p.is("active",r.value),h.b("editor"),A?h.bm("editor",A.value):"",re.class]),ce=a.computed(()=>[k.e("icon"),h.e("close-icon"),g.value?"":h.e("close-icon--hidden")]);a.watch(r,e=>{e?a.nextTick(()=>{e&&(B.value=n.modelValue)}):(o.value=null,a.nextTick(()=>{M(n.modelValue)}))});const M=(e,l)=>{(l||!i.valueEquals(e,B.value))&&(f(N.CHANGE_EVENT,e),l&&(B.value=e),n.validateEvent&&U?.validate("change").catch(t=>ae.debugWarn(t)))},m=e=>{if(!i.valueEquals(n.modelValue,e)){let l;v.isArray(e)?l=e.map(t=>i.formatter(t,n.valueFormat,b.value)):e&&(l=i.formatter(e,n.valueFormat,b.value)),f(N.UPDATE_MODEL_EVENT,e&&l,b.value)}},de=e=>{f("keydown",e)},fe=a.computed(()=>c.value?Array.from(c.value.$el.querySelectorAll("input")):[]),pe=(e,l,t)=>{const s=fe.value;s.length&&(!t||t==="min"?(s[0].setSelectionRange(e,l),s[0].focus()):t==="max"&&(s[1].setSelectionRange(e,l),s[1].focus()))},H=(e="",l=!1)=>{r.value=l;let t;v.isArray(e)?t=e.map(s=>s.toDate()):t=e&&e.toDate(),o.value=null,m(t)},ve=()=>{O.value=!0},me=()=>{f("visible-change",!0)},J=()=>{O.value=!1,r.value=!1,f("visible-change",!1)},he=()=>{r.value=!0},ye=()=>{r.value=!1},I=a.computed(()=>{let e;if(E.value?u.value.getDefaultValue&&(e=u.value.getDefaultValue()):v.isArray(n.modelValue)?e=n.modelValue.map(l=>i.parseDate(l,n.valueFormat,b.value)):e=i.parseDate(n.modelValue,n.valueFormat,b.value),u.value.getRangeAvailableTime){const l=u.value.getRangeAvailableTime(e);Be.isEqual(l,e)||(e=l,E.value||m(i.dayOrDaysToDate(e)))}return v.isArray(e)&&e.some(l=>!l)&&(e=[]),e}),y=a.computed(()=>{if(!u.value.panelReady)return"";const e=z(I.value);return v.isArray(o.value)?[o.value[0]||e&&e[0]||"",o.value[1]||e&&e[1]||""]:o.value!==null?o.value:!be.value&&E.value||!r.value&&E.value?"":e?Y.value||G.value||_.value?e.join(", "):e:""}),ge=a.computed(()=>n.type.includes("time")),be=a.computed(()=>n.type.startsWith("time")),Y=a.computed(()=>n.type==="dates"),G=a.computed(()=>n.type==="months"),_=a.computed(()=>n.type==="years"),P=a.computed(()=>n.prefixIcon||(ge.value?"icon-clock":"icon-calendar")),g=a.ref(!1),Q=e=>{n.readonly||d.value||(g.value&&(e.stopPropagation(),u.value.handleClear?u.value.handleClear():m(V.value),M(V.value,!0),g.value=!1,J()),f("clear"))},E=a.computed(()=>{const{modelValue:e}=n;return!e||v.isArray(e)&&!e.filter(Boolean).length}),w=async e=>{n.readonly||d.value||(e.target?.tagName!=="INPUT"||L.value)&&(r.value=!0)},X=()=>{n.readonly||d.value||!E.value&&n.clearable&&(g.value=!0)},Z=()=>{g.value=!1},R=e=>{n.readonly||d.value||(e.touches[0].target?.tagName!=="INPUT"||L.value)&&(r.value=!0)},ke=a.computed(()=>n.type.includes("range")),A=Ue.useFormSize(),Ee=a.computed(()=>a.unref(S)?.popperRef?.contentRef),Ce=ee.onClickOutside(c,e=>{const l=a.unref(Ee),t=ee.unrefElement(c);l&&(e.target===l||e.composedPath().includes(l))||e.target===t||t&&e.composedPath().includes(t)||(r.value=!1)});a.onBeforeUnmount(()=>{Ce?.()});const o=a.ref(null),$=()=>{if(o.value){const e=T(y.value);e&&D(e)&&(m(i.dayOrDaysToDate(e)),o.value=null)}o.value===""&&(m(V.value),M(V.value,!0),o.value=null)},T=e=>e?u.value.parseUserInput(e):null,z=e=>e?u.value.formatToString(e):null,D=e=>u.value.isValidValue(e),x=async e=>{if(n.readonly||d.value)return;const{code:l}=e;if(de(e),l===C.EVENT_CODE.esc){r.value===!0&&(r.value=!1,e.preventDefault(),e.stopPropagation());return}if(l===C.EVENT_CODE.down&&(u.value.handleFocusPicker&&(e.preventDefault(),e.stopPropagation()),r.value===!1&&(r.value=!0,await a.nextTick()),u.value.handleFocusPicker)){u.value.handleFocusPicker();return}if(l===C.EVENT_CODE.tab){F=!0;return}if(l===C.EVENT_CODE.enter||l===C.EVENT_CODE.numpadEnter){(o.value===null||o.value===""||D(T(y.value)))&&($(),r.value=!1),e.stopPropagation();return}if(o.value){e.stopPropagation();return}u.value.handleKeydownInput&&u.value.handleKeydownInput(e)},Ve=e=>{o.value=e,r.value||(r.value=!0)},Ie=e=>{const l=e.target;o.value?o.value=[l.value,o.value[1]]:o.value=[l.value,null]},Pe=e=>{const l=e.target;o.value?o.value=[o.value[0],l.value]:o.value=[null,l.value]},we=()=>{const e=o.value,l=T(e&&e[0]),t=a.unref(I);if(l&&l.isValid()){o.value=[z(l),y.value?.[1]||null];const s=[l,t&&(t[1]||null)];D(s)&&(m(i.dayOrDaysToDate(s)),o.value=null)}},Te=()=>{const e=a.unref(o),l=T(e&&e[1]),t=a.unref(I);if(l&&l.isValid()){o.value=[a.unref(y)?.[0]||null,z(l)];const s=[t&&t[0],l];D(s)&&(m(i.dayOrDaysToDate(s)),o.value=null)}},u=a.ref({}),De=e=>{u.value[e[0]]=e[1],u.value.panelReady=!0},Ne=e=>{f("calendar-change",e)},qe=(e,l,t)=>{f("panel-change",e,l,t)},Se=()=>{c.value?.focus()},Oe=()=>{c.value?.blur()};return a.provide(le.PICKER_BASE_INJECTION_KEY,{props:n}),oe({focus:Se,blur:Oe,handleOpen:he,handleClose:ye,onPick:H}),(e,l)=>(a.openBlock(),a.createBlock(a.unref(Ae.VftTooltip),a.mergeProps({ref_key:"refPopper",ref:S,visible:r.value,effect:"light",pure:"",trigger:"click"},e.$attrs,{role:"dialog",teleported:"",transition:`${a.unref(p).namespace.value}-zoom-in-top`,"popper-class":[`${a.unref(p).namespace.value}-picker__popper`,e.popperClass],"popper-options":a.unref(se),"fallback-placements":e.fallbackPlacements,"gpu-acceleration":!1,placement:e.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:ve,onShow:me,onHide:J}),{default:a.withCtx(()=>[ke.value?(a.openBlock(),a.createBlock(ze.default,{key:1,id:e.id,ref_key:"inputRef",ref:c,"model-value":y.value,name:e.name,disabled:d.value,readonly:!e.editable||e.readonly,"start-placeholder":e.startPlaceholder,"end-placeholder":e.endPlaceholder,class:a.normalizeClass(ie.value),style:a.normalizeStyle(e.$attrs.style),"aria-label":e.ariaLabel,tabindex:e.tabindex,autocomplete:"off",role:"combobox",onClick:w,onFocus:a.unref(j),onBlur:a.unref(W),onStartInput:Ie,onStartChange:we,onEndInput:Pe,onEndChange:Te,onMousedown:w,onMouseenter:X,onMouseleave:Z,onTouchstartPassive:R,onKeydown:x},{prefix:a.withCtx(()=>[P.value?(a.openBlock(),a.createBlock(a.unref(q.VftIcon),{key:0,icon:P.value,class:a.normalizeClass([a.unref(k).e("icon"),a.unref(h).e("icon")])},null,8,["icon","class"])):a.createCommentVNode("",!0)]),"range-separator":a.withCtx(()=>[a.renderSlot(e.$slots,"range-separator",{},()=>[a.createElementVNode("span",{class:a.normalizeClass(a.unref(h).b("separator"))},a.toDisplayString(e.rangeSeparator),3)])]),suffix:a.withCtx(()=>[e.clearIcon?(a.openBlock(),a.createBlock(a.unref(q.VftIcon),{key:0,icon:e.clearIcon,class:a.normalizeClass(ce.value),onMousedown:a.withModifiers(a.unref(v.noop),["prevent"]),onClick:Q},null,8,["icon","class","onMousedown"])):a.createCommentVNode("",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(a.openBlock(),a.createBlock(a.unref(Re.VftInput),{key:0,id:e.id,ref_key:"inputRef",ref:c,"container-role":"combobox","model-value":y.value,name:e.name,size:a.unref(A),disabled:d.value,placeholder:e.placeholder,class:a.normalizeClass([a.unref(p).b("editor"),a.unref(p).bm("editor",e.type),e.$attrs.class]),style:a.normalizeStyle(e.$attrs.style),readonly:!e.editable||e.readonly||Y.value||G.value||_.value||e.type==="week","aria-label":e.ariaLabel,tabindex:e.tabindex,"validate-event":!1,onInput:Ve,onFocus:a.unref(j),onBlur:a.unref(W),onKeydown:x,onChange:$,onMousedown:w,onMouseenter:X,onMouseleave:Z,onTouchstartPassive:R,onClick:l[0]||(l[0]=a.withModifiers(()=>{},["stop"]))},{prefix:a.withCtx(()=>[P.value?(a.openBlock(),a.createBlock(a.unref(q.VftIcon),{key:0,icon:P.value,class:a.normalizeClass(a.unref(k).e("icon")),onMousedown:a.withModifiers(w,["prevent"]),onTouchstartPassive:R},null,8,["icon","class"])):a.createCommentVNode("",!0)]),suffix:a.withCtx(()=>[g.value&&e.clearIcon?(a.openBlock(),a.createBlock(a.unref(q.VftIcon),{key:0,icon:e.clearIcon,class:a.normalizeClass(`${a.unref(k).e("icon")} clear-icon`),onMousedown:a.withModifiers(a.unref(v.noop),["prevent"]),onClick:Q},null,8,["icon","class","onMousedown"])):a.createCommentVNode("",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur"]))]),content:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{visible:r.value,actualVisible:O.value,parsedValue:I.value,format:e.format,dateFormat:e.dateFormat,timeFormat:e.timeFormat,unlinkPanels:e.unlinkPanels,type:e.type,defaultValue:e.defaultValue,showNow:e.showNow,showWeekNumber:e.showWeekNumber,onPick:H,onSelectRange:pe,onSetPickerOption:De,onCalendarChange:Ne,onPanelChange:qe,onMousedown:l[1]||(l[1]=a.withModifiers(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});exports.default=je;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@popperjs/core"),i=require("../../../constants/size.cjs");require("@vueuse/core");const o=require("@vft/utils");require("../../../utils/ns-cover.cjs");const e=require("../../../utils/vue/props/runtime.cjs");require("vue");const n=require("../props/shared.cjs"),l=e.buildProps({id:{type:e.definePropType([Array,String])},name:{type:e.definePropType([Array,String])},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:e.definePropType([String,Object]),default:"icon-circle-close"},editable:{type:Boolean,default:!0},prefixIcon:{type:e.definePropType([String,Object]),default:""},size:{type:String,values:i.componentSizes,required:!1},readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:e.definePropType(Object),default:()=>({})},modelValue:{type:e.definePropType([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:e.definePropType([Date,Array])},defaultTime:{type:e.definePropType([Date,Array])},isRange:Boolean,...n.disabledTimeListsProps,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:e.definePropType([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:e.definePropType(String),values:a.placements,default:"bottom"},fallbackPlacements:{type:e.definePropType(Array),default:["bottom","top","right","left"]},emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:r=>o.isFunction(r)?!r():!r},ariaLabel:String,showNow:{type:Boolean,default:!0},showWeekNumber:Boolean}),t=e.buildProps({id:{type:e.definePropType(Array)},name:{type:e.definePropType(Array)},modelValue:{type:e.definePropType([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),p=t;exports.timePickerDefaultProps=l;exports.timePickerRangeTriggerProps=t;exports.timePickerRngeTriggerProps=p;
|