@nutui/nutui-react-taro 3.0.0-beta.1 → 3.0.0-beta.2
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/button/button.js +1 -1
- package/dist/cjs/packages/input/input.js +3 -5
- package/dist/cjs/packages/input/style/input.scss +4 -0
- package/dist/cjs/packages/input/style/style.css +4 -0
- package/dist/cjs/packages/overlay/style/style.harmony.css +5 -3
- package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +1 -1
- package/dist/cjs/packages/tag/tag.d.ts +1 -1
- package/dist/cjs/packages/tag/tag.js +5 -11
- package/dist/cjs/packages/toast/style/style.css +56 -30
- package/dist/cjs/packages/toast/style/style.harmony.css +51 -62
- package/dist/cjs/packages/toast/style/toast.scss +65 -49
- package/dist/cjs/packages/toast/toast.d.ts +7 -7
- package/dist/cjs/packages/toast/toast.js +24 -19
- package/dist/cjs/packages/trendarrow/style/style.css +2 -1
- package/dist/cjs/packages/trendarrow/style/style.harmony.css +3 -2
- package/dist/cjs/packages/trendarrow/style/trendarrow.scss +2 -1
- package/dist/cjs/packages/trendarrow/trendarrow.js +6 -4
- package/dist/es/packages/button/button.js +1 -1
- package/dist/es/packages/input/input.js +3 -5
- package/dist/es/packages/input/style/input.scss +4 -0
- package/dist/es/packages/input/style/style.css +4 -0
- package/dist/es/packages/overlay/style/style.harmony.css +5 -3
- package/dist/es/packages/pulltorefresh/pulltorefresh.js +2 -2
- package/dist/es/packages/tag/tag.d.ts +1 -1
- package/dist/es/packages/tag/tag.js +6 -14
- package/dist/es/packages/toast/style/style.css +56 -30
- package/dist/es/packages/toast/style/style.harmony.css +51 -62
- package/dist/es/packages/toast/style/toast.scss +65 -49
- package/dist/es/packages/toast/toast.d.ts +15 -71
- package/dist/es/packages/toast/toast.js +25 -20
- package/dist/es/packages/trendarrow/style/style.css +2 -1
- package/dist/es/packages/trendarrow/style/style.harmony.css +3 -2
- package/dist/es/packages/trendarrow/style/trendarrow.scss +2 -1
- package/dist/es/packages/trendarrow/trendarrow.d.ts +11 -55
- package/dist/es/packages/trendarrow/trendarrow.js +6 -4
- package/dist/nutui.react.umd.js +315 -276
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +21 -21
- package/dist/styles/variables-jrkf.scss +21 -27
- package/package.json +2 -2
|
@@ -21,7 +21,6 @@ _export(exports, {
|
|
|
21
21
|
});
|
|
22
22
|
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
23
23
|
var _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
24
|
-
var _define_property = require("@swc/helpers/_/_define_property");
|
|
25
24
|
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
26
25
|
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
27
26
|
var _sliced_to_array = require("@swc/helpers/_/_sliced_to_array");
|
|
@@ -33,21 +32,23 @@ var _index = /*#__PURE__*/ _interop_require_default._(require("../overlay/index"
|
|
|
33
32
|
var _typings = require("../../utils/typings");
|
|
34
33
|
var _usecustomevent = require("../../utils/use-custom-event");
|
|
35
34
|
var _usepropsvalue = require("../../utils/use-props-value");
|
|
35
|
+
var _index1 = require("../configprovider/index");
|
|
36
|
+
var _platformtaro = require("../../utils/platform-taro");
|
|
36
37
|
var _mergeprops = require("../../utils/merge-props");
|
|
37
38
|
var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
|
|
38
39
|
id: '',
|
|
40
|
+
duration: 2,
|
|
41
|
+
position: 'center',
|
|
42
|
+
title: '',
|
|
43
|
+
size: 'base',
|
|
39
44
|
icon: null,
|
|
40
45
|
iconSize: '20',
|
|
41
46
|
content: '',
|
|
42
47
|
msg: '',
|
|
43
|
-
duration: 2,
|
|
44
|
-
position: 'center',
|
|
45
48
|
type: 'text',
|
|
46
|
-
title: '',
|
|
47
49
|
closeOnOverlayClick: false,
|
|
48
50
|
lockScroll: false,
|
|
49
51
|
contentClassName: '',
|
|
50
|
-
size: 'base',
|
|
51
52
|
visible: false,
|
|
52
53
|
wordBreak: 'break-all',
|
|
53
54
|
onClose: function onClose() {}
|
|
@@ -56,6 +57,7 @@ var classPrefix = 'nut-toast';
|
|
|
56
57
|
var Toast = function Toast(props) {
|
|
57
58
|
var _useParams = (0, _usecustomevent.useParams)((0, _mergeprops.mergeProps)(defaultProps, props)), _useParams_params = _useParams.params, id = _useParams_params.id, position = _useParams_params.position, contentStyle = _useParams_params.contentStyle, icon = _useParams_params.icon, iconSize = _useParams_params.iconSize, content = _useParams_params.content, msg = _useParams_params.msg, duration = _useParams_params.duration, type = _useParams_params.type, title = _useParams_params.title, closeOnOverlayClick = _useParams_params.closeOnOverlayClick, lockScroll = _useParams_params.lockScroll, contentClassName = _useParams_params.contentClassName, visible = _useParams_params.visible, size = _useParams_params.size, className = _useParams_params.className, style = _useParams_params.style, onClose = _useParams_params.onClose, wordBreak = _useParams_params.wordBreak, setParams = _useParams.setParams;
|
|
58
59
|
var timer = (0, _react.useRef)(-1);
|
|
60
|
+
var rtl = (0, _index1.useRtl)();
|
|
59
61
|
var _usePropsValue = (0, _sliced_to_array._)((0, _usepropsvalue.usePropsValue)({
|
|
60
62
|
value: visible,
|
|
61
63
|
defaultValue: undefined,
|
|
@@ -115,10 +117,7 @@ var Toast = function Toast(props) {
|
|
|
115
117
|
}
|
|
116
118
|
};
|
|
117
119
|
var hasIcon = function hasIcon() {
|
|
118
|
-
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
121
|
-
return !!icon;
|
|
120
|
+
return type !== 'text' || !!icon;
|
|
122
121
|
};
|
|
123
122
|
var iconName = function iconName() {
|
|
124
123
|
if (icon) {
|
|
@@ -126,6 +125,7 @@ var Toast = function Toast(props) {
|
|
|
126
125
|
}
|
|
127
126
|
return ({
|
|
128
127
|
success: /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Success, {
|
|
128
|
+
className: "nut-toast-icon",
|
|
129
129
|
color: "#ffffff",
|
|
130
130
|
size: iconSize
|
|
131
131
|
}),
|
|
@@ -143,13 +143,18 @@ var Toast = function Toast(props) {
|
|
|
143
143
|
})
|
|
144
144
|
})[type];
|
|
145
145
|
};
|
|
146
|
-
var classes = (0, _classnames.default)(
|
|
147
|
-
'nut-toast-has-icon': icon
|
|
148
|
-
|
|
146
|
+
var classes = (0, _classnames.default)({
|
|
147
|
+
'nut-toast-has-icon': icon,
|
|
148
|
+
'nut-toast-rtl': rtl
|
|
149
|
+
});
|
|
150
|
+
var styles = (0, _platformtaro.harmony)() ? {
|
|
151
|
+
left: '50%',
|
|
152
|
+
transform: 'translate(-50%, -50%)'
|
|
153
|
+
} : null;
|
|
149
154
|
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, innerVisible ? /*#__PURE__*/ _react.default.createElement(_index.default, {
|
|
150
155
|
visible: innerVisible,
|
|
151
156
|
style: style,
|
|
152
|
-
className: "".concat(classPrefix, "-overlay-default ").concat(className),
|
|
157
|
+
className: "".concat(classPrefix, "-overlay-default-taro ").concat(className),
|
|
153
158
|
closeOnOverlayClick: closeOnOverlayClick,
|
|
154
159
|
lockScroll: lockScroll,
|
|
155
160
|
onClick: function onClick() {
|
|
@@ -159,14 +164,14 @@ var Toast = function Toast(props) {
|
|
|
159
164
|
className: "".concat(classPrefix, " ").concat(classes),
|
|
160
165
|
id: id
|
|
161
166
|
}, /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
162
|
-
className: "".concat(classPrefix, "-inner ").concat(classPrefix, "-").concat(position, " ").concat(contentClassName, " ").concat(wordBreak),
|
|
163
|
-
style: contentStyle
|
|
164
|
-
}, hasIcon() ? /*#__PURE__*/ _react.default.createElement(
|
|
167
|
+
className: "".concat(classPrefix, "-inner ").concat(classPrefix, "-").concat(position, " ").concat(contentClassName, " ").concat(classPrefix, "-inner-").concat(size, " ").concat(classPrefix, "-inner-").concat(wordBreak),
|
|
168
|
+
style: (0, _object_spread._)({}, styles, contentStyle)
|
|
169
|
+
}, hasIcon() ? /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
165
170
|
className: "".concat(classPrefix, "-icon-wrapper")
|
|
166
|
-
}, iconName()) : null, title ? /*#__PURE__*/ _react.default.createElement(_components.
|
|
171
|
+
}, iconName()) : null, title ? /*#__PURE__*/ _react.default.createElement(_components.Text, {
|
|
167
172
|
className: "".concat(classPrefix, "-title")
|
|
168
|
-
}, title) : null, /*#__PURE__*/ _react.default.createElement(
|
|
169
|
-
className: "".concat(classPrefix, "-text")
|
|
173
|
+
}, title) : null, /*#__PURE__*/ _react.default.createElement(_components.Text, {
|
|
174
|
+
className: "".concat(classPrefix, "-text ").concat(content ? '' : "".concat(classPrefix, "-text-empty"))
|
|
170
175
|
}, content || msg)))) : null);
|
|
171
176
|
};
|
|
172
177
|
function show(selector, options) {
|
|
@@ -14,7 +14,9 @@ var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
|
14
14
|
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
|
|
15
15
|
var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
16
16
|
var _iconsreacttaro = require("@nutui/icons-react-taro");
|
|
17
|
+
var _components = require("@tarojs/components");
|
|
17
18
|
var _typings = require("../../utils/typings");
|
|
19
|
+
var _platformtaro = require("../../utils/platform-taro");
|
|
18
20
|
var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
|
|
19
21
|
value: 0,
|
|
20
22
|
digits: 2,
|
|
@@ -23,8 +25,8 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typing
|
|
|
23
25
|
left: false,
|
|
24
26
|
sync: true,
|
|
25
27
|
color: '#333',
|
|
26
|
-
riseColor: 'var(--nutui-brand-6)',
|
|
27
|
-
dropColor: 'var(--nutui-secondary-1)',
|
|
28
|
+
riseColor: (0, _platformtaro.harmony)() ? '#ff0f23' : 'var(--nutui-brand-6)',
|
|
29
|
+
dropColor: (0, _platformtaro.harmony)() ? '#14cc33' : 'var(--nutui-secondary-1)',
|
|
28
30
|
riseIcon: null,
|
|
29
31
|
dropIcon: null
|
|
30
32
|
});
|
|
@@ -82,12 +84,12 @@ var TrendArrow = function TrendArrow(props) {
|
|
|
82
84
|
}();
|
|
83
85
|
var renderContent = function renderContent(left) {
|
|
84
86
|
var classNameSuffix = !left ? 'icon-after' : 'icon-before';
|
|
85
|
-
return /*#__PURE__*/ _react.default.createElement(
|
|
87
|
+
return /*#__PURE__*/ _react.default.createElement(_components.Text, {
|
|
86
88
|
className: "".concat(classPrefix, "-").concat(classNameSuffix, " ").concat(classPrefix, "-value"),
|
|
87
89
|
style: calcStyle
|
|
88
90
|
}, calcRate);
|
|
89
91
|
};
|
|
90
|
-
return /*#__PURE__*/ _react.default.createElement(
|
|
92
|
+
return /*#__PURE__*/ _react.default.createElement(_components.View, (0, _object_spread._)({
|
|
91
93
|
className: "".concat(classPrefix, " ").concat(className),
|
|
92
94
|
style: style
|
|
93
95
|
}, rest), !left && renderContent(!left), Number(value) !== 0 && /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, rateTrend.current ? /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, riseIcon || /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.TriangleUp, {
|
|
@@ -102,7 +102,7 @@ export var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
102
102
|
}
|
|
103
103
|
}), /*#__PURE__*/ React.createElement(View, {
|
|
104
104
|
className: "nut-button-wrap"
|
|
105
|
-
}, loading &&
|
|
105
|
+
}, loading && /*#__PURE__*/ React.createElement(Loading, {
|
|
106
106
|
className: "nut-icon-loading"
|
|
107
107
|
}), !loading && icon ? icon : null, children && /*#__PURE__*/ React.createElement(View, {
|
|
108
108
|
className: "nut-button-children nut-button-".concat(size, "-children nut-button-").concat(type, "-children ").concat(!(props.fill || disabled || loading) ? '' : "nut-button-".concat(type).concat(props.fill ? "-".concat(fill) : '').concat(disabled || loading ? '-disabled' : '')).concat(icon || loading ? " nut-button-text" : '').concat(rightIcon ? " nut-button-text-right" : ''),
|
|
@@ -10,7 +10,6 @@ import { formatNumber } from "./utils";
|
|
|
10
10
|
import { useConfig, useRtl } from "../configprovider/index";
|
|
11
11
|
import { ComponentDefaults } from "../../utils/typings";
|
|
12
12
|
import { usePropsValue } from "../../utils/use-props-value";
|
|
13
|
-
import { harmonyAndRn } from "../../utils/platform-taro";
|
|
14
13
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
15
14
|
type: 'text',
|
|
16
15
|
name: '',
|
|
@@ -169,8 +168,7 @@ export var Input = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
169
168
|
onBlur: handleBlur,
|
|
170
169
|
onFocus: handleFocus,
|
|
171
170
|
onInput: function(e) {
|
|
172
|
-
|
|
173
|
-
handleInput((e.currentTarget || e.detail).value);
|
|
171
|
+
handleInput((e.detail || e.currentTarget).value);
|
|
174
172
|
}
|
|
175
173
|
})), /*#__PURE__*/ React.createElement(View, {
|
|
176
174
|
style: {
|
|
@@ -185,8 +183,8 @@ export var Input = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
185
183
|
onClear === null || onClear === void 0 ? void 0 : onClear('');
|
|
186
184
|
}
|
|
187
185
|
}
|
|
188
|
-
}, clearIcon ||
|
|
186
|
+
}, clearIcon || /*#__PURE__*/ React.createElement(MaskClose, {
|
|
189
187
|
className: "nut-input-clear"
|
|
190
|
-
})
|
|
188
|
+
})));
|
|
191
189
|
});
|
|
192
190
|
Input.displayName = 'NutInput';
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
.nut-overlay {
|
|
2
|
+
/* #ifdef rn */
|
|
2
3
|
position: absolute;
|
|
4
|
+
/* #endif */
|
|
5
|
+
/* #ifndef rn */
|
|
6
|
+
position: fixed;
|
|
7
|
+
/* #endif */
|
|
3
8
|
top: 0;
|
|
4
9
|
left: 0;
|
|
5
10
|
bottom: 0;
|
|
@@ -19,9 +24,6 @@
|
|
|
19
24
|
.nut-overflow-hidden {
|
|
20
25
|
overflow: hidden !important;
|
|
21
26
|
}
|
|
22
|
-
.nut-overflow-hidden .taro_page {
|
|
23
|
-
overflow: hidden !important;
|
|
24
|
-
}
|
|
25
27
|
|
|
26
28
|
@keyframes nut-fade-in {
|
|
27
29
|
0% {
|
|
@@ -15,7 +15,7 @@ import { rubberbandIfOutOfBounds } from "../../utils/rubberband";
|
|
|
15
15
|
import { sleep } from "../../utils/sleep";
|
|
16
16
|
import { ComponentDefaults } from "../../utils/typings";
|
|
17
17
|
import pxTransform from "../../utils/px-transform";
|
|
18
|
-
import {
|
|
18
|
+
import { rn } from "../../utils/platform-taro";
|
|
19
19
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
20
20
|
type: 'default',
|
|
21
21
|
pullingText: '',
|
|
@@ -50,7 +50,7 @@ export var PullToRefresh = function(p) {
|
|
|
50
50
|
var _useState1 = _sliced_to_array(useState(0), 2), height = _useState1[0], setHeight = _useState1[1];
|
|
51
51
|
var timer = useRef();
|
|
52
52
|
var renderIcons = function(status) {
|
|
53
|
-
return /*#__PURE__*/ React.createElement(React.Fragment, null, (status === 'pulling' || status === 'complete') &&
|
|
53
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, (status === 'pulling' || status === 'complete') && /*#__PURE__*/ React.createElement(Loading, null), (status === 'canRelease' || status === 'refreshing') && /*#__PURE__*/ React.createElement(More, null));
|
|
54
54
|
};
|
|
55
55
|
var renderStatusIcon = function() {
|
|
56
56
|
if (props.renderIcon) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
1
|
import type { MouseEvent } from 'react';
|
|
2
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
3
3
|
import { ITouchEvent } from '@tarojs/components';
|
|
4
4
|
import { BasicComponent } from "../../utils/typings";
|
|
5
5
|
export type TagType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
@@ -3,8 +3,8 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
|
3
3
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
4
4
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
5
5
|
import React, { useState } from "react";
|
|
6
|
-
import { View
|
|
7
|
-
|
|
6
|
+
import { View } from "@tarojs/components";
|
|
7
|
+
import { Close } from "@nutui/icons-react-taro";
|
|
8
8
|
import classNames from "classnames";
|
|
9
9
|
import { ComponentDefaults } from "../../utils/typings";
|
|
10
10
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
@@ -65,21 +65,13 @@ export var Tag = function(props) {
|
|
|
65
65
|
setVisible(false);
|
|
66
66
|
onClose && onClose(e);
|
|
67
67
|
}
|
|
68
|
-
}, closeIcon) :
|
|
69
|
-
|
|
70
|
-
// size={8}
|
|
71
|
-
// onClick={(e) => {
|
|
72
|
-
// setVisible(false)
|
|
73
|
-
// onClose && onClose(e)
|
|
74
|
-
// }}
|
|
75
|
-
// />
|
|
76
|
-
/*#__PURE__*/ React.createElement(Text, {
|
|
68
|
+
}, closeIcon) : /*#__PURE__*/ React.createElement(Close, {
|
|
69
|
+
size: 8,
|
|
77
70
|
onClick: function(e) {
|
|
78
71
|
setVisible(false);
|
|
79
72
|
onClose && onClose(e);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
}, "X")) : /*#__PURE__*/ React.createElement(View, {
|
|
73
|
+
}
|
|
74
|
+
})) : /*#__PURE__*/ React.createElement(View, {
|
|
83
75
|
className: classes,
|
|
84
76
|
style: _object_spread({}, style, getStyle()),
|
|
85
77
|
onClick: function(e) {
|
|
@@ -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 {
|
|
@@ -6,42 +6,40 @@
|
|
|
6
6
|
-webkit-transform: rotate(360deg);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
.nut-toast-overlay-default {
|
|
11
|
-
background: rgba(0, 0, 0, 0);
|
|
12
|
-
z-index: 1300;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
9
|
.nut-toast {
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
/* #ifdef rn */
|
|
11
|
+
position: absolute;
|
|
12
|
+
/* #endif */
|
|
13
|
+
/* #ifndef rn */
|
|
18
14
|
position: fixed;
|
|
19
|
-
|
|
15
|
+
/* #endif */
|
|
20
16
|
left: 0;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
top: 0;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: row;
|
|
24
20
|
justify-content: center;
|
|
21
|
+
align-items: center;
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
pointer-events: none;
|
|
25
25
|
z-index: 1300;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
font-size: 16px;
|
|
27
|
+
.nut-toast-overlay-default-taro {
|
|
28
|
+
/* #ifdef harmony */
|
|
29
|
+
background-color: rgba(0, 0, 0, 0);
|
|
30
|
+
z-index: 1300;
|
|
31
|
+
/* #endif */
|
|
32
|
+
/* #ifndef harmony */
|
|
33
|
+
/* #endif */
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
.nut-toast-inner {
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 50%;
|
|
38
|
+
transform: translate(0, -50%);
|
|
38
39
|
display: flex;
|
|
39
40
|
flex-direction: column;
|
|
40
41
|
justify-content: center;
|
|
41
42
|
align-items: center;
|
|
42
|
-
position: absolute;
|
|
43
|
-
left: 50%;
|
|
44
|
-
top: 50%;
|
|
45
43
|
min-width: 30%;
|
|
46
44
|
max-width: 95.7%;
|
|
47
45
|
font-size: 14px;
|
|
@@ -51,79 +49,72 @@
|
|
|
51
49
|
background: rgba(0, 0, 0, 0.7);
|
|
52
50
|
border-radius: 16px;
|
|
53
51
|
color: #ffffff;
|
|
54
|
-
transform: translate(-50%, -50%);
|
|
55
52
|
}
|
|
56
|
-
|
|
57
|
-
.nut-toast-inner.normal {
|
|
53
|
+
.nut-toast-inner-normal {
|
|
58
54
|
word-break: normal;
|
|
59
55
|
word-wrap: normal;
|
|
60
56
|
}
|
|
61
|
-
|
|
62
|
-
.nut-toast-inner.break-word {
|
|
57
|
+
.nut-toast-inner-break-word {
|
|
63
58
|
word-break: normal;
|
|
64
59
|
word-wrap: break-word;
|
|
65
60
|
}
|
|
66
|
-
|
|
61
|
+
.nut-toast-inner-small {
|
|
62
|
+
font-size: 12px;
|
|
63
|
+
}
|
|
64
|
+
.nut-toast-inner-large {
|
|
65
|
+
font-size: 16px;
|
|
66
|
+
}
|
|
67
67
|
.nut-toast-center {
|
|
68
|
-
|
|
68
|
+
/* #ifdef rn */
|
|
69
|
+
top: 38%;
|
|
70
|
+
/* #endif */
|
|
71
|
+
/* #ifndef rn */
|
|
72
|
+
top: 48%;
|
|
73
|
+
/* #endif */
|
|
69
74
|
}
|
|
70
|
-
|
|
71
75
|
.nut-toast-bottom {
|
|
72
76
|
top: 80%;
|
|
73
77
|
}
|
|
74
|
-
|
|
75
78
|
.nut-toast-top {
|
|
76
79
|
top: 20%;
|
|
77
80
|
}
|
|
78
|
-
|
|
79
81
|
.nut-toast-text {
|
|
80
|
-
display: flex;
|
|
81
82
|
color: #ffffff;
|
|
82
83
|
text-align: center;
|
|
83
84
|
}
|
|
84
|
-
|
|
85
|
-
.nut-toast-text:empty {
|
|
85
|
+
.nut-toast-text-empty {
|
|
86
86
|
margin-bottom: -8px;
|
|
87
87
|
}
|
|
88
|
-
|
|
89
88
|
.nut-toast-title {
|
|
90
|
-
display: flex;
|
|
91
89
|
color: #ffffff;
|
|
92
90
|
font-size: 16px;
|
|
93
91
|
font-weight: 500;
|
|
92
|
+
text-align: center;
|
|
94
93
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
.nut-toast-icon {
|
|
95
|
+
width: 24px;
|
|
96
|
+
height: 24px;
|
|
97
|
+
color: #ffffff;
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
.nut-toast-has-icon .nut-toast-icon-wrapper {
|
|
99
|
+
.nut-toast-icon-wrapper {
|
|
101
100
|
width: 100%;
|
|
102
101
|
display: flex;
|
|
103
102
|
align-items: center;
|
|
104
103
|
justify-content: center;
|
|
105
104
|
margin-bottom: 8px;
|
|
105
|
+
color: #ffffff;
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
.nut-toast-has-icon .nut-toast-icon-wrapper .nut-icon {
|
|
107
|
+
.nut-toast-icon-wrapper-icon {
|
|
109
108
|
width: 24px;
|
|
110
109
|
height: 24px;
|
|
111
110
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
flex-direction: column;
|
|
116
|
-
justify-content: center;
|
|
117
|
-
align-items: center;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.nut-toast-loading .nut-toast-icon-wrapper {
|
|
121
|
-
animation: rotation 2s linear infinite;
|
|
111
|
+
.nut-toast-rtl {
|
|
112
|
+
left: auto;
|
|
113
|
+
right: 0;
|
|
122
114
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
height: 24px;
|
|
115
|
+
.nut-toast-rtl-inner {
|
|
116
|
+
left: auto;
|
|
117
|
+
right: 50%;
|
|
127
118
|
}
|
|
128
119
|
|
|
129
120
|
[dir=rtl] .nut-toast,
|
|
@@ -131,12 +122,10 @@
|
|
|
131
122
|
left: auto;
|
|
132
123
|
right: 0;
|
|
133
124
|
}
|
|
134
|
-
|
|
135
125
|
[dir=rtl] .nut-toast-inner,
|
|
136
126
|
.nut-rtl .nut-toast-inner {
|
|
137
127
|
left: auto;
|
|
138
128
|
right: 50%;
|
|
139
|
-
transform: translate(50%, -50%);
|
|
140
129
|
}
|
|
141
130
|
|
|
142
131
|
.toast-fade-enter-active {
|