@chaibuilder/sdk 1.2.27 → 1.2.28

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.
Files changed (99) hide show
  1. package/dist/{AddBlocks-ksZjjn0k.js → AddBlocks-0sW6gkCO.js} +8 -7
  2. package/dist/AddBlocks-YJPdSqcY.cjs +1 -0
  3. package/dist/{BrandingOptions-T_kbQFQv.js → BrandingOptions--vgnQvD1.js} +11 -10
  4. package/dist/BrandingOptions-RDn_Nhcq.cjs +1 -0
  5. package/dist/CanvasArea-41QoxuLf.cjs +55 -0
  6. package/dist/CanvasArea-aii0PyU-.js +1179 -0
  7. package/dist/{Class-3k8xjeiM.js → Class-6Hz2KzYb.js} +1 -1
  8. package/dist/{Class-MmCxz2Ay.cjs → Class-Zc8hpE7f.cjs} +1 -1
  9. package/dist/{CurrentPage-0eeU1V_c.js → CurrentPage-06Iacwyp.js} +9 -8
  10. package/dist/CurrentPage-2W1pdAOG.cjs +1 -0
  11. package/dist/ListTree-DnA8gj-7.js +314 -0
  12. package/dist/ListTree-pdQ14QJC.cjs +1 -0
  13. package/dist/MODIFIERS-YPHRtwrM.cjs +1 -0
  14. package/dist/{MODIFIERS-WQdaNvb8.js → MODIFIERS-cBT31iqE.js} +7 -19
  15. package/dist/PagesPanel-PBFzPSNY.cjs +1 -0
  16. package/dist/{PagesPanel-rYN28QpN.js → PagesPanel-_1CDTUdE.js} +9 -8
  17. package/dist/ProjectPanel-755bbzEQ.cjs +1 -0
  18. package/dist/{ProjectPanel-ivFOhdcz.js → ProjectPanel-pUMeIiUW.js} +14 -13
  19. package/dist/STRINGS--j49GZJP.js +7 -0
  20. package/dist/STRINGS-gPz7CUOk.cjs +1 -0
  21. package/dist/Settings-G9Xtqr7n.cjs +1 -0
  22. package/dist/{Settings-XWmKzRl9.js → Settings-dnO-s6x0.js} +596 -559
  23. package/dist/SidePanels-Gq2LdVuY.cjs +1 -0
  24. package/dist/{SidePanels-ODktnGbC.js → SidePanels-VxSXXkt_.js} +62 -61
  25. package/dist/{Topbar-Yunooh00.js → Topbar-5zbOSGF6.js} +6 -5
  26. package/dist/Topbar-J2tb4SA1.cjs +1 -0
  27. package/dist/{UnsplashImages-QMl0bxix.js → UnsplashImages-4WAWgA4s.js} +20 -19
  28. package/dist/UnsplashImages-XwjKheek.cjs +1 -0
  29. package/dist/{UploadImages-Si-A26bc.js → UploadImages-PONIHtn6.js} +11 -10
  30. package/dist/UploadImages-y7LAQVrT.cjs +1 -0
  31. package/dist/{add-page-modal-U7AUUrI1.js → add-page-modal-4VrFvgEm.js} +25 -24
  32. package/dist/add-page-modal-jWcp0w-S.cjs +1 -0
  33. package/dist/confirm-alert-4OQlXZTJ.cjs +1 -0
  34. package/dist/{confirm-alert-kV5-c70T.js → confirm-alert-j7b88hsW.js} +6 -5
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.js +47 -46
  37. package/dist/defaultTheme-7VqqhOcp.cjs +1 -0
  38. package/dist/{defaultTheme-gunU_Fe5.js → defaultTheme-D8B4-wHO.js} +1 -1
  39. package/dist/{delete-page-modal-UCBpdjLe.js → delete-page-modal--xHHdRAq.js} +9 -8
  40. package/dist/delete-page-modal-p6b0upz4.cjs +1 -0
  41. package/dist/email.cjs +1 -1
  42. package/dist/email.js +7 -6
  43. package/dist/{form-zmlTjM9j.js → form-_GJb9YcB.js} +1 -1
  44. package/dist/{form-Ap63cNec.cjs → form-jQj7E-hS.cjs} +1 -1
  45. package/dist/html-to-json-LJyJsnmZ.js +228 -0
  46. package/dist/html-to-json-vP1ESB_e.cjs +1 -0
  47. package/dist/{index-lOJfSheQ.js → index-0QJwevON.js} +2 -2
  48. package/dist/index-12HbDLon.cjs +1 -0
  49. package/dist/{index-f0AbmoYY.js → index-Eb5zyh2F.js} +4 -4
  50. package/dist/{index-Qk028f-N.cjs → index-KArv7pNz.cjs} +1 -1
  51. package/dist/{index-CFUoB97-.js → index-UHaqEdws.js} +993 -956
  52. package/dist/{index-l19JVVXI.cjs → index-mlMvwv2b.cjs} +2 -2
  53. package/dist/lib.cjs +3 -3
  54. package/dist/lib.js +17 -16
  55. package/dist/{page-viewer-jOwy--9A.js → page-viewer-00Xx4u8e.js} +10 -9
  56. package/dist/page-viewer-SZNm7b1n.cjs +1 -0
  57. package/dist/project-general-setting-C_pHNuZE.cjs +1 -0
  58. package/dist/{project-general-setting-3N8HZ2fe.js → project-general-setting-asDxlmhZ.js} +10 -9
  59. package/dist/{project-seo-setting-bSiNgO_1.js → project-seo-setting-DuAaDfDR.js} +7 -6
  60. package/dist/project-seo-setting-q2953ybQ.cjs +1 -0
  61. package/dist/render.cjs +1 -1
  62. package/dist/render.js +14 -13
  63. package/dist/{single-page-detail--AZlZ-pC.js → single-page-detail-UNxXvhl4.js} +17 -16
  64. package/dist/single-page-detail-oqj6zsLU.cjs +1 -0
  65. package/dist/studio.cjs +1 -1
  66. package/dist/studio.js +8 -7
  67. package/dist/ui.cjs +1 -1
  68. package/dist/ui.js +134 -133
  69. package/dist/useCanvasSettings-MR0Glu1b.cjs +1 -0
  70. package/dist/useCanvasSettings-R6br4J9i.js +6 -0
  71. package/dist/web-blocks.cjs +33 -1
  72. package/dist/web-blocks.js +603 -429
  73. package/package.json +1 -1
  74. package/dist/AddBlocks-S-4jzdWv.cjs +0 -1
  75. package/dist/BrandingOptions-EMCT0Wa3.cjs +0 -1
  76. package/dist/CanvasArea-SDzbubar.cjs +0 -55
  77. package/dist/CanvasArea-rhOeubmu.js +0 -950
  78. package/dist/CurrentPage-aTjWjc3o.cjs +0 -1
  79. package/dist/ListTree-Muu4rAtp.js +0 -308
  80. package/dist/ListTree-SWsqdfcG.cjs +0 -1
  81. package/dist/MODIFIERS-9EwxLM8V.cjs +0 -1
  82. package/dist/PagesPanel-n3x-0ozR.cjs +0 -1
  83. package/dist/ProjectPanel-pBePMOta.cjs +0 -1
  84. package/dist/Settings-JRyJayf5.cjs +0 -1
  85. package/dist/SidePanels-BtUeo6M9.cjs +0 -1
  86. package/dist/Topbar-QMeD3hvq.cjs +0 -1
  87. package/dist/UnsplashImages-05JR8oIu.cjs +0 -1
  88. package/dist/UploadImages-OgSN1HVt.cjs +0 -1
  89. package/dist/add-page-modal-9pTKItY-.cjs +0 -1
  90. package/dist/confirm-alert-DhRc-Zcd.cjs +0 -1
  91. package/dist/defaultTheme-7Lk2zq60.cjs +0 -1
  92. package/dist/delete-page-modal-4s-6AIy4.cjs +0 -1
  93. package/dist/html-to-json-C_Eobs_d.cjs +0 -1
  94. package/dist/html-to-json-p__Fgqdg.js +0 -210
  95. package/dist/index-F4AQQ6qq.cjs +0 -1
  96. package/dist/page-viewer-YFrIG3L7.cjs +0 -1
  97. package/dist/project-general-setting-hK7I7FuN.cjs +0 -1
  98. package/dist/project-seo-setting-x-FK0pez.cjs +0 -1
  99. package/dist/single-page-detail-9abF2g2R.cjs +0 -1
