@chaibuilder/sdk 0.1.23 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/{AddBlocks-189ba69a.js → AddBlocks-5818ee33.js} +13 -14
  2. package/dist/AddBlocks-97c464e1.cjs +3 -0
  3. package/dist/{BrandingOptions-c01e08fc.js → BrandingOptions-3095a1ac.js} +1 -1
  4. package/dist/{BrandingOptions-e659a7bf.cjs → BrandingOptions-a4de85eb.cjs} +1 -1
  5. package/dist/{CanvasArea-933848fb.cjs → CanvasArea-45062968.cjs} +2 -2
  6. package/dist/{CanvasArea-9106ecb5.js → CanvasArea-a6706381.js} +2 -2
  7. package/dist/{CurrentPage-92d8bfe0.cjs → CurrentPage-181bbdc0.cjs} +1 -1
  8. package/dist/{CurrentPage-37d2f495.js → CurrentPage-36e1f888.js} +1 -1
  9. package/dist/{Layers-c08aa961.js → Layers-066e5450.js} +2 -2
  10. package/dist/{Layers-94aeb9f0.cjs → Layers-884713c8.cjs} +1 -1
  11. package/dist/{MarkAsGlobalBlock-07cb6760.cjs → MarkAsGlobalBlock-3336e964.cjs} +1 -1
  12. package/dist/{MarkAsGlobalBlock-10422d13.js → MarkAsGlobalBlock-dc93e527.js} +1 -1
  13. package/dist/{PagesPanel-e4807890.cjs → PagesPanel-574a0a87.cjs} +1 -1
  14. package/dist/{PagesPanel-be499af0.js → PagesPanel-dba3d5fa.js} +2 -2
  15. package/dist/{ProjectPanel-0478c85b.cjs → ProjectPanel-a737a211.cjs} +1 -1
  16. package/dist/{ProjectPanel-fd948934.js → ProjectPanel-b7c44110.js} +2 -2
  17. package/dist/Settings-7d129d30.cjs +1 -0
  18. package/dist/{Settings-94b79852.js → Settings-a3117310.js} +450 -449
  19. package/dist/SidePanels-b4ba0640.cjs +1 -0
  20. package/dist/SidePanels-ffe30d1c.js +329 -0
  21. package/dist/{Topbar-0542b5f4.js → Topbar-4e04e218.js} +1 -1
  22. package/dist/{Topbar-d6382110.cjs → Topbar-836552a6.cjs} +1 -1
  23. package/dist/{add-page-modal-6132fdff.cjs → add-page-modal-217f08a5.cjs} +1 -1
  24. package/dist/{add-page-modal-36a6b406.js → add-page-modal-41831178.js} +1 -1
  25. package/dist/core.cjs +1 -1
  26. package/dist/core.js +1 -1
  27. package/dist/{delete-page-modal-68a4d71e.js → delete-page-modal-9c81fd1f.js} +1 -1
  28. package/dist/{delete-page-modal-87c48560.cjs → delete-page-modal-a58fb14e.cjs} +1 -1
  29. package/dist/{index-c49887fe.js → index-088a9534.js} +5 -5
  30. package/dist/{index-6f5cce76.cjs → index-e2dad9ec.cjs} +18 -18
  31. package/dist/{page-viewer-d87e5621.js → page-viewer-6a9db9cc.js} +2 -2
  32. package/dist/{page-viewer-47098c44.cjs → page-viewer-ff2173dd.cjs} +1 -1
  33. package/dist/{project-general-setting-869887d5.cjs → project-general-setting-695a14fa.cjs} +1 -1
  34. package/dist/{project-general-setting-91df16a9.js → project-general-setting-d0cb6eca.js} +1 -1
  35. package/dist/render.cjs +1 -1
  36. package/dist/render.d.ts +2 -4
  37. package/dist/render.js +59 -67
  38. package/dist/{single-page-detail-4a424725.js → single-page-detail-ac77d6d0.js} +2 -2
  39. package/dist/{single-page-detail-1b276c4f.cjs → single-page-detail-f54b60af.cjs} +1 -1
  40. package/dist/textarea-0750bcd2.js +73 -0
  41. package/dist/textarea-a338ede6.cjs +1 -0
  42. package/dist/ui.cjs +1 -1
  43. package/dist/ui.js +72 -73
  44. package/package.json +3 -3
  45. package/dist/AddBlocks-36adcc50.cjs +0 -3
  46. package/dist/Settings-6cb217af.cjs +0 -1
  47. package/dist/SidePanels-4434d31b.cjs +0 -1
  48. package/dist/SidePanels-78d8de19.js +0 -246
  49. package/dist/card-14e1d020.cjs +0 -1
  50. package/dist/card-f8f4f985.js +0 -33
  51. package/dist/textarea-20b2f6b2.cjs +0 -1
  52. package/dist/textarea-9dfb6a32.js +0 -45
