@douyinfe/semi-foundation 2.43.1 → 2.44.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.
@@ -395,6 +395,7 @@ $module: #{$prefix}-cascader;
395
395
  padding-right: $spacing-cascader_option-paddingRight;
396
396
  }
397
397
 
398
+
398
399
  .#{$module}-option-list {
399
400
  box-sizing: border-box;
400
401
  display: inline-block;
@@ -28,6 +28,12 @@ export interface BasicData {
28
28
  pathData?: BasicCascaderData[]
29
29
  }
30
30
 
31
+ export interface Virtualize {
32
+ itemSize: number;
33
+ height?: number | string;
34
+ width?: number | string
35
+ }
36
+
31
37
  export interface BasicEntities {
32
38
  [idx: string]: BasicEntity
33
39
  }
@@ -157,6 +163,7 @@ export interface BasicCascaderProps {
157
163
  leafOnly?: boolean;
158
164
  enableLeafClick?: boolean;
159
165
  preventScroll?: boolean;
166
+ virtualizeInSearch?: Virtualize;
160
167
  onClear?: () => void;
161
168
  triggerRender?: (props: BasicTriggerRenderProps) => any;
162
169
  onListScroll?: (e: any, panel: BasicScrollPanelProps) => void;
@@ -395,6 +395,7 @@ $module: #{$prefix}-cascader;
395
395
  padding-right: $spacing-cascader_option-paddingRight;
396
396
  }
397
397
 
398
+
398
399
  .#{$module}-option-list {
399
400
  box-sizing: border-box;
400
401
  display: inline-block;
@@ -6,6 +6,11 @@ export interface BasicData {
6
6
  searchText: any[];
7
7
  pathData?: BasicCascaderData[];
8
8
  }
9
+ export interface Virtualize {
10
+ itemSize: number;
11
+ height?: number | string;
12
+ width?: number | string;
13
+ }
9
14
  export interface BasicEntities {
10
15
  [idx: string]: BasicEntity;
11
16
  }
@@ -105,6 +110,7 @@ export interface BasicCascaderProps {
105
110
  leafOnly?: boolean;
106
111
  enableLeafClick?: boolean;
107
112
  preventScroll?: boolean;
113
+ virtualizeInSearch?: Virtualize;
108
114
  onClear?: () => void;
109
115
  triggerRender?: (props: BasicTriggerRenderProps) => any;
110
116
  onListScroll?: (e: any, panel: BasicScrollPanelProps) => void;
@@ -37,9 +37,11 @@
37
37
  flex-direction: column;
38
38
  }
39
39
  .semi-popconfirm-body {
40
- margin-left: 36px;
41
40
  color: var(--semi-color-text-2);
42
41
  }
42
+ .semi-popconfirm-body-withIcon {
43
+ margin-left: 36px;
44
+ }
43
45
  .semi-popconfirm-body > p {
44
46
  margin: 0;
45
47
  padding: 0;
@@ -46,8 +46,9 @@ $module: #{$prefix}-popconfirm;
46
46
  }
47
47
 
48
48
  &-body {
49
- margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
50
-
49
+ &-withIcon {
50
+ margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
51
+ }
51
52
  color: $color-popconfirm_body-text;
52
53
 
53
54
  & > p {
@@ -493,6 +493,11 @@
493
493
  transform: rotate(0deg);
494
494
  }
495
495
 
496
+ .semi-table-column-filter-dropdown .semi-dropdown-menu {
497
+ max-height: 290px;
498
+ overflow-y: auto;
499
+ }
500
+
496
501
  .semi-table-wrapper-rtl .semi-table {
497
502
  direction: rtl;
498
503
  text-align: right;
@@ -620,4 +620,11 @@ $module: #{$prefix}-table;
620
620
  }
621
621
  }
622
622
 
