@chaibuilder/sdk 1.2.23 → 1.2.25

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 (186) hide show
  1. package/README.md +6 -5
  2. package/dist/AddBlocks-Ol3iIVKa.js +207 -0
  3. package/dist/AddBlocks-a1c-7Ewz.cjs +1 -0
  4. package/dist/BrandingOptions-6rnt0UaA.cjs +1 -0
  5. package/dist/{BrandingOptions-eUSoIgjj.js → BrandingOptions-iTyWpwTs.js} +40 -54
  6. package/dist/CanvasArea-R4ogF9AT.cjs +55 -0
  7. package/dist/{CanvasArea-ulUy_rmB.js → CanvasArea-dZjng782.js} +340 -324
  8. package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +163 -0
  9. package/dist/ChaiBuilderEditor-vP4at00I.js +27974 -0
  10. package/dist/{Class-lGzsNBOK.js → Class-ahc3NIbq.js} +26 -29
  11. package/dist/Class-eieto7e-.cjs +1 -0
  12. package/dist/Controls-3Cc1XYXg.js +105 -0
  13. package/dist/Controls-ky25Ebo3.cjs +1 -0
  14. package/dist/CurrentPage-3gQTH0Zt.cjs +1 -0
  15. package/dist/{CurrentPage-SFhXzQMy.js → CurrentPage-Kmfp-kFk.js} +41 -55
  16. package/dist/Functions-Hvon6AMZ.cjs +1 -0
  17. package/dist/Functions-NzT2Six_.js +15 -0
  18. package/dist/ImagesPanel-J1RlG7xG.cjs +1 -0
  19. package/dist/ImagesPanel-Wb0GF_NA.js +29 -0
  20. package/dist/ListTree-CZ-mtjZ9.cjs +1 -0
  21. package/dist/{ListTree-ZeVWczTF.js → ListTree-N3jeD790.js} +92 -102
  22. package/dist/{MODIFIERS-dytZ-osO.js → MODIFIERS-CNqNUapY.js} +10 -4
  23. package/dist/MODIFIERS-o1p3VnpS.cjs +1 -0
  24. package/dist/PagesPanel-Gi0z6gaf.cjs +1 -0
  25. package/dist/PagesPanel-u1IB-nRr.js +48 -0
  26. package/dist/ProjectPanel-EydGZmMW.js +71 -0
  27. package/dist/ProjectPanel-kiiljG4H.cjs +1 -0
  28. package/dist/{STRINGS--j49GZJP.js → STRINGS-b432aBJJ.js} +2 -2
  29. package/dist/Settings-8ilCSH8b.cjs +1 -0
  30. package/dist/{Settings-FZWm8Fc3.js → Settings-jCcd-VE6.js} +407 -401
  31. package/dist/SidePanels-T36C6Lhc.cjs +1 -0
  32. package/dist/{SidePanels-wrkkpcGE.js → SidePanels-pHMYprpW.js} +107 -117
  33. package/dist/Topbar-CvWQuspR.cjs +1 -0
  34. package/dist/Topbar-pbIDUE_B.js +122 -0
  35. package/dist/UnsplashImages-KBZPd9dv.cjs +1 -0
  36. package/dist/{UnsplashImages-eZedbK2J.js → UnsplashImages-L7x_3RQf.js} +50 -63
  37. package/dist/UploadImages-GkkJVAgG.cjs +1 -0
  38. package/dist/{UploadImages-71QziLbr.js → UploadImages-zdEJRLD8.js} +37 -60
  39. package/dist/accordion-oPUeqPCZ.js +42 -0
  40. package/dist/accordion-ynvFtV_p.cjs +1 -0
  41. package/dist/add-page-modal-9SGv2hgc.cjs +1 -0
  42. package/dist/add-page-modal-JCDXZIPW.js +95 -0
  43. package/dist/alert-dialog-P9xMMB6C.cjs +1 -0
  44. package/dist/alert-dialog-rypfO5ly.js +64 -0
  45. package/dist/badge-E-S7CqUt.cjs +1 -0
  46. package/dist/badge-tEwO7C51.js +23 -0
  47. package/dist/block-helpers-OKHmRRol.cjs +1 -0
  48. package/dist/block-helpers-oSFpSsGz.js +23 -0
  49. package/dist/command-BxR6jaCI.cjs +1 -0
  50. package/dist/command-Pn3HKDuV.js +97 -0
  51. package/dist/confirm-alert-uNm0lZ0y.cjs +1 -0
  52. package/dist/confirm-alert-wR5_VJ1l.js +36 -0
  53. package/dist/context-menu-8dC9uGXj.js +122 -0
  54. package/dist/context-menu-IgLbIuth.cjs +1 -0
  55. package/dist/{controls-OfJWSEqC.js → controls-IS5qnRce.js} +20 -85
  56. package/dist/controls-L7DPvB0m.cjs +1 -0
  57. package/dist/core.cjs +1 -1
  58. package/dist/core.d.ts +7 -4
  59. package/dist/core.js +150 -75
  60. package/dist/{defaultTheme-D8B4-wHO.js → defaultTheme-4kA60XdB.js} +6 -8
  61. package/dist/defaultTheme-mrkeGFGI.cjs +1 -0
  62. package/dist/delete-page-modal-7KmP1elv.js +67 -0
  63. package/dist/delete-page-modal-SgfwvfNu.cjs +1 -0
  64. package/dist/dropdown-menu-El86_9Uo.js +124 -0
  65. package/dist/dropdown-menu-SiHzqWwZ.cjs +1 -0
  66. package/dist/email-blocks.cjs +1 -1
  67. package/dist/email-blocks.js +3 -292
  68. package/dist/email.cjs +1 -1
  69. package/dist/email.d.ts +5 -2
  70. package/dist/email.js +18 -37
  71. package/dist/{form-zKUMQFuB.js → form-0_RLz2TB.js} +12 -12
  72. package/dist/form-W58AVUdf.cjs +1 -0
  73. package/dist/hover-card-KUwpDkW8.cjs +1 -0
  74. package/dist/hover-card-q138xxXR.js +45 -0
  75. package/dist/{html-to-json-ngX9ef2u.js → html-to-json-2xtb7520.js} +41 -41
  76. package/dist/{html-to-json-efmv1pCj.cjs → html-to-json-uSnxl72F.cjs} +1 -1
  77. package/dist/iconBase-gbUAAO2L.cjs +1 -0
  78. package/dist/iconBase-h4DuR_XT.js +63 -0
  79. package/dist/index-9MmykVSc.cjs +1 -0
  80. package/dist/index-hElOGcFr.js +2200 -0
  81. package/dist/index-lDTsQp7h.js +188 -0
  82. package/dist/index-rq5Y9ZDy.cjs +1 -0
  83. package/dist/jsx-runtime-JYMCiFoE.cjs +27 -0
  84. package/dist/{jsx-runtime-WbnYoNE9.js → jsx-runtime-Sp0orL4X.js} +106 -109
  85. package/dist/label-KaP7MRrs.js +10 -0
  86. package/dist/label-tFm8HZdb.cjs +1 -0
  87. package/dist/lib.cjs +2 -2
  88. package/dist/lib.js +62 -66
  89. package/dist/link-WbcKdQ9k.cjs +1 -0
  90. package/dist/link-xuhP-4dN.js +196 -0
  91. package/dist/page-viewer-Hx5hxHKm.cjs +1 -0
  92. package/dist/{page-viewer-7AwzWRtB.js → page-viewer-NnOwmAmu.js} +44 -58
  93. package/dist/popover-a84pbVhQ.js +23 -0
  94. package/dist/popover-fKjgcRUx.cjs +1 -0
  95. package/dist/{project-general-setting-pYPoqvqd.js → project-general-setting-9ju3TDju.js} +35 -43
  96. package/dist/project-general-setting-FxkwjvJz.cjs +1 -0
  97. package/dist/{project-seo-setting-zXKOcjep.js → project-seo-setting-36CdUszM.js} +23 -40
  98. package/dist/project-seo-setting-RU7qiXxb.cjs +1 -0
  99. package/dist/render.cjs +1 -1
  100. package/dist/render.js +13 -14
  101. package/dist/scroll-area-FiHvy-TZ.cjs +1 -0
  102. package/dist/scroll-area-ewXbxc3n.js +30 -0
  103. package/dist/select-7bjg-rr9.cjs +1 -0
  104. package/dist/select-POGdEDHT.js +75 -0
  105. package/dist/separator-3Civ-6hb.cjs +1 -0
  106. package/dist/separator-SctTn0Qi.js +18 -0
  107. package/dist/single-page-detail-beY0MT1b.cjs +1 -0
  108. package/dist/{single-page-detail-q2TDxN-P.js → single-page-detail-hD1jKZ8k.js} +65 -73
  109. package/dist/skeleton-STeL9VrJ.cjs +1 -0
  110. package/dist/skeleton-lu8e7q2y.js +239 -0
  111. package/dist/studio.cjs +1 -1
  112. package/dist/studio.d.ts +5 -2
  113. package/dist/studio.js +24 -40
  114. package/dist/tabs-_4WbA1cc.cjs +1 -0
  115. package/dist/tabs-yQ3oGziM.js +106 -0
  116. package/dist/textarea-1kZEh7ki.cjs +1 -0
  117. package/dist/textarea-b2QvVhrK.js +73 -0
  118. package/dist/ui.cjs +1 -1
  119. package/dist/ui.js +364 -159
  120. package/dist/useAddBlock-8pxOEYIl.cjs +1 -0
  121. package/dist/useAddBlock-FEKFJNwQ.js +69 -0
  122. package/dist/useChaiExternalData-fkFgoS80.js +6 -0
  123. package/dist/useChaiExternalData-rwoAZ6uU.cjs +1 -0
  124. package/dist/useDarkMode-7i57segK.cjs +1 -0
  125. package/dist/useDarkMode-8VHJlYyE.js +23 -0
  126. package/dist/useSelectedBreakpoints-6NK5qd7T.js +10 -0
  127. package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +1 -0
  128. package/dist/useStylingState-Iuj84yvc.js +186 -0
  129. package/dist/useStylingState-OIvJMV6p.cjs +1 -0
  130. package/dist/useUiLibraries-nCdauJ4N.cjs +1 -0
  131. package/dist/useUiLibraries-psyWFbNc.js +12 -0
  132. package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +1 -0
  133. package/dist/useUpdateBlocksProps-vWcDp-P9.js +23 -0
  134. package/dist/utils-dze1SGvB.js +6 -0
  135. package/dist/utils-qK_SjzzV.cjs +1 -0
  136. package/dist/web-blocks.cjs +1 -6
  137. package/dist/web-blocks.js +3 -1153
  138. package/package.json +1 -1
  139. package/dist/AddBlocks-b0Vk6eqO.js +0 -206
  140. package/dist/AddBlocks-bgu08YJC.cjs +0 -1
  141. package/dist/BrandingOptions-AljW1cXz.cjs +0 -1
  142. package/dist/CanvasArea-dp1tzDkK.cjs +0 -55
  143. package/dist/Class-PoYusiA5.cjs +0 -1
  144. package/dist/CurrentPage-rWHgPomd.cjs +0 -1
  145. package/dist/Functions-7jnEwJyw.js +0 -15
  146. package/dist/Functions-N3yhPYKY.cjs +0 -1
  147. package/dist/ListTree-5n8U4-IF.cjs +0 -1
  148. package/dist/MODIFIERS-0g14w5RS.cjs +0 -1
  149. package/dist/PagesPanel-IkZjy0Gn.js +0 -64
  150. package/dist/PagesPanel-sBN51kKZ.cjs +0 -1
  151. package/dist/ProjectPanel-e98TJLfI.js +0 -85
  152. package/dist/ProjectPanel-lbQH31jc.cjs +0 -1
  153. package/dist/Settings-qytQoyTv.cjs +0 -1
  154. package/dist/SidePanels-YRIM1IPq.cjs +0 -1
  155. package/dist/Topbar-LUyDFBkK.js +0 -129
  156. package/dist/Topbar-NOSnWo7V.cjs +0 -1
  157. package/dist/UnsplashImages-f-ObKOC-.cjs +0 -1
  158. package/dist/UploadImages-oOnccvT9.cjs +0 -1
  159. package/dist/_commonjsHelpers-UyOWmZb0.js +0 -8
  160. package/dist/_commonjsHelpers-wDK0ZLPo.cjs +0 -1
  161. package/dist/add-page-modal-g3fd00P5.cjs +0 -1
  162. package/dist/add-page-modal-yQ6qL6Ui.js +0 -104
  163. package/dist/confirm-alert-3flAvzWH.js +0 -60
  164. package/dist/confirm-alert-LQsGNYz8.cjs +0 -1
  165. package/dist/controls-KK2oLIa8.cjs +0 -1
  166. package/dist/defaultTheme-7VqqhOcp.cjs +0 -1
  167. package/dist/delete-page-modal-iMmkPec0.js +0 -83
  168. package/dist/delete-page-modal-tzZmqGzE.cjs +0 -1
  169. package/dist/empty-slot-ZBlsQi6m.js +0 -15
  170. package/dist/empty-slot-nzYOgZuS.cjs +0 -1
  171. package/dist/form-LBHtTduy.cjs +0 -1
  172. package/dist/index--dUsFH1I.cjs +0 -1
  173. package/dist/index-HD1UKc4P.js +0 -3079
  174. package/dist/index-YpnaudSM.js +0 -63
  175. package/dist/index-bOWwCMRF.cjs +0 -206
  176. package/dist/index-e0c8PmRQ.js +0 -205
  177. package/dist/index-ecnGWzh9.cjs +0 -1
  178. package/dist/index-fvMaxES9.cjs +0 -1
  179. package/dist/index-gi1LIOCw.cjs +0 -1
  180. package/dist/index-m4WGov7e.js +0 -2202
  181. package/dist/index-uLtBNl55.js +0 -39503
  182. package/dist/jsx-runtime-Z_BpKhVy.cjs +0 -27
  183. package/dist/page-viewer-5gTszT-n.cjs +0 -1
  184. package/dist/project-general-setting-52CTYL_w.cjs +0 -1
  185. package/dist/project-seo-setting-jTweI1DX.cjs +0 -1
  186. package/dist/single-page-detail-jy2SPcp1.cjs +0 -1
