@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
|
@@ -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-${_constants.strings.PANEL_TYPE_LEFT}`);
|
|
95
|
+
const wrapRight = this.adapter.getCache(`wrap-${_constants.strings.PANEL_TYPE_RIGHT}`);
|
|
96
|
+
const switchLeft = this.adapter.getCache(`switch-${_constants.strings.PANEL_TYPE_LEFT}`);
|
|
97
|
+
const switchRight = this.adapter.getCache(`switch-${_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-${_constants.strings.PANEL_TYPE_LEFT}`, `timepicker-${_constants.strings.PANEL_TYPE_RIGHT}`, `yam-${_constants.strings.PANEL_TYPE_LEFT}`, `yam-${_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)(`${prefixCls}-month-grid-${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: `${prefixCls}-yam`
|
|
293
293
|
}, this.renderYearAndMonth(panelType, panelDetail)) : null;
|
|
294
294
|
const timePickerLayer = isTimePickerOpen ? /*#__PURE__*/_react.default.createElement("div", {
|
|
295
|
-
className:
|
|
295
|
+
className: `${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-${_constants.strings.PANEL_TYPE_LEFT}`);
|
|
299
|
+
const wrapRight = this.adapter.getCache(`wrap-${_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, `${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-${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-${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-${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)(`${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-${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-${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-${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)(`${prefixCls}-switch`);
|
|
574
574
|
const dateCls = (0, _classnames.default)({
|
|
575
|
-
[
|
|
576
|
-
[
|
|
575
|
+
[`${prefixCls}-switch-date`]: true,
|
|
576
|
+
[`${prefixCls}-switch-date-active`]: !isTimePickerOpen
|
|
577
577
|
});
|
|
578
578
|
const timeCls = (0, _classnames.default)({
|
|
579
|
-
[
|
|
580
|
-
[
|
|
581
|
-
[
|
|
579
|
+
[`${prefixCls}-switch-time`]: true,
|
|
580
|
+
[`${prefixCls}-switch-time-disabled`]: disabledTimePicker,
|
|
581
|
+
[`${prefixCls}-switch-date-active`]: isTimePickerOpen
|
|
582
582
|
});
|
|
583
|
-
const textCls = (0, _classnames.default)(
|
|
583
|
+
const textCls = (0, _classnames.default)(`${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-${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
|
+
[`${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: `${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)(`${prefixCls}-quick-control`, {
|
|
49
|
+
[`${prefixCls}-quick-control-${type}`]: type,
|
|
50
|
+
[`${prefixCls}-quick-control-${presetPosition}`]: true
|
|
51
51
|
});
|
|
52
52
|
const headerCls = (0, _classnames.default)({
|
|
53
|
-
[
|
|
53
|
+
[`${prefixCls}-quick-control-header`]: true
|
|
54
54
|
});
|
|
55
55
|
const contentWrapperCls = (0, _classnames.default)({
|
|
56
|
-
[
|
|
56
|
+
[`${prefixCls}-quick-control-${presetPosition}-content-wrapper`]: true
|
|
57
57
|
});
|
|
58
58
|
const contentCls = (0, _classnames.default)({
|
|
59
|
-
[
|
|
60
|
-
[
|
|
61
|
-
[
|
|
59
|
+
[`${prefixCls}-quick-control-${presetPosition}-content`]: !isTopAndBottomRange && !isTopAndBottomMonth,
|
|
60
|
+
[`${prefixCls}-quick-control-${presetPosition}-range-content`]: isTopAndBottomRange,
|
|
61
|
+
[`${prefixCls}-quick-control-${presetPosition}-month-content`]: isTopAndBottomMonth
|
|
62
62
|
});
|
|
63
63
|
const itemCls = (0, _classnames.default)({
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
64
|
+
[`${prefixCls}-quick-control-${presetPosition}-content-item`]: !isTopAndBottomRange && !isTopAndBottomMonth,
|
|
65
|
+
[`${prefixCls}-quick-control-${presetPosition}-range-content-item`]: isTopAndBottomRange,
|
|
66
|
+
[`${prefixCls}-quick-control-${presetPosition}-month-content-item`]: isTopAndBottomMonth
|
|
67
67
|
});
|
|
68
68
|
const ellipsisCls = (0, _classnames.default)({
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[
|
|
69
|
+
[`${prefixCls}-quick-control-${presetPosition}-content-item-ellipsis`]: !isTopAndBottomRange && !isTopAndBottomMonth,
|
|
70
|
+
[`${prefixCls}-quick-control-${presetPosition}-range-content-item-ellipsis`]: isTopAndBottomRange,
|
|
71
|
+
[`${prefixCls}-quick-control-${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 = `${_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 => `${val}年`;
|
|
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 => `${val}月`;
|
|
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 = `${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
|
+
[`${prefixCls}-${align}`]: !row,
|
|
45
|
+
[`${prefixCls}-double`]: row,
|
|
46
|
+
[`${prefixCls}-double-${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 = `${prefixCls}-key`;
|
|
26
|
+
const valCls = `${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: `${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: `${prefixCls}-item ${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: `${prefixCls}-item ${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)(`${prefixCls}-divider`, className, {
|
|
44
|
+
[`${prefixCls}-divider-horizontal`]: layout === 'horizontal',
|
|
45
|
+
[`${prefixCls}-divider-vertical`]: layout === 'vertical',
|
|
46
|
+
[`${prefixCls}-divider-dashed`]: !!dashed,
|
|
47
|
+
[`${prefixCls}-divider-with-text`]: children && layout === 'horizontal',
|
|
48
|
+
[`${prefixCls}-divider-with-text-${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: `${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)(`${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
|
+
[`${prefixCls}-item`]: true,
|
|
48
|
+
[`${prefixCls}-item-disabled`]: disabled,
|
|
49
|
+
[`${prefixCls}-item-hover`]: hover,
|
|
50
|
+
[`${prefixCls}-item-withTick`]: contextShowTick !== null && contextShowTick !== void 0 ? contextShowTick : showTick,
|
|
51
|
+
[`${prefixCls}-item-${type}`]: type,
|
|
52
|
+
[`${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: `${prefixCls}-item-icon`
|
|
87
87
|
}, icon);
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -17,7 +17,7 @@ declare class DropdownMenu extends BaseComponent<DropdownMenuProps> {
|
|
|
17
17
|
getProps(): BaseProps;
|
|
18
18
|
getState(key: string): any;
|
|
19
19
|
getStates(): {};
|
|
20
|
-
setState(s: Pick<{},
|
|
20
|
+
setState<K extends never>(s: Pick<{}, K>, callback?: any): void;
|
|
21
21
|
getCache(c: string): any;
|
|
22
22
|
getCaches(): any;
|
|
23
23
|
setCache(key: any, value: any): void;
|
|
@@ -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)(`${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
|
+
[`${prefixCls}-title`]: true,
|
|
38
|
+
[`${prefixCls}-title-withTick`]: showTick
|
|
39
39
|
}, className);
|
|
40
40
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
41
41
|
className: titleCls,
|
|
@@ -101,7 +101,7 @@ declare class Dropdown extends BaseComponent<DropdownProps, DropdownState> {
|
|
|
101
101
|
getProps(): DropdownProps;
|
|
102
102
|
getState(key: string): any;
|
|
103
103
|
getStates(): DropdownState;
|
|
104
|
-
setState(s: Pick<DropdownState,
|
|
104
|
+
setState<K extends "popVisible">(s: Pick<DropdownState, K>, callback?: any): void;
|
|
105
105
|
getCache(c: string): any;
|
|
106
106
|
getCaches(): any;
|
|
107
107
|
setCache(key: any, value: any): void;
|
|
@@ -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: `${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: `${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
|
+
[`${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: `#${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
|
+
[`${prefixCls}-${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: `${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: `${prefixCls}-content`
|
|
120
120
|
}, title ? /*#__PURE__*/_react.default.createElement(_typography.default.Title, Object.assign({}, titleProps, {
|
|
121
|
-
className:
|
|
121
|
+
className: `${prefixCls}-title`,
|
|
122
122
|
"x-semi-prop": "title"
|
|
123
123
|
}), title) : null, description ? /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
-
className:
|
|
124
|
+
className: `${prefixCls}-description`,
|
|
125
125
|
"x-semi-prop": "description"
|
|
126
126
|
}, description) : null, children ? /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
-
className:
|
|
127
|
+
className: `${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: `${field}[${i}]`,
|
|
214
214
|
remove: () => this.remove(i)
|
|
215
215
|
}));
|
|
216
216
|
const {
|
|
@@ -79,6 +79,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
79
79
|
size?: import("../select").SelectSize;
|
|
80
80
|
disabled?: boolean;
|
|
81
81
|
emptyContent?: React.ReactNode;
|
|
82
|
+
expandRestTagsOnClick?: boolean;
|
|
82
83
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
83
84
|
zIndex?: number;
|
|
84
85
|
position?: "left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
@@ -91,6 +92,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
91
92
|
marginRight: number;
|
|
92
93
|
marginBottom: number;
|
|
93
94
|
};
|
|
95
|
+
ellipsisTrigger?: boolean;
|
|
94
96
|
outerTopSlot?: React.ReactNode;
|
|
95
97
|
innerTopSlot?: React.ReactNode;
|
|
96
98
|
outerBottomSlot?: React.ReactNode;
|
|
@@ -135,7 +137,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
135
137
|
preventScroll?: boolean;
|
|
136
138
|
showRestTagsPopover?: boolean;
|
|
137
139
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
138
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
140
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
139
141
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
140
142
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
141
143
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
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="${formId}"] .${_constants.cssClasses.PREFIX}-field-error-message`);
|
|
137
137
|
},
|
|
138
|
-
getFieldDOM: field => document.querySelector(
|
|
138
|
+
getFieldDOM: field => document.querySelector(`.${_constants.cssClasses.PREFIX}-field[x-field-id="${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 = `${prefix}-field-validate-status-icon`;
|
|
81
81
|
let icon = null;
|
|
82
82
|
|
|
83
83
|
if (isInInputGroup) {
|
package/lib/cjs/form/field.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
27
27
|
size?: import("../select/index").SelectSize;
|
|
28
28
|
disabled?: boolean;
|
|
29
29
|
emptyContent?: import("react").ReactNode;
|
|
30
|
+
expandRestTagsOnClick?: boolean;
|
|
30
31
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
31
32
|
zIndex?: number;
|
|
32
33
|
position?: "left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
@@ -39,6 +40,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
39
40
|
marginRight: number;
|
|
40
41
|
marginBottom: number;
|
|
41
42
|
};
|
|
43
|
+
ellipsisTrigger?: boolean;
|
|
42
44
|
outerTopSlot?: import("react").ReactNode;
|
|
43
45
|
innerTopSlot?: import("react").ReactNode;
|
|
44
46
|
outerBottomSlot?: import("react").ReactNode;
|
|
@@ -83,7 +85,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
83
85
|
preventScroll?: boolean;
|
|
84
86
|
showRestTagsPopover?: boolean;
|
|
85
87
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
86
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
88
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
87
89
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
88
90
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
89
91
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
package/lib/cjs/form/group.js
CHANGED
|
@@ -115,13 +115,13 @@ class FormInputGroup extends _react.Component {
|
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
const groupCls = (0, _classnames.default)({
|
|
118
|
-
[
|
|
118
|
+
[`${prefix}-field-group`]: true
|
|
119
119
|
});
|
|
120
120
|
const labelCol = formProps.labelCol;
|
|
121
121
|
const wrapperCol = formProps.wrapperCol;
|
|
122
122
|
const labelAlign = formProps.labelAlign;
|
|
123
123
|
const appendCol = labelCol && wrapperCol;
|
|
124
|
-
const labelColCls = labelCol ?
|
|
124
|
+
const labelColCls = labelCol ? `${prefix}-col-${labelAlign}` : '';
|
|
125
125
|
const labelContent = this.renderLabel(label, formProps);
|
|
126
126
|
|
|
127
127
|
const inputGroupContent = /*#__PURE__*/_react.default.createElement(_inputGroup.default, Object.assign({}, rest), inner);
|