@fabio.caffarello/react-design-system 4.6.0 → 4.7.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/dist/granular/ui/primitives/Avatar/Avatar.js +39 -34
- package/dist/granular/ui/primitives/Avatar/Avatar.js.map +1 -1
- package/dist/index.cjs +33 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -23
- package/dist/index.js.map +1 -1
- package/dist/react-design-system.css +1 -1
- package/dist/ui/primitives/Avatar/Avatar.d.ts +38 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8306,39 +8306,43 @@ const mn = Ne(
|
|
|
8306
8306
|
);
|
|
8307
8307
|
});
|
|
8308
8308
|
ra.displayName = "Chip";
|
|
8309
|
-
const as = be(function(
|
|
8310
|
-
var
|
|
8309
|
+
const as = be(function(p, u) {
|
|
8310
|
+
var m = p, {
|
|
8311
8311
|
src: t,
|
|
8312
8312
|
alt: r,
|
|
8313
8313
|
fallback: s,
|
|
8314
8314
|
size: a = "md",
|
|
8315
8315
|
variant: o = "circle",
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8316
|
+
loading: i = "eager",
|
|
8317
|
+
"aria-label": l,
|
|
8318
|
+
className: d = ""
|
|
8319
|
+
} = m, c = P(m, [
|
|
8319
8320
|
"src",
|
|
8320
8321
|
"alt",
|
|
8321
8322
|
"fallback",
|
|
8322
8323
|
"size",
|
|
8323
8324
|
"variant",
|
|
8325
|
+
"loading",
|
|
8324
8326
|
"aria-label",
|
|
8325
8327
|
"className"
|
|
8326
8328
|
]);
|
|
8327
|
-
const [
|
|
8329
|
+
const [b, h] = V(!1), [w, y] = V(!1), g = {
|
|
8328
8330
|
xs: "h-6 w-6 text-xs",
|
|
8329
8331
|
sm: "h-8 w-8 text-sm",
|
|
8330
8332
|
md: "h-10 w-10 text-base",
|
|
8331
8333
|
lg: "h-12 w-12 text-lg",
|
|
8332
|
-
xl: "h-16 w-16 text-xl"
|
|
8333
|
-
|
|
8334
|
+
xl: "h-16 w-16 text-xl",
|
|
8335
|
+
"2xl": "h-24 w-24 text-3xl",
|
|
8336
|
+
"3xl": "h-28 w-28 text-4xl"
|
|
8337
|
+
}, v = {
|
|
8334
8338
|
circle: G("full"),
|
|
8335
8339
|
square: G("none"),
|
|
8336
8340
|
rounded: G("md")
|
|
8337
|
-
},
|
|
8341
|
+
}, k = !t || b, $ = typeof s == "string" ? s.toUpperCase().slice(0, 2) : s, C = l || r || "User avatar";
|
|
8338
8342
|
return /* @__PURE__ */ n.jsxs(
|
|
8339
8343
|
"div",
|
|
8340
8344
|
L(A({
|
|
8341
|
-
ref:
|
|
8345
|
+
ref: u,
|
|
8342
8346
|
className: x(
|
|
8343
8347
|
"relative",
|
|
8344
8348
|
"inline-flex",
|
|
@@ -8347,38 +8351,39 @@ const as = be(function(u, c) {
|
|
|
8347
8351
|
"shrink-0",
|
|
8348
8352
|
"font-medium",
|
|
8349
8353
|
"overflow-hidden",
|
|
8350
|
-
|
|
8351
|
-
|
|
8354
|
+
g[a],
|
|
8355
|
+
v[o],
|
|
8352
8356
|
"bg-surface-muted",
|
|
8353
8357
|
"text-fg-primary",
|
|
8354
|
-
|
|
8358
|
+
d
|
|
8355
8359
|
),
|
|
8356
8360
|
role: "img",
|
|
8357
|
-
"aria-label":
|
|
8358
|
-
},
|
|
8361
|
+
"aria-label": C
|
|
8362
|
+
}, c), {
|
|
8359
8363
|
children: [
|
|
8360
|
-
!
|
|
8364
|
+
!k && t && /* @__PURE__ */ n.jsx(
|
|
8361
8365
|
"img",
|
|
8362
8366
|
{
|
|
8363
8367
|
src: t,
|
|
8364
8368
|
alt: r || "",
|
|
8369
|
+
loading: i,
|
|
8365
8370
|
className: x(
|
|
8366
8371
|
"w-full",
|
|
8367
8372
|
"h-full",
|
|
8368
8373
|
"object-cover",
|
|
8369
|
-
|
|
8370
|
-
|
|
8374
|
+
v[o],
|
|
8375
|
+
w ? "opacity-100" : "opacity-0",
|
|
8371
8376
|
"transition-opacity",
|
|
8372
8377
|
"duration-200"
|
|
8373
8378
|
),
|
|
8374
|
-
onLoad: () =>
|
|
8379
|
+
onLoad: () => y(!0),
|
|
8375
8380
|
onError: () => {
|
|
8376
|
-
|
|
8381
|
+
h(!0), y(!1);
|
|
8377
8382
|
},
|
|
8378
8383
|
"aria-hidden": "true"
|
|
8379
8384
|
}
|
|
8380
8385
|
),
|
|
8381
|
-
|
|
8386
|
+
k && /* @__PURE__ */ n.jsx(
|
|
8382
8387
|
"span",
|
|
8383
8388
|
{
|
|
8384
8389
|
className: x(
|
|
@@ -8387,10 +8392,10 @@ const as = be(function(u, c) {
|
|
|
8387
8392
|
"justify-center",
|
|
8388
8393
|
"w-full",
|
|
8389
8394
|
"h-full",
|
|
8390
|
-
|
|
8395
|
+
v[o]
|
|
8391
8396
|
),
|
|
8392
8397
|
"aria-hidden": "true",
|
|
8393
|
-
children:
|
|
8398
|
+
children: $ || "?"
|
|
8394
8399
|
}
|
|
8395
8400
|
)
|
|
8396
8401
|
]
|