@chaibuilder/sdk 1.2.25 → 1.2.27

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 (183) hide show
  1. package/dist/AddBlocks-S-4jzdWv.cjs +1 -0
  2. package/dist/AddBlocks-ksZjjn0k.js +205 -0
  3. package/dist/BrandingOptions-EMCT0Wa3.cjs +1 -0
  4. package/dist/{BrandingOptions-iTyWpwTs.js → BrandingOptions-T_kbQFQv.js} +53 -40
  5. package/dist/CanvasArea-SDzbubar.cjs +55 -0
  6. package/dist/{CanvasArea-dZjng782.js → CanvasArea-rhOeubmu.js} +323 -340
  7. package/dist/{Class-ahc3NIbq.js → Class-3k8xjeiM.js} +29 -26
  8. package/dist/Class-MmCxz2Ay.cjs +1 -0
  9. package/dist/{CurrentPage-Kmfp-kFk.js → CurrentPage-0eeU1V_c.js} +53 -40
  10. package/dist/CurrentPage-aTjWjc3o.cjs +1 -0
  11. package/dist/Functions-7jnEwJyw.js +15 -0
  12. package/dist/Functions-N3yhPYKY.cjs +1 -0
  13. package/dist/{ListTree-N3jeD790.js → ListTree-Muu4rAtp.js} +96 -87
  14. package/dist/ListTree-SWsqdfcG.cjs +1 -0
  15. package/dist/MODIFIERS-9EwxLM8V.cjs +1 -0
  16. package/dist/{MODIFIERS-CNqNUapY.js → MODIFIERS-WQdaNvb8.js} +8 -10
  17. package/dist/PagesPanel-n3x-0ozR.cjs +1 -0
  18. package/dist/{PagesPanel-u1IB-nRr.js → PagesPanel-rYN28QpN.js} +44 -29
  19. package/dist/ProjectPanel-ivFOhdcz.js +84 -0
  20. package/dist/ProjectPanel-pBePMOta.cjs +1 -0
  21. package/dist/Settings-JRyJayf5.cjs +1 -0
  22. package/dist/{Settings-jCcd-VE6.js → Settings-XWmKzRl9.js} +400 -407
  23. package/dist/SidePanels-BtUeo6M9.cjs +1 -0
  24. package/dist/{SidePanels-pHMYprpW.js → SidePanels-ODktnGbC.js} +117 -108
  25. package/dist/Topbar-QMeD3hvq.cjs +1 -0
  26. package/dist/Topbar-Yunooh00.js +131 -0
  27. package/dist/UnsplashImages-05JR8oIu.cjs +1 -0
  28. package/dist/{UnsplashImages-L7x_3RQf.js → UnsplashImages-QMl0bxix.js} +59 -47
  29. package/dist/UploadImages-OgSN1HVt.cjs +1 -0
  30. package/dist/{UploadImages-zdEJRLD8.js → UploadImages-Si-A26bc.js} +58 -36
  31. package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
  32. package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
  33. package/dist/add-page-modal-9pTKItY-.cjs +1 -0
  34. package/dist/add-page-modal-U7AUUrI1.js +103 -0
  35. package/dist/confirm-alert-DhRc-Zcd.cjs +1 -0
  36. package/dist/confirm-alert-kV5-c70T.js +59 -0
  37. package/dist/controls-KK2oLIa8.cjs +1 -0
  38. package/dist/{controls-IS5qnRce.js → controls-OfJWSEqC.js} +85 -20
  39. package/dist/core.cjs +1 -1
  40. package/dist/core.js +74 -150
  41. package/dist/defaultTheme-7Lk2zq60.cjs +1 -0
  42. package/dist/{defaultTheme-4kA60XdB.js → defaultTheme-gunU_Fe5.js} +8 -6
  43. package/dist/delete-page-modal-4s-6AIy4.cjs +1 -0
  44. package/dist/delete-page-modal-UCBpdjLe.js +82 -0
  45. package/dist/email-blocks.cjs +1 -1
  46. package/dist/email-blocks.js +292 -3
  47. package/dist/email.cjs +1 -1
  48. package/dist/email.js +36 -18
  49. package/dist/empty-slot-ZBlsQi6m.js +15 -0
  50. package/dist/empty-slot-nzYOgZuS.cjs +1 -0
  51. package/dist/form-Ap63cNec.cjs +1 -0
  52. package/dist/{form-0_RLz2TB.js → form-zmlTjM9j.js} +12 -12
  53. package/dist/html-to-json-C_Eobs_d.cjs +1 -0
  54. package/dist/{html-to-json-2xtb7520.js → html-to-json-p__Fgqdg.js} +65 -40
  55. package/dist/index-CFUoB97-.js +3079 -0
  56. package/dist/index-F4AQQ6qq.cjs +1 -0
  57. package/dist/index-Qk028f-N.cjs +1 -0
  58. package/dist/index-YpnaudSM.js +63 -0
  59. package/dist/index-e0c8PmRQ.js +205 -0
  60. package/dist/index-ecnGWzh9.cjs +1 -0
  61. package/dist/index-f0AbmoYY.js +2201 -0
  62. package/dist/index-gi1LIOCw.cjs +1 -0
  63. package/dist/index-l19JVVXI.cjs +206 -0
  64. package/dist/index-lOJfSheQ.js +39503 -0
  65. package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-WbnYoNE9.js} +109 -106
  66. package/dist/jsx-runtime-Z_BpKhVy.cjs +27 -0
  67. package/dist/lib.cjs +3 -3
  68. package/dist/lib.js +59 -56
  69. package/dist/page-viewer-YFrIG3L7.cjs +1 -0
  70. package/dist/{page-viewer-NnOwmAmu.js → page-viewer-jOwy--9A.js} +56 -43
  71. package/dist/{project-general-setting-9ju3TDju.js → project-general-setting-3N8HZ2fe.js} +42 -35
  72. package/dist/project-general-setting-hK7I7FuN.cjs +1 -0
  73. package/dist/{project-seo-setting-36CdUszM.js → project-seo-setting-bSiNgO_1.js} +39 -23
  74. package/dist/project-seo-setting-x-FK0pez.cjs +1 -0
  75. package/dist/render.cjs +1 -1
  76. package/dist/render.js +16 -16
  77. package/dist/{single-page-detail-hD1jKZ8k.js → single-page-detail--AZlZ-pC.js} +73 -66
  78. package/dist/single-page-detail-9abF2g2R.cjs +1 -0
  79. package/dist/studio.cjs +1 -1
  80. package/dist/studio.js +39 -24
  81. package/dist/ui.cjs +1 -1
  82. package/dist/ui.js +158 -364
  83. package/dist/web-blocks.cjs +1 -1
  84. package/dist/web-blocks.js +1052 -3
  85. package/package.json +1 -1
  86. package/dist/AddBlocks-Ol3iIVKa.js +0 -207
  87. package/dist/AddBlocks-a1c-7Ewz.cjs +0 -1
  88. package/dist/BrandingOptions-6rnt0UaA.cjs +0 -1
  89. package/dist/CanvasArea-R4ogF9AT.cjs +0 -55
  90. package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +0 -163
  91. package/dist/ChaiBuilderEditor-vP4at00I.js +0 -27974
  92. package/dist/Class-eieto7e-.cjs +0 -1
  93. package/dist/Controls-3Cc1XYXg.js +0 -105
  94. package/dist/Controls-ky25Ebo3.cjs +0 -1
  95. package/dist/CurrentPage-3gQTH0Zt.cjs +0 -1
  96. package/dist/Functions-Hvon6AMZ.cjs +0 -1
  97. package/dist/Functions-NzT2Six_.js +0 -15
  98. package/dist/ImagesPanel-J1RlG7xG.cjs +0 -1
  99. package/dist/ImagesPanel-Wb0GF_NA.js +0 -29
  100. package/dist/ListTree-CZ-mtjZ9.cjs +0 -1
  101. package/dist/MODIFIERS-o1p3VnpS.cjs +0 -1
  102. package/dist/PagesPanel-Gi0z6gaf.cjs +0 -1
  103. package/dist/ProjectPanel-EydGZmMW.js +0 -71
  104. package/dist/ProjectPanel-kiiljG4H.cjs +0 -1
  105. package/dist/STRINGS-b432aBJJ.js +0 -7
  106. package/dist/STRINGS-gPz7CUOk.cjs +0 -1
  107. package/dist/Settings-8ilCSH8b.cjs +0 -1
  108. package/dist/SidePanels-T36C6Lhc.cjs +0 -1
  109. package/dist/Topbar-CvWQuspR.cjs +0 -1
  110. package/dist/Topbar-pbIDUE_B.js +0 -122
  111. package/dist/UnsplashImages-KBZPd9dv.cjs +0 -1
  112. package/dist/UploadImages-GkkJVAgG.cjs +0 -1
  113. package/dist/accordion-oPUeqPCZ.js +0 -42
  114. package/dist/accordion-ynvFtV_p.cjs +0 -1
  115. package/dist/add-page-modal-9SGv2hgc.cjs +0 -1
  116. package/dist/add-page-modal-JCDXZIPW.js +0 -95
  117. package/dist/alert-dialog-P9xMMB6C.cjs +0 -1
  118. package/dist/alert-dialog-rypfO5ly.js +0 -64
  119. package/dist/badge-E-S7CqUt.cjs +0 -1
  120. package/dist/badge-tEwO7C51.js +0 -23
  121. package/dist/block-helpers-OKHmRRol.cjs +0 -1
  122. package/dist/block-helpers-oSFpSsGz.js +0 -23
  123. package/dist/command-BxR6jaCI.cjs +0 -1
  124. package/dist/command-Pn3HKDuV.js +0 -97
  125. package/dist/confirm-alert-uNm0lZ0y.cjs +0 -1
  126. package/dist/confirm-alert-wR5_VJ1l.js +0 -36
  127. package/dist/context-menu-8dC9uGXj.js +0 -122
  128. package/dist/context-menu-IgLbIuth.cjs +0 -1
  129. package/dist/controls-L7DPvB0m.cjs +0 -1
  130. package/dist/defaultTheme-mrkeGFGI.cjs +0 -1
  131. package/dist/delete-page-modal-7KmP1elv.js +0 -67
  132. package/dist/delete-page-modal-SgfwvfNu.cjs +0 -1
  133. package/dist/dropdown-menu-El86_9Uo.js +0 -124
  134. package/dist/dropdown-menu-SiHzqWwZ.cjs +0 -1
  135. package/dist/form-W58AVUdf.cjs +0 -1
  136. package/dist/hover-card-KUwpDkW8.cjs +0 -1
  137. package/dist/hover-card-q138xxXR.js +0 -45
  138. package/dist/html-to-json-uSnxl72F.cjs +0 -1
  139. package/dist/iconBase-gbUAAO2L.cjs +0 -1
  140. package/dist/iconBase-h4DuR_XT.js +0 -63
  141. package/dist/index-9MmykVSc.cjs +0 -1
  142. package/dist/index-hElOGcFr.js +0 -2200
  143. package/dist/index-lDTsQp7h.js +0 -188
  144. package/dist/index-rq5Y9ZDy.cjs +0 -1
  145. package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
  146. package/dist/label-KaP7MRrs.js +0 -10
  147. package/dist/label-tFm8HZdb.cjs +0 -1
  148. package/dist/link-WbcKdQ9k.cjs +0 -1
  149. package/dist/link-xuhP-4dN.js +0 -196
  150. package/dist/page-viewer-Hx5hxHKm.cjs +0 -1
  151. package/dist/popover-a84pbVhQ.js +0 -23
  152. package/dist/popover-fKjgcRUx.cjs +0 -1
  153. package/dist/project-general-setting-FxkwjvJz.cjs +0 -1
  154. package/dist/project-seo-setting-RU7qiXxb.cjs +0 -1
  155. package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
  156. package/dist/scroll-area-ewXbxc3n.js +0 -30
  157. package/dist/select-7bjg-rr9.cjs +0 -1
  158. package/dist/select-POGdEDHT.js +0 -75
  159. package/dist/separator-3Civ-6hb.cjs +0 -1
  160. package/dist/separator-SctTn0Qi.js +0 -18
  161. package/dist/single-page-detail-beY0MT1b.cjs +0 -1
  162. package/dist/skeleton-STeL9VrJ.cjs +0 -1
  163. package/dist/skeleton-lu8e7q2y.js +0 -239
  164. package/dist/tabs-_4WbA1cc.cjs +0 -1
  165. package/dist/tabs-yQ3oGziM.js +0 -106
  166. package/dist/textarea-1kZEh7ki.cjs +0 -1
  167. package/dist/textarea-b2QvVhrK.js +0 -73
  168. package/dist/useAddBlock-8pxOEYIl.cjs +0 -1
  169. package/dist/useAddBlock-FEKFJNwQ.js +0 -69
  170. package/dist/useChaiExternalData-fkFgoS80.js +0 -6
  171. package/dist/useChaiExternalData-rwoAZ6uU.cjs +0 -1
  172. package/dist/useDarkMode-7i57segK.cjs +0 -1
  173. package/dist/useDarkMode-8VHJlYyE.js +0 -23
  174. package/dist/useSelectedBreakpoints-6NK5qd7T.js +0 -10
  175. package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +0 -1
  176. package/dist/useStylingState-Iuj84yvc.js +0 -186
  177. package/dist/useStylingState-OIvJMV6p.cjs +0 -1
  178. package/dist/useUiLibraries-nCdauJ4N.cjs +0 -1
  179. package/dist/useUiLibraries-psyWFbNc.js +0 -12
  180. package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +0 -1
  181. package/dist/useUpdateBlocksProps-vWcDp-P9.js +0 -23
  182. package/dist/utils-dze1SGvB.js +0 -6
  183. package/dist/utils-qK_SjzzV.cjs +0 -1