@@ -1,1155 +1,5 @@
1
- import { isNull as F, isEmpty as k, get as v, pick as z, omit as q, map as E, noop as O } from "lodash-es";
2
- import { j as s } from "./jsx-runtime-WbnYoNE9.js";
3
- import * as u from "react";
4
- import { S as i, s as w, o as P, g as I, m as _, u as h, T as C, c as T, q as V, b as U, r as b, h as Y } from "./controls-OfJWSEqC.js";
5
- import { registerChaiBlock as d } from "@chaibuilder/runtime";
6
- import { E as x } from "./empty-slot-ZBlsQi6m.js";
7
- import { HeadingIcon as G, TextIcon as W, CursorTextIcon as X, ButtonIcon as R, Link1Icon as Z, RowsIcon as K, ColumnsIcon as J, SketchLogoIcon as Q, ImageIcon as ee, VideoIcon as te, CodeIcon as le, DividerHorizontalIcon as oe, SpaceBetweenVerticallyIcon as D, TableIcon as re, BorderTopIcon as ae, BorderAllIcon as se, ViewHorizontalIcon as ne, DragHandleHorizontalIcon as ce, GroupIcon as ie, LetterCaseToggleIcon as de, CheckboxIcon as ue, InputIcon as $, RadiobuttonIcon as pe, DropdownMenuIcon as me } from "@radix-ui/react-icons";
8
- import { c as M, g } from "./Functions-7jnEwJyw.js";
9
- import { a as j } from "./STRINGS--j49GZJP.js";
10
- import "./_commonjsHelpers-UyOWmZb0.js";
11
- import "clsx";
12
- import "tailwind-merge";
13
- const he = u.memo(
14
- (e) => {
15
- const { blockProps: t, inBuilder: l, backgroundImage: o, children: r, tag: a = "div", styles: n } = e;
16
- let c = r;
17
- r || (c = /* @__PURE__ */ s.jsx(x, { blockProps: {}, styles: {}, inBuilder: l }));
18
- let p = {};
19
- return o && (p = { backgroundImage: `url(${o})` }), u.createElement(a, { ...t, ...n, style: p }, c);
20
- }
21
- );
22
- d(he, {
23
- type: "Box",
24
- label: "Box",
25
- category: "core",
26
- group: "basic",
27
- props: {
28
- styles: i({ default: "" }),
29
- tag: w({
30
- title: "Tag",
31
- default: "div",
32
- options: [
33
- { value: "div", title: "div" },
34
- { value: "header", title: "header" },
35
- { value: "footer", title: "footer" },
36
- { value: "section", title: "section" },
37
- { value: "article", title: "article" },
38
- { value: "aside", title: "aside" },
39
- { value: "main", title: "main" },
40
- { value: "nav", title: "nav" },
41
- { value: "figure", title: "figure" },
42
- { value: "details", title: "details" },
43
- { value: "summary", title: "summary" },
44
- { value: "dialog", title: "dialog" },
45
- { value: "strike", title: "strike" },
46
- { value: "caption", title: "caption" },
47
- { value: "legend", title: "legend" },
48
- { value: "figcaption", title: "figcaption" },
49
- { value: "mark", title: "mark" }
50
- ]
51
- }),
52
- backgroundImage: P({ title: "Background Image" })
53
- },
54
- canAcceptBlock: () => !0
55
- });
56
- const ye = (e) => {
57
- const { blockProps: t, styles: l, content: o, level: r = "h1", children: a = null } = e;
58
- return a ? u.createElement(r, { ...l, ...t }, a) : u.createElement(r, {
59
- ...l,
60
- ...t,
61
- dangerouslySetInnerHTML: { __html: o }
62
- });
63
- };
64
- d(ye, {
65
- type: "Heading",
66
- label: "Heading",
67
- category: "core",
68
- icon: G,
69
- group: "typography",
70
- props: {
71
- level: w({
72
- title: "Level",
73
- default: "h1",
74
- binding: !1,
75
- options: [
76
- { value: "h1", title: "h1" },
77
- { value: "h2", title: "h2" },
78
- { value: "h3", title: "h3" },
79
- { value: "h4", title: "h4" },
80
- { value: "h5", title: "h5" },
81
- { value: "h6", title: "h6" }
82
- ]
83
- }),
84
- styles: i({ default: "text-3xl" }),
85
- content: I({ title: "Content", default: "Heading goes here" })
86
- },
87
- canAcceptBlock: (e) => e === "Span" || e === "Text"
88
- });
89
- const fe = (e) => {
90
- const { blockProps: t, styles: l, content: o } = e;
91
- return F(e.children) ? u.createElement("div", {
92
- ...l,
93
- ...t,
94
- dangerouslySetInnerHTML: { __html: o }
95
- }) : u.createElement("p", { ...l, ...t }, e.children);
96
- };
97
- d(fe, {
98
- type: "Paragraph",
99
- label: "Paragraph",
100
- category: "core",
101
- icon: W,
102
- group: "typography",
103
- props: {
104
- styles: i({ default: "" }),
105
- content: I({
106
- title: "Content",
107
- 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
- })
109
- },
110
- canAcceptBlock: (e) => e === "Span" || e === "Link"
111
- });
112
- const be = (e) => {
113
- const { blockProps: t, styles: l, content: o, children: r = null, tag: a } = e;
114
- return r ? u.createElement("span", { ...l, ...t }, r) : u.createElement(a || "span", {
115
- ...l,
116
- ...t,
117
- dangerouslySetInnerHTML: { __html: o }
118
- });
119
- };
120
- d(be, {
121
- type: "Span",
122
- label: "Span",
123
- category: "core",
124
- group: "typography",
125
- props: {
126
- styles: i({ default: "" }),
127
- content: I({ title: "Content", default: "Enter your content" })
128
- },
129
- canAcceptBlock: () => !0
130
- });
131
- const ge = (e) => {
132
- const { blockProps: t, content: l, styles: o } = e;
133
- return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx("div", { ...t, ...o, dangerouslySetInnerHTML: { __html: l } }) });
134
- };
135
- d(ge, {
136
- type: "RichText",
137
- label: "Rich Text",
138
- category: "core",
139
- icon: X,
140
- group: "typography",
141
- props: {
142
- styles: i({ default: "" }),
143
- content: _({
144
- title: "Content",
145
- default: "<p>This is a rich text block. You can add text, and other content here.</p>"
146
- })
147
- }
148
- });
149
- const xe = (e) => {
150
- const { blockProps: t, iconSize: l, icon: o, content: r, iconPos: a, styles: n, children: c } = e, p = o, m = c || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
151
- /* @__PURE__ */ s.jsx("span", { children: r }),
152
- p && /* @__PURE__ */ s.jsx(
153
- "div",
154
- {
155
- style: { width: l + "px" },
156
- className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
157
- dangerouslySetInnerHTML: { __html: p }
158
- }
159
- )
160
- ] });
161
- return u.createElement("button", { ...t, ...n, type: "button" }, m);
162
- };
163
- d(xe, {
164
- type: "Button",
165
- label: "Button",
166
- category: "core",
167
- icon: R,
168
- group: "basic",
169
- props: {
170
- content: h({ title: "Label", default: "Button", multiLingual: !0 }),
171
- styles: i({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
172
- icon: C({ title: "Icon", default: "" }),
173
- iconSize: T({ title: "Icon Size", default: 24 }),
174
- iconPos: w({
175
- title: "Icon Position",
176
- default: "order-last",
177
- options: [
178
- { title: "Start", value: "order-first" },
179
- { title: "End", value: "order-last" }
180
- ]
181
- })
182
- }
183
- });
184
- const ke = (e) => {
185
- const { blockProps: t, link: l, children: o, styles: r, inBuilder: a, content: n } = e;
186
- return !o && k(r == null ? void 0 : r.className) && k(n) ? /* @__PURE__ */ s.jsx(x, { blockProps: t, inBuilder: a }) : a ? o ? /* @__PURE__ */ s.jsx("span", { "data-simulate": "a", ...t, ...r, children: o }) : u.createElement("span", {
187
- ...t,
188
- ...r,
189
- dangerouslySetInnerHTML: { __html: n },
190
- "data-simulate": "a"
191
- }) : o ? /* @__PURE__ */ s.jsx("a", { href: l.href || "#/", target: l.target, ...t, ...r, children: o }) : u.createElement("a", {
192
- ...t,
193
- ...r,
194
- href: l.href || "#",
195
- target: l.target || "_self",
196
- dangerouslySetInnerHTML: { __html: n }
197
- });
198
- };
199
- d(ke, {
200
- type: "Link",
201
- label: "Link",
202
- category: "core",
203
- icon: Z,
204
- group: "basic",
205
- props: {
206
- styles: i({ default: "" }),
207
- content: h({ title: "Content", default: "" }),
208
- link: V({
209
- title: "Link",
210
- default: { type: "page", target: "_self", href: "" }
211
- })
212
- },
213
- canAcceptBlock: () => !0
214
- });
215
- const ve = (e) => {
216
- const { blockProps: t, children: l, listType: o, styles: r, tag: a, inBuilder: n } = e, c = M(v(r, "className", ""), o);
217
- return !l && k(r == null ? void 0 : r.className) ? /* @__PURE__ */ s.jsx(x, { inBuilder: n, blockProps: t, text: "LIST ITEM" }) : u.createElement(
218
- a || (o === "list-decimal" ? "ol" : "ul"),
219
- { ...t, ...r, className: c },
220
- l
221
- );
222
- };
223
- d(ve, {
224
- type: "List",
225
- label: "List",
226
- icon: K,
227
- category: "core",
228
- group: "basic",
229
- props: {
230
- styles: i({ default: "" }),
231
- listType: w({
232
- title: "List type",
233
- default: "list-disc",
234
- options: [
235
- { value: "list-none", title: "None" },
236
- { value: "list-disc", title: "Disc" },
237
- { value: "list-decimal", title: "Number" }
238
- ]
239
- })
240
- },
241
- canAcceptBlock: (e) => e === "ListItem",
242
- blocks: [
243
- { _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
244
- {
245
- _type: "ListItem",
246
- _id: "b",
247
- _parent: "a",
248
- styles: "#styles:,",
249
- content: "Item 1"
250
- },
251
- {
252
- _type: "ListItem",
253
- _id: "c",
254
- _parent: "a",
255
- styles: "#styles:,",
256
- content: "Item 2"
257
- },
258
- {
259
- _type: "ListItem",
260
- _id: "d",
261
- _parent: "a",
262
- styles: "#styles:,",
263
- content: "Item 3"
264
- }
265
- ]
266
- });
267
- const we = (e) => {
268
- const { blockProps: t, content: l, styles: o, children: r, tag: a } = e;
269
- return r ? u.createElement(a || "li", { ...o, ...t }, r) : u.createElement(a || "li", {
270
- ...o,
271
- ...t,
272
- dangerouslySetInnerHTML: { __html: l }
273
- });
274
- };
275
- d(we, {
276
- type: "ListItem",
277
- label: "List Item",
278
- icon: J,
279
- category: "core",
280
- group: "basic",
281
- props: {
282
- styles: i({ default: "" }),
283
- content: I({ title: "Content", default: "List item" })
284
- },
285
- canAcceptBlock: () => !0,
286
- canBeNested: (e) => e === "List"
287
- });
288
- const L = (e, t) => ({
289
- ...e,
290
- className: `${e.className} ${t}`
291
- }), Ie = (e) => {
292
- const { blockProps: t, icon: l, styles: o, width: r, inBuilder: a, height: n } = e, c = L(
293
- o,
294
- M("inline-block", r ? `w-[${r}px]` : "", n ? `h-[${n}px]` : "")
295
- );
296
- if (k(l))
297
- return /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "", inBuilder: a, className: "h-8 w-14" });
298
- const p = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
299
- return u.createElement("span", {
300
- ...t,
301
- ...c,
302
- dangerouslySetInnerHTML: { __html: p }
303
- });
304
- };
305
- d(Ie, {
306
- type: "Icon",
307
- label: "Icon",
308
- category: "core",
309
- icon: Q,
310
- group: "media",
311
- props: {
312
- styles: i({ default: "text-black" }),
313
- icon: C({
314
- title: "Icon",
315
- 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>'
316
- }),
317
- width: T({ title: "Width", default: "" }),
318
- height: T({ title: "Height", default: "" })
319
- }
320
- });
321
- const Be = (e) => {
322
- const { blockProps: t, image: l, styles: o, alt: r, height: a, width: n } = e;
323
- return k(l) ? /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "IMAGE URL", className: "h-36" }) : u.createElement("img", {
324
- ...t,
325
- ...o,
326
- src: l,
327
- alt: r,
328
- height: a,
329
- width: n
330
- });
331
- };
332
- d(Be, {
333
- type: "Image",
334
- label: "Image",
335
- category: "core",
336
- icon: ee,
337
- group: "media",
338
- props: {
339
- styles: i({ default: "" }),
340
- image: P({
341
- title: "Image",
342
- default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
343
- }),
344
- alt: h({ title: "Alt", default: "" }),
345
- width: h({ title: "Width", default: "" }),
346
- height: h({ title: "Height", default: "" })
347
- }
348
- });
349
- const _e = (e) => {
350
- var n;
351
- const { blockProps: t, inBuilder: l, styles: o, children: r } = e;
352
- let a = null;
353
- return !r && l && (a = // @ts-ignore
354
- /* @__PURE__ */ s.jsx("div", { className: M("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: [
355
- "Slot: ",
356
- e.name
357
- ] }) }) })), u.createElement("div", { ...o, ...t, droppable: "yes" }, r || a);
358
- };
359
- d(_e, {
360
- type: "Slot",
361
- label: "Slot",
362
- group: "basic",
363
- category: "core",
364
- hidden: !0,
365
- props: {
366
- styles: i({ default: "" }),
367
- emptyStyles: i({ default: "" })
368
- },
369
- canAcceptBlock: () => !0
370
- });
371
- const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, A = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, H = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Te = (e) => {
372
- if (N.test(e)) {
373
- const t = e.match(N);
374
- return t ? `https://www.youtube.com/embed/${t[4]}` : e;
375
- }
376
- if (A.test(e)) {
377
- const t = e.match(A);
378
- return t ? `https://player.vimeo.com/video/${t[3]}` : e;
379
- }
380
- if (H.test(e)) {
381
- const t = e.match(H);
382
- return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
383
- }
384
- return null;
385
- }, Le = u.memo(
386
- (e) => {
387
- const { blockProps: t, inBuilder: l, styles: o, url: r, controls: a } = e, n = v(a, "autoPlay", !1), c = v(a, "controls", !1), p = n || v(a, "muted", !0), m = v(a, "loop", !1);
388
- if (k(r))
389
- return /* @__PURE__ */ s.jsx(x, { inBuilder: l, blockProps: t, text: "VIDEO URL", className: "h-36" });
390
- let f = Te(r), y = null;
391
- if (f) {
392
- if (!k(f)) {
393
- const B = [];
394
- B.push(`autoplay=${n ? 1 : 0}`), B.push(`controls=${a ? 1 : 0}`), B.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), B.push(`loop=${m ? 1 : 0}`), f = `${f}?${B.join("&")}`;
395
- }
396
- y = u.createElement("iframe", {
397
- ...t,
398
- className: "absolute inset-0 w-full h-full",
399
- src: f,
400
- allow: l ? "" : "autoplay *; fullscreen *",
401
- allowFullScreen: !0,
402
- frameBorder: 0
403
- });
404
- } else
405
- y = u.createElement("video", {
406
- ...t,
407
- className: "absolute inset-0 w-full h-full",
408
- src: r,
409
- controls: c,
410
- muted: p,
411
- autoPlay: l ? !1 : n,
412
- loop: m
413
- });
414
- return /* @__PURE__ */ s.jsx("div", { ...z(o, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
415
- l ? /* @__PURE__ */ s.jsx("div", { ...t, ...q(o, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
416
- y
417
- ] }) });
418
- }
419
- );
420
- d(Le, {
421
- type: "Video",
422
- label: "Video",
423
- category: "core",
424
- icon: te,
425
- group: "media",
426
- props: {
427
- styles: i({ default: "" }),
428
- url: h({
429
- title: "Video URL",
430
- default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
431
- }),
432
- controls: U({
433
- title: "Controls",
434
- properties: {
435
- autoPlay: b({ title: "Autoplay", default: !0 }),
436
- controls: b({ title: "Show controls", default: !1 }),
437
- loop: b({ title: "Loop", default: !1 }),
438
- muted: b({ title: "Muted", default: !0 })
439
- }
440
- })
441
- }
442
- });
443
- const Se = u.memo(
444
- (e) => {
445
- const { blockProps: t, styles: l, content: o, inBuilder: r } = e;
446
- return /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
447
- r ? /* @__PURE__ */ s.jsx("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
448
- u.createElement("div", {
449
- ...l,
450
- dangerouslySetInnerHTML: { __html: o }
451
- })
452
- ] });
453
- }
454
- );
455
- d(Se, {
456
- type: "CustomHTML",
457
- label: "Custom HTML",
458
- category: "core",
459
- icon: le,
460
- group: "advanced",
461
- props: {
462
- styles: i({ default: "" }),
463
- content: I({
464
- title: "HTML Content",
465
- default: "<div><p>HTML Snippet goes here...</p></div>",
466
- placeholder: "Enter custom HTML code here"
467
- })
468
- }
469
- });
470
- const je = (e) => {
471
- const { blockProps: t, styles: l } = e;
472
- return u.createElement("hr", { ...l, ...t });
473
- };
474
- d(je, {
475
- type: "Divider",
476
- label: "Divider",
477
- category: "core",
478
- icon: oe,
479
- group: "basic",
480
- props: {
481
- styles: i({ default: "bg-gray-900 h-0.5 py-2 my-1" })
482
- }
483
- });
484
- const Ee = (e) => e.inBuilder ? /* @__PURE__ */ s.jsx("span", { className: "flex", ...e.blockProps, children: e.content }) : `${e.content}`;
485
- d(Ee, {
486
- type: "Text",
487
- label: "Text",
488
- hidden: !0,
489
- category: "core",
490
- group: "typography",
491
- icon: D,
492
- props: {
493
- content: I({ title: "Content", defaultValue: "" })
494
- }
495
- });
496
- const Pe = ({ children: e, blockProps: t, styles: l }) => {
497
- const o = L(l, "hs-accordion");
498
- return /* @__PURE__ */ s.jsx("div", { ...t, ...o, children: e });
499
- };
500
- d(Pe, {
501
- type: "Accordion",
502
- label: "Accordion",
503
- category: "core",
504
- group: "advanced",
505
- hidden: !0,
506
- props: {
507
- styles: i({ default: "" })
508
- },
509
- // @ts-ignore
510
- blocks: () => {
511
- const e = "accordion" + g();
512
- return [
513
- { _id: "a", _type: "Accordion", _name: "Accordion" },
514
- {
515
- _id: "b",
516
- _type: "AccordionTrigger",
517
- _parent: "a",
518
- _name: "Accordion Trigger",
519
- styles_attrs: { "aria-controls": e }
520
- },
521
- {
522
- _id: "b1",
523
- _type: "Icon",
524
- _parent: "b",
525
- styles: `${j},hs-accordion-active:hidden hs-accordion-active:text-blue-600 hs-accordion-active:group-hover:text-blue-600 block size-4 text-gray-600 group-hover:text-gray-500 dark:text-neutral-400`,
526
- icon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
527
- <path d="M5 12h14"></path>
528
- <path d="M12 5v14"></path>
529
- </svg>`
530
- },
531
- {
532
- _id: "b2",
533
- _type: "Icon",
534
- _parent: "b",
535
- styles: `${j},hs-accordion-active:block hs-accordion-active:text-blue-600 hs-accordion-active:group-hover:text-blue-600 hidden size-4 text-gray-600 group-hover:text-gray-500 dark:text-neutral-400`,
536
- icon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
537
- <path d="M5 12h14"></path>
538
- </svg>`
539
- },
540
- { _id: "b1", _type: "Text", _parent: "b", content: "Accordion Title" },
541
- {
542
- _id: "c",
543
- _type: "AccordionContent",
544
- _parent: "a",
545
- _name: "Accordion Content",
546
- styles: `${j},w-full overflow-hidden transition-[height] duration-300 px-6 py-3`,
547
- styles_attrs: { "aria-labelledby": e }
548
- },
549
- {
550
- _id: "c1",
551
- _type: "Text",
552
- _parent: "c",
553
- content: "It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element."
554
- }
555
- ];
556
- }
557
- });
558
- const Ce = ({ children: e, blockProps: t, styles: l }) => {
559
- const o = L(l, "hs-accordion-toggle");
560
- return /* @__PURE__ */ s.jsx("button", { ...o, ...t, children: e });
561
- };
562
- d(Ce, {
563
- type: "AccordionTrigger",
564
- label: "Accordion Trigger",
565
- category: "core",
566
- group: "advanced",
567
- hidden: !0,
568
- props: {
569
- styles: i({
570
- 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"
571
- })
572
- },
573
- canAcceptBlock: () => !0,
574
- canDelete: () => !1,
575
- canMove: () => !1,
576
- canDuplicate: () => !1
577
- });
578
- const Me = ({ children: e, blockProps: t, styles: l }) => {
579
- const o = L(l, "hs-accordion-content");
580
- return /* @__PURE__ */ s.jsx("div", { ...o, ...t, children: e });
581
- };
582
- d(Me, {
583
- type: "AccordionContent",
584
- label: "Accordion Content",
585
- category: "core",
586
- group: "advanced",
587
- hidden: !0,
588
- props: {
589
- styles: i({ default: "w-full overflow-hidden transition-[height] duration-300" })
590
- },
591
- canAcceptBlock: () => !0,
592
- canDelete: () => !1,
593
- canMove: () => !1,
594
- canDuplicate: () => !1
595
- });
596
- const Ne = (e) => {
597
- const { blockProps: t, backgroundImage: l, children: o, styles: r } = e;
598
- let a = {};
599
- return l && (a = { backgroundImage: `url(${l})` }), u.createElement("div", { ...t, ...r, style: a }, o);
600
- };
601
- d(Ne, {
602
- type: "Body",
603
- label: "Body",
604
- category: "core",
605
- group: "basic",
606
- hidden: !0,
607
- props: {
608
- styles: i({ default: "font-body antialiased" }),
609
- backgroundImage: P({ title: "Background Image" })
610
- },
611
- canAcceptBlock: () => !0,
612
- canDelete: () => !1,
613
- canMove: () => !1,
614
- canDuplicate: () => !1
615
- });
616
- const Ae = (e) => {
617
- const { blockProps: t, styles: l } = e;
618
- return u.createElement("br", { ...t, ...l });
619
- };
620
- d(Ae, {
621
- type: "LineBreak",
622
- label: "Line Break",
623
- category: "core",
624
- group: "basic",
625
- hidden: !0,
626
- icon: D,
627
- props: {
628
- styles: i({ default: "" })
629
- }
630
- });
631
- const S = (e) => {
632
- const t = (a, n) => ({
633
- _id: g(),
634
- _parent: a,
635
- _type: "TableCell",
636
- styles: "#styles:,",
637
- content: `${e === "TableHead" ? "Table Head" : "Table Cell " + n}`
638
- }), l = (a) => {
639
- const n = g(), c = {
640
- _type: "TableRow",
641
- _id: n,
642
- styles: "#styles:,border-b"
643
- };
644
- return a && (c._parent = a), [c, t(n, "1"), t(n, "2"), t(n, "3")];
645
- }, o = (a) => {
646
- const n = g(), c = {
647
- _id: n,
648
- _type: "TableHead",
649
- styles: "#styles:,font-medium"
650
- };
651
- return a && (c._parent = a), [c, ...l(n)];
652
- }, r = (a) => {
653
- const n = g(), c = {
654
- _id: n,
655
- _type: "TableBody",
656
- styles: "#styles:,"
657
- };
658
- return a && (c._parent = a), [c, ...l(n), ...l(n)];
659
- };
660
- if (e === "Table") {
661
- const a = g();
662
- return [
663
- {
664
- _id: a,
665
- _type: "Table",
666
- styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
667
- },
668
- ...o(a),
669
- ...r(a)
670
- ];
671
- }
672
- return e === "TableRow" ? l() : e === "TableHead" ? o() : e === "TableBody" ? r() : [];
673
- }, He = (e) => {
674
- const { blockProps: t, children: l, styles: o } = e;
675
- return l ? u.createElement("table", { ...t, ...o }, l) : /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "TABLE HEAD / BODY" });
676
- };
677
- d(He, {
678
- type: "Table",
679
- label: "Table",
680
- category: "core",
681
- group: "table",
682
- hidden: !0,
683
- icon: re,
684
- props: {
685
- styles: i({ default: "" })
686
- },
687
- blocks: S("Table")
688
- });
689
- const Re = (e) => {
690
- const { blockProps: t, children: l, styles: o } = e;
691
- return l ? u.createElement("thead", { ...t, ...o }, l) : /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "TABLE ROW" });
692
- };
693
- d(Re, {
694
- type: "TableHead",
695
- label: "Table Head",
696
- category: "core",
697
- group: "table",
698
- hidden: !0,
699
- icon: ae,
700
- props: {
701
- styles: i({ default: "" })
702
- },
703
- blocks: S("TableHead")
704
- });
705
- const De = (e) => {
706
- const { blockProps: t, children: l, styles: o } = e;
707
- return l ? u.createElement("tbody", { ...t, ...o }, l) : /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "TABLE ROW" });
708
- };
709
- d(De, {
710
- type: "TableBody",
711
- label: "Table Body",
712
- category: "core",
713
- group: "table",
714
- hidden: !0,
715
- icon: se,
716
- props: {
717
- styles: i({ default: "" })
718
- },
719
- blocks: S("TableBody")
720
- });
721
- const $e = (e) => {
722
- const { blockProps: t, children: l, styles: o } = e;
723
- return l ? u.createElement("tr", { ...t, ...o }, l) : /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "TABLE CELL" });
724
- };
725
- d($e, {
726
- type: "TableRow",
727
- label: "Table Row",
728
- category: "core",
729
- group: "table",
730
- hidden: !0,
731
- icon: ne,
732
- props: {
733
- styles: i({ default: "w-full" })
734
- },
735
- blocks: S("TableRow")
736
- });
737
- const Fe = (e) => {
738
- const { blockProps: t, children: l, content: o, styles: r } = e;
739
- return !l && k(o) ? /* @__PURE__ */ s.jsx(x, { blockProps: t }) : l ? u.createElement("td", { ...t, ...r }, l) : u.createElement("td", {
740
- ...t,
741
- ...r,
742
- dangerouslySetInnerHTML: { __html: o }
743
- });
744
- };
745
- d(Fe, {
746
- type: "TableCell",
747
- label: "Table Cell",
748
- category: "core",
749
- group: "table",
750
- hidden: !0,
751
- icon: ce,
752
- props: {
753
- styles: i({ default: "" }),
754
- content: _({ title: "Content", default: "Table cell item" })
755
- }
756
- });
757
- const ze = (e) => {
758
- const { blockProps: t, errorMessage: l, name: o, _type: r, successMessage: a, action: n, styles: c, children: p } = e;
759
- let m = p;
760
- p || (m = /* @__PURE__ */ s.jsx(x, { blockProps: {}, text: "FORM FIELDS" }));
761
- const f = {
762
- "x-data": "useForm",
763
- "x-on:submit.prevent": "post"
764
- }, y = {
765
- "x-html": "formResponse",
766
- ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
767
- };
768
- return /* @__PURE__ */ s.jsxs(
769
- "form",
770
- {
771
- ...f,
772
- "data-error": l,
773
- "data-success": a,
774
- method: "post",
775
- action: n,
776
- ...t,
777
- ...c,
778
- children: [
779
- /* @__PURE__ */ s.jsx("div", { ...y }),
780
- /* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: o || r }),
781
- m
782
- ]
783
- }
784
- );
785
- };
786
- d(ze, {
787
- type: "Form",
788
- label: "Form",
789
- category: "core",
790
- icon: ie,
791
- group: "form",
792
- hidden: !0,
793
- props: {
794
- styles: i({ default: "" }),
795
- action: h({
796
- title: "Submit URL",
797
- default: "/api/form/submit"
798
- }),
799
- errorMessage: _({
800
- title: "Error Message",
801
- default: "Something went wrong. Please try again"
802
- }),
803
- successMessage: _({
804
- title: "Success Message",
805
- default: "Thank you for your submission."
806
- })
807
- },
808
- canAcceptBlock: () => !0
809
- });
810
- const qe = (e) => {
811
- const { blockProps: t, content: l, styles: o, children: r } = e, a = { ...o, ...t };
812
- return r ? u.createElement("label", a, r) : u.createElement("label", {
813
- ...a,
814
- dangerouslySetInnerHTML: { __html: l }
815
- });
816
- };
817
- d(qe, {
818
- type: "Label",
819
- label: "Label",
820
- category: "core",
821
- icon: de,
822
- group: "form",
823
- hidden: !0,
824
- props: {
825
- styles: i({ default: "" }),
826
- content: h({ title: "Content", default: "Label" })
827
- }
828
- });
829
- const Oe = (e) => {
830
- const { blockProps: t, inBuilder: l, label: o, placeholder: r, styles: a, inputStyles: n, icon: c, iconPos: p } = e, m = g(), f = {
831
- "x-bind:disabled": "formLoading"
832
- };
833
- return /* @__PURE__ */ s.jsxs(
834
- "button",
835
- {
836
- id: m,
837
- ...f,
838
- ...n,
839
- ...a,
840
- ...t || {},
841
- type: l ? "button" : "submit",
842
- placeholder: r,
843
- children: [
844
- o,
845
- c && /* @__PURE__ */ s.jsx("span", { className: p, dangerouslySetInnerHTML: { __html: c } })
846
- ]
847
- }
848
- );
849
- };
850
- d(Oe, {
851
- type: "FormButton",
852
- label: "Submit Button",
853
- category: "core",
854
- icon: R,
855
- group: "form",
856
- hidden: !0,
857
- props: {
858
- label: h({ title: "Label", default: "Submit" }),
859
- styles: i({
860
- default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
861
- }),
862
- icon: C({ title: "Icon", default: "" }),
863
- iconPos: w({
864
- title: "Icon Position",
865
- default: "order-last",
866
- options: [
867
- { title: "Start", value: "order-first" },
868
- { title: "End", value: "order-last" }
869
- ]
870
- })
871
- }
872
- });
873
- const Ve = (e) => {
874
- const { blockProps: t, fieldName: l, label: o, styles: r, inputStyles: a, required: n, checked: c, showLabel: p = !0 } = e, m = g();
875
- return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...t, children: [
876
- /* @__PURE__ */ s.jsx(
877
- "input",
878
- {
879
- ...a,
880
- name: l,
881
- id: m,
882
- type: "checkbox",
883
- required: n,
884
- defaultChecked: c
885
- }
886
- ),
887
- o && o !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: o })
888
- ] }) : /* @__PURE__ */ s.jsx(
889
- "input",
890
- {
891
- id: m,
892
- ...t,
893
- ...a,
894
- ...r,
895
- type: "checkbox",
896
- required: n,
897
- name: l
898
- }
899
- );
900
- };
901
- d(Ve, {
902
- type: "Checkbox",
903
- label: "Checkbox",
904
- category: "core",
905
- icon: ue,
906
- group: "form",
907
- hidden: !0,
908
- props: {
909
- fieldName: h({ title: "Field Name", default: "checkbox" }),
910
- styles: i({ default: "flex items-center gap-x-2" }),
911
- label: h({ title: "Label", default: "Label" }),
912
- checked: b({ title: "Checked", default: !1 }),
913
- required: b({ title: "Required", default: !1 })
914
- }
915
- });
916
- const Ue = (e) => {
917
- const {
918
- blockProps: t,
919
- label: l,
920
- placeholder: o,
921
- styles: r,
922
- inputStyles: a,
923
- showLabel: n,
924
- required: c,
925
- inputType: p = "text",
926
- inBuilder: m,
927
- fieldName: f
928
- } = e, y = g();
929
- return !n || p === "submit" ? (p === "submit" && (t.value = l), /* @__PURE__ */ s.jsx(
930
- "input",
931
- {
932
- id: y,
933
- name: f,
934
- readOnly: m,
935
- ...t,
936
- ...a,
937
- ...r,
938
- type: p,
939
- placeholder: o,
940
- required: c
941
- }
942
- )) : /* @__PURE__ */ s.jsxs("div", { ...r, ...t, children: [
943
- n && /* @__PURE__ */ s.jsx("label", { htmlFor: y, children: l }),
944
- /* @__PURE__ */ s.jsx(
945
- "input",
946
- {
947
- name: f,
948
- readOnly: m,
949
- ...a,
950
- id: y,
951
- type: p,
952
- placeholder: o,
953
- required: c
954
- }
955
- )
956
- ] });
957
- };
958
- d(Ue, {
959
- type: "Input",
960
- label: "Input",
961
- category: "core",
962
- icon: $,
963
- group: "form",
964
- hidden: !0,
965
- props: {
966
- styles: i({ default: "" }),
967
- fieldName: h({ title: "Field Name", default: "input" }),
968
- inputType: w({
969
- title: "Type",
970
- options: E(
971
- ["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
972
- (e) => ({
973
- value: e,
974
- title: e
975
- })
976
- ),
977
- default: "text"
978
- }),
979
- value: h({ title: "Value", default: "" }),
980
- showLabel: b({ title: "Show label", default: !0 }),
981
- inputStyles: i({ default: "w-full p-1" }),
982
- label: h({ title: "Label", default: "Label" }),
983
- placeholder: h({
984
- title: "Placeholder",
985
- default: "Placeholder"
986
- }),
987
- required: b({ title: "Required", default: !1 })
988
- }
989
- });
990
- const Ye = (e) => {
991
- const { blockProps: t, fieldName: l, label: o, styles: r, inputStyles: a, checked: n, required: c, showLabel: p = !0 } = e, m = g();
992
- return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...t, children: [
993
- /* @__PURE__ */ s.jsx("input", { ...a, name: l, id: m, type: "radio", required: c, defaultChecked: n }),
994
- o && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: o })
995
- ] }) : /* @__PURE__ */ s.jsx(
996
- "input",
997
- {
998
- id: m,
999
- ...t,
1000
- ...a,
1001
- ...r,
1002
- type: "radio",
1003
- required: c,
1004
- checked: n,
1005
- name: l
1006
- }
1007
- );
1008
- };
1009
- d(Ye, {
1010
- type: "Radio",
1011
- label: "Radio",
1012
- category: "core",
1013
- icon: pe,
1014
- group: "form",
1015
- hidden: !0,
1016
- props: {
1017
- styles: i({ default: "flex items-center w-max gap-x-2" }),
1018
- fieldName: h({ title: "Field Name", default: "radio" }),
1019
- label: h({ title: "Label", default: "Label" }),
1020
- checked: b({ title: "Checked", default: !1 }),
1021
- required: b({ title: "Required", default: !1 })
1022
- }
1023
- });
1024
- const Ge = (e) => {
1025
- const {
1026
- blockProps: t,
1027
- fieldName: l,
1028
- label: o,
1029
- placeholder: r,
1030
- styles: a,
1031
- inputStyles: n,
1032
- required: c,
1033
- showLabel: p,
1034
- _multiple: m = !1
1035
- } = e, f = g();
1036
- return p ? /* @__PURE__ */ s.jsxs("div", { ...a, children: [
1037
- p && /* @__PURE__ */ s.jsx("label", { htmlFor: f, children: o }),
1038
- /* @__PURE__ */ s.jsxs(
1039
- "select",
1040
- {
1041
- ...n,
1042
- id: f,
1043
- placeholder: r,
1044
- required: c,
1045
- multiple: m,
1046
- name: l,
1047
- children: [
1048
- /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
1049
- E(e.options, (y) => /* @__PURE__ */ s.jsx(
1050
- "option",
1051
- {
1052
- selected: v(y, "selected", !1),
1053
- value: y.value,
1054
- dangerouslySetInnerHTML: { __html: y.label }
1055
- },
1056
- y.value
1057
- ))
1058
- ]
1059
- }
1060
- )
1061
- ] }) : /* @__PURE__ */ s.jsxs(
1062
- "select",
1063
- {
1064
- id: f,
1065
- ...a,
1066
- ...t,
1067
- placeholder: r,
1068
- required: c,
1069
- multiple: m,
1070
- name: l,
1071
- children: [
1072
- /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
1073
- E(e.options, (y) => /* @__PURE__ */ s.jsx(
1074
- "option",
1075
- {
1076
- selected: v(y, "selected", !1),
1077
- value: y.value,
1078
- dangerouslySetInnerHTML: { __html: y.label }
1079
- },
1080
- y.value
1081
- ))
1082
- ]
1083
- }
1084
- );
1085
- };
1086
- d(Ge, {
1087
- type: "Select",
1088
- label: "Select",
1089
- category: "core",
1090
- icon: me,
1091
- group: "form",
1092
- hidden: !0,
1093
- props: {
1094
- styles: i({ default: "" }),
1095
- fieldName: h({ title: "Field Name", default: "select" }),
1096
- showLabel: b({ title: "Show label", default: !0 }),
1097
- inputStyles: i({ default: "w-full p-1" }),
1098
- label: h({ title: "Label", default: "Label" }),
1099
- placeholder: h({
1100
- title: "Placeholder",
1101
- default: "Placeholder"
1102
- }),
1103
- required: b({ title: "Required", default: !1 }),
1104
- _multiple: b({ title: "Multiple Choice", default: !1 }),
1105
- options: Y({
1106
- title: "Options",
1107
- itemProperties: {
1108
- label: h({ title: "Label", default: "" }),
1109
- value: h({ title: "Value", default: "" })
1110
- }
1111
- })
1112
- }
1113
- });
1114
- const We = (e) => {
1115
- const { blockProps: t, fieldName: l, label: o, placeholder: r, styles: a, inputStyles: n, _rows: c, showLabel: p } = e, m = g();
1116
- return p ? /* @__PURE__ */ s.jsxs("div", { ...a, ...t, children: [
1117
- p && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: o }),
1118
- /* @__PURE__ */ s.jsx("textarea", { name: l, ...n, id: m, placeholder: r, rows: c })
1119
- ] }) : /* @__PURE__ */ s.jsx(
1120
- "textarea",
1121
- {
1122
- id: m,
1123
- name: l,
1124
- ...t,
1125
- ...n,
1126
- ...a,
1127
- placeholder: r,
1128
- rows: c
1129
- }
1130
- );
1131
- };
1132
- d(We, {
1133
- type: "TextArea",
1134
- label: "TextArea",
1135
- category: "core",
1136
- icon: $,
1137
- group: "form",
1138
- hidden: !0,
1139
- props: {
1140
- fieldName: h({ title: "Field Name", default: "textarea" }),
1141
- showLabel: b({ title: "Show label", default: !0 }),
1142
- styles: i({ default: "" }),
1143
- inputStyles: i({ default: "w-full p-1" }),
1144
- label: h({ title: "Label", default: "Label" }),
1145
- placeholder: h({
1146
- title: "Placeholder",
1147
- default: "Placeholder"
1148
- }),
1149
- _rows: T({ title: "Rows", default: 3 })
1150
- }
1151
- });
1152
- const st = O;
1
+ import { noop as o } from "lodash-es";
2
+ const r = o;
1153
3
  export {
1154
- st as loadWebBlocks
4
+ r as loadWebBlocks
1155
5
  };