@transkripid/flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork
65 lines (64 loc) • 2.7 kB
JavaScript
import { jsx as N, jsxs as w } from "react/jsx-runtime";
import { c as S } from "react/compiler-runtime";
import { twMerge as I } from "tailwind-merge";
import { mergeDeep as T } from "../../helpers/merge-deep.mjs";
import { omit as x } from "../../helpers/omit.mjs";
import { getTheme as _ } from "../../theme-store/index.mjs";
const M = (o) => {
const e = S(27), {
children: t,
className: l,
horizontal: n,
href: i,
theme: r
} = o;
let a;
e[0] !== r ? (a = r === void 0 ? {} : r, e[0] = r, e[1] = a) : a = e[1];
const z = a, v = typeof i > "u" ? "div" : "a";
let u;
e[2] !== o ? (u = j(o), e[2] = o, e[3] = u) : u = e[3];
const y = u;
let s, c, f, h, m;
e[4] !== v || e[5] !== l || e[6] !== z || e[7] !== n || e[8] !== i ? (m = T(_().card, z), s = v, c = "flowbite-card", f = i, h = I(m.root.base, m.root.horizontal[n ? "on" : "off"], i && m.root.href, l), e[4] = v, e[5] = l, e[6] = z, e[7] = n, e[8] = i, e[9] = s, e[10] = c, e[11] = f, e[12] = h, e[13] = m) : (s = e[9], c = e[10], f = e[11], h = e[12], m = e[13]);
let d;
e[14] !== o ? (d = /* @__PURE__ */ N(C, { ...o }), e[14] = o, e[15] = d) : d = e[15];
let g;
e[16] !== t || e[17] !== m.root.children ? (g = /* @__PURE__ */ N("div", { className: m.root.children, children: t }), e[16] = t, e[17] = m.root.children, e[18] = g) : g = e[18];
let b;
return e[19] !== s || e[20] !== c || e[21] !== f || e[22] !== h || e[23] !== d || e[24] !== g || e[25] !== y ? (b = /* @__PURE__ */ w(s, { "data-testid": c, href: f, className: h, ...y, children: [
d,
g
] }), e[19] = s, e[20] = c, e[21] = f, e[22] = h, e[23] = d, e[24] = g, e[25] = y, e[26] = b) : b = e[26], b;
}, C = (o) => {
const e = S(8);
let t, l;
e[0] !== o ? ({
theme: l,
...t
} = o, e[0] = o, e[1] = t, e[2] = l) : (t = e[1], l = e[2]);
let n;
e[3] !== l ? (n = l === void 0 ? {} : l, e[3] = l, e[4] = n) : n = e[4];
const i = n;
let r;
if (e[5] !== i || e[6] !== t) {
r = Symbol.for("react.early_return_sentinel");
e: {
const a = T(_().card, i);
if (t.renderImage) {
r = t.renderImage(a, t.horizontal ?? !1);
break e;
}
if (t.imgSrc) {
r = /* @__PURE__ */ N("img", { "data-testid": "flowbite-card-image", alt: t.imgAlt ?? "", src: t.imgSrc, className: I(a.img.base, a.img.horizontal[t.horizontal ? "on" : "off"]) });
break e;
}
}
e[5] = i, e[6] = t, e[7] = r;
} else
r = e[7];
return r !== Symbol.for("react.early_return_sentinel") ? r : null;
}, j = x(["renderImage", "imgSrc", "imgAlt", "children", "className", "horizontal", "href", "theme"]);
export {
M as Card
};
//# sourceMappingURL=Card.mjs.map