@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
|
@@ -65,10 +65,10 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
this.calcScrollListHeight = () => {
|
|
68
|
-
const wrapLeft = this.adapter.getCache(
|
|
69
|
-
const wrapRight = this.adapter.getCache(
|
|
70
|
-
const switchLeft = this.adapter.getCache(
|
|
71
|
-
const switchRight = this.adapter.getCache(
|
|
68
|
+
const wrapLeft = this.adapter.getCache("wrap-".concat(strings.PANEL_TYPE_LEFT));
|
|
69
|
+
const wrapRight = this.adapter.getCache("wrap-".concat(strings.PANEL_TYPE_RIGHT));
|
|
70
|
+
const switchLeft = this.adapter.getCache("switch-".concat(strings.PANEL_TYPE_LEFT));
|
|
71
|
+
const switchRight = this.adapter.getCache("switch-".concat(strings.PANEL_TYPE_RIGHT));
|
|
72
72
|
const leftRect = wrapLeft && wrapLeft.getBoundingClientRect();
|
|
73
73
|
const rightRect = wrapRight && wrapRight.getBoundingClientRect();
|
|
74
74
|
let leftHeight = leftRect && leftRect.height || 0;
|
|
@@ -104,7 +104,7 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
this.reselect = () => {
|
|
107
|
-
const refKeys = [
|
|
107
|
+
const refKeys = ["timepicker-".concat(strings.PANEL_TYPE_LEFT), "timepicker-".concat(strings.PANEL_TYPE_RIGHT), "yam-".concat(strings.PANEL_TYPE_LEFT), "yam-".concat(strings.PANEL_TYPE_RIGHT)];
|
|
108
108
|
refKeys.forEach(key => {
|
|
109
109
|
const current = this.adapter.getCache(key);
|
|
110
110
|
|
|
@@ -247,7 +247,7 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
renderPanel(month, panelType) {
|
|
250
|
-
let monthCls = classnames(
|
|
250
|
+
let monthCls = classnames("".concat(prefixCls, "-month-grid-").concat(panelType));
|
|
251
251
|
const {
|
|
252
252
|
monthLeft,
|
|
253
253
|
monthRight,
|
|
@@ -263,14 +263,14 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
263
263
|
} = panelDetail;
|
|
264
264
|
const panelContent = this.renderMonth(month, panelType);
|
|
265
265
|
const yearAndMonthLayer = isYearPickerOpen ? /*#__PURE__*/React.createElement("div", {
|
|
266
|
-
className:
|
|
266
|
+
className: "".concat(prefixCls, "-yam")
|
|
267
267
|
}, this.renderYearAndMonth(panelType, panelDetail)) : null;
|
|
268
268
|
const timePickerLayer = isTimePickerOpen ? /*#__PURE__*/React.createElement("div", {
|
|
269
|
-
className:
|
|
269
|
+
className: "".concat(prefixCls, "-tpk")
|
|
270
270
|
}, this.renderTimePicker(panelType, panelDetail)) : null;
|
|
271
271
|
const style = {};
|
|
272
|
-
const wrapLeft = this.adapter.getCache(
|
|
273
|
-
const wrapRight = this.adapter.getCache(
|
|
272
|
+
const wrapLeft = this.adapter.getCache("wrap-".concat(strings.PANEL_TYPE_LEFT));
|
|
273
|
+
const wrapRight = this.adapter.getCache("wrap-".concat(strings.PANEL_TYPE_RIGHT));
|
|
274
274
|
const wrap = panelType === strings.PANEL_TYPE_RIGHT ? wrapRight : wrapLeft;
|
|
275
275
|
|
|
276
276
|
if (this.foundation.isRangeType()) {
|
|
@@ -293,7 +293,7 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
293
293
|
style.minHeight = currentPanelHeight ? currentPanelHeight : this.calcScrollListHeight();
|
|
294
294
|
}
|
|
295
295
|
} else if (this.props.type !== 'year' && this.props.type !== 'month' && (isTimePickerOpen || isYearPickerOpen)) {
|
|
296
|
-
monthCls = classnames(monthCls,
|
|
296
|
+
monthCls = classnames(monthCls, "".concat(prefixCls, "-yam-showing"));
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
const _isDatePanelOpen = !(isYearPickerOpen || isTimePickerOpen);
|
|
@@ -372,10 +372,10 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
return /*#__PURE__*/React.createElement("div", {
|
|
375
|
-
ref: current => this.cacheRefCurrent(
|
|
375
|
+
ref: current => this.cacheRefCurrent("wrap-".concat(panelType), current),
|
|
376
376
|
style: style
|
|
377
377
|
}, /*#__PURE__*/React.createElement(Navigation, {
|
|
378
|
-
forwardRef: current => this.cacheRefCurrent(
|
|
378
|
+
forwardRef: current => this.cacheRefCurrent("nav-".concat(panelType), current),
|
|
379
379
|
monthText: monthText,
|
|
380
380
|
density: density,
|
|
381
381
|
onMonthClick: e => this.showYearPicker(panelType, e),
|
|
@@ -388,7 +388,7 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
388
388
|
}), /*#__PURE__*/React.createElement(Month, {
|
|
389
389
|
locale: locale,
|
|
390
390
|
localeCode: localeCode,
|
|
391
|
-
forwardRef: current => this.cacheRefCurrent(
|
|
391
|
+
forwardRef: current => this.cacheRefCurrent("month-".concat(panelType), current),
|
|
392
392
|
disabledDate: disabledDate,
|
|
393
393
|
weekStartsOn: weekStartsOn,
|
|
394
394
|
month: month,
|
|
@@ -424,7 +424,7 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
424
424
|
const {
|
|
425
425
|
pickerDate
|
|
426
426
|
} = panelDetail;
|
|
427
|
-
const timePanelCls = classnames(
|
|
427
|
+
const timePanelCls = classnames("".concat(prefixCls, "-time"));
|
|
428
428
|
const restProps = Object.assign(Object.assign({}, timePickerOpts), {
|
|
429
429
|
hideDisabledOptions
|
|
430
430
|
});
|
|
@@ -458,7 +458,7 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
458
458
|
return /*#__PURE__*/React.createElement("div", {
|
|
459
459
|
className: timePanelCls
|
|
460
460
|
}, /*#__PURE__*/React.createElement(Combobox, Object.assign({
|
|
461
|
-
ref: current => this.cacheRefCurrent(
|
|
461
|
+
ref: current => this.cacheRefCurrent("timepicker-".concat(panelType), current),
|
|
462
462
|
panelHeader: placeholder,
|
|
463
463
|
format: format || strings.FORMAT_TIME_PICKER,
|
|
464
464
|
timeStampValue: pickerDate,
|
|
@@ -479,7 +479,7 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
479
479
|
const y = pickerDate.getFullYear();
|
|
480
480
|
const m = pickerDate.getMonth() + 1;
|
|
481
481
|
return /*#__PURE__*/React.createElement(YearAndMonth, {
|
|
482
|
-
ref: current => this.cacheRefCurrent(
|
|
482
|
+
ref: current => this.cacheRefCurrent("yam-".concat(panelType), current),
|
|
483
483
|
locale: locale,
|
|
484
484
|
localeCode: localeCode,
|
|
485
485
|
currentYear: y,
|
|
@@ -487,7 +487,7 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
487
487
|
onSelect: item => this.foundation.toYearMonth(panelType, new Date(item.currentYear, item.currentMonth - 1)),
|
|
488
488
|
onBackToMain: () => {
|
|
489
489
|
this.foundation.showDatePanel(panelType);
|
|
490
|
-
const wrapCurrent = this.adapter.getCache(
|
|
490
|
+
const wrapCurrent = this.adapter.getCache("wrap-".concat(panelType));
|
|
491
491
|
|
|
492
492
|
if (wrapCurrent) {
|
|
493
493
|
wrapCurrent.style.height = 'auto';
|
|
@@ -544,20 +544,20 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
544
544
|
const monthText = showDate ? formatFn(showDate, FORMAT_SWITCH_DATE) : '';
|
|
545
545
|
const timeText = showDate ? formatFn(showDate, formatTimePicker) : '';
|
|
546
546
|
const showSwitchIcon = ['default'].includes(density);
|
|
547
|
-
const switchCls = classnames(
|
|
547
|
+
const switchCls = classnames("".concat(prefixCls, "-switch"));
|
|
548
548
|
const dateCls = classnames({
|
|
549
|
-
[
|
|
550
|
-
[
|
|
549
|
+
["".concat(prefixCls, "-switch-date")]: true,
|
|
550
|
+
["".concat(prefixCls, "-switch-date-active")]: !isTimePickerOpen
|
|
551
551
|
});
|
|
552
552
|
const timeCls = classnames({
|
|
553
|
-
[
|
|
554
|
-
[
|
|
555
|
-
[
|
|
553
|
+
["".concat(prefixCls, "-switch-time")]: true,
|
|
554
|
+
["".concat(prefixCls, "-switch-time-disabled")]: disabledTimePicker,
|
|
555
|
+
["".concat(prefixCls, "-switch-date-active")]: isTimePickerOpen
|
|
556
556
|
});
|
|
557
|
-
const textCls = classnames(
|
|
557
|
+
const textCls = classnames("".concat(prefixCls, "-switch-text"));
|
|
558
558
|
return /*#__PURE__*/React.createElement("div", {
|
|
559
559
|
className: switchCls,
|
|
560
|
-
ref: current => this.adapter.setCache(
|
|
560
|
+
ref: current => this.adapter.setCache("switch-".concat(panelType), current)
|
|
561
561
|
}, /*#__PURE__*/React.createElement("div", {
|
|
562
562
|
role: "button",
|
|
563
563
|
"aria-label": "Switch to date panel",
|
|
@@ -592,7 +592,7 @@ export default class MonthsGrid extends BaseComponent {
|
|
|
592
592
|
renderDateInput
|
|
593
593
|
} = this.props;
|
|
594
594
|
const monthGridCls = classnames({
|
|
595
|
-
[
|
|
595
|
+
["".concat(prefixCls, "-month-grid")]: true
|
|
596
596
|
});
|
|
597
597
|
const panelTypeLeft = strings.PANEL_TYPE_LEFT;
|
|
598
598
|
const panelTypeRight = strings.PANEL_TYPE_RIGHT;
|
|
@@ -77,7 +77,7 @@ export default class Navigation extends PureComponent {
|
|
|
77
77
|
noHorizontalPadding: btnNoHorizontalPadding,
|
|
78
78
|
style: leftButtonStyle
|
|
79
79
|
}), /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
className:
|
|
80
|
+
className: "".concat(prefixCls, "-month")
|
|
81
81
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
82
82
|
onClick: onMonthClick,
|
|
83
83
|
theme: btnTheme,
|
|
@@ -25,30 +25,30 @@ class QuickControl extends PureComponent {
|
|
|
25
25
|
const isMonth = type === 'month';
|
|
26
26
|
const isTopAndBottomRange = isPanelTopAndBottom && isTypeRange;
|
|
27
27
|
const isTopAndBottomMonth = isPanelTopAndBottom && isMonth;
|
|
28
|
-
const wrapperCls = classNames(
|
|
29
|
-
[
|
|
30
|
-
[
|
|
28
|
+
const wrapperCls = classNames("".concat(prefixCls, "-quick-control"), {
|
|
29
|
+
["".concat(prefixCls, "-quick-control-").concat(type)]: type,
|
|
30
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition)]: true
|
|
31
31
|
});
|
|
32
32
|
const headerCls = classNames({
|
|
33
|
-
[
|
|
33
|
+
["".concat(prefixCls, "-quick-control-header")]: true
|
|
34
34
|
});
|
|
35
35
|
const contentWrapperCls = classNames({
|
|
36
|
-
[
|
|
36
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-content-wrapper")]: true
|
|
37
37
|
});
|
|
38
38
|
const contentCls = classNames({
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
39
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-content")]: !isTopAndBottomRange && !isTopAndBottomMonth,
|
|
40
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-range-content")]: isTopAndBottomRange,
|
|
41
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-month-content")]: isTopAndBottomMonth
|
|
42
42
|
});
|
|
43
43
|
const itemCls = classNames({
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
44
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-content-item")]: !isTopAndBottomRange && !isTopAndBottomMonth,
|
|
45
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-range-content-item")]: isTopAndBottomRange,
|
|
46
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-month-content-item")]: isTopAndBottomMonth
|
|
47
47
|
});
|
|
48
48
|
const ellipsisCls = classNames({
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
49
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-content-item-ellipsis")]: !isTopAndBottomRange && !isTopAndBottomMonth,
|
|
50
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-range-content-item-ellipsis")]: isTopAndBottomRange,
|
|
51
|
+
["".concat(prefixCls, "-quick-control-").concat(presetPosition, "-month-content-item-ellipsis")]: isTopAndBottomMonth
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
if (!presets.length) {
|
|
@@ -15,7 +15,7 @@ import { IconChevronLeft } from '@douyinfe/semi-icons';
|
|
|
15
15
|
import { BASE_CLASS_PREFIX } from '@douyinfe/semi-foundation/lib/es/base/constants';
|
|
16
16
|
import { setYear, setMonth, set } from 'date-fns';
|
|
17
17
|
import { strings } from '@douyinfe/semi-foundation/lib/es/datePicker/constants';
|
|
18
|
-
const prefixCls =
|
|
18
|
+
const prefixCls = "".concat(BASE_CLASS_PREFIX, "-datepicker");
|
|
19
19
|
|
|
20
20
|
class YearAndMonth extends BaseComponent {
|
|
21
21
|
constructor(props) {
|
|
@@ -145,7 +145,7 @@ class YearAndMonth extends BaseComponent {
|
|
|
145
145
|
|
|
146
146
|
if (localeCode === 'zh-CN' || localeCode === 'zh-TW') {
|
|
147
147
|
// Only Chinese needs to add [year] after the selected year
|
|
148
|
-
transform = val =>
|
|
148
|
+
transform = val => "".concat(val, "\u5E74");
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
return /*#__PURE__*/React.createElement(ScrollItem, Object.assign({
|
|
@@ -180,7 +180,7 @@ class YearAndMonth extends BaseComponent {
|
|
|
180
180
|
|
|
181
181
|
if (localeCode === 'zh-CN' || localeCode === 'zh-TW') {
|
|
182
182
|
// Only Chinese needs to add [month] after the selected month
|
|
183
|
-
transform = val =>
|
|
183
|
+
transform = val => "".concat(val, "\u6708");
|
|
184
184
|
} // i18n
|
|
185
185
|
|
|
186
186
|
|
|
@@ -218,7 +218,7 @@ class YearAndMonth extends BaseComponent {
|
|
|
218
218
|
renderQuickControls,
|
|
219
219
|
renderDateInput
|
|
220
220
|
} = this.props;
|
|
221
|
-
const prefix =
|
|
221
|
+
const prefix = "".concat(prefixCls, "-yearmonth-header"); // i18n
|
|
222
222
|
|
|
223
223
|
const selectDateText = locale.selectDate;
|
|
224
224
|
const iconSize = density === 'compact' ? 'default' : 'large';
|
|
@@ -20,9 +20,9 @@ class Descriptions extends PureComponent {
|
|
|
20
20
|
data
|
|
21
21
|
} = this.props;
|
|
22
22
|
const classNames = cls(prefixCls, className, {
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
23
|
+
["".concat(prefixCls, "-").concat(align)]: !row,
|
|
24
|
+
["".concat(prefixCls, "-double")]: row,
|
|
25
|
+
["".concat(prefixCls, "-double-").concat(size)]: row
|
|
26
26
|
});
|
|
27
27
|
const childrenList = data && data.length ? data.map((item, index) => _isPlainObject(item) ? /*#__PURE__*/React.createElement(Item, Object.assign({
|
|
28
28
|
itemKey: item.key
|
|
@@ -4,8 +4,8 @@ import { cssClasses } from '@douyinfe/semi-foundation/lib/es/descriptions/consta
|
|
|
4
4
|
import '@douyinfe/semi-foundation/lib/es/descriptions/descriptions.css';
|
|
5
5
|
import DescriptionsContext from './descriptions-context';
|
|
6
6
|
const prefixCls = cssClasses.PREFIX;
|
|
7
|
-
const keyCls =
|
|
8
|
-
const valCls =
|
|
7
|
+
const keyCls = "".concat(prefixCls, "-key");
|
|
8
|
+
const valCls = "".concat(prefixCls, "-value");
|
|
9
9
|
export default class Item extends PureComponent {
|
|
10
10
|
render() {
|
|
11
11
|
const {
|
|
@@ -27,7 +27,7 @@ export default class Item extends PureComponent {
|
|
|
27
27
|
className: className,
|
|
28
28
|
style: style
|
|
29
29
|
}, /*#__PURE__*/React.createElement("td", {
|
|
30
|
-
className:
|
|
30
|
+
className: "".concat(prefixCls, "-item")
|
|
31
31
|
}, /*#__PURE__*/React.createElement("span", {
|
|
32
32
|
className: keyCls
|
|
33
33
|
}, itemKey, ":"), /*#__PURE__*/React.createElement("span", {
|
|
@@ -36,11 +36,11 @@ export default class Item extends PureComponent {
|
|
|
36
36
|
className: className,
|
|
37
37
|
style: style
|
|
38
38
|
}, /*#__PURE__*/React.createElement("th", {
|
|
39
|
-
className:
|
|
39
|
+
className: "".concat(prefixCls, "-item ").concat(prefixCls, "-item-th")
|
|
40
40
|
}, /*#__PURE__*/React.createElement("span", {
|
|
41
41
|
className: keyCls
|
|
42
42
|
}, itemKey)), /*#__PURE__*/React.createElement("td", {
|
|
43
|
-
className:
|
|
43
|
+
className: "".concat(prefixCls, "-item ").concat(prefixCls, "-item-td")
|
|
44
44
|
}, /*#__PURE__*/React.createElement("span", {
|
|
45
45
|
className: valCls
|
|
46
46
|
}, typeof children === 'function' ? children() : children)));
|
package/lib/es/divider/index.js
CHANGED
|
@@ -27,12 +27,12 @@ const Divider = props => {
|
|
|
27
27
|
} = props,
|
|
28
28
|
rest = __rest(props, ["layout", "dashed", "align", "className", "margin", "style", "children"]);
|
|
29
29
|
|
|
30
|
-
const dividerClassNames = cls(
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
30
|
+
const dividerClassNames = cls("".concat(prefixCls, "-divider"), className, {
|
|
31
|
+
["".concat(prefixCls, "-divider-horizontal")]: layout === 'horizontal',
|
|
32
|
+
["".concat(prefixCls, "-divider-vertical")]: layout === 'vertical',
|
|
33
|
+
["".concat(prefixCls, "-divider-dashed")]: !!dashed,
|
|
34
|
+
["".concat(prefixCls, "-divider-with-text")]: children && layout === 'horizontal',
|
|
35
|
+
["".concat(prefixCls, "-divider-with-text-").concat(align)]: children && layout === 'horizontal'
|
|
36
36
|
});
|
|
37
37
|
let overrideDefaultStyle = {};
|
|
38
38
|
|
|
@@ -54,7 +54,7 @@ const Divider = props => {
|
|
|
54
54
|
className: dividerClassNames,
|
|
55
55
|
style: Object.assign(Object.assign({}, overrideDefaultStyle), style)
|
|
56
56
|
}), children && layout === 'horizontal' ? typeof children === 'string' ? /*#__PURE__*/React.createElement("span", {
|
|
57
|
-
className:
|
|
57
|
+
className: "".concat(prefixCls, "-divider_inner-text"),
|
|
58
58
|
"x-semi-prop": "children"
|
|
59
59
|
}, children) : children : null);
|
|
60
60
|
};
|
|
@@ -11,7 +11,7 @@ const DropdownDivider = function () {
|
|
|
11
11
|
className
|
|
12
12
|
} = props;
|
|
13
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
-
className: classnames(
|
|
14
|
+
className: classnames("".concat(prefixCls, "-divider"), className),
|
|
15
15
|
style: style
|
|
16
16
|
});
|
|
17
17
|
};
|
|
@@ -27,12 +27,12 @@ class DropdownItem extends BaseComponent {
|
|
|
27
27
|
showTick: contextShowTick
|
|
28
28
|
} = this.context;
|
|
29
29
|
const itemclass = cls(className, {
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
30
|
+
["".concat(prefixCls, "-item")]: true,
|
|
31
|
+
["".concat(prefixCls, "-item-disabled")]: disabled,
|
|
32
|
+
["".concat(prefixCls, "-item-hover")]: hover,
|
|
33
|
+
["".concat(prefixCls, "-item-withTick")]: contextShowTick !== null && contextShowTick !== void 0 ? contextShowTick : showTick,
|
|
34
|
+
["".concat(prefixCls, "-item-").concat(type)]: type,
|
|
35
|
+
["".concat(prefixCls, "-item-active")]: active
|
|
36
36
|
});
|
|
37
37
|
const events = {};
|
|
38
38
|
|
|
@@ -66,7 +66,7 @@ class DropdownItem extends BaseComponent {
|
|
|
66
66
|
|
|
67
67
|
if (icon) {
|
|
68
68
|
iconContent = /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className:
|
|
69
|
+
className: "".concat(prefixCls, "-item-icon")
|
|
70
70
|
}, icon);
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -41,7 +41,7 @@ class DropdownMenu extends BaseComponent {
|
|
|
41
41
|
role: "menu",
|
|
42
42
|
"aria-orientation": "vertical"
|
|
43
43
|
}, rest, {
|
|
44
|
-
className: classnames(
|
|
44
|
+
className: classnames("".concat(prefixCls, "-menu"), className),
|
|
45
45
|
style: style,
|
|
46
46
|
onKeyDown: e => this.foundation.onMenuKeydown(e)
|
|
47
47
|
}), children);
|
|
@@ -16,8 +16,8 @@ class DropdownTitle extends PureComponent {
|
|
|
16
16
|
showTick
|
|
17
17
|
} = this.context;
|
|
18
18
|
const titleCls = cls({
|
|
19
|
-
[
|
|
20
|
-
[
|
|
19
|
+
["".concat(prefixCls, "-title")]: true,
|
|
20
|
+
["".concat(prefixCls, "-title-withTick")]: showTick
|
|
21
21
|
}, className);
|
|
22
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
23
|
className: titleCls,
|
package/lib/es/dropdown/index.js
CHANGED
|
@@ -85,7 +85,7 @@ class Dropdown extends BaseComponent {
|
|
|
85
85
|
className: className,
|
|
86
86
|
style: style
|
|
87
87
|
}, /*#__PURE__*/React.createElement("div", {
|
|
88
|
-
className:
|
|
88
|
+
className: "".concat(prefixCls, "-content"),
|
|
89
89
|
"x-semi-prop": "render"
|
|
90
90
|
}, content)));
|
|
91
91
|
}
|
|
@@ -158,7 +158,7 @@ class Dropdown extends BaseComponent {
|
|
|
158
158
|
className: className,
|
|
159
159
|
style: style
|
|
160
160
|
}, /*#__PURE__*/React.createElement("div", {
|
|
161
|
-
className:
|
|
161
|
+
className: "".concat(prefixCls, "-content")
|
|
162
162
|
}, render)));
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -212,7 +212,7 @@ class Dropdown extends BaseComponent {
|
|
|
212
212
|
}, attr), /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, {
|
|
213
213
|
//@ts-ignore
|
|
214
214
|
className: classnames(_get(children, 'props.className'), {
|
|
215
|
-
[
|
|
215
|
+
["".concat(prefixCls, "-showing")]: popVisible
|
|
216
216
|
}),
|
|
217
217
|
'aria-haspopup': true,
|
|
218
218
|
'aria-expanded': popVisible,
|
package/lib/es/empty/index.js
CHANGED
|
@@ -75,14 +75,14 @@ export default class Empty extends BaseComponent {
|
|
|
75
75
|
imageNode = /*#__PURE__*/React.createElement("svg", {
|
|
76
76
|
"aria-hidden": "true"
|
|
77
77
|
}, /*#__PURE__*/React.createElement("use", {
|
|
78
|
-
xlinkHref:
|
|
78
|
+
xlinkHref: "#".concat(imgSrc.id)
|
|
79
79
|
}));
|
|
80
80
|
} else {
|
|
81
81
|
imageNode = imgSrc;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
const wrapperCls = cls(className, prefixCls, {
|
|
85
|
-
[
|
|
85
|
+
["".concat(prefixCls, "-").concat(layout)]: layout
|
|
86
86
|
});
|
|
87
87
|
const titleProps = imageNode ? {
|
|
88
88
|
heading: 4
|
|
@@ -96,19 +96,19 @@ export default class Empty extends BaseComponent {
|
|
|
96
96
|
className: wrapperCls,
|
|
97
97
|
style: style
|
|
98
98
|
}, /*#__PURE__*/React.createElement("div", {
|
|
99
|
-
className:
|
|
99
|
+
className: "".concat(prefixCls, "-image"),
|
|
100
100
|
style: imageStyle,
|
|
101
101
|
"x-semi-prop": "image,darkModeImage"
|
|
102
102
|
}, imageNode), /*#__PURE__*/React.createElement("div", {
|
|
103
|
-
className:
|
|
103
|
+
className: "".concat(prefixCls, "-content")
|
|
104
104
|
}, title ? /*#__PURE__*/React.createElement(Typography.Title, Object.assign({}, titleProps, {
|
|
105
|
-
className:
|
|
105
|
+
className: "".concat(prefixCls, "-title"),
|
|
106
106
|
"x-semi-prop": "title"
|
|
107
107
|
}), title) : null, description ? /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className:
|
|
108
|
+
className: "".concat(prefixCls, "-description"),
|
|
109
109
|
"x-semi-prop": "description"
|
|
110
110
|
}, description) : null, children ? /*#__PURE__*/React.createElement("div", {
|
|
111
|
-
className:
|
|
111
|
+
className: "".concat(prefixCls, "-footer"),
|
|
112
112
|
"x-semi-prop": "children"
|
|
113
113
|
}, children) : null));
|
|
114
114
|
}
|
package/lib/es/form/baseForm.js
CHANGED
|
@@ -105,9 +105,9 @@ class Form extends BaseComponent {
|
|
|
105
105
|
const {
|
|
106
106
|
formId
|
|
107
107
|
} = this.state;
|
|
108
|
-
return document.querySelectorAll(
|
|
108
|
+
return document.querySelectorAll("form[x-form-id=\"".concat(formId, "\"] .").concat(cssClasses.PREFIX, "-field-error-message"));
|
|
109
109
|
},
|
|
110
|
-
getFieldDOM: field => document.querySelector(
|
|
110
|
+
getFieldDOM: field => document.querySelector(".".concat(cssClasses.PREFIX, "-field[x-field-id=\"").concat(field, "\"]"))
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -58,7 +58,7 @@ export default class ErrorMessage extends PureComponent {
|
|
|
58
58
|
error: /*#__PURE__*/React.createElement(IconAlertCircle, null)
|
|
59
59
|
};
|
|
60
60
|
const text = error ? this.generatorText(error) : this.generatorText(helpText);
|
|
61
|
-
const iconCls =
|
|
61
|
+
const iconCls = "".concat(prefix, "-field-validate-status-icon");
|
|
62
62
|
let icon = null;
|
|
63
63
|
|
|
64
64
|
if (isInInputGroup) {
|
package/lib/es/form/group.js
CHANGED
|
@@ -91,13 +91,13 @@ class FormInputGroup extends Component {
|
|
|
91
91
|
return null;
|
|
92
92
|
});
|
|
93
93
|
const groupCls = classNames({
|
|
94
|
-
[
|
|
94
|
+
["".concat(prefix, "-field-group")]: true
|
|
95
95
|
});
|
|
96
96
|
const labelCol = formProps.labelCol;
|
|
97
97
|
const wrapperCol = formProps.wrapperCol;
|
|
98
98
|
const labelAlign = formProps.labelAlign;
|
|
99
99
|
const appendCol = labelCol && wrapperCol;
|
|
100
|
-
const labelColCls = labelCol ?
|
|
100
|
+
const labelColCls = labelCol ? "".concat(prefix, "-col-").concat(labelAlign) : '';
|
|
101
101
|
const labelContent = this.renderLabel(label, formProps);
|
|
102
102
|
const inputGroupContent = /*#__PURE__*/React.createElement(InputGroup, Object.assign({}, rest), inner);
|
|
103
103
|
const groupErrorContent = /*#__PURE__*/React.createElement(GroupError, {
|
|
@@ -105,10 +105,10 @@ class FormInputGroup extends Component {
|
|
|
105
105
|
showValidateIcon: formProps.showValidateIcon,
|
|
106
106
|
isInInputGroup: true
|
|
107
107
|
});
|
|
108
|
-
const extraCls = classNames(
|
|
109
|
-
[
|
|
110
|
-
[
|
|
111
|
-
[
|
|
108
|
+
const extraCls = classNames("".concat(prefix, "-field-extra"), {
|
|
109
|
+
["".concat(prefix, "-field-extra-string")]: typeof extraText === 'string',
|
|
110
|
+
["".concat(prefix, "-field-extra-middle")]: extraTextPosition === 'middle',
|
|
111
|
+
["".concat(prefix, "-field-extra-bottom")]: extraTextPosition === 'bottom'
|
|
112
112
|
});
|
|
113
113
|
const extraContent = extraText ? /*#__PURE__*/React.createElement("div", {
|
|
114
114
|
className: extraCls,
|
|
@@ -422,18 +422,18 @@ function withField(Component, opts) {
|
|
|
422
422
|
let mergeExtraPos = extraTextPosition || formProps.extraTextPosition || 'bottom'; // id attribute to improve a11y
|
|
423
423
|
|
|
424
424
|
const a11yId = id ? id : field;
|
|
425
|
-
const labelId =
|
|
426
|
-
const helpTextId =
|
|
427
|
-
const extraTextId =
|
|
428
|
-
const errorMessageId =
|
|
425
|
+
const labelId = "".concat(a11yId, "-label");
|
|
426
|
+
const helpTextId = "".concat(a11yId, "-helpText");
|
|
427
|
+
const extraTextId = "".concat(a11yId, "-extraText");
|
|
428
|
+
const errorMessageId = "".concat(a11yId, "-errormessage");
|
|
429
429
|
|
|
430
430
|
const FieldComponent = () => {
|
|
431
431
|
// prefer to use validateStatus which pass by user throught props
|
|
432
432
|
let blockStatus = validateStatus ? validateStatus : status;
|
|
433
|
-
const extraCls = classNames(
|
|
434
|
-
[
|
|
435
|
-
[
|
|
436
|
-
[
|
|
433
|
+
const extraCls = classNames("".concat(prefix, "-field-extra"), {
|
|
434
|
+
["".concat(prefix, "-field-extra-string")]: typeof extraText === 'string',
|
|
435
|
+
["".concat(prefix, "-field-extra-middle")]: mergeExtraPos === 'middle',
|
|
436
|
+
["".concat(prefix, "-field-extra-bottom")]: mergeExtraPos === 'bottom'
|
|
437
437
|
});
|
|
438
438
|
const extraContent = extraText ? /*#__PURE__*/React.createElement("div", {
|
|
439
439
|
className: extraCls,
|
|
@@ -458,11 +458,11 @@ function withField(Component, opts) {
|
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
if (helpText) {
|
|
461
|
-
newProps['aria-describedby'] = extraText ?
|
|
461
|
+
newProps['aria-describedby'] = extraText ? "".concat(helpTextId, " ").concat(extraTextId) : helpTextId;
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
if (extraText) {
|
|
465
|
-
newProps['aria-describedby'] = helpText ?
|
|
465
|
+
newProps['aria-describedby'] = helpText ? "".concat(helpTextId, " ").concat(extraTextId) : extraTextId;
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
if (status === 'error') {
|
|
@@ -471,12 +471,12 @@ function withField(Component, opts) {
|
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
const fieldCls = classNames({
|
|
474
|
-
[
|
|
475
|
-
[
|
|
474
|
+
["".concat(prefix, "-field")]: true,
|
|
475
|
+
["".concat(prefix, "-field-").concat(name)]: Boolean(name),
|
|
476
476
|
[fieldClassName]: Boolean(fieldClassName)
|
|
477
477
|
});
|
|
478
478
|
const fieldMaincls = classNames({
|
|
479
|
-
[
|
|
479
|
+
["".concat(prefix, "-field-main")]: true
|
|
480
480
|
});
|
|
481
481
|
|
|
482
482
|
if (mergeLabelPos === 'inset' && !noLabel) {
|
|
@@ -497,8 +497,8 @@ function withField(Component, opts) {
|
|
|
497
497
|
|
|
498
498
|
if (pure) {
|
|
499
499
|
let pureCls = classNames(rest.className, {
|
|
500
|
-
[
|
|
501
|
-
[
|
|
500
|
+
["".concat(prefix, "-field-pure")]: true,
|
|
501
|
+
["".concat(prefix, "-field-").concat(name)]: Boolean(name),
|
|
502
502
|
[fieldClassName]: Boolean(fieldClassName)
|
|
503
503
|
});
|
|
504
504
|
newProps.className = pureCls;
|
|
@@ -506,7 +506,7 @@ function withField(Component, opts) {
|
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
let withCol = mergeLabelCol && mergeWrapperCol;
|
|
509
|
-
const labelColCls = mergeLabelAlign ?
|
|
509
|
+
const labelColCls = mergeLabelAlign ? "".concat(prefix, "-col-").concat(mergeLabelAlign) : ''; // get label
|
|
510
510
|
|
|
511
511
|
let labelContent = null;
|
|
512
512
|
|