@transkripid/flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork
48 lines (47 loc) • 2.13 kB
JavaScript
import { jsx as x, jsxs as F, Fragment as I } from "react/jsx-runtime";
import { c as j } from "react/compiler-runtime";
import { forwardRef as w } from "react";
import { twMerge as z } from "tailwind-merge";
import { mergeDeep as D } from "../../helpers/merge-deep.mjs";
import { getTheme as H } from "../../theme-store/index.mjs";
import { HelperText as M } from "../HelperText/HelperText.mjs";
const R = w((N, T) => {
const e = j(32);
let i, t, s, d, h, l;
e[0] !== N ? ({
className: i,
color: d,
helperText: t,
sizing: h,
theme: l,
...s
} = N, e[0] = N, e[1] = i, e[2] = t, e[3] = s, e[4] = d, e[5] = h, e[6] = l) : (i = e[1], t = e[2], s = e[3], d = e[4], h = e[5], l = e[6]);
const o = d === void 0 ? "gray" : d, b = h === void 0 ? "md" : h;
let g;
e[7] !== l ? (g = l === void 0 ? {} : l, e[7] = l, e[8] = g) : g = e[8];
const y = g;
let r, m, p;
if (e[9] !== i || e[10] !== o || e[11] !== y || e[12] !== b) {
const u = D(H().fileInput, y);
p = z(u.root.base, i), m = u.field.base, r = z(u.field.input.base, u.field.input.colors[o], u.field.input.sizes[b]), e[9] = i, e[10] = o, e[11] = y, e[12] = b, e[13] = r, e[14] = m, e[15] = p;
} else
r = e[13], m = e[14], p = e[15];
let f;
e[16] !== s || e[17] !== T || e[18] !== r ? (f = /* @__PURE__ */ x("input", { className: r, ...s, type: "file", ref: T }), e[16] = s, e[17] = T, e[18] = r, e[19] = f) : f = e[19];
let n;
e[20] !== m || e[21] !== f ? (n = /* @__PURE__ */ x("div", { className: m, children: f }), e[20] = m, e[21] = f, e[22] = n) : n = e[22];
let c;
e[23] !== p || e[24] !== n ? (c = /* @__PURE__ */ x("div", { className: p, children: n }), e[23] = p, e[24] = n, e[25] = c) : c = e[25];
let a;
e[26] !== o || e[27] !== t ? (a = t && /* @__PURE__ */ x(M, { color: o, children: t }), e[26] = o, e[27] = t, e[28] = a) : a = e[28];
let v;
return e[29] !== c || e[30] !== a ? (v = /* @__PURE__ */ F(I, { children: [
c,
a
] }), e[29] = c, e[30] = a, e[31] = v) : v = e[31], v;
});
R.displayName = "FileInput";
export {
R as FileInput
};
//# sourceMappingURL=FileInput.mjs.map