@sheinx/base 3.0.0-alpha.30 → 3.0.0-alpha.32
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/cjs/absolute-list/absolute-context.js +1 -2
- package/cjs/absolute-list/absolute-list.d.ts +3 -1
- package/cjs/absolute-list/absolute-list.d.ts.map +1 -1
- package/cjs/absolute-list/absolute-list.js +10 -15
- package/cjs/absolute-list/absolute-list.type.d.ts +2 -2
- package/cjs/absolute-list/absolute-list.type.d.ts.map +1 -1
- package/cjs/absolute-list/index.js +2 -2
- package/cjs/absolute-list/use-container.js +7 -14
- package/cjs/alert/alert-icon.js +11 -13
- package/cjs/alert/alert.js +24 -23
- package/cjs/alert/alert.type.d.ts +1 -1
- package/cjs/alert/alert.type.d.ts.map +1 -1
- package/cjs/alert/index.js +2 -2
- package/cjs/animation-list/animation-list.js +20 -25
- package/cjs/animation-list/animation-list.type.d.ts +1 -1
- package/cjs/animation-list/animation-list.type.d.ts.map +1 -1
- package/cjs/animation-list/index.js +2 -2
- package/cjs/breadcrumb/breadcrumb.js +16 -15
- package/cjs/breadcrumb/breadcrumb.type.d.ts +1 -1
- package/cjs/breadcrumb/breadcrumb.type.d.ts.map +1 -1
- package/cjs/breadcrumb/index.js +2 -2
- package/cjs/breadcrumb/list.js +18 -16
- package/cjs/button/button-group.js +6 -12
- package/cjs/button/button-item.js +3 -4
- package/cjs/button/button.js +13 -13
- package/cjs/button/button.type.d.ts +1 -1
- package/cjs/button/button.type.d.ts.map +1 -1
- package/cjs/button/index.js +2 -2
- package/cjs/card/card-accordion-context.js +3 -5
- package/cjs/card/card-accordion.js +11 -7
- package/cjs/card/card-body.js +3 -4
- package/cjs/card/card-footer.js +3 -4
- package/cjs/card/card-header.js +4 -5
- package/cjs/card/card.context.js +3 -4
- package/cjs/card/card.js +17 -16
- package/cjs/card/index.js +2 -2
- package/cjs/card-group/card-group-context.js +2 -3
- package/cjs/card-group/card-group.js +9 -10
- package/cjs/card-group/index.js +2 -2
- package/cjs/card-group/item.js +6 -10
- package/cjs/card-group/lazyload.js +11 -11
- package/cjs/carousel/carousel.js +13 -17
- package/cjs/carousel/carousel.type.d.ts +0 -1
- package/cjs/carousel/carousel.type.d.ts.map +1 -1
- package/cjs/carousel/index.js +2 -2
- package/cjs/cascader/cascader.d.ts.map +1 -1
- package/cjs/cascader/cascader.js +45 -46
- package/cjs/cascader/cascader.type.d.ts +4 -1
- package/cjs/cascader/cascader.type.d.ts.map +1 -1
- package/cjs/cascader/filter-list.js +3 -6
- package/cjs/cascader/filter-node.js +3 -6
- package/cjs/cascader/index.js +2 -2
- package/cjs/cascader/list.js +3 -5
- package/cjs/cascader/node.d.ts.map +1 -1
- package/cjs/cascader/node.js +26 -18
- package/cjs/checkbox/checkbox-group.js +3 -5
- package/cjs/checkbox/checkbox.js +14 -14
- package/cjs/checkbox/group-context.d.ts +1 -1
- package/cjs/checkbox/group-context.d.ts.map +1 -1
- package/cjs/checkbox/group-context.js +1 -2
- package/cjs/checkbox/index.js +2 -2
- package/cjs/checkbox/simple-checkbox.js +12 -12
- package/cjs/checkbox/use-checkbox-inputable.js +10 -7
- package/cjs/collapse/collapse-item.js +10 -15
- package/cjs/collapse/collapse.js +3 -4
- package/cjs/collapse/group-context.d.ts +1 -1
- package/cjs/collapse/group-context.d.ts.map +1 -1
- package/cjs/collapse/group-context.js +1 -2
- package/cjs/collapse/index.js +2 -2
- package/cjs/common/use-clear.js +2 -3
- package/cjs/common/use-inner-title.js +13 -12
- package/cjs/common/use-tip.js +8 -9
- package/cjs/common/use-with-form-config.js +8 -11
- package/cjs/config/index.d.ts +1 -4
- package/cjs/config/index.d.ts.map +1 -1
- package/cjs/config/index.js +18 -18
- package/cjs/config/locale/Props.d.ts +4 -4
- package/cjs/config/locale/Props.d.ts.map +1 -1
- package/cjs/config/locale/en_US.js +2 -3
- package/cjs/config/locale/index.js +3 -3
- package/cjs/config/locale/zh-CN.js +2 -3
- package/cjs/date-picker/date-picker.d.ts.map +1 -1
- package/cjs/date-picker/date-picker.js +26 -27
- package/cjs/date-picker/date-picker.type.d.ts +2 -2
- package/cjs/date-picker/date-picker.type.d.ts.map +1 -1
- package/cjs/date-picker/day.js +15 -21
- package/cjs/date-picker/index.js +2 -2
- package/cjs/date-picker/month.js +5 -9
- package/cjs/date-picker/month.type.d.ts +1 -1
- package/cjs/date-picker/month.type.d.ts.map +1 -1
- package/cjs/date-picker/picker.js +9 -11
- package/cjs/date-picker/pickerTitle.js +2 -3
- package/cjs/date-picker/quarter.js +5 -9
- package/cjs/date-picker/quarter.type.d.ts +1 -1
- package/cjs/date-picker/quarter.type.d.ts.map +1 -1
- package/cjs/date-picker/quick.js +3 -5
- package/cjs/date-picker/result.js +17 -17
- package/cjs/date-picker/time.js +7 -12
- package/cjs/date-picker/year.js +5 -9
- package/cjs/date-picker/year.type.d.ts +1 -1
- package/cjs/date-picker/year.type.d.ts.map +1 -1
- package/cjs/descriptions/descriptions.js +11 -18
- package/cjs/descriptions/descriptions.type.d.ts +1 -1
- package/cjs/descriptions/descriptions.type.d.ts.map +1 -1
- package/cjs/descriptions/index.js +2 -2
- package/cjs/divider/divider.js +3 -4
- package/cjs/divider/index.js +2 -2
- package/cjs/dropdown/Item.js +23 -27
- package/cjs/dropdown/dropdown.js +8 -9
- package/cjs/dropdown/dropdown.type.d.ts +5 -5
- package/cjs/dropdown/dropdown.type.d.ts.map +1 -1
- package/cjs/dropdown/dropdown.type.js +2 -2
- package/cjs/dropdown/dropdownIn.d.ts.map +1 -1
- package/cjs/dropdown/dropdownIn.js +11 -14
- package/cjs/dropdown/index.d.ts +1 -1
- package/cjs/dropdown/index.d.ts.map +1 -1
- package/cjs/dropdown/index.js +2 -2
- package/cjs/editable-area/editable-area.d.ts.map +1 -1
- package/cjs/editable-area/editable-area.js +21 -22
- package/cjs/editable-area/index.js +2 -2
- package/cjs/empty/empty-image.js +2 -3
- package/cjs/empty/empty.js +12 -13
- package/cjs/empty/index.js +2 -2
- package/cjs/form/error-trans.js +2 -6
- package/cjs/form/form-button.js +8 -9
- package/cjs/form/form-field.js +2 -4
- package/cjs/form/form-field.type.d.ts +1 -1
- package/cjs/form/form-field.type.d.ts.map +1 -1
- package/cjs/form/form-fieldset.js +2 -8
- package/cjs/form/form-flow.js +1 -2
- package/cjs/form/form-footer-context.js +14 -16
- package/cjs/form/form-item.js +13 -14
- package/cjs/form/form.d.ts +1 -1
- package/cjs/form/form.d.ts.map +1 -1
- package/cjs/form/form.js +16 -20
- package/cjs/form/form.type.js +1 -2
- package/cjs/form/index.js +2 -2
- package/cjs/gap/gap.js +9 -11
- package/cjs/gap/index.js +2 -2
- package/cjs/grid/grid.js +13 -19
- package/cjs/grid/grid.type.d.ts +1 -1
- package/cjs/grid/grid.type.d.ts.map +1 -1
- package/cjs/grid/index.js +2 -2
- package/cjs/grid/util.d.ts +1 -1
- package/cjs/grid/util.d.ts.map +1 -1
- package/cjs/grid/util.js +0 -3
- package/cjs/icon/icon.js +12 -14
- package/cjs/icon/icon.type.d.ts +1 -1
- package/cjs/icon/icon.type.d.ts.map +1 -1
- package/cjs/icon/index.js +2 -2
- package/cjs/icons/config.d.ts +144 -0
- package/cjs/icons/config.d.ts.map +1 -0
- package/cjs/icons/config.js +164 -0
- package/cjs/icons/icons.d.ts +46 -0
- package/cjs/icons/icons.d.ts.map +1 -0
- package/cjs/icons/icons.js +184 -0
- package/cjs/icons/index.d.ts +1 -47
- package/cjs/icons/index.d.ts.map +1 -1
- package/cjs/icons/index.js +14 -187
- package/cjs/image/image-event.js +3 -4
- package/cjs/image/image-gallery.js +14 -15
- package/cjs/image/image-group.d.ts.map +1 -1
- package/cjs/image/image-group.js +16 -22
- package/cjs/image/image-magnify.js +10 -11
- package/cjs/image/image.js +19 -23
- package/cjs/image/image.type.d.ts +4 -4
- package/cjs/image/image.type.d.ts.map +1 -1
- package/cjs/image/index.js +2 -2
- package/cjs/index.d.ts +1 -1
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +4 -6
- package/cjs/input/index.js +2 -2
- package/cjs/input/input-group.js +26 -27
- package/cjs/input/input-number.js +16 -16
- package/cjs/input/input-number.type.d.ts +1 -1
- package/cjs/input/input-number.type.d.ts.map +1 -1
- package/cjs/input/input-password.js +10 -11
- package/cjs/input/input.js +8 -10
- package/cjs/input/input.type.d.ts +1 -1
- package/cjs/input/input.type.d.ts.map +1 -1
- package/cjs/input/simple-input.js +16 -16
- package/cjs/input/use-input-common.d.ts +1 -1
- package/cjs/input/use-input-common.js +22 -22
- package/cjs/list/base-item.js +14 -15
- package/cjs/list/index.js +2 -2
- package/cjs/list/list.d.ts.map +1 -1
- package/cjs/list/list.js +16 -21
- package/cjs/menu/index.js +2 -2
- package/cjs/menu/item.d.ts.map +1 -1
- package/cjs/menu/item.js +11 -13
- package/cjs/menu/menu.js +16 -13
- package/cjs/menu/menu.type.d.ts +2 -2
- package/cjs/menu/menu.type.d.ts.map +1 -1
- package/cjs/menu/scroll.js +10 -6
- package/cjs/menu/scrollbar.js +3 -4
- package/cjs/message/func.js +2 -4
- package/cjs/message/func.type.d.ts +2 -2
- package/cjs/message/func.type.d.ts.map +1 -1
- package/cjs/message/index.js +2 -2
- package/cjs/message/manager.d.ts.map +1 -1
- package/cjs/message/manager.js +6 -7
- package/cjs/message/message.js +45 -43
- package/cjs/modal/index.js +2 -2
- package/cjs/modal/modal-content.js +25 -27
- package/cjs/modal/modal-func.d.ts +1 -1
- package/cjs/modal/modal-func.d.ts.map +1 -1
- package/cjs/modal/modal-func.js +19 -17
- package/cjs/modal/modal-submit.js +10 -11
- package/cjs/modal/modal.js +15 -11
- package/cjs/modal/modal.type.d.ts +1 -1
- package/cjs/modal/modal.type.d.ts.map +1 -1
- package/cjs/modal/use-modal-move.js +15 -12
- package/cjs/modal/use-modal-resize.js +9 -6
- package/cjs/pagination/index.js +2 -2
- package/cjs/pagination/pagination-button.js +11 -12
- package/cjs/pagination/pagination-buttons.js +20 -17
- package/cjs/pagination/pagination-buttons.type.d.ts +2 -2
- package/cjs/pagination/pagination-buttons.type.d.ts.map +1 -1
- package/cjs/pagination/pagination-jumper.js +10 -8
- package/cjs/pagination/pagination-next.d.ts.map +1 -1
- package/cjs/pagination/pagination-next.js +4 -5
- package/cjs/pagination/pagination-prev.d.ts.map +1 -1
- package/cjs/pagination/pagination-prev.js +4 -5
- package/cjs/pagination/pagination-simple.js +2 -3
- package/cjs/pagination/pagination-size-list.js +3 -5
- package/cjs/pagination/pagination.d.ts.map +1 -1
- package/cjs/pagination/pagination.js +10 -13
- package/cjs/pagination/pagination.type.d.ts +2 -2
- package/cjs/pagination/pagination.type.d.ts.map +1 -1
- package/cjs/popover/confirm.js +24 -23
- package/cjs/popover/confirm.type.d.ts +2 -2
- package/cjs/popover/confirm.type.d.ts.map +1 -1
- package/cjs/popover/index.js +2 -2
- package/cjs/popover/popover.js +14 -19
- package/cjs/progress/analyzeColor.js +2 -4
- package/cjs/progress/circle.js +5 -8
- package/cjs/progress/index.js +2 -2
- package/cjs/progress/line-popup.js +8 -8
- package/cjs/progress/line.js +5 -8
- package/cjs/progress/progress.js +8 -9
- package/cjs/radio/group-context.d.ts +1 -1
- package/cjs/radio/group-context.d.ts.map +1 -1
- package/cjs/radio/group-context.js +1 -2
- package/cjs/radio/index.js +2 -2
- package/cjs/radio/radio-group.js +9 -11
- package/cjs/radio/radio.js +12 -12
- package/cjs/radio/simple-radio.js +12 -12
- package/cjs/rate/index.js +2 -2
- package/cjs/rate/rate.js +16 -17
- package/cjs/select/index.js +2 -2
- package/cjs/select/list-columns-option.js +3 -4
- package/cjs/select/list-columns.js +3 -9
- package/cjs/select/list-option.js +11 -9
- package/cjs/select/list-tree.js +3 -4
- package/cjs/select/list.js +23 -20
- package/cjs/select/result-input.d.ts.map +1 -1
- package/cjs/select/result-input.js +8 -17
- package/cjs/select/result-input.type.d.ts +3 -0
- package/cjs/select/result-input.type.d.ts.map +1 -1
- package/cjs/select/result-more.d.ts.map +1 -1
- package/cjs/select/result-more.js +20 -22
- package/cjs/select/result-more.type.d.ts +4 -0
- package/cjs/select/result-more.type.d.ts.map +1 -1
- package/cjs/select/result.d.ts.map +1 -1
- package/cjs/select/result.js +23 -29
- package/cjs/select/result.type.d.ts +14 -1
- package/cjs/select/result.type.d.ts.map +1 -1
- package/cjs/select/select.d.ts.map +1 -1
- package/cjs/select/select.js +47 -44
- package/cjs/select/select.type.d.ts +6 -6
- package/cjs/select/select.type.d.ts.map +1 -1
- package/cjs/slider/index.js +2 -2
- package/cjs/slider/slider.js +9 -11
- package/cjs/spin/base.js +9 -11
- package/cjs/spin/index.js +2 -2
- package/cjs/spin/spin.js +11 -12
- package/cjs/spin/spin.type.d.ts +2 -2
- package/cjs/spin/spin.type.d.ts.map +1 -1
- package/cjs/spin/spins.js +25 -27
- package/cjs/spin/utils.js +2 -4
- package/cjs/steps/index.js +2 -2
- package/cjs/steps/step.arrow.d.ts.map +1 -1
- package/cjs/steps/step.arrow.js +8 -7
- package/cjs/steps/step.default.d.ts.map +1 -1
- package/cjs/steps/step.default.js +13 -11
- package/cjs/steps/step.dot.d.ts.map +1 -1
- package/cjs/steps/step.dot.js +11 -9
- package/cjs/steps/step.js +13 -15
- package/cjs/steps/steps-context.js +1 -2
- package/cjs/steps/steps.js +9 -8
- package/cjs/steps/steps.type.d.ts +3 -3
- package/cjs/steps/steps.type.d.ts.map +1 -1
- package/cjs/sticky/index.js +2 -2
- package/cjs/sticky/sticky.js +18 -20
- package/cjs/switch/index.js +2 -2
- package/cjs/switch/switch.js +16 -12
- package/cjs/table/colgroup.js +1 -3
- package/cjs/table/index.js +2 -2
- package/cjs/table/table.js +15 -19
- package/cjs/table/table.type.d.ts +7 -7
- package/cjs/table/table.type.d.ts.map +1 -1
- package/cjs/table/tbody.js +3 -5
- package/cjs/table/tbody.type.d.ts +2 -2
- package/cjs/table/tbody.type.d.ts.map +1 -1
- package/cjs/table/temp/01-base.d.ts.map +1 -1
- package/cjs/table/temp/01-base.js +22 -14
- package/cjs/table/tfoot.js +4 -7
- package/cjs/table/thead.js +16 -24
- package/cjs/table/thead.type.d.ts +1 -1
- package/cjs/table/thead.type.d.ts.map +1 -1
- package/cjs/table/tr.js +16 -23
- package/cjs/table/use-table-select.js +6 -9
- package/cjs/tabs/index.js +2 -2
- package/cjs/tabs/tab.js +10 -11
- package/cjs/tabs/tabs-header.js +21 -19
- package/cjs/tabs/tabs-panel.js +8 -6
- package/cjs/tabs/tabs.js +24 -26
- package/cjs/tabs/tabs.type.d.ts +2 -2
- package/cjs/tabs/tabs.type.d.ts.map +1 -1
- package/cjs/tag/index.js +2 -2
- package/cjs/tag/tag-input.js +9 -10
- package/cjs/tag/tag.js +14 -14
- package/cjs/tag/tag.type.d.ts +7 -7
- package/cjs/tag/tag.type.d.ts.map +1 -1
- package/cjs/tag/use-tag.js +11 -8
- package/cjs/textarea/index.js +2 -2
- package/cjs/textarea/simple-textarea.js +17 -21
- package/cjs/textarea/textarea.js +22 -23
- package/cjs/textarea/textarea.type.d.ts +1 -6
- package/cjs/textarea/textarea.type.d.ts.map +1 -1
- package/cjs/textarea/use-auto-size.js +13 -12
- package/cjs/tooltip/index.js +2 -2
- package/cjs/tooltip/tooltip.js +11 -16
- package/cjs/transfer/index.js +2 -2
- package/cjs/transfer/transfer-list-header.d.ts.map +1 -1
- package/cjs/transfer/transfer-list-header.js +9 -10
- package/cjs/transfer/transfer-list-item.d.ts.map +1 -1
- package/cjs/transfer/transfer-list-item.js +7 -6
- package/cjs/transfer/transfer-list.js +13 -14
- package/cjs/transfer/transfer-operate.js +2 -4
- package/cjs/transfer/transfer.js +11 -10
- package/cjs/transfer/transfer.type.d.ts +2 -2
- package/cjs/transfer/transfer.type.d.ts.map +1 -1
- package/cjs/tree/index.js +2 -2
- package/cjs/tree/tree-checkbox.d.ts +2 -1
- package/cjs/tree/tree-checkbox.d.ts.map +1 -1
- package/cjs/tree/tree-checkbox.js +4 -3
- package/cjs/tree/tree-checkbox.type.d.ts +2 -2
- package/cjs/tree/tree-checkbox.type.d.ts.map +1 -1
- package/cjs/tree/tree-content.d.ts +2 -1
- package/cjs/tree/tree-content.d.ts.map +1 -1
- package/cjs/tree/tree-content.js +12 -14
- package/cjs/tree/tree-content.type.d.ts +2 -2
- package/cjs/tree/tree-content.type.d.ts.map +1 -1
- package/cjs/tree/tree-context.d.ts +4 -3
- package/cjs/tree/tree-context.d.ts.map +1 -1
- package/cjs/tree/tree-context.js +8 -14
- package/cjs/tree/tree-context.type.d.ts +2 -2
- package/cjs/tree/tree-context.type.d.ts.map +1 -1
- package/cjs/tree/tree-list.d.ts +1 -1
- package/cjs/tree/tree-list.d.ts.map +1 -1
- package/cjs/tree/tree-list.js +4 -4
- package/cjs/tree/tree-list.type.d.ts +3 -3
- package/cjs/tree/tree-list.type.d.ts.map +1 -1
- package/cjs/tree/tree-node.d.ts +1 -1
- package/cjs/tree/tree-node.d.ts.map +1 -1
- package/cjs/tree/tree-node.js +10 -11
- package/cjs/tree/tree-node.type.d.ts +3 -3
- package/cjs/tree/tree-node.type.d.ts.map +1 -1
- package/cjs/tree/tree-root.d.ts +1 -1
- package/cjs/tree/tree-root.d.ts.map +1 -1
- package/cjs/tree/tree-root.js +11 -11
- package/cjs/tree/tree-root.type.d.ts +3 -3
- package/cjs/tree/tree-root.type.d.ts.map +1 -1
- package/cjs/tree/tree.d.ts +2 -1
- package/cjs/tree/tree.d.ts.map +1 -1
- package/cjs/tree/tree.js +19 -21
- package/cjs/tree/tree.type.d.ts +4 -4
- package/cjs/tree/tree.type.d.ts.map +1 -1
- package/cjs/tree-select/index.js +2 -2
- package/cjs/tree-select/tree-select.d.ts +1 -1
- package/cjs/tree-select/tree-select.d.ts.map +1 -1
- package/cjs/tree-select/tree-select.js +35 -36
- package/cjs/tree-select/tree-select.type.d.ts +6 -5
- package/cjs/tree-select/tree-select.type.d.ts.map +1 -1
- package/cjs/upload/button.js +18 -18
- package/cjs/upload/button.type.d.ts +1 -1
- package/cjs/upload/button.type.d.ts.map +1 -1
- package/cjs/upload/drop.js +16 -19
- package/cjs/upload/image.js +8 -9
- package/cjs/upload/index.js +2 -2
- package/cjs/upload/result.js +24 -24
- package/cjs/upload/upload.d.ts.map +1 -1
- package/cjs/upload/upload.js +12 -22
- package/cjs/upload/useInputClick.js +2 -3
- package/cjs/virtual-scroll/index.js +2 -2
- package/cjs/virtual-scroll/scroll.js +9 -15
- package/cjs/virtual-scroll/virtual-scroll-list.js +20 -22
- package/cjs/virtual-scroll/virtual-scroll-list.type.d.ts +1 -1
- package/cjs/virtual-scroll/virtual-scroll-list.type.d.ts.map +1 -1
- package/esm/absolute-list/absolute-context.js +3 -9
- package/esm/absolute-list/absolute-list.d.ts +3 -1
- package/esm/absolute-list/absolute-list.d.ts.map +1 -1
- package/esm/absolute-list/absolute-list.js +20 -34
- package/esm/absolute-list/absolute-list.type.d.ts +2 -2
- package/esm/absolute-list/absolute-list.type.d.ts.map +1 -1
- package/esm/absolute-list/absolute-list.type.js +1 -5
- package/esm/absolute-list/index.js +1 -19
- package/esm/absolute-list/use-container.js +19 -35
- package/esm/alert/alert-icon.js +15 -24
- package/esm/alert/alert.js +39 -46
- package/esm/alert/alert.type.d.ts +1 -1
- package/esm/alert/alert.type.d.ts.map +1 -1
- package/esm/alert/alert.type.js +1 -5
- package/esm/alert/index.js +1 -19
- package/esm/animation-list/animation-list.js +30 -43
- package/esm/animation-list/animation-list.type.d.ts +1 -1
- package/esm/animation-list/animation-list.type.d.ts.map +1 -1
- package/esm/animation-list/animation-list.type.js +1 -5
- package/esm/animation-list/index.js +1 -19
- package/esm/breadcrumb/breadcrumb.js +35 -39
- package/esm/breadcrumb/breadcrumb.type.d.ts +1 -1
- package/esm/breadcrumb/breadcrumb.type.d.ts.map +1 -1
- package/esm/breadcrumb/breadcrumb.type.js +1 -5
- package/esm/breadcrumb/index.js +1 -19
- package/esm/breadcrumb/list.js +34 -38
- package/esm/button/button-group.js +10 -26
- package/esm/button/button-item.js +4 -12
- package/esm/button/button.js +26 -32
- package/esm/button/button.type.d.ts +1 -1
- package/esm/button/button.type.d.ts.map +1 -1
- package/esm/button/button.type.js +1 -5
- package/esm/button/index.js +2 -26
- package/esm/card/card-accordion-context.js +3 -11
- package/esm/card/card-accordion.js +23 -26
- package/esm/card/card-accordion.type.js +1 -5
- package/esm/card/card-body.js +11 -19
- package/esm/card/card-body.type.js +1 -5
- package/esm/card/card-footer.js +9 -17
- package/esm/card/card-footer.type.js +1 -5
- package/esm/card/card-header.js +17 -24
- package/esm/card/card-header.type.js +1 -5
- package/esm/card/card.context.js +3 -10
- package/esm/card/card.js +43 -47
- package/esm/card/card.type.js +1 -5
- package/esm/card/index.js +6 -54
- package/esm/card-group/card-group-context.js +3 -9
- package/esm/card-group/card-group.js +22 -30
- package/esm/card-group/card-group.type.js +1 -5
- package/esm/card-group/index.js +2 -26
- package/esm/card-group/item.js +18 -30
- package/esm/card-group/item.type.js +1 -5
- package/esm/card-group/lazyload.js +19 -27
- package/esm/carousel/carousel.js +45 -54
- package/esm/carousel/carousel.type.d.ts +0 -1
- package/esm/carousel/carousel.type.d.ts.map +1 -1
- package/esm/carousel/carousel.type.js +1 -5
- package/esm/carousel/index.js +1 -19
- package/esm/cascader/cascader.d.ts.map +1 -1
- package/esm/cascader/cascader.js +119 -127
- package/esm/cascader/cascader.type.d.ts +4 -1
- package/esm/cascader/cascader.type.d.ts.map +1 -1
- package/esm/cascader/cascader.type.js +1 -5
- package/esm/cascader/filter-list.js +13 -23
- package/esm/cascader/filter-list.type.js +1 -5
- package/esm/cascader/filter-node.js +12 -22
- package/esm/cascader/filter-node.type.js +1 -5
- package/esm/cascader/index.js +1 -19
- package/esm/cascader/list.js +9 -18
- package/esm/cascader/list.type.js +1 -5
- package/esm/cascader/node.d.ts.map +1 -1
- package/esm/cascader/node.js +47 -45
- package/esm/cascader/node.type.js +1 -5
- package/esm/checkbox/checkbox-group.js +21 -29
- package/esm/checkbox/checkbox-group.type.js +1 -5
- package/esm/checkbox/checkbox.js +28 -35
- package/esm/checkbox/checkbox.type.js +1 -5
- package/esm/checkbox/group-context.d.ts +1 -1
- package/esm/checkbox/group-context.d.ts.map +1 -1
- package/esm/checkbox/group-context.js +3 -9
- package/esm/checkbox/index.js +2 -26
- package/esm/checkbox/simple-checkbox.js +30 -36
- package/esm/checkbox/use-checkbox-inputable.js +12 -15
- package/esm/collapse/collapse-item.js +28 -41
- package/esm/collapse/collapse-item.type.js +1 -5
- package/esm/collapse/collapse.js +12 -20
- package/esm/collapse/collapse.type.js +1 -5
- package/esm/collapse/group-context.d.ts +1 -1
- package/esm/collapse/group-context.d.ts.map +1 -1
- package/esm/collapse/group-context.js +3 -9
- package/esm/collapse/index.js +2 -26
- package/esm/common/type.js +1 -5
- package/esm/common/use-clear.js +4 -11
- package/esm/common/use-inner-title.js +26 -34
- package/esm/common/use-tip.js +14 -20
- package/esm/common/use-with-form-config.js +10 -19
- package/esm/config/index.d.ts +1 -4
- package/esm/config/index.d.ts.map +1 -1
- package/esm/config/index.js +24 -45
- package/esm/config/locale/Props.d.ts +4 -4
- package/esm/config/locale/Props.d.ts.map +1 -1
- package/esm/config/locale/Props.js +1 -5
- package/esm/config/locale/en_US.js +2 -9
- package/esm/config/locale/index.js +17 -25
- package/esm/config/locale/zh-CN.js +2 -9
- package/esm/date-picker/date-picker.d.ts.map +1 -1
- package/esm/date-picker/date-picker.js +65 -74
- package/esm/date-picker/date-picker.type.d.ts +2 -2
- package/esm/date-picker/date-picker.type.d.ts.map +1 -1
- package/esm/date-picker/date-picker.type.js +1 -5
- package/esm/date-picker/day.js +74 -85
- package/esm/date-picker/day.type.js +1 -5
- package/esm/date-picker/index.js +1 -19
- package/esm/date-picker/month.js +32 -42
- package/esm/date-picker/month.type.d.ts +1 -1
- package/esm/date-picker/month.type.d.ts.map +1 -1
- package/esm/date-picker/month.type.js +1 -5
- package/esm/date-picker/picker.js +30 -38
- package/esm/date-picker/picker.type.js +1 -5
- package/esm/date-picker/pickerTitle.js +8 -15
- package/esm/date-picker/quarter.js +31 -41
- package/esm/date-picker/quarter.type.d.ts +1 -1
- package/esm/date-picker/quarter.type.d.ts.map +1 -1
- package/esm/date-picker/quarter.type.js +1 -5
- package/esm/date-picker/quick.js +13 -22
- package/esm/date-picker/quick.type.js +1 -5
- package/esm/date-picker/result.js +43 -52
- package/esm/date-picker/time.js +33 -47
- package/esm/date-picker/time.type.js +1 -5
- package/esm/date-picker/year.js +34 -44
- package/esm/date-picker/year.type.d.ts +1 -1
- package/esm/date-picker/year.type.d.ts.map +1 -1
- package/esm/date-picker/year.type.js +1 -5
- package/esm/descriptions/descriptions.js +35 -50
- package/esm/descriptions/descriptions.type.d.ts +1 -1
- package/esm/descriptions/descriptions.type.d.ts.map +1 -1
- package/esm/descriptions/descriptions.type.js +1 -5
- package/esm/descriptions/index.js +1 -19
- package/esm/divider/divider.js +7 -15
- package/esm/divider/divider.type.js +1 -5
- package/esm/divider/index.js +1 -19
- package/esm/dropdown/Item.js +30 -41
- package/esm/dropdown/dropdown.js +11 -19
- package/esm/dropdown/dropdown.type.d.ts +5 -5
- package/esm/dropdown/dropdown.type.d.ts.map +1 -1
- package/esm/dropdown/dropdown.type.js +10 -3
- package/esm/dropdown/dropdownIn.d.ts.map +1 -1
- package/esm/dropdown/dropdownIn.js +39 -48
- package/esm/dropdown/index.d.ts +1 -1
- package/esm/dropdown/index.d.ts.map +1 -1
- package/esm/dropdown/index.js +1 -19
- package/esm/editable-area/editable-area.d.ts.map +1 -1
- package/esm/editable-area/editable-area.js +44 -53
- package/esm/editable-area/editable-area.type.js +1 -5
- package/esm/editable-area/index.js +1 -19
- package/esm/empty/empty-image.js +43 -49
- package/esm/empty/empty.js +28 -35
- package/esm/empty/empty.type.js +1 -5
- package/esm/empty/index.js +1 -19
- package/esm/form/error-trans.js +11 -21
- package/esm/form/form-button.js +16 -24
- package/esm/form/form-field.js +9 -18
- package/esm/form/form-field.type.d.ts +1 -1
- package/esm/form/form-field.type.d.ts.map +1 -1
- package/esm/form/form-field.type.js +1 -5
- package/esm/form/form-fieldset.js +17 -29
- package/esm/form/form-fieldset.type.js +1 -5
- package/esm/form/form-flow.js +4 -11
- package/esm/form/form-flow.type.js +1 -5
- package/esm/form/form-footer-context.js +21 -31
- package/esm/form/form-item.js +30 -37
- package/esm/form/form-item.type.js +1 -5
- package/esm/form/form.d.ts +1 -1
- package/esm/form/form.d.ts.map +1 -1
- package/esm/form/form.js +29 -42
- package/esm/form/form.type.js +1 -8
- package/esm/form/index.js +6 -54
- package/esm/gap/gap.js +17 -26
- package/esm/gap/gap.type.js +1 -5
- package/esm/gap/index.js +1 -19
- package/esm/gap/support.js +1 -7
- package/esm/grid/grid.js +19 -34
- package/esm/grid/grid.type.d.ts +1 -1
- package/esm/grid/grid.type.d.ts.map +1 -1
- package/esm/grid/grid.type.js +1 -5
- package/esm/grid/index.js +1 -19
- package/esm/grid/util.d.ts +1 -1
- package/esm/grid/util.d.ts.map +1 -1
- package/esm/grid/util.js +7 -16
- package/esm/icon/icon.js +22 -31
- package/esm/icon/icon.type.d.ts +1 -1
- package/esm/icon/icon.type.d.ts.map +1 -1
- package/esm/icon/icon.type.js +1 -5
- package/esm/icon/index.js +1 -19
- package/esm/icons/config.d.ts +144 -0
- package/esm/icons/config.d.ts.map +1 -0
- package/esm/icons/config.js +157 -0
- package/esm/icons/icons.d.ts +46 -0
- package/esm/icons/icons.d.ts.map +1 -0
- package/esm/icons/icons.js +177 -0
- package/esm/icons/index.d.ts +1 -47
- package/esm/icons/index.d.ts.map +1 -1
- package/esm/icons/index.js +1 -194
- package/esm/image/image-event.js +10 -18
- package/esm/image/image-gallery.js +31 -37
- package/esm/image/image-group.d.ts.map +1 -1
- package/esm/image/image-group.js +30 -44
- package/esm/image/image-group.type.js +1 -5
- package/esm/image/image-magnify.js +17 -23
- package/esm/image/image.js +51 -63
- package/esm/image/image.type.d.ts +4 -4
- package/esm/image/image.type.d.ts.map +1 -1
- package/esm/image/image.type.js +1 -5
- package/esm/image/index.js +2 -26
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +48 -581
- package/esm/input/index.js +4 -40
- package/esm/input/input-group.js +33 -42
- package/esm/input/input-group.type.js +1 -5
- package/esm/input/input-number.js +33 -39
- package/esm/input/input-number.type.d.ts +1 -1
- package/esm/input/input-number.type.d.ts.map +1 -1
- package/esm/input/input-number.type.js +1 -5
- package/esm/input/input-password.js +23 -29
- package/esm/input/input-password.type.js +1 -5
- package/esm/input/input.js +18 -27
- package/esm/input/input.type.d.ts +1 -1
- package/esm/input/input.type.d.ts.map +1 -1
- package/esm/input/input.type.js +1 -5
- package/esm/input/simple-input.js +31 -37
- package/esm/input/use-input-common.d.ts +1 -1
- package/esm/input/use-input-common.js +44 -52
- package/esm/list/base-item.js +47 -54
- package/esm/list/base-item.type.js +1 -5
- package/esm/list/index.js +2 -26
- package/esm/list/list.d.ts.map +1 -1
- package/esm/list/list.js +54 -65
- package/esm/list/list.type.js +1 -5
- package/esm/menu/index.js +1 -19
- package/esm/menu/item.d.ts.map +1 -1
- package/esm/menu/item.js +42 -49
- package/esm/menu/menu.js +35 -38
- package/esm/menu/menu.type.d.ts +2 -2
- package/esm/menu/menu.type.d.ts.map +1 -1
- package/esm/menu/menu.type.js +1 -5
- package/esm/menu/scroll.js +24 -27
- package/esm/menu/scrollbar.js +16 -24
- package/esm/message/func.js +6 -14
- package/esm/message/func.type.d.ts +2 -2
- package/esm/message/func.type.d.ts.map +1 -1
- package/esm/message/func.type.js +1 -5
- package/esm/message/index.js +1 -19
- package/esm/message/manager.d.ts.map +1 -1
- package/esm/message/manager.js +15 -25
- package/esm/message/message.js +59 -65
- package/esm/message/message.type.js +1 -5
- package/esm/modal/index.js +3 -33
- package/esm/modal/modal-content.js +63 -71
- package/esm/modal/modal-content.type.js +1 -5
- package/esm/modal/modal-func.d.ts +1 -1
- package/esm/modal/modal-func.d.ts.map +1 -1
- package/esm/modal/modal-func.js +40 -44
- package/esm/modal/modal-func.type.js +1 -5
- package/esm/modal/modal-submit.js +17 -25
- package/esm/modal/modal.js +23 -26
- package/esm/modal/modal.type.d.ts +1 -1
- package/esm/modal/modal.type.d.ts.map +1 -1
- package/esm/modal/modal.type.js +1 -5
- package/esm/modal/use-modal-move.js +24 -27
- package/esm/modal/use-modal-resize.js +19 -22
- package/esm/pagination/index.js +1 -19
- package/esm/pagination/pagination-button.js +17 -25
- package/esm/pagination/pagination-button.type.js +1 -5
- package/esm/pagination/pagination-buttons.js +37 -39
- package/esm/pagination/pagination-buttons.type.d.ts +2 -2
- package/esm/pagination/pagination-buttons.type.d.ts.map +1 -1
- package/esm/pagination/pagination-buttons.type.js +1 -5
- package/esm/pagination/pagination-jumper.js +26 -30
- package/esm/pagination/pagination-jumper.type.js +1 -5
- package/esm/pagination/pagination-next.d.ts.map +1 -1
- package/esm/pagination/pagination-next.js +10 -18
- package/esm/pagination/pagination-prev.d.ts.map +1 -1
- package/esm/pagination/pagination-prev.js +10 -18
- package/esm/pagination/pagination-simple.js +11 -17
- package/esm/pagination/pagination-simple.type.js +1 -5
- package/esm/pagination/pagination-size-list.js +8 -17
- package/esm/pagination/pagination-size-list.type.js +1 -5
- package/esm/pagination/pagination.d.ts.map +1 -1
- package/esm/pagination/pagination.js +28 -38
- package/esm/pagination/pagination.type.d.ts +2 -2
- package/esm/pagination/pagination.type.d.ts.map +1 -1
- package/esm/pagination/pagination.type.js +1 -5
- package/esm/popover/confirm.js +39 -46
- package/esm/popover/confirm.type.d.ts +2 -2
- package/esm/popover/confirm.type.d.ts.map +1 -1
- package/esm/popover/confirm.type.js +1 -5
- package/esm/popover/index.js +2 -26
- package/esm/popover/popover.js +33 -46
- package/esm/popover/popover.type.js +1 -5
- package/esm/progress/analyzeColor.js +2 -10
- package/esm/progress/circle.js +21 -30
- package/esm/progress/index.js +1 -19
- package/esm/progress/line-popup.js +15 -21
- package/esm/progress/line.js +20 -29
- package/esm/progress/progress.js +13 -21
- package/esm/progress/progress.type.js +1 -5
- package/esm/radio/group-context.d.ts +1 -1
- package/esm/radio/group-context.d.ts.map +1 -1
- package/esm/radio/group-context.js +3 -9
- package/esm/radio/index.js +2 -26
- package/esm/radio/radio-group.js +34 -41
- package/esm/radio/radio-group.type.js +1 -5
- package/esm/radio/radio.js +20 -27
- package/esm/radio/radio.type.js +1 -5
- package/esm/radio/simple-radio.js +24 -30
- package/esm/rate/index.js +1 -19
- package/esm/rate/rate.js +32 -42
- package/esm/rate/rate.type.js +1 -5
- package/esm/rule/index.js +1 -12
- package/esm/select/index.js +1 -19
- package/esm/select/list-columns-option.js +8 -16
- package/esm/select/list-columns-option.type.js +1 -5
- package/esm/select/list-columns.js +21 -33
- package/esm/select/list-option.js +17 -21
- package/esm/select/list-option.type.js +1 -5
- package/esm/select/list-tree.js +11 -19
- package/esm/select/list-tree.type.js +1 -5
- package/esm/select/list.js +41 -46
- package/esm/select/result-input.d.ts.map +1 -1
- package/esm/select/result-input.js +16 -33
- package/esm/select/result-input.type.d.ts +3 -0
- package/esm/select/result-input.type.d.ts.map +1 -1
- package/esm/select/result-input.type.js +1 -5
- package/esm/select/result-more.d.ts.map +1 -1
- package/esm/select/result-more.js +36 -47
- package/esm/select/result-more.type.d.ts +4 -0
- package/esm/select/result-more.type.d.ts.map +1 -1
- package/esm/select/result-more.type.js +1 -5
- package/esm/select/result.d.ts.map +1 -1
- package/esm/select/result.js +67 -81
- package/esm/select/result.type.d.ts +14 -1
- package/esm/select/result.type.d.ts.map +1 -1
- package/esm/select/result.type.js +1 -5
- package/esm/select/select.d.ts.map +1 -1
- package/esm/select/select.js +111 -115
- package/esm/select/select.type.d.ts +6 -6
- package/esm/select/select.type.d.ts.map +1 -1
- package/esm/select/select.type.js +1 -5
- package/esm/slider/index.js +1 -19
- package/esm/slider/slider.js +32 -39
- package/esm/slider/slider.type.js +1 -5
- package/esm/spin/base.js +16 -25
- package/esm/spin/index.js +1 -19
- package/esm/spin/spin.js +26 -33
- package/esm/spin/spin.type.d.ts +2 -2
- package/esm/spin/spin.type.d.ts.map +1 -1
- package/esm/spin/spin.type.js +1 -5
- package/esm/spin/spins.js +71 -80
- package/esm/spin/utils.js +2 -10
- package/esm/steps/index.js +2 -26
- package/esm/steps/step.arrow.d.ts.map +1 -1
- package/esm/steps/step.arrow.js +15 -20
- package/esm/steps/step.default.d.ts.map +1 -1
- package/esm/steps/step.default.js +25 -29
- package/esm/steps/step.dot.d.ts.map +1 -1
- package/esm/steps/step.dot.js +20 -24
- package/esm/steps/step.js +28 -37
- package/esm/steps/step.type.js +1 -5
- package/esm/steps/steps-context.js +3 -9
- package/esm/steps/steps-context.type.js +1 -5
- package/esm/steps/steps.js +18 -24
- package/esm/steps/steps.type.d.ts +3 -3
- package/esm/steps/steps.type.d.ts.map +1 -1
- package/esm/steps/steps.type.js +1 -5
- package/esm/sticky/index.js +1 -19
- package/esm/sticky/sticky.js +40 -48
- package/esm/sticky/sticky.type.js +1 -5
- package/esm/switch/index.js +1 -19
- package/esm/switch/switch.js +31 -33
- package/esm/switch/switch.type.js +1 -5
- package/esm/table/colgroup.js +6 -14
- package/esm/table/index.js +1 -19
- package/esm/table/table.js +89 -100
- package/esm/table/table.type.d.ts +7 -7
- package/esm/table/table.type.d.ts.map +1 -1
- package/esm/table/table.type.js +1 -5
- package/esm/table/tbody.js +11 -20
- package/esm/table/tbody.type.d.ts +2 -2
- package/esm/table/tbody.type.d.ts.map +1 -1
- package/esm/table/tbody.type.js +1 -5
- package/esm/table/temp/01-base.d.ts.map +1 -1
- package/esm/table/temp/01-base.js +40 -37
- package/esm/table/tfoot.js +12 -22
- package/esm/table/tfoot.type.js +1 -12
- package/esm/table/thead.js +47 -62
- package/esm/table/thead.type.d.ts +1 -1
- package/esm/table/thead.type.d.ts.map +1 -1
- package/esm/table/thead.type.js +1 -5
- package/esm/table/tr.js +45 -59
- package/esm/table/use-table-select.js +20 -29
- package/esm/tabs/index.js +2 -26
- package/esm/tabs/tab.js +23 -30
- package/esm/tabs/tab.type.js +1 -5
- package/esm/tabs/tabs-header.js +52 -56
- package/esm/tabs/tabs-header.type.js +1 -5
- package/esm/tabs/tabs-panel.js +14 -19
- package/esm/tabs/tabs-panel.type.js +1 -5
- package/esm/tabs/tabs.js +54 -63
- package/esm/tabs/tabs.type.d.ts +2 -2
- package/esm/tabs/tabs.type.d.ts.map +1 -1
- package/esm/tabs/tabs.type.js +1 -5
- package/esm/tag/index.js +2 -26
- package/esm/tag/tag-input.js +16 -24
- package/esm/tag/tag.js +33 -39
- package/esm/tag/tag.type.d.ts +7 -7
- package/esm/tag/tag.type.d.ts.map +1 -1
- package/esm/tag/tag.type.js +1 -5
- package/esm/tag/use-tag.js +21 -24
- package/esm/textarea/index.js +1 -19
- package/esm/textarea/simple-textarea.js +26 -38
- package/esm/textarea/textarea.js +51 -60
- package/esm/textarea/textarea.type.d.ts +1 -6
- package/esm/textarea/textarea.type.d.ts.map +1 -1
- package/esm/textarea/textarea.type.js +1 -5
- package/esm/textarea/use-auto-size.js +20 -28
- package/esm/tooltip/index.js +1 -19
- package/esm/tooltip/tooltip.js +28 -40
- package/esm/tooltip/tooltip.type.js +1 -5
- package/esm/transfer/index.js +1 -19
- package/esm/transfer/transfer-list-header.d.ts.map +1 -1
- package/esm/transfer/transfer-list-header.js +22 -29
- package/esm/transfer/transfer-list-header.type.js +1 -5
- package/esm/transfer/transfer-list-item.d.ts.map +1 -1
- package/esm/transfer/transfer-list-item.js +21 -26
- package/esm/transfer/transfer-list-item.type.js +1 -5
- package/esm/transfer/transfer-list.js +42 -49
- package/esm/transfer/transfer-list.type.js +1 -5
- package/esm/transfer/transfer-operate.js +6 -14
- package/esm/transfer/transfer-operate.type.js +1 -5
- package/esm/transfer/transfer.js +28 -33
- package/esm/transfer/transfer.type.d.ts +2 -2
- package/esm/transfer/transfer.type.d.ts.map +1 -1
- package/esm/transfer/transfer.type.js +1 -5
- package/esm/tree/index.js +1 -19
- package/esm/tree/tree-checkbox.d.ts +2 -1
- package/esm/tree/tree-checkbox.d.ts.map +1 -1
- package/esm/tree/tree-checkbox.js +8 -13
- package/esm/tree/tree-checkbox.type.d.ts +2 -2
- package/esm/tree/tree-checkbox.type.d.ts.map +1 -1
- package/esm/tree/tree-checkbox.type.js +1 -5
- package/esm/tree/tree-content.d.ts +2 -1
- package/esm/tree/tree-content.d.ts.map +1 -1
- package/esm/tree/tree-content.js +36 -44
- package/esm/tree/tree-content.type.d.ts +2 -2
- package/esm/tree/tree-content.type.d.ts.map +1 -1
- package/esm/tree/tree-content.type.js +1 -5
- package/esm/tree/tree-context.d.ts +4 -3
- package/esm/tree/tree-context.d.ts.map +1 -1
- package/esm/tree/tree-context.js +8 -22
- package/esm/tree/tree-context.type.d.ts +2 -2
- package/esm/tree/tree-context.type.d.ts.map +1 -1
- package/esm/tree/tree-context.type.js +1 -5
- package/esm/tree/tree-list.d.ts +1 -1
- package/esm/tree/tree-list.d.ts.map +1 -1
- package/esm/tree/tree-list.js +10 -17
- package/esm/tree/tree-list.type.d.ts +3 -3
- package/esm/tree/tree-list.type.d.ts.map +1 -1
- package/esm/tree/tree-list.type.js +1 -5
- package/esm/tree/tree-node.d.ts +1 -1
- package/esm/tree/tree-node.d.ts.map +1 -1
- package/esm/tree/tree-node.js +25 -32
- package/esm/tree/tree-node.type.d.ts +3 -3
- package/esm/tree/tree-node.type.d.ts.map +1 -1
- package/esm/tree/tree-node.type.js +1 -5
- package/esm/tree/tree-root.d.ts +1 -1
- package/esm/tree/tree-root.d.ts.map +1 -1
- package/esm/tree/tree-root.js +15 -22
- package/esm/tree/tree-root.type.d.ts +3 -3
- package/esm/tree/tree-root.type.d.ts.map +1 -1
- package/esm/tree/tree-root.type.js +1 -5
- package/esm/tree/tree.d.ts +2 -1
- package/esm/tree/tree.d.ts.map +1 -1
- package/esm/tree/tree.js +36 -45
- package/esm/tree/tree.type.d.ts +4 -4
- package/esm/tree/tree.type.d.ts.map +1 -1
- package/esm/tree/tree.type.js +1 -5
- package/esm/tree-select/index.js +1 -19
- package/esm/tree-select/tree-select.d.ts +1 -1
- package/esm/tree-select/tree-select.d.ts.map +1 -1
- package/esm/tree-select/tree-select.js +103 -111
- package/esm/tree-select/tree-select.type.d.ts +6 -5
- package/esm/tree-select/tree-select.type.d.ts.map +1 -1
- package/esm/tree-select/tree-select.type.js +1 -5
- package/esm/upload/button.js +39 -47
- package/esm/upload/button.type.d.ts +1 -1
- package/esm/upload/button.type.d.ts.map +1 -1
- package/esm/upload/button.type.js +1 -5
- package/esm/upload/drop.js +23 -33
- package/esm/upload/image.js +10 -18
- package/esm/upload/image.type.js +1 -5
- package/esm/upload/index.js +3 -33
- package/esm/upload/result.js +63 -70
- package/esm/upload/upload.d.ts.map +1 -1
- package/esm/upload/upload.js +51 -67
- package/esm/upload/upload.type.js +1 -5
- package/esm/upload/useInputClick.js +5 -12
- package/esm/virtual-scroll/index.js +2 -20
- package/esm/virtual-scroll/scroll.js +19 -32
- package/esm/virtual-scroll/virtual-scroll-list.js +32 -43
- package/esm/virtual-scroll/virtual-scroll-list.type.d.ts +1 -1
- package/esm/virtual-scroll/virtual-scroll-list.type.d.ts.map +1 -1
- package/esm/virtual-scroll/virtual-scroll-list.type.js +1 -5
- package/package.json +3 -3
- package/cjs/icons/caret.d.ts +0 -4
- package/cjs/icons/caret.d.ts.map +0 -1
- package/cjs/icons/caret.js +0 -19
- package/cjs/icons/caret.type.d.ts +0 -2
- package/cjs/icons/caret.type.d.ts.map +0 -1
- package/cjs/icons/caret.type.js +0 -5
- package/cjs/table/temp/00-scroll.d.ts +0 -4
- package/cjs/table/temp/00-scroll.d.ts.map +0 -1
- package/cjs/table/temp/00-scroll.js +0 -32
- package/esm/icons/caret.d.ts +0 -4
- package/esm/icons/caret.d.ts.map +0 -1
- package/esm/icons/caret.js +0 -19
- package/esm/icons/caret.type.d.ts +0 -2
- package/esm/icons/caret.type.d.ts.map +0 -1
- package/esm/icons/caret.type.js +0 -5
- package/esm/table/temp/00-scroll.d.ts +0 -4
- package/esm/table/temp/00-scroll.d.ts.map +0 -1
- package/esm/table/temp/00-scroll.js +0 -32
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
5
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
6
|
-
require("core-js/modules/es.array.iterator.js");
|
|
7
|
-
require("core-js/modules/es.weak-map.js");
|
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
10
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
4
|
Object.defineProperty(exports, "__esModule", {
|
|
12
5
|
value: true
|
|
13
6
|
});
|
|
14
7
|
exports.default = void 0;
|
|
15
8
|
exports.getResetMore = getResetMore;
|
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
18
|
-
require("core-js/modules/es.array.from.js");
|
|
19
|
-
require("core-js/modules/es.array.map.js");
|
|
20
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
10
|
var _hooks = require("@sheinx/hooks");
|
|
22
11
|
var _tag = _interopRequireDefault(require("../tag"));
|
|
23
12
|
var _popover = _interopRequireDefault(require("../popover"));
|
|
24
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
-
function
|
|
26
|
-
function
|
|
27
|
-
function
|
|
28
|
-
function
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
21
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
26
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
27
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
28
|
function getResetMore(onFilter, container, doms) {
|
|
30
29
|
if (!container || !doms || !doms.length) return -1;
|
|
31
30
|
var items = Array.from(doms);
|
|
@@ -81,18 +80,18 @@ function getResetMore(onFilter, container, doms) {
|
|
|
81
80
|
return num;
|
|
82
81
|
}
|
|
83
82
|
var More = function More(props) {
|
|
84
|
-
var _jssStyle$select;
|
|
85
83
|
var jssStyle = props.jssStyle,
|
|
86
84
|
data = props.data,
|
|
87
85
|
showNum = props.showNum,
|
|
88
86
|
size = props.size,
|
|
89
87
|
compressed = props.compressed,
|
|
90
|
-
compressedClassName = props.compressedClassName
|
|
88
|
+
compressedClassName = props.compressedClassName,
|
|
89
|
+
classes = props.classes;
|
|
91
90
|
var _useState = (0, _react.useState)(false),
|
|
92
|
-
_useState2 = (
|
|
91
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
93
92
|
visible = _useState2[0],
|
|
94
93
|
setVisible = _useState2[1];
|
|
95
|
-
var styles =
|
|
94
|
+
var styles = classes;
|
|
96
95
|
var shouldShowMore = showNum < 0 || showNum >= data.length;
|
|
97
96
|
var before = [];
|
|
98
97
|
var after = [];
|
|
@@ -153,5 +152,4 @@ var More = function More(props) {
|
|
|
153
152
|
})]
|
|
154
153
|
});
|
|
155
154
|
};
|
|
156
|
-
var _default = /*#__PURE__*/(0, _react.memo)(More);
|
|
157
|
-
exports.default = _default;
|
|
155
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(More);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-more.type.d.ts","sourceRoot":"","sources":["result-more.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,cAAc,CAAC,QAAQ,EAAE,KAAK,CAC7C,SAAQ,IAAI,CACV,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,EAC1B,UAAU,GACV,MAAM,GACN,UAAU,GACV,aAAa,GACb,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,qBAAqB,GACrB,UAAU,GACV,UAAU,CACb;IACD,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"result-more.type.d.ts","sourceRoot":"","sources":["result-more.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,cAAc,CAAC,QAAQ,EAAE,KAAK,CAC7C,SAAQ,IAAI,CACV,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,EAC1B,UAAU,GACV,MAAM,GACN,UAAU,GACV,aAAa,GACb,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,qBAAqB,GACrB,UAAU,GACV,UAAU,CACb;IACD,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["result.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["result.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ5C,QAAA,MAAM,MAAM,uEA4WX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/cjs/select/result.js
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
5
|
-
require("core-js/modules/es.array.iterator.js");
|
|
6
|
-
require("core-js/modules/es.weak-map.js");
|
|
7
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
9
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
4
|
Object.defineProperty(exports, "__esModule", {
|
|
11
5
|
value: true
|
|
12
6
|
});
|
|
13
7
|
exports.default = void 0;
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
|
-
require("core-js/modules/es.string.trim.js");
|
|
17
|
-
require("core-js/modules/es.array.includes.js");
|
|
18
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
19
|
-
require("core-js/modules/es.string.split.js");
|
|
20
|
-
require("core-js/modules/es.array.map.js");
|
|
21
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
22
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
23
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
24
10
|
var _hooks = require("@sheinx/hooks");
|
|
@@ -26,10 +12,20 @@ var _resultInput = _interopRequireDefault(require("./result-input"));
|
|
|
26
12
|
var _resultMore = _interopRequireWildcard(require("./result-more"));
|
|
27
13
|
var _tag = _interopRequireDefault(require("../tag"));
|
|
28
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
22
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
24
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
26
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
27
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
28
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
29
|
var isObject = _hooks.util.isObject,
|
|
34
30
|
isEmpty = _hooks.util.isEmpty,
|
|
35
31
|
isNumber = _hooks.util.isNumber,
|
|
@@ -38,7 +34,6 @@ var isObject = _hooks.util.isObject,
|
|
|
38
34
|
isFunc = _hooks.util.isFunc,
|
|
39
35
|
isArray = _hooks.util.isArray;
|
|
40
36
|
var Result = function Result(props) {
|
|
41
|
-
var _jssStyle$select;
|
|
42
37
|
var jssStyle = props.jssStyle,
|
|
43
38
|
multiple = props.multiple,
|
|
44
39
|
size = props.size,
|
|
@@ -72,7 +67,7 @@ var Result = function Result(props) {
|
|
|
72
67
|
onResultItemClick = props.onResultItemClick;
|
|
73
68
|
var value = [null, undefined, ''].includes(valueProp) ? [] : multiple ? valueProp : [valueProp];
|
|
74
69
|
var _useState = (0, _react.useState)(-1),
|
|
75
|
-
_useState2 = (
|
|
70
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
76
71
|
more = _useState2[0],
|
|
77
72
|
setMore = _useState2[1];
|
|
78
73
|
var resultRef = (0, _react.useRef)(null);
|
|
@@ -80,7 +75,7 @@ var Result = function Result(props) {
|
|
|
80
75
|
var prevMore = (0, _react.useRef)(more);
|
|
81
76
|
var showInput = allowOnFilter;
|
|
82
77
|
var mounted = (0, _react.useRef)(false);
|
|
83
|
-
var styles =
|
|
78
|
+
var styles = props.classes;
|
|
84
79
|
var rootClass = (0, _classnames.default)(styles.resultTextWrapper, compressed && styles.compressedWrapper, multiple && styles.multipleResultWrapper, multiple && compressed && styles.multipleCompressedWrapper);
|
|
85
80
|
var renderResultContent = function renderResultContent(data, index, nodes) {
|
|
86
81
|
if (checkUnMatched(data)) {
|
|
@@ -111,7 +106,7 @@ var Result = function Result(props) {
|
|
|
111
106
|
return more;
|
|
112
107
|
};
|
|
113
108
|
var handleResultItemClick = function handleResultItemClick(e, item) {
|
|
114
|
-
onResultItemClick === null || onResultItemClick === void 0
|
|
109
|
+
onResultItemClick === null || onResultItemClick === void 0 || onResultItemClick(e, item);
|
|
115
110
|
};
|
|
116
111
|
var renderInput = function renderInput() {
|
|
117
112
|
var placeholder2 = empty ? placeholder : '';
|
|
@@ -124,7 +119,7 @@ var Result = function Result(props) {
|
|
|
124
119
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.default.Fragment, {
|
|
125
120
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_resultInput.default, {
|
|
126
121
|
isEmpty: empty,
|
|
127
|
-
|
|
122
|
+
classes: props.classes,
|
|
128
123
|
value: filterText,
|
|
129
124
|
trim: trim,
|
|
130
125
|
focus: focus,
|
|
@@ -153,7 +148,7 @@ var Result = function Result(props) {
|
|
|
153
148
|
key = getKey(keygen, item, index);
|
|
154
149
|
}
|
|
155
150
|
var handleClose = function handleClose() {
|
|
156
|
-
onRemove === null || onRemove === void 0
|
|
151
|
+
onRemove === null || onRemove === void 0 || onRemove(item, key, index);
|
|
157
152
|
};
|
|
158
153
|
var isDisabled;
|
|
159
154
|
if (_hooks.util.isFunc(disabled)) {
|
|
@@ -254,7 +249,7 @@ var Result = function Result(props) {
|
|
|
254
249
|
var moreNumber = getCompressedBound();
|
|
255
250
|
var renderMultipleResultMore = /*#__PURE__*/(0, _jsxRuntime.jsx)(_resultMore.default, {
|
|
256
251
|
keygen: keygen,
|
|
257
|
-
|
|
252
|
+
classes: props.classes,
|
|
258
253
|
data: result,
|
|
259
254
|
size: size,
|
|
260
255
|
more: moreNumber,
|
|
@@ -293,7 +288,7 @@ var Result = function Result(props) {
|
|
|
293
288
|
(0, _react.useEffect)(function () {
|
|
294
289
|
if (!focus && mounted.current) {
|
|
295
290
|
setTimeout(function () {
|
|
296
|
-
onFilter === null || onFilter === void 0
|
|
291
|
+
onFilter === null || onFilter === void 0 || onFilter('', 'blur');
|
|
297
292
|
}, 400);
|
|
298
293
|
}
|
|
299
294
|
mounted.current = true;
|
|
@@ -341,5 +336,4 @@ var Result = function Result(props) {
|
|
|
341
336
|
children: renderResult()
|
|
342
337
|
});
|
|
343
338
|
};
|
|
344
|
-
var _default = Result;
|
|
345
|
-
exports.default = _default;
|
|
339
|
+
var _default = exports.default = Result;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { KeygenResult, UnMatchedData } from '@sheinx/hooks';
|
|
3
3
|
import { SelectProps } from './select.type';
|
|
4
|
-
export
|
|
4
|
+
export type ResultType<Value> = UnMatchedData | Value;
|
|
5
5
|
export interface ResultProps<DataItem, Value> extends Pick<SelectProps<DataItem, Value>, 'jssStyle' | 'size' | 'multiple' | 'placeholder' | 'keygen' | 'value' | 'compressed' | 'compressedBound' | 'compressedClassName' | 'disabled' | 'resultClassName' | 'renderUnmatched' | 'focusSelected' | 'maxLength' | 'trim' | 'separator'> {
|
|
6
6
|
data: DataItem[];
|
|
7
7
|
focus: boolean;
|
|
@@ -23,5 +23,18 @@ export interface ResultProps<DataItem, Value> extends Pick<SelectProps<DataItem,
|
|
|
23
23
|
onRemove?: (item: DataItem | UnMatchedData, key?: KeygenResult, index?: number) => void;
|
|
24
24
|
onResultItemClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, item: DataItem, index?: number) => void;
|
|
25
25
|
convertBr?: string | ((text: string) => string);
|
|
26
|
+
classes: {
|
|
27
|
+
tag: string;
|
|
28
|
+
resultTextWrapper: string;
|
|
29
|
+
compressedWrapper: string;
|
|
30
|
+
multipleResultWrapper: string;
|
|
31
|
+
multipleCompressedWrapper: string;
|
|
32
|
+
hideTag: string;
|
|
33
|
+
space: string;
|
|
34
|
+
placeholder: string;
|
|
35
|
+
ellipsis: string;
|
|
36
|
+
moreWrapper: string;
|
|
37
|
+
inputMirror: string;
|
|
38
|
+
};
|
|
26
39
|
}
|
|
27
40
|
//# sourceMappingURL=result.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.type.d.ts","sourceRoot":"","sources":["result.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,
|
|
1
|
+
{"version":3,"file":"result.type.d.ts","sourceRoot":"","sources":["result.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,UAAU,CAAC,KAAK,IAAI,aAAa,GAAG,KAAK,CAAC;AAEtD,MAAM,WAAW,WAAW,CAAC,QAAQ,EAAE,KAAK,CAC1C,SAAQ,IAAI,CACV,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,EAC1B,UAAU,GACV,MAAM,GACN,UAAU,GACV,aAAa,GACb,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,qBAAqB,GACrB,UAAU,GACV,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,WAAW,GACX,MAAM,GACN,WAAW,CACd;IACD,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,QAAQ,GAAG,MAAM,CAAC;IACtC,YAAY,EAAE,CACZ,IAAI,EAAE,QAAQ,EACd,KAAK,CAAC,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,CAAC,QAAQ,GAAG,aAAa,CAAC,EAAE,KACjC,KAAK,CAAC,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC;IAC5D,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAChE,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,CAAC,SAAS,CAAC;IAEtD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,eAAe,EAAE,CAAC,MAAM,EAAE,KAAK,KAAK,CAAC,QAAQ,GAAG,aAAa,CAAC,EAAE,CAAC;IACjE,cAAc,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,aAAa,KAAK,OAAO,CAAC;IAC5D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,aAAa,EAAE,GAAG,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxF,iBAAiB,CAAC,EAAE,CAClB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,EAC/C,IAAI,EAAE,QAAQ,EACd,KAAK,CAAC,EAAE,MAAM,KACX,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IAChD,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;QACZ,iBAAiB,EAAE,MAAM,CAAC;QAC1B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,yBAAyB,EAAE,MAAM,CAAC;QAClC,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AAkBnE,iBAAS,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AAkBnE,iBAAS,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,eAstBxE;AAED,eAAe,MAAM,CAAC"}
|
package/cjs/select/select.js
CHANGED
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
5
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
6
|
-
require("core-js/modules/es.array.iterator.js");
|
|
7
|
-
require("core-js/modules/es.weak-map.js");
|
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
10
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
4
|
Object.defineProperty(exports, "__esModule", {
|
|
12
5
|
value: true
|
|
13
6
|
});
|
|
14
7
|
exports.default = void 0;
|
|
15
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
18
|
-
require("core-js/modules/es.string.trim.js");
|
|
19
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
20
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
10
|
var _hooks = require("@sheinx/hooks");
|
|
@@ -32,10 +21,24 @@ var _useWithFormConfig = _interopRequireDefault(require("../common/use-with-form
|
|
|
32
21
|
var _useTip = _interopRequireDefault(require("../common/use-tip"));
|
|
33
22
|
var _config = require("../config");
|
|
34
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
35
|
-
function
|
|
36
|
-
function
|
|
37
|
-
function
|
|
38
|
-
function
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
27
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
30
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
32
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
33
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
34
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
35
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
38
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
39
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
40
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
41
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
42
|
var preventDefault = function preventDefault(e) {
|
|
40
43
|
e.preventDefault();
|
|
41
44
|
};
|
|
@@ -124,16 +127,16 @@ function Select(props0) {
|
|
|
124
127
|
filterSameChange = props.filterSameChange;
|
|
125
128
|
var hasFilter = _hooks.util.isFunc(props.onAdvancedFilter || onFilterProp);
|
|
126
129
|
var showInput = hasFilter || _hooks.util.isFunc(onCreateProp);
|
|
127
|
-
var styles = jssStyle === null || jssStyle === void 0
|
|
130
|
+
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$select = jssStyle.select) === null || _jssStyle$select === void 0 ? void 0 : _jssStyle$select.call(jssStyle);
|
|
128
131
|
var rootStyle = Object.assign({
|
|
129
132
|
width: width
|
|
130
133
|
}, style);
|
|
131
134
|
var _useState = (0, _react.useState)('keyboard'),
|
|
132
|
-
_useState2 = (
|
|
135
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
133
136
|
controlType = _useState2[0],
|
|
134
137
|
setControlType = _useState2[1];
|
|
135
138
|
var _useState3 = (0, _react.useState)(false),
|
|
136
|
-
_useState4 = (
|
|
139
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
137
140
|
focused = _useState4[0],
|
|
138
141
|
setFocused = _useState4[1];
|
|
139
142
|
var isPreventBlur = (0, _react.useRef)(false);
|
|
@@ -164,7 +167,7 @@ function Select(props0) {
|
|
|
164
167
|
onClearCreatedData = _useFilter.onClearCreatedData,
|
|
165
168
|
rawData = _useFilter.rawData;
|
|
166
169
|
var onCollapse = (0, _hooks.usePersistFn)(function (collapse) {
|
|
167
|
-
onCollapseProp === null || onCollapseProp === void 0
|
|
170
|
+
onCollapseProp === null || onCollapseProp === void 0 || onCollapseProp(collapse);
|
|
168
171
|
if (isPreventBlur.current) {
|
|
169
172
|
isPreventBlur.current = false;
|
|
170
173
|
return;
|
|
@@ -176,14 +179,14 @@ function Select(props0) {
|
|
|
176
179
|
onClearCreatedData();
|
|
177
180
|
});
|
|
178
181
|
var renderMoreIcon = function renderMoreIcon() {
|
|
179
|
-
return _icons.default.More;
|
|
182
|
+
return _icons.default.select.More;
|
|
180
183
|
};
|
|
181
184
|
var _useTiled = (0, _hooks.useTiled)({
|
|
182
185
|
data: filterData0,
|
|
183
186
|
filterText: filterText,
|
|
184
187
|
onAdvancedFilter: props.onAdvancedFilter,
|
|
185
188
|
keygen: keygen,
|
|
186
|
-
originIcon: _icons.default.More,
|
|
189
|
+
originIcon: _icons.default.select.More,
|
|
187
190
|
moreIcon: renderMoreIcon,
|
|
188
191
|
childrenKey: childrenKey,
|
|
189
192
|
expanded: expanded,
|
|
@@ -210,7 +213,7 @@ function Select(props0) {
|
|
|
210
213
|
popupProviderValue = _usePopup.providerValue;
|
|
211
214
|
var handleSelectChange = (0, _hooks.usePersistFn)(function (value, dataItem, checked) {
|
|
212
215
|
if (createdData || props.emptyAfterSelect) {
|
|
213
|
-
onFilter === null || onFilter === void 0
|
|
216
|
+
onFilter === null || onFilter === void 0 || onFilter('');
|
|
214
217
|
}
|
|
215
218
|
var shouldFocus = showInput && props.reFocus;
|
|
216
219
|
if (!multiple && !shouldFocus) {
|
|
@@ -218,9 +221,9 @@ function Select(props0) {
|
|
|
218
221
|
}
|
|
219
222
|
if (multiple && !shouldFocus) {
|
|
220
223
|
var _inputRef$current;
|
|
221
|
-
inputRef === null || inputRef === void 0
|
|
224
|
+
inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.select();
|
|
222
225
|
}
|
|
223
|
-
onChange === null || onChange === void 0
|
|
226
|
+
onChange === null || onChange === void 0 || onChange(value, dataItem, checked);
|
|
224
227
|
});
|
|
225
228
|
var _useSelect = (0, _hooks.useSelect)({
|
|
226
229
|
value: valueProp,
|
|
@@ -270,7 +273,7 @@ function Select(props0) {
|
|
|
270
273
|
var focusAndOpen = function focusAndOpen() {
|
|
271
274
|
if (!focused) {
|
|
272
275
|
var _inputRef$current2;
|
|
273
|
-
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0
|
|
276
|
+
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.focus();
|
|
274
277
|
} else {
|
|
275
278
|
openPop();
|
|
276
279
|
}
|
|
@@ -281,7 +284,7 @@ function Select(props0) {
|
|
|
281
284
|
if (disabled === true) return;
|
|
282
285
|
if (!focus) {
|
|
283
286
|
var _inputRef$current3;
|
|
284
|
-
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0
|
|
287
|
+
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.focus();
|
|
285
288
|
}
|
|
286
289
|
if (open) {
|
|
287
290
|
if (e.target.tagName === 'INPUT') {
|
|
@@ -301,18 +304,18 @@ function Select(props0) {
|
|
|
301
304
|
rootRef: targetRef,
|
|
302
305
|
jssStyle: props.jssStyle
|
|
303
306
|
});
|
|
304
|
-
var rootClass = (0, _classnames.default)(className, isEmpty && styles.wrapperEmpty, styles === null || styles === void 0 ? void 0 : styles.wrapper, open && (styles === null || styles === void 0 ? void 0 : styles.wrapperOpen), disabled === true && (styles === null || styles === void 0 ? void 0 : styles.wrapperDisabled), disabled !== true && focused && (styles === null || styles === void 0 ? void 0 : styles.wrapperFocus), innerTitle && (styles === null || styles === void 0 ? void 0 : styles.wrapperInnerTitle), size === 'small' && (styles === null || styles === void 0 ? void 0 : styles.wrapperSmall), size === 'large' && (styles === null || styles === void 0 ? void 0 : styles.wrapperLarge), (!!props.error || props.status === 'error') && (styles === null || styles === void 0 ? void 0 : styles.wrapperError), clearable && (styles === null || styles === void 0 ? void 0 : styles.clearable), !border && (styles === null || styles === void 0 ? void 0 : styles.wrapperNoBorder), !!underline && (styles === null || styles === void 0 ? void 0 : styles.wrapperUnderline), (
|
|
307
|
+
var rootClass = (0, _classnames.default)(className, isEmpty && styles.wrapperEmpty, styles === null || styles === void 0 ? void 0 : styles.wrapper, open && (styles === null || styles === void 0 ? void 0 : styles.wrapperOpen), disabled === true && (styles === null || styles === void 0 ? void 0 : styles.wrapperDisabled), disabled !== true && focused && (styles === null || styles === void 0 ? void 0 : styles.wrapperFocus), innerTitle && (styles === null || styles === void 0 ? void 0 : styles.wrapperInnerTitle), size === 'small' && (styles === null || styles === void 0 ? void 0 : styles.wrapperSmall), size === 'large' && (styles === null || styles === void 0 ? void 0 : styles.wrapperLarge), (!!props.error || props.status === 'error') && (styles === null || styles === void 0 ? void 0 : styles.wrapperError), clearable && (styles === null || styles === void 0 ? void 0 : styles.clearable), !border && (styles === null || styles === void 0 ? void 0 : styles.wrapperNoBorder), !!underline && (styles === null || styles === void 0 ? void 0 : styles.wrapperUnderline), _defineProperty({}, styles === null || styles === void 0 ? void 0 : styles.multiple, multiple));
|
|
305
308
|
var getRenderItem = function getRenderItem(data, index) {
|
|
306
309
|
return typeof renderItemProp === 'function' ? renderItemProp(data, index) : data[renderItemProp];
|
|
307
310
|
};
|
|
308
311
|
var renderItem = getRenderItem;
|
|
309
312
|
var handleFocus = (0, _hooks.usePersistFn)(function (e) {
|
|
310
313
|
setFocused(true);
|
|
311
|
-
onFocus === null || onFocus === void 0
|
|
314
|
+
onFocus === null || onFocus === void 0 || onFocus(e);
|
|
312
315
|
});
|
|
313
316
|
var handleBlur = (0, _hooks.usePersistFn)(function (e) {
|
|
314
317
|
setFocused(false);
|
|
315
|
-
onBlur === null || onBlur === void 0
|
|
318
|
+
onBlur === null || onBlur === void 0 || onBlur(e);
|
|
316
319
|
});
|
|
317
320
|
var handleChange = function handleChange(item) {
|
|
318
321
|
if (multiple) {
|
|
@@ -369,12 +372,12 @@ function Select(props0) {
|
|
|
369
372
|
}
|
|
370
373
|
if (onCreate && !hideCreateOption) {
|
|
371
374
|
var _optionListRef$curren2;
|
|
372
|
-
(_optionListRef$curren2 = optionListRef.current) === null || _optionListRef$curren2 === void 0
|
|
375
|
+
(_optionListRef$curren2 = optionListRef.current) === null || _optionListRef$curren2 === void 0 || _optionListRef$curren2.hoverMove(0, true);
|
|
373
376
|
}
|
|
374
377
|
if (hideCreate) {
|
|
375
378
|
// optionListRef.current?.hoverMove(filterData.length - 1, true);
|
|
376
379
|
}
|
|
377
|
-
onFilter === null || onFilter === void 0
|
|
380
|
+
onFilter === null || onFilter === void 0 || onFilter(trim ? text.trim() : text, from);
|
|
378
381
|
};
|
|
379
382
|
var handleOptionClick = function handleOptionClick() {
|
|
380
383
|
isPreventBlur.current = true;
|
|
@@ -389,7 +392,7 @@ function Select(props0) {
|
|
|
389
392
|
if (inputText) return;
|
|
390
393
|
e.preventDefault();
|
|
391
394
|
var raws = Array.isArray(value) ? value : [value];
|
|
392
|
-
var values = (
|
|
395
|
+
var values = _toConsumableArray(raws);
|
|
393
396
|
var last = values.pop();
|
|
394
397
|
if (last) {
|
|
395
398
|
datum.remove(last);
|
|
@@ -409,7 +412,7 @@ function Select(props0) {
|
|
|
409
412
|
|
|
410
413
|
// tab 可关闭下拉列表
|
|
411
414
|
if (e.keyCode === 9 || e.code === 'Tab') {
|
|
412
|
-
onBlur === null || onBlur === void 0
|
|
415
|
+
onBlur === null || onBlur === void 0 || onBlur(e);
|
|
413
416
|
if (open) closePop();
|
|
414
417
|
return;
|
|
415
418
|
}
|
|
@@ -417,11 +420,11 @@ function Select(props0) {
|
|
|
417
420
|
setControlType('keyboard');
|
|
418
421
|
switch (e.keyCode || e.code) {
|
|
419
422
|
case 38 || 'ArrowUp':
|
|
420
|
-
if ((_optionListRef$curren3 = optionListRef.current) !== null && _optionListRef$curren3 !== void 0 && _optionListRef$curren3.hoverHover) (_optionListRef$curren4 = optionListRef.current) === null || _optionListRef$curren4 === void 0
|
|
423
|
+
if ((_optionListRef$curren3 = optionListRef.current) !== null && _optionListRef$curren3 !== void 0 && _optionListRef$curren3.hoverHover) (_optionListRef$curren4 = optionListRef.current) === null || _optionListRef$curren4 === void 0 || _optionListRef$curren4.hoverMove(-1);
|
|
421
424
|
e.preventDefault();
|
|
422
425
|
break;
|
|
423
426
|
case 40 || 'ArrowDown':
|
|
424
|
-
if ((_optionListRef$curren5 = optionListRef.current) !== null && _optionListRef$curren5 !== void 0 && _optionListRef$curren5.hoverHover) (_optionListRef$curren6 = optionListRef.current) === null || _optionListRef$curren6 === void 0
|
|
427
|
+
if ((_optionListRef$curren5 = optionListRef.current) !== null && _optionListRef$curren5 !== void 0 && _optionListRef$curren5.hoverHover) (_optionListRef$curren6 = optionListRef.current) === null || _optionListRef$curren6 === void 0 || _optionListRef$curren6.hoverMove(1);
|
|
425
428
|
e.preventDefault();
|
|
426
429
|
break;
|
|
427
430
|
case 13 || 'Enter':
|
|
@@ -439,7 +442,7 @@ function Select(props0) {
|
|
|
439
442
|
e.stopPropagation();
|
|
440
443
|
datum.removeAll();
|
|
441
444
|
if (filterText) {
|
|
442
|
-
onFilter === null || onFilter === void 0
|
|
445
|
+
onFilter === null || onFilter === void 0 || onFilter('');
|
|
443
446
|
}
|
|
444
447
|
if (open) closePop();
|
|
445
448
|
};
|
|
@@ -468,7 +471,7 @@ function Select(props0) {
|
|
|
468
471
|
});
|
|
469
472
|
var renderClearable = function renderClearable() {
|
|
470
473
|
if (!multiple !== undefined && !showArrow) return null;
|
|
471
|
-
var defaultIcon = multiple ? _icons.default.More : _icons.default.
|
|
474
|
+
var defaultIcon = multiple ? _icons.default.select.More : _icons.default.select.DropdownArrow;
|
|
472
475
|
var arrow = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
473
476
|
className: (0, _classnames.default)(styles.arrowIcon, open && !compressed && styles.arrowIconOpen),
|
|
474
477
|
onClick: handleResultClick,
|
|
@@ -477,7 +480,7 @@ function Select(props0) {
|
|
|
477
480
|
var close = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
478
481
|
className: styles.clearIcon,
|
|
479
482
|
onClick: handleClear,
|
|
480
|
-
children: isEmpty ? arrow : _icons.default.
|
|
483
|
+
children: isEmpty ? arrow : _icons.default.select.Close
|
|
481
484
|
});
|
|
482
485
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
483
486
|
children: [close, !open && arrow]
|
|
@@ -488,7 +491,7 @@ function Select(props0) {
|
|
|
488
491
|
return renderClearable();
|
|
489
492
|
}
|
|
490
493
|
if (!multiple && !showArrow) return null;
|
|
491
|
-
var defaultIcon = multiple ? _icons.default.More : _icons.default.
|
|
494
|
+
var defaultIcon = multiple ? _icons.default.select.More : _icons.default.select.DropdownArrow;
|
|
492
495
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
493
496
|
className: (0, _classnames.default)(styles.arrowIcon, open && !compressed && styles.arrowIconOpen),
|
|
494
497
|
onClick: handleResultClick,
|
|
@@ -531,7 +534,8 @@ function Select(props0) {
|
|
|
531
534
|
onClearCreatedData: onClearCreatedData,
|
|
532
535
|
getDataByValues: getDataByValues,
|
|
533
536
|
checkUnMatched: checkUnMatched,
|
|
534
|
-
onRemove: handleRemove
|
|
537
|
+
onRemove: handleRemove,
|
|
538
|
+
classes: styles
|
|
535
539
|
})
|
|
536
540
|
});
|
|
537
541
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PopupProvider, {
|
|
@@ -657,7 +661,7 @@ function Select(props0) {
|
|
|
657
661
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", _objectSpread(_objectSpread({
|
|
658
662
|
ref: targetRef,
|
|
659
663
|
tabIndex: disabled === true || showInput ? undefined : 0
|
|
660
|
-
}, _hooks.util.getDataAttribute((
|
|
664
|
+
}, _hooks.util.getDataAttribute(_defineProperty({}, 'input-border', 'true'))), {}, {
|
|
661
665
|
className: rootClass,
|
|
662
666
|
style: rootStyle,
|
|
663
667
|
onKeyDown: handleKeyDown,
|
|
@@ -693,5 +697,4 @@ function Select(props0) {
|
|
|
693
697
|
})]
|
|
694
698
|
}));
|
|
695
699
|
}
|
|
696
|
-
var _default = Select;
|
|
697
|
-
exports.default = _default;
|
|
700
|
+
var _default = exports.default = Select;
|
|
@@ -11,7 +11,7 @@ import { RadioClasses } from '../radio/radio.type';
|
|
|
11
11
|
import { SpinClasses } from '../spin/spin.type';
|
|
12
12
|
import { InputClasses } from '../input/input.type';
|
|
13
13
|
import { BaseTipProps } from '../common/use-tip';
|
|
14
|
-
export
|
|
14
|
+
export type SelectClasses = {
|
|
15
15
|
wrapper: string;
|
|
16
16
|
wrapperEmpty: string;
|
|
17
17
|
wrapperOpen: string;
|
|
@@ -80,7 +80,7 @@ export declare type SelectClasses = {
|
|
|
80
80
|
empty: string;
|
|
81
81
|
popover: string;
|
|
82
82
|
};
|
|
83
|
-
export
|
|
83
|
+
export type JssStyleType = {
|
|
84
84
|
tag?: () => TagClasses;
|
|
85
85
|
select?: () => SelectClasses;
|
|
86
86
|
innerTitle?: () => InnerTitleClasses;
|
|
@@ -91,8 +91,8 @@ export declare type JssStyleType = {
|
|
|
91
91
|
spin?: () => SpinClasses;
|
|
92
92
|
input?: () => InputClasses;
|
|
93
93
|
};
|
|
94
|
-
export
|
|
95
|
-
export
|
|
94
|
+
export type DatumType<DataItem, Value> = ReturnType<typeof useListSelect<DataItem, Value>>;
|
|
95
|
+
export type OptionListRefType = {
|
|
96
96
|
hoverMove: (index: number, force?: boolean) => void;
|
|
97
97
|
hoverHover: (index: number) => void;
|
|
98
98
|
getHoverIndex: () => number;
|
|
@@ -111,7 +111,7 @@ export interface BaseListProps<DataItem, Value> extends Pick<SelectProps<DataIte
|
|
|
111
111
|
onControlTypeChange: React.Dispatch<React.SetStateAction<'mouse' | 'keyboard'>>;
|
|
112
112
|
onOptionClick: (data: DataItem, index: number) => void;
|
|
113
113
|
}
|
|
114
|
-
export interface SelectPropsBase<DataItem, Value> extends Omit<BaseSelectProps<DataItem, Value>, 'control'>, Pick<CommonType, 'className' | 'style' | 'size' | 'status' | 'innerTitle' | 'filterSameChange'>, Pick<AbsoluteListProps, 'absolute' | 'zIndex'>, BaseTipProps {
|
|
114
|
+
export interface SelectPropsBase<DataItem, Value> extends Omit<BaseSelectProps<DataItem, Value>, 'control' | 'filterSameChange'>, Pick<CommonType, 'className' | 'style' | 'size' | 'status' | 'innerTitle' | 'filterSameChange'>, Pick<AbsoluteListProps, 'absolute' | 'zIndex'>, BaseTipProps {
|
|
115
115
|
jssStyle?: JssStyleType;
|
|
116
116
|
/**
|
|
117
117
|
* @en custom empty copy
|
|
@@ -463,5 +463,5 @@ export interface SelectPropsB<DataItem, Value> extends Omit<SelectPropsBase<Data
|
|
|
463
463
|
*/
|
|
464
464
|
childrenKey?: ObjectKey<DataItem>;
|
|
465
465
|
}
|
|
466
|
-
export
|
|
466
|
+
export type SelectProps<DataItem, Value> = SelectPropsA<DataItem, Value> | SelectPropsB<DataItem, Value>;
|
|
467
467
|
//# sourceMappingURL=select.type.d.ts.map
|