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
|
@@ -20,3 +20,4 @@ export declare const VftDateTimeSelect: import("vft/es/utils").SFCWithInstall<im
|
|
|
20
20
|
onChange?: ((val: string | string[]) => any) | undefined;
|
|
21
21
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
22
22
|
export default VftDateTimeSelect;
|
|
23
|
+
export * from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../icon/index.cjs");require("../focus-trap/focus-trap.vue2.cjs");const m=require("../focus-trap/tokens.cjs");require("../focus-trap/utils.cjs");require("@vueuse/core");require("@vft/utils");require("../../utils/ns-cover.cjs");require("lodash-es");const g=require("../../utils/vue/refs.cjs"),p=require("../../hooks/use-draggable/index.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../icon/index.cjs");require("../focus-trap/focus-trap.vue2.cjs");const m=require("../focus-trap/tokens.cjs");require("../focus-trap/utils.cjs");require("@vueuse/core");require("@vft/utils");require("../../utils/ns-cover.cjs");require("lodash-es");const g=require("../../utils/vue/refs.cjs"),p=require("../../hooks/use-draggable/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const C=require("./constants.cjs"),y=["id"],b=e.defineComponent({name:"vft-dialog-content"}),q=e.defineComponent({...b,props:{center:{type:Boolean,default:!1},alignCenter:{type:Boolean,default:!1},closeIcon:{default:"icon-close"},customClass:{},draggable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},title:{default:""}},emits:["close"],setup(t){const{dialogRef:n,headerRef:l,bodyId:a,ns:r,style:i}=e.inject(C.dialogInjectionKey),{focusTrapRef:u}=e.inject(m.FOCUS_TRAP_INJECTION_KEY),c=g.composeRefs(u,n),f=e.computed(()=>t.draggable);return p.useDraggable(n,l,f),(o,s)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(c),class:e.normalizeClass([e.unref(r).b(),e.unref(r).is("fullscreen",o.fullscreen),e.unref(r).is("draggable",o.draggable),e.unref(r).is("align-center",o.alignCenter),{[e.unref(r).m("center")]:o.center},o.customClass]),style:e.normalizeStyle(e.unref(i)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:l,class:e.normalizeClass(e.unref(r).e("header"))},[e.renderSlot(o.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading",class:e.normalizeClass(e.unref(r).e("title"))},e.toDisplayString(o.title),3)]),o.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(r).e("headerbtn")),type:"button",onClick:s[0]||(s[0]=k=>o.$emit("close"))},[e.createVNode(e.unref(d.VftIcon),{class:e.normalizeClass(e.unref(r).e("close")),icon:o.closeIcon,size:"20"},null,8,["class","icon"])],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{id:e.unref(a),class:e.normalizeClass(e.unref(r).e("body"))},[e.renderSlot(o.$slots,"default")],10,y),o.$slots.footer?(e.openBlock(),e.createElementBlock("footer",{key:0,class:e.normalizeClass(e.unref(r).e("footer"))},[e.renderSlot(o.$slots,"footer")],2)):e.createCommentVNode("",!0)],6))}});exports.default=q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./dropdown-item-impl.vue2.cjs"),o=require("vue"),i=require("../../_virtual/_plugin-vue_export-helper.cjs"),s=["aria-disabled","tabindex","role"];function t(e,n,u,m,p,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./dropdown-item-impl.vue2.cjs"),o=require("vue"),i=require("../../_virtual/_plugin-vue_export-helper.cjs"),s=["aria-disabled","tabindex","role"];function t(e,n,u,m,p,b){const l=o.resolveComponent("drop-icon");return o.openBlock(),o.createElementBlock(o.Fragment,null,[e.divided?(o.openBlock(),o.createElementBlock("li",o.mergeProps({key:0,role:"separator",class:e.ns.bem("menu","item","divided")},e.$attrs),null,16)):o.createCommentVNode("",!0),o.createElementVNode("li",o.mergeProps({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:n[0]||(n[0]=r=>e.$emit("clickimpl",r)),onFocus:n[1]||(n[1]=(...r)=>e.handleFocus&&e.handleFocus(...r)),onKeydown:n[2]||(n[2]=o.withModifiers((...r)=>e.handleKeydown&&e.handleKeydown(...r),["self"])),onMousedown:n[3]||(n[3]=(...r)=>e.handleMousedown&&e.handleMousedown(...r)),onPointermove:n[4]||(n[4]=r=>e.$emit("pointermove",r)),onPointerleave:n[5]||(n[5]=r=>e.$emit("pointerleave",r))}),[e.icon?(o.openBlock(),o.createBlock(l,o.normalizeProps(o.mergeProps({key:0},e.icon)),null,16)):o.createCommentVNode("",!0),o.renderSlot(e.$slots,"default")],16,s)],64)}const a=i.default(d.default,[["render",t]]);exports.default=a;
|
|
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
9
9
|
icon: StringConstructor;
|
|
10
10
|
}>, {
|
|
11
11
|
ns: {
|
|
12
|
-
namespace: import("vue").
|
|
12
|
+
namespace: import("vue").ComputedRef<string>;
|
|
13
13
|
b: (blockSuffix?: string) => string;
|
|
14
14
|
e: (element?: string) => string;
|
|
15
15
|
m: (modifier?: string) => string;
|
|
@@ -21,9 +21,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
21
21
|
(name: string, state: boolean | undefined): string;
|
|
22
22
|
(name: string): string;
|
|
23
23
|
};
|
|
24
|
-
cssVar: (object: Record<string, string
|
|
24
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
25
25
|
cssVarName: (name: string) => string;
|
|
26
|
-
cssVarBlock: (object: Record<string, string
|
|
26
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
27
27
|
cssVarBlockName: (name: string) => string;
|
|
28
28
|
};
|
|
29
29
|
itemRef: (el: Element | import("vue").ComponentPublicInstance | null) => void;
|
|
@@ -54,7 +54,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
54
54
|
command: string | number | Record<string, any>;
|
|
55
55
|
divided: boolean;
|
|
56
56
|
}, {}, {
|
|
57
|
-
|
|
57
|
+
DropIcon: import("vft/es/utils").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
58
58
|
icon: {
|
|
59
59
|
type: import("vue").PropType<string>;
|
|
60
60
|
required: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("../collection/collection.cjs"),q=require("../icon/index.cjs");require("../roving-focus-group/roving-focus-group.vue2.cjs");const e=require("vue");require("../roving-focus-group/roving-focus-group-impl.vue2.cjs");require("../roving-focus-group/roving-focus-item.vue2.cjs");const N=require("../roving-focus-group/types.cjs"),f=require("../roving-focus-group/tokens.cjs"),r=require("../../constants/aria.cjs");require("@vueuse/core");require("@vft/utils");const v=require("../../utils/event.cjs");require("../../utils/ns-cover.cjs");require("lodash-es");const C=require("../../utils/vue/refs.cjs"),T=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("./tokens.cjs"),g=require("./types.cjs"),D=e.defineComponent({name:"DropdownItemImpl",components:{
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("../collection/collection.cjs"),q=require("../icon/index.cjs");require("../roving-focus-group/roving-focus-group.vue2.cjs");const e=require("vue");require("../roving-focus-group/roving-focus-group-impl.vue2.cjs");require("../roving-focus-group/roving-focus-item.vue2.cjs");const N=require("../roving-focus-group/types.cjs"),f=require("../roving-focus-group/tokens.cjs"),r=require("../../constants/aria.cjs");require("@vueuse/core");require("@vft/utils");const v=require("../../utils/event.cjs");require("../../utils/ns-cover.cjs");require("lodash-es");const C=require("../../utils/vue/refs.cjs"),T=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("./tokens.cjs"),g=require("./types.cjs"),D=e.defineComponent({name:"DropdownItemImpl",components:{DropIcon:q.VftIcon},props:{command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:String},emits:["pointermove","pointerleave","click","clickimpl"],setup(S,{emit:i}){const c=T.useNamespace("dropdown"),{role:n}=e.inject(R.DROPDOWN_INJECTION_KEY,void 0),{collectionItemRef:u}=e.inject(g.DROPDOWN_COLLECTION_ITEM_INJECTION_KEY,void 0),{collectionItemRef:s}=e.inject(N.ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY,void 0),{rovingFocusGroupItemRef:l,tabIndex:d,handleFocus:a,handleKeydown:m,handleMousedown:I}=e.inject(f.ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY,void 0),p=C.composeRefs(u,s,l),_=e.computed(()=>n.value==="menu"?"menuitem":n.value==="navigation"?"link":"button"),O=v.composeEventHandlers(o=>{const{code:t}=o;if(t===r.EVENT_CODE.enter||t===r.EVENT_CODE.space)return o.preventDefault(),o.stopImmediatePropagation(),i("clickimpl",o),!0},m);return{ns:c,itemRef:p,dataset:{[E.COLLECTION_ITEM_SIGN]:""},role:_,tabIndex:d,handleFocus:a,handleKeydown:O,handleMousedown:I}}});exports.default=D;
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { Options, Placement } from 'vft/es/components/popper';
|
|
3
|
-
import { type TooltipTriggerType } from 'vft/es/components/tooltip';
|
|
4
|
-
export interface DropdownProps {
|
|
5
|
-
trigger?: TooltipTriggerType;
|
|
6
|
-
effect?: 'light' | 'dark';
|
|
7
|
-
type?: ButtonType;
|
|
8
|
-
placement?: Placement;
|
|
9
|
-
popperOptions?: Options;
|
|
10
|
-
id?: string;
|
|
11
|
-
size?: string;
|
|
12
|
-
splitButton?: boolean;
|
|
13
|
-
hideOnClick?: boolean;
|
|
14
|
-
loop?: boolean;
|
|
15
|
-
showTimeout?: number;
|
|
16
|
-
hideTimeout?: number;
|
|
17
|
-
tabindex?: number | string;
|
|
18
|
-
maxHeight?: number | string;
|
|
19
|
-
popperClass?: string;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
role?: string;
|
|
22
|
-
buttonProps?: ButtonProps;
|
|
23
|
-
teleported?: boolean;
|
|
24
|
-
}
|
|
1
|
+
import { type DropdownProps } from './types';
|
|
25
2
|
declare function handleClose(): void;
|
|
26
3
|
declare function handleOpen(): void;
|
|
27
4
|
declare function __VLS_template(): {
|
|
@@ -72,16 +49,16 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
72
49
|
maxHeight: number | string;
|
|
73
50
|
role: string;
|
|
74
51
|
disabled: boolean;
|
|
75
|
-
placement: Placement;
|
|
52
|
+
placement: import("@popperjs/core").Placement;
|
|
76
53
|
effect: "light" | "dark";
|
|
77
|
-
loop: boolean;
|
|
78
|
-
trigger: TooltipTriggerType;
|
|
79
54
|
tabindex: number | string;
|
|
80
|
-
|
|
55
|
+
trigger: import("vft/es/components/tooltip").TooltipTriggerType;
|
|
56
|
+
loop: boolean;
|
|
81
57
|
teleported: boolean;
|
|
82
|
-
|
|
58
|
+
popperClass: string;
|
|
83
59
|
showTimeout: number;
|
|
84
60
|
hideTimeout: number;
|
|
61
|
+
hideOnClick: boolean;
|
|
85
62
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
86
63
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
87
64
|
export default _default;
|
|
@@ -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"),c=require("../button/index.cjs");require("../form/index.cjs");const K=require("../icon/index.cjs"),M=require("../roving-focus-group/roving-focus-group.vue.cjs");require("../roving-focus-group/roving-focus-group-impl.vue2.cjs");require("../roving-focus-group/roving-focus-item.vue2.cjs");require("../roving-focus-group/types.cjs");const m=require("../../constants/aria.cjs"),U=require("../scrollbar/index.cjs"),G=require("../slot/only-child.cjs"),j=require("../tooltip/index.cjs");require("@vueuse/core");const C=require("@vft/utils");require("../../utils/ns-cover.cjs");require("lodash-es");const x=require("../../hooks/use-id/index.cjs"),J=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const W=require("./tokens.cjs"),Y=require("./types.cjs"),Q=require("../form/hooks/use-form-common-props.cjs"),X=e.defineComponent({name:"vft-dropdown"}),Z=e.defineComponent({...X,props:{trigger:{default:"hover"},effect:{default:"light"},type:{},placement:{default:"bottom"},popperOptions:{},id:{},size:{},splitButton:{type:Boolean},hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{default:150},hideTimeout:{default:150},tabindex:{default:0},maxHeight:{default:""},popperClass:{default:""},disabled:{type:Boolean,default:!1},role:{default:"menu"},buttonProps:{},teleported:{type:Boolean,default:!0}},emits:["visible-change","command","click"],setup(y,{expose:w,emit:E}){const r=J.useNamespace("dropdown"),o=y,l=E,q=e.getCurrentInstance(),n=e.ref(),v=e.ref(),s=e.ref(null),i=e.ref(null),k=e.ref(null),d=e.ref(null),g=e.ref(!1),B=[m.EVENT_CODE.enter,m.EVENT_CODE.space,m.EVENT_CODE.down],V=e.computed(()=>({maxHeight:C.addUnit(o.maxHeight)})),$=x.useId().value,f=e.computed(()=>o.id||$);e.watch([n,e.toRef(o,"trigger")],([t,u],[b])=>{const A=C.isArray(u)?u:[u];b?.$el?.removeEventListener&&b.$el.removeEventListener("pointerenter",a),t?.$el?.removeEventListener&&t.$el.removeEventListener("pointerenter",a),t?.$el?.addEventListener&&A.includes("hover")&&t.$el.addEventListener("pointerenter",a)},{immediate:!0}),e.onBeforeUnmount(()=>{n.value?.$el?.removeEventListener&&n.value.$el.removeEventListener("pointerenter",a)});function T(){h()}function h(){s.value?.onClose()}function N(){s.value?.onOpen()}const p=Q.useFormSize();function O(...t){l("command",...t)}function a(){n.value?.$el?.focus()}function S(){}function I(){e.unref(i)?.focus(),d.value=null}function R(t){d.value=t}function z(t){g.value||(t.preventDefault(),t.stopImmediatePropagation())}function L(){l("visible-change",!0)}function P(t){t?.type==="keydown"&&i.value?.focus()}function D(){l("visible-change",!1)}e.provide(W.DROPDOWN_INJECTION_KEY,{contentRef:i,role:e.computed(()=>o.role),triggerId:f,isUsingKeyboard:g,onItemEnter:S,onItemLeave:I}),e.provide("elDropdown",{instance:q,dropdownSize:p,handleClick:T,commandHandler:O,trigger:e.toRef(o,"trigger"),hideOnClick:e.toRef(o,"hideOnClick")});const F=t=>{t.preventDefault(),i.value?.focus?.({preventScroll:!0})},H=t=>{l("click",t)};return w({handleClose:h,handleOpen:N,onFocusAfterTrapped:F}),(t,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(r).b(),e.unref(r).is("disabled",t.disabled)])},[e.createVNode(e.unref(j.VftTooltip),{ref_key:"popperRef",ref:s,role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"manual-mode":!0,placement:t.placement,"popper-class":[e.unref(r).e("popper"),t.popperClass],"reference-element":v.value?.$el,trigger:t.trigger,"trigger-keys":B,"trigger-target-el":i.value,"show-after":t.trigger==="hover"?t.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":n.value,"virtual-triggering":t.splitButton,disabled:t.disabled,transition:`${e.unref(r).namespace.value}-zoom-in-top`,teleported:t.teleported,pure:"",persistent:"",onBeforeShow:L,onShow:P,onBeforeHide:D},e.createSlots({content:e.withCtx(()=>[e.createVNode(e.unref(U.VftScrollbar),{ref_key:"scrollbar",ref:k,"wrap-style":V.value,tag:"div","view-class":[e.unref(r).e("list"),"test"]},{default:e.withCtx(()=>[e.createVNode(e.unref(M.default),{loop:t.loop,"current-tab-id":d.value,orientation:"horizontal",onCurrentTabIdChange:R,onEntryFocus:z},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.VftCollection),null,{default:e.withCtx(()=>[e.renderSlot(t.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:e.withCtx(()=>[e.createVNode(e.unref(G.OnlyChild),{id:f.value,ref_key:"triggeringElementRef",ref:n,role:"button",tabindex:t.tabindex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["id","tabindex"])]),key:"0"}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported"]),t.splitButton?(e.openBlock(),e.createBlock(e.unref(c.VftButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(c.VftButton),e.mergeProps({ref_key:"referenceElementRef",ref:v},t.buttonProps,{size:e.unref(p),type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:H}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex"]),e.createVNode(e.unref(c.VftButton),e.mergeProps({id:f.value,ref_key:"triggeringElementRef",ref:n},t.buttonProps,{role:"button",size:e.unref(p),type:t.type,class:e.unref(r).e("caret-button"),disabled:t.disabled,tabindex:t.tabindex,"aria-label":"切换下拉菜单"}),{default:e.withCtx(()=>[e.createVNode(e.unref(K.VftIcon),{class:e.normalizeClass(e.unref(r).e("icon")),icon:"icon-arrow-down"},null,8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex"])]),_:3})):e.createCommentVNode("",!0)],2))}});exports.default=Z;
|
|
@@ -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"),o=require("../container/index.cjs");require("@vueuse/core");require("@vft/utils");require("../../utils/ns-cover.cjs");require("lodash-es");const s=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const n=e.defineComponent({name:"vft-footer-layout"}),l=e.defineComponent({...n,setup(u){const r=s.useNamespace("footer-layout");return(t,a)=>(e.openBlock(),e.createBlock(e.unref(o.VftFooter),{class:e.normalizeClass(e.unref(r).b())},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("left"))},[e.renderSlot(t.$slots,"left")],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("center"))},[e.renderSlot(t.$slots,"default")],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("right"))},[e.renderSlot(t.$slots,"right")],2)]),_:3},8,["class"]))}});exports.default=l;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
1
|
import type { FormItemProps, FormItemValidateState } from './types';
|
|
3
2
|
declare function __VLS_template(): {
|
|
4
3
|
label?(_: {
|
|
@@ -16,8 +15,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
16
15
|
showMessage: boolean;
|
|
17
16
|
}>>, {
|
|
18
17
|
size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
19
|
-
validateMessage: Ref<string, string>;
|
|
20
|
-
validateState: Ref<FormItemValidateState, FormItemValidateState>;
|
|
18
|
+
validateMessage: import("vue").Ref<string, string>;
|
|
19
|
+
validateState: import("vue").Ref<FormItemValidateState, FormItemValidateState>;
|
|
21
20
|
validate: (trigger: string, callback?: import("./types").FormValidateCallback) => import("./types").FormValidationResult;
|
|
22
21
|
clearValidate: () => void;
|
|
23
22
|
resetField: () => void;
|
|
@@ -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"),oe=require("@vueuse/core"),f=require("@vft/utils"),$=require("../../utils/helper.cjs");require("../../utils/ns-cover.cjs");const h=require("lodash-es"),le=require("../../hooks/use-id/index.cjs"),se=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const ae=require("async-validator"),x=require("./constants.cjs"),ne=require("./form-label-wrap.cjs"),ie=require("./hooks/use-form-common-props.cjs"),ue=["role","aria-labelledby"],de=e.defineComponent({name:"vft-form-item"}),ce=e.defineComponent({...de,props:{label:{},labelWidth:{default:""},labelPosition:{},prop:{},required:{type:Boolean,default:void 0},rules:{},error:{},for:{},validateStatus:{},inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{}},emits:["update:error"],setup(B,{expose:j,emit:A}){const r=B,E=A,z=e.useSlots(),l=e.inject(x.formContextKey,void 0),D=e.inject(x.formItemContextKey,void 0),b=ie.useFormSize(void 0,{formItem:!1}),a=se.useNamespace("form-item"),y=le.useId().value,d=e.ref([]),c=e.ref(""),L=oe.refDebounced(c,100),i=e.ref(""),k=e.ref();let F,v=!1;const g=e.computed(()=>r.labelPosition||l?.labelPosition),M=e.computed(()=>{if(g.value==="top")return{};const t=f.addUnit(r.labelWidth||l?.labelWidth||"");return t?{width:t}:{}}),T=e.computed(()=>{if(g.value==="top"||l?.inline)return{};if(!r.label&&!r.labelWidth&&O)return{};const t=f.addUnit(r.labelWidth||l?.labelWidth||"");return!r.label&&!z.label?{marginLeft:t}:{}}),K=e.computed(()=>[a.b(),a.m(b.value),a.is("error",c.value==="error"),a.is("validating",c.value==="validating"),a.is("success",c.value==="success"),a.is("required",Q.value||r.required),a.is("no-asterisk",l?.hideRequiredAsterisk),l?.requireAsteriskPosition==="right"?"asterisk-right":"asterisk-left",{[a.m("feedback")]:l?.statusIcon,[a.m(`label-${g.value}`)]:g.value}]),U=e.computed(()=>f.isBoolean(r.inlineMessage)?r.inlineMessage:l?.inlineMessage||!1),G=e.computed(()=>[a.e("error"),{[a.em("error","inline")]:U.value}]),P=e.computed(()=>r.prop?h.isArray(r.prop)?r.prop.join("."):r.prop:""),q=e.computed(()=>!!(r.label||z.label)),S=e.computed(()=>r.for??(d.value.length===1?d.value[0]:void 0)),C=e.computed(()=>!S.value&&q.value),O=!!D,V=e.computed(()=>{const t=l?.model;if(!(!t||!r.prop))return f.getProp(t,r.prop).value}),_=e.computed(()=>{const{required:t}=r,o=[];r.rules&&o.push(...$.castArray(r.rules).map(s=>(s.trigger=s.trigger||"blur",s)));const n=l?.rules;if(n&&r.prop){const s=f.getProp(n,r.prop).value;s&&o.push(...$.castArray(s))}if(t!==void 0){const s=o.map((u,m)=>[u,m]).filter(([u])=>Object.keys(u).includes("required"));if(s.length>0)for(const[u,m]of s)u.required!==t&&(o[m]={...u,required:t});else o.push({required:t})}return o}),H=e.computed(()=>_.value.length>0),J=t=>_.value.filter(n=>!n.trigger||!t?!0:h.isArray(n.trigger)?n.trigger.includes(t):n.trigger===t).map(({trigger:n,...s})=>s),Q=e.computed(()=>_.value.some(t=>t.required)),X=e.computed(()=>L.value==="error"&&r.showMessage&&(l?.showMessage??!0)),N=e.computed(()=>`${r.label||""}${l?.labelSuffix||""}`),p=t=>{c.value=t},Y=t=>{const{errors:o,fields:n}=t;(!o||!n)&&console.error(t),p("error"),i.value=o?o?.[0]?.message??`${r.prop} is required`:"",l?.emit("validate",r.prop,!1,i.value)},Z=()=>{p("success"),l?.emit("validate",r.prop,!0,"")},ee=async t=>{const o=P.value;return new ae({[o]:t}).validate({[o]:V.value},{firstFields:!0}).then(()=>(Z(),!0)).catch(s=>(Y(s),Promise.reject(s)))},R=async(t,o)=>{if(v||!r.prop)return!1;const n=f.isFunction(o);if(!H.value)return o?.(!1),!1;const s=J(t);return s.length===0?(o?.(!0),!0):(p("validating"),ee(s).then(()=>(o?.(!0),!0)).catch(u=>{const{fields:m}=u;return o?.(!1,m),n?!1:Promise.reject(m)}))},w=()=>{r.error&&E("update:error",""),p(""),i.value="",v=!1},W=async()=>{const t=l?.model;if(!t||!r.prop)return;const o=f.getProp(t,r.prop);v=!0,o.value=h.clone(F),await e.nextTick(),w(),v=!1},te=t=>{d.value.includes(t)||d.value.push(t)},re=t=>{d.value=d.value.filter(o=>o!==t)};e.watch(()=>r.error,t=>{i.value=t||"",p(t?"error":"")},{immediate:!0}),e.watch(()=>r.validateStatus,t=>p(t||""));const I=e.reactive({...e.toRefs(r),$el:k,size:b,validateMessage:i,validateState:c,labelId:y,inputIds:d,isGroup:C,hasLabel:q,fieldValue:V,addInputId:te,removeInputId:re,resetField:W,clearValidate:w,validate:R,propString:P});return e.provide(x.formItemContextKey,I),e.onMounted(()=>{r.prop&&(l?.addField(I),F=h.clone(V.value))}),e.onBeforeUnmount(()=>{l?.removeField(I)}),j({size:b,validateMessage:i,validateState:c,validate:R,clearValidate:w,resetField:W}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"formItemRef",ref:k,class:e.normalizeClass(K.value),role:C.value?"group":void 0,"aria-labelledby":C.value?e.unref(y):void 0},[e.createVNode(e.unref(ne.default),{"is-auto-width":M.value.width==="auto","update-all":e.unref(l)?.labelWidth==="auto"},{default:e.withCtx(()=>[q.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.value?"label":"div"),{key:0,id:e.unref(y),for:S.value,class:e.normalizeClass(e.unref(a).e("label")),style:e.normalizeStyle(M.value)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"label",{label:N.value},()=>[e.createTextVNode(e.toDisplayString(N.value),1)])]),_:3},8,["id","for","class","style"])):e.createCommentVNode("",!0)]),_:3},8,["is-auto-width","update-all"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("content")),style:e.normalizeStyle(T.value)},[e.renderSlot(t.$slots,"default"),e.createVNode(e.TransitionGroup,{name:`${e.unref(a).namespace.value}-zoom-in-top`},{default:e.withCtx(()=>[X.value?e.renderSlot(t.$slots,"error",{key:0,error:i.value},()=>[e.createElementVNode("div",{class:e.normalizeClass(G.value)},e.toDisplayString(i.value),3)]):e.createCommentVNode("",!0)]),_:3},8,["name"])],6)],10,ue))}});exports.default=ce;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("@vueuse/core");require("@vft/utils");const L=require("../../utils/error.cjs");require("../../utils/ns-cover.cjs");require("lodash-es");const q=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const m=require("./constants.cjs"),h="VftLabelWrap",C=e.defineComponent({name:h,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("@vueuse/core");require("@vft/utils");const L=require("../../utils/error.cjs");require("../../utils/ns-cover.cjs");require("lodash-es");const q=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const m=require("./constants.cjs"),h="VftLabelWrap",C=e.defineComponent({name:h,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(l,{slots:o}){const n=e.inject(m.formContextKey,void 0),u=e.inject(m.formItemContextKey);u||L.throwError(h,"usage: <vft-form-item><label-wrap /></vft-form-item>");const b=q.useNamespace("form"),r=e.ref(),a=e.ref(0),p=()=>{if(r.value?.firstElementChild){const t=window.getComputedStyle(r.value.firstElementChild).width;return Math.ceil(Number.parseFloat(t))}else return 0},d=(t="update")=>{e.nextTick(()=>{o.default&&l.isAutoWidth&&(t==="update"?a.value=p():t==="remove"&&n?.deregisterLabelWidth(a.value))})},s=()=>d("update");return e.onMounted(()=>{s()}),e.onBeforeUnmount(()=>{d("remove")}),e.onUpdated(()=>s()),e.watch(a,(t,i)=>{l.updateAll&&n?.registerLabelWidth(t,i)}),g.useResizeObserver(e.computed(()=>r.value?.firstElementChild??null),s),()=>{if(!o)return null;const{isAutoWidth:t}=l;if(t){const i=n?.autoLabelWidth,v=u?.hasLabel,c={};if(v&&i&&i!=="auto"){const f=Math.max(0,Number.parseInt(i,10)-a.value),W=(u.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";f&&(c[W]=`${f}px`)}return e.createVNode("div",{ref:r,class:[b.be("item","label-wrap")],style:c},[o.default?.()])}else return e.createVNode(e.Fragment,{ref:r},[o.default?.()])}}});exports.default=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue");require("@vueuse/core");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue");require("@vueuse/core");const E=require("@vft/utils"),d=require("../../utils/error.cjs");require("../../utils/ns-cover.cjs");require("lodash-es");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 W=require("./constants.cjs"),x=require("./hooks/use-form-common-props.cjs"),u=require("./utils.cjs"),M=r.defineComponent({name:"vft-form"}),R=r.defineComponent({...M,props:{size:{},disabled:{type:Boolean},model:{},rules:{},labelPosition:{default:"right"},requireAsteriskPosition:{default:"left"},labelWidth:{default:""},labelSuffix:{default:""},inline:{type:Boolean},inlineMessage:{type:Boolean},statusIcon:{type:Boolean},showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:{type:Boolean,default:!1},scrollToError:{type:Boolean},scrollIntoViewOptions:{type:Boolean,default:!0}},emits:["validate"],setup(o,{expose:p,emit:y}){const q=y,c=r.ref(),l=r.reactive([]),g=x.useFormSize(),s=k.useNamespace("form"),w=r.computed(()=>[s.b(),s.m(g.value||"default"),{[s.m(`label-${o.labelPosition}`)]:o.labelPosition,[s.m("inline")]:o.inline}]),m=e=>u.filterFields(l,[e])[0],B=e=>{l.push(e)},V=e=>{e.prop&&l.splice(l.indexOf(e),1)},h=(e=[])=>{if(!o.model){d.debugWarn(s.b(),"model is required for resetFields to work.");return}u.filterFields(l,e).forEach(t=>t.resetField())},v=(e=[])=>{u.filterFields(l,e).forEach(t=>t.clearValidate())},C=r.computed(()=>{const e=!!o.model;return e||d.debugWarn(s.b(),"model is required for validate to work."),e}),I=e=>{if(l.length===0)return[];const t=u.filterFields(l,e);return t.length?t:(d.debugWarn(s.b(),"please pass correct props!"),[])},F=async e=>f(void 0,e),O=async(e=[])=>{if(!C.value)return!1;const t=I(e);if(t.length===0)return!0;let i={};for(const n of t)try{await n.validate(""),n.validateState==="error"&&n.resetField()}catch(a){i={...i,...a}}return Object.keys(i).length===0?!0:Promise.reject(i)},f=async(e=[],t)=>{let i=!1;const n=!E.isFunction(t);try{return i=await O(e),i===!0&&await t?.(i),i}catch(a){if(a instanceof Error)throw a;const b=a;return o.scrollToError&&c.value&&c.value.querySelector(`.${s.b()}-item.is-error`)?.scrollIntoView(o.scrollIntoViewOptions),!i&&await t?.(!1,b),n&&Promise.reject(b)}},P=e=>{const t=m(e);t&&t.$el?.scrollIntoView(o.scrollIntoViewOptions)};r.watch(()=>o.rules,()=>{o.validateOnRuleChange&&F().catch(e=>d.debugWarn(e))},{deep:!0,flush:"post"});const S=r.getCurrentInstance();return r.provide(W.formContextKey,r.reactive({...S.props,emit:q,resetFields:h,clearValidate:v,validateField:f,getField:m,addField:B,removeField:V,...u.useFormLabelWidth()})),p({validate:F,validateField:f,resetFields:h,clearValidate:v,scrollToField:P}),(e,t)=>(r.openBlock(),r.createElementBlock("form",{ref_key:"formRef",ref:c,class:r.normalizeClass(w.value)},[r.renderSlot(e.$slots,"default")],2))}});exports.default=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@vueuse/core");require("@vft/utils");require("../../../utils/ns-cover.cjs");require("lodash-es");const e=require("vue");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@vueuse/core");require("@vft/utils");require("../../../utils/ns-cover.cjs");require("lodash-es");const e=require("vue");require("../../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");const a=require("../../../hooks/use-size/index.cjs");require("../../../hooks/use-z-index/index.cjs");const t=require("@vft/use"),i=require("../constants.cjs"),u=(s,o={})=>{const r=e.ref(void 0),c=o.prop?r:t.useProp("size"),d=o.global?r:a.useGlobalSize(),l=o.form?{size:void 0}:e.inject(i.formContextKey,void 0),m=o.formItem?{size:void 0}:e.inject(i.formItemContextKey,void 0);return e.computed(()=>c.value||e.unref(s)||m?.size||l?.size||d.value||"")},n=s=>{const o=t.useProp("disabled"),r=e.inject(i.formContextKey,void 0);return e.computed(()=>o.value||e.unref(s)||r?.disabled||!1)},f=u,b=n;exports.useDisabled=b;exports.useFormDisabled=n;exports.useFormSize=u;exports.useSize=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@vueuse/core");require("@vft/utils");require("../../../utils/ns-cover.cjs");require("lodash-es");const u=require("vue"),l=require("../../../hooks/use-id/index.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@vueuse/core");require("@vft/utils");require("../../../utils/ns-cover.cjs");require("lodash-es");const u=require("vue"),l=require("../../../hooks/use-id/index.cjs");require("../../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../../hooks/use-z-index/index.cjs");const s=require("../constants.cjs"),f=()=>{const t=u.inject(s.formContextKey,void 0),e=u.inject(s.formItemContextKey,void 0);return{form:t,formItem:e}},p=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:o})=>{n||(n=u.ref(!1)),o||(o=u.ref(!1));const r=u.ref();let c;const v=u.computed(()=>!!(!t.label&&e&&e.inputIds&&e.inputIds?.length<=1));return u.onMounted(()=>{c=u.watch([u.toRef(t,"id"),n],([I,d])=>{const i=I??(d?void 0:l.useId().value);i!==r.value&&(e?.removeInputId&&(r.value&&e.removeInputId(r.value),!o?.value&&!d&&i&&e.addInputId(i)),r.value=i)},{immediate:!0})}),u.onUnmounted(()=>{c&&c(),e?.removeInputId&&r.value&&e.removeInputId(r.value)}),{isLabeledByFormItem:v,inputId:r}};exports.useFormItem=f;exports.useFormItemInputId=p;
|
|
@@ -47,6 +47,9 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
47
47
|
scrollToError: {
|
|
48
48
|
type: import("vue").PropType<boolean>;
|
|
49
49
|
};
|
|
50
|
+
scrollIntoViewOptions: {
|
|
51
|
+
type: import("vue").PropType<boolean>;
|
|
52
|
+
};
|
|
50
53
|
}>> & Readonly<{
|
|
51
54
|
onValidate?: ((...args: any[]) => any) | undefined;
|
|
52
55
|
}>, {
|
|
@@ -110,6 +113,9 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
110
113
|
scrollToError: {
|
|
111
114
|
type: import("vue").PropType<boolean>;
|
|
112
115
|
};
|
|
116
|
+
scrollIntoViewOptions: {
|
|
117
|
+
type: import("vue").PropType<boolean>;
|
|
118
|
+
};
|
|
113
119
|
}>> & Readonly<{
|
|
114
120
|
onValidate?: ((...args: any[]) => any) | undefined;
|
|
115
121
|
}>, {
|
|
@@ -168,6 +174,9 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
168
174
|
scrollToError: {
|
|
169
175
|
type: import("vue").PropType<boolean>;
|
|
170
176
|
};
|
|
177
|
+
scrollIntoViewOptions: {
|
|
178
|
+
type: import("vue").PropType<boolean>;
|
|
179
|
+
};
|
|
171
180
|
}>> & Readonly<{
|
|
172
181
|
onValidate?: ((...args: any[]) => any) | undefined;
|
|
173
182
|
}>, {
|
|
@@ -201,18 +210,15 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
201
210
|
type: import("vue").PropType<boolean>;
|
|
202
211
|
default: undefined;
|
|
203
212
|
};
|
|
204
|
-
labelWidth: {
|
|
205
|
-
type: import("vue").PropType<string | number>;
|
|
206
|
-
default: string;
|
|
207
|
-
};
|
|
208
213
|
rules: {
|
|
209
214
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
210
215
|
};
|
|
211
|
-
|
|
212
|
-
type: import("vue").PropType<
|
|
216
|
+
labelPosition: {
|
|
217
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
213
218
|
};
|
|
214
|
-
|
|
215
|
-
type: import("vue").PropType<
|
|
219
|
+
labelWidth: {
|
|
220
|
+
type: import("vue").PropType<string | number>;
|
|
221
|
+
default: string;
|
|
216
222
|
};
|
|
217
223
|
inlineMessage: {
|
|
218
224
|
type: import("vue").PropType<string | boolean>;
|
|
@@ -222,6 +228,12 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
222
228
|
type: import("vue").PropType<boolean>;
|
|
223
229
|
default: boolean;
|
|
224
230
|
};
|
|
231
|
+
for: {
|
|
232
|
+
type: import("vue").PropType<string>;
|
|
233
|
+
};
|
|
234
|
+
validateStatus: {
|
|
235
|
+
type: import("vue").PropType<"" | "error" | "validating" | "success">;
|
|
236
|
+
};
|
|
225
237
|
}>> & Readonly<{
|
|
226
238
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
227
239
|
}>, {
|
|
@@ -262,18 +274,15 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
262
274
|
type: import("vue").PropType<boolean>;
|
|
263
275
|
default: undefined;
|
|
264
276
|
};
|
|
265
|
-
labelWidth: {
|
|
266
|
-
type: import("vue").PropType<string | number>;
|
|
267
|
-
default: string;
|
|
268
|
-
};
|
|
269
277
|
rules: {
|
|
270
278
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
271
279
|
};
|
|
272
|
-
|
|
273
|
-
type: import("vue").PropType<
|
|
280
|
+
labelPosition: {
|
|
281
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
274
282
|
};
|
|
275
|
-
|
|
276
|
-
type: import("vue").PropType<
|
|
283
|
+
labelWidth: {
|
|
284
|
+
type: import("vue").PropType<string | number>;
|
|
285
|
+
default: string;
|
|
277
286
|
};
|
|
278
287
|
inlineMessage: {
|
|
279
288
|
type: import("vue").PropType<string | boolean>;
|
|
@@ -283,6 +292,12 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
283
292
|
type: import("vue").PropType<boolean>;
|
|
284
293
|
default: boolean;
|
|
285
294
|
};
|
|
295
|
+
for: {
|
|
296
|
+
type: import("vue").PropType<string>;
|
|
297
|
+
};
|
|
298
|
+
validateStatus: {
|
|
299
|
+
type: import("vue").PropType<"" | "error" | "validating" | "success">;
|
|
300
|
+
};
|
|
286
301
|
}>> & Readonly<{
|
|
287
302
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
288
303
|
}>, {
|
|
@@ -318,18 +333,15 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
318
333
|
type: import("vue").PropType<boolean>;
|
|
319
334
|
default: undefined;
|
|
320
335
|
};
|
|
321
|
-
labelWidth: {
|
|
322
|
-
type: import("vue").PropType<string | number>;
|
|
323
|
-
default: string;
|
|
324
|
-
};
|
|
325
336
|
rules: {
|
|
326
337
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
327
338
|
};
|
|
328
|
-
|
|
329
|
-
type: import("vue").PropType<
|
|
339
|
+
labelPosition: {
|
|
340
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
330
341
|
};
|
|
331
|
-
|
|
332
|
-
type: import("vue").PropType<
|
|
342
|
+
labelWidth: {
|
|
343
|
+
type: import("vue").PropType<string | number>;
|
|
344
|
+
default: string;
|
|
333
345
|
};
|
|
334
346
|
inlineMessage: {
|
|
335
347
|
type: import("vue").PropType<string | boolean>;
|
|
@@ -339,6 +351,12 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
339
351
|
type: import("vue").PropType<boolean>;
|
|
340
352
|
default: boolean;
|
|
341
353
|
};
|
|
354
|
+
for: {
|
|
355
|
+
type: import("vue").PropType<string>;
|
|
356
|
+
};
|
|
357
|
+
validateStatus: {
|
|
358
|
+
type: import("vue").PropType<"" | "error" | "validating" | "success">;
|
|
359
|
+
};
|
|
342
360
|
}>> & Readonly<{
|
|
343
361
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
344
362
|
}>, {
|
|
@@ -385,18 +403,15 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
385
403
|
type: import("vue").PropType<boolean>;
|
|
386
404
|
default: undefined;
|
|
387
405
|
};
|
|
388
|
-
labelWidth: {
|
|
389
|
-
type: import("vue").PropType<string | number>;
|
|
390
|
-
default: string;
|
|
391
|
-
};
|
|
392
406
|
rules: {
|
|
393
407
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
394
408
|
};
|
|
395
|
-
|
|
396
|
-
type: import("vue").PropType<
|
|
409
|
+
labelPosition: {
|
|
410
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
397
411
|
};
|
|
398
|
-
|
|
399
|
-
type: import("vue").PropType<
|
|
412
|
+
labelWidth: {
|
|
413
|
+
type: import("vue").PropType<string | number>;
|
|
414
|
+
default: string;
|
|
400
415
|
};
|
|
401
416
|
inlineMessage: {
|
|
402
417
|
type: import("vue").PropType<string | boolean>;
|
|
@@ -406,6 +421,12 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
406
421
|
type: import("vue").PropType<boolean>;
|
|
407
422
|
default: boolean;
|
|
408
423
|
};
|
|
424
|
+
for: {
|
|
425
|
+
type: import("vue").PropType<string>;
|
|
426
|
+
};
|
|
427
|
+
validateStatus: {
|
|
428
|
+
type: import("vue").PropType<"" | "error" | "validating" | "success">;
|
|
429
|
+
};
|
|
409
430
|
}>> & Readonly<{
|
|
410
431
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
411
432
|
}>, {
|
|
@@ -446,18 +467,15 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
446
467
|
type: import("vue").PropType<boolean>;
|
|
447
468
|
default: undefined;
|
|
448
469
|
};
|
|
449
|
-
labelWidth: {
|
|
450
|
-
type: import("vue").PropType<string | number>;
|
|
451
|
-
default: string;
|
|
452
|
-
};
|
|
453
470
|
rules: {
|
|
454
471
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
455
472
|
};
|
|
456
|
-
|
|
457
|
-
type: import("vue").PropType<
|
|
473
|
+
labelPosition: {
|
|
474
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
458
475
|
};
|
|
459
|
-
|
|
460
|
-
type: import("vue").PropType<
|
|
476
|
+
labelWidth: {
|
|
477
|
+
type: import("vue").PropType<string | number>;
|
|
478
|
+
default: string;
|
|
461
479
|
};
|
|
462
480
|
inlineMessage: {
|
|
463
481
|
type: import("vue").PropType<string | boolean>;
|
|
@@ -467,6 +485,12 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
467
485
|
type: import("vue").PropType<boolean>;
|
|
468
486
|
default: boolean;
|
|
469
487
|
};
|
|
488
|
+
for: {
|
|
489
|
+
type: import("vue").PropType<string>;
|
|
490
|
+
};
|
|
491
|
+
validateStatus: {
|
|
492
|
+
type: import("vue").PropType<"" | "error" | "validating" | "success">;
|
|
493
|
+
};
|
|
470
494
|
}>> & Readonly<{
|
|
471
495
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
472
496
|
}>, {
|
|
@@ -502,18 +526,15 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
502
526
|
type: import("vue").PropType<boolean>;
|
|
503
527
|
default: undefined;
|
|
504
528
|
};
|
|
505
|
-
labelWidth: {
|
|
506
|
-
type: import("vue").PropType<string | number>;
|
|
507
|
-
default: string;
|
|
508
|
-
};
|
|
509
529
|
rules: {
|
|
510
530
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
511
531
|
};
|
|
512
|
-
|
|
513
|
-
type: import("vue").PropType<
|
|
532
|
+
labelPosition: {
|
|
533
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
514
534
|
};
|
|
515
|
-
|
|
516
|
-
type: import("vue").PropType<
|
|
535
|
+
labelWidth: {
|
|
536
|
+
type: import("vue").PropType<string | number>;
|
|
537
|
+
default: string;
|
|
517
538
|
};
|
|
518
539
|
inlineMessage: {
|
|
519
540
|
type: import("vue").PropType<string | boolean>;
|
|
@@ -523,6 +544,12 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
523
544
|
type: import("vue").PropType<boolean>;
|
|
524
545
|
default: boolean;
|
|
525
546
|
};
|
|
547
|
+
for: {
|
|
548
|
+
type: import("vue").PropType<string>;
|
|
549
|
+
};
|
|
550
|
+
validateStatus: {
|
|
551
|
+
type: import("vue").PropType<"" | "error" | "validating" | "success">;
|
|
552
|
+
};
|
|
526
553
|
}>> & Readonly<{
|
|
527
554
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
528
555
|
}>, {
|
|
@@ -17,7 +17,8 @@ export interface FormValidateFailure {
|
|
|
17
17
|
fields: ValidateFieldsError;
|
|
18
18
|
}
|
|
19
19
|
export type FormContext = FormProps & UnwrapRef<FormLabelWidthContext> & {
|
|
20
|
-
emit: SetupContext['emit'];
|
|
20
|
+
emit: SetupContext<any>['emit'];
|
|
21
|
+
getField: (prop: FormItemProp) => FormItemContext | undefined;
|
|
21
22
|
addField: (field: FormItemContext) => void;
|
|
22
23
|
removeField: (field: FormItemContext) => void;
|
|
23
24
|
resetFields: (props?: Arrayable<FormItemProp>) => void;
|
|
@@ -27,11 +28,14 @@ export type FormContext = FormProps & UnwrapRef<FormLabelWidthContext> & {
|
|
|
27
28
|
export interface FormItemContext extends FormItemProps {
|
|
28
29
|
$el: HTMLDivElement | undefined;
|
|
29
30
|
size: ComponentSize;
|
|
31
|
+
validateMessage: string;
|
|
30
32
|
validateState: FormItemValidateState;
|
|
31
33
|
isGroup: boolean;
|
|
32
34
|
labelId: string;
|
|
33
35
|
inputIds: string[];
|
|
34
36
|
hasLabel: boolean;
|
|
37
|
+
fieldValue: any;
|
|
38
|
+
propString: string;
|
|
35
39
|
addInputId: (id: string) => void;
|
|
36
40
|
removeInputId: (id: string) => void;
|
|
37
41
|
validate: (trigger: string, callback?: FormValidateCallback) => FormValidationResult;
|
|
@@ -54,10 +58,12 @@ export interface FormProps {
|
|
|
54
58
|
validateOnRuleChange?: boolean;
|
|
55
59
|
hideRequiredAsterisk?: boolean;
|
|
56
60
|
scrollToError?: boolean;
|
|
61
|
+
scrollIntoViewOptions?: boolean;
|
|
57
62
|
}
|
|
58
63
|
export interface FormItemProps {
|
|
59
64
|
label?: string;
|
|
60
65
|
labelWidth?: string | number;
|
|
66
|
+
labelPosition?: 'left' | 'right' | 'top';
|
|
61
67
|
prop?: string | string[];
|
|
62
68
|
required?: boolean;
|
|
63
69
|
rules?: Arrayable<FormItemRule>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@vueuse/core");require("@vft/utils")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue");require("@vueuse/core");const l=require("@vft/utils"),a=require("../../utils/error.cjs"),d=require("../../utils/helper.cjs");require("../../utils/ns-cover.cjs");require("lodash-es");const f="vft-form";function h(){const t=o.ref([]),u=o.computed(()=>{if(!t.value.length)return"0";const e=Math.max(...t.value);return e?`${e}px`:""});function n(e){const i=t.value.indexOf(e);return i===-1&&u.value==="0"&&a.debugWarn(f,`unexpected width ${e}`),i}function r(e,i){if(e&&i){const c=n(i);t.value.splice(c,1,e)}else e&&t.value.push(e)}function s(e){const i=n(e);i>-1&&t.value.splice(i,1)}return{autoLabelWidth:u,registerLabelWidth:r,deregisterLabelWidth:s}}const b=(t,u)=>{const n=d.castArray(u).map(r=>l.isArray(r)?r.join("."):r);return n.length>0?t.filter(r=>r.propString&&n.includes(r.propString)):t};exports.filterFields=b;exports.useFormLabelWidth=h;
|