@aircall/ds 0.2.2 → 0.2.4

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 CHANGED
@@ -1,976 +1,2311 @@
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
1
  import { cva } from "class-variance-authority";
35
-
36
- // src/lib/utils.ts
37
2
  import { clsx } from "clsx";
38
3
  import { extendTailwindMerge } from "tailwind-merge";
39
- var twMerge = extendTailwindMerge({
40
- extend: {
41
- theme: {
42
- text: ["tiny"]
43
- }
44
- }
45
- });
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import * as React$1 from "react";
6
+ import React, { useMemo } from "react";
7
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
8
+ import { Slot, Slot as Slot$1 } from "@radix-ui/react-slot";
9
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
10
+ import useEmblaCarousel from "embla-carousel-react";
11
+ import * as Icons from "@aircall/react-icons";
12
+ import { ArrowLeftOutline, ArrowRightOutline, CheckCircleOutline, CheckOutline, ChevronDownOutline, ChevronRightOutline, ChevronUpOutline, CloseOutline, Emoji, Info, Search } from "@aircall/react-icons";
13
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
14
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
15
+ import { Command as Command$1 } from "cmdk";
16
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
17
+ import { getCountryISO3 } from "@aircall/numbers";
18
+ import { Drawer as Drawer$1 } from "vaul";
19
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
20
+ import EmojiReactPicker, { Categories, EmojiStyle, SuggestionMode, Theme } from "emoji-picker-react";
21
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
22
+ import { ThemeProvider as ThemeProvider$1, useTheme, useTheme as useTheme$1 } from "next-themes";
23
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
24
+ import * as LabelPrimitive from "@radix-ui/react-label";
25
+ import { OTPInput, OTPInputContext } from "input-otp";
26
+ import { CircleIcon, Loader2Icon, MinusIcon, OctagonXIcon, PanelLeftIcon, TriangleAlertIcon } from "lucide-react";
27
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
28
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
29
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
30
+ import * as SelectPrimitive from "@radix-ui/react-select";
31
+ import * as SliderPrimitive from "@radix-ui/react-slider";
32
+ import { Toaster as Toaster$1, toast } from "sonner";
33
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
34
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
35
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
36
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
37
+
38
+ //#region src/lib/utils.ts
39
+ const twMerge = extendTailwindMerge({ extend: { theme: { text: ["tiny"] } } });
46
40
  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
- );
41
+ return twMerge(clsx(inputs));
42
+ }
43
+
44
+ //#endregion
45
+ //#region src/components/alert.tsx
46
+ const alertVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-lh [&>svg]:w-4", {
47
+ defaultVariants: { variant: "default" },
48
+ variants: { variant: {
49
+ default: "bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground",
50
+ error: "border-destructive/32 bg-destructive/4 [&>svg]:text-destructive",
51
+ info: "border-info/32 bg-info/4 [&>svg]:text-info",
52
+ success: "border-success/32 bg-success/4 [&>svg]:text-success",
53
+ warning: "border-warning/32 bg-warning/4 [&>svg]:text-warning"
54
+ } }
55
+ });
56
+ function Alert({ className, variant, ...props }) {
57
+ return /* @__PURE__ */ jsx("div", {
58
+ className: cn(alertVariants({ variant }), className),
59
+ "data-slot": "alert",
60
+ role: "alert",
61
+ ...props
62
+ });
63
+ }
64
+ function AlertTitle({ className, ...props }) {
65
+ return /* @__PURE__ */ jsx("div", {
66
+ className: cn("font-medium [svg~&]:col-start-2", className),
67
+ "data-slot": "alert-title",
68
+ ...props
69
+ });
70
+ }
71
+ function AlertDescription({ className, ...props }) {
72
+ return /* @__PURE__ */ jsx("div", {
73
+ className: cn("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2", className),
74
+ "data-slot": "alert-description",
75
+ ...props
76
+ });
77
+ }
78
+ function AlertAction({ className, ...props }) {
79
+ return /* @__PURE__ */ jsx("div", {
80
+ className: cn("flex gap-1 max-sm:col-start-2 max-sm:mt-2 sm:row-start-1 sm:row-end-3 sm:self-center sm:[[data-slot=alert-description]~&]:col-start-2 sm:[[data-slot=alert-title]~&]:col-start-2 sm:[svg~&]:col-start-2 sm:[svg~[data-slot=alert-description]~&]:col-start-3 sm:[svg~[data-slot=alert-title]~&]:col-start-3", className),
81
+ "data-slot": "alert-action",
82
+ ...props
83
+ });
84
+ }
85
+
86
+ //#endregion
87
+ //#region src/components/avatar.tsx
88
+ const avatarVariants = cva("relative flex shrink-0 overflow-hidden ", {
89
+ variants: {
90
+ shape: {
91
+ default: "rounded-full",
92
+ rounded: "rounded-md"
93
+ },
94
+ size: {
95
+ sm: "size-6 text-xs",
96
+ default: "size-8",
97
+ lg: "size-10"
98
+ }
99
+ },
100
+ defaultVariants: {
101
+ shape: "default",
102
+ size: "default"
103
+ }
104
+ });
105
+ const Avatar = React$1.forwardRef(({ className, shape = "default", size = "default", ...props }, ref) => {
106
+ return /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
107
+ "data-slot": "avatar",
108
+ className: cn(avatarVariants({
109
+ shape,
110
+ size
111
+ }), className),
112
+ ...props,
113
+ ref
114
+ });
115
+ });
116
+ function AvatarImage({ className, ...props }) {
117
+ return /* @__PURE__ */ jsx(AvatarPrimitive.Image, {
118
+ "data-slot": "avatar-image",
119
+ className: cn("aspect-square size-full", className),
120
+ ...props
121
+ });
122
+ }
123
+ function AvatarFallback({ className, ...props }) {
124
+ return /* @__PURE__ */ jsx(AvatarPrimitive.Fallback, {
125
+ "data-slot": "avatar-fallback",
126
+ className: cn("bg-muted flex size-full items-center justify-center", className),
127
+ ...props
128
+ });
129
+ }
130
+
131
+ //#endregion
132
+ //#region src/components/badge.tsx
133
+ const badgeVariants = cva("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", {
134
+ variants: { variant: {
135
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
136
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
137
+ 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",
138
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
139
+ } },
140
+ defaultVariants: { variant: "default" }
141
+ });
142
+ const Badge = React$1.forwardRef(({ className, variant, asChild = false, ...props }, forwardedRef) => {
143
+ return /* @__PURE__ */ jsx(asChild ? Slot$1 : "span", {
144
+ "data-slot": "badge",
145
+ className: cn(badgeVariants({ variant }), className),
146
+ ref: forwardedRef,
147
+ ...props
148
+ });
146
149
  });
147
150
  Badge.displayName = "Badge";
148
151
 
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
- );
152
+ //#endregion
153
+ //#region src/components/separator.tsx
154
+ function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
155
+ return /* @__PURE__ */ jsx(SeparatorPrimitive.Root, {
156
+ "data-slot": "separator",
157
+ decorative,
158
+ orientation,
159
+ className: cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className),
160
+ ...props
161
+ });
162
+ }
163
+
164
+ //#endregion
165
+ //#region src/components/button-group.tsx
166
+ const buttonGroupVariants = cva("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2", {
167
+ variants: { orientation: {
168
+ horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
169
+ vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
170
+ } },
171
+ defaultVariants: { orientation: "horizontal" }
172
+ });
173
+ function ButtonGroup({ className, orientation, ...props }) {
174
+ return /* @__PURE__ */ jsx("div", {
175
+ role: "group",
176
+ "data-slot": "button-group",
177
+ "data-orientation": orientation,
178
+ className: cn(buttonGroupVariants({ orientation }), className),
179
+ ...props
180
+ });
181
+ }
182
+ function ButtonGroupText({ className, asChild = false, ...props }) {
183
+ return /* @__PURE__ */ jsx(asChild ? Slot$1 : "div", {
184
+ className: cn("bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
185
+ ...props
186
+ });
187
+ }
188
+ function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
189
+ return /* @__PURE__ */ jsx(Separator, {
190
+ "data-slot": "button-group-separator",
191
+ orientation,
192
+ className: cn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", className),
193
+ ...props
194
+ });
195
+ }
196
+
197
+ //#endregion
198
+ //#region src/components/button.tsx
199
+ const buttonVariants = cva("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", {
200
+ variants: {
201
+ variant: {
202
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
203
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
204
+ 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",
205
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
206
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
207
+ link: "text-primary underline-offset-4 hover:underline"
208
+ },
209
+ size: {
210
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
211
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
212
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
213
+ icon: "size-9",
214
+ "icon-sm": "size-8",
215
+ "icon-lg": "size-10"
216
+ },
217
+ block: { true: "w-full" }
218
+ },
219
+ defaultVariants: {
220
+ variant: "default",
221
+ size: "default",
222
+ block: false
223
+ }
224
+ });
225
+ const Button = React$1.forwardRef(({ className, variant, size, asChild = false, block = false, ...props }, forwardedRef) => {
226
+ return /* @__PURE__ */ jsx(asChild ? Slot$1 : "button", {
227
+ "data-slot": "button",
228
+ className: cn(buttonVariants({
229
+ variant,
230
+ size,
231
+ block,
232
+ className
233
+ })),
234
+ ref: forwardedRef,
235
+ ...props
236
+ });
196
237
  });
197
238
  Button.displayName = "Button";
