@kornorg/design-system 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,638 +1,472 @@
1
1
  "use client";
2
- import { cva } from 'class-variance-authority';
3
- import { clsx } from 'clsx';
4
- import { twMerge } from 'tailwind-merge';
5
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
- import { Dialog as Dialog$1, Select as Select$1, Tabs as Tabs$1, Tooltip as Tooltip$1, Avatar as Avatar$1, Slot, Checkbox as Checkbox$1, Label as Label$1, Switch as Switch$1 } from 'radix-ui';
7
- import { Check, X, ChevronDown, Monitor, Sun, Moon } from 'lucide-react';
8
- import * as React from 'react';
9
-
10
- // src/components/ui/alert.tsx
2
+ import { cva } from "class-variance-authority";
3
+ import { clsx } from "clsx";
4
+ import { twMerge } from "tailwind-merge";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { Avatar as Avatar$1, Checkbox as Checkbox$1, Dialog as Dialog$1, Label as Label$1, Select as Select$1, Slot, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from "radix-ui";
7
+ import { Check, ChevronDown, Monitor, Moon, Sun, X } from "lucide-react";
8
+ import * as React from "react";
9
+ // src/lib/utils.ts
10
+ /**
11
+ * Merge class names with Tailwind-aware conflict resolution.
12
+ * Later classes win when utilities collide (e.g. `cn("p-2", "p-4")` → `"p-4"`).
13
+ */
11
14
  function cn(...inputs) {
12
- return twMerge(clsx(inputs));
13
- }
14
- var alertVariants = cva(
15
- "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:size-4 [&>svg~*]:pl-7",
16
- {
17
- variants: {
18
- variant: {
19
- default: "bg-card text-card-foreground",
20
- destructive: "border-destructive/50 text-destructive [&>svg]:text-destructive bg-destructive/5",
21
- success: "border-success/50 text-success [&>svg]:text-success bg-success/5",
22
- warning: "border-warning/60 text-warning [&>svg]:text-warning bg-warning/5"
23
- }
24
- },
25
- defaultVariants: {
26
- variant: "default"
27
- }
28
- }
29
- );
15
+ return twMerge(clsx(inputs));
16
+ }
17
+ // src/components/ui/alert.tsx
18
+ const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:size-4 [&>svg~*]:pl-7", {
19
+ variants: { variant: {
20
+ default: "bg-card text-card-foreground",
21
+ destructive: "border-destructive/50 text-destructive [&>svg]:text-destructive bg-destructive/5",
22
+ success: "border-success/50 text-success [&>svg]:text-success bg-success/5",
23
+ warning: "border-warning/60 text-warning [&>svg]:text-warning bg-warning/5"
24
+ } },
25
+ defaultVariants: { variant: "default" }
26
+ });
30
27
  function Alert({ className, variant, ...props }) {
31
- return /* @__PURE__ */ jsx("div", { role: "alert", className: cn(alertVariants({ variant }), className), ...props });
28
+ return /* @__PURE__ */ jsx("div", {
29
+ role: "alert",
30
+ className: cn(alertVariants({ variant }), className),
31
+ ...props
32
+ });
32
33
  }
33
34
  function AlertTitle({ className, ...props }) {
34
- return /* @__PURE__ */ jsx("h5", { className: cn("mb-1 font-medium leading-none tracking-tight", className), ...props });
35
+ return /* @__PURE__ */ jsx("h5", {
36
+ className: cn("mb-1 font-medium leading-none tracking-tight", className),
37
+ ...props
38
+ });
35
39
  }
36
40
  function AlertDescription({ className, ...props }) {
37
- return /* @__PURE__ */ jsx("div", { className: cn("text-sm [&_p]:leading-relaxed opacity-90", className), ...props });
41
+ return /* @__PURE__ */ jsx("div", {
42
+ className: cn("text-sm [&_p]:leading-relaxed opacity-90", className),
43
+ ...props
44
+ });
38
45
  }
