@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.
Files changed (70) hide show
  1. package/avatar/animation.scss +19 -0
  2. package/avatar/avatar.scss +313 -0
  3. package/avatar/variables.scss +66 -10
  4. package/cascader/foundation.ts +7 -13
  5. package/cascader/util.ts +0 -13
  6. package/datePicker/foundation.ts +7 -7
  7. package/input/input.scss +12 -3
  8. package/input/variables.scss +5 -0
  9. package/lib/cjs/avatar/animation.scss +19 -0
  10. package/lib/cjs/avatar/avatar.css +261 -0
  11. package/lib/cjs/avatar/avatar.scss +313 -0
  12. package/lib/cjs/avatar/variables.scss +66 -10
  13. package/lib/cjs/cascader/foundation.d.ts +11 -4
  14. package/lib/cjs/cascader/foundation.js +14 -22
  15. package/lib/cjs/cascader/util.d.ts +0 -1
  16. package/lib/cjs/cascader/util.js +0 -14
  17. package/lib/cjs/datePicker/foundation.d.ts +2 -2
  18. package/lib/cjs/datePicker/foundation.js +4 -5
  19. package/lib/cjs/input/input.css +12 -0
  20. package/lib/cjs/input/input.scss +12 -3
  21. package/lib/cjs/input/variables.scss +5 -0
  22. package/lib/cjs/modal/modal.css +3 -0
  23. package/lib/cjs/modal/modal.scss +5 -1
  24. package/lib/cjs/modal/modalFoundation.d.ts +1 -0
  25. package/lib/cjs/modal/variables.scss +4 -0
  26. package/lib/cjs/slider/constants.d.ts +1 -0
  27. package/lib/cjs/slider/constants.js +2 -1
  28. package/lib/cjs/slider/foundation.d.ts +7 -0
  29. package/lib/cjs/slider/slider.css +9 -0
  30. package/lib/cjs/slider/slider.scss +10 -0
  31. package/lib/cjs/slider/variables.scss +2 -0
  32. package/lib/cjs/tooltip/foundation.js +0 -11
  33. package/lib/cjs/treeSelect/foundation.d.ts +1 -0
  34. package/lib/cjs/treeSelect/foundation.js +1 -0
  35. package/lib/es/avatar/animation.scss +19 -0
  36. package/lib/es/avatar/avatar.css +261 -0
  37. package/lib/es/avatar/avatar.scss +313 -0
  38. package/lib/es/avatar/variables.scss +66 -10
  39. package/lib/es/cascader/foundation.d.ts +11 -4
  40. package/lib/es/cascader/foundation.js +15 -23
  41. package/lib/es/cascader/util.d.ts +0 -1
  42. package/lib/es/cascader/util.js +0 -13
  43. package/lib/es/datePicker/foundation.d.ts +2 -2
  44. package/lib/es/datePicker/foundation.js +4 -5
  45. package/lib/es/input/input.css +12 -0
  46. package/lib/es/input/input.scss +12 -3
  47. package/lib/es/input/variables.scss +5 -0
  48. package/lib/es/modal/modal.css +3 -0
  49. package/lib/es/modal/modal.scss +5 -1
  50. package/lib/es/modal/modalFoundation.d.ts +1 -0
  51. package/lib/es/modal/variables.scss +4 -0
  52. package/lib/es/slider/constants.d.ts +1 -0
  53. package/lib/es/slider/constants.js +2 -1
  54. package/lib/es/slider/foundation.d.ts +7 -0
  55. package/lib/es/slider/slider.css +9 -0
  56. package/lib/es/slider/slider.scss +10 -0
  57. package/lib/es/slider/variables.scss +2 -0
  58. package/lib/es/tooltip/foundation.js +0 -11
  59. package/lib/es/treeSelect/foundation.d.ts +1 -0
  60. package/lib/es/treeSelect/foundation.js +1 -0
  61. package/modal/modal.scss +5 -1
  62. package/modal/modalFoundation.ts +2 -1
  63. package/modal/variables.scss +4 -0
  64. package/package.json +3 -3
  65. package/slider/constants.ts +1 -0
  66. package/slider/foundation.ts +8 -1
  67. package/slider/slider.scss +10 -0
  68. package/slider/variables.scss +2 -0
  69. package/tooltip/foundation.ts +2 -12
  70. package/treeSelect/foundation.ts +2 -0
