@douyinfe/semi-foundation 2.1.0-beta.2 → 2.1.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/calendar/foundation.ts +3 -1
- package/cascader/foundation.ts +1 -1
- package/collapse/foundation.ts +1 -1
- package/lib/es/calendar/foundation.d.ts +2 -1
- package/lib/es/cascader/foundation.d.ts +1 -1
- package/lib/es/collapse/foundation.d.ts +1 -1
- package/lib/es/pagination/foundation.d.ts +2 -2
- package/lib/es/popconfirm/popconfirmFoundation.d.ts +2 -0
- package/lib/es/popconfirm/popconfirmFoundation.js +4 -0
- package/lib/es/scrollList/itemFoundation.d.ts +3 -3
- package/lib/es/select/foundation.d.ts +2 -1
- package/lib/es/select/foundation.js +10 -5
- package/lib/es/table/utils.d.ts +1 -1
- package/lib/es/tabs/foundation.d.ts +3 -0
- package/lib/es/tabs/foundation.js +4 -8
- package/lib/es/tabs/tabs.css +13 -1
- package/lib/es/tabs/tabs.scss +96 -76
- package/lib/es/tagInput/foundation.d.ts +1 -0
- package/lib/es/tagInput/foundation.js +2 -0
- package/lib/es/timeline/timeline.css +1 -0
- package/lib/es/timeline/timeline.scss +1 -0
- package/lib/es/timeline/variables.scss +1 -0
- package/lib/es/tooltip/foundation.js +5 -2
- package/lib/es/tree/foundation.d.ts +1 -1
- package/lib/es/tree/treeUtil.js +10 -7
- package/lib/es/treeSelect/foundation.d.ts +10 -12
- package/lib/es/utils/log.js +3 -1
- package/package.json +3 -3
- package/pagination/foundation.ts +2 -2
- package/popconfirm/popconfirmFoundation.ts +5 -0
- package/scrollList/itemFoundation.ts +3 -3
- package/select/foundation.ts +10 -8
- package/table/utils.ts +1 -1
- package/tabs/foundation.ts +7 -8
- package/tabs/tabs.scss +96 -76
- package/tagInput/foundation.ts +2 -0
- package/timeline/timeline.scss +1 -0
- package/timeline/variables.scss +1 -0
- package/tooltip/foundation.ts +4 -2
- package/tree/foundation.ts +1 -1
- package/tree/treeUtil.ts +1 -1
- package/treeSelect/foundation.ts +11 -10
- package/utils/log.ts +3 -1
package/timeline/timeline.scss
CHANGED
package/timeline/variables.scss
CHANGED
|
@@ -6,6 +6,7 @@ $color-timeline_dot_info-bg-default: var(--semi-color-tertiary-light-active); //
|
|
|
6
6
|
$color-timeline_tail-border: var(--semi-color-text-3); // 时间轴连线颜色
|
|
7
7
|
$color-timeline_time_default-text-default: var(--semi-color-text-2); // 时间轴文字颜色 - 默认
|
|
8
8
|
$color-timeline_item_head-bg: transparent; // 时间轴头部背景颜色
|
|
9
|
+
$color-timeline_item_content-text-default: var(--semi-color-text-0); // 时间轴标题文字颜色
|
|
9
10
|
|
|
10
11
|
$spacing-timeline-margin: $spacing-none; // 时间轴整体外边距
|
|
11
12
|
$spacing-timeline-padding: $spacing-tight; // 时间轴整体内边距
|
package/tooltip/foundation.ts
CHANGED
|
@@ -92,8 +92,8 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
_bindEvent() {
|
|
95
|
-
const
|
|
96
|
-
const { triggerEventSet, portalEventSet } = this._generateEvent(
|
|
95
|
+
const trigger = this.getProp('trigger'); // get trigger type
|
|
96
|
+
const { triggerEventSet, portalEventSet } = this._generateEvent(trigger);
|
|
97
97
|
this._bindTriggerEvent(triggerEventSet);
|
|
98
98
|
this._bindPortalEvent(portalEventSet);
|
|
99
99
|
this._bindResizeEvent();
|
|
@@ -268,6 +268,8 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
268
268
|
this._adapter.insertPortal(content, position);
|
|
269
269
|
|
|
270
270
|
if (trigger === 'custom') {
|
|
271
|
+
// eslint-disable-next-line
|
|
272
|
+
this._adapter.registerClickOutsideHandler(() => {});
|
|
271
273
|
this._togglePortalVisible(true);
|
|
272
274
|
}
|
|
273
275
|
|
package/tree/foundation.ts
CHANGED
|
@@ -212,7 +212,7 @@ export interface BasicTreeProps {
|
|
|
212
212
|
onDragOver?: (dragProps: BasicDragProps) => void;
|
|
213
213
|
onDragStart?: (dragProps: BasicDragProps) => void;
|
|
214
214
|
onDrop?: (onDragProps: BasicOnDragProps) => void;
|
|
215
|
-
onExpand?: (expandedKeys: string[],
|
|
215
|
+
onExpand?: (expandedKeys: string[], expandedOtherProps: BasicExpandedOtherProps) => void;
|
|
216
216
|
onLoad?: (loadedKeys?: Set<string>, treeNode?: BasicTreeNodeData) => void;
|
|
217
217
|
onContextMenu?: (e: any, node: BasicTreeNodeData) => void;
|
|
218
218
|
onSearch?: (sunInput: string) => void;
|
package/tree/treeUtil.ts
CHANGED
|
@@ -441,7 +441,7 @@ export function normalizeKeyList(keyList: any, keyEntities: KeyEntities, leafOnl
|
|
|
441
441
|
res.push(key);
|
|
442
442
|
});
|
|
443
443
|
} else {
|
|
444
|
-
res = keyList.filter((key: string) => keyEntities[key] && !isValid(keyEntities[key].children));
|
|
444
|
+
res = Array.from(keyList).filter((key: string) => keyEntities[key] && !isValid(keyEntities[key].children)) as string[];
|
|
445
445
|
}
|
|
446
446
|
return res;
|
|
447
447
|
}
|
package/treeSelect/foundation.ts
CHANGED
|
@@ -29,14 +29,15 @@ export type ValidateStatus = 'error' | 'warning' | 'default';
|
|
|
29
29
|
|
|
30
30
|
export type Size = 'small' | 'large' | 'default';
|
|
31
31
|
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
export type BasicRenderSelectedItemInMultiple = (
|
|
33
|
+
treeNode: BasicTreeNodeData,
|
|
34
|
+
otherProps: { index: number | string; onClose: (tagContent: any, e: any) => void }
|
|
35
|
+
)=> {
|
|
36
|
+
isRenderInTag: boolean;
|
|
37
|
+
content: any;
|
|
38
|
+
};
|
|
39
|
+
export type BasicRenderSelectedItemInSingle = (treeNode: BasicTreeNodeData) => any;
|
|
40
|
+
export type BasicRenderSelectedItem = BasicRenderSelectedItemInSingle | BasicRenderSelectedItemInMultiple;
|
|
40
41
|
|
|
41
42
|
export interface BasicTriggerRenderProps {
|
|
42
43
|
[x: string]: any;
|
|
@@ -127,7 +128,7 @@ export interface BasicTreeSelectProps extends Pick<BasicTreeProps,
|
|
|
127
128
|
searchRender?: (inputProps: any) => any;
|
|
128
129
|
renderSelectedItem?: BasicRenderSelectedItem;
|
|
129
130
|
getPopupContainer?: () => HTMLElement;
|
|
130
|
-
triggerRender?: (props: BasicTriggerRenderProps) => any;
|
|
131
|
+
// triggerRender?: (props: BasicTriggerRenderProps) => any;
|
|
131
132
|
onBlur?: (e: any) => void;
|
|
132
133
|
onChange?: BasicOnChange;
|
|
133
134
|
onFocus?: (e: any) => void;
|
|
@@ -178,7 +179,7 @@ export interface TreeSelectAdapter<P = Record<string, any>, S = Record<string, a
|
|
|
178
179
|
setOptionWrapperWidth: (width: null | number) => void;
|
|
179
180
|
notifyChange: BasicOnChangeWithBasic;
|
|
180
181
|
notifyChangeWithObject: BasicOnChangeWithObject;
|
|
181
|
-
notifyExpand: (expandedKeys: Set<string>,
|
|
182
|
+
notifyExpand: (expandedKeys: Set<string>, expandedOtherProps: BasicExpandedOtherProps) => void;
|
|
182
183
|
notifyFocus: (e: any) => void;
|
|
183
184
|
notifyBlur: (e: any) => void;
|
|
184
185
|
toggleHovering: (bool: boolean) => void;
|