@aircall/ds 0.2.2 → 0.2.3

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