@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/cjs/space/index.js
CHANGED
|
@@ -57,27 +57,27 @@ class Space extends _react.PureComponent {
|
|
|
57
57
|
if ((0, _isString2.default)(spacing[0])) {
|
|
58
58
|
spacingHorizontalType = spacing[0];
|
|
59
59
|
} else if ((0, _isNumber2.default)(spacing[0])) {
|
|
60
|
-
realStyle.columnGap =
|
|
60
|
+
realStyle.columnGap = "".concat(spacing[0], "px");
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
if ((0, _isString2.default)(spacing[1])) {
|
|
64
64
|
spacingVerticalType = spacing[1];
|
|
65
65
|
} else if ((0, _isNumber2.default)(spacing[1])) {
|
|
66
|
-
realStyle.rowGap =
|
|
66
|
+
realStyle.rowGap = "".concat(spacing[1], "px");
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
const classNames = (0, _classnames.default)(prefixCls, className, {
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
71
|
+
["".concat(prefixCls, "-align-").concat(align)]: align,
|
|
72
|
+
["".concat(prefixCls, "-vertical")]: vertical,
|
|
73
|
+
["".concat(prefixCls, "-horizontal")]: !vertical,
|
|
74
|
+
["".concat(prefixCls, "-wrap")]: isWrap,
|
|
75
|
+
["".concat(prefixCls, "-tight-horizontal")]: spacingHorizontalType === _constants.strings.SPACING_TIGHT,
|
|
76
|
+
["".concat(prefixCls, "-tight-vertical")]: spacingVerticalType === _constants.strings.SPACING_TIGHT,
|
|
77
|
+
["".concat(prefixCls, "-medium-horizontal")]: spacingHorizontalType === _constants.strings.SPACING_MEDIUM,
|
|
78
|
+
["".concat(prefixCls, "-medium-vertical")]: spacingVerticalType === _constants.strings.SPACING_MEDIUM,
|
|
79
|
+
["".concat(prefixCls, "-loose-horizontal")]: spacingHorizontalType === _constants.strings.SPACING_LOOSE,
|
|
80
|
+
["".concat(prefixCls, "-loose-vertical")]: spacingVerticalType === _constants.strings.SPACING_LOOSE
|
|
81
81
|
});
|
|
82
82
|
const childrenNodes = (0, _utils.flatten)(children);
|
|
83
83
|
return /*#__PURE__*/_react.default.createElement("div", {
|
package/lib/cjs/spin/icon.js
CHANGED
|
@@ -42,7 +42,7 @@ function Icon() {
|
|
|
42
42
|
_propsId = _id;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
const id =
|
|
45
|
+
const id = "linearGradient-".concat(_propsId);
|
|
46
46
|
return /*#__PURE__*/_react.default.createElement("svg", Object.assign({}, rest, {
|
|
47
47
|
className: className,
|
|
48
48
|
width: "48",
|
|
@@ -83,7 +83,7 @@ function Icon() {
|
|
|
83
83
|
height: "36"
|
|
84
84
|
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
85
85
|
d: "M34,18 C34,9.163444 26.836556,2 18,2 C11.6597233,2 6.18078805,5.68784135 3.59122325,11.0354951",
|
|
86
|
-
stroke:
|
|
86
|
+
stroke: "url(#".concat(id, ")"),
|
|
87
87
|
strokeWidth: "4",
|
|
88
88
|
strokeLinecap: "round"
|
|
89
89
|
})));
|
package/lib/cjs/spin/index.js
CHANGED
|
@@ -77,9 +77,9 @@ class Spin extends _baseComponent.default {
|
|
|
77
77
|
loading
|
|
78
78
|
} = this.state;
|
|
79
79
|
return loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
-
className:
|
|
80
|
+
className: "".concat(prefixCls, "-wrapper")
|
|
81
81
|
}, indicator ? /*#__PURE__*/_react.default.createElement("div", {
|
|
82
|
-
className:
|
|
82
|
+
className: "".concat(prefixCls, "-animate"),
|
|
83
83
|
"x-semi-prop": "indicator"
|
|
84
84
|
}, indicator) : /*#__PURE__*/_react.default.createElement(_icon.default, null), tip ? /*#__PURE__*/_react.default.createElement("div", {
|
|
85
85
|
"x-semi-prop": "tip"
|
|
@@ -99,15 +99,15 @@ class Spin extends _baseComponent.default {
|
|
|
99
99
|
loading
|
|
100
100
|
} = this.state;
|
|
101
101
|
const spinCls = (0, _classnames.default)(prefixCls, wrapperClassName, {
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
102
|
+
["".concat(prefixCls, "-").concat(size)]: size,
|
|
103
|
+
["".concat(prefixCls, "-block")]: children,
|
|
104
|
+
["".concat(prefixCls, "-hidden")]: !loading
|
|
105
105
|
});
|
|
106
106
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
107
107
|
className: spinCls,
|
|
108
108
|
style: style
|
|
109
109
|
}, this.renderSpin(), /*#__PURE__*/_react.default.createElement("div", {
|
|
110
|
-
className:
|
|
110
|
+
className: "".concat(prefixCls, "-children"),
|
|
111
111
|
style: childStyle,
|
|
112
112
|
"x-semi-prop": "children"
|
|
113
113
|
}, children));
|
|
@@ -19,6 +19,8 @@ export interface BasicStepProps {
|
|
|
19
19
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
20
20
|
"role"?: React.AriaRole;
|
|
21
21
|
"aria-label"?: React.AriaAttributes["aria-label"];
|
|
22
|
+
type?: string;
|
|
23
|
+
direction?: string;
|
|
22
24
|
}
|
|
23
25
|
export declare enum stepSizeMapIconSize {
|
|
24
26
|
small = "large",
|
|
@@ -42,7 +42,9 @@ const BasicStep = props => {
|
|
|
42
42
|
stepNumber,
|
|
43
43
|
onClick,
|
|
44
44
|
onChange,
|
|
45
|
-
onKeyDown
|
|
45
|
+
onKeyDown,
|
|
46
|
+
type: typeInProps,
|
|
47
|
+
direction: directionInProps
|
|
46
48
|
} = props;
|
|
47
49
|
|
|
48
50
|
const renderIcon = () => {
|
|
@@ -62,13 +64,13 @@ const BasicStep = props => {
|
|
|
62
64
|
|
|
63
65
|
case 'wait':
|
|
64
66
|
inner = /*#__PURE__*/_react.default.createElement("span", {
|
|
65
|
-
className:
|
|
67
|
+
className: "".concat(prefixCls, "-number-icon")
|
|
66
68
|
}, stepNumber);
|
|
67
69
|
break;
|
|
68
70
|
|
|
69
71
|
case 'process':
|
|
70
72
|
inner = /*#__PURE__*/_react.default.createElement("span", {
|
|
71
|
-
className:
|
|
73
|
+
className: "".concat(prefixCls, "-number-icon")
|
|
72
74
|
}, stepNumber);
|
|
73
75
|
progress = true;
|
|
74
76
|
break;
|
|
@@ -92,18 +94,21 @@ const BasicStep = props => {
|
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
const cls = (0, _classnames.default)({
|
|
95
|
-
[
|
|
96
|
-
[
|
|
97
|
-
[
|
|
97
|
+
["".concat(prefixCls, "-icon")]: true,
|
|
98
|
+
["".concat(prefixCls, "-custom-icon")]: 'icon' in props,
|
|
99
|
+
["".concat(prefixCls, "-icon-process")]: progress
|
|
98
100
|
});
|
|
99
101
|
return inner ? /*#__PURE__*/_react.default.createElement("span", {
|
|
100
102
|
className: cls
|
|
101
103
|
}, inner) : null;
|
|
102
104
|
};
|
|
103
105
|
|
|
104
|
-
const classString = (0, _classnames.default)(prefixCls,
|
|
105
|
-
[
|
|
106
|
-
[
|
|
106
|
+
const classString = (0, _classnames.default)(prefixCls, "".concat(prefixCls, "-").concat(status), {
|
|
107
|
+
["".concat(prefixCls, "-active")]: active,
|
|
108
|
+
["".concat(prefixCls, "-done")]: done,
|
|
109
|
+
["".concat(prefixCls, "-basic")]: typeInProps,
|
|
110
|
+
["".concat(prefixCls, "-").concat(directionInProps)]: directionInProps,
|
|
111
|
+
["".concat(prefixCls, "-small")]: size === 'small'
|
|
107
112
|
}, className);
|
|
108
113
|
|
|
109
114
|
const handleClick = e => {
|
|
@@ -134,17 +139,17 @@ const BasicStep = props => {
|
|
|
134
139
|
onClick: e => handleClick(e),
|
|
135
140
|
onKeyDown: handleKeyDown
|
|
136
141
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
137
|
-
className:
|
|
142
|
+
className: "".concat(prefixCls, "-container")
|
|
138
143
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
139
|
-
className:
|
|
144
|
+
className: "".concat(prefixCls, "-left")
|
|
140
145
|
}, renderIcon()), /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
-
className:
|
|
146
|
+
className: "".concat(prefixCls, "-content")
|
|
142
147
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
-
className:
|
|
148
|
+
className: "".concat(prefixCls, "-title")
|
|
144
149
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
145
|
-
className:
|
|
150
|
+
className: "".concat(prefixCls, "-title-text")
|
|
146
151
|
}, title)), description && /*#__PURE__*/_react.default.createElement("div", {
|
|
147
|
-
className:
|
|
152
|
+
className: "".concat(prefixCls, "-description")
|
|
148
153
|
}, description))));
|
|
149
154
|
};
|
|
150
155
|
|
|
@@ -43,12 +43,12 @@ const Steps = props => {
|
|
|
43
43
|
|
|
44
44
|
const stepNumber = initial + index;
|
|
45
45
|
const childProps = Object.assign({
|
|
46
|
-
stepNumber:
|
|
46
|
+
stepNumber: "".concat(stepNumber + 1),
|
|
47
47
|
size
|
|
48
48
|
}, child.props);
|
|
49
49
|
|
|
50
50
|
if (status === 'error' && index === current - 1) {
|
|
51
|
-
childProps.className =
|
|
51
|
+
childProps.className = "".concat(prefixCls, "-next-error");
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
if (!child.props.status) {
|
|
@@ -76,10 +76,10 @@ const Steps = props => {
|
|
|
76
76
|
return content;
|
|
77
77
|
}, [children, initial, prefixCls, direction, status, current, size, onChange]);
|
|
78
78
|
const wrapperCls = (0, _classnames.default)(className, {
|
|
79
|
-
[
|
|
80
|
-
[
|
|
81
|
-
[
|
|
82
|
-
[
|
|
79
|
+
["".concat(prefixCls, "-basic")]: true,
|
|
80
|
+
["".concat(prefixCls, "-").concat(direction)]: true,
|
|
81
|
+
["".concat(prefixCls, "-").concat(size)]: size !== 'default',
|
|
82
|
+
["".concat(prefixCls, "-hasline")]: hasLine
|
|
83
83
|
});
|
|
84
84
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
85
85
|
"aria-label": props["aria-label"],
|
|
@@ -15,6 +15,7 @@ export interface FillStepProps {
|
|
|
15
15
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
16
16
|
"role"?: React.AriaRole;
|
|
17
17
|
"aria-label"?: React.AriaAttributes["aria-label"];
|
|
18
|
+
type?: string;
|
|
18
19
|
}
|
|
19
20
|
declare const FillStep: {
|
|
20
21
|
(props: FillStepProps): JSX.Element;
|
|
@@ -75,10 +75,10 @@ const FillStep = props => {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
const cls = (0, _classnames.default)({
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
81
|
-
[
|
|
78
|
+
["".concat(prefixCls, "-left")]: true,
|
|
79
|
+
["".concat(prefixCls, "-icon")]: 'icon' in props,
|
|
80
|
+
["".concat(prefixCls, "-plain")]: !('icon' in props),
|
|
81
|
+
["".concat(prefixCls, "-icon-process")]: progress
|
|
82
82
|
});
|
|
83
83
|
return inner ? /*#__PURE__*/_react.default.createElement("div", {
|
|
84
84
|
className: cls
|
|
@@ -110,8 +110,9 @@ const FillStep = props => {
|
|
|
110
110
|
tabIndex: 0,
|
|
111
111
|
className: (0, _classnames.default)({
|
|
112
112
|
[prefixCls]: true,
|
|
113
|
-
[
|
|
114
|
-
[
|
|
113
|
+
["".concat(prefixCls, "-").concat(status)]: Boolean(status),
|
|
114
|
+
["".concat(prefixCls, "-clickable")]: onClick,
|
|
115
|
+
["".concat(prefixCls, "-fill")]: props.type === 'fill'
|
|
115
116
|
}, className),
|
|
116
117
|
style: style,
|
|
117
118
|
onClick: e => {
|
|
@@ -119,14 +120,14 @@ const FillStep = props => {
|
|
|
119
120
|
},
|
|
120
121
|
onKeyDown: handleKeyDown
|
|
121
122
|
}, renderIcon(), /*#__PURE__*/_react.default.createElement("div", {
|
|
122
|
-
className:
|
|
123
|
+
className: "".concat(prefixCls, "-content")
|
|
123
124
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
-
className:
|
|
125
|
+
className: "".concat(prefixCls, "-title"),
|
|
125
126
|
title: typeof title === 'string' ? title : null
|
|
126
127
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
127
|
-
className:
|
|
128
|
+
className: "".concat(prefixCls, "-title-text")
|
|
128
129
|
}, title)), /*#__PURE__*/_react.default.createElement("div", {
|
|
129
|
-
className:
|
|
130
|
+
className: "".concat(prefixCls, "-description"),
|
|
130
131
|
title: typeof description === 'string' ? description : null
|
|
131
132
|
}, description)));
|
|
132
133
|
};
|
|
@@ -37,7 +37,7 @@ const Steps = props => {
|
|
|
37
37
|
const filteredChildren = _react.Children.toArray(children).filter(c => /*#__PURE__*/(0, _react.isValidElement)(c));
|
|
38
38
|
|
|
39
39
|
const colStyle = direction === 'vertical' ? null : {
|
|
40
|
-
width:
|
|
40
|
+
width: "".concat(100 / filteredChildren.length, "%")
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
const content = _react.Children.map(filteredChildren, (child, index) => {
|
|
@@ -47,12 +47,11 @@ const Steps = props => {
|
|
|
47
47
|
|
|
48
48
|
const stepNumber = initial + index;
|
|
49
49
|
const childProps = Object.assign({
|
|
50
|
-
stepNumber:
|
|
51
|
-
direction
|
|
50
|
+
stepNumber: "".concat(stepNumber + 1)
|
|
52
51
|
}, child.props);
|
|
53
52
|
|
|
54
53
|
if (status === 'error' && index === current - 1) {
|
|
55
|
-
childProps.className =
|
|
54
|
+
childProps.className = "".concat(prefixCls, "-next-error");
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
if (!child.props.status) {
|
|
@@ -80,7 +79,7 @@ const Steps = props => {
|
|
|
80
79
|
}, [children, initial, prefixCls, direction, status, current, onChange]);
|
|
81
80
|
const wrapperCls = (0, _classnames.default)(className, {
|
|
82
81
|
[prefixCls]: true,
|
|
83
|
-
[
|
|
82
|
+
["".concat(prefixCls, "-").concat(direction)]: true
|
|
84
83
|
});
|
|
85
84
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
86
85
|
className: wrapperCls,
|
package/lib/cjs/steps/index.d.ts
CHANGED
|
@@ -22,7 +22,10 @@ export interface NavStepsAllProps extends NavStepsProps {
|
|
|
22
22
|
}
|
|
23
23
|
export declare type StepsProps = FillStepsAllProps | BasicStepsAllProps | NavStepsAllProps;
|
|
24
24
|
declare class Steps extends Component<StepsProps> {
|
|
25
|
-
static Step:
|
|
25
|
+
static Step: {
|
|
26
|
+
(props: import("./step").StepProps): JSX.Element;
|
|
27
|
+
elementType: string;
|
|
28
|
+
};
|
|
26
29
|
static propTypes: {
|
|
27
30
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
31
|
type: PropTypes.Requireable<string>;
|
|
@@ -13,6 +13,9 @@ export interface NavStepProps {
|
|
|
13
13
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
14
14
|
"role"?: React.AriaRole;
|
|
15
15
|
"aria-label"?: React.AriaAttributes["aria-label"];
|
|
16
|
+
type?: string;
|
|
17
|
+
lastOne?: boolean;
|
|
18
|
+
size?: string;
|
|
16
19
|
}
|
|
17
20
|
declare const NavStep: {
|
|
18
21
|
(props: NavStepProps): JSX.Element;
|
package/lib/cjs/steps/navStep.js
CHANGED
|
@@ -5,9 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
var _isNumber2 = _interopRequireDefault(require("lodash/isNumber"));
|
|
9
|
+
|
|
8
10
|
var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
|
|
9
11
|
|
|
10
|
-
var _react =
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
13
|
|
|
12
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
15
|
|
|
@@ -17,6 +19,10 @@ var _constants = require("@douyinfe/semi-foundation/lib/cjs/steps/constants");
|
|
|
17
19
|
|
|
18
20
|
var _semiIcons = require("@douyinfe/semi-icons");
|
|
19
21
|
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
20
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
27
|
|
|
22
28
|
const NavStep = props => {
|
|
@@ -30,10 +36,15 @@ const NavStep = props => {
|
|
|
30
36
|
total,
|
|
31
37
|
onClick,
|
|
32
38
|
onKeyDown,
|
|
33
|
-
onChange
|
|
39
|
+
onChange,
|
|
40
|
+
lastOne,
|
|
41
|
+
type,
|
|
42
|
+
size
|
|
34
43
|
} = props;
|
|
35
44
|
const classString = (0, _classnames.default)(prefixCls, {
|
|
36
|
-
[
|
|
45
|
+
["".concat(prefixCls, "-active")]: active,
|
|
46
|
+
["".concat(prefixCls, "-nav")]: type,
|
|
47
|
+
["".concat(prefixCls, "-small")]: size === 'small'
|
|
37
48
|
}, className);
|
|
38
49
|
|
|
39
50
|
const handleClick = e => {
|
|
@@ -54,6 +65,13 @@ const NavStep = props => {
|
|
|
54
65
|
}
|
|
55
66
|
};
|
|
56
67
|
|
|
68
|
+
const notLastOne = (0, _react.useMemo)(() => {
|
|
69
|
+
if ((0, _isNumber2.default)(index) && (0, _isNumber2.default)(total)) {
|
|
70
|
+
return index !== total - 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return !Boolean(lastOne);
|
|
74
|
+
}, [index, total, lastOne]);
|
|
57
75
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
76
|
role: props["role"],
|
|
59
77
|
"aria-label": props["aria-label"],
|
|
@@ -64,13 +82,13 @@ const NavStep = props => {
|
|
|
64
82
|
onClick: e => handleClick(e),
|
|
65
83
|
onKeyDown: handleKeyDown
|
|
66
84
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
67
|
-
className:
|
|
85
|
+
className: "".concat(prefixCls, "-container")
|
|
68
86
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
-
className:
|
|
87
|
+
className: "".concat(prefixCls, "-content")
|
|
70
88
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
-
className:
|
|
72
|
-
}, title)),
|
|
73
|
-
className:
|
|
89
|
+
className: "".concat(prefixCls, "-title")
|
|
90
|
+
}, title)), notLastOne && /*#__PURE__*/_react.default.createElement("div", {
|
|
91
|
+
className: "".concat(prefixCls, "-icon")
|
|
74
92
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronRight, {
|
|
75
93
|
size: "small"
|
|
76
94
|
}))));
|
|
@@ -58,8 +58,8 @@ const Steps = props => {
|
|
|
58
58
|
return content;
|
|
59
59
|
}, [children, prefixCls, current, size, initial, onChange]);
|
|
60
60
|
const wrapperCls = (0, _classnames.default)(className, {
|
|
61
|
-
[
|
|
62
|
-
[
|
|
61
|
+
["".concat(prefixCls, "-nav")]: true,
|
|
62
|
+
["".concat(prefixCls, "-").concat(size)]: size !== 'default'
|
|
63
63
|
});
|
|
64
64
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
65
65
|
"aria-label": props["aria-label"],
|
package/lib/cjs/steps/step.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export interface StepProps {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
10
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
11
|
+
type?: string;
|
|
11
12
|
}
|
|
12
|
-
declare const Step:
|
|
13
|
+
declare const Step: {
|
|
14
|
+
(props: StepProps): JSX.Element;
|
|
15
|
+
elementType: string;
|
|
16
|
+
};
|
|
13
17
|
export default Step;
|
package/lib/cjs/steps/step.js
CHANGED
|
@@ -22,9 +22,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
24
|
const Step = props => {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
} = (0, _react.useContext)(_context.default);
|
|
25
|
+
const stepContext = (0, _react.useContext)(_context.default);
|
|
26
|
+
const type = stepContext ? stepContext.type : props.type;
|
|
28
27
|
|
|
29
28
|
const renderStep = () => {
|
|
30
29
|
switch (type) {
|
|
@@ -45,5 +44,6 @@ const Step = props => {
|
|
|
45
44
|
return renderStep();
|
|
46
45
|
};
|
|
47
46
|
|
|
47
|
+
Step.elementType = 'Steps.Step';
|
|
48
48
|
var _default = Step;
|
|
49
49
|
exports.default = _default;
|
|
@@ -242,7 +242,7 @@ class TableRow extends _baseComponent.default {
|
|
|
242
242
|
hideExpandedColumn: hideExpandedColumn,
|
|
243
243
|
indentSize: indentSize,
|
|
244
244
|
isSection: isSection,
|
|
245
|
-
prefixCls:
|
|
245
|
+
prefixCls: "".concat(prefixCls),
|
|
246
246
|
column: column,
|
|
247
247
|
key: columnIndex,
|
|
248
248
|
index: index,
|
|
@@ -293,10 +293,10 @@ class TableRow extends _baseComponent.default {
|
|
|
293
293
|
|
|
294
294
|
this.adapter.setCache('customRowProps', Object.assign({}, rowProps));
|
|
295
295
|
const baseRowStyle = Object.assign(Object.assign({}, style), customStyle);
|
|
296
|
-
const rowCls = typeof replaceClassName === 'string' && replaceClassName.length ? replaceClassName : (0, _classnames.default)(className,
|
|
297
|
-
[
|
|
298
|
-
[
|
|
299
|
-
[
|
|
296
|
+
const rowCls = typeof replaceClassName === 'string' && replaceClassName.length ? replaceClassName : (0, _classnames.default)(className, "".concat(prefixCls, "-row"), {
|
|
297
|
+
["".concat(prefixCls, "-row-selected")]: selected,
|
|
298
|
+
["".concat(prefixCls, "-row-expanded")]: expanded,
|
|
299
|
+
["".concat(prefixCls, "-row-hovered")]: hovered
|
|
300
300
|
}, customClassName);
|
|
301
301
|
const ariaProps = {};
|
|
302
302
|
|
|
@@ -110,14 +110,14 @@ class TableExpandedRow extends _react.PureComponent {
|
|
|
110
110
|
render: () => ({
|
|
111
111
|
props,
|
|
112
112
|
children: /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
-
className: (0, _classnames.default)(
|
|
113
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-expand-inner")),
|
|
114
114
|
style: {
|
|
115
115
|
width: anyColumnFixed ? (0, _utils2.amendTableWidth)(tableWidth) : undefined
|
|
116
116
|
}
|
|
117
117
|
}, children)
|
|
118
118
|
})
|
|
119
119
|
}, column)];
|
|
120
|
-
const rowCls = (0, _classnames.default)(className,
|
|
120
|
+
const rowCls = (0, _classnames.default)(className, "".concat(prefixCls, "-row-expand"));
|
|
121
121
|
const baseRowCellWidths = getCellWidths(columns);
|
|
122
122
|
return /*#__PURE__*/_react.default.createElement(_BaseRow.default, {
|
|
123
123
|
style: style,
|
|
@@ -125,7 +125,7 @@ class TableExpandedRow extends _react.PureComponent {
|
|
|
125
125
|
className: rowCls,
|
|
126
126
|
expandedRow: true,
|
|
127
127
|
renderExpandIcon: renderExpandIcon,
|
|
128
|
-
rowKey:
|
|
128
|
+
rowKey: "".concat(record.key, "-expanded-row"),
|
|
129
129
|
columns: columns,
|
|
130
130
|
store: store,
|
|
131
131
|
virtualized: virtualized,
|
|
@@ -165,7 +165,7 @@ class SectionRow extends _react.PureComponent {
|
|
|
165
165
|
children
|
|
166
166
|
})
|
|
167
167
|
}, column)];
|
|
168
|
-
const rowCls = (0, _classnames.default)(className,
|
|
168
|
+
const rowCls = (0, _classnames.default)(className, "".concat(prefixCls, "-row-section"), {
|
|
169
169
|
on: expanded
|
|
170
170
|
});
|
|
171
171
|
const {
|
|
@@ -114,7 +114,7 @@ class Body extends _baseComponent.default {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
if (realSize < defaultConfig.minHeight) {
|
|
117
|
-
_utils2.logger.warn(
|
|
117
|
+
_utils2.logger.warn("The computed real `itemSize` cannot be less than ".concat(defaultConfig.minHeight));
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
return realSize;
|
|
@@ -223,7 +223,7 @@ class Body extends _baseComponent.default {
|
|
|
223
223
|
}
|
|
224
224
|
},
|
|
225
225
|
// eslint-disable-next-line react/no-this-in-sfc,react/destructuring-assignment
|
|
226
|
-
className: (0, _classnames.default)(props.className,
|
|
226
|
+
className: (0, _classnames.default)(props.className, "".concat(_this.props.prefixCls, "-tbody")),
|
|
227
227
|
style: Object.assign({}, props.style),
|
|
228
228
|
ref: ref
|
|
229
229
|
}));
|
|
@@ -244,7 +244,7 @@ class Body extends _baseComponent.default {
|
|
|
244
244
|
} = this.props; // eslint-disable-next-line react/no-this-in-sfc
|
|
245
245
|
|
|
246
246
|
const tableWidth = this.getVirtualizedRowWidth();
|
|
247
|
-
const tableCls = (0, _classnames.default)(
|
|
247
|
+
const tableCls = (0, _classnames.default)("".concat(prefixCls), "".concat(prefixCls, "-fixed"));
|
|
248
248
|
return /*#__PURE__*/_react.default.createElement("div", Object.assign({}, rest, {
|
|
249
249
|
ref: ref,
|
|
250
250
|
onWheel: function () {
|
|
@@ -312,7 +312,7 @@ class Body extends _baseComponent.default {
|
|
|
312
312
|
overflowX: 'auto',
|
|
313
313
|
overflowY: 'auto'
|
|
314
314
|
};
|
|
315
|
-
const wrapCls = (0, _classnames.default)(
|
|
315
|
+
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-body"));
|
|
316
316
|
return /*#__PURE__*/_react.default.createElement(_reactWindow.VariableSizeList, Object.assign({}, typeof virtualized === 'object' ? virtualized : {}, {
|
|
317
317
|
initialScrollOffset: this.state.cache.virtualizedScrollTop,
|
|
318
318
|
onScroll: this.handleVirtualizedScroll,
|
|
@@ -531,7 +531,7 @@ class Body extends _baseComponent.default {
|
|
|
531
531
|
}); // const tableBody = this.renderBody();
|
|
532
532
|
|
|
533
533
|
|
|
534
|
-
const wrapCls =
|
|
534
|
+
const wrapCls = "".concat(prefixCls, "-body");
|
|
535
535
|
|
|
536
536
|
const baseTable = /*#__PURE__*/_react.default.createElement("div", {
|
|
537
537
|
key: "bodyTable",
|
|
@@ -548,21 +548,21 @@ class Body extends _baseComponent.default {
|
|
|
548
548
|
"aria-colcount": columns && columns.length,
|
|
549
549
|
style: tableStyle,
|
|
550
550
|
className: (0, _classnames.default)(prefixCls, {
|
|
551
|
-
[
|
|
551
|
+
["".concat(prefixCls, "-fixed")]: anyColumnFixed
|
|
552
552
|
})
|
|
553
553
|
}, colgroup, includeHeader && showHeader ? /*#__PURE__*/_react.default.createElement(_TableHeader.default, Object.assign({}, this.props, {
|
|
554
554
|
ref: headerRef,
|
|
555
555
|
components: components,
|
|
556
556
|
columns: columns
|
|
557
557
|
})) : null, /*#__PURE__*/_react.default.createElement(BodyWrapper, {
|
|
558
|
-
className:
|
|
558
|
+
className: "".concat(prefixCls, "-tbody"),
|
|
559
559
|
onScroll: onScroll
|
|
560
560
|
}, (0, _isMap2.default)(groups) ? this.renderGroupedRows() : this.renderBodyRows(dataSource))), emptySlot);
|
|
561
561
|
|
|
562
562
|
if (fixed && columns.length) {
|
|
563
563
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
564
564
|
key: "bodyTable",
|
|
565
|
-
className:
|
|
565
|
+
className: "".concat(prefixCls, "-body-outer")
|
|
566
566
|
}, baseTable);
|
|
567
567
|
}
|
|
568
568
|
|
|
@@ -43,12 +43,12 @@ class ColGroup extends _react.default.PureComponent {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
return /*#__PURE__*/_react.default.createElement(Col, {
|
|
46
|
-
className: (0, _classnames.default)(
|
|
46
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-col"), column.className),
|
|
47
47
|
key: column.key || column.dataIndex || idx,
|
|
48
48
|
style: colStyle
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
|
-
const groupCls = (0, _classnames.default)(
|
|
51
|
+
const groupCls = (0, _classnames.default)("".concat(prefixCls, "-colgroup"), className);
|
|
52
52
|
return /*#__PURE__*/_react.default.createElement(ColGroup, {
|
|
53
53
|
className: groupCls,
|
|
54
54
|
style: style
|
|
@@ -88,7 +88,7 @@ function renderDropdown() {
|
|
|
88
88
|
const {
|
|
89
89
|
value
|
|
90
90
|
} = filter;
|
|
91
|
-
const key =
|
|
91
|
+
const key = "".concat(level, "_").concat(index);
|
|
92
92
|
const dropdownItem = typeof renderFilterDropdownItem === 'function' ? renderFilterDropdownItem({
|
|
93
93
|
onChange: changeFn,
|
|
94
94
|
filterMultiple,
|
|
@@ -128,7 +128,7 @@ function renderDropdown() {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({}, dropdownProps, {
|
|
131
|
-
key:
|
|
131
|
+
key: "Dropdown_level_".concat(level)
|
|
132
132
|
}), nestedElem);
|
|
133
133
|
}
|
|
134
134
|
|
|
@@ -144,7 +144,7 @@ function ColumnFilter() {
|
|
|
144
144
|
let {
|
|
145
145
|
filterDropdown = null
|
|
146
146
|
} = props;
|
|
147
|
-
const finalCls = (0, _classnames.default)(
|
|
147
|
+
const finalCls = (0, _classnames.default)("".concat(prefixCls, "-column-filter"), {
|
|
148
148
|
on: Array.isArray(filteredValue) && filteredValue.length
|
|
149
149
|
});
|
|
150
150
|
let iconElem;
|
|
@@ -68,8 +68,8 @@ class TableSelectionCell extends _baseComponent.default {
|
|
|
68
68
|
checkboxProps = Object.assign(Object.assign({}, checkboxProps), getCheckboxProps());
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
const wrapCls = (0, _classnames.default)(
|
|
72
|
-
[
|
|
71
|
+
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-selection-wrap"), {
|
|
72
|
+
["".concat(prefixCls, "-selection-disabled")]: disabled
|
|
73
73
|
}, className);
|
|
74
74
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
75
75
|
className: wrapCls
|