623
+ .#{$module}-column-filter-dropdown {
624
+ .#{$prefix}-dropdown-menu {
625
+ max-height: $height-table_column_filter_dropdown;
626
+ overflow-y: auto;
627
+ }
628
+ }
629
+
623
630
  @import './rtl.scss';
@@ -42,6 +42,7 @@ $width-table_cell_fixed_left_last: 1px; // 表格左上角单元格底部描边
42
42
  $width-table_cell_fixed_right_first: 1px; // 表格左上角单元格右侧描边宽度
43
43
  $width-table_react_resizable_handle: 9px; // 表格伸缩列调节热区宽度
44
44
  $height-table_pagination_outer_min: 60px; // 表格分页器高度
45
+ $height-table_column_filter_dropdown: 290px; // 表格过滤筛选列表最大高度
45
46
 
46
47
 
47
48
  // Color no need to change
@@ -44,6 +44,14 @@
44
44
  .semi-tag-invisible {
45
45
  display: none;
46
46
  }
47
+ .semi-tag-prefix-icon {
48
+ display: flex;
49
+ padding-right: 4px;
50
+ }
51
+ .semi-tag-suffix-icon {
52
+ display: flex;
53
+ padding-left: 4px;
54
+ }
47
55
  .semi-tag-content {
48
56
  flex: 1;
49
57
  }
@@ -51,6 +51,16 @@ $types: "ghost", "solid", "light";
51
51
  display: none;
52
52
  }
53
53
 
