@nutui/nutui-react-taro 3.0.4 → 3.0.6
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 +48 -0
- package/dist/cjs/packages/badge/badge.js +4 -3
- package/dist/cjs/packages/badge/style/badge.scss +7 -8
- package/dist/cjs/packages/badge/style/style.css +13 -15
- package/dist/cjs/packages/badge/style/style.harmony.css +7 -9
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/datepicker/style/style.css +3 -1
- package/dist/cjs/packages/datepickerview/style/style.css +3 -1
- package/dist/cjs/packages/empty/style/index.js +1 -0
- package/dist/cjs/packages/empty/style/style.css +389 -0
- package/dist/cjs/packages/fixednav/fixednav.js +3 -3
- package/dist/cjs/packages/fixednav/style/fixednav.scss +43 -39
- package/dist/cjs/packages/fixednav/style/style.css +56 -51
- package/dist/cjs/packages/fixednav/style/style.harmony.css +43 -36
- package/dist/cjs/packages/imagepreview/imagepreview.js +58 -91
- package/dist/cjs/packages/imagepreview/style/imagepreview.scss +2 -1
- package/dist/cjs/packages/imagepreview/style/style.css +2 -1
- package/dist/cjs/packages/imagepreview/style/style.harmony.css +2 -1
- package/dist/cjs/packages/indicator/indicator.js +1 -1
- package/dist/cjs/packages/inputnumber/inputnumber.js +2 -2
- package/dist/cjs/packages/lottie/index.js +5 -5
- package/dist/cjs/packages/lottie/{mp.js → lottiemp.js} +1 -1
- package/dist/cjs/packages/notify/notify.js +44 -13
- package/dist/cjs/packages/notify/style/notify.scss +39 -36
- package/dist/cjs/packages/notify/style/style.css +36 -31
- package/dist/cjs/packages/notify/style/style.harmony.css +36 -31
- package/dist/cjs/packages/nutui.react.d.ts +1 -0
- package/dist/cjs/packages/nutui.react.js +1 -0
- package/dist/cjs/packages/picker/style/style.css +3 -1
- package/dist/cjs/packages/pickerview/pickerroller.js +81 -11
- package/dist/cjs/packages/pickerview/style/pickerview.scss +3 -1
- package/dist/cjs/packages/pickerview/style/style.css +3 -1
- package/dist/cjs/packages/pickerview/style/style.harmony.css +3 -0
- package/dist/cjs/packages/resultpage/style/index.js +1 -0
- package/dist/cjs/packages/resultpage/style/style.css +389 -0
- package/dist/cjs/packages/searchbar/searchbar.js +8 -2
- package/dist/cjs/packages/skeleton/skeleton.js +63 -52
- package/dist/cjs/packages/skeleton/style/index.js +0 -1
- package/dist/cjs/packages/skeleton/style/skeleton.scss +40 -46
- package/dist/cjs/packages/skeleton/style/style.css +32 -175
- package/dist/cjs/packages/skeleton/style/style.harmony.css +32 -42
- package/dist/cjs/packages/switch/style/style.css +5 -0
- package/dist/cjs/packages/switch/style/style.harmony.css +5 -0
- package/dist/cjs/packages/switch/style/switch.scss +5 -0
- package/dist/cjs/packages/switch/switch.js +22 -11
- package/dist/cjs/packages/tabbar/style/style.css +58 -54
- package/dist/cjs/packages/tabbar/style/style.harmony.css +24 -18
- package/dist/cjs/packages/tabbar/style/tabbar.scss +28 -19
- package/dist/cjs/packages/tabbar/tabbar.js +28 -10
- package/dist/cjs/packages/tabbaritem/style/style.css +34 -36
- package/dist/cjs/packages/tabbaritem/style/style.harmony.css +21 -21
- package/dist/cjs/packages/tabbaritem/style/tabbaritem.scss +32 -29
- package/dist/cjs/packages/tabbaritem/tabbaritem.js +38 -14
- package/dist/cjs/types/spec/badge/base.d.ts +1 -0
- package/dist/cjs/types/spec/indicator/base.d.ts +1 -1
- package/dist/cjs/types/spec/notify/base.d.ts +7 -2
- package/dist/cjs/types/spec/searchbar/taro.d.ts +10 -7
- package/dist/cjs/types/spec/skeleton/base.d.ts +7 -5
- package/dist/cjs/types/spec/switch/base.d.ts +3 -2
- package/dist/cjs/types/spec/switch/h5.d.ts +1 -1
- package/dist/cjs/types/spec/switch/taro.d.ts +1 -4
- package/dist/cjs/types/spec/tabbar/base.d.ts +7 -4
- package/dist/es/packages/badge/badge.js +4 -3
- package/dist/es/packages/badge/style/badge.scss +7 -8
- package/dist/es/packages/badge/style/style.css +13 -15
- package/dist/es/packages/badge/style/style.harmony.css +7 -9
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/datepicker/style/style.css +3 -1
- package/dist/es/packages/datepickerview/style/style.css +3 -1
- package/dist/es/packages/empty/style/index.js +1 -0
- package/dist/es/packages/empty/style/style.css +389 -0
- package/dist/es/packages/fixednav/fixednav.js +4 -4
- package/dist/es/packages/fixednav/style/fixednav.scss +43 -39
- package/dist/es/packages/fixednav/style/style.css +56 -51
- package/dist/es/packages/fixednav/style/style.harmony.css +43 -36
- package/dist/es/packages/imagepreview/imagepreview.js +58 -91
- package/dist/es/packages/imagepreview/style/imagepreview.scss +2 -1
- package/dist/es/packages/imagepreview/style/style.css +2 -1
- package/dist/es/packages/imagepreview/style/style.harmony.css +2 -1
- package/dist/es/packages/indicator/indicator.js +1 -1
- package/dist/es/packages/inputnumber/inputnumber.js +2 -2
- package/dist/es/packages/lottie/index.js +3 -3
- package/dist/es/packages/lottie/{mp.js → lottiemp.js} +1 -1
- package/dist/es/packages/notify/notify.js +45 -14
- package/dist/es/packages/notify/style/notify.scss +39 -36
- package/dist/es/packages/notify/style/style.css +36 -31
- package/dist/es/packages/notify/style/style.harmony.css +36 -31
- package/dist/es/packages/picker/style/style.css +3 -1
- package/dist/es/packages/pickerview/pickerroller.js +80 -11
- package/dist/es/packages/pickerview/style/pickerview.scss +3 -1
- package/dist/es/packages/pickerview/style/style.css +3 -1
- package/dist/es/packages/pickerview/style/style.harmony.css +3 -0
- package/dist/es/packages/resultpage/style/index.js +1 -0
- package/dist/es/packages/resultpage/style/style.css +389 -0
- package/dist/es/packages/searchbar/searchbar.js +7 -2
- package/dist/es/packages/skeleton/skeleton.js +62 -52
- package/dist/es/packages/skeleton/style/index.js +0 -1
- package/dist/es/packages/skeleton/style/skeleton.scss +40 -46
- package/dist/es/packages/skeleton/style/style.css +32 -175
- package/dist/es/packages/skeleton/style/style.harmony.css +32 -42
- package/dist/es/packages/switch/style/style.css +5 -0
- package/dist/es/packages/switch/style/style.harmony.css +5 -0
- package/dist/es/packages/switch/style/switch.scss +5 -0
- package/dist/es/packages/switch/switch.js +21 -11
- package/dist/es/packages/tabbar/style/style.css +58 -54
- package/dist/es/packages/tabbar/style/style.harmony.css +24 -18
- package/dist/es/packages/tabbar/style/tabbar.scss +28 -19
- package/dist/es/packages/tabbar/tabbar.js +27 -10
- package/dist/es/packages/tabbaritem/style/style.css +34 -36
- package/dist/es/packages/tabbaritem/style/style.harmony.css +21 -21
- package/dist/es/packages/tabbaritem/style/tabbaritem.scss +32 -29
- package/dist/es/packages/tabbaritem/tabbaritem.js +38 -14
- package/dist/es/types/spec/badge/base.d.ts +4 -0
- package/dist/es/types/spec/indicator/base.d.ts +1 -1
- package/dist/es/types/spec/notify/base.d.ts +22 -5
- package/dist/es/types/spec/searchbar/taro.d.ts +10 -7
- package/dist/es/types/spec/skeleton/base.d.ts +19 -14
- package/dist/es/types/spec/switch/base.d.ts +6 -2
- package/dist/es/types/spec/switch/h5.d.ts +1 -1
- package/dist/es/types/spec/switch/taro.d.ts +1 -4
- package/dist/es/types/spec/tabbar/base.d.ts +7 -4
- package/dist/nutui.react.umd.js +549 -395
- package/dist/style.css +1 -1
- package/dist/style.scss +51 -51
- package/dist/styles/theme-dark.scss +2 -0
- package/dist/styles/theme-default.scss +2 -0
- package/dist/styles/themes/dark.css +1 -1
- package/dist/styles/themes/default.css +1 -1
- package/dist/styles/themes/jmapp.css +1 -1
- package/dist/styles/themes/jrkf.css +1 -1
- package/dist/styles/variables-jmapp.scss +24 -1
- package/dist/styles/variables-jrkf.scss +24 -1
- package/dist/styles/variables.scss +37 -38
- package/package.json +1 -1
- /package/dist/cjs/packages/lottie/{mp.d.ts → lottiemp.d.ts} +0 -0
- /package/dist/cjs/packages/lottie/{web.d.ts → lottieweb.d.ts} +0 -0
- /package/dist/cjs/packages/lottie/{web.js → lottieweb.js} +0 -0
- /package/dist/es/packages/lottie/{mp.d.ts → lottiemp.d.ts} +0 -0
- /package/dist/es/packages/lottie/{web.d.ts → lottieweb.d.ts} +0 -0
- /package/dist/es/packages/lottie/{web.js → lottieweb.js} +0 -0
|
@@ -9,83 +9,94 @@ Object.defineProperty(exports, "Skeleton", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
-
var
|
|
12
|
+
var _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
13
|
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
14
14
|
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
15
15
|
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
|
|
16
|
-
var
|
|
17
|
-
var
|
|
16
|
+
var _sliced_to_array = require("@swc/helpers/_/_sliced_to_array");
|
|
17
|
+
var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
18
18
|
var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
|
|
19
|
-
var
|
|
19
|
+
var _components = require("@tarojs/components");
|
|
20
20
|
var _typings = require("../../utils/typings");
|
|
21
|
-
var _pxtransform = /*#__PURE__*/ _interop_require_default._(require("../../utils/px-transform"));
|
|
22
21
|
var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
|
|
23
22
|
rows: 1,
|
|
24
|
-
animated:
|
|
25
|
-
title: false,
|
|
26
|
-
avatar: false,
|
|
27
|
-
avatarSize: '50px',
|
|
23
|
+
animated: true,
|
|
28
24
|
visible: false,
|
|
29
|
-
|
|
25
|
+
size: 'normal',
|
|
26
|
+
shape: 'round',
|
|
27
|
+
duration: 0.6,
|
|
28
|
+
inline: false
|
|
30
29
|
});
|
|
31
30
|
var Skeleton = function Skeleton(props) {
|
|
32
|
-
var
|
|
31
|
+
var shapeStyle = function shapeStyle() {
|
|
32
|
+
if (shape === 'circle') return {
|
|
33
|
+
borderRadius: '50%'
|
|
34
|
+
};
|
|
35
|
+
if (shape === 'square') return {
|
|
36
|
+
borderRadius: '0'
|
|
37
|
+
};
|
|
38
|
+
return {};
|
|
39
|
+
};
|
|
40
|
+
var durationStyle = function durationStyle() {
|
|
41
|
+
if (typeof duration !== 'undefined') return {
|
|
42
|
+
animationDuration: "".concat(duration, "s")
|
|
43
|
+
};
|
|
44
|
+
return {};
|
|
45
|
+
};
|
|
46
|
+
var _ref = (0, _object_spread._)({}, defaultProps, props), className = _ref.className, width = _ref.width, height = _ref.height, shape = _ref.shape, animated = _ref.animated, rows = _ref.rows, visible = _ref.visible, size = _ref.size, duration = _ref.duration, children = _ref.children, rest = (0, _object_without_properties._)(_ref, [
|
|
33
47
|
"className",
|
|
48
|
+
"width",
|
|
49
|
+
"height",
|
|
50
|
+
"shape",
|
|
34
51
|
"animated",
|
|
35
52
|
"rows",
|
|
36
|
-
"title",
|
|
37
|
-
"avatar",
|
|
38
|
-
"avatarSize",
|
|
39
53
|
"visible",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
54
|
+
"size",
|
|
55
|
+
"duration",
|
|
56
|
+
"children"
|
|
42
57
|
]);
|
|
43
58
|
var classPrefix = 'nut-skeleton';
|
|
44
59
|
var classes = (0, _classnames.default)(classPrefix, className);
|
|
45
|
-
var
|
|
46
|
-
var avatarClass = (0, _classnames.default)((_obj = {}, (0, _define_property._)(_obj, "nut-avatar", true), (0, _define_property._)(_obj, "nut-skeleton-content-avatar", true), (0, _define_property._)(_obj, "avatar-".concat(avatarShape), avatarShape), _obj));
|
|
47
|
-
var repeatLines = function repeatLines(num) {
|
|
60
|
+
var repeatCount = function repeatCount(num) {
|
|
48
61
|
return Array.from({
|
|
49
62
|
length: num
|
|
50
63
|
}, function(v, i) {
|
|
51
64
|
return i;
|
|
52
65
|
});
|
|
53
66
|
};
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
width: (0, _pxtransform.default)(50),
|
|
63
|
-
height: (0, _pxtransform.default)(50)
|
|
64
|
-
};
|
|
67
|
+
var _useState = (0, _sliced_to_array._)((0, _react.useState)(false), 2), animate = _useState[0], setAnimate = _useState[1];
|
|
68
|
+
var playAnimation = function playAnimation() {
|
|
69
|
+
setAnimate(false);
|
|
70
|
+
setTimeout(function() {
|
|
71
|
+
setAnimate(true);
|
|
72
|
+
}, 10);
|
|
65
73
|
};
|
|
66
|
-
|
|
74
|
+
(0, _react.useEffect)(function() {
|
|
75
|
+
if (!animated) return;
|
|
76
|
+
playAnimation();
|
|
77
|
+
// 每隔 3 秒播放一次动画
|
|
78
|
+
var intervalId = setInterval(playAnimation, 1000 + duration * 1000) // xs 动画 + 1s 间隔
|
|
79
|
+
;
|
|
80
|
+
// 清理定时器
|
|
81
|
+
return function() {
|
|
82
|
+
return clearInterval(intervalId);
|
|
83
|
+
};
|
|
84
|
+
}, []);
|
|
85
|
+
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, visible ? children : /*#__PURE__*/ _react.default.createElement(_components.View, (0, _object_spread._)({
|
|
67
86
|
className: classes
|
|
68
|
-
}, rest),
|
|
69
|
-
|
|
70
|
-
}), /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
71
|
-
className: "".concat(classPrefix, "-content")
|
|
72
|
-
}, avatar && /*#__PURE__*/ _react.default.createElement(_index.default, {
|
|
73
|
-
className: avatarClass,
|
|
74
|
-
background: "rgb(239, 239, 239)",
|
|
75
|
-
shape: avatarShape,
|
|
76
|
-
style: getStyle(),
|
|
77
|
-
icon: "null"
|
|
78
|
-
}), rows === 1 ? /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
79
|
-
className: "".concat(classPrefix, "-content-block")
|
|
80
|
-
}) : /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
81
|
-
className: "".concat(classPrefix, "-content-line")
|
|
82
|
-
}, title && /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
83
|
-
className: "".concat(classPrefix, "-content-title")
|
|
84
|
-
}), repeatLines(rows).map(function(item, index) {
|
|
87
|
+
}, rest), repeatCount(rows).map(function(item, index) {
|
|
88
|
+
var contentClass = "".concat(classPrefix, "-content ").concat(classPrefix, "-content-").concat(size, " ").concat(classPrefix, "-content-").concat(size, "-").concat(index);
|
|
85
89
|
return /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
86
|
-
className: "".concat(
|
|
87
|
-
key: index
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
className: "".concat(contentClass),
|
|
91
|
+
key: index,
|
|
92
|
+
style: (0, _object_spread._)({
|
|
93
|
+
width: width,
|
|
94
|
+
height: height
|
|
95
|
+
}, shapeStyle())
|
|
96
|
+
}, animated && /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
97
|
+
className: "".concat(classPrefix, "-animated ").concat(animate ? "".concat(classPrefix, "-animation") : ''),
|
|
98
|
+
style: durationStyle()
|
|
99
|
+
}));
|
|
100
|
+
})));
|
|
90
101
|
};
|
|
91
102
|
Skeleton.displayName = 'NutSkeleton';
|
|
@@ -1,44 +1,29 @@
|
|
|
1
1
|
.nut-skeleton {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
vertical-align: middle;
|
|
6
|
-
width: 100%;
|
|
2
|
+
line-height: 0px;
|
|
3
|
+
font-size: 0px;
|
|
7
4
|
|
|
8
5
|
&-content {
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
position: relative;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
width: $skeleton-line-width;
|
|
9
|
+
background: $skeleton-background;
|
|
10
|
+
border-radius: $skeleton-line-border-radius;
|
|
11
|
+
overflow: hidden;
|
|
11
12
|
|
|
12
|
-
&-
|
|
13
|
-
|
|
14
|
-
background: $skeleton-background !important;
|
|
13
|
+
&-normal {
|
|
14
|
+
height: $skeleton-line-normal-height;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
&-
|
|
18
|
-
|
|
19
|
-
height: $skeleton-line-height;
|
|
20
|
-
background: $skeleton-background;
|
|
21
|
-
margin-top: 10px;
|
|
22
|
-
border-radius: $skeleton-line-border-radius;
|
|
17
|
+
&-large {
|
|
18
|
+
height: $skeleton-line-large-height;
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
&-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
.nut-skeleton-content-block:last-child {
|
|
30
|
-
width: 70%;
|
|
31
|
-
}
|
|
21
|
+
&-small {
|
|
22
|
+
height: $skeleton-line-small-height;
|
|
23
|
+
margin-top: 8px;
|
|
32
24
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
width: 30%;
|
|
36
|
-
height: $skeleton-line-height;
|
|
37
|
-
background: $skeleton-background;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&-block-last-child {
|
|
41
|
-
width: 55%;
|
|
25
|
+
&-small-0 {
|
|
26
|
+
margin-top: 0;
|
|
42
27
|
}
|
|
43
28
|
}
|
|
44
29
|
|
|
@@ -49,41 +34,50 @@
|
|
|
49
34
|
width: 100%;
|
|
50
35
|
height: 100%;
|
|
51
36
|
z-index: 1;
|
|
52
|
-
|
|
37
|
+
background: linear-gradient(
|
|
38
|
+
90deg,
|
|
39
|
+
rgba(0, 0, 0, 0) 0%,
|
|
40
|
+
rgba(0, 0, 0, 0.02) 50%,
|
|
41
|
+
rgba(0, 0, 0, 0) 100%
|
|
42
|
+
);
|
|
43
|
+
animation-name: nut-skeleton;
|
|
44
|
+
animation-delay: 0s;
|
|
45
|
+
animation-duration: 0.6s;
|
|
46
|
+
animation-direction: normal;
|
|
47
|
+
animation-fill-mode: both;
|
|
48
|
+
animation-play-state: running;
|
|
49
|
+
animation-iteration-count: 1;
|
|
50
|
+
animation-timing-function: linear;
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
@keyframes nut-skeleton {
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
from {
|
|
55
|
+
transform: translateX(-100%);
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
to {
|
|
61
|
-
|
|
59
|
+
transform: translateX(100%);
|
|
62
60
|
}
|
|
63
61
|
}
|
|
64
62
|
}
|
|
65
63
|
|
|
66
64
|
[dir='rtl'] .nut-skeleton,
|
|
67
65
|
.nut-rtl .nut-skeleton {
|
|
68
|
-
&-content {
|
|
69
|
-
.nut-avatar {
|
|
70
|
-
margin-right: 0;
|
|
71
|
-
margin-left: 20px;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
66
|
&-animation {
|
|
75
67
|
left: auto;
|
|
76
68
|
right: 0;
|
|
77
|
-
animation: nut-skeleton-rtl 2s
|
|
69
|
+
animation: nut-skeleton-rtl 2s linear 0s infinite;
|
|
78
70
|
}
|
|
79
71
|
|
|
80
72
|
@keyframes nut-skeleton-rtl {
|
|
81
|
-
|
|
82
|
-
background-position
|
|
73
|
+
from {
|
|
74
|
+
//background-position: -200% 0;
|
|
75
|
+
transform: translateX(100%);
|
|
83
76
|
}
|
|
84
77
|
|
|
85
78
|
to {
|
|
86
|
-
background-position
|
|
79
|
+
//background-position: 200% 0;
|
|
80
|
+
transform: translateX(-100%);
|
|
87
81
|
}
|
|
88
82
|
}
|
|
89
83
|
}
|
|
@@ -2,176 +2,30 @@
|
|
|
2
2
|
/* #endif */
|
|
3
3
|
/* #ifndef harmony */
|
|
4
4
|
/* #endif */
|
|
5
|
-
.nut-image {
|
|
6
|
-
display: block;
|
|
7
|
-
position: relative;
|
|
8
|
-
}
|
|
9
|
-
.nut-image-default {
|
|
10
|
-
display: block;
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
}
|
|
14
|
-
.nut-image.nut-image-round {
|
|
15
|
-
border-radius: 50%;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
}
|
|
18
|
-
.nut-image-loading {
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
position: absolute;
|
|
22
|
-
top: 0;
|
|
23
|
-
left: 0;
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
align-items: center;
|
|
27
|
-
justify-content: center;
|
|
28
|
-
background: var(--nutui-color-background, #f2f3f5);
|
|
29
|
-
background-size: 100% 100%;
|
|
30
|
-
}
|
|
31
|
-
.nut-image-error {
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: 100%;
|
|
34
|
-
position: absolute;
|
|
35
|
-
top: 0;
|
|
36
|
-
left: 0;
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: center;
|
|
40
|
-
justify-content: center;
|
|
41
|
-
background: var(--nutui-color-background, #f2f3f5);
|
|
42
|
-
background-size: 100% 100%;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
[dir=rtl] .nut-image .nut-img-loading,
|
|
46
|
-
.nut-rtl .nut-image .nut-img-loading {
|
|
47
|
-
left: auto;
|
|
48
|
-
right: 0;
|
|
49
|
-
}
|
|
50
|
-
[dir=rtl] .nut-image .nut-img-error,
|
|
51
|
-
.nut-rtl .nut-image .nut-img-error {
|
|
52
|
-
left: auto;
|
|
53
|
-
right: 0;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.nut-avatar-group {
|
|
57
|
-
display: flex;
|
|
58
|
-
flex-direction: row;
|
|
59
|
-
flex: 0 0 auto;
|
|
60
|
-
}
|
|
61
|
-
.nut-avatar-group-avatar,
|
|
62
|
-
.nut-avatar-group .nut-avatar {
|
|
63
|
-
border: 1px solid #fff;
|
|
64
|
-
margin-left: -8px;
|
|
65
|
-
}
|
|
66
|
-
.nut-avatar-group-avatar:not(:first-of-type),
|
|
67
|
-
.nut-avatar-group .nut-avatar:not(:first-of-type) {
|
|
68
|
-
margin-left: -8px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
[dir=rtl] .nut-avatar-group .nut-avatar:not(:first-of-type),
|
|
72
|
-
.nut-rtl .nut-avatar-group .nut-avatar:not(:first-of-type) {
|
|
73
|
-
margin-left: 0;
|
|
74
|
-
margin-right: -8px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.nut-avatar {
|
|
78
|
-
position: relative;
|
|
79
|
-
flex: 0 0 auto;
|
|
80
|
-
display: flex;
|
|
81
|
-
justify-content: center;
|
|
82
|
-
align-items: center;
|
|
83
|
-
width: var(--nutui-avatar-normal-width, 40px);
|
|
84
|
-
height: var(--nutui-avatar-normal-height, 40px);
|
|
85
|
-
}
|
|
86
|
-
.nut-avatar-round {
|
|
87
|
-
border-radius: 999px;
|
|
88
|
-
overflow: hidden;
|
|
89
|
-
}
|
|
90
|
-
.nut-avatar-square {
|
|
91
|
-
border-radius: var(--nutui-avatar-square, 5px);
|
|
92
|
-
}
|
|
93
|
-
.nut-avatar-first-child {
|
|
94
|
-
margin-left: 0;
|
|
95
|
-
margin-right: 0;
|
|
96
|
-
}
|
|
97
|
-
.nut-avatar-img {
|
|
98
|
-
width: 100%;
|
|
99
|
-
height: 100%;
|
|
100
|
-
flex-shrink: 0;
|
|
101
|
-
background-size: 100% 100%;
|
|
102
|
-
background-repeat: no-repeat;
|
|
103
|
-
background-position: center center;
|
|
104
|
-
}
|
|
105
|
-
.nut-avatar-icon {
|
|
106
|
-
background-size: 100% 100%;
|
|
107
|
-
}
|
|
108
|
-
.nut-avatar-text {
|
|
109
|
-
display: flex;
|
|
110
|
-
justify-content: center;
|
|
111
|
-
align-items: center;
|
|
112
|
-
}
|
|
113
|
-
.nut-avatar-large {
|
|
114
|
-
width: var(--nutui-avatar-large-width, 60px);
|
|
115
|
-
height: var(--nutui-avatar-large-height, 60px);
|
|
116
|
-
}
|
|
117
|
-
.nut-avatar-large-img {
|
|
118
|
-
width: var(--nutui-avatar-large-width, 60px);
|
|
119
|
-
height: var(--nutui-avatar-large-height, 60px);
|
|
120
|
-
}
|
|
121
|
-
.nut-avatar-large-icon {
|
|
122
|
-
width: var(--nutui-avatar-large-width, 60px);
|
|
123
|
-
height: var(--nutui-avatar-large-height, 60px);
|
|
124
|
-
}
|
|
125
|
-
.nut-avatar-large-text {
|
|
126
|
-
width: var(--nutui-avatar-large-width, 60px);
|
|
127
|
-
height: var(--nutui-avatar-large-height, 60px);
|
|
128
|
-
}
|
|
129
|
-
.nut-avatar-small {
|
|
130
|
-
width: var(--nutui-avatar-small-width, 32px);
|
|
131
|
-
height: var(--nutui-avatar-small-height, 32px);
|
|
132
|
-
}
|
|
133
|
-
.nut-avatar-small-text {
|
|
134
|
-
width: var(--nutui-avatar-small-width, 32px);
|
|
135
|
-
height: var(--nutui-avatar-small-height, 32px);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
5
|
.nut-skeleton {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
overflow: hidden;
|
|
142
|
-
vertical-align: middle;
|
|
143
|
-
width: 100%;
|
|
6
|
+
line-height: 0px;
|
|
7
|
+
font-size: 0px;
|
|
144
8
|
}
|
|
145
9
|
.nut-skeleton-content {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
.nut-skeleton-content-avatar {
|
|
150
|
-
margin-right: 20px;
|
|
151
|
-
background: var(--nutui-skeleton-background, var(--nutui-color-background, #f2f3f5)) !important;
|
|
152
|
-
}
|
|
153
|
-
.nut-skeleton-content-block {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: inline-flex;
|
|
154
12
|
width: var(--nutui-skeleton-line-width, 100%);
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
border-radius: var(--nutui-skeleton-line-border-radius, 0);
|
|
13
|
+
background: var(--nutui-skeleton-background, var(--nutui-color-background-sunken, #f7f8fc));
|
|
14
|
+
border-radius: var(--nutui-skeleton-line-border-radius, var(--nutui-radius-xs, 4px));
|
|
15
|
+
overflow: hidden;
|
|
159
16
|
}
|
|
160
|
-
.nut-skeleton-content-
|
|
161
|
-
|
|
162
|
-
display: flex;
|
|
163
|
-
flex-direction: column;
|
|
17
|
+
.nut-skeleton-content-normal {
|
|
18
|
+
height: var(--nutui-skeleton-line-normal-height, 24px);
|
|
164
19
|
}
|
|
165
|
-
.nut-skeleton-content-
|
|
166
|
-
|
|
20
|
+
.nut-skeleton-content-large {
|
|
21
|
+
height: var(--nutui-skeleton-line-large-height, 32px);
|
|
167
22
|
}
|
|
168
|
-
.nut-skeleton-content-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
background: var(--nutui-skeleton-background, var(--nutui-color-background, #f2f3f5));
|
|
23
|
+
.nut-skeleton-content-small {
|
|
24
|
+
height: var(--nutui-skeleton-line-small-height, 16px);
|
|
25
|
+
margin-top: 8px;
|
|
172
26
|
}
|
|
173
|
-
.nut-skeleton-content-
|
|
174
|
-
|
|
27
|
+
.nut-skeleton-content-small-0 {
|
|
28
|
+
margin-top: 0;
|
|
175
29
|
}
|
|
176
30
|
.nut-skeleton-animation {
|
|
177
31
|
position: absolute;
|
|
@@ -180,33 +34,36 @@
|
|
|
180
34
|
width: 100%;
|
|
181
35
|
height: 100%;
|
|
182
36
|
z-index: 1;
|
|
183
|
-
|
|
37
|
+
background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.02) 50%, rgba(0, 0, 0, 0) 100%);
|
|
38
|
+
animation-name: nut-skeleton;
|
|
39
|
+
animation-delay: 0s;
|
|
40
|
+
animation-duration: 0.6s;
|
|
41
|
+
animation-direction: normal;
|
|
42
|
+
animation-fill-mode: both;
|
|
43
|
+
animation-play-state: running;
|
|
44
|
+
animation-iteration-count: 1;
|
|
45
|
+
animation-timing-function: linear;
|
|
184
46
|
}
|
|
185
47
|
@keyframes nut-skeleton {
|
|
186
|
-
|
|
187
|
-
|
|
48
|
+
from {
|
|
49
|
+
transform: translateX(-100%);
|
|
188
50
|
}
|
|
189
51
|
to {
|
|
190
|
-
|
|
52
|
+
transform: translateX(100%);
|
|
191
53
|
}
|
|
192
54
|
}
|
|
193
55
|
|
|
194
|
-
[dir=rtl] .nut-skeleton-content .nut-avatar,
|
|
195
|
-
.nut-rtl .nut-skeleton-content .nut-avatar {
|
|
196
|
-
margin-right: 0;
|
|
197
|
-
margin-left: 20px;
|
|
198
|
-
}
|
|
199
56
|
[dir=rtl] .nut-skeleton-animation,
|
|
200
57
|
.nut-rtl .nut-skeleton-animation {
|
|
201
58
|
left: auto;
|
|
202
59
|
right: 0;
|
|
203
|
-
animation: nut-skeleton-rtl 2s
|
|
60
|
+
animation: nut-skeleton-rtl 2s linear 0s infinite;
|
|
204
61
|
}
|
|
205
62
|
@keyframes nut-skeleton-rtl {
|
|
206
|
-
|
|
207
|
-
|
|
63
|
+
from {
|
|
64
|
+
transform: translateX(100%);
|
|
208
65
|
}
|
|
209
66
|
to {
|
|
210
|
-
|
|
67
|
+
transform: translateX(-100%);
|
|
211
68
|
}
|
|
212
69
|
}
|
|
@@ -3,42 +3,29 @@
|
|
|
3
3
|
/* #ifndef harmony */
|
|
4
4
|
/* #endif */
|
|
5
5
|
.nut-skeleton {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
vertical-align: middle;
|
|
10
|
-
width: 100%;
|
|
6
|
+
line-height: 0px;
|
|
7
|
+
font-size: 0px;
|
|
11
8
|
}
|
|
12
9
|
.nut-skeleton-content {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
.nut-skeleton-content-avatar {
|
|
17
|
-
margin-right: 20px;
|
|
18
|
-
background: #f2f3f5 !important;
|
|
19
|
-
}
|
|
20
|
-
.nut-skeleton-content-block {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: inline-flex;
|
|
21
12
|
width: 100%;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
border-radius: 0;
|
|
13
|
+
background: #f7f8fc;
|
|
14
|
+
border-radius: 4px;
|
|
15
|
+
overflow: hidden;
|
|
26
16
|
}
|
|
27
|
-
.nut-skeleton-content-
|
|
28
|
-
|
|
29
|
-
display: flex;
|
|
30
|
-
flex-direction: column;
|
|
17
|
+
.nut-skeleton-content-normal {
|
|
18
|
+
height: 24px;
|
|
31
19
|
}
|
|
32
|
-
.nut-skeleton-content-
|
|
33
|
-
|
|
20
|
+
.nut-skeleton-content-large {
|
|
21
|
+
height: 32px;
|
|
34
22
|
}
|
|
35
|
-
.nut-skeleton-content-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
background: #f2f3f5;
|
|
23
|
+
.nut-skeleton-content-small {
|
|
24
|
+
height: 16px;
|
|
25
|
+
margin-top: 8px;
|
|
39
26
|
}
|
|
40
|
-
.nut-skeleton-content-
|
|
41
|
-
|
|
27
|
+
.nut-skeleton-content-small-0 {
|
|
28
|
+
margin-top: 0;
|
|
42
29
|
}
|
|
43
30
|
.nut-skeleton-animation {
|
|
44
31
|
position: absolute;
|
|
@@ -47,33 +34,36 @@
|
|
|
47
34
|
width: 100%;
|
|
48
35
|
height: 100%;
|
|
49
36
|
z-index: 1;
|
|
50
|
-
|
|
37
|
+
background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.02) 50%, rgba(0, 0, 0, 0) 100%);
|
|
38
|
+
animation-name: nut-skeleton;
|
|
39
|
+
animation-delay: 0s;
|
|
40
|
+
animation-duration: 0.6s;
|
|
41
|
+
animation-direction: normal;
|
|
42
|
+
animation-fill-mode: both;
|
|
43
|
+
animation-play-state: running;
|
|
44
|
+
animation-iteration-count: 1;
|
|
45
|
+
animation-timing-function: linear;
|
|
51
46
|
}
|
|
52
47
|
@keyframes nut-skeleton {
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
from {
|
|
49
|
+
transform: translateX(-100%);
|
|
55
50
|
}
|
|
56
51
|
to {
|
|
57
|
-
|
|
52
|
+
transform: translateX(100%);
|
|
58
53
|
}
|
|
59
54
|
}
|
|
60
55
|
|
|
61
|
-
[dir=rtl] .nut-skeleton-content .nut-avatar,
|
|
62
|
-
.nut-rtl .nut-skeleton-content .nut-avatar {
|
|
63
|
-
margin-right: 0;
|
|
64
|
-
margin-left: 20px;
|
|
65
|
-
}
|
|
66
56
|
[dir=rtl] .nut-skeleton-animation,
|
|
67
57
|
.nut-rtl .nut-skeleton-animation {
|
|
68
58
|
left: auto;
|
|
69
59
|
right: 0;
|
|
70
|
-
animation: nut-skeleton-rtl 2s
|
|
60
|
+
animation: nut-skeleton-rtl 2s linear 0s infinite;
|
|
71
61
|
}
|
|
72
62
|
@keyframes nut-skeleton-rtl {
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
from {
|
|
64
|
+
transform: translateX(100%);
|
|
75
65
|
}
|
|
76
66
|
to {
|
|
77
|
-
|
|
67
|
+
transform: translateX(-100%);
|
|
78
68
|
}
|
|
79
69
|
}
|
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
.nut-switch-button-close-rtl {
|
|
46
46
|
left: calc(100% - var(--nutui-switch-height, 28px) + var(--nutui-switch-border-width, 2px));
|
|
47
47
|
}
|
|
48
|
+
.nut-switch-button .nut-icon {
|
|
49
|
+
width: calc((var(--nutui-switch-height, 28px) - var(--nutui-switch-border-width, 2px) * 2) / 2);
|
|
50
|
+
height: calc((var(--nutui-switch-height, 28px) - var(--nutui-switch-border-width, 2px) * 2) / 2);
|
|
51
|
+
color: var(--nutui-switch-active-disabled-background-color, var(--nutui-color-primary-disabled-special, #ffadbe));
|
|
52
|
+
}
|
|
48
53
|
.nut-switch-close {
|
|
49
54
|
background-color: var(--nutui-switch-inactive-background-color, var(--nutui-color-text-disabled, #c2c4cc));
|
|
50
55
|
}
|
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
.nut-switch-button-close-rtl {
|
|
46
46
|
left: calc(100% - 28px + 2px);
|
|
47
47
|
}
|
|
48
|
+
.nut-switch-button .nut-icon {
|
|
49
|
+
width: calc((28px - 2px * 2) / 2);
|
|
50
|
+
height: calc((28px - 2px * 2) / 2);
|
|
51
|
+
color: #ffadbe;
|
|
52
|
+
}
|
|
48
53
|
.nut-switch-close {
|
|
49
54
|
background-color: #c2c4cc;
|
|
50
55
|
}
|
|
@@ -40,6 +40,11 @@
|
|
|
40
40
|
left: calc(100% - $switch-height + $switch-border-width);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
.nut-icon {
|
|
44
|
+
width: calc(($switch-height - $switch-border-width * 2) / 2);
|
|
45
|
+
height: calc(($switch-height - $switch-border-width * 2) / 2);
|
|
46
|
+
color: $switch-active-disabled-background-color;
|
|
47
|
+
}
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
&-close {
|