@@ -24,29 +24,85 @@ $font-avatar_extra_large-lineHeight: 77px; // 文本行高 - 超大
24
24
 
25
25
  $radius-avatar: var(--semi-border-radius-circle); // 头像圆角
26
26
 
27
- $width-avatar_extra_large-border: 3px; // 头像描边尺寸 - 超大
28
- $spacing-avatar_extra_large-marginLeft: -32px; // 头像左侧外边距 - 超大
27
+ $width-avatar_extra_large-border: 3px; // 头像组头像描边尺寸 - 超大
28
+ $spacing-avatar_extra_large-marginLeft: -32px; // 头像组头像左侧外边距 - 超大
29
29
 
30
- $width-avatar_large-border: 3px; // 头像描边尺寸 - 大
30
+ $width-avatar_large-border: 3px; // 头像组头像描边尺寸 - 大
31
31
  $spacing-avatar_large-marginLeft: -18px; // 头像左侧外边距 - 大
32
32
 
33
- $width-avatar_medium-border: 2px; // 头像描边尺寸 - 中
33
+ $width-avatar_medium-border: 2px; // 头像组头像描边尺寸 - 中
34
34
  $spacing-avatar_medium-marginLeft: -12px; // 头像左侧外边距 - 中
35
35
 
36
- $width-avatar_default-border: 2px; // 头像描边尺寸 - 默认
36
+ $width-avatar_default-border: 2px; // 头像组头像描边尺寸 - 默认
37
37
  $spacing-avatar_default-marginLeft: -12px; // 头像左侧外边距 - 默认
38
38
 
39
- $width-avatar_small-border: 2px; // 头像描边尺寸 - 小
39
+ $width-avatar_small-border: 2px; // 头像组头像描边尺寸 - 小
40
40
  $spacing-avatar_small-marginLeft: -12px; // 头像左侧外边距 - 小
41
41
 
42
- $width-avatar_extra_small-border: 1px; // 头像描边尺寸 - 超小
42
+ $width-avatar_extra_small-border: 1px; // 头像组头像描边尺寸 - 超小
43
43
  $spacing-avatar_extra_small-marginLeft: -10px; // 头像左侧外边距 - 超小
44
44
 
45
- $width-avatar_extra_extra_small-border: 1px; // 头像描边尺寸 - 极小
45
+ $width-avatar_extra_extra_small-border: 1px; // 头像组头像描边尺寸 - 极小
46
46
  $spacing-avatar_extra_extra_small-marginLeft: -4px; // 头像左侧外边距 - 极小
47
-
48
47
  $width-avatar-outline: 2px; //头像聚焦轮廓宽度
49
48
 