54
+ &-prefix-icon {
55
+ display: flex;
56
+ padding-right: $spacing-tag_prefix_icon_paddingRight;
57
+ }
58
+
59
+ &-suffix-icon {
60
+ display: flex;
61
+ padding-left: $spacing-tag_suffix_icon_paddingLeft;
62
+ }
63
+
54
64
  &-content {
55
65
  flex: 1;
56
66
 
@@ -25,6 +25,9 @@ $radius-tag_circle: var(--semi-border-radius-full); // 胶囊标签圆角大小
25
25
  $spacing-tag_small-paddingY: 2px; // 小尺寸标签垂直方向内边距
26
26
  $spacing-tag_small-paddingX: $spacing-tight; // 小尺寸标签水平方向内边距
27
27
 
28
+ $spacing-tag_prefix_icon_paddingRight: $spacing-extra-tight; // 后缀图标右侧边距
29
+ $spacing-tag_suffix_icon_paddingLeft: $spacing-extra-tight; // 后缀图标左侧边距
30
+
28
31
  $spacing-tag_large-paddingY: 4px; // 大尺寸标签垂直方向内边距
29
32
  $spacing-tag_large-paddingX: $spacing-tight; // 大尺寸标签水平方向内边距
30
33
 
@@ -670,8 +670,7 @@ class Tooltip extends _foundation.default {
670
670
  * 基于视口和容器一起判断,以下几种情况允许从原方向转到反方向,以判断是否应该由top->bottom为例子
671
671
  *
672
672
  * 1. 视口上下空间不足 且 容器上空间❌下空间✅
673
- * 2. 视口上空间❌下空间✅ 且 容器上下空间不足
674
- * 3. 视口上空间❌下空间✅ 且 容器上空间❌下空间✅
673
+ * 2. 视口上空间❌下空间✅
675
674
  *
676
675
  * Based on the judgment of the viewport and the container, the following situations are allowed to turn from the original direction to the opposite direction
677
676
  * to judge whether it should be top->bottom as an example
@@ -679,7 +678,7 @@ class Tooltip extends _foundation.default {
679
678
  * 2. The space above the viewport ❌ the space below ✅ and the space above and below the container is insufficient
680
679
  * 3. Viewport upper space ❌ lower space✅ and container upper space ❌ lower space✅
681
680
  */
682
- return viewOverFlow && shouldReverseContainer || shouldReverseView && containerOverFlow || shouldReverseView && shouldReverseContainer;
681
+ return viewOverFlow && shouldReverseContainer || shouldReverseView;
683
682
  }
684
683
  // place the dom correctly
685
684
  adjustPosIfNeed(position, style, triggerRect, wrapperRect, containerRect) {
@@ -395,6 +395,7 @@ $module: #{$prefix}-cascader;
395
395
  padding-right: $spacing-cascader_option-paddingRight;
396
396
  }
397
397
 
398
+
398
399
  .#{$module}-option-list {
399
400
  box-sizing: border-box;
400
401
  display: inline-block;
@@ -6,6 +6,11 @@ export interface BasicData {
6
6
  searchText: any[];
7
7
  pathData?: BasicCascaderData[];
8
8
  }
9
+ export interface Virtualize {
10
+ itemSize: number;
11
+ height?: number | string;
12
+ width?: number | string;
13
+ }
9
14
  export interface BasicEntities {
10
15
  [idx: string]: BasicEntity;
11
16
  }
@@ -105,6 +110,7 @@ export interface BasicCascaderProps {
105
110
  leafOnly?: boolean;
106
111
  enableLeafClick?: boolean;
107
112
  preventScroll?: boolean;
113
+ virtualizeInSearch?: Virtualize;
108
114
  onClear?: () => void;
109
115
  triggerRender?: (props: BasicTriggerRenderProps) => any;
110
116
  onListScroll?: (e: any, panel: BasicScrollPanelProps) => void;
@@ -37,9 +37,11 @@
37
37
  flex-direction: column;
38
38
  }
39
39
  .semi-popconfirm-body {
40
- margin-left: 36px;
41
40
  color: var(--semi-color-text-2);
42
41
  }
42
+ .semi-popconfirm-body-withIcon {
43
+ margin-left: 36px;
44
+ }
43
45
  .semi-popconfirm-body > p {
44
46
  margin: 0;
45
47
  padding: 0;
@@ -46,8 +46,9 @@ $module: #{$prefix}-popconfirm;
46
46
  }
47
47
 
48
48
  &-body {
49
- margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
50
-
49
+ &-withIcon {
50
+ margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
51
+ }
51
52
  color: $color-popconfirm_body-text;
52
53
 
53
54
  & > p {
@@ -493,6 +493,11 @@
493
493
  transform: rotate(0deg);
494
494
  }
495
495
 
496
+ .semi-table-column-filter-dropdown .semi-dropdown-menu {
497
+ max-height: 290px;
498
+ overflow-y: auto;
499
+ }
500
+
496
501
  .semi-table-wrapper-rtl .semi-table {
497
502
  direction: rtl;
498
503
  text-align: right;
@@ -620,4 +620,11 @@ $module: #{$prefix}-table;
620
620
  }
621
621
  }
622
622
 
623
+ .#{$module}-column-filter-dropdown {
624
+ .#{$prefix}-dropdown-menu {
625
+ max-height: $height-table_column_filter_dropdown;
626
+ overflow-y: auto;
627
+ }
628
+ }
629
+
623
630
  @import './rtl.scss';
@@ -42,6 +42,7 @@ $width-table_cell_fixed_left_last: 1px; // 表格左上角单元格底部描边
42
42
  $width-table_cell_fixed_right_first: 1px; // 表格左上角单元格右侧描边宽度
43
43
  $width-table_react_resizable_handle: 9px; // 表格伸缩列调节热区宽度
44
44
  $height-table_pagination_outer_min: 60px; // 表格分页器高度
45
+ $height-table_column_filter_dropdown: 290px; // 表格过滤筛选列表最大高度
45
46
 
46
47
 
47
48
  // Color no need to change
@@ -44,6 +44,14 @@
44
44
  .semi-tag-invisible {
45
45
  display: none;
46
46
  }
47
+ .semi-tag-prefix-icon {
48
+ display: flex;
49
+ padding-right: 4px;
50
+ }
51
+ .semi-tag-suffix-icon {
52
+ display: flex;
53
+ padding-left: 4px;
54
+ }
47
55
  .semi-tag-content {
48
56
  flex: 1;
49
57
  }
