@chaibuilder/sdk 1.2.27 → 1.2.29

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 +601 -430
  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,199 @@ 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]` : "")
294
- );
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(o, S(s ? `w-[${s}px]` : "", r ? `h-[${r}px]` : ""));
295
295
  if (k(l))
296
- return /* @__PURE__ */ s.jsx(g, { blockProps: t, text: "", inBuilder: r, className: "h-8 w-14" });
296
+ return /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "", inBuilder: a, className: "h-8 w-14" });
297
297
  const u = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
298
- return d.createElement("span", {
298
+ return p.createElement("span", {
299
299
  ...t,
300
- ...i,
300
+ ...c,
301
301
  dangerouslySetInnerHTML: { __html: u }
302
302
  });
303
303
  };
304
- p(Ie, {
304
+ d(Be, {
305
305
  type: "Icon",
306
306
  label: "Icon",
307
307
  category: "core",
308
- icon: J,
308
+ icon: ee,
309
309
  group: "media",
310
310
  props: {
311
- styles: c({ default: "text-black" }),
312
- icon: E({
311
+ styles: i({ default: "text-black" }),
312
+ icon: P({
313
313
  title: "Icon",
314
314
  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
315
  }),
316
- width: w({ title: "Width", default: "" }),
317
- height: w({ title: "Height", default: "" })
316
+ width: _({ title: "Width", default: "" }),
317
+ height: _({ title: "Height", default: "" })
318
318
  }
319
319
  });
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", {
320
+ const Te = (e) => {
321
+ const { blockProps: t, image: l, styles: o, alt: s, height: a, width: r } = e;
322
+ return k(l) ? /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "IMAGE URL", className: "h-36" }) : p.createElement("img", {
323
323
  ...t,
324
- ...a,
324
+ ...o,
325
325
  src: l,
326
- alt: o,
327
- height: r,
328
- width: n
326
+ alt: s,
327
+ height: a,
328
+ width: r
329
329
  });
330
330
  };
331
- p(Be, {
331
+ d(Te, {
332
332
  type: "Image",
333
333
  label: "Image",
334
334
  category: "core",
335
- icon: K,
335
+ icon: te,
336
336
  group: "media",
337
337
  props: {
338
- styles: c({ default: "" }),
339
- image: j({
338
+ styles: i({ default: "" }),
339
+ image: C({
340
340
  title: "Image",
341
341
  default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
342
342
  }),
343
- alt: f({ title: "Alt", default: "" }),
344
- width: f({ title: "Width", default: "" }),
345
- height: f({ title: "Height", default: "" })
343
+ alt: y({ title: "Alt", default: "" }),
344
+ width: y({ title: "Width", default: "" }),
345
+ height: y({ title: "Height", default: "" })
346
346
  }
347
347
  });
348
348
  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: [
349
+ var r;
350
+ const { blockProps: t, inBuilder: l, styles: o, children: s } = e;
351
+ let a = null;
352
+ return !s && l && (a = // @ts-ignore
353
+ /* @__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
354
  "Slot: ",
355
355
  e.name
356
- ] }) }) })), d.createElement("div", { ...a, ...t, droppable: "yes" }, o || r);
356
+ ] }) }) })), p.createElement("div", { ...o, ...t, droppable: "yes" }, s || a);
357
357
  };
358
- p(Le, {
358
+ d(Le, {
359
359
  type: "Slot",
360
360
  label: "Slot",
361
361
  group: "basic",
362
362
  category: "core",
363
363
  hidden: !0,
364
364
  props: {
365
- styles: c({ default: "" }),
366
- emptyStyles: c({ default: "" })
365
+ styles: i({ default: "" }),
366
+ emptyStyles: i({ default: "" })
367
367
  },
368
368
  canAcceptBlock: () => !0
369
369
  });
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) => {
370
+ 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
371
  if (N.test(e)) {
372
372
  const t = e.match(N);
373
373
  return t ? `https://www.youtube.com/embed/${t[4]}` : e;
374
374
  }
375
- if (C.test(e)) {
376
- const t = e.match(C);
377
- return t ? `https://player.vimeo.com/video/${t[3]}` : e;
378
- }
379
375
  if (M.test(e)) {
380
376
  const t = e.match(M);
377
+ return t ? `https://player.vimeo.com/video/${t[3]}` : e;
378
+ }
379
+ if (H.test(e)) {
380
+ const t = e.match(H);
381
381
  return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
382
382
  }
383
383
  return null;
