@douyinfe/semi-foundation 2.23.0-beta.0 → 2.23.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/cascader/cascader.scss +15 -0
- package/cascader/variables.scss +1 -0
- package/lib/cjs/cascader/cascader.css +12 -0
- package/lib/cjs/cascader/cascader.scss +15 -0
- package/lib/cjs/cascader/variables.scss +1 -0
- package/lib/cjs/tooltip/constants.d.ts +1 -0
- package/lib/cjs/tooltip/constants.js +2 -2
- package/lib/cjs/tooltip/foundation.d.ts +21 -2
- package/lib/cjs/tooltip/foundation.js +352 -77
- package/lib/es/cascader/cascader.css +12 -0
- package/lib/es/cascader/cascader.scss +15 -0
- package/lib/es/cascader/variables.scss +1 -0
- package/lib/es/tooltip/constants.d.ts +1 -0
- package/lib/es/tooltip/constants.js +2 -2
- package/lib/es/tooltip/foundation.d.ts +21 -2
- package/lib/es/tooltip/foundation.js +352 -77
- package/package.json +2 -2
- package/tooltip/constants.ts +1 -0
- package/tooltip/foundation.ts +318 -78
package/cascader/cascader.scss
CHANGED
|
@@ -408,6 +408,21 @@ $module: #{$prefix}-cascader;
|
|
|
408
408
|
&-empty {
|
|
409
409
|
margin-right: $spacing-cascader_empty_icon-marginRight;
|
|
410
410
|
}
|
|
411
|
+
|
|
412
|
+
&-left {
|
|
413
|
+
margin-left: $spacing-cascader_option-icon-marginLeft;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
&-spin-icon {
|
|
418
|
+
width: $width-cascader-icon;
|
|
419
|
+
height: $width-cascader-icon;
|
|
420
|
+
line-height: 0;
|
|
421
|
+
|
|
422
|
+
& svg {
|
|
423
|
+
width: $width-cascader-icon;
|
|
424
|
+
height: $width-cascader-icon;
|
|
425
|
+
}
|
|
411
426
|
}
|
|
412
427
|
|
|
413
428
|
&-label {
|
package/cascader/variables.scss
CHANGED
|
@@ -51,6 +51,7 @@ $spacing-cascader_selection_tagInput-marginLeft: - $spacing-extra-tight; // 级
|
|
|
51
51
|
$spacing-cascader_selection_input-marginLeft: $spacing-extra-tight; // 级联选择触发器多选搜索时输入框的左外边距
|
|
52
52
|
$spacing-cascader_selection_n-marginRight: $spacing-extra-tight; // 超出 maxTagCount 后,+n 的右外边距
|
|
53
53
|
$spacing-cascader_clearBtn-marginRight: 12px; // 级联选择触发器清空按钮右侧外边距
|
|
54
|
+
$spacing-cascader_option-icon-marginLeft: 8px; // 级联选择菜单项图标左侧外边距
|
|
54
55
|
|
|
55
56
|
$color-cascader_selection_n-text-default: var(--semi-color-text-0); // 超出 maxTagCount 后,+n 的文字默认颜色
|
|
56
57
|
$color-cascader_selection_n-text-disabled: var(--semi-color-disabled-text); // 超出 maxTagCount 后,+n 的文字disabled颜色
|
|
@@ -337,6 +337,18 @@
|
|
|
337
337
|
.semi-cascader-option-lists .semi-cascader-option-icon-active, .semi-cascader-option-lists .semi-cascader-option-icon-empty {
|
|
338
338
|
margin-right: 8px;
|
|
339
339
|
}
|
|
340
|
+
.semi-cascader-option-lists .semi-cascader-option-icon-left {
|
|
341
|
+
margin-left: 8px;
|
|
342
|
+
}
|
|
343
|
+
.semi-cascader-option-lists .semi-cascader-option-spin-icon {
|
|
344
|
+
width: 16px;
|
|
345
|
+
height: 16px;
|
|
346
|
+
line-height: 0;
|
|
347
|
+
}
|
|
348
|
+
.semi-cascader-option-lists .semi-cascader-option-spin-icon svg {
|
|
349
|
+
width: 16px;
|
|
350
|
+
height: 16px;
|
|
351
|
+
}
|
|
340
352
|
.semi-cascader-option-lists .semi-cascader-option-label {
|
|
341
353
|
display: flex;
|
|
342
354
|
align-items: center;
|
|
@@ -408,6 +408,21 @@ $module: #{$prefix}-cascader;
|
|
|
408
408
|
&-empty {
|
|
409
409
|
margin-right: $spacing-cascader_empty_icon-marginRight;
|
|
410
410
|
}
|
|
411
|
+
|
|
412
|
+
&-left {
|
|
413
|
+
margin-left: $spacing-cascader_option-icon-marginLeft;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
&-spin-icon {
|
|
418
|
+
width: $width-cascader-icon;
|
|
419
|
+
height: $width-cascader-icon;
|
|
420
|
+
line-height: 0;
|
|
421
|
+
|
|
422
|
+
& svg {
|
|
423
|
+
width: $width-cascader-icon;
|
|
424
|
+
height: $width-cascader-icon;
|
|
425
|
+
}
|
|
411
426
|
}
|
|
412
427
|
|
|
413
428
|
&-label {
|
|
@@ -51,6 +51,7 @@ $spacing-cascader_selection_tagInput-marginLeft: - $spacing-extra-tight; // 级
|
|
|
51
51
|
$spacing-cascader_selection_input-marginLeft: $spacing-extra-tight; // 级联选择触发器多选搜索时输入框的左外边距
|
|
52
52
|
$spacing-cascader_selection_n-marginRight: $spacing-extra-tight; // 超出 maxTagCount 后,+n 的右外边距
|
|
53
53
|
$spacing-cascader_clearBtn-marginRight: 12px; // 级联选择触发器清空按钮右侧外边距
|
|
54
|
+
$spacing-cascader_option-icon-marginLeft: 8px; // 级联选择菜单项图标左侧外边距
|
|
54
55
|
|
|
55
56
|
$color-cascader_selection_n-text-default: var(--semi-color-text-0); // 超出 maxTagCount 后,+n 的文字默认颜色
|
|
56
57
|
$color-cascader_selection_n-text-disabled: var(--semi-color-disabled-text); // 超出 maxTagCount 后,+n 的文字disabled颜色
|
|
@@ -65,7 +65,10 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
65
65
|
_bindResizeEvent(): void;
|
|
66
66
|
unBindResizeEvent(): void;
|
|
67
67
|
removePortal: () => void;
|
|
68
|
+
_adjustPos(position?: string, isVertical?: boolean, adjustType?: string, concatPos?: any): string;
|
|
68
69
|
_reversePos(position?: string, isVertical?: boolean): string;
|
|
70
|
+
_expandPos(position: string, concatPos: string): string;
|
|
71
|
+
_reducePos(position?: string): string;
|
|
69
72
|
clearDelayTimer(): void;
|
|
70
73
|
_generateEvent(types: ArrayElement<typeof strings.TRIGGER_SET>): {
|
|
71
74
|
triggerEventSet: {
|
|
@@ -80,7 +83,14 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
80
83
|
_togglePortalVisible(isVisible: boolean): void;
|
|
81
84
|
_roundPixel(pixel: number): number;
|
|
82
85
|
calcTransformOrigin(position: Position, triggerRect: DOMRect, translateX: number, translateY: number): string;
|
|
83
|
-
calcPosStyle(
|
|
86
|
+
calcPosStyle(props: {
|
|
87
|
+
triggerRect: DOMRect;
|
|
88
|
+
wrapperRect: DOMRect;
|
|
89
|
+
containerRect: PopupContainerDOMRect;
|
|
90
|
+
position?: Position;
|
|
91
|
+
spacing?: number;
|
|
92
|
+
isOverFlow?: [boolean, boolean];
|
|
93
|
+
}): Record<string, string | number>;
|
|
84
94
|
/**
|
|
85
95
|
* 耦合的东西比较多,稍微罗列一下:
|
|
86
96
|
*
|
|
@@ -97,7 +107,16 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
97
107
|
calcPosition: (triggerRect?: DOMRect, wrapperRect?: DOMRect, containerRect?: PopupContainerDOMRect, shouldUpdatePos?: boolean) => Record<string, string | number>;
|
|
98
108
|
isLR(position?: string): boolean;
|
|
99
109
|
isTB(position?: string): boolean;
|
|
100
|
-
|
|
110
|
+
isReverse(rowSpace: number, reverseSpace: number, size: number): boolean;
|
|
111
|
+
isOverFlow(rowSpace: number, reverseSpace: number, size: number): boolean;
|
|
112
|
+
isHalfOverFlow(posSpace: number, negSpace: number, size: number): boolean;
|
|
113
|
+
isHalfAllEnough(posSpace: number, negSpace: number, size: number): boolean;
|
|
114
|
+
getReverse(viewOverFlow: boolean, containerOverFlow: boolean, shouldReverseView: boolean, shouldReverseContainer: boolean): boolean;
|
|
115
|
+
adjustPosIfNeed(position: Position | string, style: Record<string, any>, triggerRect: DOMRect, wrapperRect: DOMRect, containerRect: PopupContainerDOMRect): {
|
|
116
|
+
position: string;
|
|
117
|
+
isHeightOverFlow: boolean;
|
|
118
|
+
isWidthOverFlow: boolean;
|
|
119
|
+
};
|
|
101
120
|
delayHide: () => void;
|
|
102
121
|
hide: () => void;
|
|
103
122
|
_bindScrollEvent(): void;
|