@transkripid/flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork
48 lines (47 loc) • 1.71 kB
JavaScript
import { jsx as R } from "react/jsx-runtime";
import { c as x } from "react/compiler-runtime";
import { twMerge as y } from "tailwind-merge";
import { mergeDeep as A } from "../../helpers/merge-deep.mjs";
import { getTheme as S } from "../../theme-store/index.mjs";
import { RatingAdvanced as h } from "./RatingAdvanced.mjs";
import { RatingContext as T } from "./RatingContext.mjs";
import { RatingStar as N } from "./RatingStar.mjs";
const u = (d) => {
const e = x(22);
let i, o, r, l, t;
e[0] !== d ? ({
children: i,
className: o,
size: l,
theme: t,
...r
} = d, e[0] = d, e[1] = i, e[2] = o, e[3] = r, e[4] = l, e[5] = t) : (i = e[1], o = e[2], r = e[3], l = e[4], t = e[5]);
const f = l === void 0 ? "sm" : l;
let c;
e[6] !== t ? (c = t === void 0 ? {} : t, e[6] = t, e[7] = c) : c = e[7];
const g = c;
let m, a, s;
if (e[8] !== o || e[9] !== g || e[10] !== f) {
const v = A(S().rating, g);
m = T.Provider, s = {
theme: v,
size: f
}, a = y(v.root.base, o), e[8] = o, e[9] = g, e[10] = f, e[11] = m, e[12] = a, e[13] = s;
} else
m = e[11], a = e[12], s = e[13];
let n;
e[14] !== i || e[15] !== r || e[16] !== a ? (n = /* @__PURE__ */ R("div", { className: a, ...r, children: i }), e[14] = i, e[15] = r, e[16] = a, e[17] = n) : n = e[17];
let p;
return e[18] !== m || e[19] !== s || e[20] !== n ? (p = /* @__PURE__ */ R(m, { value: s, children: n }), e[18] = m, e[19] = s, e[20] = n, e[21] = p) : p = e[21], p;
};
u.displayName = "Rating";
N.displayName = "Rating.Star";
h.displayName = "Rating.Advanced";
const P = Object.assign(u, {
Star: N,
Advanced: h
});
export {
P as Rating
};
//# sourceMappingURL=Rating.mjs.map