46
+ // src/components/ui/avatar.tsx
39
47
  function Avatar({ className, ...props }) {
40
- return /* @__PURE__ */ jsx(
41
- Avatar$1.Root,
42
- {
43
- className: cn("relative flex size-9 shrink-0 overflow-hidden rounded-full", className),
44
- ...props
45
- }
46
- );
47
- }
48
- function AvatarImage({
49
- className,
50
- ...props
51
- }) {
52
- return /* @__PURE__ */ jsx(Avatar$1.Image, { className: cn("aspect-square size-full", className), ...props });
53
- }
54
- function AvatarFallback({
55
- className,
56
- ...props
57
- }) {
58
- return /* @__PURE__ */ jsx(
59
- Avatar$1.Fallback,
60
- {
61
- className: cn(
62
- "flex size-full items-center justify-center rounded-full bg-muted text-sm font-medium text-muted-foreground",
63
- className
64
- ),
65
- ...props
66
- }
67
- );
68
- }
69
- var badgeVariants = cva(
70
- "inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors [&_svg]:size-3",
71
- {
72
- variants: {
73
- variant: {
74
- default: "border-transparent bg-primary text-primary-foreground",
75
- secondary: "border-transparent bg-secondary text-secondary-foreground",
76
- destructive: "border-transparent bg-destructive text-destructive-foreground",
77
- success: "border-transparent bg-success text-success-foreground",
78
- warning: "border-transparent bg-warning text-warning-foreground",
79
- outline: "border-border text-foreground"
80
- }
81
- },
82
- defaultVariants: {
83
- variant: "default"
84
- }
85
- }
86
- );
48
+ return /* @__PURE__ */ jsx(Avatar$1.Root, {
49
+ className: cn("relative flex size-9 shrink-0 overflow-hidden rounded-full", className),
50
+ ...props
51
+ });
52
+ }
53
+ function AvatarImage({ className, ...props }) {
54
+ return /* @__PURE__ */ jsx(Avatar$1.Image, {
55
+ className: cn("aspect-square size-full", className),
56
+ ...props
57
+ });
58
+ }
59
+ function AvatarFallback({ className, ...props }) {
60
+ return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
61
+ className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm font-medium text-muted-foreground", className),
62
+ ...props
63
+ });
64
+ }
65
+ // src/components/ui/badge.tsx
66
+ const badgeVariants = cva("inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors [&_svg]:size-3", {
67
+ variants: { variant: {
68
+ default: "border-transparent bg-primary text-primary-foreground",
69
+ secondary: "border-transparent bg-secondary text-secondary-foreground",
70
+ destructive: "border-transparent bg-destructive text-destructive-foreground",
71
+ success: "border-transparent bg-success text-success-foreground",
72
+ warning: "border-transparent bg-warning text-warning-foreground",
73
+ outline: "border-border text-foreground"
74
+ } },
75
+ defaultVariants: { variant: "default" }
76
+ });
87
77
  function Badge({ className, variant, ...props }) {
88
- return /* @__PURE__ */ jsx("span", { className: cn(badgeVariants({ variant }), className), ...props });
89
- }
90
- var buttonVariants = cva(
91
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",
92
- {
93
- variants: {
94
- variant: {
95
- primary: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
96
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
97
- destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",
98
- outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
99
- ghost: "hover:bg-accent hover:text-accent-foreground",
100
- link: "text-primary underline-offset-4 hover:underline"
101
- },
102
- size: {
103
- sm: "h-8 px-3 text-xs",
104
- md: "h-9 px-4",
105
- lg: "h-10 px-6 text-base",
106
- icon: "size-9"
107
- }
108
- },
109
- defaultVariants: {
110
- variant: "primary",
111
- size: "md"
112
- }
113
- }
114
- );
78
+ return /* @__PURE__ */ jsx("span", {
79
+ className: cn(badgeVariants({ variant }), className),
80
+ ...props
81
+ });
82
+ }
83
+ // src/components/ui/button.tsx
84
+ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0", {
85
+ variants: {
86
+ variant: {
87
+ primary: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
88
+ secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
89
+ destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",
90
+ outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
91
+ ghost: "hover:bg-accent hover:text-accent-foreground",
92
+ link: "text-primary underline-offset-4 hover:underline"
93
+ },
94
+ size: {
95
+ sm: "h-8 px-3 text-xs",
96
+ md: "h-9 px-4",
97
+ lg: "h-10 px-6 text-base",
98
+ icon: "size-9"
99
+ }
100
+ },
101
+ defaultVariants: {
102
+ variant: "primary",
103
+ size: "md"
104
+ }
105
+ });
115
106
  function Button({ className, variant, size, asChild = false, ...props }) {
116
- const Comp = asChild ? Slot.Root : "button";
117
- return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ...props });
118
- }
107
+ const Comp = asChild ? Slot.Root : "button";
108
+ return /* @__PURE__ */ jsx(Comp, {
109
+ className: cn(buttonVariants({
110
+ variant,
111
+ size,
112
+ className
113
+ })),
114
+ ...props
115
+ });
116
+ }
117
+ // src/components/ui/card.tsx
119
118
  function Card({ className, ...props }) {
120
- return /* @__PURE__ */ jsx(
121
- "div",
122
- {
123
- className: cn(
124
- "rounded-xl border border-border bg-card text-card-foreground shadow-sm",
125
- className
126
- ),
127
- ...props
128
- }
129
- );
119
+ return /* @__PURE__ */ jsx("div", {
120
+ className: cn("rounded-xl border border-border bg-card text-card-foreground shadow-sm", className),
121
+ ...props
122
+ });
130
123
  }
131
124
  function CardHeader({ className, ...props }) {
132
- return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-1.5 p-6", className), ...props });
125
+ return /* @__PURE__ */ jsx("div", {
126
+ className: cn("flex flex-col gap-1.5 p-6", className),
127
+ ...props
128
+ });
133
129
  }