49
+ $width-avatar_additional-border: 1.5px; // 额外描边尺寸
50
+ $color-avatar_additional-border: var(--semi-color-primary); // 额外描边颜色
51
+ $spacing-avatar_additional-borderGap: 2px; // 额外描边与内侧间距
52
+
53
+ $width-avatar-bottom_slot_circle_small: 12px; // small 头像底部 slot 圆形半径
54
+ $width-avatar-bottom_slot_circle_default: 16px; // default 头像底部 slot 圆形半径
55
+ $width-avatar-bottom_slot_circle_medium: 18px; // medium 头像底部 slot 圆形半径
56
+ $width-avatar-bottom_slot_circle_large: 28px; // large 头像底部 slot 圆形半径
57
+ $width-avatar-bottom_slot_circle_extra_large: 28px; // extra large 头像底部 slot 圆形半径
58
+ $color-avatar-bottom_slot_bg:var(--semi-color-primary); // 头像底部 slot 背景色
59
+
60
+ $radius-avatar-bottom_slot_square:4px; // 底部 slot square 圆角
61
+ $font-avatar_bottom_slot-small-fontSize: 5px; // small 底部 slot 文字大小
62
+ $font-avatar_bottom_slot-default-fontSize: 12px; // default 底部 slot 文字大小
63
+ $font-avatar_bottom_slot-medium-fontSize: 12px; // medium 底部 slot 文字大小
64
+ $font-avatar_bottom_slot-large-fontSize: 12px; // large 底部 slot 文字大小
65
+ $font-avatar_bottom_slot-extra_large-fontSize: 14px; // extra large 底部 slot 文字大小
66
+ $spacing-avatar-bottom_slot_square-paddingX:4px; // 底部 slot square 形状左边距
67
+ $spacing-avatar-bottom_slot_square-paddingY:1px; //底部 slot square 形状右边距
68
+
69
+ $font-avatar_top_slot-small-fontSize: 5px; // small 顶部 slot 文字大小
70
+ $font-avatar_top_slot-default-fontSize: 6px; // default 顶部 slot 文字大小
71
+ $font-avatar_top_slot-medium-fontSize: 8px; // medium 顶部 slot 文字大小
72
+ $font-avatar_top_slot-large-fontSize: 14px; // large 顶部 slot 文字大小
73
+ $font-avatar_top_slot-extra_large-fontSize: 16px; // extra large 顶部 slot 文字大小
74
+
75
+ $spacing-avatar-top_slot_small-content-marginTop: 0px; // small 顶部文字 marginTop
76
+ $spacing-avatar-top_slot_default-content-marginTop: -2px; // default 顶部文字 marginTop
77
+ $spacing-avatar-top_slot_medium-content-marginTop: 0px; // medium 顶部文字 marginTop
78
+ $spacing-avatar-top_slot_large-content-marginTop: 0px; // large 顶部文字 marginTop
79
+ $spacing-avatar-top_slot_extra_large-content-marginTop: 0px; // extra large 顶部文字 marginTop
80
+
81
+ $color-avatar-bottom_slot_square-border:var(--semi-color-bg-0); // 底部 square 边框颜色
82
+ $width-avatar-bottom_slot_square_small-border:2px; // small 头像底部 square 边框宽度
83
+ $width-avatar-bottom_slot_square_default-border:2px; // default 头像底部 square 边框宽度
84
+ $width-avatar-bottom_slot_square_medium-border:2px; // medium 头像底部 square 边框宽度
85
+ $width-avatar-bottom_slot_square_large-border:2px; // large 头像底部 square 边框宽度
86
+ $width-avatar-bottom_slot_square_extra_large-border:2px; // extra large 头像底部 square 边框宽度
87
+
88
+ $color-avatar-top_slot_text:var(--semi-color-bg-0); //顶部 Slot 文字颜色
89
+ $color-avatar-top_slot_gradient_start: var(--semi-color-primary); // 顶部 slot 渐变起始色
90
+ $color-avatar-top_slot_gradient_end: var(--semi-color-primary); // 顶部 slot 渐变结束色
91
+
92
+
93
+ $spacing-avatar-top_slot_small-shift: -28px; // small 顶部 slot 偏移量, 和 scale 一起控制 slot 的位置
94
+ $spacing-avatar-top_slot_default-shift: -32px; // default 顶部 slot 偏移量, 和 scale 一起控制 slot 的位置
95
+ $spacing-avatar-top_slot_medium-shift: -30px; // medium 顶部 slot 偏移量, 和 scale 一起控制 slot 的位置
96
+ $spacing-avatar-top_slot_large-shift: -30px; // large 顶部 slot 偏移量, 和 scale 一起控制 slot 的位置
97
+ $spacing-avatar-top_slot_extra_large-shift: -32px; // extra large 顶部 slot 偏移量, 和 scale 一起控制 slot 的位置
98
+
99
+ $spacing-avatar-top_slot_small-scale: 0.4; // small 顶部 slot 缩放比例
100
+ $spacing-avatar-top_slot_default-scale: 0.7; // default 顶部 slot 缩放比例
101
+ $spacing-avatar-top_slot_medium-scale: 0.8; // medium 顶部 slot 缩放比例
102
+ $spacing-avatar-top_slot_large-scale: 1.1; // large 顶部 slot 缩放比例
103
+ $spacing-avatar-top_slot_extra_large-scale: 1.4; // large 顶部 slot 缩放比例
104
+
105
+
50
106
  // radius
51
107
  $radius-avatar_extra_extra_small: 3px; // 极小尺寸头像的圆角
52
108
  $radius-avatar_extra_small: 3px; // 超小尺寸头像的圆角
@@ -54,4 +110,4 @@ $radius-avatar_small: 3px; // 小尺寸头像的圆角
54
110
  $radius-avatar_default: 3px; // 默认尺寸头像的圆角
55
111
  $radius-avatar_medium: 3px; // 中尺寸头像的圆角
