@douyinfe/semi-foundation 2.51.4 → 2.52.0-beta.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/avatar/animation.scss +19 -0
- package/avatar/avatar.scss +313 -0
- package/avatar/variables.scss +66 -10
- package/cascader/foundation.ts +7 -13
- package/cascader/util.ts +0 -13
- package/datePicker/foundation.ts +7 -7
- package/input/input.scss +12 -3
- package/input/variables.scss +5 -0
- package/lib/cjs/avatar/animation.scss +19 -0
- package/lib/cjs/avatar/avatar.css +261 -0
- package/lib/cjs/avatar/avatar.scss +313 -0
- package/lib/cjs/avatar/variables.scss +66 -10
- package/lib/cjs/cascader/foundation.d.ts +11 -4
- package/lib/cjs/cascader/foundation.js +14 -22
- package/lib/cjs/cascader/util.d.ts +0 -1
- package/lib/cjs/cascader/util.js +0 -14
- package/lib/cjs/datePicker/foundation.d.ts +2 -2
- package/lib/cjs/datePicker/foundation.js +4 -5
- package/lib/cjs/input/input.css +12 -0
- package/lib/cjs/input/input.scss +12 -3
- package/lib/cjs/input/variables.scss +5 -0
- package/lib/cjs/modal/modal.css +3 -0
- package/lib/cjs/modal/modal.scss +5 -1
- package/lib/cjs/modal/modalFoundation.d.ts +1 -0
- package/lib/cjs/modal/variables.scss +4 -0
- package/lib/cjs/slider/constants.d.ts +1 -0
- package/lib/cjs/slider/constants.js +2 -1
- package/lib/cjs/slider/foundation.d.ts +7 -0
- package/lib/cjs/slider/slider.css +9 -0
- package/lib/cjs/slider/slider.scss +10 -0
- package/lib/cjs/slider/variables.scss +2 -0
- package/lib/cjs/tooltip/foundation.js +0 -11
- package/lib/cjs/treeSelect/foundation.d.ts +1 -0
- package/lib/cjs/treeSelect/foundation.js +1 -0
- package/lib/es/avatar/animation.scss +19 -0
- package/lib/es/avatar/avatar.css +261 -0
- package/lib/es/avatar/avatar.scss +313 -0
- package/lib/es/avatar/variables.scss +66 -10
- package/lib/es/cascader/foundation.d.ts +11 -4
- package/lib/es/cascader/foundation.js +15 -23
- package/lib/es/cascader/util.d.ts +0 -1
- package/lib/es/cascader/util.js +0 -13
- package/lib/es/datePicker/foundation.d.ts +2 -2
- package/lib/es/datePicker/foundation.js +4 -5
- package/lib/es/input/input.css +12 -0
- package/lib/es/input/input.scss +12 -3
- package/lib/es/input/variables.scss +5 -0
- package/lib/es/modal/modal.css +3 -0
- package/lib/es/modal/modal.scss +5 -1
- package/lib/es/modal/modalFoundation.d.ts +1 -0
- package/lib/es/modal/variables.scss +4 -0
- package/lib/es/slider/constants.d.ts +1 -0
- package/lib/es/slider/constants.js +2 -1
- package/lib/es/slider/foundation.d.ts +7 -0
- package/lib/es/slider/slider.css +9 -0
- package/lib/es/slider/slider.scss +10 -0
- package/lib/es/slider/variables.scss +2 -0
- package/lib/es/tooltip/foundation.js +0 -11
- package/lib/es/treeSelect/foundation.d.ts +1 -0
- package/lib/es/treeSelect/foundation.js +1 -0
- package/modal/modal.scss +5 -1
- package/modal/modalFoundation.ts +2 -1
- package/modal/variables.scss +4 -0
- package/package.json +3 -3
- package/slider/constants.ts +1 -0
- package/slider/foundation.ts +8 -1
- package/slider/slider.scss +10 -0
- package/slider/variables.scss +2 -0
- package/tooltip/foundation.ts +2 -12
- package/treeSelect/foundation.ts +2 -0
package/slider/variables.scss
CHANGED
|
@@ -15,6 +15,7 @@ $color-slider_rail: rgba(0, 0, 0, 0.65);
|
|
|
15
15
|
$color-slider_track-bg-default: var(--semi-color-primary); // 滑动条轨道颜色 - 已填充
|
|
16
16
|
$color-slider_track_disabled-bg: var(--semi-color-primary-disabled); // 禁用滑动条轨道颜色 - 已填充
|
|
17
17
|
$color-slider_handle-focus: var(--semi-color-primary-light-active); // 圆形按钮轮廓 - 聚焦
|
|
18
|
+
$color-slider_handle_dot: var(--semi-color-primary); // 圆形按钮内部圆点颜色
|
|
18
19
|
|
|
19
20
|
// Spacing
|
|
20
21
|
$spacing-slider-paddingX: 13px; // 滑动条整体水平内边距
|
|
@@ -57,6 +58,7 @@ $height-slider_track: 4px; // 滚动条已填充轨道高度
|
|
|
57
58
|
$width-slider_dot: 4px; // 滚动条圆形刻度点宽度
|
|
58
59
|
$width-slider_handle_border_disabled: 1px; // 禁用滚动条圆形按钮按下后描边宽度
|
|
59
60
|
$width-slider_handle-focus: 2px; // 圆形按钮轮廓 - 聚焦
|
|
61
|
+
$width-slider_handle_dot: 4px; // 圆形按钮内部圆点宽度
|
|
60
62
|
|
|
61
63
|
// Font
|
|
62
64
|
$font-slider_rail-fontSize: 14px; // 滚动条轨道文本字号
|
package/tooltip/foundation.ts
CHANGED
|
@@ -450,10 +450,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
450
450
|
const isTriggerNearTop = middleY - containerRect.top < containerRect.bottom - middleY;
|
|
451
451
|
|
|
452
452
|
const isWrapperWidthOverflow = wrapperRect.width > innerWidth;
|
|
453
|
-
|
|
454
|
-
if (scaled) {
|
|
455
|
-
SPACING = SPACING * wrapperRect.width/this._adapter.getContainer().clientWidth;
|
|
456
|
-
}
|
|
453
|
+
|
|
457
454
|
switch (position) {
|
|
458
455
|
case 'top':
|
|
459
456
|
// left = middleX;
|
|
@@ -573,14 +570,6 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
573
570
|
left = left - containerRect.left;
|
|
574
571
|
top = top - containerRect.top;
|
|
575
572
|
|
|
576
|
-
if (scaled) {
|
|
577
|
-
left /= wrapperRect.width/this._adapter.getContainer().clientWidth;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
if (scaled) {
|
|
581
|
-
top /= wrapperRect.height/this._adapter.getContainer().clientHeight;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
573
|
/**
|
|
585
574
|
* container为body时,如果position不为relative或absolute,这时trigger计算出的top/left会根据html定位(initial containing block)
|
|
586
575
|
* 此时如果body有margin,则计算出的位置相对于body会有问题 fix issue #1368
|
|
@@ -839,6 +828,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
839
828
|
|
|
840
829
|
const halfHeight = triggerRect.height / 2;
|
|
841
830
|
const halfWidth = triggerRect.width / 2;
|
|
831
|
+
|
|
842
832
|
// 视口, 原空间与反向空间是否都不足判断
|
|
843
833
|
// Viewport, whether the original space and the reverse space are insufficient to judge
|
|
844
834
|
const isViewYOverFlow = this.isOverFlow(clientTop - marginTop, restClientBottom - marginBottom, wrapperRect.height + spacing);
|
package/treeSelect/foundation.ts
CHANGED
|
@@ -189,6 +189,7 @@ export interface TreeSelectAdapter<P = Record<string, any>, S = Record<string, a
|
|
|
189
189
|
closeMenu: (cb?: () => void) => void;
|
|
190
190
|
getTriggerWidth: () => boolean | number;
|
|
191
191
|
setOptionWrapperWidth: (width: null | number) => void;
|
|
192
|
+
notifyClear: (e: any) => void;
|
|
192
193
|
notifyChange: BasicOnChangeWithBasic;
|
|
193
194
|
notifyChangeWithObject: BasicOnChangeWithObject;
|
|
194
195
|
notifyExpand: (expandedKeys: Set<string>, expandedOtherProps: BasicExpandedOtherProps) => void;
|
|
@@ -548,6 +549,7 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
|
|
|
548
549
|
}
|
|
549
550
|
}
|
|
550
551
|
}
|
|
552
|
+
this._adapter.notifyClear(e);
|
|
551
553
|
}
|
|
552
554
|
|
|
553
555
|
/**
|