134
130
  function CardTitle({ className, ...props }) {
135
- return /* @__PURE__ */ jsx("h3", { className: cn("font-semibold leading-none tracking-tight", className), ...props });
131
+ return /* @__PURE__ */ jsx("h3", {
132
+ className: cn("font-semibold leading-none tracking-tight", className),
133
+ ...props
134
+ });
136
135
  }
137
136
  function CardDescription({ className, ...props }) {
138
- return /* @__PURE__ */ jsx("p", { className: cn("text-sm text-muted-foreground", className), ...props });
137
+ return /* @__PURE__ */ jsx("p", {
138
+ className: cn("text-sm text-muted-foreground", className),
139
+ ...props
140
+ });
139
141
  }
140
142
  function CardContent({ className, ...props }) {
141
- return /* @__PURE__ */ jsx("div", { className: cn("p-6 pt-0", className), ...props });
143
+ return /* @__PURE__ */ jsx("div", {
144
+ className: cn("p-6 pt-0", className),
145
+ ...props
146
+ });
142
147
  }
143
148
  function CardFooter({ className, ...props }) {
144
- return /* @__PURE__ */ jsx("div", { className: cn("flex items-center p-6 pt-0", className), ...props });
145
- }
146
- function Checkbox({
147
- className,
148
- ...props
149
- }) {
150
- return /* @__PURE__ */ jsx(
151
- Checkbox$1.Root,
152
- {
153
- className: cn(
154
- "peer size-4 shrink-0 rounded-sm border border-input shadow-xs transition-colors",
155
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
156
- "disabled:cursor-not-allowed disabled:opacity-50",
157
- "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
158
- className
159
- ),
160
- ...props,
161
- children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ jsx(Check, { className: "size-3.5", strokeWidth: 3 }) })
162
- }
163
- );
164
- }
165
- var Dialog = Dialog$1.Root;
166
- var DialogTrigger = Dialog$1.Trigger;
167
- var DialogClose = Dialog$1.Close;
168
- function DialogContent({
169
- className,
170
- children,
171
- ...props
172
- }) {
173
- return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [
174
- /* @__PURE__ */ jsx(
175
- Dialog$1.Overlay,
176
- {
177
- className: cn(
178
- "fixed inset-0 z-50 bg-overlay",
179
- "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0"
180
- )
181
- }
182
- ),
183
- /* @__PURE__ */ jsxs(
184
- Dialog$1.Content,
185
- {
186
- className: cn(
187
- "fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border bg-card p-6 shadow-lg",
188
- "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
189
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
190
- className
191
- ),
192
- ...props,
193
- children: [
194
- children,
195
- /* @__PURE__ */ jsxs(
196
- Dialog$1.Close,
197
- {
198
- className: cn(
199
- "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100",
200
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
201
- ),
202
- children: [
203
- /* @__PURE__ */ jsx(X, { className: "size-4" }),
204
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
205
- ]
206
- }
207
- )
208
- ]
209
- }
210
- )
211
- ] });
149
+ return /* @__PURE__ */ jsx("div", {
150
+ className: cn("flex items-center p-6 pt-0", className),
151
+ ...props
152
+ });
153
+ }
154
+ // src/components/ui/checkbox.tsx
155
+ function Checkbox({ className, ...props }) {
156
+ return /* @__PURE__ */ jsx(Checkbox$1.Root, {
157
+ className: cn("peer size-4 shrink-0 rounded-sm border border-input shadow-xs transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", "disabled:cursor-not-allowed disabled:opacity-50", "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className),
158
+ ...props,
159
+ children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
160
+ className: "flex items-center justify-center text-current",
161
+ children: /* @__PURE__ */ jsx(Check, {
162
+ className: "size-3.5",
163
+ strokeWidth: 3
164
+ })
165
+ })
166
+ });
167
+ }
168
+ // src/components/ui/dialog.tsx
169
+ const Dialog = Dialog$1.Root;
170
+ const DialogTrigger = Dialog$1.Trigger;
171
+ const DialogClose = Dialog$1.Close;
172
+ function DialogContent({ className, children, ...props }) {
173
+ return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [/* @__PURE__ */ jsx(Dialog$1.Overlay, { className: cn("fixed inset-0 z-50 bg-overlay", "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0") }), /* @__PURE__ */ jsxs(Dialog$1.Content, {
174
+ className: cn("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border bg-card p-6 shadow-lg", "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", className),
175
+ ...props,
176
+ children: [children, /* @__PURE__ */ jsxs(Dialog$1.Close, {
177
+ className: cn("absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),
178
+ children: [/* @__PURE__ */ jsx(X, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
179
+ className: "sr-only",
180
+ children: "Close"
181
+ })]
182
+ })]
183
+ })] });
212
184
  }
