@sheinx/base 3.10.0-beta.19 → 3.10.0-beta.20
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/alert/alert.d.ts.map +1 -1
- package/cjs/alert/alert.js +31 -12
- package/cjs/alert/alert.type.d.ts +38 -0
- package/cjs/alert/alert.type.d.ts.map +1 -1
- package/cjs/alert/index.d.ts +1 -1
- package/cjs/alert/index.d.ts.map +1 -1
- package/cjs/avatar/avatar.d.ts.map +1 -1
- package/cjs/avatar/avatar.js +27 -3
- package/cjs/avatar/avatar.type.d.ts +27 -0
- package/cjs/avatar/avatar.type.d.ts.map +1 -1
- package/cjs/avatar/context.d.ts +6 -1
- package/cjs/avatar/context.d.ts.map +1 -1
- package/cjs/avatar/context.js +1 -0
- package/cjs/avatar/group.d.ts.map +1 -1
- package/cjs/avatar/group.js +44 -12
- package/cjs/avatar/index.d.ts +1 -1
- package/cjs/avatar/index.d.ts.map +1 -1
- package/cjs/badge/badge.d.ts.map +1 -1
- package/cjs/badge/badge.js +25 -7
- package/cjs/badge/badge.type.d.ts +21 -0
- package/cjs/badge/badge.type.d.ts.map +1 -1
- package/cjs/badge/index.d.ts +1 -1
- package/cjs/badge/index.d.ts.map +1 -1
- package/cjs/breadcrumb/breadcrumb-item.d.ts +5 -2
- package/cjs/breadcrumb/breadcrumb-item.d.ts.map +1 -1
- package/cjs/breadcrumb/breadcrumb-item.js +8 -2
- package/cjs/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/cjs/breadcrumb/breadcrumb.js +50 -13
- package/cjs/breadcrumb/breadcrumb.type.d.ts +25 -0
- package/cjs/breadcrumb/breadcrumb.type.d.ts.map +1 -1
- package/cjs/breadcrumb/index.d.ts +1 -1
- package/cjs/breadcrumb/index.d.ts.map +1 -1
- package/cjs/breadcrumb/list.d.ts +4 -1
- package/cjs/breadcrumb/list.d.ts.map +1 -1
- package/cjs/breadcrumb/list.js +7 -4
- package/cjs/button/button.d.ts.map +1 -1
- package/cjs/button/button.js +27 -4
- package/cjs/button/button.type.d.ts +40 -0
- package/cjs/button/button.type.d.ts.map +1 -1
- package/cjs/button/index.d.ts +1 -1
- package/cjs/button/index.d.ts.map +1 -1
- package/cjs/card/card-body.js +11 -3
- package/cjs/card/card-footer.d.ts +2 -2
- package/cjs/card/card-footer.d.ts.map +1 -1
- package/cjs/card/card-footer.js +13 -5
- package/cjs/card/card-header.d.ts.map +1 -1
- package/cjs/card/card-header.js +10 -6
- package/cjs/card/card.context.d.ts +4 -0
- package/cjs/card/card.context.d.ts.map +1 -1
- package/cjs/card/card.d.ts.map +1 -1
- package/cjs/card/card.js +22 -11
- package/cjs/card/card.type.d.ts +25 -0
- package/cjs/card/card.type.d.ts.map +1 -1
- package/cjs/card/index.d.ts +1 -1
- package/cjs/card/index.d.ts.map +1 -1
- package/cjs/carousel/carousel.d.ts.map +1 -1
- package/cjs/carousel/carousel.js +44 -12
- package/cjs/carousel/carousel.type.d.ts +37 -0
- package/cjs/carousel/carousel.type.d.ts.map +1 -1
- package/cjs/carousel/index.d.ts +1 -1
- package/cjs/carousel/index.d.ts.map +1 -1
- package/cjs/cascader/cascader.d.ts.map +1 -1
- package/cjs/cascader/cascader.js +26 -12
- package/cjs/cascader/cascader.type.d.ts +14 -0
- package/cjs/cascader/cascader.type.d.ts.map +1 -1
- package/cjs/cascader/filter-list.d.ts.map +1 -1
- package/cjs/cascader/filter-list.js +11 -4
- package/cjs/cascader/filter-list.type.d.ts +4 -1
- package/cjs/cascader/filter-list.type.d.ts.map +1 -1
- package/cjs/cascader/filter-node.d.ts.map +1 -1
- package/cjs/cascader/filter-node.js +5 -2
- package/cjs/cascader/filter-node.type.d.ts +4 -1
- package/cjs/cascader/filter-node.type.d.ts.map +1 -1
- package/cjs/cascader/index.d.ts +1 -1
- package/cjs/cascader/index.d.ts.map +1 -1
- package/cjs/cascader/list.d.ts.map +1 -1
- package/cjs/cascader/list.js +8 -3
- package/cjs/cascader/list.type.d.ts +4 -1
- package/cjs/cascader/list.type.d.ts.map +1 -1
- package/cjs/cascader/node.d.ts.map +1 -1
- package/cjs/cascader/node.js +6 -3
- package/cjs/cascader/node.type.d.ts +4 -1
- package/cjs/cascader/node.type.d.ts.map +1 -1
- package/cjs/checkbox/checkbox-group.d.ts.map +1 -1
- package/cjs/checkbox/checkbox-group.js +24 -4
- package/cjs/checkbox/checkbox-group.type.d.ts +14 -1
- package/cjs/checkbox/checkbox-group.type.d.ts.map +1 -1
- package/cjs/checkbox/checkbox.type.d.ts +14 -0
- package/cjs/checkbox/checkbox.type.d.ts.map +1 -1
- package/cjs/checkbox/index.d.ts +1 -1
- package/cjs/checkbox/index.d.ts.map +1 -1
- package/cjs/checkbox/simple-checkbox.d.ts.map +1 -1
- package/cjs/checkbox/simple-checkbox.js +22 -5
- package/cjs/collapse/collapse-item.d.ts.map +1 -1
- package/cjs/collapse/collapse-item.js +13 -11
- package/cjs/collapse/collapse.d.ts.map +1 -1
- package/cjs/collapse/collapse.js +30 -7
- package/cjs/collapse/collapse.type.d.ts +25 -0
- package/cjs/collapse/collapse.type.d.ts.map +1 -1
- package/cjs/collapse/index.d.ts +1 -1
- package/cjs/collapse/index.d.ts.map +1 -1
- package/cjs/common/index.d.ts +2 -0
- package/cjs/common/index.d.ts.map +1 -1
- package/cjs/common/index.js +8 -1
- package/cjs/common/use-semantic.d.ts +128 -0
- package/cjs/common/use-semantic.d.ts.map +1 -0
- package/cjs/common/use-semantic.js +130 -0
- package/cjs/config/index.d.ts +955 -0
- package/cjs/config/index.d.ts.map +1 -1
- package/cjs/config/index.js +43 -1
- package/cjs/date-picker/date-picker.d.ts.map +1 -1
- package/cjs/date-picker/date-picker.js +19 -9
- package/cjs/date-picker/date-picker.type.d.ts +14 -0
- 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 +9 -6
- package/cjs/date-picker/index.d.ts +1 -1
- package/cjs/date-picker/index.d.ts.map +1 -1
- package/cjs/date-picker/month.d.ts.map +1 -1
- package/cjs/date-picker/month.js +12 -6
- package/cjs/date-picker/picker.d.ts.map +1 -1
- package/cjs/date-picker/picker.js +9 -3
- package/cjs/date-picker/picker.type.d.ts +5 -2
- package/cjs/date-picker/picker.type.d.ts.map +1 -1
- package/cjs/date-picker/quarter.d.ts.map +1 -1
- package/cjs/date-picker/quarter.js +12 -6
- package/cjs/date-picker/time.js +10 -4
- package/cjs/date-picker/year.d.ts.map +1 -1
- package/cjs/date-picker/year.js +12 -6
- package/cjs/descriptions/descriptions.d.ts.map +1 -1
- package/cjs/descriptions/descriptions.js +38 -16
- package/cjs/descriptions/descriptions.type.d.ts +26 -0
- package/cjs/descriptions/descriptions.type.d.ts.map +1 -1
- package/cjs/descriptions/index.d.ts +1 -1
- package/cjs/descriptions/index.d.ts.map +1 -1
- package/cjs/divider/divider.d.ts.map +1 -1
- package/cjs/divider/divider.js +33 -4
- package/cjs/divider/divider.type.d.ts +21 -0
- package/cjs/divider/divider.type.d.ts.map +1 -1
- package/cjs/divider/index.d.ts +1 -1
- package/cjs/divider/index.d.ts.map +1 -1
- package/cjs/dropdown/Item.d.ts.map +1 -1
- package/cjs/dropdown/Item.js +2 -0
- package/cjs/dropdown/dropdown.type.d.ts +45 -0
- package/cjs/dropdown/dropdown.type.d.ts.map +1 -1
- package/cjs/dropdown/dropdownIn.d.ts.map +1 -1
- package/cjs/dropdown/dropdownIn.js +41 -13
- package/cjs/dropdown/index.d.ts +1 -1
- package/cjs/dropdown/index.d.ts.map +1 -1
- package/cjs/empty/empty.d.ts.map +1 -1
- package/cjs/empty/empty.js +32 -11
- package/cjs/empty/empty.type.d.ts +22 -0
- package/cjs/empty/empty.type.d.ts.map +1 -1
- package/cjs/empty/index.d.ts +1 -1
- package/cjs/empty/index.d.ts.map +1 -1
- package/cjs/form/form-item.d.ts.map +1 -1
- package/cjs/form/form-item.js +42 -9
- package/cjs/form/form-item.type.d.ts +14 -0
- package/cjs/form/form-item.type.d.ts.map +1 -1
- package/cjs/form/form-semantic-context.d.ts +9 -0
- package/cjs/form/form-semantic-context.d.ts.map +1 -0
- package/cjs/form/form-semantic-context.js +10 -0
- package/cjs/form/form.d.ts.map +1 -1
- package/cjs/form/form.js +30 -6
- package/cjs/form/form.type.d.ts +14 -0
- package/cjs/form/form.type.d.ts.map +1 -1
- package/cjs/form/index.d.ts +2 -2
- package/cjs/form/index.d.ts.map +1 -1
- package/cjs/gap/gap.d.ts.map +1 -1
- package/cjs/gap/gap.js +29 -6
- package/cjs/gap/gap.type.d.ts +21 -0
- package/cjs/gap/gap.type.d.ts.map +1 -1
- package/cjs/gap/index.d.ts +1 -1
- package/cjs/gap/index.d.ts.map +1 -1
- package/cjs/grid/grid.d.ts.map +1 -1
- package/cjs/grid/grid.js +24 -3
- package/cjs/grid/grid.type.d.ts +20 -0
- package/cjs/grid/grid.type.d.ts.map +1 -1
- package/cjs/grid/index.d.ts +1 -1
- package/cjs/grid/index.d.ts.map +1 -1
- package/cjs/image/image.d.ts.map +1 -1
- package/cjs/image/image.js +37 -13
- package/cjs/image/image.type.d.ts +23 -0
- package/cjs/image/image.type.d.ts.map +1 -1
- package/cjs/image/index.d.ts +1 -1
- package/cjs/image/index.d.ts.map +1 -1
- package/cjs/input/index.d.ts +1 -1
- package/cjs/input/index.d.ts.map +1 -1
- package/cjs/input/input.type.d.ts +16 -0
- 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 +5 -2
- package/cjs/input/use-input-common.d.ts +4 -2
- package/cjs/input/use-input-common.d.ts.map +1 -1
- package/cjs/input/use-input-common.js +16 -6
- package/cjs/link/index.d.ts +1 -1
- package/cjs/link/index.d.ts.map +1 -1
- package/cjs/link/link.d.ts.map +1 -1
- package/cjs/link/link.js +33 -4
- package/cjs/link/link.type.d.ts +35 -0
- package/cjs/link/link.type.d.ts.map +1 -1
- package/cjs/list/index.d.ts +1 -1
- package/cjs/list/index.d.ts.map +1 -1
- package/cjs/list/list.d.ts.map +1 -1
- package/cjs/list/list.js +24 -6
- package/cjs/list/list.type.d.ts +22 -0
- package/cjs/list/list.type.d.ts.map +1 -1
- package/cjs/menu/index.d.ts +1 -1
- package/cjs/menu/index.d.ts.map +1 -1
- package/cjs/menu/item.d.ts.map +1 -1
- package/cjs/menu/item.js +41 -13
- package/cjs/menu/menu.d.ts.map +1 -1
- package/cjs/menu/menu.js +31 -6
- package/cjs/menu/menu.type.d.ts +93 -0
- package/cjs/menu/menu.type.d.ts.map +1 -1
- package/cjs/message/func.d.ts.map +1 -1
- package/cjs/message/func.js +6 -2
- package/cjs/message/func.type.d.ts +16 -1
- package/cjs/message/func.type.d.ts.map +1 -1
- package/cjs/message/index.d.ts +1 -1
- package/cjs/message/index.d.ts.map +1 -1
- package/cjs/message/manager.d.ts +3 -0
- package/cjs/message/manager.d.ts.map +1 -1
- package/cjs/message/manager.js +6 -4
- package/cjs/message/message.d.ts.map +1 -1
- package/cjs/message/message.js +30 -8
- package/cjs/message/message.type.d.ts +24 -0
- package/cjs/message/message.type.d.ts.map +1 -1
- package/cjs/modal/index.d.ts +1 -1
- package/cjs/modal/index.d.ts.map +1 -1
- package/cjs/modal/modal-content.d.ts.map +1 -1
- package/cjs/modal/modal-content.js +28 -15
- package/cjs/modal/modal.type.d.ts +38 -0
- package/cjs/modal/modal.type.d.ts.map +1 -1
- package/cjs/pagination/index.d.ts +1 -1
- package/cjs/pagination/index.d.ts.map +1 -1
- package/cjs/pagination/pagination-buttons.d.ts.map +1 -1
- package/cjs/pagination/pagination-buttons.js +12 -4
- package/cjs/pagination/pagination-buttons.type.d.ts +5 -2
- package/cjs/pagination/pagination-buttons.type.d.ts.map +1 -1
- package/cjs/pagination/pagination-jumper.js +6 -2
- package/cjs/pagination/pagination-jumper.type.d.ts +4 -1
- package/cjs/pagination/pagination-jumper.type.d.ts.map +1 -1
- package/cjs/pagination/pagination-next.js +11 -3
- package/cjs/pagination/pagination-prev.d.ts.map +1 -1
- package/cjs/pagination/pagination-prev.js +5 -2
- package/cjs/pagination/pagination-simple.d.ts.map +1 -1
- package/cjs/pagination/pagination-simple.js +12 -4
- package/cjs/pagination/pagination-simple.type.d.ts +4 -1
- package/cjs/pagination/pagination-simple.type.d.ts.map +1 -1
- package/cjs/pagination/pagination-size-list.d.ts.map +1 -1
- package/cjs/pagination/pagination-size-list.js +5 -2
- package/cjs/pagination/pagination-size-list.type.d.ts +4 -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 +36 -9
- package/cjs/pagination/pagination.type.d.ts +25 -0
- package/cjs/pagination/pagination.type.d.ts.map +1 -1
- package/cjs/popover/index.d.ts +1 -1
- package/cjs/popover/index.d.ts.map +1 -1
- package/cjs/popover/popover.d.ts.map +1 -1
- package/cjs/popover/popover.js +24 -6
- package/cjs/popover/popover.type.d.ts +66 -0
- package/cjs/popover/popover.type.d.ts.map +1 -1
- package/cjs/progress/circle.d.ts.map +1 -1
- package/cjs/progress/circle.js +45 -14
- package/cjs/progress/index.d.ts +1 -1
- package/cjs/progress/index.d.ts.map +1 -1
- package/cjs/progress/line.d.ts.map +1 -1
- package/cjs/progress/line.js +40 -12
- package/cjs/progress/progress.type.d.ts +48 -0
- package/cjs/progress/progress.type.d.ts.map +1 -1
- package/cjs/radio/index.d.ts +1 -1
- package/cjs/radio/index.d.ts.map +1 -1
- package/cjs/radio/radio-group.d.ts.map +1 -1
- package/cjs/radio/radio-group.js +20 -5
- package/cjs/radio/radio-group.type.d.ts +14 -1
- package/cjs/radio/radio-group.type.d.ts.map +1 -1
- package/cjs/radio/radio.type.d.ts +14 -0
- 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 +22 -5
- package/cjs/rate/index.d.ts +1 -1
- package/cjs/rate/index.d.ts.map +1 -1
- package/cjs/rate/rate.d.ts.map +1 -1
- package/cjs/rate/rate.js +15 -7
- package/cjs/rate/rate.type.d.ts +14 -0
- package/cjs/rate/rate.type.d.ts.map +1 -1
- package/cjs/select/index.d.ts +1 -1
- package/cjs/select/index.d.ts.map +1 -1
- package/cjs/select/list-columns-option.d.ts.map +1 -1
- package/cjs/select/list-columns-option.js +12 -3
- package/cjs/select/list-columns-option.type.d.ts +3 -1
- package/cjs/select/list-columns-option.type.d.ts.map +1 -1
- package/cjs/select/list-columns.d.ts.map +1 -1
- package/cjs/select/list-columns.js +9 -3
- package/cjs/select/list-option.d.ts.map +1 -1
- package/cjs/select/list-option.js +9 -4
- package/cjs/select/list-option.type.d.ts +3 -1
- package/cjs/select/list-option.type.d.ts.map +1 -1
- package/cjs/select/list-tree.d.ts.map +1 -1
- package/cjs/select/list-tree.js +12 -4
- package/cjs/select/list-tree.type.d.ts +3 -1
- package/cjs/select/list-tree.type.d.ts.map +1 -1
- package/cjs/select/list.d.ts.map +1 -1
- package/cjs/select/list.js +11 -5
- package/cjs/select/select.d.ts.map +1 -1
- package/cjs/select/select.js +23 -11
- package/cjs/select/select.type.d.ts +16 -0
- package/cjs/select/select.type.d.ts.map +1 -1
- package/cjs/skeleton/index.d.ts +1 -1
- package/cjs/skeleton/index.d.ts.map +1 -1
- package/cjs/skeleton/skeleton.d.ts.map +1 -1
- package/cjs/skeleton/skeleton.js +40 -11
- package/cjs/skeleton/skeleton.type.d.ts +23 -0
- package/cjs/skeleton/skeleton.type.d.ts.map +1 -1
- package/cjs/slider/index.d.ts +1 -1
- package/cjs/slider/index.d.ts.map +1 -1
- package/cjs/slider/slider.d.ts.map +1 -1
- package/cjs/slider/slider.js +23 -7
- package/cjs/slider/slider.type.d.ts +14 -0
- package/cjs/slider/slider.type.d.ts.map +1 -1
- package/cjs/spin/index.d.ts +1 -1
- package/cjs/spin/index.d.ts.map +1 -1
- package/cjs/spin/spin.d.ts.map +1 -1
- package/cjs/spin/spin.js +35 -8
- package/cjs/spin/spin.type.d.ts +37 -0
- package/cjs/spin/spin.type.d.ts.map +1 -1
- package/cjs/steps/index.d.ts +2 -2
- package/cjs/steps/index.d.ts.map +1 -1
- package/cjs/steps/step.arrow.d.ts.map +1 -1
- package/cjs/steps/step.arrow.js +11 -4
- package/cjs/steps/step.d.ts.map +1 -1
- package/cjs/steps/step.default.d.ts.map +1 -1
- package/cjs/steps/step.default.js +14 -6
- package/cjs/steps/step.dot.js +13 -6
- package/cjs/steps/step.js +27 -4
- package/cjs/steps/step.type.d.ts +38 -2
- package/cjs/steps/step.type.d.ts.map +1 -1
- package/cjs/steps/steps-context.type.d.ts +8 -0
- package/cjs/steps/steps-context.type.d.ts.map +1 -1
- package/cjs/steps/steps.d.ts.map +1 -1
- package/cjs/steps/steps.js +29 -5
- package/cjs/steps/steps.type.d.ts +47 -0
- package/cjs/steps/steps.type.d.ts.map +1 -1
- package/cjs/switch/index.d.ts +1 -1
- package/cjs/switch/index.d.ts.map +1 -1
- package/cjs/switch/switch.d.ts.map +1 -1
- package/cjs/switch/switch.js +14 -5
- package/cjs/switch/switch.type.d.ts +14 -0
- package/cjs/switch/switch.type.d.ts.map +1 -1
- package/cjs/table/index.d.ts +1 -1
- package/cjs/table/index.d.ts.map +1 -1
- package/cjs/table/table.d.ts.map +1 -1
- package/cjs/table/table.js +34 -13
- package/cjs/table/table.type.d.ts +28 -0
- package/cjs/table/table.type.d.ts.map +1 -1
- package/cjs/table/tbody.d.ts.map +1 -1
- package/cjs/table/tbody.js +5 -1
- package/cjs/table/tbody.type.d.ts +4 -0
- package/cjs/table/tbody.type.d.ts.map +1 -1
- package/cjs/table/tfoot.d.ts.map +1 -1
- package/cjs/table/tfoot.js +8 -2
- package/cjs/table/tfoot.type.d.ts +3 -0
- package/cjs/table/tfoot.type.d.ts.map +1 -1
- package/cjs/table/thead.d.ts.map +1 -1
- package/cjs/table/thead.js +8 -5
- package/cjs/table/thead.type.d.ts +5 -0
- package/cjs/table/thead.type.d.ts.map +1 -1
- package/cjs/table/tr.d.ts +5 -0
- package/cjs/table/tr.d.ts.map +1 -1
- package/cjs/table/tr.js +5 -5
- package/cjs/tabs/index.d.ts +1 -1
- package/cjs/tabs/index.d.ts.map +1 -1
- package/cjs/tabs/tab.js +13 -6
- package/cjs/tabs/tab.type.d.ts +4 -0
- package/cjs/tabs/tab.type.d.ts.map +1 -1
- package/cjs/tabs/tabs-header.d.ts.map +1 -1
- package/cjs/tabs/tabs-header.js +27 -9
- package/cjs/tabs/tabs-header.type.d.ts +4 -1
- package/cjs/tabs/tabs-header.type.d.ts.map +1 -1
- package/cjs/tabs/tabs.d.ts.map +1 -1
- package/cjs/tabs/tabs.js +21 -6
- package/cjs/tabs/tabs.type.d.ts +29 -0
- package/cjs/tabs/tabs.type.d.ts.map +1 -1
- package/cjs/tag/index.d.ts +1 -1
- package/cjs/tag/index.d.ts.map +1 -1
- package/cjs/tag/tag.d.ts.map +1 -1
- package/cjs/tag/tag.js +28 -9
- package/cjs/tag/tag.type.d.ts +22 -0
- package/cjs/tag/tag.type.d.ts.map +1 -1
- package/cjs/textarea/index.d.ts +1 -1
- package/cjs/textarea/index.d.ts.map +1 -1
- package/cjs/textarea/simple-textarea.d.ts.map +1 -1
- package/cjs/textarea/simple-textarea.js +19 -5
- package/cjs/textarea/textarea.type.d.ts +19 -0
- package/cjs/textarea/textarea.type.d.ts.map +1 -1
- package/cjs/tooltip/index.d.ts +1 -1
- package/cjs/tooltip/index.d.ts.map +1 -1
- package/cjs/tooltip/tooltip.d.ts.map +1 -1
- package/cjs/tooltip/tooltip.js +21 -6
- package/cjs/tooltip/tooltip.type.d.ts +62 -0
- package/cjs/tooltip/tooltip.type.d.ts.map +1 -1
- package/cjs/transfer/index.d.ts +1 -1
- package/cjs/transfer/index.d.ts.map +1 -1
- package/cjs/transfer/transfer-list-header.js +5 -2
- package/cjs/transfer/transfer-list-header.type.d.ts +4 -1
- package/cjs/transfer/transfer-list-header.type.d.ts.map +1 -1
- package/cjs/transfer/transfer-list-item.d.ts.map +1 -1
- package/cjs/transfer/transfer-list-item.js +12 -4
- package/cjs/transfer/transfer-list-item.type.d.ts +4 -1
- package/cjs/transfer/transfer-list-item.type.d.ts.map +1 -1
- package/cjs/transfer/transfer-list.d.ts.map +1 -1
- package/cjs/transfer/transfer-list.js +10 -4
- package/cjs/transfer/transfer-list.type.d.ts +4 -1
- package/cjs/transfer/transfer-list.type.d.ts.map +1 -1
- package/cjs/transfer/transfer.d.ts.map +1 -1
- package/cjs/transfer/transfer.js +25 -9
- package/cjs/transfer/transfer.type.d.ts +14 -0
- package/cjs/transfer/transfer.type.d.ts.map +1 -1
- package/cjs/tree/index.d.ts +1 -1
- package/cjs/tree/index.d.ts.map +1 -1
- package/cjs/tree/tree-content.d.ts.map +1 -1
- package/cjs/tree/tree-content.js +12 -6
- package/cjs/tree/tree-context.type.d.ts +6 -2
- package/cjs/tree/tree-context.type.d.ts.map +1 -1
- package/cjs/tree/tree-simple-node.d.ts.map +1 -1
- package/cjs/tree/tree-simple-node.js +5 -2
- package/cjs/tree/tree-virtual-node.d.ts.map +1 -1
- package/cjs/tree/tree-virtual-node.js +7 -3
- package/cjs/tree/tree.d.ts.map +1 -1
- package/cjs/tree/tree.js +20 -5
- package/cjs/tree/tree.type.d.ts +23 -0
- package/cjs/tree/tree.type.d.ts.map +1 -1
- package/cjs/tree-select/index.d.ts +1 -1
- package/cjs/tree-select/index.d.ts.map +1 -1
- package/cjs/tree-select/tree-select.d.ts.map +1 -1
- package/cjs/tree-select/tree-select.js +22 -13
- package/cjs/tree-select/tree-select.type.d.ts +14 -0
- package/cjs/tree-select/tree-select.type.d.ts.map +1 -1
- package/cjs/upload/index.d.ts +1 -1
- package/cjs/upload/index.d.ts.map +1 -1
- package/cjs/upload/result.d.ts +4 -1
- package/cjs/upload/result.d.ts.map +1 -1
- package/cjs/upload/result.js +3 -3
- package/cjs/upload/upload.d.ts.map +1 -1
- package/cjs/upload/upload.js +21 -8
- package/cjs/upload/upload.type.d.ts +14 -0
- package/cjs/upload/upload.type.d.ts.map +1 -1
- package/esm/alert/alert.d.ts.map +1 -1
- package/esm/alert/alert.js +31 -12
- package/esm/alert/alert.type.d.ts +38 -0
- package/esm/alert/alert.type.d.ts.map +1 -1
- package/esm/alert/index.d.ts +1 -1
- package/esm/alert/index.d.ts.map +1 -1
- package/esm/avatar/avatar.d.ts.map +1 -1
- package/esm/avatar/avatar.js +27 -3
- package/esm/avatar/avatar.type.d.ts +27 -0
- package/esm/avatar/avatar.type.d.ts.map +1 -1
- package/esm/avatar/context.d.ts +6 -1
- package/esm/avatar/context.d.ts.map +1 -1
- package/esm/avatar/context.js +2 -0
- package/esm/avatar/group.d.ts.map +1 -1
- package/esm/avatar/group.js +43 -11
- package/esm/avatar/index.d.ts +1 -1
- package/esm/avatar/index.d.ts.map +1 -1
- package/esm/badge/badge.d.ts.map +1 -1
- package/esm/badge/badge.js +24 -6
- package/esm/badge/badge.type.d.ts +21 -0
- package/esm/badge/badge.type.d.ts.map +1 -1
- package/esm/badge/index.d.ts +1 -1
- package/esm/badge/index.d.ts.map +1 -1
- package/esm/breadcrumb/breadcrumb-item.d.ts +5 -2
- package/esm/breadcrumb/breadcrumb-item.d.ts.map +1 -1
- package/esm/breadcrumb/breadcrumb-item.js +8 -2
- package/esm/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/esm/breadcrumb/breadcrumb.js +49 -12
- package/esm/breadcrumb/breadcrumb.type.d.ts +25 -0
- package/esm/breadcrumb/breadcrumb.type.d.ts.map +1 -1
- package/esm/breadcrumb/index.d.ts +1 -1
- package/esm/breadcrumb/index.d.ts.map +1 -1
- package/esm/breadcrumb/list.d.ts +4 -1
- package/esm/breadcrumb/list.d.ts.map +1 -1
- package/esm/breadcrumb/list.js +7 -4
- package/esm/button/button.d.ts.map +1 -1
- package/esm/button/button.js +27 -4
- package/esm/button/button.type.d.ts +40 -0
- package/esm/button/button.type.d.ts.map +1 -1
- package/esm/button/index.d.ts +1 -1
- package/esm/button/index.d.ts.map +1 -1
- package/esm/card/card-body.js +11 -3
- package/esm/card/card-footer.d.ts +2 -2
- package/esm/card/card-footer.d.ts.map +1 -1
- package/esm/card/card-footer.js +13 -5
- package/esm/card/card-header.d.ts.map +1 -1
- package/esm/card/card-header.js +10 -6
- package/esm/card/card.context.d.ts +4 -0
- package/esm/card/card.context.d.ts.map +1 -1
- package/esm/card/card.d.ts.map +1 -1
- package/esm/card/card.js +23 -12
- package/esm/card/card.type.d.ts +25 -0
- package/esm/card/card.type.d.ts.map +1 -1
- package/esm/card/index.d.ts +1 -1
- package/esm/card/index.d.ts.map +1 -1
- package/esm/carousel/carousel.d.ts.map +1 -1
- package/esm/carousel/carousel.js +43 -11
- package/esm/carousel/carousel.type.d.ts +37 -0
- package/esm/carousel/carousel.type.d.ts.map +1 -1
- package/esm/carousel/index.d.ts +1 -1
- package/esm/carousel/index.d.ts.map +1 -1
- package/esm/cascader/cascader.d.ts.map +1 -1
- package/esm/cascader/cascader.js +26 -12
- package/esm/cascader/cascader.type.d.ts +14 -0
- package/esm/cascader/cascader.type.d.ts.map +1 -1
- package/esm/cascader/filter-list.d.ts.map +1 -1
- package/esm/cascader/filter-list.js +11 -4
- package/esm/cascader/filter-list.type.d.ts +4 -1
- package/esm/cascader/filter-list.type.d.ts.map +1 -1
- package/esm/cascader/filter-node.d.ts.map +1 -1
- package/esm/cascader/filter-node.js +5 -2
- package/esm/cascader/filter-node.type.d.ts +4 -1
- package/esm/cascader/filter-node.type.d.ts.map +1 -1
- package/esm/cascader/index.d.ts +1 -1
- package/esm/cascader/index.d.ts.map +1 -1
- package/esm/cascader/list.d.ts.map +1 -1
- package/esm/cascader/list.js +8 -3
- package/esm/cascader/list.type.d.ts +4 -1
- package/esm/cascader/list.type.d.ts.map +1 -1
- package/esm/cascader/node.d.ts.map +1 -1
- package/esm/cascader/node.js +6 -3
- package/esm/cascader/node.type.d.ts +4 -1
- package/esm/cascader/node.type.d.ts.map +1 -1
- package/esm/checkbox/checkbox-group.d.ts.map +1 -1
- package/esm/checkbox/checkbox-group.js +25 -4
- package/esm/checkbox/checkbox-group.type.d.ts +14 -1
- package/esm/checkbox/checkbox-group.type.d.ts.map +1 -1
- package/esm/checkbox/checkbox.type.d.ts +14 -0
- package/esm/checkbox/checkbox.type.d.ts.map +1 -1
- package/esm/checkbox/index.d.ts +1 -1
- package/esm/checkbox/index.d.ts.map +1 -1
- package/esm/checkbox/simple-checkbox.d.ts.map +1 -1
- package/esm/checkbox/simple-checkbox.js +22 -5
- package/esm/collapse/collapse-item.d.ts.map +1 -1
- package/esm/collapse/collapse-item.js +13 -11
- package/esm/collapse/collapse.d.ts.map +1 -1
- package/esm/collapse/collapse.js +30 -7
- package/esm/collapse/collapse.type.d.ts +25 -0
- package/esm/collapse/collapse.type.d.ts.map +1 -1
- package/esm/collapse/index.d.ts +1 -1
- package/esm/collapse/index.d.ts.map +1 -1
- package/esm/common/index.d.ts +2 -0
- package/esm/common/index.d.ts.map +1 -1
- package/esm/common/index.js +1 -1
- package/esm/common/use-semantic.d.ts +128 -0
- package/esm/common/use-semantic.d.ts.map +1 -0
- package/esm/common/use-semantic.js +124 -0
- package/esm/config/index.d.ts +955 -0
- package/esm/config/index.d.ts.map +1 -1
- package/esm/config/index.js +43 -1
- package/esm/date-picker/date-picker.d.ts.map +1 -1
- package/esm/date-picker/date-picker.js +19 -9
- package/esm/date-picker/date-picker.type.d.ts +14 -0
- 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 +9 -6
- package/esm/date-picker/index.d.ts +1 -1
- package/esm/date-picker/index.d.ts.map +1 -1
- package/esm/date-picker/month.d.ts.map +1 -1
- package/esm/date-picker/month.js +12 -6
- package/esm/date-picker/picker.d.ts.map +1 -1
- package/esm/date-picker/picker.js +9 -3
- package/esm/date-picker/picker.type.d.ts +5 -2
- package/esm/date-picker/picker.type.d.ts.map +1 -1
- package/esm/date-picker/quarter.d.ts.map +1 -1
- package/esm/date-picker/quarter.js +12 -6
- package/esm/date-picker/time.js +10 -3
- package/esm/date-picker/year.d.ts.map +1 -1
- package/esm/date-picker/year.js +12 -6
- package/esm/descriptions/descriptions.d.ts.map +1 -1
- package/esm/descriptions/descriptions.js +37 -15
- package/esm/descriptions/descriptions.type.d.ts +26 -0
- package/esm/descriptions/descriptions.type.d.ts.map +1 -1
- package/esm/descriptions/index.d.ts +1 -1
- package/esm/descriptions/index.d.ts.map +1 -1
- package/esm/divider/divider.d.ts.map +1 -1
- package/esm/divider/divider.js +33 -4
- package/esm/divider/divider.type.d.ts +21 -0
- package/esm/divider/divider.type.d.ts.map +1 -1
- package/esm/divider/index.d.ts +1 -1
- package/esm/divider/index.d.ts.map +1 -1
- package/esm/dropdown/Item.d.ts.map +1 -1
- package/esm/dropdown/Item.js +2 -0
- package/esm/dropdown/dropdown.type.d.ts +45 -0
- package/esm/dropdown/dropdown.type.d.ts.map +1 -1
- package/esm/dropdown/dropdown.type.js +18 -0
- package/esm/dropdown/dropdownIn.d.ts.map +1 -1
- package/esm/dropdown/dropdownIn.js +40 -12
- package/esm/dropdown/index.d.ts +1 -1
- package/esm/dropdown/index.d.ts.map +1 -1
- package/esm/empty/empty.d.ts.map +1 -1
- package/esm/empty/empty.js +32 -11
- package/esm/empty/empty.type.d.ts +22 -0
- package/esm/empty/empty.type.d.ts.map +1 -1
- package/esm/empty/index.d.ts +1 -1
- package/esm/empty/index.d.ts.map +1 -1
- package/esm/form/form-item.d.ts.map +1 -1
- package/esm/form/form-item.js +43 -10
- package/esm/form/form-item.type.d.ts +14 -0
- package/esm/form/form-item.type.d.ts.map +1 -1
- package/esm/form/form-semantic-context.d.ts +9 -0
- package/esm/form/form-semantic-context.d.ts.map +1 -0
- package/esm/form/form-semantic-context.js +4 -0
- package/esm/form/form.d.ts.map +1 -1
- package/esm/form/form.js +30 -6
- package/esm/form/form.type.d.ts +14 -0
- package/esm/form/form.type.d.ts.map +1 -1
- package/esm/form/index.d.ts +2 -2
- package/esm/form/index.d.ts.map +1 -1
- package/esm/gap/gap.d.ts.map +1 -1
- package/esm/gap/gap.js +28 -5
- package/esm/gap/gap.type.d.ts +21 -0
- package/esm/gap/gap.type.d.ts.map +1 -1
- package/esm/gap/index.d.ts +1 -1
- package/esm/gap/index.d.ts.map +1 -1
- package/esm/grid/grid.d.ts.map +1 -1
- package/esm/grid/grid.js +24 -3
- package/esm/grid/grid.type.d.ts +20 -0
- package/esm/grid/grid.type.d.ts.map +1 -1
- package/esm/grid/index.d.ts +1 -1
- package/esm/grid/index.d.ts.map +1 -1
- package/esm/image/image.d.ts.map +1 -1
- package/esm/image/image.js +38 -14
- package/esm/image/image.type.d.ts +23 -0
- package/esm/image/image.type.d.ts.map +1 -1
- package/esm/image/index.d.ts +1 -1
- package/esm/image/index.d.ts.map +1 -1
- package/esm/input/index.d.ts +1 -1
- package/esm/input/index.d.ts.map +1 -1
- package/esm/input/input.type.d.ts +16 -0
- 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 +5 -2
- package/esm/input/use-input-common.d.ts +4 -2
- package/esm/input/use-input-common.d.ts.map +1 -1
- package/esm/input/use-input-common.js +16 -6
- package/esm/link/index.d.ts +1 -1
- package/esm/link/index.d.ts.map +1 -1
- package/esm/link/link.d.ts.map +1 -1
- package/esm/link/link.js +33 -4
- package/esm/link/link.type.d.ts +35 -0
- package/esm/link/link.type.d.ts.map +1 -1
- package/esm/list/index.d.ts +1 -1
- package/esm/list/index.d.ts.map +1 -1
- package/esm/list/list.d.ts.map +1 -1
- package/esm/list/list.js +24 -6
- package/esm/list/list.type.d.ts +22 -0
- package/esm/list/list.type.d.ts.map +1 -1
- package/esm/menu/index.d.ts +1 -1
- package/esm/menu/index.d.ts.map +1 -1
- package/esm/menu/item.d.ts.map +1 -1
- package/esm/menu/item.js +41 -13
- package/esm/menu/menu.d.ts.map +1 -1
- package/esm/menu/menu.js +32 -6
- package/esm/menu/menu.type.d.ts +93 -0
- package/esm/menu/menu.type.d.ts.map +1 -1
- package/esm/message/func.d.ts.map +1 -1
- package/esm/message/func.js +6 -2
- package/esm/message/func.type.d.ts +16 -1
- package/esm/message/func.type.d.ts.map +1 -1
- package/esm/message/index.d.ts +1 -1
- package/esm/message/index.d.ts.map +1 -1
- package/esm/message/manager.d.ts +3 -0
- package/esm/message/manager.d.ts.map +1 -1
- package/esm/message/manager.js +6 -3
- package/esm/message/message.d.ts.map +1 -1
- package/esm/message/message.js +30 -8
- package/esm/message/message.type.d.ts +24 -0
- package/esm/message/message.type.d.ts.map +1 -1
- package/esm/modal/index.d.ts +1 -1
- package/esm/modal/index.d.ts.map +1 -1
- package/esm/modal/modal-content.d.ts.map +1 -1
- package/esm/modal/modal-content.js +28 -15
- package/esm/modal/modal.type.d.ts +38 -0
- package/esm/modal/modal.type.d.ts.map +1 -1
- package/esm/pagination/index.d.ts +1 -1
- package/esm/pagination/index.d.ts.map +1 -1
- package/esm/pagination/pagination-buttons.d.ts.map +1 -1
- package/esm/pagination/pagination-buttons.js +12 -4
- package/esm/pagination/pagination-buttons.type.d.ts +5 -2
- package/esm/pagination/pagination-buttons.type.d.ts.map +1 -1
- package/esm/pagination/pagination-jumper.js +6 -2
- package/esm/pagination/pagination-jumper.type.d.ts +4 -1
- package/esm/pagination/pagination-jumper.type.d.ts.map +1 -1
- package/esm/pagination/pagination-next.js +11 -3
- package/esm/pagination/pagination-prev.d.ts.map +1 -1
- package/esm/pagination/pagination-prev.js +5 -2
- package/esm/pagination/pagination-simple.d.ts.map +1 -1
- package/esm/pagination/pagination-simple.js +12 -4
- package/esm/pagination/pagination-simple.type.d.ts +4 -1
- package/esm/pagination/pagination-simple.type.d.ts.map +1 -1
- package/esm/pagination/pagination-size-list.d.ts.map +1 -1
- package/esm/pagination/pagination-size-list.js +5 -2
- package/esm/pagination/pagination-size-list.type.d.ts +4 -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 +35 -8
- package/esm/pagination/pagination.type.d.ts +25 -0
- package/esm/pagination/pagination.type.d.ts.map +1 -1
- package/esm/popover/index.d.ts +1 -1
- package/esm/popover/index.d.ts.map +1 -1
- package/esm/popover/popover.d.ts.map +1 -1
- package/esm/popover/popover.js +24 -6
- package/esm/popover/popover.type.d.ts +66 -0
- package/esm/popover/popover.type.d.ts.map +1 -1
- package/esm/progress/circle.d.ts.map +1 -1
- package/esm/progress/circle.js +45 -14
- package/esm/progress/index.d.ts +1 -1
- package/esm/progress/index.d.ts.map +1 -1
- package/esm/progress/line.d.ts.map +1 -1
- package/esm/progress/line.js +40 -12
- package/esm/progress/progress.type.d.ts +48 -0
- package/esm/progress/progress.type.d.ts.map +1 -1
- package/esm/radio/index.d.ts +1 -1
- package/esm/radio/index.d.ts.map +1 -1
- package/esm/radio/radio-group.d.ts.map +1 -1
- package/esm/radio/radio-group.js +19 -4
- package/esm/radio/radio-group.type.d.ts +14 -1
- package/esm/radio/radio-group.type.d.ts.map +1 -1
- package/esm/radio/radio.type.d.ts +14 -0
- 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 +22 -5
- package/esm/rate/index.d.ts +1 -1
- package/esm/rate/index.d.ts.map +1 -1
- package/esm/rate/rate.d.ts.map +1 -1
- package/esm/rate/rate.js +15 -7
- package/esm/rate/rate.type.d.ts +14 -0
- package/esm/rate/rate.type.d.ts.map +1 -1
- package/esm/select/index.d.ts +1 -1
- package/esm/select/index.d.ts.map +1 -1
- package/esm/select/list-columns-option.d.ts.map +1 -1
- package/esm/select/list-columns-option.js +12 -3
- package/esm/select/list-columns-option.type.d.ts +3 -1
- package/esm/select/list-columns-option.type.d.ts.map +1 -1
- package/esm/select/list-columns.d.ts.map +1 -1
- package/esm/select/list-columns.js +9 -3
- package/esm/select/list-option.d.ts.map +1 -1
- package/esm/select/list-option.js +9 -4
- package/esm/select/list-option.type.d.ts +3 -1
- package/esm/select/list-option.type.d.ts.map +1 -1
- package/esm/select/list-tree.d.ts.map +1 -1
- package/esm/select/list-tree.js +12 -4
- package/esm/select/list-tree.type.d.ts +3 -1
- package/esm/select/list-tree.type.d.ts.map +1 -1
- package/esm/select/list.d.ts.map +1 -1
- package/esm/select/list.js +11 -5
- package/esm/select/select.d.ts.map +1 -1
- package/esm/select/select.js +23 -11
- package/esm/select/select.type.d.ts +16 -0
- package/esm/select/select.type.d.ts.map +1 -1
- package/esm/skeleton/index.d.ts +1 -1
- package/esm/skeleton/index.d.ts.map +1 -1
- package/esm/skeleton/skeleton.d.ts.map +1 -1
- package/esm/skeleton/skeleton.js +39 -10
- package/esm/skeleton/skeleton.type.d.ts +23 -0
- package/esm/skeleton/skeleton.type.d.ts.map +1 -1
- package/esm/slider/index.d.ts +1 -1
- package/esm/slider/index.d.ts.map +1 -1
- package/esm/slider/slider.d.ts.map +1 -1
- package/esm/slider/slider.js +22 -6
- package/esm/slider/slider.type.d.ts +14 -0
- package/esm/slider/slider.type.d.ts.map +1 -1
- package/esm/spin/index.d.ts +1 -1
- package/esm/spin/index.d.ts.map +1 -1
- package/esm/spin/spin.d.ts.map +1 -1
- package/esm/spin/spin.js +35 -8
- package/esm/spin/spin.type.d.ts +37 -0
- package/esm/spin/spin.type.d.ts.map +1 -1
- package/esm/steps/index.d.ts +2 -2
- package/esm/steps/index.d.ts.map +1 -1
- package/esm/steps/step.arrow.d.ts.map +1 -1
- package/esm/steps/step.arrow.js +10 -4
- package/esm/steps/step.d.ts.map +1 -1
- package/esm/steps/step.default.d.ts.map +1 -1
- package/esm/steps/step.default.js +14 -6
- package/esm/steps/step.dot.js +13 -6
- package/esm/steps/step.js +26 -3
- package/esm/steps/step.type.d.ts +38 -2
- package/esm/steps/step.type.d.ts.map +1 -1
- package/esm/steps/steps-context.type.d.ts +8 -0
- package/esm/steps/steps-context.type.d.ts.map +1 -1
- package/esm/steps/steps.d.ts.map +1 -1
- package/esm/steps/steps.js +28 -4
- package/esm/steps/steps.type.d.ts +47 -0
- package/esm/steps/steps.type.d.ts.map +1 -1
- package/esm/switch/index.d.ts +1 -1
- package/esm/switch/index.d.ts.map +1 -1
- package/esm/switch/switch.d.ts.map +1 -1
- package/esm/switch/switch.js +14 -5
- package/esm/switch/switch.type.d.ts +14 -0
- package/esm/switch/switch.type.d.ts.map +1 -1
- package/esm/table/index.d.ts +1 -1
- package/esm/table/index.d.ts.map +1 -1
- package/esm/table/table.d.ts.map +1 -1
- package/esm/table/table.js +34 -13
- package/esm/table/table.type.d.ts +28 -0
- package/esm/table/table.type.d.ts.map +1 -1
- package/esm/table/tbody.d.ts.map +1 -1
- package/esm/table/tbody.js +5 -1
- package/esm/table/tbody.type.d.ts +4 -0
- package/esm/table/tbody.type.d.ts.map +1 -1
- package/esm/table/tfoot.d.ts.map +1 -1
- package/esm/table/tfoot.js +8 -2
- package/esm/table/tfoot.type.d.ts +3 -0
- package/esm/table/tfoot.type.d.ts.map +1 -1
- package/esm/table/thead.d.ts.map +1 -1
- package/esm/table/thead.js +8 -5
- package/esm/table/thead.type.d.ts +5 -0
- package/esm/table/thead.type.d.ts.map +1 -1
- package/esm/table/tr.d.ts +5 -0
- package/esm/table/tr.d.ts.map +1 -1
- package/esm/table/tr.js +5 -5
- package/esm/tabs/index.d.ts +1 -1
- package/esm/tabs/index.d.ts.map +1 -1
- package/esm/tabs/tab.js +13 -6
- package/esm/tabs/tab.type.d.ts +4 -0
- package/esm/tabs/tab.type.d.ts.map +1 -1
- package/esm/tabs/tabs-header.d.ts.map +1 -1
- package/esm/tabs/tabs-header.js +27 -9
- package/esm/tabs/tabs-header.type.d.ts +4 -1
- package/esm/tabs/tabs-header.type.d.ts.map +1 -1
- package/esm/tabs/tabs.d.ts.map +1 -1
- package/esm/tabs/tabs.js +21 -6
- package/esm/tabs/tabs.type.d.ts +29 -0
- package/esm/tabs/tabs.type.d.ts.map +1 -1
- package/esm/tag/index.d.ts +1 -1
- package/esm/tag/index.d.ts.map +1 -1
- package/esm/tag/tag.d.ts.map +1 -1
- package/esm/tag/tag.js +28 -9
- package/esm/tag/tag.type.d.ts +22 -0
- package/esm/tag/tag.type.d.ts.map +1 -1
- package/esm/textarea/index.d.ts +1 -1
- package/esm/textarea/index.d.ts.map +1 -1
- package/esm/textarea/simple-textarea.d.ts.map +1 -1
- package/esm/textarea/simple-textarea.js +19 -5
- package/esm/textarea/textarea.type.d.ts +19 -0
- package/esm/textarea/textarea.type.d.ts.map +1 -1
- package/esm/tooltip/index.d.ts +1 -1
- package/esm/tooltip/index.d.ts.map +1 -1
- package/esm/tooltip/tooltip.d.ts.map +1 -1
- package/esm/tooltip/tooltip.js +21 -6
- package/esm/tooltip/tooltip.type.d.ts +62 -0
- package/esm/tooltip/tooltip.type.d.ts.map +1 -1
- package/esm/transfer/index.d.ts +1 -1
- package/esm/transfer/index.d.ts.map +1 -1
- package/esm/transfer/transfer-list-header.js +5 -2
- package/esm/transfer/transfer-list-header.type.d.ts +4 -1
- package/esm/transfer/transfer-list-header.type.d.ts.map +1 -1
- package/esm/transfer/transfer-list-item.d.ts.map +1 -1
- package/esm/transfer/transfer-list-item.js +12 -4
- package/esm/transfer/transfer-list-item.type.d.ts +4 -1
- package/esm/transfer/transfer-list-item.type.d.ts.map +1 -1
- package/esm/transfer/transfer-list.d.ts.map +1 -1
- package/esm/transfer/transfer-list.js +10 -4
- package/esm/transfer/transfer-list.type.d.ts +4 -1
- package/esm/transfer/transfer-list.type.d.ts.map +1 -1
- package/esm/transfer/transfer.d.ts.map +1 -1
- package/esm/transfer/transfer.js +24 -8
- package/esm/transfer/transfer.type.d.ts +14 -0
- package/esm/transfer/transfer.type.d.ts.map +1 -1
- package/esm/tree/index.d.ts +1 -1
- package/esm/tree/index.d.ts.map +1 -1
- package/esm/tree/tree-content.d.ts.map +1 -1
- package/esm/tree/tree-content.js +12 -6
- package/esm/tree/tree-context.type.d.ts +6 -2
- package/esm/tree/tree-context.type.d.ts.map +1 -1
- package/esm/tree/tree-simple-node.d.ts.map +1 -1
- package/esm/tree/tree-simple-node.js +5 -2
- package/esm/tree/tree-virtual-node.d.ts.map +1 -1
- package/esm/tree/tree-virtual-node.js +7 -3
- package/esm/tree/tree.d.ts.map +1 -1
- package/esm/tree/tree.js +20 -5
- package/esm/tree/tree.type.d.ts +23 -0
- package/esm/tree/tree.type.d.ts.map +1 -1
- package/esm/tree-select/index.d.ts +1 -1
- package/esm/tree-select/index.d.ts.map +1 -1
- package/esm/tree-select/tree-select.d.ts.map +1 -1
- package/esm/tree-select/tree-select.js +22 -13
- package/esm/tree-select/tree-select.type.d.ts +14 -0
- package/esm/tree-select/tree-select.type.d.ts.map +1 -1
- package/esm/upload/index.d.ts +1 -1
- package/esm/upload/index.d.ts.map +1 -1
- package/esm/upload/result.d.ts +4 -1
- package/esm/upload/result.d.ts.map +1 -1
- package/esm/upload/result.js +3 -3
- package/esm/upload/upload.d.ts.map +1 -1
- package/esm/upload/upload.js +20 -7
- package/esm/upload/upload.type.d.ts +14 -0
- package/esm/upload/upload.type.d.ts.map +1 -1
- package/package.json +2 -2
package/cjs/alert/alert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["alert.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["alert.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqC,UAAU,EAAoB,MAAM,cAAc,CAAC;AAa/F,QAAA,MAAM,KAAK,UAAW,UAAU,mDAyI/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/cjs/alert/alert.js
CHANGED
|
@@ -10,8 +10,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var _icons = _interopRequireDefault(require("../icons"));
|
|
11
11
|
var _alertIcon = _interopRequireDefault(require("./alert-icon"));
|
|
12
12
|
var _hooks = require("@sheinx/hooks");
|
|
13
|
+
var _common = require("../common");
|
|
14
|
+
var _config = require("../config");
|
|
13
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
var _excluded = ["jssStyle", "type", "className", "children", "icon", "iconClassName", "title", "titleStyle", "iconSize", "closable", "hideClose", "bordered", "closeItem", "onClose"];
|
|
16
|
+
var _excluded = ["jssStyle", "type", "className", "children", "icon", "iconClassName", "title", "titleStyle", "iconSize", "closable", "hideClose", "bordered", "closeItem", "onClose", "classNames", "styles"];
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
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); }
|
|
17
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; }
|
|
@@ -49,6 +51,8 @@ var Alert = function Alert(props) {
|
|
|
49
51
|
bordered = props.bordered,
|
|
50
52
|
closeItem = props.closeItem,
|
|
51
53
|
onClose = props.onClose,
|
|
54
|
+
classNamesProp = props.classNames,
|
|
55
|
+
stylesProp = props.styles,
|
|
52
56
|
rest = _objectWithoutProperties(props, _excluded);
|
|
53
57
|
if (props.hideClose) {
|
|
54
58
|
devUseWarning.deprecated('hideClose', 'closable', 'Alert');
|
|
@@ -65,7 +69,17 @@ var Alert = function Alert(props) {
|
|
|
65
69
|
};
|
|
66
70
|
var type = getType();
|
|
67
71
|
var alertStyle = (jssStyle === null || jssStyle === void 0 || (_jssStyle$alert = jssStyle.alert) === null || _jssStyle$alert === void 0 ? void 0 : _jssStyle$alert.call(jssStyle)) || {};
|
|
68
|
-
|
|
72
|
+
|
|
73
|
+
// Semantic DOM
|
|
74
|
+
var config = (0, _config.useConfig)();
|
|
75
|
+
var semInfo = {
|
|
76
|
+
type: type
|
|
77
|
+
};
|
|
78
|
+
var _useSemantic = (0, _common.useSemantic)(classNamesProp, stylesProp, config.alert, semInfo),
|
|
79
|
+
_useSemantic2 = _slicedToArray(_useSemantic, 2),
|
|
80
|
+
semClass = _useSemantic2[0],
|
|
81
|
+
semStyle = _useSemantic2[1];
|
|
82
|
+
var rootClass = (0, _classnames.default)(className, alertStyle.rootClass, alertStyle.alert, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, alertStyle[type], true), alertStyle.withTitle, title), alertStyle.pending, dismiss === PENDING), alertStyle.noBordered, bordered === false), alertStyle.noChildren, !children), semClass('root'));
|
|
69
83
|
var getRootProps = function getRootProps() {
|
|
70
84
|
return rest;
|
|
71
85
|
};
|
|
@@ -89,7 +103,7 @@ var Alert = function Alert(props) {
|
|
|
89
103
|
}, 300);
|
|
90
104
|
};
|
|
91
105
|
var renderIcon = function renderIcon() {
|
|
92
|
-
var style = titleStyle
|
|
106
|
+
var style = _objectSpread(_objectSpread({}, titleStyle), semStyle('icon'));
|
|
93
107
|
if (iconSize) {
|
|
94
108
|
style.width = iconSize;
|
|
95
109
|
}
|
|
@@ -98,19 +112,19 @@ var Alert = function Alert(props) {
|
|
|
98
112
|
jssStyle: props.jssStyle,
|
|
99
113
|
style: style,
|
|
100
114
|
type: props.type,
|
|
101
|
-
className: iconClassName
|
|
115
|
+
className: (0, _classnames.default)(iconClassName, semClass('icon'))
|
|
102
116
|
});
|
|
103
117
|
}
|
|
104
118
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
105
|
-
className: alertStyle.icon,
|
|
119
|
+
className: (0, _classnames.default)(alertStyle.icon, semClass('icon')),
|
|
106
120
|
style: style,
|
|
107
121
|
children: icon
|
|
108
122
|
});
|
|
109
123
|
};
|
|
110
124
|
var renderTitle = function renderTitle() {
|
|
111
125
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
112
|
-
className: (0, _classnames.default)(alertStyle.title, props.titleClassName),
|
|
113
|
-
style: titleStyle,
|
|
126
|
+
className: (0, _classnames.default)(alertStyle.title, props.titleClassName, semClass('title')),
|
|
127
|
+
style: _objectSpread(_objectSpread({}, titleStyle), semStyle('title')),
|
|
114
128
|
children: title
|
|
115
129
|
});
|
|
116
130
|
};
|
|
@@ -121,7 +135,8 @@ var Alert = function Alert(props) {
|
|
|
121
135
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
122
136
|
className: alertStyle.closeWrapper,
|
|
123
137
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
124
|
-
className: alertStyle.close,
|
|
138
|
+
className: (0, _classnames.default)(alertStyle.close, semClass('close')),
|
|
139
|
+
style: semStyle('close'),
|
|
125
140
|
onClick: handleClose,
|
|
126
141
|
children: closeItem || _icons.default.alert.Close
|
|
127
142
|
})
|
|
@@ -132,24 +147,28 @@ var Alert = function Alert(props) {
|
|
|
132
147
|
}
|
|
133
148
|
if (title) {
|
|
134
149
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", _objectSpread(_objectSpread({
|
|
135
|
-
className: rootClass
|
|
150
|
+
className: rootClass,
|
|
151
|
+
style: semStyle('root')
|
|
136
152
|
}, getRootProps()), {}, {
|
|
137
153
|
children: [icon && renderIcon(), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
138
154
|
className: alertStyle.content,
|
|
139
155
|
children: [renderTitle(), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
140
|
-
className: alertStyle.text,
|
|
156
|
+
className: (0, _classnames.default)(alertStyle.text, semClass('content')),
|
|
157
|
+
style: semStyle('content'),
|
|
141
158
|
children: children
|
|
142
159
|
})]
|
|
143
160
|
}), getCloseable() && renderClose()]
|
|
144
161
|
}));
|
|
145
162
|
}
|
|
146
163
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", _objectSpread(_objectSpread({
|
|
147
|
-
className: rootClass
|
|
164
|
+
className: rootClass,
|
|
165
|
+
style: semStyle('root')
|
|
148
166
|
}, getRootProps()), {}, {
|
|
149
167
|
children: [icon && renderIcon(), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
150
168
|
className: alertStyle.content,
|
|
151
169
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
152
|
-
className: alertStyle.text,
|
|
170
|
+
className: (0, _classnames.default)(alertStyle.text, semClass('content')),
|
|
171
|
+
style: semStyle('content'),
|
|
153
172
|
children: children
|
|
154
173
|
})
|
|
155
174
|
}), getCloseable() && renderClose()]
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CommonType } from '../common/type';
|
|
3
|
+
import type { SemanticClassNames, SemanticStyles } from '../common/use-semantic';
|
|
4
|
+
/**
|
|
5
|
+
* Alert Semantic DOM key 列表
|
|
6
|
+
* - root: 最外层容器
|
|
7
|
+
* - icon: 图标区域
|
|
8
|
+
* - title: 标题
|
|
9
|
+
* - content: 内容文本区
|
|
10
|
+
* - close: 关闭按钮
|
|
11
|
+
*
|
|
12
|
+
* @see /docs/rfc/0001-semantic-dom.md
|
|
13
|
+
*/
|
|
14
|
+
export type AlertSemanticKey = 'root' | 'icon' | 'title' | 'content' | 'close';
|
|
15
|
+
/**
|
|
16
|
+
* 传入函数式 `classNames` 时的状态快照。
|
|
17
|
+
*
|
|
18
|
+
* @version 3.10.0
|
|
19
|
+
*/
|
|
20
|
+
export interface AlertClassNamesInfo {
|
|
21
|
+
/**
|
|
22
|
+
* @cn Alert 当前的类型
|
|
23
|
+
* @en Alert type
|
|
24
|
+
*/
|
|
25
|
+
type: 'success' | 'info' | 'warning' | 'danger';
|
|
26
|
+
}
|
|
3
27
|
export interface AlertClasses {
|
|
4
28
|
rootClass: string;
|
|
5
29
|
alert: string;
|
|
@@ -100,5 +124,19 @@ export interface AlertProps extends Pick<CommonType, 'className' | 'style'> {
|
|
|
100
124
|
* @cn 内容,文字或 react 组件
|
|
101
125
|
*/
|
|
102
126
|
children?: React.ReactNode;
|
|
127
|
+
/**
|
|
128
|
+
* @en Semantic DOM classNames for internal nodes (root / icon / title / content / close).
|
|
129
|
+
* Accepts a static string or a function receiving a state snapshot.
|
|
130
|
+
* @cn 语义化 DOM 类名,可精准定制内部节点(root / icon / title / content / close)。
|
|
131
|
+
* 值可为静态字符串或接收状态快照的函数。
|
|
132
|
+
* @version 3.10.0
|
|
133
|
+
*/
|
|
134
|
+
classNames?: SemanticClassNames<AlertSemanticKey, AlertClassNamesInfo>;
|
|
135
|
+
/**
|
|
136
|
+
* @en Semantic DOM inline styles for internal nodes (root / icon / title / content / close).
|
|
137
|
+
* @cn 语义化 DOM 内联样式,可精准定制内部节点(root / icon / title / content / close)。
|
|
138
|
+
* @version 3.10.0
|
|
139
|
+
*/
|
|
140
|
+
styles?: SemanticStyles<AlertSemanticKey>;
|
|
103
141
|
}
|
|
104
142
|
//# sourceMappingURL=alert.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.type.d.ts","sourceRoot":"","sources":["alert.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"alert.type.d.ts","sourceRoot":"","sources":["alert.type.ts"],"names":[],"mappings":"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"}
|
package/cjs/alert/index.d.ts
CHANGED
package/cjs/alert/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AACpD,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AACpD,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["avatar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["avatar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAoC,MAAM,eAAe,CAAC;AAI9E,QAAA,MAAM,MAAM,UAAW,WAAW,4CAkJjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/cjs/avatar/avatar.js
CHANGED
|
@@ -8,8 +8,10 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _context = require("./context");
|
|
11
|
+
var _useSemantic3 = require("../common/use-semantic");
|
|
12
|
+
var _config = require("../config");
|
|
11
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
var _excluded = ["jssStyle", "className", "children", "style", "src", "alt", "icon", "gap", "shape", "srcSet", "draggable", "size", "crossOrigin", "onError"];
|
|
14
|
+
var _excluded = ["jssStyle", "className", "children", "style", "src", "alt", "icon", "gap", "shape", "srcSet", "draggable", "size", "crossOrigin", "onError", "classNames", "styles"];
|
|
13
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -43,6 +45,8 @@ var Avatar = function Avatar(props) {
|
|
|
43
45
|
sizeProp = props.size,
|
|
44
46
|
crossOrigin = props.crossOrigin,
|
|
45
47
|
onError = props.onError,
|
|
48
|
+
classNamesProp = props.classNames,
|
|
49
|
+
stylesProp = props.styles,
|
|
46
50
|
rest = _objectWithoutProperties(props, _excluded);
|
|
47
51
|
var _useState = (0, _react.useState)(1),
|
|
48
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -58,12 +62,30 @@ var Avatar = function Avatar(props) {
|
|
|
58
62
|
setIsImgExist = _useState6[1];
|
|
59
63
|
var avatarRef = (0, _react.useRef)(null);
|
|
60
64
|
var childrenRef = (0, _react.useRef)(null);
|
|
65
|
+
var config = (0, _config.useConfig)();
|
|
66
|
+
var _useSemantic = (0, _useSemantic3.useSemantic)(classNamesProp, stylesProp, config.avatar),
|
|
67
|
+
_useSemantic2 = _slicedToArray(_useSemantic, 2),
|
|
68
|
+
selfSemClass = _useSemantic2[0],
|
|
69
|
+
selfSemStyle = _useSemantic2[1];
|
|
61
70
|
var avatarContext = (0, _react.useContext)(_context.AvatarContext);
|
|
71
|
+
|
|
72
|
+
// Merge: own prop > Group Context > global config
|
|
73
|
+
var mergedSemClass = function mergedSemClass(key) {
|
|
74
|
+
var _avatarContext$semCla;
|
|
75
|
+
return (0, _classnames.default)((_avatarContext$semCla = avatarContext.semClass) === null || _avatarContext$semCla === void 0 ? void 0 : _avatarContext$semCla.call(avatarContext, key), selfSemClass(key));
|
|
76
|
+
};
|
|
77
|
+
var mergedSemStyle = function mergedSemStyle(key) {
|
|
78
|
+
var _avatarContext$semSty;
|
|
79
|
+
var ctxStyle = (_avatarContext$semSty = avatarContext.semStyle) === null || _avatarContext$semSty === void 0 ? void 0 : _avatarContext$semSty.call(avatarContext, key);
|
|
80
|
+
var selfStyle = selfSemStyle(key);
|
|
81
|
+
if (!ctxStyle && !selfStyle) return undefined;
|
|
82
|
+
return _objectSpread(_objectSpread({}, ctxStyle), selfStyle);
|
|
83
|
+
};
|
|
62
84
|
var shape = shapeProp || avatarContext.shape || 'circle';
|
|
63
85
|
var size = sizeProp || avatarContext.size;
|
|
64
86
|
var hasImageElement = /*#__PURE__*/(0, _react.isValidElement)(src);
|
|
65
87
|
var avatarClasses = (jssStyle === null || jssStyle === void 0 || (_jssStyle$avatar = jssStyle.avatar) === null || _jssStyle$avatar === void 0 ? void 0 : _jssStyle$avatar.call(jssStyle)) || {};
|
|
66
|
-
var rootClass = (0, _classnames.default)(className, avatarClasses.wrapper, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, avatarClasses.circle, shape === 'circle'), avatarClasses.square, shape === 'square'), avatarClasses.image, hasImageElement || src), avatarClasses.small, size === 'small'), avatarClasses.large, size === 'large'), avatarClasses.icon, !!icon));
|
|
88
|
+
var rootClass = (0, _classnames.default)(className, avatarClasses.wrapper, mergedSemClass('root'), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, avatarClasses.circle, shape === 'circle'), avatarClasses.square, shape === 'square'), avatarClasses.image, hasImageElement || src), avatarClasses.small, size === 'small'), avatarClasses.large, size === 'large'), avatarClasses.icon, !!icon));
|
|
67
89
|
var setScaleByChildren = function setScaleByChildren() {
|
|
68
90
|
if (!childrenRef.current || !avatarRef.current) return;
|
|
69
91
|
var avatarWidth = avatarRef.current.offsetWidth;
|
|
@@ -129,10 +151,12 @@ var Avatar = function Avatar(props) {
|
|
|
129
151
|
setScale(1);
|
|
130
152
|
}, [props.src]);
|
|
131
153
|
(0, _react.useEffect)(setScaleByChildren, [gap]);
|
|
154
|
+
var rootSemStyle = mergedSemStyle('root');
|
|
155
|
+
var mergedStyle = rootSemStyle ? _objectSpread(_objectSpread({}, style), rootSemStyle) : style;
|
|
132
156
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", _objectSpread(_objectSpread({
|
|
133
157
|
ref: avatarRef,
|
|
134
158
|
className: rootClass,
|
|
135
|
-
style:
|
|
159
|
+
style: mergedStyle
|
|
136
160
|
}, rest), {}, {
|
|
137
161
|
children: renderChildren()
|
|
138
162
|
}));
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CommonType } from '../common/type';
|
|
3
3
|
import { PopoverClasses, PopoverProps } from '../popover/popover.type';
|
|
4
|
+
import type { SemanticClassNames, SemanticStyles } from '../common/use-semantic';
|
|
5
|
+
export type AvatarSemanticKey = 'root';
|
|
6
|
+
export type AvatarGroupSemanticKey = 'group' | 'root';
|
|
4
7
|
export interface AvatarClasses {
|
|
5
8
|
wrapper: string;
|
|
6
9
|
small: string;
|
|
@@ -76,6 +79,18 @@ export interface AvatarProps extends Pick<CommonType, 'className' | 'style' | 's
|
|
|
76
79
|
* @cn 头像点击事件
|
|
77
80
|
*/
|
|
78
81
|
onClick?: () => void;
|
|
82
|
+
/**
|
|
83
|
+
* @en Semantic DOM classNames for internal nodes.
|
|
84
|
+
* @cn 语义化 DOM 类名,用于定制内部节点样式。
|
|
85
|
+
* @version 3.10.0
|
|
86
|
+
*/
|
|
87
|
+
classNames?: SemanticClassNames<AvatarSemanticKey>;
|
|
88
|
+
/**
|
|
89
|
+
* @en Semantic DOM styles for internal nodes.
|
|
90
|
+
* @cn 语义化 DOM 行内样式,用于定制内部节点样式。
|
|
91
|
+
* @version 3.10.0
|
|
92
|
+
*/
|
|
93
|
+
styles?: SemanticStyles<AvatarSemanticKey>;
|
|
79
94
|
}
|
|
80
95
|
export interface AvatarGroupProps extends Pick<CommonType, 'className' | 'style' | 'size'>, Pick<AvatarProps, 'shape'> {
|
|
81
96
|
jssStyle?: {
|
|
@@ -102,5 +117,17 @@ export interface AvatarGroupProps extends Pick<CommonType, 'className' | 'style'
|
|
|
102
117
|
* @cn 用于展示隐藏头像的 Popover 相关配置,配置属性为 Popover 部分属性: position、zIndex、getPopupContainer、adjust
|
|
103
118
|
*/
|
|
104
119
|
popover?: Pick<PopoverProps, 'position' | 'zIndex' | 'getPopupContainer' | 'adjust'>;
|
|
120
|
+
/**
|
|
121
|
+
* @en Semantic DOM classNames for internal nodes.
|
|
122
|
+
* @cn 语义化 DOM 类名,用于定制内部节点样式。
|
|
123
|
+
* @version 3.10.0
|
|
124
|
+
*/
|
|
125
|
+
classNames?: SemanticClassNames<AvatarGroupSemanticKey>;
|
|
126
|
+
/**
|
|
127
|
+
* @en Semantic DOM styles for internal nodes.
|
|
128
|
+
* @cn 语义化 DOM 行内样式,用于定制内部节点样式。
|
|
129
|
+
* @version 3.10.0
|
|
130
|
+
*/
|
|
131
|
+
styles?: SemanticStyles<AvatarGroupSemanticKey>;
|
|
105
132
|
}
|
|
106
133
|
//# sourceMappingURL=avatar.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.type.d.ts","sourceRoot":"","sources":["avatar.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"avatar.type.d.ts","sourceRoot":"","sources":["avatar.type.ts"],"names":[],"mappings":"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"}
|
package/cjs/avatar/context.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AvatarGroupProps } from './avatar.type';
|
|
3
|
-
|
|
3
|
+
import type { SemanticClassFn, SemanticStyleFn } from '../common/use-semantic';
|
|
4
|
+
import type { AvatarSemanticKey } from './avatar.type';
|
|
5
|
+
export type AvatarContextProps = Pick<AvatarGroupProps, 'shape' | 'size'> & {
|
|
6
|
+
semClass?: SemanticClassFn<AvatarSemanticKey>;
|
|
7
|
+
semStyle?: SemanticStyleFn<AvatarSemanticKey>;
|
|
8
|
+
};
|
|
4
9
|
export declare const AvatarContext: import("react").Context<AvatarContextProps>;
|
|
5
10
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["context.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["context.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,CAAC,GAAG;IAC1E,QAAQ,CAAC,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;IAC9C,QAAQ,CAAC,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,aAAa,6CAAwC,CAAC"}
|
package/cjs/avatar/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["group.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["group.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAA4D,MAAM,eAAe,CAAC;AAgB3G,QAAA,MAAM,WAAW,UAAW,gBAAgB,4CAuF3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/cjs/avatar/group.js
CHANGED
|
@@ -1,23 +1,32 @@
|
|
|
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = void 0;
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
10
|
var _context = require("./context");
|
|
9
11
|
var _avatar = _interopRequireDefault(require("./avatar"));
|
|
10
12
|
var _popover = require("../popover");
|
|
13
|
+
var _useSemantic3 = require("../common/use-semantic");
|
|
14
|
+
var _config = require("../config");
|
|
11
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
17
|
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); }
|
|
14
18
|
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; }
|
|
15
|
-
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); }
|
|
16
19
|
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; }
|
|
17
20
|
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; }
|
|
18
21
|
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; }
|
|
19
22
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
20
23
|
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); }
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
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."); }
|
|
26
|
+
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); }
|
|
27
|
+
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; }
|
|
28
|
+
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; } }
|
|
29
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
30
|
var AvatarProvider = function AvatarProvider(props) {
|
|
22
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.AvatarContext.Provider, {
|
|
23
32
|
value: props,
|
|
@@ -32,14 +41,39 @@ var AvatarGroup = function AvatarGroup(props) {
|
|
|
32
41
|
shape = props.shape,
|
|
33
42
|
max = props.max,
|
|
34
43
|
popover = props.popover,
|
|
35
|
-
renderMax = props.renderMax
|
|
44
|
+
renderMax = props.renderMax,
|
|
45
|
+
classNamesProp = props.classNames,
|
|
46
|
+
stylesProp = props.styles;
|
|
47
|
+
var config = (0, _config.useConfig)();
|
|
48
|
+
var _useSemantic = (0, _useSemantic3.useSemantic)(classNamesProp, stylesProp, config.avatar),
|
|
49
|
+
_useSemantic2 = _slicedToArray(_useSemantic, 2),
|
|
50
|
+
semClass = _useSemantic2[0],
|
|
51
|
+
semStyle = _useSemantic2[1];
|
|
36
52
|
var avatarGroupClasses = (jssStyle === null || jssStyle === void 0 || (_jssStyle$avatar = jssStyle.avatar) === null || _jssStyle$avatar === void 0 ? void 0 : _jssStyle$avatar.call(jssStyle)) || {};
|
|
53
|
+
|
|
54
|
+
// Pass 'root' key semantic to child Avatars via Context
|
|
55
|
+
var childSemClass = function childSemClass(key) {
|
|
56
|
+
if (key === 'root') return semClass('root');
|
|
57
|
+
return undefined;
|
|
58
|
+
};
|
|
59
|
+
var childSemStyle = function childSemStyle(key) {
|
|
60
|
+
if (key === 'root') return semStyle('root');
|
|
61
|
+
return undefined;
|
|
62
|
+
};
|
|
37
63
|
var children = _react.Children.toArray(childrenProp).map(function (child, index) {
|
|
38
64
|
return /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
39
65
|
key: "avatar-key-".concat(index)
|
|
40
66
|
});
|
|
41
67
|
});
|
|
42
68
|
var childrenNumber = children.length;
|
|
69
|
+
var groupClass = (0, _classnames.default)(avatarGroupClasses.group, semClass('group'));
|
|
70
|
+
var groupSemStyle = semStyle('group');
|
|
71
|
+
var providerValue = {
|
|
72
|
+
shape: shape,
|
|
73
|
+
size: size,
|
|
74
|
+
semClass: childSemClass,
|
|
75
|
+
semStyle: childSemStyle
|
|
76
|
+
};
|
|
43
77
|
if (max && max < childrenNumber) {
|
|
44
78
|
var childrenShow = children.slice(0, max);
|
|
45
79
|
var childrenHidden = children.slice(max, childrenNumber);
|
|
@@ -64,22 +98,20 @@ var AvatarGroup = function AvatarGroup(props) {
|
|
|
64
98
|
}))]
|
|
65
99
|
}, "more-avatar"));
|
|
66
100
|
}
|
|
67
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AvatarProvider, {
|
|
68
|
-
shape: shape,
|
|
69
|
-
size: size,
|
|
101
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AvatarProvider, _objectSpread(_objectSpread({}, providerValue), {}, {
|
|
70
102
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
71
|
-
className:
|
|
103
|
+
className: groupClass,
|
|
104
|
+
style: groupSemStyle,
|
|
72
105
|
children: childrenShow
|
|
73
106
|
})
|
|
74
|
-
});
|
|
107
|
+
}));
|
|
75
108
|
}
|
|
76
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AvatarProvider, {
|
|
77
|
-
shape: shape,
|
|
78
|
-
size: size,
|
|
109
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AvatarProvider, _objectSpread(_objectSpread({}, providerValue), {}, {
|
|
79
110
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
80
|
-
className:
|
|
111
|
+
className: groupClass,
|
|
112
|
+
style: groupSemStyle,
|
|
81
113
|
children: children
|
|
82
114
|
})
|
|
83
|
-
});
|
|
115
|
+
}));
|
|
84
116
|
};
|
|
85
117
|
var _default = exports.default = AvatarGroup;
|
package/cjs/avatar/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default, default as Avatar } from './avatar';
|
|
2
|
-
export type { AvatarProps } from './avatar.type';
|
|
2
|
+
export type { AvatarProps, AvatarSemanticKey, AvatarGroupSemanticKey } from './avatar.type';
|
|
3
3
|
export { default as AvatarGroup } from './group';
|
|
4
4
|
export type { AvatarGroupProps } from './avatar.type';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE5F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AACjD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
package/cjs/badge/badge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["badge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["badge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAkC,MAAM,cAAc,CAAC;AAI1E,QAAA,MAAM,KAAK,UAAW,UAAU,4CAqH/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/cjs/badge/badge.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -7,14 +8,21 @@ exports.default = void 0;
|
|
|
7
8
|
var _hooks = require("@sheinx/hooks");
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _config = require("../config");
|
|
12
|
+
var _common = require("../common");
|
|
10
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
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); }
|
|
13
15
|
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; }
|
|
14
16
|
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; }
|
|
15
17
|
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; }
|
|
16
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
17
19
|
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); }
|
|
20
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
+
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."); }
|
|
22
|
+
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); }
|
|
23
|
+
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; }
|
|
24
|
+
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; } }
|
|
25
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
26
|
var Badge = function Badge(props) {
|
|
19
27
|
var _jssStyle$badge;
|
|
20
28
|
var jssStyle = props.jssStyle,
|
|
@@ -28,11 +36,20 @@ var Badge = function Badge(props) {
|
|
|
28
36
|
status = props.status,
|
|
29
37
|
showZero = props.showZero,
|
|
30
38
|
color = props.color,
|
|
31
|
-
text = props.text
|
|
39
|
+
text = props.text,
|
|
40
|
+
classNamesProp = props.classNames,
|
|
41
|
+
stylesProp = props.styles;
|
|
32
42
|
var badgeStyle = (jssStyle === null || jssStyle === void 0 || (_jssStyle$badge = jssStyle.badge) === null || _jssStyle$badge === void 0 ? void 0 : _jssStyle$badge.call(jssStyle)) || {};
|
|
43
|
+
|
|
44
|
+
// Semantic DOM
|
|
45
|
+
var config = (0, _config.useConfig)();
|
|
46
|
+
var _useSemantic = (0, _common.useSemantic)(classNamesProp, stylesProp, config.badge),
|
|
47
|
+
_useSemantic2 = _slicedToArray(_useSemantic, 2),
|
|
48
|
+
semClass = _useSemantic2[0],
|
|
49
|
+
semStyle = _useSemantic2[1];
|
|
33
50
|
var isTextBadge = text !== undefined || dot && children === undefined;
|
|
34
51
|
var isStandalone = !children && !isTextBadge;
|
|
35
|
-
var rootClass = (0, _classnames.default)(className, badgeStyle.rootClass, badgeStyle.badge, isTextBadge && badgeStyle.textBadge, isStandalone && badgeStyle.standalone);
|
|
52
|
+
var rootClass = (0, _classnames.default)(className, badgeStyle.rootClass, badgeStyle.badge, isTextBadge && badgeStyle.textBadge, isStandalone && badgeStyle.standalone, semClass('root'));
|
|
36
53
|
var isOverflowCount = overflowCount !== undefined && Number(count) > overflowCount;
|
|
37
54
|
var renderCount = function renderCount() {
|
|
38
55
|
if (isOverflowCount) {
|
|
@@ -69,16 +86,16 @@ var Badge = function Badge(props) {
|
|
|
69
86
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("sup", {
|
|
70
87
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
71
88
|
background: color
|
|
72
|
-
}),
|
|
73
|
-
className: badgeStyle.custom,
|
|
89
|
+
}, semStyle('badge')),
|
|
90
|
+
className: (0, _classnames.default)(badgeStyle.custom, semClass('badge')),
|
|
74
91
|
children: countNode
|
|
75
92
|
});
|
|
76
93
|
}
|
|
77
94
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("sup", {
|
|
78
95
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
79
96
|
background: color
|
|
80
|
-
}),
|
|
81
|
-
className: (0, _classnames.default)(size === 'small' && badgeStyle.small, dot ? badgeStyle.dot : badgeStyle.count, supClass, status && dot && _defineProperty({}, badgeStyle[status], true)),
|
|
97
|
+
}, semStyle('badge')),
|
|
98
|
+
className: (0, _classnames.default)(size === 'small' && badgeStyle.small, dot ? badgeStyle.dot : badgeStyle.count, supClass, status && dot && _defineProperty({}, badgeStyle[status], true), semClass('badge')),
|
|
82
99
|
children: dot !== true && countNode
|
|
83
100
|
});
|
|
84
101
|
};
|
|
@@ -97,6 +114,7 @@ var Badge = function Badge(props) {
|
|
|
97
114
|
};
|
|
98
115
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
99
116
|
className: rootClass,
|
|
117
|
+
style: semStyle('root'),
|
|
100
118
|
children: [!isTextBadge && children, !isTextBadge && renderSup(), isTextBadge && renderText()]
|
|
101
119
|
});
|
|
102
120
|
};
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CommonType } from '../common/type';
|
|
3
|
+
import type { SemanticClassNames, SemanticStyles } from '../common/use-semantic';
|
|
4
|
+
/**
|
|
5
|
+
* Badge Semantic DOM key 列表
|
|
6
|
+
* - root: 最外层容器
|
|
7
|
+
* - badge: 右上角徽标元素(数字/圆点/自定义内容)
|
|
8
|
+
*
|
|
9
|
+
* @see /docs/rfc/0001-semantic-dom.md
|
|
10
|
+
*/
|
|
11
|
+
export type BadgeSemanticKey = 'root' | 'badge';
|
|
3
12
|
export interface BadgeClasses {
|
|
4
13
|
rootClass: string;
|
|
5
14
|
badge: string;
|
|
@@ -26,6 +35,18 @@ export interface BadgeProps extends Pick<CommonType, 'className' | 'style'> {
|
|
|
26
35
|
jssStyle?: {
|
|
27
36
|
badge: () => BadgeClasses;
|
|
28
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* @en Semantic DOM classNames for internal nodes.
|
|
40
|
+
* @cn 语义化 DOM 类名,用于定制内部节点样式。
|
|
41
|
+
* @version 3.10.0
|
|
42
|
+
*/
|
|
43
|
+
classNames?: SemanticClassNames<BadgeSemanticKey>;
|
|
44
|
+
/**
|
|
45
|
+
* @en Semantic DOM styles for internal nodes.
|
|
46
|
+
* @cn 语义化 DOM 行内样式,用于定制内部节点样式。
|
|
47
|
+
* @version 3.10.0
|
|
48
|
+
*/
|
|
49
|
+
styles?: SemanticStyles<BadgeSemanticKey>;
|
|
29
50
|
/**
|
|
30
51
|
* @en Content
|
|
31
52
|
* @cn 内容
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.type.d.ts","sourceRoot":"","sources":["badge.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"badge.type.d.ts","sourceRoot":"","sources":["badge.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEjF;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,CAAC;IACzE,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,MAAM,YAAY,CAAC;KAC3B,CAAC;IAEF;;;;OAIG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAElD;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC1C;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAE;IACrE;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC5B"}
|
package/cjs/badge/index.d.ts
CHANGED
package/cjs/badge/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AACpD,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AACpD,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
|