@chaibuilder/sdk 1.0.14 → 1.0.16

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 (168) hide show
  1. package/dist/{AddBlocks-H7BZYHUC.js → AddBlocks-eoo1CzaK.js} +114 -111
  2. package/dist/AddBlocks-jU0NwP_s.cjs +3 -0
  3. package/dist/{BrandingOptions-PAgY-kvj.js → BrandingOptions-ZfGlHDQN.js} +57 -41
  4. package/dist/BrandingOptions-qLROZ5_E.cjs +1 -0
  5. package/dist/CanvasArea-970i3vfn.cjs +46 -0
  6. package/dist/{CanvasArea-zn2ox-5h.js → CanvasArea-tngPDKeT.js} +517 -519
  7. package/dist/Class-RZuPYbUS.cjs +1 -0
  8. package/dist/{Class-l7qYbuoN.js → Class-nQk08vqd.js} +204 -124
  9. package/dist/{CurrentPage-6Jp4xAWK.js → CurrentPage-CMfaRNdW.js} +58 -40
  10. package/dist/CurrentPage-ChffzjTI.cjs +1 -0
  11. package/dist/Layers-GkcHf9zi.cjs +1 -0
  12. package/dist/{Layers-WkZ48AUm.js → Layers-uB7ROW-2.js} +158 -141
  13. package/dist/MarkAsGlobalBlock-lYL8cO9x.cjs +1 -0
  14. package/dist/MarkAsGlobalBlock-ySc-D4SB.js +84 -0
  15. package/dist/PagesPanel-DVZ90k1Y.js +70 -0
  16. package/dist/PagesPanel-ZhyfEOgv.cjs +1 -0
  17. package/dist/ProjectPanel-8oW-gW5l.cjs +1 -0
  18. package/dist/ProjectPanel-WCQDwngA.js +91 -0
  19. package/dist/{Settings-fH8fZKpm.js → Settings-7Km8_Iba.js} +411 -408
  20. package/dist/Settings-CLiAR8FT.cjs +1 -0
  21. package/dist/SidePanels-D7Jota-n.cjs +1 -0
  22. package/dist/{SidePanels-w8ZHKJaR.js → SidePanels-_2og328o.js} +106 -88
  23. package/dist/{Topbar-hm1D_5sb.js → Topbar-lX9OMPwj.js} +47 -45
  24. package/dist/Topbar-qi5ab8rR.cjs +1 -0
  25. package/dist/UnsplashImages-a2r7b3kB.cjs +1 -0
  26. package/dist/{UnsplashImages-gPcBLjgB.js → UnsplashImages-u_QTABzi.js} +56 -44
  27. package/dist/{UploadImages-_ZyUU66E.js → UploadImages-gV5xDHIu.js} +55 -34
  28. package/dist/UploadImages-jLQgLujd.cjs +1 -0
  29. package/dist/add-page-modal-OBghcP4h.cjs +1 -0
  30. package/dist/add-page-modal-PsNV4j42.js +110 -0
  31. package/dist/confirm-alert-ZQ-sxX0X.js +58 -0
  32. package/dist/confirm-alert-z74-fGOT.cjs +1 -0
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +99 -124
  35. package/dist/delete-page-modal-5QqRuat8.js +89 -0
  36. package/dist/delete-page-modal-niJTfDhl.cjs +1 -0
  37. package/dist/form-Osm1AmO5.cjs +1 -0
  38. package/dist/{form-dVpOAyRl.js → form-zZJyZuNH.js} +12 -12
  39. package/dist/index-2EHcmZqL.js +2947 -0
  40. package/dist/index-3_eUgIcu.cjs +206 -0
  41. package/dist/index-X20Fx8GF.js +40872 -0
  42. package/dist/index-aGgHTZqR.cjs +9 -0
  43. package/dist/index-c8zW_D2V.cjs +1 -0
  44. package/dist/index-fwo4wa7u.cjs +1 -0
  45. package/dist/index-gmZcUXyn.js +25 -0
  46. package/dist/index-yWvUd-lf.js +1189 -0
  47. package/dist/{jsx-runtime-JYMCiFoE.cjs → jsx-runtime-WKRPbKtm.cjs} +7 -7
  48. package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-qAwJ85SY.js} +109 -106
  49. package/dist/lib.cjs +2 -1
  50. package/dist/lib.js +1333 -71
  51. package/dist/{page-viewer-Y4YiaZ_m.js → page-viewer-_Sx79O1c.js} +62 -44
  52. package/dist/page-viewer-vgt_sF5B.cjs +1 -0
  53. package/dist/{project-general-setting-U4S_KlhU.js → project-general-setting-d4UJ9Xsf.js} +46 -36
  54. package/dist/project-general-setting-isR_XMTY.cjs +1 -0
  55. package/dist/project-seo-setting-FpCjw-1j.js +89 -0
  56. package/dist/project-seo-setting-tUM5Jqki.cjs +1 -0
  57. package/dist/render.cjs +1 -1
  58. package/dist/render.js +23 -19
  59. package/dist/server.cjs +1 -1
  60. package/dist/server.js +1 -1
  61. package/dist/{single-page-detail-pAxCy_Pe.js → single-page-detail-Ajzk6Hdb.js} +90 -80
  62. package/dist/single-page-detail-nAykBmpV.cjs +1 -0
  63. package/dist/studio.cjs +1 -1
  64. package/dist/studio.js +45 -25
  65. package/dist/ui.cjs +1 -1
  66. package/dist/ui.js +156 -357
  67. package/package.json +1 -1
  68. package/dist/AddBlocks-7ACJv8LW.cjs +0 -3
  69. package/dist/BrandingOptions-5j-XszLM.cjs +0 -1
  70. package/dist/CanvasArea-Dnm-yeus.cjs +0 -46
  71. package/dist/ChaiBuilderEditor-BoE-sArB.cjs +0 -163
  72. package/dist/ChaiBuilderEditor-hEuUONQ3.js +0 -27094
  73. package/dist/Class-_uCzl5v1.cjs +0 -1
  74. package/dist/CurrentPage-YMpqOqx7.cjs +0 -1
  75. package/dist/ImagesPanel-6us7hiLN.cjs +0 -1
  76. package/dist/ImagesPanel-oaHOD-Ex.js +0 -27
  77. package/dist/Layers-EzOZdWvd.cjs +0 -1
  78. package/dist/MODIFIERS-DsEzQ3aH.js +0 -73
  79. package/dist/MODIFIERS-Fx6WAZcw.cjs +0 -1
  80. package/dist/MarkAsGlobalBlock-0HubcRkY.js +0 -77
  81. package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +0 -1
  82. package/dist/PagesPanel-6JuwBLFQ.js +0 -50
  83. package/dist/PagesPanel-zJq8p1ja.cjs +0 -1
  84. package/dist/ProjectPanel-Zml2F8b9.cjs +0 -1
  85. package/dist/ProjectPanel-cu2QSDW9.js +0 -73
  86. package/dist/Settings-lc9PfnmG.cjs +0 -1
  87. package/dist/SidePanels-VH72zFE2.cjs +0 -1
  88. package/dist/Topbar-vQPo9xSY.cjs +0 -1
  89. package/dist/UnsplashImages-BoBBSi1a.cjs +0 -1
  90. package/dist/UploadImages-T6kW0s3G.cjs +0 -1
  91. package/dist/accordion-oPUeqPCZ.js +0 -42
  92. package/dist/accordion-ynvFtV_p.cjs +0 -1
  93. package/dist/add-page-modal--qZSwJuB.cjs +0 -1
  94. package/dist/add-page-modal-bj7qbZuK.js +0 -99
  95. package/dist/alert-dialog-GNfnpqFB.js +0 -64
  96. package/dist/alert-dialog-Mv0-wAvS.cjs +0 -1
  97. package/dist/command-ThdTuUxt.cjs +0 -1
  98. package/dist/command-VHca6CcN.js +0 -97
  99. package/dist/confirm-alert-8EHe0OOd.cjs +0 -1
  100. package/dist/confirm-alert-b0e_BLhF.js +0 -36
  101. package/dist/context-menu-8dC9uGXj.js +0 -122
  102. package/dist/context-menu-IgLbIuth.cjs +0 -1
  103. package/dist/controls-Ni5kEzLz.js +0 -103
  104. package/dist/controls-W97-POR_.cjs +0 -1
  105. package/dist/controls-enQY7NI8.js +0 -118
  106. package/dist/controls-xUKa23ic.cjs +0 -1
  107. package/dist/delete-page-modal-2LuDLEiP.cjs +0 -1
  108. package/dist/delete-page-modal-cnrR8tWH.js +0 -69
  109. package/dist/dialog-S_QbL1iq.cjs +0 -1
  110. package/dist/dialog-jrw9DF1f.js +0 -65
  111. package/dist/dropdown-menu-S03K_fNs.js +0 -164
  112. package/dist/dropdown-menu-sMXR59cB.cjs +0 -1
  113. package/dist/form-nRAvKPQj.cjs +0 -1
  114. package/dist/functions-nNTuSTsR.js +0 -1106
  115. package/dist/functions-pcUZhFJM.js +0 -12
  116. package/dist/functions-sCuB7nvZ.cjs +0 -2
  117. package/dist/functions-uw7QP2kT.cjs +0 -1
  118. package/dist/html-to-json-P6GpbcQX.cjs +0 -1
  119. package/dist/html-to-json-pdHQfRkN.js +0 -178
  120. package/dist/index-HAue58ea.cjs +0 -1
  121. package/dist/index-T4_wfKl5.js +0 -2256
  122. package/dist/index-X9ZgD09V.cjs +0 -1
  123. package/dist/index-ehKdBRUK.js +0 -18
  124. package/dist/label-KaP7MRrs.js +0 -10
  125. package/dist/label-tFm8HZdb.cjs +0 -1
  126. package/dist/link-6o6n2Tnd.js +0 -204
  127. package/dist/link-ece8dZGH.cjs +0 -1
  128. package/dist/page-viewer-IARz6OSp.cjs +0 -1
  129. package/dist/popover-a84pbVhQ.js +0 -23
  130. package/dist/popover-fKjgcRUx.cjs +0 -1
  131. package/dist/project-general-setting-eSl3t-VH.cjs +0 -1
  132. package/dist/project-seo-setting-Ga9v_ECU.js +0 -67
  133. package/dist/project-seo-setting-rankm1z3.cjs +0 -1
  134. package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
  135. package/dist/scroll-area-ewXbxc3n.js +0 -30
  136. package/dist/select-7bjg-rr9.cjs +0 -1
  137. package/dist/select-POGdEDHT.js +0 -75
  138. package/dist/separator-3Civ-6hb.cjs +0 -1
  139. package/dist/separator-SctTn0Qi.js +0 -18
  140. package/dist/single-page-detail-yPgnu2AI.cjs +0 -1
  141. package/dist/skeleton-CU_FIbg3.js +0 -239
  142. package/dist/skeleton-JHP9zwL2.cjs +0 -1
  143. package/dist/tabs-Gb9v5dVb.js +0 -46
  144. package/dist/tabs-iWeaaVrg.cjs +0 -1
  145. package/dist/textarea-1kZEh7ki.cjs +0 -1
  146. package/dist/textarea-b2QvVhrK.js +0 -73
  147. package/dist/toggle-ASJRAaGP.js +0 -30
  148. package/dist/toggle-ehNIPmme.cjs +0 -1
  149. package/dist/useAddBlock-WJc3OgG8.js +0 -86
  150. package/dist/useAddBlock-dCKRFPRU.cjs +0 -1
  151. package/dist/useAllBlocks-6hvuNuyw.cjs +0 -1
  152. package/dist/useAllBlocks-PQKYvs-e.js +0 -20
  153. package/dist/useChaiExternalData-4K9WxANa.js +0 -6
  154. package/dist/useChaiExternalData-DkyBJ81C.cjs +0 -1
  155. package/dist/useDarkMode-ZKCO_gkt.js +0 -23
  156. package/dist/useDarkMode-dV6FM6l-.cjs +0 -1
  157. package/dist/useFeatureSupport-OLwNgEZb.js +0 -16
  158. package/dist/useFeatureSupport-c9IgPW2t.cjs +0 -1
  159. package/dist/useHiddenBlocks-3MsGOJ1s.js +0 -15
  160. package/dist/useHiddenBlocks-oJuQDmTy.cjs +0 -1
  161. package/dist/useLanguage-NKKKaxVM.cjs +0 -1
  162. package/dist/useLanguage-gVC5rxO5.js +0 -216
  163. package/dist/useMarkAsGlobalBlock-X73Vny8u.js +0 -25
  164. package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +0 -1
  165. package/dist/useUiLibraries-4hPOi8DI.js +0 -12
  166. package/dist/useUiLibraries-9FhQCpKo.cjs +0 -1
  167. package/dist/utils-dze1SGvB.js +0 -6
  168. package/dist/utils-qK_SjzzV.cjs +0 -1
