@blocknote/shadcn 0.30.1 → 0.31.1

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.
@@ -1,54 +1,54 @@
1
- import { jsx as a, jsxs as g, Fragment as ve } from "react/jsx-runtime";
2
- import { assertEmpty as m, mergeCSSClasses as Ne } from "@blocknote/core";
3
- import { elementOverflow as L, mergeRefs as z, useFocusWithin as xe, FormattingToolbarController as we, getFormattingToolbarItems as Ce, FormattingToolbar as ye, ComponentsContext as Se, BlockNoteViewRaw as Te } from "@blocknote/react";
4
- import * as c from "react";
5
- import { createContext as Ie, useContext as Me, forwardRef as p, useMemo as E, useRef as V, useEffect as A, useState as De } from "react";
6
- import { FormProvider as Re, useFormContext as Be, useForm as Fe } from "react-hook-form";
1
+ import { jsx as a, jsxs as g, Fragment as we } from "react/jsx-runtime";
2
+ import { assertEmpty as m, mergeCSSClasses as Ce } from "@blocknote/core";
3
+ import { elementOverflow as z, mergeRefs as E, useFocusWithin as ye, FormattingToolbarController as Se, getFormattingToolbarItems as Te, FormattingToolbar as Me, ComponentsContext as Ie, BlockNoteViewRaw as De } from "@blocknote/react";
4
+ import * as b from "react";
5
+ import { createContext as Re, useContext as ke, forwardRef as p, useMemo as V, useRef as A, useEffect as $, useState as Be } from "react";
6
+ import { FormProvider as Fe, useFormContext as Pe, useForm as Le } from "react-hook-form";
7
7
  import * as S from "@radix-ui/react-avatar";
8
- import { clsx as ke } from "clsx";
9
- import { extendTailwindMerge as Pe } from "tailwind-merge";
8
+ import { clsx as ze } from "clsx";
9
+ import { extendTailwindMerge as Ee } from "tailwind-merge";
10
10
  import { cva as I } from "class-variance-authority";
11
- import { Slot as $ } from "@radix-ui/react-slot";
11
+ import { Slot as j } from "@radix-ui/react-slot";
12
12
  import * as N from "@radix-ui/react-dropdown-menu";
13
- import { ChevronRight as j, Check as G, Circle as Le, ChevronDown as U, ChevronUp as ze } from "lucide-react";
13
+ import { ChevronRight as q, Check as G, Circle as Ve, ChevronDown as U, ChevronUp as Ae } from "lucide-react";
14
14
  import * as H from "@radix-ui/react-label";
15
- import * as M from "@radix-ui/react-popover";
15
+ import * as D from "@radix-ui/react-popover";
16
16
  import * as x from "@radix-ui/react-select";
17
17
  import * as y from "@radix-ui/react-tabs";
18
18
  import * as O from "@radix-ui/react-toggle";
19
19
  import * as T from "@radix-ui/react-tooltip";
20
- const Ee = Pe({
20
+ const $e = Ee({
21
21
  prefix: "bn-"
22
22
  });
23
- function d(...n) {
24
- return Ee(ke(n));
23
+ function i(...n) {
24
+ return $e(ze(n));
25
25
  }
26
- const q = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
26
+ const K = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
27
27
  S.Root,
28
28
  {
29
29
  ref: e,
30
- className: d(
30
+ className: i(
31
31
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
32
32
  n
33
33
  ),
34
34
  ...t
35
35
  }
36
36
  ));
37
- q.displayName = S.Root.displayName;
38
- const K = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
37
+ K.displayName = S.Root.displayName;
38
+ const Q = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
39
39
  S.Image,
40
40
  {
41
41
  ref: e,
42
- className: d("aspect-square h-full w-full", n),
42
+ className: i("aspect-square h-full w-full", n),
43
43
  ...t
44
44
  }
45
45
  ));
46
- K.displayName = S.Image.displayName;
47
- const W = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
46
+ Q.displayName = S.Image.displayName;
47
+ const W = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
48
48
  S.Fallback,
49
49
  {
50
50
  ref: e,
51
- className: d(
51
+ className: i(
52
52
  "bg-muted flex h-full w-full items-center justify-center rounded-full",
53
53
  n
54
54
  ),
@@ -56,7 +56,7 @@ const W = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
56
56
  }
57
57
  ));
58
58
  W.displayName = S.Fallback.displayName;
59
- const Ve = I(
59
+ const je = I(
60
60
  "bn-inline-flex bn-items-center bn-rounded-full bn-border bn-px-2.5 bn-py-0.5 bn-text-xs bn-font-semibold bn-transition-colors focus:bn-outline-none focus:bn-ring-2 focus:bn-ring-ring focus:bn-ring-offset-2",
61
61
  {
62
62
  variants: {
@@ -72,10 +72,10 @@ const Ve = I(
72
72
  }
73
73
  }
74
74
  );
75
- function Ae({ className: n, variant: t, ...e }) {
76
- return /* @__PURE__ */ a("div", { className: d(Ve({ variant: t }), n), ...e });
75
+ function qe({ className: n, variant: t, ...e }) {
76
+ return /* @__PURE__ */ a("div", { className: i(je({ variant: t }), n), ...e });
77
77
  }
78
- const $e = I(
78
+ const Ge = I(
79
79
  "bn-inline-flex bn-items-center bn-justify-center bn-whitespace-nowrap bn-rounded-md bn-text-sm bn-font-medium bn-ring-offset-background bn-transition-colors focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-pointer-events-none disabled:bn-opacity-50",
80
80
  {
81
81
  variants: {
@@ -99,76 +99,76 @@ const $e = I(
99
99
  size: "default"
100
100
  }
101
101
  }
102
- ), _ = c.forwardRef(
102
+ ), Z = b.forwardRef(
103
103
  ({ className: n, variant: t, size: e, asChild: o = !1, ...r }, s) => /* @__PURE__ */ a(
104
- o ? $ : "button",
104
+ o ? j : "button",
105
105
  {
106
- className: d($e({ variant: t, size: e, className: n })),
106
+ className: i(Ge({ variant: t, size: e, className: n })),
107
107
  ref: s,
108
108
  type: "button",
109
109
  ...r
110
110
  }
111
111
  )
112
112
  );
113
- _.displayName = "Button";
114
- const J = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
113
+ Z.displayName = "Button";
114
+ const _ = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
115
115
  "div",
116
116
  {
117
117
  ref: e,
118
- className: d(
118
+ className: i(
119
119
  "bn-rounded-lg bn-border bn-bg-card bn-text-card-foreground bn-shadow-sm",
120
120
  n
121
121
  ),
122
122
  ...t
123
123
  }
124
124
  ));
125
- J.displayName = "Card";
126
- const je = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
125
+ _.displayName = "Card";
126
+ const Ue = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
127
127
  "div",
128
128
  {
129
129
  ref: e,
130
- className: d("bn-flex bn-flex-col bn-space-y-1.5 bn-p-6", n),
130
+ className: i("bn-flex bn-flex-col bn-space-y-1.5 bn-p-6", n),
131
131
  ...t
132
132
  }
133
133
  ));
134
- je.displayName = "CardHeader";
135
- const Ge = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
134
+ Ue.displayName = "CardHeader";
135
+ const He = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
136
136
  "h3",
137
137
  {
138
138
  ref: e,
139
- className: d(
139
+ className: i(
140
140
  "bn-text-2xl bn-font-semibold bn-leading-none bn-tracking-tight",
141
141
  n
142
142
  ),
143
143
  ...t
144
144
  }
145
145
  ));
146
- Ge.displayName = "CardTitle";
147
- const Ue = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
146
+ He.displayName = "CardTitle";
147
+ const Oe = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
148
148
  "p",
149
149
  {
150
150
  ref: e,
151
- className: d("bn-text-sm bn-text-muted-foreground", n),
151
+ className: i("bn-text-sm bn-text-muted-foreground", n),
152
152
  ...t
153
153
  }
154
154
  ));
155
- Ue.displayName = "CardDescription";
156
- const Q = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a("div", { ref: e, className: d("bn-p-6 bn-pt-0", n), ...t }));
157
- Q.displayName = "CardContent";
158
- const He = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
155
+ Oe.displayName = "CardDescription";
156
+ const J = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a("div", { ref: e, className: i("bn-p-6 bn-pt-0", n), ...t }));
157
+ J.displayName = "CardContent";
158
+ const Ke = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
159
159
  "div",
160
160
  {
161
161
  ref: e,
162
- className: d("bn-flex bn-items-center bn-p-6 bn-pt-0", n),
162
+ className: i("bn-flex bn-items-center bn-p-6 bn-pt-0", n),
163
163
  ...t
164
164
  }
165
165
  ));
