@nutui/nutui-react 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/animate/style/style.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 +8 -8
- package/dist/cjs/packages/badge/badge.js +9 -9
- package/dist/cjs/packages/button/style/style.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/configprovider/types.d.ts +1 -1
- 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-jmapp/style.css +3 -1
- package/dist/cjs/packages/navbar/style-jrkf/style.css +3 -1
- package/dist/cjs/packages/noticebar/noticebar.js +115 -52
- 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-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/notify/Notification.js +8 -8
- package/dist/cjs/packages/numberkeyboard/style/style.css +6 -6
- 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/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-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-jmapp/style.css +12 -6
- package/dist/cjs/packages/popup/style-jrkf/style.css +12 -6
- package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +35 -35
- package/dist/cjs/packages/skeleton/skeleton.js +15 -15
- package/dist/cjs/packages/swiper/swiper.js +11 -11
- package/dist/cjs/packages/toast/Notification.js +8 -8
- 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/animate/style/style.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 +8 -8
- package/dist/es/packages/badge/badge.js +9 -9
- package/dist/es/packages/button/style/style.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/configprovider/types.d.ts +1 -1
- 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-jmapp/style.css +3 -1
- package/dist/es/packages/navbar/style-jrkf/style.css +3 -1
- package/dist/es/packages/noticebar/noticebar.js +117 -55
- 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-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/notify/Notification.js +8 -8
- package/dist/es/packages/numberkeyboard/style/style.css +6 -6
- 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/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-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-jmapp/style.css +12 -6
- package/dist/es/packages/popup/style-jrkf/style.css +12 -6
- package/dist/es/packages/pulltorefresh/pulltorefresh.js +35 -35
- package/dist/es/packages/skeleton/skeleton.js +15 -15
- package/dist/es/packages/swiper/swiper.js +11 -11
- package/dist/es/packages/toast/Notification.js +8 -8
- 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 +17 -1
- package/dist/es/utils/render.js +1 -1
- package/dist/nutui.react.umd.js +1614 -1254
- 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 +30 -30
- package/dist/style.css +1 -1
- package/dist/style.scss +31 -31
- 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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { BaseProps } from '../../base/props';
|
|
3
3
|
import { FullPosition, SimpleValues, UITheme } from '../../base/atoms';
|
|
4
|
+
export type PopoverType = 'status' | 'description';
|
|
4
5
|
export interface PopoverList {
|
|
5
6
|
key?: string;
|
|
6
7
|
name: string;
|
|
@@ -20,6 +21,7 @@ export interface WrapperPosition {
|
|
|
20
21
|
right: number;
|
|
21
22
|
}
|
|
22
23
|
export type BasePopover<POPUP_PROPS> = POPUP_PROPS & BaseProps & {
|
|
24
|
+
type: PopoverType;
|
|
23
25
|
theme: UITheme;
|
|
24
26
|
location: FullPosition;
|
|
25
27
|
list: PopoverList[];
|
|
@@ -30,6 +32,8 @@ export type BasePopover<POPUP_PROPS> = POPUP_PROPS & BaseProps & {
|
|
|
30
32
|
showArrow: boolean;
|
|
31
33
|
closeOnOutsideClick: boolean;
|
|
32
34
|
closeOnActionClick: boolean;
|
|
35
|
+
autoShow: boolean;
|
|
36
|
+
duration: number;
|
|
33
37
|
children?: ReactNode;
|
|
34
38
|
onClick: () => void;
|
|
35
39
|
onOpen: () => void;
|
|
@@ -12,6 +12,6 @@ var _interop_require_default = require("@swc/helpers/_/_interop_require_default"
|
|
|
12
12
|
var _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
|
13
13
|
function isForwardRefComponent(component) {
|
|
14
14
|
return component.type && component.type.$$typeof && // eslint-disable-next-line react/display-name
|
|
15
|
-
/*#__PURE__*/ _react.default.forwardRef(// @ts-ignore
|
|
16
|
-
function() {}).$$typeof === component.type.$$typeof;
|
|
15
|
+
/*#__PURE__*/ (_react.default.forwardRef(// @ts-ignore
|
|
16
|
+
function() {})).$$typeof === component.type.$$typeof;
|
|
17
17
|
}
|
package/dist/cjs/utils/render.js
CHANGED
|
@@ -19,8 +19,8 @@ _export(exports, {
|
|
|
19
19
|
var _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
20
20
|
var _async_to_generator = require("@swc/helpers/_/_async_to_generator");
|
|
21
21
|
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
22
|
-
var _type_of = require("@swc/helpers/_/_type_of");
|
|
23
22
|
var _ts_generator = require("@swc/helpers/_/_ts_generator");
|
|
23
|
+
var _type_of = require("@swc/helpers/_/_type_of");
|
|
24
24
|
var _reactdom = /*#__PURE__*/ _interop_require_wildcard._(require("react-dom"));
|
|
25
25
|
// Let compiler not to search module usage
|
|
26
26
|
var fullClone = (0, _object_spread._)({}, _reactdom);
|
|
@@ -10,21 +10,15 @@ page {
|
|
|
10
10
|
|
|
11
11
|
.nut-animate {
|
|
12
12
|
/* Animation CSS */
|
|
13
|
-
/* Slide Animations */
|
|
14
|
-
/* Shake Animation */
|
|
15
|
-
/* Ripple Animation */
|
|
16
|
-
/* Breath Animation */
|
|
17
|
-
/* Twinkle Animation */
|
|
18
|
-
/* Flicker Animation */
|
|
19
|
-
/* Jump Animation */
|
|
20
|
-
/* Float Animation */
|
|
21
|
-
/* Loop Animation */
|
|
22
13
|
}
|
|
23
14
|
.nut-animate [class*=nut-animate-] {
|
|
24
15
|
animation-duration: 0.5s;
|
|
25
16
|
animation-timing-function: ease-out;
|
|
26
17
|
animation-fill-mode: both;
|
|
27
18
|
}
|
|
19
|
+
.nut-animate {
|
|
20
|
+
/* Slide Animations */
|
|
21
|
+
}
|
|
28
22
|
@keyframes slide-right {
|
|
29
23
|
0% {
|
|
30
24
|
opacity: 0;
|
|
@@ -77,6 +71,9 @@ page {
|
|
|
77
71
|
.nut-animate .nut-animate-slide-bottom {
|
|
78
72
|
animation-name: slide-bottom;
|
|
79
73
|
}
|
|
74
|
+
.nut-animate {
|
|
75
|
+
/* Shake Animation */
|
|
76
|
+
}
|
|
80
77
|
@keyframes shake {
|
|
81
78
|
0%, 100% {
|
|
82
79
|
transform: translateX(0);
|
|
@@ -112,6 +109,9 @@ page {
|
|
|
112
109
|
.nut-animate .nut-animate-shake {
|
|
113
110
|
animation-name: shake;
|
|
114
111
|
}
|
|
112
|
+
.nut-animate {
|
|
113
|
+
/* Ripple Animation */
|
|
114
|
+
}
|
|
115
115
|
@keyframes ripple {
|
|
116
116
|
0% {
|
|
117
117
|
transform: scale(1);
|
|
@@ -123,6 +123,9 @@ page {
|
|
|
123
123
|
.nut-animate .nut-animate-ripple {
|
|
124
124
|
animation-name: ripple;
|
|
125
125
|
}
|
|
126
|
+
.nut-animate {
|
|
127
|
+
/* Breath Animation */
|
|
128
|
+
}
|
|
126
129
|
@keyframes breath {
|
|
127
130
|
0%, 100% {
|
|
128
131
|
transform: scale(1);
|
|
@@ -137,6 +140,9 @@ page {
|
|
|
137
140
|
animation-timing-function: ease-in-out;
|
|
138
141
|
animation-direction: alternate;
|
|
139
142
|
}
|
|
143
|
+
.nut-animate {
|
|
144
|
+
/* Twinkle Animation */
|
|
145
|
+
}
|
|
140
146
|
.nut-animate .nut-animate-twinkle {
|
|
141
147
|
position: relative;
|
|
142
148
|
}
|
|
@@ -170,6 +176,9 @@ page {
|
|
|
170
176
|
opacity: 0;
|
|
171
177
|
}
|
|
172
178
|
}
|
|
179
|
+
.nut-animate {
|
|
180
|
+
/* Flicker Animation */
|
|
181
|
+
}
|
|
173
182
|
.nut-animate .nut-animate-flicker {
|
|
174
183
|
position: relative;
|
|
175
184
|
overflow: hidden;
|
|
@@ -195,6 +204,9 @@ page {
|
|
|
195
204
|
transform: translateX(calc(150px * var(--nut-scale-f, 1))) skewX(-20deg);
|
|
196
205
|
}
|
|
197
206
|
}
|
|
207
|
+
.nut-animate {
|
|
208
|
+
/* Jump Animation */
|
|
209
|
+
}
|
|
198
210
|
@keyframes jump {
|
|
199
211
|
0% {
|
|
200
212
|
transform: rotate(0) translateY(0);
|
|
@@ -216,6 +228,9 @@ page {
|
|
|
216
228
|
transform-origin: center center;
|
|
217
229
|
animation: jump 0.7s linear;
|
|
218
230
|
}
|
|
231
|
+
.nut-animate {
|
|
232
|
+
/* Float Animation */
|
|
233
|
+
}
|
|
219
234
|
@keyframes float-pop {
|
|
220
235
|
0% {
|
|
221
236
|
top: 0;
|
|
@@ -237,6 +252,9 @@ page {
|
|
|
237
252
|
position: relative;
|
|
238
253
|
animation-name: float-pop;
|
|
239
254
|
}
|
|
255
|
+
.nut-animate {
|
|
256
|
+
/* Loop Animation */
|
|
257
|
+
}
|
|
240
258
|
.nut-animate .loop {
|
|
241
259
|
animation-iteration-count: infinite;
|
|
242
260
|
}
|
|
@@ -4,21 +4,15 @@
|
|
|
4
4
|
/* #endif */
|
|
5
5
|
.nut-animate {
|
|
6
6
|
/* Animation CSS */
|
|
7
|
-
/* Slide Animations */
|
|
8
|
-
/* Shake Animation */
|
|
9
|
-
/* Ripple Animation */
|
|
10
|
-
/* Breath Animation */
|
|
11
|
-
/* Twinkle Animation */
|
|
12
|
-
/* Flicker Animation */
|
|
13
|
-
/* Jump Animation */
|
|
14
|
-
/* Float Animation */
|
|
15
|
-
/* Loop Animation */
|
|
16
7
|
}
|
|
17
8
|
.nut-animate [class*=nut-animate-] {
|
|
18
9
|
animation-duration: 0.5s;
|
|
19
10
|
animation-timing-function: ease-out;
|
|
20
11
|
animation-fill-mode: both;
|
|
21
12
|
}
|
|
13
|
+
.nut-animate {
|
|
14
|
+
/* Slide Animations */
|
|
15
|
+
}
|
|
22
16
|
@keyframes slide-right {
|
|
23
17
|
0% {
|
|
24
18
|
opacity: 0;
|
|
@@ -71,6 +65,9 @@
|
|
|
71
65
|
.nut-animate .nut-animate-slide-bottom {
|
|
72
66
|
animation-name: slide-bottom;
|
|
73
67
|
}
|
|
68
|
+
.nut-animate {
|
|
69
|
+
/* Shake Animation */
|
|
70
|
+
}
|
|
74
71
|
@keyframes shake {
|
|
75
72
|
0%, 100% {
|
|
76
73
|
transform: translateX(0);
|
|
@@ -106,6 +103,9 @@
|
|
|
106
103
|
.nut-animate .nut-animate-shake {
|
|
107
104
|
animation-name: shake;
|
|
108
105
|
}
|
|
106
|
+
.nut-animate {
|
|
107
|
+
/* Ripple Animation */
|
|
108
|
+
}
|
|
109
109
|
@keyframes ripple {
|
|
110
110
|
0% {
|
|
111
111
|
transform: scale(1);
|
|
@@ -117,6 +117,9 @@
|
|
|
117
117
|
.nut-animate .nut-animate-ripple {
|
|
118
118
|
animation-name: ripple;
|
|
119
119
|
}
|
|
120
|
+
.nut-animate {
|
|
121
|
+
/* Breath Animation */
|
|
122
|
+
}
|
|
120
123
|
@keyframes breath {
|
|
121
124
|
0%, 100% {
|
|
122
125
|
transform: scale(1);
|
|
@@ -131,6 +134,9 @@
|
|
|
131
134
|
animation-timing-function: ease-in-out;
|
|
132
135
|
animation-direction: alternate;
|
|
133
136
|
}
|
|
137
|
+
.nut-animate {
|
|
138
|
+
/* Twinkle Animation */
|
|
139
|
+
}
|
|
134
140
|
.nut-animate .nut-animate-twinkle {
|
|
135
141
|
position: relative;
|
|
136
142
|
}
|
|
@@ -164,6 +170,9 @@
|
|
|
164
170
|
opacity: 0;
|
|
165
171
|
}
|
|
166
172
|
}
|
|
173
|
+
.nut-animate {
|
|
174
|
+
/* Flicker Animation */
|
|
175
|
+
}
|
|
167
176
|
.nut-animate .nut-animate-flicker {
|
|
168
177
|
position: relative;
|
|
169
178
|
overflow: hidden;
|
|
@@ -189,6 +198,9 @@
|
|
|
189
198
|
transform: translateX(scale-px(150px)) skewX(-20deg);
|
|
190
199
|
}
|
|
191
200
|
}
|
|
201
|
+
.nut-animate {
|
|
202
|
+
/* Jump Animation */
|
|
203
|
+
}
|
|
192
204
|
@keyframes jump {
|
|
193
205
|
0% {
|
|
194
206
|
transform: rotate(0) translateY(0);
|
|
@@ -210,6 +222,9 @@
|
|
|
210
222
|
transform-origin: center center;
|
|
211
223
|
animation: jump 0.7s linear;
|
|
212
224
|
}
|
|
225
|
+
.nut-animate {
|
|
226
|
+
/* Float Animation */
|
|
227
|
+
}
|
|
213
228
|
@keyframes float-pop {
|
|
214
229
|
0% {
|
|
215
230
|
top: 0;
|
|
@@ -231,6 +246,9 @@
|
|
|
231
246
|
position: relative;
|
|
232
247
|
animation-name: float-pop;
|
|
233
248
|
}
|
|
249
|
+
.nut-animate {
|
|
250
|
+
/* Loop Animation */
|
|
251
|
+
}
|
|
234
252
|
.nut-animate .loop {
|
|
235
253
|
animation-iteration-count: infinite;
|
|
236
254
|
}
|
|
@@ -4,21 +4,15 @@
|
|
|
4
4
|
/* #endif */
|
|
5
5
|
.nut-animate {
|
|
6
6
|
/* Animation CSS */
|
|
7
|
-
/* Slide Animations */
|
|
8
|
-
/* Shake Animation */
|
|
9
|
-
/* Ripple Animation */
|
|
10
|
-
/* Breath Animation */
|
|
11
|
-
/* Twinkle Animation */
|
|
12
|
-
/* Flicker Animation */
|
|
13
|
-
/* Jump Animation */
|
|
14
|
-
/* Float Animation */
|
|
15
|
-
/* Loop Animation */
|
|
16
7
|
}
|
|
17
8
|
.nut-animate [class*=nut-animate-] {
|
|
18
9
|
animation-duration: 0.5s;
|
|
19
10
|
animation-timing-function: ease-out;
|
|
20
11
|
animation-fill-mode: both;
|
|
21
12
|
}
|
|
13
|
+
.nut-animate {
|
|
14
|
+
/* Slide Animations */
|
|
15
|
+
}
|
|
22
16
|
@keyframes slide-right {
|
|
23
17
|
0% {
|
|
24
18
|
opacity: 0;
|
|
@@ -71,6 +65,9 @@
|
|
|
71
65
|
.nut-animate .nut-animate-slide-bottom {
|
|
72
66
|
animation-name: slide-bottom;
|
|
73
67
|
}
|
|
68
|
+
.nut-animate {
|
|
69
|
+
/* Shake Animation */
|
|
70
|
+
}
|
|
74
71
|
@keyframes shake {
|
|
75
72
|
0%, 100% {
|
|
76
73
|
transform: translateX(0);
|
|
@@ -106,6 +103,9 @@
|
|
|
106
103
|
.nut-animate .nut-animate-shake {
|
|
107
104
|
animation-name: shake;
|
|
108
105
|
}
|
|
106
|
+
.nut-animate {
|
|
107
|
+
/* Ripple Animation */
|
|
108
|
+
}
|
|
109
109
|
@keyframes ripple {
|
|
110
110
|
0% {
|
|
111
111
|
transform: scale(1);
|
|
@@ -117,6 +117,9 @@
|
|
|
117
117
|
.nut-animate .nut-animate-ripple {
|
|
118
118
|
animation-name: ripple;
|
|
119
119
|
}
|
|
120
|
+
.nut-animate {
|
|
121
|
+
/* Breath Animation */
|
|
122
|
+
}
|
|
120
123
|
@keyframes breath {
|
|
121
124
|
0%, 100% {
|
|
122
125
|
transform: scale(1);
|
|
@@ -131,6 +134,9 @@
|
|
|
131
134
|
animation-timing-function: ease-in-out;
|
|
132
135
|
animation-direction: alternate;
|
|
133
136
|
}
|
|
137
|
+
.nut-animate {
|
|
138
|
+
/* Twinkle Animation */
|
|
139
|
+
}
|
|
134
140
|
.nut-animate .nut-animate-twinkle {
|
|
135
141
|
position: relative;
|
|
136
142
|
}
|
|
@@ -164,6 +170,9 @@
|
|
|
164
170
|
opacity: 0;
|
|
165
171
|
}
|
|
166
172
|
}
|
|
173
|
+
.nut-animate {
|
|
174
|
+
/* Flicker Animation */
|
|
175
|
+
}
|
|
167
176
|
.nut-animate .nut-animate-flicker {
|
|
168
177
|
position: relative;
|
|
169
178
|
overflow: hidden;
|
|
@@ -189,6 +198,9 @@
|
|
|
189
198
|
transform: translateX(scale-px(150px)) skewX(-20deg);
|
|
190
199
|
}
|
|
191
200
|
}
|
|
201
|
+
.nut-animate {
|
|
202
|
+
/* Jump Animation */
|
|
203
|
+
}
|
|
192
204
|
@keyframes jump {
|
|
193
205
|
0% {
|
|
194
206
|
transform: rotate(0) translateY(0);
|
|
@@ -210,6 +222,9 @@
|
|
|
210
222
|
transform-origin: center center;
|
|
211
223
|
animation: jump 0.7s linear;
|
|
212
224
|
}
|
|
225
|
+
.nut-animate {
|
|
226
|
+
/* Float Animation */
|
|
227
|
+
}
|
|
213
228
|
@keyframes float-pop {
|
|
214
229
|
0% {
|
|
215
230
|
top: 0;
|
|
@@ -231,6 +246,9 @@
|
|
|
231
246
|
position: relative;
|
|
232
247
|
animation-name: float-pop;
|
|
233
248
|
}
|
|
249
|
+
.nut-animate {
|
|
250
|
+
/* Loop Animation */
|
|
251
|
+
}
|
|
234
252
|
.nut-animate .loop {
|
|
235
253
|
animation-iteration-count: infinite;
|
|
236
254
|
}
|
|
@@ -24,14 +24,6 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
24
24
|
onCanPlay: function onCanPlay(e) {}
|
|
25
25
|
});
|
|
26
26
|
export var Audio = function Audio(props) {
|
|
27
|
-
var watch = function watch() {
|
|
28
|
-
if (AudioRef && AudioRef.current) {
|
|
29
|
-
var current = AudioRef.current;
|
|
30
|
-
current.addEventListener('play', function() {
|
|
31
|
-
setPlaying(true);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
27
|
var locale = useConfig().locale;
|
|
36
28
|
var _$_object_spread = _object_spread({}, defaultProps, props), className = _$_object_spread.className, src = _$_object_spread.src, style = _$_object_spread.style, muted = _$_object_spread.muted, autoPlay = _$_object_spread.autoPlay, loop = _$_object_spread.loop, preload = _$_object_spread.preload, type = _$_object_spread.type, onBack = _$_object_spread.onBack, onForward = _$_object_spread.onForward, onPause = _$_object_spread.onPause, onEnd = _$_object_spread.onEnd, onMute = _$_object_spread.onMute, onCanPlay = _$_object_spread.onCanPlay, children = _$_object_spread.children, rest = _object_without_properties(_$_object_spread, [
|
|
37
29
|
"className",
|
|
@@ -73,6 +65,14 @@ export var Audio = function Audio(props) {
|
|
|
73
65
|
onEnd === null || onEnd === void 0 ? void 0 : onEnd(e);
|
|
74
66
|
}
|
|
75
67
|
};
|
|
68
|
+
function watch() {
|
|
69
|
+
if (AudioRef && AudioRef.current) {
|
|
70
|
+
var current = AudioRef.current;
|
|
71
|
+
current.addEventListener('play', function() {
|
|
72
|
+
setPlaying(true);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
76
|
useEffect(function() {
|
|
77
77
|
watch();
|
|
78
78
|
}, []);
|
|
@@ -17,15 +17,6 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
17
17
|
disabled: false
|
|
18
18
|
});
|
|
19
19
|
export var Badge = function Badge(props) {
|
|
20
|
-
var isIcon = function isIcon() {
|
|
21
|
-
if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === 'object' && value) return value;
|
|
22
|
-
};
|
|
23
|
-
var isNumber = function isNumber() {
|
|
24
|
-
if (typeof value === 'number' && value) return value;
|
|
25
|
-
};
|
|
26
|
-
var isString = function isString() {
|
|
27
|
-
if (typeof value === 'string' && value) return value;
|
|
28
|
-
};
|
|
29
20
|
var _this;
|
|
30
21
|
var rtl = useRtl();
|
|
31
22
|
var _$_object_spread = _object_spread({}, defaultProps, props), className = _$_object_spread.className, style = _$_object_spread.style, value = _$_object_spread.value, max = _$_object_spread.max, children = _$_object_spread.children, dot = _$_object_spread.dot, top = _$_object_spread.top, right = _$_object_spread.right, fill = _$_object_spread.fill, size = _$_object_spread.size, disabled = _$_object_spread.disabled;
|
|
@@ -38,6 +29,15 @@ export var Badge = function Badge(props) {
|
|
|
38
29
|
}
|
|
39
30
|
return value;
|
|
40
31
|
};
|
|
32
|
+
function isIcon() {
|
|
33
|
+
if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === 'object' && value) return value;
|
|
34
|
+
}
|
|
35
|
+
function isNumber() {
|
|
36
|
+
if (typeof value === 'number' && value) return value;
|
|
37
|
+
}
|
|
38
|
+
function isString() {
|
|
39
|
+
if (typeof value === 'string' && value) return value;
|
|
40
|
+
}
|
|
41
41
|
var _obj;
|
|
42
42
|
var contentClasses = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-sup"), isNumber() || isString() || dot), _define_property(_obj, "".concat(classPrefix, "-number"), isNumber()), _define_property(_obj, "".concat(classPrefix, "-one"), typeof getContent() === 'string' && ((_this = "".concat(getContent())) === null || _this === void 0 ? void 0 : _this.length) === 1), _define_property(_obj, "".concat(classPrefix, "-dot"), dot), _define_property(_obj, "".concat(classPrefix, "-dot-").concat(size), dot), _define_property(_obj, "".concat(classPrefix, "-").concat(fill), fill === 'outline'), _define_property(_obj, "".concat(classPrefix, "-content"), children), _define_property(_obj, "".concat(classPrefix, "-disabled"), disabled), _obj));
|
|
43
43
|
var getPositionStyle = function getPositionStyle() {
|
|
@@ -162,7 +162,6 @@ page {
|
|
|
162
162
|
padding: var(--nutui-button-xlarge-padding, 0px calc(20px * var(--nut-scale-f, 1)));
|
|
163
163
|
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, calc(18px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
|
|
164
164
|
border-radius: var(--nutui-button-xlarge-border-radius, var(--nutui-radius-base, calc(8px * var(--nut-scale-f, 1))));
|
|
165
|
-
font-weight: var(--nutui-font-weight-bold, 600);
|
|
166
165
|
}
|
|
167
166
|
.nut-button-xlarge .nut-button-text {
|
|
168
167
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, calc(6px * var(--nut-scale-f, 1)));
|
|
@@ -178,12 +177,14 @@ page {
|
|
|
178
177
|
.nut-button-xlarge-children {
|
|
179
178
|
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, calc(18px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
|
|
180
179
|
}
|
|
180
|
+
.nut-button-xlarge {
|
|
181
|
+
font-weight: var(--nutui-font-weight-bold, 600);
|
|
182
|
+
}
|
|
181
183
|
.nut-button-44 {
|
|
182
184
|
height: var(--nutui-button-44-height, calc(44px * var(--nut-scale-f, 1)));
|
|
183
185
|
padding: var(--nutui-button-44-padding, 0px calc(16px * var(--nut-scale-f, 1)));
|
|
184
186
|
font-size: var(--nutui-button-44-font-size, var(--nutui-font-size-15));
|
|
185
187
|
border-radius: var(--nutui-button-44-border-radius, var(--nutui-radius-base, calc(8px * var(--nut-scale-f, 1))));
|
|
186
|
-
font-weight: var(--nutui-font-weight-bold, 600);
|
|
187
188
|
}
|
|
188
189
|
.nut-button-44 .nut-button-text {
|
|
189
190
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, calc(6px * var(--nut-scale-f, 1)));
|
|
@@ -199,12 +200,14 @@ page {
|
|
|
199
200
|
.nut-button-44-children {
|
|
200
201
|
font-size: var(--nutui-button-44-font-size, var(--nutui-font-size-15));
|
|
201
202
|
}
|
|
203
|
+
.nut-button-44 {
|
|
204
|
+
font-weight: var(--nutui-font-weight-bold, 600);
|
|
205
|
+
}
|
|
202
206
|
.nut-button-large {
|
|
203
207
|
height: var(--nutui-button-large-height, calc(40px * var(--nut-scale-f, 1)));
|
|
204
208
|
padding: var(--nutui-button-large-padding, 0px calc(12px * var(--nut-scale-f, 1)));
|
|
205
209
|
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-l, calc(15px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
|
|
206
210
|
border-radius: var(--nutui-button-large-border-radius, var(--nutui-radius-base, calc(8px * var(--nut-scale-f, 1))));
|
|
207
|
-
min-width: calc(84px * var(--nut-scale-f, 1));
|
|
208
211
|
}
|
|
209
212
|
.nut-button-large .nut-button-text {
|
|
210
213
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, calc(6px * var(--nut-scale-f, 1)));
|
|
@@ -220,12 +223,14 @@ page {
|
|
|
220
223
|
.nut-button-large-children {
|
|
221
224
|
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-l, calc(15px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
|
|
222
225
|
}
|
|
226
|
+
.nut-button-large {
|
|
227
|
+
min-width: calc(84px * var(--nut-scale-f, 1));
|
|
228
|
+
}
|
|
223
229
|
.nut-button-36 {
|
|
224
230
|
height: var(--nutui-button-36-height, calc(36px * var(--nut-scale-f, 1)));
|
|
225
231
|
padding: var(--nutui-button-36-padding, 0px calc(12px * var(--nut-scale-f, 1)));
|
|
226
232
|
font-size: var(--nutui-button-36-font-size, var(--nutui-font-size-14));
|
|
227
233
|
border-radius: var(--nutui-button-36-border-radius, var(--nutui-radius-base, calc(8px * var(--nut-scale-f, 1))));
|
|
228
|
-
min-width: calc(66px * var(--nut-scale-f, 1));
|
|
229
234
|
}
|
|
230
235
|
.nut-button-36 .nut-button-text {
|
|
231
236
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, calc(6px * var(--nut-scale-f, 1)));
|
|
@@ -241,13 +246,14 @@ page {
|
|
|
241
246
|
.nut-button-36-children {
|
|
242
247
|
font-size: var(--nutui-button-36-font-size, var(--nutui-font-size-14));
|
|
243
248
|
}
|
|
249
|
+
.nut-button-36 {
|
|
250
|
+
min-width: calc(66px * var(--nut-scale-f, 1));
|
|
251
|
+
}
|
|
244
252
|
.nut-button-small {
|
|
245
253
|
height: var(--nutui-button-small-height, calc(28px * var(--nut-scale-f, 1)));
|
|
246
254
|
padding: var(--nutui-button-small-padding, 0px calc(8px * var(--nut-scale-f, 1)));
|
|
247
255
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, calc(12px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
|
|
248
256
|
border-radius: var(--nutui-button-small-border-radius, var(--nutui-radius-s, calc(6px * var(--nut-scale-f, 1))));
|
|
249
|
-
min-width: calc(52px * var(--nut-scale-f, 1));
|
|
250
|
-
font-weight: var(--nutui-font-weight, 400);
|
|
251
257
|
}
|
|
252
258
|
.nut-button-small .nut-icon {
|
|
253
259
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, calc(12px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
|
|
@@ -257,13 +263,15 @@ page {
|
|
|
257
263
|
.nut-button-small-children {
|
|
258
264
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, calc(12px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
|
|
259
265
|
}
|
|
266
|
+
.nut-button-small {
|
|
267
|
+
min-width: calc(52px * var(--nut-scale-f, 1));
|
|
268
|
+
font-weight: var(--nutui-font-weight, 400);
|
|
269
|
+
}
|
|
260
270
|
.nut-button-mini {
|
|
261
271
|
height: var(--nutui-button-mini-height, calc(24px * var(--nut-scale-f, 1)));
|
|
262
272
|
padding: var(--nutui-button-mini-padding, 0px calc(6px * var(--nut-scale-f, 1)));
|
|
263
273
|
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, calc(11px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
|
|
264
274
|
border-radius: var(--nutui-button-mini-border-radius, var(--nutui-radius-xs, calc(4px * var(--nut-scale-f, 1))));
|
|
265
|
-
min-width: calc(48px * var(--nut-scale-f, 1));
|
|
266
|
-
font-weight: var(--nutui-font-weight, 400);
|
|
267
275
|
}
|
|
268
276
|
.nut-button-mini .nut-icon {
|
|
269
277
|
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, calc(11px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
|
|
@@ -273,6 +281,10 @@ page {
|
|
|
273
281
|
.nut-button-mini-children {
|
|
274
282
|
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, calc(11px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
|
|
275
283
|
}
|
|
284
|
+
.nut-button-mini {
|
|
285
|
+
min-width: calc(48px * var(--nut-scale-f, 1));
|
|
286
|
+
font-weight: var(--nutui-font-weight, 400);
|
|
287
|
+
}
|
|
276
288
|
.nut-button-primary {
|
|
277
289
|
color: var(--nutui-button-primary-color, var(--nutui-color-primary-text, #ffffff));
|
|
278
290
|
background: var(--nutui-button-primary-background-color, var(--nutui-color-primary, #ff0f23));
|
|
@@ -156,7 +156,6 @@
|
|
|
156
156
|
padding: var(--nutui-button-xlarge-padding, 0px 32px);
|
|
157
157
|
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-h2));
|
|
158
158
|
border-radius: var(--nutui-button-xlarge-border-radius, var(--nutui-radius-base));
|
|
159
|
-
font-weight: var(--nutui-font-weight-bold);
|
|
160
159
|
}
|
|
161
160
|
.nut-button-xlarge .nut-button-text {
|
|
162
161
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
@@ -172,12 +171,14 @@
|
|
|
172
171
|
.nut-button-xlarge-children {
|
|
173
172
|
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-h2));
|
|
174
173
|
}
|
|
174
|
+
.nut-button-xlarge {
|
|
175
|
+
font-weight: var(--nutui-font-weight-bold);
|
|
176
|
+
}
|
|
175
177
|
.nut-button-44 {
|
|
176
178
|
height: var(--nutui-button-44-height, 44px);
|
|
177
179
|
padding: var(--nutui-button-44-padding, 0px 16px);
|
|
178
180
|
font-size: var(--nutui-button-44-font-size, var(--nutui-font-size-15));
|
|
179
181
|
border-radius: var(--nutui-button-44-border-radius, var(--nutui-radius-base));
|
|
180
|
-
font-weight: var(--nutui-font-weight-bold);
|
|
181
182
|
}
|
|
182
183
|
.nut-button-44 .nut-button-text {
|
|
183
184
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
@@ -193,12 +194,14 @@
|
|
|
193
194
|
.nut-button-44-children {
|
|
194
195
|
font-size: var(--nutui-button-44-font-size, var(--nutui-font-size-15));
|
|
195
196
|
}
|
|
197
|
+
.nut-button-44 {
|
|
198
|
+
font-weight: var(--nutui-font-weight-bold);
|
|
199
|
+
}
|
|
196
200
|
.nut-button-large {
|
|
197
201
|
height: var(--nutui-button-large-height, 44px);
|
|
198
202
|
padding: var(--nutui-button-large-padding, 0px var(--nutui-spacing-xxl));
|
|
199
203
|
font-size: var(--nutui-button-large-font-size, var(--nutui-font-text-large));
|
|
200
204
|
border-radius: var(--nutui-button-large-border-radius, var(--nutui-radius-s));
|
|
201
|
-
min-width: scale-px(84px);
|
|
202
205
|
}
|
|
203
206
|
.nut-button-large .nut-button-text {
|
|
204
207
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
@@ -214,12 +217,14 @@
|
|
|
214
217
|
.nut-button-large-children {
|
|
215
218
|
font-size: var(--nutui-button-large-font-size, var(--nutui-font-text-large));
|
|
216
219
|
}
|
|
220
|
+
.nut-button-large {
|
|
221
|
+
min-width: scale-px(84px);
|
|
222
|
+
}
|
|
217
223
|
.nut-button-36 {
|
|
218
224
|
height: var(--nutui-button-36-height, 36px);
|
|
219
225
|
padding: var(--nutui-button-36-padding, 0px 12px);
|
|
220
226
|
font-size: var(--nutui-button-36-font-size, var(--nutui-font-size-14));
|
|
221
227
|
border-radius: var(--nutui-button-36-border-radius, var(--nutui-radius-base));
|
|
222
|
-
min-width: scale-px(66px);
|
|
223
228
|
}
|
|
224
229
|
.nut-button-36 .nut-button-text {
|
|
225
230
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
@@ -235,13 +240,14 @@
|
|
|
235
240
|
.nut-button-36-children {
|
|
236
241
|
font-size: var(--nutui-button-36-font-size, var(--nutui-font-size-14));
|
|
237
242
|
}
|
|
243
|
+
.nut-button-36 {
|
|
244
|
+
min-width: scale-px(66px);
|
|
245
|
+
}
|
|
238
246
|
.nut-button-small {
|
|
239
247
|
height: var(--nutui-button-small-height, 28px);
|
|
240
248
|
padding: var(--nutui-button-small-padding, 0px var(--nutui-spacing-l));
|
|
241
249
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-text));
|
|
242
250
|
border-radius: var(--nutui-button-small-border-radius, var(--nutui-radius-xs));
|
|
243
|
-
min-width: scale-px(52px);
|
|
244
|
-
font-weight: var(--nutui-font-weight);
|
|
245
251
|
}
|
|
246
252
|
.nut-button-small .nut-icon {
|
|
247
253
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-text));
|
|
@@ -251,13 +257,15 @@
|
|
|
251
257
|
.nut-button-small-children {
|
|
252
258
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-text));
|
|
253
259
|
}
|
|
260
|
+
.nut-button-small {
|
|
261
|
+
min-width: scale-px(52px);
|
|
262
|
+
font-weight: var(--nutui-font-weight);
|
|
263
|
+
}
|
|
254
264
|
.nut-button-mini {
|
|
255
265
|
height: var(--nutui-button-mini-height, 24px);
|
|
256
266
|
padding: var(--nutui-button-mini-padding, 0px var(--nutui-spacing-l));
|
|
257
267
|
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-text-small));
|
|
258
268
|
border-radius: var(--nutui-button-mini-border-radius, var(--nutui-radius-xs));
|
|
259
|
-
min-width: scale-px(48px);
|
|
260
|
-
font-weight: var(--nutui-font-weight);
|
|
261
269
|
}
|
|
262
270
|
.nut-button-mini .nut-icon {
|
|
263
271
|
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-text-small));
|
|
@@ -267,6 +275,10 @@
|
|
|
267
275
|
.nut-button-mini-children {
|
|
268
276
|
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-text-small));
|
|
269
277
|
}
|
|
278
|
+
.nut-button-mini {
|
|
279
|
+
min-width: scale-px(48px);
|
|
280
|
+
font-weight: var(--nutui-font-weight);
|
|
281
|
+
}
|
|
270
282
|
.nut-button-primary {
|
|
271
283
|
color: var(--nutui-button-primary-color, var(--nutui-color-text-dark));
|
|
272
284
|
background: var(--nutui-color-primary);
|