@adsgency_npm/adsgency-ads-ui 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,4080 @@
1
+ 'use client';
2
+ "use client";
3
+ import {
4
+ designTokens
5
+ } from "./chunk-YJFQM6IB.js";
6
+
7
+ // src/components/AdsAccordion/index.tsx
8
+ import * as React3 from "react";
9
+
10
+ // src/i18n/AdsI18nProvider.tsx
11
+ import * as React from "react";
12
+
13
+ // src/i18n/defaultMessages.ts
14
+ var adsDefaultMessages = {
15
+ en: {
16
+ accordion: {
17
+ expand: "Expand section",
18
+ collapse: "Collapse section"
19
+ },
20
+ button: {
21
+ loading: "Loading"
22
+ },
23
+ dialog: {
24
+ close: "Close dialog"
25
+ },
26
+ input: {
27
+ chooseFile: "Choose File",
28
+ noFileChosen: "No file chosen",
29
+ optional: "Optional"
30
+ },
31
+ toast: {
32
+ notifications: "Notifications"
33
+ },
34
+ pagination: {
35
+ previous: "Previous",
36
+ next: "Next",
37
+ morePages: "More pages"
38
+ }
39
+ },
40
+ zh: {
41
+ accordion: {
42
+ expand: "\u5C55\u5F00\u5185\u5BB9",
43
+ collapse: "\u6536\u8D77\u5185\u5BB9"
44
+ },
45
+ button: {
46
+ loading: "\u52A0\u8F7D\u4E2D"
47
+ },
48
+ dialog: {
49
+ close: "\u5173\u95ED\u5F39\u7A97"
50
+ },
51
+ input: {
52
+ chooseFile: "\u9009\u62E9\u6587\u4EF6",
53
+ noFileChosen: "\u672A\u9009\u62E9\u6587\u4EF6",
54
+ optional: "\u53EF\u9009"
55
+ },
56
+ toast: {
57
+ notifications: "\u901A\u77E5"
58
+ },
59
+ pagination: {
60
+ previous: "\u4E0A\u4E00\u9875",
61
+ next: "\u4E0B\u4E00\u9875",
62
+ morePages: "\u66F4\u591A\u9875\u7801"
63
+ }
64
+ }
65
+ };
66
+
67
+ // src/i18n/AdsI18nProvider.tsx
68
+ import { jsx } from "react/jsx-runtime";
69
+ var AdsI18nContext = React.createContext({
70
+ locale: "en",
71
+ messages: adsDefaultMessages.en
72
+ });
73
+ function mergeMessages(locale, messages) {
74
+ const baseMessages = adsDefaultMessages[locale];
75
+ return {
76
+ accordion: {
77
+ ...baseMessages.accordion,
78
+ ...messages?.accordion
79
+ },
80
+ button: {
81
+ ...baseMessages.button,
82
+ ...messages?.button
83
+ },
84
+ dialog: {
85
+ ...baseMessages.dialog,
86
+ ...messages?.dialog
87
+ },
88
+ input: {
89
+ ...baseMessages.input,
90
+ ...messages?.input
91
+ },
92
+ toast: {
93
+ ...baseMessages.toast,
94
+ ...messages?.toast
95
+ },
96
+ pagination: {
97
+ ...baseMessages.pagination,
98
+ ...messages?.pagination
99
+ }
100
+ };
101
+ }
102
+ function AdsI18nProvider({
103
+ children,
104
+ locale = "en",
105
+ messages
106
+ }) {
107
+ const value = React.useMemo(
108
+ () => ({
109
+ locale,
110
+ messages: mergeMessages(locale, messages)
111
+ }),
112
+ [locale, messages]
113
+ );
114
+ return /* @__PURE__ */ jsx(AdsI18nContext.Provider, { value, children });
115
+ }
116
+ function useAdsI18n() {
117
+ return React.useContext(AdsI18nContext);
118
+ }
119
+
120
+ // src/lib/cn.ts
121
+ import { clsx } from "clsx";
122
+ import { twMerge } from "tailwind-merge";
123
+ function cn(...inputs) {
124
+ return twMerge(clsx(inputs));
125
+ }
126
+
127
+ // src/primitives/accordion.tsx
128
+ import * as React2 from "react";
129
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
130
+ import { ChevronDown } from "lucide-react";
131
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
132
+ var Accordion = AccordionPrimitive.Root;
133
+ var AccordionItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
134
+ AccordionPrimitive.Item,
135
+ {
136
+ ref,
137
+ className: cn("border-b", className),
138
+ ...props
139
+ }
140
+ ));
141
+ AccordionItem.displayName = "AccordionItem";
142
+ var AccordionTrigger = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx2(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
143
+ AccordionPrimitive.Trigger,
144
+ {
145
+ ref,
146
+ className: cn(
147
+ "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
148
+ className
149
+ ),
150
+ ...props,
151
+ children: [
152
+ children,
153
+ /* @__PURE__ */ jsx2(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
154
+ ]
155
+ }
156
+ ) }));
157
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
158
+ var AccordionContent = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx2(
159
+ AccordionPrimitive.Content,
160
+ {
161
+ ref,
162
+ className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
163
+ ...props,
164
+ children: /* @__PURE__ */ jsx2("div", { className: cn("pb-4 pt-0", className), children })
165
+ }
166
+ ));
167
+ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
168
+
169
+ // src/components/AdsAccordion/index.tsx
170
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
171
+ function toValueSet(value) {
172
+ if (!value || value === "") {
173
+ return /* @__PURE__ */ new Set();
174
+ }
175
+ return new Set(Array.isArray(value) ? value : [value]);
176
+ }
177
+ function toExternalValue(value, mode) {
178
+ if (mode === "single") {
179
+ return Array.from(value)[0] ?? "";
180
+ }
181
+ return Array.from(value);
182
+ }
183
+ function toPrimitiveValue(value, mode) {
184
+ if (mode === "single") {
185
+ return Array.isArray(value) ? value[0] ?? "" : value ?? "";
186
+ }
187
+ if (!value) {
188
+ return [];
189
+ }
190
+ return Array.isArray(value) ? value : [value];
191
+ }
192
+ var AdsAccordion = React3.forwardRef(
193
+ ({
194
+ className,
195
+ defaultValue,
196
+ getToggleLabel,
197
+ items,
198
+ mode = "single",
199
+ onValueChange,
200
+ value,
201
+ ...props
202
+ }, ref) => {
203
+ const { messages } = useAdsI18n();
204
+ const isControlled = value !== void 0;
205
+ const [internalValue, setInternalValue] = React3.useState(
206
+ () => mode === "single" ? toPrimitiveValue(defaultValue, "single") : toPrimitiveValue(defaultValue, "multiple")
207
+ );
208
+ const resolvedValue = isControlled ? toPrimitiveValue(value, mode) : internalValue;
209
+ const openValues = toValueSet(
210
+ Array.isArray(resolvedValue) ? resolvedValue : resolvedValue || void 0
211
+ );
212
+ const handleValueChange = (nextValue) => {
213
+ if (!isControlled) {
214
+ setInternalValue(nextValue);
215
+ }
216
+ onValueChange?.(toExternalValue(toValueSet(nextValue), mode));
217
+ };
218
+ const content = items.map((item, index) => {
219
+ const isOpen = openValues.has(item.value);
220
+ const isLastItem = index === items.length - 1;
221
+ const toggleLabel = getToggleLabel?.(item, isOpen) ?? (isOpen ? messages.accordion.collapse : messages.accordion.expand);
222
+ return /* @__PURE__ */ jsxs2(
223
+ AccordionItem,
224
+ {
225
+ className: cn("w-full border-border", (!isLastItem || isOpen) && "border-b"),
226
+ disabled: item.disabled,
227
+ value: item.value,
228
+ children: [
229
+ /* @__PURE__ */ jsxs2(
230
+ AccordionTrigger,
231
+ {
232
+ className: cn(
233
+ "group flex h-[52px] w-full items-center py-lg text-left text-sm font-medium leading-5 text-foreground transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background hover:no-underline [&>svg]:ml-md [&>svg]:text-foreground",
234
+ item.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer hover:text-foreground"
235
+ ),
236
+ children: [
237
+ /* @__PURE__ */ jsx3("span", { className: "min-w-0 flex-1 pr-md", children: /* @__PURE__ */ jsx3("span", { className: "break-words group-hover:underline", children: item.title }) }),
238
+ /* @__PURE__ */ jsx3("span", { className: "sr-only", children: toggleLabel })
239
+ ]
240
+ }
241
+ ),
242
+ /* @__PURE__ */ jsx3(AccordionContent, { className: "grid overflow-hidden transition-[grid-template-rows,opacity] duration-200 ease-out data-[state=closed]:grid-rows-[0fr] data-[state=closed]:opacity-0 data-[state=open]:grid-rows-[1fr] data-[state=open]:opacity-100", children: /* @__PURE__ */ jsx3("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsx3("div", { className: "flex w-full flex-col gap-lg pb-lg text-sm font-normal leading-5 text-foreground", children: item.content }) }) })
243
+ ]
244
+ },
245
+ item.value
246
+ );
247
+ });
248
+ if (mode === "single") {
249
+ return /* @__PURE__ */ jsx3(
250
+ Accordion,
251
+ {
252
+ className: cn("flex w-full max-w-[503px] flex-col", className),
253
+ collapsible: true,
254
+ onValueChange: handleValueChange,
255
+ ref,
256
+ type: "single",
257
+ value: typeof resolvedValue === "string" ? resolvedValue : "",
258
+ ...props,
259
+ children: content
260
+ }
261
+ );
262
+ }
263
+ return /* @__PURE__ */ jsx3(
264
+ Accordion,
265
+ {
266
+ className: cn("flex w-full max-w-[503px] flex-col", className),
267
+ onValueChange: handleValueChange,
268
+ ref,
269
+ type: "multiple",
270
+ value: Array.isArray(resolvedValue) ? resolvedValue : [],
271
+ ...props,
272
+ children: content
273
+ }
274
+ );
275
+ }
276
+ );
277
+ AdsAccordion.displayName = "AdsAccordion";
278
+
279
+ // src/components/AdsAlert/index.tsx
280
+ import * as React5 from "react";
281
+ import { cva as cva2 } from "class-variance-authority";
282
+ import { CircleAlert, CircleCheck, Info, TriangleAlert } from "lucide-react";
283
+
284
+ // src/primitives/alert.tsx
285
+ import * as React4 from "react";
286
+ import { cva } from "class-variance-authority";
287
+ import { jsx as jsx4 } from "react/jsx-runtime";
288
+ var alertVariants = cva(
289
+ "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
290
+ {
291
+ variants: {
292
+ variant: {
293
+ default: "bg-background text-foreground",
294
+ destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
295
+ }
296
+ },
297
+ defaultVariants: {
298
+ variant: "default"
299
+ }
300
+ }
301
+ );
302
+ var Alert = React4.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx4(
303
+ "div",
304
+ {
305
+ ref,
306
+ role: "alert",
307
+ className: cn(alertVariants({ variant }), className),
308
+ ...props
309
+ }
310
+ ));
311
+ Alert.displayName = "Alert";
312
+ var AlertTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
313
+ "h5",
314
+ {
315
+ ref,
316
+ className: cn("mb-1 font-medium leading-none tracking-tight", className),
317
+ ...props
318
+ }
319
+ ));
320
+ AlertTitle.displayName = "AlertTitle";
321
+ var AlertDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
322
+ "div",
323
+ {
324
+ ref,
325
+ className: cn("text-sm [&_p]:leading-relaxed", className),
326
+ ...props
327
+ }
328
+ ));
329
+ AlertDescription.displayName = "AlertDescription";
330
+
331
+ // src/components/AdsAlert/index.tsx
332
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
333
+ var adsAlertVariants = cva2(
334
+ "relative flex w-full rounded-radius-lg border border-border bg-card px-4 py-3 [&>[data-slot=alert-icon]]:!text-[inherit]",
335
+ {
336
+ variants: {
337
+ variant: {
338
+ default: "text-foreground",
339
+ destructive: "text-destructive",
340
+ success: "text-success",
341
+ warning: "text-warning",
342
+ info: "text-info"
343
+ },
344
+ hasSupportingContent: {
345
+ true: "items-start gap-3",
346
+ false: "items-center gap-3"
347
+ }
348
+ },
349
+ defaultVariants: {
350
+ variant: "default",
351
+ hasSupportingContent: true
352
+ }
353
+ }
354
+ );
355
+ var descriptionVariants = cva2(
356
+ "min-w-0 text-sm leading-5 text-current [&_p]:leading-5",
357
+ {
358
+ variants: {
359
+ variant: {
360
+ default: "font-light",
361
+ destructive: "font-normal",
362
+ success: "font-normal",
363
+ warning: "font-normal",
364
+ info: "font-normal"
365
+ }
366
+ },
367
+ defaultVariants: {
368
+ variant: "default"
369
+ }
370
+ }
371
+ );
372
+ var defaultVariantIcons = {
373
+ default: CircleCheck,
374
+ destructive: CircleAlert,
375
+ success: CircleCheck,
376
+ warning: TriangleAlert,
377
+ info: Info
378
+ };
379
+ function isComponentElement(child, component) {
380
+ return React5.isValidElement(child) && child.type === component;
381
+ }
382
+ function cloneWithClassName(child, className, dataSlot, extraProps) {
383
+ const element = child;
384
+ return React5.cloneElement(element, {
385
+ className: cn(className, element.props.className),
386
+ "data-slot": dataSlot,
387
+ style: {
388
+ ...element.props.style,
389
+ ...extraProps?.style
390
+ }
391
+ });
392
+ }
393
+ var Alert2 = React5.forwardRef(
394
+ ({ children, className, variant, ...props }, ref) => {
395
+ const items = React5.Children.toArray(children);
396
+ let title = null;
397
+ let description = null;
398
+ let icon = null;
399
+ const extras = [];
400
+ let hasSeenBodyContent = false;
401
+ for (const child of items) {
402
+ if (!title && isComponentElement(child, AlertTitle2)) {
403
+ title = child;
404
+ hasSeenBodyContent = true;
405
+ continue;
406
+ }
407
+ if (!description && isComponentElement(child, AlertDescription2)) {
408
+ description = child;
409
+ hasSeenBodyContent = true;
410
+ continue;
411
+ }
412
+ if (!icon && !hasSeenBodyContent && React5.isValidElement(child)) {
413
+ icon = child;
414
+ continue;
415
+ }
416
+ extras.push(child);
417
+ }
418
+ const hasSupportingContent = Boolean(description || extras.length > 0);
419
+ const resolvedIcon = cloneWithClassName(
420
+ icon ?? React5.createElement(defaultVariantIcons[variant ?? "default"], {
421
+ "aria-hidden": true
422
+ }),
423
+ "size-4 shrink-0",
424
+ "alert-icon",
425
+ {
426
+ style: { color: "inherit" }
427
+ }
428
+ );
429
+ const resolvedTitle = title ? cloneWithClassName(
430
+ title,
431
+ "min-w-0 text-sm font-medium leading-5 tracking-normal text-current",
432
+ "alert-title"
433
+ ) : null;
434
+ const supportingContent = description || extras.length > 0 ? /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 w-full flex-col gap-1", "data-slot": "alert-supporting", children: [
435
+ description ? cloneWithClassName(
436
+ description,
437
+ descriptionVariants({ variant }),
438
+ "alert-description"
439
+ ) : null,
440
+ extras.length > 0 ? /* @__PURE__ */ jsx5(
441
+ "div",
442
+ {
443
+ className: cn(
444
+ "min-w-0 text-sm leading-5 text-current",
445
+ "w-full",
446
+ "[&_ol]:list-decimal [&_ol]:pl-[21px] [&_ol]:space-y-0",
447
+ "[&_ul]:list-disc [&_ul]:pl-[21px] [&_ul]:space-y-0"
448
+ ),
449
+ "data-slot": "alert-extra",
450
+ children: extras
451
+ }
452
+ ) : null
453
+ ] }) : null;
454
+ return /* @__PURE__ */ jsx5(
455
+ Alert,
456
+ {
457
+ ref,
458
+ className: cn(
459
+ adsAlertVariants({ variant, hasSupportingContent }),
460
+ className
461
+ ),
462
+ role: "alert",
463
+ ...props,
464
+ children: hasSupportingContent ? /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", "data-slot": "alert-body", children: [
465
+ /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 items-center gap-3", "data-slot": "alert-heading-row", children: [
466
+ resolvedIcon,
467
+ resolvedTitle
468
+ ] }),
469
+ supportingContent ? /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 gap-3", "data-slot": "alert-content-row", children: [
470
+ /* @__PURE__ */ jsx5("div", { "aria-hidden": true, className: "size-4 shrink-0" }),
471
+ supportingContent
472
+ ] }) : null
473
+ ] }) : /* @__PURE__ */ jsx5("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", "data-slot": "alert-body", children: /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 items-center gap-3", "data-slot": "alert-heading-row", children: [
474
+ resolvedIcon,
475
+ resolvedTitle ?? children
476
+ ] }) })
477
+ }
478
+ );
479
+ }
480
+ );
481
+ Alert2.displayName = "AdsAlert";
482
+ var AlertTitle2 = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(AlertTitle, { ref, className: cn(className), ...props }));
483
+ AlertTitle2.displayName = "AlertTitle";
484
+ var AlertDescription2 = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(AlertDescription, { ref, className: cn(className), ...props }));
485
+ AlertDescription2.displayName = "AlertDescription";
486
+
487
+ // src/components/AdsBadge/index.tsx
488
+ import * as React6 from "react";
489
+ import { cva as cva4 } from "class-variance-authority";
490
+
491
+ // src/primitives/badge.tsx
492
+ import { cva as cva3 } from "class-variance-authority";
493
+ import { jsx as jsx6 } from "react/jsx-runtime";
494
+ var badgeVariants = cva3(
495
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
496
+ {
497
+ variants: {
498
+ variant: {
499
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
500
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
501
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
502
+ outline: "text-foreground"
503
+ }
504
+ },
505
+ defaultVariants: {
506
+ variant: "default"
507
+ }
508
+ }
509
+ );
510
+ function Badge({ className, variant, ...props }) {
511
+ return /* @__PURE__ */ jsx6("div", { className: cn(badgeVariants({ variant }), className), ...props });
512
+ }
513
+
514
+ // src/components/AdsBadge/index.tsx
515
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
516
+ var adsBadgeVariants = cva4(
517
+ [
518
+ "h-5 min-h-5",
519
+ "border text-xs font-medium leading-4 tracking-normal",
520
+ "shadow-none",
521
+ "focus:ring-offset-background"
522
+ ],
523
+ {
524
+ variants: {
525
+ variant: {
526
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary",
527
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary",
528
+ destructive: "border-transparent bg-destructive text-primary-foreground hover:bg-destructive",
529
+ outline: "border-border bg-transparent text-foreground hover:bg-transparent"
530
+ },
531
+ format: {
532
+ label: "!rounded-radius-lg px-[10px] py-[2px]",
533
+ icon: "!rounded-radius-lg gap-1 px-[10px] py-[2px]",
534
+ number: "!rounded-full px-[10px] py-[2px]"
535
+ }
536
+ },
537
+ compoundVariants: [
538
+ {
539
+ format: "number",
540
+ variant: "outline",
541
+ className: "px-1 font-mono"
542
+ }
543
+ ],
544
+ defaultVariants: {
545
+ format: "label",
546
+ variant: "default"
547
+ }
548
+ }
549
+ );
550
+ function renderIcon(icon) {
551
+ if (!icon) {
552
+ return null;
553
+ }
554
+ if (React6.isValidElement(icon)) {
555
+ return React6.cloneElement(icon, {
556
+ className: cn("h-3 w-3 shrink-0", icon.props.className)
557
+ });
558
+ }
559
+ return /* @__PURE__ */ jsx7("span", { className: "inline-flex h-3 w-3 shrink-0 items-center justify-center", children: icon });
560
+ }
561
+ function AdsBadge({ children, className, format, icon, variant, ...props }) {
562
+ const resolvedFormat = format ?? (icon ? "icon" : "label");
563
+ return /* @__PURE__ */ jsxs4(
564
+ Badge,
565
+ {
566
+ className: cn(adsBadgeVariants({ format: resolvedFormat, variant }), className),
567
+ variant,
568
+ ...props,
569
+ children: [
570
+ renderIcon(icon),
571
+ children
572
+ ]
573
+ }
574
+ );
575
+ }
576
+
577
+ // src/components/AdsAlertDialog/index.tsx
578
+ import * as React7 from "react";
579
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
580
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
581
+ var overlayClassName = "fixed inset-0 z-50 bg-black/80 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0";
582
+ var contentClassName = "fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-[512px] -translate-x-1/2 -translate-y-1/2 gap-lg rounded-radius-lg border border-border bg-card p-xl text-foreground shadow-[0px_4px_6px_-4px_rgba(0,0,0,0.1),0px_10px_15px_-3px_rgba(0,0,0,0.1)] duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]";
583
+ var actionClassName = "inline-flex h-9 items-center justify-center rounded-radius-md border-0 bg-brand-gradient px-lg py-sm text-sm font-medium leading-5 tracking-normal text-primary-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card disabled:pointer-events-none disabled:opacity-[0.65]";
584
+ var cancelClassName = "inline-flex h-9 items-center justify-center rounded-radius-md border border-border bg-card px-lg py-sm text-sm font-medium leading-5 tracking-normal text-secondary-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card disabled:pointer-events-none disabled:opacity-[0.65]";
585
+ var AlertDialog = AlertDialogPrimitive.Root;
586
+ var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
587
+ var AlertDialogPortal = AlertDialogPrimitive.Portal;
588
+ var AlertDialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
589
+ AlertDialogPrimitive.Overlay,
590
+ {
591
+ className: cn(overlayClassName, className),
592
+ ref,
593
+ ...props
594
+ }
595
+ ));
596
+ AlertDialogOverlay.displayName = "AlertDialogOverlay";
597
+ var AlertDialogContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs5(AlertDialogPortal, { children: [
598
+ /* @__PURE__ */ jsx8(AlertDialogOverlay, {}),
599
+ /* @__PURE__ */ jsx8(
600
+ AlertDialogPrimitive.Content,
601
+ {
602
+ className: cn(contentClassName, className),
603
+ ref,
604
+ ...props
605
+ }
606
+ )
607
+ ] }));
608
+ AlertDialogContent.displayName = "AlertDialogContent";
609
+ var AlertDialogHeader = React7.forwardRef(
610
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
611
+ "div",
612
+ {
613
+ className: cn("flex flex-col gap-sm text-left", className),
614
+ ref,
615
+ ...props
616
+ }
617
+ )
618
+ );
619
+ AlertDialogHeader.displayName = "AlertDialogHeader";
620
+ var AlertDialogFooter = React7.forwardRef(
621
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
622
+ "div",
623
+ {
624
+ className: cn(
625
+ "flex flex-col-reverse gap-sm sm:flex-row sm:justify-end",
626
+ className
627
+ ),
628
+ ref,
629
+ ...props
630
+ }
631
+ )
632
+ );
633
+ AlertDialogFooter.displayName = "AlertDialogFooter";
634
+ var AlertDialogTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
635
+ AlertDialogPrimitive.Title,
636
+ {
637
+ className: cn("text-lg font-semibold leading-7 text-foreground", className),
638
+ ref,
639
+ ...props
640
+ }
641
+ ));
642
+ AlertDialogTitle.displayName = "AlertDialogTitle";
643
+ var AlertDialogDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
644
+ AlertDialogPrimitive.Description,
645
+ {
646
+ className: cn("text-sm font-normal leading-5 text-muted-foreground", className),
647
+ ref,
648
+ ...props
649
+ }
650
+ ));
651
+ AlertDialogDescription.displayName = "AlertDialogDescription";
652
+ var AlertDialogAction = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
653
+ AlertDialogPrimitive.Action,
654
+ {
655
+ className: cn(actionClassName, className),
656
+ ref,
657
+ ...props
658
+ }
659
+ ));
660
+ AlertDialogAction.displayName = "AlertDialogAction";
661
+ var AlertDialogCancel = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
662
+ AlertDialogPrimitive.Cancel,
663
+ {
664
+ className: cn(cancelClassName, className),
665
+ ref,
666
+ ...props
667
+ }
668
+ ));
669
+ AlertDialogCancel.displayName = "AlertDialogCancel";
670
+ var AdsAlertDialog = AlertDialog;
671
+ var AdsAlertDialogTrigger = AlertDialogTrigger;
672
+ var AdsAlertDialogPortal = AlertDialogPortal;
673
+ var AdsAlertDialogOverlay = AlertDialogOverlay;
674
+ var AdsAlertDialogContent = AlertDialogContent;
675
+ var AdsAlertDialogHeader = AlertDialogHeader;
676
+ var AdsAlertDialogFooter = AlertDialogFooter;
677
+ var AdsAlertDialogTitle = AlertDialogTitle;
678
+ var AdsAlertDialogDescription = AlertDialogDescription;
679
+ var AdsAlertDialogAction = AlertDialogAction;
680
+ var AdsAlertDialogCancel = AlertDialogCancel;
681
+
682
+ // src/components/AdsButton/index.tsx
683
+ import * as React9 from "react";
684
+
685
+ // src/primitives/button.tsx
686
+ import * as React8 from "react";
687
+ import { Slot } from "@radix-ui/react-slot";
688
+ import { cva as cva5 } from "class-variance-authority";
689
+ import { jsx as jsx9 } from "react/jsx-runtime";
690
+ var buttonVariants = cva5(
691
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
692
+ {
693
+ variants: {
694
+ variant: {
695
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
696
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
697
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
698
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
699
+ ghost: "hover:bg-accent hover:text-accent-foreground",
700
+ link: "text-primary underline-offset-4 hover:underline"
701
+ },
702
+ size: {
703
+ default: "h-10 px-4 py-2",
704
+ sm: "h-9 rounded-md px-3",
705
+ lg: "h-11 rounded-md px-8",
706
+ icon: "h-10 w-10"
707
+ }
708
+ },
709
+ defaultVariants: {
710
+ variant: "default",
711
+ size: "default"
712
+ }
713
+ }
714
+ );
715
+ var Button = React8.forwardRef(
716
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
717
+ const Comp = asChild ? Slot : "button";
718
+ return /* @__PURE__ */ jsx9(
719
+ Comp,
720
+ {
721
+ className: cn(buttonVariants({ variant, size, className })),
722
+ ref,
723
+ ...props
724
+ }
725
+ );
726
+ }
727
+ );
728
+ Button.displayName = "Button";
729
+
730
+ // src/components/AdsButton/index.tsx
731
+ import { Fragment, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
732
+ var intentClassName = {
733
+ brand: "border-0 bg-brand-gradient text-primary-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] hover:opacity-90",
734
+ primary: "border-0 bg-primary text-primary-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] hover:bg-brand-primary-hover",
735
+ secondary: "border border-border bg-card text-secondary-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] hover:bg-accent",
736
+ tertiary: "border-0 bg-card text-foreground shadow-none hover:bg-accent hover:shadow-[0px_1px_2px_rgba(0,0,0,0.1)]",
737
+ ghost: "border-0 bg-card text-foreground shadow-none hover:bg-accent hover:shadow-[0px_1px_2px_rgba(0,0,0,0.1)]",
738
+ danger: "border-0 bg-destructive text-primary-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] hover:bg-destructive/90",
739
+ destructive: "border-0 bg-destructive text-primary-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] hover:bg-destructive/90",
740
+ link: "border-0 bg-transparent text-primary shadow-none underline-offset-2 hover:bg-transparent hover:text-primary hover:underline"
741
+ };
742
+ var sizeClassName = {
743
+ sm: "!h-8 px-md py-sm",
744
+ md: "!h-9 px-lg py-sm",
745
+ lg: "!h-10 px-xl py-[10px]"
746
+ };
747
+ var focusClassName = {
748
+ brand: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
749
+ primary: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
750
+ secondary: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
751
+ tertiary: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
752
+ ghost: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
753
+ danger: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
754
+ destructive: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
755
+ link: "focus-visible:border focus-visible:border-ring focus-visible:ring-0 focus-visible:ring-offset-0"
756
+ };
757
+ function renderLeadingIcon(icon) {
758
+ if (!icon) {
759
+ return null;
760
+ }
761
+ if (React9.isValidElement(icon)) {
762
+ const sizedIcon = React9.cloneElement(icon, {
763
+ className: cn("!h-4 !w-4 h-4 w-4", icon.props.className)
764
+ });
765
+ return /* @__PURE__ */ jsx10("span", { className: "inline-flex h-4 w-4 items-center justify-center [&>svg]:!h-4 [&>svg]:!w-4", children: sizedIcon });
766
+ }
767
+ return /* @__PURE__ */ jsx10("span", { className: "inline-flex h-4 w-4 items-center justify-center", children: icon });
768
+ }
769
+ function AdsButtonLoadingIcon() {
770
+ return /* @__PURE__ */ jsx10(
771
+ "svg",
772
+ {
773
+ "aria-hidden": true,
774
+ className: "!h-4 !w-4 h-4 w-4 animate-spin",
775
+ "data-testid": "ads-button-loading-icon",
776
+ fill: "none",
777
+ viewBox: "0 0 20 20",
778
+ xmlns: "http://www.w3.org/2000/svg",
779
+ children: /* @__PURE__ */ jsxs6(
780
+ "g",
781
+ {
782
+ stroke: "currentColor",
783
+ strokeLinecap: "round",
784
+ strokeWidth: "1.6",
785
+ transform: "translate(1.675 1.675)",
786
+ children: [
787
+ /* @__PURE__ */ jsx10("path", { d: "M8.1667 0.6667V3.1667" }),
788
+ /* @__PURE__ */ jsx10("path", { d: "M8.1667 13.1667V15.6667" }),
789
+ /* @__PURE__ */ jsx10("path", { d: "M15.6667 8.1667H13.1667" }),
790
+ /* @__PURE__ */ jsx10("path", { d: "M3.1667 8.1667H0.6667" }),
791
+ /* @__PURE__ */ jsx10("path", { d: "M13.4696 2.8631L11.7018 4.6309" }),
792
+ /* @__PURE__ */ jsx10("path", { d: "M4.6317 11.7018L2.8639 13.4696" }),
793
+ /* @__PURE__ */ jsx10("path", { d: "M13.4696 13.4696L11.7018 11.7018" }),
794
+ /* @__PURE__ */ jsx10("path", { d: "M4.6317 4.6309L2.8639 2.8631" })
795
+ ]
796
+ }
797
+ )
798
+ }
799
+ );
800
+ }
801
+ var AdsButton = React9.forwardRef(
802
+ ({
803
+ children,
804
+ className,
805
+ disabled = false,
806
+ icon,
807
+ intent = "brand",
808
+ leadingIcon,
809
+ loading = false,
810
+ loadingLabel,
811
+ size = "md",
812
+ type = "button",
813
+ ...props
814
+ }, ref) => {
815
+ const { messages } = useAdsI18n();
816
+ const isDisabled = disabled || loading;
817
+ const resolvedIcon = icon ?? leadingIcon;
818
+ const resolvedLoadingLabel = loadingLabel ?? messages.button.loading;
819
+ const hasTextContent = React9.Children.count(children) > 0;
820
+ const isIconOnly = Boolean(resolvedIcon) && !hasTextContent;
821
+ return /* @__PURE__ */ jsx10(
822
+ Button,
823
+ {
824
+ "aria-busy": loading || void 0,
825
+ className: cn(
826
+ "min-w-0 rounded-radius-md text-sm font-medium leading-5 tracking-normal",
827
+ "active:translate-y-px",
828
+ "active:not-aria-[haspopup]:translate-y-px",
829
+ "focus-visible:outline-none",
830
+ "disabled:pointer-events-none",
831
+ intentClassName[intent],
832
+ focusClassName[intent],
833
+ sizeClassName[size],
834
+ isIconOnly && (size === "sm" ? "!w-8 px-0" : size === "lg" ? "!w-10 px-0" : "!w-9 px-0"),
835
+ loading ? "disabled:opacity-100" : "disabled:opacity-[0.65]",
836
+ className
837
+ ),
838
+ disabled: isDisabled,
839
+ ref,
840
+ type,
841
+ variant: "ghost",
842
+ ...props,
843
+ children: /* @__PURE__ */ jsxs6("span", { className: "inline-flex items-center justify-center gap-1", children: [
844
+ /* @__PURE__ */ jsxs6("span", { className: "inline-flex items-center justify-center gap-sm", children: [
845
+ renderLeadingIcon(resolvedIcon),
846
+ hasTextContent ? /* @__PURE__ */ jsx10("span", { children }) : null
847
+ ] }),
848
+ loading ? /* @__PURE__ */ jsxs6(Fragment, { children: [
849
+ /* @__PURE__ */ jsx10(AdsButtonLoadingIcon, {}),
850
+ /* @__PURE__ */ jsx10("span", { className: "sr-only", children: resolvedLoadingLabel })
851
+ ] }) : null
852
+ ] })
853
+ }
854
+ );
855
+ }
856
+ );
857
+ AdsButton.displayName = "AdsButton";
858
+
859
+ // src/components/AdsBreadcrumb/index.tsx
860
+ import * as React11 from "react";
861
+ import { ChevronRight as ChevronRight2, MoreHorizontal as MoreHorizontal2, Slash } from "lucide-react";
862
+
863
+ // src/primitives/breadcrumb.tsx
864
+ import * as React10 from "react";
865
+ import { Slot as Slot2 } from "@radix-ui/react-slot";
866
+ import { ChevronRight, MoreHorizontal } from "lucide-react";
867
+ import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
868
+ var Breadcrumb = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
869
+ "nav",
870
+ {
871
+ "aria-label": "breadcrumb",
872
+ className: cn("w-full", className),
873
+ ref,
874
+ ...props
875
+ }
876
+ ));
877
+ Breadcrumb.displayName = "Breadcrumb";
878
+ var BreadcrumbList = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
879
+ "ul",
880
+ {
881
+ className: cn(
882
+ "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground",
883
+ className
884
+ ),
885
+ ref,
886
+ ...props
887
+ }
888
+ ));
889
+ BreadcrumbList.displayName = "BreadcrumbList";
890
+ var BreadcrumbItem = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
891
+ "li",
892
+ {
893
+ className: cn("inline-flex items-center gap-1.5", className),
894
+ ref,
895
+ ...props
896
+ }
897
+ ));
898
+ BreadcrumbItem.displayName = "BreadcrumbItem";
899
+ var BreadcrumbLink = React10.forwardRef(
900
+ ({ asChild = false, className, ...props }, ref) => {
901
+ const Comp = asChild ? Slot2 : "a";
902
+ return /* @__PURE__ */ jsx11(Comp, { className: cn("transition-colors", className), ref, ...props });
903
+ }
904
+ );
905
+ BreadcrumbLink.displayName = "BreadcrumbLink";
906
+ var BreadcrumbPage = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
907
+ "span",
908
+ {
909
+ "aria-current": "page",
910
+ "aria-disabled": "true",
911
+ className: cn("font-normal text-foreground", className),
912
+ ref,
913
+ role: "link",
914
+ ...props
915
+ }
916
+ ));
917
+ BreadcrumbPage.displayName = "BreadcrumbPage";
918
+ var BreadcrumbSeparator = ({
919
+ children,
920
+ className,
921
+ ...props
922
+ }) => /* @__PURE__ */ jsx11(
923
+ "li",
924
+ {
925
+ "aria-hidden": "true",
926
+ className: cn("[&_svg]:size-3.5", className),
927
+ role: "presentation",
928
+ ...props,
929
+ children: children ?? /* @__PURE__ */ jsx11(ChevronRight, {})
930
+ }
931
+ );
932
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
933
+ var BreadcrumbEllipsis = ({
934
+ className,
935
+ ...props
936
+ }) => /* @__PURE__ */ jsxs7(
937
+ "span",
938
+ {
939
+ "aria-hidden": "true",
940
+ className: cn("flex size-3.5 items-center justify-center", className),
941
+ role: "presentation",
942
+ ...props,
943
+ children: [
944
+ /* @__PURE__ */ jsx11(MoreHorizontal, { className: "size-3.5" }),
945
+ /* @__PURE__ */ jsx11("span", { className: "sr-only", children: "More" })
946
+ ]
947
+ }
948
+ );
949
+ BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
950
+
951
+ // src/components/AdsBreadcrumb/index.tsx
952
+ import { jsx as jsx12 } from "react/jsx-runtime";
953
+ var AdsBreadcrumb = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(Breadcrumb, { className: cn("w-full", className), ref, ...props }));
954
+ AdsBreadcrumb.displayName = "AdsBreadcrumb";
955
+ var AdsBreadcrumbList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
956
+ BreadcrumbList,
957
+ {
958
+ className: cn(
959
+ "flex flex-wrap items-center gap-1.5 text-sm leading-5 text-muted-foreground",
960
+ className
961
+ ),
962
+ ref,
963
+ ...props
964
+ }
965
+ ));
966
+ AdsBreadcrumbList.displayName = "AdsBreadcrumbList";
967
+ var AdsBreadcrumbItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
968
+ BreadcrumbItem,
969
+ {
970
+ className: cn("inline-flex items-center gap-1.5", className),
971
+ ref,
972
+ ...props
973
+ }
974
+ ));
975
+ AdsBreadcrumbItem.displayName = "AdsBreadcrumbItem";
976
+ var AdsBreadcrumbLink = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
977
+ BreadcrumbLink,
978
+ {
979
+ className: cn(
980
+ "text-sm font-normal leading-5 text-muted-foreground transition-colors hover:text-foreground",
981
+ className
982
+ ),
983
+ ref,
984
+ ...props
985
+ }
986
+ ));
987
+ AdsBreadcrumbLink.displayName = "AdsBreadcrumbLink";
988
+ var AdsBreadcrumbPage = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
989
+ BreadcrumbPage,
990
+ {
991
+ className: cn("text-sm font-normal leading-5 text-foreground", className),
992
+ ref,
993
+ ...props
994
+ }
995
+ ));
996
+ AdsBreadcrumbPage.displayName = "AdsBreadcrumbPage";
997
+ var separatorIcons = {
998
+ chevron: /* @__PURE__ */ jsx12(ChevronRight2, { className: "size-3.5" }),
999
+ slash: /* @__PURE__ */ jsx12(Slash, { className: "size-3.5" })
1000
+ };
1001
+ var AdsBreadcrumbSeparator = ({
1002
+ children,
1003
+ className,
1004
+ icon = "chevron",
1005
+ ...props
1006
+ }) => /* @__PURE__ */ jsx12(
1007
+ BreadcrumbSeparator,
1008
+ {
1009
+ className: cn("text-muted-foreground [&_svg]:size-3.5", className),
1010
+ ...props,
1011
+ children: children ?? separatorIcons[icon]
1012
+ }
1013
+ );
1014
+ AdsBreadcrumbSeparator.displayName = "AdsBreadcrumbSeparator";
1015
+ var AdsBreadcrumbEllipsis = ({
1016
+ className,
1017
+ children,
1018
+ ...props
1019
+ }) => /* @__PURE__ */ jsx12(
1020
+ BreadcrumbEllipsis,
1021
+ {
1022
+ className: cn("size-3.5 text-muted-foreground", className),
1023
+ ...props,
1024
+ children: children ?? /* @__PURE__ */ jsx12(MoreHorizontal2, { className: "size-3.5" })
1025
+ }
1026
+ );
1027
+ AdsBreadcrumbEllipsis.displayName = "AdsBreadcrumbEllipsis";
1028
+
1029
+ // src/components/AdsCheckbox/index.tsx
1030
+ import * as React16 from "react";
1031
+
1032
+ // src/primitives/checkbox.tsx
1033
+ import * as React12 from "react";
1034
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
1035
+ import { Check } from "lucide-react";
1036
+ import { jsx as jsx13 } from "react/jsx-runtime";
1037
+ var Checkbox = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
1038
+ CheckboxPrimitive.Root,
1039
+ {
1040
+ ref,
1041
+ className: cn(
1042
+ "grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
1043
+ className
1044
+ ),
1045
+ ...props,
1046
+ children: /* @__PURE__ */ jsx13(
1047
+ CheckboxPrimitive.Indicator,
1048
+ {
1049
+ className: cn("grid place-content-center text-current"),
1050
+ children: /* @__PURE__ */ jsx13(Check, { className: "h-4 w-4" })
1051
+ }
1052
+ )
1053
+ }
1054
+ ));
1055
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
1056
+
1057
+ // src/components/AdsField/index.tsx
1058
+ import * as React15 from "react";
1059
+
1060
+ // src/primitives/field.tsx
1061
+ import { useMemo as useMemo2 } from "react";
1062
+ import { cva as cva7 } from "class-variance-authority";
1063
+
1064
+ // src/primitives/label.tsx
1065
+ import * as React13 from "react";
1066
+ import * as LabelPrimitive from "@radix-ui/react-label";
1067
+ import { cva as cva6 } from "class-variance-authority";
1068
+ import { jsx as jsx14 } from "react/jsx-runtime";
1069
+ var labelVariants = cva6(
1070
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1071
+ );
1072
+ var Label = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
1073
+ LabelPrimitive.Root,
1074
+ {
1075
+ ref,
1076
+ className: cn(labelVariants(), className),
1077
+ ...props
1078
+ }
1079
+ ));
1080
+ Label.displayName = LabelPrimitive.Root.displayName;
1081
+
1082
+ // src/primitives/separator.tsx
1083
+ import * as React14 from "react";
1084
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
1085
+ import { jsx as jsx15 } from "react/jsx-runtime";
1086
+ var Separator = React14.forwardRef(
1087
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx15(
1088
+ SeparatorPrimitive.Root,
1089
+ {
1090
+ ref,
1091
+ decorative,
1092
+ orientation,
1093
+ className: cn(
1094
+ "shrink-0 bg-border",
1095
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
1096
+ className
1097
+ ),
1098
+ ...props
1099
+ }
1100
+ )
1101
+ );
1102
+ Separator.displayName = SeparatorPrimitive.Root.displayName;
1103
+
1104
+ // src/primitives/field.tsx
1105
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
1106
+ function FieldSet({ className, ...props }) {
1107
+ return /* @__PURE__ */ jsx16(
1108
+ "fieldset",
1109
+ {
1110
+ "data-slot": "field-set",
1111
+ className: cn(
1112
+ "flex flex-col gap-6",
1113
+ "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
1114
+ className
1115
+ ),
1116
+ ...props
1117
+ }
1118
+ );
1119
+ }
1120
+ function FieldLegend({
1121
+ className,
1122
+ variant = "legend",
1123
+ ...props
1124
+ }) {
1125
+ return /* @__PURE__ */ jsx16(
1126
+ "legend",
1127
+ {
1128
+ "data-slot": "field-legend",
1129
+ "data-variant": variant,
1130
+ className: cn(
1131
+ "mb-3 font-medium",
1132
+ "data-[variant=legend]:text-base",
1133
+ "data-[variant=label]:text-sm",
1134
+ className
1135
+ ),
1136
+ ...props
1137
+ }
1138
+ );
1139
+ }
1140
+ function FieldGroup({ className, ...props }) {
1141
+ return /* @__PURE__ */ jsx16(
1142
+ "div",
1143
+ {
1144
+ "data-slot": "field-group",
1145
+ className: cn(
1146
+ "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",
1147
+ className
1148
+ ),
1149
+ ...props
1150
+ }
1151
+ );
1152
+ }
1153
+ var fieldVariants = cva7(
1154
+ "group/field data-[invalid=true]:text-destructive flex w-full gap-3",
1155
+ {
1156
+ variants: {
1157
+ orientation: {
1158
+ vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
1159
+ horizontal: [
1160
+ "flex-row items-center",
1161
+ "[&>[data-slot=field-label]]:flex-auto",
1162
+ "has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
1163
+ ],
1164
+ responsive: [
1165
+ "@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
1166
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
1167
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
1168
+ ]
1169
+ }
1170
+ },
1171
+ defaultVariants: {
1172
+ orientation: "vertical"
1173
+ }
1174
+ }
1175
+ );
1176
+ function Field({
1177
+ className,
1178
+ orientation = "vertical",
1179
+ ...props
1180
+ }) {
1181
+ return /* @__PURE__ */ jsx16(
1182
+ "div",
1183
+ {
1184
+ role: "group",
1185
+ "data-slot": "field",
1186
+ "data-orientation": orientation,
1187
+ className: cn(fieldVariants({ orientation }), className),
1188
+ ...props
1189
+ }
1190
+ );
1191
+ }
1192
+ function FieldLabel({
1193
+ className,
1194
+ ...props
1195
+ }) {
1196
+ return /* @__PURE__ */ jsx16(
1197
+ Label,
1198
+ {
1199
+ "data-slot": "field-label",
1200
+ className: cn(
1201
+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
1202
+ "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",
1203
+ "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
1204
+ className
1205
+ ),
1206
+ ...props
1207
+ }
1208
+ );
1209
+ }
1210
+ function FieldTitle({ className, ...props }) {
1211
+ return /* @__PURE__ */ jsx16(
1212
+ "div",
1213
+ {
1214
+ "data-slot": "field-label",
1215
+ className: cn(
1216
+ "flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50",
1217
+ className
1218
+ ),
1219
+ ...props
1220
+ }
1221
+ );
1222
+ }
1223
+ function FieldDescription({ className, ...props }) {
1224
+ return /* @__PURE__ */ jsx16(
1225
+ "p",
1226
+ {
1227
+ "data-slot": "field-description",
1228
+ className: cn(
1229
+ "text-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
1230
+ "nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
1231
+ "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
1232
+ className
1233
+ ),
1234
+ ...props
1235
+ }
1236
+ );
1237
+ }
1238
+ function FieldSeparator({
1239
+ children,
1240
+ className,
1241
+ ...props
1242
+ }) {
1243
+ return /* @__PURE__ */ jsxs8(
1244
+ "div",
1245
+ {
1246
+ "data-slot": "field-separator",
1247
+ "data-content": !!children,
1248
+ className: cn(
1249
+ "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
1250
+ className
1251
+ ),
1252
+ ...props,
1253
+ children: [
1254
+ /* @__PURE__ */ jsx16(Separator, { className: "absolute inset-0 top-1/2" }),
1255
+ children && /* @__PURE__ */ jsx16(
1256
+ "span",
1257
+ {
1258
+ className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
1259
+ "data-slot": "field-separator-content",
1260
+ children
1261
+ }
1262
+ )
1263
+ ]
1264
+ }
1265
+ );
1266
+ }
1267
+ function FieldError({
1268
+ className,
1269
+ children,
1270
+ errors,
1271
+ ...props
1272
+ }) {
1273
+ const content = useMemo2(() => {
1274
+ if (children) {
1275
+ return children;
1276
+ }
1277
+ if (!errors) {
1278
+ return null;
1279
+ }
1280
+ if (errors?.length === 1 && errors[0]?.message) {
1281
+ return errors[0].message;
1282
+ }
1283
+ return /* @__PURE__ */ jsx16("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
1284
+ (error, index) => error?.message && /* @__PURE__ */ jsx16("li", { children: error.message }, index)
1285
+ ) });
1286
+ }, [children, errors]);
1287
+ if (!content) {
1288
+ return null;
1289
+ }
1290
+ return /* @__PURE__ */ jsx16(
1291
+ "div",
1292
+ {
1293
+ role: "alert",
1294
+ "data-slot": "field-error",
1295
+ className: cn("text-destructive text-sm font-normal", className),
1296
+ ...props,
1297
+ children: content
1298
+ }
1299
+ );
1300
+ }
1301
+
1302
+ // src/components/AdsField/index.tsx
1303
+ import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
1304
+ function useAdsFieldDescription({
1305
+ describedBy,
1306
+ errorText,
1307
+ helperText,
1308
+ id
1309
+ }) {
1310
+ const generatedId = React15.useId();
1311
+ const inputId = id ?? generatedId;
1312
+ const helperId = helperText ? `${inputId}-helper` : void 0;
1313
+ const errorId = errorText ? `${inputId}-error` : void 0;
1314
+ const descriptionIds = [describedBy, helperId, errorId].filter(Boolean).join(" ");
1315
+ return {
1316
+ describedBy: descriptionIds || void 0,
1317
+ errorId,
1318
+ helperId,
1319
+ inputId
1320
+ };
1321
+ }
1322
+ var AdsField = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
1323
+ FieldGroup,
1324
+ {
1325
+ className: cn("w-full gap-7", className),
1326
+ ref,
1327
+ ...props
1328
+ }
1329
+ ));
1330
+ AdsField.displayName = "AdsField";
1331
+ var AdsFieldHeader = React15.forwardRef(
1332
+ ({ className, description, title, ...props }, ref) => /* @__PURE__ */ jsxs9("div", { className: cn("flex w-full flex-col gap-3", className), ref, ...props, children: [
1333
+ /* @__PURE__ */ jsx17(FieldTitle, { className: "w-full text-base font-medium leading-6 text-foreground", children: title }),
1334
+ description ? /* @__PURE__ */ jsx17(FieldDescription, { className: "w-full text-sm leading-5 text-muted-foreground", children: description }) : null
1335
+ ] })
1336
+ );
1337
+ AdsFieldHeader.displayName = "AdsFieldHeader";
1338
+ var AdsFieldItem = React15.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx17(
1339
+ Field,
1340
+ {
1341
+ className: cn("w-full gap-3", className),
1342
+ orientation,
1343
+ ref,
1344
+ ...props
1345
+ }
1346
+ ));
1347
+ AdsFieldItem.displayName = "AdsFieldItem";
1348
+ var AdsFieldLabel = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
1349
+ FieldLabel,
1350
+ {
1351
+ className: cn("w-full text-sm font-medium leading-5 text-foreground", className),
1352
+ ref,
1353
+ ...props
1354
+ }
1355
+ ));
1356
+ AdsFieldLabel.displayName = "AdsFieldLabel";
1357
+ var AdsFieldLegend = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
1358
+ FieldLegend,
1359
+ {
1360
+ className: cn("mb-3 text-base font-medium leading-6 text-foreground", className),
1361
+ ref,
1362
+ ...props
1363
+ }
1364
+ ));
1365
+ AdsFieldLegend.displayName = "AdsFieldLegend";
1366
+ var AdsFieldDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
1367
+ FieldDescription,
1368
+ {
1369
+ className: cn("text-sm leading-5 text-muted-foreground", className),
1370
+ ref,
1371
+ ...props
1372
+ }
1373
+ ));
1374
+ AdsFieldDescription.displayName = "AdsFieldDescription";
1375
+ var AdsFieldError = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
1376
+ FieldError,
1377
+ {
1378
+ className: cn("text-sm leading-5 text-destructive", className),
1379
+ ref,
1380
+ ...props
1381
+ }
1382
+ ));
1383
+ AdsFieldError.displayName = "AdsFieldError";
1384
+ var AdsFieldSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
1385
+ FieldSeparator,
1386
+ {
1387
+ className: cn("py-2 text-muted-foreground", className),
1388
+ ref,
1389
+ ...props
1390
+ }
1391
+ ));
1392
+ AdsFieldSeparator.displayName = "AdsFieldSeparator";
1393
+ var AdsFieldGroup = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
1394
+ FieldGroup,
1395
+ {
1396
+ className: cn("w-full gap-6", className),
1397
+ ref,
1398
+ ...props
1399
+ }
1400
+ ));
1401
+ AdsFieldGroup.displayName = "AdsFieldGroup";
1402
+ var AdsFieldSet = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(FieldSet, { className: cn("w-full gap-6", className), ref, ...props }));
1403
+ AdsFieldSet.displayName = "AdsFieldSet";
1404
+ var AdsFieldCheckboxRow = React15.forwardRef(
1405
+ ({ className, control, description, label, ...props }, ref) => /* @__PURE__ */ jsxs9(
1406
+ "div",
1407
+ {
1408
+ className: cn("flex w-full items-start gap-3", description ? "min-h-5" : "items-center", className),
1409
+ ref,
1410
+ ...props,
1411
+ children: [
1412
+ /* @__PURE__ */ jsx17("div", { className: "shrink-0 pt-px", children: control }),
1413
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
1414
+ /* @__PURE__ */ jsx17("div", { className: "text-sm leading-5 text-foreground", children: label }),
1415
+ description ? /* @__PURE__ */ jsx17(AdsFieldDescription, { className: "text-sm leading-5", children: description }) : null
1416
+ ] })
1417
+ ]
1418
+ }
1419
+ )
1420
+ );
1421
+ AdsFieldCheckboxRow.displayName = "AdsFieldCheckboxRow";
1422
+ var AdsFieldChoiceCard = React15.forwardRef(
1423
+ ({ checked, className, control, description, title, ...props }, ref) => /* @__PURE__ */ jsxs9(
1424
+ "label",
1425
+ {
1426
+ className: cn(
1427
+ "flex w-full items-start gap-3 rounded-radius-md border border-border bg-card p-md shadow-[0px_1px_2px_rgba(0,0,0,0.1)] transition-colors",
1428
+ checked ? "border-primary bg-primary/5" : void 0,
1429
+ className
1430
+ ),
1431
+ ref,
1432
+ ...props,
1433
+ children: [
1434
+ control ? /* @__PURE__ */ jsx17("div", { className: "shrink-0 pt-px", children: control }) : null,
1435
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
1436
+ /* @__PURE__ */ jsx17("div", { className: "text-sm font-medium leading-5 text-foreground", children: title }),
1437
+ description ? /* @__PURE__ */ jsx17(AdsFieldDescription, { className: "text-sm leading-5", children: description }) : null
1438
+ ] })
1439
+ ]
1440
+ }
1441
+ )
1442
+ );
1443
+ AdsFieldChoiceCard.displayName = "AdsFieldChoiceCard";
1444
+ var AdsFieldActions = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
1445
+ "div",
1446
+ {
1447
+ className: cn("flex w-full flex-wrap items-center gap-3", className),
1448
+ ref,
1449
+ ...props
1450
+ }
1451
+ ));
1452
+ AdsFieldActions.displayName = "AdsFieldActions";
1453
+
1454
+ // src/components/AdsCheckbox/index.tsx
1455
+ import { jsx as jsx18 } from "react/jsx-runtime";
1456
+ var checkboxBaseClassName = "h-4 w-4 rounded-[4px] border-border bg-card text-primary shadow-[0px_1px_2px_rgba(0,0,0,0.1)] focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground";
1457
+ var Checkbox2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(Checkbox, { className: cn(checkboxBaseClassName, className), ref, ...props }));
1458
+ Checkbox2.displayName = "Checkbox";
1459
+ var AdsCheckbox = React16.forwardRef(({ checkboxClassName, className, description, id, label, wrapperClassName, ...props }, ref) => {
1460
+ const generatedId = React16.useId();
1461
+ const inputId = id ?? generatedId;
1462
+ if (!label) {
1463
+ return /* @__PURE__ */ jsx18(
1464
+ Checkbox2,
1465
+ {
1466
+ className: cn(className, checkboxClassName),
1467
+ id: inputId,
1468
+ ref,
1469
+ ...props
1470
+ }
1471
+ );
1472
+ }
1473
+ return /* @__PURE__ */ jsx18("label", { className: cn("block w-full cursor-pointer", wrapperClassName), htmlFor: inputId, children: /* @__PURE__ */ jsx18(
1474
+ AdsFieldCheckboxRow,
1475
+ {
1476
+ control: /* @__PURE__ */ jsx18(
1477
+ Checkbox2,
1478
+ {
1479
+ className: cn(className, checkboxClassName),
1480
+ id: inputId,
1481
+ ref,
1482
+ ...props
1483
+ }
1484
+ ),
1485
+ description,
1486
+ label
1487
+ }
1488
+ ) });
1489
+ });
1490
+ AdsCheckbox.displayName = "AdsCheckbox";
1491
+
1492
+ // src/components/AdsButtonGroup/index.tsx
1493
+ import * as React18 from "react";
1494
+ import { Slot as Slot4 } from "@radix-ui/react-slot";
1495
+
1496
+ // src/primitives/input.tsx
1497
+ import * as React17 from "react";
1498
+ import { jsx as jsx19 } from "react/jsx-runtime";
1499
+ var Input = React17.forwardRef(
1500
+ ({ className, type, ...props }, ref) => {
1501
+ return /* @__PURE__ */ jsx19(
1502
+ "input",
1503
+ {
1504
+ type,
1505
+ className: cn(
1506
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1507
+ className
1508
+ ),
1509
+ ref,
1510
+ ...props
1511
+ }
1512
+ );
1513
+ }
1514
+ );
1515
+ Input.displayName = "Input";
1516
+
1517
+ // src/primitives/button-group.tsx
1518
+ import { Slot as Slot3 } from "@radix-ui/react-slot";
1519
+ import { cva as cva8 } from "class-variance-authority";
1520
+ import { jsx as jsx20 } from "react/jsx-runtime";
1521
+ var buttonGroupVariants = cva8(
1522
+ "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
1523
+ {
1524
+ variants: {
1525
+ orientation: {
1526
+ horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
1527
+ vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
1528
+ }
1529
+ },
1530
+ defaultVariants: {
1531
+ orientation: "horizontal"
1532
+ }
1533
+ }
1534
+ );
1535
+ function ButtonGroupSeparator({
1536
+ className,
1537
+ orientation = "vertical",
1538
+ ...props
1539
+ }) {
1540
+ return /* @__PURE__ */ jsx20(
1541
+ Separator,
1542
+ {
1543
+ "data-slot": "button-group-separator",
1544
+ orientation,
1545
+ className: cn(
1546
+ "pointer-events-none relative !m-0 shrink-0 self-stretch overflow-visible bg-transparent",
1547
+ "data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-0",
1548
+ "data-[orientation=horizontal]:h-0 data-[orientation=horizontal]:w-full",
1549
+ "data-[orientation=vertical]:before:absolute data-[orientation=vertical]:before:inset-y-0 data-[orientation=vertical]:before:left-0 data-[orientation=vertical]:before:w-px data-[orientation=vertical]:before:bg-border",
1550
+ "data-[orientation=horizontal]:before:absolute data-[orientation=horizontal]:before:inset-x-0 data-[orientation=horizontal]:before:top-0 data-[orientation=horizontal]:before:h-px data-[orientation=horizontal]:before:bg-border",
1551
+ className
1552
+ ),
1553
+ ...props
1554
+ }
1555
+ );
1556
+ }
1557
+
1558
+ // src/components/AdsButtonGroup/index.tsx
1559
+ import { jsx as jsx21 } from "react/jsx-runtime";
1560
+ var buttonGroupPressClassName = "[&_button]:transition-[background-color,box-shadow,filter] [&_button]:active:translate-y-0 [&_button]:active:brightness-95";
1561
+ var segmentSizeClassName = {
1562
+ sm: "h-8 px-md text-sm",
1563
+ md: "h-9 px-lg text-sm",
1564
+ lg: "h-10 px-xl text-base"
1565
+ };
1566
+ function isAdsButtonElement(child) {
1567
+ return React18.isValidElement(child) && child.type === AdsButton;
1568
+ }
1569
+ function enhanceChildren(children, attached, size, surface) {
1570
+ return React18.Children.map(children, (child) => {
1571
+ if (!isAdsButtonElement(child)) {
1572
+ return child;
1573
+ }
1574
+ return React18.cloneElement(child, {
1575
+ className: cn(
1576
+ attached && "rounded-none shadow-none",
1577
+ attached && surface === "secondary" && "bg-secondary hover:bg-secondary/90",
1578
+ child.props.className
1579
+ ),
1580
+ size: child.props.size ?? size
1581
+ });
1582
+ });
1583
+ }
1584
+ var AdsButtonGroup = React18.forwardRef(
1585
+ ({
1586
+ attached = true,
1587
+ children,
1588
+ className,
1589
+ gap,
1590
+ orientation = "horizontal",
1591
+ size,
1592
+ surface = "default",
1593
+ variant = "default",
1594
+ ...props
1595
+ }, ref) => {
1596
+ const isVertical = orientation === "vertical";
1597
+ const resolvedAttached = attached || variant === "connected";
1598
+ const resolvedGapClassName = gap === "none" ? "gap-0" : gap === "sm" ? "gap-sm" : gap === "md" ? "gap-md" : resolvedAttached && isVertical ? "gap-0" : "gap-2";
1599
+ const attachedClassName = cn(
1600
+ buttonGroupVariants({ orientation }),
1601
+ surface === "pill" ? "rounded-full" : "rounded-radius-md"
1602
+ );
1603
+ return /* @__PURE__ */ jsx21(
1604
+ "div",
1605
+ {
1606
+ "aria-orientation": orientation,
1607
+ className: cn(
1608
+ "inline-flex w-fit items-stretch",
1609
+ isVertical ? "flex-col" : "flex-row",
1610
+ resolvedGapClassName,
1611
+ resolvedAttached && attachedClassName,
1612
+ buttonGroupPressClassName,
1613
+ className
1614
+ ),
1615
+ "data-attached": resolvedAttached ? "true" : "false",
1616
+ "data-orientation": orientation,
1617
+ "data-surface": surface,
1618
+ "data-slot": "button-group",
1619
+ "data-variant": variant,
1620
+ role: "group",
1621
+ ref,
1622
+ ...props,
1623
+ children: enhanceChildren(children, resolvedAttached, size, surface)
1624
+ }
1625
+ );
1626
+ }
1627
+ );
1628
+ AdsButtonGroup.displayName = "AdsButtonGroup";
1629
+ var textToneClassName = {
1630
+ default: "bg-transparent text-foreground",
1631
+ muted: "bg-transparent text-muted-foreground",
1632
+ secondary: "bg-secondary text-secondary-foreground",
1633
+ field: "bg-transparent text-muted-foreground"
1634
+ };
1635
+ var textAlignClassName = {
1636
+ start: "justify-start",
1637
+ center: "justify-center",
1638
+ between: "justify-between"
1639
+ };
1640
+ var inputSizeClassName = {
1641
+ sm: "h-8 text-sm leading-5",
1642
+ md: "h-9 text-sm leading-5",
1643
+ lg: "h-10 text-base leading-6"
1644
+ };
1645
+ var AdsButtonGroupText = React18.forwardRef(
1646
+ ({
1647
+ align = "start",
1648
+ asChild = false,
1649
+ className,
1650
+ shape = "default",
1651
+ size = "md",
1652
+ tone = "default",
1653
+ ...props
1654
+ }, ref) => {
1655
+ const Comp = asChild ? Slot4 : "div";
1656
+ return /* @__PURE__ */ jsx21(
1657
+ Comp,
1658
+ {
1659
+ className: cn(
1660
+ "inline-flex min-w-0 items-center gap-sm border border-border font-medium leading-5 shadow-[0px_1px_2px_rgba(0,0,0,0.08)] outline-none",
1661
+ segmentSizeClassName[size],
1662
+ textToneClassName[tone],
1663
+ textAlignClassName[align],
1664
+ shape === "pill" ? "rounded-full" : "rounded-radius-md",
1665
+ "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
1666
+ className
1667
+ ),
1668
+ "data-slot": "button-group-text",
1669
+ ref,
1670
+ ...props
1671
+ }
1672
+ );
1673
+ }
1674
+ );
1675
+ AdsButtonGroupText.displayName = "AdsButtonGroupText";
1676
+ var AdsButtonGroupInput = React18.forwardRef(({ className, size = "md", type = "text", ...props }, ref) => /* @__PURE__ */ jsx21(
1677
+ Input,
1678
+ {
1679
+ className: cn(
1680
+ "min-w-0 rounded-none bg-card px-md py-0 text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:[box-shadow:none] disabled:cursor-not-allowed disabled:opacity-50",
1681
+ inputSizeClassName[size],
1682
+ className
1683
+ ),
1684
+ ref,
1685
+ type,
1686
+ ...props
1687
+ }
1688
+ ));
1689
+ AdsButtonGroupInput.displayName = "AdsButtonGroupInput";
1690
+ var AdsButtonGroupSeparator = ButtonGroupSeparator;
1691
+
1692
+ // src/components/AdsSeparator/index.tsx
1693
+ import * as React19 from "react";
1694
+ import { jsx as jsx22 } from "react/jsx-runtime";
1695
+ var toneClassName = {
1696
+ default: "bg-border",
1697
+ muted: "bg-border-muted"
1698
+ };
1699
+ var AdsSeparator = React19.forwardRef(({ className, orientation = "horizontal", tone = "default", ...props }, ref) => /* @__PURE__ */ jsx22(
1700
+ Separator,
1701
+ {
1702
+ className: cn(
1703
+ "shrink-0",
1704
+ orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
1705
+ toneClassName[tone],
1706
+ className
1707
+ ),
1708
+ orientation,
1709
+ ref,
1710
+ ...props
1711
+ }
1712
+ ));
1713
+ AdsSeparator.displayName = "AdsSeparator";
1714
+
1715
+ // src/components/AdsSkeleton/index.tsx
1716
+ import * as React21 from "react";
1717
+
1718
+ // src/primitives/skeleton.tsx
1719
+ import * as React20 from "react";
1720
+ import { jsx as jsx23 } from "react/jsx-runtime";
1721
+ var Skeleton = React20.forwardRef(
1722
+ ({ animated = true, className, ...props }, ref) => /* @__PURE__ */ jsx23(
1723
+ "div",
1724
+ {
1725
+ className: cn(
1726
+ "shrink-0 bg-accent",
1727
+ animated ? "animate-pulse" : void 0,
1728
+ className
1729
+ ),
1730
+ ref,
1731
+ ...props
1732
+ }
1733
+ )
1734
+ );
1735
+ Skeleton.displayName = "Skeleton";
1736
+
1737
+ // src/components/AdsSkeleton/index.tsx
1738
+ import { jsx as jsx24 } from "react/jsx-runtime";
1739
+ var shapeClassName = {
1740
+ default: "rounded-radius-md",
1741
+ line: "h-4 w-full rounded-full",
1742
+ circle: "rounded-full"
1743
+ };
1744
+ var toneClassName2 = {
1745
+ default: "bg-secondary",
1746
+ muted: "bg-accent"
1747
+ };
1748
+ var AdsSkeleton = React21.forwardRef(
1749
+ ({ className, shape = "default", tone = "default", ...props }, ref) => /* @__PURE__ */ jsx24(
1750
+ Skeleton,
1751
+ {
1752
+ className: cn(shapeClassName[shape], toneClassName2[tone], className),
1753
+ ref,
1754
+ ...props
1755
+ }
1756
+ )
1757
+ );
1758
+ AdsSkeleton.displayName = "AdsSkeleton";
1759
+
1760
+ // src/components/AdsInput/index.tsx
1761
+ import * as React22 from "react";
1762
+ import { jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
1763
+ var inputBaseClassName = "flex w-full rounded-md border border-border bg-card px-3 py-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm";
1764
+ var inputSizeClasses = {
1765
+ sm: "h-8 text-sm leading-5",
1766
+ md: "h-9 text-base leading-6",
1767
+ lg: "h-10 text-base leading-6"
1768
+ };
1769
+ function getInputSurfaceClassName({
1770
+ className,
1771
+ errorText,
1772
+ hasPrefix,
1773
+ hasSuffix,
1774
+ size
1775
+ }) {
1776
+ return cn(
1777
+ inputBaseClassName,
1778
+ inputSizeClasses[size],
1779
+ errorText ? "border-destructive focus-visible:border-destructive" : "focus-visible:border-border-focus",
1780
+ "focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)]",
1781
+ hasPrefix ? "pl-2xl" : void 0,
1782
+ hasSuffix ? "pr-2xl" : void 0,
1783
+ className
1784
+ );
1785
+ }
1786
+ var AdsInput = React22.forwardRef(
1787
+ ({
1788
+ action,
1789
+ className,
1790
+ descriptionPlacement = "below",
1791
+ emptyFileLabel,
1792
+ errorText,
1793
+ fileTriggerLabel,
1794
+ helperText,
1795
+ id,
1796
+ label,
1797
+ onChange,
1798
+ prefix,
1799
+ type = "text",
1800
+ size = "md",
1801
+ suffix,
1802
+ ...props
1803
+ }, ref) => {
1804
+ const { messages } = useAdsI18n();
1805
+ const [selectedFiles, setSelectedFiles] = React22.useState([]);
1806
+ const description = useAdsFieldDescription({
1807
+ describedBy: props["aria-describedby"],
1808
+ errorText,
1809
+ helperText,
1810
+ id
1811
+ });
1812
+ const inputSurfaceClassName = getInputSurfaceClassName({
1813
+ className,
1814
+ errorText,
1815
+ hasPrefix: Boolean(prefix),
1816
+ hasSuffix: Boolean(suffix),
1817
+ size
1818
+ });
1819
+ const isFileInput = type === "file";
1820
+ const resolvedFileTriggerLabel = fileTriggerLabel ?? messages.input.chooseFile;
1821
+ const resolvedEmptyFileLabel = emptyFileLabel ?? messages.input.noFileChosen;
1822
+ const handleChange = React22.useCallback(
1823
+ (event) => {
1824
+ if (isFileInput) {
1825
+ setSelectedFiles(Array.from(event.target.files ?? [], (file) => file.name));
1826
+ }
1827
+ onChange?.(event);
1828
+ },
1829
+ [isFileInput, onChange]
1830
+ );
1831
+ const fileNameText = selectedFiles.length > 0 ? selectedFiles.join(", ") : resolvedEmptyFileLabel;
1832
+ const helperNode = helperText ? /* @__PURE__ */ jsx25(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
1833
+ const errorNode = errorText ? /* @__PURE__ */ jsx25(AdsFieldError, { id: description.errorId, children: errorText }) : null;
1834
+ const inputNode = isFileInput ? /* @__PURE__ */ jsxs10("div", { className: "relative flex w-full min-w-0 flex-1 items-center", children: [
1835
+ /* @__PURE__ */ jsx25(
1836
+ Input,
1837
+ {
1838
+ "aria-describedby": description.describedBy,
1839
+ "aria-invalid": errorText ? true : void 0,
1840
+ className: cn(
1841
+ inputSurfaceClassName,
1842
+ "absolute inset-0 z-10 cursor-pointer opacity-0 file:hidden",
1843
+ props.disabled ? "cursor-not-allowed" : void 0
1844
+ ),
1845
+ id: description.inputId,
1846
+ onChange: handleChange,
1847
+ ref,
1848
+ type: "file",
1849
+ ...props
1850
+ }
1851
+ ),
1852
+ /* @__PURE__ */ jsxs10(
1853
+ "div",
1854
+ {
1855
+ "aria-hidden": "true",
1856
+ className: cn(
1857
+ inputSurfaceClassName,
1858
+ "items-center text-sm leading-5",
1859
+ props.disabled ? "cursor-not-allowed opacity-50" : void 0
1860
+ ),
1861
+ children: [
1862
+ /* @__PURE__ */ jsx25("span", { className: "shrink-0 pr-sm text-sm font-medium leading-5 text-foreground", children: resolvedFileTriggerLabel }),
1863
+ /* @__PURE__ */ jsx25(
1864
+ "span",
1865
+ {
1866
+ className: cn(
1867
+ "min-w-0 flex-1 truncate text-sm leading-5",
1868
+ selectedFiles.length > 0 ? "text-foreground" : "text-muted-foreground"
1869
+ ),
1870
+ children: fileNameText
1871
+ }
1872
+ )
1873
+ ]
1874
+ }
1875
+ )
1876
+ ] }) : /* @__PURE__ */ jsxs10("div", { className: "relative flex w-full min-w-0 flex-1 items-center", children: [
1877
+ prefix ? /* @__PURE__ */ jsx25("span", { className: "pointer-events-none absolute left-md inline-flex text-icon-muted", children: prefix }) : null,
1878
+ /* @__PURE__ */ jsx25(
1879
+ Input,
1880
+ {
1881
+ "aria-describedby": description.describedBy,
1882
+ "aria-invalid": errorText ? true : void 0,
1883
+ className: inputSurfaceClassName,
1884
+ id: description.inputId,
1885
+ onChange: handleChange,
1886
+ ref,
1887
+ type,
1888
+ ...props
1889
+ }
1890
+ ),
1891
+ suffix ? /* @__PURE__ */ jsx25("span", { className: "absolute right-md inline-flex items-center text-icon-muted", children: suffix }) : null
1892
+ ] });
1893
+ return /* @__PURE__ */ jsxs10(AdsFieldItem, { children: [
1894
+ label ? /* @__PURE__ */ jsx25(AdsFieldLabel, { htmlFor: description.inputId, children: label }) : null,
1895
+ descriptionPlacement === "above" ? helperNode : null,
1896
+ /* @__PURE__ */ jsxs10("div", { className: "flex w-full items-center gap-sm", children: [
1897
+ inputNode,
1898
+ action ? /* @__PURE__ */ jsx25("div", { className: "shrink-0", children: action }) : null
1899
+ ] }),
1900
+ descriptionPlacement === "below" ? helperNode : null,
1901
+ errorNode
1902
+ ] });
1903
+ }
1904
+ );
1905
+ AdsInput.displayName = "AdsInput";
1906
+
1907
+ // src/components/AdsInputGroup/index.tsx
1908
+ import * as React24 from "react";
1909
+
1910
+ // src/primitives/textarea.tsx
1911
+ import * as React23 from "react";
1912
+ import { jsx as jsx26 } from "react/jsx-runtime";
1913
+ var Textarea = React23.forwardRef(({ className, ...props }, ref) => {
1914
+ return /* @__PURE__ */ jsx26(
1915
+ "textarea",
1916
+ {
1917
+ className: cn(
1918
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1919
+ className
1920
+ ),
1921
+ ref,
1922
+ ...props
1923
+ }
1924
+ );
1925
+ });
1926
+ Textarea.displayName = "Textarea";
1927
+
1928
+ // src/components/AdsInputGroup/index.tsx
1929
+ import { jsx as jsx27, jsxs as jsxs11 } from "react/jsx-runtime";
1930
+ function useAdsInputGroupDescription(describedBy, helperText, errorText, idBase) {
1931
+ const helperId = helperText ? `${idBase}-helper` : void 0;
1932
+ const errorId = errorText ? `${idBase}-error` : void 0;
1933
+ const descriptionIds = [describedBy, helperId, errorId].filter(Boolean).join(" ");
1934
+ return {
1935
+ describedBy: descriptionIds || void 0,
1936
+ errorId,
1937
+ helperId
1938
+ };
1939
+ }
1940
+ function AdsInputGroupChrome({
1941
+ children,
1942
+ errorId,
1943
+ errorText,
1944
+ helperId,
1945
+ helperText,
1946
+ label
1947
+ }) {
1948
+ return /* @__PURE__ */ jsxs11("div", { className: "flex w-full flex-col gap-md", children: [
1949
+ label ? /* @__PURE__ */ jsx27("div", { className: "text-sm font-medium leading-5 text-foreground", children: label }) : null,
1950
+ children,
1951
+ helperText ? /* @__PURE__ */ jsx27("p", { className: "text-sm leading-5 text-muted-foreground", id: helperId, children: helperText }) : null,
1952
+ errorText ? /* @__PURE__ */ jsx27("p", { className: "text-sm leading-5 text-destructive", id: errorId, children: errorText }) : null
1953
+ ] });
1954
+ }
1955
+ var addonBaseClassName = "flex shrink-0 items-center self-stretch bg-secondary px-lg text-sm leading-5 text-foreground";
1956
+ var inputGroupControlBaseClassName = "w-full min-w-0 rounded-none border-0 bg-transparent px-0 py-0 text-sm leading-5 text-foreground shadow-none placeholder:text-muted-foreground focus-visible:border-transparent focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 read-only:text-muted-foreground";
1957
+ function AdsInputGroup({
1958
+ children,
1959
+ className,
1960
+ controlWrapperClassName,
1961
+ errorText,
1962
+ footer,
1963
+ header,
1964
+ helperText,
1965
+ id,
1966
+ label,
1967
+ leadingAddon,
1968
+ leadingAddonClassName,
1969
+ surfaceClassName,
1970
+ trailingAddon,
1971
+ trailingAddonClassName
1972
+ }) {
1973
+ const generatedId = React24.useId();
1974
+ const description = useAdsInputGroupDescription(
1975
+ void 0,
1976
+ helperText,
1977
+ errorText,
1978
+ id ?? generatedId
1979
+ );
1980
+ return /* @__PURE__ */ jsx27(
1981
+ AdsInputGroupChrome,
1982
+ {
1983
+ errorText,
1984
+ helperText,
1985
+ label,
1986
+ ...description,
1987
+ children: /* @__PURE__ */ jsx27("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs11(
1988
+ "div",
1989
+ {
1990
+ className: cn(
1991
+ "overflow-hidden rounded-radius-md border border-border bg-card shadow-[0px_1px_2px_rgba(0,0,0,0.1)] transition-colors",
1992
+ errorText ? "border-destructive focus-within:border-destructive" : "focus-within:border-border-focus",
1993
+ "focus-within:ring-[3px] focus-within:ring-[rgba(161,161,161,0.5)]",
1994
+ surfaceClassName
1995
+ ),
1996
+ children: [
1997
+ header ? /* @__PURE__ */ jsx27("div", { className: "border-b border-border px-md py-md text-sm text-foreground", children: header }) : null,
1998
+ /* @__PURE__ */ jsxs11("div", { className: "flex min-h-11 w-full items-stretch", children: [
1999
+ leadingAddon ? /* @__PURE__ */ jsx27(
2000
+ "div",
2001
+ {
2002
+ className: cn(
2003
+ addonBaseClassName,
2004
+ "border-r border-border",
2005
+ leadingAddonClassName
2006
+ ),
2007
+ children: leadingAddon
2008
+ }
2009
+ ) : null,
2010
+ /* @__PURE__ */ jsx27(
2011
+ "div",
2012
+ {
2013
+ className: cn(
2014
+ "flex min-w-0 flex-1 items-center gap-sm px-md py-[10px]",
2015
+ controlWrapperClassName
2016
+ ),
2017
+ children
2018
+ }
2019
+ ),
2020
+ trailingAddon ? /* @__PURE__ */ jsx27(
2021
+ "div",
2022
+ {
2023
+ className: cn(
2024
+ addonBaseClassName,
2025
+ "justify-end border-l border-border",
2026
+ trailingAddonClassName
2027
+ ),
2028
+ children: trailingAddon
2029
+ }
2030
+ ) : null
2031
+ ] }),
2032
+ footer ? /* @__PURE__ */ jsx27("div", { className: "border-t border-border px-md py-sm text-sm text-muted-foreground", children: footer }) : null
2033
+ ]
2034
+ }
2035
+ ) })
2036
+ }
2037
+ );
2038
+ }
2039
+ var AdsInputGroupInput = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
2040
+ Input,
2041
+ {
2042
+ className: cn(
2043
+ inputGroupControlBaseClassName,
2044
+ "h-5 text-sm leading-5",
2045
+ className
2046
+ ),
2047
+ ref,
2048
+ ...props
2049
+ }
2050
+ ));
2051
+ AdsInputGroupInput.displayName = "AdsInputGroupInput";
2052
+ var AdsInputGroupTextarea = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
2053
+ Textarea,
2054
+ {
2055
+ className: cn(
2056
+ inputGroupControlBaseClassName,
2057
+ "min-h-[64px] resize-none text-sm leading-5",
2058
+ className
2059
+ ),
2060
+ ref,
2061
+ ...props
2062
+ }
2063
+ ));
2064
+ AdsInputGroupTextarea.displayName = "AdsInputGroupTextarea";
2065
+
2066
+ // src/components/AdsInputOTP/index.tsx
2067
+ import * as React26 from "react";
2068
+
2069
+ // src/primitives/input-otp.tsx
2070
+ import * as React25 from "react";
2071
+ import { OTPInput, OTPInputContext } from "input-otp";
2072
+ import { Dot } from "lucide-react";
2073
+ import { jsx as jsx28, jsxs as jsxs12 } from "react/jsx-runtime";
2074
+ var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx28(
2075
+ OTPInput,
2076
+ {
2077
+ ref,
2078
+ containerClassName: cn(
2079
+ "flex items-center gap-2 has-[:disabled]:opacity-50",
2080
+ containerClassName
2081
+ ),
2082
+ className: cn("disabled:cursor-not-allowed", className),
2083
+ ...props
2084
+ }
2085
+ ));
2086
+ InputOTP.displayName = "InputOTP";
2087
+ var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28("div", { ref, className: cn("flex items-center", className), ...props }));
2088
+ InputOTPGroup.displayName = "InputOTPGroup";
2089
+ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
2090
+ const inputOTPContext = React25.useContext(OTPInputContext);
2091
+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
2092
+ return /* @__PURE__ */ jsxs12(
2093
+ "div",
2094
+ {
2095
+ ref,
2096
+ className: cn(
2097
+ "relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
2098
+ isActive && "z-10 ring-2 ring-ring ring-offset-background",
2099
+ className
2100
+ ),
2101
+ ...props,
2102
+ children: [
2103
+ char,
2104
+ hasFakeCaret && /* @__PURE__ */ jsx28("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx28("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
2105
+ ]
2106
+ }
2107
+ );
2108
+ });
2109
+ InputOTPSlot.displayName = "InputOTPSlot";
2110
+ var InputOTPSeparator = React25.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx28("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx28(Dot, {}) }));
2111
+ InputOTPSeparator.displayName = "InputOTPSeparator";
2112
+
2113
+ // src/components/AdsInputOTP/index.tsx
2114
+ import { jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
2115
+ function useFieldDescription(id, describedBy, helperText, errorText) {
2116
+ const generatedId = React26.useId();
2117
+ const inputId = id ?? generatedId;
2118
+ const helperId = helperText ? `${inputId}-helper` : void 0;
2119
+ const errorId = errorText ? `${inputId}-error` : void 0;
2120
+ const descriptionIds = [describedBy, helperId, errorId].filter(Boolean).join(" ");
2121
+ return {
2122
+ describedBy: descriptionIds || void 0,
2123
+ errorId,
2124
+ helperId,
2125
+ inputId
2126
+ };
2127
+ }
2128
+ function AdsInputOTPChrome({
2129
+ children,
2130
+ errorId,
2131
+ errorText,
2132
+ helperId,
2133
+ helperText,
2134
+ inputId,
2135
+ label
2136
+ }) {
2137
+ return /* @__PURE__ */ jsxs13("div", { className: "flex w-full flex-col gap-md", children: [
2138
+ label ? /* @__PURE__ */ jsx29("label", { className: "text-sm font-medium leading-5 text-foreground", htmlFor: inputId, children: label }) : null,
2139
+ children,
2140
+ helperText ? /* @__PURE__ */ jsx29("p", { className: "text-sm leading-5 text-muted-foreground", id: helperId, children: helperText }) : null,
2141
+ errorText ? /* @__PURE__ */ jsx29("p", { className: "text-sm leading-5 text-destructive", id: errorId, children: errorText }) : null
2142
+ ] });
2143
+ }
2144
+ function buildSeparator(node, key) {
2145
+ if (node === void 0) {
2146
+ return /* @__PURE__ */ jsx29(AdsInputOTPSeparator, {}, key);
2147
+ }
2148
+ if (React26.isValidElement(node)) {
2149
+ return React26.cloneElement(node, { key });
2150
+ }
2151
+ return /* @__PURE__ */ jsx29("span", { children: node }, key);
2152
+ }
2153
+ function buildOtpChildren(groups, separator) {
2154
+ const defaultGroup = groups.length > 0 ? groups : [6];
2155
+ const items = [];
2156
+ let index = 0;
2157
+ defaultGroup.forEach((size, indexOfGroup) => {
2158
+ items.push(
2159
+ /* @__PURE__ */ jsx29(AdsInputOTPGroup, { children: Array.from({ length: size }, (_, slotOffset) => /* @__PURE__ */ jsx29(
2160
+ AdsInputOTPSlot,
2161
+ {
2162
+ index: index + slotOffset
2163
+ },
2164
+ `slot-${index + slotOffset}`
2165
+ )) }, `group-${indexOfGroup}`)
2166
+ );
2167
+ index += size;
2168
+ if (indexOfGroup < defaultGroup.length - 1) {
2169
+ items.push(buildSeparator(separator, `sep-${indexOfGroup}`));
2170
+ }
2171
+ });
2172
+ return items;
2173
+ }
2174
+ var AdsInputOTP = React26.forwardRef(({ action, errorText, groups, helperText, label, separator, children, id, ...props }, ref) => {
2175
+ const totalSlots = groups && groups.length > 0 ? groups.reduce((sum, value) => sum + value, 0) : 6;
2176
+ const description = useFieldDescription(id, props["aria-describedby"], helperText, errorText);
2177
+ const otpChildren = children ?? buildOtpChildren(groups ?? [], separator);
2178
+ return /* @__PURE__ */ jsx29(
2179
+ AdsInputOTPChrome,
2180
+ {
2181
+ errorText,
2182
+ errorId: description.errorId,
2183
+ helperText,
2184
+ helperId: description.helperId,
2185
+ inputId: description.inputId,
2186
+ label,
2187
+ children: /* @__PURE__ */ jsxs13("div", { className: "flex w-full items-center gap-sm", children: [
2188
+ /* @__PURE__ */ jsx29(
2189
+ InputOTP,
2190
+ {
2191
+ "aria-describedby": description.describedBy,
2192
+ "aria-invalid": errorText ? true : void 0,
2193
+ id: description.inputId,
2194
+ maxLength: totalSlots,
2195
+ ref,
2196
+ ...props,
2197
+ children: otpChildren
2198
+ }
2199
+ ),
2200
+ action ? /* @__PURE__ */ jsx29("span", { className: "shrink-0", children: action }) : null
2201
+ ] })
2202
+ }
2203
+ );
2204
+ });
2205
+ AdsInputOTP.displayName = "AdsInputOTP";
2206
+ var AdsInputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(InputOTPGroup, { className, ref, ...props }));
2207
+ AdsInputOTPGroup.displayName = "AdsInputOTPGroup";
2208
+ var AdsInputOTPSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
2209
+ InputOTPSeparator,
2210
+ {
2211
+ className: className ?? "h-px w-6 shrink-0 bg-border text-transparent [&_svg]:hidden",
2212
+ ref,
2213
+ ...props
2214
+ }
2215
+ ));
2216
+ AdsInputOTPSeparator.displayName = "AdsInputOTPSeparator";
2217
+ var AdsInputOTPSlot = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
2218
+ InputOTPSlot,
2219
+ {
2220
+ className: [
2221
+ "border-border bg-card text-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)]",
2222
+ "first:border-r-0 first:rounded-l-radius-md last:border-r last:rounded-r-radius-md",
2223
+ "data-[active=true]:border-border-focus data-[active=true]:shadow-[0px_0px_0px_3px_rgba(161,161,161,0.5)]",
2224
+ "h-9 w-9 text-sm leading-5",
2225
+ className
2226
+ ].filter(Boolean).join(" "),
2227
+ ref,
2228
+ ...props
2229
+ }
2230
+ ));
2231
+ AdsInputOTPSlot.displayName = "AdsInputOTPSlot";
2232
+
2233
+ // src/components/AdsPagination/index.tsx
2234
+ import * as React28 from "react";
2235
+ import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight4, MoreHorizontal as MoreHorizontal4 } from "lucide-react";
2236
+
2237
+ // src/primitives/pagination.tsx
2238
+ import * as React27 from "react";
2239
+ import { ChevronLeft, ChevronRight as ChevronRight3, MoreHorizontal as MoreHorizontal3 } from "lucide-react";
2240
+ import { jsx as jsx30, jsxs as jsxs14 } from "react/jsx-runtime";
2241
+ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx30(
2242
+ "nav",
2243
+ {
2244
+ role: "navigation",
2245
+ "aria-label": "pagination",
2246
+ className: cn("mx-auto flex w-full justify-center", className),
2247
+ ...props
2248
+ }
2249
+ );
2250
+ Pagination.displayName = "Pagination";
2251
+ var PaginationContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
2252
+ "ul",
2253
+ {
2254
+ ref,
2255
+ className: cn("flex flex-row items-center gap-1", className),
2256
+ ...props
2257
+ }
2258
+ ));
2259
+ PaginationContent.displayName = "PaginationContent";
2260
+ var PaginationItem = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30("li", { ref, className: cn("", className), ...props }));
2261
+ PaginationItem.displayName = "PaginationItem";
2262
+ var PaginationLink = ({
2263
+ className,
2264
+ isActive,
2265
+ size = "icon",
2266
+ ...props
2267
+ }) => /* @__PURE__ */ jsx30(
2268
+ "a",
2269
+ {
2270
+ "aria-current": isActive ? "page" : void 0,
2271
+ className: cn(
2272
+ buttonVariants({
2273
+ variant: isActive ? "outline" : "ghost",
2274
+ size
2275
+ }),
2276
+ className
2277
+ ),
2278
+ ...props
2279
+ }
2280
+ );
2281
+ PaginationLink.displayName = "PaginationLink";
2282
+ var PaginationPrevious = ({
2283
+ className,
2284
+ ...props
2285
+ }) => /* @__PURE__ */ jsxs14(
2286
+ PaginationLink,
2287
+ {
2288
+ "aria-label": "Go to previous page",
2289
+ size: "default",
2290
+ className: cn("gap-1 pl-2.5", className),
2291
+ ...props,
2292
+ children: [
2293
+ /* @__PURE__ */ jsx30(ChevronLeft, { className: "h-4 w-4" }),
2294
+ /* @__PURE__ */ jsx30("span", { children: "Previous" })
2295
+ ]
2296
+ }
2297
+ );
2298
+ PaginationPrevious.displayName = "PaginationPrevious";
2299
+ var PaginationNext = ({
2300
+ className,
2301
+ ...props
2302
+ }) => /* @__PURE__ */ jsxs14(
2303
+ PaginationLink,
2304
+ {
2305
+ "aria-label": "Go to next page",
2306
+ size: "default",
2307
+ className: cn("gap-1 pr-2.5", className),
2308
+ ...props,
2309
+ children: [
2310
+ /* @__PURE__ */ jsx30("span", { children: "Next" }),
2311
+ /* @__PURE__ */ jsx30(ChevronRight3, { className: "h-4 w-4" })
2312
+ ]
2313
+ }
2314
+ );
2315
+ PaginationNext.displayName = "PaginationNext";
2316
+ var PaginationEllipsis = ({
2317
+ className,
2318
+ ...props
2319
+ }) => /* @__PURE__ */ jsxs14(
2320
+ "span",
2321
+ {
2322
+ "aria-hidden": true,
2323
+ className: cn("flex h-9 w-9 items-center justify-center", className),
2324
+ ...props,
2325
+ children: [
2326
+ /* @__PURE__ */ jsx30(MoreHorizontal3, { className: "h-4 w-4" }),
2327
+ /* @__PURE__ */ jsx30("span", { className: "sr-only", children: "More pages" })
2328
+ ]
2329
+ }
2330
+ );
2331
+ PaginationEllipsis.displayName = "PaginationEllipsis";
2332
+
2333
+ // src/components/AdsPagination/index.tsx
2334
+ import { jsx as jsx31, jsxs as jsxs15 } from "react/jsx-runtime";
2335
+ var paginationLinkBaseClassName = "inline-flex h-9 min-w-9 items-center justify-center rounded-radius-md border text-sm font-medium leading-5 tracking-normal transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background";
2336
+ var paginationLinkInactiveClassName = "border-transparent bg-transparent px-[10px] text-foreground shadow-none hover:bg-accent hover:shadow-[0px_1px_2px_rgba(0,0,0,0.1)]";
2337
+ var paginationLinkActiveClassName = "border-border bg-card px-[10px] text-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)]";
2338
+ function AdsPagination({ className, ...props }) {
2339
+ return /* @__PURE__ */ jsx31(
2340
+ Pagination,
2341
+ {
2342
+ className: cn("mx-0 w-auto justify-start", className),
2343
+ ...props
2344
+ }
2345
+ );
2346
+ }
2347
+ AdsPagination.displayName = "AdsPagination";
2348
+ var AdsPaginationContent = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(PaginationContent, { ref, className: cn("gap-1", className), ...props }));
2349
+ AdsPaginationContent.displayName = "AdsPaginationContent";
2350
+ var AdsPaginationItem = React28.forwardRef(
2351
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx31(PaginationItem, { ref, className, ...props })
2352
+ );
2353
+ AdsPaginationItem.displayName = "AdsPaginationItem";
2354
+ var AdsPaginationLink = React28.forwardRef(
2355
+ ({ className, isActive = false, ...props }, ref) => /* @__PURE__ */ jsx31(
2356
+ "a",
2357
+ {
2358
+ "aria-current": isActive ? "page" : void 0,
2359
+ className: cn(
2360
+ paginationLinkBaseClassName,
2361
+ isActive ? paginationLinkActiveClassName : paginationLinkInactiveClassName,
2362
+ className
2363
+ ),
2364
+ ref,
2365
+ ...props
2366
+ }
2367
+ )
2368
+ );
2369
+ AdsPaginationLink.displayName = "AdsPaginationLink";
2370
+ var AdsPaginationPrevious = React28.forwardRef(({ "aria-label": ariaLabel, children, className, ...props }, ref) => {
2371
+ const { messages } = useAdsI18n();
2372
+ const label = children ?? messages.pagination.previous;
2373
+ return /* @__PURE__ */ jsxs15(
2374
+ AdsPaginationLink,
2375
+ {
2376
+ "aria-label": ariaLabel ?? messages.pagination.previous,
2377
+ className: cn("gap-1 px-md py-sm", className),
2378
+ ref,
2379
+ ...props,
2380
+ children: [
2381
+ /* @__PURE__ */ jsx31(ChevronLeft2, { "aria-hidden": true, className: "h-4 w-4" }),
2382
+ /* @__PURE__ */ jsx31("span", { children: label })
2383
+ ]
2384
+ }
2385
+ );
2386
+ });
2387
+ AdsPaginationPrevious.displayName = "AdsPaginationPrevious";
2388
+ var AdsPaginationNext = React28.forwardRef(
2389
+ ({ "aria-label": ariaLabel, children, className, ...props }, ref) => {
2390
+ const { messages } = useAdsI18n();
2391
+ const label = children ?? messages.pagination.next;
2392
+ return /* @__PURE__ */ jsxs15(
2393
+ AdsPaginationLink,
2394
+ {
2395
+ "aria-label": ariaLabel ?? messages.pagination.next,
2396
+ className: cn("gap-1 px-md py-sm", className),
2397
+ ref,
2398
+ ...props,
2399
+ children: [
2400
+ /* @__PURE__ */ jsx31("span", { children: label }),
2401
+ /* @__PURE__ */ jsx31(ChevronRight4, { "aria-hidden": true, className: "h-4 w-4" })
2402
+ ]
2403
+ }
2404
+ );
2405
+ }
2406
+ );
2407
+ AdsPaginationNext.displayName = "AdsPaginationNext";
2408
+ function AdsPaginationEllipsis({
2409
+ className,
2410
+ label,
2411
+ ...props
2412
+ }) {
2413
+ const { messages } = useAdsI18n();
2414
+ const resolvedLabel = label ?? messages.pagination.morePages;
2415
+ return /* @__PURE__ */ jsxs15(
2416
+ "span",
2417
+ {
2418
+ "aria-hidden": true,
2419
+ className: cn(
2420
+ "inline-flex h-9 w-9 items-center justify-center rounded-radius-md border border-transparent text-foreground",
2421
+ className
2422
+ ),
2423
+ ...props,
2424
+ children: [
2425
+ /* @__PURE__ */ jsx31(MoreHorizontal4, { className: "h-4 w-4" }),
2426
+ /* @__PURE__ */ jsx31("span", { className: "sr-only", children: resolvedLabel })
2427
+ ]
2428
+ }
2429
+ );
2430
+ }
2431
+ AdsPaginationEllipsis.displayName = "AdsPaginationEllipsis";
2432
+
2433
+ // src/components/AdsPopover/index.tsx
2434
+ import * as React30 from "react";
2435
+
2436
+ // src/primitives/popover.tsx
2437
+ import * as React29 from "react";
2438
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
2439
+ import { jsx as jsx32 } from "react/jsx-runtime";
2440
+ var Popover = PopoverPrimitive.Root;
2441
+ var PopoverTrigger = PopoverPrimitive.Trigger;
2442
+ var PopoverContent = React29.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx32(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx32(
2443
+ PopoverPrimitive.Content,
2444
+ {
2445
+ ref,
2446
+ align,
2447
+ sideOffset,
2448
+ className: cn(
2449
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",
2450
+ className
2451
+ ),
2452
+ ...props
2453
+ }
2454
+ ) }));
2455
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
2456
+
2457
+ // src/components/AdsPopover/index.tsx
2458
+ import { jsx as jsx33 } from "react/jsx-runtime";
2459
+ var popoverContentClassName = "z-50 w-[320px] rounded-radius-lg border border-border bg-popover p-lg text-popover-foreground shadow-[0px_2px_4px_-2px_rgba(0,0,0,0.1),0px_4px_6px_-1px_rgba(0,0,0,0.1)] outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]";
2460
+ var AdsPopover = Popover;
2461
+ var AdsPopoverTrigger = PopoverTrigger;
2462
+ var AdsPopoverContent = React30.forwardRef(({ align = "center", className, inset = false, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx33(
2463
+ PopoverContent,
2464
+ {
2465
+ align,
2466
+ className: cn(
2467
+ popoverContentClassName,
2468
+ inset ? "p-0" : void 0,
2469
+ className
2470
+ ),
2471
+ ref,
2472
+ sideOffset,
2473
+ ...props
2474
+ }
2475
+ ));
2476
+ AdsPopoverContent.displayName = "AdsPopoverContent";
2477
+ var AdsPopoverHeader = React30.forwardRef(
2478
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
2479
+ "div",
2480
+ {
2481
+ className: cn("flex flex-col gap-sm", className),
2482
+ ref,
2483
+ ...props
2484
+ }
2485
+ )
2486
+ );
2487
+ AdsPopoverHeader.displayName = "AdsPopoverHeader";
2488
+ var AdsPopoverBody = React30.forwardRef(
2489
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx33("div", { className: cn("mt-md flex flex-col gap-md", className), ref, ...props })
2490
+ );
2491
+ AdsPopoverBody.displayName = "AdsPopoverBody";
2492
+ var AdsPopoverTitle = React30.forwardRef(
2493
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
2494
+ "h4",
2495
+ {
2496
+ className: cn("text-base font-medium leading-6 text-foreground", className),
2497
+ ref,
2498
+ ...props
2499
+ }
2500
+ )
2501
+ );
2502
+ AdsPopoverTitle.displayName = "AdsPopoverTitle";
2503
+ var AdsPopoverDescription = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
2504
+ "p",
2505
+ {
2506
+ className: cn("text-sm leading-5 text-muted-foreground", className),
2507
+ ref,
2508
+ ...props
2509
+ }
2510
+ ));
2511
+ AdsPopoverDescription.displayName = "AdsPopoverDescription";
2512
+
2513
+ // src/components/AdsProgress/index.tsx
2514
+ import * as React32 from "react";
2515
+
2516
+ // src/primitives/progress.tsx
2517
+ import * as React31 from "react";
2518
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
2519
+ import { jsx as jsx34 } from "react/jsx-runtime";
2520
+ var Progress = React31.forwardRef(({ className, indicatorClassName, value, ...props }, ref) => /* @__PURE__ */ jsx34(
2521
+ ProgressPrimitive.Root,
2522
+ {
2523
+ className: cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className),
2524
+ ref,
2525
+ value,
2526
+ ...props,
2527
+ children: /* @__PURE__ */ jsx34(
2528
+ ProgressPrimitive.Indicator,
2529
+ {
2530
+ className: cn("h-full w-full flex-1 bg-primary transition-all", indicatorClassName),
2531
+ style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
2532
+ }
2533
+ )
2534
+ }
2535
+ ));
2536
+ Progress.displayName = ProgressPrimitive.Root.displayName;
2537
+
2538
+ // src/components/AdsProgress/index.tsx
2539
+ import { jsx as jsx35, jsxs as jsxs16 } from "react/jsx-runtime";
2540
+ var progressBaseClassName = "h-2 rounded-radius-full bg-[color:color-mix(in_srgb,var(--primary)_20%,transparent)]";
2541
+ var progressIndicatorVariantClassName = {
2542
+ ai: "bg-brand-gradient",
2543
+ default: "bg-primary"
2544
+ };
2545
+ var Progress2 = React32.forwardRef(({ className, indicatorClassName, ...props }, ref) => /* @__PURE__ */ jsx35(
2546
+ Progress,
2547
+ {
2548
+ className: cn(progressBaseClassName, className),
2549
+ indicatorClassName: cn(progressIndicatorVariantClassName.default, indicatorClassName),
2550
+ ref,
2551
+ ...props
2552
+ }
2553
+ ));
2554
+ Progress2.displayName = "Progress";
2555
+ var AdsProgress = React32.forwardRef(
2556
+ ({
2557
+ className,
2558
+ descriptionPlacement = "above",
2559
+ errorText,
2560
+ helperText,
2561
+ id,
2562
+ indicatorClassName,
2563
+ label,
2564
+ trackClassName,
2565
+ variant = "default",
2566
+ ...props
2567
+ }, ref) => {
2568
+ const description = useAdsFieldDescription({
2569
+ errorText,
2570
+ helperText,
2571
+ id
2572
+ });
2573
+ const labelId = label ? `${description.inputId}-label` : void 0;
2574
+ const helperNode = helperText ? /* @__PURE__ */ jsx35(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
2575
+ const errorNode = errorText ? /* @__PURE__ */ jsx35(AdsFieldError, { id: description.errorId, children: errorText }) : null;
2576
+ return /* @__PURE__ */ jsxs16(AdsFieldItem, { children: [
2577
+ label ? /* @__PURE__ */ jsx35(AdsFieldLabel, { id: labelId, children: label }) : null,
2578
+ descriptionPlacement === "above" ? helperNode : null,
2579
+ /* @__PURE__ */ jsx35(
2580
+ Progress,
2581
+ {
2582
+ "aria-describedby": description.describedBy,
2583
+ "aria-invalid": errorText ? true : void 0,
2584
+ "aria-labelledby": labelId,
2585
+ className: cn(progressBaseClassName, trackClassName, className),
2586
+ id: description.inputId,
2587
+ indicatorClassName: cn(
2588
+ progressIndicatorVariantClassName[variant],
2589
+ indicatorClassName
2590
+ ),
2591
+ ref,
2592
+ ...props
2593
+ }
2594
+ ),
2595
+ descriptionPlacement === "below" ? helperNode : null,
2596
+ errorNode
2597
+ ] });
2598
+ }
2599
+ );
2600
+ AdsProgress.displayName = "AdsProgress";
2601
+
2602
+ // src/components/AdsRadioGroup/index.tsx
2603
+ import * as React34 from "react";
2604
+
2605
+ // src/primitives/radio-group.tsx
2606
+ import * as React33 from "react";
2607
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
2608
+ import { Circle } from "lucide-react";
2609
+ import { jsx as jsx36 } from "react/jsx-runtime";
2610
+ var RadioGroup = React33.forwardRef(({ className, ...props }, ref) => {
2611
+ return /* @__PURE__ */ jsx36(
2612
+ RadioGroupPrimitive.Root,
2613
+ {
2614
+ className: cn("grid gap-2", className),
2615
+ ...props,
2616
+ ref
2617
+ }
2618
+ );
2619
+ });
2620
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
2621
+ var RadioGroupItem = React33.forwardRef(({ className, ...props }, ref) => {
2622
+ return /* @__PURE__ */ jsx36(
2623
+ RadioGroupPrimitive.Item,
2624
+ {
2625
+ ref,
2626
+ className: cn(
2627
+ "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
2628
+ className
2629
+ ),
2630
+ ...props,
2631
+ children: /* @__PURE__ */ jsx36(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx36(Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
2632
+ }
2633
+ );
2634
+ });
2635
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
2636
+
2637
+ // src/components/AdsRadioGroup/index.tsx
2638
+ import { jsx as jsx37, jsxs as jsxs17 } from "react/jsx-runtime";
2639
+ var radioGroupBaseClassName = "gap-3";
2640
+ var radioItemBaseClassName = "h-4 w-4 border-border bg-card text-primary shadow-[0px_1px_2px_rgba(0,0,0,0.1)] focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0";
2641
+ var RadioGroup2 = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(RadioGroup, { className: cn(radioGroupBaseClassName, className), ref, ...props }));
2642
+ RadioGroup2.displayName = "RadioGroup";
2643
+ var RadioGroupItem2 = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
2644
+ RadioGroupItem,
2645
+ {
2646
+ className: cn(radioItemBaseClassName, className),
2647
+ ref,
2648
+ ...props
2649
+ }
2650
+ ));
2651
+ RadioGroupItem2.displayName = "RadioGroupItem";
2652
+ var AdsRadioGroup = React34.forwardRef(
2653
+ ({
2654
+ children,
2655
+ className,
2656
+ descriptionPlacement = "below",
2657
+ errorText,
2658
+ helperText,
2659
+ id,
2660
+ label,
2661
+ ...props
2662
+ }, ref) => {
2663
+ const description = useAdsFieldDescription({
2664
+ errorText,
2665
+ helperText,
2666
+ id
2667
+ });
2668
+ const helperNode = helperText ? /* @__PURE__ */ jsx37(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
2669
+ const errorNode = errorText ? /* @__PURE__ */ jsx37(AdsFieldError, { id: description.errorId, children: errorText }) : null;
2670
+ return /* @__PURE__ */ jsxs17(AdsFieldItem, { children: [
2671
+ label ? /* @__PURE__ */ jsx37(AdsFieldLabel, { children: label }) : null,
2672
+ descriptionPlacement === "above" ? helperNode : null,
2673
+ /* @__PURE__ */ jsx37(
2674
+ RadioGroup2,
2675
+ {
2676
+ "aria-describedby": description.describedBy,
2677
+ className,
2678
+ ref,
2679
+ ...props,
2680
+ children
2681
+ }
2682
+ ),
2683
+ descriptionPlacement === "below" ? helperNode : null,
2684
+ errorNode
2685
+ ] });
2686
+ }
2687
+ );
2688
+ AdsRadioGroup.displayName = "AdsRadioGroup";
2689
+ var AdsRadioGroupOption = React34.forwardRef(({ className, description, id, label, value, ...props }, ref) => {
2690
+ const generatedId = React34.useId();
2691
+ const inputId = id ?? generatedId;
2692
+ return /* @__PURE__ */ jsxs17("label", { className: "flex w-full cursor-pointer items-start gap-2", htmlFor: inputId, children: [
2693
+ /* @__PURE__ */ jsx37(
2694
+ RadioGroupItem2,
2695
+ {
2696
+ className: cn(className),
2697
+ id: inputId,
2698
+ ref,
2699
+ value,
2700
+ ...props
2701
+ }
2702
+ ),
2703
+ /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
2704
+ /* @__PURE__ */ jsx37("div", { className: "text-sm leading-5 text-foreground", children: label }),
2705
+ description ? /* @__PURE__ */ jsx37(AdsFieldDescription, { className: "text-sm leading-5", children: description }) : null
2706
+ ] })
2707
+ ] });
2708
+ });
2709
+ AdsRadioGroupOption.displayName = "AdsRadioGroupOption";
2710
+ var AdsRadioGroupCardOption = React34.forwardRef(({ className, description, disabled, id, label, value, ...props }, ref) => {
2711
+ const generatedId = React34.useId();
2712
+ const inputId = id ?? generatedId;
2713
+ const titleId = `${inputId}-label`;
2714
+ const descriptionId = description ? `${inputId}-description` : void 0;
2715
+ return /* @__PURE__ */ jsxs17("div", { className: "relative", children: [
2716
+ /* @__PURE__ */ jsx37(
2717
+ RadioGroupItem2,
2718
+ {
2719
+ "aria-describedby": descriptionId,
2720
+ "aria-labelledby": titleId,
2721
+ className: "peer absolute inset-0 h-full w-full rounded-radius-md opacity-0 focus-visible:outline-none focus-visible:ring-0",
2722
+ disabled,
2723
+ id: inputId,
2724
+ ref,
2725
+ value,
2726
+ ...props
2727
+ }
2728
+ ),
2729
+ /* @__PURE__ */ jsxs17(
2730
+ "div",
2731
+ {
2732
+ className: cn(
2733
+ "flex min-h-[72px] w-full items-center gap-3 rounded-radius-md border border-border bg-card p-md shadow-[0px_1px_2px_rgba(0,0,0,0.1)] transition-colors [&_[data-indicator]]:border-border [&_[data-indicator-span]]:opacity-0 peer-data-[state=checked]:border-primary peer-data-[state=checked]:bg-accent peer-data-[state=checked]:[&_[data-indicator]]:border-primary peer-data-[state=checked]:[&_[data-indicator-span]]:opacity-100 peer-focus-visible:ring-[3px] peer-focus-visible:ring-[rgba(161,161,161,0.5)] peer-focus-visible:ring-offset-0",
2734
+ disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
2735
+ className
2736
+ ),
2737
+ children: [
2738
+ /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
2739
+ /* @__PURE__ */ jsx37("div", { className: "text-sm font-medium leading-5 text-foreground", id: titleId, children: label }),
2740
+ description ? /* @__PURE__ */ jsx37(AdsFieldDescription, { className: "text-xs leading-4", id: descriptionId, children: description }) : null
2741
+ ] }),
2742
+ /* @__PURE__ */ jsx37("div", { className: "flex h-full shrink-0 items-start justify-center pt-px", children: /* @__PURE__ */ jsx37(
2743
+ "div",
2744
+ {
2745
+ className: "grid h-4 w-4 place-content-center rounded-full border bg-card shadow-[0px_1px_2px_rgba(0,0,0,0.1)]",
2746
+ "data-indicator": true,
2747
+ children: /* @__PURE__ */ jsx37(
2748
+ "span",
2749
+ {
2750
+ className: "h-2 w-2 rounded-full bg-primary transition-opacity",
2751
+ "data-indicator-span": true
2752
+ }
2753
+ )
2754
+ }
2755
+ ) })
2756
+ ]
2757
+ }
2758
+ )
2759
+ ] });
2760
+ });
2761
+ AdsRadioGroupCardOption.displayName = "AdsRadioGroupCardOption";
2762
+
2763
+ // src/primitives/select.tsx
2764
+ import * as React35 from "react";
2765
+ import * as SelectPrimitive from "@radix-ui/react-select";
2766
+ import { Check as Check2, ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
2767
+ import { jsx as jsx38, jsxs as jsxs18 } from "react/jsx-runtime";
2768
+ var Select = SelectPrimitive.Root;
2769
+ var SelectGroup = SelectPrimitive.Group;
2770
+ var SelectValue = SelectPrimitive.Value;
2771
+ var SelectTrigger = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs18(
2772
+ SelectPrimitive.Trigger,
2773
+ {
2774
+ ref,
2775
+ className: cn(
2776
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
2777
+ className
2778
+ ),
2779
+ ...props,
2780
+ children: [
2781
+ children,
2782
+ /* @__PURE__ */ jsx38(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx38(ChevronDown2, { className: "h-4 w-4 opacity-50" }) })
2783
+ ]
2784
+ }
2785
+ ));
2786
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
2787
+ var SelectScrollUpButton = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
2788
+ SelectPrimitive.ScrollUpButton,
2789
+ {
2790
+ ref,
2791
+ className: cn(
2792
+ "flex cursor-default items-center justify-center py-1",
2793
+ className
2794
+ ),
2795
+ ...props,
2796
+ children: /* @__PURE__ */ jsx38(ChevronUp, { className: "h-4 w-4" })
2797
+ }
2798
+ ));
2799
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
2800
+ var SelectScrollDownButton = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
2801
+ SelectPrimitive.ScrollDownButton,
2802
+ {
2803
+ ref,
2804
+ className: cn(
2805
+ "flex cursor-default items-center justify-center py-1",
2806
+ className
2807
+ ),
2808
+ ...props,
2809
+ children: /* @__PURE__ */ jsx38(ChevronDown2, { className: "h-4 w-4" })
2810
+ }
2811
+ ));
2812
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
2813
+ var SelectContent = React35.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx38(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs18(
2814
+ SelectPrimitive.Content,
2815
+ {
2816
+ ref,
2817
+ className: cn(
2818
+ "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
2819
+ 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",
2820
+ className
2821
+ ),
2822
+ position,
2823
+ ...props,
2824
+ children: [
2825
+ /* @__PURE__ */ jsx38(SelectScrollUpButton, {}),
2826
+ /* @__PURE__ */ jsx38(
2827
+ SelectPrimitive.Viewport,
2828
+ {
2829
+ className: cn(
2830
+ "p-1",
2831
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
2832
+ ),
2833
+ children
2834
+ }
2835
+ ),
2836
+ /* @__PURE__ */ jsx38(SelectScrollDownButton, {})
2837
+ ]
2838
+ }
2839
+ ) }));
2840
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
2841
+ var SelectLabel = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
2842
+ SelectPrimitive.Label,
2843
+ {
2844
+ ref,
2845
+ className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
2846
+ ...props
2847
+ }
2848
+ ));
2849
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
2850
+ var SelectItem = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs18(
2851
+ SelectPrimitive.Item,
2852
+ {
2853
+ ref,
2854
+ className: cn(
2855
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2856
+ className
2857
+ ),
2858
+ ...props,
2859
+ children: [
2860
+ /* @__PURE__ */ jsx38("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx38(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx38(Check2, { className: "h-4 w-4" }) }) }),
2861
+ /* @__PURE__ */ jsx38(SelectPrimitive.ItemText, { children })
2862
+ ]
2863
+ }
2864
+ ));
2865
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
2866
+ var SelectSeparator = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
2867
+ SelectPrimitive.Separator,
2868
+ {
2869
+ ref,
2870
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
2871
+ ...props
2872
+ }
2873
+ ));
2874
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
2875
+
2876
+ // src/components/AdsSelect/index.tsx
2877
+ import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
2878
+ var selectTriggerBaseClassName = "h-9 rounded-radius-md border border-border bg-card px-md py-2 text-sm leading-5 text-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] focus:border-border-focus focus:ring-[3px] focus:ring-[rgba(161,161,161,0.5)] focus:ring-offset-0 data-[placeholder]:text-muted-foreground";
2879
+ var selectContentBaseClassName = "rounded-radius-md border-border bg-popover text-popover-foreground shadow-[0px_8px_24px_rgba(0,0,0,0.22)]";
2880
+ function AdsSelect({
2881
+ children,
2882
+ contentClassName: contentClassName3,
2883
+ descriptionPlacement = "below",
2884
+ errorText,
2885
+ helperText,
2886
+ id,
2887
+ label,
2888
+ placeholder,
2889
+ triggerClassName,
2890
+ ...props
2891
+ }) {
2892
+ const description = useAdsFieldDescription({
2893
+ describedBy: void 0,
2894
+ errorText,
2895
+ helperText,
2896
+ id
2897
+ });
2898
+ const helperNode = helperText ? /* @__PURE__ */ jsx39(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
2899
+ const errorNode = errorText ? /* @__PURE__ */ jsx39(AdsFieldError, { id: description.errorId, children: errorText }) : null;
2900
+ return /* @__PURE__ */ jsxs19(AdsFieldItem, { children: [
2901
+ label ? /* @__PURE__ */ jsx39(AdsFieldLabel, { htmlFor: description.inputId, children: label }) : null,
2902
+ descriptionPlacement === "above" ? helperNode : null,
2903
+ /* @__PURE__ */ jsxs19(Select, { ...props, children: [
2904
+ /* @__PURE__ */ jsx39(
2905
+ SelectTrigger,
2906
+ {
2907
+ "aria-describedby": description.describedBy,
2908
+ "aria-invalid": errorText ? true : void 0,
2909
+ className: cn(selectTriggerBaseClassName, triggerClassName),
2910
+ id: description.inputId,
2911
+ children: /* @__PURE__ */ jsx39(SelectValue, { placeholder })
2912
+ }
2913
+ ),
2914
+ /* @__PURE__ */ jsx39(SelectContent, { className: cn(selectContentBaseClassName, contentClassName3), children })
2915
+ ] }),
2916
+ descriptionPlacement === "below" ? helperNode : null,
2917
+ errorNode
2918
+ ] });
2919
+ }
2920
+
2921
+ // src/components/AdsSlider/index.tsx
2922
+ import * as React37 from "react";
2923
+
2924
+ // src/primitives/slider.tsx
2925
+ import * as React36 from "react";
2926
+ import * as SliderPrimitive from "@radix-ui/react-slider";
2927
+ import { jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
2928
+ var Slider = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs20(
2929
+ SliderPrimitive.Root,
2930
+ {
2931
+ ref,
2932
+ className: cn(
2933
+ "relative flex w-full touch-none select-none items-center",
2934
+ className
2935
+ ),
2936
+ ...props,
2937
+ children: [
2938
+ /* @__PURE__ */ jsx40(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx40(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
2939
+ Array.from({
2940
+ length: Array.isArray(props.value) ? props.value.length : Array.isArray(props.defaultValue) ? props.defaultValue.length : 1
2941
+ }).map((_, index) => /* @__PURE__ */ jsx40(
2942
+ SliderPrimitive.Thumb,
2943
+ {
2944
+ className: "block h-5 w-5 rounded-full border border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
2945
+ },
2946
+ index
2947
+ ))
2948
+ ]
2949
+ }
2950
+ ));
2951
+ Slider.displayName = SliderPrimitive.Root.displayName;
2952
+
2953
+ // src/components/AdsSlider/index.tsx
2954
+ import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
2955
+ var sliderBaseClassName = "py-1";
2956
+ var Slider2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(Slider, { className: cn(sliderBaseClassName, className), ref, ...props }));
2957
+ Slider2.displayName = "Slider";
2958
+ var AdsSlider = React37.forwardRef(
2959
+ ({
2960
+ className,
2961
+ descriptionPlacement = "above",
2962
+ errorText,
2963
+ helperText,
2964
+ id,
2965
+ label,
2966
+ ...props
2967
+ }, ref) => {
2968
+ const description = useAdsFieldDescription({
2969
+ errorText,
2970
+ helperText,
2971
+ id
2972
+ });
2973
+ const helperNode = helperText ? /* @__PURE__ */ jsx41(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
2974
+ const errorNode = errorText ? /* @__PURE__ */ jsx41(AdsFieldError, { id: description.errorId, children: errorText }) : null;
2975
+ return /* @__PURE__ */ jsxs21(AdsFieldItem, { children: [
2976
+ label ? /* @__PURE__ */ jsx41(AdsFieldLabel, { children: label }) : null,
2977
+ descriptionPlacement === "above" ? helperNode : null,
2978
+ /* @__PURE__ */ jsx41(
2979
+ Slider2,
2980
+ {
2981
+ "aria-describedby": description.describedBy,
2982
+ className,
2983
+ ref,
2984
+ ...props
2985
+ }
2986
+ ),
2987
+ descriptionPlacement === "below" ? helperNode : null,
2988
+ errorNode
2989
+ ] });
2990
+ }
2991
+ );
2992
+ AdsSlider.displayName = "AdsSlider";
2993
+
2994
+ // src/components/AdsSwitch/index.tsx
2995
+ import * as React39 from "react";
2996
+
2997
+ // src/primitives/switch.tsx
2998
+ import * as React38 from "react";
2999
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
3000
+ import { jsx as jsx42 } from "react/jsx-runtime";
3001
+ var Switch = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx42(
3002
+ SwitchPrimitives.Root,
3003
+ {
3004
+ className: cn(
3005
+ "peer inline-flex h-[18px] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
3006
+ className
3007
+ ),
3008
+ ...props,
3009
+ ref,
3010
+ children: /* @__PURE__ */ jsx42(
3011
+ SwitchPrimitives.Thumb,
3012
+ {
3013
+ className: cn(
3014
+ "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-[0px_1px_2px_rgba(0,0,0,0.1)] ring-0 transition-transform data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-[2px]"
3015
+ )
3016
+ }
3017
+ )
3018
+ }
3019
+ ));
3020
+ Switch.displayName = SwitchPrimitives.Root.displayName;
3021
+
3022
+ // src/components/AdsSwitch/index.tsx
3023
+ import { jsx as jsx43, jsxs as jsxs22 } from "react/jsx-runtime";
3024
+ var switchBaseClassName = "h-6 w-11 border border-transparent bg-muted shadow-[0px_1px_2px_rgba(0,0,0,0.1)] focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted";
3025
+ var Switch2 = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx43(Switch, { className: cn(switchBaseClassName, className), ref, ...props }));
3026
+ Switch2.displayName = "Switch";
3027
+ var AdsSwitch = React39.forwardRef(({ className, description, id, label, switchClassName, wrapperClassName, ...props }, ref) => {
3028
+ const generatedId = React39.useId();
3029
+ const inputId = id ?? generatedId;
3030
+ if (!label) {
3031
+ return /* @__PURE__ */ jsx43(
3032
+ Switch2,
3033
+ {
3034
+ className: cn(className, switchClassName),
3035
+ id: inputId,
3036
+ ref,
3037
+ ...props
3038
+ }
3039
+ );
3040
+ }
3041
+ return /* @__PURE__ */ jsx43("label", { className: cn("block w-full cursor-pointer", wrapperClassName), htmlFor: inputId, children: /* @__PURE__ */ jsxs22("div", { className: "flex w-full items-start gap-3", children: [
3042
+ /* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5 pt-0.5", children: [
3043
+ /* @__PURE__ */ jsx43("div", { className: "text-sm font-medium leading-5 text-foreground", children: label }),
3044
+ description ? /* @__PURE__ */ jsx43(AdsFieldDescription, { className: "text-sm leading-5", children: description }) : null
3045
+ ] }),
3046
+ /* @__PURE__ */ jsx43("div", { className: "shrink-0", children: /* @__PURE__ */ jsx43(
3047
+ Switch2,
3048
+ {
3049
+ className: cn(className, switchClassName),
3050
+ id: inputId,
3051
+ ref,
3052
+ ...props
3053
+ }
3054
+ ) })
3055
+ ] }) });
3056
+ });
3057
+ AdsSwitch.displayName = "AdsSwitch";
3058
+
3059
+ // src/components/AdsTabs/index.tsx
3060
+ import * as React41 from "react";
3061
+
3062
+ // src/primitives/tabs.tsx
3063
+ import * as React40 from "react";
3064
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3065
+ import { jsx as jsx44 } from "react/jsx-runtime";
3066
+ var Tabs = TabsPrimitive.Root;
3067
+ var TabsList = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx44(
3068
+ TabsPrimitive.List,
3069
+ {
3070
+ className: cn("inline-flex items-center", className),
3071
+ ref,
3072
+ ...props
3073
+ }
3074
+ ));
3075
+ TabsList.displayName = TabsPrimitive.List.displayName;
3076
+ var TabsTrigger = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx44(
3077
+ TabsPrimitive.Trigger,
3078
+ {
3079
+ className: cn(
3080
+ "inline-flex items-center justify-center whitespace-nowrap focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
3081
+ className
3082
+ ),
3083
+ ref,
3084
+ ...props
3085
+ }
3086
+ ));
3087
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
3088
+ var TabsContent = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx44(
3089
+ TabsPrimitive.Content,
3090
+ {
3091
+ className: cn("focus-visible:outline-none", className),
3092
+ ref,
3093
+ ...props
3094
+ }
3095
+ ));
3096
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
3097
+
3098
+ // src/components/AdsTabs/index.tsx
3099
+ import { jsx as jsx45 } from "react/jsx-runtime";
3100
+ var AdsTabs = Tabs;
3101
+ var AdsTabsList = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
3102
+ TabsList,
3103
+ {
3104
+ className: cn(
3105
+ "inline-flex items-center gap-0 rounded-radius-lg bg-muted p-[2px]",
3106
+ className
3107
+ ),
3108
+ ref,
3109
+ ...props
3110
+ }
3111
+ ));
3112
+ AdsTabsList.displayName = "AdsTabsList";
3113
+ var AdsTabsTrigger = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
3114
+ TabsTrigger,
3115
+ {
3116
+ className: cn(
3117
+ "inline-flex h-8 items-center justify-center rounded-radius-md px-md py-xs text-sm font-medium leading-5 text-foreground transition-[background-color,border-color,box-shadow] focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0 data-[state=active]:border data-[state=active]:border-border data-[state=active]:bg-card data-[state=active]:shadow-[0px_1px_1.5px_rgba(0,0,0,0.1)]",
3118
+ className
3119
+ ),
3120
+ ref,
3121
+ ...props
3122
+ }
3123
+ ));
3124
+ AdsTabsTrigger.displayName = "AdsTabsTrigger";
3125
+ var AdsTabsContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
3126
+ TabsContent,
3127
+ {
3128
+ className: cn(
3129
+ "mt-2 rounded-[12px] border border-border bg-card shadow-[0px_1px_1.5px_rgba(0,0,0,0.1)] focus-visible:ring-0",
3130
+ className
3131
+ ),
3132
+ ref,
3133
+ ...props
3134
+ }
3135
+ ));
3136
+ AdsTabsContent.displayName = "AdsTabsContent";
3137
+
3138
+ // src/components/AdsToggle/index.tsx
3139
+ import * as React43 from "react";
3140
+
3141
+ // src/primitives/toggle.tsx
3142
+ import * as React42 from "react";
3143
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
3144
+ import { jsx as jsx46 } from "react/jsx-runtime";
3145
+ var Toggle = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx46(
3146
+ TogglePrimitive.Root,
3147
+ {
3148
+ className: cn(
3149
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-[background-color,box-shadow,color] focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
3150
+ className
3151
+ ),
3152
+ ref,
3153
+ ...props
3154
+ }
3155
+ ));
3156
+ Toggle.displayName = TogglePrimitive.Root.displayName;
3157
+
3158
+ // src/components/AdsToggle/index.tsx
3159
+ import { jsx as jsx47 } from "react/jsx-runtime";
3160
+ var sizeClassName2 = {
3161
+ sm: "!h-8 px-[6px] text-sm",
3162
+ md: "!h-9 px-md text-sm",
3163
+ lg: "!h-10 px-[10px] text-sm"
3164
+ };
3165
+ var iconOnlySizeClassName = {
3166
+ sm: "!w-8",
3167
+ md: "!w-9",
3168
+ lg: "!w-10"
3169
+ };
3170
+ var variantClassName = {
3171
+ default: "border border-transparent bg-transparent text-foreground shadow-none hover:bg-muted/70 data-[state=on]:bg-muted data-[state=on]:shadow-[0px_1px_1px_rgba(0,0,0,0.1)]",
3172
+ outline: "border border-border bg-transparent text-foreground shadow-none hover:bg-muted/70 data-[state=on]:border-transparent data-[state=on]:bg-muted data-[state=on]:shadow-[0px_1px_1px_rgba(0,0,0,0.1)]"
3173
+ };
3174
+ var AdsToggle = React43.forwardRef(({ children, className, size = "md", variant = "default", ...props }, ref) => {
3175
+ const childCount = React43.Children.count(children);
3176
+ const isIconOnly = childCount === 1 && React43.isValidElement(children);
3177
+ return /* @__PURE__ */ jsx47(
3178
+ Toggle,
3179
+ {
3180
+ className: cn(
3181
+ "inline-flex shrink-0 items-center justify-center gap-2 rounded-radius-md font-medium leading-5 text-foreground focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0 disabled:opacity-50",
3182
+ sizeClassName2[size],
3183
+ variantClassName[variant],
3184
+ isIconOnly && iconOnlySizeClassName[size],
3185
+ className
3186
+ ),
3187
+ ref,
3188
+ ...props,
3189
+ children
3190
+ }
3191
+ );
3192
+ });
3193
+ AdsToggle.displayName = "AdsToggle";
3194
+
3195
+ // src/components/AdsToggleGroup/index.tsx
3196
+ import * as React45 from "react";
3197
+
3198
+ // src/primitives/toggle-group.tsx
3199
+ import * as React44 from "react";
3200
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
3201
+ import { jsx as jsx48 } from "react/jsx-runtime";
3202
+ var ToggleGroup = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
3203
+ ToggleGroupPrimitive.Root,
3204
+ {
3205
+ className: cn("inline-flex items-center justify-start", className),
3206
+ ref,
3207
+ ...props
3208
+ }
3209
+ ));
3210
+ ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
3211
+ var ToggleGroupItem = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
3212
+ ToggleGroupPrimitive.Item,
3213
+ {
3214
+ className: cn(
3215
+ "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-[background-color,box-shadow,color] focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
3216
+ className
3217
+ ),
3218
+ ref,
3219
+ ...props
3220
+ }
3221
+ ));
3222
+ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
3223
+
3224
+ // src/components/AdsToggleGroup/index.tsx
3225
+ import { jsx as jsx49 } from "react/jsx-runtime";
3226
+ var sizeClassName3 = {
3227
+ sm: "h-8 min-w-7 px-[6px] text-sm",
3228
+ md: "h-9 min-w-[34px] px-md text-sm",
3229
+ lg: "h-10 min-w-9 px-[10px] text-sm"
3230
+ };
3231
+ var variantClassName2 = {
3232
+ default: "border-transparent bg-transparent text-foreground hover:bg-muted/70 data-[state=on]:bg-muted data-[state=on]:shadow-[0px_1px_1px_rgba(0,0,0,0.1)]",
3233
+ outline: "border border-border bg-transparent text-foreground hover:bg-muted/70 data-[state=on]:border-transparent data-[state=on]:bg-muted data-[state=on]:shadow-[0px_1px_1px_rgba(0,0,0,0.1)]"
3234
+ };
3235
+ var AdsToggleGroupContext = React45.createContext(null);
3236
+ var AdsToggleGroup = React45.forwardRef(
3237
+ ({
3238
+ children,
3239
+ className,
3240
+ orientation = "horizontal",
3241
+ size = "md",
3242
+ variant = "default",
3243
+ ...props
3244
+ }, ref) => /* @__PURE__ */ jsx49(AdsToggleGroupContext.Provider, { value: { orientation, size, variant }, children: /* @__PURE__ */ jsx49(
3245
+ ToggleGroup,
3246
+ {
3247
+ className: cn(
3248
+ "inline-flex items-start justify-start",
3249
+ orientation === "vertical" ? "flex-col" : "flex-row",
3250
+ className
3251
+ ),
3252
+ orientation,
3253
+ ref,
3254
+ ...props,
3255
+ children
3256
+ }
3257
+ ) })
3258
+ );
3259
+ AdsToggleGroup.displayName = "AdsToggleGroup";
3260
+ var AdsToggleGroupItem = React45.forwardRef(({ className, size, variant, ...props }, ref) => {
3261
+ const context = React45.useContext(AdsToggleGroupContext);
3262
+ const resolvedOrientation = context?.orientation ?? "horizontal";
3263
+ const resolvedSize = size ?? context?.size ?? "md";
3264
+ const resolvedVariant = variant ?? context?.variant ?? "default";
3265
+ return /* @__PURE__ */ jsx49(
3266
+ ToggleGroupItem,
3267
+ {
3268
+ className: cn(
3269
+ "inline-flex shrink-0 items-center justify-center font-medium leading-5 text-foreground focus-visible:relative focus-visible:z-10 focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0 disabled:opacity-50",
3270
+ sizeClassName3[resolvedSize],
3271
+ variantClassName2[resolvedVariant],
3272
+ resolvedOrientation === "horizontal" ? "first:rounded-l-radius-md first:rounded-r-none last:rounded-l-none last:rounded-r-radius-md not-first:not-last:rounded-none" : "first:rounded-t-radius-md first:rounded-b-none last:rounded-t-none last:rounded-b-radius-md not-first:not-last:rounded-none",
3273
+ className
3274
+ ),
3275
+ ref,
3276
+ ...props
3277
+ }
3278
+ );
3279
+ });
3280
+ AdsToggleGroupItem.displayName = "AdsToggleGroupItem";
3281
+
3282
+ // src/components/AdsTextarea/index.tsx
3283
+ import * as React46 from "react";
3284
+ import { jsx as jsx50, jsxs as jsxs23 } from "react/jsx-runtime";
3285
+ var textareaBaseClassName = "w-full rounded-radius-md border border-border bg-card px-md py-md text-base leading-6 text-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] placeholder:text-muted-foreground focus-visible:border-border-focus focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] disabled:cursor-not-allowed disabled:opacity-50";
3286
+ var AdsTextarea = React46.forwardRef(
3287
+ ({
3288
+ action,
3289
+ className,
3290
+ descriptionPlacement = "below",
3291
+ errorText,
3292
+ helperText,
3293
+ id,
3294
+ label,
3295
+ resizable = true,
3296
+ rows = 3,
3297
+ ...props
3298
+ }, ref) => {
3299
+ const description = useAdsFieldDescription({
3300
+ describedBy: props["aria-describedby"],
3301
+ errorText,
3302
+ helperText,
3303
+ id
3304
+ });
3305
+ const helperNode = helperText ? /* @__PURE__ */ jsx50(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
3306
+ const errorNode = errorText ? /* @__PURE__ */ jsx50(AdsFieldError, { id: description.errorId, children: errorText }) : null;
3307
+ return /* @__PURE__ */ jsxs23(AdsFieldItem, { children: [
3308
+ label ? /* @__PURE__ */ jsx50(AdsFieldLabel, { htmlFor: description.inputId, children: label }) : null,
3309
+ descriptionPlacement === "above" ? helperNode : null,
3310
+ /* @__PURE__ */ jsx50(
3311
+ Textarea,
3312
+ {
3313
+ "aria-describedby": description.describedBy,
3314
+ "aria-invalid": errorText ? true : void 0,
3315
+ className: cn(
3316
+ textareaBaseClassName,
3317
+ "min-h-[80px]",
3318
+ resizable ? "resize-y" : "resize-none",
3319
+ className
3320
+ ),
3321
+ id: description.inputId,
3322
+ ref,
3323
+ rows,
3324
+ ...props
3325
+ }
3326
+ ),
3327
+ action ? /* @__PURE__ */ jsx50("div", { className: "w-full [&>*]:w-full", children: action }) : null,
3328
+ descriptionPlacement === "below" ? helperNode : null,
3329
+ errorNode
3330
+ ] });
3331
+ }
3332
+ );
3333
+ AdsTextarea.displayName = "AdsTextarea";
3334
+
3335
+ // src/components/AdsTooltip/index.tsx
3336
+ import * as React48 from "react";
3337
+
3338
+ // src/primitives/tooltip.tsx
3339
+ import * as React47 from "react";
3340
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3341
+ import { jsx as jsx51 } from "react/jsx-runtime";
3342
+ var TooltipProvider = TooltipPrimitive.Provider;
3343
+ var Tooltip = TooltipPrimitive.Root;
3344
+ var TooltipTrigger = TooltipPrimitive.Trigger;
3345
+ var TooltipArrow = TooltipPrimitive.Arrow;
3346
+ var TooltipContent = React47.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx51(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx51(
3347
+ TooltipPrimitive.Content,
3348
+ {
3349
+ className: cn(
3350
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",
3351
+ className
3352
+ ),
3353
+ ref,
3354
+ sideOffset,
3355
+ ...props
3356
+ }
3357
+ ) }));
3358
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
3359
+
3360
+ // src/components/AdsTooltip/index.tsx
3361
+ import { jsx as jsx52 } from "react/jsx-runtime";
3362
+ var tooltipContentClassName = "z-50 rounded-[6px] border-0 bg-[#844fff] px-3 py-2 text-sm font-normal leading-5 text-[#fdfdfd] shadow-[0px_8px_24px_rgba(0,0,0,0.22)]";
3363
+ var AdsTooltipProvider = TooltipProvider;
3364
+ var AdsTooltip = Tooltip;
3365
+ var AdsTooltipTrigger = TooltipTrigger;
3366
+ var AdsTooltipContent = React48.forwardRef(({ align = "center", className, sideOffset = 10, ...props }, ref) => /* @__PURE__ */ jsx52(
3367
+ TooltipContent,
3368
+ {
3369
+ align,
3370
+ className: cn(tooltipContentClassName, className),
3371
+ ref,
3372
+ sideOffset,
3373
+ ...props
3374
+ }
3375
+ ));
3376
+ AdsTooltipContent.displayName = "AdsTooltipContent";
3377
+ var AdsTooltipArrow = React48.forwardRef(({ className, height = 5, width = 10, ...props }, ref) => /* @__PURE__ */ jsx52(
3378
+ TooltipArrow,
3379
+ {
3380
+ className: cn("fill-[#844fff]", className),
3381
+ height,
3382
+ ref,
3383
+ width,
3384
+ ...props
3385
+ }
3386
+ ));
3387
+ AdsTooltipArrow.displayName = "AdsTooltipArrow";
3388
+
3389
+ // src/components/AdsToast/index.tsx
3390
+ import * as React49 from "react";
3391
+ import {
3392
+ CircleCheck as CircleCheck2,
3393
+ Info as Info2,
3394
+ LoaderCircle,
3395
+ OctagonX,
3396
+ TriangleAlert as TriangleAlert2
3397
+ } from "lucide-react";
3398
+ import { Toaster, toast } from "sonner";
3399
+ import { jsx as jsx53, jsxs as jsxs24 } from "react/jsx-runtime";
3400
+ var adsToastIconMap = {
3401
+ success: CircleCheck2,
3402
+ info: Info2,
3403
+ warning: TriangleAlert2,
3404
+ error: OctagonX,
3405
+ loading: LoaderCircle
3406
+ };
3407
+ function resolveToastIcon(intent, icon) {
3408
+ if (icon) {
3409
+ return icon;
3410
+ }
3411
+ if (intent === "default") {
3412
+ return null;
3413
+ }
3414
+ const Icon2 = adsToastIconMap[intent];
3415
+ return /* @__PURE__ */ jsx53(
3416
+ Icon2,
3417
+ {
3418
+ "aria-hidden": true,
3419
+ className: cn("h-4 w-4 shrink-0 text-foreground", intent === "loading" && "animate-spin"),
3420
+ "data-testid": "ads-toast-icon"
3421
+ }
3422
+ );
3423
+ }
3424
+ var AdsToast = React49.forwardRef(
3425
+ ({
3426
+ action,
3427
+ className,
3428
+ description,
3429
+ icon,
3430
+ intent = "default",
3431
+ title,
3432
+ ...props
3433
+ }, ref) => {
3434
+ const resolvedIcon = resolveToastIcon(intent, icon);
3435
+ return /* @__PURE__ */ jsxs24(
3436
+ "div",
3437
+ {
3438
+ className: cn(
3439
+ "flex min-w-[356px] max-w-[356px] items-center rounded-radius-lg border border-border bg-popover p-4 text-foreground",
3440
+ "shadow-[0px_10px_15px_-3px_rgba(0,0,0,0.1),0px_4px_6px_-4px_rgba(0,0,0,0.1)]",
3441
+ resolvedIcon ? "gap-1.5" : action ? "gap-6" : "gap-0",
3442
+ className
3443
+ ),
3444
+ "data-testid": "ads-toast",
3445
+ ref,
3446
+ ...props,
3447
+ children: [
3448
+ resolvedIcon,
3449
+ /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
3450
+ /* @__PURE__ */ jsx53("p", { className: "text-sm font-medium leading-5 text-foreground", children: title }),
3451
+ description ? /* @__PURE__ */ jsx53("p", { className: "text-xs font-normal leading-4 text-muted-foreground", children: description }) : null
3452
+ ] }),
3453
+ action ? /* @__PURE__ */ jsx53(
3454
+ AdsButton,
3455
+ {
3456
+ className: "shrink-0 rounded-radius-lg",
3457
+ intent: "primary",
3458
+ onClick: action.onClick,
3459
+ size: "sm",
3460
+ children: action.label
3461
+ }
3462
+ ) : null
3463
+ ]
3464
+ }
3465
+ );
3466
+ }
3467
+ );
3468
+ AdsToast.displayName = "AdsToast";
3469
+ function AdsToaster({
3470
+ containerAriaLabel,
3471
+ duration = 4e3,
3472
+ expand = false,
3473
+ gap = 16,
3474
+ position = "bottom-right",
3475
+ visibleToasts = 6,
3476
+ ...props
3477
+ }) {
3478
+ const { messages } = useAdsI18n();
3479
+ return /* @__PURE__ */ jsx53(
3480
+ Toaster,
3481
+ {
3482
+ closeButton: false,
3483
+ containerAriaLabel: containerAriaLabel ?? messages.toast.notifications,
3484
+ duration,
3485
+ expand,
3486
+ gap,
3487
+ position,
3488
+ toastOptions: {
3489
+ unstyled: true
3490
+ },
3491
+ visibleToasts,
3492
+ ...props
3493
+ }
3494
+ );
3495
+ }
3496
+ function toStageNode(intent, title, options) {
3497
+ return /* @__PURE__ */ jsx53(
3498
+ AdsToast,
3499
+ {
3500
+ action: options?.action,
3501
+ description: options?.description,
3502
+ icon: options?.icon,
3503
+ intent,
3504
+ title
3505
+ }
3506
+ );
3507
+ }
3508
+ function showAdsToast(intent, title, options) {
3509
+ const { action, description, icon, ...toastOptions } = options ?? {};
3510
+ return toast.custom(
3511
+ (id) => /* @__PURE__ */ jsx53(
3512
+ AdsToast,
3513
+ {
3514
+ action: action ? {
3515
+ ...action,
3516
+ onClick: (event) => {
3517
+ action.onClick?.(event);
3518
+ toast.dismiss(id);
3519
+ }
3520
+ } : void 0,
3521
+ description,
3522
+ icon,
3523
+ intent,
3524
+ title
3525
+ }
3526
+ ),
3527
+ {
3528
+ ...toastOptions,
3529
+ unstyled: true
3530
+ }
3531
+ );
3532
+ }
3533
+ function resolvePromiseStage(stage, value) {
3534
+ return typeof stage === "function" ? stage(value) : stage;
3535
+ }
3536
+ var AdsToastManager = Object.assign(
3537
+ (title, options) => showAdsToast("default", title, options),
3538
+ {
3539
+ success: (title, options) => showAdsToast("success", title, options),
3540
+ info: (title, options) => showAdsToast("info", title, options),
3541
+ warning: (title, options) => showAdsToast("warning", title, options),
3542
+ error: (title, options) => showAdsToast("error", title, options),
3543
+ loading: (title, options) => showAdsToast("loading", title, options),
3544
+ dismiss: (id) => toast.dismiss(id),
3545
+ promise: (promise, options) => {
3546
+ const { error, loading, success, ...toastOptions } = options;
3547
+ return toast.promise(promise, {
3548
+ ...toastOptions,
3549
+ unstyled: true,
3550
+ loading: toStageNode("loading", loading.title, loading),
3551
+ success: (value) => {
3552
+ const stage = resolvePromiseStage(success, value);
3553
+ return toStageNode("success", stage.title, stage);
3554
+ },
3555
+ error: (reason) => {
3556
+ const stage = resolvePromiseStage(error, reason);
3557
+ return toStageNode("error", stage.title, stage);
3558
+ }
3559
+ });
3560
+ }
3561
+ }
3562
+ );
3563
+
3564
+ // src/components/AdsDialog/index.tsx
3565
+ import * as React50 from "react";
3566
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3567
+ import { X } from "lucide-react";
3568
+ import { jsx as jsx54, jsxs as jsxs25 } from "react/jsx-runtime";
3569
+ var overlayClassName2 = "fixed inset-0 z-50 bg-black/80 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0";
3570
+ var contentClassName2 = "fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-[423px] -translate-x-1/2 -translate-y-1/2 gap-lg rounded-radius-md border border-border bg-card p-xl text-foreground shadow-[0px_4px_6px_-4px_rgba(0,0,0,0.1),0px_10px_15px_-3px_rgba(0,0,0,0.1)] duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]";
3571
+ var closeButtonClassName = "absolute right-xl top-xl inline-flex h-6 w-6 items-center justify-center rounded-sm text-foreground/80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card disabled:pointer-events-none";
3572
+ var Dialog = DialogPrimitive.Root;
3573
+ var DialogTrigger = DialogPrimitive.Trigger;
3574
+ var DialogPortal = DialogPrimitive.Portal;
3575
+ var DialogOverlay = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx54(
3576
+ DialogPrimitive.Overlay,
3577
+ {
3578
+ className: cn(overlayClassName2, className),
3579
+ ref,
3580
+ ...props
3581
+ }
3582
+ ));
3583
+ DialogOverlay.displayName = "DialogOverlay";
3584
+ var DialogClose = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx54(
3585
+ DialogPrimitive.Close,
3586
+ {
3587
+ className: cn(
3588
+ "inline-flex items-center justify-center rounded-radius-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card disabled:pointer-events-none",
3589
+ className
3590
+ ),
3591
+ ref,
3592
+ ...props
3593
+ }
3594
+ ));
3595
+ DialogClose.displayName = "DialogClose";
3596
+ var DialogContent = React50.forwardRef(({ children, className, closeLabel, hideCloseButton = false, ...props }, ref) => {
3597
+ const { messages } = useAdsI18n();
3598
+ const resolvedCloseLabel = closeLabel ?? messages.dialog.close;
3599
+ return /* @__PURE__ */ jsxs25(DialogPortal, { children: [
3600
+ /* @__PURE__ */ jsx54(DialogOverlay, {}),
3601
+ /* @__PURE__ */ jsxs25(
3602
+ DialogPrimitive.Content,
3603
+ {
3604
+ className: cn(contentClassName2, className),
3605
+ ref,
3606
+ ...props,
3607
+ children: [
3608
+ children,
3609
+ !hideCloseButton ? /* @__PURE__ */ jsxs25(
3610
+ DialogPrimitive.Close,
3611
+ {
3612
+ "aria-label": resolvedCloseLabel,
3613
+ className: closeButtonClassName,
3614
+ children: [
3615
+ /* @__PURE__ */ jsx54(X, { "aria-hidden": true, className: "h-4 w-4" }),
3616
+ /* @__PURE__ */ jsx54("span", { className: "sr-only", children: resolvedCloseLabel })
3617
+ ]
3618
+ }
3619
+ ) : null
3620
+ ]
3621
+ }
3622
+ )
3623
+ ] });
3624
+ });
3625
+ DialogContent.displayName = "DialogContent";
3626
+ var DialogHeader = React50.forwardRef(
3627
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx54(
3628
+ "div",
3629
+ {
3630
+ className: cn("flex flex-col gap-sm pr-8 text-left", className),
3631
+ ref,
3632
+ ...props
3633
+ }
3634
+ )
3635
+ );
3636
+ DialogHeader.displayName = "DialogHeader";
3637
+ var DialogFooter = React50.forwardRef(
3638
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx54(
3639
+ "div",
3640
+ {
3641
+ className: cn(
3642
+ "flex flex-col-reverse gap-sm sm:flex-row sm:justify-end",
3643
+ className
3644
+ ),
3645
+ ref,
3646
+ ...props
3647
+ }
3648
+ )
3649
+ );
3650
+ DialogFooter.displayName = "DialogFooter";
3651
+ var DialogTitle = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx54(
3652
+ DialogPrimitive.Title,
3653
+ {
3654
+ className: cn("text-lg font-semibold leading-7 text-foreground", className),
3655
+ ref,
3656
+ ...props
3657
+ }
3658
+ ));
3659
+ DialogTitle.displayName = "DialogTitle";
3660
+ var DialogDescription = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx54(
3661
+ DialogPrimitive.Description,
3662
+ {
3663
+ className: cn("text-sm leading-5 text-muted-foreground", className),
3664
+ ref,
3665
+ ...props
3666
+ }
3667
+ ));
3668
+ DialogDescription.displayName = "DialogDescription";
3669
+ var AdsDialog = Dialog;
3670
+ var AdsDialogTrigger = DialogTrigger;
3671
+ var AdsDialogPortal = DialogPortal;
3672
+ var AdsDialogOverlay = DialogOverlay;
3673
+ var AdsDialogClose = DialogClose;
3674
+ var AdsDialogContent = DialogContent;
3675
+ var AdsDialogHeader = DialogHeader;
3676
+ var AdsDialogFooter = DialogFooter;
3677
+ var AdsDialogTitle = DialogTitle;
3678
+ var AdsDialogDescription = DialogDescription;
3679
+
3680
+ // src/components/AdsEmpty/index.tsx
3681
+ import { cva as cva9 } from "class-variance-authority";
3682
+ import { jsx as jsx55 } from "react/jsx-runtime";
3683
+ var adsEmptyVariants = cva9(
3684
+ "flex w-full flex-col items-center justify-center gap-6 p-12 text-center",
3685
+ {
3686
+ variants: {
3687
+ variant: {
3688
+ default: "bg-transparent",
3689
+ outline: "rounded-radius-lg border border-dashed border-border",
3690
+ background: "rounded-radius-lg bg-popover"
3691
+ }
3692
+ },
3693
+ defaultVariants: {
3694
+ variant: "default"
3695
+ }
3696
+ }
3697
+ );
3698
+ function AdsEmpty({ className, variant, ...props }) {
3699
+ return /* @__PURE__ */ jsx55(
3700
+ "div",
3701
+ {
3702
+ "data-slot": "ads-empty",
3703
+ className: cn(adsEmptyVariants({ variant }), className),
3704
+ ...props
3705
+ }
3706
+ );
3707
+ }
3708
+ function AdsEmptyHeader({ className, ...props }) {
3709
+ return /* @__PURE__ */ jsx55(
3710
+ "div",
3711
+ {
3712
+ "data-slot": "ads-empty-header",
3713
+ className: cn("flex w-full max-w-[384px] flex-col items-center gap-2", className),
3714
+ ...props
3715
+ }
3716
+ );
3717
+ }
3718
+ function AdsEmptyMedia({ className, ...props }) {
3719
+ return /* @__PURE__ */ jsx55(
3720
+ "div",
3721
+ {
3722
+ "data-slot": "ads-empty-media",
3723
+ "data-testid": "ads-empty-media",
3724
+ className: cn(
3725
+ "flex size-10 items-center justify-center rounded-radius-lg bg-muted text-muted-foreground [&_svg]:size-6 [&_svg]:shrink-0",
3726
+ className
3727
+ ),
3728
+ ...props
3729
+ }
3730
+ );
3731
+ }
3732
+ function AdsEmptyTitle({ className, ...props }) {
3733
+ return /* @__PURE__ */ jsx55(
3734
+ "div",
3735
+ {
3736
+ "data-slot": "ads-empty-title",
3737
+ className: cn("text-lg font-medium leading-7 text-foreground", className),
3738
+ ...props
3739
+ }
3740
+ );
3741
+ }
3742
+ function AdsEmptyDescription({ className, ...props }) {
3743
+ return /* @__PURE__ */ jsx55(
3744
+ "p",
3745
+ {
3746
+ "data-slot": "ads-empty-description",
3747
+ className: cn("max-w-[384px] text-sm leading-5 text-muted-foreground text-center", className),
3748
+ ...props
3749
+ }
3750
+ );
3751
+ }
3752
+ function AdsEmptyContent({ className, ...props }) {
3753
+ return /* @__PURE__ */ jsx55(
3754
+ "div",
3755
+ {
3756
+ "data-slot": "ads-empty-content",
3757
+ className: cn("flex w-full max-w-[384px] flex-col items-center gap-4", className),
3758
+ ...props
3759
+ }
3760
+ );
3761
+ }
3762
+ function AdsEmptyActions({ className, ...props }) {
3763
+ return /* @__PURE__ */ jsx55(
3764
+ "div",
3765
+ {
3766
+ "data-slot": "ads-empty-actions",
3767
+ className: cn("flex flex-wrap items-center justify-center gap-3", className),
3768
+ ...props
3769
+ }
3770
+ );
3771
+ }
3772
+ function AdsEmptyFooter({ className, ...props }) {
3773
+ return /* @__PURE__ */ jsx55(
3774
+ "div",
3775
+ {
3776
+ "data-slot": "ads-empty-footer",
3777
+ className: cn("text-sm font-medium leading-5 text-muted-foreground", className),
3778
+ ...props
3779
+ }
3780
+ );
3781
+ }
3782
+
3783
+ // src/components/AdsTable/index.tsx
3784
+ import * as React52 from "react";
3785
+
3786
+ // src/primitives/table.tsx
3787
+ import * as React51 from "react";
3788
+ import { jsx as jsx56 } from "react/jsx-runtime";
3789
+ var Table = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx56("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx56(
3790
+ "table",
3791
+ {
3792
+ ref,
3793
+ className: cn("w-full caption-bottom text-sm", className),
3794
+ ...props
3795
+ }
3796
+ ) }));
3797
+ Table.displayName = "Table";
3798
+ var TableHeader = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx56("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
3799
+ TableHeader.displayName = "TableHeader";
3800
+ var TableBody = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx56(
3801
+ "tbody",
3802
+ {
3803
+ ref,
3804
+ className: cn("[&_tr:last-child]:border-0", className),
3805
+ ...props
3806
+ }
3807
+ ));
3808
+ TableBody.displayName = "TableBody";
3809
+ var TableFooter = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx56(
3810
+ "tfoot",
3811
+ {
3812
+ ref,
3813
+ className: cn(
3814
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
3815
+ className
3816
+ ),
3817
+ ...props
3818
+ }
3819
+ ));
3820
+ TableFooter.displayName = "TableFooter";
3821
+ var TableRow = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx56(
3822
+ "tr",
3823
+ {
3824
+ ref,
3825
+ className: cn(
3826
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
3827
+ className
3828
+ ),
3829
+ ...props
3830
+ }
3831
+ ));
3832
+ TableRow.displayName = "TableRow";
3833
+ var TableHead = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx56(
3834
+ "th",
3835
+ {
3836
+ ref,
3837
+ className: cn(
3838
+ "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
3839
+ className
3840
+ ),
3841
+ ...props
3842
+ }
3843
+ ));
3844
+ TableHead.displayName = "TableHead";
3845
+ var TableCell = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx56(
3846
+ "td",
3847
+ {
3848
+ ref,
3849
+ className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
3850
+ ...props
3851
+ }
3852
+ ));
3853
+ TableCell.displayName = "TableCell";
3854
+ var TableCaption = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx56(
3855
+ "caption",
3856
+ {
3857
+ ref,
3858
+ className: cn("mt-4 text-sm text-muted-foreground", className),
3859
+ ...props
3860
+ }
3861
+ ));
3862
+ TableCaption.displayName = "TableCaption";
3863
+
3864
+ // src/components/AdsTable/index.tsx
3865
+ import { jsx as jsx57 } from "react/jsx-runtime";
3866
+ var AdsTable = React52.forwardRef(
3867
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx57("div", { className: "w-full overflow-hidden rounded-radius-md border border-border bg-card", children: /* @__PURE__ */ jsx57(
3868
+ Table,
3869
+ {
3870
+ ref,
3871
+ className: cn("w-full caption-bottom text-sm text-foreground", className),
3872
+ ...props
3873
+ }
3874
+ ) })
3875
+ );
3876
+ AdsTable.displayName = "AdsTable";
3877
+ var AdsTableHeader = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx57(
3878
+ TableHeader,
3879
+ {
3880
+ ref,
3881
+ className: cn("[&_tr]:border-border", className),
3882
+ ...props
3883
+ }
3884
+ ));
3885
+ AdsTableHeader.displayName = "AdsTableHeader";
3886
+ var AdsTableBody = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx57(
3887
+ TableBody,
3888
+ {
3889
+ ref,
3890
+ className: cn("[&_tr:last-child]:border-0", className),
3891
+ ...props
3892
+ }
3893
+ ));
3894
+ AdsTableBody.displayName = "AdsTableBody";
3895
+ var AdsTableFooter = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx57(
3896
+ TableFooter,
3897
+ {
3898
+ ref,
3899
+ className: cn("border-border bg-card text-foreground", className),
3900
+ ...props
3901
+ }
3902
+ ));
3903
+ AdsTableFooter.displayName = "AdsTableFooter";
3904
+ var AdsTableRow = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx57(
3905
+ TableRow,
3906
+ {
3907
+ ref,
3908
+ className: cn(
3909
+ "border-border hover:bg-transparent data-[state=selected]:bg-accent/30",
3910
+ className
3911
+ ),
3912
+ ...props
3913
+ }
3914
+ ));
3915
+ AdsTableRow.displayName = "AdsTableRow";
3916
+ var AdsTableHead = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx57(
3917
+ TableHead,
3918
+ {
3919
+ ref,
3920
+ className: cn(
3921
+ "h-10 px-2 align-middle text-sm font-medium leading-5 text-foreground [&:has([role=checkbox])]:pr-0",
3922
+ className
3923
+ ),
3924
+ ...props
3925
+ }
3926
+ ));
3927
+ AdsTableHead.displayName = "AdsTableHead";
3928
+ var AdsTableCell = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx57(
3929
+ TableCell,
3930
+ {
3931
+ ref,
3932
+ className: cn(
3933
+ "p-2 align-middle text-sm font-normal leading-5 text-foreground [&:has([role=checkbox])]:pr-0",
3934
+ className
3935
+ ),
3936
+ ...props
3937
+ }
3938
+ ));
3939
+ AdsTableCell.displayName = "AdsTableCell";
3940
+ var AdsTableCaption = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx57(
3941
+ TableCaption,
3942
+ {
3943
+ ref,
3944
+ className: cn("text-sm leading-5 text-muted-foreground", className),
3945
+ ...props
3946
+ }
3947
+ ));
3948
+ AdsTableCaption.displayName = "AdsTableCaption";
3949
+ export {
3950
+ AdsAccordion,
3951
+ Alert2 as AdsAlert,
3952
+ AlertDescription2 as AdsAlertDescription,
3953
+ AdsAlertDialog,
3954
+ AdsAlertDialogAction,
3955
+ AdsAlertDialogCancel,
3956
+ AdsAlertDialogContent,
3957
+ AdsAlertDialogDescription,
3958
+ AdsAlertDialogFooter,
3959
+ AdsAlertDialogHeader,
3960
+ AdsAlertDialogOverlay,
3961
+ AdsAlertDialogPortal,
3962
+ AdsAlertDialogTitle,
3963
+ AdsAlertDialogTrigger,
3964
+ AlertTitle2 as AdsAlertTitle,
3965
+ AdsBadge,
3966
+ AdsBreadcrumb,
3967
+ AdsBreadcrumbEllipsis,
3968
+ AdsBreadcrumbItem,
3969
+ AdsBreadcrumbLink,
3970
+ AdsBreadcrumbList,
3971
+ AdsBreadcrumbPage,
3972
+ AdsBreadcrumbSeparator,
3973
+ AdsButton,
3974
+ AdsButtonGroup,
3975
+ AdsButtonGroupInput,
3976
+ AdsButtonGroupSeparator,
3977
+ AdsButtonGroupText,
3978
+ AdsCheckbox,
3979
+ AdsDialog,
3980
+ AdsDialogClose,
3981
+ AdsDialogContent,
3982
+ AdsDialogDescription,
3983
+ AdsDialogFooter,
3984
+ AdsDialogHeader,
3985
+ AdsDialogOverlay,
3986
+ AdsDialogPortal,
3987
+ AdsDialogTitle,
3988
+ AdsDialogTrigger,
3989
+ AdsEmpty,
3990
+ AdsEmptyActions,
3991
+ AdsEmptyContent,
3992
+ AdsEmptyDescription,
3993
+ AdsEmptyFooter,
3994
+ AdsEmptyHeader,
3995
+ AdsEmptyMedia,
3996
+ AdsEmptyTitle,
3997
+ AdsField,
3998
+ AdsFieldActions,
3999
+ AdsFieldCheckboxRow,
4000
+ AdsFieldChoiceCard,
4001
+ AdsFieldDescription,
4002
+ AdsFieldError,
4003
+ AdsFieldGroup,
4004
+ AdsFieldHeader,
4005
+ AdsFieldItem,
4006
+ AdsFieldLabel,
4007
+ AdsFieldLegend,
4008
+ AdsFieldSeparator,
4009
+ AdsFieldSet,
4010
+ AdsI18nProvider,
4011
+ AdsInput,
4012
+ AdsInputGroup,
4013
+ AdsInputGroupInput,
4014
+ AdsInputGroupTextarea,
4015
+ AdsInputOTP,
4016
+ AdsInputOTPGroup,
4017
+ AdsInputOTPSeparator,
4018
+ AdsInputOTPSlot,
4019
+ AdsPagination,
4020
+ AdsPaginationContent,
4021
+ AdsPaginationEllipsis,
4022
+ AdsPaginationItem,
4023
+ AdsPaginationLink,
4024
+ AdsPaginationNext,
4025
+ AdsPaginationPrevious,
4026
+ AdsPopover,
4027
+ AdsPopoverBody,
4028
+ AdsPopoverContent,
4029
+ AdsPopoverDescription,
4030
+ AdsPopoverHeader,
4031
+ AdsPopoverTitle,
4032
+ AdsPopoverTrigger,
4033
+ AdsProgress,
4034
+ AdsRadioGroup,
4035
+ AdsRadioGroupCardOption,
4036
+ AdsRadioGroupOption,
4037
+ AdsSelect,
4038
+ SelectContent as AdsSelectContent,
4039
+ SelectGroup as AdsSelectGroup,
4040
+ SelectItem as AdsSelectItem,
4041
+ SelectLabel as AdsSelectLabel,
4042
+ Select as AdsSelectRoot,
4043
+ SelectScrollDownButton as AdsSelectScrollDownButton,
4044
+ SelectScrollUpButton as AdsSelectScrollUpButton,
4045
+ SelectSeparator as AdsSelectSeparator,
4046
+ SelectTrigger as AdsSelectTrigger,
4047
+ SelectValue as AdsSelectValue,
4048
+ AdsSeparator,
4049
+ AdsSkeleton,
4050
+ AdsSlider,
4051
+ AdsSwitch,
4052
+ AdsTable,
4053
+ AdsTableBody,
4054
+ AdsTableCaption,
4055
+ AdsTableCell,
4056
+ AdsTableFooter,
4057
+ AdsTableHead,
4058
+ AdsTableHeader,
4059
+ AdsTableRow,
4060
+ AdsTabs,
4061
+ AdsTabsContent,
4062
+ AdsTabsList,
4063
+ AdsTabsTrigger,
4064
+ AdsTextarea,
4065
+ AdsToast,
4066
+ AdsToastManager,
4067
+ AdsToaster,
4068
+ AdsToggle,
4069
+ AdsToggleGroup,
4070
+ AdsToggleGroupItem,
4071
+ AdsTooltip,
4072
+ AdsTooltipArrow,
4073
+ AdsTooltipContent,
4074
+ AdsTooltipProvider,
4075
+ AdsTooltipTrigger,
4076
+ adsDefaultMessages,
4077
+ designTokens,
4078
+ useAdsI18n
4079
+ };
4080
+ //# sourceMappingURL=index.js.map