@sheinx/base 3.7.0-beta.18 → 3.7.0-beta.19
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/cjs/index.d.ts +1 -0
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +12 -0
- package/cjs/skeleton/button.d.ts +8 -0
- package/cjs/skeleton/button.d.ts.map +1 -0
- package/cjs/skeleton/button.js +34 -0
- package/cjs/skeleton/image.d.ts +8 -0
- package/cjs/skeleton/image.d.ts.map +1 -0
- package/cjs/skeleton/image.js +27 -0
- package/cjs/skeleton/index.d.ts +3 -0
- package/cjs/skeleton/index.d.ts.map +1 -0
- package/cjs/skeleton/index.js +20 -0
- package/cjs/skeleton/skeleton.d.ts +5 -0
- package/cjs/skeleton/skeleton.d.ts.map +1 -0
- package/cjs/skeleton/skeleton.js +58 -0
- package/cjs/skeleton/skeleton.type.d.ts +125 -0
- package/cjs/skeleton/skeleton.type.d.ts.map +1 -0
- package/cjs/skeleton/skeleton.type.js +5 -0
- package/cjs/skeleton/text.d.ts +8 -0
- package/cjs/skeleton/text.d.ts.map +1 -0
- package/cjs/skeleton/text.js +53 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/skeleton/button.d.ts +8 -0
- package/esm/skeleton/button.d.ts.map +1 -0
- package/esm/skeleton/button.js +27 -0
- package/esm/skeleton/image.d.ts +8 -0
- package/esm/skeleton/image.d.ts.map +1 -0
- package/esm/skeleton/image.js +20 -0
- package/esm/skeleton/index.d.ts +3 -0
- package/esm/skeleton/index.d.ts.map +1 -0
- package/esm/skeleton/index.js +2 -0
- package/esm/skeleton/skeleton.d.ts +5 -0
- package/esm/skeleton/skeleton.d.ts.map +1 -0
- package/esm/skeleton/skeleton.js +52 -0
- package/esm/skeleton/skeleton.type.d.ts +125 -0
- package/esm/skeleton/skeleton.type.d.ts.map +1 -0
- package/esm/skeleton/skeleton.type.js +1 -0
- package/esm/skeleton/text.d.ts +8 -0
- package/esm/skeleton/text.d.ts.map +1 -0
- package/esm/skeleton/text.js +46 -0
- package/package.json +2 -2
package/cjs/index.d.ts
CHANGED
package/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACz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AAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AAEzB,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
package/cjs/index.js
CHANGED
|
@@ -452,6 +452,18 @@ Object.keys(_select).forEach(function (key) {
|
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
});
|
|
455
|
+
var _skeleton = require("./skeleton");
|
|
456
|
+
Object.keys(_skeleton).forEach(function (key) {
|
|
457
|
+
if (key === "default" || key === "__esModule") return;
|
|
458
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
459
|
+
if (key in exports && exports[key] === _skeleton[key]) return;
|
|
460
|
+
Object.defineProperty(exports, key, {
|
|
461
|
+
enumerable: true,
|
|
462
|
+
get: function get() {
|
|
463
|
+
return _skeleton[key];
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
});
|
|
455
467
|
var _slider = require("./slider");
|
|
456
468
|
Object.keys(_slider).forEach(function (key) {
|
|
457
469
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonClasses, SkeletonButtonProps } from './skeleton.type';
|
|
3
|
+
interface ButtonProps extends SkeletonButtonProps {
|
|
4
|
+
classes: SkeletonClasses;
|
|
5
|
+
}
|
|
6
|
+
export default function Button({ classes, className, size, position, count, style, }: ButtonProps): JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,UAAU,WAAY,SAAQ,mBAAmB;IAC/C,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,OAAO,EACP,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,KAAS,EACT,KAAK,GACN,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAmB3B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Button;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
|
+
function Button(_ref) {
|
|
15
|
+
var classes = _ref.classes,
|
|
16
|
+
className = _ref.className,
|
|
17
|
+
size = _ref.size,
|
|
18
|
+
position = _ref.position,
|
|
19
|
+
_ref$count = _ref.count,
|
|
20
|
+
count = _ref$count === void 0 ? 1 : _ref$count,
|
|
21
|
+
style = _ref.style;
|
|
22
|
+
var cls = (0, _classnames.default)(classes.button, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.buttonLeft, position !== 'right'), classes.buttonRight, position === 'right'), classes.buttonSmall, size === 'small'), classes.buttonLarge, size === 'large'), className);
|
|
23
|
+
var buttons = [];
|
|
24
|
+
for (var i = 0; i < count; i++) {
|
|
25
|
+
buttons.push( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
26
|
+
className: classes.buttonItem
|
|
27
|
+
}, i));
|
|
28
|
+
}
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
|
+
className: cls,
|
|
31
|
+
style: style,
|
|
32
|
+
children: buttons
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonClasses, SkeletonImageProps } from './skeleton.type';
|
|
3
|
+
interface ImageProps extends SkeletonImageProps {
|
|
4
|
+
classes: SkeletonClasses;
|
|
5
|
+
}
|
|
6
|
+
export default function Image({ classes, className, size, position, shape, style }: ImageProps): JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["image.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEtE,UAAU,UAAW,SAAQ,kBAAkB;IAC7C,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAgB,EAAE,KAAK,EAAE,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAWtH"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Image;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
|
+
function Image(_ref) {
|
|
15
|
+
var classes = _ref.classes,
|
|
16
|
+
className = _ref.className,
|
|
17
|
+
size = _ref.size,
|
|
18
|
+
position = _ref.position,
|
|
19
|
+
_ref$shape = _ref.shape,
|
|
20
|
+
shape = _ref$shape === void 0 ? 'circle' : _ref$shape,
|
|
21
|
+
style = _ref.style;
|
|
22
|
+
var cls = (0, _classnames.default)(classes.image, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.imageLeft, position !== 'right'), classes.imageRight, position === 'right'), classes.imageCircle, shape === 'circle'), classes.imageSquare, shape === 'square'), classes.imageSmall, size === 'small'), classes.imageLarge, size === 'large'), className);
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
24
|
+
className: cls,
|
|
25
|
+
style: style
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "Skeleton", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _skeleton.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "default", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _skeleton.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var _skeleton = _interopRequireDefault(require("./skeleton"));
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonProps } from './skeleton.type';
|
|
3
|
+
declare const Skeleton: (props: SkeletonProps) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
4
|
+
export default Skeleton;
|
|
5
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["skeleton.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAmB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AASjE,QAAA,MAAM,QAAQ,UAAW,aAAa,iIA6BrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _hooks = require("@sheinx/hooks");
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _text = _interopRequireDefault(require("./text"));
|
|
10
|
+
var _image = _interopRequireDefault(require("./image"));
|
|
11
|
+
var _button = _interopRequireDefault(require("./button"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
+
function getComponentProps(prop) {
|
|
21
|
+
return _hooks.util.isObject(prop) ? prop : {};
|
|
22
|
+
}
|
|
23
|
+
var Skeleton = function Skeleton(props) {
|
|
24
|
+
var _jssStyle$skeleton;
|
|
25
|
+
var animation = props.animation,
|
|
26
|
+
image = props.image,
|
|
27
|
+
button = props.button,
|
|
28
|
+
_props$text = props.text,
|
|
29
|
+
text = _props$text === void 0 ? true : _props$text,
|
|
30
|
+
children = props.children,
|
|
31
|
+
loading = props.loading,
|
|
32
|
+
jssStyle = props.jssStyle;
|
|
33
|
+
var classes = jssStyle === null || jssStyle === void 0 || (_jssStyle$skeleton = jssStyle.skeleton) === null || _jssStyle$skeleton === void 0 ? void 0 : _jssStyle$skeleton.call(jssStyle);
|
|
34
|
+
var rootClass = (0, _classnames.default)(classes.rootClass, classes.wrapper, props.className, _defineProperty({}, classes.animation, animation));
|
|
35
|
+
var imageProps = getComponentProps(image);
|
|
36
|
+
var textProps = getComponentProps(text);
|
|
37
|
+
var buttonProps = getComponentProps(button);
|
|
38
|
+
if (loading) {
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
40
|
+
className: rootClass,
|
|
41
|
+
style: props.style,
|
|
42
|
+
children: [image && imageProps.position !== 'right' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_image.default, _objectSpread({
|
|
43
|
+
classes: classes
|
|
44
|
+
}, imageProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
45
|
+
className: classes.content,
|
|
46
|
+
children: [text && /*#__PURE__*/(0, _jsxRuntime.jsx)(_text.default, _objectSpread({
|
|
47
|
+
classes: classes
|
|
48
|
+
}, textProps)), button && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, _objectSpread({
|
|
49
|
+
classes: classes
|
|
50
|
+
}, buttonProps))]
|
|
51
|
+
}), image && imageProps.position === 'right' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_image.default, _objectSpread({
|
|
52
|
+
classes: classes
|
|
53
|
+
}, imageProps))]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return children;
|
|
57
|
+
};
|
|
58
|
+
var _default = exports.default = Skeleton;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonType } from '../common/type';
|
|
3
|
+
export interface SkeletonClasses {
|
|
4
|
+
rootClass: string;
|
|
5
|
+
wrapper: string;
|
|
6
|
+
content: string;
|
|
7
|
+
animation: string;
|
|
8
|
+
text: string;
|
|
9
|
+
textItem: string;
|
|
10
|
+
button: string;
|
|
11
|
+
buttonItem: string;
|
|
12
|
+
buttonLeft: string;
|
|
13
|
+
buttonRight: string;
|
|
14
|
+
buttonSmall: string;
|
|
15
|
+
buttonLarge: string;
|
|
16
|
+
image: string;
|
|
17
|
+
imageLeft: string;
|
|
18
|
+
imageRight: string;
|
|
19
|
+
imageCircle: string;
|
|
20
|
+
imageSquare: string;
|
|
21
|
+
imageSmall: string;
|
|
22
|
+
imageLarge: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SkeletonTextProps {
|
|
25
|
+
/**
|
|
26
|
+
* 文本行数
|
|
27
|
+
*/
|
|
28
|
+
rows?: number;
|
|
29
|
+
/**
|
|
30
|
+
* 文本宽度
|
|
31
|
+
*/
|
|
32
|
+
width?: string | number | Array<string | number>;
|
|
33
|
+
/**
|
|
34
|
+
* 文本高度
|
|
35
|
+
*/
|
|
36
|
+
height?: number | Array<number>;
|
|
37
|
+
/**
|
|
38
|
+
* 自定义className
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
/**
|
|
42
|
+
* 自定义style
|
|
43
|
+
*/
|
|
44
|
+
style?: React.CSSProperties;
|
|
45
|
+
}
|
|
46
|
+
export interface SkeletonImageProps {
|
|
47
|
+
/**
|
|
48
|
+
* 图片位置
|
|
49
|
+
*/
|
|
50
|
+
position?: 'left' | 'right';
|
|
51
|
+
/**
|
|
52
|
+
* 图片形状
|
|
53
|
+
*/
|
|
54
|
+
shape?: 'circle' | 'square';
|
|
55
|
+
/**
|
|
56
|
+
* 图片大小,小尺寸-40px,默认-64px, 大尺寸-80px
|
|
57
|
+
*/
|
|
58
|
+
size?: 'small' | 'default' | 'large';
|
|
59
|
+
/**
|
|
60
|
+
* 自定义className
|
|
61
|
+
*/
|
|
62
|
+
className?: string;
|
|
63
|
+
/**
|
|
64
|
+
* 自定义style
|
|
65
|
+
*/
|
|
66
|
+
style?: React.CSSProperties;
|
|
67
|
+
}
|
|
68
|
+
export interface SkeletonButtonProps {
|
|
69
|
+
/**
|
|
70
|
+
* 按钮位置
|
|
71
|
+
*/
|
|
72
|
+
position?: 'left' | 'right';
|
|
73
|
+
/**
|
|
74
|
+
* 按钮数量
|
|
75
|
+
*/
|
|
76
|
+
count?: number;
|
|
77
|
+
/**
|
|
78
|
+
* 按钮尺寸
|
|
79
|
+
*/
|
|
80
|
+
size?: 'small' | 'default' | 'large';
|
|
81
|
+
/**
|
|
82
|
+
* 自定义className
|
|
83
|
+
*/
|
|
84
|
+
className?: string;
|
|
85
|
+
/**
|
|
86
|
+
* 自定义style
|
|
87
|
+
*/
|
|
88
|
+
style?: React.CSSProperties;
|
|
89
|
+
}
|
|
90
|
+
export interface SkeletonProps extends Pick<CommonType, 'className' | 'style'> {
|
|
91
|
+
jssStyle?: {
|
|
92
|
+
skeleton: () => SkeletonClasses;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* @en Whether to enable animation effects
|
|
96
|
+
* @cn 是否开启动画效果
|
|
97
|
+
*/
|
|
98
|
+
animation?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* @en Whether to load, when true, show the skeleton screen
|
|
101
|
+
* @cn 是否加载中,为true时,显示骨架屏
|
|
102
|
+
*/
|
|
103
|
+
loading?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* @en Real content
|
|
106
|
+
* @cn 真实内容
|
|
107
|
+
*/
|
|
108
|
+
children?: React.ReactNode;
|
|
109
|
+
/**
|
|
110
|
+
* @en Whether to show text
|
|
111
|
+
* @cn 是否显示文本或段落
|
|
112
|
+
*/
|
|
113
|
+
text?: SkeletonTextProps | boolean;
|
|
114
|
+
/**
|
|
115
|
+
* @en Whether to show image
|
|
116
|
+
* @cn 是否显示图片
|
|
117
|
+
*/
|
|
118
|
+
image?: SkeletonImageProps | boolean;
|
|
119
|
+
/**
|
|
120
|
+
* @en Whether to show button
|
|
121
|
+
* @cn 是否显示按钮
|
|
122
|
+
*/
|
|
123
|
+
button?: SkeletonButtonProps | boolean;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=skeleton.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.type.d.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;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,CAAC;IAC5E,QAAQ,CAAC,EAAE;QACT,QAAQ,EAAE,MAAM,eAAe,CAAC;KACjC,CAAC;IAEF;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;OAGG;IACH,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC;IAEnC;;;OAGG;IACH,KAAK,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC;IAErC;;;OAGG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC;CACxC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonClasses, SkeletonTextProps } from './skeleton.type';
|
|
3
|
+
interface TextProps extends SkeletonTextProps {
|
|
4
|
+
classes: SkeletonClasses;
|
|
5
|
+
}
|
|
6
|
+
export default function Text({ classes, className, rows, width, height, style }: TextProps): JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["text.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGrE,UAAU,SAAU,SAAQ,iBAAiB;IAC3C,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CA8B3G"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Text;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _hooks = require("@sheinx/hooks");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function Text(_ref) {
|
|
12
|
+
var classes = _ref.classes,
|
|
13
|
+
className = _ref.className,
|
|
14
|
+
_ref$rows = _ref.rows,
|
|
15
|
+
rows = _ref$rows === void 0 ? 3 : _ref$rows,
|
|
16
|
+
width = _ref.width,
|
|
17
|
+
height = _ref.height,
|
|
18
|
+
style = _ref.style;
|
|
19
|
+
var cls = (0, _classnames.default)(classes.text, className);
|
|
20
|
+
var nodes = [];
|
|
21
|
+
function getTextWidth(index) {
|
|
22
|
+
if (_hooks.util.isArray(width)) {
|
|
23
|
+
return width[index];
|
|
24
|
+
}
|
|
25
|
+
if (rows - 1 === index) {
|
|
26
|
+
return width;
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
function getTextHeight(index) {
|
|
31
|
+
if (_hooks.util.isArray(height)) {
|
|
32
|
+
return height[index];
|
|
33
|
+
}
|
|
34
|
+
if (rows - 1 === index) {
|
|
35
|
+
return height;
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
for (var i = 0; i < rows; i++) {
|
|
40
|
+
nodes.push( /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
41
|
+
className: classes.textItem,
|
|
42
|
+
style: {
|
|
43
|
+
width: getTextWidth(i),
|
|
44
|
+
height: getTextHeight(i)
|
|
45
|
+
}
|
|
46
|
+
}, i));
|
|
47
|
+
}
|
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
49
|
+
className: cls,
|
|
50
|
+
style: style,
|
|
51
|
+
children: nodes
|
|
52
|
+
});
|
|
53
|
+
}
|
package/esm/index.d.ts
CHANGED
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ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2
|
+
import { SkeletonClasses, SkeletonButtonProps } from './skeleton.type';
|
|
3
|
+
interface ButtonProps extends SkeletonButtonProps {
|
|
4
|
+
classes: SkeletonClasses;
|
|
5
|
+
}
|
|
6
|
+
export default function Button({ classes, className, size, position, count, style, }: ButtonProps): JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,UAAU,WAAY,SAAQ,mBAAmB;IAC/C,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,OAAO,EACP,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,KAAS,EACT,KAAK,GACN,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAmB3B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export default function Button(_ref) {
|
|
8
|
+
var classes = _ref.classes,
|
|
9
|
+
className = _ref.className,
|
|
10
|
+
size = _ref.size,
|
|
11
|
+
position = _ref.position,
|
|
12
|
+
_ref$count = _ref.count,
|
|
13
|
+
count = _ref$count === void 0 ? 1 : _ref$count,
|
|
14
|
+
style = _ref.style;
|
|
15
|
+
var cls = classNames(classes.button, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.buttonLeft, position !== 'right'), classes.buttonRight, position === 'right'), classes.buttonSmall, size === 'small'), classes.buttonLarge, size === 'large'), className);
|
|
16
|
+
var buttons = [];
|
|
17
|
+
for (var i = 0; i < count; i++) {
|
|
18
|
+
buttons.push( /*#__PURE__*/_jsx("div", {
|
|
19
|
+
className: classes.buttonItem
|
|
20
|
+
}, i));
|
|
21
|
+
}
|
|
22
|
+
return /*#__PURE__*/_jsx("div", {
|
|
23
|
+
className: cls,
|
|
24
|
+
style: style,
|
|
25
|
+
children: buttons
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonClasses, SkeletonImageProps } from './skeleton.type';
|
|
3
|
+
interface ImageProps extends SkeletonImageProps {
|
|
4
|
+
classes: SkeletonClasses;
|
|
5
|
+
}
|
|
6
|
+
export default function Image({ classes, className, size, position, shape, style }: ImageProps): JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["image.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEtE,UAAU,UAAW,SAAQ,kBAAkB;IAC7C,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAgB,EAAE,KAAK,EAAE,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAWtH"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export default function Image(_ref) {
|
|
8
|
+
var classes = _ref.classes,
|
|
9
|
+
className = _ref.className,
|
|
10
|
+
size = _ref.size,
|
|
11
|
+
position = _ref.position,
|
|
12
|
+
_ref$shape = _ref.shape,
|
|
13
|
+
shape = _ref$shape === void 0 ? 'circle' : _ref$shape,
|
|
14
|
+
style = _ref.style;
|
|
15
|
+
var cls = classNames(classes.image, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.imageLeft, position !== 'right'), classes.imageRight, position === 'right'), classes.imageCircle, shape === 'circle'), classes.imageSquare, shape === 'square'), classes.imageSmall, size === 'small'), classes.imageLarge, size === 'large'), className);
|
|
16
|
+
return /*#__PURE__*/_jsx("div", {
|
|
17
|
+
className: cls,
|
|
18
|
+
style: style
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonProps } from './skeleton.type';
|
|
3
|
+
declare const Skeleton: (props: SkeletonProps) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
4
|
+
export default Skeleton;
|
|
5
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["skeleton.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAmB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AASjE,QAAA,MAAM,QAAQ,UAAW,aAAa,iIA6BrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { util } from '@sheinx/hooks';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import Text from "./text";
|
|
10
|
+
import Image from "./image";
|
|
11
|
+
import Button from "./button";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
function getComponentProps(prop) {
|
|
15
|
+
return util.isObject(prop) ? prop : {};
|
|
16
|
+
}
|
|
17
|
+
var Skeleton = function Skeleton(props) {
|
|
18
|
+
var _jssStyle$skeleton;
|
|
19
|
+
var animation = props.animation,
|
|
20
|
+
image = props.image,
|
|
21
|
+
button = props.button,
|
|
22
|
+
_props$text = props.text,
|
|
23
|
+
text = _props$text === void 0 ? true : _props$text,
|
|
24
|
+
children = props.children,
|
|
25
|
+
loading = props.loading,
|
|
26
|
+
jssStyle = props.jssStyle;
|
|
27
|
+
var classes = jssStyle === null || jssStyle === void 0 || (_jssStyle$skeleton = jssStyle.skeleton) === null || _jssStyle$skeleton === void 0 ? void 0 : _jssStyle$skeleton.call(jssStyle);
|
|
28
|
+
var rootClass = classNames(classes.rootClass, classes.wrapper, props.className, _defineProperty({}, classes.animation, animation));
|
|
29
|
+
var imageProps = getComponentProps(image);
|
|
30
|
+
var textProps = getComponentProps(text);
|
|
31
|
+
var buttonProps = getComponentProps(button);
|
|
32
|
+
if (loading) {
|
|
33
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
34
|
+
className: rootClass,
|
|
35
|
+
style: props.style,
|
|
36
|
+
children: [image && imageProps.position !== 'right' && /*#__PURE__*/_jsx(Image, _objectSpread({
|
|
37
|
+
classes: classes
|
|
38
|
+
}, imageProps)), /*#__PURE__*/_jsxs("div", {
|
|
39
|
+
className: classes.content,
|
|
40
|
+
children: [text && /*#__PURE__*/_jsx(Text, _objectSpread({
|
|
41
|
+
classes: classes
|
|
42
|
+
}, textProps)), button && /*#__PURE__*/_jsx(Button, _objectSpread({
|
|
43
|
+
classes: classes
|
|
44
|
+
}, buttonProps))]
|
|
45
|
+
}), image && imageProps.position === 'right' && /*#__PURE__*/_jsx(Image, _objectSpread({
|
|
46
|
+
classes: classes
|
|
47
|
+
}, imageProps))]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return children;
|
|
51
|
+
};
|
|
52
|
+
export default Skeleton;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonType } from '../common/type';
|
|
3
|
+
export interface SkeletonClasses {
|
|
4
|
+
rootClass: string;
|
|
5
|
+
wrapper: string;
|
|
6
|
+
content: string;
|
|
7
|
+
animation: string;
|
|
8
|
+
text: string;
|
|
9
|
+
textItem: string;
|
|
10
|
+
button: string;
|
|
11
|
+
buttonItem: string;
|
|
12
|
+
buttonLeft: string;
|
|
13
|
+
buttonRight: string;
|
|
14
|
+
buttonSmall: string;
|
|
15
|
+
buttonLarge: string;
|
|
16
|
+
image: string;
|
|
17
|
+
imageLeft: string;
|
|
18
|
+
imageRight: string;
|
|
19
|
+
imageCircle: string;
|
|
20
|
+
imageSquare: string;
|
|
21
|
+
imageSmall: string;
|
|
22
|
+
imageLarge: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SkeletonTextProps {
|
|
25
|
+
/**
|
|
26
|
+
* 文本行数
|
|
27
|
+
*/
|
|
28
|
+
rows?: number;
|
|
29
|
+
/**
|
|
30
|
+
* 文本宽度
|
|
31
|
+
*/
|
|
32
|
+
width?: string | number | Array<string | number>;
|
|
33
|
+
/**
|
|
34
|
+
* 文本高度
|
|
35
|
+
*/
|
|
36
|
+
height?: number | Array<number>;
|
|
37
|
+
/**
|
|
38
|
+
* 自定义className
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
/**
|
|
42
|
+
* 自定义style
|
|
43
|
+
*/
|
|
44
|
+
style?: React.CSSProperties;
|
|
45
|
+
}
|
|
46
|
+
export interface SkeletonImageProps {
|
|
47
|
+
/**
|
|
48
|
+
* 图片位置
|
|
49
|
+
*/
|
|
50
|
+
position?: 'left' | 'right';
|
|
51
|
+
/**
|
|
52
|
+
* 图片形状
|
|
53
|
+
*/
|
|
54
|
+
shape?: 'circle' | 'square';
|
|
55
|
+
/**
|
|
56
|
+
* 图片大小,小尺寸-40px,默认-64px, 大尺寸-80px
|
|
57
|
+
*/
|
|
58
|
+
size?: 'small' | 'default' | 'large';
|
|
59
|
+
/**
|
|
60
|
+
* 自定义className
|
|
61
|
+
*/
|
|
62
|
+
className?: string;
|
|
63
|
+
/**
|
|
64
|
+
* 自定义style
|
|
65
|
+
*/
|
|
66
|
+
style?: React.CSSProperties;
|
|
67
|
+
}
|
|
68
|
+
export interface SkeletonButtonProps {
|
|
69
|
+
/**
|
|
70
|
+
* 按钮位置
|
|
71
|
+
*/
|
|
72
|
+
position?: 'left' | 'right';
|
|
73
|
+
/**
|
|
74
|
+
* 按钮数量
|
|
75
|
+
*/
|
|
76
|
+
count?: number;
|
|
77
|
+
/**
|
|
78
|
+
* 按钮尺寸
|
|
79
|
+
*/
|
|
80
|
+
size?: 'small' | 'default' | 'large';
|
|
81
|
+
/**
|
|
82
|
+
* 自定义className
|
|
83
|
+
*/
|
|
84
|
+
className?: string;
|
|
85
|
+
/**
|
|
86
|
+
* 自定义style
|
|
87
|
+
*/
|
|
88
|
+
style?: React.CSSProperties;
|
|
89
|
+
}
|
|
90
|
+
export interface SkeletonProps extends Pick<CommonType, 'className' | 'style'> {
|
|
91
|
+
jssStyle?: {
|
|
92
|
+
skeleton: () => SkeletonClasses;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* @en Whether to enable animation effects
|
|
96
|
+
* @cn 是否开启动画效果
|
|
97
|
+
*/
|
|
98
|
+
animation?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* @en Whether to load, when true, show the skeleton screen
|
|
101
|
+
* @cn 是否加载中,为true时,显示骨架屏
|
|
102
|
+
*/
|
|
103
|
+
loading?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* @en Real content
|
|
106
|
+
* @cn 真实内容
|
|
107
|
+
*/
|
|
108
|
+
children?: React.ReactNode;
|
|
109
|
+
/**
|
|
110
|
+
* @en Whether to show text
|
|
111
|
+
* @cn 是否显示文本或段落
|
|
112
|
+
*/
|
|
113
|
+
text?: SkeletonTextProps | boolean;
|
|
114
|
+
/**
|
|
115
|
+
* @en Whether to show image
|
|
116
|
+
* @cn 是否显示图片
|
|
117
|
+
*/
|
|
118
|
+
image?: SkeletonImageProps | boolean;
|
|
119
|
+
/**
|
|
120
|
+
* @en Whether to show button
|
|
121
|
+
* @cn 是否显示按钮
|
|
122
|
+
*/
|
|
123
|
+
button?: SkeletonButtonProps | boolean;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=skeleton.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.type.d.ts","sourceRoot":"","sources":["skeleton.type.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBA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AAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,CAAC;IAC5E,QAAQ,CAAC,EAAE;QACT,QAAQ,EAAE,MAAM,eAAe,CAAC;KACjC,CAAC;IAEF;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;OAGG;IACH,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC;IAEnC;;;OAGG;IACH,KAAK,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC;IAErC;;;OAGG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonClasses, SkeletonTextProps } from './skeleton.type';
|
|
3
|
+
interface TextProps extends SkeletonTextProps {
|
|
4
|
+
classes: SkeletonClasses;
|
|
5
|
+
}
|
|
6
|
+
export default function Text({ classes, className, rows, width, height, style }: TextProps): JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["text.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGrE,UAAU,SAAU,SAAQ,iBAAiB;IAC3C,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CA8B3G"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { util } from '@sheinx/hooks';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export default function Text(_ref) {
|
|
5
|
+
var classes = _ref.classes,
|
|
6
|
+
className = _ref.className,
|
|
7
|
+
_ref$rows = _ref.rows,
|
|
8
|
+
rows = _ref$rows === void 0 ? 3 : _ref$rows,
|
|
9
|
+
width = _ref.width,
|
|
10
|
+
height = _ref.height,
|
|
11
|
+
style = _ref.style;
|
|
12
|
+
var cls = classNames(classes.text, className);
|
|
13
|
+
var nodes = [];
|
|
14
|
+
function getTextWidth(index) {
|
|
15
|
+
if (util.isArray(width)) {
|
|
16
|
+
return width[index];
|
|
17
|
+
}
|
|
18
|
+
if (rows - 1 === index) {
|
|
19
|
+
return width;
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
function getTextHeight(index) {
|
|
24
|
+
if (util.isArray(height)) {
|
|
25
|
+
return height[index];
|
|
26
|
+
}
|
|
27
|
+
if (rows - 1 === index) {
|
|
28
|
+
return height;
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
for (var i = 0; i < rows; i++) {
|
|
33
|
+
nodes.push( /*#__PURE__*/_jsx("li", {
|
|
34
|
+
className: classes.textItem,
|
|
35
|
+
style: {
|
|
36
|
+
width: getTextWidth(i),
|
|
37
|
+
height: getTextHeight(i)
|
|
38
|
+
}
|
|
39
|
+
}, i));
|
|
40
|
+
}
|
|
41
|
+
return /*#__PURE__*/_jsx("ul", {
|
|
42
|
+
className: cls,
|
|
43
|
+
style: style,
|
|
44
|
+
children: nodes
|
|
45
|
+
});
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.7.0-beta.
|
|
3
|
+
"version": "3.7.0-beta.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"module": "./esm/index.js",
|
|
11
11
|
"typings": "./cjs/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sheinx/hooks": "3.7.0-beta.
|
|
13
|
+
"@sheinx/hooks": "3.7.0-beta.19",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.1.3-alpha.0"
|