finform-react-builder 1.5.10 → 1.5.12

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.
@@ -28,7 +28,7 @@ export interface BaseField {
28
28
  title?: string;
29
29
  name: string;
30
30
  label: string;
31
- type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'select' | 'checkbox' | 'toggle' | 'radio' | 'switch' | 'autocomplete' | 'date' | 'textarea' | 'image' | 'title' | 'section';
31
+ type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'select' | 'checkbox' | 'toggle' | 'radio' | 'switch' | 'autocomplete' | 'date' | 'textarea' | 'image' | 'title' | 'section' | 'component';
32
32
  placeholder?: string;
33
33
  required?: boolean;
34
34
  disabled?: boolean;
@@ -128,6 +128,11 @@ export interface ImageField extends BaseField {
128
128
  onClick?: () => void;
129
129
  defaultValue?: string;
130
130
  }
131
+ export interface ComponentField extends BaseField {
132
+ type: 'component';
133
+ content?: React.ReactNode;
134
+ render?: () => React.ReactNode;
135
+ }
131
136
  export interface TitleField extends BaseField {
132
137
  type: 'title';
133
138
  variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
@@ -142,7 +147,7 @@ export interface SectionField extends BaseField {
142
147
  align?: 'left' | 'center' | 'right';
143
148
  sx?: any;
144
149
  }
145
- export type FieldConfig = TextField | NumberField | SelectField | CheckboxField | ToggleField | RadioField | SwitchField | AutocompleteField | DateField | ImageField | TitleField | SectionField;
150
+ export type FieldConfig = TextField | NumberField | SelectField | CheckboxField | ToggleField | RadioField | SwitchField | AutocompleteField | DateField | ImageField | TitleField | SectionField | ComponentField;
146
151
  export interface FormButton {
147
152
  text: string;
148
153
  color?: string;
package/dist/index.es.js CHANGED
@@ -14,7 +14,7 @@ var bn = (e, t, r, n) => ({
14
14
  import { jsx as D, jsxs as ke, Fragment as Tl } from "react/jsx-runtime";
15
15
  import * as Fe from "react";
16
16
  import ye, { useMemo as Ie, useState as Xt, useRef as xt, useCallback as je, useEffect as wt, createElement as io, useReducer as _l, forwardRef as Cl, useImperativeHandle as Al, Fragment as Fl } from "react";
17
- import { Box as xe, TextField as wn, Autocomplete as $l, CircularProgress as _r, Chip as zn, Checkbox as _a, FormControlLabel as Sn, Switch as Dl, FormHelperText as Hr, FormControl as mi, Typography as Ve, RadioGroup as Ca, Radio as Aa, InputLabel as Rl, Select as Pl, MenuItem as En, Card as ao, LinearProgress as jl, Button as Bt, ButtonGroup as Il, createTheme as Ml, ThemeProvider as zl, Paper as so, Tooltip as Vl, IconButton as Nl, Alert as Ll } from "@mui/material";
17
+ import { Box as ve, TextField as wn, Autocomplete as $l, CircularProgress as _r, Chip as zn, Checkbox as _a, FormControlLabel as Sn, Switch as Dl, FormHelperText as Hr, FormControl as mi, Typography as Ve, RadioGroup as Ca, Radio as Aa, InputLabel as Rl, Select as Pl, MenuItem as En, Card as ao, LinearProgress as jl, Button as Bt, ButtonGroup as Il, createTheme as Ml, ThemeProvider as zl, Paper as so, Tooltip as Vl, IconButton as Nl, Alert as Ll } from "@mui/material";
18
18
  import ql from "@emotion/styled";
19
19
  import "@emotion/react";
20
20
  var pn = (e) => e.type === "checkbox", tr = (e) => e instanceof Date, We = (e) => e == null;
@@ -2534,10 +2534,10 @@ var Ae, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
2534
2534
  clear() {
2535
2535
  v(this, Ae).clear(), v(this, Mt).clear();
2536
2536
  }
2537
- }, Ae = new WeakMap(), Mt = new WeakMap(), zt = new WeakMap(), Rr = new WeakMap(), Pr = new WeakMap(), Vt = new WeakMap(), jr = new WeakMap(), Ir = new WeakMap(), ro), Ke, fe, un, Ue, lr, Mr, Nt, Lt, dn, zr, Vr, cr, ur, qt, Nr, ve, Yr, Vi, Ni, Li, qi, Bi, Ui, Wi, Ao, no, Ac = (no = class extends fn {
2537
+ }, Ae = new WeakMap(), Mt = new WeakMap(), zt = new WeakMap(), Rr = new WeakMap(), Pr = new WeakMap(), Vt = new WeakMap(), jr = new WeakMap(), Ir = new WeakMap(), ro), Ke, fe, un, Ue, lr, Mr, Nt, Lt, dn, zr, Vr, cr, ur, qt, Nr, xe, Yr, Vi, Ni, Li, qi, Bi, Ui, Wi, Ao, no, Ac = (no = class extends fn {
2538
2538
  constructor(t, r) {
2539
2539
  super();
2540
- ae(this, ve);
2540
+ ae(this, xe);
2541
2541
  ae(this, Ke);
2542
2542
  ae(this, fe);
2543
2543
  ae(this, un);
@@ -2563,7 +2563,7 @@ var Ae, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
2563
2563
  this.refetch = this.refetch.bind(this);
2564
2564
  }
2565
2565
  onSubscribe() {
2566
- this.listeners.size === 1 && (v(this, fe).addObserver(this), Ga(v(this, fe), this.options) ? pe(this, ve, Yr).call(this) : this.updateResult(), pe(this, ve, qi).call(this));
2566
+ this.listeners.size === 1 && (v(this, fe).addObserver(this), Ga(v(this, fe), this.options) ? pe(this, xe, Yr).call(this) : this.updateResult(), pe(this, xe, qi).call(this));
2567
2567
  }
2568
2568
  onUnsubscribe() {
2569
2569
  this.hasListeners() || this.destroy();
@@ -2583,7 +2583,7 @@ var Ae, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
2583
2583
  );
2584
2584
  }
2585
2585
  destroy() {
2586
- this.listeners = /* @__PURE__ */ new Set(), pe(this, ve, Bi).call(this), pe(this, ve, Ui).call(this), v(this, fe).removeObserver(this);
2586
+ this.listeners = /* @__PURE__ */ new Set(), pe(this, xe, Bi).call(this), pe(this, xe, Ui).call(this), v(this, fe).removeObserver(this);
2587
2587
  }
2588
2588
  setOptions(t) {
2589
2589
  const r = this.options, n = v(this, fe);
@@ -2591,7 +2591,7 @@ var Ae, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
2591
2591
  throw new Error(
2592
2592
  "Expected enabled to be a boolean or a callback that returns a boolean"
2593
2593
  );
2594
- pe(this, ve, Wi).call(this), v(this, fe).setOptions(this.options), r._defaulted && !ji(this.options, r) && v(this, Ke).getQueryCache().notify({
2594
+ pe(this, xe, Wi).call(this), v(this, fe).setOptions(this.options), r._defaulted && !ji(this.options, r) && v(this, Ke).getQueryCache().notify({
2595
2595
  type: "observerOptionsUpdated",
2596
2596
  query: v(this, fe),
2597
2597
  observer: this
@@ -2602,9 +2602,9 @@ var Ae, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
2602
2602
  n,
2603
2603
  this.options,
2604
2604
  r
2605
- ) && pe(this, ve, Yr).call(this), this.updateResult(), i && (v(this, fe) !== n || nt(this.options.enabled, v(this, fe)) !== nt(r.enabled, v(this, fe)) || Wt(this.options.staleTime, v(this, fe)) !== Wt(r.staleTime, v(this, fe))) && pe(this, ve, Vi).call(this);
2606
- const a = pe(this, ve, Ni).call(this);
2607
- i && (v(this, fe) !== n || nt(this.options.enabled, v(this, fe)) !== nt(r.enabled, v(this, fe)) || a !== v(this, qt)) && pe(this, ve, Li).call(this, a);
2605
+ ) && pe(this, xe, Yr).call(this), this.updateResult(), i && (v(this, fe) !== n || nt(this.options.enabled, v(this, fe)) !== nt(r.enabled, v(this, fe)) || Wt(this.options.staleTime, v(this, fe)) !== Wt(r.staleTime, v(this, fe))) && pe(this, xe, Vi).call(this);
2606
+ const a = pe(this, xe, Ni).call(this);
2607
+ i && (v(this, fe) !== n || nt(this.options.enabled, v(this, fe)) !== nt(r.enabled, v(this, fe)) || a !== v(this, qt)) && pe(this, xe, Li).call(this, a);
2608
2608
  }
2609
2609
  getOptimisticResult(t) {
2610
2610
  const r = v(this, Ke).getQueryCache().build(v(this, Ke), t), n = this.createResult(r, t);
@@ -2634,7 +2634,7 @@ var Ae, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
2634
2634
  return n.fetch().then(() => this.createResult(n, r));
2635
2635
  }
2636
2636
  fetch(t) {
2637
- return pe(this, ve, Yr).call(this, {
2637
+ return pe(this, xe, Yr).call(this, {
2638
2638
  ...t,
2639
2639
  cancelRefetch: t.cancelRefetch ?? !0
2640
2640
  }).then(() => (this.updateResult(), v(this, Ue)));
@@ -2742,20 +2742,20 @@ var Ae, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
2742
2742
  return v(this, Ue)[l] !== t[l] && s.has(l);
2743
2743
  });
2744
2744
  };
2745
- pe(this, ve, Ao).call(this, { listeners: n() });
2745
+ pe(this, xe, Ao).call(this, { listeners: n() });
2746
2746
  }
2747
2747
  onQueryUpdate() {
2748
- this.updateResult(), this.hasListeners() && pe(this, ve, qi).call(this);
2748
+ this.updateResult(), this.hasListeners() && pe(this, xe, qi).call(this);
2749
2749
  }
2750
- }, Ke = new WeakMap(), fe = new WeakMap(), un = new WeakMap(), Ue = new WeakMap(), lr = new WeakMap(), Mr = new WeakMap(), Nt = new WeakMap(), Lt = new WeakMap(), dn = new WeakMap(), zr = new WeakMap(), Vr = new WeakMap(), cr = new WeakMap(), ur = new WeakMap(), qt = new WeakMap(), Nr = new WeakMap(), ve = new WeakSet(), Yr = function(t) {
2751
- pe(this, ve, Wi).call(this);
2750
+ }, Ke = new WeakMap(), fe = new WeakMap(), un = new WeakMap(), Ue = new WeakMap(), lr = new WeakMap(), Mr = new WeakMap(), Nt = new WeakMap(), Lt = new WeakMap(), dn = new WeakMap(), zr = new WeakMap(), Vr = new WeakMap(), cr = new WeakMap(), ur = new WeakMap(), qt = new WeakMap(), Nr = new WeakMap(), xe = new WeakSet(), Yr = function(t) {
2751
+ pe(this, xe, Wi).call(this);
2752
2752
  let r = v(this, fe).fetch(
2753
2753
  this.options,
2754
2754
  t
2755
2755
  );
2756
2756
  return t != null && t.throwOnError || (r = r.catch(Ge)), r;
2757
2757
  }, Vi = function() {
2758
- pe(this, ve, Bi).call(this);
2758
+ pe(this, xe, Bi).call(this);
2759
2759
  const t = Wt(
2760
2760
  this.options.staleTime,
2761
2761
  v(this, fe)
@@ -2769,11 +2769,11 @@ var Ae, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
2769
2769
  }, Ni = function() {
2770
2770
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(v(this, fe)) : this.options.refetchInterval) ?? !1;
2771
2771
  }, Li = function(t) {
2772
- pe(this, ve, Ui).call(this), Z(this, qt, t), !(pr || nt(this.options.enabled, v(this, fe)) === !1 || !Ri(v(this, qt)) || v(this, qt) === 0) && Z(this, ur, setInterval(() => {
2773
- (this.options.refetchIntervalInBackground || pa.isFocused()) && pe(this, ve, Yr).call(this);
2772
+ pe(this, xe, Ui).call(this), Z(this, qt, t), !(pr || nt(this.options.enabled, v(this, fe)) === !1 || !Ri(v(this, qt)) || v(this, qt) === 0) && Z(this, ur, setInterval(() => {
2773
+ (this.options.refetchIntervalInBackground || pa.isFocused()) && pe(this, xe, Yr).call(this);
2774
2774
  }, v(this, qt)));
2775
2775
  }, qi = function() {
2776
- pe(this, ve, Vi).call(this), pe(this, ve, Li).call(this, pe(this, ve, Ni).call(this));
2776
+ pe(this, xe, Vi).call(this), pe(this, xe, Li).call(this, pe(this, xe, Ni).call(this));
2777
2777
  }, Bi = function() {
2778
2778
  v(this, cr) && (clearTimeout(v(this, cr)), Z(this, cr, void 0));
2779
2779
  }, Ui = function() {
@@ -2932,7 +2932,7 @@ const Hc = ({
2932
2932
  style: i,
2933
2933
  className: a,
2934
2934
  onClick: s
2935
- }) => /* @__PURE__ */ D(xe, { sx: { textAlign: "center" }, children: /* @__PURE__ */ D(
2935
+ }) => /* @__PURE__ */ D(ve, { sx: { textAlign: "center" }, children: /* @__PURE__ */ D(
2936
2936
  "img",
2937
2937
  {
2938
2938
  src: e || "/placeholder-image.png",
@@ -3100,7 +3100,7 @@ const Gc = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
3100
3100
  xr(e) && (g != null && g.dependsOn) && y && d.current && (d.current = !1, p(!1));
3101
3101
  }, [y, g == null ? void 0 : g.dependsOn]);
3102
3102
  const u = je(() => xr(e) ? w : e.type === "select" || e.type === "toggle" || e.type === "radio" || e.type === "autocomplete" ? e.options || [] : [], [e, w]);
3103
- return O ? /* @__PURE__ */ D(xe, { children: (() => {
3103
+ return O ? /* @__PURE__ */ D(ve, { children: (() => {
3104
3104
  switch (e.type) {
3105
3105
  case "title":
3106
3106
  return /* @__PURE__ */ D(
@@ -3198,7 +3198,7 @@ const Gc = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
3198
3198
  disabled: e.disabled || z,
3199
3199
  endAdornment: z ? /* @__PURE__ */ D(_r, { size: 20 }) : void 0,
3200
3200
  onOpen: te,
3201
- children: z ? /* @__PURE__ */ D(En, { disabled: !0, children: /* @__PURE__ */ ke(xe, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
3201
+ children: z ? /* @__PURE__ */ D(En, { disabled: !0, children: /* @__PURE__ */ ke(ve, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
3202
3202
  /* @__PURE__ */ D(_r, { size: 16 }),
3203
3203
  /* @__PURE__ */ D(Ve, { variant: "body2", children: "Fetching data..." })
3204
3204
  ] }) }) : k.length > 0 ? k.map((W) => /* @__PURE__ */ D(En, { value: W.value, children: W.label }, W.value)) : l && !z ? /* @__PURE__ */ D(En, { disabled: !0, children: /* @__PURE__ */ D(Ve, { variant: "body2", color: "text.secondary", children: "No options available" }) }) : /* @__PURE__ */ D(En, { disabled: !0, children: /* @__PURE__ */ D(Ve, { variant: "body2", color: "text.secondary", children: "Click to load options" }) })
@@ -3215,7 +3215,7 @@ const Gc = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
3215
3215
  name: e.name,
3216
3216
  control: t,
3217
3217
  defaultValue: x(),
3218
- render: ({ field: V }) => /* @__PURE__ */ ke(xe, { sx: { mt: 1, mb: 0 }, children: [
3218
+ render: ({ field: V }) => /* @__PURE__ */ ke(ve, { sx: { mt: 1, mb: 0 }, children: [
3219
3219
  /* @__PURE__ */ D(
3220
3220
  Sn,
3221
3221
  {
@@ -3299,7 +3299,7 @@ const Gc = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
3299
3299
  name: e.name,
3300
3300
  control: t,
3301
3301
  defaultValue: x(),
3302
- render: ({ field: V }) => /* @__PURE__ */ ke(xe, { sx: { mt: 1, mb: 0 }, children: [
3302
+ render: ({ field: V }) => /* @__PURE__ */ ke(ve, { sx: { mt: 1, mb: 0 }, children: [
3303
3303
  /* @__PURE__ */ D(
3304
3304
  Sn,
3305
3305
  {
@@ -3487,6 +3487,8 @@ const Gc = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
3487
3487
  )
3488
3488
  }
3489
3489
  );
3490
+ case "component":
3491
+ return /* @__PURE__ */ D(ve, { children: e.render ? e.render() : e.content });
3490
3492
  default:
3491
3493
  return null;
3492
3494
  }
@@ -8679,17 +8681,17 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
8679
8681
  },
8680
8682
  children: [
8681
8683
  /* @__PURE__ */ ke(
8682
- xe,
8684
+ ve,
8683
8685
  {
8684
8686
  sx: {
8685
8687
  display: "flex",
8686
8688
  alignItems: "center",
8687
8689
  justifyContent: "space-between",
8688
- mb: 1
8690
+ mb: 2
8689
8691
  },
8690
8692
  children: [
8691
8693
  /* @__PURE__ */ D(
8692
- xe,
8694
+ ve,
8693
8695
  {
8694
8696
  sx: {
8695
8697
  display: "flex",
@@ -8699,9 +8701,9 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
8699
8701
  },
8700
8702
  children: s.map((d, f) => {
8701
8703
  const m = d === e, x = d < e || a.includes(d), g = m || x ? "primary.main" : "#8F97A4";
8702
- return /* @__PURE__ */ ke(xe, { sx: { display: "flex", alignItems: "center" }, children: [
8704
+ return /* @__PURE__ */ ke(ve, { sx: { display: "flex", alignItems: "center" }, children: [
8703
8705
  /* @__PURE__ */ ke(
8704
- xe,
8706
+ ve,
8705
8707
  {
8706
8708
  onClick: () => p(d) && r(d),
8707
8709
  sx: {
@@ -8711,7 +8713,7 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
8711
8713
  },
8712
8714
  children: [
8713
8715
  /* @__PURE__ */ D(
8714
- xe,
8716
+ ve,
8715
8717
  {
8716
8718
  sx: {
8717
8719
  width: 24,
@@ -8742,7 +8744,7 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
8742
8744
  }
8743
8745
  ),
8744
8746
  f < s.length - 1 && /* @__PURE__ */ D(
8745
- xe,
8747
+ ve,
8746
8748
  {
8747
8749
  sx: {
8748
8750
  width: 40,
@@ -8806,10 +8808,10 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
8806
8808
  `${o.text}-${l}`
8807
8809
  );
8808
8810
  };
8809
- return /* @__PURE__ */ ke(xe, { sx: { mt: 3, display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
8810
- /* @__PURE__ */ D(xe, { sx: { display: "flex", gap: 2 }, children: n.map((o, l) => s(o, l)) }),
8811
- /* @__PURE__ */ D(xe, { sx: { display: "flex", gap: 2 }, children: i.map((o, l) => s(o, l)) }),
8812
- /* @__PURE__ */ D(xe, { sx: { display: "flex", gap: 2 }, children: a.map((o, l) => s(o, l)) })
8811
+ return /* @__PURE__ */ ke(ve, { sx: { mt: 3, display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
8812
+ /* @__PURE__ */ D(ve, { sx: { display: "flex", gap: 2 }, children: n.map((o, l) => s(o, l)) }),
8813
+ /* @__PURE__ */ D(ve, { sx: { display: "flex", gap: 2 }, children: i.map((o, l) => s(o, l)) }),
8814
+ /* @__PURE__ */ D(ve, { sx: { display: "flex", gap: 2 }, children: a.map((o, l) => s(o, l)) })
8813
8815
  ] });
8814
8816
  }, lf = ({
8815
8817
  config: e,
@@ -8861,7 +8863,7 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
8861
8863
  return { ...y, justifyContent: "flex-end" };
8862
8864
  }
8863
8865
  };
8864
- return p === "vertical" ? /* @__PURE__ */ D(xe, { sx: b(), children: o.map((y, O) => /* @__PURE__ */ D(xe, { sx: { width: "100%" }, children: c(y, O) }, O)) }) : /* @__PURE__ */ D(xe, { sx: b(), children: /* @__PURE__ */ D(Il, { variant: "outlined", size: "medium", children: o.map((y, O) => c(y, O)) }) });
8866
+ return p === "vertical" ? /* @__PURE__ */ D(ve, { sx: b(), children: o.map((y, O) => /* @__PURE__ */ D(ve, { sx: { width: "100%" }, children: c(y, O) }, O)) }) : /* @__PURE__ */ D(ve, { sx: b(), children: /* @__PURE__ */ D(Il, { variant: "outlined", size: "medium", children: o.map((y, O) => c(y, O)) }) });
8865
8867
  }, cf = new Cc({
8866
8868
  defaultOptions: {
8867
8869
  queries: {
@@ -9018,7 +9020,7 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
9018
9020
  return c ? (R || ue) && (Me = !se) : R && (Me = !de), { ...U, disabled: U.disabled || Me };
9019
9021
  })
9020
9022
  };
9021
- return /* @__PURE__ */ D(xe, { sx: { mt: 3 }, children: /* @__PURE__ */ D(
9023
+ return /* @__PURE__ */ D(ve, { sx: { mt: 3 }, children: /* @__PURE__ */ D(
9022
9024
  lf,
9023
9025
  {
9024
9026
  config: P,
@@ -9047,7 +9049,7 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
9047
9049
  }
9048
9050
  );
9049
9051
  }
9050
- return l ? /* @__PURE__ */ D(xe, { sx: { mt: 3, display: "flex", justifyContent: "flex-end", flexDirection: "column", alignItems: "flex-end" }, children: /* @__PURE__ */ ke(xe, { sx: { display: "flex", gap: 2 }, children: [
9052
+ return l ? /* @__PURE__ */ D(ve, { sx: { mt: 3, display: "flex", justifyContent: "flex-end", flexDirection: "column", alignItems: "flex-end" }, children: /* @__PURE__ */ ke(ve, { sx: { display: "flex", gap: 2 }, children: [
9051
9053
  c && y > 1 && /* @__PURE__ */ D(
9052
9054
  Bt,
9053
9055
  {
@@ -9097,7 +9099,7 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
9097
9099
  )
9098
9100
  ] }) }) : null;
9099
9101
  }, re = /* @__PURE__ */ ke(
9100
- xe,
9102
+ ve,
9101
9103
  {
9102
9104
  component: "form",
9103
9105
  onSubmit: (P) => {
@@ -9126,8 +9128,7 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
9126
9128
  ao,
9127
9129
  {
9128
9130
  sx: {
9129
- px: 1,
9130
- py: 1,
9131
+ p: 2,
9131
9132
  boxShadow: "0px 1px 4px 0px #00000014",
9132
9133
  background: "#F8F8F8",
9133
9134
  borderRadius: "4px",
@@ -9138,7 +9139,7 @@ const nf = (e) => rf(e) && e !== "classes", af = np({
9138
9139
  children: A.map((P) => {
9139
9140
  const U = Q(P);
9140
9141
  return /* @__PURE__ */ D(
9141
- xe,
9142
+ ve,
9142
9143
  {
9143
9144
  sx: {
9144
9145
  gridColumn: `span ${U}`
@@ -11600,11 +11601,11 @@ const mm = ({
11600
11601
  border: "1px solid #e0e0e0"
11601
11602
  },
11602
11603
  children: [
11603
- /* @__PURE__ */ ke(xe, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
11604
+ /* @__PURE__ */ ke(ve, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
11604
11605
  r(),
11605
11606
  n()
11606
11607
  ] }),
11607
- /* @__PURE__ */ ke(xe, { sx: { flex: 1, minWidth: 0 }, children: [
11608
+ /* @__PURE__ */ ke(ve, { sx: { flex: 1, minWidth: 0 }, children: [
11608
11609
  /* @__PURE__ */ D(Ve, { variant: "body2", noWrap: !0, children: e.file.name }),
11609
11610
  /* @__PURE__ */ ke(Ve, { variant: "caption", color: "textSecondary", children: [
11610
11611
  i(e.file.size),
@@ -11719,7 +11720,7 @@ const mm = ({
11719
11720
  return "flex-end";
11720
11721
  }
11721
11722
  };
11722
- return /* @__PURE__ */ ke(xe, { className: a, style: s, children: [
11723
+ return /* @__PURE__ */ ke(ve, { className: a, style: s, children: [
11723
11724
  /* @__PURE__ */ ke(Ve, { variant: "h6", gutterBottom: !0, children: [
11724
11725
  e.title,
11725
11726
  e.required && /* @__PURE__ */ D("span", { style: { color: "red" }, children: " *" })
@@ -11762,7 +11763,7 @@ const mm = ({
11762
11763
  }
11763
11764
  )
11764
11765
  ] }),
11765
- /* @__PURE__ */ ke(xe, { sx: { mt: 2 }, children: [
11766
+ /* @__PURE__ */ ke(ve, { sx: { mt: 2 }, children: [
11766
11767
  /* @__PURE__ */ D(
11767
11768
  zn,
11768
11769
  {
@@ -11784,7 +11785,7 @@ const mm = ({
11784
11785
  ] })
11785
11786
  ),
11786
11787
  p.length > 0 && /* @__PURE__ */ D(Ll, { severity: "error", sx: { mt: 2 }, children: p.map((k, j) => /* @__PURE__ */ D(Ve, { variant: "body2", children: k }, j)) }),
11787
- o.length > 0 && /* @__PURE__ */ ke(xe, { sx: { mt: 2 }, children: [
11788
+ o.length > 0 && /* @__PURE__ */ ke(ve, { sx: { mt: 2 }, children: [
11788
11789
  /* @__PURE__ */ ke(Ve, { variant: "subtitle1", gutterBottom: !0, children: [
11789
11790
  "Selected Files (",
11790
11791
  o.length,
@@ -11800,7 +11801,7 @@ const mm = ({
11800
11801
  ))
11801
11802
  ] }),
11802
11803
  e.helperText && /* @__PURE__ */ D(Ve, { variant: "caption", color: "textSecondary", sx: { mt: 1, display: "block" }, children: e.helperText }),
11803
- e.submitButton && /* @__PURE__ */ D(xe, { sx: {
11804
+ e.submitButton && /* @__PURE__ */ D(ve, { sx: {
11804
11805
  mt: 3,
11805
11806
  display: "flex",
11806
11807
  justifyContent: F()