@douyinfe/semi-foundation 2.16.0 → 2.16.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.
@@ -42,7 +42,8 @@ export default class DropdownMenuFoundation extends BaseFoundation<Partial<Defau
42
42
 
43
43
  if (this.firstChars.length === 0){
44
44
  this.menuItemNodes.forEach((item: Element) => {
45
- this.firstChars.push(item.textContent.trim()[0].toLowerCase());
45
+ // the menuItemNodes can be an component and not exit textContent
46
+ this.firstChars.push(item.textContent.trim()[0]?.toLowerCase());
46
47
  });
47
48
  }
48
49
 
@@ -69,7 +70,8 @@ export default class DropdownMenuFoundation extends BaseFoundation<Partial<Defau
69
70
  default:
70
71
  if (isPrintableCharacter(event.key)) {
71
72
  this.setFocusByFirstCharacter(curItem, event.key);
72
- handlePrevent(event);
73
+ // it can be an input on Dropdown, handlePrevent may affect the input of the component
74
+ // handlePrevent(event);
73
75
  }
74
76
  break;
75
77
  }
package/input/input.scss CHANGED
@@ -445,6 +445,11 @@ $module: #{$prefix}-input;
445
445
  background-color: transparent;
446
446
  box-sizing: border-box;
447
447
 
448
+ &[type="password"]::-ms-reveal,
449
+ &[type="password"]::-ms-clear {
450
+ display: none;
451
+ }
452
+
448
453
  &::placeholder {
449
454
  color: $color-input_placeholder-text-default;
450
455
  }
@@ -76,7 +76,10 @@ class DropdownMenuFoundation extends _foundation.default {
76
76
  (0, _forEach.default)(_context3 = this.menuItemNodes).call(_context3, item => {
77
77
  var _context4;
78
78
 
79
- this.firstChars.push((0, _trim.default)(_context4 = item.textContent).call(_context4)[0].toLowerCase());
79
+ var _a; // the menuItemNodes can be an component and not exit textContent
80
+
81
+
82
+ this.firstChars.push((_a = (0, _trim.default)(_context4 = item.textContent).call(_context4)[0]) === null || _a === void 0 ? void 0 : _a.toLowerCase());
80
83
  });
81
84
  } // get the currently focused menu item
82
85
 
@@ -106,8 +109,8 @@ class DropdownMenuFoundation extends _foundation.default {
106
109
 
107
110
  default:
108
111
  if ((0, _a11y.isPrintableCharacter)(event.key)) {
109
- this.setFocusByFirstCharacter(curItem, event.key);
110
- (0, _a11y.handlePrevent)(event);
112
+ this.setFocusByFirstCharacter(curItem, event.key); // it can be an input on Dropdown, handlePrevent may affect the input of the component
113
+ // handlePrevent(event);
111
114
  }
112
115
 
113
116
  break;
@@ -335,6 +335,9 @@
335
335
  background-color: transparent;
336
336
  box-sizing: border-box;
337
337
  }
338
+ .semi-input[type=password]::-ms-reveal, .semi-input[type=password]::-ms-clear {
339
+ display: none;
340
+ }
338
341
  .semi-input::placeholder {
339
342
  color: var(--semi-color-text-2);
340
343
  }
@@ -445,6 +445,11 @@ $module: #{$prefix}-input;
445
445
  background-color: transparent;
446
446
  box-sizing: border-box;
447
447
 
448
+ &[type="password"]::-ms-reveal,
449
+ &[type="password"]::-ms-clear {
450
+ display: none;
451
+ }
452
+
448
453
  &::placeholder {
449
454
  color: $color-input_placeholder-text-default;
450
455
  }
@@ -91,8 +91,8 @@
91
91
  left: 0;
92
92
  }
93
93
  .semi-switch-native-control[type=checkbox] {
94
- width: 100%;
95
- height: 100%;
94
+ width: inherit;
95
+ height: inherit;
96
96
  }
