@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
|
@@ -103,8 +103,8 @@ class Copyable extends _react.default.PureComponent {
|
|
|
103
103
|
copied
|
|
104
104
|
} = this.state;
|
|
105
105
|
const finalCls = (0, _classnames.default)(className, {
|
|
106
|
-
[
|
|
107
|
-
[
|
|
106
|
+
["".concat(prefixCls, "-action-copy")]: !copied,
|
|
107
|
+
["".concat(prefixCls, "-action-copied")]: copied
|
|
108
108
|
});
|
|
109
109
|
return /*#__PURE__*/_react.default.createElement(_localeConsumer.default, {
|
|
110
110
|
componentName: "Typography"
|
|
@@ -117,7 +117,7 @@ class Copyable extends _react.default.PureComponent {
|
|
|
117
117
|
}, copied ? this.renderSuccessTip() : /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
118
118
|
content: typeof copyTip !== 'undefined' ? copyTip : locale.copy
|
|
119
119
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
120
|
-
className:
|
|
120
|
+
className: "".concat(prefixCls, "-action-copy-icon")
|
|
121
121
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconCopy, {
|
|
122
122
|
role: "button",
|
|
123
123
|
tabIndex: 0,
|
|
@@ -28,7 +28,7 @@ export default class Numeral extends PureComponent<NumeralProps> {
|
|
|
28
28
|
static propTypes: {
|
|
29
29
|
rule: PropTypes.Requireable<"text" | "numbers" | "bytes-decimal" | "bytes-binary" | "percentages" | "exponential">;
|
|
30
30
|
precision: PropTypes.Requireable<number>;
|
|
31
|
-
truncate: PropTypes.Requireable<"
|
|
31
|
+
truncate: PropTypes.Requireable<"ceil" | "floor" | "round">;
|
|
32
32
|
parser: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
33
|
copyable: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
34
34
|
delete: PropTypes.Requireable<boolean>;
|
|
@@ -28,7 +28,7 @@ class Paragraph extends _react.PureComponent {
|
|
|
28
28
|
const {
|
|
29
29
|
className
|
|
30
30
|
} = this.props;
|
|
31
|
-
const paragraphCls = (0, _classnames.default)(className,
|
|
31
|
+
const paragraphCls = (0, _classnames.default)(className, "".concat(prefixCls, "-paragraph"));
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement(_base.default, Object.assign({
|
|
33
33
|
component: 'p'
|
|
34
34
|
}, this.props, {
|
|
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
37
37
|
underline: PropTypes.Requireable<boolean>;
|
|
38
38
|
strong: PropTypes.Requireable<boolean>;
|
|
39
39
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
40
|
-
heading: PropTypes.Requireable<1 | 2 | 3 | 4 |
|
|
40
|
+
heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 5 | 6>;
|
|
41
41
|
style: PropTypes.Requireable<object>;
|
|
42
42
|
className: PropTypes.Requireable<string>;
|
|
43
43
|
component: PropTypes.Requireable<string>;
|
|
@@ -38,7 +38,7 @@ class Title extends _react.PureComponent {
|
|
|
38
38
|
} = _a,
|
|
39
39
|
rest = __rest(_a, ["heading"]);
|
|
40
40
|
|
|
41
|
-
const component = _constants.strings.HEADING.indexOf(heading) !== -1 ?
|
|
41
|
+
const component = _constants.strings.HEADING.indexOf(heading) !== -1 ? "h".concat(heading) : 'h1'; // Passing headings to support custom components
|
|
42
42
|
|
|
43
43
|
return /*#__PURE__*/_react.default.createElement(_base.default, Object.assign({
|
|
44
44
|
component: component,
|
|
@@ -33,7 +33,7 @@ function styleToString(style) {
|
|
|
33
33
|
// There are some different behavior between Firefox & Chrome.
|
|
34
34
|
// We have to handle this ourself.
|
|
35
35
|
const styleNames = Array.prototype.slice.apply(style);
|
|
36
|
-
return styleNames.map(name =>
|
|
36
|
+
return styleNames.map(name => "".concat(name, ": ").concat(style.getPropertyValue(name), ";")).join('');
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const getRenderText = function (originEle, rows) {
|
|
@@ -128,13 +128,13 @@ class FileCard extends _react.PureComponent {
|
|
|
128
128
|
case typeof validateMessage === 'string' && status === _constants.strings.FILE_STATUS_VALIDATING:
|
|
129
129
|
content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_index4.default, {
|
|
130
130
|
size: "small",
|
|
131
|
-
wrapperClassName:
|
|
131
|
+
wrapperClassName: "".concat(prefixCls, "-file-card-icon-loading")
|
|
132
132
|
}), validateMessage);
|
|
133
133
|
break;
|
|
134
134
|
|
|
135
135
|
case typeof validateMessage === 'string':
|
|
136
136
|
content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_semiIcons.IconAlertCircle, {
|
|
137
|
-
className:
|
|
137
|
+
className: "".concat(prefixCls, "-file-card-icon-error")
|
|
138
138
|
}), validateMessage);
|
|
139
139
|
break;
|
|
140
140
|
|
|
@@ -160,13 +160,13 @@ class FileCard extends _react.PureComponent {
|
|
|
160
160
|
case validateMessage && status === _constants.strings.FILE_STATUS_VALIDATING:
|
|
161
161
|
icon = /*#__PURE__*/_react.default.createElement(_index4.default, {
|
|
162
162
|
size: "small",
|
|
163
|
-
wrapperClassName:
|
|
163
|
+
wrapperClassName: "".concat(prefixCls, "-picture-file-card-icon-loading")
|
|
164
164
|
});
|
|
165
165
|
break;
|
|
166
166
|
|
|
167
167
|
case validateMessage && (status === _constants.strings.FILE_STATUS_VALID_FAIL || status === _constants.strings.FILE_STATUS_UPLOAD_FAIL):
|
|
168
168
|
icon = /*#__PURE__*/_react.default.createElement("div", {
|
|
169
|
-
className:
|
|
169
|
+
className: "".concat(prefixCls, "-picture-file-card-icon-error")
|
|
170
170
|
}, /*#__PURE__*/_react.default.createElement(ErrorSvg, null));
|
|
171
171
|
break;
|
|
172
172
|
|
|
@@ -201,20 +201,20 @@ class FileCard extends _react.PureComponent {
|
|
|
201
201
|
const showReplace = status === _constants.strings.FILE_STATUS_SUCCESS && this.props.showReplace;
|
|
202
202
|
const showPreview = status === _constants.strings.FILE_STATUS_SUCCESS && !this.props.showReplace;
|
|
203
203
|
const filePicCardCls = (0, _classnames.default)({
|
|
204
|
-
[
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
[
|
|
208
|
-
[
|
|
204
|
+
["".concat(prefixCls, "-picture-file-card")]: true,
|
|
205
|
+
["".concat(prefixCls, "-picture-file-card-disabled")]: disabled,
|
|
206
|
+
["".concat(prefixCls, "-picture-file-card-show-pointer")]: typeof onPreviewClick !== 'undefined',
|
|
207
|
+
["".concat(prefixCls, "-picture-file-card-error")]: status === _constants.strings.FILE_STATUS_UPLOAD_FAIL,
|
|
208
|
+
["".concat(prefixCls, "-picture-file-card-uploading")]: showProgress
|
|
209
209
|
});
|
|
210
210
|
|
|
211
211
|
const retry = /*#__PURE__*/_react.default.createElement("div", {
|
|
212
212
|
role: "button",
|
|
213
213
|
tabIndex: 0,
|
|
214
|
-
className:
|
|
214
|
+
className: "".concat(prefixCls, "-picture-file-card-retry"),
|
|
215
215
|
onClick: e => this.onRetry(e)
|
|
216
216
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconRefresh, {
|
|
217
|
-
className:
|
|
217
|
+
className: "".concat(prefixCls, "-picture-file-card-icon-retry")
|
|
218
218
|
}));
|
|
219
219
|
|
|
220
220
|
const replace = /*#__PURE__*/_react.default.createElement(_index3.default, {
|
|
@@ -226,27 +226,27 @@ class FileCard extends _react.PureComponent {
|
|
|
226
226
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
227
227
|
role: "button",
|
|
228
228
|
tabIndex: 0,
|
|
229
|
-
className:
|
|
229
|
+
className: "".concat(prefixCls, "-picture-file-card-replace"),
|
|
230
230
|
onClick: e => this.onReplace(e)
|
|
231
231
|
}, /*#__PURE__*/_react.default.createElement(ReplaceSvg, {
|
|
232
|
-
className:
|
|
232
|
+
className: "".concat(prefixCls, "-picture-file-card-icon-replace")
|
|
233
233
|
})));
|
|
234
234
|
|
|
235
235
|
const preview = /*#__PURE__*/_react.default.createElement("div", {
|
|
236
|
-
className:
|
|
236
|
+
className: "".concat(prefixCls, "-picture-file-card-preview")
|
|
237
237
|
}, typeof renderPicPreviewIcon === 'function' ? renderPicPreviewIcon(this.props) : null);
|
|
238
238
|
|
|
239
239
|
const close = /*#__PURE__*/_react.default.createElement("div", {
|
|
240
240
|
role: "button",
|
|
241
241
|
tabIndex: 0,
|
|
242
|
-
className:
|
|
242
|
+
className: "".concat(prefixCls, "-picture-file-card-close"),
|
|
243
243
|
onClick: e => this.onRemove(e)
|
|
244
244
|
}, /*#__PURE__*/_react.default.createElement(_semiIcons.IconClear, {
|
|
245
|
-
className:
|
|
245
|
+
className: "".concat(prefixCls, "-picture-file-card-icon-close")
|
|
246
246
|
}));
|
|
247
247
|
|
|
248
248
|
const picInfo = typeof renderPicInfo === 'function' ? renderPicInfo(this.props) : /*#__PURE__*/_react.default.createElement("div", {
|
|
249
|
-
className:
|
|
249
|
+
className: "".concat(prefixCls, "-picture-file-card-pic-info")
|
|
250
250
|
}, index + 1);
|
|
251
251
|
const thumbnail = typeof renderThumbnail === 'function' ? renderThumbnail(this.props) : /*#__PURE__*/_react.default.createElement("img", {
|
|
252
252
|
src: url,
|
|
@@ -282,17 +282,17 @@ class FileCard extends _react.PureComponent {
|
|
|
282
282
|
renderFileOperation
|
|
283
283
|
} = this.props;
|
|
284
284
|
const fileCardCls = (0, _classnames.default)({
|
|
285
|
-
[
|
|
286
|
-
[
|
|
287
|
-
[
|
|
285
|
+
["".concat(prefixCls, "-file-card")]: true,
|
|
286
|
+
["".concat(prefixCls, "-file-card-fail")]: status === _constants.strings.FILE_STATUS_VALID_FAIL || status === _constants.strings.FILE_STATUS_UPLOAD_FAIL,
|
|
287
|
+
["".concat(prefixCls, "-file-card-show-pointer")]: typeof onPreviewClick !== 'undefined'
|
|
288
288
|
});
|
|
289
289
|
const previewCls = (0, _classnames.default)({
|
|
290
|
-
[
|
|
291
|
-
[
|
|
290
|
+
["".concat(prefixCls, "-file-card-preview")]: true,
|
|
291
|
+
["".concat(prefixCls, "-file-card-preview-placeholder")]: !preview || previewFile
|
|
292
292
|
});
|
|
293
|
-
const infoCls =
|
|
294
|
-
const closeCls =
|
|
295
|
-
const replaceCls =
|
|
293
|
+
const infoCls = "".concat(prefixCls, "-file-card-info");
|
|
294
|
+
const closeCls = "".concat(prefixCls, "-file-card-close");
|
|
295
|
+
const replaceCls = "".concat(prefixCls, "-file-card-replace");
|
|
296
296
|
const showProgress = !(percent === 100 || typeof percent === 'undefined') && status === _constants.strings.FILE_STATUS_UPLOADING; // only show retry when upload fail & showRetry is true, no need to show during validate fail
|
|
297
297
|
|
|
298
298
|
const showRetry = status === _constants.strings.FILE_STATUS_UPLOAD_FAIL && propsShowRetry;
|
|
@@ -325,13 +325,13 @@ class FileCard extends _react.PureComponent {
|
|
|
325
325
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
326
326
|
className: previewCls
|
|
327
327
|
}, previewContent), /*#__PURE__*/_react.default.createElement("div", {
|
|
328
|
-
className:
|
|
328
|
+
className: "".concat(infoCls, "-main")
|
|
329
329
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
330
|
-
className:
|
|
330
|
+
className: "".concat(infoCls, "-main-text")
|
|
331
331
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
332
|
-
className:
|
|
332
|
+
className: "".concat(infoCls, "-name")
|
|
333
333
|
}, name), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("span", {
|
|
334
|
-
className:
|
|
334
|
+
className: "".concat(infoCls, "-size")
|
|
335
335
|
}, fileSize), showReplace && /*#__PURE__*/_react.default.createElement(_index3.default, {
|
|
336
336
|
trigger: "hover",
|
|
337
337
|
position: "top",
|
|
@@ -351,13 +351,13 @@ class FileCard extends _react.PureComponent {
|
|
|
351
351
|
},
|
|
352
352
|
"aria-label": "uploading file progress"
|
|
353
353
|
}) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
354
|
-
className:
|
|
354
|
+
className: "".concat(infoCls, "-main-control")
|
|
355
355
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
356
|
-
className:
|
|
356
|
+
className: "".concat(infoCls, "-validate-message")
|
|
357
357
|
}, this.renderValidateMessage()), showRetry ? /*#__PURE__*/_react.default.createElement("span", {
|
|
358
358
|
role: "button",
|
|
359
359
|
tabIndex: 0,
|
|
360
|
-
className:
|
|
360
|
+
className: "".concat(infoCls, "-retry"),
|
|
361
361
|
onClick: e => this.onRetry(e)
|
|
362
362
|
}, locale.retry) : null)), operation);
|
|
363
363
|
}
|
package/lib/cjs/upload/index.js
CHANGED
|
@@ -162,7 +162,7 @@ class Upload extends _baseComponent.default {
|
|
|
162
162
|
onRemove,
|
|
163
163
|
onRetry,
|
|
164
164
|
index,
|
|
165
|
-
key: uid ||
|
|
165
|
+
key: uid || "".concat(name).concat(index),
|
|
166
166
|
style: itemStyle,
|
|
167
167
|
disabled,
|
|
168
168
|
showPicInfo,
|
|
@@ -220,19 +220,19 @@ class Upload extends _baseComponent.default {
|
|
|
220
220
|
} = this.state;
|
|
221
221
|
const fileList = this.props.fileList || stateFileList;
|
|
222
222
|
const showAddTriggerInList = limit ? limit > fileList.length : true;
|
|
223
|
-
const dragAreaBaseCls =
|
|
224
|
-
const uploadAddCls = (0, _classnames.default)(
|
|
225
|
-
[
|
|
226
|
-
[
|
|
223
|
+
const dragAreaBaseCls = "".concat(prefixCls, "-drag-area");
|
|
224
|
+
const uploadAddCls = (0, _classnames.default)("".concat(prefixCls, "-add"), {
|
|
225
|
+
["".concat(prefixCls, "-picture-add")]: true,
|
|
226
|
+
["".concat(prefixCls, "-picture-add-disabled")]: disabled
|
|
227
227
|
});
|
|
228
|
-
const fileListCls = (0, _classnames.default)(
|
|
229
|
-
[
|
|
228
|
+
const fileListCls = (0, _classnames.default)("".concat(prefixCls, "-file-list"), {
|
|
229
|
+
["".concat(prefixCls, "-picture-file-list")]: true
|
|
230
230
|
});
|
|
231
231
|
const dragAreaCls = (0, _classnames.default)({
|
|
232
|
-
[
|
|
233
|
-
[
|
|
232
|
+
["".concat(dragAreaBaseCls, "-legal")]: dragAreaStatus === _constants.strings.DRAG_AREA_LEGAL,
|
|
233
|
+
["".concat(dragAreaBaseCls, "-illegal")]: dragAreaStatus === _constants.strings.DRAG_AREA_ILLEGAL
|
|
234
234
|
});
|
|
235
|
-
const mainCls =
|
|
235
|
+
const mainCls = "".concat(prefixCls, "-file-list-main");
|
|
236
236
|
const addContentProps = {
|
|
237
237
|
role: 'button',
|
|
238
238
|
className: uploadAddCls,
|
|
@@ -285,9 +285,9 @@ class Upload extends _baseComponent.default {
|
|
|
285
285
|
fileList: stateFileList
|
|
286
286
|
} = this.state;
|
|
287
287
|
const fileList = this.props.fileList || stateFileList;
|
|
288
|
-
const fileListCls = (0, _classnames.default)(
|
|
289
|
-
const titleCls =
|
|
290
|
-
const mainCls =
|
|
288
|
+
const fileListCls = (0, _classnames.default)("".concat(prefixCls, "-file-list"));
|
|
289
|
+
const titleCls = "".concat(prefixCls, "-file-list-title");
|
|
290
|
+
const mainCls = "".concat(prefixCls, "-file-list-main");
|
|
291
291
|
const showTitle = limit !== 1 && fileList.length;
|
|
292
292
|
const showClear = this.props.showClear && !disabled;
|
|
293
293
|
const containerProps = {
|
|
@@ -303,12 +303,12 @@ class Upload extends _baseComponent.default {
|
|
|
303
303
|
}, locale => /*#__PURE__*/_react.default.createElement("div", Object.assign({}, containerProps), showTitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
304
304
|
className: titleCls
|
|
305
305
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
306
|
-
className:
|
|
306
|
+
className: "".concat(titleCls, "-choosen")
|
|
307
307
|
}, locale.selectedFiles), showClear ? /*#__PURE__*/_react.default.createElement("span", {
|
|
308
308
|
role: "button",
|
|
309
309
|
tabIndex: 0,
|
|
310
310
|
onClick: this.clear,
|
|
311
|
-
className:
|
|
311
|
+
className: "".concat(titleCls, "-clear")
|
|
312
312
|
}, locale.clear) : null) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
313
313
|
className: mainCls,
|
|
314
314
|
role: "list",
|
|
@@ -340,7 +340,7 @@ class Upload extends _baseComponent.default {
|
|
|
340
340
|
listType,
|
|
341
341
|
disabled
|
|
342
342
|
} = this.props;
|
|
343
|
-
const uploadAddCls = (0, _classnames.default)(
|
|
343
|
+
const uploadAddCls = (0, _classnames.default)("".concat(prefixCls, "-add"));
|
|
344
344
|
|
|
345
345
|
if (listType === _constants.strings.FILE_LIST_PIC) {
|
|
346
346
|
return null;
|
|
@@ -370,11 +370,11 @@ class Upload extends _baseComponent.default {
|
|
|
370
370
|
dragSubText,
|
|
371
371
|
disabled
|
|
372
372
|
} = this.props;
|
|
373
|
-
const dragAreaBaseCls =
|
|
373
|
+
const dragAreaBaseCls = "".concat(prefixCls, "-drag-area");
|
|
374
374
|
const dragAreaCls = (0, _classnames.default)(dragAreaBaseCls, {
|
|
375
|
-
[
|
|
376
|
-
[
|
|
377
|
-
[
|
|
375
|
+
["".concat(dragAreaBaseCls, "-legal")]: dragAreaStatus === _constants.strings.DRAG_AREA_LEGAL,
|
|
376
|
+
["".concat(dragAreaBaseCls, "-illegal")]: dragAreaStatus === _constants.strings.DRAG_AREA_ILLEGAL,
|
|
377
|
+
["".concat(dragAreaBaseCls, "-custom")]: children
|
|
378
378
|
});
|
|
379
379
|
return /*#__PURE__*/_react.default.createElement(_localeConsumer.default, {
|
|
380
380
|
componentName: "Upload"
|
|
@@ -389,24 +389,24 @@ class Upload extends _baseComponent.default {
|
|
|
389
389
|
onDragEnter: this.onDragEnter,
|
|
390
390
|
onClick: this.onClick
|
|
391
391
|
}, children ? children : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
392
|
-
className:
|
|
392
|
+
className: "".concat(dragAreaBaseCls, "-icon"),
|
|
393
393
|
"x-semi-prop": "dragIcon"
|
|
394
394
|
}, dragIcon || /*#__PURE__*/_react.default.createElement(_semiIcons.IconUpload, {
|
|
395
395
|
size: "extra-large"
|
|
396
396
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
397
|
-
className:
|
|
397
|
+
className: "".concat(dragAreaBaseCls, "-text")
|
|
398
398
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
399
|
-
className:
|
|
399
|
+
className: "".concat(dragAreaBaseCls, "-main-text"),
|
|
400
400
|
"x-semi-prop": "dragMainText"
|
|
401
401
|
}, dragMainText || locale.mainText), /*#__PURE__*/_react.default.createElement("div", {
|
|
402
|
-
className:
|
|
402
|
+
className: "".concat(dragAreaBaseCls, "-sub-text"),
|
|
403
403
|
"x-semi-prop": "dragSubText"
|
|
404
404
|
}, dragSubText), /*#__PURE__*/_react.default.createElement("div", {
|
|
405
|
-
className:
|
|
405
|
+
className: "".concat(dragAreaBaseCls, "-tips")
|
|
406
406
|
}, dragAreaStatus === _constants.strings.DRAG_AREA_LEGAL && /*#__PURE__*/_react.default.createElement("span", {
|
|
407
|
-
className:
|
|
407
|
+
className: "".concat(dragAreaBaseCls, "-tips-legal")
|
|
408
408
|
}, locale.legalTips), dragAreaStatus === _constants.strings.DRAG_AREA_ILLEGAL && /*#__PURE__*/_react.default.createElement("span", {
|
|
409
|
-
className:
|
|
409
|
+
className: "".concat(dragAreaBaseCls, "-tips-illegal")
|
|
410
410
|
}, locale.illegalTips))))));
|
|
411
411
|
};
|
|
412
412
|
|
|
@@ -545,17 +545,17 @@ class Upload extends _baseComponent.default {
|
|
|
545
545
|
directory
|
|
546
546
|
} = this.props;
|
|
547
547
|
const uploadCls = (0, _classnames.default)(prefixCls, {
|
|
548
|
-
[
|
|
549
|
-
[
|
|
550
|
-
[
|
|
551
|
-
[
|
|
552
|
-
[
|
|
553
|
-
[
|
|
548
|
+
["".concat(prefixCls, "-picture")]: listType === _constants.strings.FILE_LIST_PIC,
|
|
549
|
+
["".concat(prefixCls, "-disabled")]: disabled,
|
|
550
|
+
["".concat(prefixCls, "-default")]: validateStatus === 'default',
|
|
551
|
+
["".concat(prefixCls, "-error")]: validateStatus === 'error',
|
|
552
|
+
["".concat(prefixCls, "-warning")]: validateStatus === 'warning',
|
|
553
|
+
["".concat(prefixCls, "-success")]: validateStatus === 'success'
|
|
554
554
|
}, className);
|
|
555
|
-
const inputCls = (0, _classnames.default)(
|
|
556
|
-
const inputReplaceCls = (0, _classnames.default)(
|
|
557
|
-
const promptCls = (0, _classnames.default)(
|
|
558
|
-
const validateMsgCls = (0, _classnames.default)(
|
|
555
|
+
const inputCls = (0, _classnames.default)("".concat(prefixCls, "-hidden-input"));
|
|
556
|
+
const inputReplaceCls = (0, _classnames.default)("".concat(prefixCls, "-hidden-input-replace"));
|
|
557
|
+
const promptCls = (0, _classnames.default)("".concat(prefixCls, "-prompt"));
|
|
558
|
+
const validateMsgCls = (0, _classnames.default)("".concat(prefixCls, "-validate-message"));
|
|
559
559
|
const dirProps = directory ? {
|
|
560
560
|
directory: 'directory',
|
|
561
561
|
webkitdirectory: 'webkitdirectory'
|
package/lib/es/_portal/index.js
CHANGED
|
@@ -35,7 +35,7 @@ class Portal extends PureComponent {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const cls = classnames(prefixCls, ...classNames, {
|
|
38
|
-
[
|
|
38
|
+
["".concat(prefixCls, "-rtl")]: direction === 'rtl'
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
if (_this.el) {
|
|
@@ -118,7 +118,7 @@ class Portal extends PureComponent {
|
|
|
118
118
|
Portal.contextType = ConfigContext;
|
|
119
119
|
Portal.defaultProps = {
|
|
120
120
|
// getPopupContainer: () => document.body,
|
|
121
|
-
prefixCls:
|
|
121
|
+
prefixCls: "".concat(BASE_CLASS_PREFIX, "-portal")
|
|
122
122
|
};
|
|
123
123
|
Portal.propTypes = {
|
|
124
124
|
children: PropTypes.node,
|
package/lib/es/_utils/index.js
CHANGED
|
@@ -57,9 +57,7 @@ export function cloneDeep(value, customizer) {
|
|
|
57
57
|
}); // internal-issues:887
|
|
58
58
|
|
|
59
59
|
try {
|
|
60
|
-
warning(_get(process, 'env.NODE_ENV') !== 'production',
|
|
61
|
-
The maximum length of an array is 4294967295.
|
|
62
|
-
Please check whether the array subscript in your data exceeds the maximum value of the JS array subscript`);
|
|
60
|
+
warning(_get(process, 'env.NODE_ENV') !== 'production', "[Semi] You may use an out-of-bounds array. In some cases, your program may not behave as expected.\n The maximum length of an array is 4294967295.\n Please check whether the array subscript in your data exceeds the maximum value of the JS array subscript");
|
|
63
61
|
} catch (e) {}
|
|
64
62
|
|
|
65
63
|
return newArray;
|
package/lib/es/anchor/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ declare class Anchor extends BaseComponent<AnchorProps, AnchorState> {
|
|
|
48
48
|
offsetTop: PropTypes.Requireable<number>;
|
|
49
49
|
targetOffset: PropTypes.Requireable<number>;
|
|
50
50
|
showTooltip: PropTypes.Requireable<boolean>;
|
|
51
|
-
position: PropTypes.Requireable<"
|
|
51
|
+
position: PropTypes.Requireable<"top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
52
52
|
maxWidth: PropTypes.Requireable<NonNullable<string | number>>;
|
|
53
53
|
maxHeight: PropTypes.Requireable<NonNullable<string | number>>;
|
|
54
54
|
getContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
package/lib/es/anchor/index.js
CHANGED
|
@@ -130,7 +130,7 @@ class Anchor extends BaseComponent {
|
|
|
130
130
|
},
|
|
131
131
|
setSlideBarTop: height => {
|
|
132
132
|
this.setState({
|
|
133
|
-
slideBarTop:
|
|
133
|
+
slideBarTop: "".concat(height, "px")
|
|
134
134
|
});
|
|
135
135
|
},
|
|
136
136
|
setClickLink: value => {
|
|
@@ -189,7 +189,7 @@ class Anchor extends BaseComponent {
|
|
|
189
189
|
return elTop;
|
|
190
190
|
},
|
|
191
191
|
getAnchorNode: selector => {
|
|
192
|
-
const selectors =
|
|
192
|
+
const selectors = "#".concat(this.anchorID, " ").concat(selector);
|
|
193
193
|
return document.querySelector(selectors);
|
|
194
194
|
},
|
|
195
195
|
getContentNode: selector => document.querySelector(selector),
|
|
@@ -244,15 +244,15 @@ class Anchor extends BaseComponent {
|
|
|
244
244
|
slideBarTop
|
|
245
245
|
} = this.state;
|
|
246
246
|
const wrapperCls = cls(prefixCls, className, {
|
|
247
|
-
[
|
|
247
|
+
["".concat(prefixCls, "-size-").concat(size)]: size
|
|
248
248
|
});
|
|
249
|
-
const slideCls = cls(
|
|
250
|
-
const slideBarCls = cls(
|
|
251
|
-
[
|
|
252
|
-
[
|
|
253
|
-
[
|
|
249
|
+
const slideCls = cls("".concat(prefixCls, "-slide"), "".concat(prefixCls, "-slide-").concat(railTheme));
|
|
250
|
+
const slideBarCls = cls("".concat(prefixCls, "-slide-bar"), {
|
|
251
|
+
["".concat(prefixCls, "-slide-bar-").concat(size)]: size,
|
|
252
|
+
["".concat(prefixCls, "-slide-bar-").concat(railTheme)]: railTheme,
|
|
253
|
+
["".concat(prefixCls, "-slide-bar-active")]: activeLink
|
|
254
254
|
});
|
|
255
|
-
const anchorWrapper =
|
|
255
|
+
const anchorWrapper = "".concat(prefixCls, "-link-wrapper");
|
|
256
256
|
const wrapperStyle = Object.assign(Object.assign({}, style), {
|
|
257
257
|
maxWidth,
|
|
258
258
|
maxHeight
|
package/lib/es/anchor/link.js
CHANGED
|
@@ -25,10 +25,10 @@ export default class Link extends BaseComponent {
|
|
|
25
25
|
size
|
|
26
26
|
} = this.context;
|
|
27
27
|
const active = activeLink === href;
|
|
28
|
-
const linkTitleCls = cls(
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
28
|
+
const linkTitleCls = cls("".concat(prefixCls, "-link-tooltip"), {
|
|
29
|
+
["".concat(prefixCls, "-link-tooltip-small")]: size === 'small',
|
|
30
|
+
["".concat(prefixCls, "-link-tooltip-active")]: active,
|
|
31
|
+
["".concat(prefixCls, "-link-tooltip-disabled")]: disabled
|
|
32
32
|
});
|
|
33
33
|
const toolTipOpt = position ? {
|
|
34
34
|
position
|
|
@@ -140,10 +140,10 @@ export default class Link extends BaseComponent {
|
|
|
140
140
|
showTooltip
|
|
141
141
|
} = this.context;
|
|
142
142
|
const active = activeLink === href;
|
|
143
|
-
const linkCls = cls(
|
|
144
|
-
const linkTitleCls = cls(
|
|
145
|
-
[
|
|
146
|
-
[
|
|
143
|
+
const linkCls = cls("".concat(prefixCls, "-link"), className);
|
|
144
|
+
const linkTitleCls = cls("".concat(prefixCls, "-link-title"), {
|
|
145
|
+
["".concat(prefixCls, "-link-title-active")]: active,
|
|
146
|
+
["".concat(prefixCls, "-link-title-disabled")]: disabled
|
|
147
147
|
});
|
|
148
148
|
const paddingAttributeKey = direction === 'rtl' ? 'paddingRight' : 'paddingLeft';
|
|
149
149
|
const ariaProps = {
|
|
@@ -116,7 +116,7 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
116
116
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
117
117
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
118
118
|
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
119
|
-
position: PropTypes.Requireable<"
|
|
119
|
+
position: PropTypes.Requireable<"top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
120
120
|
placeholder: PropTypes.Requireable<string>;
|
|
121
121
|
prefix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
122
122
|
onChangeWithObject: PropTypes.Requireable<boolean>;
|
|
@@ -59,11 +59,7 @@ class AutoComplete extends BaseComponent {
|
|
|
59
59
|
this.triggerRef = /*#__PURE__*/React.createRef();
|
|
60
60
|
this.optionsRef = /*#__PURE__*/React.createRef();
|
|
61
61
|
this.clickOutsideHandler = null;
|
|
62
|
-
warning('triggerRender' in this.props && typeof this.props.triggerRender === 'function',
|
|
63
|
-
- If you are using the following props: 'suffix', 'prefix', 'showClear', 'validateStatus', and 'size',
|
|
64
|
-
please notice that they will be removed in the next major version.
|
|
65
|
-
Please use 'componentProps' to retrieve these props instead.
|
|
66
|
-
- If you are using 'onBlur', 'onFocus', please try to avoid using them and look for changes in the future.`);
|
|
62
|
+
warning('triggerRender' in this.props && typeof this.props.triggerRender === 'function', "[Semi AutoComplete]\n - If you are using the following props: 'suffix', 'prefix', 'showClear', 'validateStatus', and 'size',\n please notice that they will be removed in the next major version.\n Please use 'componentProps' to retrieve these props instead.\n - If you are using 'onBlur', 'onFocus', please try to avoid using them and look for changes in the future.");
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
get adapter() {
|
|
@@ -200,7 +196,7 @@ class AutoComplete extends BaseComponent {
|
|
|
200
196
|
style,
|
|
201
197
|
className: useCustomTrigger ? cls(className) : cls({
|
|
202
198
|
[prefixCls]: true,
|
|
203
|
-
[
|
|
199
|
+
["".concat(prefixCls, "-disabled")]: disabled
|
|
204
200
|
}, className),
|
|
205
201
|
onClick: this.handleInputClick,
|
|
206
202
|
ref: this.triggerRef,
|
|
@@ -244,7 +240,7 @@ class AutoComplete extends BaseComponent {
|
|
|
244
240
|
}
|
|
245
241
|
|
|
246
242
|
renderLoading() {
|
|
247
|
-
const loadingWrapperCls =
|
|
243
|
+
const loadingWrapperCls = "".concat(prefixCls, "-loading-wrapper");
|
|
248
244
|
return /*#__PURE__*/React.createElement("div", {
|
|
249
245
|
className: loadingWrapperCls
|
|
250
246
|
}, /*#__PURE__*/React.createElement(Spin, null));
|
|
@@ -278,7 +274,7 @@ class AutoComplete extends BaseComponent {
|
|
|
278
274
|
dropdownMinWidth
|
|
279
275
|
} = this.state;
|
|
280
276
|
const listCls = cls({
|
|
281
|
-
[
|
|
277
|
+
["".concat(prefixCls, "-option-list")]: true
|
|
282
278
|
}, dropdownClassName);
|
|
283
279
|
let optionsNode;
|
|
284
280
|
|
|
@@ -81,13 +81,13 @@ class Option extends PureComponent {
|
|
|
81
81
|
rest = __rest(_a, ["children", "disabled", "value", "selected", "label", "empty", "emptyContent", "onSelect", "focused", "showTick", "className", "style", "onMouseEnter", "prefixCls", "renderOptionItem", "inputValue"]);
|
|
82
82
|
|
|
83
83
|
const optionClassName = classNames(prefixCls, {
|
|
84
|
-
[
|
|
85
|
-
[
|
|
86
|
-
[
|
|
87
|
-
[
|
|
84
|
+
["".concat(prefixCls, "-disabled")]: disabled,
|
|
85
|
+
["".concat(prefixCls, "-selected")]: selected,
|
|
86
|
+
["".concat(prefixCls, "-focused")]: focused,
|
|
87
|
+
["".concat(prefixCls, "-empty")]: empty,
|
|
88
88
|
[className]: className
|
|
89
89
|
});
|
|
90
|
-
const selectedIconClassName = classNames([
|
|
90
|
+
const selectedIconClassName = classNames(["".concat(prefixCls, "-icon")]);
|
|
91
91
|
|
|
92
92
|
if (empty) {
|
|
93
93
|
if (emptyContent === null) {
|
|
@@ -125,7 +125,7 @@ class Option extends PureComponent {
|
|
|
125
125
|
searchWords: inputValue,
|
|
126
126
|
sourceString: children,
|
|
127
127
|
option: {
|
|
128
|
-
highlightClassName:
|
|
128
|
+
highlightClassName: "".concat(prefixCls, "-keyword")
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
return (
|
|
@@ -148,7 +148,7 @@ class Option extends PureComponent {
|
|
|
148
148
|
}, showTick ? /*#__PURE__*/React.createElement("div", {
|
|
149
149
|
className: selectedIconClassName
|
|
150
150
|
}, /*#__PURE__*/React.createElement(IconTick, null)) : null, _isString(children) ? /*#__PURE__*/React.createElement("div", {
|
|
151
|
-
className:
|
|
151
|
+
className: "".concat(prefixCls, "-text")
|
|
152
152
|
}, this.renderOptionContent({
|
|
153
153
|
children,
|
|
154
154
|
config,
|