@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
|
@@ -164,11 +164,11 @@ export default class SideSheet extends BaseComponent {
|
|
|
164
164
|
const sheetWidth = isVertical ? width ? width : defaultWidthList[size] : '100%';
|
|
165
165
|
const sheetHeight = isHorizontal ? height ? height : defaultHeight : '100%';
|
|
166
166
|
const classList = cls(prefixCls, className, {
|
|
167
|
-
[
|
|
168
|
-
[
|
|
169
|
-
[
|
|
170
|
-
[
|
|
171
|
-
[
|
|
167
|
+
["".concat(prefixCls, "-").concat(placement)]: placement,
|
|
168
|
+
["".concat(prefixCls, "-popup")]: getPopupContainer,
|
|
169
|
+
["".concat(prefixCls, "-horizontal")]: isHorizontal,
|
|
170
|
+
["".concat(prefixCls, "-rtl")]: direction === 'rtl',
|
|
171
|
+
["".concat(prefixCls, "-hidden")]: keepDOM && this.state.displayNone
|
|
172
172
|
});
|
|
173
173
|
const contentProps = Object.assign(Object.assign({}, props), {
|
|
174
174
|
visible,
|
|
@@ -185,7 +185,7 @@ export default class SideSheet extends BaseComponent {
|
|
|
185
185
|
return /*#__PURE__*/React.createElement(CSSAnimation, {
|
|
186
186
|
motion: this.props.motion,
|
|
187
187
|
animationState: visible ? 'enter' : 'leave',
|
|
188
|
-
startClassName: visible ?
|
|
188
|
+
startClassName: visible ? "".concat(prefixCls, "-animation-mask_show") : "".concat(prefixCls, "-animation-mask_hide"),
|
|
189
189
|
onAnimationEnd: this.updateState
|
|
190
190
|
}, _ref => {
|
|
191
191
|
let {
|
|
@@ -195,7 +195,7 @@ export default class SideSheet extends BaseComponent {
|
|
|
195
195
|
return /*#__PURE__*/React.createElement(CSSAnimation, {
|
|
196
196
|
motion: this.props.motion,
|
|
197
197
|
animationState: visible ? 'enter' : 'leave',
|
|
198
|
-
startClassName: visible ?
|
|
198
|
+
startClassName: visible ? "".concat(prefixCls, "-animation-content_show_").concat(this.props.placement) : "".concat(prefixCls, "-animation-content_hide_").concat(this.props.placement),
|
|
199
199
|
onAnimationEnd: this.updateState
|
|
200
200
|
/* for no mask case*/
|
|
201
201
|
|
package/lib/es/skeleton/index.js
CHANGED
|
@@ -31,7 +31,7 @@ class Skeleton extends PureComponent {
|
|
|
31
31
|
others = __rest(_a, ["placeholder", "active", "children", "className", "loading", "style"]);
|
|
32
32
|
|
|
33
33
|
const skCls = cls(prefixCls, {
|
|
34
|
-
[
|
|
34
|
+
["".concat(prefixCls, "-active")]: Boolean(active)
|
|
35
35
|
}, className);
|
|
36
36
|
let content;
|
|
37
37
|
|
package/lib/es/skeleton/item.js
CHANGED
|
@@ -34,10 +34,10 @@ class Generic extends PureComponent {
|
|
|
34
34
|
} = _a,
|
|
35
35
|
others = __rest(_a, ["prefixCls", "className", "type", "size", "shape"]);
|
|
36
36
|
|
|
37
|
-
const classString = cls(className,
|
|
38
|
-
[
|
|
37
|
+
const classString = cls(className, "".concat(prefixCls, "-").concat(type), {
|
|
38
|
+
["".concat(prefixCls, "-").concat(type, "-").concat(size)]: type.toUpperCase() === 'AVATAR'
|
|
39
39
|
}, {
|
|
40
|
-
[
|
|
40
|
+
["".concat(prefixCls, "-").concat(type, "-").concat(shape)]: type.toUpperCase() === 'AVATAR'
|
|
41
41
|
});
|
|
42
42
|
return /*#__PURE__*/React.createElement('div', Object.assign({
|
|
43
43
|
className: classString
|
|
@@ -71,7 +71,7 @@ export class Paragraph extends PureComponent {
|
|
|
71
71
|
style,
|
|
72
72
|
rows
|
|
73
73
|
} = this.props;
|
|
74
|
-
const classString = cls(className,
|
|
74
|
+
const classString = cls(className, "".concat(prefixCls, "-paragraph"));
|
|
75
75
|
return /*#__PURE__*/React.createElement("ul", {
|
|
76
76
|
className: classString,
|
|
77
77
|
style: style
|
package/lib/es/slider/index.js
CHANGED
|
@@ -55,10 +55,10 @@ export default class Slider extends BaseComponent {
|
|
|
55
55
|
tipChildren
|
|
56
56
|
} = this.foundation.computeHandleVisibleVal(tooltipVisible && isInRenderTree, tipFormatter, range);
|
|
57
57
|
const minClass = cls(cssClasses.HANDLE, {
|
|
58
|
-
[
|
|
58
|
+
["".concat(cssClasses.HANDLE, "-clicked")]: chooseMovePos === 'min' && isDrag
|
|
59
59
|
});
|
|
60
60
|
const maxClass = cls(cssClasses.HANDLE, {
|
|
61
|
-
[
|
|
61
|
+
["".concat(cssClasses.HANDLE, "-clicked")]: chooseMovePos === 'max' && isDrag
|
|
62
62
|
});
|
|
63
63
|
const {
|
|
64
64
|
min,
|
|
@@ -79,13 +79,13 @@ export default class Slider extends BaseComponent {
|
|
|
79
79
|
trigger: "custom",
|
|
80
80
|
rePosKey: minPercent,
|
|
81
81
|
visible: isInRenderTree && (tipVisible.min || firstDotFocusVisible),
|
|
82
|
-
className:
|
|
82
|
+
className: "".concat(cssClasses.HANDLE, "-tooltip")
|
|
83
83
|
}, /*#__PURE__*/React.createElement("span", Object.assign({
|
|
84
84
|
onMouseOver: this.foundation.checkAndUpdateIsInRenderTreeState,
|
|
85
85
|
ref: this.minHanleEl,
|
|
86
86
|
className: minClass,
|
|
87
87
|
style: {
|
|
88
|
-
[stylePos]:
|
|
88
|
+
[stylePos]: "".concat(minPercent * 100, "%"),
|
|
89
89
|
zIndex: chooseMovePos === 'min' && isDrag ? 2 : 1
|
|
90
90
|
},
|
|
91
91
|
onMouseDown: e => {
|
|
@@ -131,12 +131,12 @@ export default class Slider extends BaseComponent {
|
|
|
131
131
|
trigger: "custom",
|
|
132
132
|
rePosKey: minPercent,
|
|
133
133
|
visible: isInRenderTree && (tipVisible.min || firstDotFocusVisible),
|
|
134
|
-
className:
|
|
134
|
+
className: "".concat(cssClasses.HANDLE, "-tooltip")
|
|
135
135
|
}, /*#__PURE__*/React.createElement("span", Object.assign({
|
|
136
136
|
ref: this.minHanleEl,
|
|
137
137
|
className: minClass,
|
|
138
138
|
style: {
|
|
139
|
-
[stylePos]:
|
|
139
|
+
[stylePos]: "".concat(minPercent * 100, "%"),
|
|
140
140
|
zIndex: chooseMovePos === 'min' ? 2 : 1
|
|
141
141
|
},
|
|
142
142
|
onMouseDown: e => {
|
|
@@ -182,12 +182,12 @@ export default class Slider extends BaseComponent {
|
|
|
182
182
|
trigger: "custom",
|
|
183
183
|
rePosKey: maxPercent,
|
|
184
184
|
visible: isInRenderTree && (tipVisible.max || secondDotFocusVisible),
|
|
185
|
-
className:
|
|
185
|
+
className: "".concat(cssClasses.HANDLE, "-tooltip")
|
|
186
186
|
}, /*#__PURE__*/React.createElement("span", Object.assign({
|
|
187
187
|
ref: this.maxHanleEl,
|
|
188
188
|
className: maxClass,
|
|
189
189
|
style: {
|
|
190
|
-
[stylePos]:
|
|
190
|
+
[stylePos]: "".concat(maxPercent * 100, "%"),
|
|
191
191
|
zIndex: chooseMovePos === 'max' ? 2 : 1
|
|
192
192
|
},
|
|
193
193
|
onMouseDown: e => {
|
|
@@ -241,11 +241,11 @@ export default class Slider extends BaseComponent {
|
|
|
241
241
|
const minPercent = percentInfo.min;
|
|
242
242
|
const maxPercent = percentInfo.max;
|
|
243
243
|
let trackStyle = !vertical ? {
|
|
244
|
-
width: range ?
|
|
245
|
-
left: range ?
|
|
244
|
+
width: range ? "".concat((maxPercent - minPercent) * 100, "%") : "".concat(minPercent * 100, "%"),
|
|
245
|
+
left: range ? "".concat(minPercent * 100, "%") : 0
|
|
246
246
|
} : {
|
|
247
|
-
height: range ?
|
|
248
|
-
top: range ?
|
|
247
|
+
height: range ? "".concat((maxPercent - minPercent) * 100, "%") : "".concat(minPercent * 100, "%"),
|
|
248
|
+
top: range ? "".concat(minPercent * 100, "%") : 0
|
|
249
249
|
};
|
|
250
250
|
trackStyle = included ? trackStyle : {};
|
|
251
251
|
return (
|
|
@@ -271,8 +271,8 @@ export default class Slider extends BaseComponent {
|
|
|
271
271
|
className: cssClasses.DOTS
|
|
272
272
|
}, Object.keys(marks).map(mark => {
|
|
273
273
|
const activeResult = this.foundation.isMarkActive(Number(mark));
|
|
274
|
-
const markClass = cls(
|
|
275
|
-
[
|
|
274
|
+
const markClass = cls("".concat(prefixCls, "-dot"), {
|
|
275
|
+
["".concat(prefixCls, "-dot-active")]: this.foundation.isMarkActive(Number(mark)) === 'active'
|
|
276
276
|
});
|
|
277
277
|
const markPercent = (Number(mark) - min) / (max - min);
|
|
278
278
|
return activeResult ?
|
|
@@ -283,7 +283,7 @@ export default class Slider extends BaseComponent {
|
|
|
283
283
|
onClick: this.foundation.handleWrapClick,
|
|
284
284
|
className: markClass,
|
|
285
285
|
style: {
|
|
286
|
-
[stylePos]:
|
|
286
|
+
[stylePos]: "calc(".concat(markPercent * 100, "% - 2px)")
|
|
287
287
|
}
|
|
288
288
|
}) : null;
|
|
289
289
|
})) : null;
|
|
@@ -309,9 +309,9 @@ export default class Slider extends BaseComponent {
|
|
|
309
309
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
310
310
|
React.createElement("span", {
|
|
311
311
|
key: mark,
|
|
312
|
-
className: cls(
|
|
312
|
+
className: cls("".concat(prefixCls, "-mark").concat(vertical && verticalReverse ? '-reverse' : '')),
|
|
313
313
|
style: {
|
|
314
|
-
[stylePos]:
|
|
314
|
+
[stylePos]: "".concat(markPercent * 100, "%")
|
|
315
315
|
},
|
|
316
316
|
onClick: this.foundation.handleWrapClick
|
|
317
317
|
}, marks[mark]) : null;
|
|
@@ -588,19 +588,19 @@ export default class Slider extends BaseComponent {
|
|
|
588
588
|
range,
|
|
589
589
|
className
|
|
590
590
|
} = this.props;
|
|
591
|
-
const wrapperClass = cls(
|
|
592
|
-
[
|
|
593
|
-
[
|
|
594
|
-
[
|
|
591
|
+
const wrapperClass = cls("".concat(prefixCls, "-wrapper"), {
|
|
592
|
+
["".concat(prefixCls, "-disabled")]: disabled,
|
|
593
|
+
["".concat(cssClasses.VERTICAL, "-wrapper")]: vertical,
|
|
594
|
+
["".concat(prefixCls, "-reverse")]: vertical && verticalReverse
|
|
595
595
|
}, className);
|
|
596
|
-
const boundaryClass = cls(
|
|
597
|
-
[
|
|
596
|
+
const boundaryClass = cls("".concat(prefixCls, "-boundary"), {
|
|
597
|
+
["".concat(prefixCls, "-boundary-show")]: this.props.showBoundary && this.state.showBoundary
|
|
598
598
|
});
|
|
599
599
|
const sliderCls = cls({
|
|
600
|
-
[
|
|
600
|
+
["".concat(prefixCls)]: !vertical,
|
|
601
601
|
[cssClasses.VERTICAL]: vertical
|
|
602
602
|
});
|
|
603
|
-
const ariaLabel = range ?
|
|
603
|
+
const ariaLabel = range ? "Range: ".concat(this._getAriaValueText(currentValue[0], 0), " to ").concat(this._getAriaValueText(currentValue[1], 1)) : undefined;
|
|
604
604
|
const slider = /*#__PURE__*/React.createElement("div", {
|
|
605
605
|
className: wrapperClass,
|
|
606
606
|
style: style,
|
|
@@ -609,15 +609,15 @@ export default class Slider extends BaseComponent {
|
|
|
609
609
|
onMouseEnter: () => this.foundation.handleWrapperEnter(),
|
|
610
610
|
onMouseLeave: () => this.foundation.handleWrapperLeave()
|
|
611
611
|
}, /*#__PURE__*/React.createElement("div", {
|
|
612
|
-
className:
|
|
612
|
+
className: "".concat(prefixCls, "-rail"),
|
|
613
613
|
onClick: this.foundation.handleWrapClick,
|
|
614
614
|
style: railStyle
|
|
615
615
|
}), this.renderTrack(), this.renderStepDot(), /*#__PURE__*/React.createElement("div", null, this.renderHandle()), this.renderLabel(), /*#__PURE__*/React.createElement("div", {
|
|
616
616
|
className: boundaryClass
|
|
617
617
|
}, /*#__PURE__*/React.createElement("span", {
|
|
618
|
-
className:
|
|
618
|
+
className: "".concat(prefixCls, "-boundary-min")
|
|
619
619
|
}, min), /*#__PURE__*/React.createElement("span", {
|
|
620
|
-
className:
|
|
620
|
+
className: "".concat(prefixCls, "-boundary-max")
|
|
621
621
|
}, max)));
|
|
622
622
|
|
|
623
623
|
if (!vertical) {
|
package/lib/es/space/index.js
CHANGED
|
@@ -35,27 +35,27 @@ class Space extends PureComponent {
|
|
|
35
35
|
if (_isString(spacing[0])) {
|
|
36
36
|
spacingHorizontalType = spacing[0];
|
|
37
37
|
} else if (_isNumber(spacing[0])) {
|
|
38
|
-
realStyle.columnGap =
|
|
38
|
+
realStyle.columnGap = "".concat(spacing[0], "px");
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
if (_isString(spacing[1])) {
|
|
42
42
|
spacingVerticalType = spacing[1];
|
|
43
43
|
} else if (_isNumber(spacing[1])) {
|
|
44
|
-
realStyle.rowGap =
|
|
44
|
+
realStyle.rowGap = "".concat(spacing[1], "px");
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const classNames = cls(prefixCls, className, {
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
49
|
+
["".concat(prefixCls, "-align-").concat(align)]: align,
|
|
50
|
+
["".concat(prefixCls, "-vertical")]: vertical,
|
|
51
|
+
["".concat(prefixCls, "-horizontal")]: !vertical,
|
|
52
|
+
["".concat(prefixCls, "-wrap")]: isWrap,
|
|
53
|
+
["".concat(prefixCls, "-tight-horizontal")]: spacingHorizontalType === strings.SPACING_TIGHT,
|
|
54
|
+
["".concat(prefixCls, "-tight-vertical")]: spacingVerticalType === strings.SPACING_TIGHT,
|
|
55
|
+
["".concat(prefixCls, "-medium-horizontal")]: spacingHorizontalType === strings.SPACING_MEDIUM,
|
|
56
|
+
["".concat(prefixCls, "-medium-vertical")]: spacingVerticalType === strings.SPACING_MEDIUM,
|
|
57
|
+
["".concat(prefixCls, "-loose-horizontal")]: spacingHorizontalType === strings.SPACING_LOOSE,
|
|
58
|
+
["".concat(prefixCls, "-loose-vertical")]: spacingVerticalType === strings.SPACING_LOOSE
|
|
59
59
|
});
|
|
60
60
|
const childrenNodes = flatten(children);
|
|
61
61
|
return /*#__PURE__*/React.createElement("div", {
|
package/lib/es/spin/icon.js
CHANGED
|
@@ -32,7 +32,7 @@ function Icon() {
|
|
|
32
32
|
_propsId = _id;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
const id =
|
|
35
|
+
const id = "linearGradient-".concat(_propsId);
|
|
36
36
|
return /*#__PURE__*/React.createElement("svg", Object.assign({}, rest, {
|
|
37
37
|
className: className,
|
|
38
38
|
width: "48",
|
|
@@ -73,7 +73,7 @@ function Icon() {
|
|
|
73
73
|
height: "36"
|
|
74
74
|
}), /*#__PURE__*/React.createElement("path", {
|
|
75
75
|
d: "M34,18 C34,9.163444 26.836556,2 18,2 C11.6597233,2 6.18078805,5.68784135 3.59122325,11.0354951",
|
|
76
|
-
stroke:
|
|
76
|
+
stroke: "url(#".concat(id, ")"),
|
|
77
77
|
strokeWidth: "4",
|
|
78
78
|
strokeLinecap: "round"
|
|
79
79
|
})));
|
package/lib/es/spin/index.js
CHANGED
|
@@ -60,9 +60,9 @@ class Spin extends BaseComponent {
|
|
|
60
60
|
loading
|
|
61
61
|
} = this.state;
|
|
62
62
|
return loading ? /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className:
|
|
63
|
+
className: "".concat(prefixCls, "-wrapper")
|
|
64
64
|
}, indicator ? /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className:
|
|
65
|
+
className: "".concat(prefixCls, "-animate"),
|
|
66
66
|
"x-semi-prop": "indicator"
|
|
67
67
|
}, indicator) : /*#__PURE__*/React.createElement(SpinIcon, null), tip ? /*#__PURE__*/React.createElement("div", {
|
|
68
68
|
"x-semi-prop": "tip"
|
|
@@ -82,15 +82,15 @@ class Spin extends BaseComponent {
|
|
|
82
82
|
loading
|
|
83
83
|
} = this.state;
|
|
84
84
|
const spinCls = cls(prefixCls, wrapperClassName, {
|
|
85
|
-
[
|
|
86
|
-
[
|
|
87
|
-
[
|
|
85
|
+
["".concat(prefixCls, "-").concat(size)]: size,
|
|
86
|
+
["".concat(prefixCls, "-block")]: children,
|
|
87
|
+
["".concat(prefixCls, "-hidden")]: !loading
|
|
88
88
|
});
|
|
89
89
|
return /*#__PURE__*/React.createElement("div", {
|
|
90
90
|
className: spinCls,
|
|
91
91
|
style: style
|
|
92
92
|
}, this.renderSpin(), /*#__PURE__*/React.createElement("div", {
|
|
93
|
-
className:
|
|
93
|
+
className: "".concat(prefixCls, "-children"),
|
|
94
94
|
style: childStyle,
|
|
95
95
|
"x-semi-prop": "children"
|
|
96
96
|
}, children));
|
|
@@ -19,6 +19,8 @@ export interface BasicStepProps {
|
|
|
19
19
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
20
20
|
"role"?: React.AriaRole;
|
|
21
21
|
"aria-label"?: React.AriaAttributes["aria-label"];
|
|
22
|
+
usedInC2D?: string;
|
|
23
|
+
direction?: string;
|
|
22
24
|
}
|
|
23
25
|
export declare enum stepSizeMapIconSize {
|
|
24
26
|
small = "large",
|
|
@@ -45,5 +47,6 @@ declare const BasicStep: {
|
|
|
45
47
|
status: string;
|
|
46
48
|
className: string;
|
|
47
49
|
};
|
|
50
|
+
elementType: string;
|
|
48
51
|
};
|
|
49
52
|
export default BasicStep;
|
|
@@ -26,7 +26,9 @@ const BasicStep = props => {
|
|
|
26
26
|
stepNumber,
|
|
27
27
|
onClick,
|
|
28
28
|
onChange,
|
|
29
|
-
onKeyDown
|
|
29
|
+
onKeyDown,
|
|
30
|
+
usedInC2D,
|
|
31
|
+
direction: direction
|
|
30
32
|
} = props;
|
|
31
33
|
|
|
32
34
|
const renderIcon = () => {
|
|
@@ -46,13 +48,13 @@ const BasicStep = props => {
|
|
|
46
48
|
|
|
47
49
|
case 'wait':
|
|
48
50
|
inner = /*#__PURE__*/React.createElement("span", {
|
|
49
|
-
className:
|
|
51
|
+
className: "".concat(prefixCls, "-number-icon")
|
|
50
52
|
}, stepNumber);
|
|
51
53
|
break;
|
|
52
54
|
|
|
53
55
|
case 'process':
|
|
54
56
|
inner = /*#__PURE__*/React.createElement("span", {
|
|
55
|
-
className:
|
|
57
|
+
className: "".concat(prefixCls, "-number-icon")
|
|
56
58
|
}, stepNumber);
|
|
57
59
|
progress = true;
|
|
58
60
|
break;
|
|
@@ -76,18 +78,21 @@ const BasicStep = props => {
|
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
const cls = classnames({
|
|
79
|
-
[
|
|
80
|
-
[
|
|
81
|
-
[
|
|
81
|
+
["".concat(prefixCls, "-icon")]: true,
|
|
82
|
+
["".concat(prefixCls, "-custom-icon")]: 'icon' in props,
|
|
83
|
+
["".concat(prefixCls, "-icon-process")]: progress
|
|
82
84
|
});
|
|
83
85
|
return inner ? /*#__PURE__*/React.createElement("span", {
|
|
84
86
|
className: cls
|
|
85
87
|
}, inner) : null;
|
|
86
88
|
};
|
|
87
89
|
|
|
88
|
-
const classString = classnames(prefixCls,
|
|
89
|
-
[
|
|
90
|
-
[
|
|
90
|
+
const classString = classnames(prefixCls, "".concat(prefixCls, "-").concat(status), {
|
|
91
|
+
["".concat(prefixCls, "-active")]: active,
|
|
92
|
+
["".concat(prefixCls, "-done")]: done,
|
|
93
|
+
["".concat(prefixCls, "-basic")]: usedInC2D,
|
|
94
|
+
["".concat(prefixCls, "-").concat(direction)]: direction,
|
|
95
|
+
["".concat(prefixCls, "-small")]: size === 'small'
|
|
91
96
|
}, className);
|
|
92
97
|
|
|
93
98
|
const handleClick = e => {
|
|
@@ -118,17 +123,17 @@ const BasicStep = props => {
|
|
|
118
123
|
onClick: e => handleClick(e),
|
|
119
124
|
onKeyDown: handleKeyDown
|
|
120
125
|
}, /*#__PURE__*/React.createElement("div", {
|
|
121
|
-
className:
|
|
126
|
+
className: "".concat(prefixCls, "-container")
|
|
122
127
|
}, /*#__PURE__*/React.createElement("div", {
|
|
123
|
-
className:
|
|
128
|
+
className: "".concat(prefixCls, "-left")
|
|
124
129
|
}, renderIcon()), /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className:
|
|
130
|
+
className: "".concat(prefixCls, "-content")
|
|
126
131
|
}, /*#__PURE__*/React.createElement("div", {
|
|
127
|
-
className:
|
|
132
|
+
className: "".concat(prefixCls, "-title")
|
|
128
133
|
}, /*#__PURE__*/React.createElement("div", {
|
|
129
|
-
className:
|
|
134
|
+
className: "".concat(prefixCls, "-title-text")
|
|
130
135
|
}, title)), description && /*#__PURE__*/React.createElement("div", {
|
|
131
|
-
className:
|
|
136
|
+
className: "".concat(prefixCls, "-description")
|
|
132
137
|
}, description))));
|
|
133
138
|
};
|
|
134
139
|
|
|
@@ -151,4 +156,5 @@ BasicStep.defaultProps = {
|
|
|
151
156
|
status: 'wait',
|
|
152
157
|
className: ''
|
|
153
158
|
};
|
|
159
|
+
BasicStep.elementType = 'Steps.BasicStep';
|
|
154
160
|
export default BasicStep;
|
|
@@ -25,13 +25,16 @@ const Steps = props => {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const stepNumber = initial + index;
|
|
28
|
-
const childProps = Object.assign({
|
|
29
|
-
stepNumber:
|
|
30
|
-
size
|
|
31
|
-
|
|
28
|
+
const childProps = Object.assign(Object.assign({
|
|
29
|
+
stepNumber: "".concat(stepNumber + 1),
|
|
30
|
+
size,
|
|
31
|
+
direction
|
|
32
|
+
}, child.props), {
|
|
33
|
+
total: filteredChildren.length
|
|
34
|
+
});
|
|
32
35
|
|
|
33
36
|
if (status === 'error' && index === current - 1) {
|
|
34
|
-
childProps.className =
|
|
37
|
+
childProps.className = "".concat(prefixCls, "-next-error");
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
if (!child.props.status) {
|
|
@@ -58,10 +61,10 @@ const Steps = props => {
|
|
|
58
61
|
return content;
|
|
59
62
|
}, [children, initial, prefixCls, direction, status, current, size, onChange]);
|
|
60
63
|
const wrapperCls = cls(className, {
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
64
|
+
["".concat(prefixCls, "-basic")]: true,
|
|
65
|
+
["".concat(prefixCls, "-").concat(direction)]: true,
|
|
66
|
+
["".concat(prefixCls, "-").concat(size)]: size !== 'default',
|
|
67
|
+
["".concat(prefixCls, "-hasline")]: hasLine
|
|
65
68
|
});
|
|
66
69
|
return /*#__PURE__*/React.createElement("div", {
|
|
67
70
|
"aria-label": props["aria-label"],
|
|
@@ -15,6 +15,7 @@ export interface FillStepProps {
|
|
|
15
15
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
16
16
|
"role"?: React.AriaRole;
|
|
17
17
|
"aria-label"?: React.AriaAttributes["aria-label"];
|
|
18
|
+
usedInC2D?: boolean;
|
|
18
19
|
}
|
|
19
20
|
declare const FillStep: {
|
|
20
21
|
(props: FillStepProps): JSX.Element;
|
|
@@ -33,5 +34,6 @@ declare const FillStep: {
|
|
|
33
34
|
status: string;
|
|
34
35
|
className: string;
|
|
35
36
|
};
|
|
37
|
+
elementType: string;
|
|
36
38
|
};
|
|
37
39
|
export default FillStep;
|
package/lib/es/steps/fillStep.js
CHANGED
|
@@ -61,10 +61,10 @@ const FillStep = props => {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
const cls = classnames({
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
64
|
+
["".concat(prefixCls, "-left")]: true,
|
|
65
|
+
["".concat(prefixCls, "-icon")]: 'icon' in props,
|
|
66
|
+
["".concat(prefixCls, "-plain")]: !('icon' in props),
|
|
67
|
+
["".concat(prefixCls, "-icon-process")]: progress
|
|
68
68
|
});
|
|
69
69
|
return inner ? /*#__PURE__*/React.createElement("div", {
|
|
70
70
|
className: cls
|
|
@@ -96,8 +96,9 @@ const FillStep = props => {
|
|
|
96
96
|
tabIndex: 0,
|
|
97
97
|
className: classnames({
|
|
98
98
|
[prefixCls]: true,
|
|
99
|
-
[
|
|
100
|
-
[
|
|
99
|
+
["".concat(prefixCls, "-").concat(status)]: Boolean(status),
|
|
100
|
+
["".concat(prefixCls, "-clickable")]: onClick,
|
|
101
|
+
["".concat(prefixCls, "-fill")]: props.usedInC2D
|
|
101
102
|
}, className),
|
|
102
103
|
style: style,
|
|
103
104
|
onClick: e => {
|
|
@@ -105,14 +106,14 @@ const FillStep = props => {
|
|
|
105
106
|
},
|
|
106
107
|
onKeyDown: handleKeyDown
|
|
107
108
|
}, renderIcon(), /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className:
|
|
109
|
+
className: "".concat(prefixCls, "-content")
|
|
109
110
|
}, /*#__PURE__*/React.createElement("div", {
|
|
110
|
-
className:
|
|
111
|
+
className: "".concat(prefixCls, "-title"),
|
|
111
112
|
title: typeof title === 'string' ? title : null
|
|
112
113
|
}, /*#__PURE__*/React.createElement("span", {
|
|
113
|
-
className:
|
|
114
|
+
className: "".concat(prefixCls, "-title-text")
|
|
114
115
|
}, title)), /*#__PURE__*/React.createElement("div", {
|
|
115
|
-
className:
|
|
116
|
+
className: "".concat(prefixCls, "-description"),
|
|
116
117
|
title: typeof description === 'string' ? description : null
|
|
117
118
|
}, description)));
|
|
118
119
|
};
|
|
@@ -132,4 +133,5 @@ FillStep.defaultProps = {
|
|
|
132
133
|
status: 'wait',
|
|
133
134
|
className: ''
|
|
134
135
|
};
|
|
136
|
+
FillStep.elementType = 'Steps.FillStep';
|
|
135
137
|
export default FillStep;
|
|
@@ -17,23 +17,23 @@ const Steps = props => {
|
|
|
17
17
|
onChange
|
|
18
18
|
} = props;
|
|
19
19
|
const inner = useMemo(() => {
|
|
20
|
-
const filteredChildren = Children.toArray(children).filter(c => /*#__PURE__*/isValidElement(c));
|
|
21
|
-
|
|
22
|
-
width: `${100 / filteredChildren.length}%`
|
|
23
|
-
};
|
|
20
|
+
const filteredChildren = Children.toArray(children).filter(c => /*#__PURE__*/isValidElement(c)); // const colStyle = direction === 'vertical' ? null : { width: `${100 / filteredChildren.length }%` };
|
|
21
|
+
|
|
24
22
|
const content = Children.map(filteredChildren, (child, index) => {
|
|
25
23
|
if (!child) {
|
|
26
24
|
return null;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
const stepNumber = initial + index;
|
|
30
|
-
const childProps = Object.assign({
|
|
31
|
-
stepNumber:
|
|
28
|
+
const childProps = Object.assign(Object.assign({
|
|
29
|
+
stepNumber: "".concat(stepNumber + 1),
|
|
32
30
|
direction
|
|
33
|
-
}, child.props)
|
|
31
|
+
}, child.props), {
|
|
32
|
+
total: filteredChildren.length
|
|
33
|
+
});
|
|
34
34
|
|
|
35
35
|
if (status === 'error' && index === current - 1) {
|
|
36
|
-
childProps.className =
|
|
36
|
+
childProps.className = "".concat(prefixCls, "-next-error");
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
if (!child.props.status) {
|
|
@@ -50,17 +50,16 @@ const Steps = props => {
|
|
|
50
50
|
if (index !== current) {
|
|
51
51
|
onChange(index + initial);
|
|
52
52
|
}
|
|
53
|
-
};
|
|
53
|
+
}; // return <Col style={colStyle}>{cloneElement(child, { ...childProps })}</Col>;
|
|
54
|
+
|
|
54
55
|
|
|
55
|
-
return /*#__PURE__*/React.createElement(Col, {
|
|
56
|
-
style: colStyle
|
|
57
|
-
}, /*#__PURE__*/cloneElement(child, Object.assign({}, childProps)));
|
|
56
|
+
return /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/cloneElement(child, Object.assign({}, childProps)));
|
|
58
57
|
});
|
|
59
58
|
return content;
|
|
60
59
|
}, [children, initial, prefixCls, direction, status, current, onChange]);
|
|
61
60
|
const wrapperCls = cls(className, {
|
|
62
61
|
[prefixCls]: true,
|
|
63
|
-
[
|
|
62
|
+
["".concat(prefixCls, "-").concat(direction)]: true
|
|
64
63
|
});
|
|
65
64
|
return /*#__PURE__*/React.createElement("div", {
|
|
66
65
|
className: wrapperCls,
|
package/lib/es/steps/index.d.ts
CHANGED
|
@@ -22,7 +22,69 @@ export interface NavStepsAllProps extends NavStepsProps {
|
|
|
22
22
|
}
|
|
23
23
|
export declare type StepsProps = FillStepsAllProps | BasicStepsAllProps | NavStepsAllProps;
|
|
24
24
|
declare class Steps extends Component<StepsProps> {
|
|
25
|
-
static Step:
|
|
25
|
+
static Step: {
|
|
26
|
+
(props: import("./step").StepProps): JSX.Element;
|
|
27
|
+
elementType: string;
|
|
28
|
+
};
|
|
29
|
+
static FillStep: {
|
|
30
|
+
(props: import("./fillStep").FillStepProps): JSX.Element;
|
|
31
|
+
propTypes: {
|
|
32
|
+
prefixCls: PropTypes.Requireable<string>;
|
|
33
|
+
description: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
34
|
+
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
35
|
+
status: PropTypes.Requireable<string>;
|
|
36
|
+
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
37
|
+
className: PropTypes.Requireable<string>;
|
|
38
|
+
style: PropTypes.Requireable<object>;
|
|
39
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
+
};
|
|
41
|
+
defaultProps: {
|
|
42
|
+
prefixCls: string;
|
|
43
|
+
status: string;
|
|
44
|
+
className: string;
|
|
45
|
+
};
|
|
46
|
+
elementType: string;
|
|
47
|
+
};
|
|
48
|
+
static BasicStep: {
|
|
49
|
+
(props: import("./basicStep").BasicStepProps): JSX.Element;
|
|
50
|
+
propTypes: {
|
|
51
|
+
prefixCls: PropTypes.Requireable<string>;
|
|
52
|
+
description: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
53
|
+
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
54
|
+
status: PropTypes.Requireable<string>;
|
|
55
|
+
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
56
|
+
className: PropTypes.Requireable<string>;
|
|
57
|
+
style: PropTypes.Requireable<object>;
|
|
58
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
59
|
+
active: PropTypes.Requireable<boolean>;
|
|
60
|
+
done: PropTypes.Requireable<boolean>;
|
|
61
|
+
};
|
|
62
|
+
defaultProps: {
|
|
63
|
+
prefixCls: string;
|
|
64
|
+
active: boolean;
|
|
65
|
+
done: boolean;
|
|
66
|
+
status: string;
|
|
67
|
+
className: string;
|
|
68
|
+
};
|
|
69
|
+
elementType: string;
|
|
70
|
+
};
|
|
71
|
+
static NavStep: {
|
|
72
|
+
(props: import("./navStep").NavStepProps): JSX.Element;
|
|
73
|
+
propTypes: {
|
|
74
|
+
prefixCls: PropTypes.Requireable<string>;
|
|
75
|
+
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
76
|
+
className: PropTypes.Requireable<string>;
|
|
77
|
+
style: PropTypes.Requireable<object>;
|
|
78
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
79
|
+
active: PropTypes.Requireable<boolean>;
|
|
80
|
+
};
|
|
81
|
+
defaultProps: {
|
|
82
|
+
prefixCls: string;
|
|
83
|
+
active: boolean;
|
|
84
|
+
className: string;
|
|
85
|
+
};
|
|
86
|
+
elementType: string;
|
|
87
|
+
};
|
|
26
88
|
static propTypes: {
|
|
27
89
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
90
|
type: PropTypes.Requireable<string>;
|