@douyinfe/semi-ui 2.27.1 → 2.28.0-beta.1
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 +228 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +2446 -2082
- 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.js +9 -9
- package/lib/cjs/anchor/link.js +8 -8
- 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.js +6 -6
- package/lib/cjs/carousel/index.js +12 -12
- package/lib/cjs/cascader/index.d.ts +5 -2
- package/lib/cjs/cascader/index.js +40 -38
- package/lib/cjs/cascader/item.d.ts +15 -1
- package/lib/cjs/cascader/item.js +64 -32
- 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.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.js +27 -27
- package/lib/cjs/datePicker/navigation.js +1 -1
- package/lib/cjs/datePicker/quickControl.js +14 -14
- 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.d.ts +1 -1
- 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 +3 -1
- package/lib/cjs/form/baseForm.js +2 -2
- package/lib/cjs/form/errorMessage.js +1 -1
- package/lib/cjs/form/field.d.ts +3 -1
- package/lib/cjs/form/group.js +2 -2
- 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.d.ts +1 -1
- 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.d.ts +1 -1
- 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.d.ts +1 -0
- package/lib/cjs/layout/Sider.js +4 -3
- package/lib/cjs/layout/index.js +4 -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.d.ts +0 -2
- package/lib/cjs/modal/Modal.js +8 -10
- 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 +32 -35
- package/lib/cjs/overflowList/intersectionObserver.js +3 -1
- package/lib/cjs/pagination/index.js +26 -26
- package/lib/cjs/popconfirm/index.js +9 -9
- package/lib/cjs/popover/index.js +2 -2
- package/lib/cjs/progress/index.js +14 -14
- package/lib/cjs/radio/radio.js +22 -22
- 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 +11 -0
- package/lib/cjs/select/index.js +297 -116
- 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.d.ts +1 -1
- package/lib/cjs/spin/index.js +6 -6
- package/lib/cjs/steps/basicStep.js +14 -14
- package/lib/cjs/steps/basicSteps.js +6 -6
- package/lib/cjs/steps/fillStep.js +10 -10
- package/lib/cjs/steps/fillSteps.js +4 -4
- package/lib/cjs/steps/navStep.js +5 -5
- package/lib/cjs/steps/navSteps.js +2 -2
- 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.js +20 -20
- package/lib/cjs/table/TableCell.js +8 -8
- package/lib/cjs/table/TableHeader.js +1 -1
- package/lib/cjs/table/TableHeaderRow.d.ts +1 -1
- package/lib/cjs/table/TableHeaderRow.js +8 -8
- package/lib/cjs/table/TablePagination.js +3 -3
- package/lib/cjs/tabs/TabBar.js +31 -49
- package/lib/cjs/tabs/TabItem.d.ts +18 -0
- package/lib/cjs/tabs/TabItem.js +95 -0
- package/lib/cjs/tabs/TabPane.js +3 -3
- package/lib/cjs/tabs/index.d.ts +2 -1
- package/lib/cjs/tabs/index.js +5 -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.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/interface.d.ts +1 -0
- 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/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.js +9 -9
- package/lib/es/anchor/link.js +8 -8
- 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.js +6 -6
- package/lib/es/carousel/index.js +12 -12
- package/lib/es/cascader/index.d.ts +5 -2
- package/lib/es/cascader/index.js +40 -38
- package/lib/es/cascader/item.d.ts +15 -1
- package/lib/es/cascader/item.js +64 -32
- 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.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.js +27 -27
- package/lib/es/datePicker/navigation.js +1 -1
- package/lib/es/datePicker/quickControl.js +14 -14
- 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.d.ts +1 -1
- 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 +3 -1
- package/lib/es/form/baseForm.js +2 -2
- package/lib/es/form/errorMessage.js +1 -1
- package/lib/es/form/field.d.ts +3 -1
- package/lib/es/form/group.js +2 -2
- 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.d.ts +1 -1
- 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.d.ts +1 -1
- 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.d.ts +1 -0
- package/lib/es/layout/Sider.js +4 -3
- package/lib/es/layout/index.js +4 -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.d.ts +0 -2
- package/lib/es/modal/Modal.js +8 -10
- 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 +31 -35
- package/lib/es/overflowList/intersectionObserver.js +2 -1
- package/lib/es/pagination/index.js +26 -26
- package/lib/es/popconfirm/index.js +9 -9
- package/lib/es/popover/index.js +2 -2
- package/lib/es/progress/index.js +14 -14
- package/lib/es/radio/radio.js +22 -22
- 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 +11 -0
- package/lib/es/select/index.js +288 -112
- 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.d.ts +1 -1
- package/lib/es/spin/index.js +6 -6
- package/lib/es/steps/basicStep.js +14 -14
- package/lib/es/steps/basicSteps.js +6 -6
- package/lib/es/steps/fillStep.js +10 -10
- package/lib/es/steps/fillSteps.js +4 -4
- package/lib/es/steps/navStep.js +5 -5
- package/lib/es/steps/navSteps.js +2 -2
- 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.js +20 -20
- package/lib/es/table/TableCell.js +8 -8
- package/lib/es/table/TableHeader.js +1 -1
- package/lib/es/table/TableHeaderRow.d.ts +1 -1
- package/lib/es/table/TableHeaderRow.js +8 -8
- package/lib/es/table/TablePagination.js +3 -3
- package/lib/es/tabs/TabBar.js +30 -50
- package/lib/es/tabs/TabItem.d.ts +18 -0
- package/lib/es/tabs/TabItem.js +78 -0
- package/lib/es/tabs/TabPane.js +3 -3
- package/lib/es/tabs/index.d.ts +2 -1
- package/lib/es/tabs/index.js +4 -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.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/interface.d.ts +1 -0
- 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/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
|
@@ -217,7 +217,7 @@ export default class TableRow extends BaseComponent {
|
|
|
217
217
|
hideExpandedColumn: hideExpandedColumn,
|
|
218
218
|
indentSize: indentSize,
|
|
219
219
|
isSection: isSection,
|
|
220
|
-
prefixCls:
|
|
220
|
+
prefixCls: `${prefixCls}`,
|
|
221
221
|
column: column,
|
|
222
222
|
key: columnIndex,
|
|
223
223
|
index: index,
|
|
@@ -269,10 +269,10 @@ export default class TableRow extends BaseComponent {
|
|
|
269
269
|
|
|
270
270
|
this.adapter.setCache('customRowProps', Object.assign({}, rowProps));
|
|
271
271
|
const baseRowStyle = Object.assign(Object.assign({}, style), customStyle);
|
|
272
|
-
const rowCls = typeof replaceClassName === 'string' && replaceClassName.length ? replaceClassName : classnames(className,
|
|
273
|
-
[
|
|
274
|
-
[
|
|
275
|
-
[
|
|
272
|
+
const rowCls = typeof replaceClassName === 'string' && replaceClassName.length ? replaceClassName : classnames(className, `${prefixCls}-row`, {
|
|
273
|
+
[`${prefixCls}-row-selected`]: selected,
|
|
274
|
+
[`${prefixCls}-row-expanded`]: expanded,
|
|
275
|
+
[`${prefixCls}-row-hovered`]: hovered
|
|
276
276
|
}, customClassName);
|
|
277
277
|
const ariaProps = {};
|
|
278
278
|
|
|
@@ -89,14 +89,14 @@ export default class TableExpandedRow extends PureComponent {
|
|
|
89
89
|
render: () => ({
|
|
90
90
|
props,
|
|
91
91
|
children: /*#__PURE__*/React.createElement("div", {
|
|
92
|
-
className: classnames(
|
|
92
|
+
className: classnames(`${prefixCls}-expand-inner`),
|
|
93
93
|
style: {
|
|
94
94
|
width: anyColumnFixed ? amendTableWidth(tableWidth) : undefined
|
|
95
95
|
}
|
|
96
96
|
}, children)
|
|
97
97
|
})
|
|
98
98
|
}, column)];
|
|
99
|
-
const rowCls = classnames(className,
|
|
99
|
+
const rowCls = classnames(className, `${prefixCls}-row-expand`);
|
|
100
100
|
const baseRowCellWidths = getCellWidths(columns);
|
|
101
101
|
return /*#__PURE__*/React.createElement(TableRow, {
|
|
102
102
|
style: style,
|
|
@@ -104,7 +104,7 @@ export default class TableExpandedRow extends PureComponent {
|
|
|
104
104
|
className: rowCls,
|
|
105
105
|
expandedRow: true,
|
|
106
106
|
renderExpandIcon: renderExpandIcon,
|
|
107
|
-
rowKey:
|
|
107
|
+
rowKey: `${record.key}-expanded-row`,
|
|
108
108
|
columns: columns,
|
|
109
109
|
store: store,
|
|
110
110
|
virtualized: virtualized,
|
|
@@ -145,7 +145,7 @@ class SectionRow extends PureComponent {
|
|
|
145
145
|
children
|
|
146
146
|
})
|
|
147
147
|
}, column)];
|
|
148
|
-
const rowCls = classnames(className,
|
|
148
|
+
const rowCls = classnames(className, `${prefixCls}-row-section`, {
|
|
149
149
|
on: expanded
|
|
150
150
|
});
|
|
151
151
|
const {
|
|
@@ -87,7 +87,7 @@ class Body extends BaseComponent {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
if (realSize < defaultConfig.minHeight) {
|
|
90
|
-
logger.warn(
|
|
90
|
+
logger.warn(`The computed real \`itemSize\` cannot be less than ${defaultConfig.minHeight}`);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
return realSize;
|
|
@@ -201,7 +201,7 @@ class Body extends BaseComponent {
|
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
203
|
// eslint-disable-next-line react/no-this-in-sfc,react/destructuring-assignment
|
|
204
|
-
className: classnames(props.className,
|
|
204
|
+
className: classnames(props.className, `${_this.props.prefixCls}-tbody`),
|
|
205
205
|
style: Object.assign({}, props.style),
|
|
206
206
|
ref: ref
|
|
207
207
|
}));
|
|
@@ -222,7 +222,7 @@ class Body extends BaseComponent {
|
|
|
222
222
|
} = this.props; // eslint-disable-next-line react/no-this-in-sfc
|
|
223
223
|
|
|
224
224
|
const tableWidth = this.getVirtualizedRowWidth();
|
|
225
|
-
const tableCls = classnames(
|
|
225
|
+
const tableCls = classnames(`${prefixCls}`, `${prefixCls}-fixed`);
|
|
226
226
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, rest, {
|
|
227
227
|
ref: ref,
|
|
228
228
|
onWheel: function () {
|
|
@@ -291,7 +291,7 @@ class Body extends BaseComponent {
|
|
|
291
291
|
overflowX: 'auto',
|
|
292
292
|
overflowY: 'auto'
|
|
293
293
|
};
|
|
294
|
-
const wrapCls = classnames(
|
|
294
|
+
const wrapCls = classnames(`${prefixCls}-body`);
|
|
295
295
|
return /*#__PURE__*/React.createElement(List, Object.assign({}, typeof virtualized === 'object' ? virtualized : {}, {
|
|
296
296
|
initialScrollOffset: this.state.cache.virtualizedScrollTop,
|
|
297
297
|
onScroll: this.handleVirtualizedScroll,
|
|
@@ -516,7 +516,7 @@ class Body extends BaseComponent {
|
|
|
516
516
|
prefixCls: prefixCls
|
|
517
517
|
}); // const tableBody = this.renderBody();
|
|
518
518
|
|
|
519
|
-
const wrapCls =
|
|
519
|
+
const wrapCls = `${prefixCls}-body`;
|
|
520
520
|
const baseTable = /*#__PURE__*/React.createElement("div", {
|
|
521
521
|
key: "bodyTable",
|
|
522
522
|
className: wrapCls,
|
|
@@ -532,21 +532,21 @@ class Body extends BaseComponent {
|
|
|
532
532
|
"aria-colcount": columns && columns.length,
|
|
533
533
|
style: tableStyle,
|
|
534
534
|
className: classnames(prefixCls, {
|
|
535
|
-
[
|
|
535
|
+
[`${prefixCls}-fixed`]: anyColumnFixed
|
|
536
536
|
})
|
|
537
537
|
}, colgroup, includeHeader && showHeader ? /*#__PURE__*/React.createElement(TableHeader, Object.assign({}, this.props, {
|
|
538
538
|
ref: headerRef,
|
|
539
539
|
components: components,
|
|
540
540
|
columns: columns
|
|
541
541
|
})) : null, /*#__PURE__*/React.createElement(BodyWrapper, {
|
|
542
|
-
className:
|
|
542
|
+
className: `${prefixCls}-tbody`,
|
|
543
543
|
onScroll: onScroll
|
|
544
544
|
}, _isMap(groups) ? this.renderGroupedRows() : this.renderBodyRows(dataSource))), emptySlot);
|
|
545
545
|
|
|
546
546
|
if (fixed && columns.length) {
|
|
547
547
|
return /*#__PURE__*/React.createElement("div", {
|
|
548
548
|
key: "bodyTable",
|
|
549
|
-
className:
|
|
549
|
+
className: `${prefixCls}-body-outer`
|
|
550
550
|
}, baseTable);
|
|
551
551
|
}
|
|
552
552
|
|
package/lib/es/table/ColGroup.js
CHANGED
|
@@ -30,12 +30,12 @@ export default class ColGroup extends React.PureComponent {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
return /*#__PURE__*/React.createElement(Col, {
|
|
33
|
-
className: classnames(
|
|
33
|
+
className: classnames(`${prefixCls}-col`, column.className),
|
|
34
34
|
key: column.key || column.dataIndex || idx,
|
|
35
35
|
style: colStyle
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
|
-
const groupCls = classnames(
|
|
38
|
+
const groupCls = classnames(`${prefixCls}-colgroup`, className);
|
|
39
39
|
return /*#__PURE__*/React.createElement(ColGroup, {
|
|
40
40
|
className: groupCls,
|
|
41
41
|
style: style
|
|
@@ -69,7 +69,7 @@ function renderDropdown() {
|
|
|
69
69
|
const {
|
|
70
70
|
value
|
|
71
71
|
} = filter;
|
|
72
|
-
const key =
|
|
72
|
+
const key = `${level}_${index}`;
|
|
73
73
|
const dropdownItem = typeof renderFilterDropdownItem === 'function' ? renderFilterDropdownItem({
|
|
74
74
|
onChange: changeFn,
|
|
75
75
|
filterMultiple,
|
|
@@ -109,7 +109,7 @@ function renderDropdown() {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
return /*#__PURE__*/React.createElement(Dropdown, Object.assign({}, dropdownProps, {
|
|
112
|
-
key:
|
|
112
|
+
key: `Dropdown_level_${level}`
|
|
113
113
|
}), nestedElem);
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -125,7 +125,7 @@ export default function ColumnFilter() {
|
|
|
125
125
|
let {
|
|
126
126
|
filterDropdown = null
|
|
127
127
|
} = props;
|
|
128
|
-
const finalCls = cls(
|
|
128
|
+
const finalCls = cls(`${prefixCls}-column-filter`, {
|
|
129
129
|
on: Array.isArray(filteredValue) && filteredValue.length
|
|
130
130
|
});
|
|
131
131
|
let iconElem;
|
|
@@ -52,8 +52,8 @@ export default class TableSelectionCell extends BaseComponent {
|
|
|
52
52
|
checkboxProps = Object.assign(Object.assign({}, checkboxProps), getCheckboxProps());
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const wrapCls = classnames(
|
|
56
|
-
[
|
|
55
|
+
const wrapCls = classnames(`${prefixCls}-selection-wrap`, {
|
|
56
|
+
[`${prefixCls}-selection-disabled`]: disabled
|
|
57
57
|
}, className);
|
|
58
58
|
return /*#__PURE__*/React.createElement("span", {
|
|
59
59
|
className: wrapCls
|
|
@@ -15,10 +15,10 @@ export default class ColumnSorter extends PureComponent {
|
|
|
15
15
|
title
|
|
16
16
|
} = this.props;
|
|
17
17
|
const iconBtnSize = 'default';
|
|
18
|
-
const upCls = cls(
|
|
18
|
+
const upCls = cls(`${prefixCls}-column-sorter-up`, {
|
|
19
19
|
on: sortOrder === strings.SORT_DIRECTIONS[0]
|
|
20
20
|
});
|
|
21
|
-
const downCls = cls(
|
|
21
|
+
const downCls = cls(`${prefixCls}-column-sorter-down`, {
|
|
22
22
|
on: sortOrder === strings.SORT_DIRECTIONS[1]
|
|
23
23
|
});
|
|
24
24
|
const ariaProps = {
|
|
@@ -26,25 +26,25 @@ export default class ColumnSorter extends PureComponent {
|
|
|
26
26
|
* Set 'aria-sort' to aria-columnheader is difficult, so set 'aria-label' about sort info to sorter
|
|
27
27
|
* reference: https://developer.mozilla.org/en-US/docs/Web/API/Element/ariaSort
|
|
28
28
|
*/
|
|
29
|
-
'aria-label':
|
|
29
|
+
'aria-label': `Current sort order is ${sortOrder ? `${sortOrder}ing` : 'none'}`,
|
|
30
30
|
'aria-roledescription': 'Sort data with this column'
|
|
31
31
|
};
|
|
32
32
|
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
33
33
|
role: 'button'
|
|
34
34
|
}, ariaProps, {
|
|
35
35
|
tabIndex: -1,
|
|
36
|
-
className:
|
|
36
|
+
className: `${prefixCls}-column-sorter-wrapper`,
|
|
37
37
|
onClick: onClick,
|
|
38
38
|
onKeyPress: e => isEnterPress(e) && onClick(e)
|
|
39
39
|
}), title, /*#__PURE__*/React.createElement("div", {
|
|
40
40
|
style: style,
|
|
41
|
-
className:
|
|
41
|
+
className: `${prefixCls}-column-sorter`
|
|
42
42
|
}, /*#__PURE__*/React.createElement("span", {
|
|
43
|
-
className:
|
|
43
|
+
className: `${upCls}`
|
|
44
44
|
}, /*#__PURE__*/React.createElement(IconCaretup, {
|
|
45
45
|
size: iconBtnSize
|
|
46
46
|
})), /*#__PURE__*/React.createElement("span", {
|
|
47
|
-
className:
|
|
47
|
+
className: `${downCls}`
|
|
48
48
|
}, /*#__PURE__*/React.createElement(IconCaretdown, {
|
|
49
49
|
size: iconBtnSize
|
|
50
50
|
}))));
|
|
@@ -48,7 +48,7 @@ export default function CustomExpandIcon(props) {
|
|
|
48
48
|
const originIcon = icon;
|
|
49
49
|
icon = /*#__PURE__*/React.createElement(CSSAnimation, {
|
|
50
50
|
animationState: expanded ? "enter" : "leave",
|
|
51
|
-
startClassName:
|
|
51
|
+
startClassName: `${cssClasses.PREFIX}-expandedIcon-${expanded ? 'show' : "hide"}`
|
|
52
52
|
}, _ref => {
|
|
53
53
|
let {
|
|
54
54
|
animationClassName
|
|
@@ -66,7 +66,7 @@ export default function CustomExpandIcon(props) {
|
|
|
66
66
|
onClick: handleClick,
|
|
67
67
|
onMouseEnter: onMouseEnter,
|
|
68
68
|
onMouseLeave: onMouseLeave,
|
|
69
|
-
className:
|
|
69
|
+
className: `${prefixCls}-expand-icon`,
|
|
70
70
|
onKeyPress: e => isEnterPress(e) && handleClick(e)
|
|
71
71
|
}, icon);
|
|
72
72
|
}
|
|
@@ -63,8 +63,8 @@ class HeadTable extends React.PureComponent {
|
|
|
63
63
|
components: components,
|
|
64
64
|
onDidUpdate: onDidUpdate
|
|
65
65
|
}));
|
|
66
|
-
const headTableCls = classnames(
|
|
67
|
-
[
|
|
66
|
+
const headTableCls = classnames(`${prefixCls}-header`, {
|
|
67
|
+
[`${prefixCls}-header-sticky`]: sticky
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
const stickyTop = _get(sticky, 'top', 0);
|
|
@@ -82,7 +82,7 @@ class HeadTable extends React.PureComponent {
|
|
|
82
82
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
83
83
|
style: tableStyle,
|
|
84
84
|
className: classnames(prefixCls, {
|
|
85
|
-
[
|
|
85
|
+
[`${prefixCls}-fixed`]: anyColumnFixed
|
|
86
86
|
})
|
|
87
87
|
}, colgroup, tableHeader));
|
|
88
88
|
}
|
package/lib/es/table/Table.js
CHANGED
|
@@ -248,17 +248,17 @@ class Table extends BaseComponent {
|
|
|
248
248
|
const {
|
|
249
249
|
prefixCls
|
|
250
250
|
} = this.props;
|
|
251
|
-
const positionAll = [
|
|
251
|
+
const positionAll = [`${prefixCls}-scroll-position-both`, `${prefixCls}-scroll-position-middle`, `${prefixCls}-scroll-position-left`, `${prefixCls}-scroll-position-right`];
|
|
252
252
|
this.scrollPosition = position;
|
|
253
253
|
const tableNode = this.wrapRef.current;
|
|
254
254
|
|
|
255
255
|
if (tableNode && tableNode.nodeType) {
|
|
256
256
|
if (position === 'both') {
|
|
257
|
-
const acceptPosition = [
|
|
257
|
+
const acceptPosition = [`${prefixCls}-scroll-position-left`, `${prefixCls}-scroll-position-right`];
|
|
258
258
|
tableNode.classList.remove(..._difference(positionAll, acceptPosition));
|
|
259
259
|
tableNode.classList.add(...acceptPosition);
|
|
260
260
|
} else {
|
|
261
|
-
const acceptPosition = [
|
|
261
|
+
const acceptPosition = [`${prefixCls}-scroll-position-${position}`];
|
|
262
262
|
tableNode.classList.remove(..._difference(positionAll, acceptPosition));
|
|
263
263
|
tableNode.classList.add(...acceptPosition);
|
|
264
264
|
}
|
|
@@ -319,7 +319,7 @@ class Table extends BaseComponent {
|
|
|
319
319
|
const hasRowSelected = _this.foundation.hasRowSelected(selectedRowKeys, allRowKeysSet);
|
|
320
320
|
|
|
321
321
|
return /*#__PURE__*/React.createElement(ColumnSelection, {
|
|
322
|
-
"aria-label":
|
|
322
|
+
"aria-label": `${allIsSelected ? 'Deselect' : 'Select'} all rows`,
|
|
323
323
|
disabled: disabled,
|
|
324
324
|
key: columnKey,
|
|
325
325
|
selected: allIsSelected,
|
|
@@ -336,7 +336,7 @@ class Table extends BaseComponent {
|
|
|
336
336
|
const checkboxPropsFn = () => typeof getCheckboxProps === 'function' ? getCheckboxProps(record) : {};
|
|
337
337
|
|
|
338
338
|
return /*#__PURE__*/React.createElement(ColumnSelection, {
|
|
339
|
-
"aria-label":
|
|
339
|
+
"aria-label": `${selected ? 'Deselect' : 'Select'} this row`,
|
|
340
340
|
getCheckboxProps: checkboxPropsFn,
|
|
341
341
|
selected: selected,
|
|
342
342
|
onChange: (status, e) => _this.toggleSelectRow(status, key, e)
|
|
@@ -372,7 +372,7 @@ class Table extends BaseComponent {
|
|
|
372
372
|
column = Object.assign(Object.assign({}, column), _omit(rowSelection, needOmitSelectionKey));
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
column.className = classnames(column.className,
|
|
375
|
+
column.className = classnames(column.className, `${prefixCls}-column-selection`);
|
|
376
376
|
column.title = _this.renderTitleSelectionCallback;
|
|
377
377
|
column.render = _this.renderRowSelectionCallback;
|
|
378
378
|
}
|
|
@@ -438,7 +438,7 @@ class Table extends BaseComponent {
|
|
|
438
438
|
fixed: expandCellFixed,
|
|
439
439
|
key: strings.DEFAULT_KEY_COLUMN_EXPAND
|
|
440
440
|
};
|
|
441
|
-
column.className = classnames(column.className,
|
|
441
|
+
column.className = classnames(column.className, `${prefixCls}-column-expand`);
|
|
442
442
|
column.render = expandIcon !== false ? function () {
|
|
443
443
|
let text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
444
444
|
let record = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -572,7 +572,7 @@ class Table extends BaseComponent {
|
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
return /*#__PURE__*/isValidElement(title) || typeof title === 'string' ? /*#__PURE__*/React.createElement("div", {
|
|
575
|
-
className:
|
|
575
|
+
className: `${prefixCls}-title`,
|
|
576
576
|
"x-semi-prop": "title"
|
|
577
577
|
}, title) : null;
|
|
578
578
|
};
|
|
@@ -584,7 +584,7 @@ class Table extends BaseComponent {
|
|
|
584
584
|
empty,
|
|
585
585
|
dataSource
|
|
586
586
|
} = props;
|
|
587
|
-
const wrapCls =
|
|
587
|
+
const wrapCls = `${prefixCls}-placeholder`;
|
|
588
588
|
|
|
589
589
|
const isEmpty = _this.foundation.isEmpty(dataSource);
|
|
590
590
|
|
|
@@ -598,7 +598,7 @@ class Table extends BaseComponent {
|
|
|
598
598
|
}, (locale, localeCode) => /*#__PURE__*/React.createElement("div", {
|
|
599
599
|
className: wrapCls
|
|
600
600
|
}, /*#__PURE__*/React.createElement("div", {
|
|
601
|
-
className:
|
|
601
|
+
className: `${prefixCls}-empty`,
|
|
602
602
|
"x-semi-prop": "empty"
|
|
603
603
|
}, empty || locale.emptyText)));
|
|
604
604
|
};
|
|
@@ -618,7 +618,7 @@ class Table extends BaseComponent {
|
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
return /*#__PURE__*/isValidElement(footer) || typeof footer === 'string' ? /*#__PURE__*/React.createElement("div", {
|
|
621
|
-
className:
|
|
621
|
+
className: `${prefixCls}-footer`,
|
|
622
622
|
key: "footer",
|
|
623
623
|
"x-semi-prop": "footer"
|
|
624
624
|
}, footer) : null;
|
|
@@ -1432,13 +1432,13 @@ class Table extends BaseComponent {
|
|
|
1432
1432
|
}
|
|
1433
1433
|
|
|
1434
1434
|
const wrapCls = classnames({
|
|
1435
|
-
[
|
|
1436
|
-
[
|
|
1437
|
-
[
|
|
1438
|
-
[
|
|
1439
|
-
[
|
|
1440
|
-
[
|
|
1441
|
-
[
|
|
1435
|
+
[`${prefixCls}-${strings.SIZE_SMALL}`]: size === strings.SIZE_SMALL,
|
|
1436
|
+
[`${prefixCls}-${strings.SIZE_MIDDLE}`]: size === strings.SIZE_MIDDLE,
|
|
1437
|
+
[`${prefixCls}-virtualized`]: Boolean(virtualized),
|
|
1438
|
+
[`${prefixCls}-bordered`]: bordered,
|
|
1439
|
+
[`${prefixCls}-fixed-header`]: Boolean(y),
|
|
1440
|
+
[`${prefixCls}-scroll-position-left`]: ['both', 'left'].includes(this.position),
|
|
1441
|
+
[`${prefixCls}-scroll-position-right`]: ['both', 'right'].includes(this.position)
|
|
1442
1442
|
}); // pagination
|
|
1443
1443
|
|
|
1444
1444
|
const tablePagination = pagination && propPagination ? this.renderPagination(pagination, propRenderPagination) : null;
|
|
@@ -1461,7 +1461,7 @@ class Table extends BaseComponent {
|
|
|
1461
1461
|
});
|
|
1462
1462
|
return /*#__PURE__*/React.createElement("div", {
|
|
1463
1463
|
ref: this.rootWrapRef,
|
|
1464
|
-
className: classnames(className,
|
|
1464
|
+
className: classnames(className, `${prefixCls}-wrapper`),
|
|
1465
1465
|
"data-column-fixed": anyColumnFixed,
|
|
1466
1466
|
style: wrapStyle,
|
|
1467
1467
|
id: id
|
|
@@ -1478,7 +1478,7 @@ class Table extends BaseComponent {
|
|
|
1478
1478
|
dataSource: props.dataSource,
|
|
1479
1479
|
prefixCls: props.prefixCls
|
|
1480
1480
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1481
|
-
className:
|
|
1481
|
+
className: `${prefixCls}-container`
|
|
1482
1482
|
}, this.renderMainTable(Object.assign({}, props))), /*#__PURE__*/React.createElement(React.Fragment, {
|
|
1483
1483
|
key: 'pagination-bottom'
|
|
1484
1484
|
}, ['bottom', 'both'].includes(paginationPosition) ? tablePagination : null)))));
|
|
@@ -191,9 +191,9 @@ export default class TableCell extends BaseComponent {
|
|
|
191
191
|
|
|
192
192
|
const indentText = indent && indentSize ? /*#__PURE__*/React.createElement("span", {
|
|
193
193
|
style: {
|
|
194
|
-
paddingLeft:
|
|
194
|
+
paddingLeft: `${indentSize * indent}px`
|
|
195
195
|
},
|
|
196
|
-
className:
|
|
196
|
+
className: `${prefixCls}-row-indent indent-level-${indent}`
|
|
197
197
|
}) : null; // column.render
|
|
198
198
|
|
|
199
199
|
const realExpandIcon = typeof renderExpandIcon === 'function' ? renderExpandIcon(record) : expandIcon;
|
|
@@ -265,7 +265,7 @@ export default class TableCell extends BaseComponent {
|
|
|
265
265
|
|
|
266
266
|
if (isSection) {
|
|
267
267
|
inner = /*#__PURE__*/React.createElement("div", {
|
|
268
|
-
className: classnames(
|
|
268
|
+
className: classnames(`${prefixCls}-section-inner`),
|
|
269
269
|
style: {
|
|
270
270
|
width: anyColumnFixed ? amendTableWidth(tableWidth) : undefined
|
|
271
271
|
}
|
|
@@ -316,11 +316,11 @@ export default class TableCell extends BaseComponent {
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
const inner = this.renderInner(text, indentText, realExpandIcon);
|
|
319
|
-
const columnCls = classnames(className,
|
|
320
|
-
[
|
|
321
|
-
[
|
|
322
|
-
[
|
|
323
|
-
[
|
|
319
|
+
const columnCls = classnames(className, `${prefixCls}-row-cell`, _get(customCellProps, 'className'), {
|
|
320
|
+
[`${prefixCls}-cell-fixed-left`]: fixedLeftFlag,
|
|
321
|
+
[`${prefixCls}-cell-fixed-left-last`]: lastFixedLeft,
|
|
322
|
+
[`${prefixCls}-cell-fixed-right`]: fixedRightFlag,
|
|
323
|
+
[`${prefixCls}-cell-fixed-right-first`]: firstFixedRight
|
|
324
324
|
});
|
|
325
325
|
return /*#__PURE__*/React.createElement(BodyCell, Object.assign({
|
|
326
326
|
role: "gridcell",
|
|
@@ -113,7 +113,7 @@ class TableHeader extends BaseComponent {
|
|
|
113
113
|
const rows = parseHeaderRows(columns);
|
|
114
114
|
const HeaderWrapper = components.header.wrapper;
|
|
115
115
|
return /*#__PURE__*/React.createElement(HeaderWrapper, {
|
|
116
|
-
className:
|
|
116
|
+
className: `${prefixCls}-thead`,
|
|
117
117
|
ref: forwardedRef
|
|
118
118
|
}, rows.map((row, idx) => /*#__PURE__*/React.createElement(TableHeaderRow, {
|
|
119
119
|
prefixCls: prefixCls,
|
|
@@ -46,7 +46,7 @@ export default class TableHeaderRow extends BaseComponent<TableHeaderRowProps, R
|
|
|
46
46
|
getProps(): TableHeaderRowProps;
|
|
47
47
|
getState(key: string): any;
|
|
48
48
|
getStates(): Record<string, any>;
|
|
49
|
-
setState(s: Pick<Record<string, any>,
|
|
49
|
+
setState<K extends string>(s: Pick<Record<string, any>, K>, callback?: any): void;
|
|
50
50
|
getCache(c: string): any;
|
|
51
51
|
getCaches(): any;
|
|
52
52
|
setCache(key: any, value: any): void;
|
|
@@ -38,7 +38,7 @@ export default class TableHeaderRow extends BaseComponent {
|
|
|
38
38
|
row,
|
|
39
39
|
index
|
|
40
40
|
} = this.props;
|
|
41
|
-
const cellSelector =
|
|
41
|
+
const cellSelector = `.${prefixCls}-row-head`;
|
|
42
42
|
const heads = node && node.querySelectorAll && node.querySelectorAll(cellSelector);
|
|
43
43
|
this.context.setHeadWidths(_map(heads, (head, headIndex) => {
|
|
44
44
|
let configWidth = _get(row, [headIndex, 'column', 'width']);
|
|
@@ -92,7 +92,7 @@ export default class TableHeaderRow extends BaseComponent {
|
|
|
92
92
|
|
|
93
93
|
const rowProps = onHeaderRow(columns, index) || {};
|
|
94
94
|
|
|
95
|
-
_set(rowProps, 'className', classnames(_get(rowProps, 'className'),
|
|
95
|
+
_set(rowProps, 'className', classnames(_get(rowProps, 'className'), `${prefixCls}-row`));
|
|
96
96
|
|
|
97
97
|
const cells = _map(row, (cell, cellIndex) => {
|
|
98
98
|
const {
|
|
@@ -108,16 +108,16 @@ export default class TableHeaderRow extends BaseComponent {
|
|
|
108
108
|
textAlign: column.align
|
|
109
109
|
});
|
|
110
110
|
customProps.className = classnames(customProps.className, column.className, {
|
|
111
|
-
[
|
|
111
|
+
[`${prefixCls}-align-${column.align}`]: Boolean(column.align)
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
customProps.className = classnames(
|
|
115
|
+
customProps.className = classnames(`${prefixCls}-row-head`, column.className, customProps.className, // `${prefixCls}-fixed-columns`,
|
|
116
116
|
{
|
|
117
|
-
[
|
|
118
|
-
[
|
|
119
|
-
[
|
|
120
|
-
[
|
|
117
|
+
[`${prefixCls}-cell-fixed-left`]: isFixedLeft(column),
|
|
118
|
+
[`${prefixCls}-cell-fixed-left-last`]: isLastLeftFixed(slicedColumns, column),
|
|
119
|
+
[`${prefixCls}-cell-fixed-right`]: isFixedRight(column),
|
|
120
|
+
[`${prefixCls}-cell-fixed-right-first`]: isFirstFixedRight(slicedColumns, column)
|
|
121
121
|
});
|
|
122
122
|
|
|
123
123
|
if (headWidths.length && slicedColumns.length) {
|
|
@@ -19,11 +19,11 @@ export default class TablePagination extends PureComponent {
|
|
|
19
19
|
|
|
20
20
|
const customPagination = renderPagination && _isFunction(renderPagination) ? renderPagination(pagination) : null;
|
|
21
21
|
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className:
|
|
22
|
+
className: `${prefixCls}-pagination-outer`
|
|
23
23
|
}, /*#__PURE__*/isValidElement(customPagination) ? customPagination : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
24
|
-
className:
|
|
24
|
+
className: `${prefixCls}-pagination-info`
|
|
25
25
|
}, info), /*#__PURE__*/React.createElement("span", {
|
|
26
|
-
className:
|
|
26
|
+
className: `${prefixCls}-pagination-wrapper`
|
|
27
27
|
}, total > 0 ? /*#__PURE__*/React.createElement(Pagination, Object.assign({}, pagination, {
|
|
28
28
|
key: _get(pagination, 'pageSize', 'pagination')
|
|
29
29
|
})) : null)));
|