@sheinx/base 3.0.0-alpha.31 → 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 +44 -46
- package/cjs/cascader/cascader.type.d.ts +1 -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.js +6 -13
- package/cjs/select/result-more.js +17 -19
- package/cjs/select/result.js +20 -25
- package/cjs/select/result.type.d.ts +1 -1
- package/cjs/select/result.type.d.ts.map +1 -1
- package/cjs/select/select.js +45 -43
- 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 +33 -35
- package/cjs/tree-select/tree-select.type.d.ts +5 -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 +118 -127
- package/esm/cascader/cascader.type.d.ts +1 -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.js +14 -29
- package/esm/select/result-input.type.js +1 -5
- package/esm/select/result-more.js +33 -44
- package/esm/select/result-more.type.js +1 -5
- package/esm/select/result.js +64 -77
- package/esm/select/result.type.d.ts +1 -1
- package/esm/select/result.type.d.ts.map +1 -1
- package/esm/select/result.type.js +1 -5
- package/esm/select/select.js +109 -114
- 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 +101 -110
- package/esm/tree-select/tree-select.type.d.ts +5 -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
package/esm/menu/scroll.js
CHANGED
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _scrollbar = _interopRequireDefault(require("./scrollbar"));
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { useEffect, useState, useRef } from 'react';
|
|
8
|
+
import { useResize, usePersistFn, util } from '@sheinx/hooks';
|
|
9
|
+
import Scrollbar from "./scrollbar";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
11
|
var Scroll = function Scroll(props) {
|
|
14
|
-
var _useRef =
|
|
12
|
+
var _useRef = useRef({
|
|
15
13
|
timer: 0
|
|
16
14
|
}),
|
|
17
15
|
context = _useRef.current;
|
|
18
|
-
var _useState =
|
|
19
|
-
_useState2 = (
|
|
16
|
+
var _useState = useState(0),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
18
|
offset = _useState2[0],
|
|
21
19
|
setScroll = _useState2[1];
|
|
22
|
-
var _useState3 =
|
|
20
|
+
var _useState3 = useState({
|
|
23
21
|
width: 0,
|
|
24
22
|
scrollWidth: 0,
|
|
25
23
|
height: 0,
|
|
26
24
|
scrollHeight: 0
|
|
27
25
|
}),
|
|
28
|
-
_useState4 = (
|
|
26
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
27
|
info = _useState4[0],
|
|
30
28
|
setInfo = _useState4[1];
|
|
31
29
|
var scrollLength = props.direction === 'x' ? info.scrollWidth : info.scrollHeight;
|
|
32
30
|
var length = props.direction === 'x' ? info.width : info.height;
|
|
33
31
|
var show = scrollLength > length;
|
|
34
|
-
var handleResize =
|
|
32
|
+
var handleResize = usePersistFn(function () {
|
|
35
33
|
var target = props.targetRef.current;
|
|
36
34
|
if (!target) return;
|
|
37
35
|
if (context.timer) {
|
|
@@ -51,15 +49,15 @@ var Scroll = function Scroll(props) {
|
|
|
51
49
|
});
|
|
52
50
|
}, 200);
|
|
53
51
|
});
|
|
54
|
-
|
|
52
|
+
useResize({
|
|
55
53
|
targetRef: props.targetRef,
|
|
56
54
|
cb: handleResize,
|
|
57
55
|
timer: 0
|
|
58
56
|
});
|
|
59
|
-
var handleWheel =
|
|
57
|
+
var handleWheel = usePersistFn(function (e) {
|
|
60
58
|
e.preventDefault();
|
|
61
59
|
var target = e.currentTarget;
|
|
62
|
-
var wheel =
|
|
60
|
+
var wheel = util.NormalizeWheel(e);
|
|
63
61
|
var delta = props.direction === 'x' ? wheel.pixelX : wheel.pixelY;
|
|
64
62
|
if (props.direction === 'x') {
|
|
65
63
|
target.scrollLeft += delta;
|
|
@@ -71,7 +69,7 @@ var Scroll = function Scroll(props) {
|
|
|
71
69
|
if (newOffset > 1) newOffset = 1;
|
|
72
70
|
setScroll(newOffset);
|
|
73
71
|
});
|
|
74
|
-
var handleScroll =
|
|
72
|
+
var handleScroll = usePersistFn(function (percent) {
|
|
75
73
|
var target = props.targetRef.current;
|
|
76
74
|
if (!target) return;
|
|
77
75
|
if (props.direction === 'x') {
|
|
@@ -81,7 +79,7 @@ var Scroll = function Scroll(props) {
|
|
|
81
79
|
}
|
|
82
80
|
setScroll(percent);
|
|
83
81
|
});
|
|
84
|
-
|
|
82
|
+
useEffect(function () {
|
|
85
83
|
var target = props.targetRef.current;
|
|
86
84
|
if (target) {
|
|
87
85
|
if (show) {
|
|
@@ -98,7 +96,7 @@ var Scroll = function Scroll(props) {
|
|
|
98
96
|
}
|
|
99
97
|
};
|
|
100
98
|
}, [show, props.targetRef.current]);
|
|
101
|
-
|
|
99
|
+
useEffect(function () {
|
|
102
100
|
handleResize();
|
|
103
101
|
return function () {
|
|
104
102
|
if (context.timer) {
|
|
@@ -107,7 +105,7 @@ var Scroll = function Scroll(props) {
|
|
|
107
105
|
}
|
|
108
106
|
};
|
|
109
107
|
}, [props.data]);
|
|
110
|
-
return /*#__PURE__*/(
|
|
108
|
+
return /*#__PURE__*/_jsx(Scrollbar, {
|
|
111
109
|
direction: props.direction,
|
|
112
110
|
length: props.direction === 'x' ? info.width : info.height,
|
|
113
111
|
scrollLength: props.direction === 'x' ? info.scrollWidth : info.scrollHeight,
|
|
@@ -116,5 +114,4 @@ var Scroll = function Scroll(props) {
|
|
|
116
114
|
jssStyle: props.jssStyle
|
|
117
115
|
});
|
|
118
116
|
};
|
|
119
|
-
|
|
120
|
-
exports.default = _default;
|
|
117
|
+
export default Scroll;
|
package/esm/menu/scrollbar.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _hooks = require("@sheinx/hooks");
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var _config = require("../config");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
import { useDragMock, usePersistFn } from '@sheinx/hooks';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useConfig } from "../config";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
6
|
var Scrollbar = function Scrollbar(props) {
|
|
14
7
|
var _props$jssStyle, _props$jssStyle$menu;
|
|
15
|
-
var classes = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0
|
|
8
|
+
var classes = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$menu = _props$jssStyle.menu) === null || _props$jssStyle$menu === void 0 ? void 0 : _props$jssStyle$menu.call(_props$jssStyle);
|
|
16
9
|
var show = props.scrollLength > props.length;
|
|
17
|
-
var config =
|
|
10
|
+
var config = useConfig();
|
|
18
11
|
var isRtl = config.direction === 'rtl';
|
|
19
|
-
var _useRef =
|
|
12
|
+
var _useRef = useRef({
|
|
20
13
|
cachedOffset: props.offset
|
|
21
14
|
}),
|
|
22
15
|
context = _useRef.current;
|
|
23
16
|
var barLength = props.length * props.length / props.scrollLength;
|
|
24
17
|
if (barLength < 20) barLength = 20;
|
|
25
|
-
var onDragStart =
|
|
18
|
+
var onDragStart = usePersistFn(function () {
|
|
26
19
|
context.cachedOffset = props.offset;
|
|
27
20
|
});
|
|
28
|
-
var onDragMove =
|
|
21
|
+
var onDragMove = usePersistFn(function (deltaX, deltaY) {
|
|
29
22
|
var value = props.direction === 'x' ? deltaX : deltaY;
|
|
30
23
|
var newOffset;
|
|
31
24
|
if (props.direction === 'x' && isRtl) {
|
|
@@ -39,7 +32,7 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
39
32
|
context.cachedOffset = newOffset;
|
|
40
33
|
props.onScroll(newOffset);
|
|
41
34
|
});
|
|
42
|
-
var handleBgClick =
|
|
35
|
+
var handleBgClick = usePersistFn(function (e) {
|
|
43
36
|
if (e.target !== e.currentTarget) return;
|
|
44
37
|
var inner = e.target.firstChild;
|
|
45
38
|
if (!inner) return;
|
|
@@ -57,7 +50,7 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
57
50
|
}
|
|
58
51
|
props.onScroll(newOffset);
|
|
59
52
|
});
|
|
60
|
-
var _useDragMock =
|
|
53
|
+
var _useDragMock = useDragMock({
|
|
61
54
|
onDragStart: onDragStart,
|
|
62
55
|
onDragMove: onDragMove
|
|
63
56
|
}),
|
|
@@ -76,15 +69,14 @@ var Scrollbar = function Scrollbar(props) {
|
|
|
76
69
|
style.top = value;
|
|
77
70
|
}
|
|
78
71
|
}
|
|
79
|
-
return /*#__PURE__*/(
|
|
80
|
-
className: (
|
|
72
|
+
return /*#__PURE__*/_jsx("div", {
|
|
73
|
+
className: classNames(classes === null || classes === void 0 ? void 0 : classes.scrollbar, props.direction === 'x' && (classes === null || classes === void 0 ? void 0 : classes.scrollbarX), props.direction === 'y' && (classes === null || classes === void 0 ? void 0 : classes.scrollbarY), isDragging && (classes === null || classes === void 0 ? void 0 : classes.scrollbarDragging)),
|
|
81
74
|
onClick: handleBgClick,
|
|
82
|
-
children: /*#__PURE__*/(
|
|
75
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
83
76
|
className: classes === null || classes === void 0 ? void 0 : classes.scrolbarHandler,
|
|
84
77
|
onMouseDown: handleMouseDown,
|
|
85
78
|
style: style
|
|
86
79
|
})
|
|
87
80
|
});
|
|
88
81
|
};
|
|
89
|
-
|
|
90
|
-
exports.default = _default;
|
|
82
|
+
export default Scrollbar;
|
package/esm/message/func.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
8
|
-
var _manager = require("./manager");
|
|
1
|
+
import { destroy, getComponent } from "./manager";
|
|
9
2
|
var defaultOptions = {};
|
|
10
3
|
var create = function create(type) {
|
|
11
4
|
return function (content, duration, options) {
|
|
@@ -24,7 +17,7 @@ var create = function create(type) {
|
|
|
24
17
|
hideClose = mo.hideClose,
|
|
25
18
|
container = mo.container,
|
|
26
19
|
jssStyle = mo.jssStyle;
|
|
27
|
-
return
|
|
20
|
+
return getComponent({
|
|
28
21
|
position: position,
|
|
29
22
|
container: container,
|
|
30
23
|
jssStyle: jssStyle
|
|
@@ -43,7 +36,7 @@ var create = function create(type) {
|
|
|
43
36
|
});
|
|
44
37
|
};
|
|
45
38
|
};
|
|
46
|
-
|
|
39
|
+
export default {
|
|
47
40
|
show: create('default'),
|
|
48
41
|
success: create('success'),
|
|
49
42
|
info: create('info'),
|
|
@@ -52,14 +45,13 @@ var _default = {
|
|
|
52
45
|
danger: create('danger'),
|
|
53
46
|
error: create('danger'),
|
|
54
47
|
close: function close(key) {
|
|
55
|
-
if (key)
|
|
48
|
+
if (key) destroy(key);else {
|
|
56
49
|
['top', 'middle', 'top-left', 'top-right', 'bottom-left', 'bottom-right'].forEach(function (k) {
|
|
57
|
-
|
|
50
|
+
destroy(k);
|
|
58
51
|
});
|
|
59
52
|
}
|
|
60
53
|
},
|
|
61
54
|
setOptions: function setOptions(options) {
|
|
62
55
|
defaultOptions = options;
|
|
63
56
|
}
|
|
64
|
-
};
|
|
65
|
-
exports.default = _default;
|
|
57
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MessageClasses } from './message.type';
|
|
3
3
|
import { AlertClasses } from '../alert/alert.type';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type MessageType = 'default' | 'success' | 'info' | 'warning' | 'danger';
|
|
5
|
+
export type PositionType = 'top' | 'middle' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
6
6
|
export interface MessageFuncArg {
|
|
7
7
|
/**
|
|
8
8
|
* @en The message content
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"func.type.d.ts","sourceRoot":"","sources":["func.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,
|
|
1
|
+
{"version":3,"file":"func.type.d.ts","sourceRoot":"","sources":["func.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhF,MAAM,MAAM,YAAY,GACpB,KAAK,GACL,QAAQ,GACR,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAC;AAEnB,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;IACxF;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,WAAW,CAAC,GAAG,WAAW,CAAC;IAC9C,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,cAAc,CAAC;QAC/B,KAAK,CAAC,EAAE,MAAM,YAAY,CAAC;KAC5B,CAAC;CACH"}
|
package/esm/message/func.type.js
CHANGED
package/esm/message/index.js
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
|
-
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "Message", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _func.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "default", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _func.default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
var _func = _interopRequireDefault(require("./func"));
|
|
2
|
+
export { default, default as Message } from "./func";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["manager.tsx"],"names":[],"mappings":"AAEA,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAc9C,eAAO,MAAM,OAAO,aAAc,MAAM,SAWvC,CAAC;AAEF,UAAU,MAAM;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,MAAM,WAAW,CAAC,GAAG,WAAW,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;CACpC;AACD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["manager.tsx"],"names":[],"mappings":"AAEA,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAc9C,eAAO,MAAM,OAAO,aAAc,MAAM,SAWvC,CAAC;AAEF,UAAU,MAAM;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,MAAM,WAAW,CAAC,GAAG,WAAW,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;CACpC;AACD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,oBAiC1C;AAED,eAAe,OAAO,CAAC"}
|
package/esm/message/manager.js
CHANGED
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.destroy = exports.default = void 0;
|
|
8
|
-
exports.getComponent = getComponent;
|
|
9
|
-
require("core-js/modules/es.promise.js");
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _message = _interopRequireDefault(require("./message"));
|
|
12
|
-
var _config = require("../config");
|
|
13
|
-
var _hooks = require("@sheinx/hooks");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
1
|
// import classNames from 'classnames';
|
|
16
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Message from "./message";
|
|
4
|
+
import { getDefaultContainer } from "../config";
|
|
5
|
+
import { util } from '@sheinx/hooks';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
7
|
var lastContainer = null;
|
|
18
8
|
var elements = {};
|
|
19
9
|
var components = {};
|
|
20
10
|
var getContainer = function getContainer(container) {
|
|
21
|
-
var target =
|
|
11
|
+
var target = util.isFunc(container) ? container() : container;
|
|
22
12
|
if (target instanceof HTMLElement) return target;
|
|
23
|
-
return
|
|
13
|
+
return getDefaultContainer();
|
|
24
14
|
};
|
|
25
|
-
var destroy = function destroy(position) {
|
|
15
|
+
export var destroy = function destroy(position) {
|
|
26
16
|
var component = components[position];
|
|
27
17
|
var element = elements[position];
|
|
28
18
|
if (element) {
|
|
29
|
-
|
|
19
|
+
util.ReactUnmount(element);
|
|
30
20
|
if (element.parentNode) element.parentNode.removeChild(element);
|
|
31
21
|
delete elements[position];
|
|
32
22
|
}
|
|
@@ -34,8 +24,7 @@ var destroy = function destroy(position) {
|
|
|
34
24
|
delete components[position];
|
|
35
25
|
}
|
|
36
26
|
};
|
|
37
|
-
|
|
38
|
-
function getComponent(params) {
|
|
27
|
+
export function getComponent(params) {
|
|
39
28
|
var position = params.position,
|
|
40
29
|
container = params.container,
|
|
41
30
|
rootClassName = params.rootClassName,
|
|
@@ -53,8 +42,10 @@ function getComponent(params) {
|
|
|
53
42
|
var div = document.createElement('div');
|
|
54
43
|
div.className = rootClassName || '';
|
|
55
44
|
elements[position] = div;
|
|
56
|
-
target
|
|
57
|
-
|
|
45
|
+
if (target) {
|
|
46
|
+
target.appendChild(div);
|
|
47
|
+
}
|
|
48
|
+
util.ReactRender( /*#__PURE__*/_jsx(Message, {
|
|
58
49
|
ref: function ref(comp) {
|
|
59
50
|
if (!comp) return;
|
|
60
51
|
components[position] = comp;
|
|
@@ -67,5 +58,4 @@ function getComponent(params) {
|
|
|
67
58
|
}
|
|
68
59
|
});
|
|
69
60
|
}
|
|
70
|
-
|
|
71
|
-
exports.default = _default;
|
|
61
|
+
export default Message;
|
package/esm/message/message.js
CHANGED
|
@@ -1,42 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.default = void 0;
|
|
14
|
-
require("core-js/modules/es.array.map.js");
|
|
15
|
-
require("core-js/modules/es.array.concat.js");
|
|
16
|
-
require("core-js/modules/es.array.filter.js");
|
|
17
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
18
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
19
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
20
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
21
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
22
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
23
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
24
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
26
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
27
|
-
var _alert = _interopRequireDefault(require("../alert"));
|
|
28
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
29
|
-
var _hooks = require("@sheinx/hooks");
|
|
30
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
31
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
32
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
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); }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
34
12
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
|
-
function
|
|
36
|
-
function
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
18
|
+
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); }
|
|
19
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
|
+
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."); }
|
|
21
|
+
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); }
|
|
22
|
+
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; }
|
|
23
|
+
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; } }
|
|
24
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
+
import React, { useEffect, useState } from 'react';
|
|
26
|
+
import Alert from "../alert";
|
|
27
|
+
import classNames from 'classnames';
|
|
28
|
+
import { util } from '@sheinx/hooks';
|
|
29
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
30
|
+
var getUidStr = util.getUidStr,
|
|
31
|
+
getDataAttribute = util.getDataAttribute,
|
|
32
|
+
produce = util.produce;
|
|
40
33
|
var dismissDuration = 200;
|
|
41
34
|
var MessagePure = function MessagePure(props) {
|
|
42
35
|
var _jssStyle$message;
|
|
@@ -44,18 +37,18 @@ var MessagePure = function MessagePure(props) {
|
|
|
44
37
|
jssStyle = props.jssStyle,
|
|
45
38
|
position = props.position,
|
|
46
39
|
timeoutMap = props.timeoutMap;
|
|
47
|
-
var _useState =
|
|
48
|
-
_useState2 = (
|
|
40
|
+
var _useState = useState(timeoutMap),
|
|
41
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
49
42
|
timeoutByIdMap = _useState2[0],
|
|
50
43
|
setTimeoutByIdMap = _useState2[1];
|
|
51
|
-
|
|
44
|
+
useEffect(function () {
|
|
52
45
|
setTimeoutByIdMap(timeoutMap);
|
|
53
46
|
}, [Object.keys(timeoutMap).length]);
|
|
54
47
|
|
|
55
48
|
// hooks
|
|
56
|
-
var styles = jssStyle === null || jssStyle === void 0
|
|
49
|
+
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$message = jssStyle.message) === null || _jssStyle$message === void 0 ? void 0 : _jssStyle$message.call(jssStyle);
|
|
57
50
|
var handleClassName = function handleClassName(position, closeMsg) {
|
|
58
|
-
return (
|
|
51
|
+
return classNames(styles === null || styles === void 0 ? void 0 : styles.item, closeMsg ? styles === null || styles === void 0 ? void 0 : styles.itemDismissed : styles === null || styles === void 0 ? void 0 : styles.itemShow);
|
|
59
52
|
};
|
|
60
53
|
var handleStyle = function handleStyle(closeMsg, h, position) {
|
|
61
54
|
// eslint-disable-next-line eqeqeq
|
|
@@ -78,7 +71,7 @@ var MessagePure = function MessagePure(props) {
|
|
|
78
71
|
}
|
|
79
72
|
return styles;
|
|
80
73
|
};
|
|
81
|
-
return /*#__PURE__*/(
|
|
74
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
82
75
|
className: styles === null || styles === void 0 ? void 0 : styles.wrapper
|
|
83
76
|
}, getDataAttribute({
|
|
84
77
|
position: position
|
|
@@ -95,7 +88,7 @@ var MessagePure = function MessagePure(props) {
|
|
|
95
88
|
position = _ref.position,
|
|
96
89
|
hideClose = _ref.hideClose,
|
|
97
90
|
duration = _ref.duration;
|
|
98
|
-
return /*#__PURE__*/(
|
|
91
|
+
return /*#__PURE__*/_jsx("div", {
|
|
99
92
|
className: "".concat(handleClassName(position, !!dismiss), " ").concat(className),
|
|
100
93
|
style: handleStyle(!!dismiss, h || 0, position),
|
|
101
94
|
onMouseEnter: function onMouseEnter() {
|
|
@@ -109,7 +102,7 @@ var MessagePure = function MessagePure(props) {
|
|
|
109
102
|
props.onClose(id, dismissDuration, props.cachedHeight[id]);
|
|
110
103
|
}, duration * 1000);
|
|
111
104
|
setTimeoutByIdMap(function (prev) {
|
|
112
|
-
return _objectSpread(_objectSpread({}, prev), {}, (
|
|
105
|
+
return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, id, closeTimeDelay));
|
|
113
106
|
});
|
|
114
107
|
}
|
|
115
108
|
},
|
|
@@ -118,7 +111,7 @@ var MessagePure = function MessagePure(props) {
|
|
|
118
111
|
props.cachedHeight[id] = el.offsetHeight;
|
|
119
112
|
}
|
|
120
113
|
},
|
|
121
|
-
children: /*#__PURE__*/(
|
|
114
|
+
children: /*#__PURE__*/_jsx(Alert, _objectSpread(_objectSpread({
|
|
122
115
|
className: styles === null || styles === void 0 ? void 0 : styles.message,
|
|
123
116
|
jssStyle: jssStyle,
|
|
124
117
|
closable: !hideClose && 'only',
|
|
@@ -131,7 +124,7 @@ var MessagePure = function MessagePure(props) {
|
|
|
131
124
|
},
|
|
132
125
|
title: title,
|
|
133
126
|
type: type === 'default' ? undefined : type
|
|
134
|
-
},
|
|
127
|
+
}, util.getDataAttribute({
|
|
135
128
|
type: 'message'
|
|
136
129
|
})), {}, {
|
|
137
130
|
children: content
|
|
@@ -141,24 +134,24 @@ var MessagePure = function MessagePure(props) {
|
|
|
141
134
|
}));
|
|
142
135
|
};
|
|
143
136
|
var Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
144
|
-
(
|
|
137
|
+
_inherits(Message, _React$PureComponent);
|
|
145
138
|
var _super = _createSuper(Message);
|
|
146
139
|
function Message(props) {
|
|
147
140
|
var _this;
|
|
148
|
-
(
|
|
141
|
+
_classCallCheck(this, Message);
|
|
149
142
|
_this = _super.call(this, props);
|
|
150
|
-
(
|
|
151
|
-
(
|
|
143
|
+
_defineProperty(_assertThisInitialized(_this), "cachedHeight", void 0);
|
|
144
|
+
_defineProperty(_assertThisInitialized(_this), "timeoutMap", void 0);
|
|
152
145
|
_this.state = {
|
|
153
146
|
messages: []
|
|
154
147
|
};
|
|
155
148
|
_this.cachedHeight = {};
|
|
156
149
|
_this.timeoutMap = {};
|
|
157
|
-
_this.removeMessage = _this.removeMessage.bind((
|
|
158
|
-
_this.closeMessageForAnimation = _this.closeMessageForAnimation.bind((
|
|
150
|
+
_this.removeMessage = _this.removeMessage.bind(_assertThisInitialized(_this));
|
|
151
|
+
_this.closeMessageForAnimation = _this.closeMessageForAnimation.bind(_assertThisInitialized(_this));
|
|
159
152
|
return _this;
|
|
160
153
|
}
|
|
161
|
-
(
|
|
154
|
+
_createClass(Message, [{
|
|
162
155
|
key: "addMessage",
|
|
163
156
|
value: function addMessage(msg) {
|
|
164
157
|
var _this2 = this;
|
|
@@ -190,7 +183,7 @@ var Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
190
183
|
});
|
|
191
184
|
if (messages.length === 0) {
|
|
192
185
|
var _this$props$onDestroy, _this$props;
|
|
193
|
-
(_this$props$onDestroy = (_this$props = this.props).onDestroy) === null || _this$props$onDestroy === void 0
|
|
186
|
+
(_this$props$onDestroy = (_this$props = this.props).onDestroy) === null || _this$props$onDestroy === void 0 || _this$props$onDestroy.call(_this$props);
|
|
194
187
|
} else {
|
|
195
188
|
this.setState({
|
|
196
189
|
messages: messages
|
|
@@ -203,14 +196,16 @@ var Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
203
196
|
value: function closeMessageForAnimation(id, duration, msgHeight) {
|
|
204
197
|
var _this3 = this;
|
|
205
198
|
// duration animation duration time
|
|
206
|
-
this.setState(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
m.
|
|
210
|
-
|
|
211
|
-
|
|
199
|
+
this.setState(function (preState) {
|
|
200
|
+
return produce(preState, function (state) {
|
|
201
|
+
state.messages.forEach(function (m) {
|
|
202
|
+
if (m.id === id) {
|
|
203
|
+
m.dismiss = true;
|
|
204
|
+
m.h = msgHeight || 0;
|
|
205
|
+
}
|
|
206
|
+
});
|
|
212
207
|
});
|
|
213
|
-
})
|
|
208
|
+
});
|
|
214
209
|
setTimeout(function () {
|
|
215
210
|
_this3.removeMessage(id);
|
|
216
211
|
}, duration);
|
|
@@ -220,7 +215,7 @@ var Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
220
215
|
value: function render() {
|
|
221
216
|
var messages = this.state.messages;
|
|
222
217
|
var jssStyle = this.props.jssStyle;
|
|
223
|
-
return /*#__PURE__*/(
|
|
218
|
+
return /*#__PURE__*/_jsx(MessagePure, {
|
|
224
219
|
messages: messages,
|
|
225
220
|
jssStyle: jssStyle,
|
|
226
221
|
cachedHeight: this.cachedHeight,
|
|
@@ -231,6 +226,5 @@ var Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
231
226
|
}
|
|
232
227
|
}]);
|
|
233
228
|
return Message;
|
|
234
|
-
}(
|
|
235
|
-
|
|
236
|
-
exports.default = _default;
|
|
229
|
+
}(React.PureComponent);
|
|
230
|
+
export default Message;
|