@sheinx/base 3.8.0-beta.4 → 3.8.0-beta.40
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-list.js +2 -2
- package/cjs/alert/alert.d.ts.map +1 -1
- package/cjs/alert/alert.js +1 -1
- package/cjs/avatar/avatar.type.d.ts +5 -0
- package/cjs/avatar/avatar.type.d.ts.map +1 -1
- package/cjs/avatar/group.js +1 -1
- package/cjs/breadcrumb/breadcrumb-item.d.ts +11 -0
- package/cjs/breadcrumb/breadcrumb-item.d.ts.map +1 -0
- package/cjs/breadcrumb/breadcrumb-item.js +83 -0
- package/cjs/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/cjs/breadcrumb/breadcrumb.js +34 -32
- package/cjs/breadcrumb/breadcrumb.type.d.ts +4 -0
- package/cjs/breadcrumb/breadcrumb.type.d.ts.map +1 -1
- package/cjs/cascader/cascader.d.ts.map +1 -1
- package/cjs/cascader/cascader.js +29 -7
- package/cjs/cascader/cascader.type.d.ts +8 -0
- package/cjs/cascader/cascader.type.d.ts.map +1 -1
- package/cjs/cascader/node.d.ts.map +1 -1
- package/cjs/cascader/node.js +7 -3
- package/cjs/common/use-tip.js +1 -1
- package/cjs/config/index.d.ts +23 -0
- package/cjs/config/index.d.ts.map +1 -1
- package/cjs/config/index.js +7 -0
- package/cjs/config/locale/en_US.d.ts +3 -0
- package/cjs/config/locale/en_US.d.ts.map +1 -1
- package/cjs/config/locale/en_US.js +3 -0
- package/cjs/config/locale/zh-CN.d.ts +3 -0
- package/cjs/config/locale/zh-CN.d.ts.map +1 -1
- package/cjs/config/locale/zh-CN.js +3 -0
- package/cjs/date-picker/date-picker.d.ts.map +1 -1
- package/cjs/date-picker/date-picker.js +6 -2
- package/cjs/date-picker/date-picker.type.d.ts +3 -3
- package/cjs/date-picker/date-picker.type.d.ts.map +1 -1
- package/cjs/date-picker/day.d.ts.map +1 -1
- package/cjs/date-picker/day.js +3 -1
- package/cjs/date-picker/picker.d.ts.map +1 -1
- package/cjs/date-picker/picker.js +1 -0
- package/cjs/date-picker/picker.type.d.ts +2 -1
- package/cjs/date-picker/picker.type.d.ts.map +1 -1
- package/cjs/date-picker/result.d.ts +4 -4
- package/cjs/date-picker/result.d.ts.map +1 -1
- package/cjs/date-picker/result.js +1 -1
- package/cjs/date-picker/time.d.ts.map +1 -1
- package/cjs/date-picker/time.js +6 -2
- package/cjs/dropdown/Item.d.ts.map +1 -1
- package/cjs/dropdown/Item.js +3 -1
- package/cjs/empty/empty.d.ts.map +1 -1
- package/cjs/empty/empty.js +10 -5
- package/cjs/empty/empty.type.d.ts +4 -4
- package/cjs/form/form-field.d.ts.map +1 -1
- package/cjs/form/form-field.js +25 -2
- package/cjs/form/form-field.type.d.ts +12 -21
- package/cjs/form/form-field.type.d.ts.map +1 -1
- package/cjs/form/form-fieldset.d.ts.map +1 -1
- package/cjs/form/form-fieldset.js +55 -3
- package/cjs/form/form-fieldset.type.d.ts +35 -23
- package/cjs/form/form-fieldset.type.d.ts.map +1 -1
- package/cjs/form/form-flow.type.d.ts +11 -7
- package/cjs/form/form-flow.type.d.ts.map +1 -1
- package/cjs/form/form-item.d.ts.map +1 -1
- package/cjs/form/form-item.js +41 -16
- package/cjs/form/form-item.type.d.ts +1 -0
- package/cjs/form/form-item.type.d.ts.map +1 -1
- package/cjs/form/form.d.ts.map +1 -1
- package/cjs/form/form.js +2 -1
- package/cjs/form/form.type.d.ts +34 -24
- package/cjs/form/form.type.d.ts.map +1 -1
- package/cjs/form/form.type.js +4 -0
- package/cjs/form/index.d.ts +1 -1
- package/cjs/form/index.d.ts.map +1 -1
- package/cjs/icons/config.d.ts +3 -0
- package/cjs/icons/config.d.ts.map +1 -1
- package/cjs/icons/config.js +3 -0
- package/cjs/icons/icons.d.ts +1 -0
- package/cjs/icons/icons.d.ts.map +1 -1
- package/cjs/icons/icons.js +150 -1
- package/cjs/input/input-password.d.ts.map +1 -1
- package/cjs/input/input-password.js +2 -1
- package/cjs/input/input.d.ts.map +1 -1
- package/cjs/input/input.js +1 -0
- package/cjs/input/input.type.d.ts +11 -5
- package/cjs/input/input.type.d.ts.map +1 -1
- package/cjs/input/simple-input.d.ts.map +1 -1
- package/cjs/input/simple-input.js +31 -5
- package/cjs/input/use-input-common.d.ts +1 -1
- package/cjs/input/use-input-common.d.ts.map +1 -1
- package/cjs/input/use-input-common.js +42 -19
- package/cjs/list/list.d.ts.map +1 -1
- package/cjs/list/list.js +54 -22
- package/cjs/list/list.type.d.ts +8 -1
- package/cjs/list/list.type.d.ts.map +1 -1
- package/cjs/modal/modal-content.d.ts.map +1 -1
- package/cjs/modal/modal-content.js +6 -2
- package/cjs/pagination/pagination-size-list.d.ts.map +1 -1
- package/cjs/pagination/pagination-size-list.js +10 -9
- package/cjs/pagination/pagination-size-list.type.d.ts +1 -1
- package/cjs/pagination/pagination-size-list.type.d.ts.map +1 -1
- package/cjs/pagination/pagination.d.ts.map +1 -1
- package/cjs/pagination/pagination.js +10 -2
- package/cjs/pagination/pagination.type.d.ts +11 -11
- package/cjs/pagination/pagination.type.d.ts.map +1 -1
- package/cjs/popover/popover.d.ts.map +1 -1
- package/cjs/popover/popover.js +11 -2
- package/cjs/radio/group-context.d.ts.map +1 -1
- package/cjs/radio/group-context.js +1 -0
- package/cjs/radio/radio-group.d.ts.map +1 -1
- package/cjs/radio/radio-group.js +5 -1
- package/cjs/radio/radio.d.ts.map +1 -1
- package/cjs/radio/radio.js +9 -0
- package/cjs/radio/radio.type.d.ts +7 -1
- package/cjs/radio/radio.type.d.ts.map +1 -1
- package/cjs/radio/simple-radio.d.ts.map +1 -1
- package/cjs/radio/simple-radio.js +2 -1
- package/cjs/select/list-columns.d.ts.map +1 -1
- package/cjs/select/list-columns.js +6 -2
- package/cjs/select/list.d.ts.map +1 -1
- package/cjs/select/list.js +2 -0
- package/cjs/select/result-more.d.ts.map +1 -1
- package/cjs/select/result-more.js +5 -15
- package/cjs/select/result-more.type.d.ts +0 -1
- 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 +24 -8
- package/cjs/select/result.type.d.ts +1 -0
- package/cjs/select/result.type.d.ts.map +1 -1
- package/cjs/select/select.d.ts.map +1 -1
- package/cjs/select/select.js +16 -6
- package/cjs/select/select.type.d.ts +199 -127
- package/cjs/select/select.type.d.ts.map +1 -1
- package/cjs/sticky/sticky.d.ts.map +1 -1
- package/cjs/sticky/sticky.js +104 -21
- package/cjs/sticky/sticky.type.d.ts +6 -0
- package/cjs/sticky/sticky.type.d.ts.map +1 -1
- package/cjs/table/table.d.ts.map +1 -1
- package/cjs/table/table.js +46 -22
- package/cjs/table/table.type.d.ts +88 -82
- package/cjs/table/table.type.d.ts.map +1 -1
- package/cjs/table/tbody.d.ts.map +1 -1
- package/cjs/table/tbody.js +13 -1
- package/cjs/table/tbody.type.d.ts +5 -0
- package/cjs/table/tbody.type.d.ts.map +1 -1
- package/cjs/table/td.d.ts.map +1 -1
- package/cjs/table/td.js +5 -23
- package/cjs/table/tfoot.d.ts.map +1 -1
- package/cjs/table/tfoot.js +6 -2
- package/cjs/table/tfoot.type.d.ts +1 -0
- package/cjs/table/tfoot.type.d.ts.map +1 -1
- package/cjs/table/thead-filter.d.ts.map +1 -1
- package/cjs/table/thead-filter.js +17 -7
- package/cjs/table/thead.d.ts.map +1 -1
- package/cjs/table/thead.js +17 -1
- package/cjs/table/thead.type.d.ts +1 -1
- package/cjs/table/thead.type.d.ts.map +1 -1
- package/cjs/table/tr.d.ts +1 -0
- package/cjs/table/tr.d.ts.map +1 -1
- package/cjs/table/tr.js +5 -4
- package/cjs/tabs/tabs-header.d.ts.map +1 -1
- package/cjs/tabs/tabs-header.js +41 -11
- package/cjs/textarea/simple-textarea.d.ts.map +1 -1
- package/cjs/textarea/simple-textarea.js +4 -1
- package/cjs/textarea/textarea.d.ts.map +1 -1
- package/cjs/textarea/textarea.js +2 -1
- package/cjs/transfer/transfer-list.js +1 -1
- package/cjs/tree/tree-content.d.ts.map +1 -1
- package/cjs/tree/tree-content.js +2 -0
- package/cjs/tree/tree-content.type.d.ts +1 -0
- package/cjs/tree/tree-content.type.d.ts.map +1 -1
- package/cjs/tree/tree-node.type.d.ts +1 -0
- package/cjs/tree/tree-node.type.d.ts.map +1 -1
- package/cjs/tree/tree-simple-node.d.ts.map +1 -1
- package/cjs/tree/tree-simple-node.js +3 -1
- package/cjs/tree/tree-virtual-node.d.ts.map +1 -1
- package/cjs/tree/tree-virtual-node.js +15 -2
- package/cjs/tree/tree-virtual.d.ts.map +1 -1
- package/cjs/tree/tree-virtual.js +2 -1
- package/cjs/tree/tree.type.d.ts +2 -1
- package/cjs/tree/tree.type.d.ts.map +1 -1
- package/cjs/tree-select/tree-select.type.d.ts +1 -0
- package/cjs/tree-select/tree-select.type.d.ts.map +1 -1
- package/cjs/upload/useInputClick.d.ts +1 -0
- package/cjs/upload/useInputClick.d.ts.map +1 -1
- package/cjs/upload/useInputClick.js +4 -0
- package/cjs/virtual-scroll/scroll-table.d.ts.map +1 -1
- package/cjs/virtual-scroll/scroll-table.js +6 -2
- package/cjs/virtual-scroll/virtual-scroll-list.d.ts.map +1 -1
- package/cjs/virtual-scroll/virtual-scroll-list.js +8 -2
- package/cjs/virtual-scroll/virtual-scroll-list.type.d.ts +1 -0
- package/cjs/virtual-scroll/virtual-scroll-list.type.d.ts.map +1 -1
- package/esm/absolute-list/absolute-list.js +2 -2
- package/esm/alert/alert.d.ts.map +1 -1
- package/esm/alert/alert.js +1 -1
- package/esm/avatar/avatar.type.d.ts +5 -0
- package/esm/avatar/avatar.type.d.ts.map +1 -1
- package/esm/avatar/group.js +1 -1
- package/esm/breadcrumb/breadcrumb-item.d.ts +11 -0
- package/esm/breadcrumb/breadcrumb-item.d.ts.map +1 -0
- package/esm/breadcrumb/breadcrumb-item.js +76 -0
- package/esm/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/esm/breadcrumb/breadcrumb.js +34 -33
- package/esm/breadcrumb/breadcrumb.type.d.ts +4 -0
- package/esm/breadcrumb/breadcrumb.type.d.ts.map +1 -1
- package/esm/cascader/cascader.d.ts.map +1 -1
- package/esm/cascader/cascader.js +29 -7
- package/esm/cascader/cascader.type.d.ts +8 -0
- package/esm/cascader/cascader.type.d.ts.map +1 -1
- package/esm/cascader/node.d.ts.map +1 -1
- package/esm/cascader/node.js +7 -3
- package/esm/common/use-tip.js +1 -1
- package/esm/config/index.d.ts +23 -0
- package/esm/config/index.d.ts.map +1 -1
- package/esm/config/index.js +8 -0
- package/esm/config/locale/en_US.d.ts +3 -0
- package/esm/config/locale/en_US.d.ts.map +1 -1
- package/esm/config/locale/en_US.js +3 -0
- package/esm/config/locale/zh-CN.d.ts +3 -0
- package/esm/config/locale/zh-CN.d.ts.map +1 -1
- package/esm/config/locale/zh-CN.js +3 -0
- package/esm/date-picker/date-picker.d.ts.map +1 -1
- package/esm/date-picker/date-picker.js +6 -2
- package/esm/date-picker/date-picker.type.d.ts +3 -3
- package/esm/date-picker/date-picker.type.d.ts.map +1 -1
- package/esm/date-picker/day.d.ts.map +1 -1
- package/esm/date-picker/day.js +3 -1
- package/esm/date-picker/picker.d.ts.map +1 -1
- package/esm/date-picker/picker.js +1 -0
- package/esm/date-picker/picker.type.d.ts +2 -1
- package/esm/date-picker/picker.type.d.ts.map +1 -1
- package/esm/date-picker/result.d.ts +4 -4
- package/esm/date-picker/result.d.ts.map +1 -1
- package/esm/date-picker/result.js +1 -1
- package/esm/date-picker/time.d.ts.map +1 -1
- package/esm/date-picker/time.js +6 -2
- package/esm/dropdown/Item.d.ts.map +1 -1
- package/esm/dropdown/Item.js +3 -1
- package/esm/empty/empty.d.ts.map +1 -1
- package/esm/empty/empty.js +10 -5
- package/esm/empty/empty.type.d.ts +4 -4
- package/esm/form/form-field.d.ts.map +1 -1
- package/esm/form/form-field.js +26 -3
- package/esm/form/form-field.type.d.ts +12 -21
- package/esm/form/form-field.type.d.ts.map +1 -1
- package/esm/form/form-fieldset.d.ts.map +1 -1
- package/esm/form/form-fieldset.js +55 -3
- package/esm/form/form-fieldset.type.d.ts +35 -23
- package/esm/form/form-fieldset.type.d.ts.map +1 -1
- package/esm/form/form-flow.type.d.ts +11 -7
- package/esm/form/form-flow.type.d.ts.map +1 -1
- package/esm/form/form-item.d.ts.map +1 -1
- package/esm/form/form-item.js +39 -16
- package/esm/form/form-item.type.d.ts +1 -0
- package/esm/form/form-item.type.d.ts.map +1 -1
- package/esm/form/form.d.ts.map +1 -1
- package/esm/form/form.js +2 -1
- package/esm/form/form.type.d.ts +34 -24
- package/esm/form/form.type.d.ts.map +1 -1
- package/esm/form/form.type.js +5 -0
- package/esm/form/index.d.ts +1 -1
- package/esm/form/index.d.ts.map +1 -1
- package/esm/icons/config.d.ts +3 -0
- package/esm/icons/config.d.ts.map +1 -1
- package/esm/icons/config.js +3 -0
- package/esm/icons/icons.d.ts +1 -0
- package/esm/icons/icons.d.ts.map +1 -1
- package/esm/icons/icons.js +150 -1
- package/esm/input/input-password.d.ts.map +1 -1
- package/esm/input/input-password.js +2 -1
- package/esm/input/input.d.ts.map +1 -1
- package/esm/input/input.js +1 -0
- package/esm/input/input.type.d.ts +11 -5
- package/esm/input/input.type.d.ts.map +1 -1
- package/esm/input/simple-input.d.ts.map +1 -1
- package/esm/input/simple-input.js +32 -6
- package/esm/input/use-input-common.d.ts +1 -1
- package/esm/input/use-input-common.d.ts.map +1 -1
- package/esm/input/use-input-common.js +42 -19
- package/esm/list/list.d.ts.map +1 -1
- package/esm/list/list.js +55 -23
- package/esm/list/list.type.d.ts +8 -1
- package/esm/list/list.type.d.ts.map +1 -1
- package/esm/modal/modal-content.d.ts.map +1 -1
- package/esm/modal/modal-content.js +6 -2
- package/esm/pagination/pagination-size-list.d.ts.map +1 -1
- package/esm/pagination/pagination-size-list.js +10 -9
- package/esm/pagination/pagination-size-list.type.d.ts +1 -1
- package/esm/pagination/pagination-size-list.type.d.ts.map +1 -1
- package/esm/pagination/pagination.d.ts.map +1 -1
- package/esm/pagination/pagination.js +11 -3
- package/esm/pagination/pagination.type.d.ts +11 -11
- package/esm/pagination/pagination.type.d.ts.map +1 -1
- package/esm/popover/popover.d.ts.map +1 -1
- package/esm/popover/popover.js +11 -2
- package/esm/radio/group-context.d.ts.map +1 -1
- package/esm/radio/group-context.js +1 -0
- package/esm/radio/radio-group.d.ts.map +1 -1
- package/esm/radio/radio-group.js +5 -2
- package/esm/radio/radio.d.ts.map +1 -1
- package/esm/radio/radio.js +9 -0
- package/esm/radio/radio.type.d.ts +7 -1
- package/esm/radio/radio.type.d.ts.map +1 -1
- package/esm/radio/simple-radio.d.ts.map +1 -1
- package/esm/radio/simple-radio.js +2 -1
- package/esm/select/list-columns.d.ts.map +1 -1
- package/esm/select/list-columns.js +6 -2
- package/esm/select/list.d.ts.map +1 -1
- package/esm/select/list.js +2 -0
- package/esm/select/result-more.d.ts.map +1 -1
- package/esm/select/result-more.js +5 -15
- package/esm/select/result-more.type.d.ts +0 -1
- package/esm/select/result-more.type.d.ts.map +1 -1
- package/esm/select/result.d.ts.map +1 -1
- package/esm/select/result.js +24 -8
- package/esm/select/result.type.d.ts +1 -0
- package/esm/select/result.type.d.ts.map +1 -1
- package/esm/select/select.d.ts.map +1 -1
- package/esm/select/select.js +16 -6
- package/esm/select/select.type.d.ts +199 -127
- package/esm/select/select.type.d.ts.map +1 -1
- package/esm/sticky/sticky.d.ts.map +1 -1
- package/esm/sticky/sticky.js +104 -21
- package/esm/sticky/sticky.type.d.ts +6 -0
- package/esm/sticky/sticky.type.d.ts.map +1 -1
- package/esm/table/table.d.ts.map +1 -1
- package/esm/table/table.js +47 -23
- package/esm/table/table.type.d.ts +88 -82
- package/esm/table/table.type.d.ts.map +1 -1
- package/esm/table/tbody.d.ts.map +1 -1
- package/esm/table/tbody.js +13 -1
- package/esm/table/tbody.type.d.ts +5 -0
- package/esm/table/tbody.type.d.ts.map +1 -1
- package/esm/table/td.d.ts.map +1 -1
- package/esm/table/td.js +4 -20
- package/esm/table/tfoot.d.ts.map +1 -1
- package/esm/table/tfoot.js +6 -2
- package/esm/table/tfoot.type.d.ts +1 -0
- package/esm/table/tfoot.type.d.ts.map +1 -1
- package/esm/table/thead-filter.d.ts.map +1 -1
- package/esm/table/thead-filter.js +17 -7
- package/esm/table/thead.d.ts.map +1 -1
- package/esm/table/thead.js +17 -1
- package/esm/table/thead.type.d.ts +1 -1
- package/esm/table/thead.type.d.ts.map +1 -1
- package/esm/table/tr.d.ts +1 -0
- package/esm/table/tr.d.ts.map +1 -1
- package/esm/table/tr.js +5 -4
- package/esm/tabs/tabs-header.d.ts.map +1 -1
- package/esm/tabs/tabs-header.js +41 -11
- package/esm/textarea/simple-textarea.d.ts.map +1 -1
- package/esm/textarea/simple-textarea.js +4 -1
- package/esm/textarea/textarea.d.ts.map +1 -1
- package/esm/textarea/textarea.js +2 -1
- package/esm/transfer/transfer-list.js +1 -1
- package/esm/tree/tree-content.d.ts.map +1 -1
- package/esm/tree/tree-content.js +2 -0
- package/esm/tree/tree-content.type.d.ts +1 -0
- package/esm/tree/tree-content.type.d.ts.map +1 -1
- package/esm/tree/tree-node.type.d.ts +1 -0
- package/esm/tree/tree-node.type.d.ts.map +1 -1
- package/esm/tree/tree-simple-node.d.ts.map +1 -1
- package/esm/tree/tree-simple-node.js +3 -1
- package/esm/tree/tree-virtual-node.d.ts.map +1 -1
- package/esm/tree/tree-virtual-node.js +15 -2
- package/esm/tree/tree-virtual.d.ts.map +1 -1
- package/esm/tree/tree-virtual.js +2 -1
- package/esm/tree/tree.type.d.ts +2 -1
- package/esm/tree/tree.type.d.ts.map +1 -1
- package/esm/tree-select/tree-select.type.d.ts +1 -0
- package/esm/tree-select/tree-select.type.d.ts.map +1 -1
- package/esm/upload/useInputClick.d.ts +1 -0
- package/esm/upload/useInputClick.d.ts.map +1 -1
- package/esm/upload/useInputClick.js +4 -0
- package/esm/virtual-scroll/scroll-table.d.ts.map +1 -1
- package/esm/virtual-scroll/scroll-table.js +6 -2
- package/esm/virtual-scroll/virtual-scroll-list.d.ts.map +1 -1
- package/esm/virtual-scroll/virtual-scroll-list.js +8 -2
- package/esm/virtual-scroll/virtual-scroll-list.type.d.ts +1 -0
- package/esm/virtual-scroll/virtual-scroll-list.type.d.ts.map +1 -1
- package/package.json +3 -3
- package/cjs/empty/empty-image.d.ts +0 -2
- package/cjs/empty/empty-image.d.ts.map +0 -1
- package/cjs/empty/empty-image.js +0 -157
- package/esm/empty/empty-image.d.ts +0 -2
- package/esm/empty/empty-image.d.ts.map +0 -1
- package/esm/empty/empty-image.js +0 -152
package/cjs/icons/icons.js
CHANGED
|
@@ -224,6 +224,154 @@ var link = ['M8.83231 20.7322C7.27024 22.2943 4.73759 22.2943 3.17546 20.7322C1.
|
|
|
224
224
|
var filter = /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
225
225
|
d: "M19.9653 2.10633C20.5175 2.10633 20.9652 2.55404 20.9652 3.10633C20.9652 3.65861 20.5175 4.10633 19.9653 4.10633H19.6834L14.9666 11.3709V19.8936C14.9666 20.9981 14.0712 21.8936 12.9666 21.8936H10.9666C9.86204 21.8936 8.96662 20.9981 8.96662 19.8936V11.3709L4.35408 4.10632L4.03906 4.10632C3.48677 4.10632 3.03906 3.65861 3.03906 3.10632C3.03906 2.55404 3.48677 2.10632 4.03906 2.10632L19.9653 2.10633ZM6.75776 4.10632L10.8119 10.5206C10.913 10.6804 10.9666 10.8657 10.9666 11.0548V18.8312C10.9666 19.3835 11.4143 19.8312 11.9666 19.8312C12.5189 19.8312 12.9666 19.3835 12.9666 18.8312V11.0609C12.9666 10.868 13.0224 10.6792 13.1273 10.5172L17.2797 4.10633L6.75776 4.10632Z"
|
|
226
226
|
});
|
|
227
|
+
var emptyNoData = /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
228
|
+
width: "100",
|
|
229
|
+
height: "75",
|
|
230
|
+
viewBox: "0 0 100 75",
|
|
231
|
+
fill: "none",
|
|
232
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
233
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
234
|
+
clipPath: "url(#clip0_4044_10434)",
|
|
235
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
236
|
+
d: "M100 75C100 63.3607 77.6144 53.9257 50 53.9257C22.3857 53.9257 0 63.3607 0 75H100Z",
|
|
237
|
+
fill: "url(#paint0_linear_4044_10434)"
|
|
238
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
239
|
+
opacity: "0.3",
|
|
240
|
+
filter: "url(#filter0_f_4044_10434)",
|
|
241
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
242
|
+
d: "M50.3087 70.0413C69.5706 70.0413 85.185 68.2375 85.185 66.0125C85.185 63.7875 69.5706 61.9835 50.3087 61.9835C31.0469 61.9835 15.4321 63.7875 15.4321 66.0125C15.4321 68.2375 31.0469 70.0413 50.3087 70.0413Z",
|
|
243
|
+
fill: "#979EB0"
|
|
244
|
+
})
|
|
245
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
246
|
+
d: "M22.6082 23.6395C22.782 23.2127 23.1957 22.9338 23.6548 22.9338H75.7168C76.1718 22.9338 76.5818 23.2071 76.7593 23.6275L82.9493 38.3482H16.6184L22.6082 23.6395Z",
|
|
247
|
+
fill: "#CCCFD7"
|
|
248
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
249
|
+
d: "M75.9819 23.9172V37.2382H81.2882L75.9819 23.9172Z",
|
|
250
|
+
fill: "#999DA8"
|
|
251
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
252
|
+
d: "M18.877 37.0161H81.0701C82.6314 37.0161 83.897 38.2871 83.897 39.8547V61.7805C83.897 64.2888 81.872 66.3225 79.3739 66.3225H20.5732C18.0752 66.3225 16.05 64.2888 16.05 61.7805V39.8547C16.05 38.2871 17.3157 37.0161 18.877 37.0161Z",
|
|
253
|
+
fill: "#E8EBF0"
|
|
254
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
255
|
+
filter: "url(#filter1_d_4044_10434)",
|
|
256
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
257
|
+
d: "M16.0493 42.3192C16.0493 39.8108 16.0019 37.715 20.573 37.7774H79.3737C83.5612 37.7774 83.8968 39.8108 83.8968 42.3192V61.3998C83.8968 63.9087 81.8718 65.9419 79.3737 65.9419H20.573C18.075 65.9419 16.0493 63.9087 16.0493 61.3998V42.3192Z",
|
|
258
|
+
fill: "black"
|
|
259
|
+
})
|
|
260
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
261
|
+
d: "M16.0493 42.3192C16.0493 39.8108 16.0019 37.715 20.573 37.7774H79.3737C83.5612 37.7774 83.8968 39.8108 83.8968 42.3192V61.3998C83.8968 63.9087 81.8718 65.9419 79.3737 65.9419H20.573C18.075 65.9419 16.0493 63.9087 16.0493 61.3998V42.3192Z",
|
|
262
|
+
fill: "#F4F5F8"
|
|
263
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
264
|
+
d: "M23.4412 23.8855V37.0162H18.3242L23.4412 23.8855Z",
|
|
265
|
+
fill: "#999DA8"
|
|
266
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
267
|
+
d: "M60.3971 50.7178H39.5502C38.0849 50.7178 36.897 51.9106 36.897 53.382C36.897 54.8534 38.0849 56.0462 39.5502 56.0462H60.3971C61.8625 56.0462 63.0501 54.8534 63.0501 53.382C63.0501 51.9106 61.8625 50.7178 60.3971 50.7178Z",
|
|
268
|
+
fill: "#666C7C"
|
|
269
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
270
|
+
d: "M60.3971 49.9565H39.5502C38.0849 49.9565 36.897 51.1494 36.897 52.6208C36.897 54.0922 38.0849 55.285 39.5502 55.285H60.3971C61.8625 55.285 63.0501 54.0922 63.0501 52.6208C63.0501 51.1494 61.8625 49.9565 60.3971 49.9565Z",
|
|
271
|
+
fill: "#999DA8"
|
|
272
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
273
|
+
fillRule: "evenodd",
|
|
274
|
+
clipRule: "evenodd",
|
|
275
|
+
d: "M46.041 3.14062C42.6319 3.14062 39.8682 5.91575 39.8682 9.33899V11.4859C39.8682 14.9092 42.6319 17.6842 46.041 17.6842H54.8002C58.2093 17.6842 60.9731 14.9092 60.9731 11.4859V9.33899C60.9731 5.91575 58.2093 3.14062 54.8002 3.14062H46.041ZM47.3169 21.0086L49.386 17.6842H45.2478L47.3169 21.0086Z",
|
|
276
|
+
fill: "#E8EBF0"
|
|
277
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
278
|
+
d: "M45.6834 8.54285L47.4941 11.6922H43.8726L45.6834 8.54285Z",
|
|
279
|
+
fill: "#999DA8"
|
|
280
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
281
|
+
d: "M52.304 8.54285H49.1677V11.6921H52.304V8.54285Z",
|
|
282
|
+
fill: "#999DA8"
|
|
283
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
284
|
+
d: "M55.6802 11.6919C56.5463 11.6919 57.2484 10.9869 57.2484 10.1172C57.2484 9.2476 56.5463 8.5426 55.6802 8.5426C54.8142 8.5426 54.1121 9.2476 54.1121 10.1172C54.1121 10.9869 54.8142 11.6919 55.6802 11.6919Z",
|
|
285
|
+
fill: "#999DA8"
|
|
286
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
287
|
+
d: "M67.7256 5.8507C66.5081 6.69694 63.5181 6.751 62.3457 7.09731L63.5875 5.64293C64.415 4.6041 64.6631 4.10547 65.6562 2.11091C66.6493 0.116362 69.3118 -0.105256 70.415 0.0332553C69.7943 1.27985 70.415 3.98081 67.7256 5.8507Z",
|
|
288
|
+
fill: "#E8EBF0"
|
|
289
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
290
|
+
d: "M46.257 34.8904C45.3444 35.1307 43.5421 34.5087 42.7649 34.4595L43.824 33.8603C44.5451 33.4193 44.802 33.175 45.8298 32.198C46.8574 31.221 48.4998 31.6709 49.1305 31.9953C48.4883 32.606 48.2737 34.3593 46.257 34.8904Z",
|
|
291
|
+
fill: "#E8EBF0"
|
|
292
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
293
|
+
d: "M37.262 32.7723C37.13 32.5427 37.2462 32.2485 37.4982 32.1696C39.7646 31.4593 49.3015 28.2658 55.6537 22.9713C62.0347 17.653 67.6725 11.576 69.1256 9.9791C69.3069 9.77991 69.6263 9.81841 69.76 10.0521C69.845 10.1989 69.8294 10.3803 69.7169 10.507C68.6225 11.7406 62.8044 18.1953 56.0675 23.6911C48.7371 29.6708 39.4667 32.4671 37.7105 32.9602C37.5349 33.0096 37.3532 32.9308 37.262 32.7723Z",
|
|
294
|
+
fill: "#E8EBF0"
|
|
295
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
296
|
+
d: "M26.0283 27.1925C25.977 26.9505 26.1514 26.7154 26.396 26.6852C27.3291 26.5701 29.6586 26.1971 33.309 25.0577C37.011 23.9021 40.6908 21.2137 41.9723 20.2199C42.1914 20.05 42.5167 20.1675 42.5743 20.4394C42.6023 20.572 42.5585 20.7071 42.454 20.793C41.598 21.497 37.5626 24.6932 33.4811 25.8705C29.5763 26.9969 27.2876 27.3842 26.4592 27.5011C26.2561 27.5298 26.0709 27.394 26.0283 27.1925Z",
|
|
297
|
+
fill: "#E8EBF0"
|
|
298
|
+
})]
|
|
299
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("defs", {
|
|
300
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("filter", {
|
|
301
|
+
id: "filter0_f_4044_10434",
|
|
302
|
+
x: "9.43213",
|
|
303
|
+
y: "55.9835",
|
|
304
|
+
width: "81.7529",
|
|
305
|
+
height: "20.0577",
|
|
306
|
+
filterUnits: "userSpaceOnUse",
|
|
307
|
+
colorInterpolationFilters: "sRGB",
|
|
308
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("feFlood", {
|
|
309
|
+
floodOpacity: "0",
|
|
310
|
+
result: "BackgroundImageFix"
|
|
311
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feBlend", {
|
|
312
|
+
mode: "normal",
|
|
313
|
+
in: "SourceGraphic",
|
|
314
|
+
in2: "BackgroundImageFix",
|
|
315
|
+
result: "shape"
|
|
316
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feGaussianBlur", {
|
|
317
|
+
stdDeviation: "3",
|
|
318
|
+
result: "effect1_foregroundBlur_4044_10434"
|
|
319
|
+
})]
|
|
320
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("filter", {
|
|
321
|
+
id: "filter1_d_4044_10434",
|
|
322
|
+
x: "16.0493",
|
|
323
|
+
y: "37.776",
|
|
324
|
+
width: "67.8474",
|
|
325
|
+
height: "30.1659",
|
|
326
|
+
filterUnits: "userSpaceOnUse",
|
|
327
|
+
colorInterpolationFilters: "sRGB",
|
|
328
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("feFlood", {
|
|
329
|
+
floodOpacity: "0",
|
|
330
|
+
result: "BackgroundImageFix"
|
|
331
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feColorMatrix", {
|
|
332
|
+
in: "SourceAlpha",
|
|
333
|
+
type: "matrix",
|
|
334
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
335
|
+
result: "hardAlpha"
|
|
336
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feOffset", {
|
|
337
|
+
dy: "2"
|
|
338
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feColorMatrix", {
|
|
339
|
+
type: "matrix",
|
|
340
|
+
values: "0 0 0 0 0.803922 0 0 0 0 0.811765 0 0 0 0 0.843137 0 0 0 1 0"
|
|
341
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feBlend", {
|
|
342
|
+
mode: "normal",
|
|
343
|
+
in2: "BackgroundImageFix",
|
|
344
|
+
result: "effect1_dropShadow_4044_10434"
|
|
345
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feBlend", {
|
|
346
|
+
mode: "normal",
|
|
347
|
+
in: "SourceGraphic",
|
|
348
|
+
in2: "effect1_dropShadow_4044_10434",
|
|
349
|
+
result: "shape"
|
|
350
|
+
})]
|
|
351
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("linearGradient", {
|
|
352
|
+
id: "paint0_linear_4044_10434",
|
|
353
|
+
x1: "50",
|
|
354
|
+
y1: "53.9257",
|
|
355
|
+
x2: "50",
|
|
356
|
+
y2: "75",
|
|
357
|
+
gradientUnits: "userSpaceOnUse",
|
|
358
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
359
|
+
stopColor: "#E9EBEF"
|
|
360
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
361
|
+
offset: "1",
|
|
362
|
+
stopColor: "#E9EBEF",
|
|
363
|
+
stopOpacity: "0"
|
|
364
|
+
})]
|
|
365
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("clipPath", {
|
|
366
|
+
id: "clip0_4044_10434",
|
|
367
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
|
|
368
|
+
width: "100",
|
|
369
|
+
height: "75",
|
|
370
|
+
fill: "white"
|
|
371
|
+
})
|
|
372
|
+
})]
|
|
373
|
+
})]
|
|
374
|
+
});
|
|
227
375
|
var Icons = {
|
|
228
376
|
SortAsc: SortAsc,
|
|
229
377
|
SortDesc: SortDesc,
|
|
@@ -264,6 +412,7 @@ var Icons = {
|
|
|
264
412
|
RecoverCircle: icon(recoverCircle),
|
|
265
413
|
StarFill: icon(pcStarFill),
|
|
266
414
|
Link: icon(link),
|
|
267
|
-
Loading: icon(loading)
|
|
415
|
+
Loading: icon(loading),
|
|
416
|
+
EmptyNoData: emptyNoData
|
|
268
417
|
};
|
|
269
418
|
var _default = exports.default = Icons;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-password.d.ts","sourceRoot":"","sources":["input-password.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;;
|
|
1
|
+
{"version":3,"file":"input-password.d.ts","sourceRoot":"","sources":["input-password.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;;AAoD3D,wBAAoC"}
|
|
@@ -50,7 +50,8 @@ var Password = function Password(props) {
|
|
|
50
50
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_simpleInput.default, _objectSpread(_objectSpread(_objectSpread({}, forwardProps), inputProps), {}, {
|
|
51
51
|
className: props.className,
|
|
52
52
|
suffix: suffix,
|
|
53
|
-
hasSuffix: true
|
|
53
|
+
hasSuffix: true,
|
|
54
|
+
showClear: props.showClear
|
|
54
55
|
}));
|
|
55
56
|
};
|
|
56
57
|
var _default = exports.default = /*#__PURE__*/_react.default.memo(Password);
|
package/cjs/input/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,MAAM,OAAO,CAAC;;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,MAAM,OAAO,CAAC;;AA6C1B,wBAAiC"}
|
package/cjs/input/input.js
CHANGED
|
@@ -40,6 +40,7 @@ var Input = function Input(props) {
|
|
|
40
40
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_simpleInput.default, _objectSpread(_objectSpread(_objectSpread({}, forwardProps), inputFormatProps), {}, {
|
|
41
41
|
value: (_inputFormatProps$val = inputFormatProps.value) !== null && _inputFormatProps$val !== void 0 ? _inputFormatProps$val : '',
|
|
42
42
|
hasSuffix: !!props.suffix,
|
|
43
|
+
showClear: props.showClear,
|
|
43
44
|
onKeyDown: function onKeyDown(e) {
|
|
44
45
|
var _props$onKeyDown;
|
|
45
46
|
if (e.key === 'Enter' && !e.defaultPrevented) {
|
|
@@ -4,6 +4,7 @@ import { InnerTitleClasses } from '../common/use-inner-title';
|
|
|
4
4
|
import { BaseTipProps } from '../common/use-tip';
|
|
5
5
|
import { BaseInputProps, InputFormatProps } from '@sheinx/hooks';
|
|
6
6
|
import { PopoverClasses } from '../popover/popover.type';
|
|
7
|
+
import { TextareaInfoOption } from '../textarea/textarea.type';
|
|
7
8
|
export interface InputClasses {
|
|
8
9
|
rootClass: string;
|
|
9
10
|
/**
|
|
@@ -35,7 +36,6 @@ export interface InputClasses {
|
|
|
35
36
|
wrapperUnderline: string;
|
|
36
37
|
wrapperNoBorder: string;
|
|
37
38
|
info: string;
|
|
38
|
-
infoError: string;
|
|
39
39
|
group: string;
|
|
40
40
|
groupSeparate: string;
|
|
41
41
|
groupSmall: string;
|
|
@@ -47,6 +47,8 @@ export interface InputClasses {
|
|
|
47
47
|
numberStep: string;
|
|
48
48
|
passwordToggle: string;
|
|
49
49
|
password: string;
|
|
50
|
+
wrapperShowClear: string;
|
|
51
|
+
wrapperHasValue: string;
|
|
50
52
|
}
|
|
51
53
|
export interface InputStyle {
|
|
52
54
|
input?: () => InputClasses;
|
|
@@ -89,14 +91,17 @@ export interface SimpleInputProps extends BaseInputProps, Pick<CommonType, 'stat
|
|
|
89
91
|
*/
|
|
90
92
|
onEnterPress?: (value: string, e: React.KeyboardEvent) => void;
|
|
91
93
|
/**
|
|
92
|
-
* @en Whether to show clear
|
|
93
|
-
* @cn
|
|
94
|
+
* @en Whether to show clear button when has value, higher priority than clearable
|
|
95
|
+
* @cn 有值时,是否常驻显示清除按钮,优先级高于 clearable
|
|
96
|
+
* @version 3.8.0
|
|
94
97
|
*/
|
|
95
98
|
showClear?: boolean;
|
|
96
99
|
renderInput?: (inputEl: React.ReactElement) => React.ReactElement;
|
|
97
100
|
hasSuffix?: boolean;
|
|
98
101
|
name?: string;
|
|
99
102
|
}
|
|
103
|
+
type InputInfoOption = TextareaInfoOption;
|
|
104
|
+
export type InputInfo = number | ((value: string) => React.ReactNode | Error);
|
|
100
105
|
export interface InputCommonProps<V> extends BaseTipProps, Pick<CommonType, 'className' | 'style' | 'name'> {
|
|
101
106
|
suffix?: SimpleInputProps['suffix'];
|
|
102
107
|
/**
|
|
@@ -174,7 +179,7 @@ export interface InputCommonProps<V> extends BaseTipProps, Pick<CommonType, 'cla
|
|
|
174
179
|
* @cn 提示信息
|
|
175
180
|
* @override number | ((value: string | undefined) => string)
|
|
176
181
|
*/
|
|
177
|
-
info?:
|
|
182
|
+
info?: InputInfo | InputInfoOption;
|
|
178
183
|
/**
|
|
179
184
|
* @en Disable component
|
|
180
185
|
* @cn 禁用组件
|
|
@@ -193,7 +198,8 @@ export interface InputCommonProps<V> extends BaseTipProps, Pick<CommonType, 'cla
|
|
|
193
198
|
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
194
199
|
status?: CommonType['status'];
|
|
195
200
|
}
|
|
196
|
-
export type GetCommonProps<Props, V> = Omit<Props, 'value' | 'onChange' | 'defaultValue' | 'clearable' | 'onClear' | 'name' | 'step' | 'min' | 'max' | 'rootRef' | 'inputRef' | 'getStatus' | 'renderInput' | 'addEnd' | 'hasSuffix' | 'onFocusedChange'
|
|
201
|
+
export type GetCommonProps<Props, V> = Omit<Props, 'value' | 'onChange' | 'defaultValue' | 'clearable' | 'onClear' | 'name' | 'step' | 'min' | 'max' | 'rootRef' | 'inputRef' | 'getStatus' | 'renderInput' | 'addEnd' | 'hasSuffix' | 'onFocusedChange'> & InputCommonProps<V>;
|
|
197
202
|
export interface InputProps extends GetCommonProps<SimpleInputProps, string | undefined>, Omit<InputFormatProps, 'value' | 'onChange' | 'cancelBlurChange'> {
|
|
198
203
|
}
|
|
204
|
+
export {};
|
|
199
205
|
//# sourceMappingURL=input.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.type.d.ts","sourceRoot":"","sources":["input.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"input.type.d.ts","sourceRoot":"","sources":["input.type.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple-input.d.ts","sourceRoot":"","sources":["simple-input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIhD,QAAA,MAAM,KAAK;YAAW,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"simple-input.d.ts","sourceRoot":"","sources":["simple-input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIhD,QAAA,MAAM,KAAK;YAAW,gBAAgB;;CA0HrC,CAAC;AAGF,eAAe,KAAK,CAAC"}
|
|
@@ -24,7 +24,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
24
24
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
25
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
26
26
|
var Input = function Input(props) {
|
|
27
|
-
var _jssStyle$input;
|
|
27
|
+
var _jssStyle$input, _inputElProps$value;
|
|
28
28
|
var jssStyle = props.jssStyle,
|
|
29
29
|
className = props.className,
|
|
30
30
|
style = props.style,
|
|
@@ -42,20 +42,41 @@ var Input = function Input(props) {
|
|
|
42
42
|
addEnd = props.addEnd,
|
|
43
43
|
hasSuffix = props.hasSuffix,
|
|
44
44
|
rest = _objectWithoutProperties(props, _excluded);
|
|
45
|
+
var _useRef = (0, _react.useRef)({
|
|
46
|
+
needTriggerEnter: false
|
|
47
|
+
}),
|
|
48
|
+
context = _useRef.current;
|
|
45
49
|
var inputStyle = jssStyle === null || jssStyle === void 0 || (_jssStyle$input = jssStyle.input) === null || _jssStyle$input === void 0 ? void 0 : _jssStyle$input.call(jssStyle);
|
|
46
50
|
var config = (0, _config.useConfig)();
|
|
47
51
|
var _useContext = (0, _react.useContext)(_formFieldContext.FormFieldContext),
|
|
48
52
|
fieldId = _useContext.fieldId;
|
|
53
|
+
var showClearFromProp = props.showClear && !props.disabled;
|
|
49
54
|
var _useInput = (0, _hooks.useInput)(_objectSpread(_objectSpread({}, rest), {}, {
|
|
50
|
-
onFocusedChange: onFocusedChange
|
|
55
|
+
onFocusedChange: onFocusedChange,
|
|
56
|
+
// 由于form的原生submit事件是在keydown中触发的,submit校验后触发scrollToError会导致当前焦点的input立即失焦,导致input的回车事件无法触发
|
|
57
|
+
// 所以这里在onKeyDown时机记录下needTriggerEnter标志,在onBlur时机判断是否需要触发onEnterPress
|
|
58
|
+
onKeyDown: function onKeyDown(e) {
|
|
59
|
+
var _props$onKeyDown;
|
|
60
|
+
if (e.key === 'Enter') {
|
|
61
|
+
context.needTriggerEnter = true;
|
|
62
|
+
}
|
|
63
|
+
(_props$onKeyDown = props.onKeyDown) === null || _props$onKeyDown === void 0 || _props$onKeyDown.call(props, e);
|
|
64
|
+
},
|
|
65
|
+
onBlur: function onBlur(e) {
|
|
66
|
+
var _props$onBlur;
|
|
67
|
+
if (context.needTriggerEnter) {
|
|
68
|
+
context.needTriggerEnter = false;
|
|
69
|
+
_onEnterPress === null || _onEnterPress === void 0 || _onEnterPress(e.target.value || '', e);
|
|
70
|
+
}
|
|
71
|
+
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
|
|
72
|
+
}
|
|
51
73
|
})),
|
|
52
74
|
getRootProps = _useInput.getRootProps,
|
|
53
75
|
getClearProps = _useInput.getClearProps,
|
|
54
76
|
getInputProps = _useInput.getInputProps,
|
|
55
|
-
|
|
77
|
+
showClearFromClearable = _useInput.showClear,
|
|
56
78
|
focused = _useInput.focused,
|
|
57
79
|
disabled = _useInput.disabled;
|
|
58
|
-
var rootClass = (0, _classnames.default)(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.rootClass, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapper, !!focused && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperFocus), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperDisabled), status === 'error' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperError), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperLarge), !!underline && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperUnderline), !border && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperNoBorder), hasSuffix && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.password));
|
|
59
80
|
var keyHandler = (0, _hooks.useKeyEvent)({
|
|
60
81
|
onEnterPress: function onEnterPress(e) {
|
|
61
82
|
_onEnterPress === null || _onEnterPress === void 0 || _onEnterPress(e.target.value || '', e);
|
|
@@ -63,6 +84,10 @@ var Input = function Input(props) {
|
|
|
63
84
|
});
|
|
64
85
|
var onKeyUp = (0, _hooks.usePersistFn)(function (e) {
|
|
65
86
|
var _props$onKeyUp;
|
|
87
|
+
if (e.key === 'Enter') {
|
|
88
|
+
context.needTriggerEnter = false;
|
|
89
|
+
}
|
|
90
|
+
;
|
|
66
91
|
(_props$onKeyUp = props.onKeyUp) === null || _props$onKeyUp === void 0 || _props$onKeyUp.call(props, e);
|
|
67
92
|
keyHandler(e);
|
|
68
93
|
});
|
|
@@ -79,6 +104,7 @@ var Input = function Input(props) {
|
|
|
79
104
|
if (typeof renderInput === 'function') {
|
|
80
105
|
inputEl = renderInput(inputEl);
|
|
81
106
|
}
|
|
107
|
+
var rootClass = (0, _classnames.default)(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.rootClass, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapper, !!focused && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperFocus), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperDisabled), status === 'error' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperError), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperLarge), !!underline && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperUnderline), !border && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperNoBorder), hasSuffix && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.password), showClearFromProp && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperShowClear), showClearFromProp && ((_inputElProps$value = inputElProps.value) === null || _inputElProps$value === void 0 ? void 0 : _inputElProps$value.length) > 0 && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperHasValue));
|
|
82
108
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", _objectSpread(_objectSpread(_objectSpread({
|
|
83
109
|
id: fieldId
|
|
84
110
|
}, _hooks.util.getDataAttribute(_defineProperty({}, 'input-border', 'true'))), getRootProps({
|
|
@@ -87,7 +113,7 @@ var Input = function Input(props) {
|
|
|
87
113
|
})), {}, {
|
|
88
114
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
89
115
|
className: (0, _classnames.default)(inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperInnerTitleTop, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperInnerTitleBottom, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperPaddingBox, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.content),
|
|
90
|
-
children: [prefix, inputEl,
|
|
116
|
+
children: [prefix, inputEl, (showClearFromProp || showClearFromClearable) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
|
|
91
117
|
className: inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.clearWrapper
|
|
92
118
|
}, getClearProps()), {}, {
|
|
93
119
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputCommonProps } from './input.type';
|
|
3
|
-
declare const useInputCommon: <Value, Props extends InputCommonProps<Value>>(props0: Props) => Omit<Props, "error" | "info" | "style" | "status" | "size" | "innerTitle" | "placeTitle" | "tip" | "value" | "onChange" | "disabled" | "width" | "defaultValue" | "popover" | "delay" | "beforeChange" | "popoverProps" | "onBlur" | "clearable" | "
|
|
3
|
+
declare const useInputCommon: <Value, Props extends InputCommonProps<Value>>(props0: Props) => Omit<Props, "error" | "info" | "style" | "status" | "size" | "innerTitle" | "placeTitle" | "tip" | "value" | "onChange" | "disabled" | "width" | "defaultValue" | "popover" | "delay" | "beforeChange" | "popoverProps" | "onBlur" | "clearable" | "clearToUndefined" | "forwardedRef" | "suffix" | "forwardRef" | "htmlName"> & {
|
|
4
4
|
name: string | undefined;
|
|
5
5
|
style: React.CSSProperties;
|
|
6
6
|
suffix: import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-input-common.d.ts","sourceRoot":"","sources":["use-input-common.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWhD,QAAA,MAAM,cAAc;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-input-common.d.ts","sourceRoot":"","sources":["use-input-common.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWhD,QAAA,MAAM,cAAc;;;;;;;;;;gCAkI8B,OAAO;;;;;;;gBAQnB,gBAAgB,CAAC,gBAAgB,CAAC;CAsBvE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -18,6 +17,7 @@ var _excluded = ["forwardRef", "forwardedRef", "htmlName", "value", "onChange",
|
|
|
18
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
18
|
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); }
|
|
20
19
|
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; }
|
|
20
|
+
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); }
|
|
21
21
|
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; }
|
|
22
22
|
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; }
|
|
23
23
|
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; }
|
|
@@ -38,7 +38,7 @@ var defaultInfo = function defaultInfo(num, msg) {
|
|
|
38
38
|
return new Error(text);
|
|
39
39
|
};
|
|
40
40
|
var useInputCommon = function useInputCommon(props0) {
|
|
41
|
-
var _ref, _props$jssStyle, _props$jssStyle$input;
|
|
41
|
+
var _ref, _props$jssStyle, _props$jssStyle$input, _infoState$error;
|
|
42
42
|
var config = (0, _config.useConfig)();
|
|
43
43
|
var props = (0, _useWithFormConfig.default)(props0);
|
|
44
44
|
var forwardRef = props.forwardRef,
|
|
@@ -67,7 +67,7 @@ var useInputCommon = function useInputCommon(props0) {
|
|
|
67
67
|
size = props.size,
|
|
68
68
|
rest = _objectWithoutProperties(props, _excluded);
|
|
69
69
|
var delay = (_ref = delayProps !== null && delayProps !== void 0 ? delayProps : config.delay) !== null && _ref !== void 0 ? _ref : 0;
|
|
70
|
-
var
|
|
70
|
+
var inputClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$input = _props$jssStyle.input) === null || _props$jssStyle$input === void 0 ? void 0 : _props$jssStyle$input.call(_props$jssStyle);
|
|
71
71
|
var rootRef = _react.default.useRef(null);
|
|
72
72
|
var _React$useState = _react.default.useState(false),
|
|
73
73
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -109,27 +109,50 @@ var useInputCommon = function useInputCommon(props0) {
|
|
|
109
109
|
value: inputAbleProps.value,
|
|
110
110
|
onChange: inputAbleProps.onChange
|
|
111
111
|
});
|
|
112
|
-
var
|
|
112
|
+
var getInfoState = function getInfoState() {
|
|
113
113
|
var notNumber = typeof info !== 'number';
|
|
114
|
-
if (typeof info !== 'function' && notNumber) return null;
|
|
115
|
-
var
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
if (typeof info !== 'function' && _typeof(info) !== 'object' && notNumber) return null;
|
|
115
|
+
var infoContent;
|
|
116
|
+
if (_typeof(info) === 'object') {
|
|
117
|
+
infoContent = info.content;
|
|
118
|
+
} else {
|
|
119
|
+
infoContent = info;
|
|
120
|
+
}
|
|
121
|
+
var notContentNumber = typeof infoContent !== 'number';
|
|
122
|
+
var textInfo = notContentNumber ? infoContent : defaultInfo.bind(null, infoContent);
|
|
123
|
+
var error = textInfo(inputAbleProps.value);
|
|
124
|
+
if (!error) return null;
|
|
125
|
+
var isError = error instanceof Error;
|
|
126
|
+
var text = isError ? error.message : error;
|
|
121
127
|
if (!isError && !focused) return null;
|
|
122
|
-
return
|
|
128
|
+
return {
|
|
129
|
+
text: text,
|
|
130
|
+
error: error
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
var infoState = (0, _react.useMemo)(getInfoState, [info, inputAbleProps.value, focused]);
|
|
134
|
+
var infoPopoverProps = {
|
|
135
|
+
popover: props.popover || (_typeof(info) === 'object' ? info.position : 'bottom-right'),
|
|
136
|
+
popoverProps: Object.assign({
|
|
123
137
|
style: {
|
|
124
|
-
|
|
138
|
+
width: 'auto',
|
|
139
|
+
fontSize: 12
|
|
125
140
|
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
141
|
+
adjust: true
|
|
142
|
+
}, props.popoverProps),
|
|
143
|
+
error: infoState !== null && infoState !== void 0 && infoState.error && (infoState === null || infoState === void 0 ? void 0 : infoState.error) instanceof Error ? infoState === null || infoState === void 0 || (_infoState$error = infoState.error) === null || _infoState$error === void 0 ? void 0 : _infoState$error.message : undefined,
|
|
144
|
+
tip: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
145
|
+
className: inputClasses === null || inputClasses === void 0 ? void 0 : inputClasses.info,
|
|
146
|
+
children: infoState === null || infoState === void 0 ? void 0 : infoState.text
|
|
147
|
+
})
|
|
130
148
|
};
|
|
149
|
+
var infoPopoverNode = (0, _useTip.default)(_objectSpread(_objectSpread({}, infoPopoverProps), {}, {
|
|
150
|
+
focused: focused,
|
|
151
|
+
rootRef: rootRef,
|
|
152
|
+
jssStyle: props.jssStyle
|
|
153
|
+
}));
|
|
131
154
|
var mergeSuffix = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.default.Fragment, {
|
|
132
|
-
children: [suffix,
|
|
155
|
+
children: [suffix, (infoState === null || infoState === void 0 ? void 0 : infoState.text) && infoPopoverNode, tipNode]
|
|
133
156
|
});
|
|
134
157
|
var onFocusedChange = (0, _hooks.usePersistFn)(function (focused) {
|
|
135
158
|
setFocused(!!focused);
|
|
@@ -145,7 +168,7 @@ var useInputCommon = function useInputCommon(props0) {
|
|
|
145
168
|
});
|
|
146
169
|
return _objectSpread(_objectSpread(_objectSpread({}, rest), {}, {
|
|
147
170
|
value: inputAbleProps.value,
|
|
148
|
-
className: (0, _classnames.default)(props.className, innerTitle && (
|
|
171
|
+
className: (0, _classnames.default)(props.className, innerTitle && (inputClasses === null || inputClasses === void 0 ? void 0 : inputClasses.wrapperInnerTitle)),
|
|
149
172
|
onChange: inputAbleProps.onChange,
|
|
150
173
|
onBlur: handleBlur
|
|
151
174
|
}, clearProps), {}, {
|
package/cjs/list/list.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["list.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AASxC,QAAA,MAAM,IAAI,+
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["list.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AASxC,QAAA,MAAM,IAAI,+GAiQT,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/cjs/list/list.js
CHANGED
|
@@ -110,7 +110,7 @@ var List = function List(props) {
|
|
|
110
110
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
111
111
|
className: listClasses === null || listClasses === void 0 ? void 0 : listClasses.row,
|
|
112
112
|
style: {
|
|
113
|
-
height: props.fixed ? lineHeight : 'auto'
|
|
113
|
+
height: props.fixed && !props.dynamicHeight ? lineHeight : 'auto'
|
|
114
114
|
},
|
|
115
115
|
children: columnData.map(function (item, rowIndex) {
|
|
116
116
|
var index = rowIndex + columnIndex * colNum;
|
|
@@ -118,6 +118,35 @@ var List = function List(props) {
|
|
|
118
118
|
})
|
|
119
119
|
}, columnIndex);
|
|
120
120
|
});
|
|
121
|
+
var DynamicRow = function DynamicRow(_ref) {
|
|
122
|
+
var columnData = _ref.columnData,
|
|
123
|
+
columnIndex = _ref.columnIndex,
|
|
124
|
+
setRowHeight = _ref.setRowHeight;
|
|
125
|
+
var rowRef = (0, _react.useRef)(null);
|
|
126
|
+
(0, _react.useLayoutEffect)(function () {
|
|
127
|
+
if (rowRef.current && setRowHeight) {
|
|
128
|
+
var rect = rowRef.current.getBoundingClientRect();
|
|
129
|
+
if (rect.height > 0) {
|
|
130
|
+
setRowHeight(columnIndex, rect.height);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
135
|
+
ref: rowRef,
|
|
136
|
+
className: listClasses === null || listClasses === void 0 ? void 0 : listClasses.row,
|
|
137
|
+
children: columnData.map(function (item, rowIndex) {
|
|
138
|
+
var index = rowIndex + columnIndex * colNum;
|
|
139
|
+
return renderItem(item, index);
|
|
140
|
+
})
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
var renderDynamicColumn = (0, _hooks.usePersistFn)(function (columnData, columnIndex, _relativeIndex, setRowHeight) {
|
|
144
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DynamicRow, {
|
|
145
|
+
columnData: columnData,
|
|
146
|
+
columnIndex: columnIndex,
|
|
147
|
+
setRowHeight: setRowHeight
|
|
148
|
+
}, columnIndex);
|
|
149
|
+
});
|
|
121
150
|
var loadingPosition = props.loadingPosition || 'center';
|
|
122
151
|
var renderCenterLoading = function renderCenterLoading() {
|
|
123
152
|
if (!props.loading || loadingPosition !== 'center') return null;
|
|
@@ -176,27 +205,30 @@ var List = function List(props) {
|
|
|
176
205
|
});
|
|
177
206
|
var renderList = function renderList() {
|
|
178
207
|
if (isEmpty) return null;
|
|
179
|
-
if (props.fixed)
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
208
|
+
if (props.fixed) {
|
|
209
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
210
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_virtualScroll.VirtualScrollList, {
|
|
211
|
+
data: columnData,
|
|
212
|
+
renderItem: props.dynamicHeight ? renderDynamicColumn : renderColumn,
|
|
213
|
+
lineHeight: lineHeight,
|
|
214
|
+
rowsInView: rowsInView,
|
|
215
|
+
onScroll: handleVirtualScroll,
|
|
216
|
+
height: 'auto',
|
|
217
|
+
style: {
|
|
218
|
+
flex: '1',
|
|
219
|
+
minHeight: '0',
|
|
220
|
+
display: 'flex'
|
|
221
|
+
},
|
|
222
|
+
scrollerStyle: {
|
|
223
|
+
flex: 1,
|
|
224
|
+
minHeight: 0,
|
|
225
|
+
minWidth: 0,
|
|
226
|
+
overflow: 'auto'
|
|
227
|
+
},
|
|
228
|
+
dynamicVirtual: props.dynamicHeight
|
|
229
|
+
}), renderFooter()]
|
|
230
|
+
});
|
|
231
|
+
}
|
|
200
232
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
201
233
|
className: listClasses === null || listClasses === void 0 ? void 0 : listClasses.scrollContainer,
|
|
202
234
|
onScroll: handleListScroll,
|
package/cjs/list/list.type.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { KeygenType, ObjectKey } from '@sheinx/hooks';
|
|
3
3
|
import { CommonType } from '../common/type';
|
|
4
4
|
import { PaginationProps, PaginationJssStyle } from '../pagination/pagination.type';
|
|
@@ -79,6 +79,13 @@ export interface ListProps<DataItem, Value> extends Pick<CommonType, 'className'
|
|
|
79
79
|
* @default false
|
|
80
80
|
*/
|
|
81
81
|
fixed?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* @en enable dynamic height virtual list (requires fixed=true)
|
|
84
|
+
* @cn 启用不定高虚拟列表 (需要设置 fixed=true)
|
|
85
|
+
* @default false
|
|
86
|
+
* @version 3.8.0
|
|
87
|
+
*/
|
|
88
|
+
dynamicHeight?: boolean;
|
|
82
89
|
/**
|
|
83
90
|
* @en list height
|
|
84
91
|
* @cn 列表高度
|