@douyinfe/semi-ui 2.29.0 → 2.30.0-alpha.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 +413 -16
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +2016 -1963
- 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.js +9 -9
- package/lib/cjs/anchor/link.js +8 -8
- 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.js +6 -6
- 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.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.js +1 -1
- package/lib/cjs/dropdown/dropdownTitle.js +2 -2
- 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.js +2 -2
- package/lib/cjs/form/errorMessage.js +1 -1
- 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.js +6 -6
- package/lib/cjs/pagination/index.js +24 -24
- 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.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 +3 -0
- package/lib/cjs/steps/basicStep.js +21 -15
- package/lib/cjs/steps/basicSteps.js +12 -9
- package/lib/cjs/steps/fillStep.d.ts +2 -0
- package/lib/cjs/steps/fillStep.js +12 -10
- package/lib/cjs/steps/fillSteps.js +11 -13
- package/lib/cjs/steps/index.d.ts +63 -1
- package/lib/cjs/steps/index.js +9 -0
- package/lib/cjs/steps/navStep.d.ts +4 -0
- package/lib/cjs/steps/navStep.js +26 -8
- package/lib/cjs/steps/navSteps.js +6 -4
- package/lib/cjs/steps/step.d.ts +4 -1
- package/lib/cjs/steps/step.js +1 -0
- 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.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.d.ts +5 -0
- package/lib/cjs/timeline/item.js +38 -10
- 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/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.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.js +9 -9
- package/lib/es/anchor/link.js +8 -8
- 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.js +6 -6
- 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.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.js +1 -1
- package/lib/es/dropdown/dropdownTitle.js +2 -2
- 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.js +2 -2
- package/lib/es/form/errorMessage.js +1 -1
- 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.js +6 -6
- package/lib/es/pagination/index.js +24 -24
- 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.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 +3 -0
- package/lib/es/steps/basicStep.js +21 -15
- package/lib/es/steps/basicSteps.js +12 -9
- package/lib/es/steps/fillStep.d.ts +2 -0
- package/lib/es/steps/fillStep.js +12 -10
- package/lib/es/steps/fillSteps.js +12 -13
- package/lib/es/steps/index.d.ts +63 -1
- package/lib/es/steps/index.js +6 -0
- package/lib/es/steps/navStep.d.ts +4 -0
- package/lib/es/steps/navStep.js +21 -8
- package/lib/es/steps/navSteps.js +6 -4
- package/lib/es/steps/step.d.ts +4 -1
- package/lib/es/steps/step.js +1 -0
- 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.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.d.ts +5 -0
- package/lib/es/timeline/item.js +38 -10
- 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/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.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
|
@@ -91,10 +91,10 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
this.calcScrollListHeight = () => {
|
|
94
|
-
const wrapLeft = this.adapter.getCache(
|
|
95
|
-
const wrapRight = this.adapter.getCache(
|
|
96
|
-
const switchLeft = this.adapter.getCache(
|
|
97
|
-
const switchRight = this.adapter.getCache(
|
|
94
|
+
const wrapLeft = this.adapter.getCache("wrap-".concat(_constants.strings.PANEL_TYPE_LEFT));
|
|
95
|
+
const wrapRight = this.adapter.getCache("wrap-".concat(_constants.strings.PANEL_TYPE_RIGHT));
|
|
96
|
+
const switchLeft = this.adapter.getCache("switch-".concat(_constants.strings.PANEL_TYPE_LEFT));
|
|
97
|
+
const switchRight = this.adapter.getCache("switch-".concat(_constants.strings.PANEL_TYPE_RIGHT));
|
|
98
98
|
const leftRect = wrapLeft && wrapLeft.getBoundingClientRect();
|
|
99
99
|
const rightRect = wrapRight && wrapRight.getBoundingClientRect();
|
|
100
100
|
let leftHeight = leftRect && leftRect.height || 0;
|
|
@@ -130,7 +130,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
this.reselect = () => {
|
|
133
|
-
const refKeys = [
|
|
133
|
+
const refKeys = ["timepicker-".concat(_constants.strings.PANEL_TYPE_LEFT), "timepicker-".concat(_constants.strings.PANEL_TYPE_RIGHT), "yam-".concat(_constants.strings.PANEL_TYPE_LEFT), "yam-".concat(_constants.strings.PANEL_TYPE_RIGHT)];
|
|
134
134
|
refKeys.forEach(key => {
|
|
135
135
|
const current = this.adapter.getCache(key);
|
|
136
136
|
|
|
@@ -273,7 +273,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
renderPanel(month, panelType) {
|
|
276
|
-
let monthCls = (0, _classnames.default)(
|
|
276
|
+
let monthCls = (0, _classnames.default)("".concat(prefixCls, "-month-grid-").concat(panelType));
|
|
277
277
|
const {
|
|
278
278
|
monthLeft,
|
|
279
279
|
monthRight,
|
|
@@ -289,14 +289,14 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
289
289
|
} = panelDetail;
|
|
290
290
|
const panelContent = this.renderMonth(month, panelType);
|
|
291
291
|
const yearAndMonthLayer = isYearPickerOpen ? /*#__PURE__*/_react.default.createElement("div", {
|
|
292
|
-
className:
|
|
292
|
+
className: "".concat(prefixCls, "-yam")
|
|
293
293
|
}, this.renderYearAndMonth(panelType, panelDetail)) : null;
|
|
294
294
|
const timePickerLayer = isTimePickerOpen ? /*#__PURE__*/_react.default.createElement("div", {
|
|
295
|
-
className:
|
|
295
|
+
className: "".concat(prefixCls, "-tpk")
|
|
296
296
|
}, this.renderTimePicker(panelType, panelDetail)) : null;
|
|
297
297
|
const style = {};
|
|
298
|
-
const wrapLeft = this.adapter.getCache(
|
|
299
|
-
const wrapRight = this.adapter.getCache(
|
|
298
|
+
const wrapLeft = this.adapter.getCache("wrap-".concat(_constants.strings.PANEL_TYPE_LEFT));
|
|
299
|
+
const wrapRight = this.adapter.getCache("wrap-".concat(_constants.strings.PANEL_TYPE_RIGHT));
|
|
300
300
|
const wrap = panelType === _constants.strings.PANEL_TYPE_RIGHT ? wrapRight : wrapLeft;
|
|
301
301
|
|
|
302
302
|
if (this.foundation.isRangeType()) {
|
|
@@ -319,7 +319,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
319
319
|
style.minHeight = currentPanelHeight ? currentPanelHeight : this.calcScrollListHeight();
|
|
320
320
|
}
|
|
321
321
|
} else if (this.props.type !== 'year' && this.props.type !== 'month' && (isTimePickerOpen || isYearPickerOpen)) {
|
|
322
|
-
monthCls = (0, _classnames.default)(monthCls,
|
|
322
|
+
monthCls = (0, _classnames.default)(monthCls, "".concat(prefixCls, "-yam-showing"));
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
const _isDatePanelOpen = !(isYearPickerOpen || isTimePickerOpen);
|
|
@@ -398,10 +398,10 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
401
|
-
ref: current => this.cacheRefCurrent(
|
|
401
|
+
ref: current => this.cacheRefCurrent("wrap-".concat(panelType), current),
|
|
402
402
|
style: style
|
|
403
403
|
}, /*#__PURE__*/_react.default.createElement(_navigation.default, {
|
|
404
|
-
forwardRef: current => this.cacheRefCurrent(
|
|
404
|
+
forwardRef: current => this.cacheRefCurrent("nav-".concat(panelType), current),
|
|
405
405
|
monthText: monthText,
|
|
406
406
|
density: density,
|
|
407
407
|
onMonthClick: e => this.showYearPicker(panelType, e),
|
|
@@ -414,7 +414,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
414
414
|
}), /*#__PURE__*/_react.default.createElement(_month.default, {
|
|
415
415
|
locale: locale,
|
|
416
416
|
localeCode: localeCode,
|
|
417
|
-
forwardRef: current => this.cacheRefCurrent(
|
|
417
|
+
forwardRef: current => this.cacheRefCurrent("month-".concat(panelType), current),
|
|
418
418
|
disabledDate: disabledDate,
|
|
419
419
|
weekStartsOn: weekStartsOn,
|
|
420
420
|
month: month,
|
|
@@ -450,7 +450,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
450
450
|
const {
|
|
451
451
|
pickerDate
|
|
452
452
|
} = panelDetail;
|
|
453
|
-
const timePanelCls = (0, _classnames.default)(
|
|
453
|
+
const timePanelCls = (0, _classnames.default)("".concat(prefixCls, "-time"));
|
|
454
454
|
const restProps = Object.assign(Object.assign({}, timePickerOpts), {
|
|
455
455
|
hideDisabledOptions
|
|
456
456
|
});
|
|
@@ -484,7 +484,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
484
484
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
485
485
|
className: timePanelCls
|
|
486
486
|
}, /*#__PURE__*/_react.default.createElement(_Combobox.default, Object.assign({
|
|
487
|
-
ref: current => this.cacheRefCurrent(
|
|
487
|
+
ref: current => this.cacheRefCurrent("timepicker-".concat(panelType), current),
|
|
488
488
|
panelHeader: placeholder,
|
|
489
489
|
format: format || _constants.strings.FORMAT_TIME_PICKER,
|
|
490
490
|
timeStampValue: pickerDate,
|
|
@@ -505,7 +505,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
505
505
|
const y = pickerDate.getFullYear();
|
|
506
506
|
const m = pickerDate.getMonth() + 1;
|
|
507
507
|
return /*#__PURE__*/_react.default.createElement(_yearAndMonth.default, {
|
|
508
|
-
ref: current => this.cacheRefCurrent(
|
|
508
|
+
ref: current => this.cacheRefCurrent("yam-".concat(panelType), current),
|
|
509
509
|
locale: locale,
|
|
510
510
|
localeCode: localeCode,
|
|
511
511
|
currentYear: y,
|
|
@@ -513,7 +513,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
513
513
|
onSelect: item => this.foundation.toYearMonth(panelType, new Date(item.currentYear, item.currentMonth - 1)),
|
|
514
514
|
onBackToMain: () => {
|
|
515
515
|
this.foundation.showDatePanel(panelType);
|
|
516
|
-
const wrapCurrent = this.adapter.getCache(
|
|
516
|
+
const wrapCurrent = this.adapter.getCache("wrap-".concat(panelType));
|
|
517
517
|
|
|
518
518
|
if (wrapCurrent) {
|
|
519
519
|
wrapCurrent.style.height = 'auto';
|
|
@@ -570,20 +570,20 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
570
570
|
const monthText = showDate ? (0, _dateFns.format)(showDate, FORMAT_SWITCH_DATE) : '';
|
|
571
571
|
const timeText = showDate ? (0, _dateFns.format)(showDate, formatTimePicker) : '';
|
|
572
572
|
const showSwitchIcon = ['default'].includes(density);
|
|
573
|
-
const switchCls = (0, _classnames.default)(
|
|
573
|
+
const switchCls = (0, _classnames.default)("".concat(prefixCls, "-switch"));
|
|
574
574
|
const dateCls = (0, _classnames.default)({
|
|
575
|
-
[
|
|
576
|
-
[
|
|
575
|
+
["".concat(prefixCls, "-switch-date")]: true,
|
|
576
|
+
["".concat(prefixCls, "-switch-date-active")]: !isTimePickerOpen
|
|
577
577
|
});
|
|
578
578
|
const timeCls = (0, _classnames.default)({
|
|
579
|
-
[
|
|
580
|
-
[
|
|
581
|
-
[
|
|
579
|
+
["".concat(prefixCls, "-switch-time")]: true,
|
|
580
|
+
["".concat(prefixCls, "-switch-time-disabled")]: disabledTimePicker,
|
|
581
|
+
["".concat(prefixCls, "-switch-date-active")]: isTimePickerOpen
|
|
582
582
|
});
|
|
583
|
-
const textCls = (0, _classnames.default)(
|
|
583
|
+
const textCls = (0, _classnames.default)("".concat(prefixCls, "-switch-text"));
|
|
584
584
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
585
585
|
className: switchCls,
|
|
586
|
-
ref: current => this.adapter.setCache(
|
|
586
|
+
ref: current => this.adapter.setCache("switch-".concat(panelType), current)
|
|
587
587
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
588
588
|
role: "button",
|
|
589
589
|
"aria-label": "Switch to date panel",
|
|
@@ -618,7 +618,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
618
618
|
renderDateInput
|
|
619
619
|
} = this.props;
|
|
620
620
|
const monthGridCls = (0, _classnames.default)({
|
|
621
|
-
[
|
|
621
|
+
["".concat(prefixCls, "-month-grid")]: true
|
|
622
622
|
});
|
|
623
623
|
const panelTypeLeft = _constants.strings.PANEL_TYPE_LEFT;
|
|
624
624
|
const panelTypeRight = _constants.strings.PANEL_TYPE_RIGHT;
|
|
@@ -98,7 +98,7 @@ class Navigation extends _react.PureComponent {
|
|
|
98
98
|
noHorizontalPadding: btnNoHorizontalPadding,
|
|
99
99
|
style: leftButtonStyle
|
|
100
100
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
-
className:
|
|
101
|
+
className: "".concat(prefixCls, "-month")
|
|
102
102
|
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
103
103
|
onClick: onMonthClick,
|
|
104
104
|
theme: btnTheme,
|
|
@@ -45,30 +45,30 @@ class QuickControl extends _react.PureComponent {
|
|
|
45
45
|
const isMonth = type === 'month';
|
|
46
46
|
const isTopAndBottomRange = isPanelTopAndBottom && isTypeRange;
|
|
47
47
|
const isTopAndBottomMonth = isPanelTopAndBottom && isMonth;
|
|
48
|
-
const wrapperCls = (0, _classnames.default)(
|
|
49
|
-
[
|
|
50
|
-
[
|
|
48
|
+
const wrapperCls = (0, _classnames.default)("".concat(prefixCls, "-quick-control"), {
|
|
49
|
+
["".concat(prefixCls, "-quick-control-").concat(type)]: type,
|
|
50
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition)]: true
|
|
51
51
|
});
|
|
52
52
|
const headerCls = (0, _classnames.default)({
|
|
53
|
-
[
|
|
53
|
+
["".concat(prefixCls, "-quick-control-header")]: true
|
|
54
54
|
});
|
|
55
55
|
const contentWrapperCls = (0, _classnames.default)({
|
|
56
|
-
[
|
|
56
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-content-wrapper")]: true
|
|
57
57
|
});
|
|
58
58
|
const contentCls = (0, _classnames.default)({
|
|
59
|
-
[
|
|
60
|
-
[
|
|
61
|
-
[
|
|
59
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-content")]: !isTopAndBottomRange && !isTopAndBottomMonth,
|
|
60
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-range-content")]: isTopAndBottomRange,
|
|
61
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-month-content")]: isTopAndBottomMonth
|
|
62
62
|
});
|
|
63
63
|
const itemCls = (0, _classnames.default)({
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
64
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-content-item")]: !isTopAndBottomRange && !isTopAndBottomMonth,
|
|
65
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-range-content-item")]: isTopAndBottomRange,
|
|
66
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-month-content-item")]: isTopAndBottomMonth
|
|
67
67
|
});
|
|
68
68
|
const ellipsisCls = (0, _classnames.default)({
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[
|
|
69
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-content-item-ellipsis")]: !isTopAndBottomRange && !isTopAndBottomMonth,
|
|
70
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-range-content-item-ellipsis")]: isTopAndBottomRange,
|
|
71
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-month-content-item-ellipsis")]: isTopAndBottomMonth
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
if (!presets.length) {
|
|
@@ -38,7 +38,7 @@ var _constants2 = require("@douyinfe/semi-foundation/lib/cjs/datePicker/constant
|
|
|
38
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
39
|
|
|
40
40
|
/* eslint-disable max-len */
|
|
41
|
-
const prefixCls =
|
|
41
|
+
const prefixCls = "".concat(_constants.BASE_CLASS_PREFIX, "-datepicker");
|
|
42
42
|
|
|
43
43
|
class YearAndMonth extends _baseComponent.default {
|
|
44
44
|
constructor(props) {
|
|
@@ -168,7 +168,7 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
168
168
|
|
|
169
169
|
if (localeCode === 'zh-CN' || localeCode === 'zh-TW') {
|
|
170
170
|
// Only Chinese needs to add [year] after the selected year
|
|
171
|
-
transform = val =>
|
|
171
|
+
transform = val => "".concat(val, "\u5E74");
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
return /*#__PURE__*/_react.default.createElement(_scrollItem.default, Object.assign({
|
|
@@ -203,7 +203,7 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
203
203
|
|
|
204
204
|
if (localeCode === 'zh-CN' || localeCode === 'zh-TW') {
|
|
205
205
|
// Only Chinese needs to add [month] after the selected month
|
|
206
|
-
transform = val =>
|
|
206
|
+
transform = val => "".concat(val, "\u6708");
|
|
207
207
|
} // i18n
|
|
208
208
|
|
|
209
209
|
|
|
@@ -241,7 +241,7 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
241
241
|
renderQuickControls,
|
|
242
242
|
renderDateInput
|
|
243
243
|
} = this.props;
|
|
244
|
-
const prefix =
|
|
244
|
+
const prefix = "".concat(prefixCls, "-yearmonth-header"); // i18n
|
|
245
245
|
|
|
246
246
|
const selectDateText = locale.selectDate;
|
|
247
247
|
const iconSize = density === 'compact' ? 'default' : 'large';
|
|
@@ -41,9 +41,9 @@ class Descriptions extends _react.PureComponent {
|
|
|
41
41
|
data
|
|
42
42
|
} = this.props;
|
|
43
43
|
const classNames = (0, _classnames.default)(prefixCls, className, {
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
44
|
+
["".concat(prefixCls, "-").concat(align)]: !row,
|
|
45
|
+
["".concat(prefixCls, "-double")]: row,
|
|
46
|
+
["".concat(prefixCls, "-double-").concat(size)]: row
|
|
47
47
|
});
|
|
48
48
|
const childrenList = data && data.length ? data.map((item, index) => (0, _isPlainObject2.default)(item) ? /*#__PURE__*/_react.default.createElement(_item.default, Object.assign({
|
|
49
49
|
itemKey: item.key
|
|
@@ -22,8 +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 prefixCls = _constants.cssClasses.PREFIX;
|
|
25
|
-
const keyCls =
|
|
26
|
-
const valCls =
|
|
25
|
+
const keyCls = "".concat(prefixCls, "-key");
|
|
26
|
+
const valCls = "".concat(prefixCls, "-value");
|
|
27
27
|
|
|
28
28
|
class Item extends _react.PureComponent {
|
|
29
29
|
render() {
|
|
@@ -46,7 +46,7 @@ class Item extends _react.PureComponent {
|
|
|
46
46
|
className: className,
|
|
47
47
|
style: style
|
|
48
48
|
}, /*#__PURE__*/_react.default.createElement("td", {
|
|
49
|
-
className:
|
|
49
|
+
className: "".concat(prefixCls, "-item")
|
|
50
50
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
51
51
|
className: keyCls
|
|
52
52
|
}, itemKey, ":"), /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -55,11 +55,11 @@ class Item extends _react.PureComponent {
|
|
|
55
55
|
className: className,
|
|
56
56
|
style: style
|
|
57
57
|
}, /*#__PURE__*/_react.default.createElement("th", {
|
|
58
|
-
className:
|
|
58
|
+
className: "".concat(prefixCls, "-item ").concat(prefixCls, "-item-th")
|
|
59
59
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
60
60
|
className: keyCls
|
|
61
61
|
}, itemKey)), /*#__PURE__*/_react.default.createElement("td", {
|
|
62
|
-
className:
|
|
62
|
+
className: "".concat(prefixCls, "-item ").concat(prefixCls, "-item-td")
|
|
63
63
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
64
64
|
className: valCls
|
|
65
65
|
}, typeof children === 'function' ? children() : children)));
|
package/lib/cjs/divider/index.js
CHANGED
|
@@ -40,12 +40,12 @@ const Divider = props => {
|
|
|
40
40
|
} = props,
|
|
41
41
|
rest = __rest(props, ["layout", "dashed", "align", "className", "margin", "style", "children"]);
|
|
42
42
|
|
|
43
|
-
const dividerClassNames = (0, _classnames.default)(
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
43
|
+
const dividerClassNames = (0, _classnames.default)("".concat(prefixCls, "-divider"), className, {
|
|
44
|
+
["".concat(prefixCls, "-divider-horizontal")]: layout === 'horizontal',
|
|
45
|
+
["".concat(prefixCls, "-divider-vertical")]: layout === 'vertical',
|
|
46
|
+
["".concat(prefixCls, "-divider-dashed")]: !!dashed,
|
|
47
|
+
["".concat(prefixCls, "-divider-with-text")]: children && layout === 'horizontal',
|
|
48
|
+
["".concat(prefixCls, "-divider-with-text-").concat(align)]: children && layout === 'horizontal'
|
|
49
49
|
});
|
|
50
50
|
let overrideDefaultStyle = {};
|
|
51
51
|
|
|
@@ -67,7 +67,7 @@ const Divider = props => {
|
|
|
67
67
|
className: dividerClassNames,
|
|
68
68
|
style: Object.assign(Object.assign({}, overrideDefaultStyle), style)
|
|
69
69
|
}), children && layout === 'horizontal' ? typeof children === 'string' ? /*#__PURE__*/_react.default.createElement("span", {
|
|
70
|
-
className:
|
|
70
|
+
className: "".concat(prefixCls, "-divider_inner-text"),
|
|
71
71
|
"x-semi-prop": "children"
|
|
72
72
|
}, children) : children : null);
|
|
73
73
|
};
|
|
@@ -24,7 +24,7 @@ const DropdownDivider = function () {
|
|
|
24
24
|
className
|
|
25
25
|
} = props;
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
27
|
-
className: (0, _classnames.default)(
|
|
27
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-divider"), className),
|
|
28
28
|
style: style
|
|
29
29
|
});
|
|
30
30
|
};
|
|
@@ -44,12 +44,12 @@ class DropdownItem extends _baseComponent.default {
|
|
|
44
44
|
showTick: contextShowTick
|
|
45
45
|
} = this.context;
|
|
46
46
|
const itemclass = (0, _classnames.default)(className, {
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
47
|
+
["".concat(prefixCls, "-item")]: true,
|
|
48
|
+
["".concat(prefixCls, "-item-disabled")]: disabled,
|
|
49
|
+
["".concat(prefixCls, "-item-hover")]: hover,
|
|
50
|
+
["".concat(prefixCls, "-item-withTick")]: contextShowTick !== null && contextShowTick !== void 0 ? contextShowTick : showTick,
|
|
51
|
+
["".concat(prefixCls, "-item-").concat(type)]: type,
|
|
52
|
+
["".concat(prefixCls, "-item-active")]: active
|
|
53
53
|
});
|
|
54
54
|
const events = {};
|
|
55
55
|
|
|
@@ -83,7 +83,7 @@ class DropdownItem extends _baseComponent.default {
|
|
|
83
83
|
|
|
84
84
|
if (icon) {
|
|
85
85
|
iconContent = /*#__PURE__*/_react.default.createElement("div", {
|
|
86
|
-
className:
|
|
86
|
+
className: "".concat(prefixCls, "-item-icon")
|
|
87
87
|
}, icon);
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -57,7 +57,7 @@ class DropdownMenu extends _baseComponent.default {
|
|
|
57
57
|
role: "menu",
|
|
58
58
|
"aria-orientation": "vertical"
|
|
59
59
|
}, rest, {
|
|
60
|
-
className: (0, _classnames.default)(
|
|
60
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-menu"), className),
|
|
61
61
|
style: style,
|
|
62
62
|
onKeyDown: e => this.foundation.onMenuKeydown(e)
|
|
63
63
|
}), children);
|
|
@@ -34,8 +34,8 @@ class DropdownTitle extends _react.PureComponent {
|
|
|
34
34
|
showTick
|
|
35
35
|
} = this.context;
|
|
36
36
|
const titleCls = (0, _classnames.default)({
|
|
37
|
-
[
|
|
38
|
-
[
|
|
37
|
+
["".concat(prefixCls, "-title")]: true,
|
|
38
|
+
["".concat(prefixCls, "-title-withTick")]: showTick
|
|
39
39
|
}, className);
|
|
40
40
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
41
41
|
className: titleCls,
|
|
@@ -109,7 +109,7 @@ class Dropdown extends _baseComponent.default {
|
|
|
109
109
|
className: className,
|
|
110
110
|
style: style
|
|
111
111
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
-
className:
|
|
112
|
+
className: "".concat(prefixCls, "-content"),
|
|
113
113
|
"x-semi-prop": "render"
|
|
114
114
|
}, content)));
|
|
115
115
|
}
|
|
@@ -182,7 +182,7 @@ class Dropdown extends _baseComponent.default {
|
|
|
182
182
|
className: className,
|
|
183
183
|
style: style
|
|
184
184
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
-
className:
|
|
185
|
+
className: "".concat(prefixCls, "-content")
|
|
186
186
|
}, render)));
|
|
187
187
|
}
|
|
188
188
|
|
|
@@ -236,7 +236,7 @@ class Dropdown extends _baseComponent.default {
|
|
|
236
236
|
}, attr), /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, {
|
|
237
237
|
//@ts-ignore
|
|
238
238
|
className: (0, _classnames.default)((0, _get2.default)(children, 'props.className'), {
|
|
239
|
-
[
|
|
239
|
+
["".concat(prefixCls, "-showing")]: popVisible
|
|
240
240
|
}),
|
|
241
241
|
'aria-haspopup': true,
|
|
242
242
|
'aria-expanded': popVisible,
|
package/lib/cjs/empty/index.js
CHANGED
|
@@ -91,14 +91,14 @@ class Empty extends _baseComponent.default {
|
|
|
91
91
|
imageNode = /*#__PURE__*/_react.default.createElement("svg", {
|
|
92
92
|
"aria-hidden": "true"
|
|
93
93
|
}, /*#__PURE__*/_react.default.createElement("use", {
|
|
94
|
-
xlinkHref:
|
|
94
|
+
xlinkHref: "#".concat(imgSrc.id)
|
|
95
95
|
}));
|
|
96
96
|
} else {
|
|
97
97
|
imageNode = imgSrc;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
const wrapperCls = (0, _classnames.default)(className, prefixCls, {
|
|
101
|
-
[
|
|
101
|
+
["".concat(prefixCls, "-").concat(layout)]: layout
|
|
102
102
|
});
|
|
103
103
|
const titleProps = imageNode ? {
|
|
104
104
|
heading: 4
|
|
@@ -112,19 +112,19 @@ class Empty extends _baseComponent.default {
|
|
|
112
112
|
className: wrapperCls,
|
|
113
113
|
style: style
|
|
114
114
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
115
|
-
className:
|
|
115
|
+
className: "".concat(prefixCls, "-image"),
|
|
116
116
|
style: imageStyle,
|
|
117
117
|
"x-semi-prop": "image,darkModeImage"
|
|
118
118
|
}, imageNode), /*#__PURE__*/_react.default.createElement("div", {
|
|
119
|
-
className:
|
|
119
|
+
className: "".concat(prefixCls, "-content")
|
|
120
120
|
}, title ? /*#__PURE__*/_react.default.createElement(_typography.default.Title, Object.assign({}, titleProps, {
|
|
121
|
-
className:
|
|
121
|
+
className: "".concat(prefixCls, "-title"),
|
|
122
122
|
"x-semi-prop": "title"
|
|
123
123
|
}), title) : null, description ? /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
-
className:
|
|
124
|
+
className: "".concat(prefixCls, "-description"),
|
|
125
125
|
"x-semi-prop": "description"
|
|
126
126
|
}, description) : null, children ? /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
-
className:
|
|
127
|
+
className: "".concat(prefixCls, "-footer"),
|
|
128
128
|
"x-semi-prop": "children"
|
|
129
129
|
}, children) : null));
|
|
130
130
|
}
|
|
@@ -210,7 +210,7 @@ class ArrayFieldComponent extends _react.Component {
|
|
|
210
210
|
const arrayFields = keys.map((key, i) => ({
|
|
211
211
|
// key: i,
|
|
212
212
|
key,
|
|
213
|
-
field:
|
|
213
|
+
field: "".concat(field, "[").concat(i, "]"),
|
|
214
214
|
remove: () => this.remove(i)
|
|
215
215
|
}));
|
|
216
216
|
const {
|
package/lib/cjs/form/baseForm.js
CHANGED
|
@@ -133,9 +133,9 @@ class Form extends _baseComponent.default {
|
|
|
133
133
|
const {
|
|
134
134
|
formId
|
|
135
135
|
} = this.state;
|
|
136
|
-
return document.querySelectorAll(
|
|
136
|
+
return document.querySelectorAll("form[x-form-id=\"".concat(formId, "\"] .").concat(_constants.cssClasses.PREFIX, "-field-error-message"));
|
|
137
137
|
},
|
|
138
|
-
getFieldDOM: field => document.querySelector(
|
|
138
|
+
getFieldDOM: field => document.querySelector(".".concat(_constants.cssClasses.PREFIX, "-field[x-field-id=\"").concat(field, "\"]"))
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
|
|
@@ -77,7 +77,7 @@ class ErrorMessage extends _react.PureComponent {
|
|
|
77
77
|
error: /*#__PURE__*/_react.default.createElement(_semiIcons.IconAlertCircle, null)
|
|
78
78
|
};
|
|
79
79
|
const text = error ? this.generatorText(error) : this.generatorText(helpText);
|
|
80
|
-
const iconCls =
|
|
80
|
+
const iconCls = "".concat(prefix, "-field-validate-status-icon");
|
|
81
81
|
let icon = null;
|
|
82
82
|
|
|
83
83
|
if (isInInputGroup) {
|
package/lib/cjs/form/group.js
CHANGED
|
@@ -117,13 +117,13 @@ class FormInputGroup extends _react.Component {
|
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
const groupCls = (0, _classnames.default)({
|
|
120
|
-
[
|
|
120
|
+
["".concat(prefix, "-field-group")]: true
|
|
121
121
|
});
|
|
122
122
|
const labelCol = formProps.labelCol;
|
|
123
123
|
const wrapperCol = formProps.wrapperCol;
|
|
124
124
|
const labelAlign = formProps.labelAlign;
|
|
125
125
|
const appendCol = labelCol && wrapperCol;
|
|
126
|
-
const labelColCls = labelCol ?
|
|
126
|
+
const labelColCls = labelCol ? "".concat(prefix, "-col-").concat(labelAlign) : '';
|
|
127
127
|
const labelContent = this.renderLabel(label, formProps);
|
|
128
128
|
|
|
129
129
|
const inputGroupContent = /*#__PURE__*/_react.default.createElement(_inputGroup.default, Object.assign({}, rest), inner);
|
|
@@ -134,10 +134,10 @@ class FormInputGroup extends _react.Component {
|
|
|
134
134
|
isInInputGroup: true
|
|
135
135
|
});
|
|
136
136
|
|
|
137
|
-
const extraCls = (0, _classnames.default)(
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
[
|
|
137
|
+
const extraCls = (0, _classnames.default)("".concat(prefix, "-field-extra"), {
|
|
138
|
+
["".concat(prefix, "-field-extra-string")]: typeof extraText === 'string',
|
|
139
|
+
["".concat(prefix, "-field-extra-middle")]: extraTextPosition === 'middle',
|
|
140
|
+
["".concat(prefix, "-field-extra-bottom")]: extraTextPosition === 'bottom'
|
|
141
141
|
});
|
|
142
142
|
const extraContent = extraText ? /*#__PURE__*/_react.default.createElement("div", {
|
|
143
143
|
className: extraCls,
|
|
@@ -447,18 +447,18 @@ function withField(Component, opts) {
|
|
|
447
447
|
let mergeExtraPos = extraTextPosition || formProps.extraTextPosition || 'bottom'; // id attribute to improve a11y
|
|
448
448
|
|
|
449
449
|
const a11yId = id ? id : field;
|
|
450
|
-
const labelId =
|
|
451
|
-
const helpTextId =
|
|
452
|
-
const extraTextId =
|
|
453
|
-
const errorMessageId =
|
|
450
|
+
const labelId = "".concat(a11yId, "-label");
|
|
451
|
+
const helpTextId = "".concat(a11yId, "-helpText");
|
|
452
|
+
const extraTextId = "".concat(a11yId, "-extraText");
|
|
453
|
+
const errorMessageId = "".concat(a11yId, "-errormessage");
|
|
454
454
|
|
|
455
455
|
const FieldComponent = () => {
|
|
456
456
|
// prefer to use validateStatus which pass by user throught props
|
|
457
457
|
let blockStatus = validateStatus ? validateStatus : status;
|
|
458
|
-
const extraCls = (0, _classnames.default)(
|
|
459
|
-
[
|
|
460
|
-
[
|
|
461
|
-
[
|
|
458
|
+
const extraCls = (0, _classnames.default)("".concat(prefix, "-field-extra"), {
|
|
459
|
+
["".concat(prefix, "-field-extra-string")]: typeof extraText === 'string',
|
|
460
|
+
["".concat(prefix, "-field-extra-middle")]: mergeExtraPos === 'middle',
|
|
461
|
+
["".concat(prefix, "-field-extra-bottom")]: mergeExtraPos === 'bottom'
|
|
462
462
|
});
|
|
463
463
|
const extraContent = extraText ? /*#__PURE__*/_react.default.createElement("div", {
|
|
464
464
|
className: extraCls,
|
|
@@ -483,11 +483,11 @@ function withField(Component, opts) {
|
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
if (helpText) {
|
|
486
|
-
newProps['aria-describedby'] = extraText ?
|
|
486
|
+
newProps['aria-describedby'] = extraText ? "".concat(helpTextId, " ").concat(extraTextId) : helpTextId;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
if (extraText) {
|
|
490
|
-
newProps['aria-describedby'] = helpText ?
|
|
490
|
+
newProps['aria-describedby'] = helpText ? "".concat(helpTextId, " ").concat(extraTextId) : extraTextId;
|
|
491
491
|
}
|
|
492
492
|
|
|
493
493
|
if (status === 'error') {
|
|
@@ -496,12 +496,12 @@ function withField(Component, opts) {
|
|
|
496
496
|
}
|
|
497
497
|
|
|
498
498
|
const fieldCls = (0, _classnames.default)({
|
|
499
|
-
[
|
|
500
|
-
[
|
|
499
|
+
["".concat(prefix, "-field")]: true,
|
|
500
|
+
["".concat(prefix, "-field-").concat(name)]: Boolean(name),
|
|
501
501
|
[fieldClassName]: Boolean(fieldClassName)
|
|
502
502
|
});
|
|
503
503
|
const fieldMaincls = (0, _classnames.default)({
|
|
504
|
-
[
|
|
504
|
+
["".concat(prefix, "-field-main")]: true
|
|
505
505
|
});
|
|
506
506
|
|
|
507
507
|
if (mergeLabelPos === 'inset' && !noLabel) {
|
|
@@ -523,8 +523,8 @@ function withField(Component, opts) {
|
|
|
523
523
|
|
|
524
524
|
if (pure) {
|
|
525
525
|
let pureCls = (0, _classnames.default)(rest.className, {
|
|
526
|
-
[
|
|
527
|
-
[
|
|
526
|
+
["".concat(prefix, "-field-pure")]: true,
|
|
527
|
+
["".concat(prefix, "-field-").concat(name)]: Boolean(name),
|
|
528
528
|
[fieldClassName]: Boolean(fieldClassName)
|
|
529
529
|
});
|
|
530
530
|
newProps.className = pureCls;
|
|
@@ -532,7 +532,7 @@ function withField(Component, opts) {
|
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
let withCol = mergeLabelCol && mergeWrapperCol;
|
|
535
|
-
const labelColCls = mergeLabelAlign ?
|
|
535
|
+
const labelColCls = mergeLabelAlign ? "".concat(prefix, "-col-").concat(mergeLabelAlign) : ''; // get label
|
|
536
536
|
|
|
537
537
|
let labelContent = null;
|
|
538
538
|
|