56
112
  $radius-avatar_large: 6px; // 大尺寸头像的圆角
57
- $radius-avatar_extra_large: 12px; // 超大尺寸头像的圆角
113
+ $radius-avatar_extra_large: 12px; // 超大尺寸头像的圆角
@@ -24,7 +24,6 @@ export interface BasicEntity {
24
24
  parent?: BasicEntity;
25
25
  parentKey?: string;
26
26
  path: Array<string>;
27
- pos: string;
28
27
  valuePath: Array<string>;
29
28
  }
30
29
  export interface BasicCascaderData {
@@ -240,7 +239,16 @@ export default class CascaderFoundation extends BaseFoundation<CascaderAdapter,
240
239
  * @param {boolean} curCheckedStatus checked status of node
241
240
  */
242
241
  calcCheckedKeys(key: string, curCheckedStatus: boolean): {
243
- checkedKeys: Set<string>;
242
+ checkedKeys: Set<string>; /**
243
+ * If selectedKeys does not meet the update conditions,
244
+ * and state.selectedKeys is the same as selectedKeys
245
+ * at this time, state.selectedKeys should be cleared.
246
+ * A typical scenario is:
247
+ * The originally selected node is the leaf node, but
248
+ * after props.treeData is dynamically updated, the node
249
+ * is a non-leaf node. At this point, selectedKeys should
250
+ * be cleared.
251
+ */
244
252
  halfCheckedKeys: Set<string>;
245
253
  };
246
254
  handleInputChange(sugInput: string): void;
@@ -252,6 +260,5 @@ export default class CascaderFoundation extends BaseFoundation<CascaderAdapter,
252
260
  getRenderData(): BasicEntity[] | BasicData[];
253
261
  getFilteredData(): BasicData[];
254
262
  handleListScroll(e: any, ind: number): void;
255
- handleTagRemoveByKey: (key: string) => void;
256
- handleTagRemoveInTrigger: (pos: string) => void;
263
+ handleTagRemove(e: any, tagValuePath: string[]): void;
257
264
  }
@@ -29,28 +29,6 @@ class CascaderFoundation extends _foundation.default {
29
29
  isSearching: false
30
30
  });
31
31
  };
32
- this.handleTagRemoveByKey = key => {
33
- var _a, _b;
34
- const {
35
- keyEntities
36
- } = this.getStates();
37
- const {
38
- disabled
39
- } = this.getProps();
40
- if (disabled) {
41
- /* istanbul ignore next */
42
- return;
43
- }
44
- const removedItem = (_a = keyEntities[key]) !== null && _a !== void 0 ? _a : {};
45
- !((_b = removedItem === null || removedItem === void 0 ? void 0 : removedItem.data) === null || _b === void 0 ? void 0 : _b.disable) && this._handleMultipleSelect(removedItem);
46
- };
47
- this.handleTagRemoveInTrigger = pos => {
48
- const {
49
- treeData
50
- } = this.getStates();
51
- const key = (0, _util.getKeyByPos)(pos, treeData);
52
- this.handleTagRemoveByKey(key);
53
- };
54
32
  }
55
33
  init() {
56
34
  const isOpen = this.getProp('open') || this.getProp('defaultOpen');
@@ -884,5 +862,19 @@ class CascaderFoundation extends _foundation.default {
884
862
  activeNode: data
885
863
  });
886
864
  }
865
+ handleTagRemove(e, tagValuePath) {
866
+ const {
867
+ keyEntities
868
+ } = this.getStates();
869
+ const {
870
+ disabled
871
+ } = this.getProps();
872
+ if (disabled) {
873
+ /* istanbul ignore next */
874
+ return;
875
+ }
876
+ const removedItem = Object.values(keyEntities).filter(item => (0, _isEqual2.default)(item.valuePath, tagValuePath))[0];
877
+ !(0, _isEmpty2.default)(removedItem) && !removedItem.data.disabled && this._handleMultipleSelect(removedItem);
878
+ }
887
879
  }
888
880
  exports.default = CascaderFoundation;
@@ -3,6 +3,5 @@ export declare function normalizedArr(val: any): any[];
3
3
  export declare function getKeysByValuePath(valuePath: (string | number)[][] | (string | number)[]): string[];
4
4
  export declare function getKeyByValuePath(valuePath: (string | number)[]): string;
