@blocknote/shadcn 0.36.1 → 0.37.0

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