@douyinfe/semi-ui 2.43.0-beta.0 → 2.43.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umd/semi-ui.js +44 -27
- 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/calendar/monthCalendar.js +5 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/image/preview.js +1 -1
- package/lib/cjs/modal/confirm.d.ts +3 -3
- package/lib/cjs/popover/index.d.ts +1 -1
- package/lib/cjs/tree/interface.d.ts +1 -1
- package/lib/cjs/treeSelect/index.d.ts +1 -1
- package/lib/es/calendar/monthCalendar.js +5 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/image/preview.js +1 -1
- package/lib/es/modal/confirm.d.ts +3 -3
- package/lib/es/popover/index.d.ts +1 -1
- package/lib/es/tree/interface.d.ts +1 -1
- package/lib/es/treeSelect/index.d.ts +1 -1
- package/package.json +8 -8
|
@@ -78,6 +78,9 @@ class monthCalendar extends _baseComponent.default {
|
|
|
78
78
|
}))));
|
|
79
79
|
};
|
|
80
80
|
this.renderEvents = events => {
|
|
81
|
+
const {
|
|
82
|
+
itemLimit
|
|
83
|
+
} = this.state;
|
|
81
84
|
if (!events) {
|
|
82
85
|
return undefined;
|
|
83
86
|
}
|
|
@@ -94,11 +97,12 @@ class monthCalendar extends _baseComponent.default {
|
|
|
94
97
|
width: toPercent(width),
|
|
95
98
|
top: `${topInd}em`
|
|
96
99
|
};
|
|
97
|
-
return /*#__PURE__*/_react.default.createElement("li", {
|
|
100
|
+
if (topInd < itemLimit) return /*#__PURE__*/_react.default.createElement("li", {
|
|
98
101
|
className: `${_constants.cssClasses.PREFIX}-event-item ${_constants.cssClasses.PREFIX}-event-month`,
|
|
99
102
|
key: key || `${ind}-monthevent`,
|
|
100
103
|
style: style
|
|
101
104
|
}, children);
|
|
105
|
+
return null;
|
|
102
106
|
});
|
|
103
107
|
return list;
|
|
104
108
|
};
|
|
@@ -140,7 +140,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
140
140
|
preventScroll?: boolean;
|
|
141
141
|
showRestTagsPopover?: boolean;
|
|
142
142
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
143
|
-
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "
|
|
143
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
144
144
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
145
145
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
146
146
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/cjs/form/field.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
86
86
|
preventScroll?: boolean;
|
|
87
87
|
showRestTagsPopover?: boolean;
|
|
88
88
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
89
|
-
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "
|
|
89
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
90
90
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
91
91
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
92
92
|
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/cjs/image/preview.js
CHANGED
|
@@ -46,8 +46,8 @@ class Preview extends _baseComponent.default {
|
|
|
46
46
|
if (item.isIntersecting && src) {
|
|
47
47
|
item.target.src = src;
|
|
48
48
|
item.target.removeAttribute("data-src");
|
|
49
|
+
this.previewObserver.unobserve(item.target);
|
|
49
50
|
}
|
|
50
|
-
this.previewObserver.unobserve(item.target);
|
|
51
51
|
});
|
|
52
52
|
}, {
|
|
53
53
|
root: document.querySelector(`#${this.previewGroupId}`),
|
|
@@ -145,11 +145,11 @@ export declare function withError(props: ModalReactProps): {
|
|
|
145
145
|
size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
|
|
146
146
|
style?: React.CSSProperties;
|
|
147
147
|
className?: string;
|
|
148
|
-
motion?: boolean;
|
|
149
148
|
getPopupContainer?: () => HTMLElement;
|
|
150
149
|
footer?: React.ReactNode;
|
|
151
150
|
header?: React.ReactNode;
|
|
152
151
|
direction?: any;
|
|
152
|
+
motion?: boolean;
|
|
153
153
|
mask?: boolean;
|
|
154
154
|
visible?: boolean;
|
|
155
155
|
zIndex?: number;
|
|
@@ -204,10 +204,10 @@ export declare function withError(props: ModalReactProps): {
|
|
|
204
204
|
title?: string;
|
|
205
205
|
name?: string;
|
|
206
206
|
value?: string | number | readonly string[];
|
|
207
|
-
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
208
|
-
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
207
|
form?: string;
|
|
210
208
|
slot?: string;
|
|
209
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
210
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
211
211
|
prefix?: string;
|
|
212
212
|
dangerouslySetInnerHTML?: {
|
|
213
213
|
__html: string | TrustedHTML;
|
|
@@ -59,7 +59,7 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
59
59
|
margin: PropTypes.Requireable<NonNullable<number | object>>;
|
|
60
60
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
61
61
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
62
|
-
trigger: PropTypes.Validator<NonNullable<"hover" | "focus" | "click" | "custom">>;
|
|
62
|
+
trigger: PropTypes.Validator<NonNullable<"hover" | "focus" | "click" | "custom" | "contextMenu">>;
|
|
63
63
|
contentClassName: PropTypes.Requireable<NonNullable<string | any[]>>;
|
|
64
64
|
onVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
65
|
onClickOutSide: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -61,7 +61,7 @@ export interface TreeProps extends BasicTreeProps {
|
|
|
61
61
|
onExpand?: (expandedKeys: string[], expandedOtherProps: ExpandedOtherProps) => void;
|
|
62
62
|
onLoad?: (loadedKeys?: Set<string>, treeNode?: TreeNodeData) => void;
|
|
63
63
|
onContextMenu?: (e: MouseEvent, node: TreeNodeData) => void;
|
|
64
|
-
onSelect?: (
|
|
64
|
+
onSelect?: (selectedKey: string, selected: boolean, selectedNode: TreeNodeData) => void;
|
|
65
65
|
renderDraggingNode?: (nodeInstance: HTMLElement, node: TreeNodeData) => HTMLElement;
|
|
66
66
|
renderFullLabel?: (renderFullLabelProps: RenderFullLabelProps) => ReactNode;
|
|
67
67
|
renderLabel?: (label?: ReactNode, treeNode?: TreeNodeData) => ReactNode;
|
|
@@ -74,7 +74,7 @@ export interface TreeSelectProps extends Omit<BasicTreeSelectProps, OverrideComm
|
|
|
74
74
|
stopPropagation?: boolean | string;
|
|
75
75
|
restTagsPopoverProps?: PopoverProps;
|
|
76
76
|
searchRender?: boolean | ((inputProps: InputProps) => React.ReactNode);
|
|
77
|
-
onSelect?: (
|
|
77
|
+
onSelect?: (selectedKey: string, selected: boolean, selectedNode: TreeNodeData) => void;
|
|
78
78
|
renderSelectedItem?: RenderSelectedItem;
|
|
79
79
|
getPopupContainer?: () => HTMLElement;
|
|
80
80
|
triggerRender?: (props?: TriggerRenderProps) => React.ReactNode;
|
|
@@ -70,6 +70,9 @@ export default class monthCalendar extends BaseComponent {
|
|
|
70
70
|
}))));
|
|
71
71
|
};
|
|
72
72
|
this.renderEvents = events => {
|
|
73
|
+
const {
|
|
74
|
+
itemLimit
|
|
75
|
+
} = this.state;
|
|
73
76
|
if (!events) {
|
|
74
77
|
return undefined;
|
|
75
78
|
}
|
|
@@ -86,11 +89,12 @@ export default class monthCalendar extends BaseComponent {
|
|
|
86
89
|
width: toPercent(width),
|
|
87
90
|
top: `${topInd}em`
|
|
88
91
|
};
|
|
89
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
92
|
+
if (topInd < itemLimit) return /*#__PURE__*/React.createElement("li", {
|
|
90
93
|
className: `${cssClasses.PREFIX}-event-item ${cssClasses.PREFIX}-event-month`,
|
|
91
94
|
key: key || `${ind}-monthevent`,
|
|
92
95
|
style: style
|
|
93
96
|
}, children);
|
|
97
|
+
return null;
|
|
94
98
|
});
|
|
95
99
|
return list;
|
|
96
100
|
};
|
|
@@ -140,7 +140,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
140
140
|
preventScroll?: boolean;
|
|
141
141
|
showRestTagsPopover?: boolean;
|
|
142
142
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
143
|
-
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "
|
|
143
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
144
144
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
145
145
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
146
146
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/es/form/field.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
86
86
|
preventScroll?: boolean;
|
|
87
87
|
showRestTagsPopover?: boolean;
|
|
88
88
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
89
|
-
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "
|
|
89
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
90
90
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
91
91
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
92
92
|
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/image/preview.js
CHANGED
|
@@ -37,8 +37,8 @@ export default class Preview extends BaseComponent {
|
|
|
37
37
|
if (item.isIntersecting && src) {
|
|
38
38
|
item.target.src = src;
|
|
39
39
|
item.target.removeAttribute("data-src");
|
|
40
|
+
this.previewObserver.unobserve(item.target);
|
|
40
41
|
}
|
|
41
|
-
this.previewObserver.unobserve(item.target);
|
|
42
42
|
});
|
|
43
43
|
}, {
|
|
44
44
|
root: document.querySelector(`#${this.previewGroupId}`),
|
|
@@ -145,11 +145,11 @@ export declare function withError(props: ModalReactProps): {
|
|
|
145
145
|
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
146
146
|
style?: React.CSSProperties;
|
|
147
147
|
className?: string;
|
|
148
|
-
motion?: boolean;
|
|
149
148
|
getPopupContainer?: () => HTMLElement;
|
|
150
149
|
footer?: React.ReactNode;
|
|
151
150
|
header?: React.ReactNode;
|
|
152
151
|
direction?: any;
|
|
152
|
+
motion?: boolean;
|
|
153
153
|
mask?: boolean;
|
|
154
154
|
visible?: boolean;
|
|
155
155
|
zIndex?: number;
|
|
@@ -204,10 +204,10 @@ export declare function withError(props: ModalReactProps): {
|
|
|
204
204
|
title?: string;
|
|
205
205
|
name?: string;
|
|
206
206
|
value?: string | number | readonly string[];
|
|
207
|
-
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
208
|
-
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
207
|
form?: string;
|
|
210
208
|
slot?: string;
|
|
209
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
210
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
211
211
|
prefix?: string;
|
|
212
212
|
dangerouslySetInnerHTML?: {
|
|
213
213
|
__html: string | TrustedHTML;
|
|
@@ -59,7 +59,7 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
59
59
|
margin: PropTypes.Requireable<NonNullable<number | object>>;
|
|
60
60
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
61
61
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
62
|
-
trigger: PropTypes.Validator<NonNullable<"hover" | "focus" | "click" | "custom">>;
|
|
62
|
+
trigger: PropTypes.Validator<NonNullable<"hover" | "focus" | "click" | "custom" | "contextMenu">>;
|
|
63
63
|
contentClassName: PropTypes.Requireable<NonNullable<string | any[]>>;
|
|
64
64
|
onVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
65
|
onClickOutSide: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -61,7 +61,7 @@ export interface TreeProps extends BasicTreeProps {
|
|
|
61
61
|
onExpand?: (expandedKeys: string[], expandedOtherProps: ExpandedOtherProps) => void;
|
|
62
62
|
onLoad?: (loadedKeys?: Set<string>, treeNode?: TreeNodeData) => void;
|
|
63
63
|
onContextMenu?: (e: MouseEvent, node: TreeNodeData) => void;
|
|
64
|
-
onSelect?: (
|
|
64
|
+
onSelect?: (selectedKey: string, selected: boolean, selectedNode: TreeNodeData) => void;
|
|
65
65
|
renderDraggingNode?: (nodeInstance: HTMLElement, node: TreeNodeData) => HTMLElement;
|
|
66
66
|
renderFullLabel?: (renderFullLabelProps: RenderFullLabelProps) => ReactNode;
|
|
67
67
|
renderLabel?: (label?: ReactNode, treeNode?: TreeNodeData) => ReactNode;
|
|
@@ -74,7 +74,7 @@ export interface TreeSelectProps extends Omit<BasicTreeSelectProps, OverrideComm
|
|
|
74
74
|
stopPropagation?: boolean | string;
|
|
75
75
|
restTagsPopoverProps?: PopoverProps;
|
|
76
76
|
searchRender?: boolean | ((inputProps: InputProps) => React.ReactNode);
|
|
77
|
-
onSelect?: (
|
|
77
|
+
onSelect?: (selectedKey: string, selected: boolean, selectedNode: TreeNodeData) => void;
|
|
78
78
|
renderSelectedItem?: RenderSelectedItem;
|
|
79
79
|
getPopupContainer?: () => HTMLElement;
|
|
80
80
|
triggerRender?: (props?: TriggerRenderProps) => React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.1-alpha.1",
|
|
4
4
|
"description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@dnd-kit/core": "^6.0.8",
|
|
21
21
|
"@dnd-kit/sortable": "^7.0.2",
|
|
22
22
|
"@dnd-kit/utilities": "^3.2.1",
|
|
23
|
-
"@douyinfe/semi-animation": "2.43.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.43.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.43.
|
|
26
|
-
"@douyinfe/semi-icons": "2.43.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.43.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.43.
|
|
23
|
+
"@douyinfe/semi-animation": "2.43.1-alpha.1",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.43.1-alpha.1",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.43.1-alpha.1",
|
|
26
|
+
"@douyinfe/semi-icons": "2.43.1-alpha.1",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.43.1-alpha.1",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.43.1-alpha.1",
|
|
29
29
|
"async-validator": "^3.5.0",
|
|
30
30
|
"classnames": "^2.2.6",
|
|
31
31
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
],
|
|
76
76
|
"author": "",
|
|
77
77
|
"license": "MIT",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "5d365532a2f23fb1d064276a81e602fb8fbf26b4",
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
81
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|