@chaibuilder/sdk 1.2.25 → 1.2.26
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-l1JENNvq.js +206 -0
- package/dist/AddBlocks-zPPKkeKs.cjs +1 -0
- package/dist/BrandingOptions-DkpqGARR.cjs +1 -0
- package/dist/{BrandingOptions-iTyWpwTs.js → BrandingOptions-udtH5yJs.js} +54 -40
- package/dist/{CanvasArea-dZjng782.js → CanvasArea-h0W-Tyha.js} +324 -340
- package/dist/CanvasArea-zme1r3Zi.cjs +55 -0
- package/dist/Class-PoYusiA5.cjs +1 -0
- package/dist/{Class-ahc3NIbq.js → Class-lGzsNBOK.js} +29 -26
- package/dist/CurrentPage-Hl52iub_.cjs +1 -0
- package/dist/{CurrentPage-Kmfp-kFk.js → CurrentPage-tJUjXWdb.js} +54 -40
- package/dist/Functions-7jnEwJyw.js +15 -0
- package/dist/Functions-N3yhPYKY.cjs +1 -0
- package/dist/ListTree-WvTjY5rr.cjs +1 -0
- package/dist/{ListTree-N3jeD790.js → ListTree-cZ-Ihlt3.js} +96 -86
- package/dist/MODIFIERS-0g14w5RS.cjs +1 -0
- package/dist/{MODIFIERS-CNqNUapY.js → MODIFIERS-dytZ-osO.js} +4 -10
- package/dist/PagesPanel-6rrLXEO-.js +64 -0
- package/dist/PagesPanel-WzCocl6u.cjs +1 -0
- package/dist/ProjectPanel-o7gdcwPn.cjs +1 -0
- package/dist/ProjectPanel-tz3bjdXy.js +85 -0
- package/dist/{STRINGS-b432aBJJ.js → STRINGS--j49GZJP.js} +2 -2
- package/dist/{Settings-jCcd-VE6.js → Settings-4s2LUVmC.js} +401 -407
- package/dist/Settings-AqoKwR92.cjs +1 -0
- package/dist/SidePanels-3o6Okmvu.cjs +1 -0
- package/dist/{SidePanels-pHMYprpW.js → SidePanels-bugFfInz.js} +118 -108
- package/dist/Topbar-CqW7G360.cjs +1 -0
- package/dist/Topbar-pWzBEOed.js +132 -0
- package/dist/UnsplashImages-NGskB93R.cjs +1 -0
- package/dist/{UnsplashImages-L7x_3RQf.js → UnsplashImages-qvwFbV-E.js} +63 -50
- package/dist/{UploadImages-zdEJRLD8.js → UploadImages-9NapgXBq.js} +60 -37
- package/dist/UploadImages-Oh7Glr9A.cjs +1 -0
- package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
- package/dist/add-page-modal--6TTBRYa.cjs +1 -0
- package/dist/add-page-modal-k2Kb92HS.js +104 -0
- package/dist/confirm-alert-C4M9eF-o.cjs +1 -0
- package/dist/confirm-alert-GUhZ_G8w.js +60 -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 +75 -150
- package/dist/defaultTheme-7VqqhOcp.cjs +1 -0
- package/dist/{defaultTheme-4kA60XdB.js → defaultTheme-D8B4-wHO.js} +8 -6
- package/dist/delete-page-modal-cFoL-wdo.cjs +1 -0
- package/dist/delete-page-modal-zONvdebd.js +83 -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 +37 -18
- package/dist/empty-slot-ZBlsQi6m.js +15 -0
- package/dist/empty-slot-nzYOgZuS.cjs +1 -0
- package/dist/{form-0_RLz2TB.js → form-STUz-6nE.js} +12 -12
- package/dist/form-lBQ_76Uw.cjs +1 -0
- package/dist/{html-to-json-uSnxl72F.cjs → html-to-json-efmv1pCj.cjs} +1 -1
- package/dist/{html-to-json-2xtb7520.js → html-to-json-ngX9ef2u.js} +41 -41
- package/dist/index-Gk6sASBd.js +3080 -0
- package/dist/index-OB199Izc.cjs +206 -0
- package/dist/index-SkyM3d6Q.js +39503 -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-gi1LIOCw.cjs +1 -0
- package/dist/index-h-hd6EvN.cjs +1 -0
- package/dist/index-llTXLDGE.js +2201 -0
- package/dist/index-mbyqq81O.cjs +1 -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 +2 -2
- package/dist/lib.js +66 -62
- package/dist/page-viewer-2kwnKM6v.cjs +1 -0
- package/dist/{page-viewer-NnOwmAmu.js → page-viewer-Pdg9F5Hv.js} +57 -43
- package/dist/project-general-setting-CnNL98NM.cjs +1 -0
- package/dist/{project-general-setting-9ju3TDju.js → project-general-setting-f8Ebsn6K.js} +43 -35
- package/dist/project-seo-setting-mlxL_e2_.cjs +1 -0
- package/dist/{project-seo-setting-36CdUszM.js → project-seo-setting-pX34Qsym.js} +40 -23
- package/dist/render.cjs +1 -1
- package/dist/render.js +14 -13
- package/dist/single-page-detail-XfzrGlzA.cjs +1 -0
- package/dist/{single-page-detail-hD1jKZ8k.js → single-page-detail-dpe5LT0M.js} +74 -66
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +40 -24
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +160 -365
- package/dist/web-blocks.cjs +6 -1
- package/dist/web-blocks.js +1153 -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/PagesPanel-u1IB-nRr.js +0 -48
- package/dist/ProjectPanel-EydGZmMW.js +0 -71
- package/dist/ProjectPanel-kiiljG4H.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/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,178 @@
|
|
|
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 y, bc as z, ba as J, bb as K, bp as W, bC as X, A as Y, ai as Z, g as _, b as $, e as N, f as O, c as Q, d as U, a as aa, bq as ea, as as oa, B as ta, bj as ra, bm as sa, bl as na, bo as ia, bk as ba, bE as pa, aY as ua, cc as ma, a$ as la, b0 as ca, aZ as da, b1 as ga, a_ as Ca, ce as Ma, cd as Sa, bu as Da, cf as Ta, bt as xa, ck as Aa, bs as ha, ch as Ia, cl as wa, cp as Pa, cg as ka, ci as Fa, cj as Ga, cm as La, cn as va, co as Ha, bv as Ra, ad as Ba, ae as Va, ah as fa, b2 as Ea, af as ja, ag as qa, ao as ya, aG as za, aL as Ja, aI as Ka, bg as Wa, bh as Xa, aJ as Ya, c4 as Za, c8 as _a, c3 as $a, aK as Na, bi as Oa, c5 as Qa, c6 as Ua, c7 as ae, aH as ee, aD as oe, aF as te, aE as re, b6 as se, b7 as ne, bd as ie, aB as be, b8 as pe, bG as ue, bN as me, bJ as le, bT as ce, bK as de, bM as ge, bH as Ce, bQ as Me, bO as Se, bP as De, bL as Te, bV as xe, bU as Ae, bR as he, bS as Ie, bI as we, aV as Pe, aX as ke, aW as Fe, b5 as Ge, bf as Le, bF as ve, aj as He, am as Re, ay as Be, an as Ve, az as fe, bW as Ee, ak as je, al as qe, aA as ye, bX as ze, bZ as Je, b_ as Ke, c2 as We, c0 as Xe, b$ as Ye, c1 as Ze, bY as _e, S as $e, aC as Ne, au as Oe, ax as Qe, av as Ue, aw as ao, bn as eo, I as oo, bz as to, ap as ro, ar as so, be as no, T as io, aq as bo, bD as po, bB as uo, c9 as mo, cb as lo, bA as co, ca as go } from "./index-Gk6sASBd.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 "./STRINGS--j49GZJP.js";
|
|
10
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
11
|
+
import "@react-hookz/web";
|
|
12
|
+
import "./MODIFIERS-dytZ-osO.js";
|
|
13
|
+
import "./Class-lGzsNBOK.js";
|
|
14
|
+
import "react-i18next";
|
|
15
|
+
import "./jsx-runtime-WbnYoNE9.js";
|
|
16
|
+
import "@radix-ui/react-toggle";
|
|
17
|
+
import "class-variance-authority";
|
|
18
|
+
import "@radix-ui/react-switch";
|
|
31
19
|
import "@radix-ui/react-slot";
|
|
32
|
-
import "@radix-ui/react-tooltip";
|
|
33
|
-
import "@radix-ui/react-toast";
|
|
34
20
|
import "@radix-ui/react-accordion";
|
|
21
|
+
import "@radix-ui/react-icons";
|
|
35
22
|
import "@radix-ui/react-alert-dialog";
|
|
36
|
-
import "@radix-ui/react-
|
|
37
|
-
import "cmdk";
|
|
23
|
+
import "@radix-ui/react-dialog";
|
|
38
24
|
import "@radix-ui/react-label";
|
|
39
25
|
import "@radix-ui/react-scroll-area";
|
|
26
|
+
import "@radix-ui/react-tabs";
|
|
27
|
+
import "@radix-ui/react-tooltip";
|
|
40
28
|
import "@radix-ui/react-popover";
|
|
29
|
+
import "@radix-ui/react-menubar";
|
|
30
|
+
import "@radix-ui/react-hover-card";
|
|
41
31
|
import "@radix-ui/react-select";
|
|
42
32
|
import "@radix-ui/react-dropdown-menu";
|
|
43
33
|
import "@radix-ui/react-separator";
|
|
34
|
+
import "@radix-ui/react-toast";
|
|
35
|
+
import "cmdk";
|
|
44
36
|
import "@radix-ui/react-context-menu";
|
|
45
37
|
import "react-icons-picker";
|
|
46
38
|
import "react-dom";
|
|
47
|
-
import "./ImagesPanel-Wb0GF_NA.js";
|
|
48
39
|
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
40
|
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
|
-
|
|
336
|
-
|
|
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
|
-
|
|
41
|
+
y as Accordion,
|
|
42
|
+
z as AccordionContent,
|
|
43
|
+
J as AccordionItem,
|
|
44
|
+
K as AccordionTrigger,
|
|
45
|
+
W as Alert,
|
|
46
|
+
X as AlertDescription,
|
|
47
|
+
Y as AlertDialog,
|
|
48
|
+
Z as AlertDialogAction,
|
|
49
|
+
_ as AlertDialogCancel,
|
|
50
|
+
$ as AlertDialogContent,
|
|
51
|
+
N as AlertDialogDescription,
|
|
52
|
+
O as AlertDialogFooter,
|
|
53
|
+
Q as AlertDialogHeader,
|
|
54
|
+
U as AlertDialogTitle,
|
|
55
|
+
aa as AlertDialogTrigger,
|
|
56
|
+
ea as AlertTitle,
|
|
57
|
+
oa as Badge,
|
|
58
|
+
ta as Button,
|
|
59
|
+
ra as Card,
|
|
60
|
+
sa as CardContent,
|
|
61
|
+
na as CardDescription,
|
|
62
|
+
ia as CardFooter,
|
|
63
|
+
ba as CardHeader,
|
|
64
|
+
pa as CardTitle,
|
|
65
|
+
ua as Command,
|
|
66
|
+
ma as CommandDialog,
|
|
67
|
+
la as CommandEmpty,
|
|
68
|
+
ca as CommandGroup,
|
|
69
|
+
da as CommandInput,
|
|
70
|
+
ga as CommandItem,
|
|
71
|
+
Ca as CommandList,
|
|
72
|
+
Ma as CommandSeparator,
|
|
73
|
+
Sa as CommandShortcut,
|
|
74
|
+
Da as ContextMenu,
|
|
75
|
+
Ta as ContextMenuCheckboxItem,
|
|
76
|
+
xa as ContextMenuContent,
|
|
77
|
+
Aa as ContextMenuGroup,
|
|
78
|
+
ha as ContextMenuItem,
|
|
79
|
+
Ia as ContextMenuLabel,
|
|
80
|
+
wa as ContextMenuPortal,
|
|
81
|
+
Pa as ContextMenuRadioGroup,
|
|
82
|
+
ka as ContextMenuRadioItem,
|
|
83
|
+
Fa as ContextMenuSeparator,
|
|
84
|
+
Ga as ContextMenuShortcut,
|
|
85
|
+
La as ContextMenuSub,
|
|
86
|
+
va as ContextMenuSubContent,
|
|
87
|
+
Ha as ContextMenuSubTrigger,
|
|
88
|
+
Ra as ContextMenuTrigger,
|
|
89
|
+
Ba as Dialog,
|
|
90
|
+
Va as DialogContent,
|
|
91
|
+
fa as DialogDescription,
|
|
92
|
+
Ea as DialogFooter,
|
|
93
|
+
ja as DialogHeader,
|
|
94
|
+
qa as DialogTitle,
|
|
95
|
+
ya as DialogTrigger,
|
|
96
|
+
za as DropdownMenu,
|
|
97
|
+
Ja as DropdownMenuCheckboxItem,
|
|
98
|
+
Ka as DropdownMenuContent,
|
|
99
|
+
Wa as DropdownMenuGroup,
|
|
100
|
+
Xa as DropdownMenuItem,
|
|
101
|
+
Ya as DropdownMenuLabel,
|
|
102
|
+
Za as DropdownMenuPortal,
|
|
103
|
+
_a as DropdownMenuRadioGroup,
|
|
104
|
+
$a as DropdownMenuRadioItem,
|
|
105
|
+
Na as DropdownMenuSeparator,
|
|
106
|
+
Oa as DropdownMenuShortcut,
|
|
107
|
+
Qa as DropdownMenuSub,
|
|
108
|
+
Ua as DropdownMenuSubContent,
|
|
109
|
+
ae as DropdownMenuSubTrigger,
|
|
110
|
+
ee as DropdownMenuTrigger,
|
|
111
|
+
oe as HoverCard,
|
|
112
|
+
te as HoverCardContent,
|
|
113
|
+
re as HoverCardTrigger,
|
|
114
|
+
se as IconPickerField,
|
|
115
|
+
ne as ImagePickerField,
|
|
116
|
+
ie as Input,
|
|
117
|
+
be as Label,
|
|
118
|
+
pe as LinkField,
|
|
119
|
+
ue as Menubar,
|
|
120
|
+
me as MenubarCheckboxItem,
|
|
121
|
+
le as MenubarContent,
|
|
122
|
+
ce as MenubarGroup,
|
|
123
|
+
de as MenubarItem,
|
|
124
|
+
ge as MenubarLabel,
|
|
125
|
+
Ce as MenubarMenu,
|
|
126
|
+
Me as MenubarPortal,
|
|
127
|
+
Se as MenubarRadioGroup,
|
|
128
|
+
De as MenubarRadioItem,
|
|
129
|
+
Te as MenubarSeparator,
|
|
130
|
+
xe as MenubarShortcut,
|
|
131
|
+
Ae as MenubarSub,
|
|
132
|
+
he as MenubarSubContent,
|
|
133
|
+
Ie as MenubarSubTrigger,
|
|
134
|
+
we as MenubarTrigger,
|
|
135
|
+
Pe as Popover,
|
|
136
|
+
ke as PopoverContent,
|
|
137
|
+
Fe as PopoverTrigger,
|
|
138
|
+
Ge as RTEField,
|
|
139
|
+
Le as ScrollArea,
|
|
140
|
+
ve as ScrollBar,
|
|
141
|
+
He as Select,
|
|
142
|
+
Re as SelectContent,
|
|
143
|
+
Be as SelectGroup,
|
|
144
|
+
Ve as SelectItem,
|
|
145
|
+
fe as SelectLabel,
|
|
146
|
+
Ee as SelectSeparator,
|
|
147
|
+
je as SelectTrigger,
|
|
148
|
+
qe as SelectValue,
|
|
149
|
+
ye as Separator,
|
|
150
|
+
ze as Sheet,
|
|
151
|
+
Je as SheetClose,
|
|
152
|
+
Ke as SheetContent,
|
|
153
|
+
We as SheetDescription,
|
|
154
|
+
Xe as SheetFooter,
|
|
155
|
+
Ye as SheetHeader,
|
|
156
|
+
Ze as SheetTitle,
|
|
157
|
+
_e as SheetTrigger,
|
|
158
|
+
$e as Skeleton,
|
|
159
|
+
Ne as Switch,
|
|
160
|
+
Oe as Tabs,
|
|
161
|
+
Qe as TabsContent,
|
|
162
|
+
Ue as TabsList,
|
|
163
|
+
ao as TabsTrigger,
|
|
164
|
+
eo as Textarea,
|
|
165
|
+
oo as Toaster,
|
|
166
|
+
to as Toggle,
|
|
167
|
+
ro as Tooltip,
|
|
168
|
+
so as TooltipContent,
|
|
169
|
+
no as TooltipPortal,
|
|
170
|
+
io as TooltipProvider,
|
|
171
|
+
bo as TooltipTrigger,
|
|
172
|
+
po as badgeVariants,
|
|
173
|
+
uo as buttonVariants,
|
|
174
|
+
mo as reducer,
|
|
175
|
+
lo as toast,
|
|
176
|
+
co as toggleVariants,
|
|
177
|
+
go as useToast
|
|
383
178
|
};
|
package/dist/web-blocks.cjs
CHANGED
|
@@ -1 +1,6 @@
|
|
|
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 y=require("lodash-es"),a=require("./jsx-runtime-Z_BpKhVy.cjs"),w=require("react"),l=require("./controls-KK2oLIa8.cjs"),u=require("@chaibuilder/runtime"),b=require("./empty-slot-nzYOgZuS.cjs"),h=require("@radix-ui/react-icons"),f=require("./Functions-N3yhPYKY.cjs"),S=require("./STRINGS-gPz7CUOk.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("tailwind-merge");function R(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const d=R(w),T=d.memo(e=>{const{blockProps:t,inBuilder:o,backgroundImage:r,children:s,tag:n="div",styles:i}=e;let c=s;s||(c=a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:{},styles:{},inBuilder:o}));let p={};return r&&(p={backgroundImage:`url(${r})`}),d.createElement(n,{...t,...i,style:p},c)});u.registerChaiBlock(T,{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 _=e=>{const{blockProps:t,styles:o,content:r,level:s="h1",children:n=null}=e;return n?d.createElement(s,{...o,...t},n):d.createElement(s,{...o,...t,dangerouslySetInnerHTML:{__html:r}})};u.registerChaiBlock(_,{type:"Heading",label:"Heading",category:"core",icon:h.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 L=e=>{const{blockProps:t,styles:o,content:r}=e;return y.isNull(e.children)?d.createElement("div",{...o,...t,dangerouslySetInnerHTML:{__html:r}}):d.createElement("p",{...o,...t},e.children)};u.registerChaiBlock(L,{type:"Paragraph",label:"Paragraph",category:"core",icon:h.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 C=e=>{const{blockProps:t,styles:o,content:r,children:s=null,tag:n}=e;return s?d.createElement("span",{...o,...t},s):d.createElement(n||"span",{...o,...t,dangerouslySetInnerHTML:{__html:r}})};u.registerChaiBlock(C,{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 P=e=>{const{blockProps:t,content:o,styles:r}=e;return a.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:a.jsxRuntimeExports.jsx("div",{...t,...r,dangerouslySetInnerHTML:{__html:o}})})};u.registerChaiBlock(P,{type:"RichText",label:"Rich Text",category:"core",icon:h.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 M=e=>{const{blockProps:t,iconSize:o,icon:r,content:s,iconPos:n,styles:i,children:c}=e,p=r,m=c||a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[a.jsxRuntimeExports.jsx("span",{children:s}),p&&a.jsxRuntimeExports.jsx("div",{style:{width:o+"px"},className:n+" "+(n==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:p}})]});return d.createElement("button",{...t,...i,type:"button"},m)};u.registerChaiBlock(M,{type:"Button",label:"Button",category:"core",icon:h.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 N=e=>{const{blockProps:t,link:o,children:r,styles:s,inBuilder:n,content:i}=e;return!r&&y.isEmpty(s==null?void 0:s.className)&&y.isEmpty(i)?a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,inBuilder:n}):n?r?a.jsxRuntimeExports.jsx("span",{"data-simulate":"a",...t,...s,children:r}):d.createElement("span",{...t,...s,dangerouslySetInnerHTML:{__html:i},"data-simulate":"a"}):r?a.jsxRuntimeExports.jsx("a",{href:o.href||"#/",target:o.target,...t,...s,children:r}):d.createElement("a",{...t,...s,href:o.href||"#",target:o.target||"_self",dangerouslySetInnerHTML:{__html:i}})};u.registerChaiBlock(N,{type:"Link",label:"Link",category:"core",icon:h.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 A=e=>{const{blockProps:t,children:o,listType:r,styles:s,tag:n,inBuilder:i}=e,c=f.cn(y.get(s,"className",""),r);return!o&&y.isEmpty(s==null?void 0:s.className)?a.jsxRuntimeExports.jsx(b.EmptySlot,{inBuilder:i,blockProps:t,text:"LIST ITEM"}):d.createElement(n||(r==="list-decimal"?"ol":"ul"),{...t,...s,className:c},o)};u.registerChaiBlock(A,{type:"List",label:"List",icon:h.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 H=e=>{const{blockProps:t,content:o,styles:r,children:s,tag:n}=e;return s?d.createElement(n||"li",{...r,...t},s):d.createElement(n||"li",{...r,...t,dangerouslySetInnerHTML:{__html:o}})};u.registerChaiBlock(H,{type:"ListItem",label:"List Item",icon:h.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 v=(e,t)=>({...e,className:`${e.className} ${t}`}),D=e=>{const{blockProps:t,icon:o,styles:r,width:s,inBuilder:n,height:i}=e,c=v(r,f.cn("inline-block",s?`w-[${s}px]`:"",i?`h-[${i}px]`:""));if(y.isEmpty(o))return a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"",inBuilder:n,className:"h-8 w-14"});const p=o.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return d.createElement("span",{...t,...c,dangerouslySetInnerHTML:{__html:p}})};u.registerChaiBlock(D,{type:"Icon",label:"Icon",category:"core",icon:h.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 U=e=>{const{blockProps:t,image:o,styles:r,alt:s,height:n,width:i}=e;return y.isEmpty(o)?a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"IMAGE URL",className:"h-36"}):d.createElement("img",{...t,...r,src:o,alt:s,height:n,width:i})};u.registerChaiBlock(U,{type:"Image",label:"Image",category:"core",icon:h.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:r,children:s}=e;let n=null;return!s&&o&&(n=a.jsxRuntimeExports.jsx("div",{className:f.cn("flex flex-col items-center justify-center",(i=e.emptyStyles)==null?void 0:i.className),children:a.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded-md border-4 border-dashed",children:a.jsxRuntimeExports.jsxs("p",{className:"truncate p-1 text-left text-xs text-gray-400",children:["Slot: ",e.name]})})})),d.createElement("div",{...r,...t,droppable:"yes"},s||n)};u.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/,I=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,F=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(I.test(e)){const t=e.match(I);return t?`https://www.dailymotion.com/embed/video/${t[4]}`:e}return null},$=d.memo(e=>{const{blockProps:t,inBuilder:o,styles:r,url:s,controls:n}=e,i=y.get(n,"autoPlay",!1),c=y.get(n,"controls",!1),p=i||y.get(n,"muted",!0),m=y.get(n,"loop",!1);if(y.isEmpty(s))return a.jsxRuntimeExports.jsx(b.EmptySlot,{inBuilder:o,blockProps:t,text:"VIDEO URL",className:"h-36"});let x=F(s),g=null;if(x){if(!y.isEmpty(x)){const k=[];k.push(`autoplay=${i?1:0}`),k.push(`controls=${n?1:0}`),k.push(`mute=${p?1:0}&muted=${p?1:0}`),k.push(`loop=${m?1:0}`),x=`${x}?${k.join("&")}`}g=d.createElement("iframe",{...t,className:"absolute inset-0 w-full h-full",src:x,allow:o?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else g=d.createElement("video",{...t,className:"absolute inset-0 w-full h-full",src:s,controls:c,muted:p,autoPlay:o?!1:i,loop:m});return a.jsxRuntimeExports.jsx("div",{...y.pick(r,["className"]),children:a.jsxRuntimeExports.jsxs("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[o?a.jsxRuntimeExports.jsx("div",{...t,...y.omit(r,["className"]),className:"absolute inset-0 z-20 h-full w-full"}):null,g]})})});u.registerChaiBlock($,{type:"Video",label:"Video",category:"core",icon:h.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 z=d.memo(e=>{const{blockProps:t,styles:o,content:r,inBuilder:s}=e;return a.jsxRuntimeExports.jsxs("div",{className:"relative",children:[s?a.jsxRuntimeExports.jsx("div",{...t,...o,className:"absolute z-20 h-full w-full"}):null,d.createElement("div",{...o,dangerouslySetInnerHTML:{__html:r}})]})});u.registerChaiBlock(z,{type:"CustomHTML",label:"Custom HTML",category:"core",icon:h.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 O=e=>{const{blockProps:t,styles:o}=e;return d.createElement("hr",{...o,...t})};u.registerChaiBlock(O,{type:"Divider",label:"Divider",category:"core",icon:h.DividerHorizontalIcon,group:"basic",props:{styles:l.S({default:"bg-gray-900 h-0.5 py-2 my-1"})}});const V=e=>e.inBuilder?a.jsxRuntimeExports.jsx("span",{className:"flex",...e.blockProps,children:e.content}):`${e.content}`;u.registerChaiBlock(V,{type:"Text",label:"Text",hidden:!0,category:"core",group:"typography",icon:h.SpaceBetweenVerticallyIcon,props:{content:l.g({title:"Content",defaultValue:""})}});const Y=({children:e,blockProps:t,styles:o})=>{const r=v(o,"hs-accordion");return a.jsxRuntimeExports.jsx("div",{...t,...r,children:e})};u.registerChaiBlock(Y,{type:"Accordion",label:"Accordion",category:"core",group:"advanced",hidden:!0,props:{styles:l.S({default:""})},blocks:()=>{const e="accordion"+f.generateUUID();return[{_id:"a",_type:"Accordion",_name:"Accordion"},{_id:"b",_type:"AccordionTrigger",_parent:"a",_name:"Accordion Trigger",styles_attrs:{"aria-controls":e}},{_id:"b1",_type:"Icon",_parent:"b",styles:`${S.STYLES_KEY},hs-accordion-active:hidden hs-accordion-active:text-blue-600 hs-accordion-active:group-hover:text-blue-600 block size-4 text-gray-600 group-hover:text-gray-500 dark:text-neutral-400`,icon:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<path d="M5 12h14"></path>
|
|
3
|
+
<path d="M12 5v14"></path>
|
|
4
|
+
</svg>`},{_id:"b2",_type:"Icon",_parent:"b",styles:`${S.STYLES_KEY},hs-accordion-active:block hs-accordion-active:text-blue-600 hs-accordion-active:group-hover:text-blue-600 hidden size-4 text-gray-600 group-hover:text-gray-500 dark:text-neutral-400`,icon:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
5
|
+
<path d="M5 12h14"></path>
|
|
6
|
+
</svg>`},{_id:"b1",_type:"Text",_parent:"b",content:"Accordion Title"},{_id:"c",_type:"AccordionContent",_parent:"a",_name:"Accordion Content",styles:`${S.STYLES_KEY},w-full overflow-hidden transition-[height] duration-300 px-6 py-3`,styles_attrs:{"aria-labelledby":e}},{_id:"c1",_type:"Text",_parent:"c",content:"It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element."}]}});const G=({children:e,blockProps:t,styles:o})=>{const r=v(o,"hs-accordion-toggle");return a.jsxRuntimeExports.jsx("button",{...r,...t,children:e})};u.registerChaiBlock(G,{type:"AccordionTrigger",label:"Accordion Trigger",category:"core",group:"advanced",hidden:!0,props:{styles:l.S({default:"hs-accordion-active:text-blue-600 dark:hs-accordion-active:text-blue-500 inline-flex w-full items-center gap-x-3 rounded-lg px-6 py-3 text-start text-sm font-semibold text-gray-800 hover:text-gray-500 disabled:pointer-events-none disabled:opacity-50 dark:text-neutral-200 dark:hover:text-neutral-400"})},canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1});const W=({children:e,blockProps:t,styles:o})=>{const r=v(o,"hs-accordion-content");return a.jsxRuntimeExports.jsx("div",{...r,...t,children:e})};u.registerChaiBlock(W,{type:"AccordionContent",label:"Accordion Content",category:"core",group:"advanced",hidden:!0,props:{styles:l.S({default:"w-full overflow-hidden transition-[height] duration-300"})},canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1});const K=e=>{const{blockProps:t,backgroundImage:o,children:r,styles:s}=e;let n={};return o&&(n={backgroundImage:`url(${o})`}),d.createElement("div",{...t,...s,style:n},r)};u.registerChaiBlock(K,{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 X=e=>{const{blockProps:t,styles:o}=e;return d.createElement("br",{...t,...o})};u.registerChaiBlock(X,{type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,icon:h.SpaceBetweenVerticallyIcon,props:{styles:l.S({default:""})}});const E=e=>{const t=(n,i)=>({_id:f.generateUUID(),_parent:n,_type:"TableCell",styles:"#styles:,",content:`${e==="TableHead"?"Table Head":"Table Cell "+i}`}),o=n=>{const i=f.generateUUID(),c={_type:"TableRow",_id:i,styles:"#styles:,border-b"};return n&&(c._parent=n),[c,t(i,"1"),t(i,"2"),t(i,"3")]},r=n=>{const i=f.generateUUID(),c={_id:i,_type:"TableHead",styles:"#styles:,font-medium"};return n&&(c._parent=n),[c,...o(i)]},s=n=>{const i=f.generateUUID(),c={_id:i,_type:"TableBody",styles:"#styles:,"};return n&&(c._parent=n),[c,...o(i),...o(i)]};if(e==="Table"){const n=f.generateUUID();return[{_id:n,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...r(n),...s(n)]}return e==="TableRow"?o():e==="TableHead"?r():e==="TableBody"?s():[]},Z=e=>{const{blockProps:t,children:o,styles:r}=e;return o?d.createElement("table",{...t,...r},o):a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE HEAD / BODY"})};u.registerChaiBlock(Z,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:h.TableIcon,props:{styles:l.S({default:""})},blocks:E("Table")});const J=e=>{const{blockProps:t,children:o,styles:r}=e;return o?d.createElement("thead",{...t,...r},o):a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE ROW"})};u.registerChaiBlock(J,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:h.BorderTopIcon,props:{styles:l.S({default:""})},blocks:E("TableHead")});const Q=e=>{const{blockProps:t,children:o,styles:r}=e;return o?d.createElement("tbody",{...t,...r},o):a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE ROW"})};u.registerChaiBlock(Q,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:h.BorderAllIcon,props:{styles:l.S({default:""})},blocks:E("TableBody")});const ee=e=>{const{blockProps:t,children:o,styles:r}=e;return o?d.createElement("tr",{...t,...r},o):a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE CELL"})};u.registerChaiBlock(ee,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:h.ViewHorizontalIcon,props:{styles:l.S({default:"w-full"})},blocks:E("TableRow")});const te=e=>{const{blockProps:t,children:o,content:r,styles:s}=e;return!o&&y.isEmpty(r)?a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t}):o?d.createElement("td",{...t,...s},o):d.createElement("td",{...t,...s,dangerouslySetInnerHTML:{__html:r}})};u.registerChaiBlock(te,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:h.DragHandleHorizontalIcon,props:{styles:l.S({default:""}),content:l.m({title:"Content",default:"Table cell item"})}});const le=e=>{const{blockProps:t,errorMessage:o,name:r,_type:s,successMessage:n,action:i,styles:c,children:p}=e;let m=p;p||(m=a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:{},text:"FORM FIELDS"}));const x={"x-data":"useForm","x-on:submit.prevent":"post"},g={"x-html":"formResponse",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return a.jsxRuntimeExports.jsxs("form",{...x,"data-error":o,"data-success":n,method:"post",action:i,...t,...c,children:[a.jsxRuntimeExports.jsx("div",{...g}),a.jsxRuntimeExports.jsx("input",{name:"formname",type:"hidden",value:r||s}),m]})};u.registerChaiBlock(le,{type:"Form",label:"Form",category:"core",icon:h.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 oe=e=>{const{blockProps:t,content:o,styles:r,children:s}=e,n={...r,...t};return s?d.createElement("label",n,s):d.createElement("label",{...n,dangerouslySetInnerHTML:{__html:o}})};u.registerChaiBlock(oe,{type:"Label",label:"Label",category:"core",icon:h.LetterCaseToggleIcon,group:"form",hidden:!0,props:{styles:l.S({default:""}),content:l.u({title:"Content",default:"Label"})}});const re=e=>{const{blockProps:t,inBuilder:o,label:r,placeholder:s,styles:n,inputStyles:i,icon:c,iconPos:p}=e,m=f.generateUUID(),x={"x-bind:disabled":"formLoading"};return a.jsxRuntimeExports.jsxs("button",{id:m,...x,...i,...n,...t||{},type:o?"button":"submit",placeholder:s,children:[r,c&&a.jsxRuntimeExports.jsx("span",{className:p,dangerouslySetInnerHTML:{__html:c}})]})};u.registerChaiBlock(re,{type:"FormButton",label:"Submit Button",category:"core",icon:h.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 se=e=>{const{blockProps:t,fieldName:o,label:r,styles:s,inputStyles:n,required:i,checked:c,showLabel:p=!0}=e,m=f.generateUUID();return p?a.jsxRuntimeExports.jsxs("div",{...s,...t,children:[a.jsxRuntimeExports.jsx("input",{...n,name:o,id:m,type:"checkbox",required:i,defaultChecked:c}),r&&r!=="Label"&&a.jsxRuntimeExports.jsx("label",{htmlFor:m,children:r})]}):a.jsxRuntimeExports.jsx("input",{id:m,...t,...n,...s,type:"checkbox",required:i,name:o})};u.registerChaiBlock(se,{type:"Checkbox",label:"Checkbox",category:"core",icon:h.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 ne=e=>{const{blockProps:t,label:o,placeholder:r,styles:s,inputStyles:n,showLabel:i,required:c,inputType:p="text",inBuilder:m,fieldName:x}=e,g=f.generateUUID();return!i||p==="submit"?(p==="submit"&&(t.value=o),a.jsxRuntimeExports.jsx("input",{id:g,name:x,readOnly:m,...t,...n,...s,type:p,placeholder:r,required:c})):a.jsxRuntimeExports.jsxs("div",{...s,...t,children:[i&&a.jsxRuntimeExports.jsx("label",{htmlFor:g,children:o}),a.jsxRuntimeExports.jsx("input",{name:x,readOnly:m,...n,id:g,type:p,placeholder:r,required:c})]})};u.registerChaiBlock(ne,{type:"Input",label:"Input",category:"core",icon:h.InputIcon,group:"form",hidden:!0,props:{styles:l.S({default:""}),fieldName:l.u({title:"Field Name",default:"input"}),inputType:l.s({title:"Type",options:y.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 ae=e=>{const{blockProps:t,fieldName:o,label:r,styles:s,inputStyles:n,checked:i,required:c,showLabel:p=!0}=e,m=f.generateUUID();return p?a.jsxRuntimeExports.jsxs("div",{...s,...t,children:[a.jsxRuntimeExports.jsx("input",{...n,name:o,id:m,type:"radio",required:c,defaultChecked:i}),r&&a.jsxRuntimeExports.jsx("label",{htmlFor:m,children:r})]}):a.jsxRuntimeExports.jsx("input",{id:m,...t,...n,...s,type:"radio",required:c,checked:i,name:o})};u.registerChaiBlock(ae,{type:"Radio",label:"Radio",category:"core",icon:h.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 ie=e=>{const{blockProps:t,fieldName:o,label:r,placeholder:s,styles:n,inputStyles:i,required:c,showLabel:p,_multiple:m=!1}=e,x=f.generateUUID();return p?a.jsxRuntimeExports.jsxs("div",{...n,children:[p&&a.jsxRuntimeExports.jsx("label",{htmlFor:x,children:r}),a.jsxRuntimeExports.jsxs("select",{...i,id:x,placeholder:s,required:c,multiple:m,name:o,children:[a.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:s}),y.map(e.options,g=>a.jsxRuntimeExports.jsx("option",{selected:y.get(g,"selected",!1),value:g.value,dangerouslySetInnerHTML:{__html:g.label}},g.value))]})]}):a.jsxRuntimeExports.jsxs("select",{id:x,...n,...t,placeholder:s,required:c,multiple:m,name:o,children:[a.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:s}),y.map(e.options,g=>a.jsxRuntimeExports.jsx("option",{selected:y.get(g,"selected",!1),value:g.value,dangerouslySetInnerHTML:{__html:g.label}},g.value))]})};u.registerChaiBlock(ie,{type:"Select",label:"Select",category:"core",icon:h.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 ce=e=>{const{blockProps:t,fieldName:o,label:r,placeholder:s,styles:n,inputStyles:i,_rows:c,showLabel:p}=e,m=f.generateUUID();return p?a.jsxRuntimeExports.jsxs("div",{...n,...t,children:[p&&a.jsxRuntimeExports.jsx("label",{htmlFor:m,children:r}),a.jsxRuntimeExports.jsx("textarea",{name:o,...i,id:m,placeholder:s,rows:c})]}):a.jsxRuntimeExports.jsx("textarea",{id:m,name:o,...t,...i,...n,placeholder:s,rows:c})};u.registerChaiBlock(ce,{type:"TextArea",label:"TextArea",category:"core",icon:h.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 ue=y.noop;exports.loadWebBlocks=ue;
|