@arco-design/mobile-react 2.28.2 → 2.29.0

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/grid/style/css/index.css +4 -0
  5. package/cjs/grid/style/index.less +6 -0
  6. package/cjs/index.d.ts +1 -0
  7. package/cjs/index.js +5 -1
  8. package/cjs/skeleton/demo/style/css/mobile.css +7 -0
  9. package/cjs/skeleton/demo/style/mobile.less +13 -0
  10. package/cjs/skeleton/elements.d.ts +7 -0
  11. package/cjs/skeleton/elements.js +302 -0
  12. package/cjs/skeleton/index.d.ts +18 -0
  13. package/cjs/skeleton/index.js +100 -0
  14. package/cjs/skeleton/skeleton-context.d.ts +3 -0
  15. package/cjs/skeleton/skeleton-context.js +15 -0
  16. package/cjs/skeleton/style/css/index.css +180 -0
  17. package/cjs/skeleton/style/css/index.d.ts +3 -0
  18. package/cjs/skeleton/style/css/index.js +7 -0
  19. package/cjs/skeleton/style/index.d.ts +3 -0
  20. package/cjs/skeleton/style/index.js +7 -0
  21. package/cjs/skeleton/style/index.less +147 -0
  22. package/cjs/skeleton/type.d.ts +104 -0
  23. package/cjs/skeleton/type.js +3 -0
  24. package/cjs/style.d.ts +1 -0
  25. package/cjs/style.js +2 -0
  26. package/dist/index.js +390 -34
  27. package/dist/index.min.js +4 -4
  28. package/dist/style.css +123 -0
  29. package/dist/style.min.css +1 -1
  30. package/esm/grid/style/css/index.css +4 -0
  31. package/esm/grid/style/index.less +6 -0
  32. package/esm/index.d.ts +1 -0
  33. package/esm/index.js +1 -0
  34. package/esm/skeleton/demo/style/css/mobile.css +7 -0
  35. package/esm/skeleton/demo/style/mobile.less +13 -0
  36. package/esm/skeleton/elements.d.ts +7 -0
  37. package/esm/skeleton/elements.js +281 -0
  38. package/esm/skeleton/index.d.ts +18 -0
  39. package/esm/skeleton/index.js +82 -0
  40. package/esm/skeleton/skeleton-context.d.ts +3 -0
  41. package/esm/skeleton/skeleton-context.js +5 -0
  42. package/esm/skeleton/style/css/index.css +180 -0
  43. package/esm/skeleton/style/css/index.d.ts +3 -0
  44. package/esm/skeleton/style/css/index.js +3 -0
  45. package/esm/skeleton/style/index.d.ts +3 -0
  46. package/esm/skeleton/style/index.js +3 -0
  47. package/esm/skeleton/style/index.less +147 -0
  48. package/esm/skeleton/type.d.ts +104 -0
  49. package/esm/skeleton/type.js +1 -0
  50. package/esm/style.d.ts +1 -0
  51. package/esm/style.js +1 -0
  52. package/package.json +3 -3
  53. package/tokens/app/arcodesign/default/css-variables.less +16 -0
  54. package/tokens/app/arcodesign/default/index.d.ts +16 -0
  55. package/tokens/app/arcodesign/default/index.js +17 -1
  56. package/tokens/app/arcodesign/default/index.json +190 -0
  57. package/tokens/app/arcodesign/default/index.less +16 -0
  58. package/umd/grid/style/css/index.css +4 -0
  59. package/umd/grid/style/index.less +6 -0
  60. package/umd/index.d.ts +1 -0
  61. package/umd/index.js +7 -5
  62. package/umd/skeleton/demo/style/css/mobile.css +7 -0
  63. package/umd/skeleton/demo/style/mobile.less +13 -0
  64. package/umd/skeleton/elements.d.ts +7 -0
  65. package/umd/skeleton/elements.js +306 -0
  66. package/umd/skeleton/index.d.ts +18 -0
  67. package/umd/skeleton/index.js +104 -0
  68. package/umd/skeleton/skeleton-context.d.ts +3 -0
  69. package/umd/skeleton/skeleton-context.js +28 -0
  70. package/umd/skeleton/style/css/index.css +180 -0
  71. package/umd/skeleton/style/css/index.d.ts +3 -0
  72. package/umd/skeleton/style/css/index.js +15 -0
  73. package/umd/skeleton/style/index.d.ts +3 -0
  74. package/umd/skeleton/style/index.js +15 -0
  75. package/umd/skeleton/style/index.less +147 -0
  76. package/umd/skeleton/type.d.ts +104 -0
  77. package/umd/skeleton/type.js +17 -0
  78. package/umd/style.d.ts +1 -0
  79. package/umd/style.js +4 -4
