@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/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
|
+
type?: string;
|
|
23
|
+
direction?: string;
|
|
22
24
|
}
|
|
23
25
|
export declare enum stepSizeMapIconSize {
|
|
24
26
|
small = "large",
|
|
@@ -26,7 +26,9 @@ const BasicStep = props => {
|
|
|
26
26
|
stepNumber,
|
|
27
27
|
onClick,
|
|
28
28
|
onChange,
|
|
29
|
-
onKeyDown
|
|
29
|
+
onKeyDown,
|
|
30
|
+
type: typeInProps,
|
|
31
|
+
direction: directionInProps
|
|
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")]: typeInProps,
|
|
94
|
+
["".concat(prefixCls, "-").concat(directionInProps)]: directionInProps,
|
|
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
|
|
|
@@ -26,12 +26,12 @@ const Steps = props => {
|
|
|
26
26
|
|
|
27
27
|
const stepNumber = initial + index;
|
|
28
28
|
const childProps = Object.assign({
|
|
29
|
-
stepNumber:
|
|
29
|
+
stepNumber: "".concat(stepNumber + 1),
|
|
30
30
|
size
|
|
31
31
|
}, child.props);
|
|
32
32
|
|
|
33
33
|
if (status === 'error' && index === current - 1) {
|
|
34
|
-
childProps.className =
|
|
34
|
+
childProps.className = "".concat(prefixCls, "-next-error");
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
if (!child.props.status) {
|
|
@@ -58,10 +58,10 @@ const Steps = props => {
|
|
|
58
58
|
return content;
|
|
59
59
|
}, [children, initial, prefixCls, direction, status, current, size, onChange]);
|
|
60
60
|
const wrapperCls = cls(className, {
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
61
|
+
["".concat(prefixCls, "-basic")]: true,
|
|
62
|
+
["".concat(prefixCls, "-").concat(direction)]: true,
|
|
63
|
+
["".concat(prefixCls, "-").concat(size)]: size !== 'default',
|
|
64
|
+
["".concat(prefixCls, "-hasline")]: hasLine
|
|
65
65
|
});
|
|
66
66
|
return /*#__PURE__*/React.createElement("div", {
|
|
67
67
|
"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
|
+
type?: string;
|
|
18
19
|
}
|
|
19
20
|
declare const FillStep: {
|
|
20
21
|
(props: FillStepProps): JSX.Element;
|
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.type === 'fill'
|
|
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
|
};
|
|
@@ -19,7 +19,7 @@ const Steps = props => {
|
|
|
19
19
|
const inner = useMemo(() => {
|
|
20
20
|
const filteredChildren = Children.toArray(children).filter(c => /*#__PURE__*/isValidElement(c));
|
|
21
21
|
const colStyle = direction === 'vertical' ? null : {
|
|
22
|
-
width:
|
|
22
|
+
width: "".concat(100 / filteredChildren.length, "%")
|
|
23
23
|
};
|
|
24
24
|
const content = Children.map(filteredChildren, (child, index) => {
|
|
25
25
|
if (!child) {
|
|
@@ -28,12 +28,11 @@ const Steps = props => {
|
|
|
28
28
|
|
|
29
29
|
const stepNumber = initial + index;
|
|
30
30
|
const childProps = Object.assign({
|
|
31
|
-
stepNumber:
|
|
32
|
-
direction
|
|
31
|
+
stepNumber: "".concat(stepNumber + 1)
|
|
33
32
|
}, child.props);
|
|
34
33
|
|
|
35
34
|
if (status === 'error' && index === current - 1) {
|
|
36
|
-
childProps.className =
|
|
35
|
+
childProps.className = "".concat(prefixCls, "-next-error");
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
if (!child.props.status) {
|
|
@@ -60,7 +59,7 @@ const Steps = props => {
|
|
|
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,10 @@ 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
|
+
};
|
|
26
29
|
static propTypes: {
|
|
27
30
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
31
|
type: PropTypes.Requireable<string>;
|
|
@@ -13,6 +13,9 @@ export interface NavStepProps {
|
|
|
13
13
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
14
14
|
"role"?: React.AriaRole;
|
|
15
15
|
"aria-label"?: React.AriaAttributes["aria-label"];
|
|
16
|
+
type?: string;
|
|
17
|
+
lastOne?: boolean;
|
|
18
|
+
size?: string;
|
|
16
19
|
}
|
|
17
20
|
declare const NavStep: {
|
|
18
21
|
(props: NavStepProps): JSX.Element;
|
package/lib/es/steps/navStep.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import _isNumber from "lodash/isNumber";
|
|
1
2
|
import _isFunction from "lodash/isFunction";
|
|
2
|
-
import React from 'react';
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import classnames from 'classnames';
|
|
5
6
|
import { stepsClasses as css } from '@douyinfe/semi-foundation/lib/es/steps/constants';
|
|
@@ -16,10 +17,15 @@ const NavStep = props => {
|
|
|
16
17
|
total,
|
|
17
18
|
onClick,
|
|
18
19
|
onKeyDown,
|
|
19
|
-
onChange
|
|
20
|
+
onChange,
|
|
21
|
+
lastOne,
|
|
22
|
+
type,
|
|
23
|
+
size
|
|
20
24
|
} = props;
|
|
21
25
|
const classString = classnames(prefixCls, {
|
|
22
|
-
[
|
|
26
|
+
["".concat(prefixCls, "-active")]: active,
|
|
27
|
+
["".concat(prefixCls, "-nav")]: type,
|
|
28
|
+
["".concat(prefixCls, "-small")]: size === 'small'
|
|
23
29
|
}, className);
|
|
24
30
|
|
|
25
31
|
const handleClick = e => {
|
|
@@ -40,6 +46,13 @@ const NavStep = props => {
|
|
|
40
46
|
}
|
|
41
47
|
};
|
|
42
48
|
|
|
49
|
+
const notLastOne = useMemo(() => {
|
|
50
|
+
if (_isNumber(index) && _isNumber(total)) {
|
|
51
|
+
return index !== total - 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return !Boolean(lastOne);
|
|
55
|
+
}, [index, total, lastOne]);
|
|
43
56
|
return /*#__PURE__*/React.createElement("div", {
|
|
44
57
|
role: props["role"],
|
|
45
58
|
"aria-label": props["aria-label"],
|
|
@@ -50,13 +63,13 @@ const NavStep = props => {
|
|
|
50
63
|
onClick: e => handleClick(e),
|
|
51
64
|
onKeyDown: handleKeyDown
|
|
52
65
|
}, /*#__PURE__*/React.createElement("div", {
|
|
53
|
-
className:
|
|
66
|
+
className: "".concat(prefixCls, "-container")
|
|
54
67
|
}, /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
className:
|
|
68
|
+
className: "".concat(prefixCls, "-content")
|
|
56
69
|
}, /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className:
|
|
58
|
-
}, title)),
|
|
59
|
-
className:
|
|
70
|
+
className: "".concat(prefixCls, "-title")
|
|
71
|
+
}, title)), notLastOne && /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: "".concat(prefixCls, "-icon")
|
|
60
73
|
}, /*#__PURE__*/React.createElement(IconChevronRight, {
|
|
61
74
|
size: "small"
|
|
62
75
|
}))));
|
package/lib/es/steps/navSteps.js
CHANGED
|
@@ -39,8 +39,8 @@ const Steps = props => {
|
|
|
39
39
|
return content;
|
|
40
40
|
}, [children, prefixCls, current, size, initial, onChange]);
|
|
41
41
|
const wrapperCls = cls(className, {
|
|
42
|
-
[
|
|
43
|
-
[
|
|
42
|
+
["".concat(prefixCls, "-nav")]: true,
|
|
43
|
+
["".concat(prefixCls, "-").concat(size)]: size !== 'default'
|
|
44
44
|
});
|
|
45
45
|
return /*#__PURE__*/React.createElement("div", {
|
|
46
46
|
"aria-label": props["aria-label"],
|
package/lib/es/steps/step.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export interface StepProps {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
10
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
11
|
+
type?: string;
|
|
11
12
|
}
|
|
12
|
-
declare const Step:
|
|
13
|
+
declare const Step: {
|
|
14
|
+
(props: StepProps): JSX.Element;
|
|
15
|
+
elementType: string;
|
|
16
|
+
};
|
|
13
17
|
export default Step;
|
package/lib/es/steps/step.js
CHANGED
|
@@ -5,9 +5,8 @@ import NavStep from './navStep';
|
|
|
5
5
|
import Context from './context';
|
|
6
6
|
|
|
7
7
|
const Step = props => {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
} = useContext(Context);
|
|
8
|
+
const stepContext = useContext(Context);
|
|
9
|
+
const type = stepContext ? stepContext.type : props.type;
|
|
11
10
|
|
|
12
11
|
const renderStep = () => {
|
|
13
12
|
switch (type) {
|
|
@@ -28,4 +27,5 @@ const Step = props => {
|
|
|
28
27
|
return renderStep();
|
|
29
28
|
};
|
|
30
29
|
|
|
30
|
+
Step.elementType = 'Steps.Step';
|
|
31
31
|
export default Step;
|
|
@@ -217,7 +217,7 @@ export default class TableRow extends BaseComponent {
|
|
|
217
217
|
hideExpandedColumn: hideExpandedColumn,
|
|
218
218
|
indentSize: indentSize,
|
|
219
219
|
isSection: isSection,
|
|
220
|
-
prefixCls:
|
|
220
|
+
prefixCls: "".concat(prefixCls),
|
|
221
221
|
column: column,
|
|
222
222
|
key: columnIndex,
|
|
223
223
|
index: index,
|
|
@@ -269,10 +269,10 @@ export default class TableRow extends BaseComponent {
|
|
|
269
269
|
|
|
270
270
|
this.adapter.setCache('customRowProps', Object.assign({}, rowProps));
|
|
271
271
|
const baseRowStyle = Object.assign(Object.assign({}, style), customStyle);
|
|
272
|
-
const rowCls = typeof replaceClassName === 'string' && replaceClassName.length ? replaceClassName : classnames(className,
|
|
273
|
-
[
|
|
274
|
-
[
|
|
275
|
-
[
|
|
272
|
+
const rowCls = typeof replaceClassName === 'string' && replaceClassName.length ? replaceClassName : classnames(className, "".concat(prefixCls, "-row"), {
|
|
273
|
+
["".concat(prefixCls, "-row-selected")]: selected,
|
|
274
|
+
["".concat(prefixCls, "-row-expanded")]: expanded,
|
|
275
|
+
["".concat(prefixCls, "-row-hovered")]: hovered
|
|
276
276
|
}, customClassName);
|
|
277
277
|
const ariaProps = {};
|
|
278
278
|
|
|
@@ -89,14 +89,14 @@ export default class TableExpandedRow extends PureComponent {
|
|
|
89
89
|
render: () => ({
|
|
90
90
|
props,
|
|
91
91
|
children: /*#__PURE__*/React.createElement("div", {
|
|
92
|
-
className: classnames(
|
|
92
|
+
className: classnames("".concat(prefixCls, "-expand-inner")),
|
|
93
93
|
style: {
|
|
94
94
|
width: anyColumnFixed ? amendTableWidth(tableWidth) : undefined
|
|
95
95
|
}
|
|
96
96
|
}, children)
|
|
97
97
|
})
|
|
98
98
|
}, column)];
|
|
99
|
-
const rowCls = classnames(className,
|
|
99
|
+
const rowCls = classnames(className, "".concat(prefixCls, "-row-expand"));
|
|
100
100
|
const baseRowCellWidths = getCellWidths(columns);
|
|
101
101
|
return /*#__PURE__*/React.createElement(TableRow, {
|
|
102
102
|
style: style,
|
|
@@ -104,7 +104,7 @@ export default class TableExpandedRow extends PureComponent {
|
|
|
104
104
|
className: rowCls,
|
|
105
105
|
expandedRow: true,
|
|
106
106
|
renderExpandIcon: renderExpandIcon,
|
|
107
|
-
rowKey:
|
|
107
|
+
rowKey: "".concat(record.key, "-expanded-row"),
|
|
108
108
|
columns: columns,
|
|
109
109
|
store: store,
|
|
110
110
|
virtualized: virtualized,
|
|
@@ -145,7 +145,7 @@ class SectionRow extends PureComponent {
|
|
|
145
145
|
children
|
|
146
146
|
})
|
|
147
147
|
}, column)];
|
|
148
|
-
const rowCls = classnames(className,
|
|
148
|
+
const rowCls = classnames(className, "".concat(prefixCls, "-row-section"), {
|
|
149
149
|
on: expanded
|
|
150
150
|
});
|
|
151
151
|
const {
|