@julseb-lib/react 0.0.26 → 0.0.28
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/index.cjs.js +103 -88
- package/dist/index.es.js +39 -11
- package/dist/index.umd.js +50 -35
- package/dist/lib/components/Avatar/AvatarFunction.tsx +8 -0
- package/dist/lib/components/Avatar/styles.tsx +3 -0
- package/dist/lib/components/Avatar/types.ts +11 -1
- package/dist/lib/components/Image/ImageFunction.tsx +7 -0
- package/dist/lib/components/Image/styles.tsx +25 -1
- package/dist/lib/components/Image/types.ts +7 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -8589,21 +8589,28 @@ const Xd = C(
|
|
|
8589
8589
|
height: r = "auto",
|
|
8590
8590
|
borderRadius: s,
|
|
8591
8591
|
fit: o,
|
|
8592
|
-
|
|
8593
|
-
|
|
8592
|
+
loading: p = "lazy",
|
|
8593
|
+
imgFallback: z,
|
|
8594
|
+
...g
|
|
8595
|
+
}, M) => /* @__PURE__ */ t.jsx(E1, { fallback: c, children: /* @__PURE__ */ t.jsx(
|
|
8594
8596
|
_c,
|
|
8595
8597
|
{
|
|
8596
8598
|
"data-testid": e ? l && `${l}.Image` : l,
|
|
8597
8599
|
className: e ? a && "Image" : a,
|
|
8598
|
-
ref:
|
|
8600
|
+
ref: M,
|
|
8599
8601
|
src: h,
|
|
8600
8602
|
alt: d,
|
|
8603
|
+
loading: p,
|
|
8604
|
+
"data-fallback": z == null ? void 0 : z.text,
|
|
8601
8605
|
$aspectRatio: f,
|
|
8602
8606
|
$width: i,
|
|
8603
8607
|
$height: r,
|
|
8604
8608
|
$borderRadius: s,
|
|
8605
8609
|
$fit: o,
|
|
8606
|
-
|
|
8610
|
+
$fallbackBackground: (z == null ? void 0 : z.background) ?? "primary",
|
|
8611
|
+
$fallbackTextColor: (z == null ? void 0 : z.textColor) ?? "background",
|
|
8612
|
+
$fallbackFontSize: (z == null ? void 0 : z.fontSize) ?? "body",
|
|
8613
|
+
...g
|
|
8607
8614
|
}
|
|
8608
8615
|
) })
|
|
8609
8616
|
), Z4 = k.img`
|
|
@@ -8615,6 +8622,23 @@ const Xd = C(
|
|
|
8615
8622
|
position: relative;
|
|
8616
8623
|
z-index: 0;
|
|
8617
8624
|
${({ $borderRadius: l }) => m.BorderRadius(l)}
|
|
8625
|
+
|
|
8626
|
+
&[alt]:after {
|
|
8627
|
+
position: absolute;
|
|
8628
|
+
top: 0;
|
|
8629
|
+
left: 0;
|
|
8630
|
+
${m.Flexbox({
|
|
8631
|
+
$alignItems: "center",
|
|
8632
|
+
$justifyContent: "center"
|
|
8633
|
+
})};
|
|
8634
|
+
width: 100%;
|
|
8635
|
+
height: 100%;
|
|
8636
|
+
background-color: ${({ $fallbackBackground: l, theme: c }) => m.AllColors(l, c)};
|
|
8637
|
+
color: ${({ $fallbackTextColor: l, theme: c }) => m.AllColors(l, c)};
|
|
8638
|
+
content: attr(data-fallback);
|
|
8639
|
+
font-weight: ${r2.BOLD};
|
|
8640
|
+
font-size: ${({ $fallbackFontSize: l }) => m.FontSize(l)};
|
|
8641
|
+
}
|
|
8618
8642
|
`, A3 = k.figure`
|
|
8619
8643
|
position: relative;
|
|
8620
8644
|
overflow: hidden;
|
|
@@ -8982,6 +9006,7 @@ const A0 = C(
|
|
|
8982
9006
|
font-weight: ${r2.BLACK};
|
|
8983
9007
|
line-height: var(--avatar-size);
|
|
8984
9008
|
text-transform: uppercase;
|
|
9009
|
+
font-size: ${({ $fontSize: l }) => m.FontSize(l)};
|
|
8985
9010
|
`, a7 = k(A0)`
|
|
8986
9011
|
position: absolute;
|
|
8987
9012
|
right: ${({ $width: l, $paddingLeftRight: c }) => `calc((${l / 2}px + ${m.Spacer(c)}) * -1)`};
|
|
@@ -9013,30 +9038,32 @@ const p1 = C(
|
|
|
9013
9038
|
icon: z,
|
|
9014
9039
|
iconSize: g,
|
|
9015
9040
|
iconBaseUrl: M,
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9041
|
+
fontSize: n = "body",
|
|
9042
|
+
...H
|
|
9043
|
+
}, u) => {
|
|
9044
|
+
const x = R0(10, !0), $ = (e == null ? void 0 : e.split(" ")[0]) || x;
|
|
9019
9045
|
return r0(`
|
|
9020
|
-
${a ? `#${a}` : `.${
|
|
9046
|
+
${a ? `#${a}` : `.${$}`} {
|
|
9021
9047
|
--avatar-size: ${r}px;
|
|
9022
9048
|
}
|
|
9023
9049
|
`), /* @__PURE__ */ t.jsxs(
|
|
9024
9050
|
e7,
|
|
9025
9051
|
{
|
|
9026
9052
|
"data-testid": h && l ? `${l}.Avatar` : l,
|
|
9027
|
-
ref: h ? void 0 :
|
|
9053
|
+
ref: h ? void 0 : u,
|
|
9028
9054
|
as: h ? "span" : c,
|
|
9029
9055
|
id: a,
|
|
9030
9056
|
className: T(
|
|
9031
9057
|
h && e ? "Avatar" : e,
|
|
9032
|
-
|
|
9058
|
+
x
|
|
9033
9059
|
),
|
|
9034
9060
|
$backgroundColor: d,
|
|
9035
9061
|
$border: f,
|
|
9036
9062
|
$borderRadius: i,
|
|
9037
9063
|
$size: r,
|
|
9038
9064
|
$contentColor: s,
|
|
9039
|
-
|
|
9065
|
+
$fontSize: n,
|
|
9066
|
+
...H,
|
|
9040
9067
|
children: [
|
|
9041
9068
|
o && /* @__PURE__ */ t.jsx(
|
|
9042
9069
|
m0,
|
|
@@ -9048,6 +9075,7 @@ const p1 = C(
|
|
|
9048
9075
|
width: "100%",
|
|
9049
9076
|
height: "100%",
|
|
9050
9077
|
fit: "cover",
|
|
9078
|
+
imgFallback: typeof o == "object" ? { text: o.fallback || "", fontSize: n } : void 0,
|
|
9051
9079
|
fallback: typeof o == "object" ? o.fallback : void 0
|
|
9052
9080
|
}
|
|
9053
9081
|
),
|