97
97
  .semi-switch-checked-text, .semi-switch-unchecked-text {
98
98
  position: absolute;
@@ -103,8 +103,8 @@ $module: #{$prefix}-switch;
103
103
  &-native-control {
104
104
 
105
105
  &[type="checkbox"] {
106
- width: 100%;
107
- height: 100%;
106
+ width: inherit;
107
+ height: inherit;
108
108
  }
109
109
  width: 100%;
110
110
  height: 100%;
@@ -38,7 +38,7 @@ declare class TimePickerFoundation<P = Record<string, any>, S = Record<string, a
38
38
  setPanel(open: boolean): void;
39
39
  destroy(): void;
40
40
  handlePanelOpen(): void;
41
- hanldePanelClose(clickedOutside: boolean, e: any): void;
41
+ handlePanelClose(clickedOutside: boolean, e: any): void;
42
42
  handleVisibleChange(visible: boolean): void;
43
43
  handleInputChange(input: string): void;
44
44
  doValidate(args: string | Array<Date>): boolean;
@@ -261,7 +261,7 @@ class TimePickerFoundation extends _foundation.default {
261
261
  this._adapter.notifyOpenChange(true);
262
262
  }
263
263
 
264
- hanldePanelClose(clickedOutside, e) {
264
+ handlePanelClose(clickedOutside, e) {
265
265
  if (!this._isControlledComponent('open')) {
266
266
  this._adapter.unregisterClickOutSide();
267
267
 
@@ -58,7 +58,10 @@ export default class DropdownMenuFoundation extends BaseFoundation {
58
58
  _forEachInstanceProperty(_context3 = this.menuItemNodes).call(_context3, item => {
59
59
  var _context4;
60
60
 
61
- this.firstChars.push(_trimInstanceProperty(_context4 = item.textContent).call(_context4)[0].toLowerCase());
61
+ var _a; // the menuItemNodes can be an component and not exit textContent
62
+
63
+
64
+ this.firstChars.push((_a = _trimInstanceProperty(_context4 = item.textContent).call(_context4)[0]) === null || _a === void 0 ? void 0 : _a.toLowerCase());
62
65
  });
63
66
  } // get the currently focused menu item
64
67
 
@@ -88,8 +91,8 @@ export default class DropdownMenuFoundation extends BaseFoundation {
88
91
 
89
92
  default:
90
93
  if (isPrintableCharacter(event.key)) {
91
- this.setFocusByFirstCharacter(curItem, event.key);
92
- handlePrevent(event);
94
+ this.setFocusByFirstCharacter(curItem, event.key); // it can be an input on Dropdown, handlePrevent may affect the input of the component
95
+ // handlePrevent(event);
93
96
  }
94
97
 
95
98
  break;
@@ -335,6 +335,9 @@
335
335
  background-color: transparent;
336
336
  box-sizing: border-box;
337
337
  }
338
+ .semi-input[type=password]::-ms-reveal, .semi-input[type=password]::-ms-clear {
339
+ display: none;
340
+ }
338
341
  .semi-input::placeholder {
339
342
  color: var(--semi-color-text-2);
340
343
  }
@@ -445,6 +445,11 @@ $module: #{$prefix}-input;
445
445
  background-color: transparent;
446
446
  box-sizing: border-box;
447
447
 
448
+ &[type="password"]::-ms-reveal,
449
+ &[type="password"]::-ms-clear {
450
+ display: none;
451
+ }
452
+
448
453
  &::placeholder {
449
454
  color: $color-input_placeholder-text-default;
450
455
  }
@@ -91,8 +91,8 @@
91
91
  left: 0;
92
92
  }
93
93
  .semi-switch-native-control[type=checkbox] {
94
- width: 100%;
95
- height: 100%;
94
+ width: inherit;
95
+ height: inherit;
96
96
  }
97
97
  .semi-switch-checked-text, .semi-switch-unchecked-text {
98
98
  position: absolute;
@@ -103,8 +103,8 @@ $module: #{$prefix}-switch;
103
103
  &-native-control {
104
104
 
105
105
  &[type="checkbox"] {
106
- width: 100%;
107
- height: 100%;
106
+ width: inherit;
107
+ height: inherit;
108
108
  }
109
109
  width: 100%;
110
110
  height: 100%;
@@ -38,7 +38,7 @@ declare class TimePickerFoundation<P = Record<string, any>, S = Record<string, a
38
38
  setPanel(open: boolean): void;
39
39
  destroy(): void;
40
40
  handlePanelOpen(): void;
41
- hanldePanelClose(clickedOutside: boolean, e: any): void;
41
+ handlePanelClose(clickedOutside: boolean, e: any): void;
42
42
  handleVisibleChange(visible: boolean): void;
43
43
  handleInputChange(input: string): void;
44
44
  doValidate(args: string | Array<Date>): boolean;
@@ -238,7 +238,7 @@ class TimePickerFoundation extends BaseFoundation {
238
238
  this._adapter.notifyOpenChange(true);
239
239
  }
240
240
 
241
- hanldePanelClose(clickedOutside, e) {
241
+ handlePanelClose(clickedOutside, e) {
242
242
  if (!this._isControlledComponent('open')) {
243
243
  this._adapter.unregisterClickOutSide();
244
244
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.16.0",
3
+ "version": "2.16.1",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
@@ -24,7 +24,7 @@
24
24
  "*.scss",
25
25
  "*.css"
26
26
  ],
27
- "gitHead": "71f3e6a9ae6f7794c993617dd3d94f565539ac49",
27
+ "gitHead": "3de98e4072b5614d5e41e2ad65f687507563dc7c",
28
28
  "devDependencies": {
29
29
  "@babel/plugin-proposal-decorators": "^7.15.8",
30
30
  "@babel/plugin-transform-runtime": "^7.15.8",
@@ -103,8 +103,8 @@ $module: #{$prefix}-switch;
103
103
  &-native-control {
104
104
 
105
105
  &[type="checkbox"] {
106
- width: 100%;
107
- height: 100%;
106
+ width: inherit;
107
+ height: inherit;
108
108
  }
109
109
  width: 100%;
110
110
  height: 100%;
@@ -250,7 +250,7 @@ class TimePickerFoundation<P = Record<string, any>, S = Record<string, any>> ext
250
250
  this._adapter.notifyOpenChange(true);
251
251
  }
252
252
 
253
- hanldePanelClose(clickedOutside: boolean, e: any) {
253
+ handlePanelClose(clickedOutside: boolean, e: any) {
254
254
  if (!this._isControlledComponent('open')) {
255
255
  this._adapter.unregisterClickOutSide();
256
256
  this.setPanel(false);