@douyinfe/semi-ui 2.29.0 → 2.30.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/semi.css +413 -16
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +2016 -1963
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/_portal/index.js +2 -2
- package/lib/cjs/_utils/index.js +1 -3
- package/lib/cjs/anchor/index.js +9 -9
- package/lib/cjs/anchor/link.js +8 -8
- package/lib/cjs/autoComplete/index.js +4 -8
- package/lib/cjs/autoComplete/option.js +7 -7
- package/lib/cjs/avatar/avatarGroup.js +7 -7
- package/lib/cjs/avatar/index.js +12 -12
- package/lib/cjs/badge/index.js +8 -8
- package/lib/cjs/banner/index.js +12 -12
- package/lib/cjs/breadcrumb/index.js +12 -12
- package/lib/cjs/breadcrumb/item.js +8 -8
- package/lib/cjs/button/Button.js +9 -9
- package/lib/cjs/button/buttonGroup.js +5 -5
- package/lib/cjs/button/splitButtonGroup.js +1 -1
- package/lib/cjs/calendar/dayCalendar.js +13 -13
- package/lib/cjs/calendar/dayCol.js +17 -17
- package/lib/cjs/calendar/monthCalendar.js +38 -38
- package/lib/cjs/calendar/rangeCalendar.js +27 -27
- package/lib/cjs/calendar/timeCol.js +6 -6
- package/lib/cjs/calendar/weekCalendar.js +27 -27
- package/lib/cjs/card/cardGroup.js +2 -2
- package/lib/cjs/card/index.js +16 -16
- package/lib/cjs/card/meta.js +5 -5
- package/lib/cjs/carousel/CarouselArrow.js +6 -6
- package/lib/cjs/carousel/CarouselIndicator.js +6 -6
- package/lib/cjs/carousel/index.js +12 -12
- package/lib/cjs/cascader/index.js +36 -36
- package/lib/cjs/cascader/item.js +26 -26
- package/lib/cjs/checkbox/checkbox.js +14 -14
- package/lib/cjs/checkbox/checkboxGroup.js +4 -4
- package/lib/cjs/checkbox/checkboxInner.js +6 -6
- package/lib/cjs/collapse/item.js +9 -9
- package/lib/cjs/collapsible/index.js +3 -3
- package/lib/cjs/configProvider/index.js +1 -1
- package/lib/cjs/datePicker/dateInput.js +16 -16
- package/lib/cjs/datePicker/datePicker.js +9 -9
- package/lib/cjs/datePicker/footer.js +1 -1
- package/lib/cjs/datePicker/index.js +1 -1
- package/lib/cjs/datePicker/month.js +2 -2
- package/lib/cjs/datePicker/monthsGrid.js +27 -27
- package/lib/cjs/datePicker/navigation.js +1 -1
- package/lib/cjs/datePicker/quickControl.js +14 -14
- package/lib/cjs/datePicker/yearAndMonth.js +4 -4
- package/lib/cjs/descriptions/index.js +3 -3
- package/lib/cjs/descriptions/item.js +5 -5
- package/lib/cjs/divider/index.js +7 -7
- package/lib/cjs/dropdown/dropdownDivider.js +1 -1
- package/lib/cjs/dropdown/dropdownItem.js +7 -7
- package/lib/cjs/dropdown/dropdownMenu.js +1 -1
- package/lib/cjs/dropdown/dropdownTitle.js +2 -2
- package/lib/cjs/dropdown/index.js +3 -3
- package/lib/cjs/empty/index.js +7 -7
- package/lib/cjs/form/arrayField.js +1 -1
- package/lib/cjs/form/baseForm.js +2 -2
- package/lib/cjs/form/errorMessage.js +1 -1
- package/lib/cjs/form/group.js +6 -6
- package/lib/cjs/form/hoc/withField.js +16 -16
- package/lib/cjs/form/label.js +9 -9
- package/lib/cjs/form/slot.js +5 -5
- package/lib/cjs/grid/col.js +11 -11
- package/lib/cjs/grid/row.js +4 -4
- package/lib/cjs/highlight/index.js +1 -1
- package/lib/cjs/iconButton/index.js +5 -5
- package/lib/cjs/image/image.js +10 -10
- package/lib/cjs/image/preview.js +3 -3
- package/lib/cjs/image/previewFooter.js +12 -12
- package/lib/cjs/image/previewHeader.js +3 -3
- package/lib/cjs/image/previewImage.js +7 -7
- package/lib/cjs/image/previewInner.js +7 -7
- package/lib/cjs/input/index.js +38 -38
- package/lib/cjs/input/inputGroup.js +7 -7
- package/lib/cjs/input/textarea.js +14 -14
- package/lib/cjs/inputNumber/index.js +11 -11
- package/lib/cjs/layout/Sider.js +3 -3
- package/lib/cjs/layout/index.js +2 -2
- package/lib/cjs/list/index.js +11 -11
- package/lib/cjs/list/item.js +6 -6
- package/lib/cjs/modal/ConfirmModal.js +7 -7
- package/lib/cjs/modal/Modal.js +4 -4
- package/lib/cjs/modal/ModalContent.js +24 -24
- package/lib/cjs/modal/useModal/index.js +1 -1
- package/lib/cjs/navigation/CollapseButton.js +1 -1
- package/lib/cjs/navigation/Footer.js +2 -2
- package/lib/cjs/navigation/Header.js +5 -5
- package/lib/cjs/navigation/Item.js +16 -16
- package/lib/cjs/navigation/SubNav.js +14 -14
- package/lib/cjs/navigation/index.js +8 -8
- package/lib/cjs/notification/index.js +3 -3
- package/lib/cjs/notification/notice.js +12 -12
- package/lib/cjs/overflowList/index.js +6 -6
- package/lib/cjs/pagination/index.js +24 -24
- package/lib/cjs/popconfirm/index.js +9 -9
- package/lib/cjs/popover/index.js +2 -2
- package/lib/cjs/progress/index.js +14 -14
- package/lib/cjs/radio/radio.js +22 -22
- package/lib/cjs/radio/radioGroup.js +5 -5
- package/lib/cjs/radio/radioInner.js +7 -7
- package/lib/cjs/rating/index.js +5 -5
- package/lib/cjs/rating/item.js +11 -11
- package/lib/cjs/scrollList/index.js +5 -5
- package/lib/cjs/scrollList/scrollItem.js +13 -13
- package/lib/cjs/select/index.js +61 -61
- package/lib/cjs/select/option.js +7 -7
- package/lib/cjs/sideSheet/SideSheetContent.js +10 -10
- package/lib/cjs/sideSheet/index.js +7 -7
- package/lib/cjs/skeleton/index.js +1 -1
- package/lib/cjs/skeleton/item.js +4 -4
- package/lib/cjs/slider/index.js +28 -28
- package/lib/cjs/space/index.js +12 -12
- package/lib/cjs/spin/icon.js +2 -2
- package/lib/cjs/spin/index.js +6 -6
- package/lib/cjs/steps/basicStep.d.ts +3 -0
- package/lib/cjs/steps/basicStep.js +21 -15
- package/lib/cjs/steps/basicSteps.js +12 -9
- package/lib/cjs/steps/fillStep.d.ts +2 -0
- package/lib/cjs/steps/fillStep.js +12 -10
- package/lib/cjs/steps/fillSteps.js +11 -13
- package/lib/cjs/steps/index.d.ts +63 -1
- package/lib/cjs/steps/index.js +9 -0
- package/lib/cjs/steps/navStep.d.ts +4 -0
- package/lib/cjs/steps/navStep.js +26 -8
- package/lib/cjs/steps/navSteps.js +6 -4
- package/lib/cjs/steps/step.d.ts +4 -1
- package/lib/cjs/steps/step.js +1 -0
- package/lib/cjs/table/Body/BaseRow.js +5 -5
- package/lib/cjs/table/Body/ExpandedRow.js +3 -3
- package/lib/cjs/table/Body/SectionRow.js +1 -1
- package/lib/cjs/table/Body/index.js +8 -8
- package/lib/cjs/table/ColGroup.js +2 -2
- package/lib/cjs/table/ColumnFilter.js +3 -3
- package/lib/cjs/table/ColumnSelection.js +2 -2
- package/lib/cjs/table/ColumnSorter.js +7 -7
- package/lib/cjs/table/CustomExpandIcon.js +2 -2
- package/lib/cjs/table/HeadTable.js +3 -3
- package/lib/cjs/table/Table.js +20 -20
- package/lib/cjs/table/TableCell.js +8 -8
- package/lib/cjs/table/TableHeader.js +1 -1
- package/lib/cjs/table/TableHeaderRow.js +8 -8
- package/lib/cjs/table/TablePagination.js +3 -3
- package/lib/cjs/tabs/TabBar.js +12 -12
- package/lib/cjs/tabs/TabItem.js +7 -7
- package/lib/cjs/tabs/TabPane.js +3 -3
- package/lib/cjs/tabs/index.js +2 -2
- package/lib/cjs/tag/group.js +5 -5
- package/lib/cjs/tag/index.js +13 -13
- package/lib/cjs/tagInput/index.js +33 -33
- package/lib/cjs/timePicker/Combobox.js +4 -4
- package/lib/cjs/timePicker/TimeInput.js +4 -4
- package/lib/cjs/timePicker/TimePicker.js +8 -8
- package/lib/cjs/timeline/index.js +8 -8
- package/lib/cjs/timeline/item.d.ts +5 -0
- package/lib/cjs/timeline/item.js +38 -10
- package/lib/cjs/toast/index.js +5 -5
- package/lib/cjs/toast/toast.js +9 -9
- package/lib/cjs/tooltip/index.js +7 -7
- package/lib/cjs/transfer/index.js +31 -31
- package/lib/cjs/tree/autoSizer.js +1 -1
- package/lib/cjs/tree/index.js +6 -6
- package/lib/cjs/tree/nodeList.js +1 -1
- package/lib/cjs/tree/treeNode.js +26 -26
- package/lib/cjs/treeSelect/index.js +41 -41
- package/lib/cjs/typography/base.js +14 -14
- package/lib/cjs/typography/copyable.js +3 -3
- package/lib/cjs/typography/paragraph.js +1 -1
- package/lib/cjs/typography/title.js +1 -1
- package/lib/cjs/typography/util.js +1 -1
- package/lib/cjs/upload/fileCard.js +32 -32
- package/lib/cjs/upload/index.js +37 -37
- package/lib/es/_portal/index.js +2 -2
- package/lib/es/_utils/index.js +1 -3
- package/lib/es/anchor/index.js +9 -9
- package/lib/es/anchor/link.js +8 -8
- package/lib/es/autoComplete/index.js +4 -8
- package/lib/es/autoComplete/option.js +7 -7
- package/lib/es/avatar/avatarGroup.js +7 -7
- package/lib/es/avatar/index.js +12 -12
- package/lib/es/badge/index.js +8 -8
- package/lib/es/banner/index.js +12 -12
- package/lib/es/breadcrumb/index.js +12 -12
- package/lib/es/breadcrumb/item.js +8 -8
- package/lib/es/button/Button.js +9 -9
- package/lib/es/button/buttonGroup.js +5 -5
- package/lib/es/button/splitButtonGroup.js +1 -1
- package/lib/es/calendar/dayCalendar.js +13 -13
- package/lib/es/calendar/dayCol.js +17 -17
- package/lib/es/calendar/monthCalendar.js +38 -38
- package/lib/es/calendar/rangeCalendar.js +27 -27
- package/lib/es/calendar/timeCol.js +6 -6
- package/lib/es/calendar/weekCalendar.js +27 -27
- package/lib/es/card/cardGroup.js +2 -2
- package/lib/es/card/index.js +16 -16
- package/lib/es/card/meta.js +5 -5
- package/lib/es/carousel/CarouselArrow.js +6 -6
- package/lib/es/carousel/CarouselIndicator.js +6 -6
- package/lib/es/carousel/index.js +12 -12
- package/lib/es/cascader/index.js +36 -36
- package/lib/es/cascader/item.js +26 -26
- package/lib/es/checkbox/checkbox.js +14 -14
- package/lib/es/checkbox/checkboxGroup.js +4 -4
- package/lib/es/checkbox/checkboxInner.js +6 -6
- package/lib/es/collapse/item.js +9 -9
- package/lib/es/collapsible/index.js +3 -3
- package/lib/es/configProvider/index.js +1 -1
- package/lib/es/datePicker/dateInput.js +16 -16
- package/lib/es/datePicker/datePicker.js +9 -9
- package/lib/es/datePicker/footer.js +1 -1
- package/lib/es/datePicker/index.js +1 -1
- package/lib/es/datePicker/month.js +2 -2
- package/lib/es/datePicker/monthsGrid.js +27 -27
- package/lib/es/datePicker/navigation.js +1 -1
- package/lib/es/datePicker/quickControl.js +14 -14
- package/lib/es/datePicker/yearAndMonth.js +4 -4
- package/lib/es/descriptions/index.js +3 -3
- package/lib/es/descriptions/item.js +5 -5
- package/lib/es/divider/index.js +7 -7
- package/lib/es/dropdown/dropdownDivider.js +1 -1
- package/lib/es/dropdown/dropdownItem.js +7 -7
- package/lib/es/dropdown/dropdownMenu.js +1 -1
- package/lib/es/dropdown/dropdownTitle.js +2 -2
- package/lib/es/dropdown/index.js +3 -3
- package/lib/es/empty/index.js +7 -7
- package/lib/es/form/arrayField.js +1 -1
- package/lib/es/form/baseForm.js +2 -2
- package/lib/es/form/errorMessage.js +1 -1
- package/lib/es/form/group.js +6 -6
- package/lib/es/form/hoc/withField.js +16 -16
- package/lib/es/form/label.js +9 -9
- package/lib/es/form/slot.js +5 -5
- package/lib/es/grid/col.js +11 -11
- package/lib/es/grid/row.js +4 -4
- package/lib/es/highlight/index.js +1 -1
- package/lib/es/iconButton/index.js +5 -5
- package/lib/es/image/image.js +10 -10
- package/lib/es/image/preview.js +3 -3
- package/lib/es/image/previewFooter.js +12 -12
- package/lib/es/image/previewHeader.js +3 -3
- package/lib/es/image/previewImage.js +7 -7
- package/lib/es/image/previewInner.js +7 -7
- package/lib/es/input/index.js +38 -38
- package/lib/es/input/inputGroup.js +7 -7
- package/lib/es/input/textarea.js +14 -14
- package/lib/es/inputNumber/index.js +11 -11
- package/lib/es/layout/Sider.js +3 -3
- package/lib/es/layout/index.js +2 -2
- package/lib/es/list/index.js +11 -11
- package/lib/es/list/item.js +6 -6
- package/lib/es/modal/ConfirmModal.js +7 -7
- package/lib/es/modal/Modal.js +4 -4
- package/lib/es/modal/ModalContent.js +24 -24
- package/lib/es/modal/useModal/index.js +1 -1
- package/lib/es/navigation/CollapseButton.js +1 -1
- package/lib/es/navigation/Footer.js +2 -2
- package/lib/es/navigation/Header.js +5 -5
- package/lib/es/navigation/Item.js +16 -16
- package/lib/es/navigation/SubNav.js +14 -14
- package/lib/es/navigation/index.js +8 -8
- package/lib/es/notification/index.js +3 -3
- package/lib/es/notification/notice.js +12 -12
- package/lib/es/overflowList/index.js +6 -6
- package/lib/es/pagination/index.js +24 -24
- package/lib/es/popconfirm/index.js +9 -9
- package/lib/es/popover/index.js +2 -2
- package/lib/es/progress/index.js +14 -14
- package/lib/es/radio/radio.js +22 -22
- package/lib/es/radio/radioGroup.js +5 -5
- package/lib/es/radio/radioInner.js +7 -7
- package/lib/es/rating/index.js +5 -5
- package/lib/es/rating/item.js +11 -11
- package/lib/es/scrollList/index.js +5 -5
- package/lib/es/scrollList/scrollItem.js +13 -13
- package/lib/es/select/index.js +61 -61
- package/lib/es/select/option.js +7 -7
- package/lib/es/sideSheet/SideSheetContent.js +10 -10
- package/lib/es/sideSheet/index.js +7 -7
- package/lib/es/skeleton/index.js +1 -1
- package/lib/es/skeleton/item.js +4 -4
- package/lib/es/slider/index.js +28 -28
- package/lib/es/space/index.js +12 -12
- package/lib/es/spin/icon.js +2 -2
- package/lib/es/spin/index.js +6 -6
- package/lib/es/steps/basicStep.d.ts +3 -0
- package/lib/es/steps/basicStep.js +21 -15
- package/lib/es/steps/basicSteps.js +12 -9
- package/lib/es/steps/fillStep.d.ts +2 -0
- package/lib/es/steps/fillStep.js +12 -10
- package/lib/es/steps/fillSteps.js +12 -13
- package/lib/es/steps/index.d.ts +63 -1
- package/lib/es/steps/index.js +6 -0
- package/lib/es/steps/navStep.d.ts +4 -0
- package/lib/es/steps/navStep.js +21 -8
- package/lib/es/steps/navSteps.js +6 -4
- package/lib/es/steps/step.d.ts +4 -1
- package/lib/es/steps/step.js +1 -0
- package/lib/es/table/Body/BaseRow.js +5 -5
- package/lib/es/table/Body/ExpandedRow.js +3 -3
- package/lib/es/table/Body/SectionRow.js +1 -1
- package/lib/es/table/Body/index.js +8 -8
- package/lib/es/table/ColGroup.js +2 -2
- package/lib/es/table/ColumnFilter.js +3 -3
- package/lib/es/table/ColumnSelection.js +2 -2
- package/lib/es/table/ColumnSorter.js +7 -7
- package/lib/es/table/CustomExpandIcon.js +2 -2
- package/lib/es/table/HeadTable.js +3 -3
- package/lib/es/table/Table.js +20 -20
- package/lib/es/table/TableCell.js +8 -8
- package/lib/es/table/TableHeader.js +1 -1
- package/lib/es/table/TableHeaderRow.js +8 -8
- package/lib/es/table/TablePagination.js +3 -3
- package/lib/es/tabs/TabBar.js +12 -12
- package/lib/es/tabs/TabItem.js +7 -7
- package/lib/es/tabs/TabPane.js +3 -3
- package/lib/es/tabs/index.js +2 -2
- package/lib/es/tag/group.js +5 -5
- package/lib/es/tag/index.js +13 -13
- package/lib/es/tagInput/index.js +33 -33
- package/lib/es/timePicker/Combobox.js +4 -4
- package/lib/es/timePicker/TimeInput.js +4 -4
- package/lib/es/timePicker/TimePicker.js +8 -8
- package/lib/es/timeline/index.js +8 -8
- package/lib/es/timeline/item.d.ts +5 -0
- package/lib/es/timeline/item.js +38 -10
- package/lib/es/toast/index.js +5 -5
- package/lib/es/toast/toast.js +9 -9
- package/lib/es/tooltip/index.js +7 -7
- package/lib/es/transfer/index.js +31 -31
- package/lib/es/tree/autoSizer.js +1 -1
- package/lib/es/tree/index.js +6 -6
- package/lib/es/tree/nodeList.js +1 -1
- package/lib/es/tree/treeNode.js +26 -26
- package/lib/es/treeSelect/index.js +41 -41
- package/lib/es/typography/base.js +14 -14
- package/lib/es/typography/copyable.js +3 -3
- package/lib/es/typography/paragraph.js +1 -1
- package/lib/es/typography/title.js +1 -1
- package/lib/es/typography/util.js +1 -1
- package/lib/es/upload/fileCard.js +32 -32
- package/lib/es/upload/index.js +37 -37
- package/package.json +8 -8
package/lib/es/form/label.js
CHANGED
|
@@ -21,26 +21,26 @@ export default class Label extends PureComponent {
|
|
|
21
21
|
optional
|
|
22
22
|
} = this.props;
|
|
23
23
|
const labelCls = classNames(className, {
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
24
|
+
["".concat(prefixCls, "-field-label")]: true,
|
|
25
|
+
["".concat(prefixCls, "-field-label-left")]: align === 'left',
|
|
26
|
+
["".concat(prefixCls, "-field-label-right")]: align === 'right',
|
|
27
|
+
["".concat(prefixCls, "-field-label-required")]: required,
|
|
28
|
+
["".concat(prefixCls, "-field-label-disabled")]: disabled,
|
|
29
|
+
["".concat(prefixCls, "-field-label-with-extra")]: extra
|
|
30
30
|
});
|
|
31
31
|
const labelStyle = style ? style : {};
|
|
32
32
|
width ? labelStyle.width = width : null;
|
|
33
33
|
const optionalText = /*#__PURE__*/React.createElement(LocaleConsumer, {
|
|
34
34
|
componentName: "Form"
|
|
35
35
|
}, locale => /*#__PURE__*/React.createElement("span", {
|
|
36
|
-
className:
|
|
36
|
+
className: "".concat(prefixCls, "-field-label-optional-text")
|
|
37
37
|
}, locale.optional));
|
|
38
38
|
const textContent = /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
className:
|
|
39
|
+
className: "".concat(prefixCls, "-field-label-text"),
|
|
40
40
|
"x-semi-prop": "label"
|
|
41
41
|
}, typeof text !== 'undefined' ? text : children, optional ? optionalText : null);
|
|
42
42
|
const contentWithExtra = /*#__PURE__*/React.createElement(React.Fragment, null, textContent, /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className:
|
|
43
|
+
className: "".concat(prefixCls, "-field-label-extra")
|
|
44
44
|
}, extra));
|
|
45
45
|
return /*#__PURE__*/React.createElement("label", {
|
|
46
46
|
className: labelCls,
|
package/lib/es/form/slot.js
CHANGED
|
@@ -53,11 +53,11 @@ const FormSlot = props => {
|
|
|
53
53
|
|
|
54
54
|
const appendCol = labelCol && wrapperCol;
|
|
55
55
|
const slotCls = classNames({
|
|
56
|
-
[
|
|
57
|
-
[
|
|
56
|
+
["".concat(prefix, "-field")]: true,
|
|
57
|
+
["".concat(prefix, "-slot")]: true
|
|
58
58
|
}, className);
|
|
59
59
|
const labelColCls = classNames({
|
|
60
|
-
[
|
|
60
|
+
["".concat(prefix, "-col-").concat(labelAlign)]: true
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
switch (true) {
|
|
@@ -118,8 +118,8 @@ const FormSlot = props => {
|
|
|
118
118
|
width: labelWidth
|
|
119
119
|
}, label);
|
|
120
120
|
let mainCls = classNames({
|
|
121
|
-
[
|
|
122
|
-
[
|
|
121
|
+
["".concat(prefix, "-field-main")]: true,
|
|
122
|
+
["".concat(prefix, "-slot-main")]: true
|
|
123
123
|
});
|
|
124
124
|
|
|
125
125
|
switch (true) {
|
package/lib/es/grid/col.js
CHANGED
|
@@ -39,7 +39,7 @@ class Col extends React.Component {
|
|
|
39
39
|
others = __rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children"]);
|
|
40
40
|
|
|
41
41
|
let sizeClassObj = {};
|
|
42
|
-
const prefix =
|
|
42
|
+
const prefix = "".concat(prefixCls, "-col");
|
|
43
43
|
['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach(size => {
|
|
44
44
|
let sizeProps = {};
|
|
45
45
|
|
|
@@ -51,19 +51,19 @@ class Col extends React.Component {
|
|
|
51
51
|
|
|
52
52
|
delete others[size];
|
|
53
53
|
sizeClassObj = Object.assign(Object.assign({}, sizeClassObj), {
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
54
|
+
["".concat(prefix, "-").concat(size, "-").concat(sizeProps.span)]: sizeProps.span !== undefined,
|
|
55
|
+
["".concat(prefix, "-").concat(size, "-order-").concat(sizeProps.order)]: sizeProps.order || sizeProps.order === 0,
|
|
56
|
+
["".concat(prefix, "-").concat(size, "-offset-").concat(sizeProps.offset)]: sizeProps.offset || sizeProps.offset === 0,
|
|
57
|
+
["".concat(prefix, "-").concat(size, "-push-").concat(sizeProps.push)]: sizeProps.push || sizeProps.push === 0,
|
|
58
|
+
["".concat(prefix, "-").concat(size, "-pull-").concat(sizeProps.pull)]: sizeProps.pull || sizeProps.pull === 0
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
const classes = classnames(prefix, {
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
62
|
+
["".concat(prefix, "-").concat(span)]: span !== undefined,
|
|
63
|
+
["".concat(prefix, "-order-").concat(order)]: order,
|
|
64
|
+
["".concat(prefix, "-offset-").concat(offset)]: offset,
|
|
65
|
+
["".concat(prefix, "-push-").concat(push)]: push,
|
|
66
|
+
["".concat(prefix, "-pull-").concat(pull)]: pull
|
|
67
67
|
}, className, sizeClassObj);
|
|
68
68
|
let {
|
|
69
69
|
style
|
package/lib/es/grid/row.js
CHANGED
|
@@ -114,12 +114,12 @@ class Row extends React.Component {
|
|
|
114
114
|
others = __rest(_a, ["prefixCls", "type", "justify", "align", "className", "style", "children"]);
|
|
115
115
|
|
|
116
116
|
const gutters = this.getGutter();
|
|
117
|
-
const prefix =
|
|
117
|
+
const prefix = "".concat(prefixCls, "-row");
|
|
118
118
|
const classes = classnames({
|
|
119
119
|
[prefix]: type !== 'flex',
|
|
120
|
-
[
|
|
121
|
-
[
|
|
122
|
-
[
|
|
120
|
+
["".concat(prefix, "-").concat(type)]: type,
|
|
121
|
+
["".concat(prefix, "-").concat(type, "-").concat(justify)]: type && justify,
|
|
122
|
+
["".concat(prefix, "-").concat(type, "-").concat(align)]: type && align
|
|
123
123
|
}, className);
|
|
124
124
|
const rowStyle = Object.assign(Object.assign(Object.assign({}, gutters[0] > 0 ? {
|
|
125
125
|
marginLeft: gutters[0] / -2,
|
|
@@ -65,8 +65,8 @@ class IconButton extends PureComponent {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
const btnTextCls = classNames({
|
|
68
|
-
[
|
|
69
|
-
[
|
|
68
|
+
["".concat(prefixCls, "-content-left")]: iconPosition === 'right',
|
|
69
|
+
["".concat(prefixCls, "-content-right")]: iconPosition === 'left'
|
|
70
70
|
});
|
|
71
71
|
const xSemiProp = this.props['x-semi-children-alias'] || 'children';
|
|
72
72
|
const children = originChildren != null ? /*#__PURE__*/React.createElement("span", {
|
|
@@ -80,9 +80,9 @@ class IconButton extends PureComponent {
|
|
|
80
80
|
finalChildren = /*#__PURE__*/React.createElement(React.Fragment, null, children, IconElem);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const iconBtnCls = classNames(className,
|
|
84
|
-
[
|
|
85
|
-
[
|
|
83
|
+
const iconBtnCls = classNames(className, "".concat(prefixCls, "-with-icon"), {
|
|
84
|
+
["".concat(prefixCls, "-with-icon-only")]: children == null || children === '',
|
|
85
|
+
["".concat(prefixCls, "-loading")]: loading
|
|
86
86
|
});
|
|
87
87
|
return /*#__PURE__*/React.createElement(Button, Object.assign({}, otherProps, {
|
|
88
88
|
className: iconBtnCls,
|
package/lib/es/image/image.js
CHANGED
|
@@ -64,7 +64,7 @@ export default class Image extends BaseComponent {
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
this.renderDefaultError = () => {
|
|
67
|
-
const prefixClsName =
|
|
67
|
+
const prefixClsName = "".concat(prefixCls, "-status");
|
|
68
68
|
return /*#__PURE__*/React.createElement("div", {
|
|
69
69
|
className: prefixClsName
|
|
70
70
|
}, /*#__PURE__*/React.createElement(IconUploadError, {
|
|
@@ -73,7 +73,7 @@ export default class Image extends BaseComponent {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
this.renderLoad = () => {
|
|
76
|
-
const prefixClsName =
|
|
76
|
+
const prefixClsName = "".concat(prefixCls, "-status");
|
|
77
77
|
const {
|
|
78
78
|
placeholder
|
|
79
79
|
} = this.props;
|
|
@@ -86,7 +86,7 @@ export default class Image extends BaseComponent {
|
|
|
86
86
|
const {
|
|
87
87
|
fallback
|
|
88
88
|
} = this.props;
|
|
89
|
-
const prefixClsName =
|
|
89
|
+
const prefixClsName = "".concat(prefixCls, "-status");
|
|
90
90
|
const fallbackNode = typeof fallback === "string" ? /*#__PURE__*/React.createElement("img", {
|
|
91
91
|
style: {
|
|
92
92
|
width: "100%",
|
|
@@ -105,7 +105,7 @@ export default class Image extends BaseComponent {
|
|
|
105
105
|
loadStatus
|
|
106
106
|
} = this.state;
|
|
107
107
|
return /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className:
|
|
108
|
+
className: "".concat(prefixCls, "-overlay")
|
|
109
109
|
}, loadStatus === "error" && this.renderError(), loadStatus === "loading" && this.renderLoad());
|
|
110
110
|
};
|
|
111
111
|
|
|
@@ -114,13 +114,13 @@ export default class Image extends BaseComponent {
|
|
|
114
114
|
}, locale => locale[key]);
|
|
115
115
|
|
|
116
116
|
this.renderMask = () => /*#__PURE__*/React.createElement("div", {
|
|
117
|
-
className:
|
|
117
|
+
className: "".concat(prefixCls, "-mask")
|
|
118
118
|
}, /*#__PURE__*/React.createElement("div", {
|
|
119
|
-
className:
|
|
119
|
+
className: "".concat(prefixCls, "-mask-info")
|
|
120
120
|
}, /*#__PURE__*/React.createElement(IconEyeOpened, {
|
|
121
121
|
size: "extra-large"
|
|
122
122
|
}), /*#__PURE__*/React.createElement("span", {
|
|
123
|
-
className:
|
|
123
|
+
className: "".concat(prefixCls, "-mask-info-text")
|
|
124
124
|
}, this.getLocalTextByKey("preview"))));
|
|
125
125
|
|
|
126
126
|
this.state = {
|
|
@@ -216,9 +216,9 @@ export default class Image extends BaseComponent {
|
|
|
216
216
|
src: this.isInGroup() && this.isLazyLoad() ? undefined : src,
|
|
217
217
|
"data-src": src,
|
|
218
218
|
alt: alt,
|
|
219
|
-
className: cls(
|
|
220
|
-
[
|
|
221
|
-
[
|
|
219
|
+
className: cls("".concat(prefixCls, "-img"), {
|
|
220
|
+
["".concat(prefixCls, "-img-preview")]: showPreviewCursor,
|
|
221
|
+
["".concat(prefixCls, "-img-error")]: loadStatus === "error"
|
|
222
222
|
}),
|
|
223
223
|
width: width,
|
|
224
224
|
height: height,
|
package/lib/es/image/preview.js
CHANGED
|
@@ -103,7 +103,7 @@ export default class Preview extends BaseComponent {
|
|
|
103
103
|
const {
|
|
104
104
|
lazyLoadMargin
|
|
105
105
|
} = this.props;
|
|
106
|
-
const allElement = document.querySelectorAll(
|
|
106
|
+
const allElement = document.querySelectorAll(".".concat(prefixCls, "-img")); // use IntersectionObserver to lazy load image
|
|
107
107
|
|
|
108
108
|
const observer = new IntersectionObserver(entries => {
|
|
109
109
|
entries.forEach(item => {
|
|
@@ -117,7 +117,7 @@ export default class Preview extends BaseComponent {
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
}, {
|
|
120
|
-
root: document.querySelector(
|
|
120
|
+
root: document.querySelector("#".concat(this.previewGroupId)),
|
|
121
121
|
rootMargin: lazyLoadMargin
|
|
122
122
|
});
|
|
123
123
|
allElement.forEach(item => observer.observe(item));
|
|
@@ -171,7 +171,7 @@ export default class Preview extends BaseComponent {
|
|
|
171
171
|
}, /*#__PURE__*/React.createElement("div", {
|
|
172
172
|
id: this.previewGroupId,
|
|
173
173
|
style: style,
|
|
174
|
-
className:
|
|
174
|
+
className: "".concat(prefixCls, "-preview-group")
|
|
175
175
|
}, newChildren), /*#__PURE__*/React.createElement(PreviewInner, Object.assign({}, restProps, {
|
|
176
176
|
ref: this.previewRef,
|
|
177
177
|
src: finalSrcList,
|
|
@@ -11,7 +11,7 @@ import cls from "classnames";
|
|
|
11
11
|
import PreviewFooterFoundation from '@douyinfe/semi-foundation/lib/es/image/previewFooterFoundation';
|
|
12
12
|
import LocaleConsumer from "../locale/localeConsumer";
|
|
13
13
|
const prefixCls = cssClasses.PREFIX;
|
|
14
|
-
const footerPrefixCls =
|
|
14
|
+
const footerPrefixCls = "".concat(cssClasses.PREFIX, "-preview-footer");
|
|
15
15
|
let mouseActiveTime = 0;
|
|
16
16
|
export default class Footer extends BaseComponent {
|
|
17
17
|
constructor(props) {
|
|
@@ -110,7 +110,7 @@ export default class Footer extends BaseComponent {
|
|
|
110
110
|
} = this.props;
|
|
111
111
|
const icon = /*#__PURE__*/React.createElement(IconChevronLeft, {
|
|
112
112
|
size: "large",
|
|
113
|
-
className: disabledPrev ?
|
|
113
|
+
className: disabledPrev ? "".concat(footerPrefixCls, "-disabled") : "",
|
|
114
114
|
onClick: !disabledPrev ? onPrev : undefined
|
|
115
115
|
});
|
|
116
116
|
const content = prevTip !== null && prevTip !== void 0 ? prevTip : this.getLocalTextByKey("prevTip");
|
|
@@ -125,7 +125,7 @@ export default class Footer extends BaseComponent {
|
|
|
125
125
|
} = this.props;
|
|
126
126
|
const icon = /*#__PURE__*/React.createElement(IconChevronRight, {
|
|
127
127
|
size: "large",
|
|
128
|
-
className: disabledNext ?
|
|
128
|
+
className: disabledNext ? "".concat(footerPrefixCls, "-disabled") : "",
|
|
129
129
|
onClick: !disabledNext ? onNext : undefined
|
|
130
130
|
});
|
|
131
131
|
const content = nextTip !== null && nextTip !== void 0 ? nextTip : this.getLocalTextByKey("nextTip");
|
|
@@ -142,7 +142,7 @@ export default class Footer extends BaseComponent {
|
|
|
142
142
|
const icon = /*#__PURE__*/React.createElement(IconMinus, {
|
|
143
143
|
size: "large",
|
|
144
144
|
onClick: !disabledZoomOut ? this.handleMinusClick : undefined,
|
|
145
|
-
className: disabledZoomOut ?
|
|
145
|
+
className: disabledZoomOut ? "".concat(footerPrefixCls, "-disabled") : ""
|
|
146
146
|
});
|
|
147
147
|
const content = zoomOutTip !== null && zoomOutTip !== void 0 ? zoomOutTip : this.getLocalTextByKey("zoomOutTip");
|
|
148
148
|
return this.getFinalIconElement(icon, content);
|
|
@@ -158,7 +158,7 @@ export default class Footer extends BaseComponent {
|
|
|
158
158
|
const icon = /*#__PURE__*/React.createElement(IconPlus, {
|
|
159
159
|
size: "large",
|
|
160
160
|
onClick: !disabledZoomIn ? this.handlePlusClick : undefined,
|
|
161
|
-
className: disabledZoomIn ?
|
|
161
|
+
className: disabledZoomIn ? "".concat(footerPrefixCls, "-disabled") : ""
|
|
162
162
|
});
|
|
163
163
|
const content = zoomInTip !== null && zoomInTip !== void 0 ? zoomInTip : this.getLocalTextByKey("zoomInTip");
|
|
164
164
|
return this.getFinalIconElement(icon, content);
|
|
@@ -172,7 +172,7 @@ export default class Footer extends BaseComponent {
|
|
|
172
172
|
} = this.props;
|
|
173
173
|
const props = {
|
|
174
174
|
size: "large",
|
|
175
|
-
className: cls(
|
|
175
|
+
className: cls("".concat(footerPrefixCls, "-gap")),
|
|
176
176
|
onClick: this.handleRatioClick
|
|
177
177
|
};
|
|
178
178
|
const icon = ratio === "adaptation" ? /*#__PURE__*/React.createElement(IconRealSizeStroked, Object.assign({}, props)) : /*#__PURE__*/React.createElement(IconWindowAdaptionStroked, Object.assign({}, props));
|
|
@@ -208,8 +208,8 @@ export default class Footer extends BaseComponent {
|
|
|
208
208
|
const icon = /*#__PURE__*/React.createElement(IconDownload, {
|
|
209
209
|
size: "large",
|
|
210
210
|
onClick: !disableDownload ? onDownload : undefined,
|
|
211
|
-
className: cls(
|
|
212
|
-
[
|
|
211
|
+
className: cls("".concat(footerPrefixCls, "-gap"), {
|
|
212
|
+
["".concat(footerPrefixCls, "-disabled")]: disableDownload
|
|
213
213
|
})
|
|
214
214
|
});
|
|
215
215
|
const content = downloadTip !== null && downloadTip !== void 0 ? downloadTip : this.getLocalTextByKey("downloadTip");
|
|
@@ -242,14 +242,14 @@ export default class Footer extends BaseComponent {
|
|
|
242
242
|
|
|
243
243
|
if (renderPreviewMenu) {
|
|
244
244
|
return /*#__PURE__*/React.createElement("div", {
|
|
245
|
-
className:
|
|
245
|
+
className: "".concat(footerPrefixCls, "-wrapper")
|
|
246
246
|
}, this.customRenderViewMenu());
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
return /*#__PURE__*/React.createElement("section", {
|
|
250
|
-
className: cls(footerPrefixCls,
|
|
250
|
+
className: cls(footerPrefixCls, "".concat(footerPrefixCls, "-wrapper"), className)
|
|
251
251
|
}, this.getIconChevronLeft(), /*#__PURE__*/React.createElement("div", {
|
|
252
|
-
className:
|
|
252
|
+
className: "".concat(footerPrefixCls, "-page")
|
|
253
253
|
}, /*#__PURE__*/React.createElement("span", null, curPage), /*#__PURE__*/React.createElement("span", null, "/"), /*#__PURE__*/React.createElement("span", null, totalNum)), this.getIconChevronRight(), /*#__PURE__*/React.createElement(Divider, {
|
|
254
254
|
layout: "vertical"
|
|
255
255
|
}), this.getIconMinus(), /*#__PURE__*/React.createElement(Slider, {
|
|
@@ -257,7 +257,7 @@ export default class Footer extends BaseComponent {
|
|
|
257
257
|
min: min,
|
|
258
258
|
max: max,
|
|
259
259
|
step: step,
|
|
260
|
-
tipFormatter: v =>
|
|
260
|
+
tipFormatter: v => "".concat(v, "%"),
|
|
261
261
|
tooltipVisible: showTooltip ? undefined : false,
|
|
262
262
|
onChange: this.handleSlideChange
|
|
263
263
|
}), this.getIconPlus(), this.getIconRatio(), /*#__PURE__*/React.createElement(Divider, {
|
|
@@ -3,7 +3,7 @@ import { IconClose } from "@douyinfe/semi-icons";
|
|
|
3
3
|
import { cssClasses } from '@douyinfe/semi-foundation/lib/es/image/constants';
|
|
4
4
|
import cls from "classnames";
|
|
5
5
|
import { PreviewContext } from "./previewContext";
|
|
6
|
-
const prefixCls =
|
|
6
|
+
const prefixCls = "".concat(cssClasses.PREFIX, "-preview-header");
|
|
7
7
|
|
|
8
8
|
const Header = _ref => {
|
|
9
9
|
let {
|
|
@@ -26,10 +26,10 @@ const Header = _ref => {
|
|
|
26
26
|
return /*#__PURE__*/React.createElement("section", {
|
|
27
27
|
className: cls(prefixCls, className)
|
|
28
28
|
}, /*#__PURE__*/React.createElement("section", {
|
|
29
|
-
className:
|
|
29
|
+
className: "".concat(prefixCls, "-title"),
|
|
30
30
|
style: titleStyle
|
|
31
31
|
}, renderHeader ? renderHeader(title) : title), /*#__PURE__*/React.createElement("section", {
|
|
32
|
-
className:
|
|
32
|
+
className: "".concat(prefixCls, "-close"),
|
|
33
33
|
onMouseUp: onClose
|
|
34
34
|
}, /*#__PURE__*/React.createElement(IconClose, null)));
|
|
35
35
|
});
|
|
@@ -5,7 +5,7 @@ import PropTypes from "prop-types";
|
|
|
5
5
|
import Spin from "../spin";
|
|
6
6
|
import PreviewImageFoundation from '@douyinfe/semi-foundation/lib/es/image/previewImageFoundation';
|
|
7
7
|
const prefixCls = cssClasses.PREFIX;
|
|
8
|
-
const preViewImgPrefixCls =
|
|
8
|
+
const preViewImgPrefixCls = "".concat(prefixCls, "-preview-image");
|
|
9
9
|
let originImageWidth = null;
|
|
10
10
|
let originImageHeight = null;
|
|
11
11
|
let startMouseMove = false; // startMouseOffset:The offset of the mouse relative to the left and top of the picture
|
|
@@ -185,20 +185,20 @@ export default class PreviewImage extends BaseComponent {
|
|
|
185
185
|
const imgStyle = {
|
|
186
186
|
position: "absolute",
|
|
187
187
|
visibility: loading ? "hidden" : "visible",
|
|
188
|
-
transform:
|
|
188
|
+
transform: "rotate(".concat(-rotation, "deg)"),
|
|
189
189
|
top,
|
|
190
190
|
left,
|
|
191
|
-
width: loading ? "auto" :
|
|
192
|
-
height: loading ? "auto" :
|
|
191
|
+
width: loading ? "auto" : "".concat(width, "px"),
|
|
192
|
+
height: loading ? "auto" : "".concat(height, "px")
|
|
193
193
|
};
|
|
194
194
|
return /*#__PURE__*/React.createElement("div", {
|
|
195
|
-
className:
|
|
195
|
+
className: "".concat(preViewImgPrefixCls),
|
|
196
196
|
ref: this.containerRef
|
|
197
197
|
}, /*#__PURE__*/React.createElement("img", {
|
|
198
198
|
ref: this.registryImageRef,
|
|
199
199
|
src: src,
|
|
200
200
|
alt: "previewImag",
|
|
201
|
-
className:
|
|
201
|
+
className: "".concat(preViewImgPrefixCls, "-img"),
|
|
202
202
|
key: src,
|
|
203
203
|
onMouseMove: this.handleMoveImage,
|
|
204
204
|
onMouseDown: this.onImageMouseDown,
|
|
@@ -211,7 +211,7 @@ export default class PreviewImage extends BaseComponent {
|
|
|
211
211
|
crossOrigin: crossOrigin
|
|
212
212
|
}), loading && /*#__PURE__*/React.createElement(Spin, {
|
|
213
213
|
size: "large",
|
|
214
|
-
wrapperClassName:
|
|
214
|
+
wrapperClassName: "".concat(preViewImgPrefixCls, "-spin")
|
|
215
215
|
}));
|
|
216
216
|
}
|
|
217
217
|
|
|
@@ -116,7 +116,7 @@ export default class PreviewInner extends BaseComponent {
|
|
|
116
116
|
|
|
117
117
|
if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
|
|
118
118
|
document.body.style.overflow = 'hidden';
|
|
119
|
-
document.body.style.width =
|
|
119
|
+
document.body.style.width = "calc(".concat(this.originBodyWidth || '100%', " - ").concat(this.scrollBarWidth, "px)");
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
enabledBodyScroll: () => {
|
|
@@ -328,12 +328,12 @@ export default class PreviewInner extends BaseComponent {
|
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
const previewPrefixCls =
|
|
331
|
+
const previewPrefixCls = "".concat(prefixCls, "-preview");
|
|
332
332
|
const previewWrapperCls = cls(previewPrefixCls, {
|
|
333
|
-
[
|
|
334
|
-
[
|
|
333
|
+
["".concat(prefixCls, "-hide")]: !visible,
|
|
334
|
+
["".concat(previewPrefixCls, "-popup")]: getPopupContainer
|
|
335
335
|
}, className);
|
|
336
|
-
const hideViewerCls = !viewerVisible ?
|
|
336
|
+
const hideViewerCls = !viewerVisible ? "".concat(previewPrefixCls, "-hide") : "";
|
|
337
337
|
const total = imgSrc.length;
|
|
338
338
|
const showPrev = total !== 1 && (infinite || currentIndex !== 0);
|
|
339
339
|
const showNext = total !== 1 && (infinite || currentIndex !== total - 1);
|
|
@@ -371,7 +371,7 @@ export default class PreviewInner extends BaseComponent {
|
|
|
371
371
|
/*#__PURE__*/
|
|
372
372
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
373
373
|
React.createElement("div", {
|
|
374
|
-
className: cls(
|
|
374
|
+
className: cls("".concat(previewPrefixCls, "-icon"), "".concat(previewPrefixCls, "-prev"), hideViewerCls),
|
|
375
375
|
onClick: () => this.handleSwitchImage("prev")
|
|
376
376
|
}, /*#__PURE__*/React.createElement(IconArrowLeft, {
|
|
377
377
|
size: "large"
|
|
@@ -379,7 +379,7 @@ export default class PreviewInner extends BaseComponent {
|
|
|
379
379
|
/*#__PURE__*/
|
|
380
380
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
381
381
|
React.createElement("div", {
|
|
382
|
-
className: cls(
|
|
382
|
+
className: cls("".concat(previewPrefixCls, "-icon"), "".concat(previewPrefixCls, "-next"), hideViewerCls),
|
|
383
383
|
onClick: () => this.handleSwitchImage("next")
|
|
384
384
|
}, /*#__PURE__*/React.createElement(IconArrowRight, {
|
|
385
385
|
size: "large"
|
package/lib/es/input/index.js
CHANGED
|
@@ -168,9 +168,9 @@ class Input extends BaseComponent {
|
|
|
168
168
|
|
|
169
169
|
if (addonBefore) {
|
|
170
170
|
const prefixWrapperCls = cls({
|
|
171
|
-
[
|
|
172
|
-
[
|
|
173
|
-
[
|
|
171
|
+
["".concat(prefixCls, "-prepend")]: true,
|
|
172
|
+
["".concat(prefixCls, "-prepend-text")]: addonBefore && _isString(addonBefore),
|
|
173
|
+
["".concat(prefixCls, "-prepend-icon")]: isSemiIcon(addonBefore)
|
|
174
174
|
});
|
|
175
175
|
return /*#__PURE__*/React.createElement("div", {
|
|
176
176
|
className: prefixWrapperCls,
|
|
@@ -188,9 +188,9 @@ class Input extends BaseComponent {
|
|
|
188
188
|
|
|
189
189
|
if (addonAfter) {
|
|
190
190
|
const prefixWrapperCls = cls({
|
|
191
|
-
[
|
|
192
|
-
[
|
|
193
|
-
[
|
|
191
|
+
["".concat(prefixCls, "-append")]: true,
|
|
192
|
+
["".concat(prefixCls, "-append-text")]: addonAfter && _isString(addonAfter),
|
|
193
|
+
["".concat(prefixCls, "-append-icon")]: isSemiIcon(addonAfter)
|
|
194
194
|
});
|
|
195
195
|
return /*#__PURE__*/React.createElement("div", {
|
|
196
196
|
className: prefixWrapperCls,
|
|
@@ -202,7 +202,7 @@ class Input extends BaseComponent {
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
renderClearBtn() {
|
|
205
|
-
const clearCls = cls(
|
|
205
|
+
const clearCls = cls("".concat(prefixCls, "-clearbtn"));
|
|
206
206
|
const {
|
|
207
207
|
clearIcon
|
|
208
208
|
} = this.props;
|
|
@@ -230,7 +230,7 @@ class Input extends BaseComponent {
|
|
|
230
230
|
mode,
|
|
231
231
|
disabled
|
|
232
232
|
} = this.props;
|
|
233
|
-
const modeCls = cls(
|
|
233
|
+
const modeCls = cls("".concat(prefixCls, "-modebtn"));
|
|
234
234
|
const modeIcon = eyeClosed ? /*#__PURE__*/React.createElement(IconEyeClosedSolid, null) : /*#__PURE__*/React.createElement(IconEyeOpened, null); // alway show password button for a11y
|
|
235
235
|
|
|
236
236
|
const showModeBtn = mode === 'password' && !disabled;
|
|
@@ -265,10 +265,10 @@ class Input extends BaseComponent {
|
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
const prefixWrapperCls = cls({
|
|
268
|
-
[
|
|
269
|
-
[
|
|
270
|
-
[
|
|
271
|
-
[
|
|
268
|
+
["".concat(prefixCls, "-prefix")]: true,
|
|
269
|
+
["".concat(prefixCls, "-inset-label")]: insetLabel,
|
|
270
|
+
["".concat(prefixCls, "-prefix-text")]: labelNode && _isString(labelNode),
|
|
271
|
+
["".concat(prefixCls, "-prefix-icon")]: isSemiIcon(labelNode)
|
|
272
272
|
});
|
|
273
273
|
return (
|
|
274
274
|
/*#__PURE__*/
|
|
@@ -307,10 +307,10 @@ class Input extends BaseComponent {
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
const suffixWrapperCls = cls({
|
|
310
|
-
[
|
|
311
|
-
[
|
|
312
|
-
[
|
|
313
|
-
[
|
|
310
|
+
["".concat(prefixCls, "-suffix")]: true,
|
|
311
|
+
["".concat(prefixCls, "-suffix-text")]: suffix && _isString(suffix),
|
|
312
|
+
["".concat(prefixCls, "-suffix-icon")]: isSemiIcon(suffix),
|
|
313
|
+
["".concat(prefixCls, "-suffix-hidden")]: suffixAllowClear && Boolean(hideSuffix)
|
|
314
314
|
});
|
|
315
315
|
return (
|
|
316
316
|
/*#__PURE__*/
|
|
@@ -387,31 +387,31 @@ class Input extends BaseComponent {
|
|
|
387
387
|
const suffixAllowClear = this.showClearBtn();
|
|
388
388
|
const suffixIsIcon = isSemiIcon(suffix);
|
|
389
389
|
const ref = this.getInputRef();
|
|
390
|
-
const wrapperPrefix =
|
|
390
|
+
const wrapperPrefix = "".concat(prefixCls, "-wrapper");
|
|
391
391
|
const wrapperCls = cls(wrapperPrefix, className, {
|
|
392
|
-
[
|
|
393
|
-
[
|
|
394
|
-
[
|
|
395
|
-
[
|
|
396
|
-
[
|
|
397
|
-
[
|
|
398
|
-
[
|
|
399
|
-
[
|
|
400
|
-
[
|
|
401
|
-
[
|
|
402
|
-
[
|
|
403
|
-
[
|
|
404
|
-
[
|
|
405
|
-
[
|
|
406
|
-
[
|
|
407
|
-
[
|
|
408
|
-
[
|
|
392
|
+
["".concat(prefixCls, "-wrapper__with-prefix")]: prefix || insetLabel,
|
|
393
|
+
["".concat(prefixCls, "-wrapper__with-suffix")]: suffix,
|
|
394
|
+
["".concat(prefixCls, "-wrapper__with-suffix-hidden")]: suffixAllowClear && Boolean(hideSuffix),
|
|
395
|
+
["".concat(prefixCls, "-wrapper__with-suffix-icon")]: suffixIsIcon,
|
|
396
|
+
["".concat(prefixCls, "-wrapper__with-append")]: addonBefore,
|
|
397
|
+
["".concat(prefixCls, "-wrapper__with-prepend")]: addonAfter,
|
|
398
|
+
["".concat(prefixCls, "-wrapper__with-append-only")]: addonBefore && !addonAfter,
|
|
399
|
+
["".concat(prefixCls, "-wrapper__with-prepend-only")]: !addonBefore && addonAfter,
|
|
400
|
+
["".concat(wrapperPrefix, "-readonly")]: readonly,
|
|
401
|
+
["".concat(wrapperPrefix, "-disabled")]: disabled,
|
|
402
|
+
["".concat(wrapperPrefix, "-warning")]: validateStatus === 'warning',
|
|
403
|
+
["".concat(wrapperPrefix, "-error")]: validateStatus === 'error',
|
|
404
|
+
["".concat(wrapperPrefix, "-focus")]: isFocus,
|
|
405
|
+
["".concat(wrapperPrefix, "-clearable")]: showClear,
|
|
406
|
+
["".concat(wrapperPrefix, "-modebtn")]: mode === 'password',
|
|
407
|
+
["".concat(wrapperPrefix, "-hidden")]: type === 'hidden',
|
|
408
|
+
["".concat(wrapperPrefix, "-").concat(size)]: size
|
|
409
409
|
});
|
|
410
410
|
const inputCls = cls(prefixCls, {
|
|
411
|
-
[
|
|
412
|
-
[
|
|
413
|
-
[
|
|
414
|
-
[
|
|
411
|
+
["".concat(prefixCls, "-").concat(size)]: size,
|
|
412
|
+
["".concat(prefixCls, "-disabled")]: disabled,
|
|
413
|
+
["".concat(prefixCls, "-sibling-clearbtn")]: this.foundation.isAllowClear(),
|
|
414
|
+
["".concat(prefixCls, "-sibling-modebtn")]: mode === 'password'
|
|
415
415
|
});
|
|
416
416
|
const inputValue = value === null || value === undefined ? '' : value;
|
|
417
417
|
const inputProps = Object.assign(Object.assign({}, rest), {
|
|
@@ -36,12 +36,12 @@ export default class inputGroup extends BaseComponent {
|
|
|
36
36
|
rest = __rest(_a, ["size", "className", "label", "labelPosition"]);
|
|
37
37
|
|
|
38
38
|
const groupWrapperCls = cls({
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
39
|
+
["".concat(prefixCls, "-group-wrapper")]: true,
|
|
40
|
+
["".concat(prefixCls, "-group-wrapper-with-top-label")]: labelPosition === 'top',
|
|
41
|
+
["".concat(prefixCls, "-group-wrapper-with-left-label")]: labelPosition === 'left'
|
|
42
42
|
});
|
|
43
|
-
const groupCls = cls(
|
|
44
|
-
[
|
|
43
|
+
const groupCls = cls("".concat(prefixCls, "-group"), className, {
|
|
44
|
+
["".concat(prefixCls, "-").concat(size)]: size !== 'default'
|
|
45
45
|
}); // const labelCls = cls(label.className, '');
|
|
46
46
|
|
|
47
47
|
const defaultName = 'input-group';
|
|
@@ -74,8 +74,8 @@ export default class inputGroup extends BaseComponent {
|
|
|
74
74
|
} = _a,
|
|
75
75
|
rest = __rest(_a, ["size", "style", "className", "children", "label", "onBlur", "onFocus", "disabled"]);
|
|
76
76
|
|
|
77
|
-
const groupCls = cls(
|
|
78
|
-
[
|
|
77
|
+
const groupCls = cls("".concat(prefixCls, "-group"), {
|
|
78
|
+
["".concat(prefixCls, "-").concat(size)]: size !== 'default'
|
|
79
79
|
}, className);
|
|
80
80
|
let inner;
|
|
81
81
|
|