@douyinfe/semi-foundation 2.22.3 → 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.
Files changed (54) hide show
  1. package/cascader/cascader.scss +15 -0
  2. package/cascader/variables.scss +1 -0
  3. package/form/interface.ts +8 -4
  4. package/image/imageFoundation.ts +1 -1
  5. package/image/previewFooterFoundation.ts +2 -2
  6. package/image/previewImageFoundation.ts +0 -1
  7. package/image/previewInnerFoundation.ts +2 -2
  8. package/lib/cjs/cascader/cascader.css +12 -0
  9. package/lib/cjs/cascader/cascader.scss +15 -0
  10. package/lib/cjs/cascader/variables.scss +1 -0
  11. package/lib/cjs/form/interface.d.ts +8 -6
  12. package/lib/cjs/image/imageFoundation.js +1 -1
  13. package/lib/cjs/image/previewFooterFoundation.js +2 -2
  14. package/lib/cjs/image/previewInnerFoundation.d.ts +1 -1
  15. package/lib/cjs/image/previewInnerFoundation.js +1 -1
  16. package/lib/cjs/navigation/navigation.css +6 -0
  17. package/lib/cjs/navigation/navigation.scss +9 -0
  18. package/lib/cjs/table/constants.d.ts +1 -0
  19. package/lib/cjs/table/constants.js +4 -2
  20. package/lib/cjs/table/table.css +2 -1
  21. package/lib/cjs/table/table.scss +2 -1
  22. package/lib/cjs/tooltip/constants.d.ts +1 -0
  23. package/lib/cjs/tooltip/constants.js +2 -2
  24. package/lib/cjs/tooltip/foundation.d.ts +21 -2
  25. package/lib/cjs/tooltip/foundation.js +352 -77
  26. package/lib/cjs/transfer/foundation.d.ts +1 -1
  27. package/lib/cjs/transfer/foundation.js +3 -4
  28. package/lib/es/cascader/cascader.css +12 -0
  29. package/lib/es/cascader/cascader.scss +15 -0
  30. package/lib/es/cascader/variables.scss +1 -0
  31. package/lib/es/form/interface.d.ts +8 -6
  32. package/lib/es/image/imageFoundation.js +1 -1
  33. package/lib/es/image/previewFooterFoundation.js +2 -2
  34. package/lib/es/image/previewInnerFoundation.d.ts +1 -1
  35. package/lib/es/image/previewInnerFoundation.js +1 -1
  36. package/lib/es/navigation/navigation.css +6 -0
  37. package/lib/es/navigation/navigation.scss +9 -0
  38. package/lib/es/table/constants.d.ts +1 -0
  39. package/lib/es/table/constants.js +4 -2
  40. package/lib/es/table/table.css +2 -1
  41. package/lib/es/table/table.scss +2 -1
  42. package/lib/es/tooltip/constants.d.ts +1 -0
  43. package/lib/es/tooltip/constants.js +2 -2
  44. package/lib/es/tooltip/foundation.d.ts +21 -2
  45. package/lib/es/tooltip/foundation.js +352 -77
  46. package/lib/es/transfer/foundation.d.ts +1 -1
  47. package/lib/es/transfer/foundation.js +3 -4
  48. package/navigation/navigation.scss +9 -0
  49. package/package.json +2 -2
  50. package/table/constants.ts +2 -0
  51. package/table/table.scss +2 -1
  52. package/tooltip/constants.ts +1 -0
  53. package/tooltip/foundation.ts +318 -78
  54. package/transfer/foundation.ts +3 -3
@@ -36,7 +36,7 @@ export default class TransferFoundation<P = Record<string, any>, S = Record<stri
36
36
  _generateGroupedData(dataSource: any[]): any[];
37
37
  _generateTreeData(dataSource: any[]): any[];
38
38
  _generatePath(item: BasicResolvedDataItem): any;
39
- handleInputChange(inputVal: string): void;
39
+ handleInputChange(inputVal: string, notify: boolean): void;
40
40
  handleAll(wantAllChecked: boolean): void;
41
41
  handleClear(): void;
42
42
  handleSelectOrRemove(item: BasicResolvedDataItem): void;
