@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
|
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
var _omit2 = _interopRequireDefault(require("lodash/omit"));
|
|
9
|
+
|
|
10
|
+
var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
|
|
11
|
+
|
|
8
12
|
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
9
13
|
|
|
10
14
|
var _noop2 = _interopRequireDefault(require("lodash/noop"));
|
|
@@ -62,12 +66,74 @@ class Popconfirm extends _baseComponent.default {
|
|
|
62
66
|
|
|
63
67
|
this.stopImmediatePropagation = e => e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation();
|
|
64
68
|
|
|
69
|
+
this.renderConfirmPopCard = _ref => {
|
|
70
|
+
let {
|
|
71
|
+
initialFocusRef
|
|
72
|
+
} = _ref;
|
|
73
|
+
const {
|
|
74
|
+
content,
|
|
75
|
+
title,
|
|
76
|
+
className,
|
|
77
|
+
style,
|
|
78
|
+
cancelType,
|
|
79
|
+
icon,
|
|
80
|
+
prefixCls
|
|
81
|
+
} = this.props;
|
|
82
|
+
const {
|
|
83
|
+
direction
|
|
84
|
+
} = this.context;
|
|
85
|
+
const popCardCls = (0, _classnames.default)(prefixCls, className, {
|
|
86
|
+
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
87
|
+
});
|
|
88
|
+
const showTitle = title !== null && typeof title !== 'undefined';
|
|
89
|
+
const showContent = !(content === null || typeof content === 'undefined');
|
|
90
|
+
return (
|
|
91
|
+
/*#__PURE__*/
|
|
92
|
+
|
|
93
|
+
/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */
|
|
94
|
+
_react.default.createElement("div", {
|
|
95
|
+
className: popCardCls,
|
|
96
|
+
onClick: this.stopImmediatePropagation,
|
|
97
|
+
style: style
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
className: `${prefixCls}-inner`
|
|
100
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
+
className: `${prefixCls}-header`
|
|
102
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
103
|
+
className: `${prefixCls}-header-icon`,
|
|
104
|
+
"x-semi-prop": "icon"
|
|
105
|
+
}, /*#__PURE__*/_react.default.isValidElement(icon) ? icon : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
+
className: `${prefixCls}-header-body`
|
|
107
|
+
}, showTitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
108
|
+
className: `${prefixCls}-header-title`,
|
|
109
|
+
"x-semi-prop": "title"
|
|
110
|
+
}, title) : null), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
111
|
+
className: `${prefixCls}-btn-close`,
|
|
112
|
+
icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose, null),
|
|
113
|
+
size: "small",
|
|
114
|
+
theme: 'borderless',
|
|
115
|
+
type: cancelType,
|
|
116
|
+
onClick: this.handleCancel
|
|
117
|
+
})), showContent ? /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
+
className: `${prefixCls}-body`,
|
|
119
|
+
"x-semi-prop": "content"
|
|
120
|
+
}, (0, _isFunction2.default)(content) ? content({
|
|
121
|
+
initialFocusRef
|
|
122
|
+
}) : content) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
+
className: `${prefixCls}-footer`,
|
|
124
|
+
ref: this.footerRef
|
|
125
|
+
}, this.renderControls())))
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
65
129
|
this.state = {
|
|
66
130
|
cancelLoading: false,
|
|
67
131
|
confirmLoading: false,
|
|
68
132
|
visible: props.defaultVisible || false
|
|
69
133
|
};
|
|
70
134
|
this.foundation = new _popconfirmFoundation.default(this.adapter);
|
|
135
|
+
this.footerRef = /*#__PURE__*/_react.default.createRef();
|
|
136
|
+
this.popoverRef = /*#__PURE__*/_react.default.createRef();
|
|
71
137
|
}
|
|
72
138
|
|
|
73
139
|
static getDerivedStateFromProps(props, state) {
|
|
@@ -97,7 +163,28 @@ class Popconfirm extends _baseComponent.default {
|
|
|
97
163
|
notifyConfirm: e => this.props.onConfirm(e),
|
|
98
164
|
notifyCancel: e => this.props.onCancel(e),
|
|
99
165
|
notifyVisibleChange: visible => this.props.onVisibleChange(visible),
|
|
100
|
-
notifyClickOutSide: e => this.props.onClickOutSide(e)
|
|
166
|
+
notifyClickOutSide: e => this.props.onClickOutSide(e),
|
|
167
|
+
focusCancelButton: () => {
|
|
168
|
+
var _a, _b;
|
|
169
|
+
|
|
170
|
+
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]');
|
|
171
|
+
buttonNode === null || buttonNode === void 0 ? void 0 : buttonNode.focus({
|
|
172
|
+
preventScroll: true
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
focusOkButton: () => {
|
|
176
|
+
var _a, _b;
|
|
177
|
+
|
|
178
|
+
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]');
|
|
179
|
+
buttonNode === null || buttonNode === void 0 ? void 0 : buttonNode.focus({
|
|
180
|
+
preventScroll: true
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
focusPrevFocusElement: () => {
|
|
184
|
+
var _a;
|
|
185
|
+
|
|
186
|
+
(_a = this.popoverRef.current) === null || _a === void 0 ? void 0 : _a.focusTrigger();
|
|
187
|
+
}
|
|
101
188
|
});
|
|
102
189
|
}
|
|
103
190
|
|
|
@@ -117,68 +204,17 @@ class Popconfirm extends _baseComponent.default {
|
|
|
117
204
|
return /*#__PURE__*/_react.default.createElement(_localeConsumer.default, {
|
|
118
205
|
componentName: "Popconfirm"
|
|
119
206
|
}, (locale, localeCode) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_button.default, Object.assign({
|
|
207
|
+
"data-type": "cancel",
|
|
120
208
|
type: cancelType,
|
|
121
209
|
onClick: this.handleCancel,
|
|
122
210
|
loading: cancelLoading
|
|
123
|
-
}, cancelButtonProps), cancelText || (0, _get2.default)(locale, 'cancel')), /*#__PURE__*/_react.default.createElement(_button.default, Object.assign({
|
|
211
|
+
}, (0, _omit2.default)(cancelButtonProps, 'autoFocus')), cancelText || (0, _get2.default)(locale, 'cancel')), /*#__PURE__*/_react.default.createElement(_button.default, Object.assign({
|
|
212
|
+
"data-type": "ok",
|
|
124
213
|
type: okType,
|
|
125
214
|
theme: "solid",
|
|
126
215
|
onClick: this.handleConfirm,
|
|
127
216
|
loading: confirmLoading
|
|
128
|
-
}, okButtonProps), okText || (0, _get2.default)(locale, 'confirm'))));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
renderConfirmPopCard() {
|
|
132
|
-
const {
|
|
133
|
-
content,
|
|
134
|
-
title,
|
|
135
|
-
className,
|
|
136
|
-
style,
|
|
137
|
-
cancelType,
|
|
138
|
-
icon,
|
|
139
|
-
prefixCls
|
|
140
|
-
} = this.props;
|
|
141
|
-
const {
|
|
142
|
-
direction
|
|
143
|
-
} = this.context;
|
|
144
|
-
const popCardCls = (0, _classnames.default)(prefixCls, className, {
|
|
145
|
-
["".concat(prefixCls, "-rtl")]: direction === 'rtl'
|
|
146
|
-
});
|
|
147
|
-
const showTitle = title !== null && typeof title !== 'undefined';
|
|
148
|
-
const showContent = !(content === null || typeof content === 'undefined');
|
|
149
|
-
return (
|
|
150
|
-
/*#__PURE__*/
|
|
151
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
152
|
-
_react.default.createElement("div", {
|
|
153
|
-
className: popCardCls,
|
|
154
|
-
onClick: this.stopImmediatePropagation,
|
|
155
|
-
style: style
|
|
156
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
157
|
-
className: "".concat(prefixCls, "-inner")
|
|
158
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
159
|
-
className: "".concat(prefixCls, "-header")
|
|
160
|
-
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
161
|
-
className: "".concat(prefixCls, "-header-icon"),
|
|
162
|
-
"x-semi-prop": "icon"
|
|
163
|
-
}, /*#__PURE__*/_react.default.isValidElement(icon) ? icon : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
164
|
-
className: "".concat(prefixCls, "-header-body")
|
|
165
|
-
}, showTitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
166
|
-
className: "".concat(prefixCls, "-header-title"),
|
|
167
|
-
"x-semi-prop": "title"
|
|
168
|
-
}, title) : null), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
169
|
-
className: "".concat(prefixCls, "-btn-close"),
|
|
170
|
-
icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose, null),
|
|
171
|
-
size: "small",
|
|
172
|
-
theme: 'borderless',
|
|
173
|
-
type: cancelType,
|
|
174
|
-
onClick: this.handleCancel
|
|
175
|
-
})), showContent ? /*#__PURE__*/_react.default.createElement("div", {
|
|
176
|
-
className: "".concat(prefixCls, "-body"),
|
|
177
|
-
"x-semi-prop": "content"
|
|
178
|
-
}, content) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
179
|
-
className: "".concat(prefixCls, "-footer")
|
|
180
|
-
}, this.renderControls())))
|
|
181
|
-
);
|
|
217
|
+
}, (0, _omit2.default)(okButtonProps, 'autoFocus')), okText || (0, _get2.default)(locale, 'confirm'))));
|
|
182
218
|
}
|
|
183
219
|
|
|
184
220
|
render() {
|
|
@@ -206,7 +242,6 @@ class Popconfirm extends _baseComponent.default {
|
|
|
206
242
|
const {
|
|
207
243
|
visible
|
|
208
244
|
} = this.state;
|
|
209
|
-
const popContent = this.renderConfirmPopCard();
|
|
210
245
|
const popProps = {
|
|
211
246
|
onVisibleChange: this.handleVisibleChange,
|
|
212
247
|
className: _constants.cssClasses.POPOVER,
|
|
@@ -217,8 +252,10 @@ class Popconfirm extends _baseComponent.default {
|
|
|
217
252
|
popProps.trigger = 'custom';
|
|
218
253
|
}
|
|
219
254
|
|
|
220
|
-
return /*#__PURE__*/_react.default.createElement(_popover.default, Object.assign({
|
|
221
|
-
|
|
255
|
+
return /*#__PURE__*/_react.default.createElement(_popover.default, Object.assign({
|
|
256
|
+
ref: this.popoverRef
|
|
257
|
+
}, attrs, {
|
|
258
|
+
content: this.renderConfirmPopCard,
|
|
222
259
|
visible: visible,
|
|
223
260
|
position: position
|
|
224
261
|
}, popProps), children);
|
|
@@ -231,7 +268,7 @@ Popconfirm.contextType = _context.default;
|
|
|
231
268
|
Popconfirm.propTypes = {
|
|
232
269
|
motion: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.func, _propTypes.default.object]),
|
|
233
270
|
disabled: _propTypes.default.bool,
|
|
234
|
-
content: _propTypes.default.
|
|
271
|
+
content: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
|
|
235
272
|
title: _propTypes.default.any,
|
|
236
273
|
prefixCls: _propTypes.default.string,
|
|
237
274
|
className: _propTypes.default.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/cjs/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/cjs/popover/index.js
CHANGED
|
@@ -42,8 +42,17 @@ const positionSet = _constants.strings.POSITION_SET;
|
|
|
42
42
|
const triggerSet = _constants.strings.TRIGGER_SET;
|
|
43
43
|
|
|
44
44
|
class Popover extends _react.default.PureComponent {
|
|
45
|
-
constructor() {
|
|
46
|
-
super(
|
|
45
|
+
constructor(props) {
|
|
46
|
+
super(props);
|
|
47
|
+
/**
|
|
48
|
+
* focus on tooltip trigger
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
this.focusTrigger = () => {
|
|
52
|
+
var _a;
|
|
53
|
+
|
|
54
|
+
(_a = this.tooltipRef.current) === null || _a === void 0 ? void 0 : _a.focusTrigger();
|
|
55
|
+
};
|
|
47
56
|
|
|
48
57
|
this.renderPopCard = _ref => {
|
|
49
58
|
let {
|
|
@@ -58,7 +67,7 @@ class Popover extends _react.default.PureComponent {
|
|
|
58
67
|
direction
|
|
59
68
|
} = this.context;
|
|
60
69
|
const popCardCls = (0, _classnames.default)(prefixCls, contentClassName, {
|
|
61
|
-
[
|
|
70
|
+
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
62
71
|
});
|
|
63
72
|
const contentNode = this.renderContentNode({
|
|
64
73
|
initialFocusRef,
|
|
@@ -67,7 +76,7 @@ class Popover extends _react.default.PureComponent {
|
|
|
67
76
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
68
77
|
className: popCardCls
|
|
69
78
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
70
|
-
className:
|
|
79
|
+
className: `${prefixCls}-content`
|
|
71
80
|
}, contentNode));
|
|
72
81
|
};
|
|
73
82
|
|
|
@@ -81,6 +90,8 @@ class Popover extends _react.default.PureComponent {
|
|
|
81
90
|
};
|
|
82
91
|
return !(0, _isFunction2.default)(content) ? content : content(contentProps);
|
|
83
92
|
};
|
|
93
|
+
|
|
94
|
+
this.tooltipRef = /*#__PURE__*/_react.default.createRef();
|
|
84
95
|
}
|
|
85
96
|
|
|
86
97
|
render() {
|
|
@@ -114,7 +125,8 @@ class Popover extends _react.default.PureComponent {
|
|
|
114
125
|
|
|
115
126
|
const role = trigger === 'click' || trigger === 'custom' ? 'dialog' : 'tooltip';
|
|
116
127
|
return /*#__PURE__*/_react.default.createElement(_index.default, Object.assign({
|
|
117
|
-
guardFocus: true
|
|
128
|
+
guardFocus: true,
|
|
129
|
+
ref: this.tooltipRef
|
|
118
130
|
}, attr, {
|
|
119
131
|
trigger: trigger,
|
|
120
132
|
position: position,
|
|
@@ -122,9 +122,9 @@ class Progress extends _react.Component {
|
|
|
122
122
|
percentNumber
|
|
123
123
|
} = this.state;
|
|
124
124
|
const classNames = {
|
|
125
|
-
wrapper: (0, _classnames.default)(
|
|
126
|
-
svg: (0, _classnames.default)(
|
|
127
|
-
circle: (0, _classnames.default)(
|
|
125
|
+
wrapper: (0, _classnames.default)(`${prefixCls}-circle`, className),
|
|
126
|
+
svg: (0, _classnames.default)(`${prefixCls}-circle-ring`),
|
|
127
|
+
circle: (0, _classnames.default)(`${prefixCls}-circle-ring-inner`)
|
|
128
128
|
};
|
|
129
129
|
const perc = this.calcPercent(percent);
|
|
130
130
|
const percNumber = this.calcPercent(percentNumber);
|
|
@@ -147,7 +147,7 @@ class Progress extends _react.Component {
|
|
|
147
147
|
const circumference = radius * 2 * Math.PI;
|
|
148
148
|
const strokeDashoffset = (1 - perc / 100) * circumference; // Offset
|
|
149
149
|
|
|
150
|
-
const strokeDasharray =
|
|
150
|
+
const strokeDasharray = `${circumference} ${circumference}`;
|
|
151
151
|
const text = format(percNumber);
|
|
152
152
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
153
153
|
id: id,
|
|
@@ -190,7 +190,7 @@ class Progress extends _react.Component {
|
|
|
190
190
|
cy: cy,
|
|
191
191
|
"aria-hidden": true
|
|
192
192
|
})), showInfo && size !== 'small' ? /*#__PURE__*/_react.default.createElement("span", {
|
|
193
|
-
className:
|
|
193
|
+
className: `${prefixCls}-circle-text`
|
|
194
194
|
}, text) : null);
|
|
195
195
|
}
|
|
196
196
|
|
|
@@ -243,14 +243,14 @@ class Progress extends _react.Component {
|
|
|
243
243
|
percentNumber
|
|
244
244
|
} = this.state;
|
|
245
245
|
const progressWrapperCls = (0, _classnames.default)(prefixCls, className, {
|
|
246
|
-
[
|
|
247
|
-
[
|
|
248
|
-
[
|
|
246
|
+
[`${prefixCls}-horizontal`]: direction === _constants.strings.DEFAULT_DIRECTION,
|
|
247
|
+
[`${prefixCls}-vertical`]: direction !== _constants.strings.DEFAULT_DIRECTION,
|
|
248
|
+
[`${prefixCls}-large`]: size === 'large'
|
|
249
249
|
});
|
|
250
250
|
const progressTrackCls = (0, _classnames.default)({
|
|
251
|
-
[
|
|
251
|
+
[`${prefixCls}-track`]: true
|
|
252
252
|
});
|
|
253
|
-
const innerCls = (0, _classnames.default)(
|
|
253
|
+
const innerCls = (0, _classnames.default)(`${prefixCls}-track-inner`);
|
|
254
254
|
const perc = this.calcPercent(percent);
|
|
255
255
|
const percNumber = this.calcPercent(percentNumber); // parse stroke & generate gradients
|
|
256
256
|
|
|
@@ -261,9 +261,9 @@ class Progress extends _react.Component {
|
|
|
261
261
|
};
|
|
262
262
|
|
|
263
263
|
if (direction === _constants.strings.DEFAULT_DIRECTION) {
|
|
264
|
-
innerStyle.width =
|
|
264
|
+
innerStyle.width = `${perc}%`;
|
|
265
265
|
} else {
|
|
266
|
-
innerStyle.height =
|
|
266
|
+
innerStyle.height = `${perc}%`;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
const text = format(percNumber);
|
|
@@ -289,7 +289,7 @@ class Progress extends _react.Component {
|
|
|
289
289
|
style: innerStyle,
|
|
290
290
|
"aria-hidden": true
|
|
291
291
|
})), showInfo ? /*#__PURE__*/_react.default.createElement("div", {
|
|
292
|
-
className:
|
|
292
|
+
className: `${prefixCls}-line-text`
|
|
293
293
|
}, text) : null);
|
|
294
294
|
}
|
|
295
295
|
|
|
@@ -335,7 +335,7 @@ Progress.propTypes = {
|
|
|
335
335
|
Progress.defaultProps = {
|
|
336
336
|
className: '',
|
|
337
337
|
direction: _constants.strings.DEFAULT_DIRECTION,
|
|
338
|
-
format: text =>
|
|
338
|
+
format: text => `${text}%`,
|
|
339
339
|
motion: true,
|
|
340
340
|
orbitStroke: 'var(--semi-color-fill-0)',
|
|
341
341
|
percent: 0,
|
package/lib/cjs/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
|
};
|
package/lib/cjs/radio/radio.js
CHANGED
|
@@ -194,29 +194,29 @@ class Radio extends _baseComponent.default {
|
|
|
194
194
|
const prefix = realPrefixCls || _constants.radioClasses.PREFIX;
|
|
195
195
|
const focusOuter = isCardRadioGroup || isPureCardRadioGroup || isButtonRadio;
|
|
196
196
|
const wrapper = (0, _classnames.default)(prefix, {
|
|
197
|
-
[
|
|
198
|
-
[
|
|
199
|
-
[
|
|
200
|
-
[
|
|
201
|
-
[
|
|
202
|
-
[
|
|
203
|
-
[
|
|
204
|
-
[
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
[
|
|
197
|
+
[`${prefix}-disabled`]: isDisabled,
|
|
198
|
+
[`${prefix}-checked`]: realChecked,
|
|
199
|
+
[`${prefix}-${displayMode}`]: Boolean(displayMode),
|
|
200
|
+
[`${prefix}-buttonRadioComponent`]: isButtonRadioComponent,
|
|
201
|
+
[`${prefix}-buttonRadioGroup`]: isButtonRadioGroup,
|
|
202
|
+
[`${prefix}-buttonRadioGroup-${buttonSize}`]: isButtonRadioGroup && buttonSize,
|
|
203
|
+
[`${prefix}-cardRadioGroup`]: isCardRadioGroup,
|
|
204
|
+
[`${prefix}-cardRadioGroup_disabled`]: isDisabled && isCardRadioGroup,
|
|
205
|
+
[`${prefix}-cardRadioGroup_checked`]: isCardRadioGroup && realChecked && !isDisabled,
|
|
206
|
+
[`${prefix}-cardRadioGroup_checked_disabled`]: isCardRadioGroup && realChecked && isDisabled,
|
|
207
|
+
[`${prefix}-cardRadioGroup_hover`]: isCardRadioGroup && !realChecked && isHover && !isDisabled,
|
|
208
208
|
[className]: Boolean(className),
|
|
209
|
-
[
|
|
209
|
+
[`${prefix}-focus`]: focusVisible && (isCardRadioGroup || isPureCardRadioGroup)
|
|
210
210
|
});
|
|
211
211
|
const groupName = this.isInGroup() && this.context.radioGroup.name;
|
|
212
212
|
const addonCls = (0, _classnames.default)({
|
|
213
|
-
[
|
|
214
|
-
[
|
|
215
|
-
[
|
|
216
|
-
[
|
|
217
|
-
[
|
|
218
|
-
[
|
|
219
|
-
[
|
|
213
|
+
[`${prefix}-addon`]: !isButtonRadio,
|
|
214
|
+
[`${prefix}-addon-buttonRadio`]: isButtonRadio,
|
|
215
|
+
[`${prefix}-addon-buttonRadio-checked`]: isButtonRadio && realChecked,
|
|
216
|
+
[`${prefix}-addon-buttonRadio-disabled`]: isButtonRadio && isDisabled,
|
|
217
|
+
[`${prefix}-addon-buttonRadio-hover`]: isButtonRadio && !realChecked && !isDisabled && isHover,
|
|
218
|
+
[`${prefix}-addon-buttonRadio-${buttonSize}`]: isButtonRadio && buttonSize,
|
|
219
|
+
[`${prefix}-focus`]: focusVisible && isButtonRadio
|
|
220
220
|
}, addonClassName);
|
|
221
221
|
|
|
222
222
|
const renderContent = () => {
|
|
@@ -225,8 +225,8 @@ class Radio extends _baseComponent.default {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
228
|
-
className: (0, _classnames.default)([
|
|
229
|
-
[
|
|
228
|
+
className: (0, _classnames.default)([`${prefix}-content`, {
|
|
229
|
+
[`${prefix}-isCardRadioGroup_content`]: isCardRadioGroup
|
|
230
230
|
}])
|
|
231
231
|
}, children ? /*#__PURE__*/_react.default.createElement("span", {
|
|
232
232
|
className: addonCls,
|
|
@@ -234,7 +234,7 @@ class Radio extends _baseComponent.default {
|
|
|
234
234
|
id: addonId,
|
|
235
235
|
"x-semi-prop": "children"
|
|
236
236
|
}, children) : null, extra && !isButtonRadio ? /*#__PURE__*/_react.default.createElement("div", {
|
|
237
|
-
className:
|
|
237
|
+
className: `${prefix}-extra`,
|
|
238
238
|
id: extraId,
|
|
239
239
|
"x-semi-prop": "extra"
|
|
240
240
|
}, extra) : null);
|
|
@@ -48,7 +48,7 @@ declare class RadioGroup extends BaseComponent<RadioGroupProps, RadioGroupState>
|
|
|
48
48
|
disabled: PropTypes.Requireable<boolean>;
|
|
49
49
|
name: PropTypes.Requireable<string>;
|
|
50
50
|
options: PropTypes.Requireable<any[]>;
|
|
51
|
-
buttonSize: PropTypes.Requireable<"small" | "
|
|
51
|
+
buttonSize: PropTypes.Requireable<"small" | "large" | "middle">;
|
|
52
52
|
type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
|
|
53
53
|
value: PropTypes.Requireable<any>;
|
|
54
54
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -96,11 +96,11 @@ class RadioGroup extends _baseComponent.default {
|
|
|
96
96
|
const prefix = prefixCls || _constants.radioGroupClasses.PREFIX;
|
|
97
97
|
const prefixClsDisplay = (0, _classnames.default)(className, {
|
|
98
98
|
[prefix]: true,
|
|
99
|
-
[
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[
|
|
99
|
+
[`${prefix}-wrapper`]: true,
|
|
100
|
+
[`${prefix}-${direction}`]: direction && !isButtonRadio,
|
|
101
|
+
[`${prefix}-${direction}-default`]: direction && isDefaultRadio,
|
|
102
|
+
[`${prefix}-${direction}-card`]: direction && isCardRadio,
|
|
103
|
+
[`${prefix}-buttonRadio`]: isButtonRadio
|
|
104
104
|
});
|
|
105
105
|
const realValue = this.state.value;
|
|
106
106
|
let inner;
|
|
@@ -99,15 +99,15 @@ class RadioInner extends _baseComponent.default {
|
|
|
99
99
|
} = this.state;
|
|
100
100
|
const prefix = this.props.prefixCls || _constants.radioClasses.PREFIX;
|
|
101
101
|
const wrapper = (0, _classnames.default)({
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[
|
|
102
|
+
[`${prefix}-inner`]: true,
|
|
103
|
+
[`${prefix}-inner-checked`]: Boolean(checked),
|
|
104
|
+
[`${prefix}-inner-buttonRadio`]: isButtonRadio,
|
|
105
|
+
[`${prefix}-inner-pureCardRadio`]: isPureCardRadioGroup
|
|
106
106
|
});
|
|
107
107
|
const inner = (0, _classnames.default)({
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
[
|
|
108
|
+
[`${prefix}-focus`]: focusInner,
|
|
109
|
+
[`${prefix}-focus-border`]: focusInner && !checked,
|
|
110
|
+
[`${prefix}-inner-display`]: !isButtonRadio
|
|
111
111
|
});
|
|
112
112
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
113
113
|
className: wrapper
|
package/lib/cjs/rating/index.js
CHANGED
|
@@ -140,7 +140,7 @@ class Rating extends _baseComponent.default {
|
|
|
140
140
|
ref: this.saveRef(ind),
|
|
141
141
|
index: ind,
|
|
142
142
|
count: count,
|
|
143
|
-
prefixCls:
|
|
143
|
+
prefixCls: `${prefixCls}-star`,
|
|
144
144
|
allowHalf: allowHalf,
|
|
145
145
|
value: hoverValue === undefined ? value : hoverValue,
|
|
146
146
|
onClick: disabled ? _function.noop : this.onClick,
|
|
@@ -162,7 +162,7 @@ class Rating extends _baseComponent.default {
|
|
|
162
162
|
visible: showTips,
|
|
163
163
|
trigger: "custom",
|
|
164
164
|
content: text,
|
|
165
|
-
key:
|
|
165
|
+
key: `${ind}-${showTips}`
|
|
166
166
|
}, content);
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -300,11 +300,11 @@ class Rating extends _baseComponent.default {
|
|
|
300
300
|
emptyStarFocusVisible
|
|
301
301
|
} = this.state;
|
|
302
302
|
const ariaLabelPrefix = this.getAriaLabelPrefix();
|
|
303
|
-
const ariaLabel =
|
|
303
|
+
const ariaLabel = `Rating: ${value} of ${count} ${ariaLabelPrefix}${value === 1 ? '' : 's'},`;
|
|
304
304
|
const itemList = this.getItemList(ariaLabelPrefix);
|
|
305
305
|
const listCls = (0, _classnames.default)(prefixCls, {
|
|
306
|
-
[
|
|
307
|
-
[
|
|
306
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
307
|
+
[`${prefixCls}-focus`]: emptyStarFocusVisible
|
|
308
308
|
}, className);
|
|
309
309
|
return (
|
|
310
310
|
/*#__PURE__*/
|
package/lib/cjs/rating/item.js
CHANGED
|
@@ -145,9 +145,9 @@ class Item extends _baseComponent.default {
|
|
|
145
145
|
const isFull = starValue <= value;
|
|
146
146
|
const isCustomSize = typeof size === 'number';
|
|
147
147
|
const starCls = (0, _classnames.default)(prefixCls, {
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
148
|
+
[`${prefixCls}-half`]: isHalf,
|
|
149
|
+
[`${prefixCls}-full`]: isFull,
|
|
150
|
+
[`${prefixCls}-${size}`]: !isCustomSize
|
|
151
151
|
});
|
|
152
152
|
const sizeStyle = isCustomSize ? {
|
|
153
153
|
width: size,
|
|
@@ -162,9 +162,9 @@ class Item extends _baseComponent.default {
|
|
|
162
162
|
}
|
|
163
163
|
});
|
|
164
164
|
const isEmpty = index === count;
|
|
165
|
-
const starWrapCls = (0, _classnames.default)(
|
|
166
|
-
[
|
|
167
|
-
[
|
|
165
|
+
const starWrapCls = (0, _classnames.default)(`${prefixCls}-wrapper`, {
|
|
166
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
167
|
+
[`${_constants.cssClasses.PREFIX}-focus`]: (firstStarFocus || secondStarFocus) && value !== 0
|
|
168
168
|
});
|
|
169
169
|
const starWrapProps = {
|
|
170
170
|
onClick: disabled ? null : this.onClick,
|
|
@@ -180,10 +180,10 @@ class Item extends _baseComponent.default {
|
|
|
180
180
|
'aria-posinset': 2 * index + 1,
|
|
181
181
|
'aria-setsize': AriaSetSize,
|
|
182
182
|
'aria-disabled': disabled,
|
|
183
|
-
'aria-label':
|
|
183
|
+
'aria-label': `${index + 0.5} ${ariaLabelPrefix}s`,
|
|
184
184
|
'aria-labelledby': this.props['aria-describedby'],
|
|
185
185
|
'aria-describedby': this.props['aria-describedby'],
|
|
186
|
-
className: (0, _classnames.default)(
|
|
186
|
+
className: (0, _classnames.default)(`${prefixCls}-first`, `${_constants.cssClasses.PREFIX}-no-focus`),
|
|
187
187
|
tabIndex: !disabled && value === index + 0.5 ? 0 : -1,
|
|
188
188
|
onFocus: e => {
|
|
189
189
|
this.onFocus(e, 'first');
|
|
@@ -200,10 +200,10 @@ class Item extends _baseComponent.default {
|
|
|
200
200
|
'aria-posinset': allowHalf ? 2 * (index + 1) : index + 1,
|
|
201
201
|
'aria-setsize': AriaSetSize,
|
|
202
202
|
'aria-disabled': disabled,
|
|
203
|
-
'aria-label':
|
|
203
|
+
'aria-label': `${isEmpty ? 0 : index + 1} ${ariaLabelPrefix}${index === 0 ? '' : 's'}`,
|
|
204
204
|
'aria-labelledby': this.props['aria-describedby'],
|
|
205
205
|
'aria-describedby': this.props['aria-describedby'],
|
|
206
|
-
className: (0, _classnames.default)(
|
|
206
|
+
className: (0, _classnames.default)(`${prefixCls}-second`, `${_constants.cssClasses.PREFIX}-no-focus`),
|
|
207
207
|
tabIndex: secondStarTabIndex,
|
|
208
208
|
onFocus: e => {
|
|
209
209
|
this.onFocus(e, 'second');
|
|
@@ -218,7 +218,7 @@ class Item extends _baseComponent.default {
|
|
|
218
218
|
key: index
|
|
219
219
|
}, /*#__PURE__*/_react.default.createElement("div", Object.assign({}, starWrapProps), allowHalf && !isEmpty && /*#__PURE__*/_react.default.createElement("div", Object.assign({}, firstStarProps, {
|
|
220
220
|
style: {
|
|
221
|
-
width:
|
|
221
|
+
width: `${firstWidth * 100}%`
|
|
222
222
|
}
|
|
223
223
|
}), content), /*#__PURE__*/_react.default.createElement("div", Object.assign({}, secondStarProps, {
|
|
224
224
|
"x-semi-prop": "character"
|
|
@@ -44,7 +44,7 @@ class ScrollList extends _baseComponent.default {
|
|
|
44
44
|
[prefixCls || _constants.cssClasses.PREFIX]: true
|
|
45
45
|
});
|
|
46
46
|
const clsHeader = (0, _classnames.default)({
|
|
47
|
-
[
|
|
47
|
+
[`${prefixCls || _constants.cssClasses.PREFIX}-header`]: true
|
|
48
48
|
});
|
|
49
49
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
50
50
|
className: clsWrapper,
|
|
@@ -52,18 +52,18 @@ class ScrollList extends _baseComponent.default {
|
|
|
52
52
|
}, header ? /*#__PURE__*/_react.default.createElement("div", {
|
|
53
53
|
className: clsHeader
|
|
54
54
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
-
className:
|
|
55
|
+
className: `${clsHeader}-title`,
|
|
56
56
|
"x-semi-prop": this.props['x-semi-header-alias'] || "header"
|
|
57
57
|
}, header), /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
-
className:
|
|
58
|
+
className: `${clsWrapper}-line`
|
|
59
59
|
})) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
-
className:
|
|
60
|
+
className: `${clsWrapper}-body`,
|
|
61
61
|
style: {
|
|
62
62
|
height: bodyHeight ? bodyHeight : ''
|
|
63
63
|
},
|
|
64
64
|
"x-semi-prop": "children"
|
|
65
65
|
}, children), footer ? /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
-
className:
|
|
66
|
+
className: `${clsWrapper}-footer`,
|
|
67
67
|
"x-semi-prop": this.props['x-semi-footer-alias'] || "footer"
|
|
68
68
|
}, footer) : null);
|
|
69
69
|
}
|