@nutui/nutui-react 3.0.0-beta.2 → 3.0.0-beta.3
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/dist/cjs/packages/avatar/style/avatar.scss +7 -60
- package/dist/cjs/packages/avatar/style/style.css +5 -43
- package/dist/cjs/packages/badge/badge.js +5 -3
- package/dist/cjs/packages/badge/style/badge.scss +18 -24
- package/dist/cjs/packages/badge/style/style.css +17 -15
- package/dist/cjs/packages/calendarcard/calendarcard.js +8 -3
- package/dist/cjs/packages/calendarcard/style/calendarcard.scss +25 -4
- package/dist/cjs/packages/calendarcard/style/style.css +27 -2
- package/dist/cjs/packages/navbar/navbar.js +10 -5
- package/dist/cjs/packages/navbar/style/navbar.scss +46 -101
- package/dist/cjs/packages/navbar/style/style.css +44 -89
- package/dist/cjs/packages/pagination/pagination.js +2 -0
- package/dist/cjs/packages/pagination/style/pagination.scss +6 -12
- package/dist/cjs/packages/pagination/style/style.css +8 -14
- package/dist/cjs/packages/radio/index.d.ts +8 -2
- package/dist/cjs/packages/radio/index.js +6 -1
- package/dist/cjs/packages/radio/radio.d.ts +1 -4
- package/dist/cjs/packages/radio/radio.js +0 -2
- package/dist/cjs/packages/radio/style/radio.scss +1 -0
- package/dist/cjs/packages/radiogroup/radiogroup.js +1 -1
- package/dist/cjs/packages/safearea/style/safearea.scss +1 -1
- package/dist/cjs/packages/safearea/style/style.css +1 -1
- package/dist/cjs/packages/searchbar/style/searchbar.scss +10 -7
- package/dist/cjs/packages/searchbar/style/style.css +11 -8
- package/dist/cjs/packages/skeleton/style/style.css +5 -43
- package/dist/cjs/packages/tabbar/style/style.css +17 -15
- package/dist/cjs/packages/tabbaritem/style/style.css +17 -15
- package/dist/es/packages/avatar/style/avatar.scss +7 -60
- package/dist/es/packages/avatar/style/style.css +5 -43
- package/dist/es/packages/badge/badge.d.ts +7 -35
- package/dist/es/packages/badge/badge.js +5 -3
- package/dist/es/packages/badge/style/badge.scss +18 -24
- package/dist/es/packages/badge/style/style.css +17 -15
- package/dist/es/packages/calendarcard/calendarcard.d.ts +13 -65
- package/dist/es/packages/calendarcard/calendarcard.js +9 -4
- package/dist/es/packages/calendarcard/style/calendarcard.scss +25 -4
- package/dist/es/packages/calendarcard/style/style.css +27 -2
- package/dist/es/packages/loading/loading.d.ts +3 -15
- package/dist/es/packages/navbar/navbar.js +10 -5
- package/dist/es/packages/navbar/style/navbar.scss +46 -101
- package/dist/es/packages/navbar/style/style.css +44 -89
- package/dist/es/packages/pagination/pagination.js +2 -0
- package/dist/es/packages/pagination/style/pagination.scss +6 -12
- package/dist/es/packages/pagination/style/style.css +8 -14
- package/dist/es/packages/radio/index.d.ts +8 -2
- package/dist/es/packages/radio/index.js +5 -1
- package/dist/es/packages/radio/radio.d.ts +10 -49
- package/dist/es/packages/radio/radio.js +0 -2
- package/dist/es/packages/radio/style/radio.scss +1 -0
- package/dist/es/packages/radiogroup/radiogroup.d.ts +7 -35
- package/dist/es/packages/radiogroup/radiogroup.js +1 -1
- package/dist/es/packages/safearea/safearea.d.ts +1 -5
- package/dist/es/packages/safearea/style/safearea.scss +1 -1
- package/dist/es/packages/safearea/style/style.css +1 -1
- package/dist/es/packages/searchbar/searchbar.d.ts +19 -95
- package/dist/es/packages/searchbar/style/searchbar.scss +10 -7
- package/dist/es/packages/searchbar/style/style.css +11 -8
- package/dist/es/packages/skeleton/style/style.css +5 -43
- package/dist/es/packages/tabbar/style/style.css +17 -15
- package/dist/es/packages/tabbaritem/style/style.css +17 -15
- package/dist/es/packages/video/video.d.ts +5 -25
- package/dist/nutui.react.umd.js +101 -89
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +23 -23
- package/dist/styles/variables.scss +7 -4
- package/package.json +1 -1
- package/dist/cjs/packages/nutui.react.build.rn.d.ts +0 -203
- package/dist/cjs/packages/nutui.react.build.rn.js +0 -418
- package/dist/cjs/packages/nutui.react.rn.d.ts +0 -304
- package/dist/cjs/packages/nutui.react.rn.js +0 -519
- package/dist/cjs/packages/popup/index.rn.d.ts +0 -3
- package/dist/cjs/packages/popup/index.rn.js +0 -12
- package/dist/cjs/packages/popup/popup.rn.d.ts +0 -26
- package/dist/cjs/packages/popup/popup.rn.js +0 -186
- package/dist/es/packages/nutui.react.build.rn.d.ts +0 -203
- package/dist/es/packages/nutui.react.build.rn.js +0 -203
- package/dist/es/packages/nutui.react.rn.d.ts +0 -304
- package/dist/es/packages/nutui.react.rn.js +0 -304
- package/dist/es/packages/popup/index.rn.d.ts +0 -3
- package/dist/es/packages/popup/index.rn.js +0 -2
- package/dist/es/packages/popup/popup.rn.d.ts +0 -26
- package/dist/es/packages/popup/popup.rn.js +0 -174
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
color: var(--nutui-black-5);
|
|
31
31
|
}
|
|
32
32
|
.nut-searchbar-left, .nut-searchbar-right {
|
|
33
|
-
display: flex;
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
34
35
|
}
|
|
35
36
|
.nut-searchbar-left.nut-icon, .nut-searchbar-right.nut-icon {
|
|
36
37
|
width: 20px;
|
|
@@ -39,19 +40,23 @@
|
|
|
39
40
|
.nut-searchbar-left {
|
|
40
41
|
margin-right: var(--nutui-searchbar-gap, 16px);
|
|
41
42
|
}
|
|
42
|
-
.nut-searchbar-left > div, .nut-searchbar-left > span, .nut-searchbar-left > svg
|
|
43
|
+
.nut-searchbar-left > div, .nut-searchbar-left > span, .nut-searchbar-left > i, .nut-searchbar-left > svg,
|
|
44
|
+
.nut-searchbar-left .nut-icon {
|
|
43
45
|
margin-right: var(--nutui-searchbar-gap, 16px);
|
|
44
46
|
}
|
|
45
|
-
.nut-searchbar-left > div:last-child, .nut-searchbar-left > span:last-child, .nut-searchbar-left > svg:last-child
|
|
47
|
+
.nut-searchbar-left > div:last-child, .nut-searchbar-left > span:last-child, .nut-searchbar-left > i:last-child, .nut-searchbar-left > svg:last-child,
|
|
48
|
+
.nut-searchbar-left .nut-icon:last-child {
|
|
46
49
|
margin-right: 0;
|
|
47
50
|
}
|
|
48
51
|
.nut-searchbar-right {
|
|
49
52
|
margin-left: var(--nutui-searchbar-gap, 16px);
|
|
50
53
|
}
|
|
51
|
-
.nut-searchbar-right > div, .nut-searchbar-right > span, .nut-searchbar-right > svg
|
|
54
|
+
.nut-searchbar-right > div, .nut-searchbar-right > span, .nut-searchbar-right > i, .nut-searchbar-right > svg,
|
|
55
|
+
.nut-searchbar-right .nut-icon {
|
|
52
56
|
margin-left: var(--nutui-searchbar-gap, 16px);
|
|
53
57
|
}
|
|
54
|
-
.nut-searchbar-right > div:first-child, .nut-searchbar-right > span:first-child, .nut-searchbar-right > svg:first-child
|
|
58
|
+
.nut-searchbar-right > div:first-child, .nut-searchbar-right > span:first-child, .nut-searchbar-right > i:first-child, .nut-searchbar-right > svg:first-child,
|
|
59
|
+
.nut-searchbar-right .nut-icon:first-child {
|
|
55
60
|
margin-left: 0;
|
|
56
61
|
}
|
|
57
62
|
.nut-searchbar-left > text, .nut-searchbar-left > view {
|
|
@@ -66,7 +71,7 @@
|
|
|
66
71
|
.nut-searchbar-right > text:first-child, .nut-searchbar-right > view:first-child {
|
|
67
72
|
margin-left: 0;
|
|
68
73
|
}
|
|
69
|
-
.nut-searchbar-input-box {
|
|
74
|
+
.nut-searchbar-input-box, .nut-searchbar-input {
|
|
70
75
|
display: flex;
|
|
71
76
|
align-items: center;
|
|
72
77
|
flex: 1;
|
|
@@ -76,8 +81,6 @@
|
|
|
76
81
|
outline: 0;
|
|
77
82
|
box-sizing: border-box;
|
|
78
83
|
width: 100%;
|
|
79
|
-
height: var(--nutui-searchbar-input-height, 32px);
|
|
80
|
-
line-height: var(--nutui-searchbar-input-height, 32px);
|
|
81
84
|
padding: var(--nutui-searchbar-input-padding, 0 4px);
|
|
82
85
|
font-size: var(--nutui-searchbar-font-size, var(--nutui-font-size-base, 14px));
|
|
83
86
|
color: var(--nutui-searchbar-input-text-color, var(--nutui-color-title, #1a1a1a));
|
|
@@ -73,6 +73,11 @@
|
|
|
73
73
|
.nut-avatar {
|
|
74
74
|
position: relative;
|
|
75
75
|
flex: 0 0 auto;
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
width: var(--nutui-avatar-normal-width, 40px);
|
|
80
|
+
height: var(--nutui-avatar-normal-height, 40px);
|
|
76
81
|
}
|
|
77
82
|
.nut-avatar-round {
|
|
78
83
|
border-radius: 999px;
|
|
@@ -96,21 +101,12 @@
|
|
|
96
101
|
.nut-avatar-icon {
|
|
97
102
|
background-size: 100% 100%;
|
|
98
103
|
}
|
|
99
|
-
.nut-avatar .nut-icon-img {
|
|
100
|
-
width: 100%;
|
|
101
|
-
height: 100%;
|
|
102
|
-
}
|
|
103
104
|
.nut-avatar-text {
|
|
104
105
|
display: flex;
|
|
105
106
|
justify-content: center;
|
|
106
107
|
align-items: center;
|
|
107
|
-
width: 100%;
|
|
108
|
-
height: 100%;
|
|
109
108
|
}
|
|
110
109
|
.nut-avatar-large {
|
|
111
|
-
display: flex;
|
|
112
|
-
justify-content: center;
|
|
113
|
-
align-items: center;
|
|
114
110
|
width: var(--nutui-avatar-large-width, 60px);
|
|
115
111
|
height: var(--nutui-avatar-large-height, 60px);
|
|
116
112
|
}
|
|
@@ -118,30 +114,15 @@
|
|
|
118
114
|
width: var(--nutui-avatar-large-width, 60px);
|
|
119
115
|
height: var(--nutui-avatar-large-height, 60px);
|
|
120
116
|
}
|
|
121
|
-
.nut-avatar-large-img-image {
|
|
122
|
-
width: var(--nutui-avatar-large-width, 60px);
|
|
123
|
-
height: var(--nutui-avatar-large-height, 60px);
|
|
124
|
-
}
|
|
125
117
|
.nut-avatar-large-icon {
|
|
126
118
|
width: var(--nutui-avatar-large-width, 60px);
|
|
127
119
|
height: var(--nutui-avatar-large-height, 60px);
|
|
128
120
|
}
|
|
129
|
-
.nut-avatar-large .nut-icon-img {
|
|
130
|
-
width: 100%;
|
|
131
|
-
height: 100%;
|
|
132
|
-
}
|
|
133
121
|
.nut-avatar-large-text {
|
|
134
122
|
width: var(--nutui-avatar-large-width, 60px);
|
|
135
123
|
height: var(--nutui-avatar-large-height, 60px);
|
|
136
124
|
}
|
|
137
125
|
.nut-avatar-small {
|
|
138
|
-
display: flex;
|
|
139
|
-
justify-content: center;
|
|
140
|
-
align-items: center;
|
|
141
|
-
width: var(--nutui-avatar-small-width, 32px);
|
|
142
|
-
height: var(--nutui-avatar-small-height, 32px);
|
|
143
|
-
}
|
|
144
|
-
.nut-avatar-small-img-image {
|
|
145
126
|
width: var(--nutui-avatar-small-width, 32px);
|
|
146
127
|
height: var(--nutui-avatar-small-height, 32px);
|
|
147
128
|
}
|
|
@@ -149,25 +130,6 @@
|
|
|
149
130
|
width: var(--nutui-avatar-small-width, 32px);
|
|
150
131
|
height: var(--nutui-avatar-small-height, 32px);
|
|
151
132
|
}
|
|
152
|
-
.nut-avatar-normal {
|
|
153
|
-
display: flex;
|
|
154
|
-
justify-content: center;
|
|
155
|
-
align-items: center;
|
|
156
|
-
width: var(--nutui-avatar-normal-width, 40px);
|
|
157
|
-
height: var(--nutui-avatar-normal-height, 40px);
|
|
158
|
-
}
|
|
159
|
-
.nut-avatar-normal-img-image {
|
|
160
|
-
width: var(--nutui-avatar-normal-width, 40px);
|
|
161
|
-
height: var(--nutui-avatar-normal-height, 40px);
|
|
162
|
-
}
|
|
163
|
-
.nut-avatar-normal .nut-icon-img {
|
|
164
|
-
width: 100%;
|
|
165
|
-
height: 100%;
|
|
166
|
-
}
|
|
167
|
-
.nut-avatar-normal-text {
|
|
168
|
-
width: var(--nutui-avatar-normal-width, 40px);
|
|
169
|
-
height: var(--nutui-avatar-normal-height, 40px);
|
|
170
|
-
}
|
|
171
133
|
|
|
172
134
|
.nut-skeleton {
|
|
173
135
|
display: inline-block;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
.nut-badge {
|
|
2
2
|
position: relative;
|
|
3
|
-
display: inline-
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
width: auto;
|
|
5
|
+
/* #ifdef harmony */
|
|
6
|
+
min-width: 1px;
|
|
7
|
+
/* #endif */
|
|
8
|
+
/* #ifndef harmony */
|
|
9
|
+
min-width: auto;
|
|
10
|
+
/* #endif */
|
|
4
11
|
}
|
|
5
12
|
.nut-badge-icon {
|
|
6
13
|
position: absolute;
|
|
@@ -8,8 +15,6 @@
|
|
|
8
15
|
justify-content: center;
|
|
9
16
|
align-items: center;
|
|
10
17
|
background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
11
|
-
top: -10%;
|
|
12
|
-
right: -15%;
|
|
13
18
|
padding: var(--nutui-badge-icon-padding, 3px);
|
|
14
19
|
text-align: center;
|
|
15
20
|
border: var(--nutui-badge-border, 0px solid var(--nutui-color-primary-text, #ffffff));
|
|
@@ -27,7 +32,12 @@
|
|
|
27
32
|
display: flex;
|
|
28
33
|
justify-content: center;
|
|
29
34
|
align-items: center;
|
|
35
|
+
/* #ifdef harmony */
|
|
36
|
+
background: var(--nutui-color-primary, #ff0f23);
|
|
37
|
+
/* #endif */
|
|
38
|
+
/* #ifndef harmony */
|
|
30
39
|
background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
40
|
+
/* #endif */
|
|
31
41
|
color: var(--nutui-badge-color, #fff);
|
|
32
42
|
padding: var(--nutui-badge-padding, 0 4px);
|
|
33
43
|
font-size: var(--nutui-badge-font-size, var(--nutui-font-size-xxs, 10px));
|
|
@@ -45,7 +55,9 @@
|
|
|
45
55
|
padding: 0;
|
|
46
56
|
}
|
|
47
57
|
.nut-badge-content {
|
|
48
|
-
|
|
58
|
+
/* #ifndef rn */
|
|
59
|
+
transform: var(--nutui-badge-content-transform, translateX(100%));
|
|
60
|
+
/* #endif */
|
|
49
61
|
}
|
|
50
62
|
.nut-badge-dot {
|
|
51
63
|
width: var(--nutui-badge-dot-width, 7px);
|
|
@@ -54,22 +66,12 @@
|
|
|
54
66
|
border-radius: var(--nutui-badge-dot-width, 7px);
|
|
55
67
|
padding: 0;
|
|
56
68
|
}
|
|
57
|
-
.nut-badge-outline
|
|
69
|
+
.nut-badge-outline {
|
|
58
70
|
background: var(--nutui-color-primary-text, #ffffff);
|
|
59
71
|
border: 1px solid var(--nutui-color-primary, #ff0f23);
|
|
60
72
|
color: var(--nutui-color-primary, #ff0f23);
|
|
61
73
|
}
|
|
62
74
|
|
|
63
|
-
[dir=rtl] .nut-badge-icon,
|
|
64
|
-
.nut-rtl .nut-badge-icon {
|
|
65
|
-
right: auto;
|
|
66
|
-
left: -15%;
|
|
67
|
-
}
|
|
68
|
-
[dir=rtl] .nut-badge-content,
|
|
69
|
-
.nut-rtl .nut-badge-content {
|
|
70
|
-
transform: var(--nutui-badge-content-transform, translateY(-50%) translateX(-100%));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
75
|
.nut-tabbar-item {
|
|
74
76
|
display: flex;
|
|
75
77
|
flex-direction: column;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
.nut-badge {
|
|
2
2
|
position: relative;
|
|
3
|
-
display: inline-
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
width: auto;
|
|
5
|
+
/* #ifdef harmony */
|
|
6
|
+
min-width: 1px;
|
|
7
|
+
/* #endif */
|
|
8
|
+
/* #ifndef harmony */
|
|
9
|
+
min-width: auto;
|
|
10
|
+
/* #endif */
|
|
4
11
|
}
|
|
5
12
|
.nut-badge-icon {
|
|
6
13
|
position: absolute;
|
|
@@ -8,8 +15,6 @@
|
|
|
8
15
|
justify-content: center;
|
|
9
16
|
align-items: center;
|
|
10
17
|
background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
11
|
-
top: -10%;
|
|
12
|
-
right: -15%;
|
|
13
18
|
padding: var(--nutui-badge-icon-padding, 3px);
|
|
14
19
|
text-align: center;
|
|
15
20
|
border: var(--nutui-badge-border, 0px solid var(--nutui-color-primary-text, #ffffff));
|
|
@@ -27,7 +32,12 @@
|
|
|
27
32
|
display: flex;
|
|
28
33
|
justify-content: center;
|
|
29
34
|
align-items: center;
|
|
35
|
+
/* #ifdef harmony */
|
|
36
|
+
background: var(--nutui-color-primary, #ff0f23);
|
|
37
|
+
/* #endif */
|
|
38
|
+
/* #ifndef harmony */
|
|
30
39
|
background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
40
|
+
/* #endif */
|
|
31
41
|
color: var(--nutui-badge-color, #fff);
|
|
32
42
|
padding: var(--nutui-badge-padding, 0 4px);
|
|
33
43
|
font-size: var(--nutui-badge-font-size, var(--nutui-font-size-xxs, 10px));
|
|
@@ -45,7 +55,9 @@
|
|
|
45
55
|
padding: 0;
|
|
46
56
|
}
|
|
47
57
|
.nut-badge-content {
|
|
48
|
-
|
|
58
|
+
/* #ifndef rn */
|
|
59
|
+
transform: var(--nutui-badge-content-transform, translateX(100%));
|
|
60
|
+
/* #endif */
|
|
49
61
|
}
|
|
50
62
|
.nut-badge-dot {
|
|
51
63
|
width: var(--nutui-badge-dot-width, 7px);
|
|
@@ -54,22 +66,12 @@
|
|
|
54
66
|
border-radius: var(--nutui-badge-dot-width, 7px);
|
|
55
67
|
padding: 0;
|
|
56
68
|
}
|
|
57
|
-
.nut-badge-outline
|
|
69
|
+
.nut-badge-outline {
|
|
58
70
|
background: var(--nutui-color-primary-text, #ffffff);
|
|
59
71
|
border: 1px solid var(--nutui-color-primary, #ff0f23);
|
|
60
72
|
color: var(--nutui-color-primary, #ff0f23);
|
|
61
73
|
}
|
|
62
74
|
|
|
63
|
-
[dir=rtl] .nut-badge-icon,
|
|
64
|
-
.nut-rtl .nut-badge-icon {
|
|
65
|
-
right: auto;
|
|
66
|
-
left: -15%;
|
|
67
|
-
}
|
|
68
|
-
[dir=rtl] .nut-badge-content,
|
|
69
|
-
.nut-rtl .nut-badge-content {
|
|
70
|
-
transform: var(--nutui-badge-content-transform, translateY(-50%) translateX(-100%));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
75
|
.nut-tabbar-item {
|
|
74
76
|
display: flex;
|
|
75
77
|
flex-direction: column;
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from "../../utils/typings";
|
|
3
3
|
export interface VideoProps extends BasicComponent {
|
|
4
|
-
/**
|
|
5
|
-
* 视频地址和类型设置
|
|
6
|
-
* @default {type: {}, src: ''}
|
|
7
|
-
*/
|
|
8
4
|
source: {
|
|
9
5
|
type: string;
|
|
10
6
|
src: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* 控制视频播放属性
|
|
14
|
-
* @default -
|
|
15
|
-
*/
|
|
7
|
+
};
|
|
16
8
|
options: {
|
|
17
9
|
controls?: boolean;
|
|
18
10
|
muted?: boolean;
|
|
@@ -20,21 +12,9 @@ export interface VideoProps extends BasicComponent {
|
|
|
20
12
|
poster?: string;
|
|
21
13
|
playsinline?: boolean;
|
|
22
14
|
loop?: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
*/
|
|
28
|
-
onPlay: (element: HTMLVideoElement) => void
|
|
29
|
-
/**
|
|
30
|
-
* 暂停
|
|
31
|
-
* @default -
|
|
32
|
-
*/
|
|
33
|
-
onPause: (element: HTMLVideoElement) => void
|
|
34
|
-
/**
|
|
35
|
-
* 播放完成回调
|
|
36
|
-
* @default -
|
|
37
|
-
*/
|
|
38
|
-
onPlayEnd: (element: HTMLVideoElement) => void
|
|
15
|
+
};
|
|
16
|
+
onPlay: (element: HTMLVideoElement) => void;
|
|
17
|
+
onPause: (element: HTMLVideoElement) => void;
|
|
18
|
+
onPlayEnd: (element: HTMLVideoElement) => void;
|
|
39
19
|
}
|
|
40
20
|
export declare const Video: FunctionComponent<Partial<VideoProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onPause' | 'onPlay'>>;
|
package/dist/nutui.react.umd.js
CHANGED
|
@@ -10727,6 +10727,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
10727
10727
|
var NavBar = function(props) {
|
|
10728
10728
|
var _$_object_spread = _object_spread({}, defaultProps$1g, props), right = _$_object_spread.right, left = _$_object_spread.left, titleAlign = _$_object_spread.titleAlign, className = _$_object_spread.className, style = _$_object_spread.style, back = _$_object_spread.back, fixed = _$_object_spread.fixed, safeAreaInsetTop = _$_object_spread.safeAreaInsetTop, placeholder = _$_object_spread.placeholder, zIndex = _$_object_spread.zIndex, onBackClick = _$_object_spread.onBackClick;
|
|
10729
10729
|
var classPrefix2 = "nut-navbar";
|
|
10730
|
+
var rtl = useRtl();
|
|
10730
10731
|
var children = Array.isArray(props.children) ? props.children : [
|
|
10731
10732
|
props.children
|
|
10732
10733
|
];
|
|
@@ -10770,11 +10771,12 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
10770
10771
|
back
|
|
10771
10772
|
]);
|
|
10772
10773
|
var renderLeft = function() {
|
|
10774
|
+
var _obj2, _obj1;
|
|
10773
10775
|
return back || left ? /* @__PURE__ */ React.createElement("div", {
|
|
10774
|
-
className: "".concat(classPrefix2, "-left"),
|
|
10776
|
+
className: classNames((_obj2 = {}, _define_property(_obj2, "".concat(classPrefix2, "-left"), true), _define_property(_obj2, "".concat(classPrefix2, "-left-align-").concat(titleAlign), true), _define_property(_obj2, "".concat(classPrefix2, "-left-rtl"), rtl), _obj2)),
|
|
10775
10777
|
ref: leftRef
|
|
10776
10778
|
}, back && /* @__PURE__ */ React.createElement("div", {
|
|
10777
|
-
className: "".concat(classPrefix2, "-left-back"),
|
|
10779
|
+
className: classNames((_obj1 = {}, _define_property(_obj1, "".concat(classPrefix2, "-left-back"), true), _define_property(_obj1, "".concat(classPrefix2, "-left-back-align-").concat(titleAlign), true), _define_property(_obj1, "".concat(classPrefix2, "-left-back-children"), left), _define_property(_obj1, "".concat(classPrefix2, "-left-back-children-rtl"), left && rtl), _obj1)),
|
|
10778
10780
|
onClick: function(e) {
|
|
10779
10781
|
return onBackClick(e);
|
|
10780
10782
|
}
|
|
@@ -10789,14 +10791,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
10789
10791
|
width: contentRealWidth
|
|
10790
10792
|
};
|
|
10791
10793
|
}
|
|
10794
|
+
var _obj2;
|
|
10792
10795
|
return /* @__PURE__ */ React.createElement("div", {
|
|
10793
|
-
className: "".concat(classPrefix2, "-title"),
|
|
10796
|
+
className: classNames((_obj2 = {}, _define_property(_obj2, "".concat(classPrefix2, "-title"), true), _define_property(_obj2, "".concat(classPrefix2, "-title-align-").concat(titleAlign), true), _obj2)),
|
|
10794
10797
|
style: titleStyle
|
|
10795
10798
|
}, children);
|
|
10796
10799
|
};
|
|
10797
10800
|
var renderRight = function() {
|
|
10801
|
+
var _obj2;
|
|
10798
10802
|
return /* @__PURE__ */ React.createElement("div", {
|
|
10799
|
-
className: "".concat(classPrefix2, "-right"),
|
|
10803
|
+
className: classNames((_obj2 = {}, _define_property(_obj2, "".concat(classPrefix2, "-right"), true), _define_property(_obj2, "".concat(classPrefix2, "-right-align-").concat(titleAlign), true), _define_property(_obj2, "".concat(classPrefix2, "-right-rtl"), rtl), _obj2)),
|
|
10800
10804
|
ref: rightRef
|
|
10801
10805
|
}, right);
|
|
10802
10806
|
};
|
|
@@ -10808,7 +10812,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
10808
10812
|
}, renderLeft(), renderContent(), renderRight());
|
|
10809
10813
|
};
|
|
10810
10814
|
var _obj;
|
|
10811
|
-
var classes = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-fixed"), fixed), _define_property(_obj, "".concat(classPrefix2, "-
|
|
10815
|
+
var classes = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-fixed"), fixed), _define_property(_obj, "".concat(classPrefix2, "-safe-area-inset-top"), safeAreaInsetTop), _define_property(_obj, "".concat(classPrefix2, "-align-").concat(titleAlign), true), _define_property(_obj, "".concat(classPrefix2, "-rtl"), rtl), _obj));
|
|
10812
10816
|
var cls = classNames(classPrefix2, classes, className);
|
|
10813
10817
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, safeAreaInsetTop && /* @__PURE__ */ React.createElement(SafeArea, {
|
|
10814
10818
|
position: "top"
|
|
@@ -11201,10 +11205,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11201
11205
|
var _$_object_spread = _object_spread({}, defaultProps$1c, 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, color = _$_object_spread.color, fill = _$_object_spread.fill;
|
|
11202
11206
|
var classPrefix2 = "nut-badge";
|
|
11203
11207
|
var classes = classNames(classPrefix2, className, _define_property({}, "".concat(classPrefix2, "-").concat(fill), fill === "outline"));
|
|
11204
|
-
var
|
|
11208
|
+
var _obj;
|
|
11209
|
+
var contentClasses = classNames("".concat(classPrefix2, "-content"), (_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-sup"), isNumber() || isString() || dot), _define_property(_obj, "".concat(classPrefix2, "-one"), typeof content() === "string" && ((_this = "".concat(content())) === null || _this === void 0 ? void 0 : _this.length) === 1), _define_property(_obj, "".concat(classPrefix2, "-dot"), dot), _define_property(_obj, "".concat(classPrefix2, "-").concat(fill), fill === "outline"), _obj));
|
|
11205
11210
|
var getStyle = function() {
|
|
11206
11211
|
var style2 = {};
|
|
11207
|
-
style2.top = "".concat(Number(top) || parseFloat(String(top)) || 0, "px");
|
|
11212
|
+
style2.top = "".concat(Number(-top) || parseFloat(String(-top)) || 0, "px");
|
|
11208
11213
|
var dir = rtl ? "left" : "right";
|
|
11209
11214
|
style2[dir] = "".concat(Number(right) || parseFloat(String(right)) || 0, "px");
|
|
11210
11215
|
if (color) {
|
|
@@ -11221,11 +11226,12 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11221
11226
|
}
|
|
11222
11227
|
return style2;
|
|
11223
11228
|
};
|
|
11229
|
+
var _obj1;
|
|
11224
11230
|
return /* @__PURE__ */ React.createElement("div", {
|
|
11225
11231
|
className: classes,
|
|
11226
11232
|
style
|
|
11227
11233
|
}, isIcon() && /* @__PURE__ */ React.createElement("div", {
|
|
11228
|
-
className: "".concat(classPrefix2, "-icon")
|
|
11234
|
+
className: classNames("".concat(classPrefix2, "-content"), (_obj1 = {}, _define_property(_obj1, "".concat(classPrefix2, "-icon"), true), _define_property(_obj1, "".concat(classPrefix2, "-icon-rtl"), rtl), _obj1))
|
|
11229
11235
|
}, value), children, !isIcon() && /* @__PURE__ */ React.createElement("div", {
|
|
11230
11236
|
className: contentClasses,
|
|
11231
11237
|
style: getStyle()
|
|
@@ -13660,7 +13666,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13660
13666
|
onChange === null || onChange === void 0 ? void 0 : onChange(val);
|
|
13661
13667
|
}
|
|
13662
13668
|
};
|
|
13663
|
-
var getDays = function(month2) {
|
|
13669
|
+
var getDays = React.useCallback(function(month2) {
|
|
13664
13670
|
var y = month2.year;
|
|
13665
13671
|
var m2 = month2.month;
|
|
13666
13672
|
var days2 = _to_consumable_array(getPrevMonthDays(y, m2, firstDayOfWeek)).concat(_to_consumable_array(getCurrentMonthDays(y, m2)));
|
|
@@ -13676,13 +13682,18 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13676
13682
|
});
|
|
13677
13683
|
}
|
|
13678
13684
|
return days2;
|
|
13679
|
-
}
|
|
13685
|
+
}, [
|
|
13686
|
+
firstDayOfWeek
|
|
13687
|
+
]);
|
|
13680
13688
|
React.useEffect(function() {
|
|
13681
13689
|
var newDays = getDays(month);
|
|
13682
13690
|
setDays(newDays);
|
|
13683
13691
|
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(month);
|
|
13684
13692
|
}, [
|
|
13685
|
-
month
|
|
13693
|
+
month,
|
|
13694
|
+
getDays,
|
|
13695
|
+
onPageChange,
|
|
13696
|
+
firstDayOfWeek
|
|
13686
13697
|
]);
|
|
13687
13698
|
var isSameDay = function(day1, day2) {
|
|
13688
13699
|
return (day1 === null || day1 === void 0 ? void 0 : day1.year) === (day2 === null || day2 === void 0 ? void 0 : day2.year) && (day1 === null || day1 === void 0 ? void 0 : day1.month) === (day2 === null || day2 === void 0 ? void 0 : day2.month) && (day1 === null || day1 === void 0 ? void 0 : day1.date) === (day2 === null || day2 === void 0 ? void 0 : day2.date);
|
|
@@ -17704,81 +17715,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17704
17715
|
};
|
|
17705
17716
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
17706
17717
|
const RadioContext = React.createContext(null);
|
|
17707
|
-
var defaultProps$R = {
|
|
17708
|
-
labelPosition: "right",
|
|
17709
|
-
onChange: function(value) {
|
|
17710
|
-
},
|
|
17711
|
-
direction: "vertical",
|
|
17712
|
-
options: []
|
|
17713
|
-
};
|
|
17714
|
-
var classPrefix$g = "nut-radiogroup";
|
|
17715
|
-
var RadioGroup = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
17716
|
-
var _ref = _object_spread({}, defaultProps$R, props), children = _ref.children, className = _ref.className;
|
|
17717
|
-
_ref.value;
|
|
17718
|
-
_ref.defaultValue;
|
|
17719
|
-
var onChange = _ref.onChange, shape = _ref.shape, labelPosition = _ref.labelPosition;
|
|
17720
|
-
_ref.direction;
|
|
17721
|
-
var options2 = _ref.options, disabled = _ref.disabled, rest = _object_without_properties(_ref, [
|
|
17722
|
-
"children",
|
|
17723
|
-
"className",
|
|
17724
|
-
"value",
|
|
17725
|
-
"defaultValue",
|
|
17726
|
-
"onChange",
|
|
17727
|
-
"shape",
|
|
17728
|
-
"labelPosition",
|
|
17729
|
-
"direction",
|
|
17730
|
-
"options",
|
|
17731
|
-
"disabled"
|
|
17732
|
-
]);
|
|
17733
|
-
var cls = classNames(classPrefix$g, _define_property({}, "".concat(classPrefix$g, "-").concat(props.direction), props.direction), className);
|
|
17734
|
-
var _usePropsValue = _sliced_to_array(usePropsValue({
|
|
17735
|
-
defaultValue: props.defaultValue,
|
|
17736
|
-
value: props.value,
|
|
17737
|
-
finalValue: "",
|
|
17738
|
-
onChange
|
|
17739
|
-
}), 2), val2State = _usePropsValue[0], setVal2State = _usePropsValue[1];
|
|
17740
|
-
var renderOptionsChildren = React.useCallback(function() {
|
|
17741
|
-
return options2 === null || options2 === void 0 ? void 0 : options2.map(function(_param) {
|
|
17742
|
-
var label = _param.label, value = _param.value, disabled2 = _param.disabled, onChange2 = _param.onChange, rest2 = _object_without_properties(_param, [
|
|
17743
|
-
"label",
|
|
17744
|
-
"value",
|
|
17745
|
-
"disabled",
|
|
17746
|
-
"onChange"
|
|
17747
|
-
]);
|
|
17748
|
-
return /* @__PURE__ */ React.createElement(Radio, _object_spread_props(_object_spread({}, rest2), {
|
|
17749
|
-
key: value === null || value === void 0 ? void 0 : value.toString(),
|
|
17750
|
-
children: label,
|
|
17751
|
-
value,
|
|
17752
|
-
disabled: disabled2,
|
|
17753
|
-
onChange: onChange2,
|
|
17754
|
-
labelPosition,
|
|
17755
|
-
checked: value === val2State
|
|
17756
|
-
}));
|
|
17757
|
-
});
|
|
17758
|
-
}, [
|
|
17759
|
-
options2,
|
|
17760
|
-
labelPosition,
|
|
17761
|
-
val2State
|
|
17762
|
-
]);
|
|
17763
|
-
return /* @__PURE__ */ React.createElement(RadioContext.Provider, {
|
|
17764
|
-
value: {
|
|
17765
|
-
labelPosition: labelPosition || "right",
|
|
17766
|
-
disabled,
|
|
17767
|
-
shape,
|
|
17768
|
-
value: val2State,
|
|
17769
|
-
check: function(value) {
|
|
17770
|
-
setVal2State(value);
|
|
17771
|
-
},
|
|
17772
|
-
uncheck: function() {
|
|
17773
|
-
setVal2State("");
|
|
17774
|
-
}
|
|
17775
|
-
}
|
|
17776
|
-
}, /* @__PURE__ */ React.createElement("div", _object_spread({
|
|
17777
|
-
className: cls
|
|
17778
|
-
}, rest), (options2 === null || options2 === void 0 ? void 0 : options2.length) ? renderOptionsChildren() : children));
|
|
17779
|
-
});
|
|
17780
|
-
RadioGroup.displayName = "NutRadioGroup";
|
|
17781
|
-
var defaultProps$Q = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
17718
|
+
var defaultProps$R = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
17782
17719
|
disabled: false,
|
|
17783
17720
|
shape: "round",
|
|
17784
17721
|
value: "",
|
|
@@ -17790,7 +17727,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17790
17727
|
});
|
|
17791
17728
|
var Radio = function(props) {
|
|
17792
17729
|
var classPrefix2 = "nut-radio";
|
|
17793
|
-
var _ref = _object_spread({}, defaultProps$
|
|
17730
|
+
var _ref = _object_spread({}, defaultProps$R, props), children = _ref.children, className = _ref.className, style = _ref.style, checked = _ref.checked, defaultChecked = _ref.defaultChecked, shape = _ref.shape, value = _ref.value;
|
|
17794
17731
|
_ref.icon;
|
|
17795
17732
|
_ref.activeIcon;
|
|
17796
17733
|
var onChange = _ref.onChange, others = _object_without_properties(_ref, [
|
|
@@ -17887,7 +17824,80 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17887
17824
|
}, rest), renderRadioItem());
|
|
17888
17825
|
};
|
|
17889
17826
|
Radio.displayName = "NutRadio";
|
|
17890
|
-
|
|
17827
|
+
var defaultProps$Q = {
|
|
17828
|
+
labelPosition: "right",
|
|
17829
|
+
onChange: function(value) {
|
|
17830
|
+
},
|
|
17831
|
+
direction: "vertical",
|
|
17832
|
+
options: []
|
|
17833
|
+
};
|
|
17834
|
+
var classPrefix$g = "nut-radiogroup";
|
|
17835
|
+
var RadioGroup = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
17836
|
+
var _ref = _object_spread({}, defaultProps$Q, props), children = _ref.children, className = _ref.className;
|
|
17837
|
+
_ref.value;
|
|
17838
|
+
_ref.defaultValue;
|
|
17839
|
+
var onChange = _ref.onChange, shape = _ref.shape, labelPosition = _ref.labelPosition, direction = _ref.direction, options2 = _ref.options, disabled = _ref.disabled, rest = _object_without_properties(_ref, [
|
|
17840
|
+
"children",
|
|
17841
|
+
"className",
|
|
17842
|
+
"value",
|
|
17843
|
+
"defaultValue",
|
|
17844
|
+
"onChange",
|
|
17845
|
+
"shape",
|
|
17846
|
+
"labelPosition",
|
|
17847
|
+
"direction",
|
|
17848
|
+
"options",
|
|
17849
|
+
"disabled"
|
|
17850
|
+
]);
|
|
17851
|
+
var cls = classNames(classPrefix$g, _define_property({}, "".concat(classPrefix$g, "-").concat(direction), direction), className);
|
|
17852
|
+
var _usePropsValue = _sliced_to_array(usePropsValue({
|
|
17853
|
+
defaultValue: props.defaultValue,
|
|
17854
|
+
value: props.value,
|
|
17855
|
+
finalValue: "",
|
|
17856
|
+
onChange
|
|
17857
|
+
}), 2), val2State = _usePropsValue[0], setVal2State = _usePropsValue[1];
|
|
17858
|
+
var renderOptionsChildren = React.useCallback(function() {
|
|
17859
|
+
return options2 === null || options2 === void 0 ? void 0 : options2.map(function(_param) {
|
|
17860
|
+
var label = _param.label, value = _param.value, disabled2 = _param.disabled, onChange2 = _param.onChange, rest2 = _object_without_properties(_param, [
|
|
17861
|
+
"label",
|
|
17862
|
+
"value",
|
|
17863
|
+
"disabled",
|
|
17864
|
+
"onChange"
|
|
17865
|
+
]);
|
|
17866
|
+
return /* @__PURE__ */ React.createElement(InnerRadio, _object_spread_props(_object_spread({}, rest2), {
|
|
17867
|
+
key: value === null || value === void 0 ? void 0 : value.toString(),
|
|
17868
|
+
children: label,
|
|
17869
|
+
value,
|
|
17870
|
+
disabled: disabled2,
|
|
17871
|
+
onChange: onChange2,
|
|
17872
|
+
labelPosition,
|
|
17873
|
+
checked: value === val2State
|
|
17874
|
+
}));
|
|
17875
|
+
});
|
|
17876
|
+
}, [
|
|
17877
|
+
options2,
|
|
17878
|
+
labelPosition,
|
|
17879
|
+
val2State
|
|
17880
|
+
]);
|
|
17881
|
+
return /* @__PURE__ */ React.createElement(RadioContext.Provider, {
|
|
17882
|
+
value: {
|
|
17883
|
+
labelPosition: labelPosition || "right",
|
|
17884
|
+
disabled,
|
|
17885
|
+
shape,
|
|
17886
|
+
value: val2State,
|
|
17887
|
+
check: function(value) {
|
|
17888
|
+
setVal2State(value);
|
|
17889
|
+
},
|
|
17890
|
+
uncheck: function() {
|
|
17891
|
+
setVal2State("");
|
|
17892
|
+
}
|
|
17893
|
+
}
|
|
17894
|
+
}, /* @__PURE__ */ React.createElement("div", _object_spread({
|
|
17895
|
+
className: cls
|
|
17896
|
+
}, rest), (options2 === null || options2 === void 0 ? void 0 : options2.length) ? renderOptionsChildren() : children));
|
|
17897
|
+
});
|
|
17898
|
+
RadioGroup.displayName = "NutRadioGroup";
|
|
17899
|
+
var InnerRadio = Radio;
|
|
17900
|
+
InnerRadio.Group = RadioGroup;
|
|
17891
17901
|
var defaultProps$P = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
17892
17902
|
range: false,
|
|
17893
17903
|
min: 0,
|
|
@@ -24507,6 +24517,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24507
24517
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
24508
24518
|
className: "".concat(classPrefix2, "-lite-active")
|
|
24509
24519
|
}, currentPage), /* @__PURE__ */ React.createElement("div", {
|
|
24520
|
+
className: "".concat(classPrefix2, "-lite-spliterator")
|
|
24521
|
+
}, "/"), /* @__PURE__ */ React.createElement("div", {
|
|
24510
24522
|
className: "".concat(classPrefix2, "-lite-default")
|
|
24511
24523
|
}, pageCount)));
|
|
24512
24524
|
};
|
|
@@ -26469,7 +26481,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
26469
26481
|
exports2.Price = Price;
|
|
26470
26482
|
exports2.Progress = Progress;
|
|
26471
26483
|
exports2.PullToRefresh = PullToRefresh;
|
|
26472
|
-
exports2.Radio =
|
|
26484
|
+
exports2.Radio = InnerRadio;
|
|
26473
26485
|
exports2.RadioGroup = RadioGroup;
|
|
26474
26486
|
exports2.Range = Range;
|
|
26475
26487
|
exports2.Rate = Rate;
|