@@ -1,30 +1,33 @@
1
- import { isNull as F, isEmpty as k, get as v, pick as $, omit as D, map as _, noop as q } from "lodash-es";
2
- import { j as s } from "./jsx-runtime-WbnYoNE9.js";
3
- import * as d from "react";
4
- import { S as c, s as I, o as j, g as B, m as T, u as f, T as E, c as w, q as z, b as O, r as h, h as V } from "./controls-OfJWSEqC.js";
5
- import { registerChaiBlock as p } from "@chaibuilder/runtime";
6
- import { E as g } from "./empty-slot-ZBlsQi6m.js";
7
- import { HeadingIcon as U, TextIcon as G, CursorTextIcon as W, ButtonIcon as H, Link1Icon as Y, RowsIcon as X, ColumnsIcon as Z, SketchLogoIcon as J, ImageIcon as K, VideoIcon as Q, CodeIcon as ee, DividerHorizontalIcon as te, SpaceBetweenVerticallyIcon as R, TableIcon as le, BorderTopIcon as oe, BorderAllIcon as ae, ViewHorizontalIcon as re, DragHandleHorizontalIcon as se, GroupIcon as ne, LetterCaseToggleIcon as ie, CheckboxIcon as ce, InputIcon as A, RadiobuttonIcon as de, DropdownMenuIcon as ue } from "@radix-ui/react-icons";
8
- import { c as P, g as x } from "./Functions-7jnEwJyw.js";
1
+ import { isNull as $, isEmpty as k, get as x, pick as z, omit as q, find as O, map as E, noop as V } from "lodash-es";
2
+ import { j as n } from "./jsx-runtime-WbnYoNE9.js";
3
+ import * as p from "react";
4
+ import { S as i, s as I, o as C, g as B, m as L, u as y, T as P, c as _, q as U, b as G, r as b, h as W } from "./controls-OfJWSEqC.js";
5
+ import { registerChaiBlock as d } from "@chaibuilder/runtime";
6
+ import { E as v } from "./empty-slot-ZBlsQi6m.js";
7
+ import { HeadingIcon as Y, TextIcon as X, CursorTextIcon as Z, ButtonIcon as R, Link1Icon as J, RowsIcon as K, ColumnsIcon as Q, SketchLogoIcon as ee, ImageIcon as te, VideoIcon as le, CodeIcon as oe, DividerHorizontalIcon as se, SpaceBetweenVerticallyIcon as F, TableIcon as ae, BorderTopIcon as ne, BorderAllIcon as re, ViewHorizontalIcon as ce, DragHandleHorizontalIcon as ie, GroupIcon as de, LetterCaseToggleIcon as ue, CheckboxIcon as pe, InputIcon as D, RadiobuttonIcon as he, DropdownMenuIcon as ye } from "@radix-ui/react-icons";
8
+ import { c as S, g } from "./Functions-7jnEwJyw.js";
9
+ import { g as A } from "./html-to-json-LJyJsnmZ.js";
9
10
  import "./_commonjsHelpers-UyOWmZb0.js";
10
11
  import "clsx";
11
12
  import "tailwind-merge";