213
185
  function DialogHeader({ className, ...props }) {
214
- return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-1.5 text-center sm:text-left", className), ...props });
186
+ return /* @__PURE__ */ jsx("div", {
187
+ className: cn("flex flex-col gap-1.5 text-center sm:text-left", className),
188
+ ...props
189
+ });
215
190
  }
216
191
  function DialogFooter({ className, ...props }) {
217
- return /* @__PURE__ */ jsx(
218
- "div",
219
- {
220
- className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
221
- ...props
222
- }
223
- );
224
- }
225
- function DialogTitle({
226
- className,
227
- ...props
228
- }) {
229
- return /* @__PURE__ */ jsx(
230
- Dialog$1.Title,
231
- {
232
- className: cn("text-lg font-semibold leading-none tracking-tight", className),
233
- ...props
234
- }
235
- );
236
- }
237
- function DialogDescription({
238
- className,
239
- ...props
240
- }) {
241
- return /* @__PURE__ */ jsx(
242
- Dialog$1.Description,
243
- {
244
- className: cn("text-sm text-muted-foreground", className),
245
- ...props
246
- }
247
- );
248
- }
192
+ return /* @__PURE__ */ jsx("div", {
193
+ className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
194
+ ...props
195
+ });
196
+ }
197
+ function DialogTitle({ className, ...props }) {
198
+ return /* @__PURE__ */ jsx(Dialog$1.Title, {
199
+ className: cn("text-lg font-semibold leading-none tracking-tight", className),
200
+ ...props
201
+ });
202
+ }
203
+ function DialogDescription({ className, ...props }) {
204
+ return /* @__PURE__ */ jsx(Dialog$1.Description, {
205
+ className: cn("text-sm text-muted-foreground", className),
206
+ ...props
207
+ });
208
+ }
209
+ // src/components/ui/input.tsx
249
210
  function Input({ className, type, ...props }) {
250
- return /* @__PURE__ */ jsx(
251
- "input",
252
- {
253
- type,
254
- className: cn(
255
- "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-xs transition-colors",
256
- "placeholder:text-muted-foreground",
257
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
258
- "disabled:cursor-not-allowed disabled:opacity-50",
259
- "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
260
- "aria-[invalid=true]:border-destructive aria-[invalid=true]:ring-destructive/30",
261
- className
262
- ),
263
- ...props
264
- }
265
- );
211
+ return /* @__PURE__ */ jsx("input", {
212
+ type,
213
+ className: cn("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-xs transition-colors", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", "disabled:cursor-not-allowed disabled:opacity-50", "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground", "aria-[invalid=true]:border-destructive aria-[invalid=true]:ring-destructive/30", className),
214
+ ...props
215
+ });
266
216
  }
217
+ // src/components/ui/label.tsx
267
218
  function Label({ className, ...props }) {
268
- return /* @__PURE__ */ jsx(
269
- Label$1.Root,
270
- {
271
- className: cn(
272
- "text-sm font-medium leading-none select-none",
273
- "peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
274
- className
275
- ),
276
- ...props
277
- }
278
- );
279
- }
280
- var Select = Select$1.Root;
281
- var SelectGroup = Select$1.Group;
282
- var SelectValue = Select$1.Value;
283
- function SelectTrigger({
284
- className,
285
- children,
286
- ...props
287
- }) {
288
- return /* @__PURE__ */ jsxs(
289
- Select$1.Trigger,
290
- {
291
- className: cn(
292
- "flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm shadow-xs transition-colors",
293
- "data-[placeholder]:text-muted-foreground",
294
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
295
- "disabled:cursor-not-allowed disabled:opacity-50",
296
- className
297
- ),
298
- ...props,
299
- children: [
300
- children,
301
- /* @__PURE__ */ jsx(Select$1.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 opacity-50" }) })
302
- ]
303
- }
304
- );
305
- }
306
- function SelectContent({
307
- className,
308
- children,
309
- position = "popper",
310
- ...props
311
- }) {
312
- return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(
313
- Select$1.Content,
314
- {
315
- position,
316
- className: cn(
317
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md",
318
- "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
319
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
320
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",
321
- className
322
- ),
323
- ...props,
324
- children: /* @__PURE__ */ jsx(
325
- Select$1.Viewport,
326
- {
327
- className: cn(
328
- "p-1",
329
- position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]"
330
- ),
331
- children
332
- }
333
- )
334
- }
335
- ) });
336
- }
337
- function SelectLabel({
338
- className,
339
- ...props
340
- }) {
341
- return /* @__PURE__ */ jsx(
342
- Select$1.Label,
343
- {
344
- className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground", className),
345
- ...props
346
- }
347
- );
348
- }
349
- function SelectItem({
350
- className,
351
- children,
352
- ...props
353
- }) {
354
- return /* @__PURE__ */ jsxs(
355
- Select$1.Item,
356
- {
357
- className: cn(
358
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none",
359
- "focus:bg-accent focus:text-accent-foreground",
360
- "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
361
- className
362
- ),
363
- ...props,
364
- children: [
365
- /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) }) }),
366
- /* @__PURE__ */ jsx(Select$1.ItemText, { children })
367
- ]
368
- }
369
- );
370
- }
219
+ return /* @__PURE__ */ jsx(Label$1.Root, {
220
+ className: cn("text-sm font-medium leading-none select-none", "peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className),
221
+ ...props
222
+ });
223
+ }
224
+ // src/components/ui/select.tsx
225
+ const Select = Select$1.Root;
226
+ const SelectGroup = Select$1.Group;
227
+ const SelectValue = Select$1.Value;
228
+ function SelectTrigger({ className, children, ...props }) {
229
+ return /* @__PURE__ */ jsxs(Select$1.Trigger, {
230
+ className: cn("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm shadow-xs transition-colors", "data-[placeholder]:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", "disabled:cursor-not-allowed disabled:opacity-50", className),
231
+ ...props,
232
+ children: [children, /* @__PURE__ */ jsx(Select$1.Icon, {
233
+ asChild: true,
234
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 opacity-50" })
235
+ })]
236
+ });
237
+ }
238
+ function SelectContent({ className, children, position = "popper", ...props }) {
239
+ return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Content, {
240
+ position,
241
+ className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1", className),
242
+ ...props,
243
+ children: /* @__PURE__ */ jsx(Select$1.Viewport, {
244
+ className: cn("p-1", position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]"),
245
+ children
246
+ })
247
+ }) });
248
+ }
249
+ function SelectLabel({ className, ...props }) {
250
+ return /* @__PURE__ */ jsx(Select$1.Label, {
251
+ className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground", className),
252
+ ...props
253
+ });
254
+ }
255
+ function SelectItem({ className, children, ...props }) {
256
+ return /* @__PURE__ */ jsxs(Select$1.Item, {
257
+ className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none", "focus:bg-accent focus:text-accent-foreground", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
258
+ ...props,
259
+ children: [/* @__PURE__ */ jsx("span", {
260
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
261
+ children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) })
262
+ }), /* @__PURE__ */ jsx(Select$1.ItemText, { children })]
263
+ });
264
+ }
265
+ // src/components/ui/switch.tsx
371
266
  function Switch({ className, ...props }) {
372
- return /* @__PURE__ */ jsx(
373
- Switch$1.Root,
374
- {
375
- className: cn(
376
- "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
377
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
378
- "disabled:cursor-not-allowed disabled:opacity-50",
379
- "data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
380
- className
381
- ),
382
- ...props,
383
- children: /* @__PURE__ */ jsx(
384
- Switch$1.Thumb,
385
- {
386
- className: cn(
387
- "pointer-events-none block size-4 rounded-full bg-background shadow-sm transition-transform",
388
- "data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
389
- )
390
- }
391
- )
392
- }
393
- );
267
+ return /* @__PURE__ */ jsx(Switch$1.Root, {
268
+ className: cn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", "disabled:cursor-not-allowed disabled:opacity-50", "data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className),
269
+ ...props,
270
+ children: /* @__PURE__ */ jsx(Switch$1.Thumb, { className: cn("pointer-events-none block size-4 rounded-full bg-background shadow-sm transition-transform", "data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0") })
271
+ });
394
272
  }
