@arudovwen/form-builder-react 1.4.7 → 1.4.9

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.
@@ -5557,7 +5557,7 @@ function gs({
5557
5557
  readOnly: r,
5558
5558
  onChange: (B) => {
5559
5559
  const U = B.target.value.replace(/\D/g, "");
5560
- C(U.slice(0, w));
5560
+ C(U);
5561
5561
  },
5562
5562
  placeholder: e,
5563
5563
  className: "w-full px-3 outline-none"
@@ -5977,81 +5977,88 @@ const Ss = bn(As), Ns = j.object({
5977
5977
  ),
5978
5978
  /* @__PURE__ */ n.jsxs("div", { className: "relative flex flex-col flex-1 w-full py-4 gap-y-6", children: [
5979
5979
  u.map(
5980
- (v, f) => /* @__PURE__ */ n.jsx("div", { className: "group cursor-pointer rounded ", children: /* @__PURE__ */ n.jsxs(
5980
+ (v, f) => /* @__PURE__ */ n.jsx(
5981
5981
  "div",
5982
5982
  {
5983
- className: `border border-gray-100 rounded px-4 shadow-[rgba(149,157,165,0.2)_0px_2px_4px] transition-colors duration-200
5983
+ className: "bg-white group cursor-pointer rounded ",
5984
+ children: /* @__PURE__ */ n.jsxs(
5985
+ "div",
5986
+ {
5987
+ className: `border border-gray-100 rounded px-4 shadow-[rgba(149,157,165,0.2)_0px_2px_4px] transition-colors duration-200
5984
5988
  ${r === v.id ? "border-dashed border-blue-400 bg-[#f7f8fa]" : ""} ${m.includes(f) ? "min-h-[300px] pb-6 " : ""}`,
5985
- children: [
5986
- /* @__PURE__ */ n.jsxs("div", { className: "flex items-center justify-between", children: [
5987
- /* @__PURE__ */ n.jsx(
5988
- "div",
5989
- {
5990
- onClick: () => d(v.id),
5991
- className: "flex-1 h-full py-4 cursor-pointer",
5992
- children: /* @__PURE__ */ n.jsx("h2", { className: "font-medium", children: v.title || "Section title" })
5993
- }
5994
- ),
5995
- /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
5996
- /* @__PURE__ */ n.jsx(
5997
- "button",
5998
- {
5999
- type: "button",
6000
- className: "p-1 text-xs border rounded-lg",
6001
- onClick: () => A(v),
6002
- children: /* @__PURE__ */ n.jsx(z, { icon: "fluent:edit-28-regular" })
6003
- }
6004
- ),
6005
- u.length > 1 && /* @__PURE__ */ n.jsx(
6006
- "button",
6007
- {
6008
- type: "button",
6009
- className: "p-1 text-xs border rounded-lg",
6010
- onClick: () => o(v.id),
6011
- children: /* @__PURE__ */ n.jsx(z, { icon: "lets-icons:trash-duotone-line" })
6012
- }
6013
- ),
6014
- /* @__PURE__ */ n.jsx(
6015
- "button",
6016
- {
6017
- type: "button",
6018
- className: "p-1 text-xs rounded-lg",
6019
- onClick: () => h(f),
6020
- children: /* @__PURE__ */ n.jsx(
6021
- z,
5989
+ children: [
5990
+ /* @__PURE__ */ n.jsxs("div", { className: "flex items-center justify-between", children: [
5991
+ /* @__PURE__ */ n.jsx(
5992
+ "div",
5993
+ {
5994
+ onClick: () => d(v.id),
5995
+ className: "flex-1 h-full py-4 cursor-pointer",
5996
+ children: /* @__PURE__ */ n.jsx("h2", { className: "font-medium", children: v.title || "Section title" })
5997
+ }
5998
+ ),
5999
+ /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
6000
+ /* @__PURE__ */ n.jsx(
6001
+ "button",
6002
+ {
6003
+ type: "button",
6004
+ className: "p-1 text-xs border rounded-lg",
6005
+ onClick: () => A(v),
6006
+ children: /* @__PURE__ */ n.jsx(z, { icon: "fluent:edit-28-regular" })
6007
+ }
6008
+ ),
6009
+ u.length > 1 && /* @__PURE__ */ n.jsx(
6010
+ "button",
6011
+ {
6012
+ type: "button",
6013
+ className: "p-1 text-xs border rounded-lg",
6014
+ onClick: () => o(v.id),
6015
+ children: /* @__PURE__ */ n.jsx(z, { icon: "lets-icons:trash-duotone-line" })
6016
+ }
6017
+ ),
6018
+ /* @__PURE__ */ n.jsx(
6019
+ "button",
6022
6020
  {
6023
- icon: m.includes(f) ? "fa6-solid:chevron-up" : "fa6-solid:chevron-down",
6024
- iconClass: "text-base"
6021
+ type: "button",
6022
+ className: "p-1 text-xs rounded-lg",
6023
+ onClick: () => h(f),
6024
+ children: /* @__PURE__ */ n.jsx(
6025
+ z,
6026
+ {
6027
+ icon: m.includes(f) ? "fa6-solid:chevron-up" : "fa6-solid:chevron-down",
6028
+ iconClass: "text-base"
6029
+ }
6030
+ )
6025
6031
  }
6026
6032
  )
6033
+ ] })
6034
+ ] }),
6035
+ (v == null ? void 0 : v.description) && m.includes(f) && /* @__PURE__ */ n.jsx("p", { className: "mt-2 text-sm text-gray-600 text-gray-60", children: v == null ? void 0 : v.description }),
6036
+ m.includes(f) && /* @__PURE__ */ n.jsxs(
6037
+ "div",
6038
+ {
6039
+ className: "h-full mt-4 transition-all duration-200",
6040
+ id: v.id,
6041
+ onDragOver: b,
6042
+ onDragEnd: () => c(!1),
6043
+ onClick: () => d(v.id),
6044
+ children: [
6045
+ /* @__PURE__ */ n.jsx("hr", { className: "group-last:hidden" }),
6046
+ /* @__PURE__ */ n.jsx("div", { className: "h-full mt-4 gap-y-6", children: /* @__PURE__ */ n.jsx(
6047
+ Ss,
6048
+ {
6049
+ elementData: v.questionData,
6050
+ sectionId: v.id
6051
+ }
6052
+ ) })
6053
+ ]
6027
6054
  }
6028
6055
  )
6029
- ] })
6030
- ] }),
6031
- (v == null ? void 0 : v.description) && m.includes(f) && /* @__PURE__ */ n.jsx("p", { className: "mt-2 text-sm text-gray-600 text-gray-60", children: v == null ? void 0 : v.description }),
6032
- m.includes(f) && /* @__PURE__ */ n.jsxs(
6033
- "div",
6034
- {
6035
- className: "h-full mt-4 transition-all duration-200",
6036
- id: v.id,
6037
- onDragOver: b,
6038
- onDragEnd: () => c(!1),
6039
- onClick: () => d(v.id),
6040
- children: [
6041
- /* @__PURE__ */ n.jsx("hr", { className: "group-last:hidden" }),
6042
- /* @__PURE__ */ n.jsx("div", { className: "h-full mt-4 gap-y-6", children: /* @__PURE__ */ n.jsx(
6043
- Ss,
6044
- {
6045
- elementData: v.questionData,
6046
- sectionId: v.id
6047
- }
6048
- ) })
6049
- ]
6050
- }
6051
- )
6052
- ]
6053
- }
6054
- ) }, v.id)
6056
+ ]
6057
+ }
6058
+ )
6059
+ },
6060
+ v.id
6061
+ )
6055
6062
  ),
6056
6063
  /* @__PURE__ */ n.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ n.jsxs(
6057
6064
  "button",
@@ -6095,7 +6102,7 @@ function Ms({
6095
6102
  {
6096
6103
  onDragOver: (o) => o.preventDefault(),
6097
6104
  onDrop: (o) => s(o),
6098
- className: "bg-white p-4 border border-[#E4E7EC] rounded-lg h-full overflow-y-auto no-scrollbar max-h-[calc(100vh-100px)]",
6105
+ className: "bg-white p-4 border border-[#E4E7EC] h-full overflow-y-auto no-scrollbar max-h-[calc(100vh-60px)]",
6099
6106
  children: /* @__PURE__ */ n.jsx(ks, {})
6100
6107
  }
6101
6108
  );
@@ -6486,7 +6493,7 @@ function ws({
6486
6493
  ) }),
6487
6494
  /* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 ", children: [
6488
6495
  /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("div", { className: "w-[260px] h-[calc(100vh-64px)] border-r border-[#E4E7EC] bg-white ", children: /* @__PURE__ */ n.jsx(Ls, {}) }) }),
6489
- /* @__PURE__ */ n.jsx("div", { className: "flex-1 h-full max-h-full z-[1] p-4 ", children: o ? /* @__PURE__ */ n.jsx(Te, { loadingClass: "!w-full !h-[800px]" }) : /* @__PURE__ */ n.jsx(Ms, { questionData: e }) })
6496
+ /* @__PURE__ */ n.jsx("div", { className: "flex-1 h-full max-h-full z-[1]", children: o ? /* @__PURE__ */ n.jsx(Te, { loadingClass: "!w-full !h-[800px]" }) : /* @__PURE__ */ n.jsx(Ms, { questionData: e }) })
6490
6497
  ] })
6491
6498
  ] }) });
6492
6499
  }