@aircall/ds 0.2.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.js ADDED
@@ -0,0 +1,976 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ // src/components/alert.tsx
34
+ import { cva } from "class-variance-authority";
35
+
36
+ // src/lib/utils.ts
37
+ import { clsx } from "clsx";
38
+ import { extendTailwindMerge } from "tailwind-merge";
39
+ var twMerge = extendTailwindMerge({
40
+ extend: {
41
+ theme: {
42
+ text: ["tiny"]
43
+ }
44
+ }
45
+ });
46
+ function cn(...inputs) {
47
+ return twMerge(clsx(inputs));
48
+ }
49
+
50
+ // src/components/alert.tsx
51
+ import { jsx } from "react/jsx-runtime";
52
+ var alertVariants = cva(
53
+ "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
54
+ {
55
+ variants: {
56
+ variant: {
57
+ default: "bg-card text-card-foreground",
58
+ destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
59
+ }
60
+ },
61
+ defaultVariants: {
62
+ variant: "default"
63
+ }
64
+ }
65
+ );
66
+ function Alert(_a) {
67
+ var _b = _a, {
68
+ className,
69
+ variant
70
+ } = _b, props = __objRest(_b, [
71
+ "className",
72
+ "variant"
73
+ ]);
74
+ return /* @__PURE__ */ jsx(
75
+ "div",
76
+ __spreadValues({
77
+ "data-slot": "alert",
78
+ role: "alert",
79
+ className: cn(alertVariants({ variant }), className)
80
+ }, props)
81
+ );
82
+ }
83
+ function AlertTitle(_a) {
84
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
85
+ return /* @__PURE__ */ jsx(
86
+ "div",
87
+ __spreadValues({
88
+ "data-slot": "alert-title",
89
+ className: cn(
90
+ "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
91
+ className
92
+ )
93
+ }, props)
94
+ );
95
+ }
96
+ function AlertDescription(_a) {
97
+ var _b = _a, {
98
+ className
99
+ } = _b, props = __objRest(_b, [
100
+ "className"
101
+ ]);
102
+ return /* @__PURE__ */ jsx(
103
+ "div",
104
+ __spreadValues({
105
+ "data-slot": "alert-description",
106
+ className: cn(
107
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
108
+ className
109
+ )
110
+ }, props)
111
+ );
112
+ }
113
+
114
+ // src/components/badge.tsx
115
+ import * as React from "react";
116
+ import { Slot } from "@radix-ui/react-slot";
117
+ import { cva as cva2 } from "class-variance-authority";
118
+ import { jsx as jsx2 } from "react/jsx-runtime";
119
+ var badgeVariants = cva2(
120
+ "inline-flex items-center justify-center rounded-full 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",
121
+ {
122
+ variants: {
123
+ variant: {
124
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
125
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
126
+ 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",
127
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
128
+ }
129
+ },
130
+ defaultVariants: {
131
+ variant: "default"
132
+ }
133
+ }
134
+ );
135
+ var Badge = React.forwardRef((_a, forwardedRef) => {
136
+ var _b = _a, { className, variant, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "asChild"]);
137
+ const Comp = asChild ? Slot : "span";
138
+ return /* @__PURE__ */ jsx2(
139
+ Comp,
140
+ __spreadValues({
141
+ "data-slot": "badge",
142
+ className: cn(badgeVariants({ variant }), className),
143
+ ref: forwardedRef
144
+ }, props)
145
+ );
146
+ });
147
+ Badge.displayName = "Badge";
148
+
149
+ // src/components/button.tsx
150
+ import * as React2 from "react";
151
+ import { Slot as Slot2 } from "@radix-ui/react-slot";
152
+ import { cva as cva3 } from "class-variance-authority";
153
+ import { jsx as jsx3 } from "react/jsx-runtime";
154
+ var buttonVariants = cva3(
155
+ "cursor-pointer 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",
156
+ {
157
+ variants: {
158
+ variant: {
159
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
160
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
161
+ 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",
162
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
163
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
164
+ link: "text-primary underline-offset-4 hover:underline"
165
+ },
166
+ size: {
167
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
168
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
169
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
170
+ icon: "size-9",
171
+ "icon-sm": "size-8",
172
+ "icon-lg": "size-10"
173
+ },
174
+ block: {
175
+ true: "w-full"
176
+ }
177
+ },
178
+ defaultVariants: {
179
+ variant: "default",
180
+ size: "default",
181
+ block: false
182
+ }
183
+ }
184
+ );
185
+ var Button = React2.forwardRef((_a, forwardedRef) => {
186
+ var _b = _a, { className, variant, size, asChild = false, block = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "block"]);
187
+ const Comp = asChild ? Slot2 : "button";
188
+ return /* @__PURE__ */ jsx3(
189
+ Comp,
190
+ __spreadValues({
191
+ "data-slot": "button",
192
+ className: cn(buttonVariants({ variant, size, block, className })),
193
+ ref: forwardedRef
194
+ }, props)
195
+ );
196
+ });
197
+ Button.displayName = "Button";
198
+
199
+ // src/components/checkbox.tsx
200
+ import * as React3 from "react";
201
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
202
+ import { CheckOutline } from "@aircall/react-icons";
203
+ import { jsx as jsx4 } from "react/jsx-runtime";
204
+ var Checkbox = React3.forwardRef((_a, ref) => {
205
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
206
+ return /* @__PURE__ */ jsx4(
207
+ CheckboxPrimitive.Root,
208
+ __spreadProps(__spreadValues({
209
+ ref,
210
+ "data-slot": "checkbox",
211
+ className: cn(
212
+ "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
213
+ className
214
+ )
215
+ }, props), {
216
+ children: /* @__PURE__ */ jsx4(
217
+ CheckboxPrimitive.Indicator,
218
+ {
219
+ "data-slot": "checkbox-indicator",
220
+ className: "grid place-content-center text-current transition-none",
221
+ children: /* @__PURE__ */ jsx4(CheckOutline, { className: "size-3.5" })
222
+ }
223
+ )
224
+ })
225
+ );
226
+ });
227
+ Checkbox.displayName = "Checkbox";
228
+
229
+ // src/components/command.tsx
230
+ import { Command as CommandPrimitive } from "cmdk";
231
+
232
+ // src/components/dialog.tsx
233
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
234
+ import { CloseOutline } from "@aircall/react-icons";
235
+ import { jsx as jsx5, jsxs } from "react/jsx-runtime";
236
+ function Dialog(_a) {
237
+ var props = __objRest(_a, []);
238
+ return /* @__PURE__ */ jsx5(DialogPrimitive.Root, __spreadValues({ "data-slot": "dialog" }, props));
239
+ }
240
+ function DialogPortal(_a) {
241
+ var props = __objRest(_a, []);
242
+ return /* @__PURE__ */ jsx5(DialogPrimitive.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
243
+ }
244
+ function DialogOverlay(_a) {
245
+ var _b = _a, {
246
+ className
247
+ } = _b, props = __objRest(_b, [
248
+ "className"
249
+ ]);
250
+ return /* @__PURE__ */ jsx5(
251
+ DialogPrimitive.Overlay,
252
+ __spreadValues({
253
+ "data-slot": "dialog-overlay",
254
+ className: cn(
255
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
256
+ className
257
+ )
258
+ }, props)
259
+ );
260
+ }
261
+ function DialogContent(_a) {
262
+ var _b = _a, {
263
+ className,
264
+ children
265
+ } = _b, props = __objRest(_b, [
266
+ "className",
267
+ "children"
268
+ ]);
269
+ return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
270
+ /* @__PURE__ */ jsx5(DialogOverlay, {}),
271
+ /* @__PURE__ */ jsxs(
272
+ DialogPrimitive.Content,
273
+ __spreadProps(__spreadValues({
274
+ "data-slot": "dialog-content",
275
+ className: cn(
276
+ "bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
277
+ className
278
+ )
279
+ }, props), {
280
+ children: [
281
+ children,
282
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [
283
+ /* @__PURE__ */ jsx5(CloseOutline, {}),
284
+ /* @__PURE__ */ jsx5("span", { className: "sr-only", children: "Close" })
285
+ ] })
286
+ ]
287
+ })
288
+ )
289
+ ] });
290
+ }
291
+ function DialogHeader(_a) {
292
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
293
+ return /* @__PURE__ */ jsx5(
294
+ "div",
295
+ __spreadValues({
296
+ "data-slot": "dialog-header",
297
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className)
298
+ }, props)
299
+ );
300
+ }
301
+ function DialogTitle(_a) {
302
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
303
+ return /* @__PURE__ */ jsx5(
304
+ DialogPrimitive.Title,
305
+ __spreadValues({
306
+ "data-slot": "dialog-title",
307
+ className: cn("text-lg leading-none font-semibold", className)
308
+ }, props)
309
+ );
310
+ }
311
+ function DialogDescription(_a) {
312
+ var _b = _a, {
313
+ className
314
+ } = _b, props = __objRest(_b, [
315
+ "className"
316
+ ]);
317
+ return /* @__PURE__ */ jsx5(
318
+ DialogPrimitive.Description,
319
+ __spreadValues({
320
+ "data-slot": "dialog-description",
321
+ className: cn("text-muted-foreground text-sm", className)
322
+ }, props)
323
+ );
324
+ }
325
+
326
+ // src/components/command.tsx
327
+ import { Search } from "@aircall/react-icons";
328
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
329
+ function Command(_a) {
330
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
331
+ return /* @__PURE__ */ jsx6(
332
+ CommandPrimitive,
333
+ __spreadValues({
334
+ "data-slot": "command",
335
+ className: cn(
336
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
337
+ className
338
+ )
339
+ }, props)
340
+ );
341
+ }
342
+ function CommandDialog(_a) {
343
+ var _b = _a, {
344
+ title = "Command Palette",
345
+ description = "Search for a command to run...",
346
+ children
347
+ } = _b, props = __objRest(_b, [
348
+ "title",
349
+ "description",
350
+ "children"
351
+ ]);
352
+ return /* @__PURE__ */ jsxs2(Dialog, __spreadProps(__spreadValues({}, props), { children: [
353
+ /* @__PURE__ */ jsxs2(DialogHeader, { className: "sr-only", children: [
354
+ /* @__PURE__ */ jsx6(DialogTitle, { children: title }),
355
+ /* @__PURE__ */ jsx6(DialogDescription, { children: description })
356
+ ] }),
357
+ /* @__PURE__ */ jsx6(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx6(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) })
358
+ ] }));
359
+ }
360
+ function CommandInput(_a) {
361
+ var _b = _a, {
362
+ className
363
+ } = _b, props = __objRest(_b, [
364
+ "className"
365
+ ]);
366
+ return /* @__PURE__ */ jsxs2("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [
367
+ /* @__PURE__ */ jsx6(Search, { className: "size-4 shrink-0 opacity-50" }),
368
+ /* @__PURE__ */ jsx6(
369
+ CommandPrimitive.Input,
370
+ __spreadValues({
371
+ "data-slot": "command-input",
372
+ className: cn(
373
+ "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
374
+ className
375
+ )
376
+ }, props)
377
+ )
378
+ ] });
379
+ }
380
+ function CommandList(_a) {
381
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
382
+ return /* @__PURE__ */ jsx6(
383
+ CommandPrimitive.List,
384
+ __spreadValues({
385
+ "data-slot": "command-list",
386
+ className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className)
387
+ }, props)
388
+ );
389
+ }
390
+ function CommandEmpty(_a) {
391
+ var props = __objRest(_a, []);
392
+ return /* @__PURE__ */ jsx6(
393
+ CommandPrimitive.Empty,
394
+ __spreadValues({
395
+ "data-slot": "command-empty",
396
+ className: "py-6 text-center text-sm"
397
+ }, props)
398
+ );
399
+ }
400
+ function CommandGroup(_a) {
401
+ var _b = _a, {
402
+ className
403
+ } = _b, props = __objRest(_b, [
404
+ "className"
405
+ ]);
406
+ return /* @__PURE__ */ jsx6(
407
+ CommandPrimitive.Group,
408
+ __spreadValues({
409
+ "data-slot": "command-group",
410
+ className: cn(
411
+ "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
412
+ className
413
+ )
414
+ }, props)
415
+ );
416
+ }
417
+ function CommandSeparator(_a) {
418
+ var _b = _a, {
419
+ className
420
+ } = _b, props = __objRest(_b, [
421
+ "className"
422
+ ]);
423
+ return /* @__PURE__ */ jsx6(
424
+ CommandPrimitive.Separator,
425
+ __spreadValues({
426
+ "data-slot": "command-separator",
427
+ className: cn("bg-border -mx-1 h-px", className)
428
+ }, props)
429
+ );
430
+ }
431
+ function CommandItem(_a) {
432
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
433
+ return /* @__PURE__ */ jsx6(
434
+ CommandPrimitive.Item,
435
+ __spreadValues({
436
+ "data-slot": "command-item",
437
+ className: cn(
438
+ "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
439
+ className
440
+ )
441
+ }, props)
442
+ );
443
+ }
444
+ function CommandShortcut(_a) {
445
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
446
+ return /* @__PURE__ */ jsx6(
447
+ "span",
448
+ __spreadValues({
449
+ "data-slot": "command-shortcut",
450
+ className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className)
451
+ }, props)
452
+ );
453
+ }
454
+
455
+ // src/components/input.tsx
456
+ import * as React4 from "react";
457
+ import { cva as cva4 } from "class-variance-authority";
458
+ import { jsx as jsx7 } from "react/jsx-runtime";
459
+ var inputVariants = cva4(
460
+ "text-foreground file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none 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 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",
461
+ {
462
+ variants: {
463
+ sizing: {
464
+ default: "h-9 px-4 py-2",
465
+ sm: "h-8 rounded-md gap-1.5 px-3",
466
+ lg: "h-11 rounded-lg px-6"
467
+ },
468
+ block: {
469
+ true: "w-full"
470
+ }
471
+ },
472
+ defaultVariants: {
473
+ sizing: "default"
474
+ }
475
+ }
476
+ );
477
+ var Input = React4.forwardRef((_a, forwardedRef) => {
478
+ var _b = _a, { className, type, sizing, block } = _b, props = __objRest(_b, ["className", "type", "sizing", "block"]);
479
+ return /* @__PURE__ */ jsx7(
480
+ "input",
481
+ __spreadProps(__spreadValues({
482
+ type,
483
+ "data-slot": "input",
484
+ className: cn(inputVariants({ sizing, block, className }))
485
+ }, props), {
486
+ ref: forwardedRef
487
+ })
488
+ );
489
+ });
490
+
491
+ // src/components/label.tsx
492
+ import * as LabelPrimitive from "@radix-ui/react-label";
493
+ import { jsx as jsx8 } from "react/jsx-runtime";
494
+ function Label(_a) {
495
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
496
+ return /* @__PURE__ */ jsx8(
497
+ LabelPrimitive.Root,
498
+ __spreadValues({
499
+ "data-slot": "label",
500
+ className: cn(
501
+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
502
+ className
503
+ )
504
+ }, props)
505
+ );
506
+ }
507
+
508
+ // src/components/popover.tsx
509
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
510
+ import { jsx as jsx9 } from "react/jsx-runtime";
511
+ function Popover(_a) {
512
+ var props = __objRest(_a, []);
513
+ return /* @__PURE__ */ jsx9(PopoverPrimitive.Root, __spreadValues({ "data-slot": "popover" }, props));
514
+ }
515
+ function PopoverTrigger(_a) {
516
+ var props = __objRest(_a, []);
517
+ return /* @__PURE__ */ jsx9(PopoverPrimitive.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
518
+ }
519
+ function PopoverContent(_a) {
520
+ var _b = _a, {
521
+ className,
522
+ align = "center",
523
+ sideOffset = 4
524
+ } = _b, props = __objRest(_b, [
525
+ "className",
526
+ "align",
527
+ "sideOffset"
528
+ ]);
529
+ return /* @__PURE__ */ jsx9(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx9(
530
+ PopoverPrimitive.Content,
531
+ __spreadValues({
532
+ "data-slot": "popover-content",
533
+ align,
534
+ sideOffset,
535
+ className: cn(
536
+ "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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
537
+ className
538
+ )
539
+ }, props)
540
+ ) });
541
+ }
542
+ function PopoverAnchor(_a) {
543
+ var props = __objRest(_a, []);
544
+ return /* @__PURE__ */ jsx9(PopoverPrimitive.Anchor, __spreadValues({ "data-slot": "popover-anchor" }, props));
545
+ }
546
+
547
+ // src/components/radio-group.tsx
548
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
549
+ import { CircleIcon } from "lucide-react";
550
+ import { jsx as jsx10 } from "react/jsx-runtime";
551
+ function RadioGroup(_a) {
552
+ var _b = _a, {
553
+ className
554
+ } = _b, props = __objRest(_b, [
555
+ "className"
556
+ ]);
557
+ return /* @__PURE__ */ jsx10(
558
+ RadioGroupPrimitive.Root,
559
+ __spreadValues({
560
+ "data-slot": "radio-group",
561
+ className: cn("grid gap-3", className)
562
+ }, props)
563
+ );
564
+ }
565
+ function RadioGroupItem(_a) {
566
+ var _b = _a, {
567
+ className
568
+ } = _b, props = __objRest(_b, [
569
+ "className"
570
+ ]);
571
+ return /* @__PURE__ */ jsx10(
572
+ RadioGroupPrimitive.Item,
573
+ __spreadProps(__spreadValues({
574
+ "data-slot": "radio-group-item",
575
+ className: cn(
576
+ "border-input text-primary 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 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
577
+ className
578
+ )
579
+ }, props), {
580
+ children: /* @__PURE__ */ jsx10(
581
+ RadioGroupPrimitive.Indicator,
582
+ {
583
+ "data-slot": "radio-group-indicator",
584
+ className: "relative flex items-center justify-center",
585
+ children: /* @__PURE__ */ jsx10(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
586
+ }
587
+ )
588
+ })
589
+ );
590
+ }
591
+
592
+ // src/components/select.tsx
593
+ import * as SelectPrimitive from "@radix-ui/react-select";
594
+ import { CheckOutline as CheckOutline2, ChevronDownOutline, ChevronUpOutline } from "@aircall/react-icons";
595
+ import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
596
+ function Select(_a) {
597
+ var props = __objRest(_a, []);
598
+ return /* @__PURE__ */ jsx11(SelectPrimitive.Root, __spreadValues({ "data-slot": "select" }, props));
599
+ }
600
+ function SelectGroup(_a) {
601
+ var props = __objRest(_a, []);
602
+ return /* @__PURE__ */ jsx11(SelectPrimitive.Group, __spreadValues({ "data-slot": "select-group" }, props));
603
+ }
604
+ function SelectValue(_a) {
605
+ var props = __objRest(_a, []);
606
+ return /* @__PURE__ */ jsx11(SelectPrimitive.Value, __spreadValues({ "data-slot": "select-value" }, props));
607
+ }
608
+ function SelectTrigger(_a) {
609
+ var _b = _a, {
610
+ className,
611
+ size = "default",
612
+ children
613
+ } = _b, props = __objRest(_b, [
614
+ "className",
615
+ "size",
616
+ "children"
617
+ ]);
618
+ return /* @__PURE__ */ jsxs3(
619
+ SelectPrimitive.Trigger,
620
+ __spreadProps(__spreadValues({
621
+ "data-slot": "select-trigger",
622
+ "data-size": size,
623
+ className: cn(
624
+ "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 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none 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]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
625
+ className
626
+ )
627
+ }, props), {
628
+ children: [
629
+ children,
630
+ /* @__PURE__ */ jsx11(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx11(ChevronDownOutline, { className: "size-4 opacity-50" }) })
631
+ ]
632
+ })
633
+ );
634
+ }
635
+ function SelectContent(_a) {
636
+ var _b = _a, {
637
+ className,
638
+ children,
639
+ position = "popper"
640
+ } = _b, props = __objRest(_b, [
641
+ "className",
642
+ "children",
643
+ "position"
644
+ ]);
645
+ return /* @__PURE__ */ jsx11(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs3(
646
+ SelectPrimitive.Content,
647
+ __spreadProps(__spreadValues({
648
+ "data-slot": "select-content",
649
+ className: cn(
650
+ "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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
651
+ position === "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",
652
+ className
653
+ ),
654
+ position
655
+ }, props), {
656
+ children: [
657
+ /* @__PURE__ */ jsx11(SelectScrollUpButton, {}),
658
+ /* @__PURE__ */ jsx11(
659
+ SelectPrimitive.Viewport,
660
+ {
661
+ className: cn(
662
+ "p-1",
663
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
664
+ ),
665
+ children
666
+ }
667
+ ),
668
+ /* @__PURE__ */ jsx11(SelectScrollDownButton, {})
669
+ ]
670
+ })
671
+ ) });
672
+ }
673
+ function SelectLabel(_a) {
674
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
675
+ return /* @__PURE__ */ jsx11(
676
+ SelectPrimitive.Label,
677
+ __spreadValues({
678
+ "data-slot": "select-label",
679
+ className: cn("text-muted-foreground px-2 py-1.5 text-xs", className)
680
+ }, props)
681
+ );
682
+ }
683
+ function SelectItem(_a) {
684
+ var _b = _a, {
685
+ className,
686
+ children
687
+ } = _b, props = __objRest(_b, [
688
+ "className",
689
+ "children"
690
+ ]);
691
+ return /* @__PURE__ */ jsxs3(
692
+ SelectPrimitive.Item,
693
+ __spreadProps(__spreadValues({
694
+ "data-slot": "select-item",
695
+ className: cn(
696
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
697
+ className
698
+ )
699
+ }, props), {
700
+ children: [
701
+ /* @__PURE__ */ jsx11("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx11(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx11(CheckOutline2, { className: "size-4" }) }) }),
702
+ /* @__PURE__ */ jsx11(SelectPrimitive.ItemText, { children })
703
+ ]
704
+ })
705
+ );
706
+ }
707
+ function SelectSeparator(_a) {
708
+ var _b = _a, {
709
+ className
710
+ } = _b, props = __objRest(_b, [
711
+ "className"
712
+ ]);
713
+ return /* @__PURE__ */ jsx11(
714
+ SelectPrimitive.Separator,
715
+ __spreadValues({
716
+ "data-slot": "select-separator",
717
+ className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)
718
+ }, props)
719
+ );
720
+ }
721
+ function SelectScrollUpButton(_a) {
722
+ var _b = _a, {
723
+ className
724
+ } = _b, props = __objRest(_b, [
725
+ "className"
726
+ ]);
727
+ return /* @__PURE__ */ jsx11(
728
+ SelectPrimitive.ScrollUpButton,
729
+ __spreadProps(__spreadValues({
730
+ "data-slot": "select-scroll-up-button",
731
+ className: cn("flex cursor-default items-center justify-center py-1", className)
732
+ }, props), {
733
+ children: /* @__PURE__ */ jsx11(ChevronUpOutline, { className: "size-4" })
734
+ })
735
+ );
736
+ }
737
+ function SelectScrollDownButton(_a) {
738
+ var _b = _a, {
739
+ className
740
+ } = _b, props = __objRest(_b, [
741
+ "className"
742
+ ]);
743
+ return /* @__PURE__ */ jsx11(
744
+ SelectPrimitive.ScrollDownButton,
745
+ __spreadProps(__spreadValues({
746
+ "data-slot": "select-scroll-down-button",
747
+ className: cn("flex cursor-default items-center justify-center py-1", className)
748
+ }, props), {
749
+ children: /* @__PURE__ */ jsx11(ChevronDownOutline, { className: "size-4" })
750
+ })
751
+ );
752
+ }
753
+
754
+ // src/components/slider.tsx
755
+ import * as React5 from "react";
756
+ import * as SliderPrimitive from "@radix-ui/react-slider";
757
+ import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
758
+ function Slider(_a) {
759
+ var _b = _a, {
760
+ className,
761
+ defaultValue,
762
+ value,
763
+ min = 0,
764
+ max = 100
765
+ } = _b, props = __objRest(_b, [
766
+ "className",
767
+ "defaultValue",
768
+ "value",
769
+ "min",
770
+ "max"
771
+ ]);
772
+ const _values = React5.useMemo(
773
+ () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
774
+ [value, defaultValue, min, max]
775
+ );
776
+ return /* @__PURE__ */ jsxs4(
777
+ SliderPrimitive.Root,
778
+ __spreadProps(__spreadValues({
779
+ "data-slot": "slider",
780
+ defaultValue,
781
+ value,
782
+ min,
783
+ max,
784
+ className: cn(
785
+ "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
786
+ className
787
+ )
788
+ }, props), {
789
+ children: [
790
+ /* @__PURE__ */ jsx12(
791
+ SliderPrimitive.Track,
792
+ {
793
+ "data-slot": "slider-track",
794
+ className: cn(
795
+ "bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
796
+ ),
797
+ children: /* @__PURE__ */ jsx12(
798
+ SliderPrimitive.Range,
799
+ {
800
+ "data-slot": "slider-range",
801
+ className: cn(
802
+ "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
803
+ )
804
+ }
805
+ )
806
+ }
807
+ ),
808
+ Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx12(
809
+ SliderPrimitive.Thumb,
810
+ {
811
+ "data-slot": "slider-thumb",
812
+ className: "border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
813
+ },
814
+ index
815
+ ))
816
+ ]
817
+ })
818
+ );
819
+ }
820
+
821
+ // src/components/sonner.tsx
822
+ import { Loader2Icon, OctagonXIcon, TriangleAlertIcon } from "lucide-react";
823
+ import { useTheme } from "next-themes";
824
+ import { Toaster as Sonner, toast } from "sonner";
825
+ import { CheckCircleOutline, Info } from "@aircall/react-icons";
826
+ import { jsx as jsx13 } from "react/jsx-runtime";
827
+ var Toaster = (_a) => {
828
+ var props = __objRest(_a, []);
829
+ const { theme = "system" } = useTheme();
830
+ return /* @__PURE__ */ jsx13(
831
+ Sonner,
832
+ __spreadValues({
833
+ theme,
834
+ className: "toaster group",
835
+ icons: {
836
+ success: /* @__PURE__ */ jsx13(CheckCircleOutline, { className: "size-4" }),
837
+ info: /* @__PURE__ */ jsx13(Info, { className: "size-4" }),
838
+ warning: /* @__PURE__ */ jsx13(TriangleAlertIcon, { className: "size-4" }),
839
+ error: /* @__PURE__ */ jsx13(OctagonXIcon, { className: "size-4" }),
840
+ loading: /* @__PURE__ */ jsx13(Loader2Icon, { className: "size-4 animate-spin" })
841
+ },
842
+ style: {
843
+ "--normal-bg": "var(--popover)",
844
+ "--normal-text": "var(--popover-foreground)",
845
+ "--normal-border": "var(--border)"
846
+ }
847
+ }, props)
848
+ );
849
+ };
850
+
851
+ // src/components/switch.tsx
852
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
853
+ import { jsx as jsx14 } from "react/jsx-runtime";
854
+ function Switch(_a) {
855
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
856
+ return /* @__PURE__ */ jsx14(
857
+ SwitchPrimitive.Root,
858
+ __spreadProps(__spreadValues({
859
+ "data-slot": "switch",
860
+ className: cn(
861
+ "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
862
+ className
863
+ )
864
+ }, props), {
865
+ children: /* @__PURE__ */ jsx14(
866
+ SwitchPrimitive.Thumb,
867
+ {
868
+ "data-slot": "switch-thumb",
869
+ className: cn(
870
+ "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
871
+ )
872
+ }
873
+ )
874
+ })
875
+ );
876
+ }
877
+
878
+ // src/components/theme-provider.tsx
879
+ import {
880
+ ThemeProvider as NextThemesProvider
881
+ } from "next-themes";
882
+ import { useTheme as useTheme2 } from "next-themes";
883
+ import { jsx as jsx15 } from "react/jsx-runtime";
884
+ function ThemeProvider(_a) {
885
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
886
+ return /* @__PURE__ */ jsx15(
887
+ NextThemesProvider,
888
+ __spreadProps(__spreadValues({
889
+ attribute: "data-theme",
890
+ defaultTheme: "system",
891
+ enableSystem: true,
892
+ disableTransitionOnChange: true
893
+ }, props), {
894
+ children
895
+ })
896
+ );
897
+ }
898
+
899
+ // src/components/textarea.tsx
900
+ import { jsx as jsx16 } from "react/jsx-runtime";
901
+ function Textarea(_a) {
902
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
903
+ return /* @__PURE__ */ jsx16(
904
+ "textarea",
905
+ __spreadValues({
906
+ "data-slot": "textarea",
907
+ className: cn(
908
+ "border-input placeholder: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 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
909
+ className
910
+ )
911
+ }, props)
912
+ );
913
+ }
914
+
915
+ // src/hooks/use-mobile.ts
916
+ import * as React6 from "react";
917
+ var MOBILE_BREAKPOINT = 768;
918
+ function useIsMobile() {
919
+ const [isMobile, setIsMobile] = React6.useState(void 0);
920
+ React6.useEffect(() => {
921
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
922
+ const onChange = () => {
923
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
924
+ };
925
+ mql.addEventListener("change", onChange);
926
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
927
+ return () => mql.removeEventListener("change", onChange);
928
+ }, []);
929
+ return !!isMobile;
930
+ }
931
+ export {
932
+ Alert,
933
+ AlertDescription,
934
+ AlertTitle,
935
+ Badge,
936
+ Button,
937
+ Checkbox,
938
+ Command,
939
+ CommandDialog,
940
+ CommandEmpty,
941
+ CommandGroup,
942
+ CommandInput,
943
+ CommandItem,
944
+ CommandList,
945
+ CommandSeparator,
946
+ CommandShortcut,
947
+ Input,
948
+ Label,
949
+ Popover,
950
+ PopoverAnchor,
951
+ PopoverContent,
952
+ PopoverTrigger,
953
+ RadioGroup,
954
+ RadioGroupItem,
955
+ Select,
956
+ SelectContent,
957
+ SelectGroup,
958
+ SelectItem,
959
+ SelectLabel,
960
+ SelectScrollDownButton,
961
+ SelectScrollUpButton,
962
+ SelectSeparator,
963
+ SelectTrigger,
964
+ SelectValue,
965
+ Slider,
966
+ Switch,
967
+ Textarea,
968
+ ThemeProvider,
969
+ Toaster,
970
+ badgeVariants,
971
+ buttonVariants,
972
+ cn,
973
+ toast,
974
+ useIsMobile,
975
+ useTheme2 as useTheme
976
+ };