@chaibuilder/sdk 1.2.25 → 1.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AddBlocks-S-4jzdWv.cjs +1 -0
- package/dist/AddBlocks-ksZjjn0k.js +205 -0
- package/dist/BrandingOptions-EMCT0Wa3.cjs +1 -0
- package/dist/{BrandingOptions-iTyWpwTs.js → BrandingOptions-T_kbQFQv.js} +53 -40
- package/dist/CanvasArea-SDzbubar.cjs +55 -0
- package/dist/{CanvasArea-dZjng782.js → CanvasArea-rhOeubmu.js} +323 -340
- package/dist/{Class-ahc3NIbq.js → Class-3k8xjeiM.js} +29 -26
- package/dist/Class-MmCxz2Ay.cjs +1 -0
- package/dist/{CurrentPage-Kmfp-kFk.js → CurrentPage-0eeU1V_c.js} +53 -40
- package/dist/CurrentPage-aTjWjc3o.cjs +1 -0
- package/dist/Functions-7jnEwJyw.js +15 -0
- package/dist/Functions-N3yhPYKY.cjs +1 -0
- package/dist/{ListTree-N3jeD790.js → ListTree-Muu4rAtp.js} +96 -87
- package/dist/ListTree-SWsqdfcG.cjs +1 -0
- package/dist/MODIFIERS-9EwxLM8V.cjs +1 -0
- package/dist/{MODIFIERS-CNqNUapY.js → MODIFIERS-WQdaNvb8.js} +8 -10
- package/dist/PagesPanel-n3x-0ozR.cjs +1 -0
- package/dist/{PagesPanel-u1IB-nRr.js → PagesPanel-rYN28QpN.js} +44 -29
- package/dist/ProjectPanel-ivFOhdcz.js +84 -0
- package/dist/ProjectPanel-pBePMOta.cjs +1 -0
- package/dist/Settings-JRyJayf5.cjs +1 -0
- package/dist/{Settings-jCcd-VE6.js → Settings-XWmKzRl9.js} +400 -407
- package/dist/SidePanels-BtUeo6M9.cjs +1 -0
- package/dist/{SidePanels-pHMYprpW.js → SidePanels-ODktnGbC.js} +117 -108
- package/dist/Topbar-QMeD3hvq.cjs +1 -0
- package/dist/Topbar-Yunooh00.js +131 -0
- package/dist/UnsplashImages-05JR8oIu.cjs +1 -0
- package/dist/{UnsplashImages-L7x_3RQf.js → UnsplashImages-QMl0bxix.js} +59 -47
- package/dist/UploadImages-OgSN1HVt.cjs +1 -0
- package/dist/{UploadImages-zdEJRLD8.js → UploadImages-Si-A26bc.js} +58 -36
- package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
- package/dist/add-page-modal-9pTKItY-.cjs +1 -0
- package/dist/add-page-modal-U7AUUrI1.js +103 -0
- package/dist/confirm-alert-DhRc-Zcd.cjs +1 -0
- package/dist/confirm-alert-kV5-c70T.js +59 -0
- package/dist/controls-KK2oLIa8.cjs +1 -0
- package/dist/{controls-IS5qnRce.js → controls-OfJWSEqC.js} +85 -20
- package/dist/core.cjs +1 -1
- package/dist/core.js +74 -150
- package/dist/defaultTheme-7Lk2zq60.cjs +1 -0
- package/dist/{defaultTheme-4kA60XdB.js → defaultTheme-gunU_Fe5.js} +8 -6
- package/dist/delete-page-modal-4s-6AIy4.cjs +1 -0
- package/dist/delete-page-modal-UCBpdjLe.js +82 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +292 -3
- package/dist/email.cjs +1 -1
- package/dist/email.js +36 -18
- package/dist/empty-slot-ZBlsQi6m.js +15 -0
- package/dist/empty-slot-nzYOgZuS.cjs +1 -0
- package/dist/form-Ap63cNec.cjs +1 -0
- package/dist/{form-0_RLz2TB.js → form-zmlTjM9j.js} +12 -12
- package/dist/html-to-json-C_Eobs_d.cjs +1 -0
- package/dist/{html-to-json-2xtb7520.js → html-to-json-p__Fgqdg.js} +65 -40
- package/dist/index-CFUoB97-.js +3079 -0
- package/dist/index-F4AQQ6qq.cjs +1 -0
- package/dist/index-Qk028f-N.cjs +1 -0
- package/dist/index-YpnaudSM.js +63 -0
- package/dist/index-e0c8PmRQ.js +205 -0
- package/dist/index-ecnGWzh9.cjs +1 -0
- package/dist/index-f0AbmoYY.js +2201 -0
- package/dist/index-gi1LIOCw.cjs +1 -0
- package/dist/index-l19JVVXI.cjs +206 -0
- package/dist/index-lOJfSheQ.js +39503 -0
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-WbnYoNE9.js} +109 -106
- package/dist/jsx-runtime-Z_BpKhVy.cjs +27 -0
- package/dist/lib.cjs +3 -3
- package/dist/lib.js +59 -56
- package/dist/page-viewer-YFrIG3L7.cjs +1 -0
- package/dist/{page-viewer-NnOwmAmu.js → page-viewer-jOwy--9A.js} +56 -43
- package/dist/{project-general-setting-9ju3TDju.js → project-general-setting-3N8HZ2fe.js} +42 -35
- package/dist/project-general-setting-hK7I7FuN.cjs +1 -0
- package/dist/{project-seo-setting-36CdUszM.js → project-seo-setting-bSiNgO_1.js} +39 -23
- package/dist/project-seo-setting-x-FK0pez.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +16 -16
- package/dist/{single-page-detail-hD1jKZ8k.js → single-page-detail--AZlZ-pC.js} +73 -66
- package/dist/single-page-detail-9abF2g2R.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +39 -24
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +158 -364
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +1052 -3
- package/package.json +1 -1
- package/dist/AddBlocks-Ol3iIVKa.js +0 -207
- package/dist/AddBlocks-a1c-7Ewz.cjs +0 -1
- package/dist/BrandingOptions-6rnt0UaA.cjs +0 -1
- package/dist/CanvasArea-R4ogF9AT.cjs +0 -55
- package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +0 -163
- package/dist/ChaiBuilderEditor-vP4at00I.js +0 -27974
- package/dist/Class-eieto7e-.cjs +0 -1
- package/dist/Controls-3Cc1XYXg.js +0 -105
- package/dist/Controls-ky25Ebo3.cjs +0 -1
- package/dist/CurrentPage-3gQTH0Zt.cjs +0 -1
- package/dist/Functions-Hvon6AMZ.cjs +0 -1
- package/dist/Functions-NzT2Six_.js +0 -15
- package/dist/ImagesPanel-J1RlG7xG.cjs +0 -1
- package/dist/ImagesPanel-Wb0GF_NA.js +0 -29
- package/dist/ListTree-CZ-mtjZ9.cjs +0 -1
- package/dist/MODIFIERS-o1p3VnpS.cjs +0 -1
- package/dist/PagesPanel-Gi0z6gaf.cjs +0 -1
- package/dist/ProjectPanel-EydGZmMW.js +0 -71
- package/dist/ProjectPanel-kiiljG4H.cjs +0 -1
- package/dist/STRINGS-b432aBJJ.js +0 -7
- package/dist/STRINGS-gPz7CUOk.cjs +0 -1
- package/dist/Settings-8ilCSH8b.cjs +0 -1
- package/dist/SidePanels-T36C6Lhc.cjs +0 -1
- package/dist/Topbar-CvWQuspR.cjs +0 -1
- package/dist/Topbar-pbIDUE_B.js +0 -122
- package/dist/UnsplashImages-KBZPd9dv.cjs +0 -1
- package/dist/UploadImages-GkkJVAgG.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal-9SGv2hgc.cjs +0 -1
- package/dist/add-page-modal-JCDXZIPW.js +0 -95
- package/dist/alert-dialog-P9xMMB6C.cjs +0 -1
- package/dist/alert-dialog-rypfO5ly.js +0 -64
- package/dist/badge-E-S7CqUt.cjs +0 -1
- package/dist/badge-tEwO7C51.js +0 -23
- package/dist/block-helpers-OKHmRRol.cjs +0 -1
- package/dist/block-helpers-oSFpSsGz.js +0 -23
- package/dist/command-BxR6jaCI.cjs +0 -1
- package/dist/command-Pn3HKDuV.js +0 -97
- package/dist/confirm-alert-uNm0lZ0y.cjs +0 -1
- package/dist/confirm-alert-wR5_VJ1l.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-L7DPvB0m.cjs +0 -1
- package/dist/defaultTheme-mrkeGFGI.cjs +0 -1
- package/dist/delete-page-modal-7KmP1elv.js +0 -67
- package/dist/delete-page-modal-SgfwvfNu.cjs +0 -1
- package/dist/dropdown-menu-El86_9Uo.js +0 -124
- package/dist/dropdown-menu-SiHzqWwZ.cjs +0 -1
- package/dist/form-W58AVUdf.cjs +0 -1
- package/dist/hover-card-KUwpDkW8.cjs +0 -1
- package/dist/hover-card-q138xxXR.js +0 -45
- package/dist/html-to-json-uSnxl72F.cjs +0 -1
- package/dist/iconBase-gbUAAO2L.cjs +0 -1
- package/dist/iconBase-h4DuR_XT.js +0 -63
- package/dist/index-9MmykVSc.cjs +0 -1
- package/dist/index-hElOGcFr.js +0 -2200
- package/dist/index-lDTsQp7h.js +0 -188
- package/dist/index-rq5Y9ZDy.cjs +0 -1
- package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-WbcKdQ9k.cjs +0 -1
- package/dist/link-xuhP-4dN.js +0 -196
- package/dist/page-viewer-Hx5hxHKm.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-FxkwjvJz.cjs +0 -1
- package/dist/project-seo-setting-RU7qiXxb.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-beY0MT1b.cjs +0 -1
- package/dist/skeleton-STeL9VrJ.cjs +0 -1
- package/dist/skeleton-lu8e7q2y.js +0 -239
- package/dist/tabs-_4WbA1cc.cjs +0 -1
- package/dist/tabs-yQ3oGziM.js +0 -106
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/useAddBlock-8pxOEYIl.cjs +0 -1
- package/dist/useAddBlock-FEKFJNwQ.js +0 -69
- package/dist/useChaiExternalData-fkFgoS80.js +0 -6
- package/dist/useChaiExternalData-rwoAZ6uU.cjs +0 -1
- package/dist/useDarkMode-7i57segK.cjs +0 -1
- package/dist/useDarkMode-8VHJlYyE.js +0 -23
- package/dist/useSelectedBreakpoints-6NK5qd7T.js +0 -10
- package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +0 -1
- package/dist/useStylingState-Iuj84yvc.js +0 -186
- package/dist/useStylingState-OIvJMV6p.cjs +0 -1
- package/dist/useUiLibraries-nCdauJ4N.cjs +0 -1
- package/dist/useUiLibraries-psyWFbNc.js +0 -12
- package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +0 -1
- package/dist/useUpdateBlocksProps-vWcDp-P9.js +0 -23
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
package/dist/ui.js
CHANGED
|
@@ -1,383 +1,177 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { c as r } from "./utils-dze1SGvB.js";
|
|
6
|
-
import { H as we, b as Me, a as ve, S as Te } from "./hover-card-q138xxXR.js";
|
|
7
|
-
import { B as je, S as Re, g as Ie, T as Ae, c as ke, e as Pe, d as Le, a as ze, b as Fe, r as Ge, t as He, f as Ve } from "./skeleton-lu8e7q2y.js";
|
|
8
|
-
import { A as Ee, c as Oe, a as qe, b as Je } from "./accordion-oPUeqPCZ.js";
|
|
9
|
-
import { A as Qe, b as Ue, a as We, C as Xe, g as Ye, f as Ze, d as _e, c as $e, e as et, T as tt } from "./textarea-b2QvVhrK.js";
|
|
10
|
-
import { B as ot, b as st } from "./badge-tEwO7C51.js";
|
|
11
|
-
import { A as nt, g as it, h as dt, b as lt, f as mt, d as ct, c as pt, e as ut, a as ft } from "./alert-dialog-rypfO5ly.js";
|
|
12
|
-
import { D as xt, b as bt, f as ht, d as Ct, c as yt, e as Nt, a as St, T as wt, i as Mt, g as vt, h as Tt } from "./tabs-yQ3oGziM.js";
|
|
13
|
-
import { C as jt, a as Rt, d as It, e as At, b as kt, f as Pt, c as Lt, h as zt, g as Ft, I as Gt } from "./command-Pn3HKDuV.js";
|
|
14
|
-
import { L as Vt } from "./label-KaP7MRrs.js";
|
|
15
|
-
import { S as Et, a as Ot } from "./scroll-area-ewXbxc3n.js";
|
|
16
|
-
import { P as Jt, b as Kt, a as Qt } from "./popover-a84pbVhQ.js";
|
|
17
|
-
import { ChevronRightIcon as g, CheckIcon as x, DotFilledIcon as b, Cross2Icon as h } from "@radix-ui/react-icons";
|
|
18
|
-
import * as s from "@radix-ui/react-menubar";
|
|
19
|
-
import { S as Wt, d as Xt, a as Yt, f as Zt, e as _t, g as $t, c as ea, b as ta } from "./select-POGdEDHT.js";
|
|
20
|
-
import * as d from "@radix-ui/react-dialog";
|
|
21
|
-
import { D as oa, d as sa, b as ra, i as na, c as ia, f as da, j as la, n as ma, e as ca, g as pa, h as ua, k as fa, l as ga, m as xa, a as ba } from "./dropdown-menu-El86_9Uo.js";
|
|
22
|
-
import { S as Ca } from "./separator-SctTn0Qi.js";
|
|
23
|
-
import { C as Na, d as Sa, b as wa, i as Ma, c as va, f as Ta, j as Da, n as ja, e as Ra, g as Ia, h as Aa, k as ka, l as Pa, m as La, a as za } from "./context-menu-8dC9uGXj.js";
|
|
24
|
-
import { I as Ga, a as Ha, L as Va, R as Ba } from "./link-xuhP-4dN.js";
|
|
1
|
+
import { b9 as q, bc as y, ba as z, bb as J, bp as K, bC as W, A as X, ai as Y, g as Z, b as _, e as $, f as N, c as O, d as Q, a as U, bq as aa, as as ea, B as oa, bj as ta, bm as ra, bl as sa, bo as na, bk as ia, bE as ba, aY as pa, cc as ua, a$ as la, b0 as ma, aZ as ca, b1 as da, a_ as ga, ce as Ca, cd as Ma, bu as Sa, cf as Da, bt as Ta, ck as xa, bs as Aa, ch as ha, cl as Ia, cp as wa, cg as Pa, ci as ka, cj as Fa, cm as Ga, cn as La, co as va, bv as Ha, ad as Ra, ae as Ba, ah as Va, b2 as fa, af as Ea, ag as ja, ao as qa, aG as ya, aL as za, aI as Ja, bg as Ka, bh as Wa, aJ as Xa, c4 as Ya, c8 as Za, c3 as _a, aK as $a, bi as Na, c5 as Oa, c6 as Qa, c7 as Ua, aH as ae, aD as ee, aF as oe, aE as te, b6 as re, b7 as se, bd as ne, aB as ie, b8 as be, bG as pe, bN as ue, bJ as le, bT as me, bK as ce, bM as de, bH as ge, bQ as Ce, bO as Me, bP as Se, bL as De, bV as Te, bU as xe, bR as Ae, bS as he, bI as Ie, aV as we, aX as Pe, aW as ke, b5 as Fe, bf as Ge, bF as Le, aj as ve, am as He, ay as Re, an as Be, az as Ve, bW as fe, ak as Ee, al as je, aA as qe, bX as ye, bZ as ze, b_ as Je, c2 as Ke, c0 as We, b$ as Xe, c1 as Ye, bY as Ze, S as _e, aC as $e, au as Ne, ax as Oe, av as Qe, aw as Ue, bn as ao, I as eo, bz as oo, ap as to, ar as ro, be as so, T as no, aq as io, bD as bo, bB as po, c9 as uo, cb as lo, bA as mo, ca as co } from "./index-CFUoB97-.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "lodash-es";
|
|
4
|
+
import "./Functions-7jnEwJyw.js";
|
|
25
5
|
import "clsx";
|
|
26
6
|
import "tailwind-merge";
|
|
27
|
-
import "@
|
|
28
|
-
import "@radix-ui/react-hover-card";
|
|
7
|
+
import "@chaibuilder/runtime";
|
|
29
8
|
import "jotai";
|
|
30
|
-
import "
|
|
9
|
+
import "./MODIFIERS-WQdaNvb8.js";
|
|
10
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
11
|
+
import "@react-hookz/web";
|
|
12
|
+
import "./Class-3k8xjeiM.js";
|
|
13
|
+
import "react-i18next";
|
|
14
|
+
import "./jsx-runtime-WbnYoNE9.js";
|
|
15
|
+
import "@radix-ui/react-toggle";
|
|
16
|
+
import "class-variance-authority";
|
|
17
|
+
import "@radix-ui/react-switch";
|
|
31
18
|
import "@radix-ui/react-slot";
|
|
32
|
-
import "@radix-ui/react-tooltip";
|
|
33
|
-
import "@radix-ui/react-toast";
|
|
34
19
|
import "@radix-ui/react-accordion";
|
|
20
|
+
import "@radix-ui/react-icons";
|
|
35
21
|
import "@radix-ui/react-alert-dialog";
|
|
36
|
-
import "@radix-ui/react-
|
|
37
|
-
import "cmdk";
|
|
22
|
+
import "@radix-ui/react-dialog";
|
|
38
23
|
import "@radix-ui/react-label";
|
|
39
24
|
import "@radix-ui/react-scroll-area";
|
|
25
|
+
import "@radix-ui/react-tabs";
|
|
26
|
+
import "@radix-ui/react-tooltip";
|
|
40
27
|
import "@radix-ui/react-popover";
|
|
28
|
+
import "@radix-ui/react-menubar";
|
|
29
|
+
import "@radix-ui/react-hover-card";
|
|
41
30
|
import "@radix-ui/react-select";
|
|
42
31
|
import "@radix-ui/react-dropdown-menu";
|
|
43
32
|
import "@radix-ui/react-separator";
|
|
33
|
+
import "@radix-ui/react-toast";
|
|
34
|
+
import "cmdk";
|
|
44
35
|
import "@radix-ui/react-context-menu";
|
|
45
36
|
import "react-icons-picker";
|
|
46
37
|
import "react-dom";
|
|
47
|
-
import "./ImagesPanel-Wb0GF_NA.js";
|
|
48
38
|
import "react-quill";
|
|
49
|
-
import "react-i18next";
|
|
50
|
-
const C = c(
|
|
51
|
-
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
52
|
-
{
|
|
53
|
-
variants: {
|
|
54
|
-
variant: {
|
|
55
|
-
default: "bg-transparent",
|
|
56
|
-
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
57
|
-
},
|
|
58
|
-
size: {
|
|
59
|
-
default: "h-10 px-3",
|
|
60
|
-
sm: "h-9 px-2.5",
|
|
61
|
-
lg: "h-11 px-5"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
defaultVariants: {
|
|
65
|
-
variant: "default",
|
|
66
|
-
size: "default"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
), y = i.forwardRef(({ className: e, variant: t, size: o, ...n }, l) => /* @__PURE__ */ a.jsx(m.Root, { ref: l, className: r(C({ variant: t, size: o, className: e })), ...n }));
|
|
70
|
-
y.displayName = m.Root.displayName;
|
|
71
|
-
const ue = s.Menu, fe = s.Group, ge = s.Portal, xe = s.Sub, be = s.RadioGroup, N = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
72
|
-
s.Root,
|
|
73
|
-
{
|
|
74
|
-
ref: o,
|
|
75
|
-
className: r("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
|
|
76
|
-
...t
|
|
77
|
-
}
|
|
78
|
-
));
|
|
79
|
-
N.displayName = s.Root.displayName;
|
|
80
|
-
const S = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
81
|
-
s.Trigger,
|
|
82
|
-
{
|
|
83
|
-
ref: o,
|
|
84
|
-
className: r(
|
|
85
|
-
"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
86
|
-
e
|
|
87
|
-
),
|
|
88
|
-
...t
|
|
89
|
-
}
|
|
90
|
-
));
|
|
91
|
-
S.displayName = s.Trigger.displayName;
|
|
92
|
-
const w = i.forwardRef(({ className: e, inset: t, children: o, ...n }, l) => /* @__PURE__ */ a.jsxs(
|
|
93
|
-
s.SubTrigger,
|
|
94
|
-
{
|
|
95
|
-
ref: l,
|
|
96
|
-
className: r(
|
|
97
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
98
|
-
t && "pl-8",
|
|
99
|
-
e
|
|
100
|
-
),
|
|
101
|
-
...n,
|
|
102
|
-
children: [
|
|
103
|
-
o,
|
|
104
|
-
/* @__PURE__ */ a.jsx(g, { className: "ml-auto h-4 w-4" })
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
));
|
|
108
|
-
w.displayName = s.SubTrigger.displayName;
|
|
109
|
-
const M = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
110
|
-
s.SubContent,
|
|
111
|
-
{
|
|
112
|
-
ref: o,
|
|
113
|
-
className: r(
|
|
114
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
115
|
-
e
|
|
116
|
-
),
|
|
117
|
-
...t
|
|
118
|
-
}
|
|
119
|
-
));
|
|
120
|
-
M.displayName = s.SubContent.displayName;
|
|
121
|
-
const v = i.forwardRef(({ className: e, align: t = "start", alignOffset: o = -4, sideOffset: n = 8, ...l }, f) => /* @__PURE__ */ a.jsx(s.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
122
|
-
s.Content,
|
|
123
|
-
{
|
|
124
|
-
ref: f,
|
|
125
|
-
align: t,
|
|
126
|
-
alignOffset: o,
|
|
127
|
-
sideOffset: n,
|
|
128
|
-
className: r(
|
|
129
|
-
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
130
|
-
e
|
|
131
|
-
),
|
|
132
|
-
...l
|
|
133
|
-
}
|
|
134
|
-
) }));
|
|
135
|
-
v.displayName = s.Content.displayName;
|
|
136
|
-
const T = i.forwardRef(({ className: e, inset: t, ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
137
|
-
s.Item,
|
|
138
|
-
{
|
|
139
|
-
ref: n,
|
|
140
|
-
className: r(
|
|
141
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
142
|
-
t && "pl-8",
|
|
143
|
-
e
|
|
144
|
-
),
|
|
145
|
-
...o
|
|
146
|
-
}
|
|
147
|
-
));
|
|
148
|
-
T.displayName = s.Item.displayName;
|
|
149
|
-
const D = i.forwardRef(({ className: e, children: t, checked: o, ...n }, l) => /* @__PURE__ */ a.jsxs(
|
|
150
|
-
s.CheckboxItem,
|
|
151
|
-
{
|
|
152
|
-
ref: l,
|
|
153
|
-
className: r(
|
|
154
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
155
|
-
e
|
|
156
|
-
),
|
|
157
|
-
checked: o,
|
|
158
|
-
...n,
|
|
159
|
-
children: [
|
|
160
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(s.ItemIndicator, { children: /* @__PURE__ */ a.jsx(x, { className: "h-4 w-4" }) }) }),
|
|
161
|
-
t
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
));
|
|
165
|
-
D.displayName = s.CheckboxItem.displayName;
|
|
166
|
-
const j = i.forwardRef(({ className: e, children: t, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
167
|
-
s.RadioItem,
|
|
168
|
-
{
|
|
169
|
-
ref: n,
|
|
170
|
-
className: r(
|
|
171
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
172
|
-
e
|
|
173
|
-
),
|
|
174
|
-
...o,
|
|
175
|
-
children: [
|
|
176
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(s.ItemIndicator, { children: /* @__PURE__ */ a.jsx(b, { className: "h-4 w-4 fill-current" }) }) }),
|
|
177
|
-
t
|
|
178
|
-
]
|
|
179
|
-
}
|
|
180
|
-
));
|
|
181
|
-
j.displayName = s.RadioItem.displayName;
|
|
182
|
-
const R = i.forwardRef(({ className: e, inset: t, ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
183
|
-
s.Label,
|
|
184
|
-
{
|
|
185
|
-
ref: n,
|
|
186
|
-
className: r("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
187
|
-
...o
|
|
188
|
-
}
|
|
189
|
-
));
|
|
190
|
-
R.displayName = s.Label.displayName;
|
|
191
|
-
const I = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(s.Separator, { ref: o, className: r("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
192
|
-
I.displayName = s.Separator.displayName;
|
|
193
|
-
const A = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: r("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
194
|
-
A.displayname = "MenubarShortcut";
|
|
195
|
-
const he = d.Root, Ce = d.Trigger, ye = d.Close, p = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(d.Portal, { className: r(e), ...t });
|
|
196
|
-
p.displayName = d.Portal.displayName;
|
|
197
|
-
const u = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
198
|
-
d.Overlay,
|
|
199
|
-
{
|
|
200
|
-
className: r(
|
|
201
|
-
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
202
|
-
e
|
|
203
|
-
),
|
|
204
|
-
...t,
|
|
205
|
-
ref: o
|
|
206
|
-
}
|
|
207
|
-
));
|
|
208
|
-
u.displayName = d.Overlay.displayName;
|
|
209
|
-
const k = c(
|
|
210
|
-
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
211
|
-
{
|
|
212
|
-
variants: {
|
|
213
|
-
side: {
|
|
214
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
215
|
-
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
216
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
217
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
defaultVariants: {
|
|
221
|
-
side: "right"
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
), P = i.forwardRef(
|
|
225
|
-
({ side: e = "right", className: t, children: o, ...n }, l) => /* @__PURE__ */ a.jsxs(p, { children: [
|
|
226
|
-
/* @__PURE__ */ a.jsx(u, {}),
|
|
227
|
-
/* @__PURE__ */ a.jsxs(d.Content, { ref: l, className: r(k({ side: e }), t), ...n, children: [
|
|
228
|
-
o,
|
|
229
|
-
/* @__PURE__ */ a.jsxs(d.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
230
|
-
/* @__PURE__ */ a.jsx(h, { className: "h-4 w-4" }),
|
|
231
|
-
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
232
|
-
] })
|
|
233
|
-
] })
|
|
234
|
-
] })
|
|
235
|
-
);
|
|
236
|
-
P.displayName = d.Content.displayName;
|
|
237
|
-
const L = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: r("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
238
|
-
L.displayName = "SheetHeader";
|
|
239
|
-
const z = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
240
|
-
z.displayName = "SheetFooter";
|
|
241
|
-
const F = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(d.Title, { ref: o, className: r("text-lg font-semibold text-foreground", e), ...t }));
|
|
242
|
-
F.displayName = d.Title.displayName;
|
|
243
|
-
const G = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(d.Description, { ref: o, className: r("text-sm text-muted-foreground", e), ...t }));
|
|
244
|
-
G.displayName = d.Description.displayName;
|
|
245
39
|
export {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
40
|
+
q as Accordion,
|
|
41
|
+
y as AccordionContent,
|
|
42
|
+
z as AccordionItem,
|
|
43
|
+
J as AccordionTrigger,
|
|
44
|
+
K as Alert,
|
|
45
|
+
W as AlertDescription,
|
|
46
|
+
X as AlertDialog,
|
|
47
|
+
Y as AlertDialogAction,
|
|
48
|
+
Z as AlertDialogCancel,
|
|
49
|
+
_ as AlertDialogContent,
|
|
50
|
+
$ as AlertDialogDescription,
|
|
51
|
+
N as AlertDialogFooter,
|
|
52
|
+
O as AlertDialogHeader,
|
|
53
|
+
Q as AlertDialogTitle,
|
|
54
|
+
U as AlertDialogTrigger,
|
|
55
|
+
aa as AlertTitle,
|
|
56
|
+
ea as Badge,
|
|
57
|
+
oa as Button,
|
|
58
|
+
ta as Card,
|
|
59
|
+
ra as CardContent,
|
|
60
|
+
sa as CardDescription,
|
|
61
|
+
na as CardFooter,
|
|
62
|
+
ia as CardHeader,
|
|
63
|
+
ba as CardTitle,
|
|
64
|
+
pa as Command,
|
|
65
|
+
ua as CommandDialog,
|
|
66
|
+
la as CommandEmpty,
|
|
67
|
+
ma as CommandGroup,
|
|
68
|
+
ca as CommandInput,
|
|
69
|
+
da as CommandItem,
|
|
70
|
+
ga as CommandList,
|
|
71
|
+
Ca as CommandSeparator,
|
|
72
|
+
Ma as CommandShortcut,
|
|
73
|
+
Sa as ContextMenu,
|
|
74
|
+
Da as ContextMenuCheckboxItem,
|
|
75
|
+
Ta as ContextMenuContent,
|
|
76
|
+
xa as ContextMenuGroup,
|
|
77
|
+
Aa as ContextMenuItem,
|
|
78
|
+
ha as ContextMenuLabel,
|
|
79
|
+
Ia as ContextMenuPortal,
|
|
80
|
+
wa as ContextMenuRadioGroup,
|
|
81
|
+
Pa as ContextMenuRadioItem,
|
|
82
|
+
ka as ContextMenuSeparator,
|
|
83
|
+
Fa as ContextMenuShortcut,
|
|
84
|
+
Ga as ContextMenuSub,
|
|
85
|
+
La as ContextMenuSubContent,
|
|
86
|
+
va as ContextMenuSubTrigger,
|
|
87
|
+
Ha as ContextMenuTrigger,
|
|
88
|
+
Ra as Dialog,
|
|
89
|
+
Ba as DialogContent,
|
|
90
|
+
Va as DialogDescription,
|
|
91
|
+
fa as DialogFooter,
|
|
92
|
+
Ea as DialogHeader,
|
|
93
|
+
ja as DialogTitle,
|
|
94
|
+
qa as DialogTrigger,
|
|
95
|
+
ya as DropdownMenu,
|
|
96
|
+
za as DropdownMenuCheckboxItem,
|
|
97
|
+
Ja as DropdownMenuContent,
|
|
98
|
+
Ka as DropdownMenuGroup,
|
|
99
|
+
Wa as DropdownMenuItem,
|
|
100
|
+
Xa as DropdownMenuLabel,
|
|
101
|
+
Ya as DropdownMenuPortal,
|
|
102
|
+
Za as DropdownMenuRadioGroup,
|
|
103
|
+
_a as DropdownMenuRadioItem,
|
|
104
|
+
$a as DropdownMenuSeparator,
|
|
105
|
+
Na as DropdownMenuShortcut,
|
|
106
|
+
Oa as DropdownMenuSub,
|
|
107
|
+
Qa as DropdownMenuSubContent,
|
|
108
|
+
Ua as DropdownMenuSubTrigger,
|
|
109
|
+
ae as DropdownMenuTrigger,
|
|
110
|
+
ee as HoverCard,
|
|
111
|
+
oe as HoverCardContent,
|
|
112
|
+
te as HoverCardTrigger,
|
|
113
|
+
re as IconPickerField,
|
|
114
|
+
se as ImagePickerField,
|
|
115
|
+
ne as Input,
|
|
116
|
+
ie as Label,
|
|
117
|
+
be as LinkField,
|
|
118
|
+
pe as Menubar,
|
|
119
|
+
ue as MenubarCheckboxItem,
|
|
120
|
+
le as MenubarContent,
|
|
121
|
+
me as MenubarGroup,
|
|
122
|
+
ce as MenubarItem,
|
|
123
|
+
de as MenubarLabel,
|
|
124
|
+
ge as MenubarMenu,
|
|
125
|
+
Ce as MenubarPortal,
|
|
126
|
+
Me as MenubarRadioGroup,
|
|
127
|
+
Se as MenubarRadioItem,
|
|
128
|
+
De as MenubarSeparator,
|
|
129
|
+
Te as MenubarShortcut,
|
|
336
130
|
xe as MenubarSub,
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
131
|
+
Ae as MenubarSubContent,
|
|
132
|
+
he as MenubarSubTrigger,
|
|
133
|
+
Ie as MenubarTrigger,
|
|
134
|
+
we as Popover,
|
|
135
|
+
Pe as PopoverContent,
|
|
136
|
+
ke as PopoverTrigger,
|
|
137
|
+
Fe as RTEField,
|
|
138
|
+
Ge as ScrollArea,
|
|
139
|
+
Le as ScrollBar,
|
|
140
|
+
ve as Select,
|
|
141
|
+
He as SelectContent,
|
|
142
|
+
Re as SelectGroup,
|
|
143
|
+
Be as SelectItem,
|
|
144
|
+
Ve as SelectLabel,
|
|
145
|
+
fe as SelectSeparator,
|
|
146
|
+
Ee as SelectTrigger,
|
|
147
|
+
je as SelectValue,
|
|
148
|
+
qe as Separator,
|
|
149
|
+
ye as Sheet,
|
|
150
|
+
ze as SheetClose,
|
|
151
|
+
Je as SheetContent,
|
|
152
|
+
Ke as SheetDescription,
|
|
153
|
+
We as SheetFooter,
|
|
154
|
+
Xe as SheetHeader,
|
|
155
|
+
Ye as SheetTitle,
|
|
156
|
+
Ze as SheetTrigger,
|
|
157
|
+
_e as Skeleton,
|
|
158
|
+
$e as Switch,
|
|
159
|
+
Ne as Tabs,
|
|
160
|
+
Oe as TabsContent,
|
|
161
|
+
Qe as TabsList,
|
|
162
|
+
Ue as TabsTrigger,
|
|
163
|
+
ao as Textarea,
|
|
164
|
+
eo as Toaster,
|
|
165
|
+
oo as Toggle,
|
|
166
|
+
to as Tooltip,
|
|
167
|
+
ro as TooltipContent,
|
|
168
|
+
so as TooltipPortal,
|
|
169
|
+
no as TooltipProvider,
|
|
170
|
+
io as TooltipTrigger,
|
|
171
|
+
bo as badgeVariants,
|
|
172
|
+
po as buttonVariants,
|
|
173
|
+
uo as reducer,
|
|
174
|
+
lo as toast,
|
|
175
|
+
mo as toggleVariants,
|
|
176
|
+
co as useToast
|
|
383
177
|
};
|
package/dist/web-blocks.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash-es"),e=o.noop;exports.loadWebBlocks=e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("lodash-es"),n=require("./jsx-runtime-Z_BpKhVy.cjs"),I=require("react"),l=require("./controls-KK2oLIa8.cjs"),p=require("@chaibuilder/runtime"),g=require("./empty-slot-nzYOgZuS.cjs"),y=require("@radix-ui/react-icons"),x=require("./Functions-N3yhPYKY.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("tailwind-merge");function v(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const u=v(I),R=u.memo(e=>{const{blockProps:t,inBuilder:o,backgroundImage:s,children:r,tag:a="div",styles:i}=e;let c=r;r||(c=n.jsxRuntimeExports.jsx(g.EmptySlot,{blockProps:{},styles:{},inBuilder:o}));let d={};return s&&(d={backgroundImage:`url(${s})`}),u.createElement(a,{...t,...i,style:d},c)});p.registerChaiBlock(R,{type:"Box",label:"Box",category:"core",group:"basic",props:{styles:l.S({default:""}),tag:l.s({title:"Tag",default:"div",options:[{value:"div",title:"div"},{value:"header",title:"header"},{value:"footer",title:"footer"},{value:"section",title:"section"},{value:"article",title:"article"},{value:"aside",title:"aside"},{value:"main",title:"main"},{value:"nav",title:"nav"},{value:"figure",title:"figure"},{value:"details",title:"details"},{value:"summary",title:"summary"},{value:"dialog",title:"dialog"},{value:"strike",title:"strike"},{value:"caption",title:"caption"},{value:"legend",title:"legend"},{value:"figcaption",title:"figcaption"},{value:"mark",title:"mark"}]}),backgroundImage:l.o({title:"Background Image"})},canAcceptBlock:()=>!0});const L=e=>{const{blockProps:t,styles:o,content:s,level:r="h1",children:a=null}=e;return a?u.createElement(r,{...o,...t},a):u.createElement(r,{...o,...t,dangerouslySetInnerHTML:{__html:s}})};p.registerChaiBlock(L,{type:"Heading",label:"Heading",category:"core",icon:y.HeadingIcon,group:"typography",props:{level:l.s({title:"Level",default:"h1",binding:!1,options:[{value:"h1",title:"h1"},{value:"h2",title:"h2"},{value:"h3",title:"h3"},{value:"h4",title:"h4"},{value:"h5",title:"h5"},{value:"h6",title:"h6"}]}),styles:l.S({default:"text-3xl"}),content:l.g({title:"Content",default:"Heading goes here"})},canAcceptBlock:e=>e==="Span"||e==="Text"});const T=e=>{const{blockProps:t,styles:o,content:s}=e;return h.isNull(e.children)?u.createElement("div",{...o,...t,dangerouslySetInnerHTML:{__html:s}}):u.createElement("p",{...o,...t},e.children)};p.registerChaiBlock(T,{type:"Paragraph",label:"Paragraph",category:"core",icon:y.TextIcon,group:"typography",props:{styles:l.S({default:""}),content:l.g({title:"Content",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."})},canAcceptBlock:e=>e==="Span"||e==="Link"});const w=e=>{const{blockProps:t,styles:o,content:s,children:r=null,tag:a}=e;return r?u.createElement("span",{...o,...t},r):u.createElement(a||"span",{...o,...t,dangerouslySetInnerHTML:{__html:s}})};p.registerChaiBlock(w,{type:"Span",label:"Span",category:"core",group:"typography",props:{styles:l.S({default:""}),content:l.g({title:"Content",default:"Enter your content"})},canAcceptBlock:()=>!0});const C=e=>{const{blockProps:t,content:o,styles:s}=e;return n.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:n.jsxRuntimeExports.jsx("div",{...t,...s,dangerouslySetInnerHTML:{__html:o}})})};p.registerChaiBlock(C,{type:"RichText",label:"Rich Text",category:"core",icon:y.CursorTextIcon,group:"typography",props:{styles:l.S({default:""}),content:l.m({title:"Content",default:"<p>This is a rich text block. You can add text, and other content here.</p>"})}});const _=e=>{const{blockProps:t,iconSize:o,icon:s,content:r,iconPos:a,styles:i,children:c}=e,d=s,m=c||n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx("span",{children:r}),d&&n.jsxRuntimeExports.jsx("div",{style:{width:o+"px"},className:a+" "+(a==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:d}})]});return u.createElement("button",{...t,...i,type:"button"},m)};p.registerChaiBlock(_,{type:"Button",label:"Button",category:"core",icon:y.ButtonIcon,group:"basic",props:{content:l.u({title:"Label",default:"Button",multiLingual:!0}),styles:l.S({default:"text-white bg-primary px-4 py-2 rounded-global flex items-center"}),icon:l.T({title:"Icon",default:""}),iconSize:l.c({title:"Icon Size",default:24}),iconPos:l.s({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const P=e=>{const{blockProps:t,link:o,children:s,styles:r,inBuilder:a,content:i}=e;return!s&&h.isEmpty(r==null?void 0:r.className)&&h.isEmpty(i)?n.jsxRuntimeExports.jsx(g.EmptySlot,{blockProps:t,inBuilder:a}):a?s?n.jsxRuntimeExports.jsx("span",{"data-simulate":"a",...t,...r,children:s}):u.createElement("span",{...t,...r,dangerouslySetInnerHTML:{__html:i},"data-simulate":"a"}):s?n.jsxRuntimeExports.jsx("a",{href:o.href||"#/",target:o.target,...t,...r,children:s}):u.createElement("a",{...t,...r,href:o.href||"#",target:o.target||"_self",dangerouslySetInnerHTML:{__html:i}})};p.registerChaiBlock(P,{type:"Link",label:"Link",category:"core",icon:y.Link1Icon,group:"basic",props:{styles:l.S({default:""}),content:l.u({title:"Content",default:""}),link:l.q({title:"Link",default:{type:"page",target:"_self",href:""}})},canAcceptBlock:()=>!0});const N=e=>{const{blockProps:t,children:o,listType:s,styles:r,tag:a,inBuilder:i}=e,c=x.cn(h.get(r,"className",""),s);return!o&&h.isEmpty(r==null?void 0:r.className)?n.jsxRuntimeExports.jsx(g.EmptySlot,{inBuilder:i,blockProps:t,text:"LIST ITEM"}):u.createElement(a||(s==="list-decimal"?"ol":"ul"),{...t,...r,className:c},o)};p.registerChaiBlock(N,{type:"List",label:"List",icon:y.RowsIcon,category:"core",group:"basic",props:{styles:l.S({default:""}),listType:l.s({title:"List type",default:"list-disc",options:[{value:"list-none",title:"None"},{value:"list-disc",title:"Disc"},{value:"list-decimal",title:"Number"}]})},canAcceptBlock:e=>e==="ListItem",blocks:[{_type:"List",_id:"a",listType:"list-none",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]});const M=e=>{const{blockProps:t,content:o,styles:s,children:r,tag:a}=e;return r?u.createElement(a||"li",{...s,...t},r):u.createElement(a||"li",{...s,...t,dangerouslySetInnerHTML:{__html:o}})};p.registerChaiBlock(M,{type:"ListItem",label:"List Item",icon:y.ColumnsIcon,category:"core",group:"basic",props:{styles:l.S({default:""}),content:l.g({title:"Content",default:"List item"})},canAcceptBlock:()=>!0,canBeNested:e=>e==="List"});const H=(e,t)=>({...e,className:`${e.className} ${t}`}),U=e=>{const{blockProps:t,icon:o,styles:s,width:r,inBuilder:a,height:i}=e,c=H(s,x.cn("inline-block",r?`w-[${r}px]`:"",i?`h-[${i}px]`:""));if(h.isEmpty(o))return n.jsxRuntimeExports.jsx(g.EmptySlot,{blockProps:t,text:"",inBuilder:a,className:"h-8 w-14"});const d=o.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return u.createElement("span",{...t,...c,dangerouslySetInnerHTML:{__html:d}})};p.registerChaiBlock(U,{type:"Icon",label:"Icon",category:"core",icon:y.SketchLogoIcon,group:"media",props:{styles:l.S({default:"text-black"}),icon:l.T({title:"Icon",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>'}),width:l.c({title:"Width",default:""}),height:l.c({title:"Height",default:""})}});const D=e=>{const{blockProps:t,image:o,styles:s,alt:r,height:a,width:i}=e;return h.isEmpty(o)?n.jsxRuntimeExports.jsx(g.EmptySlot,{blockProps:t,text:"IMAGE URL",className:"h-36"}):u.createElement("img",{...t,...s,src:o,alt:r,height:a,width:i})};p.registerChaiBlock(D,{type:"Image",label:"Image",category:"core",icon:y.ImageIcon,group:"media",props:{styles:l.S({default:""}),image:l.o({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:l.u({title:"Alt",default:""}),width:l.u({title:"Width",default:""}),height:l.u({title:"Height",default:""})}});const q=e=>{var i;const{blockProps:t,inBuilder:o,styles:s,children:r}=e;let a=null;return!r&&o&&(a=n.jsxRuntimeExports.jsx("div",{className:x.cn("flex flex-col items-center justify-center",(i=e.emptyStyles)==null?void 0:i.className),children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded-md border-4 border-dashed",children:n.jsxRuntimeExports.jsxs("p",{className:"truncate p-1 text-left text-xs text-gray-400",children:["Slot: ",e.name]})})})),u.createElement("div",{...s,...t,droppable:"yes"},r||a)};p.registerChaiBlock(q,{type:"Slot",label:"Slot",group:"basic",category:"core",hidden:!0,props:{styles:l.S({default:""}),emptyStyles:l.S({default:""})},canAcceptBlock:()=>!0});const B=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,j=/^(https?:\/\/)?(www\.)?player.vimeo\.com/,S=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,A=e=>{if(B.test(e)){const t=e.match(B);return t?`https://www.youtube.com/embed/${t[4]}`:e}if(j.test(e)){const t=e.match(j);return t?`https://player.vimeo.com/video/${t[3]}`:e}if(S.test(e)){const t=e.match(S);return t?`https://www.dailymotion.com/embed/video/${t[4]}`:e}return null},F=u.memo(e=>{const{blockProps:t,inBuilder:o,styles:s,url:r,controls:a}=e,i=h.get(a,"autoPlay",!1),c=h.get(a,"controls",!1),d=i||h.get(a,"muted",!0),m=h.get(a,"loop",!1);if(h.isEmpty(r))return n.jsxRuntimeExports.jsx(g.EmptySlot,{inBuilder:o,blockProps:t,text:"VIDEO URL",className:"h-36"});let b=A(r),f=null;if(b){if(!h.isEmpty(b)){const k=[];k.push(`autoplay=${i?1:0}`),k.push(`controls=${a?1:0}`),k.push(`mute=${d?1:0}&muted=${d?1:0}`),k.push(`loop=${m?1:0}`),b=`${b}?${k.join("&")}`}f=u.createElement("iframe",{...t,className:"absolute inset-0 w-full h-full",src:b,allow:o?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else f=u.createElement("video",{...t,className:"absolute inset-0 w-full h-full",src:r,controls:c,muted:d,autoPlay:o?!1:i,loop:m});return n.jsxRuntimeExports.jsx("div",{...h.pick(s,["className"]),children:n.jsxRuntimeExports.jsxs("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[o?n.jsxRuntimeExports.jsx("div",{...t,...h.omit(s,["className"]),className:"absolute inset-0 z-20 h-full w-full"}):null,f]})})});p.registerChaiBlock(F,{type:"Video",label:"Video",category:"core",icon:y.VideoIcon,group:"media",props:{styles:l.S({default:""}),url:l.u({title:"Video URL",default:"https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"}),controls:l.b({title:"Controls",properties:{autoPlay:l.r({title:"Autoplay",default:!0}),controls:l.r({title:"Show controls",default:!1}),loop:l.r({title:"Loop",default:!1}),muted:l.r({title:"Muted",default:!0})}})}});const O=u.memo(e=>{const{blockProps:t,styles:o,content:s,inBuilder:r}=e;return n.jsxRuntimeExports.jsxs("div",{className:"relative",children:[r?n.jsxRuntimeExports.jsx("div",{...t,...o,className:"absolute z-20 h-full w-full"}):null,u.createElement("div",{...o,dangerouslySetInnerHTML:{__html:s}})]})});p.registerChaiBlock(O,{type:"CustomHTML",label:"Custom HTML",category:"core",icon:y.CodeIcon,group:"advanced",props:{styles:l.S({default:""}),content:l.g({title:"HTML Content",default:"<div><p>HTML Snippet goes here...</p></div>",placeholder:"Enter custom HTML code here"})}});const $=e=>{const{blockProps:t,styles:o}=e;return u.createElement("hr",{...o,...t})};p.registerChaiBlock($,{type:"Divider",label:"Divider",category:"core",icon:y.DividerHorizontalIcon,group:"basic",props:{styles:l.S({default:"bg-gray-900 h-0.5 py-2 my-1"})}});const z=e=>e.inBuilder?n.jsxRuntimeExports.jsx("span",{className:"flex",...e.blockProps,children:e.content}):`${e.content}`;p.registerChaiBlock(z,{type:"Text",label:"Text",hidden:!0,category:"core",group:"typography",icon:y.SpaceBetweenVerticallyIcon,props:{content:l.g({title:"Content",defaultValue:""})}});const V=e=>{const{blockProps:t,backgroundImage:o,children:s,styles:r}=e;let a={};return o&&(a={backgroundImage:`url(${o})`}),u.createElement("div",{...t,...r,style:a},s)};p.registerChaiBlock(V,{type:"Body",label:"Body",category:"core",group:"basic",hidden:!0,props:{styles:l.S({default:"font-body antialiased"}),backgroundImage:l.o({title:"Background Image"})},canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1});const W=e=>{const{blockProps:t,styles:o}=e;return u.createElement("br",{...t,...o})};p.registerChaiBlock(W,{type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,icon:y.SpaceBetweenVerticallyIcon,props:{styles:l.S({default:""})}});const E=e=>{const t=(a,i)=>({_id:x.generateUUID(),_parent:a,_type:"TableCell",styles:"#styles:,",content:`${e==="TableHead"?"Table Head":"Table Cell "+i}`}),o=a=>{const i=x.generateUUID(),c={_type:"TableRow",_id:i,styles:"#styles:,border-b"};return a&&(c._parent=a),[c,t(i,"1"),t(i,"2"),t(i,"3")]},s=a=>{const i=x.generateUUID(),c={_id:i,_type:"TableHead",styles:"#styles:,font-medium"};return a&&(c._parent=a),[c,...o(i)]},r=a=>{const i=x.generateUUID(),c={_id:i,_type:"TableBody",styles:"#styles:,"};return a&&(c._parent=a),[c,...o(i),...o(i)]};if(e==="Table"){const a=x.generateUUID();return[{_id:a,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...s(a),...r(a)]}return e==="TableRow"?o():e==="TableHead"?s():e==="TableBody"?r():[]},G=e=>{const{blockProps:t,children:o,styles:s}=e;return o?u.createElement("table",{...t,...s},o):n.jsxRuntimeExports.jsx(g.EmptySlot,{blockProps:t,text:"TABLE HEAD / BODY"})};p.registerChaiBlock(G,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:y.TableIcon,props:{styles:l.S({default:""})},blocks:E("Table")});const Y=e=>{const{blockProps:t,children:o,styles:s}=e;return o?u.createElement("thead",{...t,...s},o):n.jsxRuntimeExports.jsx(g.EmptySlot,{blockProps:t,text:"TABLE ROW"})};p.registerChaiBlock(Y,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:y.BorderTopIcon,props:{styles:l.S({default:""})},blocks:E("TableHead")});const X=e=>{const{blockProps:t,children:o,styles:s}=e;return o?u.createElement("tbody",{...t,...s},o):n.jsxRuntimeExports.jsx(g.EmptySlot,{blockProps:t,text:"TABLE ROW"})};p.registerChaiBlock(X,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:y.BorderAllIcon,props:{styles:l.S({default:""})},blocks:E("TableBody")});const Z=e=>{const{blockProps:t,children:o,styles:s}=e;return o?u.createElement("tr",{...t,...s},o):n.jsxRuntimeExports.jsx(g.EmptySlot,{blockProps:t,text:"TABLE CELL"})};p.registerChaiBlock(Z,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:y.ViewHorizontalIcon,props:{styles:l.S({default:"w-full"})},blocks:E("TableRow")});const J=e=>{const{blockProps:t,children:o,content:s,styles:r}=e;return!o&&h.isEmpty(s)?n.jsxRuntimeExports.jsx(g.EmptySlot,{blockProps:t}):o?u.createElement("td",{...t,...r},o):u.createElement("td",{...t,...r,dangerouslySetInnerHTML:{__html:s}})};p.registerChaiBlock(J,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:y.DragHandleHorizontalIcon,props:{styles:l.S({default:""}),content:l.m({title:"Content",default:"Table cell item"})}});const K=e=>{const{blockProps:t,errorMessage:o,name:s,_type:r,successMessage:a,action:i,styles:c,children:d}=e;let m=d;d||(m=n.jsxRuntimeExports.jsx(g.EmptySlot,{blockProps:{},text:"FORM FIELDS"}));const b={"x-data":"useForm","x-on:submit.prevent":"post"},f={"x-html":"formResponse",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return n.jsxRuntimeExports.jsxs("form",{...b,"data-error":o,"data-success":a,method:"post",action:i,...t,...c,children:[n.jsxRuntimeExports.jsx("div",{...f}),n.jsxRuntimeExports.jsx("input",{name:"formname",type:"hidden",value:s||r}),m]})};p.registerChaiBlock(K,{type:"Form",label:"Form",category:"core",icon:y.GroupIcon,group:"form",hidden:!0,props:{styles:l.S({default:""}),action:l.u({title:"Submit URL",default:"/api/form/submit"}),errorMessage:l.m({title:"Error Message",default:"Something went wrong. Please try again"}),successMessage:l.m({title:"Success Message",default:"Thank you for your submission."})},canAcceptBlock:()=>!0});const Q=e=>{const{blockProps:t,content:o,styles:s,children:r}=e,a={...s,...t};return r?u.createElement("label",a,r):u.createElement("label",{...a,dangerouslySetInnerHTML:{__html:o}})};p.registerChaiBlock(Q,{type:"Label",label:"Label",category:"core",icon:y.LetterCaseToggleIcon,group:"form",hidden:!0,props:{styles:l.S({default:""}),content:l.u({title:"Content",default:"Label"})}});const ee=e=>{const{blockProps:t,inBuilder:o,label:s,placeholder:r,styles:a,inputStyles:i,icon:c,iconPos:d}=e,m=x.generateUUID(),b={"x-bind:disabled":"formLoading"};return n.jsxRuntimeExports.jsxs("button",{id:m,...b,...i,...a,...t||{},type:o?"button":"submit",placeholder:r,children:[s,c&&n.jsxRuntimeExports.jsx("span",{className:d,dangerouslySetInnerHTML:{__html:c}})]})};p.registerChaiBlock(ee,{type:"FormButton",label:"Submit Button",category:"core",icon:y.ButtonIcon,group:"form",hidden:!0,props:{label:l.u({title:"Label",default:"Submit"}),styles:l.S({default:"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"}),icon:l.T({title:"Icon",default:""}),iconPos:l.s({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const te=e=>{const{blockProps:t,fieldName:o,label:s,styles:r,inputStyles:a,required:i,checked:c,showLabel:d=!0}=e,m=x.generateUUID();return d?n.jsxRuntimeExports.jsxs("div",{...r,...t,children:[n.jsxRuntimeExports.jsx("input",{...a,name:o,id:m,type:"checkbox",required:i,defaultChecked:c}),s&&s!=="Label"&&n.jsxRuntimeExports.jsx("label",{htmlFor:m,children:s})]}):n.jsxRuntimeExports.jsx("input",{id:m,...t,...a,...r,type:"checkbox",required:i,name:o})};p.registerChaiBlock(te,{type:"Checkbox",label:"Checkbox",category:"core",icon:y.CheckboxIcon,group:"form",hidden:!0,props:{fieldName:l.u({title:"Field Name",default:"checkbox"}),styles:l.S({default:"flex items-center gap-x-2"}),label:l.u({title:"Label",default:"Label"}),checked:l.r({title:"Checked",default:!1}),required:l.r({title:"Required",default:!1})}});const le=e=>{const{blockProps:t,label:o,placeholder:s,styles:r,inputStyles:a,showLabel:i,required:c,inputType:d="text",inBuilder:m,fieldName:b}=e,f=x.generateUUID();return!i||d==="submit"?(d==="submit"&&(t.value=o),n.jsxRuntimeExports.jsx("input",{id:f,name:b,readOnly:m,...t,...a,...r,type:d,placeholder:s,required:c})):n.jsxRuntimeExports.jsxs("div",{...r,...t,children:[i&&n.jsxRuntimeExports.jsx("label",{htmlFor:f,children:o}),n.jsxRuntimeExports.jsx("input",{name:b,readOnly:m,...a,id:f,type:d,placeholder:s,required:c})]})};p.registerChaiBlock(le,{type:"Input",label:"Input",category:"core",icon:y.InputIcon,group:"form",hidden:!0,props:{styles:l.S({default:""}),fieldName:l.u({title:"Field Name",default:"input"}),inputType:l.s({title:"Type",options:h.map(["text","email","password","number","tel","file","hidden","range","submit","color","date","time"],e=>({value:e,title:e})),default:"text"}),value:l.u({title:"Value",default:""}),showLabel:l.r({title:"Show label",default:!0}),inputStyles:l.S({default:"w-full p-1"}),label:l.u({title:"Label",default:"Label"}),placeholder:l.u({title:"Placeholder",default:"Placeholder"}),required:l.r({title:"Required",default:!1})}});const oe=e=>{const{blockProps:t,fieldName:o,label:s,styles:r,inputStyles:a,checked:i,required:c,showLabel:d=!0}=e,m=x.generateUUID();return d?n.jsxRuntimeExports.jsxs("div",{...r,...t,children:[n.jsxRuntimeExports.jsx("input",{...a,name:o,id:m,type:"radio",required:c,defaultChecked:i}),s&&n.jsxRuntimeExports.jsx("label",{htmlFor:m,children:s})]}):n.jsxRuntimeExports.jsx("input",{id:m,...t,...a,...r,type:"radio",required:c,checked:i,name:o})};p.registerChaiBlock(oe,{type:"Radio",label:"Radio",category:"core",icon:y.RadiobuttonIcon,group:"form",hidden:!0,props:{styles:l.S({default:"flex items-center w-max gap-x-2"}),fieldName:l.u({title:"Field Name",default:"radio"}),label:l.u({title:"Label",default:"Label"}),checked:l.r({title:"Checked",default:!1}),required:l.r({title:"Required",default:!1})}});const se=e=>{const{blockProps:t,fieldName:o,label:s,placeholder:r,styles:a,inputStyles:i,required:c,showLabel:d,_multiple:m=!1}=e,b=x.generateUUID();return d?n.jsxRuntimeExports.jsxs("div",{...a,children:[d&&n.jsxRuntimeExports.jsx("label",{htmlFor:b,children:s}),n.jsxRuntimeExports.jsxs("select",{...i,id:b,placeholder:r,required:c,multiple:m,name:o,children:[n.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:r}),h.map(e.options,f=>n.jsxRuntimeExports.jsx("option",{selected:h.get(f,"selected",!1),value:f.value,dangerouslySetInnerHTML:{__html:f.label}},f.value))]})]}):n.jsxRuntimeExports.jsxs("select",{id:b,...a,...t,placeholder:r,required:c,multiple:m,name:o,children:[n.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:r}),h.map(e.options,f=>n.jsxRuntimeExports.jsx("option",{selected:h.get(f,"selected",!1),value:f.value,dangerouslySetInnerHTML:{__html:f.label}},f.value))]})};p.registerChaiBlock(se,{type:"Select",label:"Select",category:"core",icon:y.DropdownMenuIcon,group:"form",hidden:!0,props:{styles:l.S({default:""}),fieldName:l.u({title:"Field Name",default:"select"}),showLabel:l.r({title:"Show label",default:!0}),inputStyles:l.S({default:"w-full p-1"}),label:l.u({title:"Label",default:"Label"}),placeholder:l.u({title:"Placeholder",default:"Placeholder"}),required:l.r({title:"Required",default:!1}),_multiple:l.r({title:"Multiple Choice",default:!1}),options:l.h({title:"Options",itemProperties:{label:l.u({title:"Label",default:""}),value:l.u({title:"Value",default:""})}})}});const re=e=>{const{blockProps:t,fieldName:o,label:s,placeholder:r,styles:a,inputStyles:i,_rows:c,showLabel:d}=e,m=x.generateUUID();return d?n.jsxRuntimeExports.jsxs("div",{...a,...t,children:[d&&n.jsxRuntimeExports.jsx("label",{htmlFor:m,children:s}),n.jsxRuntimeExports.jsx("textarea",{name:o,...i,id:m,placeholder:r,rows:c})]}):n.jsxRuntimeExports.jsx("textarea",{id:m,name:o,...t,...i,...a,placeholder:r,rows:c})};p.registerChaiBlock(re,{type:"TextArea",label:"TextArea",category:"core",icon:y.InputIcon,group:"form",hidden:!0,props:{fieldName:l.u({title:"Field Name",default:"textarea"}),showLabel:l.r({title:"Show label",default:!0}),styles:l.S({default:""}),inputStyles:l.S({default:"w-full p-1"}),label:l.u({title:"Label",default:"Label"}),placeholder:l.u({title:"Placeholder",default:"Placeholder"}),_rows:l.c({title:"Rows",default:3})}});const ae=h.noop;exports.loadWebBlocks=ae;
|