zartui 0.1.21 → 0.1.25
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/README.md +20 -20
- package/changelog.generated.md +15 -0
- package/es/area/style/index.js +4 -0
- package/es/area/style/less.js +4 -0
- package/es/avatar/index.css +1 -1
- package/es/avatar/index.js +54 -36
- package/es/avatar/index.less +39 -11
- package/es/avatar/local.less +1 -1
- package/es/button/index.js +4 -1
- package/es/button/index.less +206 -206
- package/es/calendar/index.less +250 -250
- package/es/calendar/style/index.js +1 -1
- package/es/calendar/style/less.js +1 -1
- package/es/cell/index.less +103 -103
- package/es/cell-group/index.less +22 -22
- package/es/checkbox/index.less +89 -89
- package/es/checkbox-group/index.less +8 -8
- package/es/col/index.less +20 -20
- package/es/datetime-picker/style/index.js +4 -0
- package/es/datetime-picker/style/less.js +4 -0
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.less +125 -125
- package/es/dialog/style/index.js +1 -1
- package/es/dialog/style/less.js +1 -1
- package/es/empty/Developing.js +1643 -0
- package/es/empty/Error.js +484 -0
- package/es/empty/NotFound.js +645 -0
- package/es/empty/NotRight.js +395 -0
- package/es/empty/Search.js +336 -0
- package/es/empty/index.css +1 -0
- package/es/empty/index.js +105 -0
- package/es/empty/index.less +33 -0
- package/es/empty/style/index.js +2 -0
- package/es/empty/style/less.js +2 -0
- package/es/field/index.less +172 -172
- package/es/icon/index.less +10 -10
- package/es/icon/local.less +1 -1
- package/es/image/index.less +47 -47
- package/es/image-preview/index.less +103 -103
- package/es/image-preview/style/index.js +1 -1
- package/es/image-preview/style/less.js +1 -1
- package/es/index.js +6 -3
- package/es/info/index.less +29 -29
- package/es/loading/index.less +103 -103
- package/es/locale/lang/zh-CN.js +22 -0
- package/es/mixins/bind-event.js +2 -2
- package/es/mixins/checkbox.js +2 -2
- package/es/mixins/click-outside.js +2 -2
- package/es/mixins/slots.js +3 -3
- package/es/mixins/telemetry.js +11 -0
- package/es/nav-bar/index.less +74 -74
- package/es/number-keyboard/index.css +1 -1
- package/es/number-keyboard/index.less +144 -142
- package/es/overlay/index.less +11 -11
- package/es/password-input/index.css +1 -0
- package/es/password-input/index.js +80 -0
- package/es/password-input/index.less +83 -0
- package/es/password-input/style/index.js +2 -0
- package/es/password-input/style/less.js +2 -0
- package/es/pdf-viewer/style/index.js +1 -1
- package/es/pdf-viewer/style/less.js +1 -1
- package/es/picker/PickerColumn.js +5 -6
- package/es/picker/index.js +34 -5
- package/es/picker/index.less +151 -151
- package/es/picker/shared.js +4 -0
- package/es/picker/style/index.js +4 -0
- package/es/picker/style/less.js +4 -0
- package/es/popup/index.less +137 -137
- package/es/popup/style/index.js +1 -1
- package/es/popup/style/less.js +1 -1
- package/es/radio/index.less +86 -86
- package/es/radio-group/index.less +8 -8
- package/es/rate/index.css +1 -1
- package/es/rate/index.js +1 -1
- package/es/rate/index.less +47 -47
- package/es/row/index.less +42 -42
- package/es/signature/index.css +1 -0
- package/es/signature/index.js +230 -0
- package/es/signature/index.less +50 -0
- package/es/signature/style/index.js +9 -0
- package/es/signature/style/less.js +9 -0
- package/es/slider/index.less +94 -94
- package/es/step/index.less +139 -139
- package/es/stepper/index.less +130 -130
- package/es/steps/index.less +21 -21
- package/es/sticky/index.less +11 -11
- package/es/style/animation.less +139 -139
- package/es/style/base.less +11 -11
- package/es/style/clearfix.less +5 -5
- package/es/style/ellipsis.less +13 -13
- package/es/style/hairline.less +47 -47
- package/es/style/halfPxBorder.less +15 -15
- package/es/style/mixins/clearfix.less +7 -7
- package/es/style/mixins/ellipsis.less +15 -15
- package/es/style/mixins/hairline.less +39 -39
- package/es/style/normalize.less +38 -38
- package/es/style/reset.less +171 -171
- package/es/style/var.less +941 -919
- package/es/swipe/index.less +56 -56
- package/es/swipe-cell/index.less +29 -29
- package/es/swipe-item/index.less +8 -8
- package/es/switch/index.less +56 -56
- package/es/switch/shared.js +2 -2
- package/es/switch-cell/index.less +15 -15
- package/es/tab/index.less +17 -17
- package/es/tabs/index.less +153 -153
- package/es/tag/index.less +99 -99
- package/es/telemetry/index.js +72 -0
- package/es/toast/index.js +1 -1
- package/es/toast/index.less +75 -75
- package/es/toast/style/index.js +1 -1
- package/es/toast/style/less.js +1 -1
- package/es/uploader/index.less +163 -163
- package/es/uploader/style/index.js +1 -1
- package/es/uploader/style/less.js +1 -1
- package/es/utils/create/bem.js +7 -7
- package/es/utils/create/component.js +37 -7
- package/es/utils/dom/raf.js +2 -2
- package/es/utils/dom/reset-scroll.js +3 -3
- package/es/utils/index.js +29 -29
- package/es/utils/media/image-util.js +138 -0
- package/es/utils/router.js +2 -2
- package/lib/7893e51cf0a4877dac80.worker.js +10 -0
- package/lib/area/style/index.js +4 -0
- package/lib/area/style/less.js +4 -0
- package/lib/avatar/index.css +1 -1
- package/lib/avatar/index.js +55 -37
- package/lib/avatar/index.less +39 -11
- package/lib/avatar/local.less +1 -1
- package/lib/be09b519a460e229fd8d.worker.js +2527 -0
- package/lib/button/index.js +5 -0
- package/lib/button/index.less +206 -206
- package/lib/calendar/index.less +250 -250
- package/lib/calendar/style/index.js +1 -1
- package/lib/calendar/style/less.js +1 -1
- package/lib/cell/index.less +103 -103
- package/lib/cell-group/index.less +22 -22
- package/lib/checkbox/index.less +89 -89
- package/lib/checkbox-group/index.less +8 -8
- package/lib/col/index.less +20 -20
- package/lib/datetime-picker/style/index.js +4 -0
- package/lib/datetime-picker/style/less.js +4 -0
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.less +125 -125
- package/lib/dialog/style/index.js +1 -1
- package/lib/dialog/style/less.js +1 -1
- package/lib/empty/Developing.js +1648 -0
- package/lib/empty/Error.js +489 -0
- package/lib/empty/NotFound.js +650 -0
- package/lib/empty/NotRight.js +400 -0
- package/lib/empty/Search.js +341 -0
- package/lib/empty/index.css +1 -0
- package/lib/empty/index.js +119 -0
- package/lib/empty/index.less +33 -0
- package/lib/empty/style/index.js +2 -0
- package/lib/empty/style/less.js +2 -0
- package/lib/field/index.less +172 -172
- package/lib/icon/index.less +10 -10
- package/lib/icon/local.less +1 -1
- package/lib/image/index.less +47 -47
- package/lib/image-preview/index.less +103 -103
- package/lib/image-preview/style/index.js +1 -1
- package/lib/image-preview/style/less.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.js +14 -2
- package/lib/index.less +6 -3
- package/lib/info/index.less +29 -29
- package/lib/loading/index.less +103 -103
- package/lib/locale/lang/zh-CN.js +22 -0
- package/lib/mixins/bind-event.js +2 -2
- package/lib/mixins/checkbox.js +2 -2
- package/lib/mixins/click-outside.js +2 -2
- package/lib/mixins/slots.js +3 -3
- package/lib/mixins/telemetry.js +20 -0
- package/lib/nav-bar/index.less +74 -74
- package/lib/number-keyboard/index.css +1 -1
- package/lib/number-keyboard/index.less +144 -142
- package/lib/overlay/index.less +11 -11
- package/lib/password-input/index.css +1 -0
- package/lib/password-input/index.js +93 -0
- package/lib/password-input/index.less +83 -0
- package/lib/password-input/style/index.js +2 -0
- package/lib/password-input/style/less.js +2 -0
- package/lib/pdf-viewer/style/index.js +1 -1
- package/lib/pdf-viewer/style/less.js +1 -1
- package/lib/picker/PickerColumn.js +5 -6
- package/lib/picker/index.js +36 -6
- package/lib/picker/index.less +151 -151
- package/lib/picker/shared.js +4 -0
- package/lib/picker/style/index.js +4 -0
- package/lib/picker/style/less.js +4 -0
- package/lib/popup/index.less +137 -137
- package/lib/popup/style/index.js +1 -1
- package/lib/popup/style/less.js +1 -1
- package/lib/radio/index.less +86 -86
- package/lib/radio-group/index.less +8 -8
- package/lib/rate/index.css +1 -1
- package/lib/rate/index.js +1 -1
- package/lib/rate/index.less +47 -47
- package/lib/row/index.less +42 -42
- package/lib/signature/index.css +1 -0
- package/lib/signature/index.js +242 -0
- package/lib/signature/index.less +50 -0
- package/lib/signature/style/index.js +9 -0
- package/lib/signature/style/less.js +9 -0
- package/lib/slider/index.less +94 -94
- package/lib/step/index.less +139 -139
- package/lib/stepper/index.less +130 -130
- package/lib/steps/index.less +21 -21
- package/lib/sticky/index.less +11 -11
- package/lib/style/animation.less +139 -139
- package/lib/style/base.less +11 -11
- package/lib/style/clearfix.less +5 -5
- package/lib/style/ellipsis.less +13 -13
- package/lib/style/hairline.less +47 -47
- package/lib/style/halfPxBorder.less +15 -15
- package/lib/style/mixins/clearfix.less +7 -7
- package/lib/style/mixins/ellipsis.less +15 -15
- package/lib/style/mixins/hairline.less +39 -39
- package/lib/style/normalize.less +38 -38
- package/lib/style/reset.less +171 -171
- package/lib/style/var.less +941 -919
- package/lib/swipe/index.less +56 -56
- package/lib/swipe-cell/index.less +29 -29
- package/lib/swipe-item/index.less +8 -8
- package/lib/switch/index.less +56 -56
- package/lib/switch/shared.js +2 -2
- package/lib/switch-cell/index.less +15 -15
- package/lib/tab/index.less +17 -17
- package/lib/tabs/index.less +153 -153
- package/lib/tag/index.less +99 -99
- package/lib/telemetry/index.js +82 -0
- package/lib/toast/index.js +1 -1
- package/lib/toast/index.less +75 -75
- package/lib/toast/style/index.js +1 -1
- package/lib/toast/style/less.js +1 -1
- package/lib/uploader/index.less +163 -163
- package/lib/uploader/style/index.js +1 -1
- package/lib/uploader/style/less.js +1 -1
- package/lib/utils/create/bem.js +7 -7
- package/lib/utils/create/component.js +41 -7
- package/lib/utils/dom/raf.js +2 -2
- package/lib/utils/dom/reset-scroll.js +3 -3
- package/lib/utils/index.js +29 -29
- package/lib/utils/media/image-util.js +153 -0
- package/lib/utils/router.js +2 -2
- package/lib/zart.js +27476 -55536
- package/lib/zart.min.js +5 -5
- package/package.json +74 -74
- package/lib/a037f57fc4d92a8a1f1e.worker.js +0 -60600
- package/lib/b7cf90b4775181215df7.worker.js +0 -10
package/es/tag/index.less
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
@import '../style/var';
|
|
2
|
-
|
|
3
|
-
.zt-tag {
|
|
4
|
-
position: relative;
|
|
5
|
-
display: inline-flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
padding: @tag-padding;
|
|
8
|
-
color: @tag-text-color;
|
|
9
|
-
font-size: @tag-font-size;
|
|
10
|
-
line-height: @tag-line-height;
|
|
11
|
-
border-radius: @tag-border-radius;
|
|
12
|
-
|
|
13
|
-
&--default {
|
|
14
|
-
background-color: @tag-default-color;
|
|
15
|
-
|
|
16
|
-
&.zt-tag--plain {
|
|
17
|
-
color: @tag-default-color;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&--danger {
|
|
22
|
-
background-color: @tag-danger-color;
|
|
23
|
-
|
|
24
|
-
&.zt-tag--plain {
|
|
25
|
-
color: @tag-danger-color;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&--primary {
|
|
30
|
-
background-color: @tag-primary-color;
|
|
31
|
-
|
|
32
|
-
&.zt-tag--plain {
|
|
33
|
-
color: @tag-primary-color;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&--success {
|
|
38
|
-
background-color: @tag-success-color;
|
|
39
|
-
|
|
40
|
-
&.zt-tag--plain {
|
|
41
|
-
color: @tag-success-color;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&--warning {
|
|
46
|
-
background-color: @tag-warning-color;
|
|
47
|
-
|
|
48
|
-
&.zt-tag--plain {
|
|
49
|
-
color: @tag-warning-color;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&--plain {
|
|
54
|
-
background-color: @tag-plain-background-color;
|
|
55
|
-
border-color: currentColor;
|
|
56
|
-
|
|
57
|
-
&::before {
|
|
58
|
-
position: absolute;
|
|
59
|
-
top: 0;
|
|
60
|
-
right: 0;
|
|
61
|
-
bottom: 0;
|
|
62
|
-
left: 0;
|
|
63
|
-
border: 1px solid;
|
|
64
|
-
border-color: inherit;
|
|
65
|
-
border-radius: inherit;
|
|
66
|
-
content: '';
|
|
67
|
-
pointer-events: none;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&--medium {
|
|
72
|
-
padding: @tag-medium-padding;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&--large {
|
|
76
|
-
padding: @tag-large-padding;
|
|
77
|
-
font-size: @tag-large-font-size;
|
|
78
|
-
border-radius: @tag-large-border-radius;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&--mark {
|
|
82
|
-
border-radius: 0 @tag-round-border-radius @tag-round-border-radius 0;
|
|
83
|
-
|
|
84
|
-
&::after {
|
|
85
|
-
display: block;
|
|
86
|
-
width: 2px;
|
|
87
|
-
content: '';
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&--round {
|
|
92
|
-
border-radius: @tag-round-border-radius;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&__close {
|
|
96
|
-
margin-left: 2px;
|
|
97
|
-
cursor: pointer;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.zt-tag {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
padding: @tag-padding;
|
|
8
|
+
color: @tag-text-color;
|
|
9
|
+
font-size: @tag-font-size;
|
|
10
|
+
line-height: @tag-line-height;
|
|
11
|
+
border-radius: @tag-border-radius;
|
|
12
|
+
|
|
13
|
+
&--default {
|
|
14
|
+
background-color: @tag-default-color;
|
|
15
|
+
|
|
16
|
+
&.zt-tag--plain {
|
|
17
|
+
color: @tag-default-color;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&--danger {
|
|
22
|
+
background-color: @tag-danger-color;
|
|
23
|
+
|
|
24
|
+
&.zt-tag--plain {
|
|
25
|
+
color: @tag-danger-color;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--primary {
|
|
30
|
+
background-color: @tag-primary-color;
|
|
31
|
+
|
|
32
|
+
&.zt-tag--plain {
|
|
33
|
+
color: @tag-primary-color;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--success {
|
|
38
|
+
background-color: @tag-success-color;
|
|
39
|
+
|
|
40
|
+
&.zt-tag--plain {
|
|
41
|
+
color: @tag-success-color;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&--warning {
|
|
46
|
+
background-color: @tag-warning-color;
|
|
47
|
+
|
|
48
|
+
&.zt-tag--plain {
|
|
49
|
+
color: @tag-warning-color;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&--plain {
|
|
54
|
+
background-color: @tag-plain-background-color;
|
|
55
|
+
border-color: currentColor;
|
|
56
|
+
|
|
57
|
+
&::before {
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: 0;
|
|
60
|
+
right: 0;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
left: 0;
|
|
63
|
+
border: 1px solid;
|
|
64
|
+
border-color: inherit;
|
|
65
|
+
border-radius: inherit;
|
|
66
|
+
content: '';
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--medium {
|
|
72
|
+
padding: @tag-medium-padding;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&--large {
|
|
76
|
+
padding: @tag-large-padding;
|
|
77
|
+
font-size: @tag-large-font-size;
|
|
78
|
+
border-radius: @tag-large-border-radius;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&--mark {
|
|
82
|
+
border-radius: 0 @tag-round-border-radius @tag-round-border-radius 0;
|
|
83
|
+
|
|
84
|
+
&::after {
|
|
85
|
+
display: block;
|
|
86
|
+
width: 2px;
|
|
87
|
+
content: '';
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&--round {
|
|
92
|
+
border-radius: @tag-round-border-radius;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&__close {
|
|
96
|
+
margin-left: 2px;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// eslint-disable-next-line max-classes-per-file
|
|
2
|
+
export var TelemetryEvent = function TelemetryEvent(name, attributes) {
|
|
3
|
+
this.name = name;
|
|
4
|
+
|
|
5
|
+
if (attributes) {
|
|
6
|
+
this.attributes = attributes;
|
|
7
|
+
} else {
|
|
8
|
+
this.attributes = {};
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export var Telemetry = /*#__PURE__*/function () {
|
|
12
|
+
function Telemetry() {}
|
|
13
|
+
|
|
14
|
+
var _proto = Telemetry.prototype;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 初始化 Telemetry
|
|
18
|
+
* @param project,项目名
|
|
19
|
+
* @param app, 应用名
|
|
20
|
+
* @param route,页面路由名
|
|
21
|
+
* @param send, 发送事件的函数
|
|
22
|
+
*/
|
|
23
|
+
_proto.setup = function setup(_ref) {
|
|
24
|
+
var project = _ref.project,
|
|
25
|
+
app = _ref.app,
|
|
26
|
+
route = _ref.route,
|
|
27
|
+
send = _ref.send;
|
|
28
|
+
this.project = project;
|
|
29
|
+
this.app = app;
|
|
30
|
+
this.route = route;
|
|
31
|
+
this.send = send;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
_proto.getRoute = function getRoute() {
|
|
35
|
+
if (this.route instanceof Function) {
|
|
36
|
+
var routeFunc = this.route;
|
|
37
|
+
return routeFunc();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return this.route;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
_proto.track = function track(event) {
|
|
44
|
+
event.attributes.project = this.project;
|
|
45
|
+
event.attributes.app = this.app;
|
|
46
|
+
event.attributes.route = this.getRoute();
|
|
47
|
+
|
|
48
|
+
if (this.send) {
|
|
49
|
+
this.send(event);
|
|
50
|
+
} else {
|
|
51
|
+
console.debug(JSON.stringify(event));
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
_proto.trackClick = function trackClick(event) {
|
|
56
|
+
event.attributes.click = 1;
|
|
57
|
+
this.track(event);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
_proto.trackAppear = function trackAppear(event) {
|
|
61
|
+
event.attributes.appear = 1;
|
|
62
|
+
this.track(event);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
_proto.trackDisappear = function trackDisappear(event) {
|
|
66
|
+
event.attributes.disappear = 1;
|
|
67
|
+
this.track(event);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
return Telemetry;
|
|
71
|
+
}();
|
|
72
|
+
Telemetry.sharedInstance = new Telemetry();
|
package/es/toast/index.js
CHANGED
|
@@ -93,7 +93,7 @@ function Toast(options) {
|
|
|
93
93
|
options = _extends({}, currentOptions, defaultOptionsMap[options.type || currentOptions.type], options);
|
|
94
94
|
|
|
95
95
|
if (process.env.NODE_ENV === 'development' && options.mask) {
|
|
96
|
-
console.warn('[
|
|
96
|
+
console.warn('[Zart] Toast: "mask" option is deprecated, use "overlay" option instead.');
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
options.clear = function () {
|
package/es/toast/index.less
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
@import '../style/var';
|
|
2
|
-
|
|
3
|
-
.zt-toast {
|
|
4
|
-
position: fixed;
|
|
5
|
-
top: 50%;
|
|
6
|
-
left: 50%;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
box-sizing: content-box;
|
|
12
|
-
|
|
13
|
-
// hack for avoid max-width when use left & fixed
|
|
14
|
-
width: @toast-default-width;
|
|
15
|
-
max-width: @toast-max-width;
|
|
16
|
-
min-height: @toast-default-min-height;
|
|
17
|
-
padding: @toast-default-padding;
|
|
18
|
-
color: @toast-text-color;
|
|
19
|
-
font-size: @toast-font-size;
|
|
20
|
-
line-height: @toast-line-height;
|
|
21
|
-
|
|
22
|
-
// allow newline character
|
|
23
|
-
white-space: pre-wrap;
|
|
24
|
-
text-align: center;
|
|
25
|
-
// https://github.com/youzan/vant/issues/8959
|
|
26
|
-
word-break: break-all;
|
|
27
|
-
background-color: @toast-background-color;
|
|
28
|
-
border-radius: @toast-border-radius;
|
|
29
|
-
transform: translate3d(-50%, -50%, 0);
|
|
30
|
-
|
|
31
|
-
&--unclickable {
|
|
32
|
-
// lock scroll
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
|
|
35
|
-
// should not add pointer-events: none directly to body tag
|
|
36
|
-
// that will cause unexpected tap-highlight-color in mobile safari
|
|
37
|
-
* {
|
|
38
|
-
pointer-events: none;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&--text,
|
|
43
|
-
&--html {
|
|
44
|
-
width: fit-content;
|
|
45
|
-
min-width: @toast-text-min-width;
|
|
46
|
-
min-height: 0;
|
|
47
|
-
padding: @toast-text-padding;
|
|
48
|
-
|
|
49
|
-
.zt-toast__text {
|
|
50
|
-
margin-top: 0;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&--top {
|
|
55
|
-
top: @toast-position-top-distance;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&--bottom {
|
|
59
|
-
top: auto;
|
|
60
|
-
bottom: @toast-position-bottom-distance;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&__icon {
|
|
64
|
-
font-size: @toast-icon-size;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&__loading {
|
|
68
|
-
padding: @padding-base;
|
|
69
|
-
color: @toast-loading-icon-color;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&__text {
|
|
73
|
-
margin-top: @padding-xs;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.zt-toast {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 50%;
|
|
6
|
+
left: 50%;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
box-sizing: content-box;
|
|
12
|
+
|
|
13
|
+
// hack for avoid max-width when use left & fixed
|
|
14
|
+
width: @toast-default-width;
|
|
15
|
+
max-width: @toast-max-width;
|
|
16
|
+
min-height: @toast-default-min-height;
|
|
17
|
+
padding: @toast-default-padding;
|
|
18
|
+
color: @toast-text-color;
|
|
19
|
+
font-size: @toast-font-size;
|
|
20
|
+
line-height: @toast-line-height;
|
|
21
|
+
|
|
22
|
+
// allow newline character
|
|
23
|
+
white-space: pre-wrap;
|
|
24
|
+
text-align: center;
|
|
25
|
+
// https://github.com/youzan/vant/issues/8959
|
|
26
|
+
word-break: break-all;
|
|
27
|
+
background-color: @toast-background-color;
|
|
28
|
+
border-radius: @toast-border-radius;
|
|
29
|
+
transform: translate3d(-50%, -50%, 0);
|
|
30
|
+
|
|
31
|
+
&--unclickable {
|
|
32
|
+
// lock scroll
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
|
|
35
|
+
// should not add pointer-events: none directly to body tag
|
|
36
|
+
// that will cause unexpected tap-highlight-color in mobile safari
|
|
37
|
+
* {
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--text,
|
|
43
|
+
&--html {
|
|
44
|
+
width: fit-content;
|
|
45
|
+
min-width: @toast-text-min-width;
|
|
46
|
+
min-height: 0;
|
|
47
|
+
padding: @toast-text-padding;
|
|
48
|
+
|
|
49
|
+
.zt-toast__text {
|
|
50
|
+
margin-top: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--top {
|
|
55
|
+
top: @toast-position-top-distance;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--bottom {
|
|
59
|
+
top: auto;
|
|
60
|
+
bottom: @toast-position-bottom-distance;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&__icon {
|
|
64
|
+
font-size: @toast-icon-size;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&__loading {
|
|
68
|
+
padding: @padding-base;
|
|
69
|
+
color: @toast-loading-icon-color;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__text {
|
|
73
|
+
margin-top: @padding-xs;
|
|
74
|
+
}
|
|
75
|
+
}
|
package/es/toast/style/index.js
CHANGED
package/es/toast/style/less.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../style/base.less';
|
|
2
2
|
import '../../loading/index.less';
|
|
3
|
+
import '../../overlay/index.less';
|
|
3
4
|
import '../../info/index.less';
|
|
4
5
|
import '../../icon/index.less';
|
|
5
|
-
import '../../overlay/index.less';
|
|
6
6
|
import '../../popup/index.less';
|
|
7
7
|
import '../index.less';
|