@nutui/nutui-react-taro 4.0.0-beta.6 → 4.0.0-beta.7
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/CHANGELOG.md +8 -0
- package/dist/cjs/packages/actionsheet/style/style.harmony.css +12 -6
- package/dist/cjs/packages/address/style/style.harmony.css +12 -6
- package/dist/cjs/packages/animate/style/style.css +27 -9
- package/dist/cjs/packages/animate/style/style.harmony.css +27 -9
- package/dist/cjs/packages/animate/style-jmapp/style.css +27 -9
- package/dist/cjs/packages/animate/style-jrkf/style.css +27 -9
- package/dist/cjs/packages/audio/audio.js +14 -14
- package/dist/cjs/packages/audio/style/style.harmony.css +20 -8
- package/dist/cjs/packages/badge/badge.js +17 -17
- package/dist/cjs/packages/button/button.js +1 -2
- package/dist/cjs/packages/button/style/style.css +20 -8
- package/dist/cjs/packages/button/style/style.harmony.css +20 -8
- package/dist/cjs/packages/button/style-jmapp/style.css +20 -8
- package/dist/cjs/packages/button/style-jrkf/style.css +20 -8
- package/dist/cjs/packages/calendar/style/style.harmony.css +12 -6
- package/dist/cjs/packages/cascader/style/style.harmony.css +12 -6
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/datepicker/style/style.harmony.css +12 -6
- package/dist/cjs/packages/dialog/style/style.harmony.css +20 -8
- package/dist/cjs/packages/empty/style/style.harmony.css +20 -8
- package/dist/cjs/packages/imagepreview/style/style.harmony.css +12 -6
- package/dist/cjs/packages/indicator/indicator.js +6 -6
- package/dist/cjs/packages/infiniteloading/infiniteloading.js +9 -9
- package/dist/cjs/packages/navbar/style/style.css +3 -1
- package/dist/cjs/packages/navbar/style/style.harmony.css +3 -1
- package/dist/cjs/packages/navbar/style-jmapp/style.css +3 -1
- package/dist/cjs/packages/navbar/style-jrkf/style.css +3 -1
- package/dist/cjs/packages/noticebar/noticebar.js +120 -60
- package/dist/cjs/packages/noticebar/style/noticebar.scss +130 -10
- package/dist/cjs/packages/noticebar/style/style.css +138 -35
- package/dist/cjs/packages/noticebar/style/style.harmony.css +138 -35
- package/dist/cjs/packages/noticebar/style-jmapp/noticebar.scss +130 -10
- package/dist/cjs/packages/noticebar/style-jmapp/style.css +113 -10
- package/dist/cjs/packages/noticebar/style-jrkf/noticebar.scss +130 -10
- package/dist/cjs/packages/noticebar/style-jrkf/style.css +113 -10
- package/dist/cjs/packages/numberkeyboard/style/style.css +6 -6
- package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +18 -12
- package/dist/cjs/packages/numberkeyboard/style-jmapp/style.css +6 -6
- package/dist/cjs/packages/numberkeyboard/style-jrkf/style.css +6 -6
- package/dist/cjs/packages/picker/style/style.harmony.css +12 -6
- package/dist/cjs/packages/popover/popover.js +46 -37
- package/dist/cjs/packages/popover/style/popover.scss +79 -54
- package/dist/cjs/packages/popover/style/style.css +73 -61
- package/dist/cjs/packages/popover/style/style.harmony.css +85 -67
- package/dist/cjs/packages/popover/style-jmapp/popover.scss +79 -54
- package/dist/cjs/packages/popover/style-jmapp/style.css +73 -61
- package/dist/cjs/packages/popover/style-jrkf/popover.scss +79 -54
- package/dist/cjs/packages/popover/style-jrkf/style.css +73 -61
- package/dist/cjs/packages/popup/style/style.css +12 -6
- package/dist/cjs/packages/popup/style/style.harmony.css +12 -6
- package/dist/cjs/packages/popup/style-jmapp/style.css +12 -6
- package/dist/cjs/packages/popup/style-jrkf/style.css +12 -6
- package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +54 -54
- package/dist/cjs/packages/quickenter/style/style.harmony.css +12 -6
- package/dist/cjs/packages/resultpage/style/style.harmony.css +20 -8
- package/dist/cjs/packages/shortpassword/style/style.harmony.css +12 -6
- package/dist/cjs/packages/skeleton/skeleton.js +15 -15
- package/dist/cjs/packages/timeselect/style/style.harmony.css +12 -6
- package/dist/cjs/packages/tour/style/style.harmony.css +86 -68
- package/dist/cjs/packages/tour/tour.js +1 -1
- package/dist/cjs/types/spec/noticebar/base.d.ts +5 -1
- package/dist/cjs/types/spec/popover/base.d.ts +4 -0
- package/dist/cjs/utils/is-forward-ref-component.js +2 -2
- package/dist/cjs/utils/render.js +1 -1
- package/dist/es/packages/actionsheet/style/style.harmony.css +12 -6
- package/dist/es/packages/address/style/style.harmony.css +12 -6
- package/dist/es/packages/animate/style/style.css +27 -9
- package/dist/es/packages/animate/style/style.harmony.css +27 -9
- package/dist/es/packages/animate/style-jmapp/style.css +27 -9
- package/dist/es/packages/animate/style-jrkf/style.css +27 -9
- package/dist/es/packages/audio/audio.js +14 -14
- package/dist/es/packages/audio/style/style.harmony.css +20 -8
- package/dist/es/packages/badge/badge.js +17 -17
- package/dist/es/packages/button/button.js +1 -2
- package/dist/es/packages/button/style/style.css +20 -8
- package/dist/es/packages/button/style/style.harmony.css +20 -8
- package/dist/es/packages/button/style-jmapp/style.css +20 -8
- package/dist/es/packages/button/style-jrkf/style.css +20 -8
- package/dist/es/packages/calendar/style/style.harmony.css +12 -6
- package/dist/es/packages/cascader/style/style.harmony.css +12 -6
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/datepicker/style/style.harmony.css +12 -6
- package/dist/es/packages/dialog/style/style.harmony.css +20 -8
- package/dist/es/packages/empty/style/style.harmony.css +20 -8
- package/dist/es/packages/imagepreview/style/style.harmony.css +12 -6
- package/dist/es/packages/indicator/indicator.js +6 -6
- package/dist/es/packages/infiniteloading/infiniteloading.js +9 -9
- package/dist/es/packages/navbar/style/style.css +3 -1
- package/dist/es/packages/navbar/style/style.harmony.css +3 -1
- package/dist/es/packages/navbar/style-jmapp/style.css +3 -1
- package/dist/es/packages/navbar/style-jrkf/style.css +3 -1
- package/dist/es/packages/noticebar/noticebar.js +120 -60
- package/dist/es/packages/noticebar/style/noticebar.scss +130 -10
- package/dist/es/packages/noticebar/style/style.css +138 -35
- package/dist/es/packages/noticebar/style/style.harmony.css +138 -35
- package/dist/es/packages/noticebar/style-jmapp/noticebar.scss +130 -10
- package/dist/es/packages/noticebar/style-jmapp/style.css +113 -10
- package/dist/es/packages/noticebar/style-jrkf/noticebar.scss +130 -10
- package/dist/es/packages/noticebar/style-jrkf/style.css +113 -10
- package/dist/es/packages/numberkeyboard/style/style.css +6 -6
- package/dist/es/packages/numberkeyboard/style/style.harmony.css +18 -12
- package/dist/es/packages/numberkeyboard/style-jmapp/style.css +6 -6
- package/dist/es/packages/numberkeyboard/style-jrkf/style.css +6 -6
- package/dist/es/packages/picker/style/style.harmony.css +12 -6
- package/dist/es/packages/popover/popover.js +46 -37
- package/dist/es/packages/popover/style/popover.scss +79 -54
- package/dist/es/packages/popover/style/style.css +73 -61
- package/dist/es/packages/popover/style/style.harmony.css +85 -67
- package/dist/es/packages/popover/style-jmapp/popover.scss +79 -54
- package/dist/es/packages/popover/style-jmapp/style.css +73 -61
- package/dist/es/packages/popover/style-jrkf/popover.scss +79 -54
- package/dist/es/packages/popover/style-jrkf/style.css +73 -61
- package/dist/es/packages/popup/style/style.css +12 -6
- package/dist/es/packages/popup/style/style.harmony.css +12 -6
- package/dist/es/packages/popup/style-jmapp/style.css +12 -6
- package/dist/es/packages/popup/style-jrkf/style.css +12 -6
- package/dist/es/packages/pulltorefresh/pulltorefresh.js +54 -54
- package/dist/es/packages/quickenter/style/style.harmony.css +12 -6
- package/dist/es/packages/resultpage/style/style.harmony.css +20 -8
- package/dist/es/packages/shortpassword/style/style.harmony.css +12 -6
- package/dist/es/packages/skeleton/skeleton.js +15 -15
- package/dist/es/packages/timeselect/style/style.harmony.css +12 -6
- package/dist/es/packages/tour/style/style.harmony.css +86 -68
- package/dist/es/packages/tour/tour.js +1 -1
- package/dist/es/types/spec/noticebar/base.d.ts +19 -3
- package/dist/es/types/spec/popover/base.d.ts +21 -2
- package/dist/es/utils/render.js +1 -1
- package/dist/nutui.react.umd.js +327 -1211
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +31 -31
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +25 -25
- package/dist/style.css +1 -1
- package/dist/style.scss +29 -29
- package/dist/styles/variables-daojia.scss +55 -9
- package/dist/styles/variables-jmapp.scss +52 -6
- package/dist/styles/variables-jrkf.scss +52 -6
- package/dist/styles/variables.scss +123 -15
- package/package.json +1 -1
|
@@ -23,6 +23,13 @@
|
|
|
23
23
|
.nut-noticebar .nut-noticebar-box-wrapable .nut-noticebar-box-wrap, .nut-noticebar .nut-noticebar-box-center .nut-noticebar-box-wrap {
|
|
24
24
|
height: auto;
|
|
25
25
|
}
|
|
26
|
+
.nut-noticebar .nut-noticebar-box-wrapable .nut-noticebar-box-left-icon, .nut-noticebar .nut-noticebar-box-center .nut-noticebar-box-left-icon {
|
|
27
|
+
height: var(--nutui-noticebar-left-icon-wrap-width, 32px);
|
|
28
|
+
min-width: var(--nutui-noticebar-left-icon-wrap-width, 32px);
|
|
29
|
+
}
|
|
30
|
+
.nut-noticebar .nut-noticebar-box-wrapable .nut-noticebar-box-wrap {
|
|
31
|
+
flex: initial;
|
|
32
|
+
}
|
|
26
33
|
.nut-noticebar .nut-noticebar-box-wrapable .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
|
|
27
34
|
position: relative;
|
|
28
35
|
white-space: normal;
|
|
@@ -44,30 +51,106 @@
|
|
|
44
51
|
}
|
|
45
52
|
.nut-noticebar .nut-noticebar-box-left-icon {
|
|
46
53
|
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
47
56
|
height: var(--nutui-noticebar-left-icon-width, 16px);
|
|
48
57
|
min-width: var(--nutui-noticebar-left-icon-width, 16px);
|
|
49
58
|
margin-right: var(--nutui-noticebar-icon-gap, 4px);
|
|
50
59
|
background-size: 100% 100%;
|
|
51
60
|
}
|
|
52
61
|
.nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
|
|
53
|
-
color: var(--nutui-noticebar-color, #
|
|
62
|
+
color: var(--nutui-noticebar-icon-color, var(--nutui-color-primary, #ff6666));
|
|
63
|
+
}
|
|
64
|
+
.nut-noticebar .nut-noticebar-box-left-icon img {
|
|
65
|
+
border-radius: var(--nutui-noticebar-left-icon-border-radius, 4px);
|
|
66
|
+
}
|
|
67
|
+
.nut-noticebar .nut-noticebar-box-content-wrapper {
|
|
68
|
+
flex: 1;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
min-width: 0;
|
|
71
|
+
}
|
|
72
|
+
.nut-noticebar .nut-noticebar-box-content-main {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
}
|
|
76
|
+
.nut-noticebar .nut-noticebar-box-description {
|
|
77
|
+
font-size: var(--nutui-noticebar-description-font-size, 11px);
|
|
78
|
+
color: var(--nutui-noticebar-description-color, var(--nutui-color-text));
|
|
79
|
+
line-height: var(--nutui-noticebar-description-line-height, 16px);
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
}
|
|
84
|
+
.nut-noticebar .nut-noticebar-box-tag {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
width: var(--nutui-noticebar-tag-size, 12px);
|
|
88
|
+
height: var(--nutui-noticebar-tag-size, 12px);
|
|
89
|
+
margin-left: var(--nutui-noticebar-tag-gap, 4px);
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
}
|
|
92
|
+
.nut-noticebar .nut-noticebar-box-action {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
max-width: var(--nutui-noticebar-action-max-width, 99px);
|
|
97
|
+
margin-left: var(--nutui-noticebar-action-gap, 12px);
|
|
98
|
+
font-size: var(--nutui-noticebar-action-font-size, var(--nutui-font-text-xs));
|
|
99
|
+
color: var(--nutui-color-primary, #ff6666);
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
white-space: nowrap;
|
|
54
102
|
}
|
|
55
103
|
.nut-noticebar .nut-noticebar-box-right-icon {
|
|
56
104
|
display: flex;
|
|
57
105
|
align-items: center;
|
|
58
106
|
justify-content: center;
|
|
59
|
-
width: var(--nutui-noticebar-
|
|
60
|
-
|
|
107
|
+
width: var(--nutui-noticebar-close-size, 20px);
|
|
108
|
+
height: var(--nutui-noticebar-close-size, 20px);
|
|
109
|
+
margin-left: var(--nutui-noticebar-action-gap, 12px);
|
|
110
|
+
flex-shrink: 0;
|
|
111
|
+
cursor: pointer;
|
|
61
112
|
}
|
|
62
113
|
.nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
|
|
63
|
-
|
|
64
|
-
height: scale-px(12px);
|
|
65
|
-
color: var(--nutui-noticebar-color, #d9500b);
|
|
114
|
+
color: var(--nutui-noticebar-close-color, var(--nutui-color-text-help));
|
|
66
115
|
}
|
|
67
116
|
.nut-noticebar .nut-noticebar-box-right-icon-default {
|
|
68
117
|
width: var(--nutui-icon-size-12, 12px);
|
|
69
118
|
height: var(--nutui-icon-size-12, 12px);
|
|
70
119
|
}
|
|
120
|
+
.nut-noticebar .nut-noticebar-box-close-countdown {
|
|
121
|
+
position: relative;
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
width: var(--nutui-noticebar-close-size, 20px);
|
|
126
|
+
height: var(--nutui-noticebar-close-size, 20px);
|
|
127
|
+
background: conic-gradient(var(--nutui-noticebar-close-ring-color, var(--nutui-color-text-help)) 0% var(--progress), var(--nutui-noticebar-close-ring-shadow-color, var(--nutui-color-border)) var(--progress) 100%);
|
|
128
|
+
border-radius: 50%;
|
|
129
|
+
}
|
|
130
|
+
.nut-noticebar .nut-noticebar-box-close-countdown::before {
|
|
131
|
+
content: "";
|
|
132
|
+
position: absolute;
|
|
133
|
+
inset: scale-px(1px);
|
|
134
|
+
background: var(--nutui-noticebar-background, rgb(251, 248, 220));
|
|
135
|
+
border-radius: 50%;
|
|
136
|
+
}
|
|
137
|
+
.nut-noticebar .nut-noticebar-box-close-icon {
|
|
138
|
+
position: relative;
|
|
139
|
+
width: var(--nutui-noticebar-close-icon-size, 10px);
|
|
140
|
+
height: var(--nutui-noticebar-close-icon-size, 10px);
|
|
141
|
+
color: var(--nutui-noticebar-close-color, var(--nutui-color-text-help));
|
|
142
|
+
}
|
|
143
|
+
.nut-noticebar .nut-noticebar-box-left-icon--product {
|
|
144
|
+
height: scale-px(32px);
|
|
145
|
+
min-width: scale-px(32px);
|
|
146
|
+
}
|
|
147
|
+
.nut-noticebar .nut-noticebar-box-left-icon--product img {
|
|
148
|
+
background: #ffffff;
|
|
149
|
+
border-radius: var(--nutui-noticebar-left-icon-border-radius, 4px);
|
|
150
|
+
}
|
|
151
|
+
.nut-noticebar .nut-noticebar-box-right {
|
|
152
|
+
flex-shrink: 0;
|
|
153
|
+
}
|
|
71
154
|
.nut-noticebar .nut-noticebar-box-wrap {
|
|
72
155
|
display: flex;
|
|
73
156
|
flex: 1;
|
|
@@ -136,11 +219,11 @@
|
|
|
136
219
|
-webkit-box-direction: normal;
|
|
137
220
|
flex-direction: column;
|
|
138
221
|
}
|
|
222
|
+
.nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-description {
|
|
223
|
+
white-space: normal;
|
|
224
|
+
}
|
|
139
225
|
.nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-right-icon {
|
|
140
226
|
align-self: center;
|
|
141
|
-
display: flex;
|
|
142
|
-
justify-content: center;
|
|
143
|
-
width: var(--nutui-noticebar-right-icon-width, 16px);
|
|
144
227
|
margin-left: var(--nutui-noticebar-icon-gap, 4px);
|
|
145
228
|
}
|
|
146
229
|
@keyframes nut-notice-bar-play {
|
|
@@ -167,7 +250,17 @@
|
|
|
167
250
|
[dir=rtl] .nut-noticebar .nut-noticebar-box-right-icon,
|
|
168
251
|
.nut-rtl .nut-noticebar .nut-noticebar-box-right-icon {
|
|
169
252
|
margin-left: 0;
|
|
170
|
-
margin-right: var(--nutui-noticebar-
|
|
253
|
+
margin-right: var(--nutui-noticebar-action-gap, 12px);
|
|
254
|
+
}
|
|
255
|
+
[dir=rtl] .nut-noticebar .nut-noticebar-box-tag,
|
|
256
|
+
.nut-rtl .nut-noticebar .nut-noticebar-box-tag {
|
|
257
|
+
margin-left: 0;
|
|
258
|
+
margin-right: var(--nutui-noticebar-tag-gap, 4px);
|
|
259
|
+
}
|
|
260
|
+
[dir=rtl] .nut-noticebar .nut-noticebar-box-action,
|
|
261
|
+
.nut-rtl .nut-noticebar .nut-noticebar-box-action {
|
|
262
|
+
margin-left: 0;
|
|
263
|
+
margin-right: var(--nutui-noticebar-action-gap, 12px);
|
|
171
264
|
}
|
|
172
265
|
[dir=rtl] .nut-noticebar .nut-noticebar-box .play,
|
|
173
266
|
.nut-rtl .nut-noticebar .nut-noticebar-box .play {
|
|
@@ -191,4 +284,14 @@
|
|
|
191
284
|
.nut-rtl .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-right-icon {
|
|
192
285
|
margin-left: 0;
|
|
193
286
|
margin-right: var(--nutui-noticebar-icon-gap, 4px);
|
|
287
|
+
}
|
|
288
|
+
[dir=rtl] .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-tag,
|
|
289
|
+
.nut-rtl .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-tag {
|
|
290
|
+
margin-left: 0;
|
|
291
|
+
margin-right: var(--nutui-noticebar-tag-gap, 4px);
|
|
292
|
+
}
|
|
293
|
+
[dir=rtl] .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-action,
|
|
294
|
+
.nut-rtl .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-action {
|
|
295
|
+
margin-left: 0;
|
|
296
|
+
margin-right: var(--nutui-noticebar-action-gap, 12px);
|
|
194
297
|
}
|
|
@@ -8,12 +8,6 @@ page {
|
|
|
8
8
|
--nut-icon-line-height: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) !important;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.nut-numberkeyboard {
|
|
12
|
-
width: 100%;
|
|
13
|
-
padding: var(--nutui-numberkeyboard-padding, 0 0 calc(22px * var(--nut-scale-f, 1)) 0);
|
|
14
|
-
user-select: none;
|
|
15
|
-
background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-background, #f2f3f5));
|
|
16
|
-
}
|
|
17
11
|
.nut-numberkeyboard-close-icon {
|
|
18
12
|
width: var(--nutui-icon-size-18, calc(18px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
|
|
19
13
|
height: var(--nutui-icon-size-18, calc(18px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
|
|
@@ -22,6 +16,12 @@ page {
|
|
|
22
16
|
width: calc(28px * var(--nut-scale-f, 1));
|
|
23
17
|
height: calc(28px * var(--nut-scale-f, 1));
|
|
24
18
|
}
|
|
19
|
+
.nut-numberkeyboard {
|
|
20
|
+
width: 100%;
|
|
21
|
+
padding: var(--nutui-numberkeyboard-padding, 0 0 calc(22px * var(--nut-scale-f, 1)) 0);
|
|
22
|
+
user-select: none;
|
|
23
|
+
background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-background, #f2f3f5));
|
|
24
|
+
}
|
|
25
25
|
.nut-numberkeyboard-header {
|
|
26
26
|
position: relative;
|
|
27
27
|
display: flex;
|
|
@@ -189,12 +189,6 @@ page {
|
|
|
189
189
|
.nut-popup-top.nut-popup-round {
|
|
190
190
|
border-radius: 0 0 var(--nutui-popup-border-radius, var(--nutui-radius-xl, calc(12px * var(--nut-scale-f, 1)))) var(--nutui-popup-border-radius, var(--nutui-radius-xl, calc(12px * var(--nut-scale-f, 1))));
|
|
191
191
|
}
|
|
192
|
-
.nut-popup-slide {
|
|
193
|
-
/* 从顶部滑出 */
|
|
194
|
-
/* 从右侧滑出 */
|
|
195
|
-
/* 从底部滑出 */
|
|
196
|
-
/* 从左侧滑出 */
|
|
197
|
-
}
|
|
198
192
|
@keyframes popup-scale-fade-in {
|
|
199
193
|
from {
|
|
200
194
|
opacity: 0;
|
|
@@ -251,6 +245,9 @@ page {
|
|
|
251
245
|
animation-name: popup-fade-out;
|
|
252
246
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
253
247
|
}
|
|
248
|
+
.nut-popup-slide {
|
|
249
|
+
/* 从顶部滑出 */
|
|
250
|
+
}
|
|
254
251
|
@keyframes popup-slide-top-enter {
|
|
255
252
|
from {
|
|
256
253
|
transform: translate3d(0, -100%, 0);
|
|
@@ -278,6 +275,9 @@ page {
|
|
|
278
275
|
animation-name: popup-slide-top-exit;
|
|
279
276
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
280
277
|
}
|
|
278
|
+
.nut-popup-slide {
|
|
279
|
+
/* 从右侧滑出 */
|
|
280
|
+
}
|
|
281
281
|
@keyframes popup-slide-right-enter {
|
|
282
282
|
from {
|
|
283
283
|
transform: translate3d(100%, 0, 0);
|
|
@@ -305,6 +305,9 @@ page {
|
|
|
305
305
|
animation-name: popup-slide-right-exit;
|
|
306
306
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
307
307
|
}
|
|
308
|
+
.nut-popup-slide {
|
|
309
|
+
/* 从底部滑出 */
|
|
310
|
+
}
|
|
308
311
|
@keyframes popup-slide-bottom-enter {
|
|
309
312
|
from {
|
|
310
313
|
transform: translate3d(0, 100%, 0);
|
|
@@ -332,6 +335,9 @@ page {
|
|
|
332
335
|
animation-name: slide-bottom-exit;
|
|
333
336
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
334
337
|
}
|
|
338
|
+
.nut-popup-slide {
|
|
339
|
+
/* 从左侧滑出 */
|
|
340
|
+
}
|
|
335
341
|
@keyframes popup-slide-left-enter {
|
|
336
342
|
from {
|
|
337
343
|
transform: translate3d(-100%, 0, 0);
|
|
@@ -412,12 +418,6 @@ page {
|
|
|
412
418
|
right: 0;
|
|
413
419
|
}
|
|
414
420
|
|
|
415
|
-
.nut-numberkeyboard {
|
|
416
|
-
width: 100%;
|
|
417
|
-
padding: var(--nutui-numberkeyboard-padding, 0 0 calc(22px * var(--nut-scale-f, 1)) 0);
|
|
418
|
-
user-select: none;
|
|
419
|
-
background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-background, #f2f3f5));
|
|
420
|
-
}
|
|
421
421
|
.nut-numberkeyboard-close-icon {
|
|
422
422
|
width: var(--nutui-icon-size-18, calc(18px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
|
|
423
423
|
height: var(--nutui-icon-size-18, calc(18px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
|
|
@@ -426,6 +426,12 @@ page {
|
|
|
426
426
|
width: calc(28px * var(--nut-scale-f, 1));
|
|
427
427
|
height: calc(28px * var(--nut-scale-f, 1));
|
|
428
428
|
}
|
|
429
|
+
.nut-numberkeyboard {
|
|
430
|
+
width: 100%;
|
|
431
|
+
padding: var(--nutui-numberkeyboard-padding, 0 0 calc(22px * var(--nut-scale-f, 1)) 0);
|
|
432
|
+
user-select: none;
|
|
433
|
+
background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-background, #f2f3f5));
|
|
434
|
+
}
|
|
429
435
|
.nut-numberkeyboard-header {
|
|
430
436
|
position: relative;
|
|
431
437
|
display: flex;
|
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
/* #endif */
|
|
3
3
|
/* #ifndef harmony */
|
|
4
4
|
/* #endif */
|
|
5
|
-
.nut-numberkeyboard {
|
|
6
|
-
width: 100%;
|
|
7
|
-
padding: var(--nutui-numberkeyboard-padding, 0 0 22px 0);
|
|
8
|
-
user-select: none;
|
|
9
|
-
background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-surface-1));
|
|
10
|
-
}
|
|
11
5
|
.nut-numberkeyboard-close-icon {
|
|
12
6
|
width: var(--nutui-icon-size-18, 18px);
|
|
13
7
|
height: var(--nutui-icon-size-18, 18px);
|
|
@@ -16,6 +10,12 @@
|
|
|
16
10
|
width: scale-px(28px);
|
|
17
11
|
height: scale-px(28px);
|
|
18
12
|
}
|
|
13
|
+
.nut-numberkeyboard {
|
|
14
|
+
width: 100%;
|
|
15
|
+
padding: var(--nutui-numberkeyboard-padding, 0 0 22px 0);
|
|
16
|
+
user-select: none;
|
|
17
|
+
background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-surface-1));
|
|
18
|
+
}
|
|
19
19
|
.nut-numberkeyboard-header {
|
|
20
20
|
position: relative;
|
|
21
21
|
display: flex;
|
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
/* #endif */
|
|
3
3
|
/* #ifndef harmony */
|
|
4
4
|
/* #endif */
|
|
5
|
-
.nut-numberkeyboard {
|
|
6
|
-
width: 100%;
|
|
7
|
-
padding: var(--nutui-numberkeyboard-padding, 0 0 22px 0);
|
|
8
|
-
user-select: none;
|
|
9
|
-
background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-surface-1));
|
|
10
|
-
}
|
|
11
5
|
.nut-numberkeyboard-close-icon {
|
|
12
6
|
width: var(--nutui-icon-size-18, 18px);
|
|
13
7
|
height: var(--nutui-icon-size-18, 18px);
|
|
@@ -16,6 +10,12 @@
|
|
|
16
10
|
width: scale-px(28px);
|
|
17
11
|
height: scale-px(28px);
|
|
18
12
|
}
|
|
13
|
+
.nut-numberkeyboard {
|
|
14
|
+
width: 100%;
|
|
15
|
+
padding: var(--nutui-numberkeyboard-padding, 0 0 22px 0);
|
|
16
|
+
user-select: none;
|
|
17
|
+
background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-surface-1));
|
|
18
|
+
}
|
|
19
19
|
.nut-numberkeyboard-header {
|
|
20
20
|
position: relative;
|
|
21
21
|
display: flex;
|
|
@@ -189,12 +189,6 @@ page {
|
|
|
189
189
|
.nut-popup-top.nut-popup-round {
|
|
190
190
|
border-radius: 0 0 var(--nutui-popup-border-radius, var(--nutui-radius-xl, calc(12px * var(--nut-scale-f, 1)))) var(--nutui-popup-border-radius, var(--nutui-radius-xl, calc(12px * var(--nut-scale-f, 1))));
|
|
191
191
|
}
|
|
192
|
-
.nut-popup-slide {
|
|
193
|
-
/* 从顶部滑出 */
|
|
194
|
-
/* 从右侧滑出 */
|
|
195
|
-
/* 从底部滑出 */
|
|
196
|
-
/* 从左侧滑出 */
|
|
197
|
-
}
|
|
198
192
|
@keyframes popup-scale-fade-in {
|
|
199
193
|
from {
|
|
200
194
|
opacity: 0;
|
|
@@ -251,6 +245,9 @@ page {
|
|
|
251
245
|
animation-name: popup-fade-out;
|
|
252
246
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
253
247
|
}
|
|
248
|
+
.nut-popup-slide {
|
|
249
|
+
/* 从顶部滑出 */
|
|
250
|
+
}
|
|
254
251
|
@keyframes popup-slide-top-enter {
|
|
255
252
|
from {
|
|
256
253
|
transform: translate3d(0, -100%, 0);
|
|
@@ -278,6 +275,9 @@ page {
|
|
|
278
275
|
animation-name: popup-slide-top-exit;
|
|
279
276
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
280
277
|
}
|
|
278
|
+
.nut-popup-slide {
|
|
279
|
+
/* 从右侧滑出 */
|
|
280
|
+
}
|
|
281
281
|
@keyframes popup-slide-right-enter {
|
|
282
282
|
from {
|
|
283
283
|
transform: translate3d(100%, 0, 0);
|
|
@@ -305,6 +305,9 @@ page {
|
|
|
305
305
|
animation-name: popup-slide-right-exit;
|
|
306
306
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
307
307
|
}
|
|
308
|
+
.nut-popup-slide {
|
|
309
|
+
/* 从底部滑出 */
|
|
310
|
+
}
|
|
308
311
|
@keyframes popup-slide-bottom-enter {
|
|
309
312
|
from {
|
|
310
313
|
transform: translate3d(0, 100%, 0);
|
|
@@ -332,6 +335,9 @@ page {
|
|
|
332
335
|
animation-name: slide-bottom-exit;
|
|
333
336
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
334
337
|
}
|
|
338
|
+
.nut-popup-slide {
|
|
339
|
+
/* 从左侧滑出 */
|
|
340
|
+
}
|
|
335
341
|
@keyframes popup-slide-left-enter {
|
|
336
342
|
from {
|
|
337
343
|
transform: translate3d(-100%, 0, 0);
|
|
@@ -18,18 +18,21 @@ import { pxTransform } from "../../utils/taro/px-transform";
|
|
|
18
18
|
import { useUuid } from "../../hooks/use-uuid";
|
|
19
19
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
20
20
|
list: [],
|
|
21
|
-
|
|
21
|
+
type: 'status',
|
|
22
|
+
theme: 'dark',
|
|
22
23
|
location: 'bottom',
|
|
23
24
|
visible: false,
|
|
24
25
|
offset: [
|
|
25
26
|
0,
|
|
26
27
|
8
|
|
27
28
|
],
|
|
28
|
-
arrowOffset:
|
|
29
|
+
arrowOffset: 20,
|
|
29
30
|
targetId: '',
|
|
30
31
|
showArrow: true,
|
|
31
32
|
closeOnOutsideClick: true,
|
|
32
33
|
closeOnActionClick: true,
|
|
34
|
+
autoShow: false,
|
|
35
|
+
duration: 0,
|
|
33
36
|
overlay: false,
|
|
34
37
|
onClick: function onClick() {},
|
|
35
38
|
onOpen: function onOpen() {},
|
|
@@ -38,9 +41,10 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
38
41
|
var classPrefix = "nut-popover";
|
|
39
42
|
export var Popover = function Popover(props) {
|
|
40
43
|
var rtl = useRtl();
|
|
41
|
-
var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, list = _$_object_spread.list, theme = _$_object_spread.theme, location = _$_object_spread.location, visible = _$_object_spread.visible, offset = _$_object_spread.offset, arrowOffset = _$_object_spread.arrowOffset, targetId = _$_object_spread.targetId, overlay = _$_object_spread.overlay, closeOnOutsideClick = _$_object_spread.closeOnOutsideClick, closeOnActionClick = _$_object_spread.closeOnActionClick, className = _$_object_spread.className, showArrow = _$_object_spread.showArrow, style = _$_object_spread.style, onClick = _$_object_spread.onClick, onOpen = _$_object_spread.onOpen, onClose = _$_object_spread.onClose, onSelect = _$_object_spread.onSelect, rest = _object_without_properties(_$_object_spread, [
|
|
44
|
+
var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, list = _$_object_spread.list, type = _$_object_spread.type, theme = _$_object_spread.theme, location = _$_object_spread.location, visible = _$_object_spread.visible, offset = _$_object_spread.offset, arrowOffset = _$_object_spread.arrowOffset, targetId = _$_object_spread.targetId, overlay = _$_object_spread.overlay, closeOnOutsideClick = _$_object_spread.closeOnOutsideClick, closeOnActionClick = _$_object_spread.closeOnActionClick, autoShow = _$_object_spread.autoShow, duration = _$_object_spread.duration, className = _$_object_spread.className, showArrow = _$_object_spread.showArrow, style = _$_object_spread.style, onClick = _$_object_spread.onClick, onOpen = _$_object_spread.onOpen, onClose = _$_object_spread.onClose, onSelect = _$_object_spread.onSelect, rest = _object_without_properties(_$_object_spread, [
|
|
42
45
|
"children",
|
|
43
46
|
"list",
|
|
47
|
+
"type",
|
|
44
48
|
"theme",
|
|
45
49
|
"location",
|
|
46
50
|
"visible",
|
|
@@ -50,6 +54,8 @@ export var Popover = function Popover(props) {
|
|
|
50
54
|
"overlay",
|
|
51
55
|
"closeOnOutsideClick",
|
|
52
56
|
"closeOnActionClick",
|
|
57
|
+
"autoShow",
|
|
58
|
+
"duration",
|
|
53
59
|
"className",
|
|
54
60
|
"showArrow",
|
|
55
61
|
"style",
|
|
@@ -72,6 +78,27 @@ export var Popover = function Popover(props) {
|
|
|
72
78
|
}, [
|
|
73
79
|
visible
|
|
74
80
|
]);
|
|
81
|
+
useEffect(function() {
|
|
82
|
+
if (autoShow) {
|
|
83
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
84
|
+
}
|
|
85
|
+
}, []);
|
|
86
|
+
useEffect(function() {
|
|
87
|
+
if (visible && duration > 0) {
|
|
88
|
+
var timer = setTimeout(function() {
|
|
89
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
90
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
91
|
+
}, duration);
|
|
92
|
+
return function() {
|
|
93
|
+
return clearTimeout(timer);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}, [
|
|
97
|
+
visible,
|
|
98
|
+
duration,
|
|
99
|
+
onClick,
|
|
100
|
+
onClose
|
|
101
|
+
]);
|
|
75
102
|
var uid = useUuid();
|
|
76
103
|
var popoverId = "popover-".concat(uid);
|
|
77
104
|
var getWrapperPosition = function getWrapperPosition() {
|
|
@@ -165,7 +192,7 @@ export var Popover = function Popover(props) {
|
|
|
165
192
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
166
193
|
}
|
|
167
194
|
};
|
|
168
|
-
var classes = classNames(classPrefix, _define_property({}, "".concat(classPrefix, "-")
|
|
195
|
+
var classes = classNames(classPrefix, "".concat(classPrefix, "--").concat(type), _define_property({}, "".concat(classPrefix, "-light"), theme === 'light'), className);
|
|
169
196
|
var popoverArrow = function popoverArrow() {
|
|
170
197
|
var prefixCls = 'nut-popover-arrow';
|
|
171
198
|
var direction = location.split('-')[0];
|
|
@@ -189,6 +216,7 @@ export var Popover = function Popover(props) {
|
|
|
189
216
|
}
|
|
190
217
|
if (width) {
|
|
191
218
|
var dir = rtl ? 'right' : 'left';
|
|
219
|
+
var edgeOffset = arrowOffset;
|
|
192
220
|
if ([
|
|
193
221
|
'bottom',
|
|
194
222
|
'top'
|
|
@@ -199,10 +227,10 @@ export var Popover = function Popover(props) {
|
|
|
199
227
|
styles[dir] = pxTransform(-(popWidth - width) / 2 + wrapperPosition[dir] + parallel);
|
|
200
228
|
}
|
|
201
229
|
if (skew === 'left') {
|
|
202
|
-
styles.left = pxTransform(left + parallel);
|
|
230
|
+
styles.left = pxTransform(left + width / 2 - edgeOffset + parallel);
|
|
203
231
|
}
|
|
204
232
|
if (skew === 'right') {
|
|
205
|
-
styles.left = pxTransform(
|
|
233
|
+
styles.left = pxTransform(left + width / 2 + edgeOffset + parallel);
|
|
206
234
|
}
|
|
207
235
|
}
|
|
208
236
|
if ([
|
|
@@ -212,7 +240,7 @@ export var Popover = function Popover(props) {
|
|
|
212
240
|
var contentW = direction === 'left' ? -(popWidth + cross) : width + cross;
|
|
213
241
|
styles.left = pxTransform(left + contentW);
|
|
214
242
|
if (!skew) {
|
|
215
|
-
styles.top = pxTransform(top - popHeight / 2 + height / 2
|
|
243
|
+
styles.top = pxTransform(top - popHeight / 2 + height / 2 + parallel);
|
|
216
244
|
}
|
|
217
245
|
if (skew === 'top') {
|
|
218
246
|
styles.top = pxTransform(top + parallel);
|
|
@@ -229,37 +257,18 @@ export var Popover = function Popover(props) {
|
|
|
229
257
|
var styles = {};
|
|
230
258
|
var direction = location.split('-')[0];
|
|
231
259
|
var skew = location.split('-')[1];
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
styles[dir] = "calc(50% + ".concat(arrowOffset, "px)");
|
|
242
|
-
}
|
|
243
|
-
if (skew === 'left') {
|
|
244
|
-
styles[dir] = "".concat(base + arrowOffset, "px");
|
|
245
|
-
}
|
|
246
|
-
if (skew === 'right') {
|
|
247
|
-
styles[dir2] = "".concat(base - arrowOffset, "px");
|
|
248
|
-
}
|
|
260
|
+
var dir = rtl ? 'right' : 'left';
|
|
261
|
+
var dir2 = rtl ? 'left' : 'right';
|
|
262
|
+
var edgeOffset = arrowOffset;
|
|
263
|
+
if ([
|
|
264
|
+
'bottom',
|
|
265
|
+
'top'
|
|
266
|
+
].includes(direction)) {
|
|
267
|
+
if (skew === 'left') {
|
|
268
|
+
styles[dir] = "".concat(edgeOffset, "px");
|
|
249
269
|
}
|
|
250
|
-
if (
|
|
251
|
-
|
|
252
|
-
'right'
|
|
253
|
-
].includes(direction)) {
|
|
254
|
-
if (!skew) {
|
|
255
|
-
styles.top = "calc(50% - ".concat(arrowOffset, "px)");
|
|
256
|
-
}
|
|
257
|
-
if (skew === 'top') {
|
|
258
|
-
styles.top = "".concat(base - arrowOffset, "px");
|
|
259
|
-
}
|
|
260
|
-
if (skew === 'bottom') {
|
|
261
|
-
styles.bottom = "".concat(base + arrowOffset, "px");
|
|
262
|
-
}
|
|
270
|
+
if (skew === 'right') {
|
|
271
|
+
styles[dir2] = "".concat(edgeOffset, "px");
|
|
263
272
|
}
|
|
264
273
|
}
|
|
265
274
|
return styles;
|