@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.
- package/dropdown/menuFoundation.ts +4 -2
- package/input/input.scss +5 -0
- package/lib/cjs/dropdown/menuFoundation.js +6 -3
- package/lib/cjs/input/input.css +3 -0
- package/lib/cjs/input/input.scss +5 -0
- package/lib/cjs/switch/switch.css +2 -2
- package/lib/cjs/switch/switch.scss +2 -2
- package/lib/cjs/timePicker/foundation.d.ts +1 -1
- package/lib/cjs/timePicker/foundation.js +1 -1
- package/lib/es/dropdown/menuFoundation.js +6 -3
- package/lib/es/input/input.css +3 -0
- package/lib/es/input/input.scss +5 -0
- package/lib/es/switch/switch.css +2 -2
- package/lib/es/switch/switch.scss +2 -2
- package/lib/es/timePicker/foundation.d.ts +1 -1
- package/lib/es/timePicker/foundation.js +1 -1
- package/package.json +2 -2
- package/switch/switch.scss +2 -2
- package/timePicker/foundation.ts +1 -1
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
package/lib/cjs/input/input.css
CHANGED
|
@@ -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
|
}
|
package/lib/cjs/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
|
}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
package/lib/es/input/input.css
CHANGED
|
@@ -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
|
}
|
package/lib/es/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
|
}
|
package/lib/es/switch/switch.css
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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.
|
|
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": "
|
|
27
|
+
"gitHead": "3de98e4072b5614d5e41e2ad65f687507563dc7c",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
30
30
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
package/switch/switch.scss
CHANGED
package/timePicker/foundation.ts
CHANGED
|
@@ -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
|
-
|
|
253
|
+
handlePanelClose(clickedOutside: boolean, e: any) {
|
|
254
254
|
if (!this._isControlledComponent('open')) {
|
|
255
255
|
this._adapter.unregisterClickOutSide();
|
|
256
256
|
this.setPanel(false);
|