@@ -24,7 +24,7 @@ export default class TransferFoundation extends BaseFoundation {
24
24
  return path.map(p => p.label).join(' > ');
25
25
  }
26
26
 
27
- handleInputChange(inputVal) {
27
+ handleInputChange(inputVal, notify) {
28
28
  const {
29
29
  data
30
30
  } = this.getStates();
@@ -38,7 +38,7 @@ export default class TransferFoundation extends BaseFoundation {
38
38
 
39
39
  this._adapter.searchTree(inputVal);
40
40
 
41
- this._adapter.notifySearch(inputVal);
41
+ notify && this._adapter.notifySearch(inputVal);
42
42
 
43
43
  this._adapter.updateInput(inputVal);
44
44
 
@@ -50,8 +50,7 @@ export default class TransferFoundation extends BaseFoundation {
50
50
  const filterFunc = typeof filter === 'function' ? item => filter(inputVal, item) : item => typeof item.label === 'string' && item.label.includes(inputVal);
51
51
  const searchData = data.filter(filterFunc);
52
52
  const searchResult = new Set(searchData.map(item => item.key));
53
-
54
- this._adapter.notifySearch(inputVal);
53
+ notify && this._adapter.notifySearch(inputVal);
55
54
 
56
55
  this._adapter.updateInput(inputVal);
57
56
 
@@ -113,6 +113,15 @@ $module: #{$prefix}-navigation;
113
113
  justify-content: flex-start;
114
114
  }
115
115
 
116
+ // when item has link, add the padding to link instead of item
117
+ &-item-has-link {
118
+ padding: 0;
119
+
120
+ .#{$module}-item-link {
121
+ padding: $spacing-navigation_item-paddingY $spacing-navigation_item-paddingX;
122
+ }
123
+ }
124
+
116
125
  &-item-sub {
117
126
  padding: $spacing-navigation_item_sub-padding;
118
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.22.3",
3
+ "version": "2.23.0-beta.1",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
@@ -23,7 +23,7 @@
23
23
  "*.scss",
24
24
  "*.css"
25
25
  ],
26
- "gitHead": "8cff064f240ea2a919c3527ae9b84e66c5b7a419",
26
+ "gitHead": "afe3b23c86641a627ade78ceb414d05223fc7354",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",
@@ -60,6 +60,7 @@ const DEFAULT_CELL_MIDDLE_PADDING_BOTTOM = 12;
60
60
  const DEFAULT_CELL_SMALL_PADDING_TOP = 8;
61
61
  const DEFAULT_CELL_SMALL_PADDING_BOTTOM = 8;
62
62
  const DEFAULT_CELL_LINE_HEIGHT = 20;
63
+ const DEFAULT_EMPTYSLOT_HEIGHT = 52;
63
64
 
64
65
  // normal size
65
66
  const DEFAULT_VIRTUALIZED_ROW_HEIGHT =
@@ -118,6 +119,7 @@ const numbers = {
118
119
  DEFAULT_VIRTUALIZED_SECTION_ROW_SMALL_HEIGHT: DEFAULT_VIRTUALIZED_ROW_SMALL_HEIGHT,
119
120
  DEFAULT_VIRTUALIZED_ROW_SMALL_HEIGHT,
120
121
  DEFAULT_VIRTUALIZED_ROW_SMALL_MIN_HEIGHT,
122
+ DEFAULT_EMPTYSLOT_HEIGHT
121
123
  } as const;
122
124
 
123
125
  export { cssClasses, strings, numbers };
package/table/table.scss CHANGED
@@ -481,7 +481,8 @@ $module: #{$prefix}-table;
481
481
  }
482
482
 
483
483
  &-placeholder {
484
- position: relative;
484
+ position: sticky;
485
+ left: 0px;
485
486
  z-index: 1;
486
487
  padding: #{$spacing-table-paddingY} #{$spacing-table-paddingX};
487
488
  color: $color-table_placeholder-text-default;
@@ -39,6 +39,7 @@ const numbers = {
39
39
  MOUSE_ENTER_DELAY: 50,
40
40
  MOUSE_LEAVE_DELAY: 50,
41
41
  SPACING: 8, // Values are consistent with spacing-tight in scss
42
+ MARGIN: 0,
42
43
  } as const;
43
44
 
44
45
  export { cssClasses, strings, numbers };