198
239
 
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
- );
240
+ //#endregion
241
+ //#region src/components/card.tsx
242
+ function Card({ className, ...props }) {
243
+ return /* @__PURE__ */ jsx("div", {
244
+ "data-slot": "card",
245
+ className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className),
246
+ ...props
247
+ });
248
+ }
249
+ function CardHeader({ className, ...props }) {
250
+ return /* @__PURE__ */ jsx("div", {
251
+ "data-slot": "card-header",
252
+ className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
253
+ ...props
254
+ });
255
+ }
256
+ function CardTitle({ className, ...props }) {
257
+ return /* @__PURE__ */ jsx("div", {
258
+ "data-slot": "card-title",
259
+ className: cn("leading-none font-semibold", className),
260
+ ...props
261
+ });
262
+ }
263
+ function CardDescription({ className, ...props }) {
264
+ return /* @__PURE__ */ jsx("div", {
265
+ "data-slot": "card-description",
266
+ className: cn("text-muted-foreground text-sm", className),
267
+ ...props
268
+ });
269
+ }
270
+ function CardAction({ className, ...props }) {
271
+ return /* @__PURE__ */ jsx("div", {
272
+ "data-slot": "card-action",
273
+ className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
274
+ ...props
275
+ });
276
+ }
277
+ function CardContent({ className, ...props }) {
278
+ return /* @__PURE__ */ jsx("div", {
279
+ "data-slot": "card-content",
280
+ className: cn("px-6", className),
281
+ ...props
282
+ });
283
+ }
284
+ function CardFooter({ className, ...props }) {
285
+ return /* @__PURE__ */ jsx("div", {
286
+ "data-slot": "card-footer",
287
+ className: cn("flex items-center px-6 [.border-t]:pt-6", className),
288
+ ...props
289
+ });
290
+ }
291
+
292
+ //#endregion
293
+ //#region src/components/carousel.tsx
294
+ const CarouselContext = React$1.createContext(null);
295
+ function useCarousel() {
296
+ const context = React$1.useContext(CarouselContext);
297
+ if (!context) throw new Error("useCarousel must be used within a <Carousel />");
298
+ return context;
299
+ }
300
+ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) {
301
+ const [carouselRef, api] = useEmblaCarousel({
302
+ ...opts,
303
+ axis: orientation === "horizontal" ? "x" : "y"
304
+ }, plugins);
305
+ const [canScrollPrev, setCanScrollPrev] = React$1.useState(false);
306
+ const [canScrollNext, setCanScrollNext] = React$1.useState(false);
307
+ const onSelect = React$1.useCallback((api$1) => {
308
+ if (!api$1) return;
309
+ setCanScrollPrev(api$1.canScrollPrev());
310
+ setCanScrollNext(api$1.canScrollNext());
311
+ }, []);
312
+ const scrollPrev = React$1.useCallback(() => {
313
+ api?.scrollPrev();
314
+ }, [api]);
315
+ const scrollNext = React$1.useCallback(() => {
316
+ api?.scrollNext();
317
+ }, [api]);
318
+ const handleKeyDown = React$1.useCallback((event) => {
319
+ if (event.key === "ArrowLeft") {
320
+ event.preventDefault();
321
+ scrollPrev();
322
+ } else if (event.key === "ArrowRight") {
323
+ event.preventDefault();
324
+ scrollNext();
325
+ }
326
+ }, [scrollPrev, scrollNext]);
327
+ React$1.useEffect(() => {
328
+ if (!api || !setApi) return;
329
+ setApi(api);
330
+ }, [api, setApi]);
331
+ React$1.useEffect(() => {
332
+ if (!api) return;
333
+ onSelect(api);
334
+ api.on("reInit", onSelect);
335
+ api.on("select", onSelect);
336
+ return () => {
337
+ api?.off("select", onSelect);
338
+ };
339
+ }, [api, onSelect]);
340
+ return /* @__PURE__ */ jsx(CarouselContext.Provider, {
341
+ value: {
342
+ carouselRef,
343
+ api,
344
+ opts,
345
+ orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
346
+ scrollPrev,
347
+ scrollNext,
348
+ canScrollPrev,
349
+ canScrollNext
350
+ },
351
+ children: /* @__PURE__ */ jsx("div", {
352
+ onKeyDownCapture: handleKeyDown,
353
+ className: cn("relative", className),
354
+ role: "region",
355
+ "aria-roledescription": "carousel",
356
+ "data-slot": "carousel",
357
+ ...props,
358
+ children
359
+ })
360
+ });
361
+ }
362
+ function CarouselContent({ className, ...props }) {
363
+ const { carouselRef, orientation } = useCarousel();
364
+ return /* @__PURE__ */ jsx("div", {
365
+ ref: carouselRef,
366
+ className: "overflow-hidden",
367
+ "data-slot": "carousel-content",
368
+ children: /* @__PURE__ */ jsx("div", {
369
+ className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
370
+ ...props
371
+ })
372
+ });
373
+ }
374
+ function CarouselItem({ className, ...props }) {
375
+ const { orientation } = useCarousel();
376
+ return /* @__PURE__ */ jsx("div", {
377
+ role: "group",
378
+ "aria-roledescription": "slide",
379
+ "data-slot": "carousel-item",
380
+ className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
381
+ ...props
382
+ });
383
+ }
384
+ function CarouselPrevious({ className, variant = "outline", size = "sm", ...props }) {
385
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
386
+ return /* @__PURE__ */ jsxs(Button, {
387
+ "data-slot": "carousel-previous",
388
+ variant,
389
+ size,
390
+ className: cn("absolute size-8 rounded-full", orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
391
+ disabled: !canScrollPrev,
392
+ onClick: scrollPrev,
393
+ ...props,
394
+ children: [/* @__PURE__ */ jsx(ArrowLeftOutline, {}), /* @__PURE__ */ jsx("span", {
395
+ className: "sr-only",
396
+ children: "Previous slide"
397
+ })]
398
+ });
399
+ }
400
+ function CarouselNext({ className, variant = "outline", size = "sm", ...props }) {
401
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
402
+ return /* @__PURE__ */ jsxs(Button, {
403
+ "data-slot": "carousel-next",
404
+ variant,
405
+ size,
406
+ className: cn("absolute size-8 rounded-full", orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
407
+ disabled: !canScrollNext,
408
+ onClick: scrollNext,
409
+ ...props,
410
+ children: [/* @__PURE__ */ jsx(ArrowRightOutline, {}), /* @__PURE__ */ jsx("span", {
411
+ className: "sr-only",
412
+ children: "Next slide"
413
+ })]
414
+ });
415
+ }
416
+
417
+ //#endregion
418
+ //#region src/components/checkbox.tsx
419
+ const Checkbox = React$1.forwardRef(({ className, ...props }, ref) => {
420
+ return /* @__PURE__ */ jsx(CheckboxPrimitive.Root, {
421
+ ref,
422
+ "data-slot": "checkbox",
423
+ className: cn("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", className),
424
+ ...props,
425
+ children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, {
426
+ "data-slot": "checkbox-indicator",
427
+ className: "grid place-content-center text-current transition-none",
428
+ children: /* @__PURE__ */ jsx(CheckOutline, { className: "size-3.5" })
429
+ })
430
+ });
226
431
  });
227
432
  Checkbox.displayName = "Checkbox";
228
433
 
229
- // src/components/command.tsx
230
- import { Command as CommandPrimitive } from "cmdk";
434
+ //#endregion
435
+ //#region src/components/collapsible.tsx
436
+ function Collapsible({ ...props }) {
437
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, {
438
+ "data-slot": "collapsible",
439
+ ...props
440
+ });
441
+ }
442
+ function CollapsibleTrigger({ ...props }) {
443
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleTrigger, {
444
+ "data-slot": "collapsible-trigger",
445
+ ...props
446
+ });
447
+ }
448
+ function CollapsibleContent({ ...props }) {
449
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleContent, {
450
+ "data-slot": "collapsible-content",
451
+ ...props
452
+ });
453
+ }
231
454
 
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
- );
455
+ //#endregion
456
+ //#region src/components/dialog.tsx
457
+ function Dialog({ ...props }) {
458
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
459
+ "data-slot": "dialog",
460
+ ...props
461
+ });
462
+ }
463
+ function DialogTrigger({ ...props }) {
464
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, {
465
+ "data-slot": "dialog-trigger",
466
+ ...props
467
+ });
468
+ }
469
+ function DialogPortal({ ...props }) {
470
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, {
471
+ "data-slot": "dialog-portal",
472
+ ...props
473
+ });
474
+ }
475
+ function DialogClose({ ...props }) {
476
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, {
477
+ "data-slot": "dialog-close",
478
+ ...props
479
+ });
480
+ }
481
+ function DialogOverlay({ className, ...props }) {
482
+ return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
483
+ "data-slot": "dialog-overlay",
484
+ className: cn("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", className),
485
+ ...props
486
+ });
487
+ }
488
+ function DialogContent({ className, children, ...props }) {
489
+ return /* @__PURE__ */ jsxs(DialogPortal, {
490
+ "data-slot": "dialog-portal",
491
+ children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
492
+ "data-slot": "dialog-content",
493
+ className: cn("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", className),
494
+ ...props,
495
+ children: [children, /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
496
+ 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",
497
+ children: [/* @__PURE__ */ jsx(CloseOutline, {}), /* @__PURE__ */ jsx("span", {
498
+ className: "sr-only",
499
+ children: "Close"
500
+ })]
501
+ })]
502
+ })]
503
+ });
504
+ }
505
+ function DialogHeader({ className, ...props }) {
506
+ return /* @__PURE__ */ jsx("div", {
507
+ "data-slot": "dialog-header",
508
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
509
+ ...props
510
+ });
511
+ }
512
+ function DialogFooter({ className, ...props }) {
513
+ return /* @__PURE__ */ jsx("div", {
514
+ "data-slot": "dialog-footer",
515
+ className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
516
+ ...props
517
+ });
518
+ }
519
+ function DialogTitle({ className, ...props }) {
520
+ return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
521
+ "data-slot": "dialog-title",
522
+ className: cn("text-lg leading-none font-semibold", className),
523
+ ...props
524
+ });
525
+ }
526
+ function DialogDescription({ className, ...props }) {
527
+ return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
528
+ "data-slot": "dialog-description",
529
+ className: cn("text-muted-foreground text-sm", className),
530
+ ...props
531
+ });
532
+ }
533
+
534
+ //#endregion
535
+ //#region src/components/command.tsx
536
+ function Command({ className, ...props }) {
537
+ return /* @__PURE__ */ jsx(Command$1, {
538
+ "data-slot": "command",
539
+ className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
540
+ ...props
541
+ });
542
+ }
543
+ function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, ...props }) {
544
+ return /* @__PURE__ */ jsxs(Dialog, {
545
+ ...props,
546
+ children: [/* @__PURE__ */ jsxs(DialogHeader, {
547
+ className: "sr-only",
548
+ children: [/* @__PURE__ */ jsx(DialogTitle, { children: title }), /* @__PURE__ */ jsx(DialogDescription, { children: description })]
549
+ }), /* @__PURE__ */ jsx(DialogContent, {
550
+ className: "overflow-hidden p-0",
551
+ children: /* @__PURE__ */ jsx(Command, {
552
+ 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",
553
+ children
554
+ })
555
+ })]
556
+ });
557
+ }
558
+ function CommandInput({ className, ...props }) {
559
+ return /* @__PURE__ */ jsxs("div", {
560
+ "data-slot": "command-input-wrapper",
561
+ className: "flex h-9 items-center gap-2 border-b px-3",
562
+ children: [/* @__PURE__ */ jsx(Search, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ jsx(Command$1.Input, {
563
+ "data-slot": "command-input",
564
+ className: cn("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", className),
565
+ ...props
566
+ })]
567
+ });
568
+ }
569
+ function CommandList({ className, ...props }) {
570
+ return /* @__PURE__ */ jsx(Command$1.List, {
571
+ "data-slot": "command-list",
572
+ className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
573
+ ...props
574
+ });
575
+ }
576
+ function CommandEmpty({ ...props }) {
577
+ return /* @__PURE__ */ jsx(Command$1.Empty, {
578
+ "data-slot": "command-empty",
579
+ className: "py-6 text-center text-sm",
580
+ ...props
581
+ });
582
+ }
583
+ function CommandGroup({ className, ...props }) {
584
+ return /* @__PURE__ */ jsx(Command$1.Group, {
585
+ "data-slot": "command-group",
586
+ className: cn("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", className),
587
+ ...props
588
+ });
589
+ }
590
+ function CommandSeparator({ className, ...props }) {
591
+ return /* @__PURE__ */ jsx(Command$1.Separator, {
592
+ "data-slot": "command-separator",
593
+ className: cn("bg-border -mx-1 h-px", className),
594
+ ...props
595
+ });
596
+ }
597
+ function CommandItem({ className, ...props }) {
598
+ return /* @__PURE__ */ jsx(Command$1.Item, {
599
+ "data-slot": "command-item",
600
+ className: cn("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", className),
601
+ ...props
602
+ });
603
+ }
604
+ function CommandShortcut({ className, ...props }) {
605
+ return /* @__PURE__ */ jsx("span", {
606
+ "data-slot": "command-shortcut",
607
+ className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
608
+ ...props
609
+ });
610
+ }
611
+
612
+ //#endregion
613
+ //#region src/components/country-flag.tsx
614
+ const additionalCountryCodeMappings = {
615
+ BQ: "ABW",
616
+ BES: "ABW",
617
+ CW: "ABW",
618
+ SX: "ABW"
619
+ };
620
+ const sizeMap = {
621
+ xs: "size-2",
622
+ sm: "size-3",
623
+ md: "size-4",
624
+ lg: "size-4",
625
+ xl: "size-6"
849
626
  };
627
+ const CountryFlag = ({ countryIsoCode, size = "xl", className, ...otherProps }) => {
628
+ const CountryIcons = Icons;
629
+ const properCountryCode = (countryIsoCode.length === 3 ? countryIsoCode : getCountryISO3(countryIsoCode)) || additionalCountryCodeMappings[countryIsoCode];
630
+ return /* @__PURE__ */ jsx(properCountryCode ? CountryIcons["Flag" + capitalizeFirstLetter(properCountryCode.toLowerCase())] : CountryIcons["FlagAbw"], {
631
+ className: cn("flex-none", sizeMap[size], className),
632
+ ...otherProps
633
+ });
634
+ };
635
+ function capitalizeFirstLetter(val) {
636
+ return String(val).charAt(0).toUpperCase() + String(val).slice(1);
637
+ }
850
638
 
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;
639
+ //#endregion
640
+ //#region src/components/drawer.tsx
641
+ function Drawer({ ...props }) {
642
+ return /* @__PURE__ */ jsx(Drawer$1.Root, {
643
+ "data-slot": "drawer",
644
+ ...props
645
+ });
646
+ }
647
+ function DrawerTrigger({ ...props }) {
648
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, {
649
+ "data-slot": "drawer-trigger",
650
+ ...props
651
+ });
652
+ }
653
+ function DrawerPortal({ ...props }) {
654
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, {
655
+ "data-slot": "drawer-portal",
656
+ ...props
657
+ });
658
+ }
659
+ function DrawerClose({ ...props }) {
660
+ return /* @__PURE__ */ jsx(Drawer$1.Close, {
661
+ "data-slot": "drawer-close",
662
+ ...props
663
+ });
664
+ }
665
+ const DrawerOverlay = React$1.forwardRef(({ className, ...props }, forwardedRef) => {
666
+ return /* @__PURE__ */ jsx(Drawer$1.Overlay, {
667
+ "data-slot": "drawer-overlay",
668
+ className: cn("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", className),
669
+ ...props,
670
+ ref: forwardedRef
671
+ });
672
+ });
673
+ function DrawerContent({ className, children, container, ...props }) {
674
+ return /* @__PURE__ */ jsxs(DrawerPortal, {
675
+ "data-slot": "drawer-portal",
676
+ container,
677
+ children: [/* @__PURE__ */ jsx(DrawerOverlay, {}), /* @__PURE__ */ jsxs(Drawer$1.Content, {
678
+ "data-slot": "drawer-content",
679
+ className: cn("group/drawer-content bg-card fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[90vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[90vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", className),
680
+ ...props,
681
+ children: [/* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children]
682
+ })]
683
+ });
684
+ }
685
+ function DrawerHeader({ className, ...props }) {
686
+ return /* @__PURE__ */ jsx("div", {
687
+ "data-slot": "drawer-header",
688
+ className: cn("flex flex-col gap-1.5 p-4", className),
689
+ ...props
690
+ });
691
+ }
692
+ function DrawerFooter({ className, ...props }) {
693
+ return /* @__PURE__ */ jsx("div", {
694
+ "data-slot": "drawer-footer",
695
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
696
+ ...props
697
+ });
698
+ }
699
+ function DrawerTitle({ className, ...props }) {
700
+ return /* @__PURE__ */ jsx(Drawer$1.Title, {
701
+ "data-slot": "drawer-title",
702
+ className: cn("text-foreground font-semibold", className),
703
+ ...props
704
+ });
705
+ }
706
+ function DrawerDescription({ className, ...props }) {
707
+ return /* @__PURE__ */ jsx(Drawer$1.Description, {
708
+ "data-slot": "drawer-description",
709
+ className: cn("text-muted-foreground text-sm", className),
710
+ ...props
711
+ });
712
+ }
713
+
714
+ //#endregion
715
+ //#region src/components/dropdown-menu.tsx
716
+ function DropdownMenu({ ...props }) {
717
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, {
718
+ "data-slot": "dropdown-menu",
719
+ ...props
720
+ });
721
+ }
722
+ function DropdownMenuPortal({ ...props }) {
723
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, {
724
+ "data-slot": "dropdown-menu-portal",
725
+ ...props
726
+ });
727
+ }
728
+ function DropdownMenuTrigger({ ...props }) {
729
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, {
730
+ "data-slot": "dropdown-menu-trigger",
731
+ ...props
732
+ });
733
+ }
734
+ function DropdownMenuContent({ className, sideOffset = 4, container, forceMount, ...props }) {
735
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, {
736
+ container,
737
+ forceMount,
738
+ children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
739
+ "data-slot": "dropdown-menu-content",
740
+ sideOffset,
741
+ className: cn("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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className),
742
+ ...props
743
+ })
744
+ });
745
+ }
746
+ function DropdownMenuGroup({ ...props }) {
747
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, {
748
+ "data-slot": "dropdown-menu-group",
749
+ ...props
750
+ });
751
+ }
752
+ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
753
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
754
+ "data-slot": "dropdown-menu-item",
755
+ "data-inset": inset,
756
+ "data-variant": variant,
757
+ className: cn("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 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
758
+ ...props
759
+ });
760
+ }
761
+ function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
762
+ return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
763
+ "data-slot": "dropdown-menu-checkbox-item",
764
+ className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 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", className),
765
+ checked,
766
+ ...props,
767
+ children: [/* @__PURE__ */ jsx("span", {
768
+ className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
769
+ children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckOutline, { className: "size-4" }) })
770
+ }), children]
771
+ });
772
+ }
773
+ function DropdownMenuRadioGroup({ ...props }) {
774
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.RadioGroup, {
775
+ "data-slot": "dropdown-menu-radio-group",
776
+ ...props
777
+ });
778
+ }
779
+ function DropdownMenuRadioItem({ className, children, ...props }) {
780
+ return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
781
+ "data-slot": "dropdown-menu-radio-item",
782
+ className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 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", className),
783
+ ...props,
784
+ children: [/* @__PURE__ */ jsx("span", {
785
+ className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
786
+ children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx("div", { className: "size-2 rounded-full bg-current" }) })
787
+ }), children]
788
+ });
789
+ }
790
+ function DropdownMenuLabel({ className, inset, ...props }) {
791
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
792
+ "data-slot": "dropdown-menu-label",
793
+ "data-inset": inset,
794
+ className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
795
+ ...props
796
+ });
797
+ }
798
+ function DropdownMenuSeparator({ className, ...props }) {
799
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
800
+ "data-slot": "dropdown-menu-separator",
801
+ className: cn("bg-border -mx-1 my-1 h-px", className),
802
+ ...props
803
+ });
804
+ }
805
+ function DropdownMenuShortcut({ className, ...props }) {
806
+ return /* @__PURE__ */ jsx("span", {
807
+ "data-slot": "dropdown-menu-shortcut",
808
+ className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
809
+ ...props
810
+ });
811
+ }
812
+ function DropdownMenuSub({ ...props }) {
813
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, {
814
+ "data-slot": "dropdown-menu-sub",
815
+ ...props
816
+ });
817
+ }
818
+ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
819
+ return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
820
+ "data-slot": "dropdown-menu-sub-trigger",
821
+ "data-inset": inset,
822
+ className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className),
823
+ ...props,
824
+ children: [children, /* @__PURE__ */ jsx(ChevronRightOutline, { className: "ml-auto size-4" })]
825
+ });
826
+ }
827
+ function DropdownMenuSubContent({ className, ...props }) {
828
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
829
+ "data-slot": "dropdown-menu-sub-content",
830
+ className: cn("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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
831
+ ...props
832
+ });
833
+ }
834
+
835
+ //#endregion
836
+ //#region src/components/popover.tsx
837
+ function Popover({ ...props }) {
838
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Root, {
839
+ "data-slot": "popover",
840
+ ...props
841
+ });
842
+ }
843
+ function PopoverTrigger({ ...props }) {
844
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
845
+ "data-slot": "popover-trigger",
846
+ ...props
847
+ });
848
+ }
849
+ function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
850
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
851
+ "data-slot": "popover-content",
852
+ align,
853
+ sideOffset,
854
+ className: cn("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", className),
855
+ ...props
856
+ }) });
857
+ }
858
+ function PopoverAnchor({ ...props }) {
859
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, {
860
+ "data-slot": "popover-anchor",
861
+ ...props
862
+ });
863
+ }
864
+
865
+ //#endregion
866
+ //#region src/components/theme-provider.tsx
867
+ function ThemeProvider({ children, ...props }) {
868
+ return /* @__PURE__ */ jsx(ThemeProvider$1, {
869
+ attribute: "data-theme",
870
+ defaultTheme: "system",
871
+ enableSystem: true,
872
+ disableTransitionOnChange: true,
873
+ ...props,
874
+ children
875
+ });
876
+ }
877
+
878
+ //#endregion
879
+ //#region src/components/tooltip.tsx
880
+ const TooltipProvider = TooltipPrimitive.Provider;
881
+ const Tooltip = TooltipPrimitive.Root;
882
+ const TooltipTrigger = TooltipPrimitive.Trigger;
883
+ const TooltipContent = React$1.forwardRef(({ className, sideOffset = 4, collisionPadding = 4, container, forceMount, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, {
884
+ container,
885
+ forceMount,
886
+ children: /* @__PURE__ */ jsx(TooltipPrimitive.Content, {
887
+ ref,
888
+ sideOffset,
889
+ collisionPadding,
890
+ sticky: "partial",
891
+ className: cn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground 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 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", className),
892
+ ...props
893
+ })
894
+ }));
895
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
896
+
897
+ //#endregion
898
+ //#region src/components/emoji-picker.tsx
899
+ const EmojiPickerCategories = {
900
+ SUGGESTED: Categories.SUGGESTED,
901
+ SMILEYS_PEOPLE: Categories.SMILEYS_PEOPLE,
902
+ ANIMALS_NATURE: Categories.ANIMALS_NATURE,
903
+ FOOD_DRINK: Categories.FOOD_DRINK,
904
+ TRAVEL_PLACES: Categories.TRAVEL_PLACES,
905
+ ACTIVITIES: Categories.ACTIVITIES,
906
+ OBJECTS: Categories.OBJECTS,
907
+ SYMBOLS: Categories.SYMBOLS,
908
+ FLAGS: Categories.FLAGS
909
+ };
910
+ const DefaultEmojiButton = React$1.forwardRef((props, ref) => /* @__PURE__ */ jsx(Button, {
911
+ ...props,
912
+ ref,
913
+ variant: "outline",
914
+ size: "icon-sm"
915
+ }));
916
+ DefaultEmojiButton.displayName = "DefaultEmojiButton";
917
+ function EmojiPicker({ disabled, tooltip = "Emoji", onEmojiSelect, className, triggerClassName, emojiClassName, searchPlaceholder, emojiListWidth = 300, DefaultTriggerComponent, categories }) {
918
+ const [open, setOpen] = React$1.useState(false);
919
+ const { resolvedTheme } = useTheme();
920
+ const pickerTheme = resolvedTheme === "dark" ? Theme.DARK : Theme.LIGHT;
921
+ const handleSelect = React$1.useCallback((emojiData) => {
922
+ onEmojiSelect?.(emojiData.emoji);
923
+ setOpen(false);
924
+ }, [onEmojiSelect]);
925
+ return /* @__PURE__ */ jsxs(Popover, {
926
+ open,
927
+ onOpenChange: setOpen,
928
+ children: [/* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
929
+ asChild: true,
930
+ children: /* @__PURE__ */ jsx(TooltipTrigger, {
931
+ asChild: true,
932
+ children: /* @__PURE__ */ jsx(DefaultTriggerComponent || DefaultEmojiButton, {
933
+ type: "button",
934
+ "aria-label": "Open emoji picker",
935
+ disabled,
936
+ className: cn("data-[state=open]:bg-accent", triggerClassName),
937
+ children: /* @__PURE__ */ jsx(Emoji, { "aria-hidden": "true" })
938
+ })
939
+ })
940
+ }), /* @__PURE__ */ jsx(TooltipContent, { children: tooltip })] }) }), /* @__PURE__ */ jsx(PopoverContent, {
941
+ className: cn("p-0 w-64", className),
942
+ align: "start",
943
+ children: /* @__PURE__ */ jsx("div", {
944
+ className: cn("ds-emoji-picker", emojiClassName),
945
+ "data-emoji-class": true,
946
+ children: /* @__PURE__ */ jsx(EmojiReactPicker, {
947
+ lazyLoadEmojis: true,
948
+ emojiStyle: EmojiStyle.NATIVE,
949
+ suggestedEmojisMode: SuggestionMode.RECENT,
950
+ previewConfig: { showPreview: false },
951
+ onEmojiClick: handleSelect,
952
+ width: emojiListWidth,
953
+ searchPlaceHolder: searchPlaceholder,
954
+ categories,
955
+ theme: pickerTheme
956
+ })
957
+ })
958
+ })]
959
+ });
960
+ }
961
+
962
+ //#endregion
963
+ //#region src/components/empty.tsx
964
+ function Empty({ className, ...props }) {
965
+ return /* @__PURE__ */ jsx("div", {
966
+ "data-slot": "empty",
967
+ className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12", className),
968
+ ...props
969
+ });
970
+ }
971
+ function EmptyHeader({ className, ...props }) {
972
+ return /* @__PURE__ */ jsx("div", {
973
+ "data-slot": "empty-header",
974
+ className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className),
975
+ ...props
976
+ });
977
+ }
978
+ const emptyMediaVariants = cva("flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
979
+ variants: { variant: {
980
+ default: "bg-transparent",
981
+ icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
982
+ } },
983
+ defaultVariants: { variant: "default" }
984
+ });
985
+ function EmptyMedia({ className, variant = "default", ...props }) {
986
+ return /* @__PURE__ */ jsx("div", {
987
+ "data-slot": "empty-icon",
988
+ "data-variant": variant,
989
+ className: cn(emptyMediaVariants({
990
+ variant,
991
+ className
992
+ })),
993
+ ...props
994
+ });
995
+ }
996
+ function EmptyTitle({ className, ...props }) {
997
+ return /* @__PURE__ */ jsx("div", {
998
+ "data-slot": "empty-title",
999
+ className: cn("text-lg font-medium tracking-tight", className),
1000
+ ...props
1001
+ });
1002
+ }
1003
+ function EmptyDescription({ className, ...props }) {
1004
+ return /* @__PURE__ */ jsx("div", {
1005
+ "data-slot": "empty-description",
1006
+ className: cn("text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4", className),
1007
+ ...props
1008
+ });
1009
+ }
1010
+ function EmptyContent({ className, ...props }) {
1011
+ return /* @__PURE__ */ jsx("div", {
1012
+ "data-slot": "empty-content",
1013
+ className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
1014
+ ...props
1015
+ });
1016
+ }
1017
+
1018
+ //#endregion
1019
+ //#region src/components/label.tsx
1020
+ function Label({ className, ...props }) {
1021
+ return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
1022
+ "data-slot": "label",
1023
+ className: cn("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", className),
1024
+ ...props
1025
+ });
1026
+ }
1027
+
1028
+ //#endregion
1029
+ //#region src/components/field.tsx
1030
+ function FieldSet({ className, ...props }) {
1031
+ return /* @__PURE__ */ jsx("fieldset", {
1032
+ "data-slot": "field-set",
1033
+ className: cn("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
1034
+ ...props
1035
+ });
1036
+ }
1037
+ function FieldLegend({ className, variant = "legend", ...props }) {
1038
+ return /* @__PURE__ */ jsx("legend", {
1039
+ "data-slot": "field-legend",
1040
+ "data-variant": variant,
1041
+ className: cn("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className),
1042
+ ...props
1043
+ });
1044
+ }
1045
+ function FieldGroup({ className, ...props }) {
1046
+ return /* @__PURE__ */ jsx("div", {
1047
+ "data-slot": "field-group",
1048
+ className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4", className),
1049
+ ...props
1050
+ });
1051
+ }
1052
+ const fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
1053
+ variants: { orientation: {
1054
+ vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
1055
+ horizontal: [
1056
+ "flex-row items-center",
1057
+ "[&>[data-slot=field-label]]:flex-auto",
1058
+ "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
1059
+ ],
1060
+ responsive: [
1061
+ "flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
1062
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
1063
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
1064
+ ]
1065
+ } },
1066
+ defaultVariants: { orientation: "vertical" }
1067
+ });
1068
+ function Field({ className, orientation = "vertical", ...props }) {
1069
+ return /* @__PURE__ */ jsx("div", {
1070
+ role: "group",
1071
+ "data-slot": "field",
1072
+ "data-orientation": orientation,
1073
+ className: cn(fieldVariants({ orientation }), className),
1074
+ ...props
1075
+ });
1076
+ }
1077
+ function FieldContent({ className, ...props }) {
1078
+ return /* @__PURE__ */ jsx("div", {
1079
+ "data-slot": "field-content",
1080
+ className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
1081
+ ...props
1082
+ });
1083
+ }
1084
+ function FieldLabel({ className, ...props }) {
1085
+ return /* @__PURE__ */ jsx(Label, {
1086
+ "data-slot": "field-label",
1087
+ className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4", "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10", className),
1088
+ ...props
1089
+ });
1090
+ }
1091
+ function FieldTitle({ className, ...props }) {
1092
+ return /* @__PURE__ */ jsx("div", {
1093
+ "data-slot": "field-label",
1094
+ className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className),
1095
+ ...props
1096
+ });
1097
+ }
1098
+ function FieldDescription({ className, ...props }) {
1099
+ return /* @__PURE__ */ jsx("p", {
1100
+ "data-slot": "field-description",
1101
+ className: cn("text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", className),
1102
+ ...props
1103
+ });
1104
+ }
1105
+ function FieldSeparator({ children, className, ...props }) {
1106
+ return /* @__PURE__ */ jsxs("div", {
1107
+ "data-slot": "field-separator",
1108
+ "data-content": !!children,
1109
+ className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
1110
+ ...props,
1111
+ children: [/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && /* @__PURE__ */ jsx("span", {
1112
+ className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
1113
+ "data-slot": "field-separator-content",
1114
+ children
1115
+ })]
1116
+ });
1117
+ }
1118
+ function FieldError({ className, children, errors, ...props }) {
1119
+ const content = useMemo(() => {
1120
+ if (children) return children;
1121
+ if (!errors?.length) return null;
1122
+ const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
1123
+ if (uniqueErrors?.length == 1) return uniqueErrors[0]?.message;
1124
+ return /* @__PURE__ */ jsx("ul", {
1125
+ className: "ml-4 flex list-disc flex-col gap-1",
1126
+ children: uniqueErrors.map((error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index))
1127
+ });
1128
+ }, [children, errors]);
1129
+ if (!content) return null;
1130
+ return /* @__PURE__ */ jsx("div", {
1131
+ role: "alert",
1132
+ "data-slot": "field-error",
1133
+ className: cn("text-destructive text-sm font-normal", className),
1134
+ ...props,
1135
+ children: content
1136
+ });
1137
+ }
1138
+
1139
+ //#endregion
1140
+ //#region src/components/input.tsx
1141
+ const inputVariants = cva("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", {
1142
+ variants: {
1143
+ sizing: {
1144
+ default: "h-9 px-4 py-2",
1145
+ sm: "h-8 rounded-md gap-1.5 px-3",
1146
+ lg: "h-11 rounded-lg px-6"
1147
+ },
1148
+ block: { true: "w-full" }
1149
+ },
1150
+ defaultVariants: { sizing: "default" }
1151
+ });
1152
+ const Input = React$1.forwardRef(({ className, type, sizing, block, ...props }, forwardedRef) => {
1153
+ return /* @__PURE__ */ jsx("input", {
1154
+ type,
1155
+ "data-slot": "input",
1156
+ className: cn(inputVariants({
1157
+ sizing,
1158
+ block,
1159
+ className
1160
+ })),
1161
+ ...props,
1162
+ ref: forwardedRef
1163
+ });
1164
+ });
1165
+
1166
+ //#endregion
1167
+ //#region src/components/textarea.tsx
1168
+ function Textarea({ className, ...props }) {
1169
+ return /* @__PURE__ */ jsx("textarea", {
1170
+ "data-slot": "textarea",
1171
+ className: cn("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", className),
1172
+ ...props
1173
+ });
1174
+ }
1175
+
1176
+ //#endregion
1177
+ //#region src/components/input-group.tsx
1178
+ const inputGroupVariants = cva("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none has-[>textarea]:h-auto", {
1179
+ variants: { sizing: {
1180
+ default: "h-9",
1181
+ sm: "h-8",
1182
+ lg: "h-11"
1183
+ } },
1184
+ defaultVariants: { sizing: "default" }
1185
+ });
1186
+ function InputGroup({ className, sizing, ...props }) {
1187
+ return /* @__PURE__ */ jsx("div", {
1188
+ "data-slot": "input-group",
1189
+ role: "group",
1190
+ className: cn(inputGroupVariants({ sizing }), "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]", "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40", className),
1191
+ ...props
1192
+ });
1193
+ }
1194
+ const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50", {
1195
+ variants: { align: {
1196
+ "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
1197
+ "inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
1198
+ "block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
1199
+ "block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
1200
+ } },
1201
+ defaultVariants: { align: "inline-start" }
1202
+ });
1203
+ function InputGroupAddon({ className, align = "inline-start", ...props }) {
1204
+ return /* @__PURE__ */ jsx("div", {
1205
+ role: "group",
1206
+ "data-slot": "input-group-addon",
1207
+ "data-align": align,
1208
+ className: cn(inputGroupAddonVariants({ align }), className),
1209
+ onClick: (e) => {
1210
+ if (e.target.closest("button")) return;
1211
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
1212
+ },
1213
+ ...props
1214
+ });
1215
+ }
1216
+ const inputGroupButtonVariants = cva("text-sm shadow-none flex gap-2 items-center", {
1217
+ variants: { size: {
1218
+ xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
1219
+ sm: "h-7 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
1220
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
1221
+ "icon-sm": "size-7 p-0 has-[>svg]:p-0"
1222
+ } },
1223
+ defaultVariants: { size: "xs" }
1224
+ });
1225
+ const InputGroupButton = React$1.forwardRef(({ className, type = "button", variant = "ghost", size = "xs", ...props }, ref) => {
1226
+ return /* @__PURE__ */ jsx(Button, {
1227
+ ref,
1228
+ type,
1229
+ "data-size": size,
1230
+ variant,
1231
+ className: cn(inputGroupButtonVariants({ size }), className),
1232
+ ...props
1233
+ });
1234
+ });
1235
+ InputGroupButton.displayName = "InputGroupButton";
1236
+ function InputGroupText({ className, ...props }) {
1237
+ return /* @__PURE__ */ jsx("span", {
1238
+ className: cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
1239
+ ...props
1240
+ });
1241
+ }
1242
+ const InputGroupInput = React$1.forwardRef(({ className, ...props }, forwardedRef) => {
1243
+ return /* @__PURE__ */ jsx(Input, {
1244
+ "data-slot": "input-group-control",
1245
+ className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", className),
1246
+ ...props,
1247
+ ref: forwardedRef
1248
+ });
1249
+ });
1250
+ function InputGroupTextarea({ className, ...props }) {
1251
+ return /* @__PURE__ */ jsx(Textarea, {
1252
+ "data-slot": "input-group-control",
1253
+ className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent", className),
1254
+ ...props
1255
+ });
1256
+ }
1257
+
1258
+ //#endregion
1259
+ //#region src/components/input-otp.tsx
1260
+ function InputOTP({ className, containerClassName, ...props }) {
1261
+ return /* @__PURE__ */ jsx(OTPInput, {
1262
+ "data-slot": "input-otp",
1263
+ containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
1264
+ className: cn("disabled:cursor-not-allowed", className),
1265
+ ...props
1266
+ });
1267
+ }
1268
+ function InputOTPGroup({ className, ...props }) {
1269
+ return /* @__PURE__ */ jsx("div", {
1270
+ "data-slot": "input-otp-group",
1271
+ className: cn("flex items-center", className),
1272
+ ...props
1273
+ });
1274
+ }
1275
+ function InputOTPSlot({ index, className, ...props }) {
1276
+ const { char, hasFakeCaret, isActive } = React$1.useContext(OTPInputContext)?.slots[index] ?? {};
1277
+ return /* @__PURE__ */ jsxs("div", {
1278
+ "data-slot": "input-otp-slot",
1279
+ "data-active": isActive,
1280
+ className: cn("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]", className),
1281
+ ...props,
1282
+ children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
1283
+ className: "pointer-events-none absolute inset-0 flex items-center justify-center",
1284
+ children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" })
1285
+ })]
1286
+ });
1287
+ }
1288
+ function InputOTPSeparator({ ...props }) {
1289
+ return /* @__PURE__ */ jsx("div", {
1290
+ "data-slot": "input-otp-separator",
1291
+ role: "separator",
1292
+ ...props,
1293
+ children: /* @__PURE__ */ jsx(MinusIcon, {})
1294
+ });
1295
+ }
1296
+
1297
+ //#endregion
1298
+ //#region src/components/item.tsx
1299
+ const ItemGroup = React$1.forwardRef(({ className, stackedItems = false, ...props }, ref) => {
1300
+ return /* @__PURE__ */ jsx("div", {
1301
+ ref,
1302
+ role: "list",
1303
+ "data-slot": "item-group",
1304
+ "data-stacked": stackedItems ? "" : void 0,
1305
+ className: cn("group/item-group flex flex-col", stackedItems ? "*:has-[+[data-slot=item]]:rounded-b-none *:[[data-slot=item]+[data-slot=item]]:rounded-t-none *:[[data-slot=item]+[data-slot=item]]:border-t-0" : "", className),
1306
+ ...props
1307
+ });
1308
+ });
1309
+ ItemGroup.displayName = "ItemGroup";
1310
+ function ItemSeparator({ className, ...props }) {
1311
+ return /* @__PURE__ */ jsx(Separator, {
1312
+ "data-slot": "item-separator",
1313
+ orientation: "horizontal",
1314
+ className: cn("my-0", className),
1315
+ ...props
1316
+ });
1317
+ }
1318
+ const itemVariants = cva("group/item flex items-center text-sm transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", {
1319
+ variants: {
1320
+ variant: {
1321
+ default: "bg-transparent rounded-md",
1322
+ outline: "border border-border rounded-md",
1323
+ muted: "bg-muted/50 rounded-md"
1324
+ },
1325
+ size: {
1326
+ default: "p-4 gap-4",
1327
+ sm: "p-3 gap-2.5"
1328
+ }
1329
+ },
1330
+ defaultVariants: {
1331
+ variant: "default",
1332
+ size: "default"
1333
+ }
1334
+ });
1335
+ const Item = React$1.forwardRef(({ className, variant = "default", size = "default", asChild = false, ...props }, ref) => {
1336
+ return /* @__PURE__ */ jsx(asChild ? Slot$1 : "div", {
1337
+ ref,
1338
+ "data-slot": "item",
1339
+ "data-variant": variant,
1340
+ "data-size": size,
1341
+ className: cn(itemVariants({
1342
+ variant,
1343
+ size,
1344
+ className
1345
+ })),
1346
+ ...props
1347
+ });
1348
+ });
1349
+ Item.displayName = "Item";
1350
+ const itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5", {
1351
+ variants: { variant: {
1352
+ default: "bg-transparent",
1353
+ icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
1354
+ image: "size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover"
1355
+ } },
1356
+ defaultVariants: { variant: "default" }
1357
+ });
1358
+ const ItemMedia = React$1.forwardRef(({ className, variant = "default", ...props }, ref) => {
1359
+ return /* @__PURE__ */ jsx("div", {
1360
+ ref,
1361
+ "data-slot": "item-media",
1362
+ "data-variant": variant,
1363
+ className: cn(itemMediaVariants({
1364
+ variant,
1365
+ className
1366
+ })),
1367
+ ...props
1368
+ });
1369
+ });
1370
+ ItemMedia.displayName = "ItemMedia";
1371
+ const ItemContent = React$1.forwardRef(({ className, ...props }, ref) => {
1372
+ return /* @__PURE__ */ jsx("div", {
1373
+ ref,
1374
+ "data-slot": "item-content",
1375
+ className: cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className),
1376
+ ...props
1377
+ });
1378
+ });
1379
+ ItemContent.displayName = "ItemContent";
1380
+ const ItemTitle = React$1.forwardRef(({ className, ...props }, ref) => {
1381
+ return /* @__PURE__ */ jsx("div", {
1382
+ ref,
1383
+ "data-slot": "item-title",
1384
+ className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium", className),
1385
+ ...props
1386
+ });
1387
+ });
1388
+ ItemTitle.displayName = "ItemTitle";
1389
+ const ItemDescription = React$1.forwardRef(({ className, ...props }, ref) => {
1390
+ return /* @__PURE__ */ jsx("p", {
1391
+ ref,
1392
+ "data-slot": "item-description",
1393
+ className: cn("text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", className),
1394
+ ...props
1395
+ });
1396
+ });
1397
+ ItemDescription.displayName = "ItemDescription";
1398
+ const ItemActions = React$1.forwardRef(({ className, ...props }, ref) => {
1399
+ return /* @__PURE__ */ jsx("div", {
1400
+ ref,
1401
+ "data-slot": "item-actions",
1402
+ className: cn("flex items-center gap-2", className),
1403
+ ...props
1404
+ });
1405
+ });
1406
+ ItemActions.displayName = "ItemActions";
1407
+ const ItemHeader = React$1.forwardRef(({ className, ...props }, ref) => {
1408
+ return /* @__PURE__ */ jsx("div", {
1409
+ ref,
1410
+ "data-slot": "item-header",
1411
+ className: cn("flex basis-full items-center justify-between gap-2", className),
1412
+ ...props
1413
+ });
1414
+ });
1415
+ ItemHeader.displayName = "ItemHeader";
1416
+ const ItemFooter = React$1.forwardRef(({ className, ...props }, ref) => {
1417
+ return /* @__PURE__ */ jsx("div", {
1418
+ ref,
1419
+ "data-slot": "item-footer",
1420
+ className: cn("flex basis-full items-center justify-between gap-2", className),
1421
+ ...props
1422
+ });
1423
+ });
1424
+ ItemFooter.displayName = "ItemFooter";
1425
+
1426
+ //#endregion
1427
+ //#region src/components/list.tsx
1428
+ const List = ({ children, className, ...props }) => {
1429
+ return /* @__PURE__ */ jsx("div", {
1430
+ className: cn("flex flex-col", className),
1431
+ ...props,
1432
+ children
1433
+ });
1434
+ };
1435
+ const ListRow = React$1.forwardRef(({ children, className, ...props }, ref) => {
1436
+ return /* @__PURE__ */ jsx("div", {
1437
+ ref,
1438
+ className: cn("grid grid-flow-col gap-x-2.5 gap-y-2 p-3 relative rounded-lg", "grid-cols-[minmax(0,auto)_1fr]", className),
1439
+ ...props,
1440
+ children
1441
+ });
1442
+ });
1443
+ const ListCol = ({ grow, wrap, children, className, ...props }) => {
1444
+ return /* @__PURE__ */ jsx("div", {
1445
+ className: cn(!wrap && "row-start-1", className),
1446
+ ...props,
1447
+ children
1448
+ });
1449
+ };
1450
+
1451
+ //#endregion
1452
+ //#region src/components/progress.tsx
1453
+ function Progress({ className, value, ...props }) {
1454
+ return /* @__PURE__ */ jsx(ProgressPrimitive.Root, {
1455
+ "data-slot": "progress",
1456
+ className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
1457
+ ...props,
1458
+ children: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {
1459
+ "data-slot": "progress-indicator",
1460
+ className: "bg-primary h-full w-full flex-1 transition-all",
1461
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
1462
+ })
1463
+ });
1464
+ }
1465
+
1466
+ //#endregion
1467
+ //#region src/components/radio-group.tsx
1468
+ function RadioGroup({ className, ...props }) {
1469
+ return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, {
1470
+ "data-slot": "radio-group",
1471
+ className: cn("grid gap-3", className),
1472
+ ...props
1473
+ });
1474
+ }
1475
+ function RadioGroupItem({ className, ...props }) {
1476
+ return /* @__PURE__ */ jsx(RadioGroupPrimitive.Item, {
1477
+ "data-slot": "radio-group-item",
1478
+ className: cn("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", className),
1479
+ ...props,
1480
+ children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, {
1481
+ "data-slot": "radio-group-indicator",
1482
+ className: "relative flex items-center justify-center",
1483
+ children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
1484
+ })
1485
+ });
1486
+ }
1487
+
1488
+ //#endregion
1489
+ //#region src/components/scroll-area.tsx
1490
+ function ScrollArea({ className, children, ...props }) {
1491
+ return /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, {
1492
+ "data-slot": "scroll-area",
1493
+ className: cn("relative", className),
1494
+ ...props,
1495
+ children: [
1496
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, {
1497
+ "data-slot": "scroll-area-viewport",
1498
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
1499
+ children
1500
+ }),
1501
+ /* @__PURE__ */ jsx(ScrollBar, {}),
1502
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
1503
+ ]
1504
+ });
1505
+ }
1506
+ function ScrollBar({ className, orientation = "vertical", ...props }) {
1507
+ return /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, {
1508
+ "data-slot": "scroll-area-scrollbar",
1509
+ orientation,
1510
+ className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className),
1511
+ ...props,
1512
+ children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, {
1513
+ "data-slot": "scroll-area-thumb",
1514
+ className: "bg-border relative flex-1 rounded-full"
1515
+ })
1516
+ });
1517
+ }
1518
+
1519
+ //#endregion
1520
+ //#region src/components/select.tsx
1521
+ function Select({ ...props }) {
1522
+ return /* @__PURE__ */ jsx(SelectPrimitive.Root, {
1523
+ "data-slot": "select",
1524
+ ...props
1525
+ });
1526
+ }
1527
+ function SelectGroup({ ...props }) {
1528
+ return /* @__PURE__ */ jsx(SelectPrimitive.Group, {
1529
+ "data-slot": "select-group",
1530
+ ...props
1531
+ });
1532
+ }
1533
+ function SelectValue({ ...props }) {
1534
+ return /* @__PURE__ */ jsx(SelectPrimitive.Value, {
1535
+ "data-slot": "select-value",
1536
+ ...props
1537
+ });
1538
+ }
1539
+ function SelectTrigger({ className, size = "default", children, ...props }) {
1540
+ return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
1541
+ "data-slot": "select-trigger",
1542
+ "data-size": size,
1543
+ className: cn("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", className),
1544
+ ...props,
1545
+ children: [children, /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
1546
+ asChild: true,
1547
+ children: /* @__PURE__ */ jsx(ChevronDownOutline, { className: "size-4 opacity-50" })
1548
+ })]
1549
+ });
1550
+ }
1551
+ function SelectContent({ className, children, position = "popper", ...props }) {
1552
+ return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
1553
+ "data-slot": "select-content",
1554
+ className: cn("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", 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", className),
1555
+ position,
1556
+ ...props,
1557
+ children: [
1558
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
1559
+ /* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
1560
+ className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
1561
+ children
1562
+ }),
1563
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
1564
+ ]
1565
+ }) });
1566
+ }
1567
+ function SelectLabel({ className, ...props }) {
1568
+ return /* @__PURE__ */ jsx(SelectPrimitive.Label, {
1569
+ "data-slot": "select-label",
1570
+ className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
1571
+ ...props
1572
+ });
1573
+ }
1574
+ function SelectItem({ className, children, ...props }) {
1575
+ return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
1576
+ "data-slot": "select-item",
1577
+ className: cn("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", className),
1578
+ ...props,
1579
+ children: [/* @__PURE__ */ jsx("span", {
1580
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
1581
+ children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckOutline, { className: "size-4" }) })
1582
+ }), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })]
1583
+ });
1584
+ }
1585
+ function SelectSeparator({ className, ...props }) {
1586
+ return /* @__PURE__ */ jsx(SelectPrimitive.Separator, {
1587
+ "data-slot": "select-separator",
1588
+ className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
1589
+ ...props
1590
+ });
1591
+ }
1592
+ function SelectScrollUpButton({ className, ...props }) {
1593
+ return /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, {
1594
+ "data-slot": "select-scroll-up-button",
1595
+ className: cn("flex cursor-default items-center justify-center py-1", className),
1596
+ ...props,
1597
+ children: /* @__PURE__ */ jsx(ChevronUpOutline, { className: "size-4" })
1598
+ });
1599
+ }
1600
+ function SelectScrollDownButton({ className, ...props }) {
1601
+ return /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, {
1602
+ "data-slot": "select-scroll-down-button",
1603
+ className: cn("flex cursor-default items-center justify-center py-1", className),
1604
+ ...props,
1605
+ children: /* @__PURE__ */ jsx(ChevronDownOutline, { className: "size-4" })
1606
+ });
1607
+ }
1608
+
1609
+ //#endregion
1610
+ //#region src/components/sheet.tsx
1611
+ function Sheet({ ...props }) {
1612
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
1613
+ "data-slot": "sheet",
1614
+ ...props
1615
+ });
1616
+ }
1617
+ function SheetTrigger({ ...props }) {
1618
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, {
1619
+ "data-slot": "sheet-trigger",
1620
+ ...props
1621
+ });
1622
+ }
1623
+ function SheetClose({ ...props }) {
1624
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, {
1625
+ "data-slot": "sheet-close",
1626
+ ...props
1627
+ });
1628
+ }
1629
+ function SheetPortal({ ...props }) {
1630
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, {
1631
+ "data-slot": "sheet-portal",
1632
+ ...props
1633
+ });
1634
+ }
1635
+ const SheetOverlay = React$1.forwardRef(({ className, ...props }, forwardedRef) => {
1636
+ return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
1637
+ "data-slot": "sheet-overlay",
1638
+ className: cn("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", className),
1639
+ ...props,
1640
+ ref: forwardedRef
1641
+ });
1642
+ });
1643
+ function SheetContent({ className, children, side = "right", container, position = "fixed", ...props }) {
1644
+ return /* @__PURE__ */ jsxs(SheetPortal, {
1645
+ container,
1646
+ children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
1647
+ "data-slot": "sheet-content",
1648
+ className: cn("bg-card data-[state=open]:animate-in data-[state=closed]:animate-out z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", position === "fixed" ? "fixed" : "absolute", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
1649
+ ...props,
1650
+ children: [children, /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
1651
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary 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",
1652
+ children: [/* @__PURE__ */ jsx(CloseOutline, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
1653
+ className: "sr-only",
1654
+ children: "Close"
1655
+ })]
1656
+ })]
1657
+ })]
1658
+ });
1659
+ }
1660
+ function SheetHeader({ className, ...props }) {
1661
+ return /* @__PURE__ */ jsx("div", {
1662
+ "data-slot": "sheet-header",
1663
+ className: cn("flex flex-col gap-1.5 p-4", className),
1664
+ ...props
1665
+ });
1666
+ }
1667
+ function SheetFooter({ className, ...props }) {
1668
+ return /* @__PURE__ */ jsx("div", {
1669
+ "data-slot": "sheet-footer",
1670
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
1671
+ ...props
1672
+ });
1673
+ }
1674
+ function SheetTitle({ className, ...props }) {
1675
+ return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
1676
+ "data-slot": "sheet-title",
1677
+ className: cn("text-foreground font-semibold", className),
1678
+ ...props
1679
+ });
1680
+ }
1681
+ function SheetDescription({ className, ...props }) {
1682
+ return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
1683
+ "data-slot": "sheet-description",
1684
+ className: cn("text-muted-foreground text-sm", className),
1685
+ ...props
1686
+ });
1687
+ }
1688
+
1689
+ //#endregion
1690
+ //#region src/components/skeleton.tsx
1691
+ function Skeleton({ className, ...props }) {
1692
+ return /* @__PURE__ */ jsx("div", {
1693
+ "data-slot": "skeleton",
1694
+ className: cn("bg-accent animate-pulse rounded-md", className),
1695
+ ...props
1696
+ });
1697
+ }
1698
+
1699
+ //#endregion
1700
+ //#region src/hooks/use-mobile.ts
1701
+ const MOBILE_BREAKPOINT = 768;
918
1702
  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