273
+ // src/components/ui/table.tsx
395
274
  function Table({ className, ...props }) {
396
- return (
397
- // This is the standard fix for axe's scrollable-region-focusable rule
398
- // (WCAG 2.1.1): a horizontally scrollable region needs to be reachable by
399
- // keyboard, hence tabIndex + role="region" + aria-label on an otherwise
400
- // non-interactive div rather than a bare <section> (which has no
401
- // equivalent for naming an unlabeled region).
402
- // biome-ignore lint/a11y/useSemanticElements: see above
403
- /* @__PURE__ */ jsx(
404
- "div",
405
- {
406
- className: "relative w-full overflow-x-auto",
407
- tabIndex: 0,
408
- role: "region",
409
- "aria-label": "Scrollable table",
410
- children: /* @__PURE__ */ jsx("table", { className: cn("w-full caption-bottom text-sm", className), ...props })
411
- }
412
- )
413
- );
275
+ return /* @__PURE__ */ jsx("div", {
276
+ className: "relative w-full overflow-x-auto",
277
+ tabIndex: 0,
278
+ role: "region",
279
+ "aria-label": "Scrollable table",
280
+ children: /* @__PURE__ */ jsx("table", {
281
+ className: cn("w-full caption-bottom text-sm", className),
282
+ ...props
283
+ })
284
+ });
414
285
  }
415
286
  function TableHeader({ className, ...props }) {
416
- return /* @__PURE__ */ jsx("thead", { className: cn("[&_tr]:border-b", className), ...props });
287
+ return /* @__PURE__ */ jsx("thead", {
288
+ className: cn("[&_tr]:border-b", className),
289
+ ...props
290
+ });
417
291
  }
