@douyinfe/semi-ui 2.30.0-alpha.0 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/semi.css +29 -380
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +2189 -2061
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/_portal/index.js +2 -2
- package/lib/cjs/_utils/index.js +3 -1
- package/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/anchor/index.js +9 -9
- package/lib/cjs/anchor/link.js +8 -8
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.js +8 -4
- package/lib/cjs/autoComplete/option.js +7 -7
- package/lib/cjs/avatar/avatarGroup.js +7 -7
- package/lib/cjs/avatar/index.js +12 -12
- package/lib/cjs/badge/index.js +8 -8
- package/lib/cjs/banner/index.js +12 -12
- package/lib/cjs/breadcrumb/index.js +12 -12
- package/lib/cjs/breadcrumb/item.js +8 -8
- package/lib/cjs/button/Button.js +9 -9
- package/lib/cjs/button/buttonGroup.js +5 -5
- package/lib/cjs/button/splitButtonGroup.js +1 -1
- package/lib/cjs/calendar/dayCalendar.js +13 -13
- package/lib/cjs/calendar/dayCol.js +17 -17
- package/lib/cjs/calendar/monthCalendar.js +38 -38
- package/lib/cjs/calendar/rangeCalendar.js +27 -27
- package/lib/cjs/calendar/timeCol.js +6 -6
- package/lib/cjs/calendar/weekCalendar.js +27 -27
- package/lib/cjs/card/cardGroup.js +2 -2
- package/lib/cjs/card/index.js +16 -16
- package/lib/cjs/card/meta.js +5 -5
- package/lib/cjs/carousel/CarouselArrow.js +6 -6
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/CarouselIndicator.js +6 -6
- package/lib/cjs/carousel/index.d.ts +2 -2
- package/lib/cjs/carousel/index.js +12 -12
- package/lib/cjs/cascader/index.d.ts +2 -0
- package/lib/cjs/cascader/index.js +44 -36
- package/lib/cjs/cascader/item.js +26 -26
- package/lib/cjs/checkbox/checkbox.js +14 -14
- package/lib/cjs/checkbox/checkboxGroup.js +4 -4
- package/lib/cjs/checkbox/checkboxInner.js +6 -6
- package/lib/cjs/collapse/item.js +9 -9
- package/lib/cjs/collapsible/index.js +3 -3
- package/lib/cjs/configProvider/index.js +1 -1
- package/lib/cjs/datePicker/dateInput.js +16 -16
- package/lib/cjs/datePicker/datePicker.d.ts +2 -2
- package/lib/cjs/datePicker/datePicker.js +9 -9
- package/lib/cjs/datePicker/footer.js +1 -1
- package/lib/cjs/datePicker/index.js +1 -1
- package/lib/cjs/datePicker/month.js +2 -2
- package/lib/cjs/datePicker/monthsGrid.d.ts +2 -2
- package/lib/cjs/datePicker/monthsGrid.js +27 -27
- package/lib/cjs/datePicker/navigation.js +1 -1
- package/lib/cjs/datePicker/quickControl.d.ts +1 -1
- package/lib/cjs/datePicker/quickControl.js +14 -14
- package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.js +4 -4
- package/lib/cjs/descriptions/index.js +3 -3
- package/lib/cjs/descriptions/item.js +5 -5
- package/lib/cjs/divider/index.js +7 -7
- package/lib/cjs/dropdown/dropdownDivider.js +1 -1
- package/lib/cjs/dropdown/dropdownItem.js +7 -7
- package/lib/cjs/dropdown/dropdownMenu.js +1 -1
- package/lib/cjs/dropdown/dropdownTitle.js +2 -2
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/dropdown/index.js +3 -3
- package/lib/cjs/empty/index.js +7 -7
- package/lib/cjs/form/arrayField.js +1 -1
- package/lib/cjs/form/baseForm.d.ts +4 -4
- package/lib/cjs/form/baseForm.js +2 -2
- package/lib/cjs/form/errorMessage.js +1 -1
- package/lib/cjs/form/field.d.ts +4 -4
- package/lib/cjs/form/group.js +6 -6
- package/lib/cjs/form/hoc/withField.js +16 -16
- package/lib/cjs/form/label.js +9 -9
- package/lib/cjs/form/slot.js +5 -5
- package/lib/cjs/grid/col.js +11 -11
- package/lib/cjs/grid/row.js +4 -4
- package/lib/cjs/highlight/index.js +1 -1
- package/lib/cjs/iconButton/index.js +5 -5
- package/lib/cjs/image/image.js +10 -10
- package/lib/cjs/image/preview.js +3 -3
- package/lib/cjs/image/previewFooter.js +12 -12
- package/lib/cjs/image/previewHeader.js +3 -3
- package/lib/cjs/image/previewImage.js +7 -7
- package/lib/cjs/image/previewInner.js +7 -7
- package/lib/cjs/input/index.js +38 -38
- package/lib/cjs/input/inputGroup.js +7 -7
- package/lib/cjs/input/textarea.js +14 -14
- package/lib/cjs/inputNumber/index.js +11 -11
- package/lib/cjs/layout/Sider.js +3 -3
- package/lib/cjs/layout/index.js +2 -2
- package/lib/cjs/list/index.js +11 -11
- package/lib/cjs/list/item.js +6 -6
- package/lib/cjs/locale/source/ar.js +5 -5
- package/lib/cjs/locale/source/de.js +5 -5
- package/lib/cjs/locale/source/en_GB.js +5 -5
- package/lib/cjs/locale/source/en_US.js +4 -4
- package/lib/cjs/locale/source/es.js +5 -5
- package/lib/cjs/locale/source/fr.js +5 -5
- package/lib/cjs/locale/source/id_ID.js +4 -4
- package/lib/cjs/locale/source/it.js +5 -5
- package/lib/cjs/locale/source/ja_JP.js +5 -5
- package/lib/cjs/locale/source/ko_KR.js +4 -4
- package/lib/cjs/locale/source/ms_MY.js +4 -4
- package/lib/cjs/locale/source/nl_NL.d.ts +1 -1
- package/lib/cjs/locale/source/nl_NL.js +6 -6
- package/lib/cjs/locale/source/pl_PL.js +4 -4
- package/lib/cjs/locale/source/pt_BR.js +5 -5
- package/lib/cjs/locale/source/ro.d.ts +13 -0
- package/lib/cjs/locale/source/ro.js +17 -4
- package/lib/cjs/locale/source/ru_RU.js +4 -4
- package/lib/cjs/locale/source/sv_SE.js +4 -4
- package/lib/cjs/locale/source/th_TH.js +5 -5
- package/lib/cjs/locale/source/tr_TR.js +5 -5
- package/lib/cjs/locale/source/vi_VN.js +5 -5
- package/lib/cjs/locale/source/zh_CN.js +4 -4
- package/lib/cjs/locale/source/zh_TW.js +4 -4
- package/lib/cjs/modal/ConfirmModal.js +7 -7
- package/lib/cjs/modal/Modal.js +4 -4
- package/lib/cjs/modal/ModalContent.js +24 -24
- package/lib/cjs/modal/confirm.js +9 -0
- package/lib/cjs/modal/useModal/index.js +1 -1
- package/lib/cjs/navigation/CollapseButton.js +1 -1
- package/lib/cjs/navigation/Footer.js +2 -2
- package/lib/cjs/navigation/Header.js +5 -5
- package/lib/cjs/navigation/Item.js +16 -16
- package/lib/cjs/navigation/SubNav.js +14 -14
- package/lib/cjs/navigation/index.js +8 -8
- package/lib/cjs/notification/index.js +3 -3
- package/lib/cjs/notification/notice.js +12 -12
- package/lib/cjs/overflowList/index.d.ts +1 -1
- package/lib/cjs/overflowList/index.js +6 -6
- package/lib/cjs/pagination/index.js +24 -24
- package/lib/cjs/popconfirm/index.d.ts +11 -7
- package/lib/cjs/popconfirm/index.js +97 -60
- package/lib/cjs/popover/index.d.ts +8 -2
- package/lib/cjs/popover/index.js +17 -5
- package/lib/cjs/progress/index.js +14 -14
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radio.js +22 -22
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/radio/radioGroup.js +5 -5
- package/lib/cjs/radio/radioInner.js +7 -7
- package/lib/cjs/rating/index.js +5 -5
- package/lib/cjs/rating/item.js +11 -11
- package/lib/cjs/scrollList/index.js +5 -5
- package/lib/cjs/scrollList/scrollItem.js +13 -13
- package/lib/cjs/select/index.d.ts +1 -1
- package/lib/cjs/select/index.js +61 -61
- package/lib/cjs/select/option.js +7 -7
- package/lib/cjs/sideSheet/SideSheetContent.js +10 -10
- package/lib/cjs/sideSheet/index.js +7 -7
- package/lib/cjs/skeleton/index.js +1 -1
- package/lib/cjs/skeleton/item.js +4 -4
- package/lib/cjs/slider/index.js +28 -28
- package/lib/cjs/space/index.js +12 -12
- package/lib/cjs/spin/icon.js +2 -2
- package/lib/cjs/spin/index.js +6 -6
- package/lib/cjs/steps/basicStep.d.ts +0 -2
- package/lib/cjs/steps/basicStep.js +15 -20
- package/lib/cjs/steps/basicSteps.js +6 -6
- package/lib/cjs/steps/fillStep.d.ts +0 -1
- package/lib/cjs/steps/fillStep.js +10 -11
- package/lib/cjs/steps/fillSteps.js +5 -4
- package/lib/cjs/steps/index.d.ts +1 -4
- package/lib/cjs/steps/navStep.d.ts +0 -3
- package/lib/cjs/steps/navStep.js +8 -26
- package/lib/cjs/steps/navSteps.js +2 -2
- package/lib/cjs/steps/step.d.ts +1 -5
- package/lib/cjs/steps/step.js +3 -3
- package/lib/cjs/table/Body/BaseRow.js +5 -5
- package/lib/cjs/table/Body/ExpandedRow.js +3 -3
- package/lib/cjs/table/Body/SectionRow.js +1 -1
- package/lib/cjs/table/Body/index.js +8 -8
- package/lib/cjs/table/ColGroup.js +2 -2
- package/lib/cjs/table/ColumnFilter.js +3 -3
- package/lib/cjs/table/ColumnSelection.js +2 -2
- package/lib/cjs/table/ColumnSorter.js +7 -7
- package/lib/cjs/table/CustomExpandIcon.js +2 -2
- package/lib/cjs/table/HeadTable.js +3 -3
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/table/Table.js +20 -20
- package/lib/cjs/table/TableCell.js +8 -8
- package/lib/cjs/table/TableHeader.js +1 -1
- package/lib/cjs/table/TableHeaderRow.js +8 -8
- package/lib/cjs/table/TablePagination.js +3 -3
- package/lib/cjs/tabs/TabBar.js +12 -12
- package/lib/cjs/tabs/TabItem.js +7 -7
- package/lib/cjs/tabs/TabPane.js +3 -3
- package/lib/cjs/tabs/index.js +2 -2
- package/lib/cjs/tag/group.js +5 -5
- package/lib/cjs/tag/index.js +13 -13
- package/lib/cjs/tagInput/index.js +33 -33
- package/lib/cjs/timePicker/Combobox.js +4 -4
- package/lib/cjs/timePicker/TimeInput.js +4 -4
- package/lib/cjs/timePicker/TimePicker.js +8 -8
- package/lib/cjs/timeline/index.js +8 -8
- package/lib/cjs/timeline/item.js +7 -7
- package/lib/cjs/toast/index.js +5 -5
- package/lib/cjs/toast/toast.js +9 -9
- package/lib/cjs/tooltip/index.d.ts +8 -4
- package/lib/cjs/tooltip/index.js +17 -7
- package/lib/cjs/transfer/index.js +31 -31
- package/lib/cjs/tree/autoSizer.js +1 -1
- package/lib/cjs/tree/index.js +6 -6
- package/lib/cjs/tree/nodeList.js +1 -1
- package/lib/cjs/tree/treeNode.js +26 -26
- package/lib/cjs/treeSelect/index.d.ts +2 -1
- package/lib/cjs/treeSelect/index.js +63 -51
- package/lib/cjs/typography/base.js +14 -14
- package/lib/cjs/typography/copyable.js +3 -3
- package/lib/cjs/typography/numeral.d.ts +1 -1
- package/lib/cjs/typography/paragraph.js +1 -1
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/cjs/typography/title.js +1 -1
- package/lib/cjs/typography/util.js +1 -1
- package/lib/cjs/upload/fileCard.js +32 -32
- package/lib/cjs/upload/index.js +37 -37
- package/lib/es/_portal/index.js +2 -2
- package/lib/es/_utils/index.js +3 -1
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/anchor/index.js +9 -9
- package/lib/es/anchor/link.js +8 -8
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/autoComplete/index.js +8 -4
- package/lib/es/autoComplete/option.js +7 -7
- package/lib/es/avatar/avatarGroup.js +7 -7
- package/lib/es/avatar/index.js +12 -12
- package/lib/es/badge/index.js +8 -8
- package/lib/es/banner/index.js +12 -12
- package/lib/es/breadcrumb/index.js +12 -12
- package/lib/es/breadcrumb/item.js +8 -8
- package/lib/es/button/Button.js +9 -9
- package/lib/es/button/buttonGroup.js +5 -5
- package/lib/es/button/splitButtonGroup.js +1 -1
- package/lib/es/calendar/dayCalendar.js +13 -13
- package/lib/es/calendar/dayCol.js +17 -17
- package/lib/es/calendar/monthCalendar.js +38 -38
- package/lib/es/calendar/rangeCalendar.js +27 -27
- package/lib/es/calendar/timeCol.js +6 -6
- package/lib/es/calendar/weekCalendar.js +27 -27
- package/lib/es/card/cardGroup.js +2 -2
- package/lib/es/card/index.js +16 -16
- package/lib/es/card/meta.js +5 -5
- package/lib/es/carousel/CarouselArrow.js +6 -6
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/CarouselIndicator.js +6 -6
- package/lib/es/carousel/index.d.ts +2 -2
- package/lib/es/carousel/index.js +12 -12
- package/lib/es/cascader/index.d.ts +2 -0
- package/lib/es/cascader/index.js +44 -36
- package/lib/es/cascader/item.js +26 -26
- package/lib/es/checkbox/checkbox.js +14 -14
- package/lib/es/checkbox/checkboxGroup.js +4 -4
- package/lib/es/checkbox/checkboxInner.js +6 -6
- package/lib/es/collapse/item.js +9 -9
- package/lib/es/collapsible/index.js +3 -3
- package/lib/es/configProvider/index.js +1 -1
- package/lib/es/datePicker/dateInput.js +16 -16
- package/lib/es/datePicker/datePicker.d.ts +2 -2
- package/lib/es/datePicker/datePicker.js +9 -9
- package/lib/es/datePicker/footer.js +1 -1
- package/lib/es/datePicker/index.js +1 -1
- package/lib/es/datePicker/month.js +2 -2
- package/lib/es/datePicker/monthsGrid.d.ts +2 -2
- package/lib/es/datePicker/monthsGrid.js +27 -27
- package/lib/es/datePicker/navigation.js +1 -1
- package/lib/es/datePicker/quickControl.d.ts +1 -1
- package/lib/es/datePicker/quickControl.js +14 -14
- package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.js +4 -4
- package/lib/es/descriptions/index.js +3 -3
- package/lib/es/descriptions/item.js +5 -5
- package/lib/es/divider/index.js +7 -7
- package/lib/es/dropdown/dropdownDivider.js +1 -1
- package/lib/es/dropdown/dropdownItem.js +7 -7
- package/lib/es/dropdown/dropdownMenu.js +1 -1
- package/lib/es/dropdown/dropdownTitle.js +2 -2
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/dropdown/index.js +3 -3
- package/lib/es/empty/index.js +7 -7
- package/lib/es/form/arrayField.js +1 -1
- package/lib/es/form/baseForm.d.ts +4 -4
- package/lib/es/form/baseForm.js +2 -2
- package/lib/es/form/errorMessage.js +1 -1
- package/lib/es/form/field.d.ts +4 -4
- package/lib/es/form/group.js +6 -6
- package/lib/es/form/hoc/withField.js +16 -16
- package/lib/es/form/label.js +9 -9
- package/lib/es/form/slot.js +5 -5
- package/lib/es/grid/col.js +11 -11
- package/lib/es/grid/row.js +4 -4
- package/lib/es/highlight/index.js +1 -1
- package/lib/es/iconButton/index.js +5 -5
- package/lib/es/image/image.js +10 -10
- package/lib/es/image/preview.js +3 -3
- package/lib/es/image/previewFooter.js +12 -12
- package/lib/es/image/previewHeader.js +3 -3
- package/lib/es/image/previewImage.js +7 -7
- package/lib/es/image/previewInner.js +7 -7
- package/lib/es/input/index.js +38 -38
- package/lib/es/input/inputGroup.js +7 -7
- package/lib/es/input/textarea.js +14 -14
- package/lib/es/inputNumber/index.js +11 -11
- package/lib/es/layout/Sider.js +3 -3
- package/lib/es/layout/index.js +2 -2
- package/lib/es/list/index.js +11 -11
- package/lib/es/list/item.js +6 -6
- package/lib/es/locale/source/ar.js +5 -5
- package/lib/es/locale/source/de.js +5 -5
- package/lib/es/locale/source/en_GB.js +5 -5
- package/lib/es/locale/source/en_US.js +4 -4
- package/lib/es/locale/source/es.js +5 -5
- package/lib/es/locale/source/fr.js +5 -5
- package/lib/es/locale/source/id_ID.js +4 -4
- package/lib/es/locale/source/it.js +5 -5
- package/lib/es/locale/source/ja_JP.js +5 -5
- package/lib/es/locale/source/ko_KR.js +4 -4
- package/lib/es/locale/source/ms_MY.js +4 -4
- package/lib/es/locale/source/nl_NL.d.ts +1 -1
- package/lib/es/locale/source/nl_NL.js +6 -6
- package/lib/es/locale/source/pl_PL.js +4 -4
- package/lib/es/locale/source/pt_BR.js +5 -5
- package/lib/es/locale/source/ro.d.ts +13 -0
- package/lib/es/locale/source/ro.js +17 -4
- package/lib/es/locale/source/ru_RU.js +4 -4
- package/lib/es/locale/source/sv_SE.js +4 -4
- package/lib/es/locale/source/th_TH.js +5 -5
- package/lib/es/locale/source/tr_TR.js +5 -5
- package/lib/es/locale/source/vi_VN.js +5 -5
- package/lib/es/locale/source/zh_CN.js +4 -4
- package/lib/es/locale/source/zh_TW.js +4 -4
- package/lib/es/modal/ConfirmModal.js +7 -7
- package/lib/es/modal/Modal.js +4 -4
- package/lib/es/modal/ModalContent.js +24 -24
- package/lib/es/modal/confirm.js +9 -0
- package/lib/es/modal/useModal/index.js +1 -1
- package/lib/es/navigation/CollapseButton.js +1 -1
- package/lib/es/navigation/Footer.js +2 -2
- package/lib/es/navigation/Header.js +5 -5
- package/lib/es/navigation/Item.js +16 -16
- package/lib/es/navigation/SubNav.js +14 -14
- package/lib/es/navigation/index.js +8 -8
- package/lib/es/notification/index.js +3 -3
- package/lib/es/notification/notice.js +12 -12
- package/lib/es/overflowList/index.d.ts +1 -1
- package/lib/es/overflowList/index.js +6 -6
- package/lib/es/pagination/index.js +24 -24
- package/lib/es/popconfirm/index.d.ts +11 -7
- package/lib/es/popconfirm/index.js +95 -60
- package/lib/es/popover/index.d.ts +8 -2
- package/lib/es/popover/index.js +17 -5
- package/lib/es/progress/index.js +14 -14
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radio.js +22 -22
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/radio/radioGroup.js +5 -5
- package/lib/es/radio/radioInner.js +7 -7
- package/lib/es/rating/index.js +5 -5
- package/lib/es/rating/item.js +11 -11
- package/lib/es/scrollList/index.js +5 -5
- package/lib/es/scrollList/scrollItem.js +13 -13
- package/lib/es/select/index.d.ts +1 -1
- package/lib/es/select/index.js +61 -61
- package/lib/es/select/option.js +7 -7
- package/lib/es/sideSheet/SideSheetContent.js +10 -10
- package/lib/es/sideSheet/index.js +7 -7
- package/lib/es/skeleton/index.js +1 -1
- package/lib/es/skeleton/item.js +4 -4
- package/lib/es/slider/index.js +28 -28
- package/lib/es/space/index.js +12 -12
- package/lib/es/spin/icon.js +2 -2
- package/lib/es/spin/index.js +6 -6
- package/lib/es/steps/basicStep.d.ts +0 -2
- package/lib/es/steps/basicStep.js +15 -20
- package/lib/es/steps/basicSteps.js +6 -6
- package/lib/es/steps/fillStep.d.ts +0 -1
- package/lib/es/steps/fillStep.js +10 -11
- package/lib/es/steps/fillSteps.js +5 -4
- package/lib/es/steps/index.d.ts +1 -4
- package/lib/es/steps/navStep.d.ts +0 -3
- package/lib/es/steps/navStep.js +8 -21
- package/lib/es/steps/navSteps.js +2 -2
- package/lib/es/steps/step.d.ts +1 -5
- package/lib/es/steps/step.js +3 -3
- package/lib/es/table/Body/BaseRow.js +5 -5
- package/lib/es/table/Body/ExpandedRow.js +3 -3
- package/lib/es/table/Body/SectionRow.js +1 -1
- package/lib/es/table/Body/index.js +8 -8
- package/lib/es/table/ColGroup.js +2 -2
- package/lib/es/table/ColumnFilter.js +3 -3
- package/lib/es/table/ColumnSelection.js +2 -2
- package/lib/es/table/ColumnSorter.js +7 -7
- package/lib/es/table/CustomExpandIcon.js +2 -2
- package/lib/es/table/HeadTable.js +3 -3
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/table/Table.js +20 -20
- package/lib/es/table/TableCell.js +8 -8
- package/lib/es/table/TableHeader.js +1 -1
- package/lib/es/table/TableHeaderRow.js +8 -8
- package/lib/es/table/TablePagination.js +3 -3
- package/lib/es/tabs/TabBar.js +12 -12
- package/lib/es/tabs/TabItem.js +7 -7
- package/lib/es/tabs/TabPane.js +3 -3
- package/lib/es/tabs/index.js +2 -2
- package/lib/es/tag/group.js +5 -5
- package/lib/es/tag/index.js +13 -13
- package/lib/es/tagInput/index.js +33 -33
- package/lib/es/timePicker/Combobox.js +4 -4
- package/lib/es/timePicker/TimeInput.js +4 -4
- package/lib/es/timePicker/TimePicker.js +8 -8
- package/lib/es/timeline/index.js +8 -8
- package/lib/es/timeline/item.js +7 -7
- package/lib/es/toast/index.js +5 -5
- package/lib/es/toast/toast.js +9 -9
- package/lib/es/tooltip/index.d.ts +8 -4
- package/lib/es/tooltip/index.js +17 -7
- package/lib/es/transfer/index.js +31 -31
- package/lib/es/tree/autoSizer.js +1 -1
- package/lib/es/tree/index.js +6 -6
- package/lib/es/tree/nodeList.js +1 -1
- package/lib/es/tree/treeNode.js +26 -26
- package/lib/es/treeSelect/index.d.ts +2 -1
- package/lib/es/treeSelect/index.js +63 -51
- package/lib/es/typography/base.js +14 -14
- package/lib/es/typography/copyable.js +3 -3
- package/lib/es/typography/numeral.d.ts +1 -1
- package/lib/es/typography/paragraph.js +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/lib/es/typography/title.js +1 -1
- package/lib/es/typography/util.js +1 -1
- package/lib/es/upload/fileCard.js +32 -32
- package/lib/es/upload/index.js +37 -37
- package/package.json +9 -9
|
@@ -47,9 +47,9 @@ class TreeSelect extends BaseComponent {
|
|
|
47
47
|
suffix
|
|
48
48
|
} = this.props;
|
|
49
49
|
const suffixWrapperCls = cls({
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
50
|
+
[`${prefixcls}-suffix`]: true,
|
|
51
|
+
[`${prefixcls}-suffix-text`]: suffix && _isString(suffix),
|
|
52
|
+
[`${prefixcls}-suffix-icon`]: isSemiIcon(suffix)
|
|
53
53
|
});
|
|
54
54
|
return /*#__PURE__*/React.createElement("div", {
|
|
55
55
|
className: suffixWrapperCls,
|
|
@@ -65,11 +65,11 @@ class TreeSelect extends BaseComponent {
|
|
|
65
65
|
} = this.props;
|
|
66
66
|
const labelNode = prefix || insetLabel;
|
|
67
67
|
const prefixWrapperCls = cls({
|
|
68
|
-
[
|
|
68
|
+
[`${prefixcls}-prefix`]: true,
|
|
69
69
|
// to be doublechecked
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
-
[
|
|
70
|
+
[`${prefixcls}-inset-label`]: insetLabel,
|
|
71
|
+
[`${prefixcls}-prefix-text`]: labelNode && _isString(labelNode),
|
|
72
|
+
[`${prefixcls}-prefix-icon`]: isSemiIcon(labelNode)
|
|
73
73
|
});
|
|
74
74
|
return /*#__PURE__*/React.createElement("div", {
|
|
75
75
|
className: prefixWrapperCls,
|
|
@@ -89,7 +89,7 @@ class TreeSelect extends BaseComponent {
|
|
|
89
89
|
const style = Object.assign({
|
|
90
90
|
minWidth: dropdownMinWidth
|
|
91
91
|
}, dropdownStyle);
|
|
92
|
-
const popoverCls = cls(dropdownClassName,
|
|
92
|
+
const popoverCls = cls(dropdownClassName, `${prefixcls}-popover`);
|
|
93
93
|
return /*#__PURE__*/React.createElement("div", {
|
|
94
94
|
className: popoverCls,
|
|
95
95
|
style: style
|
|
@@ -214,7 +214,7 @@ class TreeSelect extends BaseComponent {
|
|
|
214
214
|
color: 'white',
|
|
215
215
|
visible: true,
|
|
216
216
|
onClose,
|
|
217
|
-
key:
|
|
217
|
+
key: `tag-${key}-${index}`,
|
|
218
218
|
size: size === 'small' ? 'small' : 'large'
|
|
219
219
|
};
|
|
220
220
|
|
|
@@ -241,9 +241,9 @@ class TreeSelect extends BaseComponent {
|
|
|
241
241
|
inputTriggerFocus
|
|
242
242
|
} = this.state;
|
|
243
243
|
const renderText = this.foundation.getRenderTextInSingle();
|
|
244
|
-
const spanCls = cls(
|
|
245
|
-
[
|
|
246
|
-
[
|
|
244
|
+
const spanCls = cls(`${prefixcls}-selection-TriggerSearchItem`, {
|
|
245
|
+
[`${prefixcls}-selection-TriggerSearchItem-placeholder`]: (inputTriggerFocus || !renderText) && !disabled,
|
|
246
|
+
[`${prefixcls}-selection-TriggerSearchItem-disabled`]: disabled
|
|
247
247
|
});
|
|
248
248
|
return /*#__PURE__*/React.createElement("span", {
|
|
249
249
|
className: spanCls
|
|
@@ -281,7 +281,7 @@ class TreeSelect extends BaseComponent {
|
|
|
281
281
|
if (!multiple || !this.hasValue()) {
|
|
282
282
|
const renderText = this.foundation.getRenderTextInSingle();
|
|
283
283
|
const spanCls = cls({
|
|
284
|
-
[
|
|
284
|
+
[`${prefixcls}-selection-placeholder`]: !renderText
|
|
285
285
|
});
|
|
286
286
|
return /*#__PURE__*/React.createElement("span", {
|
|
287
287
|
className: spanCls
|
|
@@ -348,7 +348,7 @@ class TreeSelect extends BaseComponent {
|
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
return arrowIcon ? /*#__PURE__*/React.createElement("div", {
|
|
351
|
-
className: cls(
|
|
351
|
+
className: cls(`${prefixcls}-arrow`),
|
|
352
352
|
"x-semi-prop": "arrowIcon"
|
|
353
353
|
}, arrowIcon) : null;
|
|
354
354
|
};
|
|
@@ -358,7 +358,7 @@ class TreeSelect extends BaseComponent {
|
|
|
358
358
|
const {
|
|
359
359
|
clearIcon
|
|
360
360
|
} = this.props;
|
|
361
|
-
const clearCls = cls(
|
|
361
|
+
const clearCls = cls(`${prefixcls}-clearbtn`);
|
|
362
362
|
|
|
363
363
|
if (showClearBtn) {
|
|
364
364
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -393,12 +393,11 @@ class TreeSelect extends BaseComponent {
|
|
|
393
393
|
triggerRender
|
|
394
394
|
} = this.props;
|
|
395
395
|
const {
|
|
396
|
-
isOpen,
|
|
397
|
-
isInput,
|
|
398
396
|
inputValue,
|
|
399
397
|
selectedKeys,
|
|
400
398
|
checkedKeys,
|
|
401
|
-
keyEntities
|
|
399
|
+
keyEntities,
|
|
400
|
+
isFocus
|
|
402
401
|
} = this.state;
|
|
403
402
|
const filterable = Boolean(filterTreeNode);
|
|
404
403
|
const useCustomTrigger = typeof triggerRender === 'function';
|
|
@@ -412,20 +411,20 @@ class TreeSelect extends BaseComponent {
|
|
|
412
411
|
|
|
413
412
|
const isValueTriggerSearch = isTriggerPositionSearch && !_isEmpty(checkedKeys);
|
|
414
413
|
const classNames = useCustomTrigger ? cls(className) : cls(prefixcls, {
|
|
415
|
-
[
|
|
416
|
-
[
|
|
417
|
-
[
|
|
418
|
-
[
|
|
419
|
-
[
|
|
420
|
-
[
|
|
421
|
-
[
|
|
422
|
-
[
|
|
423
|
-
[
|
|
424
|
-
[
|
|
425
|
-
[
|
|
426
|
-
[
|
|
427
|
-
[
|
|
428
|
-
[
|
|
414
|
+
[`${prefixcls}-focus`]: isFocus,
|
|
415
|
+
[`${prefixcls}-disabled`]: disabled,
|
|
416
|
+
[`${prefixcls}-single`]: !multiple,
|
|
417
|
+
[`${prefixcls}-multiple`]: multiple,
|
|
418
|
+
[`${prefixcls}-multiple-tagInput-empty`]: multiple && isEmptyTriggerSearch,
|
|
419
|
+
[`${prefixcls}-multiple-tagInput-notEmpty`]: multiple && isValueTriggerSearch,
|
|
420
|
+
[`${prefixcls}-filterable`]: filterable,
|
|
421
|
+
[`${prefixcls}-error`]: validateStatus === 'error',
|
|
422
|
+
[`${prefixcls}-warning`]: validateStatus === 'warning',
|
|
423
|
+
[`${prefixcls}-small`]: size === 'small',
|
|
424
|
+
[`${prefixcls}-large`]: size === 'large',
|
|
425
|
+
[`${prefixcls}-with-prefix`]: prefix || insetLabel,
|
|
426
|
+
[`${prefixcls}-with-suffix`]: suffix,
|
|
427
|
+
[`${prefixcls}-with-suffix`]: suffix
|
|
429
428
|
}, className);
|
|
430
429
|
const triggerRenderKeys = multiple ? normalizeKeyList([...checkedKeys], keyEntities, leafOnly, true) : selectedKeys;
|
|
431
430
|
const inner = useCustomTrigger ? /*#__PURE__*/React.createElement(Trigger, {
|
|
@@ -443,7 +442,7 @@ class TreeSelect extends BaseComponent {
|
|
|
443
442
|
}, prefix || insetLabel ? this.renderPrefix() : null), /*#__PURE__*/React.createElement(Fragment, {
|
|
444
443
|
key: 'selection'
|
|
445
444
|
}, /*#__PURE__*/React.createElement("div", {
|
|
446
|
-
className:
|
|
445
|
+
className: `${prefixcls}-selection`
|
|
447
446
|
}, this.renderSelectContent())), /*#__PURE__*/React.createElement(Fragment, {
|
|
448
447
|
key: 'suffix'
|
|
449
448
|
}, suffix ? this.renderSuffix() : null), /*#__PURE__*/React.createElement(Fragment, {
|
|
@@ -494,8 +493,8 @@ class TreeSelect extends BaseComponent {
|
|
|
494
493
|
const keyList = normalizeKeyList([key], keyEntities, leafOnly, true);
|
|
495
494
|
const nodes = keyList.map(i => keyEntities[key] && keyEntities[key].data.key === key ? keyEntities[key].data : this.getDataForKeyNotInKeyEntities(key));
|
|
496
495
|
const value = getValueOrKey(nodes);
|
|
497
|
-
const tagCls = cls(
|
|
498
|
-
[
|
|
496
|
+
const tagCls = cls(`${prefixcls}-selection-tag`, {
|
|
497
|
+
[`${prefixcls}-selection-tag-disabled`]: disabled
|
|
499
498
|
});
|
|
500
499
|
const nodeHaveData = !_isEmpty(nodes) && !_isEmpty(nodes[0]);
|
|
501
500
|
const isDisableStrictlyNode = disableStrictly && nodeHaveData && disabledKeys.has(nodes[0].key);
|
|
@@ -509,7 +508,7 @@ class TreeSelect extends BaseComponent {
|
|
|
509
508
|
|
|
510
509
|
const tagProps = {
|
|
511
510
|
size: size === 'small' ? 'small' : 'large',
|
|
512
|
-
key:
|
|
511
|
+
key: `tag-${value}-${idx}`,
|
|
513
512
|
color: 'white',
|
|
514
513
|
className: tagCls,
|
|
515
514
|
closable,
|
|
@@ -552,7 +551,8 @@ class TreeSelect extends BaseComponent {
|
|
|
552
551
|
showRestTagsPopover,
|
|
553
552
|
restTagsPopoverProps,
|
|
554
553
|
searchPosition,
|
|
555
|
-
filterTreeNode
|
|
554
|
+
filterTreeNode,
|
|
555
|
+
preventScroll
|
|
556
556
|
} = this.props;
|
|
557
557
|
const {
|
|
558
558
|
keyEntities,
|
|
@@ -591,7 +591,8 @@ class TreeSelect extends BaseComponent {
|
|
|
591
591
|
autoFocus: autoFocus,
|
|
592
592
|
renderTagItem: (itemKey, index) => this.renderTagItem(itemKey, index),
|
|
593
593
|
onRemove: itemKey => this.removeTag(itemKey),
|
|
594
|
-
expandRestTagsOnClick: false
|
|
594
|
+
expandRestTagsOnClick: false,
|
|
595
|
+
preventScroll: preventScroll
|
|
595
596
|
});
|
|
596
597
|
}; // render Tree
|
|
597
598
|
|
|
@@ -608,8 +609,8 @@ class TreeSelect extends BaseComponent {
|
|
|
608
609
|
} = this.props;
|
|
609
610
|
const isDropdownPositionSearch = searchPosition === strings.SEARCH_POSITION_DROPDOWN;
|
|
610
611
|
const inputcls = cls({
|
|
611
|
-
[
|
|
612
|
-
[
|
|
612
|
+
[`${prefixTree}-input`]: isDropdownPositionSearch,
|
|
613
|
+
[`${prefixcls}-inputTrigger`]: !isDropdownPositionSearch
|
|
613
614
|
});
|
|
614
615
|
const {
|
|
615
616
|
inputValue
|
|
@@ -631,8 +632,8 @@ class TreeSelect extends BaseComponent {
|
|
|
631
632
|
};
|
|
632
633
|
const realInputProps = isDropdownPositionSearch ? inputDropdownProps : inputTriggerProps;
|
|
633
634
|
const wrapperCls = cls({
|
|
634
|
-
[
|
|
635
|
-
[
|
|
635
|
+
[`${prefixTree}-search-wrapper`]: isDropdownPositionSearch,
|
|
636
|
+
[`${prefixcls}-triggerSingleSearch-wrapper`]: !isDropdownPositionSearch && !multiple
|
|
636
637
|
});
|
|
637
638
|
const useCusSearch = typeof searchRender === 'function' || typeof searchRender === 'boolean';
|
|
638
639
|
|
|
@@ -825,7 +826,7 @@ class TreeSelect extends BaseComponent {
|
|
|
825
826
|
// @ts-ignore avoid strict check of itemKey
|
|
826
827
|
itemKey: this.itemKey,
|
|
827
828
|
itemData: flattenNodes,
|
|
828
|
-
className:
|
|
829
|
+
className: `${prefixTree}-virtual-list`,
|
|
829
830
|
style: {
|
|
830
831
|
direction
|
|
831
832
|
}
|
|
@@ -862,9 +863,9 @@ class TreeSelect extends BaseComponent {
|
|
|
862
863
|
renderFullLabel,
|
|
863
864
|
checkRelation
|
|
864
865
|
} = this.props;
|
|
865
|
-
const wrapperCls = cls(
|
|
866
|
-
const listCls = cls(
|
|
867
|
-
[
|
|
866
|
+
const wrapperCls = cls(`${prefixTree}-wrapper`);
|
|
867
|
+
const listCls = cls(`${prefixTree}-option-list`, {
|
|
868
|
+
[`${prefixTree}-option-list-block`]: true
|
|
868
869
|
});
|
|
869
870
|
const searchNoRes = Boolean(inputValue) && !filteredKeys.size;
|
|
870
871
|
const noData = _isEmpty(flattenNodes) || showFilteredOnly && searchNoRes;
|
|
@@ -909,7 +910,8 @@ class TreeSelect extends BaseComponent {
|
|
|
909
910
|
this.state = {
|
|
910
911
|
inputTriggerFocus: false,
|
|
911
912
|
isOpen: false,
|
|
912
|
-
|
|
913
|
+
isFocus: false,
|
|
914
|
+
// isInput: false,
|
|
913
915
|
rePosKey: key,
|
|
914
916
|
dropdownMinWidth: null,
|
|
915
917
|
inputValue: '',
|
|
@@ -1207,7 +1209,12 @@ class TreeSelect extends BaseComponent {
|
|
|
1207
1209
|
updateInputFocus: bool => {
|
|
1208
1210
|
if (bool) {
|
|
1209
1211
|
if (this.inputRef && this.inputRef.current) {
|
|
1210
|
-
|
|
1212
|
+
const {
|
|
1213
|
+
preventScroll
|
|
1214
|
+
} = this.props;
|
|
1215
|
+
this.inputRef.current.focus({
|
|
1216
|
+
preventScroll
|
|
1217
|
+
});
|
|
1211
1218
|
}
|
|
1212
1219
|
|
|
1213
1220
|
if (this.tagInputRef && this.tagInputRef.current) {
|
|
@@ -1222,8 +1229,12 @@ class TreeSelect extends BaseComponent {
|
|
|
1222
1229
|
this.tagInputRef.current.blur();
|
|
1223
1230
|
}
|
|
1224
1231
|
}
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1232
|
+
},
|
|
1233
|
+
updateIsFocus: bool => {
|
|
1234
|
+
this.setState({
|
|
1235
|
+
isFocus: bool
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1227
1238
|
});
|
|
1228
1239
|
}
|
|
1229
1240
|
|
|
@@ -1360,7 +1371,8 @@ TreeSelect.propTypes = {
|
|
|
1360
1371
|
checkRelation: PropTypes.string,
|
|
1361
1372
|
'aria-label': PropTypes.string,
|
|
1362
1373
|
showRestTagsPopover: PropTypes.bool,
|
|
1363
|
-
restTagsPopoverProps: PropTypes.object
|
|
1374
|
+
restTagsPopoverProps: PropTypes.object,
|
|
1375
|
+
preventScroll: PropTypes.bool
|
|
1364
1376
|
};
|
|
1365
1377
|
TreeSelect.defaultProps = {
|
|
1366
1378
|
searchPosition: strings.SEARCH_POSITION_DROPDOWN,
|
|
@@ -233,7 +233,7 @@ export default class Base extends Component {
|
|
|
233
233
|
React.createElement("a", {
|
|
234
234
|
role: "button",
|
|
235
235
|
tabIndex: 0,
|
|
236
|
-
className:
|
|
236
|
+
className: `${prefixCls}-ellipsis-expand`,
|
|
237
237
|
key: "expand",
|
|
238
238
|
ref: this.expandRef,
|
|
239
239
|
"aria-label": text,
|
|
@@ -309,10 +309,10 @@ export default class Base extends Component {
|
|
|
309
309
|
} = this.state;
|
|
310
310
|
const useCSS = !expanded && this.canUseCSSEllipsis();
|
|
311
311
|
const ellipsisCls = cls({
|
|
312
|
-
[
|
|
313
|
-
[
|
|
314
|
-
[
|
|
315
|
-
[
|
|
312
|
+
[`${prefixCls}-ellipsis`]: true,
|
|
313
|
+
[`${prefixCls}-ellipsis-single-line`]: rows === 1,
|
|
314
|
+
[`${prefixCls}-ellipsis-multiple-line`]: rows > 1,
|
|
315
|
+
[`${prefixCls}-ellipsis-overflow-ellipsis`]: rows === 1 && useCSS
|
|
316
316
|
});
|
|
317
317
|
const ellipsisStyle = useCSS && rows > 1 ? {
|
|
318
318
|
WebkitLineClamp: rows
|
|
@@ -523,7 +523,7 @@ export default class Base extends Component {
|
|
|
523
523
|
|
|
524
524
|
const iconSize = size === 'small' ? 'small' : 'default';
|
|
525
525
|
return /*#__PURE__*/React.createElement("span", {
|
|
526
|
-
className:
|
|
526
|
+
className: `${prefixCls}-icon`,
|
|
527
527
|
"x-semi-prop": "icon"
|
|
528
528
|
}, isSemiIcon(icon) ? /*#__PURE__*/React.cloneElement(icon, {
|
|
529
529
|
size: iconSize
|
|
@@ -559,8 +559,8 @@ export default class Base extends Component {
|
|
|
559
559
|
} = this.getEllipsisStyle();
|
|
560
560
|
let textNode = ellipsis ? this.renderEllipsisText(ellipsisOpt) : children;
|
|
561
561
|
const linkCls = cls({
|
|
562
|
-
[
|
|
563
|
-
[
|
|
562
|
+
[`${prefixCls}-link-text`]: link,
|
|
563
|
+
[`${prefixCls}-link-underline`]: this.props.underline && link
|
|
564
564
|
});
|
|
565
565
|
textNode = wrapperDecorations(this.props, /*#__PURE__*/React.createElement(React.Fragment, null, iconNode, this.props.link ? /*#__PURE__*/React.createElement("span", {
|
|
566
566
|
className: linkCls
|
|
@@ -568,12 +568,12 @@ export default class Base extends Component {
|
|
|
568
568
|
const hTagReg = /^h[1-6]$/;
|
|
569
569
|
const wrapperCls = cls(className, ellipsisCls, {
|
|
570
570
|
// [`${prefixCls}-primary`]: !type || type === 'primary',
|
|
571
|
-
[
|
|
572
|
-
[
|
|
573
|
-
[
|
|
574
|
-
[
|
|
575
|
-
[
|
|
576
|
-
[
|
|
571
|
+
[`${prefixCls}-${type}`]: type && !link,
|
|
572
|
+
[`${prefixCls}-${size}`]: size,
|
|
573
|
+
[`${prefixCls}-link`]: link,
|
|
574
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
575
|
+
[`${prefixCls}-${spacing}`]: spacing,
|
|
576
|
+
[`${prefixCls}-${heading}`]: _isString(heading) && hTagReg.test(heading)
|
|
577
577
|
});
|
|
578
578
|
return /*#__PURE__*/React.createElement(Typography, Object.assign({
|
|
579
579
|
className: wrapperCls,
|
|
@@ -83,8 +83,8 @@ export class Copyable extends React.PureComponent {
|
|
|
83
83
|
copied
|
|
84
84
|
} = this.state;
|
|
85
85
|
const finalCls = cls(className, {
|
|
86
|
-
[
|
|
87
|
-
[
|
|
86
|
+
[`${prefixCls}-action-copy`]: !copied,
|
|
87
|
+
[`${prefixCls}-action-copied`]: copied
|
|
88
88
|
});
|
|
89
89
|
return /*#__PURE__*/React.createElement(LocaleConsumer, {
|
|
90
90
|
componentName: "Typography"
|
|
@@ -97,7 +97,7 @@ export class Copyable extends React.PureComponent {
|
|
|
97
97
|
}, copied ? this.renderSuccessTip() : /*#__PURE__*/React.createElement(Tooltip, {
|
|
98
98
|
content: typeof copyTip !== 'undefined' ? copyTip : locale.copy
|
|
99
99
|
}, /*#__PURE__*/React.createElement("a", {
|
|
100
|
-
className:
|
|
100
|
+
className: `${prefixCls}-action-copy-icon`
|
|
101
101
|
}, /*#__PURE__*/React.createElement(IconCopy, {
|
|
102
102
|
role: "button",
|
|
103
103
|
tabIndex: 0,
|
|
@@ -28,7 +28,7 @@ export default class Numeral extends PureComponent<NumeralProps> {
|
|
|
28
28
|
static propTypes: {
|
|
29
29
|
rule: PropTypes.Requireable<"text" | "numbers" | "bytes-decimal" | "bytes-binary" | "percentages" | "exponential">;
|
|
30
30
|
precision: PropTypes.Requireable<number>;
|
|
31
|
-
truncate: PropTypes.Requireable<"
|
|
31
|
+
truncate: PropTypes.Requireable<"round" | "ceil" | "floor">;
|
|
32
32
|
parser: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
33
|
copyable: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
34
34
|
delete: PropTypes.Requireable<boolean>;
|
|
@@ -9,7 +9,7 @@ export default class Paragraph extends PureComponent {
|
|
|
9
9
|
const {
|
|
10
10
|
className
|
|
11
11
|
} = this.props;
|
|
12
|
-
const paragraphCls = cls(className,
|
|
12
|
+
const paragraphCls = cls(className, `${prefixCls}-paragraph`);
|
|
13
13
|
return /*#__PURE__*/React.createElement(Base, Object.assign({
|
|
14
14
|
component: 'p'
|
|
15
15
|
}, this.props, {
|
|
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
37
37
|
underline: PropTypes.Requireable<boolean>;
|
|
38
38
|
strong: PropTypes.Requireable<boolean>;
|
|
39
39
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
40
|
-
heading: PropTypes.Requireable<1 | 2 | 3 | 4 |
|
|
40
|
+
heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 6 | 5>;
|
|
41
41
|
style: PropTypes.Requireable<object>;
|
|
42
42
|
className: PropTypes.Requireable<string>;
|
|
43
43
|
component: PropTypes.Requireable<string>;
|
|
@@ -21,7 +21,7 @@ export default class Title extends PureComponent {
|
|
|
21
21
|
} = _a,
|
|
22
22
|
rest = __rest(_a, ["heading"]);
|
|
23
23
|
|
|
24
|
-
const component = strings.HEADING.indexOf(heading) !== -1 ?
|
|
24
|
+
const component = strings.HEADING.indexOf(heading) !== -1 ? `h${heading}` : 'h1'; // Passing headings to support custom components
|
|
25
25
|
|
|
26
26
|
return /*#__PURE__*/React.createElement(Base, Object.assign({
|
|
27
27
|
component: component,
|
|
@@ -23,7 +23,7 @@ function styleToString(style) {
|
|
|
23
23
|
// There are some different behavior between Firefox & Chrome.
|
|
24
24
|
// We have to handle this ourself.
|
|
25
25
|
const styleNames = Array.prototype.slice.apply(style);
|
|
26
|
-
return styleNames.map(name =>
|
|
26
|
+
return styleNames.map(name => `${name}: ${style.getPropertyValue(name)};`).join('');
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
const getRenderText = function (originEle, rows) {
|
|
@@ -103,13 +103,13 @@ class FileCard extends PureComponent {
|
|
|
103
103
|
case typeof validateMessage === 'string' && status === strings.FILE_STATUS_VALIDATING:
|
|
104
104
|
content = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Spin, {
|
|
105
105
|
size: "small",
|
|
106
|
-
wrapperClassName:
|
|
106
|
+
wrapperClassName: `${prefixCls}-file-card-icon-loading`
|
|
107
107
|
}), validateMessage);
|
|
108
108
|
break;
|
|
109
109
|
|
|
110
110
|
case typeof validateMessage === 'string':
|
|
111
111
|
content = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconAlertCircle, {
|
|
112
|
-
className:
|
|
112
|
+
className: `${prefixCls}-file-card-icon-error`
|
|
113
113
|
}), validateMessage);
|
|
114
114
|
break;
|
|
115
115
|
|
|
@@ -135,13 +135,13 @@ class FileCard extends PureComponent {
|
|
|
135
135
|
case validateMessage && status === strings.FILE_STATUS_VALIDATING:
|
|
136
136
|
icon = /*#__PURE__*/React.createElement(Spin, {
|
|
137
137
|
size: "small",
|
|
138
|
-
wrapperClassName:
|
|
138
|
+
wrapperClassName: `${prefixCls}-picture-file-card-icon-loading`
|
|
139
139
|
});
|
|
140
140
|
break;
|
|
141
141
|
|
|
142
142
|
case validateMessage && (status === strings.FILE_STATUS_VALID_FAIL || status === strings.FILE_STATUS_UPLOAD_FAIL):
|
|
143
143
|
icon = /*#__PURE__*/React.createElement("div", {
|
|
144
|
-
className:
|
|
144
|
+
className: `${prefixCls}-picture-file-card-icon-error`
|
|
145
145
|
}, /*#__PURE__*/React.createElement(ErrorSvg, null));
|
|
146
146
|
break;
|
|
147
147
|
|
|
@@ -176,19 +176,19 @@ class FileCard extends PureComponent {
|
|
|
176
176
|
const showReplace = status === strings.FILE_STATUS_SUCCESS && this.props.showReplace;
|
|
177
177
|
const showPreview = status === strings.FILE_STATUS_SUCCESS && !this.props.showReplace;
|
|
178
178
|
const filePicCardCls = cls({
|
|
179
|
-
[
|
|
180
|
-
[
|
|
181
|
-
[
|
|
182
|
-
[
|
|
183
|
-
[
|
|
179
|
+
[`${prefixCls}-picture-file-card`]: true,
|
|
180
|
+
[`${prefixCls}-picture-file-card-disabled`]: disabled,
|
|
181
|
+
[`${prefixCls}-picture-file-card-show-pointer`]: typeof onPreviewClick !== 'undefined',
|
|
182
|
+
[`${prefixCls}-picture-file-card-error`]: status === strings.FILE_STATUS_UPLOAD_FAIL,
|
|
183
|
+
[`${prefixCls}-picture-file-card-uploading`]: showProgress
|
|
184
184
|
});
|
|
185
185
|
const retry = /*#__PURE__*/React.createElement("div", {
|
|
186
186
|
role: "button",
|
|
187
187
|
tabIndex: 0,
|
|
188
|
-
className:
|
|
188
|
+
className: `${prefixCls}-picture-file-card-retry`,
|
|
189
189
|
onClick: e => this.onRetry(e)
|
|
190
190
|
}, /*#__PURE__*/React.createElement(IconRefresh, {
|
|
191
|
-
className:
|
|
191
|
+
className: `${prefixCls}-picture-file-card-icon-retry`
|
|
192
192
|
}));
|
|
193
193
|
const replace = /*#__PURE__*/React.createElement(Tooltip, {
|
|
194
194
|
trigger: "hover",
|
|
@@ -199,24 +199,24 @@ class FileCard extends PureComponent {
|
|
|
199
199
|
}, /*#__PURE__*/React.createElement("div", {
|
|
200
200
|
role: "button",
|
|
201
201
|
tabIndex: 0,
|
|
202
|
-
className:
|
|
202
|
+
className: `${prefixCls}-picture-file-card-replace`,
|
|
203
203
|
onClick: e => this.onReplace(e)
|
|
204
204
|
}, /*#__PURE__*/React.createElement(ReplaceSvg, {
|
|
205
|
-
className:
|
|
205
|
+
className: `${prefixCls}-picture-file-card-icon-replace`
|
|
206
206
|
})));
|
|
207
207
|
const preview = /*#__PURE__*/React.createElement("div", {
|
|
208
|
-
className:
|
|
208
|
+
className: `${prefixCls}-picture-file-card-preview`
|
|
209
209
|
}, typeof renderPicPreviewIcon === 'function' ? renderPicPreviewIcon(this.props) : null);
|
|
210
210
|
const close = /*#__PURE__*/React.createElement("div", {
|
|
211
211
|
role: "button",
|
|
212
212
|
tabIndex: 0,
|
|
213
|
-
className:
|
|
213
|
+
className: `${prefixCls}-picture-file-card-close`,
|
|
214
214
|
onClick: e => this.onRemove(e)
|
|
215
215
|
}, /*#__PURE__*/React.createElement(IconClear, {
|
|
216
|
-
className:
|
|
216
|
+
className: `${prefixCls}-picture-file-card-icon-close`
|
|
217
217
|
}));
|
|
218
218
|
const picInfo = typeof renderPicInfo === 'function' ? renderPicInfo(this.props) : /*#__PURE__*/React.createElement("div", {
|
|
219
|
-
className:
|
|
219
|
+
className: `${prefixCls}-picture-file-card-pic-info`
|
|
220
220
|
}, index + 1);
|
|
221
221
|
const thumbnail = typeof renderThumbnail === 'function' ? renderThumbnail(this.props) : /*#__PURE__*/React.createElement("img", {
|
|
222
222
|
src: url,
|
|
@@ -252,17 +252,17 @@ class FileCard extends PureComponent {
|
|
|
252
252
|
renderFileOperation
|
|
253
253
|
} = this.props;
|
|
254
254
|
const fileCardCls = cls({
|
|
255
|
-
[
|
|
256
|
-
[
|
|
257
|
-
[
|
|
255
|
+
[`${prefixCls}-file-card`]: true,
|
|
256
|
+
[`${prefixCls}-file-card-fail`]: status === strings.FILE_STATUS_VALID_FAIL || status === strings.FILE_STATUS_UPLOAD_FAIL,
|
|
257
|
+
[`${prefixCls}-file-card-show-pointer`]: typeof onPreviewClick !== 'undefined'
|
|
258
258
|
});
|
|
259
259
|
const previewCls = cls({
|
|
260
|
-
[
|
|
261
|
-
[
|
|
260
|
+
[`${prefixCls}-file-card-preview`]: true,
|
|
261
|
+
[`${prefixCls}-file-card-preview-placeholder`]: !preview || previewFile
|
|
262
262
|
});
|
|
263
|
-
const infoCls =
|
|
264
|
-
const closeCls =
|
|
265
|
-
const replaceCls =
|
|
263
|
+
const infoCls = `${prefixCls}-file-card-info`;
|
|
264
|
+
const closeCls = `${prefixCls}-file-card-close`;
|
|
265
|
+
const replaceCls = `${prefixCls}-file-card-replace`;
|
|
266
266
|
const showProgress = !(percent === 100 || typeof percent === 'undefined') && status === strings.FILE_STATUS_UPLOADING; // only show retry when upload fail & showRetry is true, no need to show during validate fail
|
|
267
267
|
|
|
268
268
|
const showRetry = status === strings.FILE_STATUS_UPLOAD_FAIL && propsShowRetry;
|
|
@@ -295,13 +295,13 @@ class FileCard extends PureComponent {
|
|
|
295
295
|
}, /*#__PURE__*/React.createElement("div", {
|
|
296
296
|
className: previewCls
|
|
297
297
|
}, previewContent), /*#__PURE__*/React.createElement("div", {
|
|
298
|
-
className:
|
|
298
|
+
className: `${infoCls}-main`
|
|
299
299
|
}, /*#__PURE__*/React.createElement("div", {
|
|
300
|
-
className:
|
|
300
|
+
className: `${infoCls}-main-text`
|
|
301
301
|
}, /*#__PURE__*/React.createElement("span", {
|
|
302
|
-
className:
|
|
302
|
+
className: `${infoCls}-name`
|
|
303
303
|
}, name), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", {
|
|
304
|
-
className:
|
|
304
|
+
className: `${infoCls}-size`
|
|
305
305
|
}, fileSize), showReplace && /*#__PURE__*/React.createElement(Tooltip, {
|
|
306
306
|
trigger: "hover",
|
|
307
307
|
position: "top",
|
|
@@ -321,13 +321,13 @@ class FileCard extends PureComponent {
|
|
|
321
321
|
},
|
|
322
322
|
"aria-label": "uploading file progress"
|
|
323
323
|
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
324
|
-
className:
|
|
324
|
+
className: `${infoCls}-main-control`
|
|
325
325
|
}, /*#__PURE__*/React.createElement("span", {
|
|
326
|
-
className:
|
|
326
|
+
className: `${infoCls}-validate-message`
|
|
327
327
|
}, this.renderValidateMessage()), showRetry ? /*#__PURE__*/React.createElement("span", {
|
|
328
328
|
role: "button",
|
|
329
329
|
tabIndex: 0,
|
|
330
|
-
className:
|
|
330
|
+
className: `${infoCls}-retry`,
|
|
331
331
|
onClick: e => this.onRetry(e)
|
|
332
332
|
}, locale.retry) : null)), operation);
|
|
333
333
|
}
|