@companix/uikit 0.0.95 → 0.0.96
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/index.d.ts +1 -1
- package/dist/bundle.es2.js +19 -17
- package/package.json +1 -1
package/dist/Avatar/index.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export interface AvatarProps extends React.ImgHTMLAttributes<HTMLElement> {
|
|
|
5
5
|
fallbackIcon?: React.ReactElement;
|
|
6
6
|
initials?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const Avatar: ({ alt, crossOrigin, decoding, loading, referrerPolicy, sizes, size, src, srcSet, useMap, initials, noBorder, fallbackIcon: fallbackIconProp, children }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Avatar: ({ alt, crossOrigin, decoding, loading, referrerPolicy, sizes, size, src, srcSet, useMap, initials, noBorder, fallbackIcon: fallbackIconProp, className, children }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/bundle.es2.js
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsxs as g, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import h from "classnames";
|
|
3
|
+
import { box as k } from "@companix/utils-browser";
|
|
4
|
+
import { getInitialsFontSize as u } from "./bundle.es54.js";
|
|
5
|
+
const S = 24, F = ({
|
|
6
|
+
alt: e,
|
|
6
7
|
crossOrigin: i,
|
|
7
8
|
decoding: m,
|
|
8
9
|
loading: v,
|
|
9
10
|
referrerPolicy: d,
|
|
10
11
|
sizes: f,
|
|
11
|
-
size: t =
|
|
12
|
+
size: t = S,
|
|
12
13
|
src: o,
|
|
13
|
-
srcSet:
|
|
14
|
+
srcSet: c,
|
|
14
15
|
useMap: N,
|
|
15
|
-
initials:
|
|
16
|
+
initials: r,
|
|
16
17
|
noBorder: b,
|
|
17
18
|
fallbackIcon: p,
|
|
18
|
-
|
|
19
|
+
className: x,
|
|
20
|
+
children: s
|
|
19
21
|
}) => {
|
|
20
|
-
const
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
|
|
22
|
+
const l = o || c, I = r ? /* @__PURE__ */ a("div", { className: "avatar-initials", style: { fontSize: u(t) }, children: r }) : p, n = l ? null : I;
|
|
23
|
+
return /* @__PURE__ */ g("div", { className: h("avatar", x), style: k(t), children: [
|
|
24
|
+
l && /* @__PURE__ */ a(
|
|
23
25
|
"img",
|
|
24
26
|
{
|
|
25
|
-
alt:
|
|
27
|
+
alt: e,
|
|
26
28
|
className: "avatar-image",
|
|
27
29
|
crossOrigin: i,
|
|
28
30
|
decoding: m,
|
|
@@ -30,15 +32,15 @@ const k = 24, y = ({
|
|
|
30
32
|
referrerPolicy: d,
|
|
31
33
|
sizes: f,
|
|
32
34
|
src: o,
|
|
33
|
-
srcSet:
|
|
35
|
+
srcSet: c,
|
|
34
36
|
useMap: N
|
|
35
37
|
}
|
|
36
38
|
),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
n && /* @__PURE__ */ a("div", { className: "avatar-icon", children: n }),
|
|
40
|
+
s && /* @__PURE__ */ a("div", { className: "avatar-content", children: s }),
|
|
39
41
|
!b && /* @__PURE__ */ a("div", { className: "avatar-border" })
|
|
40
42
|
] });
|
|
41
43
|
};
|
|
42
44
|
export {
|
|
43
|
-
|
|
45
|
+
F as Avatar
|
|
44
46
|
};
|