@douyinfe/semi-ui 2.29.0 → 2.30.0-alpha.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 +377 -14
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +1962 -1951
- 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 +1 -3
- 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 +4 -8
- 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.js +36 -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/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/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.js +9 -9
- package/lib/cjs/popover/index.d.ts +1 -1
- package/lib/cjs/popover/index.js +2 -2
- 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 +2 -0
- package/lib/cjs/steps/basicStep.js +20 -15
- package/lib/cjs/steps/basicSteps.js +6 -6
- package/lib/cjs/steps/fillStep.d.ts +1 -0
- package/lib/cjs/steps/fillStep.js +11 -10
- package/lib/cjs/steps/fillSteps.js +4 -5
- package/lib/cjs/steps/index.d.ts +4 -1
- package/lib/cjs/steps/navStep.d.ts +3 -0
- package/lib/cjs/steps/navStep.js +26 -8
- package/lib/cjs/steps/navSteps.js +2 -2
- package/lib/cjs/steps/step.d.ts +5 -1
- 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 +1 -1
- package/lib/cjs/tooltip/index.js +7 -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.js +41 -41
- 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 +1 -3
- 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 +4 -8
- 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.js +36 -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/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/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.js +9 -9
- package/lib/es/popover/index.d.ts +1 -1
- package/lib/es/popover/index.js +2 -2
- 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 +2 -0
- package/lib/es/steps/basicStep.js +20 -15
- package/lib/es/steps/basicSteps.js +6 -6
- package/lib/es/steps/fillStep.d.ts +1 -0
- package/lib/es/steps/fillStep.js +11 -10
- package/lib/es/steps/fillSteps.js +4 -5
- package/lib/es/steps/index.d.ts +4 -1
- package/lib/es/steps/navStep.d.ts +3 -0
- package/lib/es/steps/navStep.js +21 -8
- package/lib/es/steps/navSteps.js +2 -2
- package/lib/es/steps/step.d.ts +5 -1
- 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 +1 -1
- package/lib/es/tooltip/index.js +7 -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.js +41 -41
- 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 +8 -8
package/lib/es/tag/group.js
CHANGED
|
@@ -33,7 +33,7 @@ export default class TagGroup extends PureComponent {
|
|
|
33
33
|
trigger: "hover",
|
|
34
34
|
position: "top",
|
|
35
35
|
autoAdjustOverflow: true,
|
|
36
|
-
className:
|
|
36
|
+
className: "".concat(prefixCls, "-rest-group-popover")
|
|
37
37
|
}, popoverProps, {
|
|
38
38
|
key: "_+n_Popover"
|
|
39
39
|
}), nTag);
|
|
@@ -116,10 +116,10 @@ export default class TagGroup extends PureComponent {
|
|
|
116
116
|
size
|
|
117
117
|
} = this.props;
|
|
118
118
|
const groupCls = classNames({
|
|
119
|
-
[
|
|
120
|
-
[
|
|
121
|
-
[
|
|
122
|
-
[
|
|
119
|
+
["".concat(prefixCls, "-group")]: true,
|
|
120
|
+
["".concat(prefixCls, "-group-max")]: maxTagCount,
|
|
121
|
+
["".concat(prefixCls, "-group-small")]: size === 'small',
|
|
122
|
+
["".concat(prefixCls, "-group-large")]: size === 'large'
|
|
123
123
|
}, className);
|
|
124
124
|
const tags = this.renderAllTags();
|
|
125
125
|
const tagContents = typeof maxTagCount === 'undefined' ? tags : this.renderMergeTags(tags);
|
package/lib/es/tag/index.js
CHANGED
|
@@ -146,16 +146,16 @@ export default class Tag extends Component {
|
|
|
146
146
|
const baseProps = Object.assign(Object.assign({}, attr), {
|
|
147
147
|
onClick,
|
|
148
148
|
className: classNames(prefixCls, {
|
|
149
|
-
[
|
|
150
|
-
[
|
|
151
|
-
[
|
|
152
|
-
[
|
|
153
|
-
[
|
|
154
|
-
[
|
|
155
|
-
[
|
|
156
|
-
[
|
|
157
|
-
[
|
|
158
|
-
[
|
|
149
|
+
["".concat(prefixCls, "-default")]: size === 'default',
|
|
150
|
+
["".concat(prefixCls, "-small")]: size === 'small',
|
|
151
|
+
["".concat(prefixCls, "-large")]: size === 'large',
|
|
152
|
+
["".concat(prefixCls, "-square")]: shape === 'square',
|
|
153
|
+
["".concat(prefixCls, "-circle")]: shape === 'circle',
|
|
154
|
+
["".concat(prefixCls, "-").concat(type)]: type,
|
|
155
|
+
["".concat(prefixCls, "-").concat(color, "-").concat(type)]: color && type,
|
|
156
|
+
["".concat(prefixCls, "-closable")]: closable,
|
|
157
|
+
["".concat(prefixCls, "-invisible")]: !isVisible,
|
|
158
|
+
["".concat(prefixCls, "-avatar-").concat(avatarShape)]: avatarSrc
|
|
159
159
|
}, className)
|
|
160
160
|
});
|
|
161
161
|
const wrapProps = clickable ? Object.assign(Object.assign({}, baseProps), a11yProps) : baseProps;
|
|
@@ -163,15 +163,15 @@ export default class Tag extends Component {
|
|
|
163
163
|
/*#__PURE__*/
|
|
164
164
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
165
165
|
React.createElement("div", {
|
|
166
|
-
className:
|
|
166
|
+
className: "".concat(prefixCls, "-close"),
|
|
167
167
|
onClick: e => this.close(e, children, tagKey)
|
|
168
168
|
}, /*#__PURE__*/React.createElement(IconClose, {
|
|
169
169
|
size: "small"
|
|
170
170
|
})) : null;
|
|
171
171
|
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
172
|
-
"aria-label": this.props['aria-label'] || _isString(children) ?
|
|
172
|
+
"aria-label": this.props['aria-label'] || _isString(children) ? "".concat(closable ? 'Closable ' : '', "Tag: ").concat(children) : ''
|
|
173
173
|
}, wrapProps), avatarSrc ? this.renderAvatar() : null, /*#__PURE__*/React.createElement("div", {
|
|
174
|
-
className:
|
|
174
|
+
className: "".concat(prefixCls, "-content")
|
|
175
175
|
}, children), closeIcon);
|
|
176
176
|
}
|
|
177
177
|
|
package/lib/es/tagInput/index.js
CHANGED
|
@@ -25,7 +25,7 @@ const SortableList = SortableContainer(_ref => {
|
|
|
25
25
|
items
|
|
26
26
|
} = _ref;
|
|
27
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
className:
|
|
28
|
+
className: "".concat(prefixCls, "-sortable-list")
|
|
29
29
|
}, items.map((item, index) =>
|
|
30
30
|
/*#__PURE__*/
|
|
31
31
|
// @ts-ignore skip SortableItem type check
|
|
@@ -103,22 +103,22 @@ class TagInput extends BaseComponent {
|
|
|
103
103
|
active
|
|
104
104
|
} = this.state;
|
|
105
105
|
const showIconHandler = active && draggable;
|
|
106
|
-
const tagCls = cls(
|
|
107
|
-
[
|
|
108
|
-
[
|
|
106
|
+
const tagCls = cls("".concat(prefixCls, "-wrapper-tag"), {
|
|
107
|
+
["".concat(prefixCls, "-wrapper-tag-size-").concat(size)]: size,
|
|
108
|
+
["".concat(prefixCls, "-wrapper-tag-icon")]: showIconHandler
|
|
109
109
|
});
|
|
110
|
-
const typoCls = cls(
|
|
111
|
-
[
|
|
110
|
+
const typoCls = cls("".concat(prefixCls, "-wrapper-typo"), {
|
|
111
|
+
["".concat(prefixCls, "-wrapper-typo-disabled")]: disabled
|
|
112
112
|
});
|
|
113
113
|
const itemWrapperCls = cls({
|
|
114
|
-
[
|
|
115
|
-
[
|
|
114
|
+
["".concat(prefixCls, "-drag-item")]: showIconHandler,
|
|
115
|
+
["".concat(prefixCls, "-wrapper-tag-icon")]: showIconHandler
|
|
116
116
|
});
|
|
117
117
|
const DragHandle = SortableHandle(() => /*#__PURE__*/React.createElement(IconHandle, {
|
|
118
|
-
className:
|
|
118
|
+
className: "".concat(prefixCls, "-drag-handler")
|
|
119
119
|
}));
|
|
120
120
|
return tagsArray.map((value, index) => {
|
|
121
|
-
const elementKey = showIconHandler ? value :
|
|
121
|
+
const elementKey = showIconHandler ? value : "".concat(index).concat(value);
|
|
122
122
|
|
|
123
123
|
const onClose = () => {
|
|
124
124
|
!disabled && this.handleTagClose(index);
|
|
@@ -139,9 +139,9 @@ class TagInput extends BaseComponent {
|
|
|
139
139
|
closable: !disabled,
|
|
140
140
|
key: elementKey,
|
|
141
141
|
visible: true,
|
|
142
|
-
"aria-label":
|
|
142
|
+
"aria-label": "".concat(!disabled ? 'Closable ' : '', "Tag: ").concat(value)
|
|
143
143
|
}, /*#__PURE__*/React.createElement("div", {
|
|
144
|
-
className:
|
|
144
|
+
className: "".concat(prefixCls, "-tag-content-wrapper")
|
|
145
145
|
}, showIconHandler && /*#__PURE__*/React.createElement(DragHandle, null), /*#__PURE__*/React.createElement(Paragraph, {
|
|
146
146
|
className: typoCls,
|
|
147
147
|
ellipsis: {
|
|
@@ -325,8 +325,8 @@ class TagInput extends BaseComponent {
|
|
|
325
325
|
disabled,
|
|
326
326
|
clearIcon
|
|
327
327
|
} = this.props;
|
|
328
|
-
const clearCls = cls(
|
|
329
|
-
[
|
|
328
|
+
const clearCls = cls("".concat(prefixCls, "-clearBtn"), {
|
|
329
|
+
["".concat(prefixCls, "-clearBtn-invisible")]: !hovering || inputValue === '' && tagsArray.length === 0 || disabled
|
|
330
330
|
});
|
|
331
331
|
|
|
332
332
|
if (showClear) {
|
|
@@ -355,11 +355,11 @@ class TagInput extends BaseComponent {
|
|
|
355
355
|
return null;
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
const prefixWrapperCls = cls(
|
|
359
|
-
[
|
|
360
|
-
[
|
|
358
|
+
const prefixWrapperCls = cls("".concat(prefixCls, "-prefix"), {
|
|
359
|
+
["".concat(prefixCls, "-inset-label")]: insetLabel,
|
|
360
|
+
["".concat(prefixCls, "-prefix-text")]: labelNode && _isString(labelNode),
|
|
361
361
|
// eslint-disable-next-line max-len
|
|
362
|
-
[
|
|
362
|
+
["".concat(prefixCls, "-prefix-icon")]: isSemiIcon(labelNode)
|
|
363
363
|
});
|
|
364
364
|
return (
|
|
365
365
|
/*#__PURE__*/
|
|
@@ -383,10 +383,10 @@ class TagInput extends BaseComponent {
|
|
|
383
383
|
return null;
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
const suffixWrapperCls = cls(
|
|
387
|
-
[
|
|
386
|
+
const suffixWrapperCls = cls("".concat(prefixCls, "-suffix"), {
|
|
387
|
+
["".concat(prefixCls, "-suffix-text")]: suffix && _isString(suffix),
|
|
388
388
|
// eslint-disable-next-line max-len
|
|
389
|
-
[
|
|
389
|
+
["".concat(prefixCls, "-suffix-icon")]: isSemiIcon(suffix)
|
|
390
390
|
});
|
|
391
391
|
return (
|
|
392
392
|
/*#__PURE__*/
|
|
@@ -413,8 +413,8 @@ class TagInput extends BaseComponent {
|
|
|
413
413
|
tagsArray,
|
|
414
414
|
active
|
|
415
415
|
} = this.state;
|
|
416
|
-
const restTagsCls = cls(
|
|
417
|
-
[
|
|
416
|
+
const restTagsCls = cls("".concat(prefixCls, "-wrapper-n"), {
|
|
417
|
+
["".concat(prefixCls, "-wrapper-n-disabled")]: disabled
|
|
418
418
|
});
|
|
419
419
|
const allTags = this.getAllTags();
|
|
420
420
|
let restTags = [];
|
|
@@ -438,7 +438,7 @@ class TagInput extends BaseComponent {
|
|
|
438
438
|
// @ts-ignore skip SortableItem type check
|
|
439
439
|
return /*#__PURE__*/React.createElement(SortableList, {
|
|
440
440
|
useDragHandle: true,
|
|
441
|
-
helperClass:
|
|
441
|
+
helperClass: "".concat(prefixCls, "-drag-item-move"),
|
|
442
442
|
items: sortableListItems,
|
|
443
443
|
onSortEnd: this.onSortEnd,
|
|
444
444
|
axis: "xy"
|
|
@@ -492,16 +492,16 @@ class TagInput extends BaseComponent {
|
|
|
492
492
|
active
|
|
493
493
|
} = this.state;
|
|
494
494
|
const tagInputCls = cls(prefixCls, className, {
|
|
495
|
-
[
|
|
496
|
-
[
|
|
497
|
-
[
|
|
498
|
-
[
|
|
499
|
-
[
|
|
500
|
-
[
|
|
501
|
-
[
|
|
495
|
+
["".concat(prefixCls, "-focus")]: focusing || active,
|
|
496
|
+
["".concat(prefixCls, "-disabled")]: disabled,
|
|
497
|
+
["".concat(prefixCls, "-hover")]: hovering && !disabled,
|
|
498
|
+
["".concat(prefixCls, "-error")]: validateStatus === 'error',
|
|
499
|
+
["".concat(prefixCls, "-warning")]: validateStatus === 'warning',
|
|
500
|
+
["".concat(prefixCls, "-small")]: size === 'small',
|
|
501
|
+
["".concat(prefixCls, "-large")]: size === 'large'
|
|
502
502
|
});
|
|
503
|
-
const inputCls = cls(
|
|
504
|
-
const wrapperCls = cls(
|
|
503
|
+
const inputCls = cls("".concat(prefixCls, "-wrapper-input"), "".concat(prefixCls, "-wrapper-input-").concat(size));
|
|
504
|
+
const wrapperCls = cls("".concat(prefixCls, "-wrapper"));
|
|
505
505
|
return (
|
|
506
506
|
/*#__PURE__*/
|
|
507
507
|
// eslint-disable-next-line
|
|
@@ -141,7 +141,7 @@ class Combobox extends BaseComponent {
|
|
|
141
141
|
|
|
142
142
|
const transformHour = value => value + locale.hour;
|
|
143
143
|
|
|
144
|
-
const className =
|
|
144
|
+
const className = "".concat(prefixCls, "-list-hour");
|
|
145
145
|
return /*#__PURE__*/React.createElement(ScrollItem, Object.assign({
|
|
146
146
|
ref: current => this.cacheRefCurrent('hour', current),
|
|
147
147
|
mode: 'normal',
|
|
@@ -172,7 +172,7 @@ class Combobox extends BaseComponent {
|
|
|
172
172
|
|
|
173
173
|
const value = new Date(timeStampValue);
|
|
174
174
|
const disabledOptions = disabledMinutes && disabledMinutes(value.getHours());
|
|
175
|
-
const className =
|
|
175
|
+
const className = "".concat(prefixCls, "-list-minute");
|
|
176
176
|
|
|
177
177
|
const transformMinute = min => min + locale.minute;
|
|
178
178
|
|
|
@@ -206,7 +206,7 @@ class Combobox extends BaseComponent {
|
|
|
206
206
|
|
|
207
207
|
const value = new Date(timeStampValue);
|
|
208
208
|
const disabledOptions = disabledSeconds && disabledSeconds(value.getHours(), value.getMinutes());
|
|
209
|
-
const className =
|
|
209
|
+
const className = "".concat(prefixCls, "-list-second");
|
|
210
210
|
|
|
211
211
|
const transformSecond = sec => String(sec) + locale.second;
|
|
212
212
|
|
|
@@ -242,7 +242,7 @@ class Combobox extends BaseComponent {
|
|
|
242
242
|
text: locale.PM || '下午'
|
|
243
243
|
}];
|
|
244
244
|
const selected = isAM ? 0 : 1;
|
|
245
|
-
const className =
|
|
245
|
+
const className = "".concat(prefixCls, "-list-ampm");
|
|
246
246
|
return /*#__PURE__*/React.createElement(ScrollItem, Object.assign({
|
|
247
247
|
ref: current => this.cacheRefCurrent('ampm', current),
|
|
248
248
|
mode: 'normal',
|
|
@@ -126,9 +126,9 @@ class TimeInput extends BaseComponent {
|
|
|
126
126
|
rest = __rest(_a, ["prefixCls", "placeholder", "inputReadOnly", "onFocus", "disabled", "type", "locale", "localeCode", "insetLabel", "validateStatus", "value", "onChange", "invalid", "format", "clearText", "disabledHours", "disabledMinutes", "disabledSeconds", "onEsc", "defaultOpenValue", "currentSelectPanel", "focusOnOpen", "timeStampValue", "timeZone", "defaultOpen", "dateFnsLocale"]); // const { focusing } = this.state;
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
const inputCls = classNames(
|
|
130
|
-
[
|
|
131
|
-
[
|
|
129
|
+
const inputCls = classNames("".concat(prefixCls, "-input"), {
|
|
130
|
+
["".concat(prefixCls, "-input-invalid")]: invalid,
|
|
131
|
+
["".concat(prefixCls, "-input-readonly")]: inputReadOnly
|
|
132
132
|
});
|
|
133
133
|
const mergeValidateStatus = invalid ? 'error' : validateStatus;
|
|
134
134
|
return /*#__PURE__*/React.createElement(Input, Object.assign({}, rest, {
|
|
@@ -155,7 +155,7 @@ class TimeInput extends BaseComponent {
|
|
|
155
155
|
prefixCls
|
|
156
156
|
} = this.props;
|
|
157
157
|
return /*#__PURE__*/React.createElement("div", {
|
|
158
|
-
className:
|
|
158
|
+
className: "".concat(prefixCls, "-input-wrap")
|
|
159
159
|
}, this.getInput());
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -197,7 +197,7 @@ export default class TimePicker extends BaseComponent {
|
|
|
197
197
|
format: format,
|
|
198
198
|
isAM: isAM[0],
|
|
199
199
|
timeStampValue: value[0],
|
|
200
|
-
prefixCls:
|
|
200
|
+
prefixCls: "".concat(prefixCls, "-panel"),
|
|
201
201
|
onChange: v => this.handlePanelChange(v, 0),
|
|
202
202
|
onCurrentSelectPanelChange: this.onCurrentSelectPanelChange
|
|
203
203
|
}, this.createPanelProps(0)))];
|
|
@@ -208,7 +208,7 @@ export default class TimePicker extends BaseComponent {
|
|
|
208
208
|
format: format,
|
|
209
209
|
isAM: isAM[1],
|
|
210
210
|
timeStampValue: value[1],
|
|
211
|
-
prefixCls:
|
|
211
|
+
prefixCls: "".concat(prefixCls, "-panel"),
|
|
212
212
|
onChange: v => this.handlePanelChange(v, 1),
|
|
213
213
|
onCurrentSelectPanelChange: this.onCurrentSelectPanelChange
|
|
214
214
|
}, this.createPanelProps(1))));
|
|
@@ -252,10 +252,10 @@ export default class TimePicker extends BaseComponent {
|
|
|
252
252
|
selectColumnCount += 1;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
return classNames(
|
|
256
|
-
[
|
|
255
|
+
return classNames("".concat(prefixCls, "-panel"), popupClassName, {
|
|
256
|
+
["".concat(prefixCls, "-panel-narrow")]: (!showHour || !showMinute || !showSecond) && !use12Hours,
|
|
257
257
|
[cssClasses.RANGE_PICKER]: this.adapter.isRangePicker()
|
|
258
|
-
},
|
|
258
|
+
}, "".concat(prefixCls, "-panel-column-").concat(selectColumnCount));
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
focus() {// TODO this.picker is undefined, confirm keep this func or not
|
|
@@ -315,11 +315,11 @@ export default class TimePicker extends BaseComponent {
|
|
|
315
315
|
} = this.state;
|
|
316
316
|
const popupClassName = this.getPopupClassName();
|
|
317
317
|
const headerPrefix = classNames({
|
|
318
|
-
[
|
|
318
|
+
["".concat(prefixCls, "-header")]: true
|
|
319
319
|
});
|
|
320
320
|
const panelPrefix = classNames({
|
|
321
|
-
[
|
|
322
|
-
[
|
|
321
|
+
["".concat(prefixCls, "-panel")]: true,
|
|
322
|
+
["".concat(prefixCls, "-panel-").concat(size)]: size
|
|
323
323
|
});
|
|
324
324
|
const inputProps = Object.assign(Object.assign({}, rest), {
|
|
325
325
|
disabled,
|
package/lib/es/timeline/index.js
CHANGED
|
@@ -18,26 +18,26 @@ class Timeline extends PureComponent {
|
|
|
18
18
|
|
|
19
19
|
if (mode === 'alternate') {
|
|
20
20
|
if (ele.props.position) {
|
|
21
|
-
return
|
|
21
|
+
return "".concat(prefixCls, "-item-").concat(ele.props.position);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
return idx % 2 === 0 ?
|
|
24
|
+
return idx % 2 === 0 ? "".concat(prefixCls, "-item-left") : "".concat(prefixCls, "-item-right");
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
if (mode === 'center') {
|
|
28
28
|
if (ele.props.position) {
|
|
29
|
-
return
|
|
29
|
+
return "".concat(prefixCls, "-item-").concat(ele.props.position);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
return
|
|
32
|
+
return "".concat(prefixCls, "-item-left");
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
if (mode === 'left' || mode === 'right') {
|
|
36
|
-
return
|
|
36
|
+
return "".concat(prefixCls, "-item-").concat(mode);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
if (ele.props.position) {
|
|
40
|
-
return
|
|
40
|
+
return "".concat(prefixCls, "-item-").concat(ele.props.position);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
return '';
|
|
@@ -64,13 +64,13 @@ class Timeline extends PureComponent {
|
|
|
64
64
|
dataSource
|
|
65
65
|
} = this.props;
|
|
66
66
|
const classString = cls(prefixCls, className, {
|
|
67
|
-
[
|
|
67
|
+
["".concat(prefixCls, "-").concat(mode)]: mode
|
|
68
68
|
});
|
|
69
69
|
let childrenList;
|
|
70
70
|
|
|
71
71
|
if (dataSource && dataSource.length) {
|
|
72
72
|
const items = dataSource.map((item, index) => /*#__PURE__*/React.createElement(Item, Object.assign({
|
|
73
|
-
key:
|
|
73
|
+
key: "timeline-item-".concat(index)
|
|
74
74
|
}, item), item.content));
|
|
75
75
|
childrenList = this.addClassName(items);
|
|
76
76
|
}
|
package/lib/es/timeline/item.js
CHANGED
|
@@ -20,9 +20,9 @@ export default class Item extends PureComponent {
|
|
|
20
20
|
} = this.props;
|
|
21
21
|
const itemCls = cls(prefixCls, className);
|
|
22
22
|
const dotCls = cls({
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
23
|
+
["".concat(prefixCls, "-head")]: true,
|
|
24
|
+
["".concat(prefixCls, "-head-custom")]: dot,
|
|
25
|
+
["".concat(prefixCls, "-head-").concat(type)]: type
|
|
26
26
|
});
|
|
27
27
|
const dotStyle = color ? {
|
|
28
28
|
style: {
|
|
@@ -34,17 +34,17 @@ export default class Item extends PureComponent {
|
|
|
34
34
|
style: style,
|
|
35
35
|
onClick: onClick
|
|
36
36
|
}, /*#__PURE__*/React.createElement("div", {
|
|
37
|
-
className:
|
|
37
|
+
className: "".concat(prefixCls, "-tail"),
|
|
38
38
|
"aria-hidden": true
|
|
39
39
|
}), /*#__PURE__*/React.createElement("div", Object.assign({
|
|
40
40
|
className: dotCls,
|
|
41
41
|
"aria-hidden": true
|
|
42
42
|
}, dotStyle), dot), /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className:
|
|
43
|
+
className: "".concat(prefixCls, "-content")
|
|
44
44
|
}, children, extra && /*#__PURE__*/React.createElement("div", {
|
|
45
|
-
className:
|
|
45
|
+
className: "".concat(prefixCls, "-content-extra")
|
|
46
46
|
}, extra), time && /*#__PURE__*/React.createElement("div", {
|
|
47
|
-
className:
|
|
47
|
+
className: "".concat(prefixCls, "-content-time")
|
|
48
48
|
}, time)));
|
|
49
49
|
}
|
|
50
50
|
|
package/lib/es/toast/index.js
CHANGED
|
@@ -56,7 +56,7 @@ const createBaseToast = () => {
|
|
|
56
56
|
['top', 'left', 'bottom', 'right'].map(pos => {
|
|
57
57
|
if (pos in ToastList.defaultOpts || pos in opts) {
|
|
58
58
|
const val = opts[pos] ? opts[pos] : ToastList.defaultOpts[pos];
|
|
59
|
-
div.style[pos] = typeof val === 'number' ?
|
|
59
|
+
div.style[pos] = typeof val === 'number' ? "".concat(val, "px") : val;
|
|
60
60
|
}
|
|
61
61
|
}); // document.body.appendChild(div);
|
|
62
62
|
|
|
@@ -75,10 +75,10 @@ const createBaseToast = () => {
|
|
|
75
75
|
}));
|
|
76
76
|
});
|
|
77
77
|
} else {
|
|
78
|
-
const node = document.querySelector(
|
|
78
|
+
const node = document.querySelector("#".concat(this.wrapperId));
|
|
79
79
|
['top', 'left', 'bottom', 'right'].map(pos => {
|
|
80
80
|
if (pos in opts) {
|
|
81
|
-
node.style[pos] = typeof opts[pos] === 'number' ?
|
|
81
|
+
node.style[pos] = typeof opts[pos] === 'number' ? "".concat(opts[pos], "px") : opts[pos];
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
|
|
@@ -105,7 +105,7 @@ const createBaseToast = () => {
|
|
|
105
105
|
static destroyAll() {
|
|
106
106
|
if (ToastList.ref) {
|
|
107
107
|
ToastList.ref.destroyAll();
|
|
108
|
-
const wrapper = document.querySelector(
|
|
108
|
+
const wrapper = document.querySelector("#".concat(this.wrapperId));
|
|
109
109
|
ReactDOM.unmountComponentAtNode(wrapper);
|
|
110
110
|
wrapper && wrapper.parentNode.removeChild(wrapper);
|
|
111
111
|
ToastList.ref = null;
|
|
@@ -238,7 +238,7 @@ const createBaseToast = () => {
|
|
|
238
238
|
key: item.id,
|
|
239
239
|
motion: item.motion,
|
|
240
240
|
animationState: isRemoved ? "leave" : "enter",
|
|
241
|
-
startClassName: isRemoved ?
|
|
241
|
+
startClassName: isRemoved ? "".concat(cssClasses.PREFIX, "-animation-hide") : "".concat(cssClasses.PREFIX, "-animation-show")
|
|
242
242
|
}, _ref2 => {
|
|
243
243
|
let {
|
|
244
244
|
animationClassName,
|
package/lib/es/toast/toast.js
CHANGED
|
@@ -69,12 +69,12 @@ class Toast extends BaseComponent {
|
|
|
69
69
|
};
|
|
70
70
|
const iconType = iconMap[type];
|
|
71
71
|
const iconSize = 'large';
|
|
72
|
-
const iconCls = cls(
|
|
72
|
+
const iconCls = cls("".concat(prefixCls, "-icon"), "".concat(prefixCls, "-icon-").concat(type));
|
|
73
73
|
|
|
74
74
|
if (icon) {
|
|
75
75
|
return isSemiIcon(icon) ? /*#__PURE__*/React.cloneElement(icon, {
|
|
76
76
|
size: iconSize,
|
|
77
|
-
className:
|
|
77
|
+
className: "".concat(prefixCls, "-icon")
|
|
78
78
|
}) : icon;
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -100,9 +100,9 @@ class Toast extends BaseComponent {
|
|
|
100
100
|
} = this.props;
|
|
101
101
|
const direction = this.props.direction || this.context.direction;
|
|
102
102
|
const toastCls = cls(prefixCls, className, {
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[
|
|
103
|
+
["".concat(prefixCls, "-").concat(type)]: true,
|
|
104
|
+
["".concat(prefixCls, "-").concat(theme)]: theme === 'light',
|
|
105
|
+
["".concat(prefixCls, "-rtl")]: direction === 'rtl'
|
|
106
106
|
});
|
|
107
107
|
const textStyle = {};
|
|
108
108
|
textStyle.maxWidth = textMaxWidth;
|
|
@@ -110,7 +110,7 @@ class Toast extends BaseComponent {
|
|
|
110
110
|
const btnSize = 'small';
|
|
111
111
|
return /*#__PURE__*/React.createElement("div", {
|
|
112
112
|
role: "alert",
|
|
113
|
-
"aria-label":
|
|
113
|
+
"aria-label": "".concat(type ? type : 'default', " type"),
|
|
114
114
|
className: toastCls,
|
|
115
115
|
style: style,
|
|
116
116
|
onMouseEnter: this.clearCloseTimer,
|
|
@@ -118,13 +118,13 @@ class Toast extends BaseComponent {
|
|
|
118
118
|
onAnimationStart: this.props.onAnimationStart,
|
|
119
119
|
onAnimationEnd: this.props.onAnimationEnd
|
|
120
120
|
}, /*#__PURE__*/React.createElement("div", {
|
|
121
|
-
className:
|
|
121
|
+
className: "".concat(prefixCls, "-content")
|
|
122
122
|
}, this.renderIcon(), /*#__PURE__*/React.createElement("span", {
|
|
123
|
-
className:
|
|
123
|
+
className: "".concat(prefixCls, "-content-text"),
|
|
124
124
|
style: textStyle,
|
|
125
125
|
"x-semi-prop": "content"
|
|
126
126
|
}, content), showClose && /*#__PURE__*/React.createElement("div", {
|
|
127
|
-
className:
|
|
127
|
+
className: "".concat(prefixCls, "-close-button")
|
|
128
128
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
129
129
|
onClick: e => this.close(e),
|
|
130
130
|
type: "tertiary",
|
|
@@ -86,7 +86,7 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
|
|
|
86
86
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
87
87
|
motion: PropTypes.Requireable<boolean>;
|
|
88
88
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
89
|
-
position: PropTypes.Requireable<"
|
|
89
|
+
position: PropTypes.Requireable<"top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
90
90
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
91
91
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
92
92
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
package/lib/es/tooltip/index.js
CHANGED
|
@@ -99,7 +99,7 @@ export default class Tooltip extends BaseComponent {
|
|
|
99
99
|
style
|
|
100
100
|
} = this.props;
|
|
101
101
|
let icon = null;
|
|
102
|
-
const triangleCls = classNames([
|
|
102
|
+
const triangleCls = classNames(["".concat(prefixCls, "-icon-arrow")]);
|
|
103
103
|
|
|
104
104
|
const bgColor = _get(style, 'backgroundColor');
|
|
105
105
|
|
|
@@ -174,10 +174,10 @@ export default class Tooltip extends BaseComponent {
|
|
|
174
174
|
} = this.props;
|
|
175
175
|
const direction = this.context.direction;
|
|
176
176
|
const className = classNames(propClassName, {
|
|
177
|
-
[
|
|
178
|
-
[
|
|
179
|
-
[
|
|
180
|
-
[
|
|
177
|
+
["".concat(prefixCls, "-wrapper")]: true,
|
|
178
|
+
["".concat(prefixCls, "-wrapper-show")]: visible,
|
|
179
|
+
["".concat(prefixCls, "-with-arrow")]: Boolean(showArrow),
|
|
180
|
+
["".concat(prefixCls, "-rtl")]: direction === 'rtl'
|
|
181
181
|
});
|
|
182
182
|
const icon = this.renderIcon();
|
|
183
183
|
|
|
@@ -192,7 +192,7 @@ export default class Tooltip extends BaseComponent {
|
|
|
192
192
|
fillMode: "forwards",
|
|
193
193
|
animationState: transitionState,
|
|
194
194
|
motion: motion && isPositionUpdated,
|
|
195
|
-
startClassName: transitionState === 'enter' ?
|
|
195
|
+
startClassName: transitionState === 'enter' ? "".concat(prefix, "-animation-show") : "".concat(prefix, "-animation-hide"),
|
|
196
196
|
onAnimationEnd: () => {
|
|
197
197
|
var _a, _b;
|
|
198
198
|
|
|
@@ -226,7 +226,7 @@ export default class Tooltip extends BaseComponent {
|
|
|
226
226
|
zIndex
|
|
227
227
|
}
|
|
228
228
|
}, /*#__PURE__*/React.createElement("div", {
|
|
229
|
-
className:
|
|
229
|
+
className: "".concat(BASE_CLASS_PREFIX, "-portal-inner"),
|
|
230
230
|
style: portalInnerStyle,
|
|
231
231
|
ref: this.setContainerEl,
|
|
232
232
|
onClick: this.handlePortalInnerClick,
|