@@ -0,0 +1,1189 @@
1
+ import { j as n } from "./jsx-runtime-qAwJ85SY.js";
2
+ import * as u from "react";
3
+ import { get as b, omit as I, isEmpty as v, isNull as A, map as _ } from "lodash";
4
+ import { f as d } from "./index-gmZcUXyn.js";
5
+ import { PlusCircledIcon as F, HeadingIcon as $, TextIcon as D, CursorTextIcon as O, ButtonIcon as N, Link1Icon as z, RowsIcon as V, ColumnsIcon as U, SketchLogoIcon as G, ImageIcon as W, VideoIcon as Y, CodeIcon as X, DividerHorizontalIcon as Z, SpaceBetweenVerticallyIcon as M, TableIcon as K, BorderTopIcon as J, BorderAllIcon as Q, ViewHorizontalIcon as ee, DragHandleHorizontalIcon as te, GroupIcon as le, LetterCaseToggleIcon as ae, InputIcon as R, DropdownMenuIcon as oe, CheckboxIcon as re, RadiobuttonIcon as ne } from "@radix-ui/react-icons";
6
+ import "./lib.js";
7
+ import { b as w, d as k } from "./Class-nQk08vqd.js";
8
+ const ie = "#styles:";
9
+ const m = (e) => ({
10
+ type: "singular",
11
+ default: e.default || "",
12
+ binding: b(e, "binding", !0),
13
+ i18n: e.i18n || !1,
14
+ dataType: "string",
15
+ required: e.required || !1,
16
+ schema: {
17
+ type: "string",
18
+ ...I(e, ["i18n", "required"])
19
+ },
20
+ uiSchema: {
21
+ "ui:placeholder": e.placeholder || "Enter here"
22
+ }
23
+ }), B = (e) => ({
24
+ type: "singular",
25
+ default: e.default || "",
26
+ binding: b(e, "binding", !0),
27
+ dataType: "string",
28
+ i18n: e.i18n || !1,
29
+ required: e.required || !1,
30
+ schema: {
31
+ type: "string",
32
+ ...I(e, ["i18n", "required", "rows"])
33
+ },
34
+ uiSchema: {
35
+ "ui:widget": "textarea",
36
+ "ui:placeholder": e.placeholder || "Enter here",
37
+ "ui:options": {
38
+ rows: e.rows || 4
39
+ }
40
+ }
41
+ }), h = (e) => ({
42
+ type: "singular",
43
+ i18n: e.i18n || !1,
44
+ default: e.default || !1,
45
+ dataType: "boolean",
46
+ binding: b(e, "binding", !0),
47
+ schema: {
48
+ type: "boolean",
49
+ ...I(e, ["i18n", "required"])
50
+ },
51
+ uiSchema: {
52
+ "ui:title": e.title || "Select Item",
53
+ "ui:description": ""
54
+ }
55
+ }), se = (e) => ({
56
+ type: "singular",
57
+ default: e.default || "",
58
+ binding: b(e, "binding", !0),
59
+ dataType: "number",
60
+ i18n: e.i18n || !1,
61
+ required: e.required || !1,
62
+ schema: {
63
+ type: "number",
64
+ ...I(e, ["i18n", "required"])
65
+ },
66
+ uiSchema: {}
67
+ }), L = (e) => ({
68
+ type: "singular",
69
+ default: e.default || "",
70
+ binding: b(e, "binding", !0),
71
+ i18n: e.i18n || !1,
72
+ required: e.required || !1,
73
+ dataType: "string",
74
+ schema: {
75
+ type: "string",
76
+ ...I(e, ["i18n", "required", "options", "binding"]),
77
+ oneOf: e.options.map((t) => ({ const: t.value, title: t.title }))
78
+ },
79
+ uiSchema: {
80
+ "ui:widget": "select"
81
+ }
82
+ }), Ye = (e) => ({
83
+ type: "singular",
84
+ i18n: e.i18n || !1,
85
+ default: e.default || "",
86
+ binding: b(e, "binding", !0),
87
+ dataType: "string",
88
+ schema: {
89
+ type: "string",
90
+ ...I(e, ["i18n", "required"])
91
+ },
92
+ uiSchema: {
93
+ "ui:widget": "color"
94
+ }
95
+ });
96
+ const T = (e) => ({
97
+ type: "singular",
98
+ default: e.default || "",
99
+ i18n: e.i18n || !1,
100
+ binding: b(e, "binding", !0),
101
+ dataType: "string",
102
+ schema: {
103
+ type: "string",
104
+ ...I(e, ["i18n", "required"])
105
+ },
106
+ uiSchema: {
107
+ "ui:widget": "richtext"
108
+ }
109
+ }), ce = (e) => ({
110
+ type: "model",
111
+ title: e.title,
112
+ dataType: "object",
113
+ default: e.default || {},
114
+ binding: b(e, "binding", !0),
115
+ properties: e.properties
116
+ }), de = (e) => ({
117
+ type: "list",
118
+ itemProperties: e.itemProperties,
119
+ binding: b(e, "binding", !0),
120
+ title: e.title,
121
+ dataType: "array",
122
+ default: e.default || [],
123
+ itemTitle: e.getItemLabel ? e.getItemLabel({}) : () => ""
124
+ }), c = (e) => ({
125
+ type: "styles",
126
+ binding: !1,
127
+ default: `${ie},${e.default || ""}`
128
+ }), j = (e) => ({
129
+ default: e.default || "",
130
+ binding: b(e, "binding", !0),
131
+ type: "singular",
132
+ i18n: e.i18n || !1,
133
+ dataType: "string",
134
+ schema: {
135
+ type: "string",
136
+ title: "Icon",
137
+ default: e.default || ""
138
+ },
139
+ uiSchema: {
140
+ "ui:widget": "icon"
141
+ }
142
+ }), H = (e) => ({
143
+ default: e.default,
144
+ type: "singular",
145
+ binding: b(e, "binding", !0),
146
+ dataType: "object",
147
+ i18n: e.i18n || !1,
148
+ schema: {
149
+ type: "object",
150
+ ...e || {},
151
+ properties: {
152
+ type: { type: "string" },
153
+ href: { type: "string" },
154
+ target: { type: "string" }
155
+ }
156
+ },
157
+ uiSchema: {
158
+ "ui:field": "link"
159
+ }
160
+ }), q = (e) => ({
161
+ type: "singular",
162
+ default: e.default || "",
163
+ binding: b(e, "binding", !0),
164
+ dataType: "string",
165
+ i18n: e.i18n || !1,
166
+ schema: {
167
+ type: "string",
168
+ ...I(e, ["i18n", "required"])
169
+ },
170
+ uiSchema: {
171
+ "ui:widget": "image"
172
+ }
173
+ }), x = ({ blockProps: e, className: t = "", text: l = "BLOCK", styles: a = {} }) => /* @__PURE__ */ n.jsx(
174
+ "div",
175
+ {
176
+ ...e,
177
+ className: w("flex h-20 flex-col items-center justify-center", t),
178
+ ...I(a, ["className"]),
179
+ children: /* @__PURE__ */ n.jsx("div", { className: "flex h-full w-full items-center justify-center bg-[radial-gradient(#CCC,transparent_1.5px)] outline-dashed outline-2 outline-gray-400 duration-300 [background-size:12px_12px] dark:bg-[radial-gradient(#AAA,transparent_1.5px)]", children: /* @__PURE__ */ n.jsxs("span", { className: "opacit flex items-center gap-x-1.5 text-xs font-semibold text-gray-400", children: [
180
+ /* @__PURE__ */ n.jsx(F, { className: "w-3 h-3" }),
181
+ " ADD ",
182
+ l
183
+ ] }) })
184
+ }
185
+ ), ue = (e) => {
186
+ const { blockProps: t, backgroundImage: l, children: a, tag: o = "div", styles: r } = e;
187
+ if (!a && v(r == null ? void 0 : r.className))
188
+ return /* @__PURE__ */ n.jsx(x, { blockProps: t, styles: r });
189
+ let i = {};
190
+ return l && (i = { backgroundImage: `url(${l})` }), u.createElement(o, { ...t, ...r, style: i }, a);
191
+ };
192
+ d(ue, {
193
+ type: "Box",
194
+ label: "Box",
195
+ category: "core",
196
+ group: "basic",
197
+ props: {
198
+ styles: c({ default: "" }),
199
+ tag: L({
200
+ title: "Tag",
201
+ default: "div",
202
+ options: [
203
+ { value: "div", title: "div" },
204
+ { value: "header", title: "header" },
205
+ { value: "footer", title: "footer" },
206
+ { value: "section", title: "section" },
207
+ { value: "article", title: "article" },
208
+ { value: "aside", title: "aside" },
209
+ { value: "main", title: "main" },
210
+ { value: "nav", title: "nav" },
211
+ { value: "figure", title: "figure" },
212
+ { value: "details", title: "details" },
213
+ { value: "summary", title: "summary" },
214
+ { value: "dialog", title: "dialog" },
215
+ { value: "strike", title: "strike" },
216
+ { value: "caption", title: "caption" },
217
+ { value: "legend", title: "legend" },
218
+ { value: "figcaption", title: "figcaption" },
219
+ { value: "mark", title: "mark" }
220
+ ]
221
+ }),
222
+ backgroundImage: q({ title: "Background Image" })
223
+ }
224
+ });
225
+ const pe = (e) => {
226
+ const { blockProps: t, styles: l, content: a, level: o = "h1", children: r = null } = e;
227
+ return r ? u.createElement(o, { ...l, ...t }, r) : u.createElement(o, {
228
+ ...l,
229
+ ...t,
230
+ dangerouslySetInnerHTML: { __html: a }
231
+ });
232
+ };
233
+ d(pe, {
234
+ type: "Heading",
235
+ label: "Heading",
236
+ category: "core",
237
+ icon: $,
238
+ group: "basic",
239
+ props: {
240
+ level: L({
241
+ title: "Level",
242
+ default: "h1",
243
+ binding: !1,
244
+ options: [
245
+ { value: "h1", title: "h1" },
246
+ { value: "h2", title: "h2" },
247
+ { value: "h3", title: "h3" },
248
+ { value: "h4", title: "h4" },
249
+ { value: "h5", title: "h5" },
250
+ { value: "h6", title: "h6" }
251
+ ]
252
+ }),
253
+ styles: c({ default: "text-3xl" }),
254
+ content: T({ title: "Content", default: "Heading goes here" })
255
+ }
256
+ });
257
+ const me = (e) => {
258
+ const { blockProps: t, styles: l, content: a } = e;
259
+ return A(e.children) ? u.createElement("div", {
260
+ ...l,
261
+ ...t,
262
+ dangerouslySetInnerHTML: { __html: a }
263
+ }) : u.createElement("p", { ...l, ...t }, e.children);
264
+ };
265
+ d(me, {
266
+ type: "Paragraph",
267
+ label: "Paragraph",
268
+ category: "core",
269
+ icon: D,
270
+ group: "basic",
271
+ props: {
272
+ styles: c({ default: "" }),
273
+ content: T({
274
+ title: "Content",
275
+ 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."
276
+ })
277
+ }
278
+ });
279
+ const fe = (e) => {
280
+ const { blockProps: t, content: l, styles: a } = e;
281
+ return /* @__PURE__ */ n.jsx("div", { className: "prose max-w-full", children: /* @__PURE__ */ n.jsx("div", { ...t, ...a, dangerouslySetInnerHTML: { __html: l } }) });
282
+ };
283
+ d(fe, {
284
+ type: "RichText",
285
+ label: "Rich Text",
286
+ category: "core",
287
+ icon: O,
288
+ group: "basic",
289
+ props: {
290
+ styles: c({ default: "" }),
291
+ content: T({
292
+ title: "Content",
293
+ default: `Lorem Ipsum Rich Text Editor Demo
294
+
295
+ Welcome to our rich text editor demo! With our powerful editor, you can create stunning documents with ease. Let's explore some of its features:
296
+
297
+ Text Formatting: You can make text bold, italic, or underline it.
298
+ Lists:
299
+ Create ordered lists.
300
+ Craft unordered lists.
301
+ Utilize nested lists for organization.`
302
+ })
303
+ }
304
+ });
305
+ const ye = (e) => {
306
+ const { blockProps: t, icon: l, content: a, iconPos: o, styles: r, children: i } = e, s = i || /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
307
+ a,
308
+ l && /* @__PURE__ */ n.jsx("span", { className: o || "", dangerouslySetInnerHTML: { __html: l } })
309
+ ] });
310
+ return u.createElement("button", { ...t, ...r, type: "button" }, s);
311
+ };
312
+ d(ye, {
313
+ type: "Button",
314
+ label: "Button",
315
+ category: "core",
316
+ icon: N,
317
+ group: "basic",
318
+ props: {
319
+ content: m({
320
+ title: "Label",
321
+ default: "Button",
322
+ multiLingual: !0
323
+ }),
324
+ styles: c({
325
+ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center"
326
+ }),
327
+ link: H({
328
+ title: "Link",
329
+ default: { type: "page", href: "", target: "_blank" }
330
+ }),
331
+ icon: j({ title: "Icon", default: "" }),
332
+ iconPos: L({
333
+ title: "Icon Position",
334
+ default: "order-last",
335
+ options: [
336
+ { title: "Start", value: "order-first" },
337
+ { title: "End", value: "order-last" }
338
+ ]
339
+ })
340
+ }
341
+ });
342
+ const be = (e) => {
343
+ const { blockProps: t, link: l, children: a, styles: o, inBuilder: r, content: i } = e;
344
+ return !a && v(o == null ? void 0 : o.className) && v(i) ? /* @__PURE__ */ n.jsx(x, { blockProps: t }) : r ? a ? /* @__PURE__ */ n.jsx("span", { "data-simulate": "a", ...t, ...o, children: a }) : u.createElement("span", {
345
+ ...t,
346
+ ...o,
347
+ href: l.href || "#",
348
+ target: l.target || "_self",
349
+ dangerouslySetInnerHTML: { __html: i },
350
+ "data-simulate": "a"
351
+ }) : a ? /* @__PURE__ */ n.jsx("a", { href: l.href || "#/", target: l.target, ...t, ...o, children: a }) : u.createElement("a", {
352
+ ...t,
353
+ ...o,
354
+ href: l.href || "#",
355
+ target: l.target || "_self",
356
+ dangerouslySetInnerHTML: { __html: i }
357
+ });
358
+ };
359
+ d(be, {
360
+ type: "Link",
361
+ label: "Link",
362
+ category: "core",
363
+ icon: z,
364
+ group: "basic",
365
+ props: {
366
+ styles: c({ default: "" }),
367
+ content: m({ title: "Content", default: "" }),
368
+ link: H({
369
+ title: "Link",
370
+ default: { type: "page", target: "_self", href: "" }
371
+ })
372
+ }
373
+ });
374
+ const ge = (e) => {
375
+ const { blockProps: t, children: l, listType: a, styles: o, tag: r } = e, i = w(b(o, "className", ""), a);
376
+ return !l && v(o == null ? void 0 : o.className) ? /* @__PURE__ */ n.jsx(x, { blockProps: t, text: "LIST ITEM" }) : u.createElement(
377
+ r || (a === "list-decimal" ? "ol" : "ul"),
378
+ { ...t, ...o, className: i },
379
+ l
380
+ );
381
+ };
382
+ d(ge, {
383
+ type: "List",
384
+ label: "List",
385
+ icon: V,
386
+ category: "core",
387
+ group: "basic",
388
+ props: {
389
+ styles: c({ default: "" }),
390
+ listType: L({
391
+ title: "List type",
392
+ default: "list-disc",
393
+ options: [
394
+ { value: "list-none", title: "None" },
395
+ { value: "list-disc", title: "Disc" },
396
+ { value: "list-decimal", title: "Number" }
397
+ ]
398
+ })
399
+ },
400
+ blocks: [
401
+ { _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
402
+ {
403
+ _type: "ListItem",
404
+ _id: "b",
405
+ _parent: "a",
406
+ styles: "#styles:,",
407
+ content: "Item 1"
408
+ },
409
+ {
410
+ _type: "ListItem",
411
+ _id: "c",
412
+ _parent: "a",
413
+ styles: "#styles:,",
414
+ content: "Item 2"
415
+ },
416
+ {
417
+ _type: "ListItem",
418
+ _id: "d",
419
+ _parent: "a",
420
+ styles: "#styles:,",
421
+ content: "Item 3"
422
+ }
423
+ ]
424
+ });
425
+ const he = (e) => {
426
+ const { blockProps: t, content: l, styles: a, children: o, tag: r } = e;
427
+ return o ? u.createElement(r || "li", { ...a, ...t }, o) : u.createElement(r || "li", {
428
+ ...a,
429
+ ...t,
430
+ dangerouslySetInnerHTML: { __html: l }
431
+ });
432
+ };
433
+ d(he, {
434
+ type: "ListItem",
435
+ label: "List Item",
436
+ icon: U,
437
+ category: "core",
438
+ group: "basic",
439
+ props: {
440
+ styles: c({ default: "" }),
441
+ content: T({ title: "Content", default: "List item" })
442
+ }
443
+ });
444
+ const xe = (e) => {
445
+ const { blockProps: t, icon: l, styles: a } = e, o = {
446
+ ...a,
447
+ className: w(a.className, "inline-block c-inline-block")
448
+ };
449
+ return v(l) ? /* @__PURE__ */ n.jsx(x, { blockProps: t, text: "", className: "h-8 w-14" }) : u.createElement("span", {
450
+ ...t,
451
+ ...o,
452
+ dangerouslySetInnerHTML: { __html: l }
453
+ });
454
+ };
455
+ d(xe, {
456
+ type: "Icon",
457
+ label: "Icon",
458
+ category: "core",
459
+ icon: G,
460
+ group: "basic",
461
+ props: {
462
+ styles: c({ default: "text-black" }),
463
+ icon: j({
464
+ title: "Icon",
465
+ default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" 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>'
466
+ })
467
+ }
468
+ });
469
+ const ke = (e) => {
470
+ const { blockProps: t, image: l, styles: a, alt: o, height: r = 200, width: i = 200 } = e;
471
+ return v(l) ? /* @__PURE__ */ n.jsx(x, { blockProps: t, text: "IMAGE URL", className: "h-36" }) : u.createElement("img", {
472
+ ...t,
473
+ ...a,
474
+ src: l,
475
+ alt: o,
476
+ height: r,
477
+ width: i
478
+ });
479
+ };
480
+ d(ke, {
481
+ type: "Image",
482
+ label: "Image",
483
+ category: "core",
484
+ icon: W,
485
+ group: "basic",
486
+ props: {
487
+ styles: c({ default: "" }),
488
+ image: q({
489
+ title: "Image",
490
+ default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
491
+ }),
492
+ alt: m({ title: "Alt", default: "" }),
493
+ width: m({ title: "Width", default: "" }),
494
+ height: m({ title: "Height", default: "" })
495
+ }
496
+ });
497
+ const ve = (e) => {
498
+ var r;
499
+ const { blockProps: t, styles: l, children: a } = e;
500
+ let o = null;
501
+ return a || (o = // @ts-ignore
502
+ /* @__PURE__ */ n.jsx("div", { className: w("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: [
503
+ "Slot: ",
504
+ e.name
505
+ ] }) }) })), u.createElement("div", { ...l, ...t, droppable: "yes" }, a || o);
506
+ };
507
+ d(ve, {
508
+ type: "Slot",
509
+ label: "Slot",
510
+ group: "basic",
511
+ category: "core",
512
+ hidden: !0,
513
+ props: {
514
+ styles: c({ default: "" }),
515
+ emptyStyles: c({ default: "" })
516
+ }
517
+ });
518
+ const E = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, P = /^(https?:\/\/)?(www\.)?vimeo\.com\/(\d+)/, C = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Ie = (e) => {
519
+ if (E.test(e)) {
520
+ const t = e.match(E);
521
+ return t ? `https://www.youtube.com/embed/${t[4]}` : e;
522
+ }
523
+ if (P.test(e)) {
524
+ const t = e.match(P);
525
+ return t ? `https://player.vimeo.com/video/${t[3]}` : e;
526
+ }
527
+ if (C.test(e)) {
528
+ const t = e.match(C);
529
+ return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
530
+ }
531
+ return null;
532
+ }, Te = (e) => {
533
+ const { blockProps: t, styles: l, _url: a, _controls: o } = e, r = o.autoPlay, i = o.controls, s = r || o.muted, f = o.loop;
534
+ if (v(a))
535
+ return /* @__PURE__ */ n.jsx(x, { blockProps: t, text: "VIDEO URL", className: "h-36" });
536
+ let p = Ie(a), g = null;
537
+ if (p) {
538
+ if (!v(p)) {
539
+ const y = [];
540
+ y.push(`autoplay=${r ? 1 : 0}`), y.push(`controls=${i ? 1 : 0}`), y.push(`mute=${s ? 1 : 0}&muted=${s ? 1 : 0}`), y.push(`loop=${f ? 1 : 0}`), p = `${p}?${y.join("&")}`;
541
+ }
542
+ g = u.createElement("iframe", {
543
+ ...t,
544
+ ...l,
545
+ src: p,
546
+ allow: "autoplay *; fullscreen *",
547
+ allowFullScreen: !0,
548
+ frameBorder: 0
549
+ });
550
+ } else
551
+ g = u.createElement("video", {
552
+ ...t,
553
+ ...l,
554
+ src: a,
555
+ controls: i,
556
+ muted: s,
557
+ autoPlay: r,
558
+ loop: f
559
+ });
560
+ return /* @__PURE__ */ n.jsxs("div", { className: "relative overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
561
+ /* @__PURE__ */ n.jsx("div", { className: "absolute h-full w-full" }),
562
+ g
563
+ ] });
564
+ };
565
+ d(Te, {
566
+ type: "Video",
567
+ label: "Video",
568
+ category: "core",
569
+ icon: Y,
570
+ group: "basic",
571
+ props: {
572
+ styles: c({ default: "absolute top-0 left-0 w-full h-full" }),
573
+ _url: m({
574
+ title: "Video URL",
575
+ default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
576
+ }),
577
+ _controls: ce({
578
+ title: "Controls",
579
+ properties: {
580
+ autoPlay: h({ title: "Autoplay", default: !0 }),
581
+ controls: h({ title: "Show widgets", default: !1 }),
582
+ loop: h({ title: "Loop", default: !1 }),
583
+ muted: h({ title: "Muted", default: !0 })
584
+ }
585
+ })
586
+ }
587
+ });
588
+ const Le = (e) => {
589
+ const { blockProps: t, styles: l, content: a } = e;
590
+ return u.createElement("div", {
591
+ ...l,
592
+ ...t,
593
+ dangerouslySetInnerHTML: { __html: a }
594
+ });
595
+ };
596
+ d(Le, {
597
+ type: "CustomHTML",
598
+ label: "CustomHTML",
599
+ category: "core",
600
+ icon: X,
601
+ group: "basic",
602
+ props: {
603
+ styles: c({ default: "" }),
604
+ content: B({
605
+ title: "HTML Content",
606
+ default: "",
607
+ placeholder: "Enter custom HTML code here"
608
+ })
609
+ }
610
+ });
611
+ const we = (e) => {
612
+ const { blockProps: t, styles: l, content: a, children: o = null, tag: r } = e;
613
+ return o ? u.createElement("span", { ...l, ...t }, o) : u.createElement(r || "span", {
614
+ ...l,
615
+ ...t,
616
+ dangerouslySetInnerHTML: { __html: a }
617
+ });
618
+ };
619
+ d(we, {
620
+ type: "Span",
621
+ label: "Span",
622
+ category: "core",
623
+ group: "basic",
624
+ props: {
625
+ styles: c({ default: "" }),
626
+ content: B({ title: "Content", default: "" })
627
+ }
628
+ });
629
+ const Se = (e) => {
630
+ const { blockProps: t, styles: l } = e;
631
+ return u.createElement("hr", { ...l, ...t });
632
+ };
633
+ d(Se, {
634
+ type: "Divider",
635
+ label: "Divider",
636
+ category: "core",
637
+ icon: Z,
638
+ group: "basic",
639
+ props: {
640
+ styles: c({ default: "bg-gray-900 h-0.5 py-2 my-1" })
641
+ }
642
+ });
643
+ const _e = (e) => {
644
+ const { blockProps: t, styles: l } = e;
645
+ return u.createElement("br", { ...t, ...l });
646
+ };
647
+ d(_e, {
648
+ type: "LineBreak",
649
+ label: "Line Break",
650
+ category: "core",
651
+ group: "basic",
652
+ icon: M,
653
+ props: {
654
+ styles: c({ default: "" })
655
+ }
656
+ });
657
+ const Be = (e) => e.inBuilder ? /* @__PURE__ */ n.jsxs("span", { ...e.blockProps, children: [
658
+ " ",
659
+ e.content,
660
+ " "
661
+ ] }) : ` ${e.content} `;
662
+ d(Be, {
663
+ type: "Text",
664
+ label: "Text",
665
+ hidden: !0,
666
+ category: "core",
667
+ group: "basic",
668
+ icon: M,
669
+ props: {
670
+ content: B({ title: "Content", defaultValue: "" })
671
+ }
672
+ });
673
+ const S = (e) => {
674
+ const t = (r, i) => ({
675
+ _id: k(),
676
+ _parent: r,
677
+ _type: "TableCell",
678
+ styles: "#styles:,",
679
+ content: `${e === "TableHead" ? "Table Head" : "Table Cell " + i}`
680
+ }), l = (r) => {
681
+ const i = k(), s = {
682
+ _type: "TableRow",
683
+ _id: i,
684
+ styles: "#styles:,border-b"
685
+ };
686
+ return r && (s._parent = r), [s, t(i, "1"), t(i, "2"), t(i, "3")];
687
+ }, a = (r) => {
688
+ const i = k(), s = {
689
+ _id: i,
690
+ _type: "TableHead",
691
+ styles: "#styles:,font-medium"
692
+ };
693
+ return r && (s._parent = r), [s, ...l(i)];
694
+ }, o = (r) => {
695
+ const i = k(), s = {
696
+ _id: i,
697
+ _type: "TableBody",
698
+ styles: "#styles:,"
699
+ };
700
+ return r && (s._parent = r), [s, ...l(i), ...l(i)];
701
+ };
702
+ if (e === "Table") {
703
+ const r = k();
704
+ return [
705
+ {
706
+ _id: r,
707
+ _type: "Table",
708
+ styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
709
+ },
710
+ ...a(r),
711
+ ...o(r)
712
+ ];
713
+ }
714
+ return e === "TableRow" ? l() : e === "TableHead" ? a() : e === "TableBody" ? o() : [];
715
+ }, je = (e) => {
716
+ const { blockProps: t, children: l, styles: a } = e;
717
+ return l ? u.createElement("table", { ...t, ...a }, l) : /* @__PURE__ */ n.jsx(x, { blockProps: t, text: "TABLE HEAD / BODY" });
718
+ };
719
+ d(je, {
720
+ type: "Table",
721
+ label: "Table",
722
+ category: "core",
723
+ group: "table",
724
+ icon: K,
725
+ props: {
726
+ styles: c({ default: "" })
727
+ },
728
+ blocks: S("Table")
729
+ });
730
+ const Ee = (e) => {
731
+ const { blockProps: t, children: l, styles: a } = e;
732
+ return l ? u.createElement("thead", { ...t, ...a }, l) : /* @__PURE__ */ n.jsx(x, { blockProps: t, text: "TABLE ROW" });
733
+ };
734
+ d(Ee, {
735
+ type: "TableHead",
736
+ label: "Table Head",
737
+ category: "core",
738
+ group: "table",
739
+ icon: J,
740
+ props: {
741
+ styles: c({ default: "" })
742
+ },
743
+ blocks: S("TableHead")
744
+ });
745
+ const Pe = (e) => {
746
+ const { blockProps: t, children: l, styles: a } = e;
747
+ return l ? u.createElement("tbody", { ...t, ...a }, l) : /* @__PURE__ */ n.jsx(x, { blockProps: t, text: "TABLE ROW" });
748
+ };
749
+ d(Pe, {
750
+ type: "TableBody",
751
+ label: "Table Body",
752
+ category: "core",
753
+ group: "table",
754
+ icon: Q,
755
+ props: {
756
+ styles: c({ default: "" })
757
+ },
758
+ blocks: S("TableBody")
759
+ });
760
+ const Ce = (e) => {
761
+ const { blockProps: t, children: l, styles: a } = e;
762
+ return l ? u.createElement("tr", { ...t, ...a }, l) : /* @__PURE__ */ n.jsx(x, { blockProps: t, text: "TABLE CELL" });
763
+ };
764
+ d(Ce, {
765
+ type: "TableRow",
766
+ label: "Table Row",
767
+ category: "core",
768
+ group: "table",
769
+ icon: ee,
770
+ props: {
771
+ styles: c({ default: "w-full" })
772
+ },
773
+ blocks: S("TableRow")
774
+ });
775
+ const Ne = (e) => {
776
+ const { blockProps: t, children: l, content: a, styles: o } = e;
777
+ return !l && v(a) ? /* @__PURE__ */ n.jsx(x, { blockProps: t }) : l ? u.createElement("td", { ...t, ...o }, l) : u.createElement("td", {
778
+ ...t,
779
+ ...o,
780
+ dangerouslySetInnerHTML: { __html: a }
781
+ });
782
+ };
783
+ d(Ne, {
784
+ type: "TableCell",
785
+ label: "Table Cell",
786
+ category: "core",
787
+ group: "table",
788
+ icon: te,
789
+ props: {
790
+ styles: c({ default: "" }),
791
+ content: T({ title: "Content", default: "Table cell item" })
792
+ }
793
+ });
794
+ const Me = (e) => {
795
+ const { blockProps: t, errorMessage: l, name: a, _type: o, successMessage: r, action: i, styles: s, children: f } = e;
796
+ if (!f && v(s == null ? void 0 : s.className))
797
+ return /* @__PURE__ */ n.jsx(x, { blockProps: t, text: "FORM FIELDS" });
798
+ const p = {
799
+ "x-data": "useForm",
800
+ "x-on:submit.prevent": "post"
801
+ }, g = {
802
+ "x-html": "formResponse",
803
+ ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
804
+ };
805
+ return /* @__PURE__ */ n.jsxs(
806
+ "form",
807
+ {
808
+ ...p,
809
+ "data-error": l,
810
+ "data-success": r,
811
+ method: "post",
812
+ action: i,
813
+ ...t,
814
+ ...s,
815
+ children: [
816
+ /* @__PURE__ */ n.jsx("div", { ...g }),
817
+ /* @__PURE__ */ n.jsx("input", { name: "formname", type: "hidden", value: a || o }),
818
+ f
819
+ ]
820
+ }
821
+ );
822
+ };
823
+ d(Me, {
824
+ type: "Form",
825
+ label: "Form",
826
+ category: "core",
827
+ icon: le,
828
+ group: "form",
829
+ props: {
830
+ styles: c({ default: "" }),
831
+ action: m({
832
+ title: "Submit URL",
833
+ default: "/api/form/submit"
834
+ }),
835
+ errorMessage: T({
836
+ title: "Error Message",
837
+ default: "Something went wrong. Please try again"
838
+ }),
839
+ successMessage: T({
840
+ title: "Success Message",
841
+ default: "Thank you for your submission."
842
+ })
843
+ }
844
+ });
845
+ const Re = (e) => {
846
+ const { blockProps: t, content: l, styles: a, children: o } = e, r = { ...a, ...t };
847
+ return o ? u.createElement("label", r, o) : u.createElement("label", {
848
+ ...r,
849
+ dangerouslySetInnerHTML: { __html: l }
850
+ });
851
+ };
852
+ d(Re, {
853
+ type: "Label",
854
+ label: "Label",
855
+ category: "core",
856
+ icon: ae,
857
+ group: "form",
858
+ props: {
859
+ styles: c({ default: "" }),
860
+ content: m({ title: "Content", default: "Label" })
861
+ }
862
+ });
863
+ const He = (e) => {
864
+ const {
865
+ blockProps: t,
866
+ label: l,
867
+ placeholder: a,
868
+ styles: o,
869
+ inputStyles: r,
870
+ showLabel: i,
871
+ required: s,
872
+ inputType: f = "text",
873
+ inBuilder: p,
874
+ fieldName: g
875
+ } = e, y = k();
876
+ return !i || f === "submit" ? (f === "submit" && (t.value = l), /* @__PURE__ */ n.jsx(
877
+ "input",
878
+ {
879
+ id: y,
880
+ name: g,
881
+ readOnly: p,
882
+ ...t,
883
+ ...r,
884
+ ...o,
885
+ type: f,
886
+ placeholder: a,
887
+ required: s
888
+ }
889
+ )) : /* @__PURE__ */ n.jsxs("div", { ...o, ...t, children: [
890
+ i && /* @__PURE__ */ n.jsx("label", { htmlFor: y, children: l }),
891
+ /* @__PURE__ */ n.jsx(
892
+ "input",
893
+ {
894
+ name: g,
895
+ readOnly: p,
896
+ ...r,
897
+ id: y,
898
+ type: f,
899
+ placeholder: a,
900
+ required: s
901
+ }
902
+ )
903
+ ] });
904
+ };
905
+ d(He, {
906
+ type: "Input",
907
+ label: "Input",
908
+ category: "core",
909
+ icon: R,
910
+ group: "form",
911
+ props: {
912
+ styles: c({ default: "" }),
913
+ fieldName: m({ title: "Field Name", default: "input" }),
914
+ inputType: L({
915
+ title: "Type",
916
+ options: _(
917
+ ["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
918
+ (e) => ({
919
+ value: e,
920
+ title: e
921
+ })
922
+ ),
923
+ default: "text"
924
+ }),
925
+ value: m({ title: "Value", default: "" }),
926
+ showLabel: h({ title: "Show label", default: !0 }),
927
+ inputStyles: c({ default: "w-full p-1" }),
928
+ label: m({ title: "Label", default: "Label" }),
929
+ placeholder: m({
930
+ title: "Placeholder",
931
+ default: "Placeholder"
932
+ }),
933
+ required: h({ title: "Required", default: !1 })
934
+ }
935
+ });
936
+ const qe = (e) => {
937
+ const { blockProps: t, fieldName: l, label: a, placeholder: o, styles: r, inputStyles: i, _rows: s, showLabel: f } = e, p = k();
938
+ return f ? /* @__PURE__ */ n.jsxs("div", { ...r, ...t, children: [
939
+ f && /* @__PURE__ */ n.jsx("label", { htmlFor: p, children: a }),
940
+ /* @__PURE__ */ n.jsx("textarea", { name: l, ...i, id: p, placeholder: o, rows: s })
941
+ ] }) : /* @__PURE__ */ n.jsx(
942
+ "textarea",
943
+ {
944
+ id: p,
945
+ name: l,
946
+ ...t,
947
+ ...i,
948
+ ...r,
949
+ placeholder: o,
950
+ rows: s
951
+ }
952
+ );
953
+ };
954
+ d(qe, {
955
+ type: "TextArea",
956
+ label: "TextArea",
957
+ category: "core",
958
+ icon: R,
959
+ group: "form",
960
+ props: {
961
+ fieldName: m({ title: "Field Name", default: "textarea" }),
962
+ showLabel: h({ title: "Show label", default: !0 }),
963
+ styles: c({ default: "" }),
964
+ inputStyles: c({ default: "w-full p-1" }),
965
+ label: m({ title: "Label", default: "Label" }),
966
+ placeholder: m({
967
+ title: "Placeholder",
968
+ default: "Placeholder"
969
+ }),
970
+ _rows: se({ title: "Rows", default: 3 })
971
+ }
972
+ });
973
+ const Ae = (e) => {
974
+ const {
975
+ blockProps: t,
976
+ fieldName: l,
977
+ label: a,
978
+ placeholder: o,
979
+ styles: r,
980
+ inputStyles: i,
981
+ required: s,
982
+ showLabel: f,
983
+ _multiple: p = !1
984
+ } = e, g = k();
985
+ return f ? /* @__PURE__ */ n.jsxs("div", { ...r, children: [
986
+ f && /* @__PURE__ */ n.jsx("label", { htmlFor: g, children: a }),
987
+ /* @__PURE__ */ n.jsxs(
988
+ "select",
989
+ {
990
+ ...i,
991
+ id: g,
992
+ placeholder: o,
993
+ required: s,
994
+ multiple: p,
995
+ name: l,
996
+ children: [
997
+ /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
998
+ _(e.options, (y) => /* @__PURE__ */ n.jsx(
999
+ "option",
1000
+ {
1001
+ selected: b(y, "selected", !1),
1002
+ value: y.value,
1003
+ dangerouslySetInnerHTML: { __html: y.label }
1004
+ },
1005
+ y.value
1006
+ ))
1007
+ ]
1008
+ }
1009
+ )
1010
+ ] }) : /* @__PURE__ */ n.jsxs(
1011
+ "select",
1012
+ {
1013
+ id: g,
1014
+ ...r,
1015
+ ...t,
1016
+ placeholder: o,
1017
+ required: s,
1018
+ multiple: p,
1019
+ name: l,
1020
+ children: [
1021
+ /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
1022
+ _(e.options, (y) => /* @__PURE__ */ n.jsx(
1023
+ "option",
1024
+ {
1025
+ selected: b(y, "selected", !1),
1026
+ value: y.value,
1027
+ dangerouslySetInnerHTML: { __html: y.label }
1028
+ },
1029
+ y.value
1030
+ ))
1031
+ ]
1032
+ }
1033
+ );
1034
+ };
1035
+ d(Ae, {
1036
+ type: "Select",
1037
+ label: "Select",
1038
+ category: "core",
1039
+ icon: oe,
1040
+ group: "form",
1041
+ props: {
1042
+ styles: c({ default: "" }),
1043
+ fieldName: m({ title: "Field Name", default: "select" }),
1044
+ showLabel: h({ title: "Show label", default: !0 }),
1045
+ inputStyles: c({ default: "w-full p-1" }),
1046
+ label: m({ title: "Label", default: "Label" }),
1047
+ placeholder: m({
1048
+ title: "Placeholder",
1049
+ default: "Placeholder"
1050
+ }),
1051
+ required: h({ title: "Required", default: !1 }),
1052
+ _multiple: h({ title: "Multiple Choice", default: !1 }),
1053
+ options: de({
1054
+ title: "Options",
1055
+ itemProperties: {
1056
+ label: m({ title: "Label", default: "" }),
1057
+ value: m({ title: "Value", default: "" })
1058
+ }
1059
+ })
1060
+ }
1061
+ });
1062
+ const Fe = (e) => {
1063
+ const { blockProps: t, fieldName: l, label: a, styles: o, inputStyles: r, required: i, checked: s, showLabel: f = !0 } = e, p = k();
1064
+ return f ? /* @__PURE__ */ n.jsxs("div", { ...o, ...t, children: [
1065
+ /* @__PURE__ */ n.jsx(
1066
+ "input",
1067
+ {
1068
+ ...r,
1069
+ name: l,
1070
+ id: p,
1071
+ type: "checkbox",
1072
+ required: i,
1073
+ defaultChecked: s
1074
+ }
1075
+ ),
1076
+ a && a !== "Label" && /* @__PURE__ */ n.jsx("label", { htmlFor: p, children: a })
1077
+ ] }) : /* @__PURE__ */ n.jsx(
1078
+ "input",
1079
+ {
1080
+ id: p,
1081
+ ...t,
1082
+ ...r,
1083
+ ...o,
1084
+ type: "checkbox",
1085
+ required: i,
1086
+ name: l
1087
+ }
1088
+ );
1089
+ };
1090
+ d(Fe, {
1091
+ type: "Checkbox",
1092
+ label: "Checkbox",
1093
+ category: "core",
1094
+ icon: re,
1095
+ group: "form",
1096
+ props: {
1097
+ fieldName: m({ title: "Field Name", default: "checkbox" }),
1098
+ styles: c({ default: "flex items-center gap-x-2" }),
1099
+ label: m({ title: "Label", default: "Label" }),
1100
+ checked: h({ title: "Checked", default: !1 }),
1101
+ required: h({ title: "Required", default: !1 })
1102
+ }
1103
+ });
1104
+ const $e = (e) => {
1105
+ const { blockProps: t, fieldName: l, label: a, styles: o, inputStyles: r, checked: i, required: s, showLabel: f = !0 } = e, p = k();
1106
+ return f ? /* @__PURE__ */ n.jsxs("div", { ...o, ...t, children: [
1107
+ /* @__PURE__ */ n.jsx("input", { ...r, name: l, id: p, type: "radio", required: s, defaultChecked: i }),
1108
+ a && /* @__PURE__ */ n.jsx("label", { htmlFor: p, children: a })
1109
+ ] }) : /* @__PURE__ */ n.jsx(
1110
+ "input",
1111
+ {
1112
+ id: p,
1113
+ ...t,
1114
+ ...r,
1115
+ ...o,
1116
+ type: "radio",
1117
+ required: s,
1118
+ checked: i,
1119
+ name: l
1120
+ }
1121
+ );
1122
+ };
1123
+ d($e, {
1124
+ type: "Radio",
1125
+ label: "Radio",
1126
+ category: "core",
1127
+ icon: ne,
1128
+ group: "form",
1129
+ props: {
1130
+ styles: c({ default: "flex items-center w-max gap-x-2" }),
1131
+ fieldName: m({ title: "Field Name", default: "radio" }),
1132
+ label: m({ title: "Label", default: "Label" }),
1133
+ checked: h({ title: "Checked", default: !1 }),
1134
+ required: h({ title: "Required", default: !1 })
1135
+ }
1136
+ });
1137
+ const De = (e) => {
1138
+ const { blockProps: t, inBuilder: l, label: a, placeholder: o, styles: r, inputStyles: i, icon: s, iconPos: f } = e, p = k(), g = {
1139
+ "x-bind:disabled": "formLoading"
1140
+ };
1141
+ return /* @__PURE__ */ n.jsxs(
1142
+ "button",
1143
+ {
1144
+ id: p,
1145
+ ...g,
1146
+ ...i,
1147
+ ...r,
1148
+ ...t || {},
1149
+ type: l ? "button" : "submit",
1150
+ placeholder: o,
1151
+ children: [
1152
+ a,
1153
+ s && /* @__PURE__ */ n.jsx("span", { className: f, dangerouslySetInnerHTML: { __html: s } })
1154
+ ]
1155
+ }
1156
+ );
1157
+ };
1158
+ d(De, {
1159
+ type: "FormButton",
1160
+ label: "Submit Button",
1161
+ category: "core",
1162
+ icon: N,
1163
+ group: "form",
1164
+ props: {
1165
+ label: m({ title: "Label", default: "Submit" }),
1166
+ styles: c({
1167
+ default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
1168
+ }),
1169
+ icon: j({ title: "Icon", default: "" }),
1170
+ iconPos: L({
1171
+ title: "Icon Position",
1172
+ default: "order-last",
1173
+ options: [
1174
+ { title: "Start", value: "order-first" },
1175
+ { title: "End", value: "order-last" }
1176
+ ]
1177
+ })
1178
+ }
1179
+ });
1180
+ export {
1181
+ ce as b,
1182
+ se as c,
1183
+ L as f,
1184
+ B as g,
1185
+ q as o,
1186
+ h as r,
1187
+ m as u,
1188
+ Ye as y
1189
+ };