418
292
  function TableBody({ className, ...props }) {
419
- return /* @__PURE__ */ jsx("tbody", { className: cn("[&_tr:last-child]:border-0", className), ...props });
293
+ return /* @__PURE__ */ jsx("tbody", {
294
+ className: cn("[&_tr:last-child]:border-0", className),
295
+ ...props
296
+ });
420
297
  }
421
298
  function TableFooter({ className, ...props }) {
422
- return /* @__PURE__ */ jsx(
423
- "tfoot",
424
- {
425
- className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
426
- ...props
427
- }
428
- );
299
+ return /* @__PURE__ */ jsx("tfoot", {
300
+ className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
301
+ ...props
302
+ });
429
303
  }
430
304
  function TableRow({ className, ...props }) {
431
- return /* @__PURE__ */ jsx(
432
- "tr",
433
- {
434
- className: cn(
435
- "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
436
- className
437
- ),
438
- ...props
439
- }
440
- );
305
+ return /* @__PURE__ */ jsx("tr", {
306
+ className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
307
+ ...props
308
+ });
441
309
  }
442
310
  function TableHead({ className, ...props }) {
443
- return /* @__PURE__ */ jsx(
444
- "th",
445
- {
446
- className: cn(
447
- "h-10 px-3 text-left align-middle font-medium text-muted-foreground",
448
- className
449
- ),
450
- ...props
451
- }
452
- );
311
+ return /* @__PURE__ */ jsx("th", {
312
+ className: cn("h-10 px-3 text-left align-middle font-medium text-muted-foreground", className),
313
+ ...props
314
+ });
453
315
  }
454
316
  function TableCell({ className, ...props }) {
455
- return /* @__PURE__ */ jsx("td", { className: cn("p-3 align-middle", className), ...props });
317
+ return /* @__PURE__ */ jsx("td", {
318
+ className: cn("p-3 align-middle", className),
319
+ ...props
320
+ });
456
321
  }
457
322
  function TableCaption({ className, ...props }) {
458
- return /* @__PURE__ */ jsx("caption", { className: cn("mt-4 text-sm text-muted-foreground", className), ...props });
323
+ return /* @__PURE__ */ jsx("caption", {
324
+ className: cn("mt-4 text-sm text-muted-foreground", className),
325
+ ...props
326
+ });
459
327
  }
460
- var Tabs = Tabs$1.Root;
328
+ // src/components/ui/tabs.tsx
329
+ const Tabs = Tabs$1.Root;
461
330
  function TabsList({ className, ...props }) {
462
- return /* @__PURE__ */ jsx(
463
- Tabs$1.List,
464
- {
465
- className: cn(
466
- "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
467
- className
468
- ),
469
- ...props
470
- }
471
- );
472
- }
473
- function TabsTrigger({
474
- className,
475
- ...props
476
- }) {
477
- return /* @__PURE__ */ jsx(
478
- Tabs$1.Trigger,
479
- {
480
- className: cn(
481
- "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all",
482
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
483
- "disabled:pointer-events-none disabled:opacity-50",
484
- "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
485
- className
486
- ),
487
- ...props
488
- }
489
- );
490
- }
491
- function TabsContent({
492
- className,
493
- ...props
494
- }) {
495
- return /* @__PURE__ */ jsx(
496
- Tabs$1.Content,
497
- {
498
- className: cn(
499
- "mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
500
- className
501
- ),
502
- ...props
503
- }
504
- );
505
- }
331
+ return /* @__PURE__ */ jsx(Tabs$1.List, {
332
+ className: cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", className),
333
+ ...props
334
+ });
335
+ }
336
+ function TabsTrigger({ className, ...props }) {
337
+ return /* @__PURE__ */ jsx(Tabs$1.Trigger, {
338
+ className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50", "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", className),
339
+ ...props
340
+ });
341
+ }
342
+ function TabsContent({ className, ...props }) {
343
+ return /* @__PURE__ */ jsx(Tabs$1.Content, {
344
+ className: cn("mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", className),
345
+ ...props
346
+ });
347
+ }
348
+ // src/components/ui/textarea.tsx
506
349
  function Textarea({ className, ...props }) {
507
- return /* @__PURE__ */ jsx(
508
- "textarea",
509
- {
510
- className: cn(
511
- "flex min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-xs transition-colors",
512
- "placeholder:text-muted-foreground",
513
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
514
- "disabled:cursor-not-allowed disabled:opacity-50",
515
- "aria-[invalid=true]:border-destructive aria-[invalid=true]:ring-destructive/30",
516
- className
517
- ),
518
- ...props
519
- }
520
- );
521
- }
522
- var THEME_STORAGE_KEY = "theme";
350
+ return /* @__PURE__ */ jsx("textarea", {
351
+ className: cn("flex min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-xs transition-colors", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", "disabled:cursor-not-allowed disabled:opacity-50", "aria-[invalid=true]:border-destructive aria-[invalid=true]:ring-destructive/30", className),
352
+ ...props
353
+ });
354
+ }
355
+ // src/components/ui/theme-toggle.tsx
356
+ /** localStorage key shared by <ThemeScript /> and <ThemeToggle /> unless overridden. */
357
+ const THEME_STORAGE_KEY = "theme";
523
358
  function prefersDark() {
524
- return window.matchMedia("(prefers-color-scheme: dark)").matches;
359
+ return window.matchMedia("(prefers-color-scheme: dark)").matches;
525
360
  }