@@ -1,5 +1,1054 @@
1
- import { noop as o } from "lodash-es";
2
- const r = o;
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";
9
+ import "./_commonjsHelpers-UyOWmZb0.js";
10
+ import "clsx";
11
+ import "tailwind-merge";
12
+ const pe = d.memo(
13
+ (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
+ let u = {};
18
+ return a && (u = { backgroundImage: `url(${a})` }), d.createElement(r, { ...t, ...n, style: u }, i);
19
+ }
20
+ );
21
+ p(pe, {
22
+ type: "Box",
23
+ label: "Box",
24
+ category: "core",
25
+ group: "basic",
26
+ props: {
27
+ styles: c({ default: "" }),
28
+ tag: I({
29
+ title: "Tag",
30
+ default: "div",
31
+ options: [
32
+ { value: "div", title: "div" },
33
+ { value: "header", title: "header" },
34
+ { value: "footer", title: "footer" },
35
+ { value: "section", title: "section" },
36
+ { value: "article", title: "article" },
37
+ { value: "aside", title: "aside" },
38
+ { value: "main", title: "main" },
39
+ { value: "nav", title: "nav" },
40
+ { value: "figure", title: "figure" },
41
+ { value: "details", title: "details" },
42
+ { value: "summary", title: "summary" },
43
+ { value: "dialog", title: "dialog" },
44
+ { value: "strike", title: "strike" },
45
+ { value: "caption", title: "caption" },
46
+ { value: "legend", title: "legend" },
47
+ { value: "figcaption", title: "figcaption" },
48
+ { value: "mark", title: "mark" }
49
+ ]
50
+ }),
51
+ backgroundImage: j({ title: "Background Image" })
52
+ },
53
+ canAcceptBlock: () => !0
54
+ });
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
+ ...l,
59
+ ...t,
60
+ dangerouslySetInnerHTML: { __html: a }
61
+ });
62
+ };
63
+ p(me, {
64
+ type: "Heading",
65
+ label: "Heading",
66
+ category: "core",
67
+ icon: U,
68
+ group: "typography",
69
+ props: {
70
+ level: I({
71
+ title: "Level",
72
+ default: "h1",
73
+ binding: !1,
74
+ options: [
75
+ { value: "h1", title: "h1" },
76
+ { value: "h2", title: "h2" },
77
+ { value: "h3", title: "h3" },
78
+ { value: "h4", title: "h4" },
79
+ { value: "h5", title: "h5" },
80
+ { value: "h6", title: "h6" }
81
+ ]
82
+ }),
83
+ styles: c({ default: "text-3xl" }),
84
+ content: B({ title: "Content", default: "Heading goes here" })
85
+ },
86
+ canAcceptBlock: (e) => e === "Span" || e === "Text"
87
+ });
88
+ const fe = (e) => {
89
+ const { blockProps: t, styles: l, content: a } = e;
90
+ return F(e.children) ? d.createElement("div", {
91
+ ...l,
92
+ ...t,
93
+ dangerouslySetInnerHTML: { __html: a }
94
+ }) : d.createElement("p", { ...l, ...t }, e.children);
95
+ };
96
+ p(fe, {
97
+ type: "Paragraph",
98
+ label: "Paragraph",
99
+ category: "core",
100
+ icon: G,
101
+ group: "typography",
102
+ props: {
103
+ styles: c({ default: "" }),
104
+ content: B({
105
+ title: "Content",
106
+ 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."
107
+ })
108
+ },
109
+ canAcceptBlock: (e) => e === "Span" || e === "Link"
110
+ });
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
+ ...l,
115
+ ...t,
116
+ dangerouslySetInnerHTML: { __html: a }
117
+ });
118
+ };
119
+ p(ye, {
120
+ type: "Span",
121
+ label: "Span",
122
+ category: "core",
123
+ group: "typography",
124
+ props: {
125
+ styles: c({ default: "" }),
126
+ content: B({ title: "Content", default: "Enter your content" })
127
+ },
128
+ canAcceptBlock: () => !0
129
+ });
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
+ };
134
+ p(be, {
135
+ type: "RichText",
136
+ label: "Rich Text",
137
+ category: "core",
138
+ icon: W,
139
+ group: "typography",
140
+ props: {
141
+ styles: c({ default: "" }),
142
+ content: T({
143
+ title: "Content",
144
+ default: "<p>This is a rich text block. You can add text, and other content here.</p>"
145
+ })
146
+ }
147
+ });
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(
152
+ "div",
153
+ {
154
+ style: { width: l + "px" },
155
+ className: r + " " + (r === "order-first" ? "mr-2" : "ml-2") || "",
156
+ dangerouslySetInnerHTML: { __html: u }
157
+ }
158
+ )
159
+ ] });
160
+ return d.createElement("button", { ...t, ...n, type: "button" }, m);
161
+ };
162
+ p(he, {
163
+ type: "Button",
164
+ label: "Button",
165
+ category: "core",
166
+ icon: H,
167
+ group: "basic",
168
+ 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 }),
173
+ iconPos: I({
174
+ title: "Icon Position",
175
+ default: "order-last",
176
+ options: [
177
+ { title: "Start", value: "order-first" },
178
+ { title: "End", value: "order-last" }
179
+ ]
180
+ })
181
+ }
182
+ });
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
+ ...t,
187
+ ...o,
188
+ dangerouslySetInnerHTML: { __html: n },
189
+ "data-simulate": "a"
190
+ }) : a ? /* @__PURE__ */ s.jsx("a", { href: l.href || "#/", target: l.target, ...t, ...o, children: a }) : d.createElement("a", {
191
+ ...t,
192
+ ...o,
193
+ href: l.href || "#",
194
+ target: l.target || "_self",
195
+ dangerouslySetInnerHTML: { __html: n }
196
+ });
197
+ };
198
+ p(ge, {
199
+ type: "Link",
200
+ label: "Link",
201
+ category: "core",
202
+ icon: Y,
203
+ group: "basic",
204
+ props: {
205
+ styles: c({ default: "" }),
206
+ content: f({ title: "Content", default: "" }),
207
+ link: z({
208
+ title: "Link",
209
+ default: { type: "page", target: "_self", href: "" }
210
+ })
211
+ },
212
+ canAcceptBlock: () => !0
213
+ });
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 },
219
+ l
220
+ );
221
+ };
222
+ p(xe, {
223
+ type: "List",
224
+ label: "List",
225
+ icon: X,
226
+ category: "core",
227
+ group: "basic",
228
+ props: {
229
+ styles: c({ default: "" }),
230
+ listType: I({
231
+ title: "List type",
232
+ default: "list-disc",
233
+ options: [
234
+ { value: "list-none", title: "None" },
235
+ { value: "list-disc", title: "Disc" },
236
+ { value: "list-decimal", title: "Number" }
237
+ ]
238
+ })
239
+ },
240
+ canAcceptBlock: (e) => e === "ListItem",
241
+ blocks: [
242
+ { _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
243
+ {
244
+ _type: "ListItem",
245
+ _id: "b",
246
+ _parent: "a",
247
+ styles: "#styles:,",
248
+ content: "Item 1"
249
+ },
250
+ {
251
+ _type: "ListItem",
252
+ _id: "c",
253
+ _parent: "a",
254
+ styles: "#styles:,",
255
+ content: "Item 2"
256
+ },
257
+ {
258
+ _type: "ListItem",
259
+ _id: "d",
260
+ _parent: "a",
261
+ styles: "#styles:,",
262
+ content: "Item 3"
263
+ }
264
+ ]
265
+ });
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,
270
+ ...t,
271
+ dangerouslySetInnerHTML: { __html: l }
272
+ });
273
+ };
274
+ p(ke, {
275
+ type: "ListItem",
276
+ label: "List Item",
277
+ icon: Z,
278
+ category: "core",
279
+ group: "basic",
280
+ props: {
281
+ styles: c({ default: "" }),
282
+ content: B({ title: "Content", default: "List item" })
283
+ },
284
+ canAcceptBlock: () => !0,
285
+ canBeNested: (e) => e === "List"
286
+ });
287
+ const ve = (e, t) => ({
288
+ ...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
+ );
295
+ if (k(l))
296
+ return /* @__PURE__ */ s.jsx(g, { blockProps: t, text: "", inBuilder: r, className: "h-8 w-14" });
297
+ const u = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
298
+ return d.createElement("span", {
299
+ ...t,
300
+ ...i,
301
+ dangerouslySetInnerHTML: { __html: u }
302
+ });
303
+ };
304
+ p(Ie, {
305
+ type: "Icon",
306
+ label: "Icon",
307
+ category: "core",
308
+ icon: J,
309
+ group: "media",
310
+ props: {
311
+ styles: c({ default: "text-black" }),
312
+ icon: E({
313
+ title: "Icon",
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
+ }),
316
+ width: w({ title: "Width", default: "" }),
317
+ height: w({ title: "Height", default: "" })
318
+ }
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", {
323
+ ...t,
324
+ ...a,
325
+ src: l,
326
+ alt: o,
327
+ height: r,
328
+ width: n
329
+ });
330
+ };
331
+ p(Be, {
332
+ type: "Image",
333
+ label: "Image",
334
+ category: "core",
335
+ icon: K,
336
+ group: "media",
337
+ props: {
338
+ styles: c({ default: "" }),
339
+ image: j({
340
+ title: "Image",
341
+ default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
342
+ }),
343
+ alt: f({ title: "Alt", default: "" }),
344
+ width: f({ title: "Width", default: "" }),
345
+ height: f({ title: "Height", default: "" })
346
+ }
347
+ });
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: [
354
+ "Slot: ",
355
+ e.name
356
+ ] }) }) })), d.createElement("div", { ...a, ...t, droppable: "yes" }, o || r);
357
+ };
358
+ p(Le, {
359
+ type: "Slot",
360
+ label: "Slot",
361
+ group: "basic",
362
+ category: "core",
363
+ hidden: !0,
364
+ props: {
365
+ styles: c({ default: "" }),
366
+ emptyStyles: c({ default: "" })
367
+ },
368
+ canAcceptBlock: () => !0
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) => {
371
+ if (N.test(e)) {
372
+ const t = e.match(N);
373
+ return t ? `https://www.youtube.com/embed/${t[4]}` : e;
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
+ if (M.test(e)) {
380
+ const t = e.match(M);
381
+ return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
382
+ }
383
+ return null;
384
+ }, we = d.memo(
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("&")}`;
394
+ }
395
+ y = d.createElement("iframe", {
396
+ ...t,
397
+ className: "absolute inset-0 w-full h-full",
398
+ src: b,
399
+ allow: l ? "" : "autoplay *; fullscreen *",
400
+ allowFullScreen: !0,
401
+ frameBorder: 0
402
+ });
403
+ } else
404
+ y = d.createElement("video", {
405
+ ...t,
406
+ className: "absolute inset-0 w-full h-full",
407
+ src: o,
408
+ controls: i,
409
+ muted: u,
410
+ autoPlay: l ? !1 : n,
411
+ loop: m
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
416
+ ] }) });
417
+ }
418
+ );
419
+ p(we, {
420
+ type: "Video",
421
+ label: "Video",
422
+ category: "core",
423
+ icon: Q,
424
+ group: "media",
425
+ props: {
426
+ styles: c({ default: "" }),
427
+ url: f({
428
+ title: "Video URL",
429
+ default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
430
+ }),
431
+ controls: O({
432
+ title: "Controls",
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 })
438
+ }
439
+ })
440
+ }
441
+ });
442
+ const Se = d.memo(
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", {
448
+ ...l,
449
+ dangerouslySetInnerHTML: { __html: a }
450
+ })
451
+ ] });
452
+ }
453
+ );
454
+ p(Se, {
455
+ type: "CustomHTML",
456
+ label: "Custom HTML",
457
+ category: "core",
458
+ icon: ee,
459
+ group: "advanced",
460
+ props: {
461
+ styles: c({ default: "" }),
462
+ content: B({
463
+ title: "HTML Content",
464
+ default: "<div><p>HTML Snippet goes here...</p></div>",
465
+ placeholder: "Enter custom HTML code here"
466
+ })
467
+ }
468
+ });
469
+ const _e = (e) => {
470
+ const { blockProps: t, styles: l } = e;
471
+ return d.createElement("hr", { ...l, ...t });
472
+ };
473
+ p(_e, {
474
+ type: "Divider",
475
+ label: "Divider",
476
+ category: "core",
477
+ icon: te,
478
+ group: "basic",
479
+ props: {
480
+ styles: c({ default: "bg-gray-900 h-0.5 py-2 my-1" })
481
+ }
482
+ });
483
+ const je = (e) => e.inBuilder ? /* @__PURE__ */ s.jsx("span", { className: "flex", ...e.blockProps, children: e.content }) : `${e.content}`;
484
+ p(je, {
485
+ type: "Text",
486
+ label: "Text",
487
+ hidden: !0,
488
+ category: "core",
489
+ group: "typography",
490
+ icon: R,
491
+ props: {
492
+ content: B({ title: "Content", defaultValue: "" })
493
+ }
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);
499
+ };
500
+ p(Ee, {
501
+ type: "Body",
502
+ label: "Body",
503
+ category: "core",
504
+ group: "basic",
505
+ hidden: !0,
506
+ props: {
507
+ styles: c({ default: "font-body antialiased" }),
508
+ backgroundImage: j({ title: "Background Image" })
509
+ },
510
+ canAcceptBlock: () => !0,
511
+ canDelete: () => !1,
512
+ canMove: () => !1,
513
+ canDuplicate: () => !1
514
+ });
515
+ const Pe = (e) => {
516
+ const { blockProps: t, styles: l } = e;
517
+ return d.createElement("br", { ...t, ...l });
518
+ };
519
+ p(Pe, {
520
+ type: "LineBreak",
521
+ label: "Line Break",
522
+ category: "core",
523
+ group: "basic",
524
+ hidden: !0,
525
+ icon: R,
526
+ props: {
527
+ styles: c({ default: "" })
528
+ }
529
+ });
530
+ const S = (e) => {
531
+ const t = (r, n) => ({
532
+ _id: x(),
533
+ _parent: r,
534
+ _type: "TableCell",
535
+ styles: "#styles:,",
536
+ content: `${e === "TableHead" ? "Table Head" : "Table Cell " + n}`
537
+ }), l = (r) => {
538
+ const n = x(), i = {
539
+ _type: "TableRow",
540
+ _id: n,
541
+ styles: "#styles:,border-b"
542
+ };
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,
547
+ _type: "TableHead",
548
+ styles: "#styles:,font-medium"
549
+ };
550
+ return r && (i._parent = r), [i, ...l(n)];
551
+ }, o = (r) => {
552
+ const n = x(), i = {
553
+ _id: n,
554
+ _type: "TableBody",
555
+ styles: "#styles:,"
556
+ };
557
+ return r && (i._parent = r), [i, ...l(n), ...l(n)];
558
+ };
559
+ if (e === "Table") {
560
+ const r = x();
561
+ return [
562
+ {
563
+ _id: r,
564
+ _type: "Table",
565
+ styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
566
+ },
567
+ ...a(r),
568
+ ...o(r)
569
+ ];
570
+ }
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" });
575
+ };
576
+ p(Ne, {
577
+ type: "Table",
578
+ label: "Table",
579
+ category: "core",
580
+ group: "table",
581
+ hidden: !0,
582
+ icon: le,
583
+ props: {
584
+ styles: c({ default: "" })
585
+ },
586
+ blocks: S("Table")
587
+ });
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" });
591
+ };
592
+ p(Ce, {
593
+ type: "TableHead",
594
+ label: "Table Head",
595
+ category: "core",
596
+ group: "table",
597
+ hidden: !0,
598
+ icon: oe,
599
+ props: {
600
+ styles: c({ default: "" })
601
+ },
602
+ blocks: S("TableHead")
603
+ });
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" });
607
+ };
608
+ p(Me, {
609
+ type: "TableBody",
610
+ label: "Table Body",
611
+ category: "core",
612
+ group: "table",
613
+ hidden: !0,
614
+ icon: ae,
615
+ props: {
616
+ styles: c({ default: "" })
617
+ },
618
+ blocks: S("TableBody")
619
+ });
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" });
623
+ };
624
+ p(He, {
625
+ type: "TableRow",
626
+ label: "Table Row",
627
+ category: "core",
628
+ group: "table",
629
+ hidden: !0,
630
+ icon: re,
631
+ props: {
632
+ styles: c({ default: "w-full" })
633
+ },
634
+ blocks: S("TableRow")
635
+ });
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", {
639
+ ...t,
640
+ ...o,
641
+ dangerouslySetInnerHTML: { __html: a }
642
+ });
643
+ };
644
+ p(Re, {
645
+ type: "TableCell",
646
+ label: "Table Cell",
647
+ category: "core",
648
+ group: "table",
649
+ hidden: !0,
650
+ icon: se,
651
+ props: {
652
+ styles: c({ default: "" }),
653
+ content: T({ title: "Content", default: "Table cell item" })
654
+ }
655
+ });
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 = {
661
+ "x-data": "useForm",
662
+ "x-on:submit.prevent": "post"
663
+ }, y = {
664
+ "x-html": "formResponse",
665
+ ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
666
+ };
667
+ return /* @__PURE__ */ s.jsxs(
668
+ "form",
669
+ {
670
+ ...b,
671
+ "data-error": l,
672
+ "data-success": r,
673
+ method: "post",
674
+ action: n,
675
+ ...t,
676
+ ...i,
677
+ children: [
678
+ /* @__PURE__ */ s.jsx("div", { ...y }),
679
+ /* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: a || o }),
680
+ m
681
+ ]
682
+ }
683
+ );
684
+ };
685
+ p(Ae, {
686
+ type: "Form",
687
+ label: "Form",
688
+ category: "core",
689
+ icon: ne,
690
+ group: "form",
691
+ hidden: !0,
692
+ props: {
693
+ styles: c({ default: "" }),
694
+ action: f({
695
+ title: "Submit URL",
696
+ default: "/api/form/submit"
697
+ }),
698
+ errorMessage: T({
699
+ title: "Error Message",
700
+ default: "Something went wrong. Please try again"
701
+ }),
702
+ successMessage: T({
703
+ title: "Success Message",
704
+ default: "Thank you for your submission."
705
+ })
706
+ },
707
+ canAcceptBlock: () => !0
708
+ });
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,
713
+ dangerouslySetInnerHTML: { __html: l }
714
+ });
715
+ };
716
+ p(Fe, {
717
+ type: "Label",
718
+ label: "Label",
719
+ category: "core",
720
+ icon: ie,
721
+ group: "form",
722
+ hidden: !0,
723
+ props: {
724
+ styles: c({ default: "" }),
725
+ content: f({ title: "Content", default: "Label" })
726
+ }
727
+ });
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 = {
730
+ "x-bind:disabled": "formLoading"
731
+ };
732
+ return /* @__PURE__ */ s.jsxs(
733
+ "button",
734
+ {
735
+ id: m,
736
+ ...b,
737
+ ...n,
738
+ ...r,
739
+ ...t || {},
740
+ type: l ? "button" : "submit",
741
+ placeholder: o,
742
+ children: [
743
+ a,
744
+ i && /* @__PURE__ */ s.jsx("span", { className: u, dangerouslySetInnerHTML: { __html: i } })
745
+ ]
746
+ }
747
+ );
748
+ };
749
+ p($e, {
750
+ type: "FormButton",
751
+ label: "Submit Button",
752
+ category: "core",
753
+ icon: H,
754
+ group: "form",
755
+ hidden: !0,
756
+ props: {
757
+ label: f({ title: "Label", default: "Submit" }),
758
+ styles: c({
759
+ default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
760
+ }),
761
+ icon: E({ title: "Icon", default: "" }),
762
+ iconPos: I({
763
+ title: "Icon Position",
764
+ default: "order-last",
765
+ options: [
766
+ { title: "Start", value: "order-first" },
767
+ { title: "End", value: "order-last" }
768
+ ]
769
+ })
770
+ }
771
+ });
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(
776
+ "input",
777
+ {
778
+ ...r,
779
+ name: l,
780
+ id: m,
781
+ type: "checkbox",
782
+ required: n,
783
+ defaultChecked: i
784
+ }
785
+ ),
786
+ a && a !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: a })
787
+ ] }) : /* @__PURE__ */ s.jsx(
788
+ "input",
789
+ {
790
+ id: m,
791
+ ...t,
792
+ ...r,
793
+ ...o,
794
+ type: "checkbox",
795
+ required: n,
796
+ name: l
797
+ }
798
+ );
799
+ };
800
+ p(De, {
801
+ type: "Checkbox",
802
+ label: "Checkbox",
803
+ category: "core",
804
+ icon: ce,
805
+ group: "form",
806
+ hidden: !0,
807
+ 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 })
813
+ }
814
+ });
815
+ const qe = (e) => {
816
+ const {
817
+ blockProps: t,
818
+ label: l,
819
+ placeholder: a,
820
+ styles: o,
821
+ inputStyles: r,
822
+ showLabel: n,
823
+ required: i,
824
+ 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(
829
+ "input",
830
+ {
831
+ id: y,
832
+ name: b,
833
+ readOnly: m,
834
+ ...t,
835
+ ...r,
836
+ ...o,
837
+ type: u,
838
+ placeholder: a,
839
+ required: i
840
+ }
841
+ )) : /* @__PURE__ */ s.jsxs("div", { ...o, ...t, children: [
842
+ n && /* @__PURE__ */ s.jsx("label", { htmlFor: y, children: l }),
843
+ /* @__PURE__ */ s.jsx(
844
+ "input",
845
+ {
846
+ name: b,
847
+ readOnly: m,
848
+ ...r,
849
+ id: y,
850
+ type: u,
851
+ placeholder: a,
852
+ required: i
853
+ }
854
+ )
855
+ ] });
856
+ };
857
+ p(qe, {
858
+ type: "Input",
859
+ label: "Input",
860
+ category: "core",
861
+ icon: A,
862
+ group: "form",
863
+ hidden: !0,
864
+ props: {
865
+ styles: c({ default: "" }),
866
+ fieldName: f({ title: "Field Name", default: "input" }),
867
+ inputType: I({
868
+ title: "Type",
869
+ options: _(
870
+ ["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
871
+ (e) => ({
872
+ value: e,
873
+ title: e
874
+ })
875
+ ),
876
+ default: "text"
877
+ }),
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({
883
+ title: "Placeholder",
884
+ default: "Placeholder"
885
+ }),
886
+ required: h({ title: "Required", default: !1 })
887
+ }
888
+ });
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(
895
+ "input",
896
+ {
897
+ id: m,
898
+ ...t,
899
+ ...r,
900
+ ...o,
901
+ type: "radio",
902
+ required: i,
903
+ checked: n,
904
+ name: l
905
+ }
906
+ );
907
+ };
908
+ p(ze, {
909
+ type: "Radio",
910
+ label: "Radio",
911
+ category: "core",
912
+ icon: de,
913
+ group: "form",
914
+ hidden: !0,
915
+ 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 })
921
+ }
922
+ });
923
+ const Oe = (e) => {
924
+ const {
925
+ blockProps: t,
926
+ fieldName: l,
927
+ label: a,
928
+ placeholder: o,
929
+ styles: r,
930
+ inputStyles: n,
931
+ required: i,
932
+ 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(
938
+ "select",
939
+ {
940
+ ...n,
941
+ id: b,
942
+ placeholder: o,
943
+ required: i,
944
+ multiple: m,
945
+ name: l,
946
+ children: [
947
+ /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
948
+ _(e.options, (y) => /* @__PURE__ */ s.jsx(
949
+ "option",
950
+ {
951
+ selected: v(y, "selected", !1),
952
+ value: y.value,
953
+ dangerouslySetInnerHTML: { __html: y.label }
954
+ },
955
+ y.value
956
+ ))
957
+ ]
958
+ }
959
+ )
960
+ ] }) : /* @__PURE__ */ s.jsxs(
961
+ "select",
962
+ {
963
+ id: b,
964
+ ...r,
965
+ ...t,
966
+ placeholder: o,
967
+ required: i,
968
+ multiple: m,
969
+ name: l,
970
+ children: [
971
+ /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
972
+ _(e.options, (y) => /* @__PURE__ */ s.jsx(
973
+ "option",
974
+ {
975
+ selected: v(y, "selected", !1),
976
+ value: y.value,
977
+ dangerouslySetInnerHTML: { __html: y.label }
978
+ },
979
+ y.value
980
+ ))
981
+ ]
982
+ }
983
+ );
984
+ };
985
+ p(Oe, {
986
+ type: "Select",
987
+ label: "Select",
988
+ category: "core",
989
+ icon: ue,
990
+ group: "form",
991
+ hidden: !0,
992
+ 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({
999
+ title: "Placeholder",
1000
+ default: "Placeholder"
1001
+ }),
1002
+ required: h({ title: "Required", default: !1 }),
1003
+ _multiple: h({ title: "Multiple Choice", default: !1 }),
1004
+ options: V({
1005
+ title: "Options",
1006
+ itemProperties: {
1007
+ label: f({ title: "Label", default: "" }),
1008
+ value: f({ title: "Value", default: "" })
1009
+ }
1010
+ })
1011
+ }
1012
+ });
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(
1019
+ "textarea",
1020
+ {
1021
+ id: m,
1022
+ name: l,
1023
+ ...t,
1024
+ ...n,
1025
+ ...r,
1026
+ placeholder: o,
1027
+ rows: i
1028
+ }
1029
+ );
1030
+ };
1031
+ p(Ve, {
1032
+ type: "TextArea",
1033
+ label: "TextArea",
1034
+ category: "core",
1035
+ icon: A,
1036
+ group: "form",
1037
+ hidden: !0,
1038
+ 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({
1045
+ title: "Placeholder",
1046
+ default: "Placeholder"
1047
+ }),
1048
+ _rows: w({ title: "Rows", default: 3 })
1049
+ }
1050
+ });
1051
+ const tt = q;
3
1052
  export {
4
- r as loadWebBlocks
1053
+ tt as loadWebBlocks
5
1054
  };