@chaibuilder/sdk 1.0.20 → 1.0.21

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 (94) hide show
  1. package/dist/{AddBlocks-U6bHEqmk.js → AddBlocks-0-e393Fn.js} +7 -5
  2. package/dist/AddBlocks-p68Cz79o.cjs +3 -0
  3. package/dist/BrandingOptions-HtNCJO9_.cjs +1 -0
  4. package/dist/{BrandingOptions-qDgIOayU.js → BrandingOptions-QqqJ-YRb.js} +14 -21
  5. package/dist/{CanvasArea-_poBbOON.js → CanvasArea-0hMAhzxn.js} +14 -13
  6. package/dist/{CanvasArea-yXpQHB6x.cjs → CanvasArea-pZz5czrV.cjs} +4 -4
  7. package/dist/{CurrentPage-SrovfgGL.js → CurrentPage-UOkxZISs.js} +15 -14
  8. package/dist/CurrentPage-phMDH1Ub.cjs +1 -0
  9. package/dist/Layers-NKZXi2LV.cjs +1 -0
  10. package/dist/{Layers-OKJ5nkTF.js → Layers-TB-Lriju.js} +17 -16
  11. package/dist/MODIFIERS-MLfpKQY1.js +73 -0
  12. package/dist/MODIFIERS-WFzDQfiT.cjs +1 -0
  13. package/dist/MarkAsGlobalBlock-5h3wP4zj.cjs +1 -0
  14. package/dist/{MarkAsGlobalBlock-Ynq-S6mW.js → MarkAsGlobalBlock-Pa8po8qP.js} +10 -9
  15. package/dist/PagesPanel-ffrNyFyp.cjs +1 -0
  16. package/dist/{PagesPanel-5macGkBU.js → PagesPanel-mAMSbYPt.js} +20 -19
  17. package/dist/ProjectPanel-1ywILLme.cjs +1 -0
  18. package/dist/{ProjectPanel-HS_TJ2k0.js → ProjectPanel-XvsYajju.js} +16 -15
  19. package/dist/{Settings-23ZBoDkz.js → Settings-8AbHXcDP.js} +18 -16
  20. package/dist/Settings-hdmnT_mI.cjs +1 -0
  21. package/dist/{SidePanels-HzpyQU1x.js → SidePanels-LQg3mdC4.js} +27 -26
  22. package/dist/SidePanels-xaNrI3oK.cjs +1 -0
  23. package/dist/Topbar-A3WZDrK4.cjs +1 -0
  24. package/dist/{Topbar-tfg74vbT.js → Topbar-wA6jhMj9.js} +26 -25
  25. package/dist/UnsplashImages-E8zPMgJf.cjs +1 -0
  26. package/dist/{UnsplashImages-tvUZGbHK.js → UnsplashImages-mzIO1QeT.js} +8 -7
  27. package/dist/UploadImages-qEuDUEMn.cjs +1 -0
  28. package/dist/{UploadImages-pKoVEsI7.js → UploadImages-qMeaY4sk.js} +8 -7
  29. package/dist/add-page-modal-9deiA1W9.cjs +1 -0
  30. package/dist/{add-page-modal-217go3Eh.js → add-page-modal-oER3yE4F.js} +20 -18
  31. package/dist/{confirm-alert-AG96Fmck.js → confirm-alert-rDSai_jQ.js} +9 -8
  32. package/dist/confirm-alert-tH8UCCSF.cjs +1 -0
  33. package/dist/controls-G0puEH71.js +120 -0
  34. package/dist/controls-aHZq-q4b.cjs +1 -0
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.js +72 -71
  37. package/dist/{delete-page-modal-YYt_TVmB.js → delete-page-modal-QzQdrLYI.js} +21 -20
  38. package/dist/delete-page-modal-ShTRkqkB.cjs +1 -0
  39. package/dist/{form-Ik57WNLs.cjs → form-MlgUSEy_.cjs} +1 -1
  40. package/dist/{form-gIapXg-W.js → form-vWeEsG9Y.js} +2 -2
  41. package/dist/functions-eu6BbvqO.cjs +2 -0
  42. package/dist/functions-hmbWDcnW.js +1108 -0
  43. package/dist/{index-PrUoEet_.js → index-G55KtqnU.js} +190 -189
  44. package/dist/index-T5MFAHA0.cjs +1 -0
  45. package/dist/{index-4DQm5fFW.js → index-mLIwGF5W.js} +5439 -5429
  46. package/dist/{index-tTN-yd28.cjs → index-pCHSFoQO.cjs} +44 -44
  47. package/dist/{jsx-runtime-qAwJ85SY.js → jsx-runtime-NV737rRe.js} +1 -1
  48. package/dist/{jsx-runtime-WKRPbKtm.cjs → jsx-runtime-WUGKV8jN.cjs} +6 -6
  49. package/dist/lib.cjs +1 -2
  50. package/dist/lib.js +116 -1208
  51. package/dist/page-viewer-GPNN1H92.cjs +1 -0
  52. package/dist/{page-viewer-LQSQxs98.js → page-viewer-X3IEOrUC.js} +17 -16
  53. package/dist/project-general-setting-HZeYf9A1.cjs +1 -0
  54. package/dist/{project-general-setting-04N25MvJ.js → project-general-setting-oujmeWOG.js} +21 -19
  55. package/dist/project-seo-setting-3FZQXaTn.cjs +1 -0
  56. package/dist/{project-seo-setting-zxnjvt3c.js → project-seo-setting-_X6ckVa4.js} +17 -24
  57. package/dist/render.cjs +1 -1
  58. package/dist/render.js +40 -44
  59. package/dist/single-page-detail-ILshOKys.cjs +1 -0
  60. package/dist/{single-page-detail-lJHZSKqK.js → single-page-detail-SxboE7TI.js} +46 -44
  61. package/dist/studio.cjs +1 -1
  62. package/dist/studio.js +20 -19
  63. package/dist/ui.cjs +1 -1
  64. package/dist/ui.d.ts +4 -4
  65. package/dist/ui.js +144 -143
  66. package/dist/utils-It2K33fU.cjs +1 -0
  67. package/dist/{Class-nQk08vqd.js → utils-PPBbw5bk.js} +115 -183
  68. package/package.json +2 -7
  69. package/dist/AddBlocks-LvIqNyBE.cjs +0 -3
  70. package/dist/BrandingOptions-viABH78W.cjs +0 -1
  71. package/dist/Class-RZuPYbUS.cjs +0 -1
  72. package/dist/CurrentPage-XWSb_RZ8.cjs +0 -1
  73. package/dist/Layers-oluQMEyo.cjs +0 -1
  74. package/dist/MarkAsGlobalBlock-PG9EQfno.cjs +0 -1
  75. package/dist/PagesPanel-wYA8ksbF.cjs +0 -1
  76. package/dist/ProjectPanel-4hGK3CSo.cjs +0 -1
  77. package/dist/Settings-KS4sVa5a.cjs +0 -1
  78. package/dist/SidePanels-IfwzrWxw.cjs +0 -1
  79. package/dist/Topbar-zZtHp9g8.cjs +0 -1
  80. package/dist/UnsplashImages-nA7MSE46.cjs +0 -1
  81. package/dist/UploadImages-Ne7knL-U.cjs +0 -1
  82. package/dist/add-page-modal-az5Y2__Z.cjs +0 -1
  83. package/dist/blocks.cjs +0 -1
  84. package/dist/blocks.d.ts +0 -4
  85. package/dist/blocks.js +0 -20
  86. package/dist/confirm-alert-tADWj_Cs.cjs +0 -1
  87. package/dist/delete-page-modal-iits21u4.cjs +0 -1
  88. package/dist/index-SSmZipiF.js +0 -1191
  89. package/dist/index-UXNvQkHk.cjs +0 -1
  90. package/dist/index-plLNWLKk.cjs +0 -9
  91. package/dist/page-viewer-2SE5kCoO.cjs +0 -1
  92. package/dist/project-general-setting-XunBDyuZ.cjs +0 -1
  93. package/dist/project-seo-setting-_nu22LPz.cjs +0 -1
  94. package/dist/single-page-detail-TjWZvxFa.cjs +0 -1
@@ -1,1191 +0,0 @@
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 { registerChaiBlock as d } from "@chaibuilder/runtime";
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
- const Xe = "";
1181
- export {
1182
- ce as b,
1183
- se as c,
1184
- L as f,
1185
- B as g,
1186
- Xe as i,
1187
- q as o,
1188
- h as r,
1189
- m as u,
1190
- Ye as y
1191
- };