1703
+ const [isMobile, setIsMobile] = React$1.useState(void 0);
1704
+ React$1.useEffect(() => {
1705
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
1706
+ const onChange = () => {
1707
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1708
+ };
1709
+ mql.addEventListener("change", onChange);
1710
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1711
+ return () => mql.removeEventListener("change", onChange);
1712
+ }, []);
1713
+ return !!isMobile;
1714
+ }
1715
+
1716
+ //#endregion
1717
+ //#region src/components/sidebar.tsx
1718
+ const SIDEBAR_COOKIE_NAME = "sidebar_state";
1719
+ const SIDEBAR_COOKIE_MAX_AGE = 3600 * 24 * 7;
1720
+ const SIDEBAR_WIDTH = "16rem";
1721
+ const SIDEBAR_WIDTH_MOBILE = "18rem";
1722
+ const SIDEBAR_WIDTH_ICON = "3rem";
1723
+ const SIDEBAR_KEYBOARD_SHORTCUT = "b";
1724
+ const SidebarContext = React$1.createContext(null);
1725
+ function useSidebar() {
1726
+ const context = React$1.useContext(SidebarContext);
1727
+ if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
1728
+ return context;
1729
+ }
1730
+ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, disableMobile = true, className, style, children, ...props }) {
1731
+ const isMobileDevice = useIsMobile();
1732
+ const isMobile = disableMobile ? false : isMobileDevice;
1733
+ const [openMobile, setOpenMobile] = React$1.useState(false);
1734
+ const [_open, _setOpen] = React$1.useState(defaultOpen);
1735
+ const open = openProp ?? _open;
1736
+ const setOpen = React$1.useCallback((value) => {
1737
+ const openState = typeof value === "function" ? value(open) : value;
1738
+ if (setOpenProp) setOpenProp(openState);
1739
+ else _setOpen(openState);
1740
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
1741
+ }, [setOpenProp, open]);
1742
+ const toggleSidebar = React$1.useCallback(() => {
1743
+ return isMobile ? setOpenMobile((open$1) => !open$1) : setOpen((open$1) => !open$1);
1744
+ }, [
1745
+ isMobile,
1746
+ setOpen,
1747
+ setOpenMobile
1748
+ ]);
1749
+ React$1.useEffect(() => {
1750
+ const handleKeyDown = (event) => {
1751
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
1752
+ event.preventDefault();
1753
+ toggleSidebar();
1754
+ }
1755
+ };
1756
+ window.addEventListener("keydown", handleKeyDown);
1757
+ return () => window.removeEventListener("keydown", handleKeyDown);
1758
+ }, [toggleSidebar]);
1759
+ const state = open ? "expanded" : "collapsed";
1760
+ const contextValue = React$1.useMemo(() => ({
1761
+ state,
1762
+ open,
1763
+ setOpen,
1764
+ isMobile,
1765
+ openMobile,
1766
+ setOpenMobile,
1767
+ toggleSidebar
1768
+ }), [
1769
+ state,
1770
+ open,
1771
+ setOpen,
1772
+ isMobile,
1773
+ openMobile,
1774
+ setOpenMobile,
1775
+ toggleSidebar
1776
+ ]);
1777
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, {
1778
+ value: contextValue,
1779
+ children: /* @__PURE__ */ jsx(TooltipProvider, {
1780
+ delayDuration: 0,
1781
+ children: /* @__PURE__ */ jsx("div", {
1782
+ "data-slot": "sidebar-wrapper",
1783
+ style: {
1784
+ "--sidebar-width": SIDEBAR_WIDTH,
1785
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
1786
+ ...style
1787
+ },
1788
+ className: cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className),
1789
+ ...props,
1790
+ children
1791
+ })
1792
+ })
1793
+ });
1794
+ }
1795
+ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }) {
1796
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
1797
+ if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
1798
+ "data-slot": "sidebar",
1799
+ className: cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
1800
+ ...props,
1801
+ children
1802
+ });
1803
+ if (isMobile) return /* @__PURE__ */ jsx(Sheet, {
1804
+ open: openMobile,
1805
+ onOpenChange: setOpenMobile,
1806
+ ...props,
1807
+ children: /* @__PURE__ */ jsxs(SheetContent, {
1808
+ "data-sidebar": "sidebar",
1809
+ "data-slot": "sidebar",
1810
+ "data-mobile": "true",
1811
+ className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
1812
+ style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
1813
+ side,
1814
+ children: [/* @__PURE__ */ jsxs(SheetHeader, {
1815
+ className: "sr-only",
1816
+ children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
1817
+ }), /* @__PURE__ */ jsx("div", {
1818
+ className: "flex h-full w-full flex-col",
1819
+ children
1820
+ })]
1821
+ })
1822
+ });
1823
+ return /* @__PURE__ */ jsxs("div", {
1824
+ className: cn("group peer text-sidebar-foreground", isMobile ? "hidden md:block" : "block"),
1825
+ "data-state": state,
1826
+ "data-collapsible": state === "collapsed" ? collapsible : "",
1827
+ "data-variant": variant,
1828
+ "data-side": side,
1829
+ "data-slot": "sidebar",
1830
+ children: [/* @__PURE__ */ jsx("div", {
1831
+ "data-slot": "sidebar-gap",
1832
+ className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
1833
+ }), /* @__PURE__ */ jsx("div", {
1834
+ "data-slot": "sidebar-container",
1835
+ className: cn("fixed inset-y-0 z-10 w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear", side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className, isMobile ? "hidden md:flex" : "flex"),
1836
+ ...props,
1837
+ children: /* @__PURE__ */ jsx("div", {
1838
+ "data-sidebar": "sidebar",
1839
+ "data-slot": "sidebar-inner",
1840
+ className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
1841
+ children
1842
+ })
1843
+ })]
1844
+ });
1845
+ }
1846
+ function SidebarTrigger({ className, onClick, ...props }) {
1847
+ const { toggleSidebar } = useSidebar();
1848
+ return /* @__PURE__ */ jsxs(Button, {
1849
+ "data-sidebar": "trigger",
1850
+ "data-slot": "sidebar-trigger",
1851
+ variant: "outline",
1852
+ size: "icon-sm",
1853
+ className,
1854
+ onClick: (event) => {
1855
+ onClick?.(event);
1856
+ toggleSidebar();
1857
+ },
1858
+ ...props,
1859
+ children: [/* @__PURE__ */ jsx(PanelLeftIcon, {}), /* @__PURE__ */ jsx("span", {
1860
+ className: "sr-only",
1861
+ children: "Toggle Sidebar"
1862
+ })]
1863
+ });
1864
+ }
1865
+ function SidebarRail({ className, ...props }) {
1866
+ const { isMobile, toggleSidebar } = useSidebar();
1867
+ return /* @__PURE__ */ jsx("button", {
1868
+ "data-sidebar": "rail",
1869
+ "data-slot": "sidebar-rail",
1870
+ "aria-label": "Toggle Sidebar",
1871
+ tabIndex: -1,
1872
+ onClick: toggleSidebar,
1873
+ title: "Toggle Sidebar",
1874
+ className: cn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px]", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className, isMobile ? "hidden sm:flex" : "flex"),
1875
+ ...props
1876
+ });
1877
+ }
1878
+ function SidebarInset({ className, ...props }) {
1879
+ const { isMobile } = useSidebar();
1880
+ return /* @__PURE__ */ jsx("main", {
1881
+ "data-slot": "sidebar-inset",
1882
+ className: cn("bg-background relative flex w-full flex-1 flex-col min-w-0", isMobile && "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", !isMobile && "peer-data-[variant=inset]:m-2 peer-data-[variant=inset]:ml-0 peer-data-[variant=inset]:rounded-xl peer-data-[variant=inset]:shadow-sm peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
1883
+ ...props
1884
+ });
1885
+ }
1886
+ function SidebarInput({ className, ...props }) {
1887
+ return /* @__PURE__ */ jsx(Input, {
1888
+ "data-slot": "sidebar-input",
1889
+ "data-sidebar": "input",
1890
+ className: cn("bg-background h-8 w-full shadow-none", className),
1891
+ ...props
1892
+ });
1893
+ }
1894
+ function SidebarHeader({ className, ...props }) {
1895
+ return /* @__PURE__ */ jsx("div", {
1896
+ "data-slot": "sidebar-header",
1897
+ "data-sidebar": "header",
1898
+ className: cn("flex flex-col gap-2 p-2", className),
1899
+ ...props
1900
+ });
1901
+ }
1902
+ function SidebarFooter({ className, ...props }) {
1903
+ return /* @__PURE__ */ jsx("div", {
1904
+ "data-slot": "sidebar-footer",
1905
+ "data-sidebar": "footer",
1906
+ className: cn("flex flex-col gap-2 p-2", className),
1907
+ ...props
1908
+ });
1909
+ }
1910
+ function SidebarSeparator({ className, ...props }) {
1911
+ return /* @__PURE__ */ jsx(Separator, {
1912
+ "data-slot": "sidebar-separator",
1913
+ "data-sidebar": "separator",
1914
+ className: cn("bg-sidebar-border mx-2 w-auto", className),
1915
+ ...props
1916
+ });
1917
+ }
1918
+ function SidebarContent({ className, ...props }) {
1919
+ return /* @__PURE__ */ jsx("div", {
1920
+ "data-slot": "sidebar-content",
1921
+ "data-sidebar": "content",
1922
+ className: cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
1923
+ ...props
1924
+ });
1925
+ }
1926
+ function SidebarGroup({ className, ...props }) {
1927
+ return /* @__PURE__ */ jsx("div", {
1928
+ "data-slot": "sidebar-group",
1929
+ "data-sidebar": "group",
1930
+ className: cn("relative flex w-full min-w-0 flex-col p-2", className),
1931
+ ...props
1932
+ });
1933
+ }
1934
+ function SidebarGroupLabel({ className, asChild = false, ...props }) {
1935
+ return /* @__PURE__ */ jsx(asChild ? Slot$1 : "div", {
1936
+ "data-slot": "sidebar-group-label",
1937
+ "data-sidebar": "group-label",
1938
+ className: cn("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className),
1939
+ ...props
1940
+ });
1941
+ }
1942
+ function SidebarGroupAction({ className, asChild = false, ...props }) {
1943
+ const Comp = asChild ? Slot$1 : "button";
1944
+ const { isMobile } = useSidebar();
1945
+ return /* @__PURE__ */ jsx(Comp, {
1946
+ "data-slot": "sidebar-group-action",
1947
+ "data-sidebar": "group-action",
1948
+ className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2", isMobile && "md:after:hidden", "group-data-[collapsible=icon]:hidden", className),
1949
+ ...props
1950
+ });
1951
+ }
1952
+ function SidebarGroupContent({ className, ...props }) {
1953
+ return /* @__PURE__ */ jsx("div", {
1954
+ "data-slot": "sidebar-group-content",
1955
+ "data-sidebar": "group-content",
1956
+ className: cn("w-full text-sm", className),
1957
+ ...props
1958
+ });
1959
+ }
1960
+ function SidebarMenu({ className, ...props }) {
1961
+ return /* @__PURE__ */ jsx("ul", {
1962
+ "data-slot": "sidebar-menu",
1963
+ "data-sidebar": "menu",
1964
+ className: cn("flex w-full min-w-0 flex-col gap-1", className),
1965
+ ...props
1966
+ });
1967
+ }
1968
+ function SidebarMenuItem({ className, ...props }) {
1969
+ return /* @__PURE__ */ jsx("li", {
1970
+ "data-slot": "sidebar-menu-item",
1971
+ "data-sidebar": "menu-item",
1972
+ className: cn("group/menu-item relative", className),
1973
+ ...props
1974
+ });
1975
+ }
1976
+ const sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
1977
+ variants: {
1978
+ variant: {
1979
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
1980
+ outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
1981
+ },
1982
+ size: {
1983
+ default: "h-8 text-sm",
1984
+ sm: "h-7 text-xs",
1985
+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
1986
+ }
1987
+ },
1988
+ defaultVariants: {
1989
+ variant: "default",
1990
+ size: "default"
1991
+ }
1992
+ });
1993
+ const SidebarMenuButton = React$1.forwardRef(({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
1994
+ const Comp = asChild ? Slot$1 : "button";
1995
+ const { isMobile, state } = useSidebar();
1996
+ const button = /* @__PURE__ */ jsx(Comp, {
1997
+ ref,
1998
+ "data-slot": "sidebar-menu-button",
1999
+ "data-sidebar": "menu-button",
2000
+ "data-size": size,
2001
+ "data-active": isActive,
2002
+ className: cn(sidebarMenuButtonVariants({
2003
+ variant,
2004
+ size
2005
+ }), className),
2006
+ ...props
2007
+ });
2008
+ if (!tooltip) return button;
2009
+ let tooltipProps = tooltip;
2010
+ if (typeof tooltipProps === "string") tooltipProps = { children: tooltipProps };
2011
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
2012
+ asChild: true,
2013
+ children: button
2014
+ }), /* @__PURE__ */ jsx(TooltipContent, {
2015
+ side: "right",
2016
+ align: "center",
2017
+ hidden: state !== "collapsed" || isMobile,
2018
+ ...tooltipProps
2019
+ })] });
2020
+ });
2021
+ SidebarMenuButton.displayName = "SidebarMenuButton";
2022
+ const SidebarMenuAction = React$1.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
2023
+ const Comp = asChild ? Slot$1 : "button";
2024
+ const { isMobile } = useSidebar();
2025
+ return /* @__PURE__ */ jsx(Comp, {
2026
+ ref,
2027
+ "data-slot": "sidebar-menu-action",
2028
+ "data-sidebar": "menu-action",
2029
+ className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2", isMobile && "md:after:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", showOnHover && cn("peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100", isMobile ? "md:opacity-0" : "opacity-0"), className),
2030
+ ...props
2031
+ });
2032
+ });
2033
+ SidebarMenuAction.displayName = "SidebarMenuAction";
2034
+ function SidebarMenuBadge({ className, ...props }) {
2035
+ return /* @__PURE__ */ jsx("div", {
2036
+ "data-slot": "sidebar-menu-badge",
2037
+ "data-sidebar": "menu-badge",
2038
+ className: cn("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", className),
2039
+ ...props
2040
+ });
2041
+ }
2042
+ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
2043
+ const width = React$1.useMemo(() => {
2044
+ return `${Math.floor(Math.random() * 40) + 50}%`;
2045
+ }, []);
2046
+ return /* @__PURE__ */ jsxs("div", {
2047
+ "data-slot": "sidebar-menu-skeleton",
2048
+ "data-sidebar": "menu-skeleton",
2049
+ className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
2050
+ ...props,
2051
+ children: [showIcon && /* @__PURE__ */ jsx(Skeleton, {
2052
+ className: "size-4 rounded-md",
2053
+ "data-sidebar": "menu-skeleton-icon"
2054
+ }), /* @__PURE__ */ jsx(Skeleton, {
2055
+ className: "h-4 max-w-(--skeleton-width) flex-1",
2056
+ "data-sidebar": "menu-skeleton-text",
2057
+ style: { "--skeleton-width": width }
2058
+ })]
2059
+ });
2060
+ }
2061
+ function SidebarMenuSub({ className, ...props }) {
2062
+ return /* @__PURE__ */ jsx("ul", {
2063
+ "data-slot": "sidebar-menu-sub",
2064
+ "data-sidebar": "menu-sub",
2065
+ className: cn("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", className),
2066
+ ...props
2067
+ });
2068
+ }
2069
+ function SidebarMenuSubItem({ className, ...props }) {
2070
+ return /* @__PURE__ */ jsx("li", {
2071
+ "data-slot": "sidebar-menu-sub-item",
2072
+ "data-sidebar": "menu-sub-item",
2073
+ className: cn("group/menu-sub-item relative", className),
2074
+ ...props
2075
+ });
2076
+ }
2077
+ function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false, className, ...props }) {
2078
+ return /* @__PURE__ */ jsx(asChild ? Slot$1 : "a", {
2079
+ "data-slot": "sidebar-menu-sub-button",
2080
+ "data-sidebar": "menu-sub-button",
2081
+ "data-size": size,
2082
+ "data-active": isActive,
2083
+ className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", className),
2084
+ ...props
2085
+ });
2086
+ }
2087
+
2088
+ //#endregion
2089
+ //#region src/components/slider.tsx
2090
+ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
2091
+ const _values = React$1.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
2092
+ value,
2093
+ defaultValue,
2094
+ min,
2095
+ max
2096
+ ]);
2097
+ return /* @__PURE__ */ jsxs(SliderPrimitive.Root, {
2098
+ "data-slot": "slider",
2099
+ defaultValue,
2100
+ value,
2101
+ min,
2102
+ max,
2103
+ className: cn("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", className),
2104
+ ...props,
2105
+ children: [/* @__PURE__ */ jsx(SliderPrimitive.Track, {
2106
+ "data-slot": "slider-track",
2107
+ className: cn("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"),
2108
+ children: /* @__PURE__ */ jsx(SliderPrimitive.Range, {
2109
+ "data-slot": "slider-range",
2110
+ className: cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
2111
+ })
2112
+ }), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(SliderPrimitive.Thumb, {
2113
+ "data-slot": "slider-thumb",
2114
+ 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"
2115
+ }, index))]
2116
+ });
2117
+ }
2118
+
2119
+ //#endregion
2120
+ //#region src/components/sonner.tsx
2121
+ const Toaster = ({ ...props }) => {
2122
+ const { theme = "system" } = useTheme$1();
2123
+ return /* @__PURE__ */ jsx(Toaster$1, {
2124
+ theme,
2125
+ className: "toaster group",
2126
+ icons: {
2127
+ success: /* @__PURE__ */ jsx(CheckCircleOutline, { className: "size-4" }),
2128
+ info: /* @__PURE__ */ jsx(Info, { className: "size-4" }),
2129
+ warning: /* @__PURE__ */ jsx(TriangleAlertIcon, { className: "size-4" }),
2130
+ error: /* @__PURE__ */ jsx(OctagonXIcon, { className: "size-4" }),
2131
+ loading: /* @__PURE__ */ jsx(Loader2Icon, { className: "size-4 animate-spin" })
2132
+ },
2133
+ style: {
2134
+ "--normal-bg": "var(--popover)",
2135
+ "--normal-text": "var(--popover-foreground)",
2136
+ "--normal-border": "var(--border)"
2137
+ },
2138
+ ...props
2139
+ });
976
2140
  };
