@douyinfe/semi-foundation 2.15.0 → 2.16.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 (36) hide show
  1. package/dropdown/foundation.ts +1 -1
  2. package/dropdown/menuFoundation.ts +1 -1
  3. package/lib/cjs/dropdown/foundation.js +1 -1
  4. package/lib/cjs/dropdown/menuFoundation.js +1 -1
  5. package/lib/cjs/slider/foundation.d.ts +9 -2
  6. package/lib/cjs/slider/foundation.js +195 -5
  7. package/lib/cjs/slider/slider.css +3 -0
  8. package/lib/cjs/slider/slider.scss +7 -5
  9. package/lib/cjs/slider/variables.scss +4 -4
  10. package/lib/cjs/tooltip/variables.scss +1 -1
  11. package/lib/cjs/treeSelect/treeSelect.css +2 -0
  12. package/lib/cjs/treeSelect/treeSelect.scss +2 -0
  13. package/lib/cjs/typography/typography.css +7 -0
  14. package/lib/cjs/typography/typography.scss +9 -1
  15. package/lib/cjs/utils/a11y.js +2 -2
  16. package/lib/es/dropdown/foundation.js +1 -1
  17. package/lib/es/dropdown/menuFoundation.js +1 -1
  18. package/lib/es/slider/foundation.d.ts +9 -2
  19. package/lib/es/slider/foundation.js +192 -5
  20. package/lib/es/slider/slider.css +3 -0
  21. package/lib/es/slider/slider.scss +7 -5
  22. package/lib/es/slider/variables.scss +4 -4
  23. package/lib/es/tooltip/variables.scss +1 -1
  24. package/lib/es/treeSelect/treeSelect.css +2 -0
  25. package/lib/es/treeSelect/treeSelect.scss +2 -0
  26. package/lib/es/typography/typography.css +7 -0
  27. package/lib/es/typography/typography.scss +9 -1
  28. package/lib/es/utils/a11y.js +2 -2
  29. package/package.json +2 -2
  30. package/slider/foundation.ts +141 -9
  31. package/slider/slider.scss +7 -5
  32. package/slider/variables.scss +4 -4
  33. package/tooltip/variables.scss +1 -1
  34. package/treeSelect/treeSelect.scss +2 -0
  35. package/typography/typography.scss +9 -1
  36. package/utils/a11y.ts +4 -4
@@ -11,9 +11,10 @@ $color-slider_handle_disabled-border-hover: var(--semi-color-white); // 禁用
11
11
  $color-slider_handle_disabled-border: var(--semi-color-border); // 禁用滑动条圆形描边颜色 - 默认态
12
12
  $color-slider_mark-text-default: var(--semi-color-text-2); // 滑动条刻度文字颜色
13
13
  $color-slider_rail-bg-default: var(--semi-color-fill-0); // 滑动条轨道颜色 - 未填充
14
- $color-slider_rail: rgba(0, 0, 0, .65);
14
+ $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
+ $color-slider_handle-focus: var(--semi-color-primary-light-active); // 圆形按钮轮廓 - 聚焦
17
18
 
18
19
  // Spacing
19
20
  $spacing-slider-paddingX: 13px; // 滑动条整体水平内边距
@@ -33,7 +34,7 @@ $spacing-slider_boundary_min-left: 0;
33
34
  $spacing-slider_boundary_max-right: 0;
34
35
  $spacing-slider_vertical_marks-marginTop: -30px; // 垂直滑动条刻度标签顶部外边距
35
36
  $spacing-slider_vertical_marks-marginLeft: 29px; // 垂直滑动条刻度标签左侧外边距
36
- $spacing-slider_vertical_marks-reverse-marginLeft: -26px;// 垂直滑动条刻度标签左侧外边距(标签在左侧时)
37
+ $spacing-slider_vertical_marks-reverse-marginLeft: -26px; // 垂直滑动条刻度标签左侧外边距(标签在左侧时)
37
38
  $spacing-slider_vertical_rail-top: 0; // 垂直滑动条轨道顶部距离
38
39
  $spacing-slider_vertical_handle-marginTop: 0; // 垂直滑动条原型按钮顶部外边距
39
40
  $spacing-slider_vertical_handle-marginLeft: -10px; // 垂直滑动条原型按钮左侧外边距
@@ -42,7 +43,6 @@ $spacing-slider_vertical_handle-marginLeft: -10px; // 垂直滑动条原型按
42
43
  $radius-slider_rail: var(--semi-border-radius-small); // 滚动条未填充轨道圆角
43
44
  $radius-slider_track: var(--semi-border-radius-small); // 滚动条已填充轨道圆角
44
45
 
45
-
46
46
  // Width/Height
