@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
|
@@ -96,9 +96,9 @@ class TreeSelect extends _baseComponent.default {
|
|
|
96
96
|
suffix
|
|
97
97
|
} = this.props;
|
|
98
98
|
const suffixWrapperCls = (0, _classnames.default)({
|
|
99
|
-
[
|
|
100
|
-
[
|
|
101
|
-
[
|
|
99
|
+
[`${prefixcls}-suffix`]: true,
|
|
100
|
+
[`${prefixcls}-suffix-text`]: suffix && (0, _isString2.default)(suffix),
|
|
101
|
+
[`${prefixcls}-suffix-icon`]: (0, _utils.isSemiIcon)(suffix)
|
|
102
102
|
});
|
|
103
103
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
104
104
|
className: suffixWrapperCls,
|
|
@@ -114,11 +114,11 @@ class TreeSelect extends _baseComponent.default {
|
|
|
114
114
|
} = this.props;
|
|
115
115
|
const labelNode = prefix || insetLabel;
|
|
116
116
|
const prefixWrapperCls = (0, _classnames.default)({
|
|
117
|
-
[
|
|
117
|
+
[`${prefixcls}-prefix`]: true,
|
|
118
118
|
// to be doublechecked
|
|
119
|
-
[
|
|
120
|
-
[
|
|
121
|
-
[
|
|
119
|
+
[`${prefixcls}-inset-label`]: insetLabel,
|
|
120
|
+
[`${prefixcls}-prefix-text`]: labelNode && (0, _isString2.default)(labelNode),
|
|
121
|
+
[`${prefixcls}-prefix-icon`]: (0, _utils.isSemiIcon)(labelNode)
|
|
122
122
|
});
|
|
123
123
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
124
124
|
className: prefixWrapperCls,
|
|
@@ -138,7 +138,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
138
138
|
const style = Object.assign({
|
|
139
139
|
minWidth: dropdownMinWidth
|
|
140
140
|
}, dropdownStyle);
|
|
141
|
-
const popoverCls = (0, _classnames.default)(dropdownClassName,
|
|
141
|
+
const popoverCls = (0, _classnames.default)(dropdownClassName, `${prefixcls}-popover`);
|
|
142
142
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
143
143
|
className: popoverCls,
|
|
144
144
|
style: style
|
|
@@ -263,7 +263,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
263
263
|
color: 'white',
|
|
264
264
|
visible: true,
|
|
265
265
|
onClose,
|
|
266
|
-
key:
|
|
266
|
+
key: `tag-${key}-${index}`,
|
|
267
267
|
size: size === 'small' ? 'small' : 'large'
|
|
268
268
|
};
|
|
269
269
|
|
|
@@ -290,9 +290,9 @@ class TreeSelect extends _baseComponent.default {
|
|
|
290
290
|
inputTriggerFocus
|
|
291
291
|
} = this.state;
|
|
292
292
|
const renderText = this.foundation.getRenderTextInSingle();
|
|
293
|
-
const spanCls = (0, _classnames.default)(
|
|
294
|
-
[
|
|
295
|
-
[
|
|
293
|
+
const spanCls = (0, _classnames.default)(`${prefixcls}-selection-TriggerSearchItem`, {
|
|
294
|
+
[`${prefixcls}-selection-TriggerSearchItem-placeholder`]: (inputTriggerFocus || !renderText) && !disabled,
|
|
295
|
+
[`${prefixcls}-selection-TriggerSearchItem-disabled`]: disabled
|
|
296
296
|
});
|
|
297
297
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
298
298
|
className: spanCls
|
|
@@ -330,7 +330,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
330
330
|
if (!multiple || !this.hasValue()) {
|
|
331
331
|
const renderText = this.foundation.getRenderTextInSingle();
|
|
332
332
|
const spanCls = (0, _classnames.default)({
|
|
333
|
-
[
|
|
333
|
+
[`${prefixcls}-selection-placeholder`]: !renderText
|
|
334
334
|
});
|
|
335
335
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
336
336
|
className: spanCls
|
|
@@ -397,7 +397,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
return arrowIcon ? /*#__PURE__*/_react.default.createElement("div", {
|
|
400
|
-
className: (0, _classnames.default)(
|
|
400
|
+
className: (0, _classnames.default)(`${prefixcls}-arrow`),
|
|
401
401
|
"x-semi-prop": "arrowIcon"
|
|
402
402
|
}, arrowIcon) : null;
|
|
403
403
|
};
|
|
@@ -407,7 +407,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
407
407
|
const {
|
|
408
408
|
clearIcon
|
|
409
409
|
} = this.props;
|
|
410
|
-
const clearCls = (0, _classnames.default)(
|
|
410
|
+
const clearCls = (0, _classnames.default)(`${prefixcls}-clearbtn`);
|
|
411
411
|
|
|
412
412
|
if (showClearBtn) {
|
|
413
413
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -442,12 +442,11 @@ class TreeSelect extends _baseComponent.default {
|
|
|
442
442
|
triggerRender
|
|
443
443
|
} = this.props;
|
|
444
444
|
const {
|
|
445
|
-
isOpen,
|
|
446
|
-
isInput,
|
|
447
445
|
inputValue,
|
|
448
446
|
selectedKeys,
|
|
449
447
|
checkedKeys,
|
|
450
|
-
keyEntities
|
|
448
|
+
keyEntities,
|
|
449
|
+
isFocus
|
|
451
450
|
} = this.state;
|
|
452
451
|
const filterable = Boolean(filterTreeNode);
|
|
453
452
|
const useCustomTrigger = typeof triggerRender === 'function';
|
|
@@ -459,20 +458,20 @@ class TreeSelect extends _baseComponent.default {
|
|
|
459
458
|
const isEmptyTriggerSearch = isTriggerPositionSearch && (0, _isEmpty2.default)(checkedKeys);
|
|
460
459
|
const isValueTriggerSearch = isTriggerPositionSearch && !(0, _isEmpty2.default)(checkedKeys);
|
|
461
460
|
const classNames = useCustomTrigger ? (0, _classnames.default)(className) : (0, _classnames.default)(prefixcls, {
|
|
462
|
-
[
|
|
463
|
-
[
|
|
464
|
-
[
|
|
465
|
-
[
|
|
466
|
-
[
|
|
467
|
-
[
|
|
468
|
-
[
|
|
469
|
-
[
|
|
470
|
-
[
|
|
471
|
-
[
|
|
472
|
-
[
|
|
473
|
-
[
|
|
474
|
-
[
|
|
475
|
-
[
|
|
461
|
+
[`${prefixcls}-focus`]: isFocus,
|
|
462
|
+
[`${prefixcls}-disabled`]: disabled,
|
|
463
|
+
[`${prefixcls}-single`]: !multiple,
|
|
464
|
+
[`${prefixcls}-multiple`]: multiple,
|
|
465
|
+
[`${prefixcls}-multiple-tagInput-empty`]: multiple && isEmptyTriggerSearch,
|
|
466
|
+
[`${prefixcls}-multiple-tagInput-notEmpty`]: multiple && isValueTriggerSearch,
|
|
467
|
+
[`${prefixcls}-filterable`]: filterable,
|
|
468
|
+
[`${prefixcls}-error`]: validateStatus === 'error',
|
|
469
|
+
[`${prefixcls}-warning`]: validateStatus === 'warning',
|
|
470
|
+
[`${prefixcls}-small`]: size === 'small',
|
|
471
|
+
[`${prefixcls}-large`]: size === 'large',
|
|
472
|
+
[`${prefixcls}-with-prefix`]: prefix || insetLabel,
|
|
473
|
+
[`${prefixcls}-with-suffix`]: suffix,
|
|
474
|
+
[`${prefixcls}-with-suffix`]: suffix
|
|
476
475
|
}, className);
|
|
477
476
|
const triggerRenderKeys = multiple ? (0, _treeUtil.normalizeKeyList)([...checkedKeys], keyEntities, leafOnly, true) : selectedKeys;
|
|
478
477
|
const inner = useCustomTrigger ? /*#__PURE__*/_react.default.createElement(_trigger.default, {
|
|
@@ -490,7 +489,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
490
489
|
}, prefix || insetLabel ? this.renderPrefix() : null), /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
491
490
|
key: 'selection'
|
|
492
491
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
493
|
-
className:
|
|
492
|
+
className: `${prefixcls}-selection`
|
|
494
493
|
}, this.renderSelectContent())), /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
495
494
|
key: 'suffix'
|
|
496
495
|
}, suffix ? this.renderSuffix() : null), /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
@@ -541,8 +540,8 @@ class TreeSelect extends _baseComponent.default {
|
|
|
541
540
|
const keyList = (0, _treeUtil.normalizeKeyList)([key], keyEntities, leafOnly, true);
|
|
542
541
|
const nodes = keyList.map(i => keyEntities[key] && keyEntities[key].data.key === key ? keyEntities[key].data : this.getDataForKeyNotInKeyEntities(key));
|
|
543
542
|
const value = (0, _treeUtil.getValueOrKey)(nodes);
|
|
544
|
-
const tagCls = (0, _classnames.default)(
|
|
545
|
-
[
|
|
543
|
+
const tagCls = (0, _classnames.default)(`${prefixcls}-selection-tag`, {
|
|
544
|
+
[`${prefixcls}-selection-tag-disabled`]: disabled
|
|
546
545
|
});
|
|
547
546
|
const nodeHaveData = !(0, _isEmpty2.default)(nodes) && !(0, _isEmpty2.default)(nodes[0]);
|
|
548
547
|
const isDisableStrictlyNode = disableStrictly && nodeHaveData && disabledKeys.has(nodes[0].key);
|
|
@@ -556,7 +555,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
556
555
|
|
|
557
556
|
const tagProps = {
|
|
558
557
|
size: size === 'small' ? 'small' : 'large',
|
|
559
|
-
key:
|
|
558
|
+
key: `tag-${value}-${idx}`,
|
|
560
559
|
color: 'white',
|
|
561
560
|
className: tagCls,
|
|
562
561
|
closable,
|
|
@@ -599,7 +598,8 @@ class TreeSelect extends _baseComponent.default {
|
|
|
599
598
|
showRestTagsPopover,
|
|
600
599
|
restTagsPopoverProps,
|
|
601
600
|
searchPosition,
|
|
602
|
-
filterTreeNode
|
|
601
|
+
filterTreeNode,
|
|
602
|
+
preventScroll
|
|
603
603
|
} = this.props;
|
|
604
604
|
const {
|
|
605
605
|
keyEntities,
|
|
@@ -638,7 +638,8 @@ class TreeSelect extends _baseComponent.default {
|
|
|
638
638
|
autoFocus: autoFocus,
|
|
639
639
|
renderTagItem: (itemKey, index) => this.renderTagItem(itemKey, index),
|
|
640
640
|
onRemove: itemKey => this.removeTag(itemKey),
|
|
641
|
-
expandRestTagsOnClick: false
|
|
641
|
+
expandRestTagsOnClick: false,
|
|
642
|
+
preventScroll: preventScroll
|
|
642
643
|
});
|
|
643
644
|
}; // render Tree
|
|
644
645
|
|
|
@@ -655,8 +656,8 @@ class TreeSelect extends _baseComponent.default {
|
|
|
655
656
|
} = this.props;
|
|
656
657
|
const isDropdownPositionSearch = searchPosition === _constants.strings.SEARCH_POSITION_DROPDOWN;
|
|
657
658
|
const inputcls = (0, _classnames.default)({
|
|
658
|
-
[
|
|
659
|
-
[
|
|
659
|
+
[`${prefixTree}-input`]: isDropdownPositionSearch,
|
|
660
|
+
[`${prefixcls}-inputTrigger`]: !isDropdownPositionSearch
|
|
660
661
|
});
|
|
661
662
|
const {
|
|
662
663
|
inputValue
|
|
@@ -678,8 +679,8 @@ class TreeSelect extends _baseComponent.default {
|
|
|
678
679
|
};
|
|
679
680
|
const realInputProps = isDropdownPositionSearch ? inputDropdownProps : inputTriggerProps;
|
|
680
681
|
const wrapperCls = (0, _classnames.default)({
|
|
681
|
-
[
|
|
682
|
-
[
|
|
682
|
+
[`${prefixTree}-search-wrapper`]: isDropdownPositionSearch,
|
|
683
|
+
[`${prefixcls}-triggerSingleSearch-wrapper`]: !isDropdownPositionSearch && !multiple
|
|
683
684
|
});
|
|
684
685
|
const useCusSearch = typeof searchRender === 'function' || typeof searchRender === 'boolean';
|
|
685
686
|
|
|
@@ -872,7 +873,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
872
873
|
// @ts-ignore avoid strict check of itemKey
|
|
873
874
|
itemKey: this.itemKey,
|
|
874
875
|
itemData: flattenNodes,
|
|
875
|
-
className:
|
|
876
|
+
className: `${prefixTree}-virtual-list`,
|
|
876
877
|
style: {
|
|
877
878
|
direction
|
|
878
879
|
}
|
|
@@ -909,9 +910,9 @@ class TreeSelect extends _baseComponent.default {
|
|
|
909
910
|
renderFullLabel,
|
|
910
911
|
checkRelation
|
|
911
912
|
} = this.props;
|
|
912
|
-
const wrapperCls = (0, _classnames.default)(
|
|
913
|
-
const listCls = (0, _classnames.default)(
|
|
914
|
-
[
|
|
913
|
+
const wrapperCls = (0, _classnames.default)(`${prefixTree}-wrapper`);
|
|
914
|
+
const listCls = (0, _classnames.default)(`${prefixTree}-option-list`, {
|
|
915
|
+
[`${prefixTree}-option-list-block`]: true
|
|
915
916
|
});
|
|
916
917
|
const searchNoRes = Boolean(inputValue) && !filteredKeys.size;
|
|
917
918
|
const noData = (0, _isEmpty2.default)(flattenNodes) || showFilteredOnly && searchNoRes;
|
|
@@ -956,7 +957,8 @@ class TreeSelect extends _baseComponent.default {
|
|
|
956
957
|
this.state = {
|
|
957
958
|
inputTriggerFocus: false,
|
|
958
959
|
isOpen: false,
|
|
959
|
-
|
|
960
|
+
isFocus: false,
|
|
961
|
+
// isInput: false,
|
|
960
962
|
rePosKey: key,
|
|
961
963
|
dropdownMinWidth: null,
|
|
962
964
|
inputValue: '',
|
|
@@ -1255,7 +1257,12 @@ class TreeSelect extends _baseComponent.default {
|
|
|
1255
1257
|
updateInputFocus: bool => {
|
|
1256
1258
|
if (bool) {
|
|
1257
1259
|
if (this.inputRef && this.inputRef.current) {
|
|
1258
|
-
|
|
1260
|
+
const {
|
|
1261
|
+
preventScroll
|
|
1262
|
+
} = this.props;
|
|
1263
|
+
this.inputRef.current.focus({
|
|
1264
|
+
preventScroll
|
|
1265
|
+
});
|
|
1259
1266
|
}
|
|
1260
1267
|
|
|
1261
1268
|
if (this.tagInputRef && this.tagInputRef.current) {
|
|
@@ -1270,8 +1277,12 @@ class TreeSelect extends _baseComponent.default {
|
|
|
1270
1277
|
this.tagInputRef.current.blur();
|
|
1271
1278
|
}
|
|
1272
1279
|
}
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1280
|
+
},
|
|
1281
|
+
updateIsFocus: bool => {
|
|
1282
|
+
this.setState({
|
|
1283
|
+
isFocus: bool
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1275
1286
|
});
|
|
1276
1287
|
}
|
|
1277
1288
|
|
|
@@ -1408,7 +1419,8 @@ TreeSelect.propTypes = {
|
|
|
1408
1419
|
checkRelation: _propTypes.default.string,
|
|
1409
1420
|
'aria-label': _propTypes.default.string,
|
|
1410
1421
|
showRestTagsPopover: _propTypes.default.bool,
|
|
1411
|
-
restTagsPopoverProps: _propTypes.default.object
|
|
1422
|
+
restTagsPopoverProps: _propTypes.default.object,
|
|
1423
|
+
preventScroll: _propTypes.default.bool
|
|
1412
1424
|
};
|
|
1413
1425
|
TreeSelect.defaultProps = {
|
|
1414
1426
|
searchPosition: _constants.strings.SEARCH_POSITION_DROPDOWN,
|
|
@@ -258,7 +258,7 @@ class Base extends _react.Component {
|
|
|
258
258
|
_react.default.createElement("a", {
|
|
259
259
|
role: "button",
|
|
260
260
|
tabIndex: 0,
|
|
261
|
-
className:
|
|
261
|
+
className: `${prefixCls}-ellipsis-expand`,
|
|
262
262
|
key: "expand",
|
|
263
263
|
ref: this.expandRef,
|
|
264
264
|
"aria-label": text,
|
|
@@ -334,10 +334,10 @@ class Base extends _react.Component {
|
|
|
334
334
|
} = this.state;
|
|
335
335
|
const useCSS = !expanded && this.canUseCSSEllipsis();
|
|
336
336
|
const ellipsisCls = (0, _classnames.default)({
|
|
337
|
-
[
|
|
338
|
-
[
|
|
339
|
-
[
|
|
340
|
-
[
|
|
337
|
+
[`${prefixCls}-ellipsis`]: true,
|
|
338
|
+
[`${prefixCls}-ellipsis-single-line`]: rows === 1,
|
|
339
|
+
[`${prefixCls}-ellipsis-multiple-line`]: rows > 1,
|
|
340
|
+
[`${prefixCls}-ellipsis-overflow-ellipsis`]: rows === 1 && useCSS
|
|
341
341
|
});
|
|
342
342
|
const ellipsisStyle = useCSS && rows > 1 ? {
|
|
343
343
|
WebkitLineClamp: rows
|
|
@@ -548,7 +548,7 @@ class Base extends _react.Component {
|
|
|
548
548
|
|
|
549
549
|
const iconSize = size === 'small' ? 'small' : 'default';
|
|
550
550
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
551
|
-
className:
|
|
551
|
+
className: `${prefixCls}-icon`,
|
|
552
552
|
"x-semi-prop": "icon"
|
|
553
553
|
}, (0, _utils.isSemiIcon)(icon) ? /*#__PURE__*/_react.default.cloneElement(icon, {
|
|
554
554
|
size: iconSize
|
|
@@ -583,8 +583,8 @@ class Base extends _react.Component {
|
|
|
583
583
|
} = this.getEllipsisStyle();
|
|
584
584
|
let textNode = ellipsis ? this.renderEllipsisText(ellipsisOpt) : children;
|
|
585
585
|
const linkCls = (0, _classnames.default)({
|
|
586
|
-
[
|
|
587
|
-
[
|
|
586
|
+
[`${prefixCls}-link-text`]: link,
|
|
587
|
+
[`${prefixCls}-link-underline`]: this.props.underline && link
|
|
588
588
|
});
|
|
589
589
|
textNode = wrapperDecorations(this.props, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, iconNode, this.props.link ? /*#__PURE__*/_react.default.createElement("span", {
|
|
590
590
|
className: linkCls
|
|
@@ -592,12 +592,12 @@ class Base extends _react.Component {
|
|
|
592
592
|
const hTagReg = /^h[1-6]$/;
|
|
593
593
|
const wrapperCls = (0, _classnames.default)(className, ellipsisCls, {
|
|
594
594
|
// [`${prefixCls}-primary`]: !type || type === 'primary',
|
|
595
|
-
[
|
|
596
|
-
[
|
|
597
|
-
[
|
|
598
|
-
[
|
|
599
|
-
[
|
|
600
|
-
[
|
|
595
|
+
[`${prefixCls}-${type}`]: type && !link,
|
|
596
|
+
[`${prefixCls}-${size}`]: size,
|
|
597
|
+
[`${prefixCls}-link`]: link,
|
|
598
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
599
|
+
[`${prefixCls}-${spacing}`]: spacing,
|
|
600
|
+
[`${prefixCls}-${heading}`]: (0, _isString2.default)(heading) && hTagReg.test(heading)
|
|
601
601
|
});
|
|
602
602
|
return /*#__PURE__*/_react.default.createElement(_typography.default, Object.assign({
|
|
603
603
|
className: wrapperCls,
|
|
@@ -103,8 +103,8 @@ class Copyable extends _react.default.PureComponent {
|
|
|
103
103
|
copied
|
|
104
104
|
} = this.state;
|
|
105
105
|
const finalCls = (0, _classnames.default)(className, {
|
|
106
|
-
[
|
|
107
|
-
[
|
|
106
|
+
[`${prefixCls}-action-copy`]: !copied,
|
|
107
|
+
[`${prefixCls}-action-copied`]: copied
|
|
108
108
|
});
|
|
109
109
|
return /*#__PURE__*/_react.default.createElement(_localeConsumer.default, {
|
|
110
110
|
componentName: "Typography"
|
|
@@ -117,7 +117,7 @@ class Copyable extends _react.default.PureComponent {
|
|
|
117
117
|
}, copied ? this.renderSuccessTip() : /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
118
118
|
content: typeof copyTip !== 'undefined' ? copyTip : locale.copy
|
|
119
119
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
120
|
-
className:
|
|
120
|
+
className: `${prefixCls}-action-copy-icon`
|
|
121
121
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconCopy, {
|
|
122
122
|
role: "button",
|
|
123
123
|
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>;
|
|
@@ -28,7 +28,7 @@ class Paragraph extends _react.PureComponent {
|
|
|
28
28
|
const {
|
|
29
29
|
className
|
|
30
30
|
} = this.props;
|
|
31
|
-
const paragraphCls = (0, _classnames.default)(className,
|
|
31
|
+
const paragraphCls = (0, _classnames.default)(className, `${prefixCls}-paragraph`);
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement(_base.default, Object.assign({
|
|
33
33
|
component: 'p'
|
|
34
34
|
}, 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>;
|
|
@@ -38,7 +38,7 @@ class Title extends _react.PureComponent {
|
|
|
38
38
|
} = _a,
|
|
39
39
|
rest = __rest(_a, ["heading"]);
|
|
40
40
|
|
|
41
|
-
const component = _constants.strings.HEADING.indexOf(heading) !== -1 ?
|
|
41
|
+
const component = _constants.strings.HEADING.indexOf(heading) !== -1 ? `h${heading}` : 'h1'; // Passing headings to support custom components
|
|
42
42
|
|
|
43
43
|
return /*#__PURE__*/_react.default.createElement(_base.default, Object.assign({
|
|
44
44
|
component: component,
|
|
@@ -33,7 +33,7 @@ function styleToString(style) {
|
|
|
33
33
|
// There are some different behavior between Firefox & Chrome.
|
|
34
34
|
// We have to handle this ourself.
|
|
35
35
|
const styleNames = Array.prototype.slice.apply(style);
|
|
36
|
-
return styleNames.map(name =>
|
|
36
|
+
return styleNames.map(name => `${name}: ${style.getPropertyValue(name)};`).join('');
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const getRenderText = function (originEle, rows) {
|
|
@@ -128,13 +128,13 @@ class FileCard extends _react.PureComponent {
|
|
|
128
128
|
case typeof validateMessage === 'string' && status === _constants.strings.FILE_STATUS_VALIDATING:
|
|
129
129
|
content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_index4.default, {
|
|
130
130
|
size: "small",
|
|
131
|
-
wrapperClassName:
|
|
131
|
+
wrapperClassName: `${prefixCls}-file-card-icon-loading`
|
|
132
132
|
}), validateMessage);
|
|
133
133
|
break;
|
|
134
134
|
|
|
135
135
|
case typeof validateMessage === 'string':
|
|
136
136
|
content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_semiIcons.IconAlertCircle, {
|
|
137
|
-
className:
|
|
137
|
+
className: `${prefixCls}-file-card-icon-error`
|
|
138
138
|
}), validateMessage);
|
|
139
139
|
break;
|
|
140
140
|
|
|
@@ -160,13 +160,13 @@ class FileCard extends _react.PureComponent {
|
|
|
160
160
|
case validateMessage && status === _constants.strings.FILE_STATUS_VALIDATING:
|
|
161
161
|
icon = /*#__PURE__*/_react.default.createElement(_index4.default, {
|
|
162
162
|
size: "small",
|
|
163
|
-
wrapperClassName:
|
|
163
|
+
wrapperClassName: `${prefixCls}-picture-file-card-icon-loading`
|
|
164
164
|
});
|
|
165
165
|
break;
|
|
166
166
|
|
|
167
167
|
case validateMessage && (status === _constants.strings.FILE_STATUS_VALID_FAIL || status === _constants.strings.FILE_STATUS_UPLOAD_FAIL):
|
|
168
168
|
icon = /*#__PURE__*/_react.default.createElement("div", {
|
|
169
|
-
className:
|
|
169
|
+
className: `${prefixCls}-picture-file-card-icon-error`
|
|
170
170
|
}, /*#__PURE__*/_react.default.createElement(ErrorSvg, null));
|
|
171
171
|
break;
|
|
172
172
|
|
|
@@ -201,20 +201,20 @@ class FileCard extends _react.PureComponent {
|
|
|
201
201
|
const showReplace = status === _constants.strings.FILE_STATUS_SUCCESS && this.props.showReplace;
|
|
202
202
|
const showPreview = status === _constants.strings.FILE_STATUS_SUCCESS && !this.props.showReplace;
|
|
203
203
|
const filePicCardCls = (0, _classnames.default)({
|
|
204
|
-
[
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
[
|
|
208
|
-
[
|
|
204
|
+
[`${prefixCls}-picture-file-card`]: true,
|
|
205
|
+
[`${prefixCls}-picture-file-card-disabled`]: disabled,
|
|
206
|
+
[`${prefixCls}-picture-file-card-show-pointer`]: typeof onPreviewClick !== 'undefined',
|
|
207
|
+
[`${prefixCls}-picture-file-card-error`]: status === _constants.strings.FILE_STATUS_UPLOAD_FAIL,
|
|
208
|
+
[`${prefixCls}-picture-file-card-uploading`]: showProgress
|
|
209
209
|
});
|
|
210
210
|
|
|
211
211
|
const retry = /*#__PURE__*/_react.default.createElement("div", {
|
|
212
212
|
role: "button",
|
|
213
213
|
tabIndex: 0,
|
|
214
|
-
className:
|
|
214
|
+
className: `${prefixCls}-picture-file-card-retry`,
|
|
215
215
|
onClick: e => this.onRetry(e)
|
|
216
216
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconRefresh, {
|
|
217
|
-
className:
|
|
217
|
+
className: `${prefixCls}-picture-file-card-icon-retry`
|
|
218
218
|
}));
|
|
219
219
|
|
|
220
220
|
const replace = /*#__PURE__*/_react.default.createElement(_index3.default, {
|
|
@@ -226,27 +226,27 @@ class FileCard extends _react.PureComponent {
|
|
|
226
226
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
227
227
|
role: "button",
|
|
228
228
|
tabIndex: 0,
|
|
229
|
-
className:
|
|
229
|
+
className: `${prefixCls}-picture-file-card-replace`,
|
|
230
230
|
onClick: e => this.onReplace(e)
|
|
231
231
|
}, /*#__PURE__*/_react.default.createElement(ReplaceSvg, {
|
|
232
|
-
className:
|
|
232
|
+
className: `${prefixCls}-picture-file-card-icon-replace`
|
|
233
233
|
})));
|
|
234
234
|
|
|
235
235
|
const preview = /*#__PURE__*/_react.default.createElement("div", {
|
|
236
|
-
className:
|
|
236
|
+
className: `${prefixCls}-picture-file-card-preview`
|
|
237
237
|
}, typeof renderPicPreviewIcon === 'function' ? renderPicPreviewIcon(this.props) : null);
|
|
238
238
|
|
|
239
239
|
const close = /*#__PURE__*/_react.default.createElement("div", {
|
|
240
240
|
role: "button",
|
|
241
241
|
tabIndex: 0,
|
|
242
|
-
className:
|
|
242
|
+
className: `${prefixCls}-picture-file-card-close`,
|
|
243
243
|
onClick: e => this.onRemove(e)
|
|
244
244
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconClear, {
|
|
245
|
-
className:
|
|
245
|
+
className: `${prefixCls}-picture-file-card-icon-close`
|
|
246
246
|
}));
|
|
247
247
|
|
|
248
248
|
const picInfo = typeof renderPicInfo === 'function' ? renderPicInfo(this.props) : /*#__PURE__*/_react.default.createElement("div", {
|
|
249
|
-
className:
|
|
249
|
+
className: `${prefixCls}-picture-file-card-pic-info`
|
|
250
250
|
}, index + 1);
|
|
251
251
|
const thumbnail = typeof renderThumbnail === 'function' ? renderThumbnail(this.props) : /*#__PURE__*/_react.default.createElement("img", {
|
|
252
252
|
src: url,
|
|
@@ -282,17 +282,17 @@ class FileCard extends _react.PureComponent {
|
|
|
282
282
|
renderFileOperation
|
|
283
283
|
} = this.props;
|
|
284
284
|
const fileCardCls = (0, _classnames.default)({
|
|
285
|
-
[
|
|
286
|
-
[
|
|
287
|
-
[
|
|
285
|
+
[`${prefixCls}-file-card`]: true,
|
|
286
|
+
[`${prefixCls}-file-card-fail`]: status === _constants.strings.FILE_STATUS_VALID_FAIL || status === _constants.strings.FILE_STATUS_UPLOAD_FAIL,
|
|
287
|
+
[`${prefixCls}-file-card-show-pointer`]: typeof onPreviewClick !== 'undefined'
|
|
288
288
|
});
|
|
289
289
|
const previewCls = (0, _classnames.default)({
|
|
290
|
-
[
|
|
291
|
-
[
|
|
290
|
+
[`${prefixCls}-file-card-preview`]: true,
|
|
291
|
+
[`${prefixCls}-file-card-preview-placeholder`]: !preview || previewFile
|
|
292
292
|
});
|
|
293
|
-
const infoCls =
|
|
294
|
-
const closeCls =
|
|
295
|
-
const replaceCls =
|
|
293
|
+
const infoCls = `${prefixCls}-file-card-info`;
|
|
294
|
+
const closeCls = `${prefixCls}-file-card-close`;
|
|
295
|
+
const replaceCls = `${prefixCls}-file-card-replace`;
|
|
296
296
|
const showProgress = !(percent === 100 || typeof percent === 'undefined') && status === _constants.strings.FILE_STATUS_UPLOADING; // only show retry when upload fail & showRetry is true, no need to show during validate fail
|
|
297
297
|
|
|
298
298
|
const showRetry = status === _constants.strings.FILE_STATUS_UPLOAD_FAIL && propsShowRetry;
|
|
@@ -325,13 +325,13 @@ class FileCard extends _react.PureComponent {
|
|
|
325
325
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
326
326
|
className: previewCls
|
|
327
327
|
}, previewContent), /*#__PURE__*/_react.default.createElement("div", {
|
|
328
|
-
className:
|
|
328
|
+
className: `${infoCls}-main`
|
|
329
329
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
330
|
-
className:
|
|
330
|
+
className: `${infoCls}-main-text`
|
|
331
331
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
332
|
-
className:
|
|
332
|
+
className: `${infoCls}-name`
|
|
333
333
|
}, name), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("span", {
|
|
334
|
-
className:
|
|
334
|
+
className: `${infoCls}-size`
|
|
335
335
|
}, fileSize), showReplace && /*#__PURE__*/_react.default.createElement(_index3.default, {
|
|
336
336
|
trigger: "hover",
|
|
337
337
|
position: "top",
|
|
@@ -351,13 +351,13 @@ class FileCard extends _react.PureComponent {
|
|
|
351
351
|
},
|
|
352
352
|
"aria-label": "uploading file progress"
|
|
353
353
|
}) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
354
|
-
className:
|
|
354
|
+
className: `${infoCls}-main-control`
|
|
355
355
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
356
|
-
className:
|
|
356
|
+
className: `${infoCls}-validate-message`
|
|
357
357
|
}, this.renderValidateMessage()), showRetry ? /*#__PURE__*/_react.default.createElement("span", {
|
|
358
358
|
role: "button",
|
|
359
359
|
tabIndex: 0,
|
|
360
|
-
className:
|
|
360
|
+
className: `${infoCls}-retry`,
|
|
361
361
|
onClick: e => this.onRetry(e)
|
|
362
362
|
}, locale.retry) : null)), operation);
|
|
363
363
|
}
|