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
|
@@ -1,142 +1,144 @@
|
|
|
1
|
-
@import '../style/var';
|
|
2
|
-
|
|
3
|
-
.zt-number-keyboard {
|
|
4
|
-
position: fixed;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
z-index: @number-keyboard-z-index;
|
|
8
|
-
width: 100
|
|
9
|
-
padding
|
|
10
|
-
background-color: @number-keyboard-background-color;
|
|
11
|
-
user-select: none;
|
|
12
|
-
|
|
13
|
-
&--with-title {
|
|
14
|
-
border-radius: 20px 20px 0 0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&__header {
|
|
18
|
-
position: relative;
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
box-sizing: content-box;
|
|
23
|
-
height: @number-keyboard-title-height;
|
|
24
|
-
padding-top: 6px;
|
|
25
|
-
color: @number-keyboard-title-color;
|
|
26
|
-
font-size: @number-keyboard-title-font-size;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&__title {
|
|
30
|
-
display: inline-block;
|
|
31
|
-
font-weight: normal;
|
|
32
|
-
|
|
33
|
-
&-left {
|
|
34
|
-
position: absolute;
|
|
35
|
-
left: 0;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&__body {
|
|
40
|
-
display: flex;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
flex:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
flex:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
//
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
&--
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
color: @number-keyboard-button-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
flex:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.zt-number-keyboard {
|
|
4
|
+
position: fixed;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
z-index: @number-keyboard-z-index;
|
|
8
|
+
width: calc(100% - 24px);
|
|
9
|
+
padding: 16px 8px 8px 16px;
|
|
10
|
+
background-color: @number-keyboard-background-color;
|
|
11
|
+
user-select: none;
|
|
12
|
+
|
|
13
|
+
&--with-title {
|
|
14
|
+
border-radius: 20px 20px 0 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__header {
|
|
18
|
+
position: relative;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
box-sizing: content-box;
|
|
23
|
+
height: @number-keyboard-title-height;
|
|
24
|
+
padding-top: 6px;
|
|
25
|
+
color: @number-keyboard-title-color;
|
|
26
|
+
font-size: @number-keyboard-title-font-size;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__title {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
font-weight: normal;
|
|
32
|
+
|
|
33
|
+
&-left {
|
|
34
|
+
position: absolute;
|
|
35
|
+
left: 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__body {
|
|
40
|
+
display: flex;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__keys {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex: 3;
|
|
46
|
+
flex-wrap: wrap;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__close {
|
|
50
|
+
position: absolute;
|
|
51
|
+
right: 0;
|
|
52
|
+
height: 100%;
|
|
53
|
+
padding: @number-keyboard-close-padding;
|
|
54
|
+
color: @number-keyboard-close-color;
|
|
55
|
+
font-size: @number-keyboard-close-font-size;
|
|
56
|
+
background-color: transparent;
|
|
57
|
+
border: none;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
|
|
60
|
+
&:active {
|
|
61
|
+
opacity: @active-opacity;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&__sidebar {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex: 1;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--unfit {
|
|
72
|
+
padding-bottom: 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.zt-key {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
height: @number-keyboard-key-height;
|
|
81
|
+
font-size: @number-keyboard-key-font-size;
|
|
82
|
+
line-height: 1.5;
|
|
83
|
+
background-color: @white;
|
|
84
|
+
border-radius: @border-radius-lg;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
|
|
87
|
+
&--large {
|
|
88
|
+
// height: 100% can't fill flex parent on legacy safari
|
|
89
|
+
// see: https://stackoverflow.com/questions/33636796
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: 0;
|
|
92
|
+
right: 6px;
|
|
93
|
+
bottom: 6px;
|
|
94
|
+
left: 0;
|
|
95
|
+
height: auto;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--blue,
|
|
99
|
+
&--delete {
|
|
100
|
+
font-size: @number-keyboard-delete-font-size;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&--active {
|
|
104
|
+
background-color: @number-keyboard-key-active-color;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&--blue {
|
|
108
|
+
color: @number-keyboard-button-text-color;
|
|
109
|
+
background-color: @number-keyboard-button-background-color;
|
|
110
|
+
|
|
111
|
+
&.zt-key--active {
|
|
112
|
+
background-color: darken(@number-keyboard-button-background-color, 10%);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&__wrapper {
|
|
117
|
+
position: relative;
|
|
118
|
+
flex: 1;
|
|
119
|
+
flex-basis: 33%;
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
padding: 0 8px 8px 0;
|
|
122
|
+
|
|
123
|
+
&--wider {
|
|
124
|
+
flex-basis: 66%;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&__delete-icon {
|
|
129
|
+
width: 32px;
|
|
130
|
+
height: 22px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&__collapse-icon {
|
|
134
|
+
width: 30px;
|
|
135
|
+
height: 24px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&__loading-icon {
|
|
139
|
+
color: @number-keyboard-button-text-color;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
.zt-cell .zt-field__label {
|
|
143
|
+
color: rgba(0, 0, 0, 0.6);
|
|
144
|
+
}
|
package/es/overlay/index.less
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@import '../style/var';
|
|
2
|
-
|
|
3
|
-
.zt-overlay {
|
|
4
|
-
position: fixed;
|
|
5
|
-
top: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
z-index: @overlay-z-index;
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: 100%;
|
|
10
|
-
background-color: @overlay-background-color;
|
|
11
|
-
}
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.zt-overlay {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
z-index: @overlay-z-index;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
background-color: @overlay-background-color;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zt-password-input{position:relative;margin:0 16px;-webkit-user-select:none;user-select:none}.zt-password-input__error-info,.zt-password-input__info{margin-top:16px;font-size:14px;text-align:center}.zt-password-input__info{color:#969799}.zt-password-input__error-info{color:#e62314}.zt-password-input__security{display:-webkit-box;display:-webkit-flex;display:flex;width:100%;height:50px;cursor:pointer}.zt-password-input__security::after{border-radius:6px}.zt-password-input__security li{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:100%;font-size:20px;line-height:1.2;background-color:#fff}.zt-password-input__security i{position:absolute;top:50%;left:50%;width:10px;height:10px;background-color:#000;border-radius:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);visibility:hidden}.zt-password-input__cursor{position:absolute;top:50%;left:50%;width:1px;height:40%;background-color:rgba(0,0,0,.6);-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-animation:1s zt-cursor-flicker infinite;animation:1s zt-cursor-flicker infinite}@-webkit-keyframes zt-cursor-flicker{from{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes zt-cursor-flicker{from{opacity:0}50%{opacity:1}100%{opacity:0}}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
|
2
|
+
// Utils
|
|
3
|
+
import { createNamespace, addUnit } from '../utils';
|
|
4
|
+
import { emit, inherit } from '../utils/functional';
|
|
5
|
+
import { BORDER_LEFT, BORDER_SURROUND } from '../utils/constant'; // Types
|
|
6
|
+
|
|
7
|
+
var _createNamespace = createNamespace('password-input'),
|
|
8
|
+
createComponent = _createNamespace[0],
|
|
9
|
+
bem = _createNamespace[1];
|
|
10
|
+
|
|
11
|
+
function PasswordInput(h, props, slots, ctx) {
|
|
12
|
+
var _ref2;
|
|
13
|
+
|
|
14
|
+
var mask = props.mask,
|
|
15
|
+
value = props.value,
|
|
16
|
+
length = props.length,
|
|
17
|
+
gutter = props.gutter,
|
|
18
|
+
focused = props.focused,
|
|
19
|
+
errorInfo = props.errorInfo;
|
|
20
|
+
var Points = [];
|
|
21
|
+
|
|
22
|
+
for (var i = 0; i < length; i++) {
|
|
23
|
+
var _ref;
|
|
24
|
+
|
|
25
|
+
var _char = value[i];
|
|
26
|
+
var showBorder = i !== 0 && !gutter;
|
|
27
|
+
var showCursor = focused && i === value.length;
|
|
28
|
+
var style = void 0;
|
|
29
|
+
|
|
30
|
+
if (i !== 0 && gutter) {
|
|
31
|
+
style = {
|
|
32
|
+
marginLeft: addUnit(gutter)
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Points.push(h("li", {
|
|
37
|
+
"class": [(_ref = {}, _ref[BORDER_LEFT] = showBorder, _ref), bem('item', {
|
|
38
|
+
focus: showCursor
|
|
39
|
+
})],
|
|
40
|
+
"style": style
|
|
41
|
+
}, [mask ? h("i", {
|
|
42
|
+
"style": {
|
|
43
|
+
visibility: _char ? 'visible' : 'hidden'
|
|
44
|
+
}
|
|
45
|
+
}) : _char, showCursor && h("div", {
|
|
46
|
+
"class": bem('cursor')
|
|
47
|
+
})]));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return h("div", {
|
|
51
|
+
"class": bem()
|
|
52
|
+
}, [h("ul", _mergeJSXProps([{
|
|
53
|
+
"class": [bem('security'), (_ref2 = {}, _ref2[BORDER_SURROUND] = !gutter, _ref2)],
|
|
54
|
+
"on": {
|
|
55
|
+
"touchstart": function touchstart(event) {
|
|
56
|
+
event.stopPropagation();
|
|
57
|
+
emit(ctx, 'focus', event);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, inherit(ctx, true)]), [Points])]);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
PasswordInput.props = {
|
|
64
|
+
gutter: [Number, String],
|
|
65
|
+
focused: Boolean,
|
|
66
|
+
errorInfo: String,
|
|
67
|
+
mask: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: true
|
|
70
|
+
},
|
|
71
|
+
value: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: ''
|
|
74
|
+
},
|
|
75
|
+
length: {
|
|
76
|
+
type: [Number, String],
|
|
77
|
+
default: 6
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export default createComponent(PasswordInput);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.zt-password-input {
|
|
4
|
+
position: relative;
|
|
5
|
+
margin: @password-input-margin;
|
|
6
|
+
user-select: none;
|
|
7
|
+
|
|
8
|
+
&__info,
|
|
9
|
+
&__error-info {
|
|
10
|
+
margin-top: @padding-md;
|
|
11
|
+
font-size: @password-input-info-font-size;
|
|
12
|
+
text-align: center;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__info {
|
|
16
|
+
color: @password-input-info-color;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__error-info {
|
|
20
|
+
color: @password-input-error-info-color;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__security {
|
|
24
|
+
display: flex;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: @password-input-height;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
|
|
29
|
+
&::after {
|
|
30
|
+
border-radius: @password-input-border-radius;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
li {
|
|
34
|
+
position: relative;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex: 1;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
height: 100%;
|
|
40
|
+
font-size: @password-input-font-size;
|
|
41
|
+
line-height: 1.2;
|
|
42
|
+
background-color: @password-input-background-color;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
i {
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 50%;
|
|
48
|
+
left: 50%;
|
|
49
|
+
width: @password-input-dot-size;
|
|
50
|
+
height: @password-input-dot-size;
|
|
51
|
+
background-color: @password-input-dot-color;
|
|
52
|
+
border-radius: 100%;
|
|
53
|
+
transform: translate(-50%, -50%);
|
|
54
|
+
visibility: hidden;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__cursor {
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: 50%;
|
|
61
|
+
left: 50%;
|
|
62
|
+
width: @number-keyboard-cursor-width;
|
|
63
|
+
height: @number-keyboard-cursor-height;
|
|
64
|
+
background-color: @number-keyboard-cursor-color;
|
|
65
|
+
transform: translate(-50%, -50%);
|
|
66
|
+
animation: @number-keyboard-cursor-animation-duration zt-cursor-flicker
|
|
67
|
+
infinite;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@keyframes zt-cursor-flicker {
|
|
72
|
+
from {
|
|
73
|
+
opacity: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
50% {
|
|
77
|
+
opacity: 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
100% {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../style/base.css';
|
|
2
2
|
import '../../loading/index.css';
|
|
3
|
+
import '../../overlay/index.css';
|
|
3
4
|
import '../../info/index.css';
|
|
4
5
|
import '../../icon/index.css';
|
|
5
|
-
import '../../overlay/index.css';
|
|
6
6
|
import '../../popup/index.css';
|
|
7
7
|
import '../../toast/index.css';
|
|
8
8
|
import '../index.css';
|
|
@@ -1,8 +1,8 @@
|
|
|
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 '../../toast/index.less';
|
|
8
8
|
import '../index.less';
|
|
@@ -30,6 +30,7 @@ function isOptionDisabled(option) {
|
|
|
30
30
|
export default createComponent({
|
|
31
31
|
mixins: [TouchMixin],
|
|
32
32
|
props: {
|
|
33
|
+
columnCollector: Array,
|
|
33
34
|
valueKey: String,
|
|
34
35
|
readonly: Boolean,
|
|
35
36
|
allowHtml: Boolean,
|
|
@@ -54,8 +55,8 @@ export default createComponent({
|
|
|
54
55
|
};
|
|
55
56
|
},
|
|
56
57
|
created: function created() {
|
|
57
|
-
if (this
|
|
58
|
-
this
|
|
58
|
+
if (this.columnCollector) {
|
|
59
|
+
this.columnCollector.push(this);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
this.setIndex(this.currentIndex);
|
|
@@ -64,10 +65,8 @@ export default createComponent({
|
|
|
64
65
|
this.bindTouchEvent(this.$el);
|
|
65
66
|
},
|
|
66
67
|
destroyed: function destroyed() {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
if (children) {
|
|
70
|
-
children.splice(children.indexOf(this), 1);
|
|
68
|
+
if (this.columnCollector) {
|
|
69
|
+
this.columnCollector.splice(this.columnCollector.indexOf(this), 1);
|
|
71
70
|
}
|
|
72
71
|
},
|
|
73
72
|
watch: {
|
package/es/picker/index.js
CHANGED
|
@@ -2,12 +2,13 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
// Utils
|
|
3
3
|
import { createNamespace } from '../utils';
|
|
4
4
|
import { preventDefault } from '../utils/dom/event';
|
|
5
|
-
import { BORDER_UNSET_TOP_BOTTOM } from '../utils/constant';
|
|
6
5
|
import { pickerProps, DEFAULT_ITEM_HEIGHT } from './shared';
|
|
7
6
|
import { unitToPx } from '../utils/format/unit'; // Components
|
|
8
7
|
|
|
9
8
|
import Loading from '../loading';
|
|
10
9
|
import PickerColumn from './PickerColumn';
|
|
10
|
+
import Popup from '../popup';
|
|
11
|
+
import { PopupMixin } from '../mixins/popup';
|
|
11
12
|
|
|
12
13
|
var _createNamespace = createNamespace('picker'),
|
|
13
14
|
createComponent = _createNamespace[0],
|
|
@@ -15,7 +16,16 @@ var _createNamespace = createNamespace('picker'),
|
|
|
15
16
|
t = _createNamespace[2];
|
|
16
17
|
|
|
17
18
|
export default createComponent({
|
|
19
|
+
mixins: [PopupMixin()],
|
|
18
20
|
props: _extends({}, pickerProps, {
|
|
21
|
+
showPicker: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true
|
|
24
|
+
},
|
|
25
|
+
showToolbar: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
},
|
|
19
29
|
defaultIndex: {
|
|
20
30
|
type: [Number, String],
|
|
21
31
|
default: 0
|
|
@@ -42,7 +52,8 @@ export default createComponent({
|
|
|
42
52
|
data: function data() {
|
|
43
53
|
return {
|
|
44
54
|
children: [],
|
|
45
|
-
formattedColumns: []
|
|
55
|
+
formattedColumns: [],
|
|
56
|
+
show: false
|
|
46
57
|
};
|
|
47
58
|
},
|
|
48
59
|
computed: {
|
|
@@ -68,6 +79,9 @@ export default createComponent({
|
|
|
68
79
|
columns: {
|
|
69
80
|
handler: 'format',
|
|
70
81
|
immediate: true
|
|
82
|
+
},
|
|
83
|
+
showPicker: function showPicker(val) {
|
|
84
|
+
this.show = val;
|
|
71
85
|
}
|
|
72
86
|
},
|
|
73
87
|
methods: {
|
|
@@ -369,6 +383,7 @@ export default createComponent({
|
|
|
369
383
|
|
|
370
384
|
return h(PickerColumn, {
|
|
371
385
|
"attrs": {
|
|
386
|
+
"columnCollector": _this5.children,
|
|
372
387
|
"readonly": _this5.readonly,
|
|
373
388
|
"valueKey": _this5.valueKey,
|
|
374
389
|
"allowHtml": _this5.allowHtml,
|
|
@@ -392,14 +407,28 @@ export default createComponent({
|
|
|
392
407
|
}
|
|
393
408
|
},
|
|
394
409
|
render: function render(h) {
|
|
395
|
-
|
|
396
|
-
|
|
410
|
+
var _this6 = this;
|
|
411
|
+
|
|
412
|
+
return h(Popup, {
|
|
413
|
+
"attrs": {
|
|
414
|
+
"round": true,
|
|
415
|
+
"position": "bottom"
|
|
416
|
+
},
|
|
417
|
+
"model": {
|
|
418
|
+
value: _this6.show,
|
|
419
|
+
callback: function callback($$v) {
|
|
420
|
+
_this6.show = $$v;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}, [h("div", {
|
|
424
|
+
"class": bem(),
|
|
425
|
+
"ref": 'columnParent'
|
|
397
426
|
}, [this.toolbarPosition === 'top' ? this.genToolbar() : h(), this.toolbarPosition === 'top' ? h("div", {
|
|
398
427
|
"class": bem('border')
|
|
399
428
|
}) : h(), this.loading ? h(Loading, {
|
|
400
429
|
"class": bem('loading')
|
|
401
430
|
}) : h(), this.slots('columns-top'), this.headers && this.headers.length > 0 ? this.genHeaders() : h(), this.headers && this.headers.length > 0 ? h("div", {
|
|
402
431
|
"class": bem('border')
|
|
403
|
-
}) : h(), this.genColumns(), this.slots('columns-bottom'), this.toolbarPosition === 'bottom' ? this.genToolbar() : h()]);
|
|
432
|
+
}) : h(), this.genColumns(), this.slots('columns-bottom'), this.toolbarPosition === 'bottom' ? this.genToolbar() : h()])]);
|
|
404
433
|
}
|
|
405
434
|
});
|