384
- }, we = d.memo(
384
+ }, Se = p.memo(
385
385
  (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("&")}`;
386
+ 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);
387
+ if (k(s))
388
+ return /* @__PURE__ */ n.jsx(v, { inBuilder: l, blockProps: t, text: "VIDEO URL", className: "h-36" });
389
+ let f = _e(s), m = null;
390
+ if (f) {
391
+ if (!k(f)) {
392
+ const T = [];
393
+ 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
394
  }
395
- y = d.createElement("iframe", {
395
+ m = p.createElement("iframe", {
396
396
  ...t,
397
397
  className: "absolute inset-0 w-full h-full",
398
- src: b,
398
+ src: f,
399
399
  allow: l ? "" : "autoplay *; fullscreen *",
400
400
  allowFullScreen: !0,
401
401
  frameBorder: 0
402
402
  });
403
403
  } else
404
- y = d.createElement("video", {
404
+ m = p.createElement("video", {
405
405
  ...t,
406
406
  className: "absolute inset-0 w-full h-full",
407
- src: o,
408
- controls: i,
407
+ src: s,
408
+ controls: c,
409
409
  muted: u,
410
- autoPlay: l ? !1 : n,
411
- loop: m
410
+ autoPlay: l ? !1 : r,
411
+ loop: h
412
412
  });
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
413
+ return /* @__PURE__ */ n.jsx("div", { ...z(o, ["className"]), children: /* @__PURE__ */ n.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
414
+ l ? /* @__PURE__ */ n.jsx("div", { ...t, ...q(o, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
415
+ m
416
416
  ] }) });
417
417
  }
418
418
  );
419
- p(we, {
419
+ d(Se, {
420
420
  type: "Video",
421
421
  label: "Video",
422
422
  category: "core",
423
- icon: Q,
423
+ icon: le,
424
424
  group: "media",
425
425
  props: {
426
- styles: c({ default: "" }),
427
- url: f({
426
+ styles: i({ default: "" }),
427
+ url: y({
428
428
  title: "Video URL",
429
429
  default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
430
430
  }),
431
- controls: O({
431
+ controls: G({
432
432
  title: "Controls",
433
433
  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 })
434
+ autoPlay: b({ title: "Autoplay", default: !0 }),
435
+ controls: b({ title: "Show controls", default: !1 }),
436
+ loop: b({ title: "Loop", default: !1 }),
437
+ muted: b({ title: "Muted", default: !0 })
438
438
  }
439
439
  })
440
440
  }
441
441
  });
442
- const Se = d.memo(
442
+ const je = p.memo(
443
443
  (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", {
444
+ const { blockProps: t, styles: l, content: o, inBuilder: s } = e;
445
+ return /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
446
+ s ? /* @__PURE__ */ n.jsx("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
447
+ p.createElement("div", {
448
448
  ...l,
449
- dangerouslySetInnerHTML: { __html: a }
449
+ dangerouslySetInnerHTML: { __html: o }
450
450
  })
451
451
  ] });
452
452
  }
453
453
  );
454
- p(Se, {
454
+ d(je, {
455
455
  type: "CustomHTML",
456
456
  label: "Custom HTML",
457
457
  category: "core",
458
- icon: ee,
458
+ icon: oe,
459
459
  group: "advanced",
460
460
  props: {
461
- styles: c({ default: "" }),
461
+ styles: i({ default: "" }),
462
462
  content: B({
463
463
  title: "HTML Content",
464
464
  default: "<div><p>HTML Snippet goes here...</p></div>",
@@ -466,299 +466,470 @@ p(Se, {
466
466
  })
467
467
  }
468
468
  });
469
- const _e = (e) => {
469
+ const Ee = (e) => {
470
470
  const { blockProps: t, styles: l } = e;
471
- return d.createElement("hr", { ...l, ...t });
471
+ return p.createElement("hr", { ...l, ...t });
472
472
  };
473
- p(_e, {
473
+ d(Ee, {
474
474
  type: "Divider",
475
475
  label: "Divider",
476
476
  category: "core",
477
- icon: te,
477
+ icon: se,
478
478
  group: "basic",
479
479
  props: {
480
- styles: c({ default: "bg-gray-900 h-0.5 py-2 my-1" })
480
+ styles: i({ default: "bg-gray-900 h-0.5 py-2 my-1" })
481
481
  }
482
482
  });
483
- const je = (e) => e.inBuilder ? /* @__PURE__ */ s.jsx("span", { className: "flex", ...e.blockProps, children: e.content }) : `${e.content}`;
484
- p(je, {
483
+ const Ce = (e) => e.inBuilder ? /* @__PURE__ */ n.jsx("span", { className: "inline-block", ...e.blockProps, children: e.content }) : `${e.content}`;
484
+ d(Ce, {
485
485
  type: "Text",
486
486
  label: "Text",
487
487
  hidden: !0,
488
488
  category: "core",
489
489
  group: "typography",
490
- icon: R,
490
+ icon: F,
491
491
  props: {
492
492
  content: B({ title: "Content", defaultValue: "" })
493
493
  }
494
494
  });
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);
495
+ const Pe = ({ children: e, blockProps: t, styles: l }) => {
496
+ const o = w(l, "hs-accordion-group");
497
+ return /* @__PURE__ */ n.jsx("div", { ...t, ...o, children: e });
498
+ };
499
+ d(Pe, {
500
+ type: "AccordionGroup",
501
+ label: "Accordion Group",
502
+ category: "core",
503
+ group: "advanced",
504
+ props: {
505
+ styles: i({ default: "" })
506
+ },
507
+ // @ts-ignore
508
+ blocks: () => {
509
+ const e = "dnd-accordion-" + g();
510
+ return A(`<div class="hs-accordion-group">
511
+ <div class="hs-accordion active" id="hs-unstyled-heading-one">
512
+ <button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-one">
513
+ Accordion #1
514
+ </button>
515
+ <div id="hs-unstyled-collapse-one" class="hs-accordion-content overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-heading-one">
516
+ It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
517
+ </div>
518
+ </div>
519
+
520
+ <div class="hs-accordion" id="hs-unstyled-heading-two">
521
+ <button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-two">
522
+ Accordion #2
523
+ </button>
524
+ <div id="hs-unstyled-collapse-two" class="hs-accordion-content hidden overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-heading-two">
525
+ It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
526
+ </div>
527
+ </div>
528
+ </div>`.replace(/hs-unstyled-heading/g, e).replace(/hs-unstyled-collapse/g, e));
529
+ },
530
+ canAcceptBlock: (e) => e === "Accordion"
531
+ });
532
+ const Ae = ({ children: e, blockProps: t, styles: l, blockState: o }) => {
533
+ const s = w(
534
+ l,
535
+ "hs-accordion " + (o && o != null && o.active ? "active" : "")
536
+ );
537
+ return /* @__PURE__ */ n.jsx("div", { ...t, ...s, children: e });
538
+ };
539
+ d(Ae, {
540
+ type: "Accordion",
541
+ label: "Accordion",
542
+ category: "core",
543
+ group: "advanced",
544
+ props: { styles: i({ default: "" }) },
545
+ //@ts-ignore
546
+ customStylingStates: {
547
+ "hs-accordion-active": "Accordion Active"
548
+ },
549
+ //@ts-ignore
550
+ blockState: {
551
+ active: b({ default: !1, title: "Show content in canvas" })
552
+ },
553
+ getBlockStateFrom: (e) => [e._id],
554
+ // @ts-ignore
555
+ blocks: () => {
556
+ const e = "dnd-accordion-" + g();
557
+ return A(`
558
+ <div class="hs-accordion active" id="hs-unstyled-heading-one">
559
+ <button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-one">
560
+ Accordion #1
561
+ </button>
562
+ <div id="hs-unstyled-collapse-one" class="hs-accordion-content overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-heading-one">
563
+ It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
564
+ </div>
565
+ </div>
566
+ `.replace(/hs-unstyled-heading/g, e).replace(/hs-unstyled-collapse/g, e));
567
+ }
568
+ });
569
+ const Ne = ({ children: e, blockProps: t, styles: l }) => {
570
+ const o = w(l, "hs-accordion-toggle");
571
+ return /* @__PURE__ */ n.jsx("button", { ...o, ...t, children: e });
499
572
  };
500
- p(Ee, {
573
+ d(Ne, {
574
+ type: "AccordionToggle",
575
+ label: "Accordion Toggle",
576
+ category: "core",
577
+ group: "advanced",
578
+ hidden: !0,
579
+ props: {
580
+ styles: i({
581
+ 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"
582
+ })
583
+ },
584
+ canAcceptBlock: () => !0,
585
+ canDelete: () => !1,
586
+ canMove: () => !1,
587
+ canDuplicate: () => !1
588
+ });
589
+ const Me = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
590
+ const a = w(
591
+ l,
592
+ "hs-accordion-content",
593
+ s && o ? o != null && o.active ? "!block !opacity-100" : "!hidden !opacity-0" : ""
594
+ );
595
+ return /* @__PURE__ */ n.jsx("div", { ...a, ...t, children: e });
596
+ };
597
+ d(Me, {
598
+ type: "AccordionContent",
599
+ label: "Accordion Content",
600
+ category: "core",
601
+ group: "advanced",
602
+ hidden: !0,
603
+ props: {
604
+ styles: i({ default: "w-full overflow-hidden transition-height hidden duration-300" })
605
+ },
606
+ //@ts-ignore
607
+ getBlockStateFrom: (e) => [e._parent],
608
+ canAcceptBlock: () => !0,
609
+ canDelete: () => !1,
610
+ canMove: () => !1,
611
+ canDuplicate: () => !1
612
+ });
613
+ const He = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
614
+ const a = s && (o != null && o.active) ? " open" : "", r = w(l, "hs-collapse-toggle", a);
615
+ return /* @__PURE__ */ n.jsx("button", { type: "button", ...r, ...t, children: e });
616
+ };
617
+ d(He, {
618
+ type: "CollapseToggle",
619
+ label: "Collapse Toggle",
620
+ category: "core",
621
+ group: "advanced",
622
+ hidden: !0,
623
+ props: { styles: i({ default: "" }) },
624
+ canAcceptBlock: () => !0,
625
+ //@ts-ignore
626
+ customStylingStates: {
627
+ "hs-collapse-open": "Collapse Open"
628
+ },
629
+ // @ts-ignore
630
+ getBlockStateFrom: (e, t) => {
631
+ const l = x(e, "styles_attrs.data-hs-collapse", "").replace("#", "");
632
+ if (!l)
633
+ return [];
634
+ const o = O(t, (s) => x(s, "styles_attrs.id") === l);
635
+ return o ? [o == null ? void 0 : o._id] : [];
636
+ }
637
+ });
638
+ const Re = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
639
+ const a = s ? { "!block !opacity-100 open": o == null ? void 0 : o.active, "": !(o != null && o.active) } : {}, r = Object.keys(a).filter((u) => a[u]).join(" "), c = w(l, "hs-collapse", r);
640
+ return /* @__PURE__ */ n.jsx("div", { ...c, ...t, children: e });
641
+ };
642
+ d(Re, {
643
+ type: "Collapse",
644
+ label: "Collapse",
645
+ category: "core",
646
+ group: "advanced",
647
+ props: {
648
+ styles: i({
649
+ 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"
650
+ })
651
+ },
652
+ canAcceptBlock: () => !0,
653
+ //@ts-ignore
654
+ blockState: {
655
+ active: b({ default: !1, title: "Show collapse in canvas" })
656
+ },
657
+ getBlockStateFrom: (e) => [e._id],
658
+ // @ts-ignore
659
+ blocks: () => A(`<button type="button" class="hs-collapse-toggle" id="hs-unstyled-collapse" data-hs-collapse="#hs-unstyled-collapse-content">
660
+ Collapse
661
+ </button>
662
+ <div id="hs-unstyled-collapse-content" class="hs-collapse hidden w-full overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-collapse">
663
+ 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.
664
+ </div>`.replace(/hs-unstyled-collapse/g, `dnd-collapse-${g()}`))
665
+ });
666
+ const Fe = (e) => {
667
+ const { blockProps: t, backgroundImage: l, children: o, styles: s } = e;
668
+ let a = {};
669
+ return l && (a = { backgroundImage: `url(${l})` }), p.createElement("div", { ...t, ...s, style: a }, o);
670
+ };
671
+ d(Fe, {
501
672
  type: "Body",
502
673
  label: "Body",
503
674
  category: "core",
504
675
  group: "basic",
505
676
  hidden: !0,
506
677
  props: {
507
- styles: c({ default: "font-body antialiased" }),
508
- backgroundImage: j({ title: "Background Image" })
678
+ styles: i({ default: "font-body antialiased" }),
679
+ backgroundImage: C({ title: "Background Image" })
509
680
  },
510
681
  canAcceptBlock: () => !0,
511
682
  canDelete: () => !1,
512
683
  canMove: () => !1,
513
684
  canDuplicate: () => !1
514
685
  });
515
- const Pe = (e) => {
686
+ const De = (e) => {
516
687
  const { blockProps: t, styles: l } = e;
517
- return d.createElement("br", { ...t, ...l });
688
+ return p.createElement("br", { ...t, ...l });
518
689
  };
519
- p(Pe, {
690
+ d(De, {
520
691
  type: "LineBreak",
521
692
  label: "Line Break",
522
693
  category: "core",
523
694
  group: "basic",
524
695
  hidden: !0,
525
- icon: R,
696
+ icon: F,
526
697
  props: {
527
- styles: c({ default: "" })
698
+ styles: i({ default: "" })
528
699
  }
529
700
  });
530
- const S = (e) => {
531
- const t = (r, n) => ({
532
- _id: x(),
533
- _parent: r,
701
+ const j = (e) => {
702
+ const t = (a, r) => ({
703
+ _id: g(),
704
+ _parent: a,
534
705
  _type: "TableCell",
535
706
  styles: "#styles:,",
536
- content: `${e === "TableHead" ? "Table Head" : "Table Cell " + n}`
537
- }), l = (r) => {
538
- const n = x(), i = {
707
+ content: `${e === "TableHead" ? "Table Head" : "Table Cell " + r}`
708
+ }), l = (a) => {
709
+ const r = g(), c = {
539
710
  _type: "TableRow",
540
- _id: n,
711
+ _id: r,
541
712
  styles: "#styles:,border-b"
542
713
  };
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,
714
+ return a && (c._parent = a), [c, t(r, "1"), t(r, "2"), t(r, "3")];
715
+ }, o = (a) => {
716
+ const r = g(), c = {
717
+ _id: r,
547
718
  _type: "TableHead",
548
719
  styles: "#styles:,font-medium"
549
720
  };
550
- return r && (i._parent = r), [i, ...l(n)];
551
- }, o = (r) => {
552
- const n = x(), i = {
553
- _id: n,
721
+ return a && (c._parent = a), [c, ...l(r)];
722
+ }, s = (a) => {
723
+ const r = g(), c = {
724
+ _id: r,
554
725
  _type: "TableBody",
555
726
  styles: "#styles:,"
556
727
  };
557
- return r && (i._parent = r), [i, ...l(n), ...l(n)];
728
+ return a && (c._parent = a), [c, ...l(r), ...l(r)];
558
729
  };
559
730
  if (e === "Table") {
560
- const r = x();
731
+ const a = g();
561
732
  return [
562
733
  {
563
- _id: r,
734
+ _id: a,
564
735
  _type: "Table",
565
736
  styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
566
737
  },
567
- ...a(r),
568
- ...o(r)
738
+ ...o(a),
739
+ ...s(a)
569
740
  ];
570
741
  }
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" });
742
+ return e === "TableRow" ? l() : e === "TableHead" ? o() : e === "TableBody" ? s() : [];
743
+ }, $e = (e) => {
744
+ const { blockProps: t, children: l, styles: o } = e;
745
+ return l ? p.createElement("table", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE HEAD / BODY" });
575
746
  };
576
- p(Ne, {
747
+ d($e, {
577
748
  type: "Table",
578
749
  label: "Table",
579
750
  category: "core",
580
751
  group: "table",
581
752
  hidden: !0,
582
- icon: le,
753
+ icon: ae,
583
754
  props: {
584
- styles: c({ default: "" })
755
+ styles: i({ default: "" })
585
756
  },
586
- blocks: S("Table")
757
+ blocks: j("Table")
587
758
  });
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" });
759
+ const ze = (e) => {
760
+ const { blockProps: t, children: l, styles: o } = e;
761
+ return l ? p.createElement("thead", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE ROW" });
591
762
  };
592
- p(Ce, {
763
+ d(ze, {
593
764
  type: "TableHead",
594
765
  label: "Table Head",
595
766
  category: "core",
596
767
  group: "table",
597
768
  hidden: !0,
598
- icon: oe,
769
+ icon: ne,
599
770
  props: {
600
- styles: c({ default: "" })
771
+ styles: i({ default: "" })
601
772
  },
602
- blocks: S("TableHead")
773
+ blocks: j("TableHead")
603
774
  });
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" });
775
+ const qe = (e) => {
776
+ const { blockProps: t, children: l, styles: o } = e;
777
+ return l ? p.createElement("tbody", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE ROW" });
607
778
  };
608
- p(Me, {
779
+ d(qe, {
609
780
  type: "TableBody",
610
781
  label: "Table Body",
611
782
  category: "core",
612
783
  group: "table",
613
784
  hidden: !0,
614
- icon: ae,
785
+ icon: re,
615
786
  props: {
616
- styles: c({ default: "" })
787
+ styles: i({ default: "" })
617
788
  },
618
- blocks: S("TableBody")
789
+ blocks: j("TableBody")
619
790
  });
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" });
791
+ const Oe = (e) => {
792
+ const { blockProps: t, children: l, styles: o } = e;
793
+ return l ? p.createElement("tr", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE CELL" });
623
794
  };
624
- p(He, {
795
+ d(Oe, {
625
796
  type: "TableRow",
626
797
  label: "Table Row",
627
798
  category: "core",
628
799
  group: "table",
629
800
  hidden: !0,
630
- icon: re,
801
+ icon: ce,
631
802
  props: {
632
- styles: c({ default: "w-full" })
803
+ styles: i({ default: "w-full" })
633
804
  },
634
- blocks: S("TableRow")
805
+ blocks: j("TableRow")
635
806
  });
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", {
807
+ const Ve = (e) => {
808
+ const { blockProps: t, children: l, content: o, styles: s } = e;
809
+ return !l && k(o) ? /* @__PURE__ */ n.jsx(v, { blockProps: t }) : l ? p.createElement("td", { ...t, ...s }, l) : p.createElement("td", {
639
810
  ...t,
640
- ...o,
641
- dangerouslySetInnerHTML: { __html: a }
811
+ ...s,
812
+ dangerouslySetInnerHTML: { __html: o }
642
813
  });
643
814
  };
644
- p(Re, {
815
+ d(Ve, {
645
816
  type: "TableCell",
646
817
  label: "Table Cell",
647
818
  category: "core",
648
819
  group: "table",
649
820
  hidden: !0,
650
- icon: se,
821
+ icon: ie,
651
822
  props: {
652
- styles: c({ default: "" }),
653
- content: T({ title: "Content", default: "Table cell item" })
823
+ styles: i({ default: "" }),
824
+ content: L({ title: "Content", default: "Table cell item" })
654
825
  }
655
826
  });
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 = {
827
+ const Ue = (e) => {
828
+ const { blockProps: t, errorMessage: l, name: o, _type: s, successMessage: a, action: r, styles: c, children: u } = e;
829
+ let h = u;
830
+ u || (h = /* @__PURE__ */ n.jsx(v, { blockProps: {}, text: "FORM FIELDS" }));
831
+ const f = {
661
832
  "x-data": "useForm",
662
833
  "x-on:submit.prevent": "post"
663
- }, y = {
834
+ }, m = {
664
835
  "x-html": "formResponse",
665
836
  ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
666
837
  };
667
- return /* @__PURE__ */ s.jsxs(
838
+ return /* @__PURE__ */ n.jsxs(
668
839
  "form",
669
840
  {
670
- ...b,
841
+ ...f,
671
842
  "data-error": l,
672
- "data-success": r,
843
+ "data-success": a,
673
844
  method: "post",
674
- action: n,
845
+ action: r,
675
846
  ...t,
676
- ...i,
847
+ ...c,
677
848
  children: [
678
- /* @__PURE__ */ s.jsx("div", { ...y }),
679
- /* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: a || o }),
680
- m
849
+ /* @__PURE__ */ n.jsx("div", { ...m }),
850
+ /* @__PURE__ */ n.jsx("input", { name: "formname", type: "hidden", value: o || s }),
851
+ h
681
852
  ]
682
853
  }
683
854
  );
684
855
  };
685
- p(Ae, {
856
+ d(Ue, {
686
857
  type: "Form",
687
858
  label: "Form",
688
859
  category: "core",
689
- icon: ne,
860
+ icon: de,
690
861
  group: "form",
691
862
  hidden: !0,
692
863
  props: {
693
- styles: c({ default: "" }),
694
- action: f({
864
+ styles: i({ default: "" }),
865
+ action: y({
695
866
  title: "Submit URL",
696
867
  default: "/api/form/submit"
697
868
  }),
698
- errorMessage: T({
869
+ errorMessage: L({
699
870
  title: "Error Message",
700
871
  default: "Something went wrong. Please try again"
701
872
  }),
702
- successMessage: T({
873
+ successMessage: L({
703
874
  title: "Success Message",
704
875
  default: "Thank you for your submission."
705
876
  })
706
877
  },
707
878
  canAcceptBlock: () => !0
708
879
  });
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,
880
+ const Ge = (e) => {
881
+ const { blockProps: t, content: l, styles: o, children: s } = e, a = { ...o, ...t };
882
+ return s ? p.createElement("label", a, s) : p.createElement("label", {
883
+ ...a,
713
884
  dangerouslySetInnerHTML: { __html: l }
714
885
  });
715
886
  };
716
- p(Fe, {
887
+ d(Ge, {
717
888
  type: "Label",
718
889
  label: "Label",
719
890
  category: "core",
720
- icon: ie,
891
+ icon: ue,
721
892
  group: "form",
722
893
  hidden: !0,
723
894
  props: {
724
- styles: c({ default: "" }),
725
- content: f({ title: "Content", default: "Label" })
895
+ styles: i({ default: "" }),
896
+ content: y({ title: "Content", default: "Label" })
726
897
  }
727
898
  });
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 = {
899
+ const We = (e) => {
900
+ const { blockProps: t, inBuilder: l, label: o, placeholder: s, styles: a, inputStyles: r, icon: c, iconPos: u } = e, h = g(), f = {
730
901
  "x-bind:disabled": "formLoading"
731
902
  };
732
- return /* @__PURE__ */ s.jsxs(
903
+ return /* @__PURE__ */ n.jsxs(
733
904
  "button",
734
905
  {
735
- id: m,
736
- ...b,
737
- ...n,
906
+ id: h,
907
+ ...f,
738
908
  ...r,
909
+ ...a,
739
910
  ...t || {},
740
911
  type: l ? "button" : "submit",
741
- placeholder: o,
912
+ placeholder: s,
742
913
  children: [
743
- a,
744
- i && /* @__PURE__ */ s.jsx("span", { className: u, dangerouslySetInnerHTML: { __html: i } })
914
+ o,
915
+ c && /* @__PURE__ */ n.jsx("span", { className: u, dangerouslySetInnerHTML: { __html: c } })
745
916
  ]
746
917
  }
747
918
  );
748
919
  };
749
- p($e, {
920
+ d(We, {
750
921
  type: "FormButton",
751
922
  label: "Submit Button",
752
923
  category: "core",
753
- icon: H,
924
+ icon: R,
754
925
  group: "form",
755
926
  hidden: !0,
756
927
  props: {
757
- label: f({ title: "Label", default: "Submit" }),
758
- styles: c({
928
+ label: y({ title: "Label", default: "Submit" }),
929
+ styles: i({
759
930
  default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
760
931
  }),
761
- icon: E({ title: "Icon", default: "" }),
932
+ icon: P({ title: "Icon", default: "" }),
762
933
  iconPos: I({
763
934
  title: "Icon Position",
764
935
  default: "order-last",
@@ -769,104 +940,104 @@ p($e, {
769
940
  })
770
941
  }
771
942
  });
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(
943
+ const Ye = (e) => {
944
+ const { blockProps: t, fieldName: l, label: o, styles: s, inputStyles: a, required: r, checked: c, showLabel: u = !0 } = e, h = g();
945
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
946
+ /* @__PURE__ */ n.jsx(
776
947
  "input",
777
948
  {
778
- ...r,
949
+ ...a,
779
950
  name: l,
780
- id: m,
951
+ id: h,
781
952
  type: "checkbox",
782
- required: n,
783
- defaultChecked: i
953
+ required: r,
954
+ defaultChecked: c
784
955
  }
785
956
  ),
786
- a && a !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: a })
787
- ] }) : /* @__PURE__ */ s.jsx(
957
+ o && o !== "Label" && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o })
958
+ ] }) : /* @__PURE__ */ n.jsx(
788
959
  "input",
789
960
  {
790
- id: m,
961
+ id: h,
791
962
  ...t,
792
- ...r,
793
- ...o,
963
+ ...a,
964
+ ...s,
794
965
  type: "checkbox",
795
- required: n,
966
+ required: r,
796
967
  name: l
797
968
  }
798
969
  );
799
970
  };
800
- p(De, {
971
+ d(Ye, {
801
972
  type: "Checkbox",
802
973
  label: "Checkbox",
803
974
  category: "core",
804
- icon: ce,
975
+ icon: pe,
805
976
  group: "form",
806
977
  hidden: !0,
807
978
  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 })
979
+ fieldName: y({ title: "Field Name", default: "checkbox" }),
980
+ styles: i({ default: "flex items-center gap-x-2" }),
981
+ label: y({ title: "Label", default: "Label" }),
982
+ checked: b({ title: "Checked", default: !1 }),
983
+ required: b({ title: "Required", default: !1 })
813
984
  }
814
985
  });
815
- const qe = (e) => {
986
+ const Xe = (e) => {
816
987
  const {
817
988
  blockProps: t,
818
989
  label: l,
819
- placeholder: a,
820
- styles: o,
821
- inputStyles: r,
822
- showLabel: n,
823
- required: i,
990
+ placeholder: o,
991
+ styles: s,
992
+ inputStyles: a,
993
+ showLabel: r,
994
+ required: c,
824
995
  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(
996
+ inBuilder: h,
997
+ fieldName: f
998
+ } = e, m = g();
999
+ return !r || u === "submit" ? (u === "submit" && (t.value = l), /* @__PURE__ */ n.jsx(
829
1000
  "input",
830
1001
  {
831
- id: y,
832
- name: b,
833
- readOnly: m,
1002
+ id: m,
1003
+ name: f,
1004
+ readOnly: h,
834
1005
  ...t,
835
- ...r,
836
- ...o,
1006
+ ...a,
1007
+ ...s,
837
1008
  type: u,
838
- placeholder: a,
839
- required: i
1009
+ placeholder: o,
1010
+ required: c
840
1011
  }
841
- )) : /* @__PURE__ */ s.jsxs("div", { ...o, ...t, children: [
842
- n && /* @__PURE__ */ s.jsx("label", { htmlFor: y, children: l }),
843
- /* @__PURE__ */ s.jsx(
1012
+ )) : /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
1013
+ r && /* @__PURE__ */ n.jsx("label", { htmlFor: m, children: l }),
1014
+ /* @__PURE__ */ n.jsx(
844
1015
  "input",
845
1016
  {
846
- name: b,
847
- readOnly: m,
848
- ...r,
849
- id: y,
1017
+ name: f,
1018
+ readOnly: h,
1019
+ ...a,
1020
+ id: m,
850
1021
  type: u,
851
- placeholder: a,
852
- required: i
1022
+ placeholder: o,
1023
+ required: c
853
1024
  }
854
1025
  )
855
1026
  ] });
856
1027
  };
857
- p(qe, {
1028
+ d(Xe, {
858
1029
  type: "Input",
859
1030
  label: "Input",
860
1031
  category: "core",
861
- icon: A,
1032
+ icon: D,
862
1033
  group: "form",
863
1034
  hidden: !0,
864
1035
  props: {
865
- styles: c({ default: "" }),
866
- fieldName: f({ title: "Field Name", default: "input" }),
1036
+ styles: i({ default: "" }),
1037
+ fieldName: y({ title: "Field Name", default: "input" }),
867
1038
  inputType: I({
868
1039
  title: "Type",
869
- options: _(
1040
+ options: E(
870
1041
  ["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
871
1042
  (e) => ({
872
1043
  value: e,
@@ -875,180 +1046,180 @@ p(qe, {
875
1046
  ),
876
1047
  default: "text"
877
1048
  }),
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({
1049
+ value: y({ title: "Value", default: "" }),
1050
+ showLabel: b({ title: "Show label", default: !0 }),
1051
+ inputStyles: i({ default: "w-full p-1" }),
1052
+ label: y({ title: "Label", default: "Label" }),
1053
+ placeholder: y({
883
1054
  title: "Placeholder",
884
1055
  default: "Placeholder"
885
1056
  }),
886
- required: h({ title: "Required", default: !1 })
1057
+ required: b({ title: "Required", default: !1 })
887
1058
  }
888
1059
  });
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(
1060
+ const Ze = (e) => {
1061
+ const { blockProps: t, fieldName: l, label: o, styles: s, inputStyles: a, checked: r, required: c, showLabel: u = !0 } = e, h = g();
1062
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
1063
+ /* @__PURE__ */ n.jsx("input", { ...a, name: l, id: h, type: "radio", required: c, defaultChecked: r }),
1064
+ o && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o })
1065
+ ] }) : /* @__PURE__ */ n.jsx(
895
1066
  "input",
896
1067
  {
897
- id: m,
1068
+ id: h,
898
1069
  ...t,
899
- ...r,
900
- ...o,
1070
+ ...a,
1071
+ ...s,
901
1072
  type: "radio",
902
- required: i,
903
- checked: n,
1073
+ required: c,
1074
+ checked: r,
904
1075
  name: l
905
1076
  }
906
1077
  );
907
1078
  };
908
- p(ze, {
1079
+ d(Ze, {
909
1080
  type: "Radio",
910
1081
  label: "Radio",
911
1082
  category: "core",
912
- icon: de,
1083
+ icon: he,
913
1084
  group: "form",
914
1085
  hidden: !0,
915
1086
  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 })
1087
+ styles: i({ default: "flex items-center w-max gap-x-2" }),
1088
+ fieldName: y({ title: "Field Name", default: "radio" }),
1089
+ label: y({ title: "Label", default: "Label" }),
1090
+ checked: b({ title: "Checked", default: !1 }),
1091
+ required: b({ title: "Required", default: !1 })
921
1092
  }
922
1093
  });
923
- const Oe = (e) => {
1094
+ const Je = (e) => {
924
1095
  const {
925
1096
  blockProps: t,
926
1097
  fieldName: l,
927
- label: a,
928
- placeholder: o,
929
- styles: r,
930
- inputStyles: n,
931
- required: i,
1098
+ label: o,
1099
+ placeholder: s,
1100
+ styles: a,
1101
+ inputStyles: r,
1102
+ required: c,
932
1103
  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(
1104
+ _multiple: h = !1
1105
+ } = e, f = g();
1106
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...a, children: [
1107
+ u && /* @__PURE__ */ n.jsx("label", { htmlFor: f, children: o }),
1108
+ /* @__PURE__ */ n.jsxs(
938
1109
  "select",
939
1110
  {
940
- ...n,
941
- id: b,
942
- placeholder: o,
943
- required: i,
944
- multiple: m,
1111
+ ...r,
1112
+ id: f,
1113
+ placeholder: s,
1114
+ required: c,
1115
+ multiple: h,
945
1116
  name: l,
946
1117
  children: [
947
- /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
948
- _(e.options, (y) => /* @__PURE__ */ s.jsx(
1118
+ /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
1119
+ E(e.options, (m) => /* @__PURE__ */ n.jsx(
949
1120
  "option",
950
1121
  {
951
- selected: v(y, "selected", !1),
952
- value: y.value,
953
- dangerouslySetInnerHTML: { __html: y.label }
1122
+ selected: x(m, "selected", !1),
1123
+ value: m.value,
1124
+ dangerouslySetInnerHTML: { __html: m.label }
954
1125
  },
955
- y.value
1126
+ m.value
956
1127
  ))
957
1128
  ]
958
1129
  }
959
1130
  )
960
- ] }) : /* @__PURE__ */ s.jsxs(
1131
+ ] }) : /* @__PURE__ */ n.jsxs(
961
1132
  "select",
962
1133
  {
963
- id: b,
964
- ...r,
1134
+ id: f,
1135
+ ...a,
965
1136
  ...t,
966
- placeholder: o,
967
- required: i,
968
- multiple: m,
1137
+ placeholder: s,
1138
+ required: c,
1139
+ multiple: h,
969
1140
  name: l,
970
1141
  children: [
971
- /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
972
- _(e.options, (y) => /* @__PURE__ */ s.jsx(
1142
+ /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
1143
+ E(e.options, (m) => /* @__PURE__ */ n.jsx(
973
1144
  "option",
974
1145
  {
975
- selected: v(y, "selected", !1),
976
- value: y.value,
977
- dangerouslySetInnerHTML: { __html: y.label }
1146
+ selected: x(m, "selected", !1),
1147
+ value: m.value,
1148
+ dangerouslySetInnerHTML: { __html: m.label }
978
1149
  },
979
- y.value
1150
+ m.value
980
1151
  ))
981
1152
  ]
982
1153
  }
983
1154
  );
984
1155
  };
985
- p(Oe, {
1156
+ d(Je, {
986
1157
  type: "Select",
987
1158
  label: "Select",
988
1159
  category: "core",
989
- icon: ue,
1160
+ icon: ye,
990
1161
  group: "form",
991
1162
  hidden: !0,
992
1163
  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({
1164
+ styles: i({ default: "" }),
1165
+ fieldName: y({ title: "Field Name", default: "select" }),
1166
+ showLabel: b({ title: "Show label", default: !0 }),
1167
+ inputStyles: i({ default: "w-full p-1" }),
1168
+ label: y({ title: "Label", default: "Label" }),
1169
+ placeholder: y({
999
1170
  title: "Placeholder",
1000
1171
  default: "Placeholder"
1001
1172
  }),
1002
- required: h({ title: "Required", default: !1 }),
1003
- _multiple: h({ title: "Multiple Choice", default: !1 }),
1004
- options: V({
1173
+ required: b({ title: "Required", default: !1 }),
1174
+ _multiple: b({ title: "Multiple Choice", default: !1 }),
1175
+ options: W({
1005
1176
  title: "Options",
1006
1177
  itemProperties: {
1007
- label: f({ title: "Label", default: "" }),
1008
- value: f({ title: "Value", default: "" })
1178
+ label: y({ title: "Label", default: "" }),
1179
+ value: y({ title: "Value", default: "" })
1009
1180
  }
1010
1181
  })
1011
1182
  }
1012
1183
  });
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(
1184
+ const Ke = (e) => {
1185
+ const { blockProps: t, fieldName: l, label: o, placeholder: s, styles: a, inputStyles: r, _rows: c, showLabel: u } = e, h = g();
1186
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...a, ...t, children: [
1187
+ u && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o }),
1188
+ /* @__PURE__ */ n.jsx("textarea", { name: l, ...r, id: h, placeholder: s, rows: c })
1189
+ ] }) : /* @__PURE__ */ n.jsx(
1019
1190
  "textarea",
1020
1191
  {
1021
- id: m,
1192
+ id: h,
1022
1193
  name: l,
1023
1194
  ...t,
1024
- ...n,
1025
1195
  ...r,
1026
- placeholder: o,
1027
- rows: i
1196
+ ...a,
1197
+ placeholder: s,
1198
+ rows: c
1028
1199
  }
1029
1200
  );
1030
1201
  };
1031
- p(Ve, {
1202
+ d(Ke, {
1032
1203
  type: "TextArea",
1033
1204
  label: "TextArea",
1034
1205
  category: "core",
1035
- icon: A,
1206
+ icon: D,
1036
1207
  group: "form",
1037
1208
  hidden: !0,
1038
1209
  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({
1210
+ fieldName: y({ title: "Field Name", default: "textarea" }),
1211
+ showLabel: b({ title: "Show label", default: !0 }),
1212
+ styles: i({ default: "" }),
1213
+ inputStyles: i({ default: "w-full p-1" }),
1214
+ label: y({ title: "Label", default: "Label" }),
1215
+ placeholder: y({
1045
1216
  title: "Placeholder",
1046
1217
  default: "Placeholder"
1047
1218
  }),
1048
- _rows: w({ title: "Rows", default: 3 })
1219
+ _rows: _({ title: "Rows", default: 3 })
1049
1220
  }
1050
1221
  });
1051
- const tt = q;
1222
+ const pt = V;
1052
1223
  export {
1053
- tt as loadWebBlocks
1224
+ pt as loadWebBlocks
1054
1225
  };