166
- He.displayName = "CardFooter";
167
- const Oe = N.Root, qe = N.Trigger, Ke = N.Sub, X = c.forwardRef(({ className: n, inset: t, children: e, ...o }, r) => /* @__PURE__ */ g(
166
+ Ke.displayName = "CardFooter";
167
+ const Qe = N.Root, We = N.Trigger, Ze = N.Sub, X = b.forwardRef(({ className: n, inset: t, children: e, ...o }, r) => /* @__PURE__ */ g(
168
168
  N.SubTrigger,
169
169
  {
170
170
  ref: r,
171
- className: d(
171
+ className: i(
172
172
  "bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none focus:bn-bg-accent data-[state=open]:bn-bg-accent",
173
173
  t && "bn-pl-8",
174
174
  n
@@ -176,16 +176,16 @@ const Oe = N.Root, qe = N.Trigger, Ke = N.Sub, X = c.forwardRef(({ className: n,
176
176
  ...o,
177
177
  children: [
178
178
  e,
179
- /* @__PURE__ */ a(j, { className: "bn-ml-auto bn-h-4 bn-w-4" })
179
+ /* @__PURE__ */ a(q, { className: "bn-ml-auto bn-h-4 bn-w-4" })
180
180
  ]
181
181
  }
182
182
  ));
183
183
  X.displayName = N.SubTrigger.displayName;
184
- const Y = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
184
+ const Y = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
185
185
  N.SubContent,
186
186
  {
187
187
  ref: e,
188
- className: d(
188
+ className: i(
189
189
  "bn-z-50 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-lg data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
190
190
  n
191
191
  ),
@@ -193,14 +193,14 @@ const Y = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
193
193
  }
194
194
  ));
195
195
  Y.displayName = N.SubContent.displayName;
196
- const Z = c.forwardRef(({ className: n, sideOffset: t = 4, ...e }, o) => (
196
+ const ee = b.forwardRef(({ className: n, sideOffset: t = 4, ...e }, o) => (
197
197
  // <DropdownMenuPrimitive.Portal>
198
198
  /* @__PURE__ */ a(
199
199
  N.Content,
200
200
  {
201
201
  ref: o,
202
202
  sideOffset: t,
203
- className: d(
203
+ className: i(
204
204
  "bn-z-50 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
205
205
  n
206
206
  ),
@@ -208,12 +208,12 @@ const Z = c.forwardRef(({ className: n, sideOffset: t = 4, ...e }, o) => (
208
208
  }
209
209
  )
210
210
  ));
211
- Z.displayName = N.Content.displayName;
212
- const ee = c.forwardRef(({ className: n, inset: t, ...e }, o) => /* @__PURE__ */ a(
211
+ ee.displayName = N.Content.displayName;
212
+ const ne = b.forwardRef(({ className: n, inset: t, ...e }, o) => /* @__PURE__ */ a(
213
213
  N.Item,
214
214
  {
215
215
  ref: o,
216
- className: d(
216
+ className: i(
217
217
  "bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
218
218
  t && "bn-pl-8",
219
219
  n
@@ -221,12 +221,12 @@ const ee = c.forwardRef(({ className: n, inset: t, ...e }, o) => /* @__PURE__ */
221
221
  ...e
222
222
  }
223
223
  ));
224
- ee.displayName = N.Item.displayName;
225
- const ne = c.forwardRef(({ className: n, children: t, checked: e, ...o }, r) => /* @__PURE__ */ g(
224
+ ne.displayName = N.Item.displayName;
225
+ const te = b.forwardRef(({ className: n, children: t, checked: e, ...o }, r) => /* @__PURE__ */ g(
226
226
  N.CheckboxItem,
227
227
  {
228
228
  ref: r,
229
- className: d(
229
+ className: i(
230
230
  "bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
231
231
  n
232
232
  ),
@@ -238,28 +238,28 @@ const ne = c.forwardRef(({ className: n, children: t, checked: e, ...o }, r) =>
238
238
  ]
239
239
  }
240
240
  ));
241
- ne.displayName = N.CheckboxItem.displayName;
242
- const We = c.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
241
+ te.displayName = N.CheckboxItem.displayName;
242
+ const _e = b.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
243
243
  N.RadioItem,
244
244
  {
245
245
  ref: o,
246
- className: d(
246
+ className: i(
247
247
  "bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
248
248
  n
249
249
  ),
250
250
  ...e,
251
251
  children: [
252
- /* @__PURE__ */ a("span", { className: "bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center", children: /* @__PURE__ */ a(N.ItemIndicator, { children: /* @__PURE__ */ a(Le, { className: "bn-h-2 bn-w-2 bn-fill-current" }) }) }),
252
+ /* @__PURE__ */ a("span", { className: "bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center", children: /* @__PURE__ */ a(N.ItemIndicator, { children: /* @__PURE__ */ a(Ve, { className: "bn-h-2 bn-w-2 bn-fill-current" }) }) }),
253
253
  t
254
254
  ]
255
255
  }
256
256
  ));
257
- We.displayName = N.RadioItem.displayName;
258
- const te = c.forwardRef(({ className: n, inset: t, ...e }, o) => /* @__PURE__ */ a(
257
+ _e.displayName = N.RadioItem.displayName;
258
+ const oe = b.forwardRef(({ className: n, inset: t, ...e }, o) => /* @__PURE__ */ a(
259
259
  N.Label,
260
260
  {
261
261
  ref: o,
262
- className: d(
262
+ className: i(
263
263
  "bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold",
264
264
  t && "bn-pl-8",
265
265
  n
@@ -267,31 +267,31 @@ const te = c.forwardRef(({ className: n, inset: t, ...e }, o) => /* @__PURE__ */
267
267
  ...e
268
268
  }
269
269
  ));
270
- te.displayName = N.Label.displayName;
271
- const oe = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
270
+ oe.displayName = N.Label.displayName;
271
+ const ae = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
272
272
  N.Separator,
273
273
  {
274
274
  ref: e,
275
- className: d("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", n),
275
+ className: i("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", n),
276
276
  ...t
277
277
  }
278
278
  ));
279
- oe.displayName = N.Separator.displayName;
280
- const _e = I(
279
+ ae.displayName = N.Separator.displayName;
280
+ const Je = I(
281
281
  "bn-text-sm bn-font-medium bn-leading-none peer-disabled:bn-cursor-not-allowed peer-disabled:bn-opacity-70"
282
- ), P = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
282
+ ), P = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
283
283
  H.Root,
284
284
  {
285
285
  ref: e,
286
- className: d(_e(), n),
286
+ className: i(Je(), n),
287
287
  ...t
288
288
  }
289
289
  ));
290
290
  P.displayName = H.Root.displayName;
291
- const Je = Re, Qe = c.createContext(
291
+ const Xe = Fe, Ye = b.createContext(
292
292
  {}
293
- ), D = () => {
294
- const n = c.useContext(Qe), t = c.useContext(ae), { getFieldState: e, formState: o } = Be(), r = e(n.name, o);
293
+ ), R = () => {
294
+ const n = b.useContext(Ye), t = b.useContext(re), { getFieldState: e, formState: o } = Pe(), r = e(n.name, o);
295
295
  if (!n)
296
296
  throw new Error("useFormField should be used within <FormField>");
297
297
  const { id: s } = t;
@@ -303,30 +303,30 @@ const Je = Re, Qe = c.createContext(
303
303
  formMessageId: `${s}-form-item-message`,
304
304
  ...r
305
305
  };
306
- }, ae = c.createContext(
306
+ }, re = b.createContext(
307
307
  {}
308
- ), Xe = c.forwardRef(({ className: n, ...t }, e) => {
309
- const o = c.useId();
310
- return /* @__PURE__ */ a(ae.Provider, { value: { id: o }, children: /* @__PURE__ */ a("div", { ref: e, className: d("bn-space-y-2", n), ...t }) });
308
+ ), en = b.forwardRef(({ className: n, ...t }, e) => {
309
+ const o = b.useId();
310
+ return /* @__PURE__ */ a(re.Provider, { value: { id: o }, children: /* @__PURE__ */ a("div", { ref: e, className: i("bn-space-y-2", n), ...t }) });
311
311
  });
312
- Xe.displayName = "FormItem";
313
- const Ye = c.forwardRef(({ className: n, ...t }, e) => {
314
- const { error: o, formItemId: r } = D();
312
+ en.displayName = "FormItem";
313
+ const nn = b.forwardRef(({ className: n, ...t }, e) => {
314
+ const { error: o, formItemId: r } = R();
315
315
  return /* @__PURE__ */ a(
316
316
  P,
317
317
  {
318
318
  ref: e,
319
- className: d(o && "bn-text-destructive", n),
319
+ className: i(o && "bn-text-destructive", n),
320
320
  htmlFor: r,
321
321
  ...t
322
322
  }
323
323
  );
324
324
  });
325
- Ye.displayName = "FormLabel";
326
- const Ze = c.forwardRef(({ ...n }, t) => {
327
- const { error: e, formItemId: o, formDescriptionId: r, formMessageId: s } = D();
325
+ nn.displayName = "FormLabel";
326
+ const tn = b.forwardRef(({ ...n }, t) => {
327
+ const { error: e, formItemId: o, formDescriptionId: r, formMessageId: s } = R();
328
328
  return /* @__PURE__ */ a(
329
- $,
329
+ j,
330
330
  {
331
331
  ref: t,
332
332
  id: o,
@@ -336,40 +336,40 @@ const Ze = c.forwardRef(({ ...n }, t) => {
336
336
  }
337
337
  );
338
338
  });
339
- Ze.displayName = "FormControl";
340
- const en = c.forwardRef(({ className: n, ...t }, e) => {
341
- const { formDescriptionId: o } = D();
339
+ tn.displayName = "FormControl";
340
+ const on = b.forwardRef(({ className: n, ...t }, e) => {
341
+ const { formDescriptionId: o } = R();
342
342
  return /* @__PURE__ */ a(
343
343
  "p",
344
344
  {
345
345
  ref: e,
346
346
  id: o,
347
- className: d("bn-text-sm bn-text-muted-foreground", n),
347
+ className: i("bn-text-sm bn-text-muted-foreground", n),
348
348
  ...t
349
349
  }
350
350
  );
351
351
  });
352
- en.displayName = "FormDescription";
353
- const nn = c.forwardRef(({ className: n, children: t, ...e }, o) => {
354
- const { error: r, formMessageId: s } = D(), i = r ? String(r == null ? void 0 : r.message) : t;
355
- return i ? /* @__PURE__ */ a(
352
+ on.displayName = "FormDescription";
353
+ const an = b.forwardRef(({ className: n, children: t, ...e }, o) => {
354
+ const { error: r, formMessageId: s } = R(), l = r ? String(r == null ? void 0 : r.message) : t;
355
+ return l ? /* @__PURE__ */ a(
356
356
  "p",
357
357
  {
358
358
  ref: o,
359
359
  id: s,
360
- className: d("bn-text-sm bn-font-medium bn-text-destructive", n),
360
+ className: i("bn-text-sm bn-font-medium bn-text-destructive", n),
361
361
  ...e,
362
- children: i
362
+ children: l
363
363
  }
364
364
  ) : null;
365
365
  });
366
- nn.displayName = "FormMessage";
367
- const re = c.forwardRef(
366
+ an.displayName = "FormMessage";
367
+ const se = b.forwardRef(
368
368
  ({ className: n, type: t, ...e }, o) => /* @__PURE__ */ a(
369
369
  "input",
370
370
  {
371
371
  type: t,
372
- className: d(
372
+ className: i(
373
373
  "bn-flex bn-h-10 bn-w-full bn-rounded-md bn-border bn-border-input bn-bg-background bn-px-3 bn-py-2 bn-text-sm bn-ring-offset-background file:bn-border-0 file:bn-bg-transparent file:bn-text-sm file:bn-font-medium placeholder:bn-text-muted-foreground focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-cursor-not-allowed disabled:bn-opacity-50",
374
374
  n
375
375
  ),
@@ -378,16 +378,16 @@ const re = c.forwardRef(
378
378
  }
379
379
  )
380
380
  );
381
- re.displayName = "Input";
382
- const tn = M.Root, on = M.Trigger, se = c.forwardRef(({ className: n, align: t = "center", sideOffset: e = 4, ...o }, r) => (
381
+ se.displayName = "Input";
382
+ const rn = D.Root, sn = D.Trigger, ie = b.forwardRef(({ className: n, align: t = "center", sideOffset: e = 4, ...o }, r) => (
383
383
  // <PopoverPrimitive.Portal>
384
384
  /* @__PURE__ */ a(
385
- M.Content,
385
+ D.Content,
386
386
  {
387
387
  ref: r,
388
388
  align: t,
389
389
  sideOffset: e,
390
- className: d(
390
+ className: i(
391
391
  "bn-z-50 bn-w-72 bn-rounded-md bn-border bn-bg-popover bn-p-4 bn-text-popover-foreground bn-shadow-md bn-outline-none data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
392
392
  n
393
393
  ),
@@ -395,12 +395,12 @@ const tn = M.Root, on = M.Trigger, se = c.forwardRef(({ className: n, align: t =
395
395
  }
396
396
  )
397
397
  ));
398
- se.displayName = M.Content.displayName;
399
- const an = x.Root, rn = x.Value, ie = c.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
398
+ ie.displayName = D.Content.displayName;
399
+ const ln = x.Root, dn = x.Value, le = b.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
400
400
  x.Trigger,
401
401
  {
402
402
  ref: o,
403
- className: d(
403
+ className: i(
404
404
  "bn-flex bn-h-10 bn-w-full bn-items-center bn-justify-between bn-rounded-md bn-border bn-border-input bn-bg-background bn-px-3 bn-py-2 bn-text-sm bn-ring-offset-background placeholder:bn-text-muted-foreground focus:bn-outline-none focus:bn-ring-2 focus:bn-ring-ring focus:bn-ring-offset-2 disabled:bn-cursor-not-allowed disabled:bn-opacity-50 [&>span]:bn-line-clamp-1",
405
405
  n
406
406
  ),
@@ -411,25 +411,25 @@ const an = x.Root, rn = x.Value, ie = c.forwardRef(({ className: n, children: t,
411
411
  ]
412
412
  }
413
413
  ));
414
- ie.displayName = x.Trigger.displayName;
415
- const de = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
414
+ le.displayName = x.Trigger.displayName;
415
+ const de = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
416
416
  x.ScrollUpButton,
417
417
  {
418
418
  ref: e,
419
- className: d(
419
+ className: i(
420
420
  "bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",
421
421
  n
422
422
  ),
423
423
  ...t,
424
- children: /* @__PURE__ */ a(ze, { className: "bn-h-4 bn-w-4" })
424
+ children: /* @__PURE__ */ a(Ae, { className: "bn-h-4 bn-w-4" })
425
425
  }
426
426
  ));
427
427
  de.displayName = x.ScrollUpButton.displayName;
428
- const le = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
428
+ const be = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
429
429
  x.ScrollDownButton,
430
430
  {
431
431
  ref: e,
432
- className: d(
432
+ className: i(
433
433
  "bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",
434
434
  n
435
435
  ),
@@ -437,14 +437,14 @@ const le = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
437
437
  children: /* @__PURE__ */ a(U, { className: "bn-h-4 bn-w-4" })
438
438
  }
439
439
  ));
440
- le.displayName = x.ScrollDownButton.displayName;
441
- const be = c.forwardRef(({ className: n, children: t, position: e = "popper", ...o }, r) => (
440
+ be.displayName = x.ScrollDownButton.displayName;
441
+ const ce = b.forwardRef(({ className: n, children: t, position: e = "popper", ...o }, r) => (
442
442
  // <SelectPrimitive.Portal>
443
443
  /* @__PURE__ */ g(
444
444
  x.Content,
445
445
  {
446
446
  ref: r,
447
- className: d(
447
+ className: i(
448
448
  "bn-relative bn-z-50 bn-max-h-96 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
449
449
  e === "popper" && "data-[side=bottom]:bn-translate-y-1 data-[side=left]:bn--translate-x-1 data-[side=right]:bn-translate-x-1 data-[side=top]:bn--translate-y-1",
450
450
  n
@@ -456,36 +456,36 @@ const be = c.forwardRef(({ className: n, children: t, position: e = "popper", ..
456
456
  /* @__PURE__ */ a(
457
457
  x.Viewport,
458
458
  {
459
- className: d(
459
+ className: i(
460
460
  "bn-p-1",
461
461
  e === "popper" && "bn-h-[var(--radix-select-trigger-height)] bn-w-full bn-min-w-[var(--radix-select-trigger-width)]"
462
462
  ),
463
463
  children: t
464
464
  }
465
465
  ),
466
- /* @__PURE__ */ a(le, {})
466
+ /* @__PURE__ */ a(be, {})
467
467
  ]
468
468
  }
469
469
  )
470
470
  ));
471
- be.displayName = x.Content.displayName;
472
- const sn = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
471
+ ce.displayName = x.Content.displayName;
472
+ const bn = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
473
473
  x.Label,
474
474
  {
475
475
  ref: e,
476
- className: d(
476
+ className: i(
477
477
  "bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-font-semibold",
478
478
  n
479
479
  ),
480
480
  ...t
481
481
  }
482
482
  ));
483
- sn.displayName = x.Label.displayName;
484
- const ce = c.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
483
+ bn.displayName = x.Label.displayName;
484
+ const me = b.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
485
485
  x.Item,
486
486
  {
487
487
  ref: o,
488
- className: d(
488
+ className: i(
489
489
  "bn-relative bn-flex bn-w-full bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
490
490
  n
491
491
  ),
@@ -496,65 +496,65 @@ const ce = c.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__
496
496
  ]
497
497
  }
498
498
  ));
499
- ce.displayName = x.Item.displayName;
500
- const dn = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
499
+ me.displayName = x.Item.displayName;
500
+ const cn = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
501
501
  x.Separator,
502
502
  {
503
503
  ref: e,
504
- className: d("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", n),
504
+ className: i("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", n),
505
505
  ...t
506
506
  }
507
507
  ));
508
- dn.displayName = x.Separator.displayName;
509
- function ln({
508
+ cn.displayName = x.Separator.displayName;
509
+ function mn({
510
510
  className: n,
511
511
  ...t
512
512
  }) {
513
513
  return /* @__PURE__ */ a(
514
514
  "div",
515
515
  {
516
- className: d("bg-primary/10 animate-pulse rounded-md", n),
516
+ className: i("bg-primary/10 animate-pulse rounded-md", n),
517
517
  ...t
518
518
  }
519
519
  );
520
520
  }
521
- const bn = y.Root, me = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
521
+ const un = y.Root, ue = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
522
522
  y.List,
523
523
  {
524
524
  ref: e,
525
- className: d(
525
+ className: i(
526
526
  "bn-inline-flex bn-h-10 bn-items-center bn-justify-center bn-rounded-md bn-bg-muted bn-p-1 bn-text-muted-foreground",
527
527
  n
528
528
  ),
529
529
  ...t
530
530
  }
531
531
  ));
532
- me.displayName = y.List.displayName;
533
- const ue = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
532
+ ue.displayName = y.List.displayName;
533
+ const pe = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
534
534
  y.Trigger,
535
535
  {
536
536
  ref: e,
537
- className: d(
537
+ className: i(
538
538
  "bn-inline-flex bn-items-center bn-justify-center bn-whitespace-nowrap bn-rounded-sm bn-px-3 bn-py-1.5 bn-text-sm bn-font-medium bn-ring-offset-background bn-transition-all focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-pointer-events-none disabled:bn-opacity-50 data-[state=active]:bn-bg-background data-[state=active]:bn-text-foreground data-[state=active]:bn-shadow-sm",
539
539
  n
540
540
  ),
541
541
  ...t
542
542
  }
543
543
  ));
544
- ue.displayName = y.Trigger.displayName;
545
- const pe = c.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
544
+ pe.displayName = y.Trigger.displayName;
545
+ const fe = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
546
546
  y.Content,
547
547
  {
548
548
  ref: e,
549
- className: d(
549
+ className: i(
550
550
  "bn-mt-2 bn-ring-offset-background focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2",
551
551
  n
552
552
  ),
553
553
  ...t
554
554
  }
555
555
  ));
556
- pe.displayName = y.Content.displayName;
557
- const cn = I(
556
+ fe.displayName = y.Content.displayName;
557
+ const pn = I(
558
558
  "bn-inline-flex bn-items-center bn-justify-center bn-rounded-md bn-text-sm bn-font-medium bn-ring-offset-background bn-transition-colors hover:bn-bg-muted hover:bn-text-muted-foreground focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-pointer-events-none disabled:bn-opacity-50 data-[state=on]:bn-bg-accent data-[state=on]:bn-text-accent-foreground",
559
559
  {
560
560
  variants: {
@@ -573,152 +573,160 @@ const cn = I(
573
573
  size: "default"
574
574
  }
575
575
  }
576
- ), fe = c.forwardRef(({ className: n, variant: t, size: e, ...o }, r) => /* @__PURE__ */ a(
576
+ ), ge = b.forwardRef(({ className: n, variant: t, size: e, ...o }, r) => /* @__PURE__ */ a(
577
577
  O.Root,
578
578
  {
579
579
  ref: r,
580
- className: d(cn({ variant: t, size: e, className: n })),
580
+ className: i(pn({ variant: t, size: e, className: n })),
581
581
  ...o
582
582
  }
583
583
  ));
584
- fe.displayName = O.Root.displayName;
585
- const mn = T.Provider, un = T.Root, pn = T.Trigger, ge = c.forwardRef(({ className: n, sideOffset: t = 4, ...e }, o) => /* @__PURE__ */ a(
584
+ ge.displayName = O.Root.displayName;
585
+ const fn = T.Provider, gn = T.Root, hn = T.Trigger, he = b.forwardRef(({ className: n, sideOffset: t = 4, ...e }, o) => /* @__PURE__ */ a(
586
586
  T.Content,
587
587
  {
588
588
  ref: o,
589
589
  sideOffset: t,
590
- className: d(
590
+ className: i(
591
591
  "bn-z-50 bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-px-3 bn-py-1.5 bn-text-sm bn-text-popover-foreground bn-shadow-md bn-animate-in bn-fade-in-0 bn-zoom-in-95 data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=closed]:bn-zoom-out-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
592
592
  n
593
593
  ),
594
594
  ...e
595
595
  }
596
596
  ));
597
- ge.displayName = T.Content.displayName;
598
- const fn = {
597
+ he.displayName = T.Content.displayName;
598
+ const vn = {
599
599
  Avatar: {
600
- Avatar: q,
600
+ Avatar: K,
601
601
  AvatarFallback: W,
602
- AvatarImage: K
602
+ AvatarImage: Q
603
603
  },
604
604
  Badge: {
605
- Badge: Ae
605
+ Badge: qe
606
606
  },
607
607
  Button: {
608
- Button: _
608
+ Button: Z
609
609
  },
610
610
  Card: {
611
- Card: J,
612
- CardContent: Q
611
+ Card: _,
612
+ CardContent: J
613
613
  },
614
614
  DropdownMenu: {
615
- DropdownMenu: Oe,
616
- DropdownMenuCheckboxItem: ne,
617
- DropdownMenuContent: Z,
618
- DropdownMenuItem: ee,
619
- DropdownMenuLabel: te,
620
- DropdownMenuSeparator: oe,
621
- DropdownMenuSub: Ke,
615
+ DropdownMenu: Qe,
616
+ DropdownMenuCheckboxItem: te,
617
+ DropdownMenuContent: ee,
618
+ DropdownMenuItem: ne,
619
+ DropdownMenuLabel: oe,
620
+ DropdownMenuSeparator: ae,
621
+ DropdownMenuSub: Ze,
622
622
  DropdownMenuSubContent: Y,
623
623
  DropdownMenuSubTrigger: X,
624
- DropdownMenuTrigger: qe
624
+ DropdownMenuTrigger: We
625
625
  },
626
626
  Form: {
627
- Form: Je
627
+ Form: Xe
628
628
  },
629
629
  Input: {
630
- Input: re
630
+ Input: se
631
631
  },
632
632
  Label: {
633
633
  Label: P
634
634
  },
635
635
  Popover: {
636
- Popover: tn,
637
- PopoverContent: se,
638
- PopoverTrigger: on
636
+ Popover: rn,
637
+ PopoverContent: ie,
638
+ PopoverTrigger: sn
639
639
  },
640
640
  Select: {
641
- Select: an,
642
- SelectContent: be,
643
- SelectItem: ce,
644
- SelectTrigger: ie,
645
- SelectValue: rn
641
+ Select: ln,
642
+ SelectContent: ce,
643
+ SelectItem: me,
644
+ SelectTrigger: le,
645
+ SelectValue: dn
646
646
  },
647
647
  Skeleton: {
648
- Skeleton: ln
648
+ Skeleton: mn
649
649
  },
650
650
  Tabs: {
651
- Tabs: bn,
652
- TabsContent: pe,
653
- TabsList: me,
654
- TabsTrigger: ue
651
+ Tabs: un,
652
+ TabsContent: fe,
653
+ TabsList: ue,
654
+ TabsTrigger: pe
655
655
  },
656
656
  Toggle: {
657
- Toggle: fe
657
+ Toggle: ge
658
658
  },
659
659
  Tooltip: {
660
- Tooltip: un,
661
- TooltipContent: ge,
662
- TooltipProvider: mn,
663
- TooltipTrigger: pn
660
+ Tooltip: gn,
661
+ TooltipContent: he,
662
+ TooltipProvider: fn,
663
+ TooltipTrigger: hn
664
664
  }
665
- }, he = Ie(void 0);
665
+ }, ve = Re(void 0);
666
666
  function h() {
667
- return Me(he);
667
+ return ke(ve);
668
668
  }
669
- const gn = (n) => {
669
+ const Nn = (n) => {
670
670
  const { children: t, ...e } = n;
671
671
  m(e);
672
- const o = h(), r = Fe();
672
+ const o = h(), r = Le();
673
673
  return /* @__PURE__ */ a(o.Form.Form, { ...r, children: t });
674
- }, hn = p((n, t) => {
674
+ }, xn = p((n, t) => {
675
675
  const {
676
676
  className: e,
677
677
  name: o,
678
678
  label: r,
679
- icon: s,
679
+ variant: s,
680
+ icon: l,
680
681
  // TODO: implement
681
- value: i,
682
- autoFocus: u,
683
- placeholder: b,
684
- onKeyDown: l,
685
- onChange: f,
686
- onSubmit: v,
687
- ...w
682
+ value: u,
683
+ autoFocus: c,
684
+ placeholder: d,
685
+ disabled: f,
686
+ onKeyDown: v,
687
+ onChange: w,
688
+ onSubmit: C,
689
+ autoComplete: M,
690
+ rightSection: Ne,
691
+ // TODO: add rightSection
692
+ ...xe
688
693
  } = n;
689
- m(w);
690
- const C = h();
691
- return r ? /* @__PURE__ */ g("div", { children: [
692
- /* @__PURE__ */ a(C.Label.Label, { htmlFor: r, children: r }),
693
- /* @__PURE__ */ a(
694
- C.Input.Input,
695
- {
696
- className: e,
697
- id: r,
698
- name: o,
699
- autoFocus: u,
700
- placeholder: b,
701
- value: i,
702
- onKeyDown: l,
703
- onChange: f,
704
- onSubmit: v
705
- }
706
- )
707
- ] }) : /* @__PURE__ */ a(
708
- C.Input.Input,
694
+ m(xe);
695
+ const L = h();
696
+ return /* @__PURE__ */ g(
697
+ "div",
709
698
  {
710
- "aria-label": o,
711
- name: o,
712
- autoFocus: u,
713
- placeholder: b,
714
- value: i,
715
- onKeyDown: l,
716
- onChange: f,
717
- onSubmit: v,
718
- ref: t
699
+ className: i(
700
+ e,
701
+ "bn-flex bn-h-10 bn-w-full bn-rounded-md bn-border bn-border-input bn-bg-background bn-px-3 bn-py-2 bn-text-sm bn-ring-offset-background file:bn-border-0 file:bn-bg-transparent file:bn-text-sm file:bn-font-medium placeholder:bn-text-muted-foreground focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-cursor-not-allowed disabled:bn-opacity-50",
702
+ "bn-items-center bn-gap-2 bn-text-foreground"
703
+ ),
704
+ children: [
705
+ l,
706
+ /* @__PURE__ */ g("div", { className: "bn-flex-1", children: [
707
+ r && /* @__PURE__ */ a(L.Label.Label, { htmlFor: r, children: r }),
708
+ /* @__PURE__ */ a(
709
+ L.Input.Input,
710
+ {
711
+ className: i(e, "bn-border-none bn-p-0 bn-h-auto"),
712
+ id: r,
713
+ name: o,
714
+ autoFocus: c,
715
+ placeholder: d,
716
+ disabled: f,
717
+ value: u,
718
+ onKeyDown: v,
719
+ onChange: w,
720
+ onSubmit: C,
721
+ ref: t
722
+ }
723
+ )
724
+ ] }),
725
+ Ne
726
+ ]
719
727
  }
720
728
  );
721
- }), vn = (n) => p(
729
+ }), wn = (n) => p(
722
730
  (t, e) => /* @__PURE__ */ a(
723
731
  n,
724
732
  {
@@ -733,7 +741,7 @@ const gn = (n) => {
733
741
  ref: e
734
742
  }
735
743
  )
736
- ), Nn = (n) => {
744
+ ), Cn = (n) => {
737
745
  const {
738
746
  children: t,
739
747
  onOpenChange: e,
@@ -743,85 +751,85 @@ const gn = (n) => {
743
751
  ...s
744
752
  } = n;
745
753
  m(s);
746
- const i = h();
754
+ const l = h();
747
755
  return r ? /* @__PURE__ */ a(
748
- i.DropdownMenu.DropdownMenuSub,
756
+ l.DropdownMenu.DropdownMenuSub,
749
757
  {
750
758
  onOpenChange: e,
751
759
  children: t
752
760
  }
753
761
  ) : /* @__PURE__ */ a(
754
- i.DropdownMenu.DropdownMenu,
762
+ l.DropdownMenu.DropdownMenu,
755
763
  {
756
764
  modal: !1,
757
765
  onOpenChange: e,
758
766
  children: t
759
767
  }
760
768
  );
761
- }, xn = (n) => {
769
+ }, yn = (n) => {
762
770
  const { children: t, sub: e, ...o } = n;
763
771
  m(o);
764
- const r = h(), s = E(
765
- () => vn(
772
+ const r = h(), s = V(
773
+ () => wn(
766
774
  r.DropdownMenu.DropdownMenuTrigger
767
775
  ),
768
776
  [r.DropdownMenu.DropdownMenuTrigger]
769
777
  );
770
778
  return e ? /* @__PURE__ */ a(r.DropdownMenu.DropdownMenuSubTrigger, { children: t }) : /* @__PURE__ */ a(s, { asChild: !0, ...o, children: t });
771
- }, wn = p((n, t) => {
779
+ }, Sn = p((n, t) => {
772
780
  const { className: e, children: o, sub: r, ...s } = n;
773
781
  m(s);
774
- const i = h();
782
+ const l = h();
775
783
  return r ? /* @__PURE__ */ a(
776
- i.DropdownMenu.DropdownMenuSubContent,
784
+ l.DropdownMenu.DropdownMenuSubContent,
777
785
  {
778
786
  className: e,
779
787
  ref: t,
780
788
  children: o
781
789
  }
782
790
  ) : /* @__PURE__ */ a(
783
- i.DropdownMenu.DropdownMenuContent,
791
+ l.DropdownMenu.DropdownMenuContent,
784
792
  {
785
793
  className: e,
786
794
  ref: t,
787
795
  children: o
788
796
  }
789
797
  );
790
- }), Cn = p((n, t) => {
791
- const { className: e, children: o, icon: r, checked: s, subTrigger: i, onClick: u, ...b } = n;
792
- m(b);
793
- const l = h();
794
- return i ? /* @__PURE__ */ g(ve, { children: [
798
+ }), Tn = p((n, t) => {
799
+ const { className: e, children: o, icon: r, checked: s, subTrigger: l, onClick: u, ...c } = n;
800
+ m(c);
801
+ const d = h();
802
+ return l ? /* @__PURE__ */ g(we, { children: [
795
803
  r,
796
804
  o
797
805
  ] }) : s !== void 0 ? /* @__PURE__ */ g(
798
- l.DropdownMenu.DropdownMenuCheckboxItem,
806
+ d.DropdownMenu.DropdownMenuCheckboxItem,
799
807
  {
800
- className: d(e, "bn-gap-1", s ? "" : "bn-px-2"),
808
+ className: i(e, "bn-gap-1", s ? "" : "bn-px-2"),
801
809
  ref: t,
802
810
  checked: s,
803
811
  onClick: u,
804
- ...b,
812
+ ...c,
805
813
  children: [
806
814
  r,
807
815
  o
808
816
  ]
809
817
  }
810
818
  ) : /* @__PURE__ */ g(
811
- l.DropdownMenu.DropdownMenuItem,
819
+ d.DropdownMenu.DropdownMenuItem,
812
820
  {
813
821
  className: e,
814
822
  ref: t,
815
823
  onClick: u,
816
- ...b,
824
+ ...c,
817
825
  children: [
818
826
  r,
819
827
  o,
820
- i && /* @__PURE__ */ a(j, { className: "bn-ml-auto bn-h-4 bn-w-4" })
828
+ l && /* @__PURE__ */ a(q, { className: "bn-ml-auto bn-h-4 bn-w-4" })
821
829
  ]
822
830
  }
823
831
  );
824
- }), yn = p((n, t) => {
832
+ }), Mn = p((n, t) => {
825
833
  const { className: e, ...o } = n;
826
834
  m(o);
827
835
  const r = h();
@@ -832,7 +840,7 @@ const gn = (n) => {
832
840
  ref: t
833
841
  }
834
842
  );
835
- }), Sn = p((n, t) => {
843
+ }), In = p((n, t) => {
836
844
  const { className: e, children: o, ...r } = n;
837
845
  m(r);
838
846
  const s = h();
@@ -844,16 +852,16 @@ const gn = (n) => {
844
852
  children: o
845
853
  }
846
854
  );
847
- }), Tn = p((n, t) => {
855
+ }), Dn = p((n, t) => {
848
856
  const {
849
857
  className: e,
850
858
  children: o,
851
859
  icon: r,
852
860
  onClick: s,
853
- onDragEnd: i,
861
+ onDragEnd: l,
854
862
  onDragStart: u,
855
- draggable: b,
856
- label: l,
863
+ draggable: c,
864
+ label: d,
857
865
  ...f
858
866
  } = n;
859
867
  m(f, !1);
@@ -862,13 +870,13 @@ const gn = (n) => {
862
870
  v.Button.Button,
863
871
  {
864
872
  variant: "ghost",
865
- className: d(e, "bn-text-gray-400"),
873
+ className: i(e, "bn-text-gray-400"),
866
874
  ref: t,
867
- "aria-label": l,
875
+ "aria-label": d,
868
876
  onClick: s,
869
877
  onDragStart: u,
870
- onDragEnd: i,
871
- draggable: b,
878
+ onDragEnd: l,
879
+ draggable: c,
872
880
  ...f,
873
881
  children: [
874
882
  r,
@@ -876,39 +884,39 @@ const gn = (n) => {
876
884
  ]
877
885
  }
878
886
  );
879
- }), In = p((n, t) => {
887
+ }), Rn = p((n, t) => {
880
888
  const {
881
889
  className: e,
882
890
  tabs: o,
883
891
  defaultOpenTab: r,
884
892
  openTab: s,
885
- setOpenTab: i,
893
+ setOpenTab: l,
886
894
  loading: u,
887
895
  // TODO: implement loader
888
- ...b
896
+ ...c
889
897
  } = n;
890
- m(b);
891
- const l = h();
898
+ m(c);
899
+ const d = h();
892
900
  return /* @__PURE__ */ g(
893
- l.Tabs.Tabs,
901
+ d.Tabs.Tabs,
894
902
  {
895
- className: d(e, "bn-bg-popover bn-p-2 bn-rounded-lg"),
903
+ className: i(e, "bn-bg-popover bn-p-2 bn-rounded-lg"),
896
904
  ref: t,
897
905
  value: s,
898
906
  defaultValue: r,
899
- onValueChange: i,
907
+ onValueChange: l,
900
908
  children: [
901
- /* @__PURE__ */ a(l.Tabs.TabsList, { children: o.map((f) => /* @__PURE__ */ a(l.Tabs.TabsTrigger, { value: f.name, children: f.name }, f.name)) }),
902
- o.map((f) => /* @__PURE__ */ a(l.Tabs.TabsContent, { value: f.name, children: /* @__PURE__ */ a(l.Card.Card, { children: /* @__PURE__ */ a(l.Card.CardContent, { className: "bn-p-4", children: f.tabPanel }) }) }, f.name))
909
+ /* @__PURE__ */ a(d.Tabs.TabsList, { children: o.map((f) => /* @__PURE__ */ a(d.Tabs.TabsTrigger, { value: f.name, children: f.name }, f.name)) }),
910
+ o.map((f) => /* @__PURE__ */ a(d.Tabs.TabsContent, { value: f.name, children: /* @__PURE__ */ a(d.Card.Card, { children: /* @__PURE__ */ a(d.Card.CardContent, { className: "bn-p-4", children: f.tabPanel }) }) }, f.name))
903
911
  ]
904
912
  }
905
913
  );
906
- }), Mn = p((n, t) => {
914
+ }), kn = p((n, t) => {
907
915
  const { className: e, children: o, ...r } = n;
908
916
  return m(r), /* @__PURE__ */ a(
909
917
  "div",
910
918
  {
911
- className: d(
919
+ className: i(
912
920
  e,
913
921
  "bn-flex bn-flex-col bn-gap-2 bn-items-start bn-justify-center"
914
922
  ),
@@ -916,23 +924,23 @@ const gn = (n) => {
916
924
  children: o
917
925
  }
918
926
  );
919
- }), Dn = p((n, t) => {
920
- const { className: e, value: o, placeholder: r, onKeyDown: s, onChange: i, ...u } = n;
927
+ }), Bn = p((n, t) => {
928
+ const { className: e, value: o, placeholder: r, onKeyDown: s, onChange: l, ...u } = n;
921
929
  m(u);
922
- const b = h();
930
+ const c = h();
923
931
  return /* @__PURE__ */ a(
924
- b.Input.Input,
932
+ c.Input.Input,
925
933
  {
926
934
  "data-test": "embed-input",
927
- className: d(e, "bn-w-80"),
935
+ className: i(e, "bn-w-80"),
928
936
  ref: t,
929
937
  value: o,
930
938
  placeholder: r,
931
939
  onKeyDown: s,
932
- onChange: i
940
+ onChange: l
933
941
  }
934
942
  );
935
- }), Rn = (n) => {
943
+ }), Fn = (n) => {
936
944
  const {
937
945
  children: t,
938
946
  opened: e,
@@ -943,22 +951,22 @@ const gn = (n) => {
943
951
  m(r);
944
952
  const s = h();
945
953
  return /* @__PURE__ */ a(s.Popover.Popover, { open: e, children: t });
946
- }, Bn = p(
954
+ }, Pn = p(
947
955
  (n, t) => {
948
956
  const { children: e, ...o } = n;
949
957
  m(o);
950
958
  const r = h();
951
959
  return /* @__PURE__ */ a(r.Popover.PopoverTrigger, { ref: t, asChild: !0, children: e });
952
960
  }
953
- ), Fn = p((n, t) => {
961
+ ), Ln = p((n, t) => {
954
962
  const { className: e, variant: o, children: r, ...s } = n;
955
963
  m(s);
956
- const i = h();
964
+ const l = h();
957
965
  return /* @__PURE__ */ a(
958
- i.Popover.PopoverContent,
966
+ l.Popover.PopoverContent,
959
967
  {
960
968
  sideOffset: 8,
961
- className: d(
969
+ className: i(
962
970
  e,
963
971
  "bn-flex bn-flex-col bn-gap-2",
964
972
  o === "panel-popover" ? "bn-p-0 bn-border-none bn-shadow-none bn-max-w-none bn-w-fit" : ""
@@ -967,19 +975,19 @@ const gn = (n) => {
967
975
  children: r
968
976
  }
969
977
  );
970
- }), kn = p((n, t) => {
978
+ }), zn = p((n, t) => {
971
979
  const { className: e, children: o, ...r } = n;
972
980
  return m(r, !1), /* @__PURE__ */ a("div", { className: e, ref: t, ...r, children: o });
973
- }), Pn = p((n, t) => {
981
+ }), En = p((n, t) => {
974
982
  const {
975
983
  className: e,
976
984
  children: o,
977
985
  icon: r,
978
986
  onClick: s,
979
- onDragEnd: i,
987
+ onDragEnd: l,
980
988
  onDragStart: u,
981
- draggable: b,
982
- label: l,
989
+ draggable: c,
990
+ label: d,
983
991
  ...f
984
992
  } = n;
985
993
  m(f, !1);
@@ -988,13 +996,13 @@ const gn = (n) => {
988
996
  v.Button.Button,
989
997
  {
990
998
  variant: "ghost",
991
- className: d(e, "bn-text-gray-400"),
999
+ className: i(e, "bn-text-gray-400"),
992
1000
  ref: t,
993
- "aria-label": l,
1001
+ "aria-label": d,
994
1002
  onClick: s,
995
1003
  onDragStart: u,
996
- onDragEnd: i,
997
- draggable: b,
1004
+ onDragEnd: l,
1005
+ draggable: c,
998
1006
  ...f,
999
1007
  children: [
1000
1008
  r,
@@ -1002,9 +1010,9 @@ const gn = (n) => {
1002
1010
  ]
1003
1011
  }
1004
1012
  );
1005
- }), Ln = p((n, t) => {
1006
- const { className: e, children: o, id: r, columns: s, ...i } = n;
1007
- return m(i), /* @__PURE__ */ a(
1013
+ }), Vn = p((n, t) => {
1014
+ const { className: e, children: o, id: r, columns: s, ...l } = n;
1015
+ return m(l), /* @__PURE__ */ a(
1008
1016
  "div",
1009
1017
  {
1010
1018
  className: e,
@@ -1015,7 +1023,7 @@ const gn = (n) => {
1015
1023
  children: o
1016
1024
  }
1017
1025
  );
1018
- }), zn = p((n, t) => {
1026
+ }), An = p((n, t) => {
1019
1027
  const { className: e, children: o, columns: r, ...s } = n;
1020
1028
  return m(s), /* @__PURE__ */ a(
1021
1029
  "div",
@@ -1026,14 +1034,14 @@ const gn = (n) => {
1026
1034
  children: o
1027
1035
  }
1028
1036
  );
1029
- }), En = p((n, t) => {
1037
+ }), $n = p((n, t) => {
1030
1038
  const { className: e, children: o, id: r, ...s } = n;
1031
1039
  return m(s), /* @__PURE__ */ a(
1032
1040
  "div",
1033
1041
  {
1034
1042
  id: r,
1035
1043
  role: "listbox",
1036
- className: d(
1044
+ className: i(
1037
1045
  "bn-z-50 bn-min-w-[8rem] bn-overflow-auto bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
1038
1046
  e
1039
1047
  ),
@@ -1041,12 +1049,12 @@ const gn = (n) => {
1041
1049
  children: o
1042
1050
  }
1043
1051
  );
1044
- }), Vn = p((n, t) => {
1052
+ }), jn = p((n, t) => {
1045
1053
  const { className: e, children: o, ...r } = n;
1046
1054
  return m(r), /* @__PURE__ */ a(
1047
1055
  "div",
1048
1056
  {
1049
- className: d(
1057
+ className: i(
1050
1058
  "bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
1051
1059
  e
1052
1060
  ),
@@ -1054,62 +1062,106 @@ const gn = (n) => {
1054
1062
  children: /* @__PURE__ */ a("div", { children: o })
1055
1063
  }
1056
1064
  );
1057
- }), An = p((n, t) => {
1058
- const e = h(), { className: o, item: r, isSelected: s, onClick: i, id: u, ...b } = n;
1059
- m(b);
1060
- const l = V(null);
1061
- return A(() => {
1062
- if (!l.current || !s)
1065
+ }), qn = p((n, t) => {
1066
+ const e = h(), { className: o, item: r, isSelected: s, onClick: l, id: u, ...c } = n;
1067
+ m(c);
1068
+ const d = A(null);
1069
+ return $(() => {
1070
+ if (!d.current || !s)
1063
1071
  return;
1064
- const f = L(
1065
- l.current,
1066
- document.querySelector(".bn-suggestion-menu")
1072
+ const f = z(
1073
+ d.current,
1074
+ document.querySelector(".bn-suggestion-menu, #ai-suggestion-menu")
1075
+ // TODO
1067
1076
  );
1068
- f === "top" ? l.current.scrollIntoView(!0) : f === "bottom" && l.current.scrollIntoView(!1);
1077
+ f === "top" ? d.current.scrollIntoView(!0) : f === "bottom" && d.current.scrollIntoView(!1);
1069
1078
  }, [s]), /* @__PURE__ */ g(
1070
1079
  "div",
1071
1080
  {
1072
- className: d(
1081
+ className: i(
1073
1082
  "bn-relative bn-flex bn-cursor-pointer bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
1083
+ n.item.size === "small" ? "bn-gap-3 bn-py-1" : "",
1074
1084
  o
1075
1085
  ),
1076
- ref: z([t, l]),
1086
+ ref: E([t, d]),
1077
1087
  id: u,
1078
- onClick: i,
1088
+ onMouseDown: (f) => f.preventDefault(),
1089
+ onClick: l,
1079
1090
  role: "option",
1080
1091
  "aria-selected": s || void 0,
1081
1092
  children: [
1082
- r.icon && /* @__PURE__ */ a("div", { className: "bn-p-3", "data-position": "left", children: r.icon }),
1093
+ r.icon && /* @__PURE__ */ a(
1094
+ "div",
1095
+ {
1096
+ className: i(
1097
+ "bn-p-3",
1098
+ n.item.size === "small" ? "bn-p-0" : "",
1099
+ o
1100
+ ),
1101
+ "data-position": "left",
1102
+ children: r.icon
1103
+ }
1104
+ ),
1083
1105
  /* @__PURE__ */ g("div", { className: "bn-flex-1", children: [
1084
- /* @__PURE__ */ a("div", { className: "bn-text-base", children: r.title }),
1085
- /* @__PURE__ */ a("div", { className: "bn-text-xs", children: r.subtext })
1106
+ /* @__PURE__ */ a(
1107
+ "div",
1108
+ {
1109
+ className: i(
1110
+ "bn-text-base",
1111
+ n.item.size === "small" ? "bn-text-sm" : "",
1112
+ o
1113
+ ),
1114
+ children: r.title
1115
+ }
1116
+ ),
1117
+ /* @__PURE__ */ a(
1118
+ "div",
1119
+ {
1120
+ className: i(
1121
+ "bn-text-xs",
1122
+ n.item.size === "small" ? "bn-hidden" : "",
1123
+ o
1124
+ ),
1125
+ children: r.subtext
1126
+ }
1127
+ )
1086
1128
  ] }),
1087
1129
  r.badge && /* @__PURE__ */ a("div", { "data-position": "right", className: "bn-text-xs", children: /* @__PURE__ */ a(e.Badge.Badge, { variant: "secondary", children: r.badge }) })
1088
1130
  ]
1089
1131
  }
1090
1132
  );
1091
- }), $n = p((n, t) => {
1133
+ }), Gn = p((n, t) => {
1092
1134
  const { className: e, children: o, ...r } = n;
1093
1135
  return m(r), /* @__PURE__ */ a(
1094
1136
  "div",
1095
1137
  {
1096
- className: d("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold", e),
1138
+ className: i("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold", e),
1097
1139
  ref: t,
1098
1140
  children: o
1099
1141
  }
1100
1142
  );
1101
- }), jn = p((n, t) => {
1102
- const { className: e, children: o, ...r } = n;
1103
- return m(r), /* @__PURE__ */ a("div", { className: e, ref: t, children: o });
1104
- }), Gn = p((n, t) => {
1105
- const { className: e, children: o, onMouseDown: r, onClick: s, ...i } = n;
1106
- m(i, !1);
1143
+ }), Un = p((n, t) => {
1144
+ const { className: e, ...o } = n;
1145
+ return m(o), /* @__PURE__ */ a("div", { className: i(e, "bn-animate-spin"), ref: t, children: /* @__PURE__ */ a(
1146
+ "svg",
1147
+ {
1148
+ xmlns: "http://www.w3.org/2000/svg",
1149
+ height: "1em",
1150
+ viewBox: "0 -960 960 960",
1151
+ width: "1em",
1152
+ fill: "#e8eaed",
1153
+ children: /* @__PURE__ */ a("path", { d: "M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q17 0 28.5 11.5T520-840q0 17-11.5 28.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-17 11.5-28.5T840-520q17 0 28.5 11.5T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Z" })
1154
+ }
1155
+ ) });
1156
+ }), Hn = p((n, t) => {
1157
+ const { className: e, children: o, onMouseDown: r, onClick: s, ...l } = n;
1158
+ m(l, !1);
1107
1159
  const u = h();
1108
1160
  return /* @__PURE__ */ a(
1109
1161
  u.Button.Button,
1110
1162
  {
1111
1163
  variant: "ghost",
1112
- className: d(
1164
+ className: i(
1113
1165
  e,
1114
1166
  "bn-p-0 bn-h-full bn-w-full bn-text-gray-400",
1115
1167
  e != null && e.includes("bn-extend-button-add-remove-columns") ? "bn-ml-1" : "bn-mt-1",
@@ -1118,57 +1170,57 @@ const gn = (n) => {
1118
1170
  ref: t,
1119
1171
  onClick: s,
1120
1172
  onMouseDown: r,
1121
- ...i,
1173
+ ...l,
1122
1174
  children: o
1123
1175
  }
1124
1176
  );
1125
- }), Un = p((n, t) => {
1177
+ }), On = p((n, t) => {
1126
1178
  const {
1127
1179
  className: e,
1128
1180
  children: o,
1129
1181
  draggable: r,
1130
1182
  onDragStart: s,
1131
- onDragEnd: i,
1183
+ onDragEnd: l,
1132
1184
  style: u,
1133
- label: b,
1134
- ...l
1185
+ label: c,
1186
+ ...d
1135
1187
  } = n;
1136
- m(l, !1);
1188
+ m(d, !1);
1137
1189
  const f = h();
1138
1190
  return /* @__PURE__ */ a(
1139
1191
  f.Button.Button,
1140
1192
  {
1141
1193
  variant: "ghost",
1142
- className: d(e, "bn-p-0 bn-h-fit bn-w-fit bn-text-gray-400"),
1194
+ className: i(e, "bn-p-0 bn-h-fit bn-w-fit bn-text-gray-400"),
1143
1195
  ref: t,
1144
- "aria-label": b,
1196
+ "aria-label": c,
1145
1197
  draggable: r,
1146
1198
  onDragStart: s,
1147
- onDragEnd: i,
1199
+ onDragEnd: l,
1148
1200
  style: u,
1149
- ...l,
1201
+ ...d,
1150
1202
  children: o
1151
1203
  }
1152
1204
  );
1153
- }), B = p(
1205
+ }), k = p(
1154
1206
  (n, t) => {
1155
1207
  const {
1156
1208
  className: e,
1157
1209
  children: o,
1158
1210
  onMouseEnter: r,
1159
1211
  onMouseLeave: s,
1160
- variant: i,
1212
+ variant: l,
1161
1213
  ...u
1162
1214
  } = n;
1163
1215
  m(u);
1164
- const b = h();
1165
- return /* @__PURE__ */ a(b.Tooltip.TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ a(
1216
+ const c = h();
1217
+ return /* @__PURE__ */ a(c.Tooltip.TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ a(
1166
1218
  "div",
1167
1219
  {
1168
- className: d(
1220
+ className: i(
1169
1221
  e,
1170
1222
  "bn-flex bn-gap-1 bn-p-1 bn-bg-popover bn-text-popover-foreground bn-border bn-rounded-lg bn-shadow-md bn-h-fit",
1171
- i === "action-toolbar" ? "bn-w-fit" : ""
1223
+ l === "action-toolbar" ? "bn-w-fit" : ""
1172
1224
  ),
1173
1225
  ref: t,
1174
1226
  onMouseEnter: r,
@@ -1177,66 +1229,66 @@ const gn = (n) => {
1177
1229
  }
1178
1230
  ) });
1179
1231
  }
1180
- ), F = p(
1232
+ ), B = p(
1181
1233
  (n, t) => {
1182
1234
  const {
1183
1235
  className: e,
1184
1236
  children: o,
1185
1237
  mainTooltip: r,
1186
1238
  secondaryTooltip: s,
1187
- icon: i,
1239
+ icon: l,
1188
1240
  isSelected: u,
1189
- isDisabled: b,
1190
- onClick: l,
1241
+ isDisabled: c,
1242
+ onClick: d,
1191
1243
  label: f,
1192
1244
  variant: v,
1193
1245
  ...w
1194
1246
  } = n;
1195
1247
  m(w, !1);
1196
- const C = h(), R = u === void 0 ? /* @__PURE__ */ g(
1248
+ const C = h(), M = u === void 0 ? /* @__PURE__ */ g(
1197
1249
  C.Button.Button,
1198
1250
  {
1199
- className: d(
1251
+ className: i(
1200
1252
  e,
1201
1253
  v === "compact" ? "bn-h-6 bn-min-w-6 bn-p-0" : ""
1202
1254
  ),
1203
1255
  variant: "ghost",
1204
1256
  size: v === "compact" ? "sm" : "default",
1205
- disabled: b,
1206
- onClick: l,
1257
+ disabled: c,
1258
+ onClick: d,
1207
1259
  ref: t,
1208
1260
  "aria-label": f,
1209
1261
  ...w,
1210
1262
  children: [
1211
- i,
1263
+ l,
1212
1264
  o
1213
1265
  ]
1214
1266
  }
1215
1267
  ) : /* @__PURE__ */ g(
1216
1268
  C.Toggle.Toggle,
1217
1269
  {
1218
- className: d(
1270
+ className: i(
1219
1271
  e,
1220
1272
  "data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground",
1221
1273
  v === "compact" ? "bn-h-6 bn-min-w-6 bn-p-0" : ""
1222
1274
  ),
1223
1275
  size: v === "compact" ? "sm" : "default",
1224
1276
  "aria-label": f,
1225
- onClick: l,
1277
+ onClick: d,
1226
1278
  pressed: u,
1227
- disabled: b,
1279
+ disabled: c,
1228
1280
  "data-state": u ? "on" : "off",
1229
- "data-disabled": b,
1281
+ "data-disabled": c,
1230
1282
  ref: t,
1231
1283
  ...w,
1232
1284
  children: [
1233
- i,
1285
+ l,
1234
1286
  o
1235
1287
  ]
1236
1288
  }
1237
1289
  );
1238
1290
  return /* @__PURE__ */ g(C.Tooltip.Tooltip, { children: [
1239
- /* @__PURE__ */ a(C.Tooltip.TooltipTrigger, { asChild: !0, children: R }),
1291
+ /* @__PURE__ */ a(C.Tooltip.TooltipTrigger, { asChild: !0, children: M }),
1240
1292
  /* @__PURE__ */ g(
1241
1293
  C.Tooltip.TooltipContent,
1242
1294
  {
@@ -1249,60 +1301,60 @@ const gn = (n) => {
1249
1301
  )
1250
1302
  ] });
1251
1303
  }
1252
- ), k = p((n, t) => {
1304
+ ), F = p((n, t) => {
1253
1305
  const { className: e, items: o, isDisabled: r, ...s } = n;
1254
1306
  m(s);
1255
- const i = h(), u = (l) => /* @__PURE__ */ g("div", { className: "bn-flex bn-gap-1 bn-items-center", children: [
1256
- l.icon,
1257
- l.text
1258
- ] }), b = o.filter((l) => l.isSelected)[0];
1259
- return b ? /* @__PURE__ */ g(
1260
- i.Select.Select,
1307
+ const l = h(), u = (d) => /* @__PURE__ */ g("div", { className: "bn-flex bn-gap-1 bn-items-center", children: [
1308
+ d.icon,
1309
+ d.text
1310
+ ] }), c = o.filter((d) => d.isSelected)[0];
1311
+ return c ? /* @__PURE__ */ g(
1312
+ l.Select.Select,
1261
1313
  {
1262
- value: b.text,
1263
- onValueChange: (l) => {
1314
+ value: c.text,
1315
+ onValueChange: (d) => {
1264
1316
  var f, v;
1265
- return (v = (f = o.find((w) => w.text === l)).onClick) == null ? void 0 : v.call(f);
1317
+ return (v = (f = o.find((w) => w.text === d)).onClick) == null ? void 0 : v.call(f);
1266
1318
  },
1267
1319
  disabled: r,
1268
1320
  children: [
1269
- /* @__PURE__ */ a(i.Select.SelectTrigger, { className: "bn-border-none", children: /* @__PURE__ */ a(i.Select.SelectValue, {}) }),
1270
- /* @__PURE__ */ a(i.Select.SelectContent, { className: e, ref: t, children: o.map((l) => /* @__PURE__ */ a(
1271
- i.Select.SelectItem,
1321
+ /* @__PURE__ */ a(l.Select.SelectTrigger, { className: "bn-border-none", children: /* @__PURE__ */ a(l.Select.SelectValue, {}) }),
1322
+ /* @__PURE__ */ a(l.Select.SelectContent, { className: e, ref: t, children: o.map((d) => /* @__PURE__ */ a(
1323
+ l.Select.SelectItem,
1272
1324
  {
1273
- disabled: l.isDisabled,
1274
- value: l.text,
1275
- children: /* @__PURE__ */ a(u, { ...l })
1325
+ disabled: d.isDisabled,
1326
+ value: d.text,
1327
+ children: /* @__PURE__ */ a(u, { ...d })
1276
1328
  },
1277
- l.text
1329
+ d.text
1278
1330
  )) })
1279
1331
  ]
1280
1332
  }
1281
1333
  ) : null;
1282
- }), Hn = p((n, t) => {
1334
+ }), Kn = p((n, t) => {
1283
1335
  const {
1284
1336
  className: e,
1285
1337
  children: o,
1286
1338
  selected: r,
1287
1339
  headerText: s,
1288
- onFocus: i,
1340
+ onFocus: l,
1289
1341
  onBlur: u,
1290
- tabIndex: b,
1291
- ...l
1342
+ tabIndex: c,
1343
+ ...d
1292
1344
  } = n;
1293
- m(l);
1345
+ m(d);
1294
1346
  const f = h();
1295
1347
  return /* @__PURE__ */ g(
1296
1348
  f.Card.Card,
1297
1349
  {
1298
- className: d(
1350
+ className: i(
1299
1351
  e,
1300
1352
  "bn-w-[300px]",
1301
1353
  r ? "bn-bg-accent bn-text-accent-foreground" : ""
1302
1354
  ),
1303
- onFocus: i,
1355
+ onFocus: l,
1304
1356
  onBlur: u,
1305
- tabIndex: b,
1357
+ tabIndex: c,
1306
1358
  ref: t,
1307
1359
  children: [
1308
1360
  s && /* @__PURE__ */ a("div", { className: "bn-px-4 bn-pt-4 bn-italic bn-text-sm", children: s }),
@@ -1310,12 +1362,12 @@ const gn = (n) => {
1310
1362
  ]
1311
1363
  }
1312
1364
  );
1313
- }), On = p((n, t) => {
1365
+ }), Qn = p((n, t) => {
1314
1366
  const { className: e, children: o, ...r } = n;
1315
1367
  return m(r), /* @__PURE__ */ a(
1316
1368
  "div",
1317
1369
  {
1318
- className: d(
1370
+ className: i(
1319
1371
  e,
1320
1372
  "bn-p-4",
1321
1373
  e != null && e.includes("bn-thread-comments") ? "bn-flex bn-flex-col bn-gap-6 bn-border-b" : ""
@@ -1324,14 +1376,14 @@ const gn = (n) => {
1324
1376
  children: o
1325
1377
  }
1326
1378
  );
1327
- }), qn = p((n, t) => {
1379
+ }), Wn = p((n, t) => {
1328
1380
  const { className: e, children: o, ...r } = n;
1329
1381
  m(r, !1);
1330
1382
  const s = h();
1331
1383
  return /* @__PURE__ */ a(
1332
1384
  s.Button.Button,
1333
1385
  {
1334
- className: d(
1386
+ className: i(
1335
1387
  e,
1336
1388
  "bn-p-0 bn-w-fit bn-text-foreground bn-bg-transparent hover:bn-bg-transparent"
1337
1389
  ),
@@ -1339,23 +1391,23 @@ const gn = (n) => {
1339
1391
  children: o
1340
1392
  }
1341
1393
  );
1342
- }), Kn = p((n, t) => {
1394
+ }), Zn = p((n, t) => {
1343
1395
  const { authorInfo: e, timeString: o, edited: r, ...s } = n;
1344
1396
  m(s, !1);
1345
- const i = h();
1397
+ const l = h();
1346
1398
  return e === "loading" ? /* @__PURE__ */ g(
1347
1399
  "div",
1348
1400
  {
1349
1401
  className: "bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-4",
1350
1402
  children: [
1351
1403
  /* @__PURE__ */ a(
1352
- i.Skeleton.Skeleton,
1404
+ l.Skeleton.Skeleton,
1353
1405
  {
1354
1406
  className: "bn-size-7 bn-rounded-full bn-bg-neutral-400 bn-animate-pulse"
1355
1407
  }
1356
1408
  ),
1357
1409
  /* @__PURE__ */ a(
1358
- i.Skeleton.Skeleton,
1410
+ l.Skeleton.Skeleton,
1359
1411
  {
1360
1412
  className: "bn-h-3 bn-w-32 bn-rounded-full bn-bg-neutral-400 bn-animate-pulse"
1361
1413
  }
@@ -1367,16 +1419,16 @@ const gn = (n) => {
1367
1419
  {
1368
1420
  className: "bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-4",
1369
1421
  children: [
1370
- /* @__PURE__ */ g(i.Avatar.Avatar, { children: [
1422
+ /* @__PURE__ */ g(l.Avatar.Avatar, { children: [
1371
1423
  /* @__PURE__ */ a(
1372
- i.Avatar.AvatarImage,
1424
+ l.Avatar.AvatarImage,
1373
1425
  {
1374
1426
  src: e.avatarUrl,
1375
1427
  alt: e.username,
1376
1428
  className: "bn-h-7 bn-rounded-full"
1377
1429
  }
1378
1430
  ),
1379
- /* @__PURE__ */ a(i.Avatar.AvatarFallback, { children: e.username[0] })
1431
+ /* @__PURE__ */ a(l.Avatar.AvatarFallback, { children: e.username[0] })
1380
1432
  ] }),
1381
1433
  /* @__PURE__ */ g(
1382
1434
  "div",
@@ -1395,47 +1447,47 @@ const gn = (n) => {
1395
1447
  ]
1396
1448
  }
1397
1449
  );
1398
- }), Wn = p((n, t) => {
1450
+ }), _n = p((n, t) => {
1399
1451
  const {
1400
1452
  className: e,
1401
1453
  showActions: o,
1402
1454
  authorInfo: r,
1403
1455
  timeString: s,
1404
- actions: i,
1456
+ actions: l,
1405
1457
  edited: u,
1406
- children: b,
1407
- ...l
1458
+ children: c,
1459
+ ...d
1408
1460
  } = n;
1409
- m(l);
1410
- const [f, v] = De(!1), { focused: w, ref: C } = xe(), R = i && (o === !0 || o === void 0 || o === "hover" && f || w);
1461
+ m(d);
1462
+ const [f, v] = Be(!1), { focused: w, ref: C } = ye(), M = l && (o === !0 || o === void 0 || o === "hover" && f || w);
1411
1463
  return /* @__PURE__ */ g(
1412
1464
  "div",
1413
1465
  {
1414
1466
  ref: t,
1415
- className: d(e, "bn-relative bn-flex bn-flex-col bn-gap-2"),
1467
+ className: i(e, "bn-relative bn-flex bn-flex-col bn-gap-2"),
1416
1468
  onMouseEnter: () => v(!0),
1417
1469
  onMouseLeave: () => v(!1),
1418
1470
  children: [
1419
- R ? /* @__PURE__ */ a(
1471
+ M ? /* @__PURE__ */ a(
1420
1472
  "div",
1421
1473
  {
1422
1474
  className: "bn-absolute bn-right-0 bn-top-0 bn-z-10",
1423
1475
  ref: C,
1424
- children: i
1476
+ children: l
1425
1477
  }
1426
1478
  ) : null,
1427
- /* @__PURE__ */ a(Kn, { ...n }),
1428
- b
1479
+ /* @__PURE__ */ a(Zn, { ...n }),
1480
+ c
1429
1481
  ]
1430
1482
  }
1431
1483
  );
1432
- }), _n = p((n, t) => {
1433
- const { className: e, onFocus: o, onBlur: r, autoFocus: s, editor: i, editable: u, ...b } = n;
1434
- return m(b), /* @__PURE__ */ a(
1435
- ot,
1484
+ }), Jn = p((n, t) => {
1485
+ const { className: e, onFocus: o, onBlur: r, autoFocus: s, editor: l, editable: u, ...c } = n;
1486
+ return m(c), /* @__PURE__ */ a(
1487
+ st,
1436
1488
  {
1437
1489
  autoFocus: s,
1438
- className: d(e, ""),
1490
+ className: i(e, ""),
1439
1491
  editor: n.editor,
1440
1492
  sideMenu: !1,
1441
1493
  slashMenu: !1,
@@ -1447,28 +1499,28 @@ const gn = (n) => {
1447
1499
  onFocus: o,
1448
1500
  onBlur: r,
1449
1501
  children: /* @__PURE__ */ a(
1450
- we,
1502
+ Se,
1451
1503
  {
1452
- formattingToolbar: Jn
1504
+ formattingToolbar: Xn
1453
1505
  }
1454
1506
  )
1455
1507
  }
1456
1508
  );
1457
- }), Jn = () => {
1458
- const n = Ce([]).filter(
1509
+ }), Xn = () => {
1510
+ const n = Te([]).filter(
1459
1511
  (t) => t.key !== "nestBlockButton" && t.key !== "unnestBlockButton"
1460
1512
  );
1461
- return /* @__PURE__ */ a(ye, { blockTypeSelectItems: [], children: n });
1462
- }, Qn = p((n, t) => {
1513
+ return /* @__PURE__ */ a(Me, { blockTypeSelectItems: [], children: n });
1514
+ }, Yn = p((n, t) => {
1463
1515
  const {
1464
1516
  className: e,
1465
1517
  text: o,
1466
1518
  icon: r,
1467
1519
  isSelected: s,
1468
- mainTooltip: i,
1520
+ mainTooltip: l,
1469
1521
  secondaryTooltip: u,
1470
- onClick: b,
1471
- onMouseEnter: l,
1522
+ onClick: c,
1523
+ onMouseEnter: d,
1472
1524
  ...f
1473
1525
  } = n;
1474
1526
  m(f, !1);
@@ -1476,12 +1528,12 @@ const gn = (n) => {
1476
1528
  v.Button.Button,
1477
1529
  {
1478
1530
  variant: s ? "secondary" : "outline",
1479
- className: d(
1531
+ className: i(
1480
1532
  e,
1481
1533
  "bn-flex bn-items-center bn-gap-1 bn-rounded-full bn-h-7 bn-px-2.5"
1482
1534
  ),
1483
- onClick: b,
1484
- onMouseEnter: l,
1535
+ onClick: c,
1536
+ onMouseEnter: d,
1485
1537
  ref: t,
1486
1538
  children: [
1487
1539
  /* @__PURE__ */ a("span", { children: r }),
@@ -1489,27 +1541,27 @@ const gn = (n) => {
1489
1541
  ]
1490
1542
  }
1491
1543
  );
1492
- return i ? /* @__PURE__ */ g(v.Tooltip.Tooltip, { children: [
1544
+ return l ? /* @__PURE__ */ g(v.Tooltip.Tooltip, { children: [
1493
1545
  /* @__PURE__ */ a(v.Tooltip.TooltipTrigger, { asChild: !0, children: w }),
1494
1546
  /* @__PURE__ */ g(
1495
1547
  v.Tooltip.TooltipContent,
1496
1548
  {
1497
1549
  className: "bn-flex bn-flex-col bn-items-center bn-whitespace-pre-wrap",
1498
1550
  children: [
1499
- /* @__PURE__ */ a("span", { children: i }),
1551
+ /* @__PURE__ */ a("span", { children: l }),
1500
1552
  u && /* @__PURE__ */ a("span", { children: u })
1501
1553
  ]
1502
1554
  }
1503
1555
  )
1504
1556
  ] }) : w;
1505
- }), Xn = p((n, t) => {
1557
+ }), et = p((n, t) => {
1506
1558
  const { className: e, children: o, ...r } = n;
1507
1559
  m(r);
1508
1560
  const s = h();
1509
1561
  return /* @__PURE__ */ a(s.Tooltip.TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ a(
1510
1562
  "div",
1511
1563
  {
1512
- className: d(
1564
+ className: i(
1513
1565
  e,
1514
1566
  "bn-flex bn-flex-row bn-flex-wrap bn-gap-1 bn-w-full"
1515
1567
  ),
@@ -1517,9 +1569,9 @@ const gn = (n) => {
1517
1569
  children: o
1518
1570
  }
1519
1571
  ) });
1520
- }), Yn = p((n, t) => {
1521
- const { className: e, children: o, onClick: r, label: s, ...i } = n;
1522
- m(i);
1572
+ }), nt = p((n, t) => {
1573
+ const { className: e, children: o, onClick: r, label: s, ...l } = n;
1574
+ m(l);
1523
1575
  const u = h();
1524
1576
  return /* @__PURE__ */ a(
1525
1577
  u.Button.Button,
@@ -1532,47 +1584,47 @@ const gn = (n) => {
1532
1584
  children: o
1533
1585
  }
1534
1586
  );
1535
- }), Zn = p((n, t) => {
1536
- const { className: e, accept: o, value: r, placeholder: s, onChange: i, ...u } = n;
1587
+ }), tt = p((n, t) => {
1588
+ const { className: e, accept: o, value: r, placeholder: s, onChange: l, ...u } = n;
1537
1589
  m(u);
1538
- const b = h();
1590
+ const c = h();
1539
1591
  return /* @__PURE__ */ a(
1540
- b.Input.Input,
1592
+ c.Input.Input,
1541
1593
  {
1542
1594
  type: "file",
1543
1595
  className: e,
1544
1596
  ref: t,
1545
1597
  accept: o,
1546
1598
  value: r ? r.name : void 0,
1547
- onChange: async (l) => i == null ? void 0 : i(l.target.files[0]),
1599
+ onChange: async (d) => l == null ? void 0 : l(d.target.files[0]),
1548
1600
  placeholder: s
1549
1601
  }
1550
1602
  );
1551
- }), et = p((n, t) => {
1552
- const { className: e, isSelected: o, onClick: r, item: s, id: i, ...u } = n;
1603
+ }), ot = p((n, t) => {
1604
+ const { className: e, isSelected: o, onClick: r, item: s, id: l, ...u } = n;
1553
1605
  m(u);
1554
- const b = V(null);
1555
- return A(() => {
1556
- if (!b.current || !o)
1606
+ const c = A(null);
1607
+ return $(() => {
1608
+ if (!c.current || !o)
1557
1609
  return;
1558
- const l = L(
1559
- b.current,
1610
+ const d = z(
1611
+ c.current,
1560
1612
  document.querySelector(".bn-grid-suggestion-menu")
1561
1613
  );
1562
- l === "top" ? b.current.scrollIntoView(!0) : l === "bottom" && b.current.scrollIntoView(!1);
1614
+ d === "top" ? c.current.scrollIntoView(!0) : d === "bottom" && c.current.scrollIntoView(!1);
1563
1615
  }, [o]), /* @__PURE__ */ a(
1564
1616
  "div",
1565
1617
  {
1566
1618
  className: e,
1567
- ref: z([t, b]),
1568
- id: i,
1619
+ ref: E([t, c]),
1620
+ id: l,
1569
1621
  role: "option",
1570
1622
  onClick: r,
1571
1623
  "aria-selected": o || void 0,
1572
1624
  children: s.icon
1573
1625
  }
1574
1626
  );
1575
- }), nt = p((n, t) => {
1627
+ }), at = p((n, t) => {
1576
1628
  const {
1577
1629
  className: e,
1578
1630
  children: o,
@@ -1589,96 +1641,96 @@ const gn = (n) => {
1589
1641
  children: o
1590
1642
  }
1591
1643
  );
1592
- }), tt = {
1644
+ }), rt = {
1593
1645
  FormattingToolbar: {
1594
- Root: B,
1595
- Button: F,
1596
- Select: k
1646
+ Root: k,
1647
+ Button: B,
1648
+ Select: F
1597
1649
  },
1598
1650
  FilePanel: {
1599
- Root: In,
1600
- Button: Yn,
1601
- FileInput: Zn,
1602
- TabPanel: Mn,
1603
- TextInput: Dn
1651
+ Root: Rn,
1652
+ Button: nt,
1653
+ FileInput: tt,
1654
+ TabPanel: kn,
1655
+ TextInput: Bn
1604
1656
  },
1605
1657
  LinkToolbar: {
1606
- Root: B,
1607
- Button: F,
1608
- Select: k
1658
+ Root: k,
1659
+ Button: B,
1660
+ Select: F
1609
1661
  },
1610
1662
  SideMenu: {
1611
- Root: kn,
1612
- Button: Pn
1663
+ Root: zn,
1664
+ Button: En
1613
1665
  },
1614
1666
  SuggestionMenu: {
1615
- Root: En,
1616
- Item: An,
1617
- EmptyItem: Vn,
1618
- Label: $n,
1619
- Loader: jn
1667
+ Root: $n,
1668
+ Item: qn,
1669
+ EmptyItem: jn,
1670
+ Label: Gn,
1671
+ Loader: Un
1620
1672
  },
1621
1673
  GridSuggestionMenu: {
1622
- Root: Ln,
1623
- Item: et,
1624
- EmptyItem: zn,
1625
- Loader: nt
1674
+ Root: Vn,
1675
+ Item: ot,
1676
+ EmptyItem: An,
1677
+ Loader: at
1626
1678
  },
1627
1679
  TableHandle: {
1628
- Root: Un,
1629
- ExtendButton: Gn
1680
+ Root: On,
1681
+ ExtendButton: Hn
1630
1682
  },
1631
1683
  Comments: {
1632
- Comment: Wn,
1633
- Editor: _n,
1634
- Card: Hn,
1635
- CardSection: On,
1636
- ExpandSectionsPrompt: qn
1684
+ Comment: _n,
1685
+ Editor: Jn,
1686
+ Card: Kn,
1687
+ CardSection: Qn,
1688
+ ExpandSectionsPrompt: Wn
1637
1689
  },
1638
1690
  Generic: {
1639
1691
  Badge: {
1640
- Root: Qn,
1641
- Group: Xn
1692
+ Root: Yn,
1693
+ Group: et
1642
1694
  },
1643
1695
  Toolbar: {
1644
- Root: B,
1645
- Button: F,
1646
- Select: k
1696
+ Root: k,
1697
+ Button: B,
1698
+ Select: F
1647
1699
  },
1648
1700
  Form: {
1649
- Root: gn,
1650
- TextInput: hn
1701
+ Root: Nn,
1702
+ TextInput: xn
1651
1703
  },
1652
1704
  Menu: {
1653
- Root: Nn,
1654
- Trigger: xn,
1655
- Dropdown: wn,
1656
- Divider: yn,
1657
- Label: Sn,
1658
- Item: Cn,
1659
- Button: Tn
1705
+ Root: Cn,
1706
+ Trigger: yn,
1707
+ Dropdown: Sn,
1708
+ Divider: Mn,
1709
+ Label: In,
1710
+ Item: Tn,
1711
+ Button: Dn
1660
1712
  },
1661
1713
  Popover: {
1662
- Root: Rn,
1663
- Trigger: Bn,
1664
- Content: Fn
1714
+ Root: Fn,
1715
+ Trigger: Pn,
1716
+ Content: Ln
1665
1717
  }
1666
1718
  }
1667
- }, ot = (n) => {
1668
- const { className: t, shadCNComponents: e, ...o } = n, r = E(() => ({
1669
- ...fn,
1719
+ }, st = (n) => {
1720
+ const { className: t, shadCNComponents: e, ...o } = n, r = V(() => ({
1721
+ ...vn,
1670
1722
  ...e
1671
1723
  }), [e]);
1672
- return /* @__PURE__ */ a(he.Provider, { value: r, children: /* @__PURE__ */ a(Se.Provider, { value: tt, children: /* @__PURE__ */ a(
1673
- Te,
1724
+ return /* @__PURE__ */ a(ve.Provider, { value: r, children: /* @__PURE__ */ a(Ie.Provider, { value: rt, children: /* @__PURE__ */ a(
1725
+ De,
1674
1726
  {
1675
- className: Ne("bn-shadcn", t || ""),
1727
+ className: Ce("bn-shadcn", t || ""),
1676
1728
  ...o
1677
1729
  }
1678
1730
  ) }) });
1679
1731
  };
1680
1732
  export {
1681
- ot as BlockNoteView,
1682
- tt as components
1733
+ st as BlockNoteView,
1734
+ rt as components
1683
1735
  };
1684
1736
  //# sourceMappingURL=blocknote-shadcn.js.map