@douyinfe/semi-ui 2.9.0-beta.0 → 2.9.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_base/baseComponent.tsx +2 -1
- package/_portal/index.tsx +2 -1
- package/anchor/index.tsx +2 -1
- package/anchor/link.tsx +2 -1
- package/autoComplete/index.tsx +2 -2
- package/avatar/interface.ts +2 -2
- package/backtop/index.tsx +1 -0
- package/badge/index.tsx +4 -2
- package/banner/index.tsx +1 -0
- package/breadcrumb/bread-context.tsx +2 -2
- package/breadcrumb/index.tsx +2 -2
- package/breadcrumb/item.tsx +11 -3
- package/button/Button.tsx +2 -1
- package/button/buttonGroup.tsx +2 -1
- package/calendar/_story/Demo.tsx +3 -3
- package/card/cardGroup.tsx +1 -0
- package/card/index.tsx +1 -0
- package/cascader/index.tsx +3 -2
- package/cascader/item.tsx +3 -1
- package/checkbox/checkbox.tsx +4 -2
- package/checkbox/checkboxGroup.tsx +1 -1
- package/checkbox/context.ts +3 -3
- package/collapse/index.tsx +1 -0
- package/collapse/item.tsx +3 -0
- package/collapsible/index.tsx +2 -2
- package/configProvider/context.tsx +1 -1
- package/datePicker/datePicker.tsx +2 -1
- package/descriptions/index.tsx +2 -1
- package/descriptions/item.tsx +4 -1
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +7563 -3604
- 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/dropdown/context.ts +6 -1
- package/dropdown/dropdownItem.tsx +2 -1
- package/dropdown/dropdownTitle.tsx +2 -1
- package/dropdown/index.tsx +3 -1
- package/empty/index.tsx +1 -1
- package/form/arrayField.tsx +1 -0
- package/form/baseForm.tsx +3 -2
- package/form/group.tsx +2 -0
- package/form/hoc/withField.tsx +1 -1
- package/form/label.tsx +1 -0
- package/form/section.tsx +1 -1
- package/form/slot.tsx +2 -0
- package/grid/col.tsx +3 -1
- package/grid/row.tsx +5 -1
- package/layout/Sider.tsx +3 -1
- package/layout/index.tsx +2 -0
- package/layout/layout-context.ts +1 -1
- package/lib/cjs/_base/baseComponent.d.ts +2 -1
- package/lib/cjs/_portal/index.d.ts +3 -1
- package/lib/cjs/anchor/index.d.ts +2 -1
- package/lib/cjs/anchor/link.d.ts +3 -2
- package/lib/cjs/autoComplete/index.d.ts +2 -2
- package/lib/cjs/avatar/avatarGroup.d.ts +1 -1
- package/lib/cjs/avatar/interface.d.ts +2 -2
- package/lib/cjs/backtop/index.d.ts +1 -0
- package/lib/cjs/badge/index.d.ts +4 -2
- package/lib/cjs/banner/index.d.ts +2 -1
- package/lib/cjs/breadcrumb/bread-context.d.ts +2 -2
- package/lib/cjs/breadcrumb/index.d.ts +2 -2
- package/lib/cjs/breadcrumb/item.d.ts +15 -3
- package/lib/cjs/button/Button.d.ts +2 -1
- package/lib/cjs/button/buttonGroup.d.ts +1 -0
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/calendar/timeCol.d.ts +1 -1
- package/lib/cjs/card/cardGroup.d.ts +1 -0
- package/lib/cjs/card/index.d.ts +2 -1
- package/lib/cjs/cascader/index.d.ts +5 -3
- package/lib/cjs/cascader/item.d.ts +3 -1
- package/lib/cjs/checkbox/checkbox.d.ts +5 -11
- package/lib/cjs/checkbox/checkbox.js +1 -1
- package/lib/cjs/checkbox/checkboxGroup.d.ts +1 -1
- package/lib/cjs/checkbox/checkboxInner.d.ts +1 -10
- package/lib/cjs/checkbox/context.d.ts +3 -3
- package/lib/cjs/collapse/index.d.ts +1 -0
- package/lib/cjs/collapse/item.d.ts +2 -0
- package/lib/cjs/collapsible/index.d.ts +1 -1
- package/lib/cjs/configProvider/index.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +3 -1
- package/lib/cjs/datePicker/insetInput.d.ts +1 -0
- package/lib/cjs/descriptions/index.d.ts +4 -3
- package/lib/cjs/descriptions/item.d.ts +4 -1
- package/lib/cjs/dropdown/context.d.ts +5 -3
- package/lib/cjs/dropdown/dropdownItem.d.ts +3 -3
- package/lib/cjs/dropdown/dropdownMenu.d.ts +1 -0
- package/lib/cjs/dropdown/dropdownTitle.d.ts +3 -3
- package/lib/cjs/dropdown/index.d.ts +3 -3
- package/lib/cjs/empty/index.d.ts +1 -1
- package/lib/cjs/form/arrayField.d.ts +1 -0
- package/lib/cjs/form/baseForm.d.ts +2 -2
- package/lib/cjs/form/baseForm.js +1 -1
- package/lib/cjs/form/errorMessage.d.ts +1 -1
- package/lib/cjs/form/group.d.ts +3 -1
- package/lib/cjs/form/label.d.ts +1 -0
- package/lib/cjs/form/section.d.ts +1 -1
- package/lib/cjs/form/slot.js +2 -0
- package/lib/cjs/grid/col.d.ts +3 -3
- package/lib/cjs/grid/row.d.ts +4 -3
- package/lib/cjs/iconButton/index.d.ts +1 -1
- package/lib/cjs/inputNumber/index.d.ts +1 -1
- package/lib/cjs/layout/Sider.d.ts +4 -1
- package/lib/cjs/layout/index.d.ts +2 -0
- package/lib/cjs/list/index.d.ts +1 -0
- package/lib/cjs/list/item.d.ts +5 -1
- package/lib/cjs/list/item.js +5 -1
- package/lib/cjs/modal/Modal.d.ts +1 -0
- package/lib/cjs/modal/ModalContent.d.ts +7 -2
- package/lib/cjs/modal/confirm.d.ts +10 -5
- package/lib/cjs/modal/useModal/index.d.ts +1 -0
- package/lib/cjs/navigation/Footer.d.ts +3 -5
- package/lib/cjs/navigation/Header.d.ts +4 -6
- package/lib/cjs/navigation/Item.d.ts +4 -6
- package/lib/cjs/navigation/OpenIconTransition.d.ts +2 -1
- package/lib/cjs/navigation/SubNav.d.ts +3 -5
- package/lib/cjs/navigation/SubNav.js +2 -2
- package/lib/cjs/navigation/SubNavTransition.d.ts +1 -1
- package/lib/cjs/navigation/index.d.ts +2 -2
- package/lib/cjs/navigation/nav-context.d.ts +21 -5
- package/lib/cjs/notification/NoticeTransition.d.ts +2 -2
- package/lib/cjs/notification/index.d.ts +3 -1
- package/lib/cjs/notification/notice.d.ts +3 -1
- package/lib/cjs/notification/useNotification/index.d.ts +1 -0
- package/lib/cjs/overflowList/intersectionObserver.d.ts +3 -2
- package/lib/cjs/pagination/index.d.ts +3 -1
- package/lib/cjs/pagination/index.js +15 -11
- package/lib/cjs/popconfirm/index.d.ts +4 -2
- package/lib/cjs/popover/index.d.ts +4 -2
- package/lib/cjs/progress/index.d.ts +1 -1
- package/lib/cjs/radio/radio.d.ts +1 -0
- package/lib/cjs/radio/radioGroup.d.ts +1 -0
- package/lib/cjs/select/index.d.ts +3 -1
- package/lib/cjs/select/optionGroup.d.ts +1 -1
- package/lib/cjs/sideSheet/SideSheetContent.d.ts +1 -0
- package/lib/cjs/sideSheet/SideSheetTransition.d.ts +1 -1
- package/lib/cjs/sideSheet/index.d.ts +3 -1
- package/lib/cjs/table/Body/BaseRow.d.ts +1 -1
- package/lib/cjs/table/Body/ExpandedRow.d.ts +4 -2
- package/lib/cjs/table/Body/SectionRow.d.ts +3 -1
- package/lib/cjs/table/Column.d.ts +1 -1
- package/lib/cjs/table/ColumnShape.d.ts +1 -1
- package/lib/cjs/table/CustomExpandIcon.d.ts +1 -1
- package/lib/cjs/table/Table.d.ts +10 -8
- package/lib/cjs/table/TableCell.d.ts +5 -3
- package/lib/cjs/table/TableHeaderRow.d.ts +3 -1
- package/lib/cjs/table/index.d.ts +4 -4
- package/lib/cjs/table/table-context.d.ts +7 -6
- package/lib/cjs/tabs/TabPane.d.ts +3 -1
- package/lib/cjs/tabs/interface.d.ts +2 -1
- package/lib/cjs/tag/group.d.ts +1 -1
- package/lib/cjs/timePicker/Combobox.d.ts +1 -0
- package/lib/cjs/timeline/index.d.ts +2 -1
- package/lib/cjs/timeline/item.d.ts +1 -0
- package/lib/cjs/toast/ToastTransition.d.ts +1 -1
- package/lib/cjs/toast/index.d.ts +8 -16
- package/lib/cjs/toast/toast.d.ts +4 -2
- package/lib/cjs/toast/useToast/index.d.ts +1 -0
- package/lib/cjs/tooltip/index.d.ts +4 -2
- package/lib/cjs/transfer/index.d.ts +3 -3
- package/lib/cjs/transfer/index.js +2 -1
- package/lib/cjs/tree/index.d.ts +13 -11
- package/lib/cjs/tree/nodeList.d.ts +1 -1
- package/lib/cjs/tree/treeContext.d.ts +10 -10
- package/lib/cjs/tree/treeNode.d.ts +11 -9
- package/lib/cjs/tree/treeNode.js +2 -0
- package/lib/cjs/treeSelect/index.d.ts +7 -5
- package/lib/cjs/typography/copyable.d.ts +1 -1
- package/lib/cjs/upload/index.d.ts +2 -2
- package/lib/es/_base/baseComponent.d.ts +2 -1
- package/lib/es/_portal/index.d.ts +3 -1
- package/lib/es/anchor/index.d.ts +2 -1
- package/lib/es/anchor/link.d.ts +3 -2
- package/lib/es/autoComplete/index.d.ts +2 -2
- package/lib/es/avatar/avatarGroup.d.ts +1 -1
- package/lib/es/avatar/interface.d.ts +2 -2
- package/lib/es/backtop/index.d.ts +1 -0
- package/lib/es/badge/index.d.ts +4 -2
- package/lib/es/banner/index.d.ts +2 -1
- package/lib/es/breadcrumb/bread-context.d.ts +2 -2
- package/lib/es/breadcrumb/index.d.ts +2 -2
- package/lib/es/breadcrumb/item.d.ts +15 -3
- package/lib/es/button/Button.d.ts +2 -1
- package/lib/es/button/buttonGroup.d.ts +1 -0
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/calendar/timeCol.d.ts +1 -1
- package/lib/es/card/cardGroup.d.ts +1 -0
- package/lib/es/card/index.d.ts +2 -1
- package/lib/es/cascader/index.d.ts +5 -3
- package/lib/es/cascader/item.d.ts +3 -1
- package/lib/es/checkbox/checkbox.d.ts +5 -11
- package/lib/es/checkbox/checkbox.js +1 -1
- package/lib/es/checkbox/checkboxGroup.d.ts +1 -1
- package/lib/es/checkbox/checkboxInner.d.ts +1 -10
- package/lib/es/checkbox/context.d.ts +3 -3
- package/lib/es/collapse/index.d.ts +1 -0
- package/lib/es/collapse/item.d.ts +2 -0
- package/lib/es/collapsible/index.d.ts +1 -1
- package/lib/es/configProvider/index.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +3 -1
- package/lib/es/datePicker/insetInput.d.ts +1 -0
- package/lib/es/descriptions/index.d.ts +4 -3
- package/lib/es/descriptions/item.d.ts +4 -1
- package/lib/es/dropdown/context.d.ts +5 -3
- package/lib/es/dropdown/dropdownItem.d.ts +3 -3
- package/lib/es/dropdown/dropdownMenu.d.ts +1 -0
- package/lib/es/dropdown/dropdownTitle.d.ts +3 -3
- package/lib/es/dropdown/index.d.ts +3 -3
- package/lib/es/empty/index.d.ts +1 -1
- package/lib/es/form/arrayField.d.ts +1 -0
- package/lib/es/form/baseForm.d.ts +2 -2
- package/lib/es/form/baseForm.js +1 -1
- package/lib/es/form/errorMessage.d.ts +1 -1
- package/lib/es/form/group.d.ts +3 -1
- package/lib/es/form/label.d.ts +1 -0
- package/lib/es/form/section.d.ts +1 -1
- package/lib/es/form/slot.js +2 -0
- package/lib/es/grid/col.d.ts +3 -3
- package/lib/es/grid/row.d.ts +4 -3
- package/lib/es/iconButton/index.d.ts +1 -1
- package/lib/es/inputNumber/index.d.ts +1 -1
- package/lib/es/layout/Sider.d.ts +4 -1
- package/lib/es/layout/index.d.ts +2 -0
- package/lib/es/list/index.d.ts +1 -0
- package/lib/es/list/item.d.ts +5 -1
- package/lib/es/list/item.js +5 -1
- package/lib/es/modal/Modal.d.ts +1 -0
- package/lib/es/modal/ModalContent.d.ts +7 -2
- package/lib/es/modal/confirm.d.ts +10 -5
- package/lib/es/modal/useModal/index.d.ts +1 -0
- package/lib/es/navigation/Footer.d.ts +3 -5
- package/lib/es/navigation/Header.d.ts +4 -6
- package/lib/es/navigation/Item.d.ts +4 -6
- package/lib/es/navigation/OpenIconTransition.d.ts +2 -1
- package/lib/es/navigation/SubNav.d.ts +3 -5
- package/lib/es/navigation/SubNav.js +2 -2
- package/lib/es/navigation/SubNavTransition.d.ts +1 -1
- package/lib/es/navigation/index.d.ts +2 -2
- package/lib/es/navigation/nav-context.d.ts +21 -5
- package/lib/es/notification/NoticeTransition.d.ts +2 -2
- package/lib/es/notification/index.d.ts +3 -1
- package/lib/es/notification/notice.d.ts +3 -1
- package/lib/es/notification/useNotification/index.d.ts +1 -0
- package/lib/es/overflowList/intersectionObserver.d.ts +3 -2
- package/lib/es/pagination/index.d.ts +3 -1
- package/lib/es/pagination/index.js +15 -11
- package/lib/es/popconfirm/index.d.ts +4 -2
- package/lib/es/popover/index.d.ts +4 -2
- package/lib/es/progress/index.d.ts +1 -1
- package/lib/es/radio/radio.d.ts +1 -0
- package/lib/es/radio/radioGroup.d.ts +1 -0
- package/lib/es/select/index.d.ts +3 -1
- package/lib/es/select/optionGroup.d.ts +1 -1
- package/lib/es/sideSheet/SideSheetContent.d.ts +1 -0
- package/lib/es/sideSheet/SideSheetTransition.d.ts +1 -1
- package/lib/es/sideSheet/index.d.ts +3 -1
- package/lib/es/table/Body/BaseRow.d.ts +1 -1
- package/lib/es/table/Body/ExpandedRow.d.ts +4 -2
- package/lib/es/table/Body/SectionRow.d.ts +3 -1
- package/lib/es/table/Column.d.ts +1 -1
- package/lib/es/table/ColumnShape.d.ts +1 -1
- package/lib/es/table/CustomExpandIcon.d.ts +1 -1
- package/lib/es/table/Table.d.ts +10 -8
- package/lib/es/table/TableCell.d.ts +5 -3
- package/lib/es/table/TableHeaderRow.d.ts +3 -1
- package/lib/es/table/index.d.ts +4 -4
- package/lib/es/table/table-context.d.ts +7 -6
- package/lib/es/tabs/TabPane.d.ts +3 -1
- package/lib/es/tabs/interface.d.ts +2 -1
- package/lib/es/tag/group.d.ts +1 -1
- package/lib/es/timePicker/Combobox.d.ts +1 -0
- package/lib/es/timeline/index.d.ts +2 -1
- package/lib/es/timeline/item.d.ts +1 -0
- package/lib/es/toast/ToastTransition.d.ts +1 -1
- package/lib/es/toast/index.d.ts +8 -16
- package/lib/es/toast/toast.d.ts +4 -2
- package/lib/es/toast/useToast/index.d.ts +1 -0
- package/lib/es/tooltip/index.d.ts +4 -2
- package/lib/es/transfer/index.d.ts +3 -3
- package/lib/es/transfer/index.js +3 -1
- package/lib/es/tree/index.d.ts +13 -11
- package/lib/es/tree/nodeList.d.ts +1 -1
- package/lib/es/tree/treeContext.d.ts +10 -10
- package/lib/es/tree/treeNode.d.ts +11 -9
- package/lib/es/tree/treeNode.js +2 -0
- package/lib/es/treeSelect/index.d.ts +7 -5
- package/lib/es/typography/copyable.d.ts +1 -1
- package/lib/es/upload/index.d.ts +2 -2
- package/list/index.tsx +1 -0
- package/list/item.tsx +6 -1
- package/modal/Modal.tsx +1 -0
- package/modal/ModalContent.tsx +9 -3
- package/navigation/Footer.tsx +3 -1
- package/navigation/Header.tsx +3 -1
- package/navigation/Item.tsx +4 -3
- package/navigation/OpenIconTransition.tsx +2 -1
- package/navigation/SubNav.tsx +4 -3
- package/navigation/SubNavTransition.tsx +1 -1
- package/navigation/nav-context.ts +22 -1
- package/notification/NoticeTransition.tsx +1 -1
- package/notification/index.tsx +3 -1
- package/notification/notice.tsx +3 -1
- package/overflowList/intersectionObserver.tsx +2 -1
- package/package.json +9 -9
- package/pagination/index.tsx +4 -1
- package/popconfirm/index.tsx +3 -1
- package/popover/index.tsx +3 -1
- package/radio/radio.tsx +1 -0
- package/radio/radioGroup.tsx +1 -0
- package/select/index.tsx +2 -1
- package/select/utils.tsx +1 -1
- package/sideSheet/SideSheetContent.tsx +1 -0
- package/sideSheet/SideSheetTransition.tsx +1 -1
- package/sideSheet/index.tsx +3 -2
- package/table/Body/ExpandedRow.tsx +3 -1
- package/table/Body/SectionRow.tsx +3 -1
- package/table/Body/index.tsx +3 -2
- package/table/Table.tsx +4 -3
- package/table/TableCell.tsx +6 -4
- package/table/TableHeaderRow.tsx +3 -1
- package/table/table-context.ts +10 -6
- package/tabs/TabPane.tsx +2 -0
- package/tabs/index.tsx +2 -2
- package/tabs/interface.ts +2 -1
- package/tag/group.tsx +5 -5
- package/timePicker/TimePicker.tsx +1 -1
- package/timeline/index.tsx +1 -0
- package/timeline/item.tsx +1 -0
- package/toast/ToastTransition.tsx +1 -1
- package/toast/toast.tsx +3 -1
- package/tooltip/index.tsx +2 -1
- package/transfer/index.tsx +3 -1
- package/tree/index.tsx +12 -11
- package/tree/treeContext.tsx +10 -10
- package/tree/treeNode.tsx +10 -7
- package/treeSelect/index.tsx +5 -4
- package/upload/index.tsx +1 -1
|
@@ -9,6 +9,7 @@ export { CollapsePanelProps } from './item';
|
|
|
9
9
|
export interface CollapseReactProps extends CollapseProps {
|
|
10
10
|
expandIcon?: React.ReactNode;
|
|
11
11
|
collapseIcon?: React.ReactNode;
|
|
12
|
+
children?: React.ReactNode | undefined;
|
|
12
13
|
style?: CSSProperties;
|
|
13
14
|
onChange?: (activeKey: CollapseProps['activeKey'], e: React.MouseEvent) => void;
|
|
14
15
|
}
|
|
@@ -6,6 +6,7 @@ export interface CollapsePanelProps {
|
|
|
6
6
|
extra?: ReactNode;
|
|
7
7
|
header?: ReactNode;
|
|
8
8
|
className?: string;
|
|
9
|
+
children?: React.ReactNode | undefined;
|
|
9
10
|
reCalcKey?: number | string;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
}
|
|
@@ -19,6 +20,7 @@ export default class CollapsePanel extends PureComponent<CollapsePanelProps> {
|
|
|
19
20
|
reCalcKey: PropTypes.Requireable<string | number>;
|
|
20
21
|
};
|
|
21
22
|
private ariaID;
|
|
23
|
+
context: CollapseContextType;
|
|
22
24
|
renderHeader(active: boolean, expandIconEnable?: boolean): JSX.Element;
|
|
23
25
|
render(): JSX.Element;
|
|
24
26
|
}
|
|
@@ -14,6 +14,6 @@ export default class ConfigProvider extends React.Component<ConfigProviderProps>
|
|
|
14
14
|
locale: import("../locale/interface").Locale;
|
|
15
15
|
direction: string;
|
|
16
16
|
};
|
|
17
|
-
renderChilren(): React.
|
|
17
|
+
renderChilren(): string | number | boolean | React.ReactFragment | JSX.Element;
|
|
18
18
|
render(): JSX.Element;
|
|
19
19
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ContextValue } from '../configProvider/context';
|
|
3
4
|
import DatePickerFoundation, { DatePickerAdapter, DatePickerFoundationProps, DatePickerFoundationState, DayStatusType, PresetType, Type, RangeType } from '@douyinfe/semi-foundation/lib/es/datePicker/foundation';
|
|
4
5
|
import BaseComponent from '../_base/baseComponent';
|
|
5
6
|
import { DateInputProps } from './dateInput';
|
|
@@ -33,7 +34,7 @@ export interface DatePickerProps extends DatePickerFoundationProps {
|
|
|
33
34
|
}
|
|
34
35
|
export declare type DatePickerState = DatePickerFoundationState;
|
|
35
36
|
export default class DatePicker extends BaseComponent<DatePickerProps, DatePickerState> {
|
|
36
|
-
static contextType: React.Context<
|
|
37
|
+
static contextType: React.Context<ContextValue>;
|
|
37
38
|
static propTypes: {
|
|
38
39
|
'aria-describedby': PropTypes.Requireable<string>;
|
|
39
40
|
'aria-errormessage': PropTypes.Requireable<string>;
|
|
@@ -157,6 +158,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
157
158
|
clickOutSideHandler: (e: MouseEvent) => void;
|
|
158
159
|
_mounted: boolean;
|
|
159
160
|
foundation: DatePickerFoundation;
|
|
161
|
+
context: ContextValue;
|
|
160
162
|
constructor(props: DatePickerProps);
|
|
161
163
|
get adapter(): DatePickerAdapter;
|
|
162
164
|
isRangeType(type: Type, triggerRender: DatePickerProps['triggerRender']): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import '@douyinfe/semi-foundation/lib/es/descriptions/descriptions.css';
|
|
4
|
-
import { DescriptionsAlign } from './descriptions-context';
|
|
4
|
+
import { DescriptionsAlign, DescriptionsContextValue } from './descriptions-context';
|
|
5
5
|
import Item from './item';
|
|
6
6
|
export { DescriptionsItemProps } from './item';
|
|
7
7
|
export declare type DescriptionsSize = 'small' | 'medium' | 'large';
|
|
@@ -16,11 +16,12 @@ export interface DescriptionsProps {
|
|
|
16
16
|
size?: DescriptionsSize;
|
|
17
17
|
style?: React.CSSProperties;
|
|
18
18
|
className?: string;
|
|
19
|
+
children?: React.ReactNode | undefined;
|
|
19
20
|
data?: Data[];
|
|
20
21
|
}
|
|
21
22
|
declare class Descriptions extends PureComponent<DescriptionsProps> {
|
|
22
23
|
static Item: typeof Item;
|
|
23
|
-
static contextType: React.Context<
|
|
24
|
+
static contextType: React.Context<DescriptionsContextValue>;
|
|
24
25
|
static propTypes: {
|
|
25
26
|
align: PropTypes.Requireable<string>;
|
|
26
27
|
row: PropTypes.Requireable<boolean>;
|
|
@@ -29,7 +30,7 @@ declare class Descriptions extends PureComponent<DescriptionsProps> {
|
|
|
29
30
|
className: PropTypes.Requireable<string>;
|
|
30
31
|
data: PropTypes.Requireable<PropTypes.InferProps<{
|
|
31
32
|
key: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
32
|
-
value: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
33
|
+
value: PropTypes.Requireable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>;
|
|
33
34
|
hidden: PropTypes.Requireable<boolean>;
|
|
34
35
|
className: PropTypes.Requireable<string>;
|
|
35
36
|
style: PropTypes.Requireable<object>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import '@douyinfe/semi-foundation/lib/es/descriptions/descriptions.css';
|
|
4
|
+
import { DescriptionsContextValue } from './descriptions-context';
|
|
4
5
|
export interface DescriptionsItemProps {
|
|
5
6
|
hidden?: boolean;
|
|
6
7
|
className?: string;
|
|
8
|
+
children?: React.ReactNode | undefined | (() => React.ReactNode);
|
|
7
9
|
style?: React.CSSProperties;
|
|
8
10
|
itemKey?: React.ReactNode;
|
|
9
11
|
}
|
|
@@ -14,6 +16,7 @@ export default class Item extends PureComponent<DescriptionsItemProps> {
|
|
|
14
16
|
className: PropTypes.Requireable<string>;
|
|
15
17
|
style: PropTypes.Requireable<object>;
|
|
16
18
|
};
|
|
17
|
-
static contextType: React.Context<
|
|
19
|
+
static contextType: React.Context<DescriptionsContextValue>;
|
|
20
|
+
context: DescriptionsContextValue;
|
|
18
21
|
render(): JSX.Element;
|
|
19
22
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
level
|
|
4
|
-
|
|
2
|
+
export interface DropdownContextType {
|
|
3
|
+
level?: number;
|
|
4
|
+
showTick?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const DropdownContext: React.Context<DropdownContextType>;
|
|
5
7
|
export default DropdownContext;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { DropdownContextType } from './context';
|
|
3
4
|
import BaseComponent, { BaseProps } from '../_base/baseComponent';
|
|
4
5
|
export declare type Type = 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger';
|
|
5
6
|
export interface DropdownItemProps extends BaseProps {
|
|
@@ -31,9 +32,8 @@ declare class DropdownItem extends BaseComponent<DropdownItemProps> {
|
|
|
31
32
|
active: PropTypes.Requireable<boolean>;
|
|
32
33
|
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
33
34
|
};
|
|
34
|
-
static contextType: React.Context<
|
|
35
|
-
|
|
36
|
-
}>;
|
|
35
|
+
static contextType: React.Context<DropdownContextType>;
|
|
36
|
+
context: DropdownContextType;
|
|
37
37
|
static defaultProps: {
|
|
38
38
|
disabled: boolean;
|
|
39
39
|
divided: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { DropdownContextType } from './context';
|
|
3
4
|
import { BaseProps } from '../_base/baseComponent';
|
|
4
5
|
export declare type DropdownTitleProps = BaseProps;
|
|
5
6
|
declare class DropdownTitle extends PureComponent<DropdownTitleProps> {
|
|
@@ -8,9 +9,8 @@ declare class DropdownTitle extends PureComponent<DropdownTitleProps> {
|
|
|
8
9
|
className: PropTypes.Requireable<string>;
|
|
9
10
|
style: PropTypes.Requireable<object>;
|
|
10
11
|
};
|
|
11
|
-
static contextType: React.Context<
|
|
12
|
-
|
|
13
|
-
}>;
|
|
12
|
+
static contextType: React.Context<DropdownContextType>;
|
|
13
|
+
context: DropdownContextType;
|
|
14
14
|
render(): JSX.Element;
|
|
15
15
|
}
|
|
16
16
|
export default DropdownTitle;
|
|
@@ -6,6 +6,7 @@ import DropdownMenu from './dropdownMenu';
|
|
|
6
6
|
import DropdownItem, { DropdownItemProps } from './dropdownItem';
|
|
7
7
|
import { DropdownDividerProps } from './dropdownDivider';
|
|
8
8
|
import DropdownTitle, { DropdownTitleProps } from './dropdownTitle';
|
|
9
|
+
import { DropdownContextType } from './context';
|
|
9
10
|
import '@douyinfe/semi-foundation/lib/es/dropdown/dropdown.css';
|
|
10
11
|
import { Motion } from '../_base/base';
|
|
11
12
|
export { DropdownDividerProps } from './dropdownDivider';
|
|
@@ -51,9 +52,7 @@ declare class Dropdown extends BaseComponent<DropdownProps, DropdownState> {
|
|
|
51
52
|
static Item: typeof DropdownItem;
|
|
52
53
|
static Divider: React.FC<import("../_base/baseComponent").BaseProps>;
|
|
53
54
|
static Title: typeof DropdownTitle;
|
|
54
|
-
static contextType: React.Context<
|
|
55
|
-
level: number;
|
|
56
|
-
}>;
|
|
55
|
+
static contextType: React.Context<DropdownContextType>;
|
|
57
56
|
static propTypes: {
|
|
58
57
|
render: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
59
58
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -86,6 +85,7 @@ declare class Dropdown extends BaseComponent<DropdownProps, DropdownState> {
|
|
|
86
85
|
showTick: boolean;
|
|
87
86
|
};
|
|
88
87
|
constructor(props: DropdownProps);
|
|
88
|
+
context: DropdownContextType;
|
|
89
89
|
get adapter(): {
|
|
90
90
|
setPopVisible: (popVisible: boolean) => void;
|
|
91
91
|
notifyVisibleChange: (visible: boolean) => void;
|
package/lib/es/empty/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ declare class ArrayFieldComponent extends Component<ArrayFieldProps, ArrayFieldS
|
|
|
22
22
|
cacheFieldValues: any[];
|
|
23
23
|
shouldUseInitValue: boolean;
|
|
24
24
|
cacheUpdateKey: string;
|
|
25
|
+
context: FormUpdaterContextType;
|
|
25
26
|
constructor(props: ArrayFieldProps, context: FormUpdaterContextType);
|
|
26
27
|
componentWillUnmount(): void;
|
|
27
28
|
componentDidUpdate(): void;
|
|
@@ -21,7 +21,7 @@ declare class Form extends BaseComponent<BaseFormProps, BaseFormState> {
|
|
|
21
21
|
onValueChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
22
|
initValues: PropTypes.Requireable<object>;
|
|
23
23
|
getFormApi: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
-
component: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
24
|
+
component: PropTypes.Requireable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>;
|
|
25
25
|
render: PropTypes.Requireable<(...args: any[]) => any>;
|
|
26
26
|
validateFields: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
27
|
style: PropTypes.Requireable<object>;
|
|
@@ -149,7 +149,7 @@ declare class Form extends BaseComponent<BaseFormProps, BaseFormState> {
|
|
|
149
149
|
constructor(props: BaseFormProps);
|
|
150
150
|
componentWillUnmount(): void;
|
|
151
151
|
get adapter(): BaseFormAdapter<BaseFormProps, BaseFormState>;
|
|
152
|
-
get content():
|
|
152
|
+
get content(): React.ReactNode;
|
|
153
153
|
submit(e: React.FormEvent<HTMLFormElement>): void;
|
|
154
154
|
reset(e: React.FormEvent<HTMLFormElement>): void;
|
|
155
155
|
render(): JSX.Element;
|
package/lib/es/form/baseForm.js
CHANGED
|
@@ -14,7 +14,7 @@ export interface ErrorMessageProps {
|
|
|
14
14
|
}
|
|
15
15
|
export default class ErrorMessage extends PureComponent<ErrorMessageProps> {
|
|
16
16
|
static propTypes: {
|
|
17
|
-
error: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
17
|
+
error: PropTypes.Requireable<any[] | PropTypes.ReactNodeLike>;
|
|
18
18
|
className: PropTypes.Requireable<string>;
|
|
19
19
|
style: PropTypes.Requireable<object>;
|
|
20
20
|
validateStatus: PropTypes.Requireable<string>;
|
package/lib/es/form/group.d.ts
CHANGED
|
@@ -2,12 +2,14 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import { LabelProps } from './label';
|
|
3
3
|
import { InputGroupProps as BacisInputGroupProps } from '../input/inputGroup';
|
|
4
4
|
import { BaseFormProps } from './interface';
|
|
5
|
+
import { FormUpdaterContextType } from '@douyinfe/semi-foundation/lib/es/form/interface';
|
|
5
6
|
export interface InputGroupProps extends BacisInputGroupProps {
|
|
6
7
|
label?: LabelProps;
|
|
7
8
|
labelPosition?: 'left' | 'top';
|
|
8
9
|
}
|
|
9
10
|
declare class FormInputGroup extends Component<InputGroupProps> {
|
|
10
|
-
static contextType: React.Context<
|
|
11
|
+
static contextType: React.Context<FormUpdaterContextType>;
|
|
12
|
+
context: FormUpdaterContextType;
|
|
11
13
|
renderLabel(label: LabelProps, formProps: BaseFormProps): JSX.Element;
|
|
12
14
|
render(): JSX.Element;
|
|
13
15
|
}
|
package/lib/es/form/label.d.ts
CHANGED
package/lib/es/form/section.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface SectionProps {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
style?: React.CSSProperties;
|
|
6
6
|
text?: React.ReactNode | string;
|
|
7
|
-
children?: React.ReactNode;
|
|
7
|
+
children?: React.ReactNode | undefined;
|
|
8
8
|
}
|
|
9
9
|
export default class Section extends PureComponent<SectionProps> {
|
|
10
10
|
static propTypes: {
|
package/lib/es/form/slot.js
CHANGED
|
@@ -72,12 +72,14 @@ const FormSlot = props => {
|
|
|
72
72
|
break;
|
|
73
73
|
|
|
74
74
|
case _isString(label) || _isNumber(label):
|
|
75
|
+
// @ts-ignore skip type check, the actual type is already determined
|
|
75
76
|
label = {
|
|
76
77
|
text: label
|
|
77
78
|
};
|
|
78
79
|
break;
|
|
79
80
|
|
|
80
81
|
case /*#__PURE__*/React.isValidElement(label):
|
|
82
|
+
// @ts-ignore skip type check, the actual type is already determined
|
|
81
83
|
label = {
|
|
82
84
|
text: label
|
|
83
85
|
};
|
package/lib/es/grid/col.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { RowContextType } from './row';
|
|
6
7
|
export interface ColSize {
|
|
7
8
|
span?: number;
|
|
8
9
|
order?: number;
|
|
@@ -28,9 +29,7 @@ export interface ColProps {
|
|
|
28
29
|
xxl?: number | ColSize;
|
|
29
30
|
}
|
|
30
31
|
declare class Col extends React.Component<ColProps> {
|
|
31
|
-
static contextType: React.Context<
|
|
32
|
-
gutters: import("./row").Gutter | [import("./row").Gutter, import("./row").Gutter];
|
|
33
|
-
}>;
|
|
32
|
+
static contextType: React.Context<RowContextType>;
|
|
34
33
|
static propTypes: {
|
|
35
34
|
span: PropTypes.Requireable<number>;
|
|
36
35
|
order: PropTypes.Requireable<number>;
|
|
@@ -50,6 +49,7 @@ declare class Col extends React.Component<ColProps> {
|
|
|
50
49
|
static defaultProps: {
|
|
51
50
|
prefixCls: string;
|
|
52
51
|
};
|
|
52
|
+
context: RowContextType;
|
|
53
53
|
render(): JSX.Element;
|
|
54
54
|
}
|
|
55
55
|
export default Col;
|
package/lib/es/grid/row.d.ts
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import '@douyinfe/semi-foundation/lib/es/grid/grid.css';
|
|
7
|
-
export
|
|
8
|
-
gutters
|
|
9
|
-
}
|
|
7
|
+
export interface RowContextType {
|
|
8
|
+
gutters?: Gutter | [Gutter, Gutter];
|
|
9
|
+
}
|
|
10
|
+
export declare const RowContext: React.Context<RowContextType>;
|
|
10
11
|
export declare type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
11
12
|
export declare type Gutter = number | Partial<Record<Breakpoint, number>>;
|
|
12
13
|
export interface RowProps {
|
|
@@ -31,7 +31,7 @@ declare class IconButton extends PureComponent<IconButtonProps> {
|
|
|
31
31
|
style: PropTypes.Requireable<object>;
|
|
32
32
|
loading: PropTypes.Requireable<boolean>;
|
|
33
33
|
prefixCls: PropTypes.Requireable<string>;
|
|
34
|
-
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
34
|
+
icon: PropTypes.Requireable<object | PropTypes.ReactNodeLike>;
|
|
35
35
|
iconSize: PropTypes.Requireable<string>;
|
|
36
36
|
noHorizontalPadding: PropTypes.Requireable<string | boolean | any[]>;
|
|
37
37
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -109,7 +109,7 @@ declare class InputNumber extends BaseComponent<InputNumberProps, InputNumberSta
|
|
|
109
109
|
handleMouseUp: (e: React.MouseEvent) => void;
|
|
110
110
|
handleMouseLeave: (e: React.MouseEvent) => void;
|
|
111
111
|
renderButtons: () => JSX.Element;
|
|
112
|
-
renderSuffix: () => React.
|
|
112
|
+
renderSuffix: () => string | number | boolean | React.ReactFragment | JSX.Element;
|
|
113
113
|
render(): JSX.Element;
|
|
114
114
|
}
|
|
115
115
|
declare const _default: React.ForwardRefExoticComponent<InputNumberProps & React.RefAttributes<HTMLInputElement>>;
|
package/lib/es/layout/Sider.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ContextType } from './layout-context';
|
|
3
4
|
export interface ResponsiveMap {
|
|
4
5
|
xs: string;
|
|
5
6
|
sm: string;
|
|
@@ -12,6 +13,7 @@ export interface SiderProps {
|
|
|
12
13
|
prefixCls?: string;
|
|
13
14
|
style?: CSSProperties;
|
|
14
15
|
className?: string;
|
|
16
|
+
children?: React.ReactNode | undefined;
|
|
15
17
|
breakpoint?: Array<keyof ResponsiveMap>;
|
|
16
18
|
onBreakpoint?: (screen: keyof ResponsiveMap, match: boolean) => void;
|
|
17
19
|
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
@@ -30,8 +32,9 @@ declare class Sider extends React.PureComponent<SiderProps> {
|
|
|
30
32
|
static defaultProps: {
|
|
31
33
|
prefixCls: string;
|
|
32
34
|
};
|
|
33
|
-
static contextType: React.Context<
|
|
35
|
+
static contextType: React.Context<ContextType>;
|
|
34
36
|
unRegisters: Array<() => void>;
|
|
37
|
+
context: ContextType;
|
|
35
38
|
uniqueId: string;
|
|
36
39
|
constructor(props: SiderProps);
|
|
37
40
|
componentDidMount(): void;
|
package/lib/es/layout/index.d.ts
CHANGED
|
@@ -10,11 +10,13 @@ export interface BasicProps {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
tagName?: keyof HTMLElementTagNameMap;
|
|
12
12
|
type?: string;
|
|
13
|
+
children?: React.ReactNode | undefined;
|
|
13
14
|
}
|
|
14
15
|
export interface BasicLayoutProps {
|
|
15
16
|
prefixCls?: string;
|
|
16
17
|
style?: CSSProperties;
|
|
17
18
|
className?: string;
|
|
19
|
+
children?: React.ReactNode | undefined;
|
|
18
20
|
hasSider?: boolean;
|
|
19
21
|
tagName?: keyof HTMLElementTagNameMap;
|
|
20
22
|
}
|
package/lib/es/list/index.d.ts
CHANGED
package/lib/es/list/item.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ListContextValue } from './list-context';
|
|
3
4
|
export interface ListItemProps {
|
|
4
5
|
extra?: React.ReactNode;
|
|
5
6
|
header?: React.ReactNode;
|
|
6
7
|
main?: React.ReactNode;
|
|
7
8
|
align?: 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
|
8
9
|
className?: string;
|
|
10
|
+
children?: React.ReactNode | undefined;
|
|
9
11
|
style?: React.CSSProperties;
|
|
10
12
|
onClick?: React.MouseEventHandler<HTMLLIElement>;
|
|
11
13
|
onRightClick?: React.MouseEventHandler<HTMLLIElement>;
|
|
@@ -13,13 +15,14 @@ export interface ListItemProps {
|
|
|
13
15
|
onMouseEnter?: React.MouseEventHandler<HTMLLIElement>;
|
|
14
16
|
}
|
|
15
17
|
export default class ListItem extends PureComponent<ListItemProps> {
|
|
16
|
-
static contextType: React.Context<
|
|
18
|
+
static contextType: React.Context<ListContextValue>;
|
|
17
19
|
static propTypes: {
|
|
18
20
|
extra: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
19
21
|
header: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
20
22
|
main: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
21
23
|
align: PropTypes.Requireable<string>;
|
|
22
24
|
className: PropTypes.Requireable<string>;
|
|
25
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
23
26
|
style: PropTypes.Requireable<object>;
|
|
24
27
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
28
|
onRightClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -31,6 +34,7 @@ export default class ListItem extends PureComponent<ListItemProps> {
|
|
|
31
34
|
onMouseEnter: (...args: any[]) => void;
|
|
32
35
|
onMouseLeave: (...args: any[]) => void;
|
|
33
36
|
};
|
|
37
|
+
context: ListContextValue;
|
|
34
38
|
wrapWithGrid(content: React.ReactNode): JSX.Element;
|
|
35
39
|
render(): JSX.Element;
|
|
36
40
|
}
|
package/lib/es/list/item.js
CHANGED
|
@@ -78,7 +78,10 @@ export default class ListItem extends PureComponent {
|
|
|
78
78
|
}, main) : null);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
let content =
|
|
81
|
+
let content =
|
|
82
|
+
/*#__PURE__*/
|
|
83
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
84
|
+
React.createElement("li", {
|
|
82
85
|
className: itemCls,
|
|
83
86
|
style: style,
|
|
84
87
|
onClick: handleClick,
|
|
@@ -104,6 +107,7 @@ ListItem.propTypes = {
|
|
|
104
107
|
main: PropTypes.node,
|
|
105
108
|
align: PropTypes.oneOf(strings.ALIGN),
|
|
106
109
|
className: PropTypes.string,
|
|
110
|
+
children: PropTypes.node,
|
|
107
111
|
style: PropTypes.object,
|
|
108
112
|
onClick: PropTypes.func,
|
|
109
113
|
onRightClick: PropTypes.func,
|
package/lib/es/modal/Modal.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare type ConfirmType = 'leftTop' | 'leftBottom' | 'rightTop' | 'right
|
|
|
10
10
|
export declare type Directions = 'ltr' | 'rtl';
|
|
11
11
|
export interface ModalReactProps extends ModalProps {
|
|
12
12
|
cancelButtonProps?: ButtonProps;
|
|
13
|
+
children?: React.ReactNode | undefined;
|
|
13
14
|
okButtonProps?: ButtonProps;
|
|
14
15
|
bodyStyle?: CSSProperties;
|
|
15
16
|
maskStyle?: CSSProperties;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ContextValue } from '../configProvider/context';
|
|
3
4
|
import BaseComponent from '../_base/baseComponent';
|
|
4
5
|
import ModalContentFoundation, { ModalContentAdapter, ModalContentProps, ModalContentState } from '@douyinfe/semi-foundation/lib/es/modal/modalContentFoundation';
|
|
5
|
-
export
|
|
6
|
-
|
|
6
|
+
export interface ModalContentReactProps extends ModalContentProps {
|
|
7
|
+
children?: React.ReactNode | undefined;
|
|
8
|
+
}
|
|
9
|
+
export default class ModalContent extends BaseComponent<ModalContentReactProps, ModalContentState> {
|
|
10
|
+
static contextType: React.Context<ContextValue>;
|
|
7
11
|
static propTypes: {
|
|
8
12
|
close: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
13
|
getContainerContext: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -21,6 +25,7 @@ export default class ModalContent extends BaseComponent<ModalContentProps, Modal
|
|
|
21
25
|
private timeoutId;
|
|
22
26
|
modalDialogRef: React.MutableRefObject<HTMLDivElement>;
|
|
23
27
|
foundation: ModalContentFoundation;
|
|
28
|
+
context: ContextValue;
|
|
24
29
|
constructor(props: ModalContentProps);
|
|
25
30
|
get adapter(): ModalContentAdapter;
|
|
26
31
|
componentDidMount(): void;
|
|
@@ -10,11 +10,12 @@ export default function confirm(props: ConfirmProps): {
|
|
|
10
10
|
};
|
|
11
11
|
export declare function withInfo(props: ModalReactProps): {
|
|
12
12
|
cancelButtonProps?: import("../button").BaseButtonProps;
|
|
13
|
+
children?: React.ReactNode;
|
|
13
14
|
okButtonProps?: import("../button").BaseButtonProps;
|
|
14
15
|
bodyStyle?: React.CSSProperties;
|
|
15
16
|
maskStyle?: React.CSSProperties;
|
|
16
17
|
style?: React.CSSProperties;
|
|
17
|
-
icon: React.
|
|
18
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
18
19
|
closeIcon?: React.ReactNode;
|
|
19
20
|
title?: React.ReactNode;
|
|
20
21
|
content?: React.ReactNode;
|
|
@@ -51,11 +52,12 @@ export declare function withInfo(props: ModalReactProps): {
|
|
|
51
52
|
};
|
|
52
53
|
export declare function withSuccess(props: ModalReactProps): {
|
|
53
54
|
cancelButtonProps?: import("../button").BaseButtonProps;
|
|
55
|
+
children?: React.ReactNode;
|
|
54
56
|
okButtonProps?: import("../button").BaseButtonProps;
|
|
55
57
|
bodyStyle?: React.CSSProperties;
|
|
56
58
|
maskStyle?: React.CSSProperties;
|
|
57
59
|
style?: React.CSSProperties;
|
|
58
|
-
icon: React.
|
|
60
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
59
61
|
closeIcon?: React.ReactNode;
|
|
60
62
|
title?: React.ReactNode;
|
|
61
63
|
content?: React.ReactNode;
|
|
@@ -92,11 +94,12 @@ export declare function withSuccess(props: ModalReactProps): {
|
|
|
92
94
|
};
|
|
93
95
|
export declare function withWarning(props: ModalReactProps): {
|
|
94
96
|
cancelButtonProps?: import("../button").BaseButtonProps;
|
|
97
|
+
children?: React.ReactNode;
|
|
95
98
|
okButtonProps?: import("../button").BaseButtonProps;
|
|
96
99
|
bodyStyle?: React.CSSProperties;
|
|
97
100
|
maskStyle?: React.CSSProperties;
|
|
98
101
|
style?: React.CSSProperties;
|
|
99
|
-
icon: React.
|
|
102
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
100
103
|
closeIcon?: React.ReactNode;
|
|
101
104
|
title?: React.ReactNode;
|
|
102
105
|
content?: React.ReactNode;
|
|
@@ -133,11 +136,12 @@ export declare function withWarning(props: ModalReactProps): {
|
|
|
133
136
|
};
|
|
134
137
|
export declare function withError(props: ModalReactProps): {
|
|
135
138
|
cancelButtonProps?: import("../button").BaseButtonProps;
|
|
139
|
+
children?: React.ReactNode;
|
|
136
140
|
okButtonProps?: import("../button").BaseButtonProps;
|
|
137
141
|
bodyStyle?: React.CSSProperties;
|
|
138
142
|
maskStyle?: React.CSSProperties;
|
|
139
143
|
style?: React.CSSProperties;
|
|
140
|
-
icon: React.
|
|
144
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
141
145
|
closeIcon?: React.ReactNode;
|
|
142
146
|
title?: React.ReactNode;
|
|
143
147
|
content?: React.ReactNode;
|
|
@@ -174,11 +178,12 @@ export declare function withError(props: ModalReactProps): {
|
|
|
174
178
|
};
|
|
175
179
|
export declare function withConfirm(props: ModalReactProps): {
|
|
176
180
|
cancelButtonProps?: import("../button").BaseButtonProps;
|
|
181
|
+
children?: React.ReactNode;
|
|
177
182
|
okButtonProps?: import("../button").BaseButtonProps;
|
|
178
183
|
bodyStyle?: React.CSSProperties;
|
|
179
184
|
maskStyle?: React.CSSProperties;
|
|
180
185
|
style?: React.CSSProperties;
|
|
181
|
-
icon: React.
|
|
186
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
182
187
|
closeIcon?: React.ReactNode;
|
|
183
188
|
title?: React.ReactNode;
|
|
184
189
|
content?: React.ReactNode;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import '@douyinfe/semi-foundation/lib/es/navigation/navigation.css';
|
|
4
|
+
import { NavContextType } from './nav-context';
|
|
4
5
|
import { BaseProps } from '../_base/baseComponent';
|
|
5
6
|
export interface NavFooterProps extends BaseProps {
|
|
6
7
|
collapseButton?: React.ReactNode | boolean;
|
|
7
8
|
collapseText?: (collapsed?: boolean) => React.ReactNode;
|
|
8
9
|
}
|
|
9
10
|
export default class NavFooter extends PureComponent<NavFooterProps> {
|
|
10
|
-
static contextType: React.Context<
|
|
11
|
-
isCollapsed: boolean;
|
|
12
|
-
selectedKeys: any[];
|
|
13
|
-
openKeys: any[];
|
|
14
|
-
}>;
|
|
11
|
+
static contextType: React.Context<NavContextType>;
|
|
15
12
|
static propTypes: {
|
|
16
13
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
17
14
|
style: PropTypes.Requireable<object>;
|
|
@@ -22,6 +19,7 @@ export default class NavFooter extends PureComponent<NavFooterProps> {
|
|
|
22
19
|
static defaultProps: {
|
|
23
20
|
collapseButton: boolean;
|
|
24
21
|
};
|
|
22
|
+
context: NavContextType;
|
|
25
23
|
renderCollapseButton: () => JSX.Element;
|
|
26
24
|
render(): JSX.Element;
|
|
27
25
|
}
|