@qsxy/element-plus-react 1.0.0-next.7 → 1.0.0-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Avatar/Avatar.d.ts +4 -0
- package/dist/Avatar/Avatar.js +86 -0
- package/dist/Avatar/index.d.ts +2 -0
- package/dist/Avatar/index.js +39 -0
- package/dist/Avatar/typings.d.ts +21 -0
- package/dist/Avatar/typings.js +17 -0
- package/dist/Loading/Loading.js +14 -4
- package/dist/hooks/useClassNames.d.ts +1 -0
- package/dist/hooks/useClassNames.js +11 -1
- package/dist/index.css +52 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/theme-chalk/avatar/index.scss +50 -0
- package/dist/theme-chalk/index.scss +1 -0
- package/dist/theme-chalk/loading/index.scss +5 -7
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Avatar/Avatar.tsx
|
|
30
|
+
var Avatar_exports = {};
|
|
31
|
+
__export(Avatar_exports, {
|
|
32
|
+
default: () => Avatar_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Avatar_exports);
|
|
35
|
+
var import_classnames = __toESM(require("classnames"));
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_Icon = __toESM(require("../Icon/Icon"));
|
|
38
|
+
var import_base = require("../Util/base");
|
|
39
|
+
var import_hooks = require("../hooks");
|
|
40
|
+
var Avatar = (0, import_react.memo)((props) => {
|
|
41
|
+
const { icon, size = "default", shape = "circle", src, srcSet, alt, fit = "cover", classPrefix = "avatar", onError } = props;
|
|
42
|
+
const { b, m, cssVarBlock } = (0, import_hooks.useClassNames)(classPrefix);
|
|
43
|
+
const [hasLoadError, setHasLoadError] = (0, import_react.useState)(false);
|
|
44
|
+
const handleError = (e) => {
|
|
45
|
+
setHasLoadError(true);
|
|
46
|
+
onError(e);
|
|
47
|
+
};
|
|
48
|
+
(0, import_react.useEffect)(() => {
|
|
49
|
+
if ((0, import_base.isNotEmpty)(src)) {
|
|
50
|
+
setHasLoadError(false);
|
|
51
|
+
}
|
|
52
|
+
}, [src]);
|
|
53
|
+
const avatarClass = (0, import_react.useMemo)(() => {
|
|
54
|
+
const classList = [b()];
|
|
55
|
+
if ((0, import_base.isString)(size)) {
|
|
56
|
+
classList.push(m(size));
|
|
57
|
+
}
|
|
58
|
+
if (icon) {
|
|
59
|
+
classList.push(m("icon"));
|
|
60
|
+
}
|
|
61
|
+
if (shape) {
|
|
62
|
+
classList.push(m(shape));
|
|
63
|
+
}
|
|
64
|
+
return (0, import_classnames.default)(classList);
|
|
65
|
+
}, [b, icon, m, shape, size]);
|
|
66
|
+
const sizeStyle = (0, import_react.useMemo)(() => {
|
|
67
|
+
return (0, import_base.isNumber)(size) ? cssVarBlock({
|
|
68
|
+
size: (0, import_base.addUnit)(size) || ""
|
|
69
|
+
}) : void 0;
|
|
70
|
+
}, [cssVarBlock, size]);
|
|
71
|
+
const children = (0, import_react.useMemo)(() => icon ? /* @__PURE__ */ import_react.default.createElement(import_Icon.default, { name: icon }) : props.children, [icon, props.children]);
|
|
72
|
+
return /* @__PURE__ */ import_react.default.createElement("span", { className: avatarClass, style: sizeStyle }, (src || srcSet) && !hasLoadError ? /* @__PURE__ */ import_react.default.createElement(
|
|
73
|
+
"img",
|
|
74
|
+
{
|
|
75
|
+
src,
|
|
76
|
+
alt,
|
|
77
|
+
srcSet,
|
|
78
|
+
style: {
|
|
79
|
+
objectFit: fit
|
|
80
|
+
},
|
|
81
|
+
onError: handleError
|
|
82
|
+
}
|
|
83
|
+
) : children);
|
|
84
|
+
});
|
|
85
|
+
Avatar.displayName = "ElAvatar";
|
|
86
|
+
var Avatar_default = Avatar;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Avatar/index.ts
|
|
30
|
+
var Avatar_exports = {};
|
|
31
|
+
__export(Avatar_exports, {
|
|
32
|
+
Avatar: () => import_Avatar.default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Avatar_exports);
|
|
35
|
+
var import_Avatar = __toESM(require("./Avatar"));
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
Avatar
|
|
39
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconName } from '../Icon';
|
|
3
|
+
import { BaseProps, NativeProps } from '../types/common';
|
|
4
|
+
export interface AvatarProps extends BaseProps, NativeProps<'--el-avatar-text-color' | '--el-avatar-bg-color' | '--el-avatar-text-size' | '--el-avatar-icon-size' | '--el-avatar-border-radius' | '--el-avatar-size-large' | '--el-avatar-size-small' | '--el-avatar-size'> {
|
|
5
|
+
/** 设置 Avatar 的图标类型,具体参考 Icon 组件 */
|
|
6
|
+
icon?: IconName;
|
|
7
|
+
/** Avatar 大小 */
|
|
8
|
+
size?: number | 'large' | 'default' | 'small' | '';
|
|
9
|
+
/** Avatar 形状 */
|
|
10
|
+
shape?: 'circle' | 'square';
|
|
11
|
+
/** Avatar 图片的源地址 */
|
|
12
|
+
src?: string;
|
|
13
|
+
/** 图片 Avatar 的原生 srcset 属性 */
|
|
14
|
+
srcSet?: string;
|
|
15
|
+
/** 图片 Avatar 的原生 alt 属性 */
|
|
16
|
+
alt?: string;
|
|
17
|
+
/** 当展示类型为图片的时候,设置图片如何适应容器 */
|
|
18
|
+
fit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
19
|
+
/** 图片加载失败时触发 */
|
|
20
|
+
onError?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/Avatar/typings.ts
|
|
16
|
+
var typings_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(typings_exports);
|
package/dist/Loading/Loading.js
CHANGED
|
@@ -33,6 +33,7 @@ __export(Loading_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Loading_exports);
|
|
35
35
|
var import_classnames = __toESM(require("classnames"));
|
|
36
|
+
var import_dom_lib = require("dom-lib");
|
|
36
37
|
var import_react = __toESM(require("react"));
|
|
37
38
|
var import_react_dom = require("react-dom");
|
|
38
39
|
var import_client = require("react-dom/client");
|
|
@@ -42,17 +43,26 @@ var import_Util = require("../Util");
|
|
|
42
43
|
var import_hooks = require("../hooks");
|
|
43
44
|
var Main = (props) => {
|
|
44
45
|
const { visible, text, fullscreen = true, spinner, background } = props;
|
|
45
|
-
const { b, is } = (0, import_hooks.useClassNames)("loading");
|
|
46
|
+
const { b, is, bm } = (0, import_hooks.useClassNames)("loading");
|
|
46
47
|
const nodeRef = (0, import_react.useRef)(null);
|
|
48
|
+
(0, import_react.useEffect)(() => {
|
|
49
|
+
var _a;
|
|
50
|
+
if ((_a = nodeRef.current) == null ? void 0 : _a.parentNode) {
|
|
51
|
+
(0, import_dom_lib.addClass)(nodeRef.current.parentNode, bm("parent", "relative"));
|
|
52
|
+
}
|
|
53
|
+
}, []);
|
|
47
54
|
return /* @__PURE__ */ import_react.default.createElement(import_Transition.Transition, { nodeRef, name: "loading-fade", visible }, /* @__PURE__ */ import_react.default.createElement("div", { ref: nodeRef, className: (0, import_classnames.default)(b`mask`, is({ fullscreen }), props.className), style: { ...props.style, background, zIndex: import_Util.PopupManager.nextZIndex() } }, /* @__PURE__ */ import_react.default.createElement("div", { className: b`spinner` }, spinner ? /* @__PURE__ */ import_react.default.createElement(import_Icon.Icon, { name: spinner, spin: true }) : /* @__PURE__ */ import_react.default.createElement("svg", { className: "circular", viewBox: "25 25 50 50" }, /* @__PURE__ */ import_react.default.createElement("circle", { className: "path", cx: "50", cy: "50", r: "20", fill: "none" })), text && /* @__PURE__ */ import_react.default.createElement("p", { className: b`text` }, text))));
|
|
48
55
|
};
|
|
49
56
|
var service = (props = {}) => {
|
|
50
57
|
const { target = { current: document.body } } = props;
|
|
51
|
-
const
|
|
58
|
+
const renderDom = document.createDocumentFragment();
|
|
59
|
+
const root = (0, import_client.createRoot)(renderDom);
|
|
52
60
|
root.render((0, import_react_dom.createPortal)(/* @__PURE__ */ import_react.default.createElement(Main, { ...props, visible: true }), target.current));
|
|
53
61
|
return {
|
|
54
62
|
close: () => {
|
|
55
|
-
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
root.unmount();
|
|
65
|
+
}, 200);
|
|
56
66
|
}
|
|
57
67
|
};
|
|
58
68
|
};
|
|
@@ -64,5 +74,5 @@ var Loading = (props) => {
|
|
|
64
74
|
return /* @__PURE__ */ import_react.default.createElement(Main, { ...props, visible });
|
|
65
75
|
};
|
|
66
76
|
Loading.service = service;
|
|
67
|
-
Loading.displayName = "
|
|
77
|
+
Loading.displayName = "ElLoading";
|
|
68
78
|
var Loading_default = Loading;
|
|
@@ -103,5 +103,6 @@ declare function useClassNames(str: string, classPrefix?: string): {
|
|
|
103
103
|
* is('block', { block: true }) => 'is-block'
|
|
104
104
|
*/
|
|
105
105
|
is: (...classes: ClassValue[]) => string;
|
|
106
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
106
107
|
};
|
|
107
108
|
export default useClassNames;
|
|
@@ -126,6 +126,15 @@ function useClassNames(str, classPrefix = import_prefix.namespace) {
|
|
|
126
126
|
const mergeClasses = classes.length ? (0, import_classnames.default)(...classes).split(" ").filter((cls) => cls).map((item) => `is-${item}`) : [];
|
|
127
127
|
return mergeClasses.join(" ");
|
|
128
128
|
}, []);
|
|
129
|
+
const cssVarBlock = (object) => {
|
|
130
|
+
const styles = {};
|
|
131
|
+
for (const key in object) {
|
|
132
|
+
if (object[key]) {
|
|
133
|
+
styles[`--${componentName}-${key}`] = object[key];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return styles;
|
|
137
|
+
};
|
|
129
138
|
return {
|
|
130
139
|
/**
|
|
131
140
|
* 如果组件前缀是'button':
|
|
@@ -204,7 +213,8 @@ function useClassNames(str, classPrefix = import_prefix.namespace) {
|
|
|
204
213
|
*
|
|
205
214
|
* is('block', { block: true }) => 'is-block'
|
|
206
215
|
*/
|
|
207
|
-
is
|
|
216
|
+
is,
|
|
217
|
+
cssVarBlock
|
|
208
218
|
};
|
|
209
219
|
}
|
|
210
220
|
var useClassNames_default = useClassNames;
|
package/dist/index.css
CHANGED
|
@@ -8898,6 +8898,55 @@
|
|
|
8898
8898
|
}
|
|
8899
8899
|
|
|
8900
8900
|
/* Data 数据展示 */
|
|
8901
|
+
.el-avatar {
|
|
8902
|
+
--el-avatar-text-color: var(--el-color-white);
|
|
8903
|
+
--el-avatar-bg-color: var(--el-text-color-disabled);
|
|
8904
|
+
--el-avatar-text-size: 14px;
|
|
8905
|
+
--el-avatar-icon-size: 18px;
|
|
8906
|
+
--el-avatar-border-radius: var(--el-border-radius-base);
|
|
8907
|
+
--el-avatar-size-large: 56px;
|
|
8908
|
+
--el-avatar-size-small: 24px;
|
|
8909
|
+
--el-avatar-size: 40px;
|
|
8910
|
+
display: inline-flex;
|
|
8911
|
+
justify-content: center;
|
|
8912
|
+
align-items: center;
|
|
8913
|
+
box-sizing: border-box;
|
|
8914
|
+
text-align: center;
|
|
8915
|
+
overflow: hidden;
|
|
8916
|
+
outline: none;
|
|
8917
|
+
color: var(--el-avatar-text-color);
|
|
8918
|
+
background: var(--el-avatar-bg-color);
|
|
8919
|
+
width: var(--el-avatar-size);
|
|
8920
|
+
height: var(--el-avatar-size);
|
|
8921
|
+
font-size: var(--el-avatar-text-size);
|
|
8922
|
+
}
|
|
8923
|
+
|
|
8924
|
+
.el-avatar > img {
|
|
8925
|
+
display: block;
|
|
8926
|
+
width: 100%;
|
|
8927
|
+
height: 100%;
|
|
8928
|
+
}
|
|
8929
|
+
|
|
8930
|
+
.el-avatar--circle {
|
|
8931
|
+
border-radius: 50%;
|
|
8932
|
+
}
|
|
8933
|
+
|
|
8934
|
+
.el-avatar--square {
|
|
8935
|
+
border-radius: var(--el-avatar-border-radius);
|
|
8936
|
+
}
|
|
8937
|
+
|
|
8938
|
+
.el-avatar--icon {
|
|
8939
|
+
font-size: var(--el-avatar-icon-size);
|
|
8940
|
+
}
|
|
8941
|
+
|
|
8942
|
+
.el-avatar--small {
|
|
8943
|
+
--el-avatar-size: 24px;
|
|
8944
|
+
}
|
|
8945
|
+
|
|
8946
|
+
.el-avatar--large {
|
|
8947
|
+
--el-avatar-size: 56px;
|
|
8948
|
+
}
|
|
8949
|
+
|
|
8901
8950
|
.el-badge {
|
|
8902
8951
|
--el-badge-bg-color: var(--el-color-error);
|
|
8903
8952
|
--el-badge-radius: 10px;
|
|
@@ -12316,10 +12365,11 @@
|
|
|
12316
12365
|
animation: 0.3s linear rShakeHead;
|
|
12317
12366
|
}
|
|
12318
12367
|
|
|
12319
|
-
.el-loading-parent
|
|
12368
|
+
.el-loading-parent--relative {
|
|
12320
12369
|
position: relative !important;
|
|
12321
12370
|
}
|
|
12322
|
-
|
|
12371
|
+
|
|
12372
|
+
.el-loading-parent--hidden {
|
|
12323
12373
|
overflow: hidden !important;
|
|
12324
12374
|
}
|
|
12325
12375
|
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export { Form as ElForm, useForm } from './Form';
|
|
|
49
49
|
export type { FormInstance, FormItemProps, FormProps, FormRules, InternalFormInstance, InternalNamePath, NamePath, Rule, RuleType, ValidateErrorEntity, ValidateMessages, ValidateOptions, } from './Form';
|
|
50
50
|
export { Upload as ElUpload } from './Upload';
|
|
51
51
|
export type { UploadFile, UploadFiles, UploadProps, UploadRawFile, UploadRef, UploadStatus, UploadUserFile } from './Upload';
|
|
52
|
+
export { Avatar as ElAvatar } from './Avatar';
|
|
53
|
+
export type { AvatarProps } from './Avatar';
|
|
52
54
|
export { Badge as ElBadge } from './Badge';
|
|
53
55
|
export type { BadgeProps } from './Badge';
|
|
54
56
|
export { Card as ElCard } from './Card';
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(src_exports, {
|
|
|
23
23
|
Calendar: () => import_Calendar.Calendar,
|
|
24
24
|
CalendarContext: () => import_Calendar.CalendarContext,
|
|
25
25
|
ConfigProvider: () => import_ConfigProvider.ConfigProvider,
|
|
26
|
+
ElAvatar: () => import_Avatar.Avatar,
|
|
26
27
|
ElBadge: () => import_Badge.Badge,
|
|
27
28
|
ElBreadcrumb: () => import_Breadcrumb.Breadcrumb,
|
|
28
29
|
ElBreadcrumbItem: () => import_Breadcrumb.BreadcrumbItem,
|
|
@@ -123,6 +124,7 @@ var import_Switch = require("./Switch");
|
|
|
123
124
|
var import_Transfer = require("./Transfer");
|
|
124
125
|
var import_Form = require("./Form");
|
|
125
126
|
var import_Upload = require("./Upload");
|
|
127
|
+
var import_Avatar = require("./Avatar");
|
|
126
128
|
var import_Badge = require("./Badge");
|
|
127
129
|
var import_Card = require("./Card");
|
|
128
130
|
var import_Carousel = require("./Carousel");
|
|
@@ -158,6 +160,7 @@ var import_ConfigProvider = require("./ConfigProvider");
|
|
|
158
160
|
Calendar,
|
|
159
161
|
CalendarContext,
|
|
160
162
|
ConfigProvider,
|
|
163
|
+
ElAvatar,
|
|
161
164
|
ElBadge,
|
|
162
165
|
ElBreadcrumb,
|
|
163
166
|
ElBreadcrumbItem,
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use '../common/var';
|
|
2
|
+
|
|
3
|
+
.#{$namespace}-avatar {
|
|
4
|
+
--#{$namespace}-avatar-text-color: var(--#{$namespace}-color-white);
|
|
5
|
+
--#{$namespace}-avatar-bg-color: var(--#{$namespace}-text-color-disabled);
|
|
6
|
+
--#{$namespace}-avatar-text-size: 14px;
|
|
7
|
+
--#{$namespace}-avatar-icon-size: 18px;
|
|
8
|
+
--#{$namespace}-avatar-border-radius: var(--#{$namespace}-border-radius-base);
|
|
9
|
+
--#{$namespace}-avatar-size-large: 56px;
|
|
10
|
+
--#{$namespace}-avatar-size-small: 24px;
|
|
11
|
+
--#{$namespace}-avatar-size: 40px;
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
text-align: center;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
outline: none;
|
|
19
|
+
color: var(--#{$namespace}-avatar-text-color);
|
|
20
|
+
background: var(--#{$namespace}-avatar-bg-color);
|
|
21
|
+
width: var(--#{$namespace}-avatar-size);
|
|
22
|
+
height: var(--#{$namespace}-avatar-size);
|
|
23
|
+
font-size: var(--#{$namespace}-avatar-text-size);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.#{$namespace}-avatar > img {
|
|
27
|
+
display: block;
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.#{$namespace}-avatar--circle {
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.#{$namespace}-avatar--square {
|
|
37
|
+
border-radius: var(--#{$namespace}-avatar-border-radius);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.#{$namespace}-avatar--icon {
|
|
41
|
+
font-size: var(--#{$namespace}-avatar-icon-size);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.#{$namespace}-avatar--small {
|
|
45
|
+
--#{$namespace}-avatar-size: 24px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{$namespace}-avatar--large {
|
|
49
|
+
--#{$namespace}-avatar-size: 56px;
|
|
50
|
+
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
@use '../common/var';
|
|
2
2
|
|
|
3
|
-
.#{$namespace}-loading-parent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
3
|
+
.#{$namespace}-loading-parent--relative {
|
|
4
|
+
position: relative !important;
|
|
5
|
+
}
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
7
|
+
.#{$namespace}-loading-parent--hidden {
|
|
8
|
+
overflow: hidden !important;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
.#{$namespace}-loading-mask {
|