2141
+
2142
+ //#endregion
2143
+ //#region src/components/spinner.tsx
2144
+ const spinnerVariants = cva("animate-spin text-current", {
2145
+ variants: { size: {
2146
+ default: "size-4",
2147
+ sm: "size-3",
2148
+ lg: "size-5",
2149
+ xl: "size-6"
2150
+ } },
2151
+ defaultVariants: { size: "default" }
2152
+ });
2153
+ function Spinner({ className, size, ...props }) {
2154
+ return /* @__PURE__ */ jsxs("svg", {
2155
+ "data-slot": "spinner",
2156
+ xmlns: "http://www.w3.org/2000/svg",
2157
+ fill: "none",
2158
+ viewBox: "0 0 24 24",
2159
+ className: cn(spinnerVariants({ size }), className),
2160
+ ...props,
2161
+ children: [/* @__PURE__ */ jsx("circle", {
2162
+ className: "opacity-25",
2163
+ cx: "12",
2164
+ cy: "12",
2165
+ r: "10",
2166
+ stroke: "currentColor",
2167
+ strokeWidth: "4"
2168
+ }), /* @__PURE__ */ jsx("path", {
2169
+ className: "opacity-75",
2170
+ fill: "currentColor",
2171
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
2172
+ })]
2173
+ });
2174
+ }
2175
+
2176
+ //#endregion
2177
+ //#region src/components/switch.tsx
2178
+ function Switch({ className, ...props }) {
2179
+ return /* @__PURE__ */ jsx(SwitchPrimitive.Root, {
2180
+ "data-slot": "switch",
2181
+ className: cn("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", className),
2182
+ ...props,
2183
+ children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, {
2184
+ "data-slot": "switch-thumb",
2185
+ className: cn("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")
2186
+ })
2187
+ });
2188
+ }
2189
+
2190
+ //#endregion
2191
+ //#region src/components/tabs.tsx
2192
+ function Tabs({ className, ...props }) {
2193
+ return /* @__PURE__ */ jsx(TabsPrimitive.Root, {
2194
+ "data-slot": "tabs",
2195
+ className: cn("flex flex-col gap-2", className),
2196
+ ...props
2197
+ });
2198
+ }
2199
+ function TabsList({ className, ...props }) {
2200
+ return /* @__PURE__ */ jsx(TabsPrimitive.List, {
2201
+ "data-slot": "tabs-list",
2202
+ className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className),
2203
+ ...props
2204
+ });
2205
+ }
2206
+ function TabsTrigger({ className, ...props }) {
2207
+ return /* @__PURE__ */ jsx(TabsPrimitive.Trigger, {
2208
+ "data-slot": "tabs-trigger",
2209
+ className: cn("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 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-[0px_1px_2px_-1px_rgba(0,0,0,0.10)] data-[state=active]:shadow-[0px_1px_3px_0px_rgba(0,0,0,0.10)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2210
+ ...props
2211
+ });
2212
+ }
2213
+ function TabsContent({ className, ...props }) {
2214
+ return /* @__PURE__ */ jsx(TabsPrimitive.Content, {
2215
+ "data-slot": "tabs-content",
2216
+ className: cn("flex-1 outline-none", className),
2217
+ ...props
2218
+ });
2219
+ }
2220
+
2221
+ //#endregion
2222
+ //#region src/components/tab-bar.tsx
2223
+ function TabBar({ tabs, activeTab, onTabChange, renderTab, className }) {
2224
+ return /* @__PURE__ */ jsx(Tabs, {
2225
+ value: activeTab,
2226
+ onValueChange: onTabChange,
2227
+ className: `w-full ${className || ""}`,
2228
+ children: /* @__PURE__ */ jsx(TabsList, {
2229
+ className: "w-full h-auto flex border-t border-border bg-card p-0 rounded-none shadow-none",
2230
+ children: tabs.map((tab) => /* @__PURE__ */ jsx(TabsTrigger, {
2231
+ value: tab.value,
2232
+ className: ["flex flex-col items-center flex-1 py-2 px-0 transition-colors border-b-2 border-b-transparent rounded-none bg-transparent data-[state=active]:shadow-none dark:data-[state=active]:bg-transparent dark:data-[state=active]:border-none", activeTab === tab.value ? "text-foreground font-semibold border-b-primary" : "text-muted-foreground font-normal"].join(" "),
2233
+ children: renderTab ? renderTab(tab, activeTab === tab.value) : /* @__PURE__ */ jsxs(Fragment, { children: [tab.renderIcon?.(), /* @__PURE__ */ jsx("span", {
2234
+ className: "text-xs",
2235
+ children: tab.label
2236
+ })] })
2237
+ }, tab.value))
2238
+ })
2239
+ });
2240
+ }
2241
+
2242
+ //#endregion
2243
+ //#region src/components/toggle.tsx
2244
+ const toggleVariants = cva("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", {
2245
+ variants: {
2246
+ variant: {
2247
+ default: "bg-transparent",
2248
+ outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
2249
+ },
2250
+ size: {
2251
+ default: "h-9 px-2 min-w-9",
2252
+ sm: "h-8 px-1.5 min-w-8",
2253
+ lg: "h-10 px-2.5 min-w-10"
2254
+ }
2255
+ },
2256
+ defaultVariants: {
2257
+ variant: "default",
2258
+ size: "default"
2259
+ }
2260
+ });
2261
+ const Toggle = React$1.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(TogglePrimitive.Root, {
2262
+ ref,
2263
+ "data-slot": "toggle",
2264
+ className: cn(toggleVariants({
2265
+ variant,
2266
+ size,
2267
+ className
2268
+ })),
2269
+ ...props
2270
+ }));
2271
+ Toggle.displayName = "Toggle";
2272
+
2273
+ //#endregion
2274
+ //#region src/components/toggle-group.tsx
2275
+ const ToggleGroupContext = React$1.createContext({
2276
+ size: "default",
2277
+ variant: "default"
2278
+ });
2279
+ function ToggleGroup({ className, variant, size, children, ...props }) {
2280
+ return /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, {
2281
+ "data-slot": "toggle-group",
2282
+ "data-variant": variant,
2283
+ "data-size": size,
2284
+ className: cn("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs", className),
2285
+ ...props,
2286
+ children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
2287
+ value: {
2288
+ variant,
2289
+ size
2290
+ },
2291
+ children
2292
+ })
2293
+ });
2294
+ }
2295
+ function ToggleGroupItem({ className, children, variant, size, ...props }) {
2296
+ const context = React$1.useContext(ToggleGroupContext);
2297
+ return /* @__PURE__ */ jsx(ToggleGroupPrimitive.Item, {
2298
+ "data-slot": "toggle-group-item",
2299
+ "data-variant": context.variant || variant,
2300
+ "data-size": context.size || size,
2301
+ className: cn(toggleVariants({
2302
+ variant: context.variant || variant,
2303
+ size: context.size || size
2304
+ }), "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l", className),
2305
+ ...props,
2306
+ children
2307
+ });
2308
+ }
2309
+
2310
+ //#endregion
2311
+ export { Alert, AlertAction, AlertDescription, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CountryFlag, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmojiPicker, EmojiPickerCategories, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Slot, Spinner, Switch, TabBar, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonGroupVariants, buttonVariants, cn, spinnerVariants, toast, toggleVariants, useSidebar, useTheme };