UNPKG

@transkripid/flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork

54 lines (53 loc) 2.72 kB
import { jsx as T, jsxs as A } from "react/jsx-runtime"; import { c as H } from "react/compiler-runtime"; import { forwardRef as M } from "react"; import { twMerge as D } from "tailwind-merge"; import { mergeDeep as R } from "../../helpers/merge-deep.mjs"; import { getTheme as $ } from "../../theme-store/index.mjs"; import { HelperText as k } from "../HelperText/HelperText.mjs"; const q = M((j, u) => { const e = H(42); let l, s, c, d, o, r, f, x, b, i; e[0] !== j ? ({ addon: s, children: c, className: d, color: x, helperText: o, icon: l, shadow: f, sizing: b, theme: i, ...r } = j, e[0] = j, e[1] = l, e[2] = s, e[3] = c, e[4] = d, e[5] = o, e[6] = r, e[7] = f, e[8] = x, e[9] = b, e[10] = i) : (l = e[1], s = e[2], c = e[3], d = e[4], o = e[5], r = e[6], f = e[7], x = e[8], b = e[9], i = e[10]); const m = x === void 0 ? "gray" : x, y = b === void 0 ? "md" : b; let z; e[11] !== i ? (z = i === void 0 ? {} : i, e[11] = i, e[12] = z) : z = e[12]; const I = z; let a, n, h, p, N; if (e[13] !== l || e[14] !== s || e[15] !== d || e[16] !== m || e[17] !== I || e[18] !== f || e[19] !== y) { const t = R($().select, I); p = D(t.base, d), N = s && /* @__PURE__ */ T("span", { className: t.addon, children: s }), n = t.field.base, h = l && /* @__PURE__ */ T("div", { className: t.field.icon.base, children: /* @__PURE__ */ T(l, { className: t.field.icon.svg }) }), a = D(t.field.select.base, t.field.select.colors[m], t.field.select.sizes[y], t.field.select.withIcon[l ? "on" : "off"], t.field.select.withAddon[s ? "on" : "off"], t.field.select.withShadow[f ? "on" : "off"]), e[13] = l, e[14] = s, e[15] = d, e[16] = m, e[17] = I, e[18] = f, e[19] = y, e[20] = a, e[21] = n, e[22] = h, e[23] = p, e[24] = N; } else a = e[20], n = e[21], h = e[22], p = e[23], N = e[24]; let g; e[25] !== c || e[26] !== r || e[27] !== u || e[28] !== a ? (g = /* @__PURE__ */ T("select", { className: a, ...r, ref: u, children: c }), e[25] = c, e[26] = r, e[27] = u, e[28] = a, e[29] = g) : g = e[29]; let v; e[30] !== m || e[31] !== o ? (v = o && /* @__PURE__ */ T(k, { color: m, children: o }), e[30] = m, e[31] = o, e[32] = v) : v = e[32]; let w; e[33] !== g || e[34] !== v || e[35] !== n || e[36] !== h ? (w = /* @__PURE__ */ A("div", { className: n, children: [ h, g, v ] }), e[33] = g, e[34] = v, e[35] = n, e[36] = h, e[37] = w) : w = e[37]; let S; return e[38] !== w || e[39] !== p || e[40] !== N ? (S = /* @__PURE__ */ A("div", { className: p, children: [ N, w ] }), e[38] = w, e[39] = p, e[40] = N, e[41] = S) : S = e[41], S; }); q.displayName = "Select"; export { q as Select }; //# sourceMappingURL=Select.mjs.map