@@ -51,6 +51,16 @@ $types: "ghost", "solid", "light";
51
51
  display: none;
52
52
  }
53
53
 
54
+ &-prefix-icon {
55
+ display: flex;
56
+ padding-right: $spacing-tag_prefix_icon_paddingRight;
57
+ }
58
+
59
+ &-suffix-icon {
60
+ display: flex;
61
+ padding-left: $spacing-tag_suffix_icon_paddingLeft;
62
+ }
63
+
54
64
  &-content {
55
65
  flex: 1;
56
66
 
@@ -25,6 +25,9 @@ $radius-tag_circle: var(--semi-border-radius-full); // 胶囊标签圆角大小
25
25
  $spacing-tag_small-paddingY: 2px; // 小尺寸标签垂直方向内边距
26
26
  $spacing-tag_small-paddingX: $spacing-tight; // 小尺寸标签水平方向内边距
27
27
 
28
+ $spacing-tag_prefix_icon_paddingRight: $spacing-extra-tight; // 后缀图标右侧边距
29
+ $spacing-tag_suffix_icon_paddingLeft: $spacing-extra-tight; // 后缀图标左侧边距
30
+
28
31
  $spacing-tag_large-paddingY: 4px; // 大尺寸标签垂直方向内边距
29
32
  $spacing-tag_large-paddingX: $spacing-tight; // 大尺寸标签水平方向内边距
30
33
 
@@ -663,8 +663,7 @@ export default class Tooltip extends BaseFoundation {
663
663
  * 基于视口和容器一起判断,以下几种情况允许从原方向转到反方向,以判断是否应该由top->bottom为例子
664
664
  *
665
665
  * 1. 视口上下空间不足 且 容器上空间❌下空间✅
666
- * 2. 视口上空间❌下空间✅ 且 容器上下空间不足
667
- * 3. 视口上空间❌下空间✅ 且 容器上空间❌下空间✅
666
+ * 2. 视口上空间❌下空间✅
668
667
  *
669
668
  * Based on the judgment of the viewport and the container, the following situations are allowed to turn from the original direction to the opposite direction
670
669
  * to judge whether it should be top->bottom as an example
@@ -672,7 +671,7 @@ export default class Tooltip extends BaseFoundation {
672
671
  * 2. The space above the viewport ❌ the space below ✅ and the space above and below the container is insufficient
673
672
  * 3. Viewport upper space ❌ lower space✅ and container upper space ❌ lower space✅
674
673
  */
675
- return viewOverFlow && shouldReverseContainer || shouldReverseView && containerOverFlow || shouldReverseView && shouldReverseContainer;
674
+ return viewOverFlow && shouldReverseContainer || shouldReverseView;
676
675
  }
677
676
  // place the dom correctly
678
677
  adjustPosIfNeed(position, style, triggerRect, wrapperRect, containerRect) {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.43.1",
3
+ "version": "2.44.0-beta.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
7
7
  "prepublishOnly": "npm run build:lib"
8
8
  },
9
9
  "dependencies": {
10
- "@douyinfe/semi-animation": "2.43.1",
10
+ "@douyinfe/semi-animation": "2.44.0-beta.0",
11
11
  "async-validator": "^3.5.0",
12
12
  "classnames": "^2.2.6",
13
13
  "date-fns": "^2.29.3",
@@ -23,7 +23,7 @@
23
23
  "*.scss",
24
24
  "*.css"
25
25
  ],
26
- "gitHead": "84abaef26e42768a44ba5db31b9891bf508a314e",
26
+ "gitHead": "f304407b2f9fb23f8464d59b685ff1f265f6869a",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",
@@ -46,8 +46,9 @@ $module: #{$prefix}-popconfirm;
46
46
  }
47
47
 
48
48
  &-body {
49
- margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
50
-
49
+ &-withIcon {
50
+ margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
51
+ }
51
52
  color: $color-popconfirm_body-text;
52
53
 
53
54
  & > p {
package/table/table.scss CHANGED
@@ -620,4 +620,11 @@ $module: #{$prefix}-table;
620
620
  }
621
621
  }
622
622
 
623
+ .#{$module}-column-filter-dropdown {
624
+ .#{$prefix}-dropdown-menu {
625
+ max-height: $height-table_column_filter_dropdown;
626
+ overflow-y: auto;
627
+ }
628
+ }
629
+
623
630
  @import './rtl.scss';