526
361
  function resolveMode(mode) {
527
- if (mode !== "system") return mode;
528
- return prefersDark() ? "dark" : "light";
362
+ if (mode !== "system") return mode;
363
+ return prefersDark() ? "dark" : "light";
529
364
  }
530
365
  function applyMode(mode) {
531
- document.documentElement.classList.toggle("dark", resolveMode(mode) === "dark");
366
+ document.documentElement.classList.toggle("dark", resolveMode(mode) === "dark");
532
367
  }
533
368
  function readMode(storageKey) {
534
- try {
535
- const stored = localStorage.getItem(storageKey);
536
- if (stored === "light" || stored === "dark" || stored === "system") return stored;
537
- } catch {
538
- }
539
- return "system";
540
- }
369
+ try {
370
+ const stored = localStorage.getItem(storageKey);
371
+ if (stored === "light" || stored === "dark" || stored === "system") return stored;
372
+ } catch {}
373
+ return "system";
374
+ }
375
+ /**
376
+ * Read and change the current mode. `resolvedTheme` is undefined until mounted,
377
+ * because the concrete appearance is only knowable in the browser.
378
+ */
541
379
  function useTheme(storageKey = THEME_STORAGE_KEY) {
542
- const [theme, setThemeState] = React.useState("system");
543
- const [mounted, setMounted] = React.useState(false);
544
- React.useEffect(() => {
545
- setThemeState(readMode(storageKey));
546
- setMounted(true);
547
- }, [storageKey]);
548
- React.useEffect(() => {
549
- if (theme !== "system") return;
550
- const mq = window.matchMedia("(prefers-color-scheme: dark)");
551
- const onChange = () => applyMode("system");
552
- mq.addEventListener("change", onChange);
553
- return () => mq.removeEventListener("change", onChange);
554
- }, [theme]);
555
- const setTheme = React.useCallback(
556
- (next) => {
557
- setThemeState(next);
558
- applyMode(next);
559
- try {
560
- localStorage.setItem(storageKey, next);
561
- } catch {
562
- }
563
- },
564
- [storageKey]
565
- );
566
- return {
567
- theme,
568
- resolvedTheme: mounted ? resolveMode(theme) : void 0,
569
- setTheme,
570
- mounted
571
- };
572
- }
380
+ const [theme, setThemeState] = React.useState("system");
381
+ const [mounted, setMounted] = React.useState(false);
382
+ React.useEffect(() => {
383
+ setThemeState(readMode(storageKey));
384
+ setMounted(true);
385
+ }, [storageKey]);
386
+ React.useEffect(() => {
387
+ if (theme !== "system") return;
388
+ const mq = window.matchMedia("(prefers-color-scheme: dark)");
389
+ const onChange = () => applyMode("system");
390
+ mq.addEventListener("change", onChange);
391
+ return () => mq.removeEventListener("change", onChange);
392
+ }, [theme]);
393
+ const setTheme = React.useCallback((next) => {
394
+ setThemeState(next);
395
+ applyMode(next);
396
+ try {
397
+ localStorage.setItem(storageKey, next);
398
+ } catch {}
399
+ }, [storageKey]);
400
+ return {
401
+ theme,
402
+ resolvedTheme: mounted ? resolveMode(theme) : void 0,
403
+ setTheme,
404
+ mounted
405
+ };
406
+ }
407
+ /**
408
+ * `JSON.stringify` for a value spliced into an inline <script>. It leaves `<`
409
+ * alone, so a value containing `<\/script>` would end the element early and the
410
+ * rest would be parsed as HTML. `\u003c` is the same character to JavaScript.
411
+ */
412
+ function toScriptLiteral(value) {
413
+ return JSON.stringify(value).replace(/</g, "\\u003c");
414
+ }
415
+ /**
416
+ * Blocking inline script that sets the `dark` class before first paint. Render
417
+ * it inside <head> (in Next's App Router: directly in the root layout's <head>),
418
+ * and add `suppressHydrationWarning` to <html> since the class it writes is not
419
+ * present in the server-rendered markup.
420
+ */
573
421
  function ThemeScript({ storageKey = THEME_STORAGE_KEY }) {
574
- const key = JSON.stringify(storageKey);
575
- const js = `(function(){try{var s=localStorage.getItem(${key});var d=s==="dark"||((s===null||s==="system")&&window.matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.classList.toggle("dark",d)}catch(e){}})()`;
576
- return (
577
- // biome-ignore lint/security/noDangerouslySetInnerHtml: static, non-user-supplied
578
- /* @__PURE__ */ jsx("script", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: js } })
579
- );
580
- }
581
- function ThemeToggle({
582
- withSystem = false,
583
- storageKey,
584
- variant = "outline",
585
- size = "icon",
586
- className,
587
- ...props
588
- }) {
589
- const { theme, setTheme, mounted } = useTheme(storageKey);
590
- function handleClick() {
591
- if (!withSystem) {
592
- const isDark = document.documentElement.classList.contains("dark");
593
- setTheme(isDark ? "light" : "dark");
594
- return;
595
- }
596
- setTheme(theme === "light" ? "dark" : theme === "dark" ? "system" : "light");
597
- }
598
- const followingSystem = mounted && withSystem && theme === "system";
599
- return /* @__PURE__ */ jsx(
600
- Button,
601
- {
602
- variant,
603
- size,
604
- className: cn(className),
605
- onClick: handleClick,
606
- "aria-label": "Toggle theme",
607
- title: "Toggle theme",
608
- ...props,
609
- children: followingSystem ? /* @__PURE__ */ jsx(Monitor, { "aria-hidden": "true" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
610
- /* @__PURE__ */ jsx(Sun, { className: "dark:hidden", "aria-hidden": "true" }),
611
- /* @__PURE__ */ jsx(Moon, { className: "hidden dark:block", "aria-hidden": "true" })
612
- ] })
613
- }
614
- );
615
- }
616
- var TooltipProvider = Tooltip$1.Provider;
617
- var Tooltip = Tooltip$1.Root;
618
- var TooltipTrigger = Tooltip$1.Trigger;
619
- function TooltipContent({
620
- className,
621
- sideOffset = 4,
622
- ...props
623
- }) {
624
- return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(
625
- Tooltip$1.Content,
626
- {
627
- sideOffset,
628
- className: cn(
629
- "z-50 overflow-hidden rounded-md bg-foreground px-3 py-1.5 text-xs font-medium text-background shadow-md",
630
- "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",
631
- className
632
- ),
633
- ...props
634
- }
635
- ) });
636
- }
637
-
422
+ const js = `(function(){try{var s=localStorage.getItem(${toScriptLiteral(storageKey)});var d=s==="dark"||((s===null||s==="system")&&window.matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.classList.toggle("dark",d)}catch(e){}})()`;
423
+ return /* @__PURE__ */ jsx("script", {
424
+ suppressHydrationWarning: true,
425
+ dangerouslySetInnerHTML: { __html: js }
426
+ });
427
+ }
428
+ /**
429
+ * Icon button that switches mode. The sun/moon glyphs are chosen in CSS off the
430
+ * `dark` class rather than from state, so the first paint is correct and there
431
+ * is nothing for hydration to mismatch on.
432
+ */
433
+ function ThemeToggle({ withSystem = false, storageKey, variant = "outline", size = "icon", className, ...props }) {
434
+ const { theme, setTheme, mounted } = useTheme(storageKey);
435
+ function handleClick() {
436
+ if (!withSystem) {
437
+ const isDark = document.documentElement.classList.contains("dark");
438
+ setTheme(isDark ? "light" : "dark");
439
+ return;
440
+ }
441
+ setTheme(theme === "light" ? "dark" : theme === "dark" ? "system" : "light");
442
+ }
443
+ const followingSystem = mounted && withSystem && theme === "system";
444
+ return /* @__PURE__ */ jsx(Button, {
445
+ variant,
446
+ size,
447
+ className: cn(className),
448
+ onClick: handleClick,
449
+ "aria-label": "Toggle theme",
450
+ title: "Toggle theme",
451
+ ...props,
452
+ children: followingSystem ? /* @__PURE__ */ jsx(Monitor, { "aria-hidden": "true" }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Sun, {
453
+ className: "dark:hidden",
454
+ "aria-hidden": "true"
455
+ }), /* @__PURE__ */ jsx(Moon, {
456
+ className: "hidden dark:block",
457
+ "aria-hidden": "true"
458
+ })] })
459
+ });
460
+ }
461
+ // src/components/ui/tooltip.tsx
462
+ const TooltipProvider = Tooltip$1.Provider;
463
+ const Tooltip = Tooltip$1.Root;
464
+ const TooltipTrigger = Tooltip$1.Trigger;
465
+ function TooltipContent({ className, sideOffset = 4, ...props }) {
466
+ return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Content, {
467
+ sideOffset,
468
+ className: cn("z-50 overflow-hidden rounded-md bg-foreground px-3 py-1.5 text-xs font-medium text-background shadow-md", "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", className),
469
+ ...props
470
+ }) });
471
+ }
638
472
  export { Alert, AlertDescription, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Input, Label, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue, Switch, THEME_STORAGE_KEY, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeScript, ThemeToggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, badgeVariants, buttonVariants, useTheme };