47
47
  $height-slider_wrapper: 32px; // 滚动条容器整体高度
48
48
  $height-slider_vertical_wrapper: 4px; // 垂直滚动条整体宽度
@@ -52,7 +52,7 @@ $width-slider_handle_clicked: 1px; // 滚动条圆形按钮按下后描边宽度
52
52
  $height-slider_track: 4px; // 滚动条已填充轨道高度
53
53
  $width-slider_dot: 4px; // 滚动条圆形刻度点宽度
54
54
  $width-slider_handle_border_disabled: 1px; // 禁用滚动条圆形按钮按下后描边宽度
55
-
55
+ $width-slider_handle-focus: 2px; // 圆形按钮轮廓 - 聚焦
56
56
 
57
57
  // Font
58
58
  $font-slider_rail-fontSize: 14px; // 滚动条轨道文本字号
@@ -19,7 +19,7 @@ $spacing-tooltip_content-paddingBottom: $spacing-tight; // 工具提示内容底
19
19
 
20
20
  $font-tooltip-fontSize: $font-size-regular; // 工具提示文本字号
21
21
  $width-tooltip: 240px; // 工具提示宽度 - 默认
22
- $width-tooltip_arrow: 24px; // 工具提示小三角箭头宽度 - 水平
22
+ $width-tooltip_arrow: 24px; // 工具提示小三角箭头宽度 - 水平 ignore-semi-css-trans
23
23
  $height-tooltip_arrow: 7px; // 工具提示小三角箭头高度 - 水平
24
24
 
25
25
  $height-tooltip_arrow_vertical: 24px; // 工具提示小三角箭头高度 - 垂直
@@ -239,6 +239,7 @@ $module: #{$prefix}-tree-select;
239
239
  // right: 0;
240
240
  display: inline-flex;
241
241
  align-items: center;
242
+ flex-shrink: 0;
242
243
  height: 100%;
243
244
  justify-content: center;
244
245
  width: $width-treeSelect_arrow;
@@ -265,6 +266,7 @@ $module: #{$prefix}-tree-select;
265
266
  display: inline-flex;
266
267
  align-items: center;
267
268
  height: 100%;
269
+ flex-shrink: 0;
268
270
  justify-content: center;
269
271
  width: $width-treeSelect_arrow;
270
272
  color: $color-treeSelect_default-icon-default;
@@ -6,6 +6,14 @@ $module: #{$prefix}-typography;
6
6
  color: $color-typography_default-text-default;
7
7
  @include font-size-regular;
8
8
 
9
+ &-text {
10
+ display: inline-block;
11
+
12
+ &-icon {
13
+ display: inline-flex;
14
+ }
15
+ }
16
+
9
17
  &.#{$module}-secondary {
10
18
  color: $color-typography_secondary-text-default;
11
19
  }
@@ -45,7 +53,7 @@ $module: #{$prefix}-typography;
45
53
  }
46
54
 
47
55
  &-icon {
48
- // display: inline-flex;
56
+ display: inline-flex;
49
57
  margin-right: $spacing-typography_iconPrefix-marginRight;
50
58
  vertical-align: middle;
51
59
  color: inherit;
package/utils/a11y.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { get } from "lodash";
2
2
 
3
- export function handlePrevent(event: any) {
3
+ export function handlePrevent(event: any) {
4
4
  event.stopPropagation();
5
5
  event.preventDefault();
6
6
  }
@@ -47,7 +47,7 @@ export function setFocusToPreviousMenuItem (itemNodes: HTMLElement[], currentIte
47
47
  }
48
48
 
49
49
  // set focus to the next item in item list
50
- export function setFocusToNextMenuitem (itemNodes: HTMLElement[], currentItem: HTMLElement): void {
50
+ export function setFocusToNextMenuitem (itemNodes: HTMLElement[], currentItem: HTMLElement): void {
51
51
  let newMenuItem: HTMLElement, index: number;
52
52
 
53
53
  if (itemNodes.length > 0){
@@ -97,10 +97,10 @@ export function getAncestorNodeByRole(curElement: Element, role: string): Elemen
97
97
  return curElement.parentElement;
98
98
  }
99
99
 
100
- // According to the Id, find the corresponding data-popupId element
100
+ // According to the Id, find the corresponding data-popupid element
101
101
  export function getMenuButton(focusableEle: NodeListOf<HTMLElement>, Id: string): HTMLElement{
102
102
  for (let i = 0; i < focusableEle.length; i++){
103
- const curAriDescribedby = focusableEle[i].attributes['data-popupId'];
103
+ const curAriDescribedby = focusableEle[i].attributes['data-popupid'];
104
104
  if (curAriDescribedby && curAriDescribedby.value === Id){
105
105
  return focusableEle[i];
106
106
  }