@douyinfe/semi-foundation 2.21.0 → 2.21.2
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/lib/cjs/modal/modalContentFoundation.d.ts +1 -1
- package/lib/cjs/modal/modalContentFoundation.js +12 -12
- package/lib/cjs/select/select.scss +1 -1
- package/lib/cjs/timePicker/timePicker.css +8 -0
- package/lib/cjs/timePicker/timePicker.scss +16 -0
- package/lib/cjs/timePicker/variables.scss +1 -0
- package/lib/es/modal/modalContentFoundation.d.ts +1 -1
- package/lib/es/modal/modalContentFoundation.js +12 -12
- package/lib/es/select/select.scss +1 -1
- package/lib/es/timePicker/timePicker.css +8 -0
- package/lib/es/timePicker/timePicker.scss +16 -0
- package/lib/es/timePicker/variables.scss +1 -0
- package/modal/modalContentFoundation.ts +1 -1
- package/package.json +2 -2
- package/select/select.scss +1 -1
- package/timePicker/timePicker.scss +16 -0
- package/timePicker/variables.scss +1 -0
|
@@ -28,7 +28,7 @@ export default class ModalContentFoundation extends BaseFoundation<ModalContentA
|
|
|
28
28
|
destroy(): void;
|
|
29
29
|
handleDialogMouseDown(): void;
|
|
30
30
|
handleMaskMouseUp(): void;
|
|
31
|
-
handleKeyDown(e: any)
|
|
31
|
+
handleKeyDown: (e: any) => void;
|
|
32
32
|
handleKeyDownEventListenerMount(): void;
|
|
33
33
|
handleKeyDownEventListenerUnmount(): void;
|
|
34
34
|
getMouseState(): void;
|
|
@@ -14,6 +14,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
14
14
|
class ModalContentFoundation extends _foundation.default {
|
|
15
15
|
constructor(adapter) {
|
|
16
16
|
super(Object.assign(Object.assign({}, ModalContentFoundation.defaultAdapter), adapter));
|
|
17
|
+
|
|
18
|
+
this.handleKeyDown = e => {
|
|
19
|
+
const {
|
|
20
|
+
closeOnEsc
|
|
21
|
+
} = this.getProps();
|
|
22
|
+
|
|
23
|
+
if (closeOnEsc && e.keyCode === _keyCode.default.ESC) {
|
|
24
|
+
e.stopPropagation();
|
|
25
|
+
this.close(e);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
17
29
|
}
|
|
18
30
|
|
|
19
31
|
destroy() {
|
|
@@ -30,18 +42,6 @@ class ModalContentFoundation extends _foundation.default {
|
|
|
30
42
|
this._adapter.notifyDialogMouseUp();
|
|
31
43
|
}
|
|
32
44
|
|
|
33
|
-
handleKeyDown(e) {
|
|
34
|
-
const {
|
|
35
|
-
closeOnEsc
|
|
36
|
-
} = this.getProps();
|
|
37
|
-
|
|
38
|
-
if (closeOnEsc && e.keyCode === _keyCode.default.ESC) {
|
|
39
|
-
e.stopPropagation();
|
|
40
|
-
this.close(e);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
45
|
handleKeyDownEventListenerMount() {
|
|
46
46
|
this._adapter.addKeyDownEventListener();
|
|
47
47
|
}
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
.semi-timepicker-panel .semi-scrolllist-body {
|
|
8
8
|
height: 252px;
|
|
9
9
|
}
|
|
10
|
+
.semi-timepicker-panel .semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer-nocycle > ul:before,
|
|
11
|
+
.semi-timepicker-panel .semi-scrolllist-body .semi-scrolllist-item > ul:before {
|
|
12
|
+
height: 108px;
|
|
13
|
+
}
|
|
14
|
+
.semi-timepicker-panel .semi-scrolllist-body .semi-scrolllist-item > ul,
|
|
15
|
+
.semi-timepicker-panel .semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer > ul {
|
|
16
|
+
padding-bottom: 108px;
|
|
17
|
+
}
|
|
10
18
|
.semi-timepicker-panel .semi-scrolllist-item,
|
|
11
19
|
.semi-timepicker-panel .semi-scrolllist-item-wheel {
|
|
12
20
|
flex: none;
|
|
@@ -8,6 +8,22 @@ $module-list: #{$prefix}-scrolllist;
|
|
|
8
8
|
&-panel {
|
|
9
9
|
.#{$module-list}-body {
|
|
10
10
|
height: $height-timePicker_panel_body;
|
|
11
|
+
|
|
12
|
+
.#{$module-list}-item-wheel .#{$module-list}-list-outer-nocycle,
|
|
13
|
+
.#{$module-list}-item {
|
|
14
|
+
& > ul {
|
|
15
|
+
&:before {
|
|
16
|
+
height: ($height-timePicker_panel_body - $height-scrollList_item) * 0.5;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.#{$module-list}-item,
|
|
22
|
+
.#{$module-list}-item-wheel .#{$module-list}-list-outer {
|
|
23
|
+
& > ul {
|
|
24
|
+
padding-bottom: ($height-timePicker_panel_body - $height-scrollList_item) * 0.5;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
11
27
|
}
|
|
12
28
|
|
|
13
29
|
.#{$module-list}-item,
|
|
@@ -5,6 +5,7 @@ $color-timePicker_range_panel-border: rgba(0, 0, 0, .1); // 时间选择器描
|
|
|
5
5
|
// Width/Height
|
|
6
6
|
$width-timePicker_range_panel-border: 1px; // 时间选择器菜单分割线宽度
|
|
7
7
|
$height-timePicker_panel_body: 252px; // 时间选择器菜单高度
|
|
8
|
+
$height-scrollList_item: 36px;
|
|
8
9
|
$width-timePicker_panel_list_ampm: 72px; // 时间选择器菜单中列宽度 - 上午下午
|
|
9
10
|
$width-timePicker_panel_list_hour: 64px; // 时间选择器菜单中列宽度 - 小时
|
|
10
11
|
$width-timePicker_panel_list_minute: 64px; // 时间选择器菜单中列宽度 - 分钟
|
|
@@ -28,7 +28,7 @@ export default class ModalContentFoundation extends BaseFoundation<ModalContentA
|
|
|
28
28
|
destroy(): void;
|
|
29
29
|
handleDialogMouseDown(): void;
|
|
30
30
|
handleMaskMouseUp(): void;
|
|
31
|
-
handleKeyDown(e: any)
|
|
31
|
+
handleKeyDown: (e: any) => void;
|
|
32
32
|
handleKeyDownEventListenerMount(): void;
|
|
33
33
|
handleKeyDownEventListenerUnmount(): void;
|
|
34
34
|
getMouseState(): void;
|
|
@@ -3,6 +3,18 @@ import KeyCode from '../utils/keyCode';
|
|
|
3
3
|
export default class ModalContentFoundation extends BaseFoundation {
|
|
4
4
|
constructor(adapter) {
|
|
5
5
|
super(Object.assign(Object.assign({}, ModalContentFoundation.defaultAdapter), adapter));
|
|
6
|
+
|
|
7
|
+
this.handleKeyDown = e => {
|
|
8
|
+
const {
|
|
9
|
+
closeOnEsc
|
|
10
|
+
} = this.getProps();
|
|
11
|
+
|
|
12
|
+
if (closeOnEsc && e.keyCode === KeyCode.ESC) {
|
|
13
|
+
e.stopPropagation();
|
|
14
|
+
this.close(e);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
6
18
|
}
|
|
7
19
|
|
|
8
20
|
destroy() {
|
|
@@ -19,18 +31,6 @@ export default class ModalContentFoundation extends BaseFoundation {
|
|
|
19
31
|
this._adapter.notifyDialogMouseUp();
|
|
20
32
|
}
|
|
21
33
|
|
|
22
|
-
handleKeyDown(e) {
|
|
23
|
-
const {
|
|
24
|
-
closeOnEsc
|
|
25
|
-
} = this.getProps();
|
|
26
|
-
|
|
27
|
-
if (closeOnEsc && e.keyCode === KeyCode.ESC) {
|
|
28
|
-
e.stopPropagation();
|
|
29
|
-
this.close(e);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
34
|
handleKeyDownEventListenerMount() {
|
|
35
35
|
this._adapter.addKeyDownEventListener();
|
|
36
36
|
}
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
.semi-timepicker-panel .semi-scrolllist-body {
|
|
8
8
|
height: 252px;
|
|
9
9
|
}
|
|
10
|
+
.semi-timepicker-panel .semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer-nocycle > ul:before,
|
|
11
|
+
.semi-timepicker-panel .semi-scrolllist-body .semi-scrolllist-item > ul:before {
|
|
12
|
+
height: 108px;
|
|
13
|
+
}
|
|
14
|
+
.semi-timepicker-panel .semi-scrolllist-body .semi-scrolllist-item > ul,
|
|
15
|
+
.semi-timepicker-panel .semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer > ul {
|
|
16
|
+
padding-bottom: 108px;
|
|
17
|
+
}
|
|
10
18
|
.semi-timepicker-panel .semi-scrolllist-item,
|
|
11
19
|
.semi-timepicker-panel .semi-scrolllist-item-wheel {
|
|
12
20
|
flex: none;
|
|
@@ -8,6 +8,22 @@ $module-list: #{$prefix}-scrolllist;
|
|
|
8
8
|
&-panel {
|
|
9
9
|
.#{$module-list}-body {
|
|
10
10
|
height: $height-timePicker_panel_body;
|
|
11
|
+
|
|
12
|
+
.#{$module-list}-item-wheel .#{$module-list}-list-outer-nocycle,
|
|
13
|
+
.#{$module-list}-item {
|
|
14
|
+
& > ul {
|
|
15
|
+
&:before {
|
|
16
|
+
height: ($height-timePicker_panel_body - $height-scrollList_item) * 0.5;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.#{$module-list}-item,
|
|
22
|
+
.#{$module-list}-item-wheel .#{$module-list}-list-outer {
|
|
23
|
+
& > ul {
|
|
24
|
+
padding-bottom: ($height-timePicker_panel_body - $height-scrollList_item) * 0.5;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
11
27
|
}
|
|
12
28
|
|
|
13
29
|
.#{$module-list}-item,
|
|
@@ -5,6 +5,7 @@ $color-timePicker_range_panel-border: rgba(0, 0, 0, .1); // 时间选择器描
|
|
|
5
5
|
// Width/Height
|
|
6
6
|
$width-timePicker_range_panel-border: 1px; // 时间选择器菜单分割线宽度
|
|
7
7
|
$height-timePicker_panel_body: 252px; // 时间选择器菜单高度
|
|
8
|
+
$height-scrollList_item: 36px;
|
|
8
9
|
$width-timePicker_panel_list_ampm: 72px; // 时间选择器菜单中列宽度 - 上午下午
|
|
9
10
|
$width-timePicker_panel_list_hour: 64px; // 时间选择器菜单中列宽度 - 小时
|
|
10
11
|
$width-timePicker_panel_list_minute: 64px; // 时间选择器菜单中列宽度 - 分钟
|
|
@@ -48,7 +48,7 @@ export default class ModalContentFoundation extends BaseFoundation<ModalContentA
|
|
|
48
48
|
this._adapter.notifyDialogMouseUp();
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
handleKeyDown(e: any) {
|
|
51
|
+
handleKeyDown = (e: any) => {
|
|
52
52
|
const { closeOnEsc } = this.getProps();
|
|
53
53
|
if (closeOnEsc && e.keyCode === KeyCode.ESC) {
|
|
54
54
|
e.stopPropagation();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.21.
|
|
3
|
+
"version": "2.21.2",
|
|
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": "
|
|
26
|
+
"gitHead": "c587f9996fa14bbe90539099a176d79b52c849f4",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
package/select/select.scss
CHANGED
|
@@ -8,6 +8,22 @@ $module-list: #{$prefix}-scrolllist;
|
|
|
8
8
|
&-panel {
|
|
9
9
|
.#{$module-list}-body {
|
|
10
10
|
height: $height-timePicker_panel_body;
|
|
11
|
+
|
|
12
|
+
.#{$module-list}-item-wheel .#{$module-list}-list-outer-nocycle,
|
|
13
|
+
.#{$module-list}-item {
|
|
14
|
+
& > ul {
|
|
15
|
+
&:before {
|
|
16
|
+
height: ($height-timePicker_panel_body - $height-scrollList_item) * 0.5;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.#{$module-list}-item,
|
|
22
|
+
.#{$module-list}-item-wheel .#{$module-list}-list-outer {
|
|
23
|
+
& > ul {
|
|
24
|
+
padding-bottom: ($height-timePicker_panel_body - $height-scrollList_item) * 0.5;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
11
27
|
}
|
|
12
28
|
|
|
13
29
|
.#{$module-list}-item,
|
|
@@ -5,6 +5,7 @@ $color-timePicker_range_panel-border: rgba(0, 0, 0, .1); // 时间选择器描
|
|
|
5
5
|
// Width/Height
|
|
6
6
|
$width-timePicker_range_panel-border: 1px; // 时间选择器菜单分割线宽度
|
|
7
7
|
$height-timePicker_panel_body: 252px; // 时间选择器菜单高度
|
|
8
|
+
$height-scrollList_item: 36px;
|
|
8
9
|
$width-timePicker_panel_list_ampm: 72px; // 时间选择器菜单中列宽度 - 上午下午
|
|
9
10
|
$width-timePicker_panel_list_hour: 64px; // 时间选择器菜单中列宽度 - 小时
|
|
10
11
|
$width-timePicker_panel_list_minute: 64px; // 时间选择器菜单中列宽度 - 分钟
|