@nutui/nutui-react 3.0.0-beta.1 → 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/input/style/input.scss +4 -0
- package/dist/cjs/packages/input/style/style.css +4 -0
- 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/cjs/packages/toast/Notification.js +13 -24
- package/dist/cjs/packages/toast/style/style.css +56 -30
- package/dist/cjs/packages/toast/style/toast.scss +65 -49
- package/dist/cjs/packages/toast/toast.js +2 -2
- package/dist/cjs/packages/trendarrow/style/style.css +2 -1
- package/dist/cjs/packages/trendarrow/style/trendarrow.scss +2 -1
- 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/input/style/input.scss +4 -0
- package/dist/es/packages/input/style/style.css +4 -0
- 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/toast/Notification.js +14 -25
- package/dist/es/packages/toast/style/style.css +56 -30
- package/dist/es/packages/toast/style/toast.scss +65 -49
- package/dist/es/packages/toast/toast.d.ts +12 -60
- package/dist/es/packages/toast/toast.js +2 -2
- package/dist/es/packages/trendarrow/style/style.css +2 -1
- package/dist/es/packages/trendarrow/style/trendarrow.scss +2 -1
- package/dist/es/packages/trendarrow/trendarrow.d.ts +11 -55
- package/dist/es/packages/video/video.d.ts +5 -25
- package/dist/nutui.react.umd.js +150 -125
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +35 -35
- package/dist/styles/variables-jrkf.scss +21 -27
- 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
|
@@ -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;
|
|
@@ -92,25 +92,14 @@ var Notification = /*#__PURE__*/ function(_superClass) {
|
|
|
92
92
|
value: function renderIcon() {
|
|
93
93
|
var icon = this.props.icon;
|
|
94
94
|
if (typeof icon === 'string') {
|
|
95
|
-
var iconNode =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
});
|
|
104
|
-
break;
|
|
105
|
-
case 'fail':
|
|
106
|
-
iconNode = /*#__PURE__*/ _react.createElement(_iconsreact.Failure, null);
|
|
107
|
-
break;
|
|
108
|
-
case 'warn':
|
|
109
|
-
iconNode = /*#__PURE__*/ _react.createElement(_iconsreact.Tips, null);
|
|
110
|
-
break;
|
|
111
|
-
default:
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
95
|
+
var iconNode = {
|
|
96
|
+
success: /*#__PURE__*/ _react.createElement(_iconsreact.Success, null),
|
|
97
|
+
fail: /*#__PURE__*/ _react.createElement(_iconsreact.Failure, null),
|
|
98
|
+
warn: /*#__PURE__*/ _react.createElement(_iconsreact.Tips, null),
|
|
99
|
+
loading: /*#__PURE__*/ _react.createElement(_iconsreact.Loading, {
|
|
100
|
+
className: "nut-icon-loading"
|
|
101
|
+
})
|
|
102
|
+
}[icon];
|
|
114
103
|
return /*#__PURE__*/ _react.createElement("p", {
|
|
115
104
|
className: "".concat(classPrefix, "-icon-wrapper")
|
|
116
105
|
}, iconNode);
|
|
@@ -136,9 +125,9 @@ var Notification = /*#__PURE__*/ function(_superClass) {
|
|
|
136
125
|
var _this = this;
|
|
137
126
|
var _this_props = this.props, id = _this_props.id, icon = _this_props.icon, title = _this_props.title, content = _this_props.content, position = _this_props.position, size = _this_props.size, closeOnOverlayClick = _this_props.closeOnOverlayClick, lockScroll = _this_props.lockScroll, style = _this_props.style, className = _this_props.className, contentClassName = _this_props.contentClassName, contentStyle = _this_props.contentStyle, wordBreak = _this_props.wordBreak;
|
|
138
127
|
var show = this.state.show;
|
|
139
|
-
var classes = (0, _classnames.default)(
|
|
128
|
+
var classes = (0, _classnames.default)({
|
|
140
129
|
'nut-toast-has-icon': icon
|
|
141
|
-
}
|
|
130
|
+
});
|
|
142
131
|
return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(_index.default, {
|
|
143
132
|
visible: show,
|
|
144
133
|
style: style,
|
|
@@ -152,12 +141,12 @@ var Notification = /*#__PURE__*/ function(_superClass) {
|
|
|
152
141
|
className: "".concat(classPrefix, " ").concat(classes),
|
|
153
142
|
id: "toast-".concat(id)
|
|
154
143
|
}, /*#__PURE__*/ _react.createElement("div", {
|
|
155
|
-
className: "".concat(classPrefix, "-inner ").concat(classPrefix, "-").concat(position, " ").concat(contentClassName, " ").concat(wordBreak),
|
|
156
|
-
style: contentStyle
|
|
144
|
+
className: "".concat(classPrefix, "-inner ").concat(classPrefix, "-").concat(position, " ").concat(contentClassName, " ").concat(classPrefix, "-inner-").concat(size, " ").concat(classPrefix, "-inner-").concat(wordBreak),
|
|
145
|
+
style: (0, _object_spread._)({}, contentStyle)
|
|
157
146
|
}, this.renderIcon(), title ? /*#__PURE__*/ _react.createElement("div", {
|
|
158
147
|
className: "".concat(classPrefix, "-title")
|
|
159
148
|
}, title) : null, /*#__PURE__*/ _react.createElement("span", {
|
|
160
|
-
className: "".concat(classPrefix, "-text")
|
|
149
|
+
className: "".concat(classPrefix, "-text ").concat(content ? '' : "".concat(classPrefix, "-text-empty"))
|
|
161
150
|
}, content)))));
|
|
162
151
|
}
|
|
163
152
|
}
|
|
@@ -7,12 +7,20 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
.nut-toast {
|
|
10
|
+
/* #ifdef rn */
|
|
11
|
+
position: absolute;
|
|
12
|
+
/* #endif */
|
|
13
|
+
/* #ifndef rn */
|
|
10
14
|
position: fixed;
|
|
15
|
+
/* #endif */
|
|
11
16
|
left: 0;
|
|
12
17
|
top: 0;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
align-items: center;
|
|
13
22
|
width: 100%;
|
|
14
23
|
height: 100%;
|
|
15
|
-
text-align: center;
|
|
16
24
|
pointer-events: none;
|
|
17
25
|
z-index: 1300;
|
|
18
26
|
}
|
|
@@ -20,18 +28,24 @@
|
|
|
20
28
|
--nutui-overlay-bg-color: rgba(0, 0, 0, 0);
|
|
21
29
|
--nutui-overlay-zIndex: 1300;
|
|
22
30
|
}
|
|
23
|
-
.nut-toast-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
.nut-toast-overlay-default-taro {
|
|
32
|
+
/* #ifdef harmony */
|
|
33
|
+
background-color: rgba(0, 0, 0, 0);
|
|
34
|
+
z-index: 1300;
|
|
35
|
+
/* #endif */
|
|
36
|
+
/* #ifndef harmony */
|
|
37
|
+
--nutui-overlay-bg-color: rgba(0, 0, 0, 0);
|
|
38
|
+
--nutui-overlay-zIndex: 1300;
|
|
39
|
+
/* #endif */
|
|
28
40
|
}
|
|
29
41
|
.nut-toast-inner {
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
42
|
position: absolute;
|
|
33
|
-
left: 50%;
|
|
34
43
|
top: var(--nutui-toast-inner-top, 50%);
|
|
44
|
+
transform: translate(0, -50%);
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
align-items: center;
|
|
35
49
|
min-width: 30%;
|
|
36
50
|
max-width: 95.7%;
|
|
37
51
|
font-size: var(--nutui-toast-text-font-size, 14px);
|
|
@@ -41,18 +55,28 @@
|
|
|
41
55
|
background: var(--nutui-toast-inner-bg-color, var(--nutui-color-mask, rgba(0, 0, 0, 0.7)));
|
|
42
56
|
border-radius: var(--nutui-toast-inner-border-radius, 16px);
|
|
43
57
|
color: var(--nutui-toast-font-color, #ffffff);
|
|
44
|
-
transform: translate(-50%, -50%);
|
|
45
58
|
}
|
|
46
|
-
.nut-toast-inner
|
|
59
|
+
.nut-toast-inner-normal {
|
|
47
60
|
word-break: normal;
|
|
48
61
|
word-wrap: normal;
|
|
49
62
|
}
|
|
50
|
-
.nut-toast-inner
|
|
63
|
+
.nut-toast-inner-break-word {
|
|
51
64
|
word-break: normal;
|
|
52
65
|
word-wrap: break-word;
|
|
53
66
|
}
|
|
67
|
+
.nut-toast-inner-small {
|
|
68
|
+
font-size: var(--nutui-font-size-s, 12px);
|
|
69
|
+
}
|
|
70
|
+
.nut-toast-inner-large {
|
|
71
|
+
font-size: var(--nutui-font-size-l, 16px);
|
|
72
|
+
}
|
|
54
73
|
.nut-toast-center {
|
|
55
|
-
|
|
74
|
+
/* #ifdef rn */
|
|
75
|
+
top: var(--nutui-toast-inner-top, 38%);
|
|
76
|
+
/* #endif */
|
|
77
|
+
/* #ifndef rn */
|
|
78
|
+
top: var(--nutui-toast-inner-top, 48%);
|
|
79
|
+
/* #endif */
|
|
56
80
|
}
|
|
57
81
|
.nut-toast-bottom {
|
|
58
82
|
top: var(--nutui-toast-inner-top, 80%);
|
|
@@ -60,40 +84,43 @@
|
|
|
60
84
|
.nut-toast-top {
|
|
61
85
|
top: var(--nutui-toast-inner-top, 20%);
|
|
62
86
|
}
|
|
63
|
-
.nut-toast-text
|
|
87
|
+
.nut-toast-text {
|
|
88
|
+
color: #ffffff;
|
|
89
|
+
text-align: var(--nutui-toast-inner-text-align, center);
|
|
90
|
+
}
|
|
91
|
+
.nut-toast-text-empty {
|
|
64
92
|
margin-bottom: -8px;
|
|
65
93
|
}
|
|
66
94
|
.nut-toast-title {
|
|
67
95
|
color: #ffffff;
|
|
68
96
|
font-size: var(--nutui-toast-title-font-size, 16px);
|
|
69
97
|
font-weight: 500;
|
|
98
|
+
text-align: var(--nutui-toast-inner-text-align, center);
|
|
70
99
|
}
|
|
71
|
-
.nut-toast-
|
|
72
|
-
|
|
100
|
+
.nut-toast-icon {
|
|
101
|
+
width: 24px;
|
|
102
|
+
height: 24px;
|
|
103
|
+
color: #ffffff;
|
|
73
104
|
}
|
|
74
|
-
.nut-toast-
|
|
105
|
+
.nut-toast-icon-wrapper {
|
|
75
106
|
width: 100%;
|
|
76
107
|
display: flex;
|
|
77
108
|
align-items: center;
|
|
78
109
|
justify-content: center;
|
|
79
110
|
margin-bottom: 8px;
|
|
111
|
+
color: #ffffff;
|
|
80
112
|
}
|
|
81
|
-
.nut-toast-
|
|
113
|
+
.nut-toast-icon-wrapper-icon {
|
|
82
114
|
width: 24px;
|
|
83
115
|
height: 24px;
|
|
84
116
|
}
|
|
85
|
-
.nut-toast-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
justify-content: center;
|
|
89
|
-
align-items: center;
|
|
90
|
-
}
|
|
91
|
-
.nut-toast-loading .nut-toast-icon-wrapper {
|
|
92
|
-
animation: rotation 2s linear infinite;
|
|
117
|
+
.nut-toast-rtl {
|
|
118
|
+
left: auto;
|
|
119
|
+
right: 0;
|
|
93
120
|
}
|
|
94
|
-
.nut-toast-
|
|
95
|
-
|
|
96
|
-
|
|
121
|
+
.nut-toast-rtl-inner {
|
|
122
|
+
left: auto;
|
|
123
|
+
right: 50%;
|
|
97
124
|
}
|
|
98
125
|
|
|
99
126
|
[dir=rtl] .nut-toast,
|
|
@@ -105,7 +132,6 @@
|
|
|
105
132
|
.nut-rtl .nut-toast-inner {
|
|
106
133
|
left: auto;
|
|
107
134
|
right: 50%;
|
|
108
|
-
transform: translate(50%, -50%);
|
|
109
135
|
}
|
|
110
136
|
|
|
111
137
|
.toast-fade-enter-active {
|
|
@@ -9,12 +9,20 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.nut-toast {
|
|
12
|
+
/* #ifdef rn */
|
|
13
|
+
position: absolute;
|
|
14
|
+
/* #endif */
|
|
15
|
+
/* #ifndef rn */
|
|
12
16
|
position: fixed;
|
|
17
|
+
/* #endif */
|
|
13
18
|
left: 0;
|
|
14
19
|
top: 0;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: row;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
15
24
|
width: 100%;
|
|
16
25
|
height: 100%;
|
|
17
|
-
text-align: center;
|
|
18
26
|
pointer-events: none;
|
|
19
27
|
z-index: 1300;
|
|
20
28
|
|
|
@@ -23,24 +31,25 @@
|
|
|
23
31
|
--nutui-overlay-zIndex: 1300;
|
|
24
32
|
}
|
|
25
33
|
|
|
26
|
-
&-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
34
|
+
&-overlay-default-taro {
|
|
35
|
+
/* #ifdef harmony */
|
|
36
|
+
background-color: rgba(0, 0, 0, 0);
|
|
37
|
+
z-index: 1300;
|
|
38
|
+
/* #endif */
|
|
39
|
+
/* #ifndef harmony */
|
|
40
|
+
--nutui-overlay-bg-color: rgba(0, 0, 0, 0);
|
|
41
|
+
--nutui-overlay-zIndex: 1300;
|
|
42
|
+
/* #endif */
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
&-inner {
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: column;
|
|
41
46
|
position: absolute;
|
|
42
|
-
left: 50%;
|
|
43
47
|
top: $toast-inner-top;
|
|
48
|
+
transform: translate(-0, -50%);
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
44
53
|
min-width: 30%;
|
|
45
54
|
max-width: 95.7%;
|
|
46
55
|
font-size: $toast-text-font-size;
|
|
@@ -50,21 +59,33 @@
|
|
|
50
59
|
background: $toast-inner-bg-color;
|
|
51
60
|
border-radius: $toast-inner-border-radius;
|
|
52
61
|
color: $toast-font-color;
|
|
53
|
-
transform: translate(-50%, -50%);
|
|
54
62
|
|
|
55
|
-
|
|
63
|
+
&-normal {
|
|
56
64
|
word-break: normal;
|
|
57
65
|
word-wrap: normal;
|
|
58
66
|
}
|
|
59
67
|
|
|
60
|
-
|
|
68
|
+
&-break-word {
|
|
61
69
|
word-break: normal;
|
|
62
70
|
word-wrap: break-word;
|
|
63
71
|
}
|
|
72
|
+
|
|
73
|
+
&-small {
|
|
74
|
+
font-size: $font-size-s;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&-large {
|
|
78
|
+
font-size: $font-size-l;
|
|
79
|
+
}
|
|
64
80
|
}
|
|
65
81
|
|
|
66
82
|
&-center {
|
|
67
|
-
|
|
83
|
+
/* #ifdef rn */
|
|
84
|
+
top: var(--nutui-toast-inner-top, 38%);
|
|
85
|
+
/* #endif */
|
|
86
|
+
/* #ifndef rn */
|
|
87
|
+
top: var(--nutui-toast-inner-top, 48%);
|
|
88
|
+
/* #endif */
|
|
68
89
|
}
|
|
69
90
|
|
|
70
91
|
&-bottom {
|
|
@@ -76,7 +97,9 @@
|
|
|
76
97
|
}
|
|
77
98
|
|
|
78
99
|
&-text {
|
|
79
|
-
|
|
100
|
+
color: #ffffff;
|
|
101
|
+
text-align: $toast-inner-text-align;
|
|
102
|
+
&-empty {
|
|
80
103
|
margin-bottom: -8px;
|
|
81
104
|
}
|
|
82
105
|
}
|
|
@@ -85,42 +108,36 @@
|
|
|
85
108
|
color: #ffffff;
|
|
86
109
|
font-size: $toast-title-font-size;
|
|
87
110
|
font-weight: 500;
|
|
88
|
-
|
|
89
|
-
&:empty {
|
|
90
|
-
margin-bottom: -8px;
|
|
91
|
-
}
|
|
111
|
+
text-align: $toast-inner-text-align;
|
|
92
112
|
}
|
|
93
113
|
|
|
94
|
-
&-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
align-items: center;
|
|
99
|
-
justify-content: center;
|
|
100
|
-
margin-bottom: 8px;
|
|
101
|
-
|
|
102
|
-
.nut-icon {
|
|
103
|
-
width: 24px;
|
|
104
|
-
height: 24px;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
114
|
+
&-icon {
|
|
115
|
+
width: 24px;
|
|
116
|
+
height: 24px;
|
|
117
|
+
color: #ffffff;
|
|
107
118
|
}
|
|
108
119
|
|
|
109
|
-
&-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
120
|
+
&-icon-wrapper {
|
|
121
|
+
width: 100%;
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
margin-bottom: 8px;
|
|
126
|
+
color: #ffffff;
|
|
127
|
+
|
|
128
|
+
&-icon {
|
|
129
|
+
width: 24px;
|
|
130
|
+
height: 24px;
|
|
115
131
|
}
|
|
132
|
+
}
|
|
116
133
|
|
|
117
|
-
|
|
118
|
-
|
|
134
|
+
&-rtl {
|
|
135
|
+
left: auto;
|
|
136
|
+
right: 0;
|
|
119
137
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
138
|
+
&-inner {
|
|
139
|
+
left: auto;
|
|
140
|
+
right: 50%;
|
|
124
141
|
}
|
|
125
142
|
}
|
|
126
143
|
}
|
|
@@ -133,7 +150,6 @@
|
|
|
133
150
|
&-inner {
|
|
134
151
|
left: auto;
|
|
135
152
|
right: 50%;
|
|
136
|
-
transform: translate(50%, -50%);
|
|
137
153
|
}
|
|
138
154
|
}
|
|
139
155
|
|
|
@@ -23,11 +23,11 @@ var options = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.Com
|
|
|
23
23
|
title: '',
|
|
24
24
|
size: 'base',
|
|
25
25
|
icon: null,
|
|
26
|
-
onClose: function onClose() {},
|
|
27
26
|
closeOnOverlayClick: false,
|
|
28
27
|
lockScroll: false,
|
|
29
28
|
contentClassName: '',
|
|
30
|
-
wordBreak: 'break-all'
|
|
29
|
+
wordBreak: 'break-all',
|
|
30
|
+
onClose: function onClose() {}
|
|
31
31
|
});
|
|
32
32
|
function getInstance(props, callback) {
|
|
33
33
|
if (messageInstance) {
|