@douyinfe/semi-ui 2.29.0 → 2.30.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/semi.css +377 -14
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +1962 -1951
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/_portal/index.js +2 -2
- package/lib/cjs/_utils/index.js +1 -3
- package/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/anchor/index.js +9 -9
- package/lib/cjs/anchor/link.js +8 -8
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.js +4 -8
- package/lib/cjs/autoComplete/option.js +7 -7
- package/lib/cjs/avatar/avatarGroup.js +7 -7
- package/lib/cjs/avatar/index.js +12 -12
- package/lib/cjs/badge/index.js +8 -8
- package/lib/cjs/banner/index.js +12 -12
- package/lib/cjs/breadcrumb/index.js +12 -12
- package/lib/cjs/breadcrumb/item.js +8 -8
- package/lib/cjs/button/Button.js +9 -9
- package/lib/cjs/button/buttonGroup.js +5 -5
- package/lib/cjs/button/splitButtonGroup.js +1 -1
- package/lib/cjs/calendar/dayCalendar.js +13 -13
- package/lib/cjs/calendar/dayCol.js +17 -17
- package/lib/cjs/calendar/monthCalendar.js +38 -38
- package/lib/cjs/calendar/rangeCalendar.js +27 -27
- package/lib/cjs/calendar/timeCol.js +6 -6
- package/lib/cjs/calendar/weekCalendar.js +27 -27
- package/lib/cjs/card/cardGroup.js +2 -2
- package/lib/cjs/card/index.js +16 -16
- package/lib/cjs/card/meta.js +5 -5
- package/lib/cjs/carousel/CarouselArrow.js +6 -6
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/CarouselIndicator.js +6 -6
- package/lib/cjs/carousel/index.d.ts +2 -2
- package/lib/cjs/carousel/index.js +12 -12
- package/lib/cjs/cascader/index.js +36 -36
- package/lib/cjs/cascader/item.js +26 -26
- package/lib/cjs/checkbox/checkbox.js +14 -14
- package/lib/cjs/checkbox/checkboxGroup.js +4 -4
- package/lib/cjs/checkbox/checkboxInner.js +6 -6
- package/lib/cjs/collapse/item.js +9 -9
- package/lib/cjs/collapsible/index.js +3 -3
- package/lib/cjs/configProvider/index.js +1 -1
- package/lib/cjs/datePicker/dateInput.js +16 -16
- package/lib/cjs/datePicker/datePicker.d.ts +2 -2
- package/lib/cjs/datePicker/datePicker.js +9 -9
- package/lib/cjs/datePicker/footer.js +1 -1
- package/lib/cjs/datePicker/index.js +1 -1
- package/lib/cjs/datePicker/month.js +2 -2
- package/lib/cjs/datePicker/monthsGrid.d.ts +2 -2
- package/lib/cjs/datePicker/monthsGrid.js +27 -27
- package/lib/cjs/datePicker/navigation.js +1 -1
- package/lib/cjs/datePicker/quickControl.d.ts +1 -1
- package/lib/cjs/datePicker/quickControl.js +14 -14
- package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.js +4 -4
- package/lib/cjs/descriptions/index.js +3 -3
- package/lib/cjs/descriptions/item.js +5 -5
- package/lib/cjs/divider/index.js +7 -7
- package/lib/cjs/dropdown/dropdownDivider.js +1 -1
- package/lib/cjs/dropdown/dropdownItem.js +7 -7
- package/lib/cjs/dropdown/dropdownMenu.js +1 -1
- package/lib/cjs/dropdown/dropdownTitle.js +2 -2
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/dropdown/index.js +3 -3
- package/lib/cjs/empty/index.js +7 -7
- package/lib/cjs/form/arrayField.js +1 -1
- package/lib/cjs/form/baseForm.d.ts +4 -4
- package/lib/cjs/form/baseForm.js +2 -2
- package/lib/cjs/form/errorMessage.js +1 -1
- package/lib/cjs/form/field.d.ts +4 -4
- package/lib/cjs/form/group.js +6 -6
- package/lib/cjs/form/hoc/withField.js +16 -16
- package/lib/cjs/form/label.js +9 -9
- package/lib/cjs/form/slot.js +5 -5
- package/lib/cjs/grid/col.js +11 -11
- package/lib/cjs/grid/row.js +4 -4
- package/lib/cjs/highlight/index.js +1 -1
- package/lib/cjs/iconButton/index.js +5 -5
- package/lib/cjs/image/image.js +10 -10
- package/lib/cjs/image/preview.js +3 -3
- package/lib/cjs/image/previewFooter.js +12 -12
- package/lib/cjs/image/previewHeader.js +3 -3
- package/lib/cjs/image/previewImage.js +7 -7
- package/lib/cjs/image/previewInner.js +7 -7
- package/lib/cjs/input/index.js +38 -38
- package/lib/cjs/input/inputGroup.js +7 -7
- package/lib/cjs/input/textarea.js +14 -14
- package/lib/cjs/inputNumber/index.js +11 -11
- package/lib/cjs/layout/Sider.js +3 -3
- package/lib/cjs/layout/index.js +2 -2
- package/lib/cjs/list/index.js +11 -11
- package/lib/cjs/list/item.js +6 -6
- package/lib/cjs/modal/ConfirmModal.js +7 -7
- package/lib/cjs/modal/Modal.js +4 -4
- package/lib/cjs/modal/ModalContent.js +24 -24
- package/lib/cjs/modal/useModal/index.js +1 -1
- package/lib/cjs/navigation/CollapseButton.js +1 -1
- package/lib/cjs/navigation/Footer.js +2 -2
- package/lib/cjs/navigation/Header.js +5 -5
- package/lib/cjs/navigation/Item.js +16 -16
- package/lib/cjs/navigation/SubNav.js +14 -14
- package/lib/cjs/navigation/index.js +8 -8
- package/lib/cjs/notification/index.js +3 -3
- package/lib/cjs/notification/notice.js +12 -12
- package/lib/cjs/overflowList/index.d.ts +1 -1
- package/lib/cjs/overflowList/index.js +6 -6
- package/lib/cjs/pagination/index.js +24 -24
- package/lib/cjs/popconfirm/index.js +9 -9
- package/lib/cjs/popover/index.d.ts +1 -1
- package/lib/cjs/popover/index.js +2 -2
- package/lib/cjs/progress/index.js +14 -14
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radio.js +22 -22
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/radio/radioGroup.js +5 -5
- package/lib/cjs/radio/radioInner.js +7 -7
- package/lib/cjs/rating/index.js +5 -5
- package/lib/cjs/rating/item.js +11 -11
- package/lib/cjs/scrollList/index.js +5 -5
- package/lib/cjs/scrollList/scrollItem.js +13 -13
- package/lib/cjs/select/index.d.ts +1 -1
- package/lib/cjs/select/index.js +61 -61
- package/lib/cjs/select/option.js +7 -7
- package/lib/cjs/sideSheet/SideSheetContent.js +10 -10
- package/lib/cjs/sideSheet/index.js +7 -7
- package/lib/cjs/skeleton/index.js +1 -1
- package/lib/cjs/skeleton/item.js +4 -4
- package/lib/cjs/slider/index.js +28 -28
- package/lib/cjs/space/index.js +12 -12
- package/lib/cjs/spin/icon.js +2 -2
- package/lib/cjs/spin/index.js +6 -6
- package/lib/cjs/steps/basicStep.d.ts +2 -0
- package/lib/cjs/steps/basicStep.js +20 -15
- package/lib/cjs/steps/basicSteps.js +6 -6
- package/lib/cjs/steps/fillStep.d.ts +1 -0
- package/lib/cjs/steps/fillStep.js +11 -10
- package/lib/cjs/steps/fillSteps.js +4 -5
- package/lib/cjs/steps/index.d.ts +4 -1
- package/lib/cjs/steps/navStep.d.ts +3 -0
- package/lib/cjs/steps/navStep.js +26 -8
- package/lib/cjs/steps/navSteps.js +2 -2
- package/lib/cjs/steps/step.d.ts +5 -1
- package/lib/cjs/steps/step.js +3 -3
- package/lib/cjs/table/Body/BaseRow.js +5 -5
- package/lib/cjs/table/Body/ExpandedRow.js +3 -3
- package/lib/cjs/table/Body/SectionRow.js +1 -1
- package/lib/cjs/table/Body/index.js +8 -8
- package/lib/cjs/table/ColGroup.js +2 -2
- package/lib/cjs/table/ColumnFilter.js +3 -3
- package/lib/cjs/table/ColumnSelection.js +2 -2
- package/lib/cjs/table/ColumnSorter.js +7 -7
- package/lib/cjs/table/CustomExpandIcon.js +2 -2
- package/lib/cjs/table/HeadTable.js +3 -3
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/table/Table.js +20 -20
- package/lib/cjs/table/TableCell.js +8 -8
- package/lib/cjs/table/TableHeader.js +1 -1
- package/lib/cjs/table/TableHeaderRow.js +8 -8
- package/lib/cjs/table/TablePagination.js +3 -3
- package/lib/cjs/tabs/TabBar.js +12 -12
- package/lib/cjs/tabs/TabItem.js +7 -7
- package/lib/cjs/tabs/TabPane.js +3 -3
- package/lib/cjs/tabs/index.js +2 -2
- package/lib/cjs/tag/group.js +5 -5
- package/lib/cjs/tag/index.js +13 -13
- package/lib/cjs/tagInput/index.js +33 -33
- package/lib/cjs/timePicker/Combobox.js +4 -4
- package/lib/cjs/timePicker/TimeInput.js +4 -4
- package/lib/cjs/timePicker/TimePicker.js +8 -8
- package/lib/cjs/timeline/index.js +8 -8
- package/lib/cjs/timeline/item.js +7 -7
- package/lib/cjs/toast/index.js +5 -5
- package/lib/cjs/toast/toast.js +9 -9
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/tooltip/index.js +7 -7
- package/lib/cjs/transfer/index.js +31 -31
- package/lib/cjs/tree/autoSizer.js +1 -1
- package/lib/cjs/tree/index.js +6 -6
- package/lib/cjs/tree/nodeList.js +1 -1
- package/lib/cjs/tree/treeNode.js +26 -26
- package/lib/cjs/treeSelect/index.js +41 -41
- package/lib/cjs/typography/base.js +14 -14
- package/lib/cjs/typography/copyable.js +3 -3
- package/lib/cjs/typography/numeral.d.ts +1 -1
- package/lib/cjs/typography/paragraph.js +1 -1
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/cjs/typography/title.js +1 -1
- package/lib/cjs/typography/util.js +1 -1
- package/lib/cjs/upload/fileCard.js +32 -32
- package/lib/cjs/upload/index.js +37 -37
- package/lib/es/_portal/index.js +2 -2
- package/lib/es/_utils/index.js +1 -3
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/anchor/index.js +9 -9
- package/lib/es/anchor/link.js +8 -8
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/autoComplete/index.js +4 -8
- package/lib/es/autoComplete/option.js +7 -7
- package/lib/es/avatar/avatarGroup.js +7 -7
- package/lib/es/avatar/index.js +12 -12
- package/lib/es/badge/index.js +8 -8
- package/lib/es/banner/index.js +12 -12
- package/lib/es/breadcrumb/index.js +12 -12
- package/lib/es/breadcrumb/item.js +8 -8
- package/lib/es/button/Button.js +9 -9
- package/lib/es/button/buttonGroup.js +5 -5
- package/lib/es/button/splitButtonGroup.js +1 -1
- package/lib/es/calendar/dayCalendar.js +13 -13
- package/lib/es/calendar/dayCol.js +17 -17
- package/lib/es/calendar/monthCalendar.js +38 -38
- package/lib/es/calendar/rangeCalendar.js +27 -27
- package/lib/es/calendar/timeCol.js +6 -6
- package/lib/es/calendar/weekCalendar.js +27 -27
- package/lib/es/card/cardGroup.js +2 -2
- package/lib/es/card/index.js +16 -16
- package/lib/es/card/meta.js +5 -5
- package/lib/es/carousel/CarouselArrow.js +6 -6
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/CarouselIndicator.js +6 -6
- package/lib/es/carousel/index.d.ts +2 -2
- package/lib/es/carousel/index.js +12 -12
- package/lib/es/cascader/index.js +36 -36
- package/lib/es/cascader/item.js +26 -26
- package/lib/es/checkbox/checkbox.js +14 -14
- package/lib/es/checkbox/checkboxGroup.js +4 -4
- package/lib/es/checkbox/checkboxInner.js +6 -6
- package/lib/es/collapse/item.js +9 -9
- package/lib/es/collapsible/index.js +3 -3
- package/lib/es/configProvider/index.js +1 -1
- package/lib/es/datePicker/dateInput.js +16 -16
- package/lib/es/datePicker/datePicker.d.ts +2 -2
- package/lib/es/datePicker/datePicker.js +9 -9
- package/lib/es/datePicker/footer.js +1 -1
- package/lib/es/datePicker/index.js +1 -1
- package/lib/es/datePicker/month.js +2 -2
- package/lib/es/datePicker/monthsGrid.d.ts +2 -2
- package/lib/es/datePicker/monthsGrid.js +27 -27
- package/lib/es/datePicker/navigation.js +1 -1
- package/lib/es/datePicker/quickControl.d.ts +1 -1
- package/lib/es/datePicker/quickControl.js +14 -14
- package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.js +4 -4
- package/lib/es/descriptions/index.js +3 -3
- package/lib/es/descriptions/item.js +5 -5
- package/lib/es/divider/index.js +7 -7
- package/lib/es/dropdown/dropdownDivider.js +1 -1
- package/lib/es/dropdown/dropdownItem.js +7 -7
- package/lib/es/dropdown/dropdownMenu.js +1 -1
- package/lib/es/dropdown/dropdownTitle.js +2 -2
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/dropdown/index.js +3 -3
- package/lib/es/empty/index.js +7 -7
- package/lib/es/form/arrayField.js +1 -1
- package/lib/es/form/baseForm.d.ts +4 -4
- package/lib/es/form/baseForm.js +2 -2
- package/lib/es/form/errorMessage.js +1 -1
- package/lib/es/form/field.d.ts +4 -4
- package/lib/es/form/group.js +6 -6
- package/lib/es/form/hoc/withField.js +16 -16
- package/lib/es/form/label.js +9 -9
- package/lib/es/form/slot.js +5 -5
- package/lib/es/grid/col.js +11 -11
- package/lib/es/grid/row.js +4 -4
- package/lib/es/highlight/index.js +1 -1
- package/lib/es/iconButton/index.js +5 -5
- package/lib/es/image/image.js +10 -10
- package/lib/es/image/preview.js +3 -3
- package/lib/es/image/previewFooter.js +12 -12
- package/lib/es/image/previewHeader.js +3 -3
- package/lib/es/image/previewImage.js +7 -7
- package/lib/es/image/previewInner.js +7 -7
- package/lib/es/input/index.js +38 -38
- package/lib/es/input/inputGroup.js +7 -7
- package/lib/es/input/textarea.js +14 -14
- package/lib/es/inputNumber/index.js +11 -11
- package/lib/es/layout/Sider.js +3 -3
- package/lib/es/layout/index.js +2 -2
- package/lib/es/list/index.js +11 -11
- package/lib/es/list/item.js +6 -6
- package/lib/es/modal/ConfirmModal.js +7 -7
- package/lib/es/modal/Modal.js +4 -4
- package/lib/es/modal/ModalContent.js +24 -24
- package/lib/es/modal/useModal/index.js +1 -1
- package/lib/es/navigation/CollapseButton.js +1 -1
- package/lib/es/navigation/Footer.js +2 -2
- package/lib/es/navigation/Header.js +5 -5
- package/lib/es/navigation/Item.js +16 -16
- package/lib/es/navigation/SubNav.js +14 -14
- package/lib/es/navigation/index.js +8 -8
- package/lib/es/notification/index.js +3 -3
- package/lib/es/notification/notice.js +12 -12
- package/lib/es/overflowList/index.d.ts +1 -1
- package/lib/es/overflowList/index.js +6 -6
- package/lib/es/pagination/index.js +24 -24
- package/lib/es/popconfirm/index.js +9 -9
- package/lib/es/popover/index.d.ts +1 -1
- package/lib/es/popover/index.js +2 -2
- package/lib/es/progress/index.js +14 -14
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radio.js +22 -22
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/radio/radioGroup.js +5 -5
- package/lib/es/radio/radioInner.js +7 -7
- package/lib/es/rating/index.js +5 -5
- package/lib/es/rating/item.js +11 -11
- package/lib/es/scrollList/index.js +5 -5
- package/lib/es/scrollList/scrollItem.js +13 -13
- package/lib/es/select/index.d.ts +1 -1
- package/lib/es/select/index.js +61 -61
- package/lib/es/select/option.js +7 -7
- package/lib/es/sideSheet/SideSheetContent.js +10 -10
- package/lib/es/sideSheet/index.js +7 -7
- package/lib/es/skeleton/index.js +1 -1
- package/lib/es/skeleton/item.js +4 -4
- package/lib/es/slider/index.js +28 -28
- package/lib/es/space/index.js +12 -12
- package/lib/es/spin/icon.js +2 -2
- package/lib/es/spin/index.js +6 -6
- package/lib/es/steps/basicStep.d.ts +2 -0
- package/lib/es/steps/basicStep.js +20 -15
- package/lib/es/steps/basicSteps.js +6 -6
- package/lib/es/steps/fillStep.d.ts +1 -0
- package/lib/es/steps/fillStep.js +11 -10
- package/lib/es/steps/fillSteps.js +4 -5
- package/lib/es/steps/index.d.ts +4 -1
- package/lib/es/steps/navStep.d.ts +3 -0
- package/lib/es/steps/navStep.js +21 -8
- package/lib/es/steps/navSteps.js +2 -2
- package/lib/es/steps/step.d.ts +5 -1
- package/lib/es/steps/step.js +3 -3
- package/lib/es/table/Body/BaseRow.js +5 -5
- package/lib/es/table/Body/ExpandedRow.js +3 -3
- package/lib/es/table/Body/SectionRow.js +1 -1
- package/lib/es/table/Body/index.js +8 -8
- package/lib/es/table/ColGroup.js +2 -2
- package/lib/es/table/ColumnFilter.js +3 -3
- package/lib/es/table/ColumnSelection.js +2 -2
- package/lib/es/table/ColumnSorter.js +7 -7
- package/lib/es/table/CustomExpandIcon.js +2 -2
- package/lib/es/table/HeadTable.js +3 -3
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/table/Table.js +20 -20
- package/lib/es/table/TableCell.js +8 -8
- package/lib/es/table/TableHeader.js +1 -1
- package/lib/es/table/TableHeaderRow.js +8 -8
- package/lib/es/table/TablePagination.js +3 -3
- package/lib/es/tabs/TabBar.js +12 -12
- package/lib/es/tabs/TabItem.js +7 -7
- package/lib/es/tabs/TabPane.js +3 -3
- package/lib/es/tabs/index.js +2 -2
- package/lib/es/tag/group.js +5 -5
- package/lib/es/tag/index.js +13 -13
- package/lib/es/tagInput/index.js +33 -33
- package/lib/es/timePicker/Combobox.js +4 -4
- package/lib/es/timePicker/TimeInput.js +4 -4
- package/lib/es/timePicker/TimePicker.js +8 -8
- package/lib/es/timeline/index.js +8 -8
- package/lib/es/timeline/item.js +7 -7
- package/lib/es/toast/index.js +5 -5
- package/lib/es/toast/toast.js +9 -9
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/tooltip/index.js +7 -7
- package/lib/es/transfer/index.js +31 -31
- package/lib/es/tree/autoSizer.js +1 -1
- package/lib/es/tree/index.js +6 -6
- package/lib/es/tree/nodeList.js +1 -1
- package/lib/es/tree/treeNode.js +26 -26
- package/lib/es/treeSelect/index.js +41 -41
- package/lib/es/typography/base.js +14 -14
- package/lib/es/typography/copyable.js +3 -3
- package/lib/es/typography/numeral.d.ts +1 -1
- package/lib/es/typography/paragraph.js +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/lib/es/typography/title.js +1 -1
- package/lib/es/typography/util.js +1 -1
- package/lib/es/upload/fileCard.js +32 -32
- package/lib/es/upload/index.js +37 -37
- package/package.json +8 -8
package/lib/cjs/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
|
|
package/lib/cjs/form/label.js
CHANGED
|
@@ -40,12 +40,12 @@ class Label extends _react.PureComponent {
|
|
|
40
40
|
optional
|
|
41
41
|
} = this.props;
|
|
42
42
|
const labelCls = (0, _classnames.default)(className, {
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
43
|
+
["".concat(prefixCls, "-field-label")]: true,
|
|
44
|
+
["".concat(prefixCls, "-field-label-left")]: align === 'left',
|
|
45
|
+
["".concat(prefixCls, "-field-label-right")]: align === 'right',
|
|
46
|
+
["".concat(prefixCls, "-field-label-required")]: required,
|
|
47
|
+
["".concat(prefixCls, "-field-label-disabled")]: disabled,
|
|
48
|
+
["".concat(prefixCls, "-field-label-with-extra")]: extra
|
|
49
49
|
});
|
|
50
50
|
const labelStyle = style ? style : {};
|
|
51
51
|
width ? labelStyle.width = width : null;
|
|
@@ -53,16 +53,16 @@ class Label extends _react.PureComponent {
|
|
|
53
53
|
const optionalText = /*#__PURE__*/_react.default.createElement(_localeConsumer.default, {
|
|
54
54
|
componentName: "Form"
|
|
55
55
|
}, locale => /*#__PURE__*/_react.default.createElement("span", {
|
|
56
|
-
className:
|
|
56
|
+
className: "".concat(prefixCls, "-field-label-optional-text")
|
|
57
57
|
}, locale.optional));
|
|
58
58
|
|
|
59
59
|
const textContent = /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
-
className:
|
|
60
|
+
className: "".concat(prefixCls, "-field-label-text"),
|
|
61
61
|
"x-semi-prop": "label"
|
|
62
62
|
}, typeof text !== 'undefined' ? text : children, optional ? optionalText : null);
|
|
63
63
|
|
|
64
64
|
const contentWithExtra = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, textContent, /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
-
className:
|
|
65
|
+
className: "".concat(prefixCls, "-field-label-extra")
|
|
66
66
|
}, extra));
|
|
67
67
|
|
|
68
68
|
return /*#__PURE__*/_react.default.createElement("label", {
|
package/lib/cjs/form/slot.js
CHANGED
|
@@ -75,11 +75,11 @@ const FormSlot = props => {
|
|
|
75
75
|
|
|
76
76
|
const appendCol = labelCol && wrapperCol;
|
|
77
77
|
const slotCls = (0, _classnames.default)({
|
|
78
|
-
[
|
|
79
|
-
[
|
|
78
|
+
["".concat(prefix, "-field")]: true,
|
|
79
|
+
["".concat(prefix, "-slot")]: true
|
|
80
80
|
}, className);
|
|
81
81
|
const labelColCls = (0, _classnames.default)({
|
|
82
|
-
[
|
|
82
|
+
["".concat(prefix, "-col-").concat(labelAlign)]: true
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
switch (true) {
|
|
@@ -140,8 +140,8 @@ const FormSlot = props => {
|
|
|
140
140
|
width: labelWidth
|
|
141
141
|
}, label);
|
|
142
142
|
let mainCls = (0, _classnames.default)({
|
|
143
|
-
[
|
|
144
|
-
[
|
|
143
|
+
["".concat(prefix, "-field-main")]: true,
|
|
144
|
+
["".concat(prefix, "-slot-main")]: true
|
|
145
145
|
});
|
|
146
146
|
|
|
147
147
|
switch (true) {
|
package/lib/cjs/grid/col.js
CHANGED
|
@@ -53,7 +53,7 @@ class Col extends _react.default.Component {
|
|
|
53
53
|
others = __rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children"]);
|
|
54
54
|
|
|
55
55
|
let sizeClassObj = {};
|
|
56
|
-
const prefix =
|
|
56
|
+
const prefix = "".concat(prefixCls, "-col");
|
|
57
57
|
['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach(size => {
|
|
58
58
|
let sizeProps = {};
|
|
59
59
|
|
|
@@ -65,19 +65,19 @@ class Col extends _react.default.Component {
|
|
|
65
65
|
|
|
66
66
|
delete others[size];
|
|
67
67
|
sizeClassObj = Object.assign(Object.assign({}, sizeClassObj), {
|
|
68
|
-
[
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
-
[
|
|
68
|
+
["".concat(prefix, "-").concat(size, "-").concat(sizeProps.span)]: sizeProps.span !== undefined,
|
|
69
|
+
["".concat(prefix, "-").concat(size, "-order-").concat(sizeProps.order)]: sizeProps.order || sizeProps.order === 0,
|
|
70
|
+
["".concat(prefix, "-").concat(size, "-offset-").concat(sizeProps.offset)]: sizeProps.offset || sizeProps.offset === 0,
|
|
71
|
+
["".concat(prefix, "-").concat(size, "-push-").concat(sizeProps.push)]: sizeProps.push || sizeProps.push === 0,
|
|
72
|
+
["".concat(prefix, "-").concat(size, "-pull-").concat(sizeProps.pull)]: sizeProps.pull || sizeProps.pull === 0
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
75
|
const classes = (0, _classnames.default)(prefix, {
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
76
|
+
["".concat(prefix, "-").concat(span)]: span !== undefined,
|
|
77
|
+
["".concat(prefix, "-order-").concat(order)]: order,
|
|
78
|
+
["".concat(prefix, "-offset-").concat(offset)]: offset,
|
|
79
|
+
["".concat(prefix, "-push-").concat(push)]: push,
|
|
80
|
+
["".concat(prefix, "-pull-").concat(pull)]: pull
|
|
81
81
|
}, className, sizeClassObj);
|
|
82
82
|
let {
|
|
83
83
|
style
|
package/lib/cjs/grid/row.js
CHANGED
|
@@ -132,12 +132,12 @@ class Row extends _react.default.Component {
|
|
|
132
132
|
others = __rest(_a, ["prefixCls", "type", "justify", "align", "className", "style", "children"]);
|
|
133
133
|
|
|
134
134
|
const gutters = this.getGutter();
|
|
135
|
-
const prefix =
|
|
135
|
+
const prefix = "".concat(prefixCls, "-row");
|
|
136
136
|
const classes = (0, _classnames.default)({
|
|
137
137
|
[prefix]: type !== 'flex',
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
[
|
|
138
|
+
["".concat(prefix, "-").concat(type)]: type,
|
|
139
|
+
["".concat(prefix, "-").concat(type, "-").concat(justify)]: type && justify,
|
|
140
|
+
["".concat(prefix, "-").concat(type, "-").concat(align)]: type && align
|
|
141
141
|
}, className);
|
|
142
142
|
const rowStyle = Object.assign(Object.assign(Object.assign({}, gutters[0] > 0 ? {
|
|
143
143
|
marginLeft: gutters[0] / -2,
|
|
@@ -33,7 +33,7 @@ class Highlight extends _react.PureComponent {
|
|
|
33
33
|
autoEscape
|
|
34
34
|
} = this.props;
|
|
35
35
|
const tagCls = (0, _classnames.default)({
|
|
36
|
-
[
|
|
36
|
+
["".concat(prefixCls, "-tag")]: true
|
|
37
37
|
}, highlightClassName);
|
|
38
38
|
const option = {
|
|
39
39
|
highlightTag: component,
|
|
@@ -86,8 +86,8 @@ class IconButton extends _react.PureComponent {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
const btnTextCls = (0, _classnames.default)({
|
|
89
|
-
[
|
|
90
|
-
[
|
|
89
|
+
["".concat(prefixCls, "-content-left")]: iconPosition === 'right',
|
|
90
|
+
["".concat(prefixCls, "-content-right")]: iconPosition === 'left'
|
|
91
91
|
});
|
|
92
92
|
const xSemiProp = this.props['x-semi-children-alias'] || 'children';
|
|
93
93
|
const children = originChildren != null ? /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -101,9 +101,9 @@ class IconButton extends _react.PureComponent {
|
|
|
101
101
|
finalChildren = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children, IconElem);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
const iconBtnCls = (0, _classnames.default)(className,
|
|
105
|
-
[
|
|
106
|
-
[
|
|
104
|
+
const iconBtnCls = (0, _classnames.default)(className, "".concat(prefixCls, "-with-icon"), {
|
|
105
|
+
["".concat(prefixCls, "-with-icon-only")]: children == null || children === '',
|
|
106
|
+
["".concat(prefixCls, "-loading")]: loading
|
|
107
107
|
});
|
|
108
108
|
return /*#__PURE__*/_react.default.createElement(_Button.default, Object.assign({}, otherProps, {
|
|
109
109
|
className: iconBtnCls,
|
package/lib/cjs/image/image.js
CHANGED
|
@@ -88,7 +88,7 @@ class Image extends _baseComponent.default {
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
this.renderDefaultError = () => {
|
|
91
|
-
const prefixClsName =
|
|
91
|
+
const prefixClsName = "".concat(prefixCls, "-status");
|
|
92
92
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
93
93
|
className: prefixClsName
|
|
94
94
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconUploadError, {
|
|
@@ -97,7 +97,7 @@ class Image extends _baseComponent.default {
|
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
this.renderLoad = () => {
|
|
100
|
-
const prefixClsName =
|
|
100
|
+
const prefixClsName = "".concat(prefixCls, "-status");
|
|
101
101
|
const {
|
|
102
102
|
placeholder
|
|
103
103
|
} = this.props;
|
|
@@ -110,7 +110,7 @@ class Image extends _baseComponent.default {
|
|
|
110
110
|
const {
|
|
111
111
|
fallback
|
|
112
112
|
} = this.props;
|
|
113
|
-
const prefixClsName =
|
|
113
|
+
const prefixClsName = "".concat(prefixCls, "-status");
|
|
114
114
|
const fallbackNode = typeof fallback === "string" ? /*#__PURE__*/_react.default.createElement("img", {
|
|
115
115
|
style: {
|
|
116
116
|
width: "100%",
|
|
@@ -129,7 +129,7 @@ class Image extends _baseComponent.default {
|
|
|
129
129
|
loadStatus
|
|
130
130
|
} = this.state;
|
|
131
131
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
132
|
-
className:
|
|
132
|
+
className: "".concat(prefixCls, "-overlay")
|
|
133
133
|
}, loadStatus === "error" && this.renderError(), loadStatus === "loading" && this.renderLoad());
|
|
134
134
|
};
|
|
135
135
|
|
|
@@ -138,13 +138,13 @@ class Image extends _baseComponent.default {
|
|
|
138
138
|
}, locale => locale[key]);
|
|
139
139
|
|
|
140
140
|
this.renderMask = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
-
className:
|
|
141
|
+
className: "".concat(prefixCls, "-mask")
|
|
142
142
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
-
className:
|
|
143
|
+
className: "".concat(prefixCls, "-mask-info")
|
|
144
144
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconEyeOpened, {
|
|
145
145
|
size: "extra-large"
|
|
146
146
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
147
|
-
className:
|
|
147
|
+
className: "".concat(prefixCls, "-mask-info-text")
|
|
148
148
|
}, this.getLocalTextByKey("preview"))));
|
|
149
149
|
|
|
150
150
|
this.state = {
|
|
@@ -240,9 +240,9 @@ class Image extends _baseComponent.default {
|
|
|
240
240
|
src: this.isInGroup() && this.isLazyLoad() ? undefined : src,
|
|
241
241
|
"data-src": src,
|
|
242
242
|
alt: alt,
|
|
243
|
-
className: (0, _classnames.default)(
|
|
244
|
-
[
|
|
245
|
-
[
|
|
243
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-img"), {
|
|
244
|
+
["".concat(prefixCls, "-img-preview")]: showPreviewCursor,
|
|
245
|
+
["".concat(prefixCls, "-img-error")]: loadStatus === "error"
|
|
246
246
|
}),
|
|
247
247
|
width: width,
|
|
248
248
|
height: height,
|
package/lib/cjs/image/preview.js
CHANGED
|
@@ -122,7 +122,7 @@ class Preview extends _baseComponent.default {
|
|
|
122
122
|
const {
|
|
123
123
|
lazyLoadMargin
|
|
124
124
|
} = this.props;
|
|
125
|
-
const allElement = document.querySelectorAll(
|
|
125
|
+
const allElement = document.querySelectorAll(".".concat(prefixCls, "-img")); // use IntersectionObserver to lazy load image
|
|
126
126
|
|
|
127
127
|
const observer = new IntersectionObserver(entries => {
|
|
128
128
|
entries.forEach(item => {
|
|
@@ -136,7 +136,7 @@ class Preview extends _baseComponent.default {
|
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
}, {
|
|
139
|
-
root: document.querySelector(
|
|
139
|
+
root: document.querySelector("#".concat(this.previewGroupId)),
|
|
140
140
|
rootMargin: lazyLoadMargin
|
|
141
141
|
});
|
|
142
142
|
allElement.forEach(item => observer.observe(item));
|
|
@@ -190,7 +190,7 @@ class Preview extends _baseComponent.default {
|
|
|
190
190
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
191
191
|
id: this.previewGroupId,
|
|
192
192
|
style: style,
|
|
193
|
-
className:
|
|
193
|
+
className: "".concat(prefixCls, "-preview-group")
|
|
194
194
|
}, newChildren), /*#__PURE__*/_react.default.createElement(_previewInner.default, Object.assign({}, restProps, {
|
|
195
195
|
ref: this.previewRef,
|
|
196
196
|
src: finalSrcList,
|
|
@@ -32,7 +32,7 @@ var _localeConsumer = _interopRequireDefault(require("../locale/localeConsumer")
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
34
34
|
const prefixCls = _constants.cssClasses.PREFIX;
|
|
35
|
-
const footerPrefixCls =
|
|
35
|
+
const footerPrefixCls = "".concat(_constants.cssClasses.PREFIX, "-preview-footer");
|
|
36
36
|
let mouseActiveTime = 0;
|
|
37
37
|
|
|
38
38
|
class Footer extends _baseComponent.default {
|
|
@@ -133,7 +133,7 @@ class Footer extends _baseComponent.default {
|
|
|
133
133
|
|
|
134
134
|
const icon = /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronLeft, {
|
|
135
135
|
size: "large",
|
|
136
|
-
className: disabledPrev ?
|
|
136
|
+
className: disabledPrev ? "".concat(footerPrefixCls, "-disabled") : "",
|
|
137
137
|
onClick: !disabledPrev ? onPrev : undefined
|
|
138
138
|
});
|
|
139
139
|
|
|
@@ -150,7 +150,7 @@ class Footer extends _baseComponent.default {
|
|
|
150
150
|
|
|
151
151
|
const icon = /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronRight, {
|
|
152
152
|
size: "large",
|
|
153
|
-
className: disabledNext ?
|
|
153
|
+
className: disabledNext ? "".concat(footerPrefixCls, "-disabled") : "",
|
|
154
154
|
onClick: !disabledNext ? onNext : undefined
|
|
155
155
|
});
|
|
156
156
|
|
|
@@ -169,7 +169,7 @@ class Footer extends _baseComponent.default {
|
|
|
169
169
|
const icon = /*#__PURE__*/_react.default.createElement(_semiIcons.IconMinus, {
|
|
170
170
|
size: "large",
|
|
171
171
|
onClick: !disabledZoomOut ? this.handleMinusClick : undefined,
|
|
172
|
-
className: disabledZoomOut ?
|
|
172
|
+
className: disabledZoomOut ? "".concat(footerPrefixCls, "-disabled") : ""
|
|
173
173
|
});
|
|
174
174
|
|
|
175
175
|
const content = zoomOutTip !== null && zoomOutTip !== void 0 ? zoomOutTip : this.getLocalTextByKey("zoomOutTip");
|
|
@@ -187,7 +187,7 @@ class Footer extends _baseComponent.default {
|
|
|
187
187
|
const icon = /*#__PURE__*/_react.default.createElement(_semiIcons.IconPlus, {
|
|
188
188
|
size: "large",
|
|
189
189
|
onClick: !disabledZoomIn ? this.handlePlusClick : undefined,
|
|
190
|
-
className: disabledZoomIn ?
|
|
190
|
+
className: disabledZoomIn ? "".concat(footerPrefixCls, "-disabled") : ""
|
|
191
191
|
});
|
|
192
192
|
|
|
193
193
|
const content = zoomInTip !== null && zoomInTip !== void 0 ? zoomInTip : this.getLocalTextByKey("zoomInTip");
|
|
@@ -202,7 +202,7 @@ class Footer extends _baseComponent.default {
|
|
|
202
202
|
} = this.props;
|
|
203
203
|
const props = {
|
|
204
204
|
size: "large",
|
|
205
|
-
className: (0, _classnames.default)(
|
|
205
|
+
className: (0, _classnames.default)("".concat(footerPrefixCls, "-gap")),
|
|
206
206
|
onClick: this.handleRatioClick
|
|
207
207
|
};
|
|
208
208
|
const icon = ratio === "adaptation" ? /*#__PURE__*/_react.default.createElement(_semiIcons.IconRealSizeStroked, Object.assign({}, props)) : /*#__PURE__*/_react.default.createElement(_semiIcons.IconWindowAdaptionStroked, Object.assign({}, props));
|
|
@@ -241,8 +241,8 @@ class Footer extends _baseComponent.default {
|
|
|
241
241
|
const icon = /*#__PURE__*/_react.default.createElement(_semiIcons.IconDownload, {
|
|
242
242
|
size: "large",
|
|
243
243
|
onClick: !disableDownload ? onDownload : undefined,
|
|
244
|
-
className: (0, _classnames.default)(
|
|
245
|
-
[
|
|
244
|
+
className: (0, _classnames.default)("".concat(footerPrefixCls, "-gap"), {
|
|
245
|
+
["".concat(footerPrefixCls, "-disabled")]: disableDownload
|
|
246
246
|
})
|
|
247
247
|
});
|
|
248
248
|
|
|
@@ -276,14 +276,14 @@ class Footer extends _baseComponent.default {
|
|
|
276
276
|
|
|
277
277
|
if (renderPreviewMenu) {
|
|
278
278
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
279
|
-
className:
|
|
279
|
+
className: "".concat(footerPrefixCls, "-wrapper")
|
|
280
280
|
}, this.customRenderViewMenu());
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
return /*#__PURE__*/_react.default.createElement("section", {
|
|
284
|
-
className: (0, _classnames.default)(footerPrefixCls,
|
|
284
|
+
className: (0, _classnames.default)(footerPrefixCls, "".concat(footerPrefixCls, "-wrapper"), className)
|
|
285
285
|
}, this.getIconChevronLeft(), /*#__PURE__*/_react.default.createElement("div", {
|
|
286
|
-
className:
|
|
286
|
+
className: "".concat(footerPrefixCls, "-page")
|
|
287
287
|
}, /*#__PURE__*/_react.default.createElement("span", null, curPage), /*#__PURE__*/_react.default.createElement("span", null, "/"), /*#__PURE__*/_react.default.createElement("span", null, totalNum)), this.getIconChevronRight(), /*#__PURE__*/_react.default.createElement(_divider.default, {
|
|
288
288
|
layout: "vertical"
|
|
289
289
|
}), this.getIconMinus(), /*#__PURE__*/_react.default.createElement(_slider.default, {
|
|
@@ -291,7 +291,7 @@ class Footer extends _baseComponent.default {
|
|
|
291
291
|
min: min,
|
|
292
292
|
max: max,
|
|
293
293
|
step: step,
|
|
294
|
-
tipFormatter: v =>
|
|
294
|
+
tipFormatter: v => "".concat(v, "%"),
|
|
295
295
|
tooltipVisible: showTooltip ? undefined : false,
|
|
296
296
|
onChange: this.handleSlideChange
|
|
297
297
|
}), this.getIconPlus(), this.getIconRatio(), /*#__PURE__*/_react.default.createElement(_divider.default, {
|
|
@@ -21,7 +21,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
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
|
-
const prefixCls =
|
|
24
|
+
const prefixCls = "".concat(_constants.cssClasses.PREFIX, "-preview-header");
|
|
25
25
|
|
|
26
26
|
const Header = _ref => {
|
|
27
27
|
let {
|
|
@@ -44,10 +44,10 @@ const Header = _ref => {
|
|
|
44
44
|
return /*#__PURE__*/React.createElement("section", {
|
|
45
45
|
className: (0, _classnames.default)(prefixCls, className)
|
|
46
46
|
}, /*#__PURE__*/React.createElement("section", {
|
|
47
|
-
className:
|
|
47
|
+
className: "".concat(prefixCls, "-title"),
|
|
48
48
|
style: titleStyle
|
|
49
49
|
}, renderHeader ? renderHeader(title) : title), /*#__PURE__*/React.createElement("section", {
|
|
50
|
-
className:
|
|
50
|
+
className: "".concat(prefixCls, "-close"),
|
|
51
51
|
onMouseUp: onClose
|
|
52
52
|
}, /*#__PURE__*/React.createElement(_semiIcons.IconClose, null)));
|
|
53
53
|
});
|
|
@@ -20,7 +20,7 @@ var _previewImageFoundation = _interopRequireDefault(require("@douyinfe/semi-fou
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
22
|
const prefixCls = _constants.cssClasses.PREFIX;
|
|
23
|
-
const preViewImgPrefixCls =
|
|
23
|
+
const preViewImgPrefixCls = "".concat(prefixCls, "-preview-image");
|
|
24
24
|
let originImageWidth = null;
|
|
25
25
|
let originImageHeight = null;
|
|
26
26
|
let startMouseMove = false; // startMouseOffset:The offset of the mouse relative to the left and top of the picture
|
|
@@ -201,20 +201,20 @@ class PreviewImage extends _baseComponent.default {
|
|
|
201
201
|
const imgStyle = {
|
|
202
202
|
position: "absolute",
|
|
203
203
|
visibility: loading ? "hidden" : "visible",
|
|
204
|
-
transform:
|
|
204
|
+
transform: "rotate(".concat(-rotation, "deg)"),
|
|
205
205
|
top,
|
|
206
206
|
left,
|
|
207
|
-
width: loading ? "auto" :
|
|
208
|
-
height: loading ? "auto" :
|
|
207
|
+
width: loading ? "auto" : "".concat(width, "px"),
|
|
208
|
+
height: loading ? "auto" : "".concat(height, "px")
|
|
209
209
|
};
|
|
210
210
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
211
|
-
className:
|
|
211
|
+
className: "".concat(preViewImgPrefixCls),
|
|
212
212
|
ref: this.containerRef
|
|
213
213
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
214
214
|
ref: this.registryImageRef,
|
|
215
215
|
src: src,
|
|
216
216
|
alt: "previewImag",
|
|
217
|
-
className:
|
|
217
|
+
className: "".concat(preViewImgPrefixCls, "-img"),
|
|
218
218
|
key: src,
|
|
219
219
|
onMouseMove: this.handleMoveImage,
|
|
220
220
|
onMouseDown: this.onImageMouseDown,
|
|
@@ -227,7 +227,7 @@ class PreviewImage extends _baseComponent.default {
|
|
|
227
227
|
crossOrigin: crossOrigin
|
|
228
228
|
}), loading && /*#__PURE__*/_react.default.createElement(_spin.default, {
|
|
229
229
|
size: "large",
|
|
230
|
-
wrapperClassName:
|
|
230
|
+
wrapperClassName: "".concat(preViewImgPrefixCls, "-spin")
|
|
231
231
|
}));
|
|
232
232
|
}
|
|
233
233
|
|
|
@@ -138,7 +138,7 @@ class PreviewInner extends _baseComponent.default {
|
|
|
138
138
|
|
|
139
139
|
if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
|
|
140
140
|
document.body.style.overflow = 'hidden';
|
|
141
|
-
document.body.style.width =
|
|
141
|
+
document.body.style.width = "calc(".concat(this.originBodyWidth || '100%', " - ").concat(this.scrollBarWidth, "px)");
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
144
|
enabledBodyScroll: () => {
|
|
@@ -350,12 +350,12 @@ class PreviewInner extends _baseComponent.default {
|
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
const previewPrefixCls =
|
|
353
|
+
const previewPrefixCls = "".concat(prefixCls, "-preview");
|
|
354
354
|
const previewWrapperCls = (0, _classnames.default)(previewPrefixCls, {
|
|
355
|
-
[
|
|
356
|
-
[
|
|
355
|
+
["".concat(prefixCls, "-hide")]: !visible,
|
|
356
|
+
["".concat(previewPrefixCls, "-popup")]: getPopupContainer
|
|
357
357
|
}, className);
|
|
358
|
-
const hideViewerCls = !viewerVisible ?
|
|
358
|
+
const hideViewerCls = !viewerVisible ? "".concat(previewPrefixCls, "-hide") : "";
|
|
359
359
|
const total = imgSrc.length;
|
|
360
360
|
const showPrev = total !== 1 && (infinite || currentIndex !== 0);
|
|
361
361
|
const showNext = total !== 1 && (infinite || currentIndex !== total - 1);
|
|
@@ -393,7 +393,7 @@ class PreviewInner extends _baseComponent.default {
|
|
|
393
393
|
/*#__PURE__*/
|
|
394
394
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
395
395
|
_react.default.createElement("div", {
|
|
396
|
-
className: (0, _classnames.default)(
|
|
396
|
+
className: (0, _classnames.default)("".concat(previewPrefixCls, "-icon"), "".concat(previewPrefixCls, "-prev"), hideViewerCls),
|
|
397
397
|
onClick: () => this.handleSwitchImage("prev")
|
|
398
398
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconArrowLeft, {
|
|
399
399
|
size: "large"
|
|
@@ -401,7 +401,7 @@ class PreviewInner extends _baseComponent.default {
|
|
|
401
401
|
/*#__PURE__*/
|
|
402
402
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
403
403
|
_react.default.createElement("div", {
|
|
404
|
-
className: (0, _classnames.default)(
|
|
404
|
+
className: (0, _classnames.default)("".concat(previewPrefixCls, "-icon"), "".concat(previewPrefixCls, "-next"), hideViewerCls),
|
|
405
405
|
onClick: () => this.handleSwitchImage("next")
|
|
406
406
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconArrowRight, {
|
|
407
407
|
size: "large"
|