@arudovwen/form-builder-react 1.8.0 → 1.8.1

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.
@@ -4954,7 +4954,8 @@ const No = R.object().shape({
4954
4954
  )
4955
4955
  ] })
4956
4956
  ] }),
4957
- a
4957
+ a,
4958
+ n.description && /* @__PURE__ */ i("small", { className: "block text-gray-400 mt-1 text-xs", children: n.description })
4958
4959
  ] });
4959
4960
  }
4960
4961
  );
@@ -7238,13 +7239,16 @@ const Xo = Ze(Qo), es = R.object({
7238
7239
  const h = re(null), v = re((y = e == null ? void 0 : e.questionData) == null ? void 0 : y.length);
7239
7240
  return G(() => {
7240
7241
  var g, p;
7241
- ((g = e == null ? void 0 : e.questionData) == null ? void 0 : g.length) > v.current && h.current && requestAnimationFrame(() => {
7242
- var N;
7243
- (N = h.current) == null || N.scrollTo({
7244
- top: h.current.scrollHeight,
7245
- behavior: "smooth"
7242
+ if (((g = e == null ? void 0 : e.questionData) == null ? void 0 : g.length) > v.current) {
7243
+ const N = document.getElementById("section-container");
7244
+ N && requestAnimationFrame(() => {
7245
+ N.scrollTo({
7246
+ top: N.scrollHeight,
7247
+ behavior: "smooth"
7248
+ });
7246
7249
  });
7247
- }), v.current = (p = e == null ? void 0 : e.questionData) == null ? void 0 : p.length;
7250
+ }
7251
+ v.current = (p = e == null ? void 0 : e.questionData) == null ? void 0 : p.length;
7248
7252
  }, [(f = e == null ? void 0 : e.questionData) == null ? void 0 : f.length]), /* @__PURE__ */ i(
7249
7253
  "div",
7250
7254
  {
@@ -7413,7 +7417,6 @@ const Xo = Ze(Qo), es = R.object({
7413
7417
  return /* @__PURE__ */ b(
7414
7418
  "div",
7415
7419
  {
7416
- ref: t,
7417
7420
  className: "relative flex flex-col h-full pb-5 mx-auto gap-x-4 ",
7418
7421
  children: [
7419
7422
  s && /* @__PURE__ */ i(
@@ -7428,6 +7431,7 @@ const Xo = Ze(Qo), es = R.object({
7428
7431
  "div",
7429
7432
  {
7430
7433
  id: "section-container",
7434
+ ref: t,
7431
7435
  className: "relative flex flex-col flex-1 w-full gap-y-3 container overflow-y-auto",
7432
7436
  children: [
7433
7437
  r == null ? void 0 : r.map(
@@ -7538,7 +7542,7 @@ const Xo = Ze(Qo), es = R.object({
7538
7542
  const a = de("config"), s = (a == null ? void 0 : a.loaderColor) || "#333";
7539
7543
  document.documentElement.style.setProperty("--loader-color", s);
7540
7544
  }, []), /* @__PURE__ */ i("div", { className: n, children: /* @__PURE__ */ i("span", { className: "loader" }) });
7541
- }, ds = se.lazy(() => import("./logic-flow-KtIPQ2fZ.js"));
7545
+ }, ds = se.lazy(() => import("./logic-flow-C_YsGfPF.js"));
7542
7546
  function us({
7543
7547
  questionData: e,
7544
7548
  uploadUrl: n,
@@ -8229,22 +8233,16 @@ const Oe = ({ element: e, validationData: n }) => {
8229
8233
  },
8230
8234
  [e]
8231
8235
  ), l = ee(() => Ei(e, s), [s, e]);
8232
- return a ? /* @__PURE__ */ b("div", { className: `${l ? "" : "invisible h-0"} min-w-0 w-full`, children: [
8233
- /* @__PURE__ */ b("div", { className: "mb-1.5 min-w-0", children: [
8234
- e.inputLabel && /* @__PURE__ */ b("label", { className: "block text-sm font-medium input_label", children: [
8235
- e.inputLabel,
8236
- " ",
8237
- o && /* @__PURE__ */ b("span", { className: "text-gray-400 text-xs", children: [
8238
- "(",
8239
- o == null ? void 0 : o.toLowerCase(),
8240
- ")"
8241
- ] })
8242
- ] }),
8243
- e.description && /* @__PURE__ */ b("small", { className: "block text-gray-400 mt-0.5 text-xs", children: [
8244
- " ",
8245
- e.description
8236
+ return a ? /* @__PURE__ */ b("div", { className: `${l ? "" : "hidden"} min-w-0 w-full`, children: [
8237
+ /* @__PURE__ */ i("div", { className: "mb-1.5 min-w-0", children: e.inputLabel && /* @__PURE__ */ b("label", { className: "block text-sm font-medium input_label", children: [
8238
+ e.inputLabel,
8239
+ " ",
8240
+ o && /* @__PURE__ */ b("span", { className: "text-gray-400 text-xs", children: [
8241
+ "(",
8242
+ o == null ? void 0 : o.toLowerCase(),
8243
+ ")"
8246
8244
  ] })
8247
- ] }),
8245
+ ] }) }),
8248
8246
  /* @__PURE__ */ i(
8249
8247
  a,
8250
8248
  {
@@ -8255,7 +8253,8 @@ const Oe = ({ element: e, validationData: n }) => {
8255
8253
  isReadOnly: n.isReadOnly || e.isDisabled
8256
8254
  }
8257
8255
  }
8258
- )
8256
+ ),
8257
+ e.description && /* @__PURE__ */ i("small", { className: "block text-gray-400 mt-0.5 text-xs", children: e.description })
8259
8258
  ] }) : null;
8260
8259
  }, Ge = (e, n) => e != null && e.allowEdit ? { ...n, isReadOnly: !1 } : n;
8261
8260
  function As({ form_data: e, options: n }) {
@@ -1,7 +1,7 @@
1
1
  import { jsxs as ce, jsx as D, Fragment as De } from "react/jsx-runtime";
2
2
  import ht, { memo as le, useState as xe, useCallback as we, forwardRef as Oo, useRef as ne, useEffect as ie, useContext as gt, createContext as fn, useMemo as be, useLayoutEffect as Aa } from "react";
3
3
  import "react-dom";
4
- import { A as Ia } from "./index-h5u3VnI5.js";
4
+ import { A as Ia } from "./index-DzomIPXi.js";
5
5
  function ue(e) {
6
6
  if (typeof e == "string" || typeof e == "number") return "" + e;
7
7
  let t = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arudovwen/form-builder-react",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "A React-based form builder component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/form-builder.umd.js",