@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
|
@@ -138,9 +138,9 @@ export default class Pagination extends BaseComponent {
|
|
|
138
138
|
prevDisabled
|
|
139
139
|
} = this.state;
|
|
140
140
|
const preClassName = classNames({
|
|
141
|
-
[
|
|
142
|
-
[
|
|
143
|
-
[
|
|
141
|
+
[`${prefixCls}-item`]: true,
|
|
142
|
+
[`${prefixCls}-prev`]: true,
|
|
143
|
+
[`${prefixCls}-item-disabled`]: prevDisabled
|
|
144
144
|
});
|
|
145
145
|
return /*#__PURE__*/React.createElement("li", {
|
|
146
146
|
role: "button",
|
|
@@ -162,9 +162,9 @@ export default class Pagination extends BaseComponent {
|
|
|
162
162
|
nextDisabled
|
|
163
163
|
} = this.state;
|
|
164
164
|
const nextClassName = classNames({
|
|
165
|
-
[
|
|
166
|
-
[
|
|
167
|
-
[
|
|
165
|
+
[`${prefixCls}-item`]: true,
|
|
166
|
+
[`${prefixCls}-item-disabled`]: nextDisabled,
|
|
167
|
+
[`${prefixCls}-next`]: true
|
|
168
168
|
});
|
|
169
169
|
return /*#__PURE__*/React.createElement("li", {
|
|
170
170
|
role: "button",
|
|
@@ -191,7 +191,7 @@ export default class Pagination extends BaseComponent {
|
|
|
191
191
|
const {
|
|
192
192
|
pageSize
|
|
193
193
|
} = this.state;
|
|
194
|
-
const switchCls = classNames(
|
|
194
|
+
const switchCls = classNames(`${prefixCls}-switch`);
|
|
195
195
|
|
|
196
196
|
if (!showSizeChanger) {
|
|
197
197
|
return null;
|
|
@@ -213,7 +213,7 @@ export default class Pagination extends BaseComponent {
|
|
|
213
213
|
key: pageSize,
|
|
214
214
|
position: popoverPosition || 'bottomRight',
|
|
215
215
|
clickToHide: true,
|
|
216
|
-
dropdownClassName:
|
|
216
|
+
dropdownClassName: `${prefixCls}-select-dropdown`
|
|
217
217
|
}, options));
|
|
218
218
|
}
|
|
219
219
|
|
|
@@ -235,14 +235,14 @@ export default class Pagination extends BaseComponent {
|
|
|
235
235
|
|
|
236
236
|
const isDisabled = totalPageNum === 1;
|
|
237
237
|
const quickJumpCls = classNames({
|
|
238
|
-
[
|
|
239
|
-
[
|
|
238
|
+
[`${prefixCls}-quickjump`]: true,
|
|
239
|
+
[`${prefixCls}-quickjump-disabled`]: isDisabled
|
|
240
240
|
});
|
|
241
241
|
return /*#__PURE__*/React.createElement("div", {
|
|
242
242
|
className: quickJumpCls
|
|
243
243
|
}, /*#__PURE__*/React.createElement("span", null, locale.jumpTo), /*#__PURE__*/React.createElement(InputNumber, {
|
|
244
244
|
value: quickJumpPage,
|
|
245
|
-
className:
|
|
245
|
+
className: `${prefixCls}-quickjump-input-number`,
|
|
246
246
|
hideButtons: true,
|
|
247
247
|
disabled: isDisabled,
|
|
248
248
|
onBlur: e => this.foundation.handleQuickJumpBlur(),
|
|
@@ -263,15 +263,15 @@ export default class Pagination extends BaseComponent {
|
|
|
263
263
|
popoverZIndex
|
|
264
264
|
} = this.props;
|
|
265
265
|
return pageList.map((page, i) => {
|
|
266
|
-
const pageListClassName = classNames(
|
|
267
|
-
[
|
|
266
|
+
const pageListClassName = classNames(`${prefixCls}-item`, {
|
|
267
|
+
[`${prefixCls}-item-active`]: currentPage === page // [`${prefixCls}-item-rest-opening`]: (i < 3 && isLeftRestHover && page ==='...') || (i > 3 && isRightRestHover && page === '...')
|
|
268
268
|
|
|
269
269
|
});
|
|
270
270
|
const pageEl = /*#__PURE__*/React.createElement("li", {
|
|
271
|
-
key:
|
|
271
|
+
key: `${page}${i}`,
|
|
272
272
|
onClick: () => this.foundation.goPage(page, i),
|
|
273
273
|
className: pageListClassName,
|
|
274
|
-
"aria-label": page === '...' ? 'More' :
|
|
274
|
+
"aria-label": page === '...' ? 'More' : `Page ${page}`,
|
|
275
275
|
"aria-current": currentPage === page ? "page" : false
|
|
276
276
|
}, page);
|
|
277
277
|
|
|
@@ -282,7 +282,7 @@ export default class Pagination extends BaseComponent {
|
|
|
282
282
|
trigger: "hover",
|
|
283
283
|
// onVisibleChange={visible=>this.handleRestHover(visible, i < 3 ? 'left' : 'right')}
|
|
284
284
|
content: this.renderRestPageList(content),
|
|
285
|
-
key:
|
|
285
|
+
key: `${page}${i}`,
|
|
286
286
|
position: popoverPosition,
|
|
287
287
|
zIndex: popoverZIndex
|
|
288
288
|
}, pageEl);
|
|
@@ -297,7 +297,7 @@ export default class Pagination extends BaseComponent {
|
|
|
297
297
|
const {
|
|
298
298
|
direction
|
|
299
299
|
} = this.context;
|
|
300
|
-
const className = classNames(
|
|
300
|
+
const className = classNames(`${prefixCls}-rest-item`);
|
|
301
301
|
const count = restList.length;
|
|
302
302
|
|
|
303
303
|
const row = item => {
|
|
@@ -308,11 +308,11 @@ export default class Pagination extends BaseComponent {
|
|
|
308
308
|
const page = restList[index];
|
|
309
309
|
return /*#__PURE__*/React.createElement("div", {
|
|
310
310
|
role: "listitem",
|
|
311
|
-
key:
|
|
311
|
+
key: `${page}${index}`,
|
|
312
312
|
className: className,
|
|
313
313
|
onClick: () => this.foundation.goPage(page, index),
|
|
314
314
|
style: style,
|
|
315
|
-
"aria-label":
|
|
315
|
+
"aria-label": `${page}`
|
|
316
316
|
}, page);
|
|
317
317
|
};
|
|
318
318
|
|
|
@@ -322,7 +322,7 @@ export default class Pagination extends BaseComponent {
|
|
|
322
322
|
/*#__PURE__*/
|
|
323
323
|
// @ts-ignore skip type check cause react-window not update with @types/react 18
|
|
324
324
|
React.createElement(List, {
|
|
325
|
-
className:
|
|
325
|
+
className: `${prefixCls}-rest-list`,
|
|
326
326
|
itemData: restList,
|
|
327
327
|
itemSize: itemHeight,
|
|
328
328
|
width: 78,
|
|
@@ -343,7 +343,7 @@ export default class Pagination extends BaseComponent {
|
|
|
343
343
|
hoverShowPageSelect,
|
|
344
344
|
showSizeChanger
|
|
345
345
|
} = this.props;
|
|
346
|
-
const paginationCls = classNames(
|
|
346
|
+
const paginationCls = classNames(`${prefixCls}-small`, prefixCls, className);
|
|
347
347
|
const {
|
|
348
348
|
currentPage,
|
|
349
349
|
total,
|
|
@@ -360,7 +360,7 @@ export default class Pagination extends BaseComponent {
|
|
|
360
360
|
}, (v, i) => i + 1);
|
|
361
361
|
const pageList = this.renderRestPageList(pageNumbers);
|
|
362
362
|
const page = /*#__PURE__*/React.createElement("div", {
|
|
363
|
-
className:
|
|
363
|
+
className: `${prefixCls}-item ${prefixCls}-item-small`
|
|
364
364
|
}, currentPage, "/", totalPageNum, " ");
|
|
365
365
|
return /*#__PURE__*/React.createElement("div", {
|
|
366
366
|
className: paginationCls,
|
|
@@ -382,8 +382,8 @@ export default class Pagination extends BaseComponent {
|
|
|
382
382
|
hideOnSinglePage,
|
|
383
383
|
showSizeChanger
|
|
384
384
|
} = this.props;
|
|
385
|
-
const paginationCls = classNames(className,
|
|
386
|
-
const showTotalCls =
|
|
385
|
+
const paginationCls = classNames(className, `${prefixCls}`);
|
|
386
|
+
const showTotalCls = `${prefixCls}-total`;
|
|
387
387
|
const totalPageNum = Math.ceil(total / pageSize);
|
|
388
388
|
|
|
389
389
|
if (totalPageNum < 2 && hideOnSinglePage && !showSizeChanger) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { PopconfirmAdapter } from '@douyinfe/semi-foundation/lib/es/popconfirm/popconfirmFoundation';
|
|
3
|
+
import PopconfirmFoundation, { PopconfirmAdapter } from '@douyinfe/semi-foundation/lib/es/popconfirm/popconfirmFoundation';
|
|
4
4
|
import BaseComponent from '../_base/baseComponent';
|
|
5
|
-
import { PopoverProps } from '../popover';
|
|
6
|
-
import { Position, Trigger } from '../tooltip';
|
|
5
|
+
import Popover, { PopoverProps } from '../popover';
|
|
6
|
+
import { Position, Trigger, RenderContentProps } from '../tooltip';
|
|
7
7
|
import { ButtonProps } from '../button';
|
|
8
8
|
import { Type as ButtonType } from '../button/Button';
|
|
9
9
|
import { ContextValue } from '../configProvider/context';
|
|
@@ -12,7 +12,6 @@ export interface PopconfirmProps extends PopoverProps {
|
|
|
12
12
|
cancelText?: string;
|
|
13
13
|
cancelButtonProps?: ButtonProps;
|
|
14
14
|
cancelType?: ButtonType;
|
|
15
|
-
content?: React.ReactNode;
|
|
16
15
|
defaultVisible?: boolean;
|
|
17
16
|
disabled?: boolean;
|
|
18
17
|
icon?: React.ReactNode;
|
|
@@ -41,7 +40,7 @@ export default class Popconfirm extends BaseComponent<PopconfirmProps, Popconfir
|
|
|
41
40
|
static propTypes: {
|
|
42
41
|
motion: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
43
42
|
disabled: PropTypes.Requireable<boolean>;
|
|
44
|
-
content: PropTypes.Requireable<any
|
|
43
|
+
content: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>>;
|
|
45
44
|
title: PropTypes.Requireable<any>;
|
|
46
45
|
prefixCls: PropTypes.Requireable<string>;
|
|
47
46
|
className: PropTypes.Requireable<string>;
|
|
@@ -78,6 +77,9 @@ export default class Popconfirm extends BaseComponent<PopconfirmProps, Popconfir
|
|
|
78
77
|
onConfirm: (...args: any[]) => void;
|
|
79
78
|
onClickOutSide: (...args: any[]) => void;
|
|
80
79
|
};
|
|
80
|
+
footerRef: React.RefObject<HTMLDivElement | null>;
|
|
81
|
+
popoverRef: React.RefObject<Popover | null>;
|
|
82
|
+
foundation: PopconfirmFoundation;
|
|
81
83
|
constructor(props: PopconfirmProps);
|
|
82
84
|
context: ContextValue;
|
|
83
85
|
static getDerivedStateFromProps(props: PopconfirmProps, state: PopconfirmState): Partial<PopconfirmState>;
|
|
@@ -85,9 +87,11 @@ export default class Popconfirm extends BaseComponent<PopconfirmProps, Popconfir
|
|
|
85
87
|
handleCancel: (e: React.MouseEvent) => void;
|
|
86
88
|
handleConfirm: (e: React.MouseEvent) => void;
|
|
87
89
|
handleVisibleChange: (visible: boolean) => void;
|
|
88
|
-
handleClickOutSide: (e: React.MouseEvent) =>
|
|
90
|
+
handleClickOutSide: (e: React.MouseEvent) => void;
|
|
89
91
|
stopImmediatePropagation: (e: React.SyntheticEvent) => void;
|
|
90
92
|
renderControls(): JSX.Element;
|
|
91
|
-
renderConfirmPopCard(
|
|
93
|
+
renderConfirmPopCard: ({ initialFocusRef }: {
|
|
94
|
+
initialFocusRef?: RenderContentProps<any>['initialFocusRef'];
|
|
95
|
+
}) => JSX.Element;
|
|
92
96
|
render(): string | number | boolean | React.ReactFragment | JSX.Element;
|
|
93
97
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _omit from "lodash/omit";
|
|
2
|
+
import _isFunction from "lodash/isFunction";
|
|
1
3
|
import _get from "lodash/get";
|
|
2
4
|
import _noop from "lodash/noop";
|
|
3
5
|
|
|
@@ -40,12 +42,74 @@ export default class Popconfirm extends BaseComponent {
|
|
|
40
42
|
|
|
41
43
|
this.stopImmediatePropagation = e => e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation();
|
|
42
44
|
|
|
45
|
+
this.renderConfirmPopCard = _ref => {
|
|
46
|
+
let {
|
|
47
|
+
initialFocusRef
|
|
48
|
+
} = _ref;
|
|
49
|
+
const {
|
|
50
|
+
content,
|
|
51
|
+
title,
|
|
52
|
+
className,
|
|
53
|
+
style,
|
|
54
|
+
cancelType,
|
|
55
|
+
icon,
|
|
56
|
+
prefixCls
|
|
57
|
+
} = this.props;
|
|
58
|
+
const {
|
|
59
|
+
direction
|
|
60
|
+
} = this.context;
|
|
61
|
+
const popCardCls = cls(prefixCls, className, {
|
|
62
|
+
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
63
|
+
});
|
|
64
|
+
const showTitle = title !== null && typeof title !== 'undefined';
|
|
65
|
+
const showContent = !(content === null || typeof content === 'undefined');
|
|
66
|
+
return (
|
|
67
|
+
/*#__PURE__*/
|
|
68
|
+
|
|
69
|
+
/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */
|
|
70
|
+
React.createElement("div", {
|
|
71
|
+
className: popCardCls,
|
|
72
|
+
onClick: this.stopImmediatePropagation,
|
|
73
|
+
style: style
|
|
74
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
className: `${prefixCls}-inner`
|
|
76
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
className: `${prefixCls}-header`
|
|
78
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
79
|
+
className: `${prefixCls}-header-icon`,
|
|
80
|
+
"x-semi-prop": "icon"
|
|
81
|
+
}, /*#__PURE__*/React.isValidElement(icon) ? icon : null), /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: `${prefixCls}-header-body`
|
|
83
|
+
}, showTitle ? /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
className: `${prefixCls}-header-title`,
|
|
85
|
+
"x-semi-prop": "title"
|
|
86
|
+
}, title) : null), /*#__PURE__*/React.createElement(Button, {
|
|
87
|
+
className: `${prefixCls}-btn-close`,
|
|
88
|
+
icon: /*#__PURE__*/React.createElement(IconClose, null),
|
|
89
|
+
size: "small",
|
|
90
|
+
theme: 'borderless',
|
|
91
|
+
type: cancelType,
|
|
92
|
+
onClick: this.handleCancel
|
|
93
|
+
})), showContent ? /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
className: `${prefixCls}-body`,
|
|
95
|
+
"x-semi-prop": "content"
|
|
96
|
+
}, _isFunction(content) ? content({
|
|
97
|
+
initialFocusRef
|
|
98
|
+
}) : content) : null, /*#__PURE__*/React.createElement("div", {
|
|
99
|
+
className: `${prefixCls}-footer`,
|
|
100
|
+
ref: this.footerRef
|
|
101
|
+
}, this.renderControls())))
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
43
105
|
this.state = {
|
|
44
106
|
cancelLoading: false,
|
|
45
107
|
confirmLoading: false,
|
|
46
108
|
visible: props.defaultVisible || false
|
|
47
109
|
};
|
|
48
110
|
this.foundation = new PopconfirmFoundation(this.adapter);
|
|
111
|
+
this.footerRef = /*#__PURE__*/React.createRef();
|
|
112
|
+
this.popoverRef = /*#__PURE__*/React.createRef();
|
|
49
113
|
}
|
|
50
114
|
|
|
51
115
|
static getDerivedStateFromProps(props, state) {
|
|
@@ -75,7 +139,28 @@ export default class Popconfirm extends BaseComponent {
|
|
|
75
139
|
notifyConfirm: e => this.props.onConfirm(e),
|
|
76
140
|
notifyCancel: e => this.props.onCancel(e),
|
|
77
141
|
notifyVisibleChange: visible => this.props.onVisibleChange(visible),
|
|
78
|
-
notifyClickOutSide: e => this.props.onClickOutSide(e)
|
|
142
|
+
notifyClickOutSide: e => this.props.onClickOutSide(e),
|
|
143
|
+
focusCancelButton: () => {
|
|
144
|
+
var _a, _b;
|
|
145
|
+
|
|
146
|
+
const buttonNode = (_b = (_a = this.footerRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.querySelector('[data-type=cancel]');
|
|
147
|
+
buttonNode === null || buttonNode === void 0 ? void 0 : buttonNode.focus({
|
|
148
|
+
preventScroll: true
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
focusOkButton: () => {
|
|
152
|
+
var _a, _b;
|
|
153
|
+
|
|
154
|
+
const buttonNode = (_b = (_a = this.footerRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.querySelector('[data-type=ok]');
|
|
155
|
+
buttonNode === null || buttonNode === void 0 ? void 0 : buttonNode.focus({
|
|
156
|
+
preventScroll: true
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
focusPrevFocusElement: () => {
|
|
160
|
+
var _a;
|
|
161
|
+
|
|
162
|
+
(_a = this.popoverRef.current) === null || _a === void 0 ? void 0 : _a.focusTrigger();
|
|
163
|
+
}
|
|
79
164
|
});
|
|
80
165
|
}
|
|
81
166
|
|
|
@@ -95,68 +180,17 @@ export default class Popconfirm extends BaseComponent {
|
|
|
95
180
|
return /*#__PURE__*/React.createElement(LocaleConsumer, {
|
|
96
181
|
componentName: "Popconfirm"
|
|
97
182
|
}, (locale, localeCode) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
183
|
+
"data-type": "cancel",
|
|
98
184
|
type: cancelType,
|
|
99
185
|
onClick: this.handleCancel,
|
|
100
186
|
loading: cancelLoading
|
|
101
|
-
}, cancelButtonProps), cancelText || _get(locale, 'cancel')), /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
187
|
+
}, _omit(cancelButtonProps, 'autoFocus')), cancelText || _get(locale, 'cancel')), /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
188
|
+
"data-type": "ok",
|
|
102
189
|
type: okType,
|
|
103
190
|
theme: "solid",
|
|
104
191
|
onClick: this.handleConfirm,
|
|
105
192
|
loading: confirmLoading
|
|
106
|
-
}, okButtonProps), okText || _get(locale, 'confirm'))));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
renderConfirmPopCard() {
|
|
110
|
-
const {
|
|
111
|
-
content,
|
|
112
|
-
title,
|
|
113
|
-
className,
|
|
114
|
-
style,
|
|
115
|
-
cancelType,
|
|
116
|
-
icon,
|
|
117
|
-
prefixCls
|
|
118
|
-
} = this.props;
|
|
119
|
-
const {
|
|
120
|
-
direction
|
|
121
|
-
} = this.context;
|
|
122
|
-
const popCardCls = cls(prefixCls, className, {
|
|
123
|
-
["".concat(prefixCls, "-rtl")]: direction === 'rtl'
|
|
124
|
-
});
|
|
125
|
-
const showTitle = title !== null && typeof title !== 'undefined';
|
|
126
|
-
const showContent = !(content === null || typeof content === 'undefined');
|
|
127
|
-
return (
|
|
128
|
-
/*#__PURE__*/
|
|
129
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
130
|
-
React.createElement("div", {
|
|
131
|
-
className: popCardCls,
|
|
132
|
-
onClick: this.stopImmediatePropagation,
|
|
133
|
-
style: style
|
|
134
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
135
|
-
className: "".concat(prefixCls, "-inner")
|
|
136
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
137
|
-
className: "".concat(prefixCls, "-header")
|
|
138
|
-
}, /*#__PURE__*/React.createElement("i", {
|
|
139
|
-
className: "".concat(prefixCls, "-header-icon"),
|
|
140
|
-
"x-semi-prop": "icon"
|
|
141
|
-
}, /*#__PURE__*/React.isValidElement(icon) ? icon : null), /*#__PURE__*/React.createElement("div", {
|
|
142
|
-
className: "".concat(prefixCls, "-header-body")
|
|
143
|
-
}, showTitle ? /*#__PURE__*/React.createElement("div", {
|
|
144
|
-
className: "".concat(prefixCls, "-header-title"),
|
|
145
|
-
"x-semi-prop": "title"
|
|
146
|
-
}, title) : null), /*#__PURE__*/React.createElement(Button, {
|
|
147
|
-
className: "".concat(prefixCls, "-btn-close"),
|
|
148
|
-
icon: /*#__PURE__*/React.createElement(IconClose, null),
|
|
149
|
-
size: "small",
|
|
150
|
-
theme: 'borderless',
|
|
151
|
-
type: cancelType,
|
|
152
|
-
onClick: this.handleCancel
|
|
153
|
-
})), showContent ? /*#__PURE__*/React.createElement("div", {
|
|
154
|
-
className: "".concat(prefixCls, "-body"),
|
|
155
|
-
"x-semi-prop": "content"
|
|
156
|
-
}, content) : null, /*#__PURE__*/React.createElement("div", {
|
|
157
|
-
className: "".concat(prefixCls, "-footer")
|
|
158
|
-
}, this.renderControls())))
|
|
159
|
-
);
|
|
193
|
+
}, _omit(okButtonProps, 'autoFocus')), okText || _get(locale, 'confirm'))));
|
|
160
194
|
}
|
|
161
195
|
|
|
162
196
|
render() {
|
|
@@ -184,7 +218,6 @@ export default class Popconfirm extends BaseComponent {
|
|
|
184
218
|
const {
|
|
185
219
|
visible
|
|
186
220
|
} = this.state;
|
|
187
|
-
const popContent = this.renderConfirmPopCard();
|
|
188
221
|
const popProps = {
|
|
189
222
|
onVisibleChange: this.handleVisibleChange,
|
|
190
223
|
className: cssClasses.POPOVER,
|
|
@@ -195,8 +228,10 @@ export default class Popconfirm extends BaseComponent {
|
|
|
195
228
|
popProps.trigger = 'custom';
|
|
196
229
|
}
|
|
197
230
|
|
|
198
|
-
return /*#__PURE__*/React.createElement(Popover, Object.assign({
|
|
199
|
-
|
|
231
|
+
return /*#__PURE__*/React.createElement(Popover, Object.assign({
|
|
232
|
+
ref: this.popoverRef
|
|
233
|
+
}, attrs, {
|
|
234
|
+
content: this.renderConfirmPopCard,
|
|
200
235
|
visible: visible,
|
|
201
236
|
position: position
|
|
202
237
|
}, popProps), children);
|
|
@@ -207,7 +242,7 @@ Popconfirm.contextType = ConfigContext;
|
|
|
207
242
|
Popconfirm.propTypes = {
|
|
208
243
|
motion: PropTypes.oneOfType([PropTypes.bool, PropTypes.func, PropTypes.object]),
|
|
209
244
|
disabled: PropTypes.bool,
|
|
210
|
-
content: PropTypes.
|
|
245
|
+
content: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
211
246
|
title: PropTypes.any,
|
|
212
247
|
prefixCls: PropTypes.string,
|
|
213
248
|
className: PropTypes.string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ContextValue } from '../configProvider/context';
|
|
4
|
-
import { ArrowBounding, Position, TooltipProps, Trigger, RenderContentProps } from '../tooltip/index';
|
|
4
|
+
import Tooltip, { ArrowBounding, Position, TooltipProps, Trigger, RenderContentProps } from '../tooltip/index';
|
|
5
5
|
import '@douyinfe/semi-foundation/lib/es/popover/popover.css';
|
|
6
6
|
import { BaseProps } from '../_base/baseComponent';
|
|
7
7
|
import type { ArrowProps } from './Arrow';
|
|
@@ -54,7 +54,7 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
54
54
|
visible: PropTypes.Requireable<boolean>;
|
|
55
55
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
56
56
|
motion: PropTypes.Requireable<boolean>;
|
|
57
|
-
position: PropTypes.Requireable<"
|
|
57
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
58
58
|
margin: PropTypes.Requireable<NonNullable<number | object>>;
|
|
59
59
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
60
60
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
@@ -101,6 +101,12 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
101
101
|
disableFocusListener: boolean;
|
|
102
102
|
};
|
|
103
103
|
context: ContextValue;
|
|
104
|
+
tooltipRef: React.RefObject<Tooltip | null>;
|
|
105
|
+
constructor(props: PopoverProps);
|
|
106
|
+
/**
|
|
107
|
+
* focus on tooltip trigger
|
|
108
|
+
*/
|
|
109
|
+
focusTrigger: () => void;
|
|
104
110
|
renderPopCard: ({ initialFocusRef }: {
|
|
105
111
|
initialFocusRef: RenderContentProps['initialFocusRef'];
|
|
106
112
|
}) => JSX.Element;
|
package/lib/es/popover/index.js
CHANGED
|
@@ -24,8 +24,17 @@ const positionSet = strings.POSITION_SET;
|
|
|
24
24
|
const triggerSet = strings.TRIGGER_SET;
|
|
25
25
|
|
|
26
26
|
class Popover extends React.PureComponent {
|
|
27
|
-
constructor() {
|
|
28
|
-
super(
|
|
27
|
+
constructor(props) {
|
|
28
|
+
super(props);
|
|
29
|
+
/**
|
|
30
|
+
* focus on tooltip trigger
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
this.focusTrigger = () => {
|
|
34
|
+
var _a;
|
|
35
|
+
|
|
36
|
+
(_a = this.tooltipRef.current) === null || _a === void 0 ? void 0 : _a.focusTrigger();
|
|
37
|
+
};
|
|
29
38
|
|
|
30
39
|
this.renderPopCard = _ref => {
|
|
31
40
|
let {
|
|
@@ -40,7 +49,7 @@ class Popover extends React.PureComponent {
|
|
|
40
49
|
direction
|
|
41
50
|
} = this.context;
|
|
42
51
|
const popCardCls = classNames(prefixCls, contentClassName, {
|
|
43
|
-
[
|
|
52
|
+
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
44
53
|
});
|
|
45
54
|
const contentNode = this.renderContentNode({
|
|
46
55
|
initialFocusRef,
|
|
@@ -49,7 +58,7 @@ class Popover extends React.PureComponent {
|
|
|
49
58
|
return /*#__PURE__*/React.createElement("div", {
|
|
50
59
|
className: popCardCls
|
|
51
60
|
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
className:
|
|
61
|
+
className: `${prefixCls}-content`
|
|
53
62
|
}, contentNode));
|
|
54
63
|
};
|
|
55
64
|
|
|
@@ -63,6 +72,8 @@ class Popover extends React.PureComponent {
|
|
|
63
72
|
};
|
|
64
73
|
return !_isFunction(content) ? content : content(contentProps);
|
|
65
74
|
};
|
|
75
|
+
|
|
76
|
+
this.tooltipRef = /*#__PURE__*/React.createRef();
|
|
66
77
|
}
|
|
67
78
|
|
|
68
79
|
render() {
|
|
@@ -96,7 +107,8 @@ class Popover extends React.PureComponent {
|
|
|
96
107
|
|
|
97
108
|
const role = trigger === 'click' || trigger === 'custom' ? 'dialog' : 'tooltip';
|
|
98
109
|
return /*#__PURE__*/React.createElement(Tooltip, Object.assign({
|
|
99
|
-
guardFocus: true
|
|
110
|
+
guardFocus: true,
|
|
111
|
+
ref: this.tooltipRef
|
|
100
112
|
}, attr, {
|
|
101
113
|
trigger: trigger,
|
|
102
114
|
position: position,
|
package/lib/es/progress/index.js
CHANGED
|
@@ -102,9 +102,9 @@ class Progress extends Component {
|
|
|
102
102
|
percentNumber
|
|
103
103
|
} = this.state;
|
|
104
104
|
const classNames = {
|
|
105
|
-
wrapper: cls(
|
|
106
|
-
svg: cls(
|
|
107
|
-
circle: cls(
|
|
105
|
+
wrapper: cls(`${prefixCls}-circle`, className),
|
|
106
|
+
svg: cls(`${prefixCls}-circle-ring`),
|
|
107
|
+
circle: cls(`${prefixCls}-circle-ring-inner`)
|
|
108
108
|
};
|
|
109
109
|
const perc = this.calcPercent(percent);
|
|
110
110
|
const percNumber = this.calcPercent(percentNumber);
|
|
@@ -127,7 +127,7 @@ class Progress extends Component {
|
|
|
127
127
|
const circumference = radius * 2 * Math.PI;
|
|
128
128
|
const strokeDashoffset = (1 - perc / 100) * circumference; // Offset
|
|
129
129
|
|
|
130
|
-
const strokeDasharray =
|
|
130
|
+
const strokeDasharray = `${circumference} ${circumference}`;
|
|
131
131
|
const text = format(percNumber);
|
|
132
132
|
return /*#__PURE__*/React.createElement("div", {
|
|
133
133
|
id: id,
|
|
@@ -170,7 +170,7 @@ class Progress extends Component {
|
|
|
170
170
|
cy: cy,
|
|
171
171
|
"aria-hidden": true
|
|
172
172
|
})), showInfo && size !== 'small' ? /*#__PURE__*/React.createElement("span", {
|
|
173
|
-
className:
|
|
173
|
+
className: `${prefixCls}-circle-text`
|
|
174
174
|
}, text) : null);
|
|
175
175
|
}
|
|
176
176
|
|
|
@@ -223,14 +223,14 @@ class Progress extends Component {
|
|
|
223
223
|
percentNumber
|
|
224
224
|
} = this.state;
|
|
225
225
|
const progressWrapperCls = cls(prefixCls, className, {
|
|
226
|
-
[
|
|
227
|
-
[
|
|
228
|
-
[
|
|
226
|
+
[`${prefixCls}-horizontal`]: direction === strings.DEFAULT_DIRECTION,
|
|
227
|
+
[`${prefixCls}-vertical`]: direction !== strings.DEFAULT_DIRECTION,
|
|
228
|
+
[`${prefixCls}-large`]: size === 'large'
|
|
229
229
|
});
|
|
230
230
|
const progressTrackCls = cls({
|
|
231
|
-
[
|
|
231
|
+
[`${prefixCls}-track`]: true
|
|
232
232
|
});
|
|
233
|
-
const innerCls = cls(
|
|
233
|
+
const innerCls = cls(`${prefixCls}-track-inner`);
|
|
234
234
|
const perc = this.calcPercent(percent);
|
|
235
235
|
const percNumber = this.calcPercent(percentNumber); // parse stroke & generate gradients
|
|
236
236
|
|
|
@@ -241,9 +241,9 @@ class Progress extends Component {
|
|
|
241
241
|
};
|
|
242
242
|
|
|
243
243
|
if (direction === strings.DEFAULT_DIRECTION) {
|
|
244
|
-
innerStyle.width =
|
|
244
|
+
innerStyle.width = `${perc}%`;
|
|
245
245
|
} else {
|
|
246
|
-
innerStyle.height =
|
|
246
|
+
innerStyle.height = `${perc}%`;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
const text = format(percNumber);
|
|
@@ -269,7 +269,7 @@ class Progress extends Component {
|
|
|
269
269
|
style: innerStyle,
|
|
270
270
|
"aria-hidden": true
|
|
271
271
|
})), showInfo ? /*#__PURE__*/React.createElement("div", {
|
|
272
|
-
className:
|
|
272
|
+
className: `${prefixCls}-line-text`
|
|
273
273
|
}, text) : null);
|
|
274
274
|
}
|
|
275
275
|
|
|
@@ -315,7 +315,7 @@ Progress.propTypes = {
|
|
|
315
315
|
Progress.defaultProps = {
|
|
316
316
|
className: '',
|
|
317
317
|
direction: strings.DEFAULT_DIRECTION,
|
|
318
|
-
format: text =>
|
|
318
|
+
format: text => `${text}%`,
|
|
319
319
|
motion: true,
|
|
320
320
|
orbitStroke: 'var(--semi-color-fill-0)',
|
|
321
321
|
percent: 0,
|
package/lib/es/radio/radio.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
|
|
|
82
82
|
prefixCls?: string;
|
|
83
83
|
name?: string;
|
|
84
84
|
onChange?: (e: RadioChangeEvent) => void;
|
|
85
|
-
buttonSize?: "small" | "
|
|
85
|
+
buttonSize?: "small" | "large" | "middle";
|
|
86
86
|
isCardRadio?: boolean;
|
|
87
87
|
isPureCardRadio?: boolean;
|
|
88
88
|
};
|