@@ -0,0 +1,281 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React, { forwardRef, useContext, useEffect, useImperativeHandle, useRef, useState } from 'react';
3
+ import { cls, isArray, nextTick } from '@arco-design/mobile-utils';
4
+ import { useListenResize } from '../_helpers';
5
+ import { GlobalContext } from '../context-provider';
6
+ import { SkeletonContext } from './skeleton-context';
7
+
8
+ var calcOffset = function calcOffset(dom, useRtl) {
9
+ if (!dom) {
10
+ return 0;
11
+ }
12
+
13
+ if (useRtl) {
14
+ return dom.offsetLeft - dom.offsetTop;
15
+ }
16
+
17
+ return dom.offsetLeft + dom.offsetTop;
18
+ };
19
+
20
+ function useOffset(dom, useRtl) {
21
+ var _useState = useState(),
22
+ offset = _useState[0],
23
+ setOffset = _useState[1];
24
+
25
+ var calcLayout = function calcLayout() {
26
+ var isList = Array.isArray(dom);
27
+
28
+ if (!(isList ? dom.length > 0 : dom == null ? void 0 : dom.current)) {
29
+ return;
30
+ }
31
+
32
+ setOffset(isList ? dom.map(function (item) {
33
+ return calcOffset(item, useRtl);
34
+ }) : calcOffset(dom.current, useRtl));
35
+ };
36
+
37
+ useEffect(function () {
38
+ nextTick(function () {
39
+ calcLayout();
40
+ });
41
+ }, [dom, useRtl]);
42
+ useListenResize(calcLayout);
43
+ return offset;
44
+ }
45
+
46
+ export var SkeletonNode = /*#__PURE__*/forwardRef(function (props, ref) {
47
+ var _props$className = props.className,
48
+ className = _props$className === void 0 ? '' : _props$className,
49
+ style = props.style,
50
+ children = props.children;
51
+
52
+ var _useContext = useContext(GlobalContext),
53
+ useRtl = _useContext.useRtl,
54
+ prefixCls = _useContext.prefixCls;
55
+
56
+ var _useContext2 = useContext(SkeletonContext),
57
+ backgroundColor = _useContext2.backgroundColor,
58
+ showAnimation = _useContext2.showAnimation,
59
+ animation = _useContext2.animation;
60
+
61
+ var domRef = useRef(null);
62
+ var isGradientAnimation = showAnimation && animation === 'gradient';
63
+ var offset = useOffset(isGradientAnimation ? domRef : undefined, useRtl);
64
+ useImperativeHandle(ref, function () {
65
+ return {
66
+ dom: domRef.current
67
+ };
68
+ });
69
+ return /*#__PURE__*/React.createElement("div", {
70
+ className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-node", showAnimation && prefixCls + "-skeleton-animation-" + animation, className),
71
+ style: _extends({
72
+ backgroundColor: backgroundColor
73
+ }, style),
74
+ ref: domRef
75
+ }, children, isGradientAnimation && offset !== undefined && /*#__PURE__*/React.createElement("div", {
76
+ className: prefixCls + "-skeleton-animation-item",
77
+ style: {
78
+ left: 0 - offset
79
+ }
80
+ }));
81
+ });
82
+ export var SkeletonTitle = /*#__PURE__*/forwardRef(function (props, ref) {
83
+ var _props$className2 = props.className,
84
+ className = _props$className2 === void 0 ? '' : _props$className2,
85
+ style = props.style,
86
+ _props$width = props.width,
87
+ width = _props$width === void 0 ? '40%' : _props$width;
88
+
89
+ var _useContext3 = useContext(GlobalContext),
90
+ useRtl = _useContext3.useRtl,
91
+ prefixCls = _useContext3.prefixCls;
92
+
93
+ var _useContext4 = useContext(SkeletonContext),
94
+ backgroundColor = _useContext4.backgroundColor,
95
+ showAnimation = _useContext4.showAnimation,
96
+ animation = _useContext4.animation;
97
+
98
+ var domRef = useRef(null);
99
+ var isGradientAnimation = showAnimation && animation === 'gradient';
100
+ var offset = useOffset(isGradientAnimation ? domRef : undefined, useRtl);
101
+ useImperativeHandle(ref, function () {
102
+ return {
103
+ dom: domRef.current
104
+ };
105
+ });
106
+ return /*#__PURE__*/React.createElement("div", {
107
+ className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-title", showAnimation && prefixCls + "-skeleton-animation-" + animation, className),
108
+ style: _extends({
109
+ width: width,
110
+ backgroundColor: backgroundColor
111
+ }, style),
112
+ ref: domRef
113
+ }, isGradientAnimation && offset !== undefined && /*#__PURE__*/React.createElement("div", {
114
+ className: prefixCls + "-skeleton-animation-item",
115
+ style: {
116
+ left: 0 - offset
117
+ }
118
+ }));
119
+ });
120
+ export var SkeletonParagraph = /*#__PURE__*/forwardRef(function (props, ref) {
121
+ var _props$className3 = props.className,
122
+ className = _props$className3 === void 0 ? '' : _props$className3,
123
+ style = props.style,
124
+ _props$rows = props.rows,
125
+ rows = _props$rows === void 0 ? 3 : _props$rows,
126
+ _props$width2 = props.width,
127
+ width = _props$width2 === void 0 ? '60%' : _props$width2;
128
+
129
+ var _useContext5 = useContext(GlobalContext),
130
+ useRtl = _useContext5.useRtl,
131
+ prefixCls = _useContext5.prefixCls;
132
+
133
+ var _useContext6 = useContext(SkeletonContext),
134
+ backgroundColor = _useContext6.backgroundColor,
135
+ showAnimation = _useContext6.showAnimation,
136
+ animation = _useContext6.animation;
137
+
138
+ var domRef = useRef(null);
139
+ var lineDomRefs = useRef([]);
140
+ var isGradientAnimation = showAnimation && animation === 'gradient';
141
+ var offsets = useOffset(isGradientAnimation ? lineDomRefs.current : undefined, useRtl);
142
+ useImperativeHandle(ref, function () {
143
+ return {
144
+ dom: domRef.current
145
+ };
146
+ });
147
+
148
+ var getWidth = function getWidth(idx) {
149
+ if (isArray(width)) {
150
+ return width[idx];
151
+ }
152
+
153
+ if (rows - 1 === idx) {
154
+ return width;
155
+ }
156
+
157
+ return undefined;
158
+ };
159
+
160
+ return /*#__PURE__*/React.createElement("div", {
161
+ className: cls(prefixCls + "-skeleton-paragraph", className),
162
+ style: style,
163
+ ref: domRef
164
+ }, Array.from(new Array(rows)).map(function (_, idx) {
165
+ return /*#__PURE__*/React.createElement("div", {
166
+ key: idx,
167
+ className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-paragraph-line", showAnimation && prefixCls + "-skeleton-animation-" + animation),
168
+ style: {
169
+ width: getWidth(idx),
170
+ backgroundColor: backgroundColor
171
+ },
172
+ ref: function ref(el) {
173
+ return el && (lineDomRefs.current[idx] = el);
174
+ }
175
+ }, isGradientAnimation && offsets !== undefined && /*#__PURE__*/React.createElement("div", {
176
+ className: prefixCls + "-skeleton-animation-item",
177
+ style: {
178
+ left: 0 - (offsets[idx] || 0)
179
+ }
180
+ }));
181
+ }));
182
+ });
183
+ export var SkeletonAvatar = /*#__PURE__*/forwardRef(function (props, ref) {
184
+ var _props$className4 = props.className,
185
+ className = _props$className4 === void 0 ? '' : _props$className4,
186
+ style = props.style;
187
+
188
+ var _useContext7 = useContext(GlobalContext),
189
+ useRtl = _useContext7.useRtl,
190
+ prefixCls = _useContext7.prefixCls;
191
+
192
+ var _useContext8 = useContext(SkeletonContext),
193
+ backgroundColor = _useContext8.backgroundColor,
194
+ showAnimation = _useContext8.showAnimation,
195
+ animation = _useContext8.animation;
196
+
197
+ var domRef = useRef(null);
198
+ var isGradientAnimation = showAnimation && animation === 'gradient';
199
+ var offset = useOffset(isGradientAnimation ? domRef : undefined, useRtl);
200
+ useImperativeHandle(ref, function () {
201
+ return {
202
+ dom: domRef.current
203
+ };
204
+ });
205
+ return /*#__PURE__*/React.createElement("div", {
206
+ className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-avatar", showAnimation && prefixCls + "-skeleton-animation-" + animation, className),
207
+ style: _extends({
208
+ backgroundColor: backgroundColor
209
+ }, style),
210
+ ref: domRef
211
+ }, isGradientAnimation && offset !== undefined && /*#__PURE__*/React.createElement("div", {
212
+ className: prefixCls + "-skeleton-animation-item",
213
+ style: {
214
+ left: 0 - offset
215
+ }
216
+ }));
217
+ });
218
+ export var SkeletonGrid = /*#__PURE__*/forwardRef(function (props, ref) {
219
+ var _props$className5 = props.className,
220
+ className = _props$className5 === void 0 ? '' : _props$className5,
221
+ style = props.style,
222
+ _props$columns = props.columns,
223
+ columns = _props$columns === void 0 ? 4 : _props$columns;
224
+
225
+ var _useContext9 = useContext(GlobalContext),
226
+ useRtl = _useContext9.useRtl,
227
+ prefixCls = _useContext9.prefixCls;
228
+
229
+ var _useContext10 = useContext(SkeletonContext),
230
+ backgroundColor = _useContext10.backgroundColor,
231
+ showAnimation = _useContext10.showAnimation,
232
+ animation = _useContext10.animation;
233
+
234
+ var domRef = useRef(null);
235
+ var iconDomRefs = useRef([]);
236
+ var textDomRefs = useRef([]);
237
+ var isGradientAnimation = showAnimation && animation === 'gradient';
238
+ var iconOffsets = useOffset(isGradientAnimation ? iconDomRefs.current : undefined, useRtl);
239
+ var textOffsets = useOffset(isGradientAnimation ? textDomRefs.current : undefined, useRtl);
240
+ useImperativeHandle(ref, function () {
241
+ return {
242
+ dom: domRef.current
243
+ };
244
+ });
245
+ return /*#__PURE__*/React.createElement("div", {
246
+ className: cls(prefixCls + "-skeleton-grid", className),
247
+ style: style,
248
+ ref: domRef
249
+ }, Array.from(new Array(columns)).map(function (_, idx) {
250
+ return /*#__PURE__*/React.createElement("div", {
251
+ key: idx,
252
+ className: cls(prefixCls + "-skeleton-grid-item")
253
+ }, /*#__PURE__*/React.createElement("div", {
254
+ className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-grid-icon", showAnimation && prefixCls + "-skeleton-animation-" + animation),
255
+ style: {
256
+ backgroundColor: backgroundColor
257
+ },
258
+ ref: function ref(el) {
259
+ return el && (iconDomRefs.current[idx] = el);
260
+ }
261
+ }, isGradientAnimation && iconOffsets !== undefined && /*#__PURE__*/React.createElement("div", {
262
+ className: prefixCls + "-skeleton-animation-item",
263
+ style: {
264
+ left: 0 - ((iconOffsets == null ? void 0 : iconOffsets[idx]) || 0)
265
+ }
266
+ })), /*#__PURE__*/React.createElement("div", {
267
+ className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-grid-text", showAnimation && prefixCls + "-skeleton-animation-" + animation),
268
+ style: {
269
+ backgroundColor: backgroundColor
270
+ },
271
+ ref: function ref(el) {
272
+ return el && (textDomRefs.current[idx] = el);
273
+ }
274
+ }, isGradientAnimation && textOffsets !== undefined && /*#__PURE__*/React.createElement("div", {
275
+ className: prefixCls + "-skeleton-animation-item",
276
+ style: {
277
+ left: 0 - ((textOffsets == null ? void 0 : textOffsets[idx]) || 0)
278
+ }
279
+ })));
280
+ }));
281
+ });
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { SkeletonProps, SkeletonRef } from './type';
3
+ declare const _default: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<SkeletonRef>> & {
4
+ Node: React.ForwardRefExoticComponent<import("./type").SkeletonNodeProps & React.RefAttributes<SkeletonRef>>;
5
+ Title: React.ForwardRefExoticComponent<import("./type").SkeletonTitleProps & React.RefAttributes<SkeletonRef>>;
6
+ Paragraph: React.ForwardRefExoticComponent<import("./type").SkeletonParagraphProps & React.RefAttributes<SkeletonRef>>;
7
+ Avatar: React.ForwardRefExoticComponent<import("./type").SkeletonAvatarProps & React.RefAttributes<SkeletonRef>>;
8
+ Grid: React.ForwardRefExoticComponent<import("./type").SkeletonGridProps & React.RefAttributes<SkeletonRef>>;
9
+ };
10
+ /**
11
+ * 在内容加载过程中展示一组占位图形。
12
+ * @en Display a set of placeholder graphics during content loading
13
+ * @type 信息展示
14
+ * @type_en Data Display
15
+ * @name 骨架屏
16
+ * @name_en Skeleton
17
+ */
18
+ export default _default;
@@ -0,0 +1,82 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React, { useRef, forwardRef, useImperativeHandle, useContext } from 'react';
3
+ import { cls, componentWrapper } from '@arco-design/mobile-utils';
4
+ import { GlobalContext } from '../context-provider';
5
+ import { SkeletonAvatar as Avatar, SkeletonGrid as Grid, SkeletonNode as Node, SkeletonParagraph as Paragraph, SkeletonTitle as Title } from './elements';
6
+ import { SkeletonContext } from './skeleton-context';
7
+
8
+ function getComponentProps(prop) {
9
+ if (prop && typeof prop === 'object') {
10
+ return prop;
11
+ }
12
+
13
+ return {};
14
+ }
15
+
16
+ var Skeleton = /*#__PURE__*/forwardRef(function (props, ref) {
17
+ var _cls;
18
+
19
+ var _props$className = props.className,
20
+ className = _props$className === void 0 ? '' : _props$className,
21
+ style = props.style,
22
+ children = props.children,
23
+ _props$title = props.title,
24
+ title = _props$title === void 0 ? true : _props$title,
25
+ _props$paragraph = props.paragraph,
26
+ paragraph = _props$paragraph === void 0 ? true : _props$paragraph,
27
+ _props$avatar = props.avatar,
28
+ avatar = _props$avatar === void 0 ? false : _props$avatar,
29
+ grid = props.grid,
30
+ _props$showAnimation = props.showAnimation,
31
+ showAnimation = _props$showAnimation === void 0 ? true : _props$showAnimation,
32
+ _props$animation = props.animation,
33
+ animation = _props$animation === void 0 ? 'gradient' : _props$animation,
34
+ animationGradientColor = props.animationGradientColor,
35
+ backgroundColor = props.backgroundColor;
36
+ var domRef = useRef(null);
37
+
38
+ var _useContext = useContext(GlobalContext),
39
+ prefixCls = _useContext.prefixCls;
40
+
41
+ useImperativeHandle(ref, function () {
42
+ return {
43
+ dom: domRef.current
44
+ };
45
+ });
46
+ var isGrid = !!grid;
47
+ var hasTitle = !!title;
48
+ var hasParagraph = !!paragraph;
49
+ var hasAvatar = !!avatar;
50
+ var content = isGrid ? /*#__PURE__*/React.createElement(Grid, getComponentProps(grid)) : /*#__PURE__*/React.createElement(React.Fragment, null, hasAvatar && /*#__PURE__*/React.createElement(Avatar, getComponentProps(avatar)), (hasTitle || hasParagraph) && /*#__PURE__*/React.createElement("div", {
51
+ className: prefixCls + "-skeleton-content"
52
+ }, hasTitle && /*#__PURE__*/React.createElement(Title, getComponentProps(title)), hasParagraph && /*#__PURE__*/React.createElement(Paragraph, getComponentProps(paragraph))));
53
+ return /*#__PURE__*/React.createElement("div", {
54
+ className: cls(prefixCls + "-skeleton", (_cls = {}, _cls[prefixCls + "-skeleton-with-avatar"] = hasAvatar, _cls), className),
55
+ style: _extends({
56
+ color: animationGradientColor
57
+ }, style),
58
+ ref: domRef
59
+ }, /*#__PURE__*/React.createElement(SkeletonContext.Provider, {
60
+ value: {
61
+ showAnimation: showAnimation,
62
+ animation: animation,
63
+ backgroundColor: backgroundColor
64
+ }
65
+ }, content, children));
66
+ });
67
+ /**
68
+ * 在内容加载过程中展示一组占位图形。
69
+ * @en Display a set of placeholder graphics during content loading
70
+ * @type 信息展示
71
+ * @type_en Data Display
72
+ * @name 骨架屏
73
+ * @name_en Skeleton
74
+ */
75
+
76
+ export default componentWrapper(Skeleton, {
77
+ Node: Node,
78
+ Title: Title,
79
+ Paragraph: Paragraph,
80
+ Avatar: Avatar,
81
+ Grid: Grid
82
+ });
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SkeletonContextParams } from './type';
3
+ export declare const SkeletonContext: React.Context<SkeletonContextParams>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export var SkeletonContext = /*#__PURE__*/React.createContext({
3
+ showAnimation: true,
4
+ animation: 'gradient'
5
+ });
@@ -0,0 +1,180 @@
1
+ .arco-skeleton {
2
+ position: relative;
3
+ color: rgba(255, 255, 255, 0.6) ;
4
+ }
5
+ .arco-skeleton-title {
6
+ height: 0.32rem ;
7
+ }
8
+ .arco-skeleton-paragraph-line {
9
+ width: 100%;
10
+ height: 0.32rem ;
11
+ }
12
+ .arco-skeleton-paragraph-line + .arco-skeleton-paragraph-line {
13
+ margin-top: 0.24rem ;
14
+ }
15
+ .arco-skeleton-avatar.arco-skeleton-item {
16
+ width: 0.64rem ;
17
+ height: 0.64rem ;
18
+ border-radius: 100%;
19
+ -webkit-transform: translateZ(0);
20
+ transform: translateZ(0);
21
+ }
22
+ .arco-skeleton-content {
23
+ width: 100%;
24
+ }
25
+ .arco-skeleton-content .arco-skeleton-title + .arco-skeleton-paragraph {
26
+ margin-top: 0.4rem ;
27
+ }
28
+ .arco-skeleton-with-avatar {
29
+ display: -webkit-box;
30
+ display: -webkit-flex;
31
+ display: flex;
32
+ -webkit-box-align: start;
33
+ -webkit-align-items: flex-start;
34
+ align-items: flex-start;
35
+ }
36
+ .arco-skeleton-with-avatar .arco-skeleton-avatar {
37
+ -webkit-box-flex: 0;
38
+ -webkit-flex: none;
39
+ flex: none;
40
+ }
41
+ .arco-skeleton-with-avatar .arco-skeleton-content .arco-skeleton-title {
42
+ margin-top: 0.16rem ;
43
+ }
44
+ .arco-skeleton-with-avatar .arco-skeleton-avatar + .arco-skeleton-content {
45
+ margin-left: 0.16rem ;
46
+ }
47
+ [dir="rtl"] .arco-skeleton-with-avatar .arco-skeleton-avatar + .arco-skeleton-content {
48
+ margin-left: initial;
49
+ margin-right: 0.16rem ;
50
+ }
51
+ .arco-skeleton-grid {
52
+ display: -webkit-box;
53
+ display: -webkit-flex;
54
+ display: flex;
55
+ -webkit-box-pack: justify;
56
+ -webkit-justify-content: space-between;
57
+ justify-content: space-between;
58
+ width: 100%;
59
+ }
60
+ .arco-skeleton-grid-item {
61
+ display: -webkit-box;
62
+ display: -webkit-flex;
63
+ display: flex;
64
+ -webkit-box-orient: vertical;
65
+ -webkit-box-direction: normal;
66
+ -webkit-flex-direction: column;
67
+ flex-direction: column;
68
+ -webkit-box-align: center;
69
+ -webkit-align-items: center;
70
+ align-items: center;
71
+ }
72
+ .arco-skeleton-grid-icon {
73
+ width: 0.64rem ;
74
+ height: 0.64rem ;
75
+ }
76
+ .arco-skeleton-grid-text {
77
+ margin-top: 0.16rem ;
78
+ width: 1.28rem ;
79
+ height: 0.32rem ;
80
+ }
81
+ .arco-skeleton-node {
82
+ display: inline-block;
83
+ }
84
+ .arco-skeleton-item {
85
+ position: relative;
86
+ overflow: hidden;
87
+ border-radius: 0 ;
88
+ background-color: #F2F3F5 ;
89
+ }
90
+ .arco-skeleton-animation-item {
91
+ position: absolute;
92
+ width: 100vw;
93
+ height: 100%;
94
+ top: 0;
95
+ left: 0;
96
+ background-image: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 35%, currentColor 50%, rgba(255, 255, 255, 0) 65%);
97
+ background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 35%, currentColor 50%, rgba(255, 255, 255, 0) 65%);
98
+ -webkit-transform-origin: top left;
99
+ transform-origin: top left;
100
+ -webkit-animation-name: skeleton-gradient;
101
+ animation-name: skeleton-gradient;
102
+ -webkit-animation-iteration-count: infinite;
103
+ animation-iteration-count: infinite;
104
+ -webkit-animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1) ;
105
+ animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1) ;
106
+ -webkit-animation-duration: 1.5s ;
107
+ animation-duration: 1.5s ;
108
+ }
109
+ [dir="rtl"] .arco-skeleton-animation-item {
110
+ -webkit-animation-name: skeleton-gradient-reverse;
111
+ animation-name: skeleton-gradient-reverse;
112
+ }
113
+ .arco-skeleton-animation-breath {
114
+ -webkit-animation: skeleton-breath linear infinite;
115
+ animation: skeleton-breath linear infinite;
116
+ -webkit-animation-duration: 1.5s ;
117
+ animation-duration: 1.5s ;
118
+ }
119
+ @-webkit-keyframes skeleton-gradient {
120
+ 0% {
121
+ -webkit-transform: translateX(-65%) skewX(-45deg);
122
+ transform: translateX(-65%) skewX(-45deg);
123
+ }
124
+ 100% {
125
+ -webkit-transform: translateX(135%) skewX(-45deg);
126
+ transform: translateX(135%) skewX(-45deg);
127
+ }
128
+ }
129
+ @keyframes skeleton-gradient {
130
+ 0% {
131
+ -webkit-transform: translateX(-65%) skewX(-45deg);
132
+ transform: translateX(-65%) skewX(-45deg);
133
+ }
134
+ 100% {
135
+ -webkit-transform: translateX(135%) skewX(-45deg);
136
+ transform: translateX(135%) skewX(-45deg);
137
+ }
138
+ }
139
+ @-webkit-keyframes skeleton-gradient-reverse {
140
+ 0% {
141
+ -webkit-transform: translateX(65%) skewX(45deg);
142
+ transform: translateX(65%) skewX(45deg);
143
+ }
144
+ 100% {
145
+ -webkit-transform: translateX(-135%) skewX(45deg);
146
+ transform: translateX(-135%) skewX(45deg);
147
+ }
148
+ }
149
+ @keyframes skeleton-gradient-reverse {
150
+ 0% {
151
+ -webkit-transform: translateX(65%) skewX(45deg);
152
+ transform: translateX(65%) skewX(45deg);
153
+ }
154
+ 100% {
155
+ -webkit-transform: translateX(-135%) skewX(45deg);
156
+ transform: translateX(-135%) skewX(45deg);
157
+ }
158
+ }
159
+ @-webkit-keyframes skeleton-breath {
160
+ 0% {
161
+ opacity: 1;
162
+ }
163
+ 50% {
164
+ opacity: 0.4 ;
165
+ }
166
+ 100% {
167
+ opacity: 1;
168
+ }
169
+ }
170
+ @keyframes skeleton-breath {
171
+ 0% {
172
+ opacity: 1;
173
+ }
174
+ 50% {
175
+ opacity: 0.4 ;
176
+ }
177
+ 100% {
178
+ opacity: 1;
179
+ }
180
+ }
@@ -0,0 +1,3 @@
1
+ import '../../../../style/css/public.css';
2
+ import '../../../avatar/style/css';
3
+ import './index.css';
@@ -0,0 +1,3 @@
1
+ import '../../../../style/css/public.css';
2
+ import '../../../avatar/style/css';
3
+ import './index.css';
@@ -0,0 +1,3 @@
1
+ import '../../../style/public.less';
2
+ import '../../avatar/style';
3
+ import './index.less';
@@ -0,0 +1,3 @@
1
+ import '../../../style/public.less';
2
+ import '../../avatar/style';
3
+ import './index.less';