@@ -1,246 +0,0 @@
1
- import { j as e } from "./jsx-runtime-944c88e2.js";
2
- import { PlusIcon as L, Half2Icon as V } from "@radix-ui/react-icons";
3
- import v, { useMemo as I, useState as m, useEffect as _, lazy as C, Suspense as b } from "react";
4
- import { useAtom as N } from "jotai";
5
- import { filter as g, map as w, isNull as H, isEmpty as k, find as M, each as O, get as F } from "lodash";
6
- import { B as u, u as P, S as D } from "./useBuilderProp-81a14920.js";
7
- import { T as R, a as J, b as S, c as T } from "./tabs-85caa1e8.js";
8
- import { u as U, p as Y, a as $, b as q } from "./index-c49887fe.js";
9
- import "react-i18next";
10
- import { c as G } from "./utils-ac68b2c8.js";
11
- import { ListTreeIcon as K, DatabaseIcon as Q } from "lucide-react";
12
- import { getChaiDataProviders as W } from "@chaibuilder/blocks";
13
- import { D as X, a as Z, c as ee, e as se, f as ae } from "./dialog-3d4e82ed.js";
14
- import { C as re, a as le, c as te, d as ie } from "./card-f8f4f985.js";
15
- import { S as oe, c as ne, b as ce, d as de, f as A } from "./select-7fddd7c3.js";
16
- import me from "react-json-view";
17
- import "@radix-ui/react-slot";
18
- import "class-variance-authority";
19
- import "@radix-ui/react-tooltip";
20
- import "@radix-ui/react-toast";
21
- import "@radix-ui/react-tabs";
22
- import "./MODIFIERS-2f19c314.js";
23
- import "clsx";
24
- import "@radix-ui/react-scroll-area";
25
- import "react-dom";
26
- import "@floating-ui/react-dom";
27
- import "i18next";
28
- import "flagged";
29
- import "react-dnd";
30
- import "@minoru/react-dnd-treeview";
31
- import "react-hotkeys-hook";
32
- import "flat-to-nested";
33
- import "./html-to-json-45e0e3b5.js";
34
- import "himalaya";
35
- import "redux-undo";
36
- import "@react-hookz/web";
37
- import "sonner";
38
- import "tailwind-merge";
39
- import "@radix-ui/react-dialog";
40
- import "@radix-ui/react-select";
41
- const xe = ({ provider: a, onClose: x }) => {
42
- const [r, n] = m(null);
43
- return _(() => {
44
- a && (a.mockFn ? a.mockFn : a.dataFn)().then((c) => n(c));
45
- }, [a]), a ? /* @__PURE__ */ e.jsx(X, { onOpenChange: (t) => t ? "" : x(), defaultOpen: !0, children: /* @__PURE__ */ e.jsxs(Z, { children: [
46
- /* @__PURE__ */ e.jsxs(ee, { children: [
47
- /* @__PURE__ */ e.jsxs(se, { children: [
48
- "Data Provider: ",
49
- a.name
50
- ] }),
51
- /* @__PURE__ */ e.jsx(ae, { children: a.description })
52
- ] }),
53
- /* @__PURE__ */ e.jsx(
54
- me,
55
- {
56
- name: a.providerKey,
57
- enableClipboard: !1,
58
- displayObjectSize: !1,
59
- displayDataTypes: !1,
60
- src: r
61
- }
62
- )
63
- ] }) }) : null;
64
- }, pe = () => {
65
- const a = I(() => W(), []), [x, r] = U(), [, n] = N(Y), [t, c] = m(
66
- g(a, (s) => w(x, "providerKey").includes(s.providerKey))
67
- ), [i, h] = m(""), [f, o] = m(null), j = g(
68
- a.map((s) => w(t, "providerKey").includes(s.providerKey) ? null : { value: s.providerKey, label: s.name }),
69
- (s) => !H(s)
70
- ), l = () => {
71
- const s = M(a, { providerKey: i });
72
- c((d) => [...d, s]), r((d) => [...d, { providerKey: s.providerKey, args: {} }]), h(""), n("UNSAVED");
73
- }, p = (s) => {
74
- c((d) => g(d, (y) => y.providerKey !== s.providerKey)), r((d) => g(d, (y) => y.providerKey !== s.providerKey)), n("UNSAVED");
75
- }, E = (s) => o(s);
76
- return k(a) ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("p", { className: "text-gray-500 mb-1.5 text-xs p-4", children: [
77
- "You have no data providers registered. Please add a data provider to your project. ",
78
- /* @__PURE__ */ e.jsx("br", {}),
79
- /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
80
- ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "px-1", children: [
81
- /* @__PURE__ */ e.jsx("br", {}),
82
- /* @__PURE__ */ e.jsx("label", { children: /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 mb-1.5 text-xs", children: "Add data providers:" }) }),
83
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-1", children: [
84
- /* @__PURE__ */ e.jsxs(oe, { value: i, onValueChange: (s) => h(s), children: [
85
- /* @__PURE__ */ e.jsx(ne, { className: "w-full", children: /* @__PURE__ */ e.jsx(ce, { placeholder: "Select a provider" }) }),
86
- /* @__PURE__ */ e.jsxs(de, { children: [
87
- /* @__PURE__ */ e.jsx(A, { value: "", children: "Choose" }),
88
- j.map((s) => /* @__PURE__ */ e.jsx(A, { value: s.value, children: s.label }, s.value))
89
- ] })
90
- ] }),
91
- /* @__PURE__ */ e.jsx(u, { onClick: l, disabled: k(i), variant: "destructive", children: "+" })
92
- ] }),
93
- /* @__PURE__ */ e.jsx("br", {}),
94
- /* @__PURE__ */ e.jsxs("div", { className: t.length ? "block" : "hidden", children: [
95
- /* @__PURE__ */ e.jsx("hr", {}),
96
- /* @__PURE__ */ e.jsx("br", {}),
97
- /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 mb-1.5 text-xs", children: "Page data providers:" }),
98
- t.map((s) => /* @__PURE__ */ e.jsx(re, { className: "mt-2 rounded-md", children: /* @__PURE__ */ e.jsxs(le, { className: "p-2", children: [
99
- /* @__PURE__ */ e.jsx(te, { children: s.name }),
100
- /* @__PURE__ */ e.jsx(ie, { children: s.description }),
101
- /* @__PURE__ */ e.jsx("button", { onClick: () => E(s), className: "text-left text-xs text-blue-500", children: "view data" }),
102
- /* @__PURE__ */ e.jsx("button", { onClick: () => p(s), className: "text-left text-xs text-red-500", children: "remove" })
103
- ] }) })),
104
- /* @__PURE__ */ e.jsx(xe, { onClose: () => o(null), provider: f })
105
- ] })
106
- ] });
107
- }, z = C(() => import("./Layers-c08aa961.js")), ue = C(() => import("./BrandingOptions-c01e08fc.js")), he = C(() => import("./ImagesPanel-38c44785.js"));
108
- let B = null;
109
- const as = () => {
110
- const a = P("sideBarComponents.top", []), x = P("sideBarComponents.bottom", []), [r, n] = N($), [t, c] = m(r), [i, h] = m(null), f = {
111
- layers: z,
112
- "branding-options": ue,
113
- images: he
114
- };
115
- O(a, ({ name: l, panel: p }) => {
116
- f[l] = p;
117
- });
118
- const o = (l) => {
119
- clearTimeout(B), j(!1), r !== "layers" && l === "layers" ? B = setTimeout(() => c("layers"), 500) : c(l), n(l);
120
- }, [, j] = N(q);
121
- return /* @__PURE__ */ e.jsxs("div", { className: "relative flex", children: [
122
- /* @__PURE__ */ e.jsxs("div", { className: "z-[100] flex h-full w-fit flex-col items-center justify-between border-b border-r border-border bg-background pt-2", children: [
123
- /* @__PURE__ */ e.jsxs("div", { className: "relative z-[100] flex w-14 flex-col items-center space-y-2", children: [
124
- /* @__PURE__ */ e.jsx(
125
- u,
126
- {
127
- onClick: () => {
128
- j(!0), n("layers");
129
- },
130
- size: "sm",
131
- variant: r === "add-blocks" ? "default" : "outline",
132
- children: /* @__PURE__ */ e.jsx(L, { className: "text-xl" })
133
- }
134
- ),
135
- /* @__PURE__ */ e.jsx(
136
- u,
137
- {
138
- onClick: () => o("layers"),
139
- size: "sm",
140
- variant: r === "layers" ? "default" : "outline",
141
- children: /* @__PURE__ */ e.jsx(K, { className: "w-4" })
142
- }
143
- ),
144
- /* @__PURE__ */ e.jsx(
145
- u,
146
- {
147
- onClick: () => o("branding-options"),
148
- size: "sm",
149
- variant: r === "branding-options" ? "default" : "outline",
150
- children: /* @__PURE__ */ e.jsx(V, { className: "w-4 max-w-[40px] text-xs" })
151
- }
152
- ),
153
- v.Children.toArray(
154
- a.map(({ name: l, icon: p }) => /* @__PURE__ */ e.jsx(b, { fallback: /* @__PURE__ */ e.jsx(D, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(
155
- u,
156
- {
157
- onClick: () => o(l),
158
- size: "sm",
159
- className: "w-10",
160
- variant: r === l ? "default" : "outline",
161
- children: /* @__PURE__ */ e.jsx(p, {})
162
- }
163
- ) }))
164
- )
165
- ] }),
166
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center space-y-2", children: v.Children.toArray(
167
- x.map((l) => /* @__PURE__ */ e.jsx(b, { fallback: /* @__PURE__ */ e.jsx(D, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(l, {}) }))
168
- ) })
169
- ] }),
170
- /* @__PURE__ */ e.jsx(
171
- "div",
172
- {
173
- onClick: () => {
174
- o("layers");
175
- },
176
- className: "absolute inset-0 right-0 z-50 w-screen bg-black/20" + (r === "layers" ? " hidden" : "")
177
- }
178
- ),
179
- /* @__PURE__ */ e.jsx(
180
- "div",
181
- {
182
- className: `fixed left-14 z-[50] h-full w-96 border-r bg-background duration-500 ease-in-out ${r !== "layers" ? "translate-x-0" : "-translate-x-full"}`,
183
- children: /* @__PURE__ */ e.jsx(
184
- b,
185
- {
186
- fallback: /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-2 bg-white p-4", children: [
187
- /* @__PURE__ */ e.jsx("div", { className: "h-6 w-1/2 bg-gray-300" }),
188
- /* @__PURE__ */ e.jsx("div", { className: "h-16 w-full bg-gray-200" }),
189
- /* @__PURE__ */ e.jsx("div", { className: "h-16 w-full bg-gray-200" })
190
- ] }),
191
- children: /* @__PURE__ */ e.jsx(
192
- "div",
193
- {
194
- className: G("relative h-full max-h-[93%] bg-background p-1", r === "layers" ? "" : "z-[100]"),
195
- onMouseEnter: () => {
196
- i && clearTimeout(i);
197
- },
198
- onMouseLeave: () => {
199
- const l = setTimeout(() => {
200
- i && (o("layers"), clearTimeout(i));
201
- }, 1e3);
202
- h(l);
203
- },
204
- children: v.createElement(F(f, t, () => /* @__PURE__ */ e.jsx("div", {})))
205
- }
206
- )
207
- }
208
- )
209
- }
210
- ),
211
- /* @__PURE__ */ e.jsx("div", { className: "h-full w-60 border-r p-1", children: /* @__PURE__ */ e.jsx(
212
- b,
213
- {
214
- fallback: /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-2 p-4", children: [
215
- /* @__PURE__ */ e.jsx("div", { className: "h-6 w-1/2 bg-gray-300" }),
216
- /* @__PURE__ */ e.jsx("div", { className: "h-16 w-full bg-gray-200" }),
217
- /* @__PURE__ */ e.jsx("div", { className: "h-16 w-full bg-gray-200" })
218
- ] }),
219
- children: /* @__PURE__ */ e.jsxs(R, { defaultValue: "layers", className: "flex h-full w-full flex-col py-1", children: [
220
- /* @__PURE__ */ e.jsxs(J, { className: "mx-1 h-10 grid grid-cols-2", children: [
221
- /* @__PURE__ */ e.jsxs(S, { value: "layers", children: [
222
- /* @__PURE__ */ e.jsx(K, { className: "h-3 mr-2" }),
223
- " Layers"
224
- ] }),
225
- /* @__PURE__ */ e.jsxs(S, { value: "data-provider", children: [
226
- /* @__PURE__ */ e.jsx(Q, { className: "w-3 mr-2" }),
227
- "Data"
228
- ] })
229
- ] }),
230
- /* @__PURE__ */ e.jsx(
231
- T,
232
- {
233
- value: "layers",
234
- className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
235
- children: v.createElement(z)
236
- }
237
- ),
238
- /* @__PURE__ */ e.jsx(T, { value: "data-provider", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(pe, {}) })
239
- ] })
240
- }
241
- ) })
242
- ] });
243
- };
244
- export {
245
- as as default
246
- };
@@ -1 +0,0 @@
1
- "use strict";const a=require("./jsx-runtime-5c3ac4f7.cjs"),m=require("react"),s=require("./utils-3c452dd0.cjs");function u(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=u(m),d=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("div",{ref:t,className:s.cn("rounded-xl border bg-card text-card-foreground shadow",e),...r}));d.displayName="Card";const c=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("div",{ref:t,className:s.cn("flex flex-col space-y-1.5 p-6",e),...r}));c.displayName="CardHeader";const i=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("h3",{ref:t,className:s.cn("font-semibold leading-none tracking-tight",e),...r}));i.displayName="CardTitle";const l=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("p",{ref:t,className:s.cn("text-sm text-muted-foreground",e),...r}));l.displayName="CardDescription";const p=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("div",{ref:t,className:s.cn("p-6 pt-0",e),...r}));p.displayName="CardContent";const f=o.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("div",{ref:t,className:s.cn(" flex items-center p-6 pt-0",e),...r}));f.displayName="CardFooter";exports.Card=d;exports.CardContent=p;exports.CardDescription=l;exports.CardFooter=f;exports.CardHeader=c;exports.CardTitle=i;
@@ -1,33 +0,0 @@
1
- import { j as s } from "./jsx-runtime-944c88e2.js";
2
- import * as d from "react";
3
- import { c as o } from "./utils-ac68b2c8.js";
4
- const t = d.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("div", { ref: r, className: o("rounded-xl border bg-card text-card-foreground shadow", a), ...e }));
5
- t.displayName = "Card";
6
- const i = d.forwardRef(
7
- ({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("div", { ref: r, className: o("flex flex-col space-y-1.5 p-6", a), ...e })
8
- );
9
- i.displayName = "CardHeader";
10
- const c = d.forwardRef(
11
- ({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("h3", { ref: r, className: o("font-semibold leading-none tracking-tight", a), ...e })
12
- );
13
- c.displayName = "CardTitle";
14
- const m = d.forwardRef(
15
- ({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("p", { ref: r, className: o("text-sm text-muted-foreground", a), ...e })
16
- );
17
- m.displayName = "CardDescription";
18
- const n = d.forwardRef(
19
- ({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("div", { ref: r, className: o("p-6 pt-0", a), ...e })
20
- );
21
- n.displayName = "CardContent";
22
- const f = d.forwardRef(
23
- ({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx("div", { ref: r, className: o(" flex items-center p-6 pt-0", a), ...e })
24
- );
25
- f.displayName = "CardFooter";
26
- export {
27
- t as C,
28
- i as a,
29
- f as b,
30
- c,
31
- m as d,
32
- n as e
33
- };
@@ -1 +0,0 @@
1
- "use strict";const a=require("./jsx-runtime-5c3ac4f7.cjs"),u=require("react"),f=require("class-variance-authority"),i=require("./utils-3c452dd0.cjs");function x(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=x(u),p=f.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=n.forwardRef(({className:e,variant:r,...t},s)=>a.jsxRuntimeExports.jsx("div",{ref:s,role:"alert",className:i.cn(p({variant:r}),e),...t}));o.displayName="Alert";const l=n.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("h5",{ref:t,className:i.cn("mb-1 font-medium leading-none tracking-tight",e),...r}));l.displayName="AlertTitle";const c=n.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("div",{ref:t,className:i.cn("text-sm [&_p]:leading-relaxed",e),...r}));c.displayName="AlertDescription";const d=n.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("textarea",{className:i.cn("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:t,...r}));d.displayName="Textarea";exports.Alert=o;exports.AlertDescription=c;exports.AlertTitle=l;exports.Textarea=d;
@@ -1,45 +0,0 @@
1
- import { j as a } from "./jsx-runtime-944c88e2.js";
2
- import * as s from "react";
3
- import { cva as d } from "class-variance-authority";
4
- import { c as o } from "./utils-ac68b2c8.js";
5
- const l = d(
6
- "relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
7
- {
8
- variants: {
9
- variant: {
10
- default: "bg-background text-foreground",
11
- destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
12
- }
13
- },
14
- defaultVariants: {
15
- variant: "default"
16
- }
17
- }
18
- ), n = s.forwardRef(({ className: e, variant: t, ...r }, i) => /* @__PURE__ */ a.jsx("div", { ref: i, role: "alert", className: o(l({ variant: t }), e), ...r }));
19
- n.displayName = "Alert";
20
- const c = s.forwardRef(
21
- ({ className: e, ...t }, r) => /* @__PURE__ */ a.jsx("h5", { ref: r, className: o("mb-1 font-medium leading-none tracking-tight", e), ...t })
22
- );
23
- c.displayName = "AlertTitle";
24
- const m = s.forwardRef(
25
- ({ className: e, ...t }, r) => /* @__PURE__ */ a.jsx("div", { ref: r, className: o("text-sm [&_p]:leading-relaxed", e), ...t })
26
- );
27
- m.displayName = "AlertDescription";
28
- const f = s.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a.jsx(
29
- "textarea",
30
- {
31
- className: o(
32
- "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
33
- e
34
- ),
35
- ref: r,
36
- ...t
37
- }
38
- ));
39
- f.displayName = "Textarea";
40
- export {
41
- n as A,
42
- f as T,
43
- c as a,
44
- m as b
45
- };