@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
|
@@ -27,12 +27,12 @@ class DropdownItem extends BaseComponent {
|
|
|
27
27
|
showTick: contextShowTick
|
|
28
28
|
} = this.context;
|
|
29
29
|
const itemclass = cls(className, {
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
30
|
+
["".concat(prefixCls, "-item")]: true,
|
|
31
|
+
["".concat(prefixCls, "-item-disabled")]: disabled,
|
|
32
|
+
["".concat(prefixCls, "-item-hover")]: hover,
|
|
33
|
+
["".concat(prefixCls, "-item-withTick")]: contextShowTick !== null && contextShowTick !== void 0 ? contextShowTick : showTick,
|
|
34
|
+
["".concat(prefixCls, "-item-").concat(type)]: type,
|
|
35
|
+
["".concat(prefixCls, "-item-active")]: active
|
|
36
36
|
});
|
|
37
37
|
const events = {};
|
|
38
38
|
|
|
@@ -66,7 +66,7 @@ class DropdownItem extends BaseComponent {
|
|
|
66
66
|
|
|
67
67
|
if (icon) {
|
|
68
68
|
iconContent = /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className:
|
|
69
|
+
className: "".concat(prefixCls, "-item-icon")
|
|
70
70
|
}, icon);
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -41,7 +41,7 @@ class DropdownMenu extends BaseComponent {
|
|
|
41
41
|
role: "menu",
|
|
42
42
|
"aria-orientation": "vertical"
|
|
43
43
|
}, rest, {
|
|
44
|
-
className: classnames(
|
|
44
|
+
className: classnames("".concat(prefixCls, "-menu"), className),
|
|
45
45
|
style: style,
|
|
46
46
|
onKeyDown: e => this.foundation.onMenuKeydown(e)
|
|
47
47
|
}), children);
|
|
@@ -16,8 +16,8 @@ class DropdownTitle extends PureComponent {
|
|
|
16
16
|
showTick
|
|
17
17
|
} = this.context;
|
|
18
18
|
const titleCls = cls({
|
|
19
|
-
[
|
|
20
|
-
[
|
|
19
|
+
["".concat(prefixCls, "-title")]: true,
|
|
20
|
+
["".concat(prefixCls, "-title-withTick")]: showTick
|
|
21
21
|
}, className);
|
|
22
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
23
|
className: titleCls,
|
|
@@ -66,7 +66,7 @@ declare class Dropdown extends BaseComponent<DropdownProps, DropdownState> {
|
|
|
66
66
|
motion: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
67
67
|
onVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
68
|
prefixCls: PropTypes.Requireable<string>;
|
|
69
|
-
position: PropTypes.Requireable<"
|
|
69
|
+
position: PropTypes.Requireable<"top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
70
70
|
rePosKey: PropTypes.Requireable<NonNullable<string | number>>;
|
|
71
71
|
render: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
72
72
|
spacing: PropTypes.Requireable<number>;
|
package/lib/es/dropdown/index.js
CHANGED
|
@@ -85,7 +85,7 @@ class Dropdown extends BaseComponent {
|
|
|
85
85
|
className: className,
|
|
86
86
|
style: style
|
|
87
87
|
}, /*#__PURE__*/React.createElement("div", {
|
|
88
|
-
className:
|
|
88
|
+
className: "".concat(prefixCls, "-content"),
|
|
89
89
|
"x-semi-prop": "render"
|
|
90
90
|
}, content)));
|
|
91
91
|
}
|
|
@@ -158,7 +158,7 @@ class Dropdown extends BaseComponent {
|
|
|
158
158
|
className: className,
|
|
159
159
|
style: style
|
|
160
160
|
}, /*#__PURE__*/React.createElement("div", {
|
|
161
|
-
className:
|
|
161
|
+
className: "".concat(prefixCls, "-content")
|
|
162
162
|
}, render)));
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -212,7 +212,7 @@ class Dropdown extends BaseComponent {
|
|
|
212
212
|
}, attr), /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, {
|
|
213
213
|
//@ts-ignore
|
|
214
214
|
className: classnames(_get(children, 'props.className'), {
|
|
215
|
-
[
|
|
215
|
+
["".concat(prefixCls, "-showing")]: popVisible
|
|
216
216
|
}),
|
|
217
217
|
'aria-haspopup': true,
|
|
218
218
|
'aria-expanded': popVisible,
|
package/lib/es/empty/index.js
CHANGED
|
@@ -75,14 +75,14 @@ export default class Empty extends BaseComponent {
|
|
|
75
75
|
imageNode = /*#__PURE__*/React.createElement("svg", {
|
|
76
76
|
"aria-hidden": "true"
|
|
77
77
|
}, /*#__PURE__*/React.createElement("use", {
|
|
78
|
-
xlinkHref:
|
|
78
|
+
xlinkHref: "#".concat(imgSrc.id)
|
|
79
79
|
}));
|
|
80
80
|
} else {
|
|
81
81
|
imageNode = imgSrc;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
const wrapperCls = cls(className, prefixCls, {
|
|
85
|
-
[
|
|
85
|
+
["".concat(prefixCls, "-").concat(layout)]: layout
|
|
86
86
|
});
|
|
87
87
|
const titleProps = imageNode ? {
|
|
88
88
|
heading: 4
|
|
@@ -96,19 +96,19 @@ export default class Empty extends BaseComponent {
|
|
|
96
96
|
className: wrapperCls,
|
|
97
97
|
style: style
|
|
98
98
|
}, /*#__PURE__*/React.createElement("div", {
|
|
99
|
-
className:
|
|
99
|
+
className: "".concat(prefixCls, "-image"),
|
|
100
100
|
style: imageStyle,
|
|
101
101
|
"x-semi-prop": "image,darkModeImage"
|
|
102
102
|
}, imageNode), /*#__PURE__*/React.createElement("div", {
|
|
103
|
-
className:
|
|
103
|
+
className: "".concat(prefixCls, "-content")
|
|
104
104
|
}, title ? /*#__PURE__*/React.createElement(Typography.Title, Object.assign({}, titleProps, {
|
|
105
|
-
className:
|
|
105
|
+
className: "".concat(prefixCls, "-title"),
|
|
106
106
|
"x-semi-prop": "title"
|
|
107
107
|
}), title) : null, description ? /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className:
|
|
108
|
+
className: "".concat(prefixCls, "-description"),
|
|
109
109
|
"x-semi-prop": "description"
|
|
110
110
|
}, description) : null, children ? /*#__PURE__*/React.createElement("div", {
|
|
111
|
-
className:
|
|
111
|
+
className: "".concat(prefixCls, "-footer"),
|
|
112
112
|
"x-semi-prop": "children"
|
|
113
113
|
}, children) : null));
|
|
114
114
|
}
|
|
@@ -57,9 +57,9 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
57
57
|
static Select: React.ComponentType<import("utility-types").Subtract<{
|
|
58
58
|
'aria-describedby'?: string;
|
|
59
59
|
'aria-errormessage'?: string;
|
|
60
|
-
'aria-invalid'?: boolean | "
|
|
60
|
+
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
61
61
|
'aria-labelledby'?: string;
|
|
62
|
-
'aria-required'?: boolean | "
|
|
62
|
+
'aria-required'?: boolean | "true" | "false";
|
|
63
63
|
id?: string;
|
|
64
64
|
autoFocus?: boolean;
|
|
65
65
|
autoClearSearchValue?: boolean;
|
|
@@ -82,7 +82,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
82
82
|
expandRestTagsOnClick?: boolean;
|
|
83
83
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
84
84
|
zIndex?: number;
|
|
85
|
-
position?: "
|
|
85
|
+
position?: "top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
86
86
|
onSearch?: (value: string) => void;
|
|
87
87
|
dropdownClassName?: string;
|
|
88
88
|
dropdownStyle?: React.CSSProperties;
|
|
@@ -137,7 +137,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
137
137
|
preventScroll?: boolean;
|
|
138
138
|
showRestTagsPopover?: boolean;
|
|
139
139
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
140
|
-
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "
|
|
140
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
141
141
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
142
142
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
143
143
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/es/form/baseForm.js
CHANGED
|
@@ -105,9 +105,9 @@ class Form extends BaseComponent {
|
|
|
105
105
|
const {
|
|
106
106
|
formId
|
|
107
107
|
} = this.state;
|
|
108
|
-
return document.querySelectorAll(
|
|
108
|
+
return document.querySelectorAll("form[x-form-id=\"".concat(formId, "\"] .").concat(cssClasses.PREFIX, "-field-error-message"));
|
|
109
109
|
},
|
|
110
|
-
getFieldDOM: field => document.querySelector(
|
|
110
|
+
getFieldDOM: field => document.querySelector(".".concat(cssClasses.PREFIX, "-field[x-field-id=\"").concat(field, "\"]"))
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -58,7 +58,7 @@ export default class ErrorMessage extends PureComponent {
|
|
|
58
58
|
error: /*#__PURE__*/React.createElement(IconAlertCircle, null)
|
|
59
59
|
};
|
|
60
60
|
const text = error ? this.generatorText(error) : this.generatorText(helpText);
|
|
61
|
-
const iconCls =
|
|
61
|
+
const iconCls = "".concat(prefix, "-field-validate-status-icon");
|
|
62
62
|
let icon = null;
|
|
63
63
|
|
|
64
64
|
if (isInInputGroup) {
|
package/lib/es/form/field.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ declare const FormTextArea: import("react").ComponentType<import("utility-types"
|
|
|
5
5
|
declare const FormSelect: import("react").ComponentType<import("utility-types").Subtract<{
|
|
6
6
|
'aria-describedby'?: string;
|
|
7
7
|
'aria-errormessage'?: string;
|
|
8
|
-
'aria-invalid'?: boolean | "
|
|
8
|
+
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
9
9
|
'aria-labelledby'?: string;
|
|
10
|
-
'aria-required'?: boolean | "
|
|
10
|
+
'aria-required'?: boolean | "true" | "false";
|
|
11
11
|
id?: string;
|
|
12
12
|
autoFocus?: boolean;
|
|
13
13
|
autoClearSearchValue?: boolean;
|
|
@@ -30,7 +30,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
30
30
|
expandRestTagsOnClick?: boolean;
|
|
31
31
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
32
32
|
zIndex?: number;
|
|
33
|
-
position?: "
|
|
33
|
+
position?: "top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
34
34
|
onSearch?: (value: string) => void;
|
|
35
35
|
dropdownClassName?: string;
|
|
36
36
|
dropdownStyle?: import("react").CSSProperties;
|
|
@@ -85,7 +85,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
85
85
|
preventScroll?: boolean;
|
|
86
86
|
showRestTagsPopover?: boolean;
|
|
87
87
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
88
|
-
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "
|
|
88
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
89
89
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
90
90
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
91
91
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
package/lib/es/form/group.js
CHANGED
|
@@ -91,13 +91,13 @@ class FormInputGroup extends Component {
|
|
|
91
91
|
return null;
|
|
92
92
|
});
|
|
93
93
|
const groupCls = classNames({
|
|
94
|
-
[
|
|
94
|
+
["".concat(prefix, "-field-group")]: true
|
|
95
95
|
});
|
|
96
96
|
const labelCol = formProps.labelCol;
|
|
97
97
|
const wrapperCol = formProps.wrapperCol;
|
|
98
98
|
const labelAlign = formProps.labelAlign;
|
|
99
99
|
const appendCol = labelCol && wrapperCol;
|
|
100
|
-
const labelColCls = labelCol ?
|
|
100
|
+
const labelColCls = labelCol ? "".concat(prefix, "-col-").concat(labelAlign) : '';
|
|
101
101
|
const labelContent = this.renderLabel(label, formProps);
|
|
102
102
|
const inputGroupContent = /*#__PURE__*/React.createElement(InputGroup, Object.assign({}, rest), inner);
|
|
103
103
|
const groupErrorContent = /*#__PURE__*/React.createElement(GroupError, {
|
|
@@ -105,10 +105,10 @@ class FormInputGroup extends Component {
|
|
|
105
105
|
showValidateIcon: formProps.showValidateIcon,
|
|
106
106
|
isInInputGroup: true
|
|
107
107
|
});
|
|
108
|
-
const extraCls = classNames(
|
|
109
|
-
[
|
|
110
|
-
[
|
|
111
|
-
[
|
|
108
|
+
const extraCls = classNames("".concat(prefix, "-field-extra"), {
|
|
109
|
+
["".concat(prefix, "-field-extra-string")]: typeof extraText === 'string',
|
|
110
|
+
["".concat(prefix, "-field-extra-middle")]: extraTextPosition === 'middle',
|
|
111
|
+
["".concat(prefix, "-field-extra-bottom")]: extraTextPosition === 'bottom'
|
|
112
112
|
});
|
|
113
113
|
const extraContent = extraText ? /*#__PURE__*/React.createElement("div", {
|
|
114
114
|
className: extraCls,
|
|
@@ -422,18 +422,18 @@ function withField(Component, opts) {
|
|
|
422
422
|
let mergeExtraPos = extraTextPosition || formProps.extraTextPosition || 'bottom'; // id attribute to improve a11y
|
|
423
423
|
|
|
424
424
|
const a11yId = id ? id : field;
|
|
425
|
-
const labelId =
|
|
426
|
-
const helpTextId =
|
|
427
|
-
const extraTextId =
|
|
428
|
-
const errorMessageId =
|
|
425
|
+
const labelId = "".concat(a11yId, "-label");
|
|
426
|
+
const helpTextId = "".concat(a11yId, "-helpText");
|
|
427
|
+
const extraTextId = "".concat(a11yId, "-extraText");
|
|
428
|
+
const errorMessageId = "".concat(a11yId, "-errormessage");
|
|
429
429
|
|
|
430
430
|
const FieldComponent = () => {
|
|
431
431
|
// prefer to use validateStatus which pass by user throught props
|
|
432
432
|
let blockStatus = validateStatus ? validateStatus : status;
|
|
433
|
-
const extraCls = classNames(
|
|
434
|
-
[
|
|
435
|
-
[
|
|
436
|
-
[
|
|
433
|
+
const extraCls = classNames("".concat(prefix, "-field-extra"), {
|
|
434
|
+
["".concat(prefix, "-field-extra-string")]: typeof extraText === 'string',
|
|
435
|
+
["".concat(prefix, "-field-extra-middle")]: mergeExtraPos === 'middle',
|
|
436
|
+
["".concat(prefix, "-field-extra-bottom")]: mergeExtraPos === 'bottom'
|
|
437
437
|
});
|
|
438
438
|
const extraContent = extraText ? /*#__PURE__*/React.createElement("div", {
|
|
439
439
|
className: extraCls,
|
|
@@ -458,11 +458,11 @@ function withField(Component, opts) {
|
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
if (helpText) {
|
|
461
|
-
newProps['aria-describedby'] = extraText ?
|
|
461
|
+
newProps['aria-describedby'] = extraText ? "".concat(helpTextId, " ").concat(extraTextId) : helpTextId;
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
if (extraText) {
|
|
465
|
-
newProps['aria-describedby'] = helpText ?
|
|
465
|
+
newProps['aria-describedby'] = helpText ? "".concat(helpTextId, " ").concat(extraTextId) : extraTextId;
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
if (status === 'error') {
|
|
@@ -471,12 +471,12 @@ function withField(Component, opts) {
|
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
const fieldCls = classNames({
|
|
474
|
-
[
|
|
475
|
-
[
|
|
474
|
+
["".concat(prefix, "-field")]: true,
|
|
475
|
+
["".concat(prefix, "-field-").concat(name)]: Boolean(name),
|
|
476
476
|
[fieldClassName]: Boolean(fieldClassName)
|
|
477
477
|
});
|
|
478
478
|
const fieldMaincls = classNames({
|
|
479
|
-
[
|
|
479
|
+
["".concat(prefix, "-field-main")]: true
|
|
480
480
|
});
|
|
481
481
|
|
|
482
482
|
if (mergeLabelPos === 'inset' && !noLabel) {
|
|
@@ -497,8 +497,8 @@ function withField(Component, opts) {
|
|
|
497
497
|
|
|
498
498
|
if (pure) {
|
|
499
499
|
let pureCls = classNames(rest.className, {
|
|
500
|
-
[
|
|
501
|
-
[
|
|
500
|
+
["".concat(prefix, "-field-pure")]: true,
|
|
501
|
+
["".concat(prefix, "-field-").concat(name)]: Boolean(name),
|
|
502
502
|
[fieldClassName]: Boolean(fieldClassName)
|
|
503
503
|
});
|
|
504
504
|
newProps.className = pureCls;
|
|
@@ -506,7 +506,7 @@ function withField(Component, opts) {
|
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
let withCol = mergeLabelCol && mergeWrapperCol;
|
|
509
|
-
const labelColCls = mergeLabelAlign ?
|
|
509
|
+
const labelColCls = mergeLabelAlign ? "".concat(prefix, "-col-").concat(mergeLabelAlign) : ''; // get label
|
|
510
510
|
|
|
511
511
|
let labelContent = null;
|
|
512
512
|
|
package/lib/es/form/label.js
CHANGED
|
@@ -21,26 +21,26 @@ export default class Label extends PureComponent {
|
|
|
21
21
|
optional
|
|
22
22
|
} = this.props;
|
|
23
23
|
const labelCls = classNames(className, {
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
24
|
+
["".concat(prefixCls, "-field-label")]: true,
|
|
25
|
+
["".concat(prefixCls, "-field-label-left")]: align === 'left',
|
|
26
|
+
["".concat(prefixCls, "-field-label-right")]: align === 'right',
|
|
27
|
+
["".concat(prefixCls, "-field-label-required")]: required,
|
|
28
|
+
["".concat(prefixCls, "-field-label-disabled")]: disabled,
|
|
29
|
+
["".concat(prefixCls, "-field-label-with-extra")]: extra
|
|
30
30
|
});
|
|
31
31
|
const labelStyle = style ? style : {};
|
|
32
32
|
width ? labelStyle.width = width : null;
|
|
33
33
|
const optionalText = /*#__PURE__*/React.createElement(LocaleConsumer, {
|
|
34
34
|
componentName: "Form"
|
|
35
35
|
}, locale => /*#__PURE__*/React.createElement("span", {
|
|
36
|
-
className:
|
|
36
|
+
className: "".concat(prefixCls, "-field-label-optional-text")
|
|
37
37
|
}, locale.optional));
|
|
38
38
|
const textContent = /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
className:
|
|
39
|
+
className: "".concat(prefixCls, "-field-label-text"),
|
|
40
40
|
"x-semi-prop": "label"
|
|
41
41
|
}, typeof text !== 'undefined' ? text : children, optional ? optionalText : null);
|
|
42
42
|
const contentWithExtra = /*#__PURE__*/React.createElement(React.Fragment, null, textContent, /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className:
|
|
43
|
+
className: "".concat(prefixCls, "-field-label-extra")
|
|
44
44
|
}, extra));
|
|
45
45
|
return /*#__PURE__*/React.createElement("label", {
|
|
46
46
|
className: labelCls,
|
package/lib/es/form/slot.js
CHANGED
|
@@ -53,11 +53,11 @@ const FormSlot = props => {
|
|
|
53
53
|
|
|
54
54
|
const appendCol = labelCol && wrapperCol;
|
|
55
55
|
const slotCls = classNames({
|
|
56
|
-
[
|
|
57
|
-
[
|
|
56
|
+
["".concat(prefix, "-field")]: true,
|
|
57
|
+
["".concat(prefix, "-slot")]: true
|
|
58
58
|
}, className);
|
|
59
59
|
const labelColCls = classNames({
|
|
60
|
-
[
|
|
60
|
+
["".concat(prefix, "-col-").concat(labelAlign)]: true
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
switch (true) {
|
|
@@ -118,8 +118,8 @@ const FormSlot = props => {
|
|
|
118
118
|
width: labelWidth
|
|
119
119
|
}, label);
|
|
120
120
|
let mainCls = classNames({
|
|
121
|
-
[
|
|
122
|
-
[
|
|
121
|
+
["".concat(prefix, "-field-main")]: true,
|
|
122
|
+
["".concat(prefix, "-slot-main")]: true
|
|
123
123
|
});
|
|
124
124
|
|
|
125
125
|
switch (true) {
|
package/lib/es/grid/col.js
CHANGED
|
@@ -39,7 +39,7 @@ class Col extends React.Component {
|
|
|
39
39
|
others = __rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children"]);
|
|
40
40
|
|
|
41
41
|
let sizeClassObj = {};
|
|
42
|
-
const prefix =
|
|
42
|
+
const prefix = "".concat(prefixCls, "-col");
|
|
43
43
|
['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach(size => {
|
|
44
44
|
let sizeProps = {};
|
|
45
45
|
|
|
@@ -51,19 +51,19 @@ class Col extends React.Component {
|
|
|
51
51
|
|
|
52
52
|
delete others[size];
|
|
53
53
|
sizeClassObj = Object.assign(Object.assign({}, sizeClassObj), {
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
54
|
+
["".concat(prefix, "-").concat(size, "-").concat(sizeProps.span)]: sizeProps.span !== undefined,
|
|
55
|
+
["".concat(prefix, "-").concat(size, "-order-").concat(sizeProps.order)]: sizeProps.order || sizeProps.order === 0,
|
|
56
|
+
["".concat(prefix, "-").concat(size, "-offset-").concat(sizeProps.offset)]: sizeProps.offset || sizeProps.offset === 0,
|
|
57
|
+
["".concat(prefix, "-").concat(size, "-push-").concat(sizeProps.push)]: sizeProps.push || sizeProps.push === 0,
|
|
58
|
+
["".concat(prefix, "-").concat(size, "-pull-").concat(sizeProps.pull)]: sizeProps.pull || sizeProps.pull === 0
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
const classes = classnames(prefix, {
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
62
|
+
["".concat(prefix, "-").concat(span)]: span !== undefined,
|
|
63
|
+
["".concat(prefix, "-order-").concat(order)]: order,
|
|
64
|
+
["".concat(prefix, "-offset-").concat(offset)]: offset,
|
|
65
|
+
["".concat(prefix, "-push-").concat(push)]: push,
|
|
66
|
+
["".concat(prefix, "-pull-").concat(pull)]: pull
|
|
67
67
|
}, className, sizeClassObj);
|
|
68
68
|
let {
|
|
69
69
|
style
|
package/lib/es/grid/row.js
CHANGED
|
@@ -114,12 +114,12 @@ class Row extends React.Component {
|
|
|
114
114
|
others = __rest(_a, ["prefixCls", "type", "justify", "align", "className", "style", "children"]);
|
|
115
115
|
|
|
116
116
|
const gutters = this.getGutter();
|
|
117
|
-
const prefix =
|
|
117
|
+
const prefix = "".concat(prefixCls, "-row");
|
|
118
118
|
const classes = classnames({
|
|
119
119
|
[prefix]: type !== 'flex',
|
|
120
|
-
[
|
|
121
|
-
[
|
|
122
|
-
[
|
|
120
|
+
["".concat(prefix, "-").concat(type)]: type,
|
|
121
|
+
["".concat(prefix, "-").concat(type, "-").concat(justify)]: type && justify,
|
|
122
|
+
["".concat(prefix, "-").concat(type, "-").concat(align)]: type && align
|
|
123
123
|
}, className);
|
|
124
124
|
const rowStyle = Object.assign(Object.assign(Object.assign({}, gutters[0] > 0 ? {
|
|
125
125
|
marginLeft: gutters[0] / -2,
|
|
@@ -65,8 +65,8 @@ class IconButton extends PureComponent {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
const btnTextCls = classNames({
|
|
68
|
-
[
|
|
69
|
-
[
|
|
68
|
+
["".concat(prefixCls, "-content-left")]: iconPosition === 'right',
|
|
69
|
+
["".concat(prefixCls, "-content-right")]: iconPosition === 'left'
|
|
70
70
|
});
|
|
71
71
|
const xSemiProp = this.props['x-semi-children-alias'] || 'children';
|
|
72
72
|
const children = originChildren != null ? /*#__PURE__*/React.createElement("span", {
|
|
@@ -80,9 +80,9 @@ class IconButton extends PureComponent {
|
|
|
80
80
|
finalChildren = /*#__PURE__*/React.createElement(React.Fragment, null, children, IconElem);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const iconBtnCls = classNames(className,
|
|
84
|
-
[
|
|
85
|
-
[
|
|
83
|
+
const iconBtnCls = classNames(className, "".concat(prefixCls, "-with-icon"), {
|
|
84
|
+
["".concat(prefixCls, "-with-icon-only")]: children == null || children === '',
|
|
85
|
+
["".concat(prefixCls, "-loading")]: loading
|
|
86
86
|
});
|
|
87
87
|
return /*#__PURE__*/React.createElement(Button, Object.assign({}, otherProps, {
|
|
88
88
|
className: iconBtnCls,
|
package/lib/es/image/image.js
CHANGED
|
@@ -64,7 +64,7 @@ export default class Image extends BaseComponent {
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
this.renderDefaultError = () => {
|
|
67
|
-
const prefixClsName =
|
|
67
|
+
const prefixClsName = "".concat(prefixCls, "-status");
|
|
68
68
|
return /*#__PURE__*/React.createElement("div", {
|
|
69
69
|
className: prefixClsName
|
|
70
70
|
}, /*#__PURE__*/React.createElement(IconUploadError, {
|
|
@@ -73,7 +73,7 @@ export default class Image extends BaseComponent {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
this.renderLoad = () => {
|
|
76
|
-
const prefixClsName =
|
|
76
|
+
const prefixClsName = "".concat(prefixCls, "-status");
|
|
77
77
|
const {
|
|
78
78
|
placeholder
|
|
79
79
|
} = this.props;
|
|
@@ -86,7 +86,7 @@ export default class Image extends BaseComponent {
|
|
|
86
86
|
const {
|
|
87
87
|
fallback
|
|
88
88
|
} = this.props;
|
|
89
|
-
const prefixClsName =
|
|
89
|
+
const prefixClsName = "".concat(prefixCls, "-status");
|
|
90
90
|
const fallbackNode = typeof fallback === "string" ? /*#__PURE__*/React.createElement("img", {
|
|
91
91
|
style: {
|
|
92
92
|
width: "100%",
|
|
@@ -105,7 +105,7 @@ export default class Image extends BaseComponent {
|
|
|
105
105
|
loadStatus
|
|
106
106
|
} = this.state;
|
|
107
107
|
return /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className:
|
|
108
|
+
className: "".concat(prefixCls, "-overlay")
|
|
109
109
|
}, loadStatus === "error" && this.renderError(), loadStatus === "loading" && this.renderLoad());
|
|
110
110
|
};
|
|
111
111
|
|
|
@@ -114,13 +114,13 @@ export default class Image extends BaseComponent {
|
|
|
114
114
|
}, locale => locale[key]);
|
|
115
115
|
|
|
116
116
|
this.renderMask = () => /*#__PURE__*/React.createElement("div", {
|
|
117
|
-
className:
|
|
117
|
+
className: "".concat(prefixCls, "-mask")
|
|
118
118
|
}, /*#__PURE__*/React.createElement("div", {
|
|
119
|
-
className:
|
|
119
|
+
className: "".concat(prefixCls, "-mask-info")
|
|
120
120
|
}, /*#__PURE__*/React.createElement(IconEyeOpened, {
|
|
121
121
|
size: "extra-large"
|
|
122
122
|
}), /*#__PURE__*/React.createElement("span", {
|
|
123
|
-
className:
|
|
123
|
+
className: "".concat(prefixCls, "-mask-info-text")
|
|
124
124
|
}, this.getLocalTextByKey("preview"))));
|
|
125
125
|
|
|
126
126
|
this.state = {
|
|
@@ -216,9 +216,9 @@ export default class Image extends BaseComponent {
|
|
|
216
216
|
src: this.isInGroup() && this.isLazyLoad() ? undefined : src,
|
|
217
217
|
"data-src": src,
|
|
218
218
|
alt: alt,
|
|
219
|
-
className: cls(
|
|
220
|
-
[
|
|
221
|
-
[
|
|
219
|
+
className: cls("".concat(prefixCls, "-img"), {
|
|
220
|
+
["".concat(prefixCls, "-img-preview")]: showPreviewCursor,
|
|
221
|
+
["".concat(prefixCls, "-img-error")]: loadStatus === "error"
|
|
222
222
|
}),
|
|
223
223
|
width: width,
|
|
224
224
|
height: height,
|
package/lib/es/image/preview.js
CHANGED
|
@@ -103,7 +103,7 @@ export default class Preview extends BaseComponent {
|
|
|
103
103
|
const {
|
|
104
104
|
lazyLoadMargin
|
|
105
105
|
} = this.props;
|
|
106
|
-
const allElement = document.querySelectorAll(
|
|
106
|
+
const allElement = document.querySelectorAll(".".concat(prefixCls, "-img")); // use IntersectionObserver to lazy load image
|
|
107
107
|
|
|
108
108
|
const observer = new IntersectionObserver(entries => {
|
|
109
109
|
entries.forEach(item => {
|
|
@@ -117,7 +117,7 @@ export default class Preview extends BaseComponent {
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
}, {
|
|
120
|
-
root: document.querySelector(
|
|
120
|
+
root: document.querySelector("#".concat(this.previewGroupId)),
|
|
121
121
|
rootMargin: lazyLoadMargin
|
|
122
122
|
});
|
|
123
123
|
allElement.forEach(item => observer.observe(item));
|
|
@@ -171,7 +171,7 @@ export default class Preview extends BaseComponent {
|
|
|
171
171
|
}, /*#__PURE__*/React.createElement("div", {
|
|
172
172
|
id: this.previewGroupId,
|
|
173
173
|
style: style,
|
|
174
|
-
className:
|
|
174
|
+
className: "".concat(prefixCls, "-preview-group")
|
|
175
175
|
}, newChildren), /*#__PURE__*/React.createElement(PreviewInner, Object.assign({}, restProps, {
|
|
176
176
|
ref: this.previewRef,
|
|
177
177
|
src: finalSrcList,
|