@@ -42,6 +42,7 @@ $width-table_cell_fixed_left_last: 1px; // 表格左上角单元格底部描边
42
42
  $width-table_cell_fixed_right_first: 1px; // 表格左上角单元格右侧描边宽度
43
43
  $width-table_react_resizable_handle: 9px; // 表格伸缩列调节热区宽度
44
44
  $height-table_pagination_outer_min: 60px; // 表格分页器高度
45
+ $height-table_column_filter_dropdown: 290px; // 表格过滤筛选列表最大高度
45
46
 
46
47
 
47
48
  // Color no need to change
package/tag/tag.scss CHANGED
@@ -51,6 +51,16 @@ $types: "ghost", "solid", "light";
51
51
  display: none;
52
52
  }
53
53
 
54
+ &-prefix-icon {
55
+ display: flex;
56
+ padding-right: $spacing-tag_prefix_icon_paddingRight;
57
+ }
58
+
59
+ &-suffix-icon {
60
+ display: flex;
61
+ padding-left: $spacing-tag_suffix_icon_paddingLeft;
62
+ }
63
+
54
64
  &-content {
55
65
  flex: 1;
56
66
 
@@ -25,6 +25,9 @@ $radius-tag_circle: var(--semi-border-radius-full); // 胶囊标签圆角大小
25
25
  $spacing-tag_small-paddingY: 2px; // 小尺寸标签垂直方向内边距
26
26
  $spacing-tag_small-paddingX: $spacing-tight; // 小尺寸标签水平方向内边距
27
27
 
28
+ $spacing-tag_prefix_icon_paddingRight: $spacing-extra-tight; // 后缀图标右侧边距
29
+ $spacing-tag_suffix_icon_paddingLeft: $spacing-extra-tight; // 后缀图标左侧边距
30
+
28
31
  $spacing-tag_large-paddingY: 4px; // 大尺寸标签垂直方向内边距
29
32
  $spacing-tag_large-paddingX: $spacing-tight; // 大尺寸标签水平方向内边距
30
33
 
@@ -709,8 +709,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
709
709
  * 基于视口和容器一起判断,以下几种情况允许从原方向转到反方向,以判断是否应该由top->bottom为例子
710
710
  *
711
711
  * 1. 视口上下空间不足 且 容器上空间❌下空间✅
712
- * 2. 视口上空间❌下空间✅ 且 容器上下空间不足
713
- * 3. 视口上空间❌下空间✅ 且 容器上空间❌下空间✅
712
+ * 2. 视口上空间❌下空间✅
714
713
  *
715
714
  * Based on the judgment of the viewport and the container, the following situations are allowed to turn from the original direction to the opposite direction
716
715
  * to judge whether it should be top->bottom as an example
@@ -718,7 +717,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
718
717
  * 2. The space above the viewport ❌ the space below ✅ and the space above and below the container is insufficient
719
718
  * 3. Viewport upper space ❌ lower space✅ and container upper space ❌ lower space✅
720
719
  */
721
- return (viewOverFlow && shouldReverseContainer) || (shouldReverseView && containerOverFlow) || (shouldReverseView && shouldReverseContainer);
720
+ return (viewOverFlow && shouldReverseContainer) || shouldReverseView ;
722
721
  }
723
722
 
724
723
  // place the dom correctly