5
5
  export declare function getValuePathByKey(key: string): string[];
6
- export declare function getKeyByPos(pos: string, treeData: any): string;
7
6
  export declare function convertDataToEntities(dataNodes: any): any;
8
7
  export declare function calcMergeType(autoMergeValue: boolean, leafOnly: boolean): string;
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.calcMergeType = calcMergeType;
7
7
  exports.convertDataToEntities = convertDataToEntities;
8
- exports.getKeyByPos = getKeyByPos;
9
8
  exports.getKeyByValuePath = getKeyByValuePath;
10
9
  exports.getKeysByValuePath = getKeysByValuePath;
11
10
  exports.getValuePathByKey = getValuePathByKey;
@@ -38,12 +37,10 @@ function traverseDataNodes(treeNodes, callback) {
38
37
  // Process node if is not root
39
38
  if (node) {
40
39
  const key = parent ? `${parent.key}${_constants.VALUE_SPLIT}${node.value}` : node.value;
41
- const pos = parent ? getPosition(parent.pos, ind) : `${ind}`;
42
40
  item = {
43
41
  data: Object.assign({}, node),
44
42
  ind,
45
43
  key,
46
- pos,
47
44
  level: parent ? parent.level + 1 : 0,
48
45
  parentKey: parent ? parent.key : null,
49
46
  path: parent ? [...parent.path, key] : [key],
@@ -76,17 +73,6 @@ function getKeyByValuePath(valuePath) {
76
73
  function getValuePathByKey(key) {
77
74
  return key.split(_constants.VALUE_SPLIT);
78
75
  }
79
- function getKeyByPos(pos, treeData) {
80
- const posArr = pos.split('-').map(item => Number(item));
81
- let resultData = treeData;
82
- let valuePath = [];
83
- posArr.forEach((item, index) => {
84
- var _a;
85
- resultData = index === 0 ? resultData[item] : (_a = resultData === null || resultData === void 0 ? void 0 : resultData.children) === null || _a === void 0 ? void 0 : _a[item];
86
- valuePath.push(resultData === null || resultData === void 0 ? void 0 : resultData.value);
87
- });
88
- return getKeyByValuePath(valuePath);
89
- }
90
76
  function convertDataToEntities(dataNodes) {
91
77
  const keyEntities = {};
92
78
  traverseDataNodes(dataNodes, data => {
@@ -30,8 +30,8 @@ export type DisabledDateOptions = {
30
30
  rangeInputFocus?: 'rangeStart' | 'rangeEnd' | false;
31
31
  };
32
32
  export type PresetType = {
33
- start?: string | Date | number;
34
- end?: string | Date | number;
33
+ start?: BaseValueType | (() => BaseValueType);
34
+ end?: BaseValueType | (() => BaseValueType);
35
35
  text?: string;
36
36
  };
37
37
  export type TriggerRenderProps = {
@@ -21,7 +21,6 @@ var _constants2 = require("../input/constants");
21
21
  var _getInsetInputFormatToken = _interopRequireDefault(require("./_utils/getInsetInputFormatToken"));
22
22
  var _getInsetInputValueFromInsetInputStr = _interopRequireDefault(require("./_utils/getInsetInputValueFromInsetInputStr"));
23
23
  var _isValidTimeZone = _interopRequireDefault(require("./_utils/isValidTimeZone"));
24
- var _warning = _interopRequireDefault(require("../utils/warning"));
25
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
25
  /**
27
26
  * The datePicker foundation.js is responsible for maintaining the date value and the input box value, as well as the callback of both
@@ -126,8 +125,6 @@ class DatePickerFoundation extends _foundation.default {
126
125
  parsedV = (0, _dateFnsExtra.zonedTimeToUtc)(parsedV, prevTimeZone);
127
126
  }
128
127
  result.push((0, _isValidTimeZone.default)(timeZone) ? (0, _dateFnsExtra.utcToZonedTime)(parsedV, timeZone) : parsedV);
129
- } else {
130
- (0, _warning.default)(true, `[Semi DatePicker] value cannot be parsed, value: ${String(v)}`);
131
128
  }
132
129
  }
133
130
  }
@@ -887,17 +884,19 @@ class DatePickerFoundation extends _foundation.default {
887
884
  timeZone
888
885
  } = this.getProps();
889
886
  const prevTimeZone = this.getState('prevTimezone');
887
+ const start = typeof item.start === 'function' ? item.start() : item.start;
888
+ const end = typeof item.end === 'function' ? item.end() : item.end;
890
889
  let value;
891
890
  switch (type) {
892
891
  case 'month':
893
892
  case 'dateTime':
894
893
  case 'date':
895
- value = this.parseWithTimezone([item.start], timeZone, prevTimeZone);
894
+ value = this.parseWithTimezone([start], timeZone, prevTimeZone);
896
895
  this.handleSelectedChange(value);
897
896
  break;
898
897
  case 'dateTimeRange':
899
898
  case 'dateRange':
900
- value = this.parseWithTimezone([item.start, item.end], timeZone, prevTimeZone);
899
+ value = this.parseWithTimezone([start, end], timeZone, prevTimeZone);
901
900
  this.handleSelectedChange(value, {
902
901
  needCheckFocusRecord: false
903
902
  });
@@ -553,6 +553,18 @@
553
553
  margin-bottom: 0;
554
554
  }
555
555
 
556
+ .semi-input-only_border {
557
+ background: transparent;
558
+ border-color: var(--semi-color-border);
559
+ }
560
+ .semi-input-only_border:hover {
561
+ background: transparent;
562
+ border-color: var(--semi-color-border);
563
+ }
564
+ .semi-input-only_border:focus-within {
565
+ background: transparent;
566
+ }
567
+
556
568
  .semi-input-borderless:not(:focus-within):not(:hover) {
557
569
  background-color: transparent;
558
570
  border-color: transparent;
@@ -85,7 +85,7 @@ $module: #{$prefix}-input;
85
85
  border: $color-input_default-border-focus solid $width-input_wrapper_focus-border;
86
86
 
87
87
  &:hover {
88
- background-color: $color-input_default-bg-focus;
88
+ background-color: $color-input_default-bg-focus-hover;
89
89
  border-color: $color-input_default-border-focus;
90
90
  }
91
91
 
@@ -690,7 +690,18 @@ $module: #{$prefix}-input;
690
690
  }
691
691
  }
692
692
 
693
+ .#{$module}-only_border{
694
+ background: transparent;
695
+ &:hover{
696
+ background: transparent;
697
+ border-color: $color_input-default-border-only_border-hover;
698
+ }
699
+ &:focus-within{
700
+ background: transparent;
701
+ }
702
+ border-color: $color_input-default-border-only_border-default;
693
703
 
704
+ }
694
705
 
695
706
  .#{$module}-borderless{
696
707
 
@@ -713,8 +724,6 @@ $module: #{$prefix}-input;
713
724
  }
714
725
 
715
726
 
716
-
717
-
718
727
  }
719
728
 
720
729
  @import "./rtl.scss";
@@ -13,6 +13,8 @@ $color-input_default-bg-focus: var(--semi-color-fill-0); // 输入框背景颜
13
13
  $color-input_default-border-focus: var(--semi-color-focus-border); // 输入框描边颜色 - 选中
14
14
  $color-input_icon-outline: var(--semi-color-primary-light-active); // 输入框 icon outline 颜色
15
15
 
16
+ $color-input_default-bg-focus-hover: $color-input_default-bg-focus; // 输入框背景颜色 - 选中悬浮
17
+
16
18
  // error
17
19
  $color-input_danger-bg-default: var(--semi-color-danger-light-default); // 错误输入框背景颜色 - 默认
18
20
  $color-input_danger-border-default: var(--semi-color-danger-light-default); // 错误输入框描边颜色 - 默认
@@ -57,6 +59,9 @@ $color-input_counter_danger-text-default: var(--semi-color-danger); // 多行文
57
59
 
58
60
  $color-input_group-border-default: var(--semi-color-border); // 输入框组合分割线颜色
59
61
 
62
+ $color_input-default-border-only_border-default: var(--semi-color-border); // 只有描边的输入框描边颜色 - 默认
63
+ $color_input-default-border-only_border-hover: var(--semi-color-border); // 只有描边的输入框描边颜色 - 默认
64
+
60
65
  $height-input_large: $height-control-large - 2px; // 输入框高度 & 行高 - 大尺寸
61
66
  $height-input_small: $height-control-small - 2px; // 输入框高度 & 行高 - 小尺寸
62
67
  $height-input_default: $height-control-default - 2px; // 输入框高度 & 行高 - 默认尺寸
@@ -64,6 +64,9 @@
64
64
  overflow: hidden;
65
65
  box-shadow: var(--semi-shadow-elevated);
66
66
  }
67
+ .semi-modal-footerfill {
68
+ display: flex;
69
+ }
67
70
  .semi-modal-content-fullScreen {
68
71
  border-radius: 0;
69
72
  border: none;
@@ -70,7 +70,11 @@ $module: #{$prefix}-modal;
70
70
  padding: $spacing-modal_content-paddingY $spacing-modal_content-paddingX;
71
71
  background-clip: padding-box;
72
72
  overflow: hidden;
73
- @include shadow-elevated;
73
+ box-shadow: $shadow-modal_content;
74
+ }
75
+
76
+ &-footerfill{
77
+ display: flex;
74
78
  }
75
79
 
76
80
  &-content-fullScreen {
@@ -51,6 +51,7 @@ export interface ModalProps {
51
51
  direction?: any;
52
52
  fullScreen?: boolean;
53
53
  preventScroll?: boolean;
54
+ footerFill?: boolean;
54
55
  }
55
56
  export interface ModalState {
56
57
  displayNone: boolean;
@@ -71,3 +71,7 @@ $color-modal_footer-border:transparent; // 模态框 footer 顶部描边颜色
71
71
  $width-modal_footer-border:0; // 模态框 footer 顶部描边宽度
72
72
 
73
73
 
74
+ //shadow
75
+ $shadow-modal_content: var(--semi-shadow-elevated)
76
+
77
+
@@ -6,6 +6,7 @@ declare const cssClasses: {
6
6
  DOTS: string;
7
7
  MARKS: string;
8
8
  HANDLE: string;
9
+ HANDLE_DOT: string;
9
10
  };
10
11
  declare const strings: {
11
12
  SIZE: string[];
@@ -12,7 +12,8 @@ const cssClasses = {
12
12
  TRACK: `${_constants.BASE_CLASS_PREFIX}-slider-track`,
13
13
  DOTS: `${_constants.BASE_CLASS_PREFIX}-slider-dots`,
14
14
  MARKS: `${_constants.BASE_CLASS_PREFIX}-slider-marks`,
15
- HANDLE: `${_constants.BASE_CLASS_PREFIX}-slider-handle`
15
+ HANDLE: `${_constants.BASE_CLASS_PREFIX}-slider-handle`,
16
+ HANDLE_DOT: `${_constants.BASE_CLASS_PREFIX}-slider-handle-dot`
16
17
  };
17
18
  exports.cssClasses = cssClasses;
18
19
  const strings = {
@@ -31,6 +31,13 @@ export interface SliderProps {
31
31
  'aria-labelledby'?: string;
32
32
  'aria-valuetext'?: string;
33
33
  getAriaValueText?: (value: number, index?: number) => string;
34
+ handleDot?: {
35
+ size?: string;
36
+ color?: string;
37
+ } & ({
38
+ size?: string;
39
+ color?: string;
40
+ }[]);
34
41
  }
35
42
  export interface SliderState {
36
43
  currentValue: number | number[];
@@ -46,10 +46,19 @@
46
46
  cursor: pointer;
47
47
  transition: background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);
48
48
  transform: var(--semi-transform_scale-small) translateX(-50%) translateY(0px);
49
+ display: inline-flex;
50
+ justify-content: center;
51
+ align-items: center;
49
52
  }
50
53
  .semi-slider-handle:focus-visible {
51
54
  outline: 2px solid var(--semi-color-primary-light-active);
52
55
  }
56
+ .semi-slider-handle-dot {
57
+ background: var(--semi-color-primary);
58
+ width: 4px;
59
+ height: 4px;
60
+ border-radius: var(--semi-border-radius-circle);
61
+ }
53
62
  .semi-slider-handle:hover {
54
63
  background-color: var(--semi-color-white);
55
64
  }
@@ -58,9 +58,19 @@ $module: #{$prefix}-slider;
58
58
  cursor: pointer;
59
59
  transition: background-color $transition_duration_slider_handle-bg $transition_function-slider-handle-bg $transition_delay-slider_handle-bg;
60
60
  transform: $transform_scale-slider_handle translateX(-50%) translateY($spacing-slider_handle-translateY);
61
+ display: inline-flex;
62
+ justify-content: center;
63
+ align-items: center;
61
64
  &:focus-visible {
62
65
  outline: $width-slider_handle-focus solid $color-slider_handle-focus;
63
66
  }
67
+
68
+ &-dot{
69
+ background:$color-slider_handle_dot;
70
+ width:$width-slider_handle_dot;
71
+ height: $width-slider_handle_dot;
72
+ border-radius: var(--semi-border-radius-circle);
73
+ }
64
74
  }
65
75
 
66
76
  &-handle:hover {
@@ -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; // 滚动条轨道文本字号
@@ -427,7 +427,6 @@ class Tooltip extends _foundation.default {
427
427
  return null;
428
428
  }
429
429
  calcPosStyle(props) {
430
- var _a;
431
430
  const {
432
431
  spacing,
433
432
  isOverFlow
@@ -478,10 +477,6 @@ class Tooltip extends _foundation.default {
478
477
  const isTriggerNearLeft = middleX - containerRect.left < containerRect.right - middleX;
479
478
  const isTriggerNearTop = middleY - containerRect.top < containerRect.bottom - middleY;
480
479
  const isWrapperWidthOverflow = wrapperRect.width > innerWidth;
481
- const scaled = Math.abs((wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.width) - ((_a = this._adapter.getContainer()) === null || _a === void 0 ? void 0 : _a.clientWidth)) > 1;
482
- if (scaled) {
483
- SPACING = SPACING * wrapperRect.width / this._adapter.getContainer().clientWidth;
484
- }
485
480
  switch (position) {
486
481
  case 'top':
487
482
  // left = middleX;
@@ -598,12 +593,6 @@ class Tooltip extends _foundation.default {
598
593
  // Calculate container positioning relative to window
599
594
  left = left - containerRect.left;
600
595
  top = top - containerRect.top;
601
- if (scaled) {
602
- left /= wrapperRect.width / this._adapter.getContainer().clientWidth;
603
- }
604
- if (scaled) {
605
- top /= wrapperRect.height / this._adapter.getContainer().clientHeight;
606
- }
607
596
  /**
608
597
  * container为body时,如果position不为relative或absolute,这时trigger计算出的top/left会根据html定位(initial containing block)
609
598
  * 此时如果body有margin,则计算出的位置相对于body会有问题 fix issue #1368
@@ -96,6 +96,7 @@ export interface TreeSelectAdapter<P = Record<string, any>, S = Record<string, a
96
96
  closeMenu: (cb?: () => void) => void;
97
97
  getTriggerWidth: () => boolean | number;
98
98
  setOptionWrapperWidth: (width: null | number) => void;
99
+ notifyClear: (e: any) => void;
99
100
  notifyChange: BasicOnChangeWithBasic;
100
101
  notifyChangeWithObject: BasicOnChangeWithObject;
101
102
  notifyExpand: (expandedKeys: Set<string>, expandedOtherProps: BasicExpandedOtherProps) => void;
@@ -385,6 +385,7 @@ class TreeSelectFoundation extends _foundation.default {
385
385
  }
386
386
  }
387
387
  }
388
+ this._adapter.notifyClear(e);
388
389
  }
389
390
  /**
390
391
  * A11y: simulate clear button click
@@ -0,0 +1,19 @@
1
+ $animation_duration-additionalBorder: 800ms; // 边框动画持续时间
2
+ $animation_duration-content: 1000ms; // 内容动画持续时间
3
+
4
+
5
+ $animation_opacity-additionalBorder-start: 1; // 边框动画起始透明度
6
+ $animation_opacity-additionalBorder-end: 0; // 边框动画结束透明度
7
+
8
+
9
+ $animation_width-additionalBorder-end:0; // 边框动画结束宽度
10
+
11
+
12
+ $animation_scale-additionalBorder-start: 1; // 边框动画起始缩放比例
13
+ $animation_scale-additionalBorder-end: 1.15; // 边框动画结束缩放比例
14
+
15
+ $animation_scale-content-start: 1; // 边框动画起始缩放比例
16
+ $animation_scale-content-middle: 0.9; // 边框动画中间态缩放比例
17
+ $animation_scale-content-end: 1; // 边框动画结束缩放比例
18
+
19
+