@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.
- package/CHANGELOG.md +16 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/grid/style/css/index.css +4 -0
- package/cjs/grid/style/index.less +6 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +5 -1
- package/cjs/skeleton/demo/style/css/mobile.css +7 -0
- package/cjs/skeleton/demo/style/mobile.less +13 -0
- package/cjs/skeleton/elements.d.ts +7 -0
- package/cjs/skeleton/elements.js +302 -0
- package/cjs/skeleton/index.d.ts +18 -0
- package/cjs/skeleton/index.js +100 -0
- package/cjs/skeleton/skeleton-context.d.ts +3 -0
- package/cjs/skeleton/skeleton-context.js +15 -0
- package/cjs/skeleton/style/css/index.css +180 -0
- package/cjs/skeleton/style/css/index.d.ts +3 -0
- package/cjs/skeleton/style/css/index.js +7 -0
- package/cjs/skeleton/style/index.d.ts +3 -0
- package/cjs/skeleton/style/index.js +7 -0
- package/cjs/skeleton/style/index.less +147 -0
- package/cjs/skeleton/type.d.ts +104 -0
- package/cjs/skeleton/type.js +3 -0
- package/cjs/style.d.ts +1 -0
- package/cjs/style.js +2 -0
- package/dist/index.js +390 -34
- package/dist/index.min.js +4 -4
- package/dist/style.css +123 -0
- package/dist/style.min.css +1 -1
- package/esm/grid/style/css/index.css +4 -0
- package/esm/grid/style/index.less +6 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/skeleton/demo/style/css/mobile.css +7 -0
- package/esm/skeleton/demo/style/mobile.less +13 -0
- package/esm/skeleton/elements.d.ts +7 -0
- package/esm/skeleton/elements.js +281 -0
- package/esm/skeleton/index.d.ts +18 -0
- package/esm/skeleton/index.js +82 -0
- package/esm/skeleton/skeleton-context.d.ts +3 -0
- package/esm/skeleton/skeleton-context.js +5 -0
- package/esm/skeleton/style/css/index.css +180 -0
- package/esm/skeleton/style/css/index.d.ts +3 -0
- package/esm/skeleton/style/css/index.js +3 -0
- package/esm/skeleton/style/index.d.ts +3 -0
- package/esm/skeleton/style/index.js +3 -0
- package/esm/skeleton/style/index.less +147 -0
- package/esm/skeleton/type.d.ts +104 -0
- package/esm/skeleton/type.js +1 -0
- package/esm/style.d.ts +1 -0
- package/esm/style.js +1 -0
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +16 -0
- package/tokens/app/arcodesign/default/index.d.ts +16 -0
- package/tokens/app/arcodesign/default/index.js +17 -1
- package/tokens/app/arcodesign/default/index.json +190 -0
- package/tokens/app/arcodesign/default/index.less +16 -0
- package/umd/grid/style/css/index.css +4 -0
- package/umd/grid/style/index.less +6 -0
- package/umd/index.d.ts +1 -0
- package/umd/index.js +7 -5
- package/umd/skeleton/demo/style/css/mobile.css +7 -0
- package/umd/skeleton/demo/style/mobile.less +13 -0
- package/umd/skeleton/elements.d.ts +7 -0
- package/umd/skeleton/elements.js +306 -0
- package/umd/skeleton/index.d.ts +18 -0
- package/umd/skeleton/index.js +104 -0
- package/umd/skeleton/skeleton-context.d.ts +3 -0
- package/umd/skeleton/skeleton-context.js +28 -0
- package/umd/skeleton/style/css/index.css +180 -0
- package/umd/skeleton/style/css/index.d.ts +3 -0
- package/umd/skeleton/style/css/index.js +15 -0
- package/umd/skeleton/style/index.d.ts +3 -0
- package/umd/skeleton/style/index.js +15 -0
- package/umd/skeleton/style/index.less +147 -0
- package/umd/skeleton/type.d.ts +104 -0
- package/umd/skeleton/type.js +17 -0
- package/umd/style.d.ts +1 -0
- package/umd/style.js +4 -4
package/dist/index.js
CHANGED
@@ -6146,7 +6146,7 @@
|
|
6146
6146
|
* @name_en Cell
|
6147
6147
|
*/
|
6148
6148
|
|
6149
|
-
var index$
|
6149
|
+
var index$p = componentWrapper(Cell, {
|
6150
6150
|
Group: Group$4
|
6151
6151
|
});
|
6152
6152
|
|
@@ -7441,7 +7441,7 @@
|
|
7441
7441
|
* @name_en ActionSheet
|
7442
7442
|
*/
|
7443
7443
|
|
7444
|
-
var index$
|
7444
|
+
var index$o = componentWrapper(ActionSheet, methodsGenerator$5(ActionSheetWithGlobalContext));
|
7445
7445
|
|
7446
7446
|
/**
|
7447
7447
|
* 加载中组件,分为四种类型,`circle`为环形,`arc`为弧线,`spin`为旋转,`dot`为圆点。所有类型均可定制颜色,环形和弧线类型可定制线圈半径及粗细,旋转和圆点类型可定制内部元素透明度。
|
@@ -8226,7 +8226,7 @@
|
|
8226
8226
|
* @name_en Avatar
|
8227
8227
|
*/
|
8228
8228
|
|
8229
|
-
var index$
|
8229
|
+
var index$n = componentWrapper(Avatar, {
|
8230
8230
|
Group: Group$3
|
8231
8231
|
});
|
8232
8232
|
|
@@ -10479,7 +10479,7 @@
|
|
10479
10479
|
* @name_en Collapse
|
10480
10480
|
*/
|
10481
10481
|
|
10482
|
-
var index$
|
10482
|
+
var index$m = componentWrapper(Collapse, {
|
10483
10483
|
Group: Group$1
|
10484
10484
|
});
|
10485
10485
|
|
@@ -12164,7 +12164,7 @@
|
|
12164
12164
|
* @displayName DatePicker
|
12165
12165
|
*/
|
12166
12166
|
|
12167
|
-
var index$
|
12167
|
+
var index$l = componentWrapper(DatePicker, 'DatePicker');
|
12168
12168
|
|
12169
12169
|
function normalizeAlert(config) {
|
12170
12170
|
var _a = config || {},
|
@@ -12362,7 +12362,7 @@
|
|
12362
12362
|
* @name_en Dialog
|
12363
12363
|
*/
|
12364
12364
|
|
12365
|
-
var index$
|
12365
|
+
var index$k = componentWrapper(Dialog, methodsGenerator$4(DialogWithGlobalContext));
|
12366
12366
|
|
12367
12367
|
/**
|
12368
12368
|
* 划分内容的装饰线
|
@@ -14174,7 +14174,7 @@
|
|
14174
14174
|
};
|
14175
14175
|
});
|
14176
14176
|
|
14177
|
-
var index$
|
14177
|
+
var index$j = (function () {
|
14178
14178
|
// Export existing implementation if available.
|
14179
14179
|
if (typeof global$1.ResizeObserver !== 'undefined') {
|
14180
14180
|
return global$1.ResizeObserver;
|
@@ -14405,7 +14405,7 @@
|
|
14405
14405
|
React.useEffect(function () {
|
14406
14406
|
if (domRef.current && reflowOnResize) {
|
14407
14407
|
if (!observerRef.current && ellipsis) {
|
14408
|
-
observerRef.current = new index$
|
14408
|
+
observerRef.current = new index$j(reflow);
|
14409
14409
|
observerRef.current.observe(domRef.current);
|
14410
14410
|
}
|
14411
14411
|
}
|
@@ -15335,7 +15335,7 @@
|
|
15335
15335
|
* @name_en Form
|
15336
15336
|
*/
|
15337
15337
|
|
15338
|
-
var index$
|
15338
|
+
var index$i = componentWrapper(Form, {
|
15339
15339
|
Item: Item$1
|
15340
15340
|
});
|
15341
15341
|
|
@@ -17313,7 +17313,7 @@
|
|
17313
17313
|
* @displayName ImagePicker
|
17314
17314
|
*/
|
17315
17315
|
|
17316
|
-
var index$
|
17316
|
+
var index$h = componentWrapper(ImagePicker, 'ImagePicker');
|
17317
17317
|
|
17318
17318
|
/*!
|
17319
17319
|
* @arco-design/transformable v1.0.2
|
@@ -20511,7 +20511,7 @@
|
|
20511
20511
|
* @name_en ImagePreview
|
20512
20512
|
*/
|
20513
20513
|
|
20514
|
-
var index$
|
20514
|
+
var index$g = componentWrapper(ImagePreview, methodsGenerator$3(ImagePreviewWithGlobalContext));
|
20515
20515
|
|
20516
20516
|
var IndexBarContext = /*#__PURE__*/React.createContext({
|
20517
20517
|
sticky: true,
|
@@ -20980,7 +20980,7 @@
|
|
20980
20980
|
* @name_en SearchBar
|
20981
20981
|
*/
|
20982
20982
|
|
20983
|
-
var index$
|
20983
|
+
var index$f = componentWrapper(IndexBar, {
|
20984
20984
|
Group: IndexBarGroup
|
20985
20985
|
});
|
20986
20986
|
|
@@ -21329,7 +21329,7 @@
|
|
21329
21329
|
* @displayName Input
|
21330
21330
|
*/
|
21331
21331
|
|
21332
|
-
var index$
|
21332
|
+
var index$e = componentWrapper(Input, 'Input');
|
21333
21333
|
|
21334
21334
|
// @en let keyboard random
|
21335
21335
|
|
@@ -22132,7 +22132,7 @@
|
|
22132
22132
|
* @name_en Notify
|
22133
22133
|
*/
|
22134
22134
|
|
22135
|
-
var index$
|
22135
|
+
var index$d = componentWrapper(Notify, methodsGenerator$2(NotifyWithGlobalContext));
|
22136
22136
|
|
22137
22137
|
function Arrow() {
|
22138
22138
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
@@ -23544,7 +23544,7 @@
|
|
23544
23544
|
* @type_en Data Display
|
23545
23545
|
*/
|
23546
23546
|
|
23547
|
-
var index$
|
23547
|
+
var index$c = componentWrapper(Popover$1, {
|
23548
23548
|
Menu: Menu
|
23549
23549
|
});
|
23550
23550
|
|
@@ -23810,7 +23810,7 @@
|
|
23810
23810
|
* @name_en PopupSwiper
|
23811
23811
|
*/
|
23812
23812
|
|
23813
|
-
var index$
|
23813
|
+
var index$b = componentWrapper(PopupSwiper, methodsGenerator$1(PopupSwiperWithGlobalContext));
|
23814
23814
|
|
23815
23815
|
/**
|
23816
23816
|
* 进度条组件,可根据外界传递进来的百分比进行进度展示
|
@@ -24661,7 +24661,7 @@
|
|
24661
24661
|
* @displayName Radio
|
24662
24662
|
*/
|
24663
24663
|
|
24664
|
-
var index$
|
24664
|
+
var index$a = componentWrapper(Radio, 'Radio', {
|
24665
24665
|
Group: Group
|
24666
24666
|
});
|
24667
24667
|
|
@@ -24843,7 +24843,7 @@
|
|
24843
24843
|
* @displayName Rate
|
24844
24844
|
*/
|
24845
24845
|
|
24846
|
-
var index$
|
24846
|
+
var index$9 = componentWrapper(Rate, 'Rate');
|
24847
24847
|
|
24848
24848
|
function createHighlightNode(config, index) {
|
24849
24849
|
var keyword = config.keyword,
|
@@ -25218,6 +25218,361 @@
|
|
25218
25218
|
return /*#__PURE__*/React__default["default"].createElement(ContextLayout, null, renderSearchBar);
|
25219
25219
|
});
|
25220
25220
|
|
25221
|
+
var SkeletonContext = /*#__PURE__*/React__default["default"].createContext({
|
25222
|
+
showAnimation: true,
|
25223
|
+
animation: 'gradient'
|
25224
|
+
});
|
25225
|
+
|
25226
|
+
var calcOffset = function calcOffset(dom, useRtl) {
|
25227
|
+
if (!dom) {
|
25228
|
+
return 0;
|
25229
|
+
}
|
25230
|
+
|
25231
|
+
if (useRtl) {
|
25232
|
+
return dom.offsetLeft - dom.offsetTop;
|
25233
|
+
}
|
25234
|
+
|
25235
|
+
return dom.offsetLeft + dom.offsetTop;
|
25236
|
+
};
|
25237
|
+
|
25238
|
+
function useOffset(dom, useRtl) {
|
25239
|
+
var _a = React.useState(),
|
25240
|
+
offset = _a[0],
|
25241
|
+
setOffset = _a[1];
|
25242
|
+
|
25243
|
+
var calcLayout = function calcLayout() {
|
25244
|
+
var _a;
|
25245
|
+
|
25246
|
+
var isList = Array.isArray(dom);
|
25247
|
+
|
25248
|
+
if (!(isList ? dom.length > 0 : (_a = dom) === null || _a === void 0 ? void 0 : _a.current)) {
|
25249
|
+
return;
|
25250
|
+
}
|
25251
|
+
|
25252
|
+
setOffset(isList ? dom.map(function (item) {
|
25253
|
+
return calcOffset(item, useRtl);
|
25254
|
+
}) : calcOffset(dom.current, useRtl));
|
25255
|
+
};
|
25256
|
+
|
25257
|
+
React.useEffect(function () {
|
25258
|
+
nextTick(function () {
|
25259
|
+
calcLayout();
|
25260
|
+
});
|
25261
|
+
}, [dom, useRtl]);
|
25262
|
+
useListenResize(calcLayout);
|
25263
|
+
return offset;
|
25264
|
+
}
|
25265
|
+
|
25266
|
+
var SkeletonNode = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
25267
|
+
var _a = props.className,
|
25268
|
+
className = _a === void 0 ? '' : _a,
|
25269
|
+
style = props.style,
|
25270
|
+
children = props.children;
|
25271
|
+
|
25272
|
+
var _b = React.useContext(GlobalContext),
|
25273
|
+
useRtl = _b.useRtl,
|
25274
|
+
prefixCls = _b.prefixCls;
|
25275
|
+
|
25276
|
+
var _c = React.useContext(SkeletonContext),
|
25277
|
+
backgroundColor = _c.backgroundColor,
|
25278
|
+
showAnimation = _c.showAnimation,
|
25279
|
+
animation = _c.animation;
|
25280
|
+
|
25281
|
+
var domRef = React.useRef(null);
|
25282
|
+
var isGradientAnimation = showAnimation && animation === 'gradient';
|
25283
|
+
var offset = useOffset(isGradientAnimation ? domRef : undefined, useRtl);
|
25284
|
+
React.useImperativeHandle(ref, function () {
|
25285
|
+
return {
|
25286
|
+
dom: domRef.current
|
25287
|
+
};
|
25288
|
+
});
|
25289
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
25290
|
+
className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-node", showAnimation && prefixCls + "-skeleton-animation-" + animation, className),
|
25291
|
+
style: __assign$2({
|
25292
|
+
backgroundColor: backgroundColor
|
25293
|
+
}, style),
|
25294
|
+
ref: domRef
|
25295
|
+
}, children, isGradientAnimation && offset !== undefined && /*#__PURE__*/React__default["default"].createElement("div", {
|
25296
|
+
className: prefixCls + "-skeleton-animation-item",
|
25297
|
+
style: {
|
25298
|
+
left: 0 - offset
|
25299
|
+
}
|
25300
|
+
}));
|
25301
|
+
});
|
25302
|
+
var SkeletonTitle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
25303
|
+
var _a = props.className,
|
25304
|
+
className = _a === void 0 ? '' : _a,
|
25305
|
+
style = props.style,
|
25306
|
+
_b = props.width,
|
25307
|
+
width = _b === void 0 ? '40%' : _b;
|
25308
|
+
|
25309
|
+
var _c = React.useContext(GlobalContext),
|
25310
|
+
useRtl = _c.useRtl,
|
25311
|
+
prefixCls = _c.prefixCls;
|
25312
|
+
|
25313
|
+
var _d = React.useContext(SkeletonContext),
|
25314
|
+
backgroundColor = _d.backgroundColor,
|
25315
|
+
showAnimation = _d.showAnimation,
|
25316
|
+
animation = _d.animation;
|
25317
|
+
|
25318
|
+
var domRef = React.useRef(null);
|
25319
|
+
var isGradientAnimation = showAnimation && animation === 'gradient';
|
25320
|
+
var offset = useOffset(isGradientAnimation ? domRef : undefined, useRtl);
|
25321
|
+
React.useImperativeHandle(ref, function () {
|
25322
|
+
return {
|
25323
|
+
dom: domRef.current
|
25324
|
+
};
|
25325
|
+
});
|
25326
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
25327
|
+
className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-title", showAnimation && prefixCls + "-skeleton-animation-" + animation, className),
|
25328
|
+
style: __assign$2({
|
25329
|
+
width: width,
|
25330
|
+
backgroundColor: backgroundColor
|
25331
|
+
}, style),
|
25332
|
+
ref: domRef
|
25333
|
+
}, isGradientAnimation && offset !== undefined && /*#__PURE__*/React__default["default"].createElement("div", {
|
25334
|
+
className: prefixCls + "-skeleton-animation-item",
|
25335
|
+
style: {
|
25336
|
+
left: 0 - offset
|
25337
|
+
}
|
25338
|
+
}));
|
25339
|
+
});
|
25340
|
+
var SkeletonParagraph = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
25341
|
+
var _a = props.className,
|
25342
|
+
className = _a === void 0 ? '' : _a,
|
25343
|
+
style = props.style,
|
25344
|
+
_b = props.rows,
|
25345
|
+
rows = _b === void 0 ? 3 : _b,
|
25346
|
+
_c = props.width,
|
25347
|
+
width = _c === void 0 ? '60%' : _c;
|
25348
|
+
|
25349
|
+
var _d = React.useContext(GlobalContext),
|
25350
|
+
useRtl = _d.useRtl,
|
25351
|
+
prefixCls = _d.prefixCls;
|
25352
|
+
|
25353
|
+
var _e = React.useContext(SkeletonContext),
|
25354
|
+
backgroundColor = _e.backgroundColor,
|
25355
|
+
showAnimation = _e.showAnimation,
|
25356
|
+
animation = _e.animation;
|
25357
|
+
|
25358
|
+
var domRef = React.useRef(null);
|
25359
|
+
var lineDomRefs = React.useRef([]);
|
25360
|
+
var isGradientAnimation = showAnimation && animation === 'gradient';
|
25361
|
+
var offsets = useOffset(isGradientAnimation ? lineDomRefs.current : undefined, useRtl);
|
25362
|
+
React.useImperativeHandle(ref, function () {
|
25363
|
+
return {
|
25364
|
+
dom: domRef.current
|
25365
|
+
};
|
25366
|
+
});
|
25367
|
+
|
25368
|
+
var getWidth = function getWidth(idx) {
|
25369
|
+
if (isArray(width)) {
|
25370
|
+
return width[idx];
|
25371
|
+
}
|
25372
|
+
|
25373
|
+
if (rows - 1 === idx) {
|
25374
|
+
return width;
|
25375
|
+
}
|
25376
|
+
|
25377
|
+
return undefined;
|
25378
|
+
};
|
25379
|
+
|
25380
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
25381
|
+
className: cls(prefixCls + "-skeleton-paragraph", className),
|
25382
|
+
style: style,
|
25383
|
+
ref: domRef
|
25384
|
+
}, Array.from(new Array(rows)).map(function (_, idx) {
|
25385
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
25386
|
+
key: idx,
|
25387
|
+
className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-paragraph-line", showAnimation && prefixCls + "-skeleton-animation-" + animation),
|
25388
|
+
style: {
|
25389
|
+
width: getWidth(idx),
|
25390
|
+
backgroundColor: backgroundColor
|
25391
|
+
},
|
25392
|
+
ref: function ref(el) {
|
25393
|
+
return el && (lineDomRefs.current[idx] = el);
|
25394
|
+
}
|
25395
|
+
}, isGradientAnimation && offsets !== undefined && /*#__PURE__*/React__default["default"].createElement("div", {
|
25396
|
+
className: prefixCls + "-skeleton-animation-item",
|
25397
|
+
style: {
|
25398
|
+
left: 0 - (offsets[idx] || 0)
|
25399
|
+
}
|
25400
|
+
}));
|
25401
|
+
}));
|
25402
|
+
});
|
25403
|
+
var SkeletonAvatar = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
25404
|
+
var _a = props.className,
|
25405
|
+
className = _a === void 0 ? '' : _a,
|
25406
|
+
style = props.style;
|
25407
|
+
|
25408
|
+
var _b = React.useContext(GlobalContext),
|
25409
|
+
useRtl = _b.useRtl,
|
25410
|
+
prefixCls = _b.prefixCls;
|
25411
|
+
|
25412
|
+
var _c = React.useContext(SkeletonContext),
|
25413
|
+
backgroundColor = _c.backgroundColor,
|
25414
|
+
showAnimation = _c.showAnimation,
|
25415
|
+
animation = _c.animation;
|
25416
|
+
|
25417
|
+
var domRef = React.useRef(null);
|
25418
|
+
var isGradientAnimation = showAnimation && animation === 'gradient';
|
25419
|
+
var offset = useOffset(isGradientAnimation ? domRef : undefined, useRtl);
|
25420
|
+
React.useImperativeHandle(ref, function () {
|
25421
|
+
return {
|
25422
|
+
dom: domRef.current
|
25423
|
+
};
|
25424
|
+
});
|
25425
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
25426
|
+
className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-avatar", showAnimation && prefixCls + "-skeleton-animation-" + animation, className),
|
25427
|
+
style: __assign$2({
|
25428
|
+
backgroundColor: backgroundColor
|
25429
|
+
}, style),
|
25430
|
+
ref: domRef
|
25431
|
+
}, isGradientAnimation && offset !== undefined && /*#__PURE__*/React__default["default"].createElement("div", {
|
25432
|
+
className: prefixCls + "-skeleton-animation-item",
|
25433
|
+
style: {
|
25434
|
+
left: 0 - offset
|
25435
|
+
}
|
25436
|
+
}));
|
25437
|
+
});
|
25438
|
+
var SkeletonGrid = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
25439
|
+
var _a = props.className,
|
25440
|
+
className = _a === void 0 ? '' : _a,
|
25441
|
+
style = props.style,
|
25442
|
+
_b = props.columns,
|
25443
|
+
columns = _b === void 0 ? 4 : _b;
|
25444
|
+
|
25445
|
+
var _c = React.useContext(GlobalContext),
|
25446
|
+
useRtl = _c.useRtl,
|
25447
|
+
prefixCls = _c.prefixCls;
|
25448
|
+
|
25449
|
+
var _d = React.useContext(SkeletonContext),
|
25450
|
+
backgroundColor = _d.backgroundColor,
|
25451
|
+
showAnimation = _d.showAnimation,
|
25452
|
+
animation = _d.animation;
|
25453
|
+
|
25454
|
+
var domRef = React.useRef(null);
|
25455
|
+
var iconDomRefs = React.useRef([]);
|
25456
|
+
var textDomRefs = React.useRef([]);
|
25457
|
+
var isGradientAnimation = showAnimation && animation === 'gradient';
|
25458
|
+
var iconOffsets = useOffset(isGradientAnimation ? iconDomRefs.current : undefined, useRtl);
|
25459
|
+
var textOffsets = useOffset(isGradientAnimation ? textDomRefs.current : undefined, useRtl);
|
25460
|
+
React.useImperativeHandle(ref, function () {
|
25461
|
+
return {
|
25462
|
+
dom: domRef.current
|
25463
|
+
};
|
25464
|
+
});
|
25465
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
25466
|
+
className: cls(prefixCls + "-skeleton-grid", className),
|
25467
|
+
style: style,
|
25468
|
+
ref: domRef
|
25469
|
+
}, Array.from(new Array(columns)).map(function (_, idx) {
|
25470
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
25471
|
+
key: idx,
|
25472
|
+
className: cls(prefixCls + "-skeleton-grid-item")
|
25473
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
25474
|
+
className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-grid-icon", showAnimation && prefixCls + "-skeleton-animation-" + animation),
|
25475
|
+
style: {
|
25476
|
+
backgroundColor: backgroundColor
|
25477
|
+
},
|
25478
|
+
ref: function ref(el) {
|
25479
|
+
return el && (iconDomRefs.current[idx] = el);
|
25480
|
+
}
|
25481
|
+
}, isGradientAnimation && iconOffsets !== undefined && /*#__PURE__*/React__default["default"].createElement("div", {
|
25482
|
+
className: prefixCls + "-skeleton-animation-item",
|
25483
|
+
style: {
|
25484
|
+
left: 0 - ((iconOffsets === null || iconOffsets === void 0 ? void 0 : iconOffsets[idx]) || 0)
|
25485
|
+
}
|
25486
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
25487
|
+
className: cls(prefixCls + "-skeleton-item", prefixCls + "-skeleton-grid-text", showAnimation && prefixCls + "-skeleton-animation-" + animation),
|
25488
|
+
style: {
|
25489
|
+
backgroundColor: backgroundColor
|
25490
|
+
},
|
25491
|
+
ref: function ref(el) {
|
25492
|
+
return el && (textDomRefs.current[idx] = el);
|
25493
|
+
}
|
25494
|
+
}, isGradientAnimation && textOffsets !== undefined && /*#__PURE__*/React__default["default"].createElement("div", {
|
25495
|
+
className: prefixCls + "-skeleton-animation-item",
|
25496
|
+
style: {
|
25497
|
+
left: 0 - ((textOffsets === null || textOffsets === void 0 ? void 0 : textOffsets[idx]) || 0)
|
25498
|
+
}
|
25499
|
+
})));
|
25500
|
+
}));
|
25501
|
+
});
|
25502
|
+
|
25503
|
+
function getComponentProps(prop) {
|
25504
|
+
if (prop && typeof prop === 'object') {
|
25505
|
+
return prop;
|
25506
|
+
}
|
25507
|
+
|
25508
|
+
return {};
|
25509
|
+
}
|
25510
|
+
|
25511
|
+
var Skeleton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
25512
|
+
var _a;
|
25513
|
+
|
25514
|
+
var _b = props.className,
|
25515
|
+
className = _b === void 0 ? '' : _b,
|
25516
|
+
style = props.style,
|
25517
|
+
children = props.children,
|
25518
|
+
_c = props.title,
|
25519
|
+
title = _c === void 0 ? true : _c,
|
25520
|
+
_d = props.paragraph,
|
25521
|
+
paragraph = _d === void 0 ? true : _d,
|
25522
|
+
_e = props.avatar,
|
25523
|
+
avatar = _e === void 0 ? false : _e,
|
25524
|
+
grid = props.grid,
|
25525
|
+
_f = props.showAnimation,
|
25526
|
+
showAnimation = _f === void 0 ? true : _f,
|
25527
|
+
_g = props.animation,
|
25528
|
+
animation = _g === void 0 ? 'gradient' : _g,
|
25529
|
+
animationGradientColor = props.animationGradientColor,
|
25530
|
+
backgroundColor = props.backgroundColor;
|
25531
|
+
var domRef = React.useRef(null);
|
25532
|
+
var prefixCls = React.useContext(GlobalContext).prefixCls;
|
25533
|
+
React.useImperativeHandle(ref, function () {
|
25534
|
+
return {
|
25535
|
+
dom: domRef.current
|
25536
|
+
};
|
25537
|
+
});
|
25538
|
+
var isGrid = !!grid;
|
25539
|
+
var hasTitle = !!title;
|
25540
|
+
var hasParagraph = !!paragraph;
|
25541
|
+
var hasAvatar = !!avatar;
|
25542
|
+
var content = isGrid ? /*#__PURE__*/React__default["default"].createElement(SkeletonGrid, __assign$2({}, getComponentProps(grid))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, hasAvatar && /*#__PURE__*/React__default["default"].createElement(SkeletonAvatar, __assign$2({}, getComponentProps(avatar))), (hasTitle || hasParagraph) && /*#__PURE__*/React__default["default"].createElement("div", {
|
25543
|
+
className: prefixCls + "-skeleton-content"
|
25544
|
+
}, hasTitle && /*#__PURE__*/React__default["default"].createElement(SkeletonTitle, __assign$2({}, getComponentProps(title))), hasParagraph && /*#__PURE__*/React__default["default"].createElement(SkeletonParagraph, __assign$2({}, getComponentProps(paragraph)))));
|
25545
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
25546
|
+
className: cls(prefixCls + "-skeleton", (_a = {}, _a[prefixCls + "-skeleton-with-avatar"] = hasAvatar, _a), className),
|
25547
|
+
style: __assign$2({
|
25548
|
+
color: animationGradientColor
|
25549
|
+
}, style),
|
25550
|
+
ref: domRef
|
25551
|
+
}, /*#__PURE__*/React__default["default"].createElement(SkeletonContext.Provider, {
|
25552
|
+
value: {
|
25553
|
+
showAnimation: showAnimation,
|
25554
|
+
animation: animation,
|
25555
|
+
backgroundColor: backgroundColor
|
25556
|
+
}
|
25557
|
+
}, content, children));
|
25558
|
+
});
|
25559
|
+
/**
|
25560
|
+
* 在内容加载过程中展示一组占位图形。
|
25561
|
+
* @en Display a set of placeholder graphics during content loading
|
25562
|
+
* @type 信息展示
|
25563
|
+
* @type_en Data Display
|
25564
|
+
* @name 骨架屏
|
25565
|
+
* @name_en Skeleton
|
25566
|
+
*/
|
25567
|
+
|
25568
|
+
var index$8 = componentWrapper(Skeleton, {
|
25569
|
+
Node: SkeletonNode,
|
25570
|
+
Title: SkeletonTitle,
|
25571
|
+
Paragraph: SkeletonParagraph,
|
25572
|
+
Avatar: SkeletonAvatar,
|
25573
|
+
Grid: SkeletonGrid
|
25574
|
+
});
|
25575
|
+
|
25221
25576
|
var LISTEN_FLAG = 'data-show-listened';
|
25222
25577
|
/**
|
25223
25578
|
* 父 dom 节点集合
|
@@ -28503,50 +28858,51 @@
|
|
28503
28858
|
|
28504
28859
|
var index = componentWrapper(Toast, methodsGenerator(ToastWithGlobalContext));
|
28505
28860
|
|
28506
|
-
exports.ActionSheet = index$
|
28507
|
-
exports.Avatar = index$
|
28861
|
+
exports.ActionSheet = index$o;
|
28862
|
+
exports.Avatar = index$n;
|
28508
28863
|
exports.Badge = Badge;
|
28509
28864
|
exports.Button = Button;
|
28510
28865
|
exports.Carousel = Carousel;
|
28511
|
-
exports.Cell = index$
|
28866
|
+
exports.Cell = index$p;
|
28512
28867
|
exports.Checkbox = Checkbox;
|
28513
28868
|
exports.CircleProgress = CircleProgress;
|
28514
|
-
exports.Collapse = index$
|
28869
|
+
exports.Collapse = index$m;
|
28515
28870
|
exports.ContextProvider = ContextProvider;
|
28516
28871
|
exports.CountDown = CountDown;
|
28517
|
-
exports.DatePicker = index$
|
28518
|
-
exports.Dialog = index$
|
28872
|
+
exports.DatePicker = index$l;
|
28873
|
+
exports.Dialog = index$k;
|
28519
28874
|
exports.Divider = Divider;
|
28520
28875
|
exports.Dropdown = Dropdown$1;
|
28521
28876
|
exports.DropdownMenu = DropdownMenu;
|
28522
28877
|
exports.Ellipsis = Ellipsis;
|
28523
|
-
exports.Form = index$
|
28878
|
+
exports.Form = index$i;
|
28524
28879
|
exports.Grid = Grid;
|
28525
28880
|
exports.Image = BaseImage;
|
28526
|
-
exports.ImagePicker = index$
|
28527
|
-
exports.ImagePreview = index$
|
28528
|
-
exports.IndexBar = index$
|
28529
|
-
exports.Input = index$
|
28881
|
+
exports.ImagePicker = index$h;
|
28882
|
+
exports.ImagePreview = index$g;
|
28883
|
+
exports.IndexBar = index$f;
|
28884
|
+
exports.Input = index$e;
|
28530
28885
|
exports.Keyboard = Keyboard;
|
28531
28886
|
exports.LoadMore = LoadMore;
|
28532
28887
|
exports.Loading = Loading;
|
28533
28888
|
exports.Masking = Masking$1;
|
28534
28889
|
exports.NavBar = NavBar;
|
28535
28890
|
exports.NoticeBar = NoticeBar;
|
28536
|
-
exports.Notify = index$
|
28891
|
+
exports.Notify = index$d;
|
28537
28892
|
exports.Pagination = Pagination;
|
28538
28893
|
exports.Picker = Picker$1;
|
28539
28894
|
exports.PickerView = PickerView$1;
|
28540
|
-
exports.Popover = index$
|
28895
|
+
exports.Popover = index$c;
|
28541
28896
|
exports.Popup = Popup$1;
|
28542
|
-
exports.PopupSwiper = index$
|
28897
|
+
exports.PopupSwiper = index$b;
|
28543
28898
|
exports.Portal = Portal;
|
28544
28899
|
exports.Progress = Progress;
|
28545
28900
|
exports.PullRefresh = PullRefresh;
|
28546
|
-
exports.Radio = index$
|
28547
|
-
exports.Rate = index$
|
28901
|
+
exports.Radio = index$a;
|
28902
|
+
exports.Rate = index$9;
|
28548
28903
|
exports.SearchBar = SearchBar;
|
28549
28904
|
exports.ShowMonitor = ShowMonitor;
|
28905
|
+
exports.Skeleton = index$8;
|
28550
28906
|
exports.Slider = index$7;
|
28551
28907
|
exports.Stepper = index$6;
|
28552
28908
|
exports.Steps = index$5;
|