12
- const pe = d.memo(
13
+ import "himalaya";
14
+ import "./STRINGS--j49GZJP.js";
15
+ const me = p.memo(
13
16
  (e) => {
14
- const { blockProps: t, inBuilder: l, backgroundImage: a, children: o, tag: r = "div", styles: n } = e;
15
- let i = o;
16
- o || (i = /* @__PURE__ */ s.jsx(g, { blockProps: {}, styles: {}, inBuilder: l }));
17
+ const { blockProps: t, inBuilder: l, backgroundImage: o, children: s, tag: a = "div", styles: r } = e;
18
+ let c = s;
19
+ s || (c = /* @__PURE__ */ n.jsx(v, { blockProps: {}, styles: {}, inBuilder: l }));
17
20
  let u = {};
18
- return a && (u = { backgroundImage: `url(${a})` }), d.createElement(r, { ...t, ...n, style: u }, i);
21
+ return o && (u = { backgroundImage: `url(${o})` }), p.createElement(a, { ...t, ...r, style: u }, c);
19
22
  }
20
23
  );
21
- p(pe, {
24
+ d(me, {
22
25
  type: "Box",
23
26
  label: "Box",
24
27
  category: "core",
25
28
  group: "basic",
26
29
  props: {
27
- styles: c({ default: "" }),
30
+ styles: i({ default: "" }),
28
31
  tag: I({
29
32
  title: "Tag",
30
33
  default: "div",
@@ -48,23 +51,23 @@ p(pe, {
48
51
  { value: "mark", title: "mark" }
49
52
  ]
50
53
  }),
51
- backgroundImage: j({ title: "Background Image" })
54
+ backgroundImage: C({ title: "Background Image" })
52
55
  },
53
56
  canAcceptBlock: () => !0
54
57
  });
55
- const me = (e) => {
56
- const { blockProps: t, styles: l, content: a, level: o = "h1", children: r = null } = e;
57
- return r ? d.createElement(o, { ...l, ...t }, r) : d.createElement(o, {
58
+ const fe = (e) => {
59
+ const { blockProps: t, styles: l, content: o, level: s = "h1", children: a = null } = e;
60
+ return a ? p.createElement(s, { ...l, ...t }, a) : p.createElement(s, {
58
61
  ...l,
59
62
  ...t,
60
- dangerouslySetInnerHTML: { __html: a }
63
+ dangerouslySetInnerHTML: { __html: o }
61
64
  });
62
65
  };
63
- p(me, {
66
+ d(fe, {
64
67
  type: "Heading",
65
68
  label: "Heading",
66
69
  category: "core",
67
- icon: U,
70
+ icon: Y,
68
71
  group: "typography",
69
72
  props: {
70
73
  level: I({
@@ -80,27 +83,27 @@ p(me, {
80
83
  { value: "h6", title: "h6" }
81
84
  ]
82
85
  }),
83
- styles: c({ default: "text-3xl" }),
86
+ styles: i({ default: "text-3xl" }),
84
87
  content: B({ title: "Content", default: "Heading goes here" })
85
88
  },
86
89
  canAcceptBlock: (e) => e === "Span" || e === "Text"
87
90
  });
88
- const fe = (e) => {
89
- const { blockProps: t, styles: l, content: a } = e;
90
- return F(e.children) ? d.createElement("div", {
91
+ const be = (e) => {
92
+ const { blockProps: t, styles: l, content: o } = e;
93
+ return $(e.children) ? p.createElement("p", {
91
94
  ...l,
92
95
  ...t,
93
- dangerouslySetInnerHTML: { __html: a }
94
- }) : d.createElement("p", { ...l, ...t }, e.children);
96
+ dangerouslySetInnerHTML: { __html: o }
97
+ }) : p.createElement("p", { ...l, ...t }, e.children);
95
98
  };
96
- p(fe, {
99
+ d(be, {
97
100
  type: "Paragraph",
98
101
  label: "Paragraph",
99
102
  category: "core",
100
- icon: G,
103
+ icon: X,
101
104
  group: "typography",
102
105
  props: {
103
- styles: c({ default: "" }),
106
+ styles: i({ default: "" }),
104
107
  content: B({
105
108
  title: "Content",
106
109
  default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere."
@@ -108,68 +111,68 @@ p(fe, {
108
111
  },
109
112
  canAcceptBlock: (e) => e === "Span" || e === "Link"
110
113
  });
111
- const ye = (e) => {
112
- const { blockProps: t, styles: l, content: a, children: o = null, tag: r } = e;
113
- return o ? d.createElement("span", { ...l, ...t }, o) : d.createElement(r || "span", {
114
+ const ge = (e) => {
115
+ const { blockProps: t, styles: l, content: o, children: s = null, tag: a } = e;
116
+ return s ? p.createElement("span", { ...l, ...t }, s) : p.createElement(a || "span", {
114
117
  ...l,
115
118
  ...t,
116
- dangerouslySetInnerHTML: { __html: a }
119
+ dangerouslySetInnerHTML: { __html: o }
117
120
  });
118
121
  };
119
- p(ye, {
122
+ d(ge, {
120
123
  type: "Span",
121
124
  label: "Span",
122
125
  category: "core",
123
126
  group: "typography",
124
127
  props: {
125
- styles: c({ default: "" }),
128
+ styles: i({ default: "" }),
126
129
  content: B({ title: "Content", default: "Enter your content" })
127
130
  },
128
131
  canAcceptBlock: () => !0
129
132
  });
130
- const be = (e) => {
131
- const { blockProps: t, content: l, styles: a } = e;
132
- return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx("div", { ...t, ...a, dangerouslySetInnerHTML: { __html: l } }) });
133
+ const ve = (e) => {
134
+ const { blockProps: t, content: l, styles: o } = e;
135
+ return /* @__PURE__ */ n.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ n.jsx("div", { ...t, ...o, dangerouslySetInnerHTML: { __html: l } }) });
133
136
  };
134
- p(be, {
137
+ d(ve, {
135
138
  type: "RichText",
136
139
  label: "Rich Text",
137
140
  category: "core",
138
- icon: W,
141
+ icon: Z,
139
142
  group: "typography",
140
143
  props: {
141
- styles: c({ default: "" }),
142
- content: T({
144
+ styles: i({ default: "" }),
145
+ content: L({
143
146
  title: "Content",
144
147
  default: "<p>This is a rich text block. You can add text, and other content here.</p>"
145
148
  })
146
149
  }
147
150
  });
148
- const he = (e) => {
149
- const { blockProps: t, iconSize: l, icon: a, content: o, iconPos: r, styles: n, children: i } = e, u = a, m = i || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
150
- /* @__PURE__ */ s.jsx("span", { children: o }),
151
- u && /* @__PURE__ */ s.jsx(
151
+ const xe = (e) => {
152
+ const { blockProps: t, iconSize: l, icon: o, content: s, iconPos: a, styles: r, children: c } = e, u = o, h = c || /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
153
+ /* @__PURE__ */ n.jsx("span", { children: s }),
154
+ u && /* @__PURE__ */ n.jsx(
152
155
  "div",
153
156
  {
154
157
  style: { width: l + "px" },
155
- className: r + " " + (r === "order-first" ? "mr-2" : "ml-2") || "",
158
+ className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
156
159
  dangerouslySetInnerHTML: { __html: u }
157
160
  }
158
161
  )
159
162
  ] });
160
- return d.createElement("button", { ...t, ...n, type: "button" }, m);
163
+ return p.createElement("button", { ...t, ...r, type: "button" }, h);
161
164
  };
162
- p(he, {
165
+ d(xe, {
163
166
  type: "Button",
164
167
  label: "Button",
165
168
  category: "core",
166
- icon: H,
169
+ icon: R,
167
170
  group: "basic",
168
171
  props: {
169
- content: f({ title: "Label", default: "Button", multiLingual: !0 }),
170
- styles: c({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
171
- icon: E({ title: "Icon", default: "" }),
172
- iconSize: w({ title: "Icon Size", default: 24 }),
172
+ content: y({ title: "Label", default: "Button", multiLingual: !0 }),
173
+ styles: i({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
174
+ icon: P({ title: "Icon", default: "" }),
175
+ iconSize: _({ title: "Icon Size", default: 24 }),
173
176
  iconPos: I({
174
177
  title: "Icon Position",
175
178
  default: "order-last",
@@ -180,53 +183,53 @@ p(he, {
180
183
  })
181
184
  }
182
185
  });
183
- const ge = (e) => {
184
- const { blockProps: t, link: l, children: a, styles: o, inBuilder: r, content: n } = e;
185
- return !a && k(o == null ? void 0 : o.className) && k(n) ? /* @__PURE__ */ s.jsx(g, { blockProps: t, inBuilder: r }) : r ? a ? /* @__PURE__ */ s.jsx("span", { "data-simulate": "a", ...t, ...o, children: a }) : d.createElement("span", {
186
+ const ke = (e) => {
187
+ const { blockProps: t, link: l, children: o, styles: s, inBuilder: a, content: r } = e;
188
+ return !o && k(s == null ? void 0 : s.className) && k(r) ? /* @__PURE__ */ n.jsx(v, { blockProps: t, inBuilder: a }) : a ? o ? /* @__PURE__ */ n.jsx("span", { "data-simulate": "a", ...t, ...s, children: o }) : p.createElement("span", {
186
189
  ...t,
187
- ...o,
188
- dangerouslySetInnerHTML: { __html: n },
190
+ ...s,
191
+ dangerouslySetInnerHTML: { __html: r },
189
192
  "data-simulate": "a"
190
- }) : a ? /* @__PURE__ */ s.jsx("a", { href: l.href || "#/", target: l.target, ...t, ...o, children: a }) : d.createElement("a", {
193
+ }) : o ? /* @__PURE__ */ n.jsx("a", { href: l.href || "#/", target: l.target, ...t, ...s, children: o }) : p.createElement("a", {
191
194
  ...t,
192
- ...o,
195
+ ...s,
193
196
  href: l.href || "#",
194
197
  target: l.target || "_self",
195
- dangerouslySetInnerHTML: { __html: n }
198
+ dangerouslySetInnerHTML: { __html: r }
196
199
  });
197
200
  };
198
- p(ge, {
201
+ d(ke, {
199
202
  type: "Link",
200
203
  label: "Link",
201
204
  category: "core",
202
- icon: Y,
205
+ icon: J,
203
206
  group: "basic",
204
207
  props: {
205
- styles: c({ default: "" }),
206
- content: f({ title: "Content", default: "" }),
207
- link: z({
208
+ styles: i({ default: "" }),
209
+ content: y({ title: "Content", default: "" }),
210
+ link: U({
208
211
  title: "Link",
209
212
  default: { type: "page", target: "_self", href: "" }
210
213
  })
211
214
  },
212
215
  canAcceptBlock: () => !0
213
216
  });
214
- const xe = (e) => {
215
- const { blockProps: t, children: l, listType: a, styles: o, tag: r, inBuilder: n } = e, i = P(v(o, "className", ""), a);
216
- return !l && k(o == null ? void 0 : o.className) ? /* @__PURE__ */ s.jsx(g, { inBuilder: n, blockProps: t, text: "LIST ITEM" }) : d.createElement(
217
- r || (a === "list-decimal" ? "ol" : "ul"),
218
- { ...t, ...o, className: i },
217
+ const we = (e) => {
218
+ const { blockProps: t, children: l, listType: o, styles: s, tag: a, inBuilder: r } = e, c = S(x(s, "className", ""), o);
219
+ return !l && k(s == null ? void 0 : s.className) ? /* @__PURE__ */ n.jsx(v, { inBuilder: r, blockProps: t, text: "LIST ITEM" }) : p.createElement(
220
+ a || (o === "list-decimal" ? "ol" : "ul"),
221
+ { ...t, ...s, className: c },
219
222
  l
220
223
  );
221
224
  };
222
- p(xe, {
225
+ d(we, {
223
226
  type: "List",
224
227
  label: "List",
225
- icon: X,
228
+ icon: K,
226
229
  category: "core",
227
230
  group: "basic",
228
231
  props: {
229
- styles: c({ default: "" }),
232
+ styles: i({ default: "" }),
230
233
  listType: I({
231
234
  title: "List type",
232
235
  default: "list-disc",
@@ -263,202 +266,202 @@ p(xe, {
263
266
  }
264
267
  ]
265
268
  });
266
- const ke = (e) => {
267
- const { blockProps: t, content: l, styles: a, children: o, tag: r } = e;
268
- return o ? d.createElement(r || "li", { ...a, ...t }, o) : d.createElement(r || "li", {
269
- ...a,
269
+ const Ie = (e) => {
270
+ const { blockProps: t, content: l, styles: o, children: s, tag: a } = e;
271
+ return s ? p.createElement(a || "li", { ...o, ...t }, s) : p.createElement(a || "li", {
272
+ ...o,
270
273
  ...t,
271
274
  dangerouslySetInnerHTML: { __html: l }
272
275
  });
273
276
  };
274
- p(ke, {
277
+ d(Ie, {
275
278
  type: "ListItem",
276
279
  label: "List Item",
277
- icon: Z,
280
+ icon: Q,
278
281
  category: "core",
279
282
  group: "basic",
280
283
  props: {
281
- styles: c({ default: "" }),
284
+ styles: i({ default: "" }),
282
285
  content: B({ title: "Content", default: "List item" })
283
286
  },
284
287
  canAcceptBlock: () => !0,
285
288
  canBeNested: (e) => e === "List"
286
289
  });
287
- const ve = (e, t) => ({
290
+ const w = (e, ...t) => ({
288
291
  ...e,
289
- className: `${e.className} ${t}`
290
- }), Ie = (e) => {
291
- const { blockProps: t, icon: l, styles: a, width: o, inBuilder: r, height: n } = e, i = ve(
292
- a,
293
- P("inline-block", o ? `w-[${o}px]` : "", n ? `h-[${n}px]` : "")
292
+ className: S(e.className, ...t)
293
+ }), Be = (e) => {
294
+ const { blockProps: t, icon: l, styles: o, width: s, inBuilder: a, height: r } = e, c = w(
295
+ o,
296
+ S("inline-block", s ? `w-[${s}px]` : "", r ? `h-[${r}px]` : "")
294
297
  );
295
298
  if (k(l))
296
- return /* @__PURE__ */ s.jsx(g, { blockProps: t, text: "", inBuilder: r, className: "h-8 w-14" });
299
+ return /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "", inBuilder: a, className: "h-8 w-14" });
297
300
  const u = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
298
- return d.createElement("span", {
301
+ return p.createElement("span", {
299
302
  ...t,
300
- ...i,
303
+ ...c,
301
304
  dangerouslySetInnerHTML: { __html: u }
302
305
  });
303
306
  };
304
- p(Ie, {
307
+ d(Be, {
305
308
  type: "Icon",
306
309
  label: "Icon",
307
310
  category: "core",
308
- icon: J,
311
+ icon: ee,
309
312
  group: "media",
310
313
  props: {
311
- styles: c({ default: "text-black" }),
312
- icon: E({
314
+ styles: i({ default: "text-black" }),
315
+ icon: P({
313
316
  title: "Icon",
314
317
  default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'
315
318
  }),
316
- width: w({ title: "Width", default: "" }),
317
- height: w({ title: "Height", default: "" })
319
+ width: _({ title: "Width", default: "" }),
320
+ height: _({ title: "Height", default: "" })
318
321
  }
319
322
  });
320
- const Be = (e) => {
321
- const { blockProps: t, image: l, styles: a, alt: o, height: r, width: n } = e;
322
- return k(l) ? /* @__PURE__ */ s.jsx(g, { blockProps: t, text: "IMAGE URL", className: "h-36" }) : d.createElement("img", {
323
+ const Te = (e) => {
324
+ const { blockProps: t, image: l, styles: o, alt: s, height: a, width: r } = e;
325
+ return k(l) ? /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "IMAGE URL", className: "h-36" }) : p.createElement("img", {
323
326
  ...t,
324
- ...a,
327
+ ...o,
325
328
  src: l,
326
- alt: o,
327
- height: r,
328
- width: n
329
+ alt: s,
330
+ height: a,
331
+ width: r
329
332
  });
330
333
  };
331
- p(Be, {
334
+ d(Te, {
332
335
  type: "Image",
333
336
  label: "Image",
334
337
  category: "core",
335
- icon: K,
338
+ icon: te,
336
339
  group: "media",
337
340
  props: {
338
- styles: c({ default: "" }),
339
- image: j({
341
+ styles: i({ default: "" }),
342
+ image: C({
340
343
  title: "Image",
341
344
  default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
342
345
  }),
343
- alt: f({ title: "Alt", default: "" }),
344
- width: f({ title: "Width", default: "" }),
345
- height: f({ title: "Height", default: "" })
346
+ alt: y({ title: "Alt", default: "" }),
347
+ width: y({ title: "Width", default: "" }),
348
+ height: y({ title: "Height", default: "" })
346
349
  }
347
350
  });
348
351
  const Le = (e) => {
349
- var n;
350
- const { blockProps: t, inBuilder: l, styles: a, children: o } = e;
351
- let r = null;
352
- return !o && l && (r = // @ts-ignore
353
- /* @__PURE__ */ s.jsx("div", { className: P("flex flex-col items-center justify-center", (n = e.emptyStyles) == null ? void 0 : n.className), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded-md border-4 border-dashed", children: /* @__PURE__ */ s.jsxs("p", { className: "truncate p-1 text-left text-xs text-gray-400", children: [
352
+ var r;
353
+ const { blockProps: t, inBuilder: l, styles: o, children: s } = e;
354
+ let a = null;
355
+ return !s && l && (a = // @ts-ignore
356
+ /* @__PURE__ */ n.jsx("div", { className: S("flex flex-col items-center justify-center", (r = e.emptyStyles) == null ? void 0 : r.className), children: /* @__PURE__ */ n.jsx("div", { className: "h-full w-full rounded-md border-4 border-dashed", children: /* @__PURE__ */ n.jsxs("p", { className: "truncate p-1 text-left text-xs text-gray-400", children: [
354
357
  "Slot: ",
355
358
  e.name
356
- ] }) }) })), d.createElement("div", { ...a, ...t, droppable: "yes" }, o || r);
359
+ ] }) }) })), p.createElement("div", { ...o, ...t, droppable: "yes" }, s || a);
357
360
  };
358
- p(Le, {
361
+ d(Le, {
359
362
  type: "Slot",
360
363
  label: "Slot",
361
364
  group: "basic",
362
365
  category: "core",
363
366
  hidden: !0,
364
367
  props: {
365
- styles: c({ default: "" }),
366
- emptyStyles: c({ default: "" })
368
+ styles: i({ default: "" }),
369
+ emptyStyles: i({ default: "" })
367
370
  },
368
371
  canAcceptBlock: () => !0
369
372
  });
370
- const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, C = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, M = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Te = (e) => {
373
+ const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, M = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, H = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, _e = (e) => {
371
374
  if (N.test(e)) {
372
375
  const t = e.match(N);
373
376
  return t ? `https://www.youtube.com/embed/${t[4]}` : e;
374
377
  }
375
- if (C.test(e)) {
376
- const t = e.match(C);
377
- return t ? `https://player.vimeo.com/video/${t[3]}` : e;
378
- }
379
378
  if (M.test(e)) {
380
379
  const t = e.match(M);
380
+ return t ? `https://player.vimeo.com/video/${t[3]}` : e;
381
+ }
382
+ if (H.test(e)) {
383
+ const t = e.match(H);
381
384
  return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
382
385
  }
383
386
  return null;
384
- }, we = d.memo(
387
+ }, Se = p.memo(
385
388
  (e) => {
386
- const { blockProps: t, inBuilder: l, styles: a, url: o, controls: r } = e, n = v(r, "autoPlay", !1), i = v(r, "controls", !1), u = n || v(r, "muted", !0), m = v(r, "loop", !1);
387
- if (k(o))
388
- return /* @__PURE__ */ s.jsx(g, { inBuilder: l, blockProps: t, text: "VIDEO URL", className: "h-36" });
389
- let b = Te(o), y = null;
390
- if (b) {
391
- if (!k(b)) {
392
- const L = [];
393
- L.push(`autoplay=${n ? 1 : 0}`), L.push(`controls=${r ? 1 : 0}`), L.push(`mute=${u ? 1 : 0}&muted=${u ? 1 : 0}`), L.push(`loop=${m ? 1 : 0}`), b = `${b}?${L.join("&")}`;
389
+ const { blockProps: t, inBuilder: l, styles: o, url: s, controls: a } = e, r = x(a, "autoPlay", !1), c = x(a, "controls", !1), u = r || x(a, "muted", !0), h = x(a, "loop", !1);
390
+ if (k(s))
391
+ return /* @__PURE__ */ n.jsx(v, { inBuilder: l, blockProps: t, text: "VIDEO URL", className: "h-36" });
392
+ let f = _e(s), m = null;
393
+ if (f) {
394
+ if (!k(f)) {
395
+ const T = [];
396
+ T.push(`autoplay=${r ? 1 : 0}`), T.push(`controls=${a ? 1 : 0}`), T.push(`mute=${u ? 1 : 0}&muted=${u ? 1 : 0}`), T.push(`loop=${h ? 1 : 0}`), f = `${f}?${T.join("&")}`;
394
397
  }
395
- y = d.createElement("iframe", {
398
+ m = p.createElement("iframe", {
396
399
  ...t,
397
400
  className: "absolute inset-0 w-full h-full",
398
- src: b,
401
+ src: f,
399
402
  allow: l ? "" : "autoplay *; fullscreen *",
400
403
  allowFullScreen: !0,
401
404
  frameBorder: 0
402
405
  });
403
406
  } else
404
- y = d.createElement("video", {
407
+ m = p.createElement("video", {
405
408
  ...t,
406
409
  className: "absolute inset-0 w-full h-full",
407
- src: o,
408
- controls: i,
410
+ src: s,
411
+ controls: c,
409
412
  muted: u,
410
- autoPlay: l ? !1 : n,
411
- loop: m
413
+ autoPlay: l ? !1 : r,
414
+ loop: h
412
415
  });
413
- return /* @__PURE__ */ s.jsx("div", { ...$(a, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
414
- l ? /* @__PURE__ */ s.jsx("div", { ...t, ...D(a, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
415
- y
416
+ return /* @__PURE__ */ n.jsx("div", { ...z(o, ["className"]), children: /* @__PURE__ */ n.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
417
+ l ? /* @__PURE__ */ n.jsx("div", { ...t, ...q(o, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
418
+ m
416
419
  ] }) });
417
420
  }
418
421
  );
419
- p(we, {
422
+ d(Se, {
420
423
  type: "Video",
421
424
  label: "Video",
422
425
  category: "core",
423
- icon: Q,
426
+ icon: le,
424
427
  group: "media",
425
428
  props: {
426
- styles: c({ default: "" }),
427
- url: f({
429
+ styles: i({ default: "" }),
430
+ url: y({
428
431
  title: "Video URL",
429
432
  default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
430
433
  }),
431
- controls: O({
434
+ controls: G({
432
435
  title: "Controls",
433
436
  properties: {
434
- autoPlay: h({ title: "Autoplay", default: !0 }),
435
- controls: h({ title: "Show controls", default: !1 }),
436
- loop: h({ title: "Loop", default: !1 }),
437
- muted: h({ title: "Muted", default: !0 })
437
+ autoPlay: b({ title: "Autoplay", default: !0 }),
438
+ controls: b({ title: "Show controls", default: !1 }),
439
+ loop: b({ title: "Loop", default: !1 }),
440
+ muted: b({ title: "Muted", default: !0 })
438
441
  }
439
442
  })
440
443
  }
441
444
  });
442
- const Se = d.memo(
445
+ const je = p.memo(
443
446
  (e) => {
444
- const { blockProps: t, styles: l, content: a, inBuilder: o } = e;
445
- return /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
446
- o ? /* @__PURE__ */ s.jsx("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
447
- d.createElement("div", {
447
+ const { blockProps: t, styles: l, content: o, inBuilder: s } = e;
448
+ return /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
449
+ s ? /* @__PURE__ */ n.jsx("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
450
+ p.createElement("div", {
448
451
  ...l,
449
- dangerouslySetInnerHTML: { __html: a }
452
+ dangerouslySetInnerHTML: { __html: o }
450
453
  })
451
454
  ] });
452
455
  }
453
456
  );
454
- p(Se, {
457
+ d(je, {
455
458
  type: "CustomHTML",
456
459
  label: "Custom HTML",
457
460
  category: "core",
458
- icon: ee,
461
+ icon: oe,
459
462
  group: "advanced",
460
463
  props: {
461
- styles: c({ default: "" }),
464
+ styles: i({ default: "" }),
462
465
  content: B({
463
466
  title: "HTML Content",
464
467
  default: "<div><p>HTML Snippet goes here...</p></div>",
@@ -466,299 +469,470 @@ p(Se, {
466
469
  })
467
470
  }
468
471
  });
469
- const _e = (e) => {
472
+ const Ee = (e) => {
470
473
  const { blockProps: t, styles: l } = e;
471
- return d.createElement("hr", { ...l, ...t });
474
+ return p.createElement("hr", { ...l, ...t });
472
475
  };
473
- p(_e, {
476
+ d(Ee, {
474
477
  type: "Divider",
475
478
  label: "Divider",
476
479
  category: "core",
477
- icon: te,
480
+ icon: se,
478
481
  group: "basic",
479
482
  props: {
480
- styles: c({ default: "bg-gray-900 h-0.5 py-2 my-1" })
483
+ styles: i({ default: "bg-gray-900 h-0.5 py-2 my-1" })
481
484
  }
482
485
  });
483
- const je = (e) => e.inBuilder ? /* @__PURE__ */ s.jsx("span", { className: "flex", ...e.blockProps, children: e.content }) : `${e.content}`;
484
- p(je, {
486
+ const Ce = (e) => e.inBuilder ? /* @__PURE__ */ n.jsx("span", { className: "inline-block", ...e.blockProps, children: e.content }) : `${e.content}`;
487
+ d(Ce, {
485
488
  type: "Text",
486
489
  label: "Text",
487
490
  hidden: !0,
488
491
  category: "core",
489
492
  group: "typography",
490
- icon: R,
493
+ icon: F,
491
494
  props: {
492
495
  content: B({ title: "Content", defaultValue: "" })
493
496
  }
494
497
  });
495
- const Ee = (e) => {
496
- const { blockProps: t, backgroundImage: l, children: a, styles: o } = e;
497
- let r = {};
498
- return l && (r = { backgroundImage: `url(${l})` }), d.createElement("div", { ...t, ...o, style: r }, a);
498
+ const Pe = ({ children: e, blockProps: t, styles: l }) => {
499
+ const o = w(l, "hs-accordion-group");
500
+ return /* @__PURE__ */ n.jsx("div", { ...t, ...o, children: e });
501
+ };
502
+ d(Pe, {
503
+ type: "AccordionGroup",
504
+ label: "Accordion Group",
505
+ category: "core",
506
+ group: "advanced",
507
+ props: {
508
+ styles: i({ default: "" })
509
+ },
510
+ // @ts-ignore
511
+ blocks: () => {
512
+ const e = "dnd-accordion-" + g();
513
+ return A(`<div class="hs-accordion-group">
514
+ <div class="hs-accordion active" id="hs-unstyled-heading-one">
515
+ <button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-one">
516
+ Accordion #1
517
+ </button>
518
+ <div id="hs-unstyled-collapse-one" class="hs-accordion-content overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-heading-one">
519
+ It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
520
+ </div>
521
+ </div>
522
+
523
+ <div class="hs-accordion" id="hs-unstyled-heading-two">
524
+ <button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-two">
525
+ Accordion #2
526
+ </button>
527
+ <div id="hs-unstyled-collapse-two" class="hs-accordion-content hidden overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-heading-two">
528
+ It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
529
+ </div>
530
+ </div>
531
+ </div>`.replace(/hs-unstyled-heading/g, e).replace(/hs-unstyled-collapse/g, e));
532
+ },
533
+ canAcceptBlock: (e) => e === "Accordion"
534
+ });
535
+ const Ae = ({ children: e, blockProps: t, styles: l, blockState: o }) => {
536
+ const s = w(
537
+ l,
538
+ "hs-accordion " + (o && o != null && o.active ? "active" : "")
539
+ );
540
+ return /* @__PURE__ */ n.jsx("div", { ...t, ...s, children: e });
541
+ };
542
+ d(Ae, {
543
+ type: "Accordion",
544
+ label: "Accordion",
545
+ category: "core",
546
+ group: "advanced",
547
+ props: { styles: i({ default: "" }) },
548
+ //@ts-ignore
549
+ customStylingStates: {
550
+ "hs-accordion-active": "Accordion Active"
551
+ },
552
+ //@ts-ignore
553
+ blockState: {
554
+ active: b({ default: !1, title: "Show content in canvas" })
555
+ },
556
+ getBlockStateFrom: (e) => [e._id],
557
+ // @ts-ignore
558
+ blocks: () => {
559
+ const e = "dnd-accordion-" + g();
560
+ return A(`
561
+ <div class="hs-accordion active" id="hs-unstyled-heading-one">
562
+ <button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-one">
563
+ Accordion #1
564
+ </button>
565
+ <div id="hs-unstyled-collapse-one" class="hs-accordion-content overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-heading-one">
566
+ It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
567
+ </div>
568
+ </div>
569
+ `.replace(/hs-unstyled-heading/g, e).replace(/hs-unstyled-collapse/g, e));
570
+ }
571
+ });
572
+ const Ne = ({ children: e, blockProps: t, styles: l }) => {
573
+ const o = w(l, "hs-accordion-toggle");
574
+ return /* @__PURE__ */ n.jsx("button", { ...o, ...t, children: e });
575
+ };
576
+ d(Ne, {
577
+ type: "AccordionToggle",
578
+ label: "Accordion Toggle",
579
+ category: "core",
580
+ group: "advanced",
581
+ hidden: !0,
582
+ props: {
583
+ styles: i({
584
+ default: "hs-accordion-active:text-blue-600 dark:hs-accordion-active:text-blue-500 inline-flex w-full items-center gap-x-3 rounded-lg px-6 py-3 text-start text-sm font-semibold text-gray-800 hover:text-gray-500 disabled:pointer-events-none disabled:opacity-50 dark:text-neutral-200 dark:hover:text-neutral-400"
585
+ })
586
+ },
587
+ canAcceptBlock: () => !0,
588
+ canDelete: () => !1,
589
+ canMove: () => !1,
590
+ canDuplicate: () => !1
591
+ });
592
+ const Me = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
593
+ const a = w(
594
+ l,
595
+ "hs-accordion-content",
596
+ s && o ? o != null && o.active ? "!block !opacity-100" : "!hidden !opacity-0" : ""
597
+ );
598
+ return /* @__PURE__ */ n.jsx("div", { ...a, ...t, children: e });
599
+ };
600
+ d(Me, {
601
+ type: "AccordionContent",
602
+ label: "Accordion Content",
603
+ category: "core",
604
+ group: "advanced",
605
+ hidden: !0,
606
+ props: {
607
+ styles: i({ default: "w-full overflow-hidden transition-height hidden duration-300" })
608
+ },
609
+ //@ts-ignore
610
+ getBlockStateFrom: (e) => [e._parent],
611
+ canAcceptBlock: () => !0,
612
+ canDelete: () => !1,
613
+ canMove: () => !1,
614
+ canDuplicate: () => !1
615
+ });
616
+ const He = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
617
+ const a = s && (o != null && o.active) ? " open" : "", r = w(l, "hs-collapse-toggle", a);
618
+ return /* @__PURE__ */ n.jsx("button", { type: "button", ...r, ...t, children: e });
619
+ };
620
+ d(He, {
621
+ type: "CollapseToggle",
622
+ label: "Collapse Toggle",
623
+ category: "core",
624
+ group: "advanced",
625
+ hidden: !0,
626
+ props: { styles: i({ default: "" }) },
627
+ canAcceptBlock: () => !0,
628
+ //@ts-ignore
629
+ customStylingStates: {
630
+ "hs-collapse-open": "Collapse Open"
631
+ },
632
+ // @ts-ignore
633
+ getBlockStateFrom: (e, t) => {
634
+ const l = x(e, "styles_attrs.data-hs-collapse", "").replace("#", "");
635
+ if (!l)
636
+ return [];
637
+ const o = O(t, (s) => x(s, "styles_attrs.id") === l);
638
+ return o ? [o == null ? void 0 : o._id] : [];
639
+ }
640
+ });
641
+ const Re = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
642
+ const a = s ? { "!block !opacity-100 open": o == null ? void 0 : o.active, "hidden opacity-0": !(o != null && o.active) } : {}, r = Object.keys(a).filter((u) => a[u]).join(" "), c = w(l, "hs-collapse", r);
643
+ return /* @__PURE__ */ n.jsx("div", { ...c, ...t, children: e });
499
644
  };
500
- p(Ee, {
645
+ d(Re, {
646
+ type: "Collapse",
647
+ label: "Collapse",
648
+ category: "core",
649
+ group: "advanced",
650
+ props: {
651
+ styles: i({
652
+ default: "transition-opacity transition-margin duration hs-collapse-open:opacity-100 opacity-0 w-56 hidden z-10 mt-2 min-w-60 bg-white"
653
+ })
654
+ },
655
+ canAcceptBlock: () => !0,
656
+ //@ts-ignore
657
+ blockState: {
658
+ active: b({ default: !1, title: "Show collapse in canvas" })
659
+ },
660
+ getBlockStateFrom: (e) => [e._id],
661
+ // @ts-ignore
662
+ blocks: () => A(`<button type="button" class="hs-collapse-toggle" id="hs-unstyled-collapse" data-hs-collapse="#hs-unstyled-collapse-content">
663
+ Collapse
664
+ </button>
665
+ <div id="hs-unstyled-collapse-content" class="hs-collapse hidden w-full overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-collapse">
666
+ This is a collapse body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions.
667
+ </div>`.replace(/hs-unstyled-collapse/g, `dnd-collapse-${g()}`))
668
+ });
669
+ const Fe = (e) => {
670
+ const { blockProps: t, backgroundImage: l, children: o, styles: s } = e;
671
+ let a = {};
672
+ return l && (a = { backgroundImage: `url(${l})` }), p.createElement("div", { ...t, ...s, style: a }, o);
673
+ };
674
+ d(Fe, {
501
675
  type: "Body",
502
676
  label: "Body",
503
677
  category: "core",
504
678
  group: "basic",
505
679
  hidden: !0,
506
680
  props: {
507
- styles: c({ default: "font-body antialiased" }),
508
- backgroundImage: j({ title: "Background Image" })
681
+ styles: i({ default: "font-body antialiased" }),
682
+ backgroundImage: C({ title: "Background Image" })
509
683
  },
510
684
  canAcceptBlock: () => !0,
511
685
  canDelete: () => !1,
512
686
  canMove: () => !1,
513
687
  canDuplicate: () => !1
514
688
  });
515
- const Pe = (e) => {
689
+ const De = (e) => {
516
690
  const { blockProps: t, styles: l } = e;
517
- return d.createElement("br", { ...t, ...l });
691
+ return p.createElement("br", { ...t, ...l });
518
692
  };
519
- p(Pe, {
693
+ d(De, {
520
694
  type: "LineBreak",
521
695
  label: "Line Break",
522
696
  category: "core",
523
697
  group: "basic",
524
698
  hidden: !0,
525
- icon: R,
699
+ icon: F,
526
700
  props: {
527
- styles: c({ default: "" })
701
+ styles: i({ default: "" })
528
702
  }
529
703
  });
530
- const S = (e) => {
531
- const t = (r, n) => ({
532
- _id: x(),
533
- _parent: r,
704
+ const j = (e) => {
705
+ const t = (a, r) => ({
706
+ _id: g(),
707
+ _parent: a,
534
708
  _type: "TableCell",
535
709
  styles: "#styles:,",
536
- content: `${e === "TableHead" ? "Table Head" : "Table Cell " + n}`
537
- }), l = (r) => {
538
- const n = x(), i = {
710
+ content: `${e === "TableHead" ? "Table Head" : "Table Cell " + r}`
711
+ }), l = (a) => {
712
+ const r = g(), c = {
539
713
  _type: "TableRow",
540
- _id: n,
714
+ _id: r,
541
715
  styles: "#styles:,border-b"
542
716
  };
543
- return r && (i._parent = r), [i, t(n, "1"), t(n, "2"), t(n, "3")];
544
- }, a = (r) => {
545
- const n = x(), i = {
546
- _id: n,
717
+ return a && (c._parent = a), [c, t(r, "1"), t(r, "2"), t(r, "3")];
718
+ }, o = (a) => {
719
+ const r = g(), c = {
720
+ _id: r,
547
721
  _type: "TableHead",
548
722
  styles: "#styles:,font-medium"
549
723
  };
550
- return r && (i._parent = r), [i, ...l(n)];
551
- }, o = (r) => {
552
- const n = x(), i = {
553
- _id: n,
724
+ return a && (c._parent = a), [c, ...l(r)];
725
+ }, s = (a) => {
726
+ const r = g(), c = {
727
+ _id: r,
554
728
  _type: "TableBody",
555
729
  styles: "#styles:,"
556
730
  };
557
- return r && (i._parent = r), [i, ...l(n), ...l(n)];
731
+ return a && (c._parent = a), [c, ...l(r), ...l(r)];
558
732
  };
559
733
  if (e === "Table") {
560
- const r = x();
734
+ const a = g();
561
735
  return [
562
736
  {
563
- _id: r,
737
+ _id: a,
564
738
  _type: "Table",
565
739
  styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
566
740
  },
567
- ...a(r),
568
- ...o(r)
741
+ ...o(a),
742
+ ...s(a)
569
743
  ];
570
744
  }
571
- return e === "TableRow" ? l() : e === "TableHead" ? a() : e === "TableBody" ? o() : [];
572
- }, Ne = (e) => {
573
- const { blockProps: t, children: l, styles: a } = e;
574
- return l ? d.createElement("table", { ...t, ...a }, l) : /* @__PURE__ */ s.jsx(g, { blockProps: t, text: "TABLE HEAD / BODY" });
745
+ return e === "TableRow" ? l() : e === "TableHead" ? o() : e === "TableBody" ? s() : [];
746
+ }, $e = (e) => {
747
+ const { blockProps: t, children: l, styles: o } = e;
748
+ return l ? p.createElement("table", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE HEAD / BODY" });
575
749
  };
576
- p(Ne, {
750
+ d($e, {
577
751
  type: "Table",
578
752
  label: "Table",
579
753
  category: "core",
580
754
  group: "table",
581
755
  hidden: !0,
582
- icon: le,
756
+ icon: ae,
583
757
  props: {
584
- styles: c({ default: "" })
758
+ styles: i({ default: "" })
585
759
  },
586
- blocks: S("Table")
760
+ blocks: j("Table")
587
761
  });
588
- const Ce = (e) => {
589
- const { blockProps: t, children: l, styles: a } = e;
590
- return l ? d.createElement("thead", { ...t, ...a }, l) : /* @__PURE__ */ s.jsx(g, { blockProps: t, text: "TABLE ROW" });
762
+ const ze = (e) => {
763
+ const { blockProps: t, children: l, styles: o } = e;
764
+ return l ? p.createElement("thead", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE ROW" });
591
765
  };
592
- p(Ce, {
766
+ d(ze, {
593
767
  type: "TableHead",
594
768
  label: "Table Head",
595
769
  category: "core",
596
770
  group: "table",
597
771
  hidden: !0,
598
- icon: oe,
772
+ icon: ne,
599
773
  props: {
600
- styles: c({ default: "" })
774
+ styles: i({ default: "" })
601
775
  },
602
- blocks: S("TableHead")
776
+ blocks: j("TableHead")
603
777
  });
604
- const Me = (e) => {
605
- const { blockProps: t, children: l, styles: a } = e;
606
- return l ? d.createElement("tbody", { ...t, ...a }, l) : /* @__PURE__ */ s.jsx(g, { blockProps: t, text: "TABLE ROW" });
778
+ const qe = (e) => {
779
+ const { blockProps: t, children: l, styles: o } = e;
780
+ return l ? p.createElement("tbody", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE ROW" });
607
781
  };
608
- p(Me, {
782
+ d(qe, {
609
783
  type: "TableBody",
610
784
  label: "Table Body",
611
785
  category: "core",
612
786
  group: "table",
613
787
  hidden: !0,
614
- icon: ae,
788
+ icon: re,
615
789
  props: {
616
- styles: c({ default: "" })
790
+ styles: i({ default: "" })
617
791
  },
618
- blocks: S("TableBody")
792
+ blocks: j("TableBody")
619
793
  });
620
- const He = (e) => {
621
- const { blockProps: t, children: l, styles: a } = e;
622
- return l ? d.createElement("tr", { ...t, ...a }, l) : /* @__PURE__ */ s.jsx(g, { blockProps: t, text: "TABLE CELL" });
794
+ const Oe = (e) => {
795
+ const { blockProps: t, children: l, styles: o } = e;
796
+ return l ? p.createElement("tr", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE CELL" });
623
797
  };
624
- p(He, {
798
+ d(Oe, {
625
799
  type: "TableRow",
626
800
  label: "Table Row",
627
801
  category: "core",
628
802
  group: "table",
629
803
  hidden: !0,
630
- icon: re,
804
+ icon: ce,
631
805
  props: {
632
- styles: c({ default: "w-full" })
806
+ styles: i({ default: "w-full" })
633
807
  },
634
- blocks: S("TableRow")
808
+ blocks: j("TableRow")
635
809
  });
636
- const Re = (e) => {
637
- const { blockProps: t, children: l, content: a, styles: o } = e;
638
- return !l && k(a) ? /* @__PURE__ */ s.jsx(g, { blockProps: t }) : l ? d.createElement("td", { ...t, ...o }, l) : d.createElement("td", {
810
+ const Ve = (e) => {
811
+ const { blockProps: t, children: l, content: o, styles: s } = e;
812
+ return !l && k(o) ? /* @__PURE__ */ n.jsx(v, { blockProps: t }) : l ? p.createElement("td", { ...t, ...s }, l) : p.createElement("td", {
639
813
  ...t,
640
- ...o,
641
- dangerouslySetInnerHTML: { __html: a }
814
+ ...s,
815
+ dangerouslySetInnerHTML: { __html: o }
642
816
  });
643
817
  };
644
- p(Re, {
818
+ d(Ve, {
645
819
  type: "TableCell",
646
820
  label: "Table Cell",
647
821
  category: "core",
648
822
  group: "table",
649
823
  hidden: !0,
650
- icon: se,
824
+ icon: ie,
651
825
  props: {
652
- styles: c({ default: "" }),
653
- content: T({ title: "Content", default: "Table cell item" })
826
+ styles: i({ default: "" }),
827
+ content: L({ title: "Content", default: "Table cell item" })
654
828
  }
655
829
  });
656
- const Ae = (e) => {
657
- const { blockProps: t, errorMessage: l, name: a, _type: o, successMessage: r, action: n, styles: i, children: u } = e;
658
- let m = u;
659
- u || (m = /* @__PURE__ */ s.jsx(g, { blockProps: {}, text: "FORM FIELDS" }));
660
- const b = {
830
+ const Ue = (e) => {
831
+ const { blockProps: t, errorMessage: l, name: o, _type: s, successMessage: a, action: r, styles: c, children: u } = e;
832
+ let h = u;
833
+ u || (h = /* @__PURE__ */ n.jsx(v, { blockProps: {}, text: "FORM FIELDS" }));
834
+ const f = {
661
835
  "x-data": "useForm",
662
836
  "x-on:submit.prevent": "post"
663
- }, y = {
837
+ }, m = {
664
838
  "x-html": "formResponse",
665
839
  ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
666
840
  };
667
- return /* @__PURE__ */ s.jsxs(
841
+ return /* @__PURE__ */ n.jsxs(
668
842
  "form",
669
843
  {
670
- ...b,
844
+ ...f,
671
845
  "data-error": l,
672
- "data-success": r,
846
+ "data-success": a,
673
847
  method: "post",
674
- action: n,
848
+ action: r,
675
849
  ...t,
676
- ...i,
850
+ ...c,
677
851
  children: [
678
- /* @__PURE__ */ s.jsx("div", { ...y }),
679
- /* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: a || o }),
680
- m
852
+ /* @__PURE__ */ n.jsx("div", { ...m }),
853
+ /* @__PURE__ */ n.jsx("input", { name: "formname", type: "hidden", value: o || s }),
854
+ h
681
855
  ]
682
856
  }
683
857
  );
684
858
  };
685
- p(Ae, {
859
+ d(Ue, {
686
860
  type: "Form",
687
861
  label: "Form",
688
862
  category: "core",
689
- icon: ne,
863
+ icon: de,
690
864
  group: "form",
691
865
  hidden: !0,
692
866
  props: {
693
- styles: c({ default: "" }),
694
- action: f({
867
+ styles: i({ default: "" }),
868
+ action: y({
695
869
  title: "Submit URL",
696
870
  default: "/api/form/submit"
697
871
  }),
698
- errorMessage: T({
872
+ errorMessage: L({
699
873
  title: "Error Message",
700
874
  default: "Something went wrong. Please try again"
701
875
  }),
702
- successMessage: T({
876
+ successMessage: L({
703
877
  title: "Success Message",
704
878
  default: "Thank you for your submission."
705
879
  })
706
880
  },
707
881
  canAcceptBlock: () => !0
708
882
  });
709
- const Fe = (e) => {
710
- const { blockProps: t, content: l, styles: a, children: o } = e, r = { ...a, ...t };
711
- return o ? d.createElement("label", r, o) : d.createElement("label", {
712
- ...r,
883
+ const Ge = (e) => {
884
+ const { blockProps: t, content: l, styles: o, children: s } = e, a = { ...o, ...t };
885
+ return s ? p.createElement("label", a, s) : p.createElement("label", {
886
+ ...a,
713
887
  dangerouslySetInnerHTML: { __html: l }
714
888
  });
715
889
  };
716
- p(Fe, {
890
+ d(Ge, {
717
891
  type: "Label",
718
892
  label: "Label",
719
893
  category: "core",
720
- icon: ie,
894
+ icon: ue,
721
895
  group: "form",
722
896
  hidden: !0,
723
897
  props: {
724
- styles: c({ default: "" }),
725
- content: f({ title: "Content", default: "Label" })
898
+ styles: i({ default: "" }),
899
+ content: y({ title: "Content", default: "Label" })
726
900
  }
727
901
  });
728
- const $e = (e) => {
729
- const { blockProps: t, inBuilder: l, label: a, placeholder: o, styles: r, inputStyles: n, icon: i, iconPos: u } = e, m = x(), b = {
902
+ const We = (e) => {
903
+ const { blockProps: t, inBuilder: l, label: o, placeholder: s, styles: a, inputStyles: r, icon: c, iconPos: u } = e, h = g(), f = {
730
904
  "x-bind:disabled": "formLoading"
731
905
  };
732
- return /* @__PURE__ */ s.jsxs(
906
+ return /* @__PURE__ */ n.jsxs(
733
907
  "button",
734
908
  {
735
- id: m,
736
- ...b,
737
- ...n,
909
+ id: h,
910
+ ...f,
738
911
  ...r,
912
+ ...a,
739
913
  ...t || {},
740
914
  type: l ? "button" : "submit",
741
- placeholder: o,
915
+ placeholder: s,
742
916
  children: [
743
- a,
744
- i && /* @__PURE__ */ s.jsx("span", { className: u, dangerouslySetInnerHTML: { __html: i } })
917
+ o,
918
+ c && /* @__PURE__ */ n.jsx("span", { className: u, dangerouslySetInnerHTML: { __html: c } })
745
919
  ]
746
920
  }
747
921
  );
748
922
  };
749
- p($e, {
923
+ d(We, {
750
924
  type: "FormButton",
751
925
  label: "Submit Button",
752
926
  category: "core",
753
- icon: H,
927
+ icon: R,
754
928
  group: "form",
755
929
  hidden: !0,
756
930
  props: {
757
- label: f({ title: "Label", default: "Submit" }),
758
- styles: c({
931
+ label: y({ title: "Label", default: "Submit" }),
932
+ styles: i({
759
933
  default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
760
934
  }),
761
- icon: E({ title: "Icon", default: "" }),
935
+ icon: P({ title: "Icon", default: "" }),
762
936
  iconPos: I({
763
937
  title: "Icon Position",
764
938
  default: "order-last",
@@ -769,104 +943,104 @@ p($e, {
769
943
  })
770
944
  }
771
945
  });
772
- const De = (e) => {
773
- const { blockProps: t, fieldName: l, label: a, styles: o, inputStyles: r, required: n, checked: i, showLabel: u = !0 } = e, m = x();
774
- return u ? /* @__PURE__ */ s.jsxs("div", { ...o, ...t, children: [
775
- /* @__PURE__ */ s.jsx(
946
+ const Ye = (e) => {
947
+ const { blockProps: t, fieldName: l, label: o, styles: s, inputStyles: a, required: r, checked: c, showLabel: u = !0 } = e, h = g();
948
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
949
+ /* @__PURE__ */ n.jsx(
776
950
  "input",
777
951
  {
778
- ...r,
952
+ ...a,
779
953
  name: l,
780
- id: m,
954
+ id: h,
781
955
  type: "checkbox",
782
- required: n,
783
- defaultChecked: i
956
+ required: r,
957
+ defaultChecked: c
784
958
  }
785
959
  ),
786
- a && a !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: a })
787
- ] }) : /* @__PURE__ */ s.jsx(
960
+ o && o !== "Label" && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o })
961
+ ] }) : /* @__PURE__ */ n.jsx(
788
962
  "input",
789
963
  {
790
- id: m,
964
+ id: h,
791
965
  ...t,
792
- ...r,
793
- ...o,
966
+ ...a,
967
+ ...s,
794
968
  type: "checkbox",
795
- required: n,
969
+ required: r,
796
970
  name: l
797
971
  }
798
972
  );
799
973
  };
800
- p(De, {
974
+ d(Ye, {
801
975
  type: "Checkbox",
802
976
  label: "Checkbox",
803
977
  category: "core",
804
- icon: ce,
978
+ icon: pe,
805
979
  group: "form",
806
980
  hidden: !0,
807
981
  props: {
808
- fieldName: f({ title: "Field Name", default: "checkbox" }),
809
- styles: c({ default: "flex items-center gap-x-2" }),
810
- label: f({ title: "Label", default: "Label" }),
811
- checked: h({ title: "Checked", default: !1 }),
812
- required: h({ title: "Required", default: !1 })
982
+ fieldName: y({ title: "Field Name", default: "checkbox" }),
983
+ styles: i({ default: "flex items-center gap-x-2" }),
984
+ label: y({ title: "Label", default: "Label" }),
985
+ checked: b({ title: "Checked", default: !1 }),
986
+ required: b({ title: "Required", default: !1 })
813
987
  }
814
988
  });
815
- const qe = (e) => {
989
+ const Xe = (e) => {
816
990
  const {
817
991
  blockProps: t,
818
992
  label: l,
819
- placeholder: a,
820
- styles: o,
821
- inputStyles: r,
822
- showLabel: n,
823
- required: i,
993
+ placeholder: o,
994
+ styles: s,
995
+ inputStyles: a,
996
+ showLabel: r,
997
+ required: c,
824
998
  inputType: u = "text",
825
- inBuilder: m,
826
- fieldName: b
827
- } = e, y = x();
828
- return !n || u === "submit" ? (u === "submit" && (t.value = l), /* @__PURE__ */ s.jsx(
999
+ inBuilder: h,
1000
+ fieldName: f
1001
+ } = e, m = g();
1002
+ return !r || u === "submit" ? (u === "submit" && (t.value = l), /* @__PURE__ */ n.jsx(
829
1003
  "input",
830
1004
  {
831
- id: y,
832
- name: b,
833
- readOnly: m,
1005
+ id: m,
1006
+ name: f,
1007
+ readOnly: h,
834
1008
  ...t,
835
- ...r,
836
- ...o,
1009
+ ...a,
1010
+ ...s,
837
1011
  type: u,
838
- placeholder: a,
839
- required: i
1012
+ placeholder: o,
1013
+ required: c
840
1014
  }
841
- )) : /* @__PURE__ */ s.jsxs("div", { ...o, ...t, children: [
842
- n && /* @__PURE__ */ s.jsx("label", { htmlFor: y, children: l }),
843
- /* @__PURE__ */ s.jsx(
1015
+ )) : /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
1016
+ r && /* @__PURE__ */ n.jsx("label", { htmlFor: m, children: l }),
1017
+ /* @__PURE__ */ n.jsx(
844
1018
  "input",
845
1019
  {
846
- name: b,
847
- readOnly: m,
848
- ...r,
849
- id: y,
1020
+ name: f,
1021
+ readOnly: h,
1022
+ ...a,
1023
+ id: m,
850
1024
  type: u,
851
- placeholder: a,
852
- required: i
1025
+ placeholder: o,
1026
+ required: c
853
1027
  }
854
1028
  )
855
1029
  ] });
856
1030
  };
857
- p(qe, {
1031
+ d(Xe, {
858
1032
  type: "Input",
859
1033
  label: "Input",
860
1034
  category: "core",
861
- icon: A,
1035
+ icon: D,
862
1036
  group: "form",
863
1037
  hidden: !0,
864
1038
  props: {
865
- styles: c({ default: "" }),
866
- fieldName: f({ title: "Field Name", default: "input" }),
1039
+ styles: i({ default: "" }),
1040
+ fieldName: y({ title: "Field Name", default: "input" }),
867
1041
  inputType: I({
868
1042
  title: "Type",
869
- options: _(
1043
+ options: E(
870
1044
  ["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
871
1045
  (e) => ({
872
1046
  value: e,
@@ -875,180 +1049,180 @@ p(qe, {
875
1049
  ),
876
1050
  default: "text"
877
1051
  }),
878
- value: f({ title: "Value", default: "" }),
879
- showLabel: h({ title: "Show label", default: !0 }),
880
- inputStyles: c({ default: "w-full p-1" }),
881
- label: f({ title: "Label", default: "Label" }),
882
- placeholder: f({
1052
+ value: y({ title: "Value", default: "" }),
1053
+ showLabel: b({ title: "Show label", default: !0 }),
1054
+ inputStyles: i({ default: "w-full p-1" }),
1055
+ label: y({ title: "Label", default: "Label" }),
1056
+ placeholder: y({
883
1057
  title: "Placeholder",
884
1058
  default: "Placeholder"
885
1059
  }),
886
- required: h({ title: "Required", default: !1 })
1060
+ required: b({ title: "Required", default: !1 })
887
1061
  }
888
1062
  });
889
- const ze = (e) => {
890
- const { blockProps: t, fieldName: l, label: a, styles: o, inputStyles: r, checked: n, required: i, showLabel: u = !0 } = e, m = x();
891
- return u ? /* @__PURE__ */ s.jsxs("div", { ...o, ...t, children: [
892
- /* @__PURE__ */ s.jsx("input", { ...r, name: l, id: m, type: "radio", required: i, defaultChecked: n }),
893
- a && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: a })
894
- ] }) : /* @__PURE__ */ s.jsx(
1063
+ const Ze = (e) => {
1064
+ const { blockProps: t, fieldName: l, label: o, styles: s, inputStyles: a, checked: r, required: c, showLabel: u = !0 } = e, h = g();
1065
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
1066
+ /* @__PURE__ */ n.jsx("input", { ...a, name: l, id: h, type: "radio", required: c, defaultChecked: r }),
1067
+ o && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o })
1068
+ ] }) : /* @__PURE__ */ n.jsx(
895
1069
  "input",
896
1070
  {
897
- id: m,
1071
+ id: h,
898
1072
  ...t,
899
- ...r,
900
- ...o,
1073
+ ...a,
1074
+ ...s,
901
1075
  type: "radio",
902
- required: i,
903
- checked: n,
1076
+ required: c,
1077
+ checked: r,
904
1078
  name: l
905
1079
  }
906
1080
  );
907
1081
  };
908
- p(ze, {
1082
+ d(Ze, {
909
1083
  type: "Radio",
910
1084
  label: "Radio",
911
1085
  category: "core",
912
- icon: de,
1086
+ icon: he,
913
1087
  group: "form",
914
1088
  hidden: !0,
915
1089
  props: {
916
- styles: c({ default: "flex items-center w-max gap-x-2" }),
917
- fieldName: f({ title: "Field Name", default: "radio" }),
918
- label: f({ title: "Label", default: "Label" }),
919
- checked: h({ title: "Checked", default: !1 }),
920
- required: h({ title: "Required", default: !1 })
1090
+ styles: i({ default: "flex items-center w-max gap-x-2" }),
1091
+ fieldName: y({ title: "Field Name", default: "radio" }),
1092
+ label: y({ title: "Label", default: "Label" }),
1093
+ checked: b({ title: "Checked", default: !1 }),
1094
+ required: b({ title: "Required", default: !1 })
921
1095
  }
922
1096
  });
923
- const Oe = (e) => {
1097
+ const Je = (e) => {
924
1098
  const {
925
1099
  blockProps: t,
926
1100
  fieldName: l,
927
- label: a,
928
- placeholder: o,
929
- styles: r,
930
- inputStyles: n,
931
- required: i,
1101
+ label: o,
1102
+ placeholder: s,
1103
+ styles: a,
1104
+ inputStyles: r,
1105
+ required: c,
932
1106
  showLabel: u,
933
- _multiple: m = !1
934
- } = e, b = x();
935
- return u ? /* @__PURE__ */ s.jsxs("div", { ...r, children: [
936
- u && /* @__PURE__ */ s.jsx("label", { htmlFor: b, children: a }),
937
- /* @__PURE__ */ s.jsxs(
1107
+ _multiple: h = !1
1108
+ } = e, f = g();
1109
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...a, children: [
1110
+ u && /* @__PURE__ */ n.jsx("label", { htmlFor: f, children: o }),
1111
+ /* @__PURE__ */ n.jsxs(
938
1112
  "select",
939
1113
  {
940
- ...n,
941
- id: b,
942
- placeholder: o,
943
- required: i,
944
- multiple: m,
1114
+ ...r,
1115
+ id: f,
1116
+ placeholder: s,
1117
+ required: c,
1118
+ multiple: h,
945
1119
  name: l,
946
1120
  children: [
947
- /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
948
- _(e.options, (y) => /* @__PURE__ */ s.jsx(
1121
+ /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
1122
+ E(e.options, (m) => /* @__PURE__ */ n.jsx(
949
1123
  "option",
950
1124
  {
951
- selected: v(y, "selected", !1),
952
- value: y.value,
953
- dangerouslySetInnerHTML: { __html: y.label }
1125
+ selected: x(m, "selected", !1),
1126
+ value: m.value,
1127
+ dangerouslySetInnerHTML: { __html: m.label }
954
1128
  },
955
- y.value
1129
+ m.value
956
1130
  ))
957
1131
  ]
958
1132
  }
959
1133
  )
960
- ] }) : /* @__PURE__ */ s.jsxs(
1134
+ ] }) : /* @__PURE__ */ n.jsxs(
961
1135
  "select",
962
1136
  {
963
- id: b,
964
- ...r,
1137
+ id: f,
1138
+ ...a,
965
1139
  ...t,
966
- placeholder: o,
967
- required: i,
968
- multiple: m,
1140
+ placeholder: s,
1141
+ required: c,
1142
+ multiple: h,
969
1143
  name: l,
970
1144
  children: [
971
- /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
972
- _(e.options, (y) => /* @__PURE__ */ s.jsx(
1145
+ /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
1146
+ E(e.options, (m) => /* @__PURE__ */ n.jsx(
973
1147
  "option",
974
1148
  {
975
- selected: v(y, "selected", !1),
976
- value: y.value,
977
- dangerouslySetInnerHTML: { __html: y.label }
1149
+ selected: x(m, "selected", !1),
1150
+ value: m.value,
1151
+ dangerouslySetInnerHTML: { __html: m.label }
978
1152
  },
979
- y.value
1153
+ m.value
980
1154
  ))
981
1155
  ]
982
1156
  }
983
1157
  );
984
1158
  };
985
- p(Oe, {
1159
+ d(Je, {
986
1160
  type: "Select",
987
1161
  label: "Select",
988
1162
  category: "core",
989
- icon: ue,
1163
+ icon: ye,
990
1164
  group: "form",
991
1165
  hidden: !0,
992
1166
  props: {
993
- styles: c({ default: "" }),
994
- fieldName: f({ title: "Field Name", default: "select" }),
995
- showLabel: h({ title: "Show label", default: !0 }),
996
- inputStyles: c({ default: "w-full p-1" }),
997
- label: f({ title: "Label", default: "Label" }),
998
- placeholder: f({
1167
+ styles: i({ default: "" }),
1168
+ fieldName: y({ title: "Field Name", default: "select" }),
1169
+ showLabel: b({ title: "Show label", default: !0 }),
1170
+ inputStyles: i({ default: "w-full p-1" }),
1171
+ label: y({ title: "Label", default: "Label" }),
1172
+ placeholder: y({
999
1173
  title: "Placeholder",
1000
1174
  default: "Placeholder"
1001
1175
  }),
1002
- required: h({ title: "Required", default: !1 }),
1003
- _multiple: h({ title: "Multiple Choice", default: !1 }),
1004
- options: V({
1176
+ required: b({ title: "Required", default: !1 }),
1177
+ _multiple: b({ title: "Multiple Choice", default: !1 }),
1178
+ options: W({
1005
1179
  title: "Options",
1006
1180
  itemProperties: {
1007
- label: f({ title: "Label", default: "" }),
1008
- value: f({ title: "Value", default: "" })
1181
+ label: y({ title: "Label", default: "" }),
1182
+ value: y({ title: "Value", default: "" })
1009
1183
  }
1010
1184
  })
1011
1185
  }
1012
1186
  });
1013
- const Ve = (e) => {
1014
- const { blockProps: t, fieldName: l, label: a, placeholder: o, styles: r, inputStyles: n, _rows: i, showLabel: u } = e, m = x();
1015
- return u ? /* @__PURE__ */ s.jsxs("div", { ...r, ...t, children: [
1016
- u && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: a }),
1017
- /* @__PURE__ */ s.jsx("textarea", { name: l, ...n, id: m, placeholder: o, rows: i })
1018
- ] }) : /* @__PURE__ */ s.jsx(
1187
+ const Ke = (e) => {
1188
+ const { blockProps: t, fieldName: l, label: o, placeholder: s, styles: a, inputStyles: r, _rows: c, showLabel: u } = e, h = g();
1189
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...a, ...t, children: [
1190
+ u && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o }),
1191
+ /* @__PURE__ */ n.jsx("textarea", { name: l, ...r, id: h, placeholder: s, rows: c })
1192
+ ] }) : /* @__PURE__ */ n.jsx(
1019
1193
  "textarea",
1020
1194
  {
1021
- id: m,
1195
+ id: h,
1022
1196
  name: l,
1023
1197
  ...t,
1024
- ...n,
1025
1198
  ...r,
1026
- placeholder: o,
1027
- rows: i
1199
+ ...a,
1200
+ placeholder: s,
1201
+ rows: c
1028
1202
  }
1029
1203
  );
1030
1204
  };
1031
- p(Ve, {
1205
+ d(Ke, {
1032
1206
  type: "TextArea",
1033
1207
  label: "TextArea",
1034
1208
  category: "core",
1035
- icon: A,
1209
+ icon: D,
1036
1210
  group: "form",
1037
1211
  hidden: !0,
1038
1212
  props: {
1039
- fieldName: f({ title: "Field Name", default: "textarea" }),
1040
- showLabel: h({ title: "Show label", default: !0 }),
1041
- styles: c({ default: "" }),
1042
- inputStyles: c({ default: "w-full p-1" }),
1043
- label: f({ title: "Label", default: "Label" }),
1044
- placeholder: f({
1213
+ fieldName: y({ title: "Field Name", default: "textarea" }),
1214
+ showLabel: b({ title: "Show label", default: !0 }),
1215
+ styles: i({ default: "" }),
1216
+ inputStyles: i({ default: "w-full p-1" }),
1217
+ label: y({ title: "Label", default: "Label" }),
1218
+ placeholder: y({
1045
1219
  title: "Placeholder",
1046
1220
  default: "Placeholder"
1047
1221
  }),
1048
- _rows: w({ title: "Rows", default: 3 })
1222
+ _rows: _({ title: "Rows", default: 3 })
1049
1223
  }
1050
1224
  });
1051
- const tt = q;
1225
+ const pt = V;
1052
1226
  export {
1053
- tt as loadWebBlocks
1227
+ pt as loadWebBlocks
1054
1228
  };