@dev-dga/react 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/components/Button/Button.tsx
2
2
  import "react";
3
3
  import { Slot as SlotPrimitive } from "radix-ui";
4
- import { cva } from "class-variance-authority";
4
+ import { cva as cva2 } from "class-variance-authority";
5
5
 
6
6
  // src/utils/cn.ts
7
7
  import { clsx } from "clsx";
@@ -9,151 +9,20 @@ function cn(...inputs) {
9
9
  return clsx(inputs);
10
10
  }
11
11
 
12
- // src/internal/icons/index.tsx
13
- import { jsx, jsxs } from "react/jsx-runtime";
14
- function Spinner(props) {
15
- return /* @__PURE__ */ jsx(
16
- "svg",
17
- {
18
- xmlns: "http://www.w3.org/2000/svg",
19
- width: "1em",
20
- height: "1em",
21
- viewBox: "0 0 24 24",
22
- fill: "none",
23
- stroke: "currentColor",
24
- strokeWidth: "2",
25
- strokeLinecap: "round",
26
- strokeLinejoin: "round",
27
- className: "ddga-spinner",
28
- ...props,
29
- children: /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
30
- }
31
- );
32
- }
33
- function Check(props) {
34
- return /* @__PURE__ */ jsx(
35
- "svg",
36
- {
37
- xmlns: "http://www.w3.org/2000/svg",
38
- width: "1em",
39
- height: "1em",
40
- viewBox: "0 0 24 24",
41
- fill: "none",
42
- stroke: "currentColor",
43
- strokeWidth: "3",
44
- strokeLinecap: "round",
45
- strokeLinejoin: "round",
46
- ...props,
47
- children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
48
- }
49
- );
50
- }
51
- function Minus(props) {
52
- return /* @__PURE__ */ jsx(
53
- "svg",
54
- {
55
- xmlns: "http://www.w3.org/2000/svg",
56
- width: "1em",
57
- height: "1em",
58
- viewBox: "0 0 24 24",
59
- fill: "none",
60
- stroke: "currentColor",
61
- strokeWidth: "3",
62
- strokeLinecap: "round",
63
- strokeLinejoin: "round",
64
- ...props,
65
- children: /* @__PURE__ */ jsx("path", { d: "M5 12h14" })
66
- }
67
- );
68
- }
69
- function Info(props) {
70
- return /* @__PURE__ */ jsxs(
71
- "svg",
72
- {
73
- xmlns: "http://www.w3.org/2000/svg",
74
- width: "1em",
75
- height: "1em",
76
- viewBox: "0 0 24 24",
77
- fill: "none",
78
- stroke: "currentColor",
79
- strokeWidth: "2",
80
- strokeLinecap: "round",
81
- strokeLinejoin: "round",
82
- ...props,
83
- children: [
84
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
85
- /* @__PURE__ */ jsx("path", { d: "M12 16v-4" }),
86
- /* @__PURE__ */ jsx("path", { d: "M12 8h.01" })
87
- ]
88
- }
89
- );
90
- }
91
- function AlertTriangle(props) {
92
- return /* @__PURE__ */ jsxs(
93
- "svg",
94
- {
95
- xmlns: "http://www.w3.org/2000/svg",
96
- width: "1em",
97
- height: "1em",
98
- viewBox: "0 0 24 24",
99
- fill: "none",
100
- stroke: "currentColor",
101
- strokeWidth: "2",
102
- strokeLinecap: "round",
103
- strokeLinejoin: "round",
104
- ...props,
105
- children: [
106
- /* @__PURE__ */ jsx("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
107
- /* @__PURE__ */ jsx("path", { d: "M12 9v4" }),
108
- /* @__PURE__ */ jsx("path", { d: "M12 17h.01" })
109
- ]
110
- }
111
- );
112
- }
113
- function AlertCircle(props) {
114
- return /* @__PURE__ */ jsxs(
115
- "svg",
116
- {
117
- xmlns: "http://www.w3.org/2000/svg",
118
- width: "1em",
119
- height: "1em",
120
- viewBox: "0 0 24 24",
121
- fill: "none",
122
- stroke: "currentColor",
123
- strokeWidth: "2",
124
- strokeLinecap: "round",
125
- strokeLinejoin: "round",
126
- ...props,
127
- children: [
128
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
129
- /* @__PURE__ */ jsx("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
130
- /* @__PURE__ */ jsx("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
131
- ]
132
- }
133
- );
134
- }
135
- function Close(props) {
136
- return /* @__PURE__ */ jsxs(
137
- "svg",
138
- {
139
- xmlns: "http://www.w3.org/2000/svg",
140
- width: "1em",
141
- height: "1em",
142
- viewBox: "0 0 24 24",
143
- fill: "none",
144
- stroke: "currentColor",
145
- strokeWidth: "2",
146
- strokeLinecap: "round",
147
- strokeLinejoin: "round",
148
- ...props,
149
- children: [
150
- /* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }),
151
- /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
152
- ]
12
+ // src/components/Spinner/Spinner.tsx
13
+ import { cva } from "class-variance-authority";
14
+ import { jsx } from "react/jsx-runtime";
15
+ var spinnerVariants = cva("ddga-spinner", {
16
+ variants: {
17
+ size: {
18
+ sm: "ddga-spinner--sm",
19
+ md: "ddga-spinner--md",
20
+ lg: "ddga-spinner--lg"
153
21
  }
154
- );
155
- }
156
- function ChevronDown(props) {
22
+ }
23
+ });
24
+ function Spinner({ size, className, "aria-label": ariaLabel, ...props }) {
25
+ const hidden = props["aria-hidden"] === true || props["aria-hidden"] === "true";
157
26
  return /* @__PURE__ */ jsx(
158
27
  "svg",
159
28
  {
@@ -166,22 +35,31 @@ function ChevronDown(props) {
166
35
  strokeWidth: "2",
167
36
  strokeLinecap: "round",
168
37
  strokeLinejoin: "round",
38
+ role: hidden ? void 0 : "status",
39
+ "aria-label": hidden ? void 0 : ariaLabel ?? "Loading",
40
+ "data-slot": "spinner",
41
+ className: cn(spinnerVariants({ size }), className),
169
42
  ...props,
170
- children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
43
+ children: /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
171
44
  }
172
45
  );
173
46
  }
174
47
 
175
48
  // src/components/Button/Button.tsx
176
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
177
- var buttonVariants = cva("ddga-button", {
49
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
50
+ var buttonVariants = cva2("ddga-button", {
178
51
  variants: {
179
52
  variant: {
180
53
  primary: "ddga-button--primary",
181
54
  secondary: "ddga-button--secondary",
182
55
  outline: "ddga-button--outline",
183
56
  ghost: "ddga-button--ghost",
184
- destructive: "ddga-button--destructive"
57
+ destructive: "ddga-button--destructive",
58
+ // Destructive sub-variants — match the DGA library's full destructive
59
+ // family (des-primary maps to plain `destructive` above).
60
+ "destructive-outline": "ddga-button--destructive-outline",
61
+ "destructive-subtle": "ddga-button--destructive-subtle",
62
+ "destructive-ghost": "ddga-button--destructive-ghost"
185
63
  },
186
64
  size: {
187
65
  sm: "ddga-button--sm",
@@ -192,6 +70,16 @@ var buttonVariants = cva("ddga-button", {
192
70
  },
193
71
  fullWidth: {
194
72
  true: "ddga-button--full-width"
73
+ },
74
+ /**
75
+ * Use on dark / branded colored backgrounds. Visually inverts non-filled
76
+ * variants (`outline`, `ghost`, destructive's outline/ghost forms) so
77
+ * text + border stay visible against the surface. Filled variants
78
+ * (`primary`, `secondary`, `destructive`, `destructive-subtle`) ignore
79
+ * it — they already carry their own background contrast.
80
+ */
81
+ inverted: {
82
+ true: "ddga-button--inverted"
195
83
  }
196
84
  },
197
85
  compoundVariants: [],
@@ -204,6 +92,7 @@ function Button({
204
92
  variant,
205
93
  size,
206
94
  fullWidth,
95
+ inverted,
207
96
  loading,
208
97
  disabled,
209
98
  startIcon,
@@ -224,7 +113,7 @@ function Button({
224
113
  }
225
114
  const isDisabled = disabled || loading;
226
115
  const Comp = asChild ? SlotPrimitive.Slot : "button";
227
- return /* @__PURE__ */ jsxs2(
116
+ return /* @__PURE__ */ jsxs(
228
117
  Comp,
229
118
  {
230
119
  ...asChild ? {} : { type, disabled: isDisabled },
@@ -233,7 +122,7 @@ function Button({
233
122
  "aria-busy": loading || void 0,
234
123
  "data-slot": "button",
235
124
  className: cn(
236
- buttonVariants({ variant, size, fullWidth }),
125
+ buttonVariants({ variant, size, fullWidth, inverted }),
237
126
  loading && "ddga-button--loading",
238
127
  className
239
128
  ),
@@ -254,7 +143,7 @@ function Button({
254
143
  }
255
144
 
256
145
  // src/components/Input/Input.tsx
257
- import { cva as cva2 } from "class-variance-authority";
146
+ import { cva as cva3 } from "class-variance-authority";
258
147
 
259
148
  // src/field/use-field-a11y.ts
260
149
  import { useId } from "react";
@@ -307,8 +196,8 @@ function FieldMessage({ id, variant, children }) {
307
196
  }
308
197
 
309
198
  // src/components/Input/Input.tsx
310
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
311
- var inputVariants = cva2("ddga-input", {
199
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
200
+ var inputVariants = cva3("ddga-input", {
312
201
  variants: {
313
202
  size: {
314
203
  sm: "ddga-input--sm",
@@ -346,12 +235,12 @@ function Input({
346
235
  "aria-label": props["aria-label"],
347
236
  "aria-labelledby": props["aria-labelledby"]
348
237
  });
349
- return /* @__PURE__ */ jsxs3("div", { "data-slot": "input-field", className: "ddga-field", children: [
350
- label && /* @__PURE__ */ jsxs3("label", { htmlFor: fieldId, className: "ddga-input__label", children: [
238
+ return /* @__PURE__ */ jsxs2("div", { "data-slot": "input-field", className: "ddga-field", children: [
239
+ label && /* @__PURE__ */ jsxs2("label", { htmlFor: fieldId, className: "ddga-input__label", children: [
351
240
  label,
352
241
  required && /* @__PURE__ */ jsx4("span", { "aria-hidden": "true", className: "ddga-input__required", children: "*" })
353
242
  ] }),
354
- /* @__PURE__ */ jsxs3(
243
+ /* @__PURE__ */ jsxs2(
355
244
  "div",
356
245
  {
357
246
  "data-slot": "input-control",
@@ -392,9 +281,9 @@ function Input({
392
281
  }
393
282
 
394
283
  // src/components/Textarea/Textarea.tsx
395
- import { cva as cva3 } from "class-variance-authority";
396
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
397
- var textareaVariants = cva3("ddga-textarea", {
284
+ import { cva as cva4 } from "class-variance-authority";
285
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
286
+ var textareaVariants = cva4("ddga-textarea", {
398
287
  variants: {
399
288
  size: {
400
289
  sm: "ddga-textarea--sm",
@@ -439,8 +328,8 @@ function Textarea({
439
328
  "aria-label": props["aria-label"],
440
329
  "aria-labelledby": props["aria-labelledby"]
441
330
  });
442
- return /* @__PURE__ */ jsxs4("div", { "data-slot": "textarea-field", className: "ddga-field", children: [
443
- label && /* @__PURE__ */ jsxs4("label", { htmlFor: fieldId, className: "ddga-textarea__label", children: [
331
+ return /* @__PURE__ */ jsxs3("div", { "data-slot": "textarea-field", className: "ddga-field", children: [
332
+ label && /* @__PURE__ */ jsxs3("label", { htmlFor: fieldId, className: "ddga-textarea__label", children: [
444
333
  label,
445
334
  required && /* @__PURE__ */ jsx5("span", { "aria-hidden": "true", className: "ddga-textarea__required", children: "*" })
446
335
  ] }),
@@ -462,104 +351,287 @@ function Textarea({
462
351
 
463
352
  // src/components/Checkbox/Checkbox.tsx
464
353
  import { Checkbox as CheckboxPrimitive } from "radix-ui";
465
- import { cva as cva4 } from "class-variance-authority";
466
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
467
- var checkboxVariants = cva4("ddga-checkbox", {
468
- variants: {
469
- size: {
470
- sm: "ddga-checkbox--sm",
471
- md: "ddga-checkbox--md"
472
- },
473
- error: {
474
- true: "ddga-checkbox--error"
354
+ import { cva as cva5 } from "class-variance-authority";
355
+
356
+ // src/internal/icons/index.tsx
357
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
358
+ function Check(props) {
359
+ return /* @__PURE__ */ jsx6(
360
+ "svg",
361
+ {
362
+ xmlns: "http://www.w3.org/2000/svg",
363
+ width: "1em",
364
+ height: "1em",
365
+ viewBox: "0 0 24 24",
366
+ fill: "none",
367
+ stroke: "currentColor",
368
+ strokeWidth: "3",
369
+ strokeLinecap: "round",
370
+ strokeLinejoin: "round",
371
+ ...props,
372
+ children: /* @__PURE__ */ jsx6("path", { d: "M20 6 9 17l-5-5" })
475
373
  }
476
- },
477
- defaultVariants: {
478
- size: "md"
479
- }
480
- });
481
- function Checkbox({
482
- id: externalId,
483
- label,
484
- helperText,
485
- errorMessage,
486
- error,
487
- size,
488
- required,
489
- className,
490
- ...props
491
- }) {
492
- const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
493
- name: "Checkbox",
494
- id: externalId,
495
- label,
496
- error,
497
- errorMessage,
498
- helperText,
499
- "aria-label": props["aria-label"],
500
- "aria-labelledby": props["aria-labelledby"]
501
- });
502
- return /* @__PURE__ */ jsxs5("div", { "data-slot": "checkbox-field", className: "ddga-field", children: [
503
- /* @__PURE__ */ jsxs5("div", { className: "ddga-checkbox-row", children: [
504
- /* @__PURE__ */ jsx6(
505
- CheckboxPrimitive.Root,
506
- {
507
- ...props,
508
- ...controlProps,
509
- "data-slot": "checkbox",
510
- required,
511
- className: cn(checkboxVariants({ size, error: hasError }), className),
512
- children: /* @__PURE__ */ jsxs5(
513
- CheckboxPrimitive.Indicator,
514
- {
515
- "data-slot": "checkbox-indicator",
516
- className: "ddga-checkbox__indicator",
517
- children: [
518
- /* @__PURE__ */ jsx6(Check, { className: "ddga-checkbox__check", "aria-hidden": "true" }),
519
- /* @__PURE__ */ jsx6(Minus, { className: "ddga-checkbox__minus", "aria-hidden": "true" })
520
- ]
521
- }
522
- )
523
- }
524
- ),
525
- label && /* @__PURE__ */ jsxs5("label", { htmlFor: fieldId, className: "ddga-checkbox__label", children: [
526
- label,
527
- required && /* @__PURE__ */ jsx6("span", { "aria-hidden": "true", className: "ddga-checkbox__required", children: "*" })
528
- ] })
529
- ] }),
530
- hasErrorMessage && /* @__PURE__ */ jsx6(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
531
- hasHelper && /* @__PURE__ */ jsx6(FieldMessage, { id: helperId, variant: "helper", children: helperText })
532
- ] });
374
+ );
533
375
  }
534
-
535
- // src/components/Radio/Radio.tsx
536
- import { useId as useId2 } from "react";
537
- import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
538
- import { cva as cva5 } from "class-variance-authority";
539
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
540
- var radioGroupVariants = cva5("ddga-radio-group", {
541
- variants: {
542
- size: {
543
- sm: "ddga-radio-group--sm",
544
- md: "ddga-radio-group--md"
545
- },
546
- orientation: {
547
- vertical: "ddga-radio-group--vertical",
548
- horizontal: "ddga-radio-group--horizontal"
549
- },
550
- error: {
551
- true: "ddga-radio-group--error"
376
+ function Minus(props) {
377
+ return /* @__PURE__ */ jsx6(
378
+ "svg",
379
+ {
380
+ xmlns: "http://www.w3.org/2000/svg",
381
+ width: "1em",
382
+ height: "1em",
383
+ viewBox: "0 0 24 24",
384
+ fill: "none",
385
+ stroke: "currentColor",
386
+ strokeWidth: "3",
387
+ strokeLinecap: "round",
388
+ strokeLinejoin: "round",
389
+ ...props,
390
+ children: /* @__PURE__ */ jsx6("path", { d: "M5 12h14" })
552
391
  }
553
- },
554
- defaultVariants: {
555
- size: "md",
556
- orientation: "vertical"
557
- }
558
- });
559
- var radioVariants = cva5("ddga-radio");
560
- function RadioGroup({
561
- id: externalId,
562
- label,
392
+ );
393
+ }
394
+ function Info(props) {
395
+ return /* @__PURE__ */ jsxs4(
396
+ "svg",
397
+ {
398
+ xmlns: "http://www.w3.org/2000/svg",
399
+ width: "1em",
400
+ height: "1em",
401
+ viewBox: "0 0 24 24",
402
+ fill: "none",
403
+ stroke: "currentColor",
404
+ strokeWidth: "2",
405
+ strokeLinecap: "round",
406
+ strokeLinejoin: "round",
407
+ ...props,
408
+ children: [
409
+ /* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "10" }),
410
+ /* @__PURE__ */ jsx6("path", { d: "M12 16v-4" }),
411
+ /* @__PURE__ */ jsx6("path", { d: "M12 8h.01" })
412
+ ]
413
+ }
414
+ );
415
+ }
416
+ function AlertTriangle(props) {
417
+ return /* @__PURE__ */ jsxs4(
418
+ "svg",
419
+ {
420
+ xmlns: "http://www.w3.org/2000/svg",
421
+ width: "1em",
422
+ height: "1em",
423
+ viewBox: "0 0 24 24",
424
+ fill: "none",
425
+ stroke: "currentColor",
426
+ strokeWidth: "2",
427
+ strokeLinecap: "round",
428
+ strokeLinejoin: "round",
429
+ ...props,
430
+ children: [
431
+ /* @__PURE__ */ jsx6("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
432
+ /* @__PURE__ */ jsx6("path", { d: "M12 9v4" }),
433
+ /* @__PURE__ */ jsx6("path", { d: "M12 17h.01" })
434
+ ]
435
+ }
436
+ );
437
+ }
438
+ function AlertCircle(props) {
439
+ return /* @__PURE__ */ jsxs4(
440
+ "svg",
441
+ {
442
+ xmlns: "http://www.w3.org/2000/svg",
443
+ width: "1em",
444
+ height: "1em",
445
+ viewBox: "0 0 24 24",
446
+ fill: "none",
447
+ stroke: "currentColor",
448
+ strokeWidth: "2",
449
+ strokeLinecap: "round",
450
+ strokeLinejoin: "round",
451
+ ...props,
452
+ children: [
453
+ /* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "10" }),
454
+ /* @__PURE__ */ jsx6("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
455
+ /* @__PURE__ */ jsx6("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
456
+ ]
457
+ }
458
+ );
459
+ }
460
+ function Close(props) {
461
+ return /* @__PURE__ */ jsxs4(
462
+ "svg",
463
+ {
464
+ xmlns: "http://www.w3.org/2000/svg",
465
+ width: "1em",
466
+ height: "1em",
467
+ viewBox: "0 0 24 24",
468
+ fill: "none",
469
+ stroke: "currentColor",
470
+ strokeWidth: "2",
471
+ strokeLinecap: "round",
472
+ strokeLinejoin: "round",
473
+ ...props,
474
+ children: [
475
+ /* @__PURE__ */ jsx6("path", { d: "M18 6 6 18" }),
476
+ /* @__PURE__ */ jsx6("path", { d: "m6 6 12 12" })
477
+ ]
478
+ }
479
+ );
480
+ }
481
+ function ChevronDown(props) {
482
+ return /* @__PURE__ */ jsx6(
483
+ "svg",
484
+ {
485
+ xmlns: "http://www.w3.org/2000/svg",
486
+ width: "1em",
487
+ height: "1em",
488
+ viewBox: "0 0 24 24",
489
+ fill: "none",
490
+ stroke: "currentColor",
491
+ strokeWidth: "2",
492
+ strokeLinecap: "round",
493
+ strokeLinejoin: "round",
494
+ ...props,
495
+ children: /* @__PURE__ */ jsx6("path", { d: "m6 9 6 6 6-6" })
496
+ }
497
+ );
498
+ }
499
+ function ChevronRight(props) {
500
+ return /* @__PURE__ */ jsx6(
501
+ "svg",
502
+ {
503
+ xmlns: "http://www.w3.org/2000/svg",
504
+ width: "1em",
505
+ height: "1em",
506
+ viewBox: "0 0 24 24",
507
+ fill: "none",
508
+ stroke: "currentColor",
509
+ strokeWidth: "2",
510
+ strokeLinecap: "round",
511
+ strokeLinejoin: "round",
512
+ ...props,
513
+ children: /* @__PURE__ */ jsx6("path", { d: "m9 18 6-6-6-6" })
514
+ }
515
+ );
516
+ }
517
+ function MoreHorizontal(props) {
518
+ return /* @__PURE__ */ jsxs4(
519
+ "svg",
520
+ {
521
+ xmlns: "http://www.w3.org/2000/svg",
522
+ width: "1em",
523
+ height: "1em",
524
+ viewBox: "0 0 24 24",
525
+ fill: "currentColor",
526
+ stroke: "none",
527
+ ...props,
528
+ children: [
529
+ /* @__PURE__ */ jsx6("circle", { cx: "5", cy: "12", r: "1.5" }),
530
+ /* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "1.5" }),
531
+ /* @__PURE__ */ jsx6("circle", { cx: "19", cy: "12", r: "1.5" })
532
+ ]
533
+ }
534
+ );
535
+ }
536
+
537
+ // src/components/Checkbox/Checkbox.tsx
538
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
539
+ var checkboxVariants = cva5("ddga-checkbox", {
540
+ variants: {
541
+ size: {
542
+ sm: "ddga-checkbox--sm",
543
+ md: "ddga-checkbox--md"
544
+ },
545
+ error: {
546
+ true: "ddga-checkbox--error"
547
+ }
548
+ },
549
+ defaultVariants: {
550
+ size: "md"
551
+ }
552
+ });
553
+ function Checkbox({
554
+ id: externalId,
555
+ label,
556
+ helperText,
557
+ errorMessage,
558
+ error,
559
+ size,
560
+ required,
561
+ className,
562
+ ...props
563
+ }) {
564
+ const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
565
+ name: "Checkbox",
566
+ id: externalId,
567
+ label,
568
+ error,
569
+ errorMessage,
570
+ helperText,
571
+ "aria-label": props["aria-label"],
572
+ "aria-labelledby": props["aria-labelledby"]
573
+ });
574
+ return /* @__PURE__ */ jsxs5("div", { "data-slot": "checkbox-field", className: "ddga-field", children: [
575
+ /* @__PURE__ */ jsxs5("div", { className: "ddga-checkbox-row", children: [
576
+ /* @__PURE__ */ jsx7(
577
+ CheckboxPrimitive.Root,
578
+ {
579
+ ...props,
580
+ ...controlProps,
581
+ "data-slot": "checkbox",
582
+ required,
583
+ className: cn(checkboxVariants({ size, error: hasError }), className),
584
+ children: /* @__PURE__ */ jsxs5(
585
+ CheckboxPrimitive.Indicator,
586
+ {
587
+ "data-slot": "checkbox-indicator",
588
+ className: "ddga-checkbox__indicator",
589
+ children: [
590
+ /* @__PURE__ */ jsx7(Check, { className: "ddga-checkbox__check", "aria-hidden": "true" }),
591
+ /* @__PURE__ */ jsx7(Minus, { className: "ddga-checkbox__minus", "aria-hidden": "true" })
592
+ ]
593
+ }
594
+ )
595
+ }
596
+ ),
597
+ label && /* @__PURE__ */ jsxs5("label", { htmlFor: fieldId, className: "ddga-checkbox__label", children: [
598
+ label,
599
+ required && /* @__PURE__ */ jsx7("span", { "aria-hidden": "true", className: "ddga-checkbox__required", children: "*" })
600
+ ] })
601
+ ] }),
602
+ hasErrorMessage && /* @__PURE__ */ jsx7(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
603
+ hasHelper && /* @__PURE__ */ jsx7(FieldMessage, { id: helperId, variant: "helper", children: helperText })
604
+ ] });
605
+ }
606
+
607
+ // src/components/Radio/Radio.tsx
608
+ import { useId as useId2 } from "react";
609
+ import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
610
+ import { cva as cva6 } from "class-variance-authority";
611
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
612
+ var radioGroupVariants = cva6("ddga-radio-group", {
613
+ variants: {
614
+ size: {
615
+ sm: "ddga-radio-group--sm",
616
+ md: "ddga-radio-group--md"
617
+ },
618
+ orientation: {
619
+ vertical: "ddga-radio-group--vertical",
620
+ horizontal: "ddga-radio-group--horizontal"
621
+ },
622
+ error: {
623
+ true: "ddga-radio-group--error"
624
+ }
625
+ },
626
+ defaultVariants: {
627
+ size: "md",
628
+ orientation: "vertical"
629
+ }
630
+ });
631
+ var radioVariants = cva6("ddga-radio");
632
+ function RadioGroup({
633
+ id: externalId,
634
+ label,
563
635
  helperText,
564
636
  errorMessage,
565
637
  error,
@@ -584,9 +656,9 @@ function RadioGroup({
584
656
  return /* @__PURE__ */ jsxs6("div", { "data-slot": "radio-group-field", className: "ddga-field", children: [
585
657
  label && /* @__PURE__ */ jsxs6("span", { id: labelId, className: "ddga-radio-group__label", children: [
586
658
  label,
587
- required && /* @__PURE__ */ jsx7("span", { "aria-hidden": "true", className: "ddga-radio-group__required", children: "*" })
659
+ required && /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", className: "ddga-radio-group__required", children: "*" })
588
660
  ] }),
589
- /* @__PURE__ */ jsx7(
661
+ /* @__PURE__ */ jsx8(
590
662
  RadioGroupPrimitive.Root,
591
663
  {
592
664
  ...props,
@@ -600,40 +672,40 @@ function RadioGroup({
600
672
  children
601
673
  }
602
674
  ),
603
- hasErrorMessage && /* @__PURE__ */ jsx7(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
604
- hasHelper && /* @__PURE__ */ jsx7(FieldMessage, { id: helperId, variant: "helper", children: helperText })
675
+ hasErrorMessage && /* @__PURE__ */ jsx8(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
676
+ hasHelper && /* @__PURE__ */ jsx8(FieldMessage, { id: helperId, variant: "helper", children: helperText })
605
677
  ] });
606
678
  }
607
679
  function Radio({ id: externalId, label, className, ...props }) {
608
680
  const generatedId = useId2();
609
681
  const itemId = externalId ?? generatedId;
610
682
  return /* @__PURE__ */ jsxs6("div", { className: "ddga-radio-row", children: [
611
- /* @__PURE__ */ jsx7(
683
+ /* @__PURE__ */ jsx8(
612
684
  RadioGroupPrimitive.Item,
613
685
  {
614
686
  ...props,
615
687
  id: itemId,
616
688
  "data-slot": "radio",
617
689
  className: cn(radioVariants(), className),
618
- children: /* @__PURE__ */ jsx7(
690
+ children: /* @__PURE__ */ jsx8(
619
691
  RadioGroupPrimitive.Indicator,
620
692
  {
621
693
  "data-slot": "radio-indicator",
622
694
  className: "ddga-radio__indicator",
623
- children: /* @__PURE__ */ jsx7("span", { className: "ddga-radio__dot", "aria-hidden": "true" })
695
+ children: /* @__PURE__ */ jsx8("span", { className: "ddga-radio__dot", "aria-hidden": "true" })
624
696
  }
625
697
  )
626
698
  }
627
699
  ),
628
- label && /* @__PURE__ */ jsx7("label", { htmlFor: itemId, className: "ddga-radio__label", children: label })
700
+ label && /* @__PURE__ */ jsx8("label", { htmlFor: itemId, className: "ddga-radio__label", children: label })
629
701
  ] });
630
702
  }
631
703
 
632
704
  // src/components/Switch/Switch.tsx
633
705
  import { Switch as SwitchPrimitive } from "radix-ui";
634
- import { cva as cva6 } from "class-variance-authority";
635
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
636
- var switchVariants = cva6("ddga-switch", {
706
+ import { cva as cva7 } from "class-variance-authority";
707
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
708
+ var switchVariants = cva7("ddga-switch", {
637
709
  variants: {
638
710
  size: {
639
711
  sm: "ddga-switch--sm",
@@ -670,7 +742,7 @@ function Switch({
670
742
  });
671
743
  return /* @__PURE__ */ jsxs7("div", { "data-slot": "switch-field", className: "ddga-field", children: [
672
744
  /* @__PURE__ */ jsxs7("div", { className: "ddga-switch-row", children: [
673
- /* @__PURE__ */ jsx8(
745
+ /* @__PURE__ */ jsx9(
674
746
  SwitchPrimitive.Root,
675
747
  {
676
748
  ...props,
@@ -678,23 +750,23 @@ function Switch({
678
750
  "data-slot": "switch",
679
751
  required,
680
752
  className: cn(switchVariants({ size, error: hasError }), className),
681
- children: /* @__PURE__ */ jsx8(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "ddga-switch__thumb" })
753
+ children: /* @__PURE__ */ jsx9(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "ddga-switch__thumb" })
682
754
  }
683
755
  ),
684
756
  label && /* @__PURE__ */ jsxs7("label", { htmlFor: fieldId, className: "ddga-switch__label", children: [
685
757
  label,
686
- required && /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", className: "ddga-switch__required", children: "*" })
758
+ required && /* @__PURE__ */ jsx9("span", { "aria-hidden": "true", className: "ddga-switch__required", children: "*" })
687
759
  ] })
688
760
  ] }),
689
- hasErrorMessage && /* @__PURE__ */ jsx8(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
690
- hasHelper && /* @__PURE__ */ jsx8(FieldMessage, { id: helperId, variant: "helper", children: helperText })
761
+ hasErrorMessage && /* @__PURE__ */ jsx9(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
762
+ hasHelper && /* @__PURE__ */ jsx9(FieldMessage, { id: helperId, variant: "helper", children: helperText })
691
763
  ] });
692
764
  }
693
765
 
694
766
  // src/components/Select/Select.tsx
695
767
  import { useContext as useContext2 } from "react";
696
768
  import { Select as SelectPrimitive } from "radix-ui";
697
- import { cva as cva7 } from "class-variance-authority";
769
+ import { cva as cva8 } from "class-variance-authority";
698
770
 
699
771
  // src/providers/DgaContext.ts
700
772
  import { createContext, useContext } from "react";
@@ -708,8 +780,8 @@ function useDga() {
708
780
  }
709
781
 
710
782
  // src/components/Select/Select.tsx
711
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
712
- var selectTriggerVariants = cva7("ddga-select-trigger", {
783
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
784
+ var selectTriggerVariants = cva8("ddga-select-trigger", {
713
785
  variants: {
714
786
  size: {
715
787
  sm: "ddga-select-trigger--sm",
@@ -751,7 +823,7 @@ function Select({
751
823
  return /* @__PURE__ */ jsxs8("div", { "data-slot": "select-field", className: "ddga-field", children: [
752
824
  label && /* @__PURE__ */ jsxs8("label", { htmlFor: fieldId, className: "ddga-select__label", children: [
753
825
  label,
754
- required && /* @__PURE__ */ jsx9("span", { "aria-hidden": "true", className: "ddga-select__required", children: "*" })
826
+ required && /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", className: "ddga-select__required", children: "*" })
755
827
  ] }),
756
828
  /* @__PURE__ */ jsxs8(SelectPrimitive.Root, { required, ...rootProps, children: [
757
829
  /* @__PURE__ */ jsxs8(
@@ -761,24 +833,24 @@ function Select({
761
833
  "data-slot": "select-trigger",
762
834
  className: cn(selectTriggerVariants({ size, error: hasError }), className),
763
835
  children: [
764
- /* @__PURE__ */ jsx9(SelectPrimitive.Value, { placeholder }),
765
- /* @__PURE__ */ jsx9(SelectPrimitive.Icon, { asChild: true, className: "ddga-select__icon", children: /* @__PURE__ */ jsx9(ChevronDown, { "aria-hidden": "true" }) })
836
+ /* @__PURE__ */ jsx10(SelectPrimitive.Value, { placeholder }),
837
+ /* @__PURE__ */ jsx10(SelectPrimitive.Icon, { asChild: true, className: "ddga-select__icon", children: /* @__PURE__ */ jsx10(ChevronDown, { "aria-hidden": "true" }) })
766
838
  ]
767
839
  }
768
840
  ),
769
- /* @__PURE__ */ jsx9(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx9(
841
+ /* @__PURE__ */ jsx10(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx10(
770
842
  SelectPrimitive.Content,
771
843
  {
772
844
  "data-slot": "select-content",
773
845
  className: "ddga-select-content",
774
846
  position: "popper",
775
847
  sideOffset: 4,
776
- children: /* @__PURE__ */ jsx9(SelectPrimitive.Viewport, { className: "ddga-select-viewport", children })
848
+ children: /* @__PURE__ */ jsx10(SelectPrimitive.Viewport, { className: "ddga-select-viewport", children })
777
849
  }
778
850
  ) })
779
851
  ] }),
780
- hasErrorMessage && /* @__PURE__ */ jsx9(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
781
- hasHelper && /* @__PURE__ */ jsx9(FieldMessage, { id: helperId, variant: "helper", children: helperText })
852
+ hasErrorMessage && /* @__PURE__ */ jsx10(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
853
+ hasHelper && /* @__PURE__ */ jsx10(FieldMessage, { id: helperId, variant: "helper", children: helperText })
782
854
  ] });
783
855
  }
784
856
  function SelectItem({ className, children, ...props }) {
@@ -789,66 +861,405 @@ function SelectItem({ className, children, ...props }) {
789
861
  "data-slot": "select-item",
790
862
  className: cn("ddga-select-item", className),
791
863
  children: [
792
- /* @__PURE__ */ jsx9(SelectPrimitive.ItemText, { children }),
793
- /* @__PURE__ */ jsx9(SelectPrimitive.ItemIndicator, { className: "ddga-select-item__indicator", children: /* @__PURE__ */ jsx9(Check, { className: "ddga-select-item__check", "aria-hidden": "true" }) })
864
+ /* @__PURE__ */ jsx10(SelectPrimitive.ItemText, { children }),
865
+ /* @__PURE__ */ jsx10(SelectPrimitive.ItemIndicator, { className: "ddga-select-item__indicator", children: /* @__PURE__ */ jsx10(Check, { className: "ddga-select-item__check", "aria-hidden": "true" }) })
794
866
  ]
795
867
  }
796
868
  );
797
869
  }
798
870
 
799
- // src/components/Tooltip/Tooltip.tsx
800
- import { useContext as useContext3 } from "react";
801
- import { Tooltip as TooltipPrimitive } from "radix-ui";
802
- import { cva as cva8 } from "class-variance-authority";
803
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
804
- var tooltipContentVariants = cva8("ddga-tooltip", {
871
+ // src/components/Card/Card.tsx
872
+ import { Slot as SlotPrimitive2 } from "radix-ui";
873
+ import { cva as cva9 } from "class-variance-authority";
874
+ import { jsx as jsx11 } from "react/jsx-runtime";
875
+ var cardVariants = cva9("ddga-card", {
805
876
  variants: {
806
- size: {
807
- sm: "ddga-tooltip--sm",
808
- md: "ddga-tooltip--md"
877
+ variant: {
878
+ default: "ddga-card--default",
879
+ outline: "ddga-card--outline",
880
+ elevated: "ddga-card--elevated",
881
+ filled: "ddga-card--filled",
882
+ gradient: "ddga-card--gradient",
883
+ ghost: "ddga-card--ghost"
884
+ },
885
+ padding: {
886
+ sm: "ddga-card--padding-sm",
887
+ md: "ddga-card--padding-md",
888
+ lg: "ddga-card--padding-lg"
889
+ },
890
+ orientation: {
891
+ vertical: "ddga-card--vertical",
892
+ horizontal: "ddga-card--horizontal"
893
+ },
894
+ interactive: {
895
+ true: "ddga-card--interactive"
809
896
  }
810
897
  },
811
898
  defaultVariants: {
812
- size: "md"
899
+ variant: "default",
900
+ padding: "md",
901
+ orientation: "vertical"
813
902
  }
814
903
  });
815
- function Tooltip(props) {
816
- return /* @__PURE__ */ jsx10(TooltipPrimitive.Root, { ...props });
817
- }
818
- function TooltipTrigger({ className, ...props }) {
819
- return /* @__PURE__ */ jsx10(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", className, ...props });
820
- }
821
- function TooltipContent({
822
- size,
823
- arrow = true,
824
- sideOffset = 6,
904
+ function Card({
905
+ variant,
906
+ padding,
907
+ orientation,
908
+ interactive,
909
+ asChild,
825
910
  className,
826
- children,
827
911
  ...props
828
912
  }) {
829
- const ctx = useContext3(DgaContext);
830
- const portalContainer = ctx?.rootEl ?? void 0;
831
- return /* @__PURE__ */ jsx10(TooltipPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs9(
832
- TooltipPrimitive.Content,
913
+ const Comp = asChild ? SlotPrimitive2.Slot : "div";
914
+ return /* @__PURE__ */ jsx11(
915
+ Comp,
833
916
  {
834
- "data-slot": "tooltip-content",
917
+ "data-slot": "card",
918
+ "data-orientation": orientation ?? "vertical",
919
+ className: cn(cardVariants({ variant, padding, orientation, interactive }), className),
920
+ ...props
921
+ }
922
+ );
923
+ }
924
+ function CardImage({ aspectRatio = "16/9", className, style, ...props }) {
925
+ return /* @__PURE__ */ jsx11(
926
+ "img",
927
+ {
928
+ "data-slot": "card-image",
929
+ className: cn("ddga-card__image", className),
930
+ style: {
931
+ "--ddga-card-image-aspect": aspectRatio,
932
+ ...style
933
+ },
934
+ ...props
935
+ }
936
+ );
937
+ }
938
+ function CardHeader({ asChild, className, ...props }) {
939
+ const Comp = asChild ? SlotPrimitive2.Slot : "div";
940
+ return /* @__PURE__ */ jsx11(Comp, { "data-slot": "card-header", className: cn("ddga-card__header", className), ...props });
941
+ }
942
+ function CardTitle({ asChild, className, ...props }) {
943
+ const Comp = asChild ? SlotPrimitive2.Slot : "h3";
944
+ return /* @__PURE__ */ jsx11(Comp, { "data-slot": "card-title", className: cn("ddga-card__title", className), ...props });
945
+ }
946
+ function CardDescription({ asChild, className, ...props }) {
947
+ const Comp = asChild ? SlotPrimitive2.Slot : "p";
948
+ return /* @__PURE__ */ jsx11(
949
+ Comp,
950
+ {
951
+ "data-slot": "card-description",
952
+ className: cn("ddga-card__description", className),
953
+ ...props
954
+ }
955
+ );
956
+ }
957
+ function CardContent({ asChild, className, ...props }) {
958
+ const Comp = asChild ? SlotPrimitive2.Slot : "div";
959
+ return /* @__PURE__ */ jsx11(Comp, { "data-slot": "card-content", className: cn("ddga-card__content", className), ...props });
960
+ }
961
+ function CardFooter({ asChild, className, ...props }) {
962
+ const Comp = asChild ? SlotPrimitive2.Slot : "div";
963
+ return /* @__PURE__ */ jsx11(Comp, { "data-slot": "card-footer", className: cn("ddga-card__footer", className), ...props });
964
+ }
965
+
966
+ // src/components/Badge/Badge.tsx
967
+ import { useState } from "react";
968
+ import { Slot as SlotPrimitive3 } from "radix-ui";
969
+ import { cva as cva10 } from "class-variance-authority";
970
+ import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
971
+ var badgeVariants = cva10("ddga-badge", {
972
+ variants: {
973
+ variant: {
974
+ // Solid family
975
+ default: "ddga-badge--default",
976
+ primary: "ddga-badge--primary",
977
+ secondary: "ddga-badge--secondary",
978
+ destructive: "ddga-badge--destructive",
979
+ success: "ddga-badge--success",
980
+ warning: "ddga-badge--warning",
981
+ info: "ddga-badge--info",
982
+ // Subtle family (tonal)
983
+ "primary-subtle": "ddga-badge--primary-subtle",
984
+ "secondary-subtle": "ddga-badge--secondary-subtle",
985
+ "destructive-subtle": "ddga-badge--destructive-subtle",
986
+ "success-subtle": "ddga-badge--success-subtle",
987
+ "warning-subtle": "ddga-badge--warning-subtle",
988
+ "info-subtle": "ddga-badge--info-subtle",
989
+ // Outline
990
+ outline: "ddga-badge--outline"
991
+ },
992
+ size: {
993
+ sm: "ddga-badge--sm",
994
+ md: "ddga-badge--md"
995
+ }
996
+ },
997
+ defaultVariants: {
998
+ variant: "default",
999
+ size: "md"
1000
+ }
1001
+ });
1002
+ function Badge({
1003
+ variant,
1004
+ size,
1005
+ asChild,
1006
+ dot,
1007
+ startIcon,
1008
+ endIcon,
1009
+ dismissible,
1010
+ open,
1011
+ onDismiss,
1012
+ closeLabel = "Dismiss",
1013
+ className,
1014
+ children,
1015
+ ...props
1016
+ }) {
1017
+ const isControlled = open !== void 0;
1018
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(true);
1019
+ const isOpen = isControlled ? open : uncontrolledOpen;
1020
+ if (process.env.NODE_ENV !== "production" && asChild && dismissible) {
1021
+ console.warn(
1022
+ "[Badge] `dismissible` is not supported with `asChild` because it would nest an interactive close button inside the consumer's element (invalid HTML). The close button will not render."
1023
+ );
1024
+ }
1025
+ if (!isOpen) return null;
1026
+ const Comp = asChild ? SlotPrimitive3.Slot : "span";
1027
+ const showClose = dismissible && !asChild;
1028
+ const handleDismiss = () => {
1029
+ if (!isControlled) setUncontrolledOpen(false);
1030
+ onDismiss?.();
1031
+ };
1032
+ return /* @__PURE__ */ jsxs9(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant, size }), className), ...props, children: [
1033
+ dot ? /* @__PURE__ */ jsx12("span", { className: "ddga-badge__dot", "aria-hidden": "true" }) : null,
1034
+ startIcon ? /* @__PURE__ */ jsx12("span", { className: "ddga-badge__icon", "aria-hidden": "true", children: startIcon }) : null,
1035
+ asChild ? (
1036
+ // children IS the consumer's single element (e.g. <a>). Slottable marks
1037
+ // where THAT element's original children should land — without it the
1038
+ // dot/icons would replace the link text.
1039
+ /* @__PURE__ */ jsx12(SlotPrimitive3.Slottable, { children })
1040
+ ) : children,
1041
+ endIcon ? /* @__PURE__ */ jsx12("span", { className: "ddga-badge__icon", "aria-hidden": "true", children: endIcon }) : null,
1042
+ showClose ? /* @__PURE__ */ jsx12(
1043
+ "button",
1044
+ {
1045
+ type: "button",
1046
+ className: "ddga-badge__close",
1047
+ "aria-label": closeLabel,
1048
+ onClick: handleDismiss,
1049
+ "data-slot": "badge-close",
1050
+ children: /* @__PURE__ */ jsx12(Close, { "aria-hidden": "true" })
1051
+ }
1052
+ ) : null
1053
+ ] });
1054
+ }
1055
+
1056
+ // src/components/Divider/Divider.tsx
1057
+ import { cva as cva11 } from "class-variance-authority";
1058
+ import { jsx as jsx13 } from "react/jsx-runtime";
1059
+ var dividerVariants = cva11("ddga-divider", {
1060
+ variants: {
1061
+ orientation: {
1062
+ horizontal: "ddga-divider--horizontal",
1063
+ vertical: "ddga-divider--vertical"
1064
+ },
1065
+ variant: {
1066
+ solid: "ddga-divider--solid",
1067
+ dashed: "ddga-divider--dashed"
1068
+ }
1069
+ },
1070
+ defaultVariants: {
1071
+ orientation: "horizontal",
1072
+ variant: "solid"
1073
+ }
1074
+ });
1075
+ function Divider({
1076
+ orientation = "horizontal",
1077
+ variant = "solid",
1078
+ labelPosition = "center",
1079
+ decorative = false,
1080
+ className,
1081
+ children,
1082
+ ...props
1083
+ }) {
1084
+ const isLabeled = orientation === "horizontal" && children !== void 0 && children !== null && children !== "";
1085
+ const a11yProps = decorative ? { role: "none" } : {
1086
+ role: "separator",
1087
+ ...orientation === "vertical" ? { "aria-orientation": "vertical" } : {}
1088
+ };
1089
+ return /* @__PURE__ */ jsx13(
1090
+ "div",
1091
+ {
1092
+ "data-slot": "divider",
1093
+ "data-orientation": orientation,
1094
+ className: cn(
1095
+ dividerVariants({ orientation, variant }),
1096
+ isLabeled && "ddga-divider--labeled",
1097
+ isLabeled && `ddga-divider--label-${labelPosition}`,
1098
+ className
1099
+ ),
1100
+ ...a11yProps,
1101
+ ...props,
1102
+ children: isLabeled ? /* @__PURE__ */ jsx13("span", { className: "ddga-divider__label", children }) : null
1103
+ }
1104
+ );
1105
+ }
1106
+
1107
+ // src/components/Avatar/Avatar.tsx
1108
+ import { Children, isValidElement, cloneElement } from "react";
1109
+ import { Avatar as AvatarPrimitive } from "radix-ui";
1110
+ import { cva as cva12 } from "class-variance-authority";
1111
+ import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
1112
+ var avatarVariants = cva12("ddga-avatar", {
1113
+ variants: {
1114
+ size: {
1115
+ xs: "ddga-avatar--xs",
1116
+ sm: "ddga-avatar--sm",
1117
+ md: "ddga-avatar--md",
1118
+ lg: "ddga-avatar--lg",
1119
+ xl: "ddga-avatar--xl"
1120
+ },
1121
+ shape: {
1122
+ circle: "ddga-avatar--circle",
1123
+ square: "ddga-avatar--square"
1124
+ }
1125
+ },
1126
+ defaultVariants: {
1127
+ size: "md",
1128
+ shape: "circle"
1129
+ }
1130
+ });
1131
+ var fallbackVariants = cva12("ddga-avatar__fallback", {
1132
+ variants: {
1133
+ colorScheme: {
1134
+ default: "ddga-avatar__fallback--default",
1135
+ primary: "ddga-avatar__fallback--primary",
1136
+ secondary: "ddga-avatar__fallback--secondary",
1137
+ success: "ddga-avatar__fallback--success",
1138
+ warning: "ddga-avatar__fallback--warning",
1139
+ destructive: "ddga-avatar__fallback--destructive",
1140
+ info: "ddga-avatar__fallback--info"
1141
+ }
1142
+ },
1143
+ defaultVariants: {
1144
+ colorScheme: "default"
1145
+ }
1146
+ });
1147
+ function Avatar({ size, shape, status, statusLabel, className, children, ...props }) {
1148
+ return /* @__PURE__ */ jsxs10(
1149
+ AvatarPrimitive.Root,
1150
+ {
1151
+ "data-slot": "avatar",
1152
+ "data-status": status,
1153
+ className: cn(avatarVariants({ size, shape }), className),
1154
+ ...props,
1155
+ children: [
1156
+ children,
1157
+ status ? /* @__PURE__ */ jsx14(
1158
+ "span",
1159
+ {
1160
+ className: cn("ddga-avatar__status", `ddga-avatar__status--${status}`),
1161
+ role: "status",
1162
+ "aria-label": statusLabel ?? status
1163
+ }
1164
+ ) : null
1165
+ ]
1166
+ }
1167
+ );
1168
+ }
1169
+ function AvatarImage({ className, ...props }) {
1170
+ return /* @__PURE__ */ jsx14(
1171
+ AvatarPrimitive.Image,
1172
+ {
1173
+ "data-slot": "avatar-image",
1174
+ className: cn("ddga-avatar__image", className),
1175
+ ...props
1176
+ }
1177
+ );
1178
+ }
1179
+ function AvatarFallback({ colorScheme, className, ...props }) {
1180
+ return /* @__PURE__ */ jsx14(
1181
+ AvatarPrimitive.Fallback,
1182
+ {
1183
+ "data-slot": "avatar-fallback",
1184
+ "data-color-scheme": colorScheme ?? "default",
1185
+ className: cn(fallbackVariants({ colorScheme }), className),
1186
+ ...props
1187
+ }
1188
+ );
1189
+ }
1190
+ function AvatarGroup({ max, size, shape, className, children, ...props }) {
1191
+ const all = Children.toArray(children).filter(isValidElement);
1192
+ const visible = max !== void 0 && all.length > max ? all.slice(0, max) : all;
1193
+ const overflow = max !== void 0 ? Math.max(0, all.length - max) : 0;
1194
+ const cascaded = visible.map(
1195
+ (child, i) => cloneElement(child, {
1196
+ key: child.key ?? i,
1197
+ size: child.props.size ?? size,
1198
+ shape: child.props.shape ?? shape
1199
+ })
1200
+ );
1201
+ return /* @__PURE__ */ jsxs10("div", { "data-slot": "avatar-group", className: cn("ddga-avatar-group", className), ...props, children: [
1202
+ cascaded,
1203
+ overflow > 0 ? /* @__PURE__ */ jsx14(Avatar, { size, shape, "aria-label": `${overflow} more`, children: /* @__PURE__ */ jsxs10(AvatarFallback, { children: [
1204
+ "+",
1205
+ overflow
1206
+ ] }) }) : null
1207
+ ] });
1208
+ }
1209
+
1210
+ // src/components/Tooltip/Tooltip.tsx
1211
+ import { useContext as useContext3 } from "react";
1212
+ import { Tooltip as TooltipPrimitive } from "radix-ui";
1213
+ import { cva as cva13 } from "class-variance-authority";
1214
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
1215
+ var tooltipContentVariants = cva13("ddga-tooltip", {
1216
+ variants: {
1217
+ size: {
1218
+ sm: "ddga-tooltip--sm",
1219
+ md: "ddga-tooltip--md"
1220
+ }
1221
+ },
1222
+ defaultVariants: {
1223
+ size: "md"
1224
+ }
1225
+ });
1226
+ function Tooltip(props) {
1227
+ return /* @__PURE__ */ jsx15(TooltipPrimitive.Root, { ...props });
1228
+ }
1229
+ function TooltipTrigger({ className, ...props }) {
1230
+ return /* @__PURE__ */ jsx15(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", className, ...props });
1231
+ }
1232
+ function TooltipContent({
1233
+ size,
1234
+ arrow = true,
1235
+ sideOffset = 6,
1236
+ className,
1237
+ children,
1238
+ ...props
1239
+ }) {
1240
+ const ctx = useContext3(DgaContext);
1241
+ const portalContainer = ctx?.rootEl ?? void 0;
1242
+ return /* @__PURE__ */ jsx15(TooltipPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs11(
1243
+ TooltipPrimitive.Content,
1244
+ {
1245
+ "data-slot": "tooltip-content",
835
1246
  sideOffset,
836
1247
  className: cn(tooltipContentVariants({ size }), className),
837
1248
  ...props,
838
1249
  children: [
839
1250
  children,
840
- arrow ? /* @__PURE__ */ jsx10(TooltipPrimitive.Arrow, { className: "ddga-tooltip__arrow" }) : null
1251
+ arrow ? /* @__PURE__ */ jsx15(TooltipPrimitive.Arrow, { className: "ddga-tooltip__arrow" }) : null
841
1252
  ]
842
1253
  }
843
1254
  ) });
844
1255
  }
845
1256
 
846
1257
  // src/components/Alert/Alert.tsx
847
- import { useState } from "react";
848
- import { Slot as SlotPrimitive2 } from "radix-ui";
849
- import { cva as cva9 } from "class-variance-authority";
850
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
851
- var alertVariants = cva9("ddga-alert", {
1258
+ import { useState as useState2 } from "react";
1259
+ import { Slot as SlotPrimitive4 } from "radix-ui";
1260
+ import { cva as cva14 } from "class-variance-authority";
1261
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
1262
+ var alertVariants = cva14("ddga-alert", {
852
1263
  variants: {
853
1264
  variant: {
854
1265
  info: "ddga-alert--info",
@@ -862,10 +1273,10 @@ var alertVariants = cva9("ddga-alert", {
862
1273
  }
863
1274
  });
864
1275
  var DEFAULT_ICONS = {
865
- info: /* @__PURE__ */ jsx11(Info, { "aria-hidden": "true" }),
866
- success: /* @__PURE__ */ jsx11(Check, { "aria-hidden": "true" }),
867
- warning: /* @__PURE__ */ jsx11(AlertTriangle, { "aria-hidden": "true" }),
868
- destructive: /* @__PURE__ */ jsx11(AlertCircle, { "aria-hidden": "true" })
1276
+ info: /* @__PURE__ */ jsx16(Info, { "aria-hidden": "true" }),
1277
+ success: /* @__PURE__ */ jsx16(Check, { "aria-hidden": "true" }),
1278
+ warning: /* @__PURE__ */ jsx16(AlertTriangle, { "aria-hidden": "true" }),
1279
+ destructive: /* @__PURE__ */ jsx16(AlertCircle, { "aria-hidden": "true" })
869
1280
  };
870
1281
  function Alert({
871
1282
  variant,
@@ -880,18 +1291,18 @@ function Alert({
880
1291
  children,
881
1292
  ...props
882
1293
  }) {
883
- const [internalOpen, setInternalOpen] = useState(true);
1294
+ const [internalOpen, setInternalOpen] = useState2(true);
884
1295
  const isControlled = controlledOpen !== void 0;
885
1296
  const open = isControlled ? controlledOpen : internalOpen;
886
1297
  if (!open) return null;
887
- const Comp = asChild ? SlotPrimitive2.Slot : "div";
1298
+ const Comp = asChild ? SlotPrimitive4.Slot : "div";
888
1299
  const resolvedIcon = icon === false ? null : icon !== void 0 ? icon : DEFAULT_ICONS[variant ?? "info"];
889
1300
  const liveProps = live === "assertive" ? { role: "alert", "aria-live": "assertive" } : live === "polite" ? { role: "status", "aria-live": "polite" } : {};
890
1301
  function handleDismiss() {
891
1302
  if (!isControlled) setInternalOpen(false);
892
1303
  onDismiss?.();
893
1304
  }
894
- return /* @__PURE__ */ jsxs10(
1305
+ return /* @__PURE__ */ jsxs12(
895
1306
  Comp,
896
1307
  {
897
1308
  "data-slot": "alert",
@@ -900,20 +1311,20 @@ function Alert({
900
1311
  ...liveProps,
901
1312
  ...props,
902
1313
  children: [
903
- resolvedIcon ? /* @__PURE__ */ jsx11("span", { className: "ddga-alert__icon", children: resolvedIcon }) : null,
1314
+ resolvedIcon ? /* @__PURE__ */ jsx16("span", { className: "ddga-alert__icon", children: resolvedIcon }) : null,
904
1315
  asChild ? (
905
1316
  // Slot mode: the consumer's element receives the children body.
906
1317
  // Title/description are nested by the consumer.
907
- /* @__PURE__ */ jsx11(SlotPrimitive2.Slottable, { children })
908
- ) : /* @__PURE__ */ jsx11("div", { className: "ddga-alert__body", children }),
909
- dismissible ? /* @__PURE__ */ jsx11(
1318
+ /* @__PURE__ */ jsx16(SlotPrimitive4.Slottable, { children })
1319
+ ) : /* @__PURE__ */ jsx16("div", { className: "ddga-alert__body", children }),
1320
+ dismissible ? /* @__PURE__ */ jsx16(
910
1321
  "button",
911
1322
  {
912
1323
  type: "button",
913
1324
  className: "ddga-alert__close",
914
1325
  "aria-label": closeLabel,
915
1326
  onClick: handleDismiss,
916
- children: /* @__PURE__ */ jsx11(Close, { "aria-hidden": "true" })
1327
+ children: /* @__PURE__ */ jsx16(Close, { "aria-hidden": "true" })
917
1328
  }
918
1329
  ) : null
919
1330
  ]
@@ -921,12 +1332,12 @@ function Alert({
921
1332
  );
922
1333
  }
923
1334
  function AlertTitle({ asChild, className, ...props }) {
924
- const Comp = asChild ? SlotPrimitive2.Slot : "h5";
925
- return /* @__PURE__ */ jsx11(Comp, { "data-slot": "alert-title", className: cn("ddga-alert__title", className), ...props });
1335
+ const Comp = asChild ? SlotPrimitive4.Slot : "h5";
1336
+ return /* @__PURE__ */ jsx16(Comp, { "data-slot": "alert-title", className: cn("ddga-alert__title", className), ...props });
926
1337
  }
927
1338
  function AlertDescription({ asChild, className, ...props }) {
928
- const Comp = asChild ? SlotPrimitive2.Slot : "p";
929
- return /* @__PURE__ */ jsx11(
1339
+ const Comp = asChild ? SlotPrimitive4.Slot : "p";
1340
+ return /* @__PURE__ */ jsx16(
930
1341
  Comp,
931
1342
  {
932
1343
  "data-slot": "alert-description",
@@ -938,10 +1349,10 @@ function AlertDescription({ asChild, className, ...props }) {
938
1349
 
939
1350
  // src/components/Modal/Modal.tsx
940
1351
  import { useContext as useContext4 } from "react";
941
- import { Dialog as DialogPrimitive, Slot as SlotPrimitive3 } from "radix-ui";
942
- import { cva as cva10 } from "class-variance-authority";
943
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
944
- var modalContentVariants = cva10("ddga-modal", {
1352
+ import { Dialog as DialogPrimitive, Slot as SlotPrimitive5 } from "radix-ui";
1353
+ import { cva as cva15 } from "class-variance-authority";
1354
+ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
1355
+ var modalContentVariants = cva15("ddga-modal", {
945
1356
  variants: {
946
1357
  size: {
947
1358
  sm: "ddga-modal--sm",
@@ -956,10 +1367,10 @@ var modalContentVariants = cva10("ddga-modal", {
956
1367
  }
957
1368
  });
958
1369
  function Modal(props) {
959
- return /* @__PURE__ */ jsx12(DialogPrimitive.Root, { ...props });
1370
+ return /* @__PURE__ */ jsx17(DialogPrimitive.Root, { ...props });
960
1371
  }
961
1372
  function ModalTrigger({ className, ...props }) {
962
- return /* @__PURE__ */ jsx12(DialogPrimitive.Trigger, { "data-slot": "modal-trigger", className, ...props });
1373
+ return /* @__PURE__ */ jsx17(DialogPrimitive.Trigger, { "data-slot": "modal-trigger", className, ...props });
963
1374
  }
964
1375
  function ModalContent({
965
1376
  size,
@@ -971,9 +1382,9 @@ function ModalContent({
971
1382
  }) {
972
1383
  const ctx = useContext4(DgaContext);
973
1384
  const portalContainer = ctx?.rootEl ?? void 0;
974
- return /* @__PURE__ */ jsxs11(DialogPrimitive.Portal, { container: portalContainer, children: [
975
- /* @__PURE__ */ jsx12(DialogPrimitive.Overlay, { className: "ddga-modal__overlay", "data-slot": "modal-overlay" }),
976
- /* @__PURE__ */ jsxs11(
1385
+ return /* @__PURE__ */ jsxs13(DialogPrimitive.Portal, { container: portalContainer, children: [
1386
+ /* @__PURE__ */ jsx17(DialogPrimitive.Overlay, { className: "ddga-modal__overlay", "data-slot": "modal-overlay" }),
1387
+ /* @__PURE__ */ jsxs13(
977
1388
  DialogPrimitive.Content,
978
1389
  {
979
1390
  "data-slot": "modal-content",
@@ -981,13 +1392,13 @@ function ModalContent({
981
1392
  ...props,
982
1393
  children: [
983
1394
  children,
984
- showCloseButton ? /* @__PURE__ */ jsx12(
1395
+ showCloseButton ? /* @__PURE__ */ jsx17(
985
1396
  DialogPrimitive.Close,
986
1397
  {
987
1398
  className: "ddga-modal__close",
988
1399
  "aria-label": closeLabel,
989
1400
  "data-slot": "modal-close-x",
990
- children: /* @__PURE__ */ jsx12(Close, { "aria-hidden": "true" })
1401
+ children: /* @__PURE__ */ jsx17(Close, { "aria-hidden": "true" })
991
1402
  }
992
1403
  ) : null
993
1404
  ]
@@ -996,11 +1407,11 @@ function ModalContent({
996
1407
  ] });
997
1408
  }
998
1409
  function ModalHeader({ asChild, className, ...props }) {
999
- const Comp = asChild ? SlotPrimitive3.Slot : "div";
1000
- return /* @__PURE__ */ jsx12(Comp, { "data-slot": "modal-header", className: cn("ddga-modal__header", className), ...props });
1410
+ const Comp = asChild ? SlotPrimitive5.Slot : "div";
1411
+ return /* @__PURE__ */ jsx17(Comp, { "data-slot": "modal-header", className: cn("ddga-modal__header", className), ...props });
1001
1412
  }
1002
1413
  function ModalTitle({ asChild, className, ...props }) {
1003
- return /* @__PURE__ */ jsx12(
1414
+ return /* @__PURE__ */ jsx17(
1004
1415
  DialogPrimitive.Title,
1005
1416
  {
1006
1417
  asChild,
@@ -1011,7 +1422,7 @@ function ModalTitle({ asChild, className, ...props }) {
1011
1422
  );
1012
1423
  }
1013
1424
  function ModalDescription({ asChild, className, ...props }) {
1014
- return /* @__PURE__ */ jsx12(
1425
+ return /* @__PURE__ */ jsx17(
1015
1426
  DialogPrimitive.Description,
1016
1427
  {
1017
1428
  asChild,
@@ -1022,17 +1433,17 @@ function ModalDescription({ asChild, className, ...props }) {
1022
1433
  );
1023
1434
  }
1024
1435
  function ModalFooter({ asChild, className, ...props }) {
1025
- const Comp = asChild ? SlotPrimitive3.Slot : "div";
1026
- return /* @__PURE__ */ jsx12(Comp, { "data-slot": "modal-footer", className: cn("ddga-modal__footer", className), ...props });
1436
+ const Comp = asChild ? SlotPrimitive5.Slot : "div";
1437
+ return /* @__PURE__ */ jsx17(Comp, { "data-slot": "modal-footer", className: cn("ddga-modal__footer", className), ...props });
1027
1438
  }
1028
1439
  function ModalClose({ className, ...props }) {
1029
- return /* @__PURE__ */ jsx12(DialogPrimitive.Close, { "data-slot": "modal-close", className, ...props });
1440
+ return /* @__PURE__ */ jsx17(DialogPrimitive.Close, { "data-slot": "modal-close", className, ...props });
1030
1441
  }
1031
1442
 
1032
1443
  // src/components/Toast/Toast.tsx
1033
1444
  import { useSyncExternalStore } from "react";
1034
1445
  import { Toast as ToastPrimitive } from "radix-ui";
1035
- import { cva as cva11 } from "class-variance-authority";
1446
+ import { cva as cva16 } from "class-variance-authority";
1036
1447
 
1037
1448
  // src/components/Toast/toast-store.ts
1038
1449
  import "react";
@@ -1120,8 +1531,8 @@ function createToast(store) {
1120
1531
  var toast = createToast(toastStore);
1121
1532
 
1122
1533
  // src/components/Toast/Toast.tsx
1123
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1124
- var toastVariants = cva11("ddga-toast", {
1534
+ import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
1535
+ var toastVariants = cva16("ddga-toast", {
1125
1536
  variants: {
1126
1537
  variant: {
1127
1538
  default: "ddga-toast--default",
@@ -1135,7 +1546,7 @@ var toastVariants = cva11("ddga-toast", {
1135
1546
  variant: "default"
1136
1547
  }
1137
1548
  });
1138
- var toastViewportVariants = cva11("ddga-toast-viewport", {
1549
+ var toastViewportVariants = cva16("ddga-toast-viewport", {
1139
1550
  variants: {
1140
1551
  position: {
1141
1552
  "top-start": "ddga-toast-viewport--top-start",
@@ -1155,10 +1566,10 @@ var toastViewportVariants = cva11("ddga-toast-viewport", {
1155
1566
  });
1156
1567
  var DEFAULT_ICONS2 = {
1157
1568
  default: null,
1158
- info: /* @__PURE__ */ jsx13(Info, { "aria-hidden": "true" }),
1159
- success: /* @__PURE__ */ jsx13(Check, { "aria-hidden": "true" }),
1160
- warning: /* @__PURE__ */ jsx13(AlertTriangle, { "aria-hidden": "true" }),
1161
- destructive: /* @__PURE__ */ jsx13(AlertCircle, { "aria-hidden": "true" })
1569
+ info: /* @__PURE__ */ jsx18(Info, { "aria-hidden": "true" }),
1570
+ success: /* @__PURE__ */ jsx18(Check, { "aria-hidden": "true" }),
1571
+ warning: /* @__PURE__ */ jsx18(AlertTriangle, { "aria-hidden": "true" }),
1572
+ destructive: /* @__PURE__ */ jsx18(AlertCircle, { "aria-hidden": "true" })
1162
1573
  };
1163
1574
  function Toaster({
1164
1575
  position = "bottom-end",
@@ -1173,8 +1584,8 @@ function Toaster({
1173
1584
  }) {
1174
1585
  const toasts = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
1175
1586
  const resolvedSwipe = swipeDirection ?? (position.startsWith("top") ? "up" : "down");
1176
- return /* @__PURE__ */ jsxs12(ToastPrimitive.Provider, { duration, swipeDirection: resolvedSwipe, children: [
1177
- toasts.map((t) => /* @__PURE__ */ jsx13(
1587
+ return /* @__PURE__ */ jsxs14(ToastPrimitive.Provider, { duration, swipeDirection: resolvedSwipe, children: [
1588
+ toasts.map((t) => /* @__PURE__ */ jsx18(
1178
1589
  ToastItem,
1179
1590
  {
1180
1591
  toast: t,
@@ -1185,7 +1596,7 @@ function Toaster({
1185
1596
  },
1186
1597
  t.id
1187
1598
  )),
1188
- /* @__PURE__ */ jsx13(
1599
+ /* @__PURE__ */ jsx18(
1189
1600
  ToastPrimitive.Viewport,
1190
1601
  {
1191
1602
  "data-slot": "toast-viewport",
@@ -1198,7 +1609,7 @@ function Toaster({
1198
1609
  function ToastItem({ toast: t, store, closeButton, closeLabel, hideIcon }) {
1199
1610
  const radixType = t.variant === "destructive" ? "foreground" : "background";
1200
1611
  const icon = hideIcon ? null : DEFAULT_ICONS2[t.variant];
1201
- return /* @__PURE__ */ jsxs12(
1612
+ return /* @__PURE__ */ jsxs14(
1202
1613
  ToastPrimitive.Root,
1203
1614
  {
1204
1615
  "data-slot": "toast",
@@ -1213,11 +1624,11 @@ function ToastItem({ toast: t, store, closeButton, closeLabel, hideIcon }) {
1213
1624
  }
1214
1625
  },
1215
1626
  children: [
1216
- icon ? /* @__PURE__ */ jsx13("span", { className: "ddga-toast__icon", children: icon }) : null,
1217
- /* @__PURE__ */ jsxs12("div", { className: "ddga-toast__body", children: [
1218
- t.title ? /* @__PURE__ */ jsx13(ToastPrimitive.Title, { className: "ddga-toast__title", children: t.title }) : null,
1219
- t.description ? /* @__PURE__ */ jsx13(ToastPrimitive.Description, { className: "ddga-toast__description", children: t.description }) : null,
1220
- t.action ? /* @__PURE__ */ jsx13(
1627
+ icon ? /* @__PURE__ */ jsx18("span", { className: "ddga-toast__icon", children: icon }) : null,
1628
+ /* @__PURE__ */ jsxs14("div", { className: "ddga-toast__body", children: [
1629
+ t.title ? /* @__PURE__ */ jsx18(ToastPrimitive.Title, { className: "ddga-toast__title", children: t.title }) : null,
1630
+ t.description ? /* @__PURE__ */ jsx18(ToastPrimitive.Description, { className: "ddga-toast__description", children: t.description }) : null,
1631
+ t.action ? /* @__PURE__ */ jsx18(
1221
1632
  ToastPrimitive.Action,
1222
1633
  {
1223
1634
  className: "ddga-toast__action",
@@ -1230,17 +1641,1131 @@ function ToastItem({ toast: t, store, closeButton, closeLabel, hideIcon }) {
1230
1641
  }
1231
1642
  ) : null
1232
1643
  ] }),
1233
- closeButton ? /* @__PURE__ */ jsx13(ToastPrimitive.Close, { className: "ddga-toast__close", "aria-label": closeLabel, children: /* @__PURE__ */ jsx13(Close, { "aria-hidden": "true" }) }) : null
1644
+ closeButton ? /* @__PURE__ */ jsx18(ToastPrimitive.Close, { className: "ddga-toast__close", "aria-label": closeLabel, children: /* @__PURE__ */ jsx18(Close, { "aria-hidden": "true" }) }) : null
1234
1645
  ]
1235
1646
  }
1236
1647
  );
1237
1648
  }
1238
1649
 
1650
+ // src/components/Tabs/Tabs.tsx
1651
+ import { Tabs as TabsPrimitive } from "radix-ui";
1652
+ import { cva as cva17 } from "class-variance-authority";
1653
+ import { jsx as jsx19 } from "react/jsx-runtime";
1654
+ var tabsVariants = cva17("ddga-tabs", {
1655
+ variants: {
1656
+ variant: {
1657
+ line: "ddga-tabs--line",
1658
+ pill: "ddga-tabs--pill"
1659
+ },
1660
+ size: {
1661
+ sm: "ddga-tabs--sm",
1662
+ md: "ddga-tabs--md"
1663
+ }
1664
+ },
1665
+ defaultVariants: {
1666
+ variant: "line",
1667
+ size: "md"
1668
+ }
1669
+ });
1670
+ var tabsListVariants = cva17("ddga-tabs__list", {
1671
+ variants: {
1672
+ fullWidth: {
1673
+ true: "ddga-tabs__list--full-width"
1674
+ }
1675
+ }
1676
+ });
1677
+ function Tabs({ variant, size, className, ...props }) {
1678
+ return /* @__PURE__ */ jsx19(
1679
+ TabsPrimitive.Root,
1680
+ {
1681
+ "data-slot": "tabs",
1682
+ className: cn(tabsVariants({ variant, size }), className),
1683
+ ...props
1684
+ }
1685
+ );
1686
+ }
1687
+ function TabsList({ fullWidth, className, ...props }) {
1688
+ return /* @__PURE__ */ jsx19(
1689
+ TabsPrimitive.List,
1690
+ {
1691
+ "data-slot": "tabs-list",
1692
+ className: cn(tabsListVariants({ fullWidth }), className),
1693
+ ...props
1694
+ }
1695
+ );
1696
+ }
1697
+ function TabsTrigger({ className, ...props }) {
1698
+ return /* @__PURE__ */ jsx19(
1699
+ TabsPrimitive.Trigger,
1700
+ {
1701
+ "data-slot": "tabs-trigger",
1702
+ className: cn("ddga-tabs__trigger", className),
1703
+ ...props
1704
+ }
1705
+ );
1706
+ }
1707
+ function TabsContent({ className, ...props }) {
1708
+ return /* @__PURE__ */ jsx19(
1709
+ TabsPrimitive.Content,
1710
+ {
1711
+ "data-slot": "tabs-content",
1712
+ className: cn("ddga-tabs__content", className),
1713
+ ...props
1714
+ }
1715
+ );
1716
+ }
1717
+
1718
+ // src/components/Breadcrumb/Breadcrumb.tsx
1719
+ import { Slot as SlotPrimitive6 } from "radix-ui";
1720
+ import { cva as cva18 } from "class-variance-authority";
1721
+ import { jsx as jsx20 } from "react/jsx-runtime";
1722
+ var breadcrumbVariants = cva18("ddga-breadcrumb", {
1723
+ variants: {
1724
+ size: {
1725
+ sm: "ddga-breadcrumb--sm",
1726
+ md: "ddga-breadcrumb--md"
1727
+ }
1728
+ },
1729
+ defaultVariants: {
1730
+ size: "md"
1731
+ }
1732
+ });
1733
+ function Breadcrumb({ size, className, ...props }) {
1734
+ return /* @__PURE__ */ jsx20(
1735
+ "nav",
1736
+ {
1737
+ "aria-label": "Breadcrumb",
1738
+ "data-slot": "breadcrumb",
1739
+ className: cn(breadcrumbVariants({ size }), className),
1740
+ ...props
1741
+ }
1742
+ );
1743
+ }
1744
+ function BreadcrumbList({ className, ...props }) {
1745
+ return /* @__PURE__ */ jsx20("ol", { "data-slot": "breadcrumb-list", className: cn("ddga-breadcrumb__list", className), ...props });
1746
+ }
1747
+ function BreadcrumbItem({ className, ...props }) {
1748
+ return /* @__PURE__ */ jsx20("li", { "data-slot": "breadcrumb-item", className: cn("ddga-breadcrumb__item", className), ...props });
1749
+ }
1750
+ function BreadcrumbLink({ asChild, className, ...props }) {
1751
+ const Comp = asChild ? SlotPrimitive6.Slot : "a";
1752
+ return /* @__PURE__ */ jsx20(
1753
+ Comp,
1754
+ {
1755
+ "data-slot": "breadcrumb-link",
1756
+ className: cn("ddga-breadcrumb__link", className),
1757
+ ...props
1758
+ }
1759
+ );
1760
+ }
1761
+ function BreadcrumbPage({ asChild, className, ...props }) {
1762
+ const Comp = asChild ? SlotPrimitive6.Slot : "span";
1763
+ return /* @__PURE__ */ jsx20(
1764
+ Comp,
1765
+ {
1766
+ "aria-current": "page",
1767
+ "data-slot": "breadcrumb-page",
1768
+ className: cn("ddga-breadcrumb__page", className),
1769
+ ...props
1770
+ }
1771
+ );
1772
+ }
1773
+ function BreadcrumbSeparator({ children, className, ...props }) {
1774
+ return /* @__PURE__ */ jsx20(
1775
+ "li",
1776
+ {
1777
+ role: "presentation",
1778
+ "aria-hidden": "true",
1779
+ "data-slot": "breadcrumb-separator",
1780
+ className: cn("ddga-breadcrumb__separator", className),
1781
+ ...props,
1782
+ children: children ?? /* @__PURE__ */ jsx20(ChevronRight, {})
1783
+ }
1784
+ );
1785
+ }
1786
+ function BreadcrumbEllipsis({ className, ...props }) {
1787
+ return /* @__PURE__ */ jsx20(
1788
+ "span",
1789
+ {
1790
+ role: "presentation",
1791
+ "aria-hidden": "true",
1792
+ "data-slot": "breadcrumb-ellipsis",
1793
+ className: cn("ddga-breadcrumb__ellipsis", className),
1794
+ ...props,
1795
+ children: /* @__PURE__ */ jsx20(MoreHorizontal, {})
1796
+ }
1797
+ );
1798
+ }
1799
+
1800
+ // src/components/Pagination/Pagination.tsx
1801
+ import { Slot as SlotPrimitive7 } from "radix-ui";
1802
+ import { cva as cva19 } from "class-variance-authority";
1803
+ import { Fragment, jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
1804
+ var paginationVariants = cva19("ddga-pagination", {
1805
+ variants: {
1806
+ size: {
1807
+ sm: "ddga-pagination--sm",
1808
+ md: "ddga-pagination--md"
1809
+ }
1810
+ },
1811
+ defaultVariants: {
1812
+ size: "md"
1813
+ }
1814
+ });
1815
+ var paginationLinkVariants = cva19("ddga-pagination__link", {
1816
+ variants: {
1817
+ isActive: {
1818
+ true: "ddga-pagination__link--active"
1819
+ }
1820
+ }
1821
+ });
1822
+ function Pagination({ size, className, ...props }) {
1823
+ return /* @__PURE__ */ jsx21(
1824
+ "nav",
1825
+ {
1826
+ "aria-label": "pagination",
1827
+ "data-slot": "pagination",
1828
+ className: cn(paginationVariants({ size }), className),
1829
+ ...props
1830
+ }
1831
+ );
1832
+ }
1833
+ function PaginationContent({ className, ...props }) {
1834
+ return /* @__PURE__ */ jsx21(
1835
+ "ul",
1836
+ {
1837
+ "data-slot": "pagination-content",
1838
+ className: cn("ddga-pagination__content", className),
1839
+ ...props
1840
+ }
1841
+ );
1842
+ }
1843
+ function PaginationItem({ className, ...props }) {
1844
+ return /* @__PURE__ */ jsx21("li", { "data-slot": "pagination-item", className: cn("ddga-pagination__item", className), ...props });
1845
+ }
1846
+ function PaginationLink({ asChild, isActive, className, ...props }) {
1847
+ const Comp = asChild ? SlotPrimitive7.Slot : "a";
1848
+ return /* @__PURE__ */ jsx21(
1849
+ Comp,
1850
+ {
1851
+ "aria-current": isActive ? "page" : void 0,
1852
+ "data-slot": "pagination-link",
1853
+ "data-active": isActive ? "" : void 0,
1854
+ className: cn(paginationLinkVariants({ isActive }), className),
1855
+ ...props
1856
+ }
1857
+ );
1858
+ }
1859
+ function PaginationPrevious({
1860
+ label = "Previous",
1861
+ className,
1862
+ children,
1863
+ asChild,
1864
+ ...props
1865
+ }) {
1866
+ return /* @__PURE__ */ jsx21(
1867
+ PaginationLink,
1868
+ {
1869
+ asChild,
1870
+ "aria-label": label,
1871
+ "data-slot": "pagination-previous",
1872
+ className: cn("ddga-pagination__nav", "ddga-pagination__nav--previous", className),
1873
+ ...props,
1874
+ children: children ?? /* @__PURE__ */ jsxs15(Fragment, { children: [
1875
+ /* @__PURE__ */ jsx21(ChevronRight, { className: "ddga-pagination__nav-icon ddga-pagination__nav-icon--previous" }),
1876
+ /* @__PURE__ */ jsx21("span", { children: label })
1877
+ ] })
1878
+ }
1879
+ );
1880
+ }
1881
+ function PaginationNext({
1882
+ label = "Next",
1883
+ className,
1884
+ children,
1885
+ asChild,
1886
+ ...props
1887
+ }) {
1888
+ return /* @__PURE__ */ jsx21(
1889
+ PaginationLink,
1890
+ {
1891
+ asChild,
1892
+ "aria-label": label,
1893
+ "data-slot": "pagination-next",
1894
+ className: cn("ddga-pagination__nav", "ddga-pagination__nav--next", className),
1895
+ ...props,
1896
+ children: children ?? /* @__PURE__ */ jsxs15(Fragment, { children: [
1897
+ /* @__PURE__ */ jsx21("span", { children: label }),
1898
+ /* @__PURE__ */ jsx21(ChevronRight, { className: "ddga-pagination__nav-icon ddga-pagination__nav-icon--next" })
1899
+ ] })
1900
+ }
1901
+ );
1902
+ }
1903
+ function PaginationEllipsis({ className, ...props }) {
1904
+ return /* @__PURE__ */ jsx21(
1905
+ "span",
1906
+ {
1907
+ role: "presentation",
1908
+ "aria-hidden": "true",
1909
+ "data-slot": "pagination-ellipsis",
1910
+ className: cn("ddga-pagination__ellipsis", className),
1911
+ ...props,
1912
+ children: /* @__PURE__ */ jsx21(MoreHorizontal, {})
1913
+ }
1914
+ );
1915
+ }
1916
+
1917
+ // src/components/Accordion/Accordion.tsx
1918
+ import { Accordion as AccordionPrimitive } from "radix-ui";
1919
+ import { cva as cva20 } from "class-variance-authority";
1920
+ import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
1921
+ var accordionVariants = cva20("ddga-accordion", {
1922
+ variants: {
1923
+ size: {
1924
+ sm: "ddga-accordion--sm",
1925
+ md: "ddga-accordion--md"
1926
+ }
1927
+ },
1928
+ defaultVariants: {
1929
+ size: "md"
1930
+ }
1931
+ });
1932
+ function Accordion({ size, className, ...props }) {
1933
+ return /* @__PURE__ */ jsx22(
1934
+ AccordionPrimitive.Root,
1935
+ {
1936
+ "data-slot": "accordion",
1937
+ className: cn(accordionVariants({ size }), className),
1938
+ ...props
1939
+ }
1940
+ );
1941
+ }
1942
+ function AccordionItem({ className, ...props }) {
1943
+ return /* @__PURE__ */ jsx22(
1944
+ AccordionPrimitive.Item,
1945
+ {
1946
+ "data-slot": "accordion-item",
1947
+ className: cn("ddga-accordion__item", className),
1948
+ ...props
1949
+ }
1950
+ );
1951
+ }
1952
+ function AccordionTrigger({ className, children, ...props }) {
1953
+ return /* @__PURE__ */ jsx22(AccordionPrimitive.Header, { className: "ddga-accordion__header", children: /* @__PURE__ */ jsxs16(
1954
+ AccordionPrimitive.Trigger,
1955
+ {
1956
+ "data-slot": "accordion-trigger",
1957
+ className: cn("ddga-accordion__trigger", className),
1958
+ ...props,
1959
+ children: [
1960
+ children,
1961
+ /* @__PURE__ */ jsx22(
1962
+ ChevronDown,
1963
+ {
1964
+ "aria-hidden": "true",
1965
+ className: "ddga-accordion__chevron",
1966
+ "data-slot": "accordion-chevron"
1967
+ }
1968
+ )
1969
+ ]
1970
+ }
1971
+ ) });
1972
+ }
1973
+ function AccordionContent({ className, children, ...props }) {
1974
+ return /* @__PURE__ */ jsx22(
1975
+ AccordionPrimitive.Content,
1976
+ {
1977
+ "data-slot": "accordion-content",
1978
+ className: cn("ddga-accordion__content", className),
1979
+ ...props,
1980
+ children: /* @__PURE__ */ jsx22("div", { className: "ddga-accordion__content-inner", children })
1981
+ }
1982
+ );
1983
+ }
1984
+
1985
+ // src/components/Steps/Steps.tsx
1986
+ import { cva as cva21 } from "class-variance-authority";
1987
+ import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
1988
+ var stepsVariants = cva21("ddga-steps", {
1989
+ variants: {
1990
+ size: {
1991
+ sm: "ddga-steps--sm",
1992
+ md: "ddga-steps--md"
1993
+ },
1994
+ orientation: {
1995
+ horizontal: "ddga-steps--horizontal",
1996
+ vertical: "ddga-steps--vertical"
1997
+ }
1998
+ },
1999
+ defaultVariants: {
2000
+ size: "md",
2001
+ orientation: "horizontal"
2002
+ }
2003
+ });
2004
+ var stepVariants = cva21("ddga-steps__step", {
2005
+ variants: {
2006
+ state: {
2007
+ completed: "ddga-steps__step--completed",
2008
+ current: "ddga-steps__step--current",
2009
+ upcoming: "ddga-steps__step--upcoming"
2010
+ }
2011
+ },
2012
+ defaultVariants: {
2013
+ state: "upcoming"
2014
+ }
2015
+ });
2016
+ function Steps({ size, orientation, className, ...props }) {
2017
+ return /* @__PURE__ */ jsx23(
2018
+ "ol",
2019
+ {
2020
+ "data-slot": "steps",
2021
+ "data-orientation": orientation ?? "horizontal",
2022
+ className: cn(stepsVariants({ size, orientation }), className),
2023
+ ...props
2024
+ }
2025
+ );
2026
+ }
2027
+ function Step({ state, className, ...props }) {
2028
+ return /* @__PURE__ */ jsx23(
2029
+ "li",
2030
+ {
2031
+ "aria-current": state === "current" ? "step" : void 0,
2032
+ "data-slot": "step",
2033
+ "data-state": state ?? "upcoming",
2034
+ className: cn(stepVariants({ state }), className),
2035
+ ...props
2036
+ }
2037
+ );
2038
+ }
2039
+ function StepIndicator({ step, className, ...props }) {
2040
+ return /* @__PURE__ */ jsxs17(
2041
+ "span",
2042
+ {
2043
+ "aria-hidden": "true",
2044
+ "data-slot": "step-indicator",
2045
+ className: cn("ddga-steps__indicator", className),
2046
+ ...props,
2047
+ children: [
2048
+ /* @__PURE__ */ jsx23(Check, { className: "ddga-steps__indicator-check" }),
2049
+ /* @__PURE__ */ jsx23("span", { className: "ddga-steps__indicator-number", children: step })
2050
+ ]
2051
+ }
2052
+ );
2053
+ }
2054
+ function StepTitle({ className, ...props }) {
2055
+ return /* @__PURE__ */ jsx23("span", { "data-slot": "step-title", className: cn("ddga-steps__title", className), ...props });
2056
+ }
2057
+ function StepDescription({ className, ...props }) {
2058
+ return /* @__PURE__ */ jsx23(
2059
+ "span",
2060
+ {
2061
+ "data-slot": "step-description",
2062
+ className: cn("ddga-steps__description", className),
2063
+ ...props
2064
+ }
2065
+ );
2066
+ }
2067
+
2068
+ // src/components/Skeleton/Skeleton.tsx
2069
+ import { cva as cva22 } from "class-variance-authority";
2070
+ import { jsx as jsx24 } from "react/jsx-runtime";
2071
+ var skeletonVariants = cva22("ddga-skeleton", {
2072
+ variants: {
2073
+ shape: {
2074
+ text: "ddga-skeleton--text",
2075
+ circle: "ddga-skeleton--circle",
2076
+ rectangle: "ddga-skeleton--rectangle"
2077
+ },
2078
+ animation: {
2079
+ pulse: "ddga-skeleton--pulse",
2080
+ wave: "ddga-skeleton--wave",
2081
+ none: "ddga-skeleton--none"
2082
+ }
2083
+ },
2084
+ defaultVariants: {
2085
+ shape: "text",
2086
+ animation: "pulse"
2087
+ }
2088
+ });
2089
+ function Skeleton({ shape, animation, width, height, className, style, ...props }) {
2090
+ const sizeStyle = {
2091
+ ...width !== void 0 ? { width: typeof width === "number" ? `${width}px` : width } : null,
2092
+ ...height !== void 0 ? { height: typeof height === "number" ? `${height}px` : height } : null,
2093
+ ...style
2094
+ };
2095
+ return /* @__PURE__ */ jsx24(
2096
+ "div",
2097
+ {
2098
+ "data-slot": "skeleton",
2099
+ "aria-hidden": "true",
2100
+ className: cn(skeletonVariants({ shape, animation }), className),
2101
+ style: sizeStyle,
2102
+ ...props
2103
+ }
2104
+ );
2105
+ }
2106
+
2107
+ // src/components/Progress/Progress.tsx
2108
+ import { Progress as ProgressPrimitive } from "radix-ui";
2109
+ import { cva as cva23 } from "class-variance-authority";
2110
+ import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
2111
+ var progressVariants = cva23("ddga-progress", {
2112
+ variants: {
2113
+ size: {
2114
+ sm: "ddga-progress--sm",
2115
+ md: "ddga-progress--md",
2116
+ lg: "ddga-progress--lg"
2117
+ },
2118
+ color: {
2119
+ primary: "ddga-progress--primary",
2120
+ success: "ddga-progress--success",
2121
+ warning: "ddga-progress--warning",
2122
+ destructive: "ddga-progress--destructive"
2123
+ }
2124
+ },
2125
+ defaultVariants: {
2126
+ size: "md",
2127
+ color: "primary"
2128
+ }
2129
+ });
2130
+ var circularProgressVariants = cva23("ddga-circular-progress", {
2131
+ variants: {
2132
+ size: {
2133
+ sm: "ddga-circular-progress--sm",
2134
+ md: "ddga-circular-progress--md",
2135
+ lg: "ddga-circular-progress--lg"
2136
+ },
2137
+ color: {
2138
+ primary: "ddga-circular-progress--primary",
2139
+ success: "ddga-circular-progress--success",
2140
+ warning: "ddga-circular-progress--warning",
2141
+ destructive: "ddga-circular-progress--destructive"
2142
+ }
2143
+ },
2144
+ defaultVariants: {
2145
+ size: "md",
2146
+ color: "primary"
2147
+ }
2148
+ });
2149
+ function Progress({ value = null, max = 100, size, color, className, ...props }) {
2150
+ const isIndeterminate = value === null;
2151
+ const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / max * 100));
2152
+ return /* @__PURE__ */ jsx25(
2153
+ ProgressPrimitive.Root,
2154
+ {
2155
+ "data-slot": "progress",
2156
+ value,
2157
+ max,
2158
+ className: cn(progressVariants({ size, color }), className),
2159
+ ...props,
2160
+ children: /* @__PURE__ */ jsx25(
2161
+ ProgressPrimitive.Indicator,
2162
+ {
2163
+ "data-slot": "progress-indicator",
2164
+ className: "ddga-progress__indicator",
2165
+ style: isIndeterminate ? void 0 : { transform: `translateX(${pct - 100}%)` }
2166
+ }
2167
+ )
2168
+ }
2169
+ );
2170
+ }
2171
+ var CIRCULAR_SIZES = { sm: 32, md: 48, lg: 72 };
2172
+ var CIRCULAR_DEFAULT_THICKNESS = { sm: 4, md: 5, lg: 6 };
2173
+ function CircularProgress({
2174
+ value = null,
2175
+ max = 100,
2176
+ size,
2177
+ color,
2178
+ thickness,
2179
+ showLabel = false,
2180
+ className,
2181
+ ...props
2182
+ }) {
2183
+ const isIndeterminate = value === null;
2184
+ const sizeKey = size ?? "md";
2185
+ const diameter = CIRCULAR_SIZES[sizeKey];
2186
+ const strokeWidth = thickness ?? CIRCULAR_DEFAULT_THICKNESS[sizeKey];
2187
+ const radius = (diameter - strokeWidth) / 2;
2188
+ const circumference = 2 * Math.PI * radius;
2189
+ const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / max * 100));
2190
+ const dashOffset = isIndeterminate ? circumference * 0.75 : circumference * (1 - pct / 100);
2191
+ const state = isIndeterminate ? "indeterminate" : value >= max ? "complete" : "loading";
2192
+ return /* @__PURE__ */ jsxs18(
2193
+ "div",
2194
+ {
2195
+ "data-slot": "circular-progress",
2196
+ "data-state": state,
2197
+ role: "progressbar",
2198
+ "aria-valuemin": 0,
2199
+ "aria-valuemax": max,
2200
+ "aria-valuenow": isIndeterminate ? void 0 : value,
2201
+ className: cn(circularProgressVariants({ size, color }), className),
2202
+ style: { inlineSize: diameter, blockSize: diameter },
2203
+ ...props,
2204
+ children: [
2205
+ /* @__PURE__ */ jsxs18(
2206
+ "svg",
2207
+ {
2208
+ className: "ddga-circular-progress__svg",
2209
+ viewBox: `0 0 ${diameter} ${diameter}`,
2210
+ width: diameter,
2211
+ height: diameter,
2212
+ "aria-hidden": "true",
2213
+ focusable: "false",
2214
+ children: [
2215
+ /* @__PURE__ */ jsx25(
2216
+ "circle",
2217
+ {
2218
+ className: "ddga-circular-progress__track",
2219
+ cx: diameter / 2,
2220
+ cy: diameter / 2,
2221
+ r: radius,
2222
+ fill: "none",
2223
+ strokeWidth
2224
+ }
2225
+ ),
2226
+ /* @__PURE__ */ jsx25(
2227
+ "circle",
2228
+ {
2229
+ className: "ddga-circular-progress__indicator",
2230
+ cx: diameter / 2,
2231
+ cy: diameter / 2,
2232
+ r: radius,
2233
+ fill: "none",
2234
+ strokeWidth,
2235
+ strokeLinecap: "round",
2236
+ strokeDasharray: circumference,
2237
+ strokeDashoffset: dashOffset,
2238
+ transform: `rotate(-90 ${diameter / 2} ${diameter / 2})`
2239
+ }
2240
+ )
2241
+ ]
2242
+ }
2243
+ ),
2244
+ showLabel && !isIndeterminate ? /* @__PURE__ */ jsxs18("span", { className: "ddga-circular-progress__label", "aria-hidden": "true", children: [
2245
+ Math.round(pct),
2246
+ "%"
2247
+ ] }) : null
2248
+ ]
2249
+ }
2250
+ );
2251
+ }
2252
+
2253
+ // src/components/DropdownMenu/DropdownMenu.tsx
2254
+ import { useContext as useContext5 } from "react";
2255
+ import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2256
+ import { cva as cva24 } from "class-variance-authority";
2257
+ import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
2258
+ var dropdownMenuVariants = cva24("ddga-dropdown-menu", {
2259
+ variants: {
2260
+ size: {
2261
+ sm: "ddga-dropdown-menu--sm",
2262
+ md: "ddga-dropdown-menu--md"
2263
+ }
2264
+ },
2265
+ defaultVariants: {
2266
+ size: "md"
2267
+ }
2268
+ });
2269
+ function DropdownMenu(props) {
2270
+ return /* @__PURE__ */ jsx26(DropdownMenuPrimitive.Root, { ...props });
2271
+ }
2272
+ function DropdownMenuTrigger(props) {
2273
+ return /* @__PURE__ */ jsx26(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
2274
+ }
2275
+ function DropdownMenuContent({
2276
+ size,
2277
+ className,
2278
+ sideOffset = 6,
2279
+ ...props
2280
+ }) {
2281
+ const ctx = useContext5(DgaContext);
2282
+ const portalContainer = ctx?.rootEl ?? void 0;
2283
+ return /* @__PURE__ */ jsx26(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx26(
2284
+ DropdownMenuPrimitive.Content,
2285
+ {
2286
+ "data-slot": "dropdown-menu-content",
2287
+ sideOffset,
2288
+ className: cn(dropdownMenuVariants({ size }), className),
2289
+ ...props
2290
+ }
2291
+ ) });
2292
+ }
2293
+ function DropdownMenuItem({
2294
+ className,
2295
+ destructive,
2296
+ startIcon,
2297
+ shortcut,
2298
+ children,
2299
+ ...props
2300
+ }) {
2301
+ return /* @__PURE__ */ jsxs19(
2302
+ DropdownMenuPrimitive.Item,
2303
+ {
2304
+ "data-slot": "dropdown-menu-item",
2305
+ "data-destructive": destructive ? "" : void 0,
2306
+ className: cn("ddga-dropdown-menu__item", className),
2307
+ ...props,
2308
+ children: [
2309
+ startIcon ? /* @__PURE__ */ jsx26("span", { className: "ddga-dropdown-menu__icon", "aria-hidden": "true", children: startIcon }) : null,
2310
+ /* @__PURE__ */ jsx26("span", { className: "ddga-dropdown-menu__label", children }),
2311
+ shortcut ? /* @__PURE__ */ jsx26("span", { className: "ddga-dropdown-menu__shortcut", "aria-hidden": "true", children: shortcut }) : null
2312
+ ]
2313
+ }
2314
+ );
2315
+ }
2316
+ function DropdownMenuCheckboxItem({
2317
+ className,
2318
+ children,
2319
+ onSelect,
2320
+ ...props
2321
+ }) {
2322
+ const handleSelect = onSelect ?? ((event) => {
2323
+ event.preventDefault();
2324
+ });
2325
+ return /* @__PURE__ */ jsxs19(
2326
+ DropdownMenuPrimitive.CheckboxItem,
2327
+ {
2328
+ "data-slot": "dropdown-menu-checkbox-item",
2329
+ className: cn("ddga-dropdown-menu__item", "ddga-dropdown-menu__item--checkable", className),
2330
+ onSelect: handleSelect,
2331
+ ...props,
2332
+ children: [
2333
+ /* @__PURE__ */ jsx26("span", { className: "ddga-dropdown-menu__indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx26(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx26(Check, { className: "ddga-dropdown-menu__indicator-icon" }) }) }),
2334
+ /* @__PURE__ */ jsx26("span", { className: "ddga-dropdown-menu__label", children })
2335
+ ]
2336
+ }
2337
+ );
2338
+ }
2339
+ function DropdownMenuRadioGroup(props) {
2340
+ return /* @__PURE__ */ jsx26(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
2341
+ }
2342
+ function DropdownMenuRadioItem({
2343
+ className,
2344
+ children,
2345
+ onSelect,
2346
+ ...props
2347
+ }) {
2348
+ const handleSelect = onSelect ?? ((event) => {
2349
+ event.preventDefault();
2350
+ });
2351
+ return /* @__PURE__ */ jsxs19(
2352
+ DropdownMenuPrimitive.RadioItem,
2353
+ {
2354
+ "data-slot": "dropdown-menu-radio-item",
2355
+ className: cn("ddga-dropdown-menu__item", "ddga-dropdown-menu__item--checkable", className),
2356
+ onSelect: handleSelect,
2357
+ ...props,
2358
+ children: [
2359
+ /* @__PURE__ */ jsx26("span", { className: "ddga-dropdown-menu__indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx26(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx26("span", { className: "ddga-dropdown-menu__radio-dot" }) }) }),
2360
+ /* @__PURE__ */ jsx26("span", { className: "ddga-dropdown-menu__label", children })
2361
+ ]
2362
+ }
2363
+ );
2364
+ }
2365
+ function DropdownMenuLabel({ className, ...props }) {
2366
+ return /* @__PURE__ */ jsx26(
2367
+ DropdownMenuPrimitive.Label,
2368
+ {
2369
+ "data-slot": "dropdown-menu-label",
2370
+ className: cn("ddga-dropdown-menu__group-label", className),
2371
+ ...props
2372
+ }
2373
+ );
2374
+ }
2375
+ function DropdownMenuSeparator({ className, ...props }) {
2376
+ return /* @__PURE__ */ jsx26(
2377
+ DropdownMenuPrimitive.Separator,
2378
+ {
2379
+ "data-slot": "dropdown-menu-separator",
2380
+ className: cn("ddga-dropdown-menu__separator", className),
2381
+ ...props
2382
+ }
2383
+ );
2384
+ }
2385
+ function DropdownMenuGroup(props) {
2386
+ return /* @__PURE__ */ jsx26(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
2387
+ }
2388
+ function DropdownMenuSub(props) {
2389
+ return /* @__PURE__ */ jsx26(DropdownMenuPrimitive.Sub, { ...props });
2390
+ }
2391
+ function DropdownMenuSubTrigger({
2392
+ className,
2393
+ startIcon,
2394
+ children,
2395
+ ...props
2396
+ }) {
2397
+ return /* @__PURE__ */ jsxs19(
2398
+ DropdownMenuPrimitive.SubTrigger,
2399
+ {
2400
+ "data-slot": "dropdown-menu-sub-trigger",
2401
+ className: cn("ddga-dropdown-menu__item", "ddga-dropdown-menu__item--sub", className),
2402
+ ...props,
2403
+ children: [
2404
+ startIcon ? /* @__PURE__ */ jsx26("span", { className: "ddga-dropdown-menu__icon", "aria-hidden": "true", children: startIcon }) : null,
2405
+ /* @__PURE__ */ jsx26("span", { className: "ddga-dropdown-menu__label", children }),
2406
+ /* @__PURE__ */ jsx26(ChevronRight, { className: "ddga-dropdown-menu__sub-chevron", "aria-hidden": "true" })
2407
+ ]
2408
+ }
2409
+ );
2410
+ }
2411
+ function DropdownMenuSubContent({ size, className, ...props }) {
2412
+ const ctx = useContext5(DgaContext);
2413
+ const portalContainer = ctx?.rootEl ?? void 0;
2414
+ return /* @__PURE__ */ jsx26(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx26(
2415
+ DropdownMenuPrimitive.SubContent,
2416
+ {
2417
+ "data-slot": "dropdown-menu-sub-content",
2418
+ className: cn(dropdownMenuVariants({ size }), className),
2419
+ ...props
2420
+ }
2421
+ ) });
2422
+ }
2423
+
2424
+ // src/components/Drawer/Drawer.tsx
2425
+ import { useContext as useContext6 } from "react";
2426
+ import { Dialog as DialogPrimitive2, Slot as SlotPrimitive8 } from "radix-ui";
2427
+ import { cva as cva25 } from "class-variance-authority";
2428
+ import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
2429
+ var drawerVariants = cva25("ddga-drawer", {
2430
+ variants: {
2431
+ side: {
2432
+ start: "ddga-drawer--start",
2433
+ end: "ddga-drawer--end",
2434
+ top: "ddga-drawer--top",
2435
+ bottom: "ddga-drawer--bottom"
2436
+ },
2437
+ size: {
2438
+ sm: "ddga-drawer--sm",
2439
+ md: "ddga-drawer--md",
2440
+ lg: "ddga-drawer--lg",
2441
+ full: "ddga-drawer--full"
2442
+ }
2443
+ },
2444
+ defaultVariants: {
2445
+ side: "end",
2446
+ size: "md"
2447
+ }
2448
+ });
2449
+ function Drawer(props) {
2450
+ return /* @__PURE__ */ jsx27(DialogPrimitive2.Root, { ...props });
2451
+ }
2452
+ function DrawerTrigger({ className, ...props }) {
2453
+ return /* @__PURE__ */ jsx27(DialogPrimitive2.Trigger, { "data-slot": "drawer-trigger", className, ...props });
2454
+ }
2455
+ function DrawerContent({
2456
+ side,
2457
+ size,
2458
+ showCloseButton = true,
2459
+ closeLabel = "Close",
2460
+ className,
2461
+ children,
2462
+ ...props
2463
+ }) {
2464
+ const ctx = useContext6(DgaContext);
2465
+ const portalContainer = ctx?.rootEl ?? void 0;
2466
+ return /* @__PURE__ */ jsxs20(DialogPrimitive2.Portal, { container: portalContainer, children: [
2467
+ /* @__PURE__ */ jsx27(DialogPrimitive2.Overlay, { className: "ddga-drawer__overlay", "data-slot": "drawer-overlay" }),
2468
+ /* @__PURE__ */ jsxs20(
2469
+ DialogPrimitive2.Content,
2470
+ {
2471
+ "data-slot": "drawer-content",
2472
+ className: cn(drawerVariants({ side, size }), className),
2473
+ ...props,
2474
+ children: [
2475
+ children,
2476
+ showCloseButton ? /* @__PURE__ */ jsx27(
2477
+ DialogPrimitive2.Close,
2478
+ {
2479
+ className: "ddga-drawer__close",
2480
+ "aria-label": closeLabel,
2481
+ "data-slot": "drawer-close-x",
2482
+ children: /* @__PURE__ */ jsx27(Close, { "aria-hidden": "true" })
2483
+ }
2484
+ ) : null
2485
+ ]
2486
+ }
2487
+ )
2488
+ ] });
2489
+ }
2490
+ function DrawerHeader({ asChild, className, ...props }) {
2491
+ const Comp = asChild ? SlotPrimitive8.Slot : "div";
2492
+ return /* @__PURE__ */ jsx27(Comp, { "data-slot": "drawer-header", className: cn("ddga-drawer__header", className), ...props });
2493
+ }
2494
+ function DrawerTitle({ asChild, className, ...props }) {
2495
+ return /* @__PURE__ */ jsx27(
2496
+ DialogPrimitive2.Title,
2497
+ {
2498
+ asChild,
2499
+ "data-slot": "drawer-title",
2500
+ className: cn("ddga-drawer__title", className),
2501
+ ...props
2502
+ }
2503
+ );
2504
+ }
2505
+ function DrawerDescription({ asChild, className, ...props }) {
2506
+ return /* @__PURE__ */ jsx27(
2507
+ DialogPrimitive2.Description,
2508
+ {
2509
+ asChild,
2510
+ "data-slot": "drawer-description",
2511
+ className: cn("ddga-drawer__description", className),
2512
+ ...props
2513
+ }
2514
+ );
2515
+ }
2516
+ function DrawerBody({ asChild, className, ...props }) {
2517
+ const Comp = asChild ? SlotPrimitive8.Slot : "div";
2518
+ return /* @__PURE__ */ jsx27(Comp, { "data-slot": "drawer-body", className: cn("ddga-drawer__body", className), ...props });
2519
+ }
2520
+ function DrawerFooter({ asChild, className, ...props }) {
2521
+ const Comp = asChild ? SlotPrimitive8.Slot : "div";
2522
+ return /* @__PURE__ */ jsx27(Comp, { "data-slot": "drawer-footer", className: cn("ddga-drawer__footer", className), ...props });
2523
+ }
2524
+ function DrawerClose({ className, ...props }) {
2525
+ return /* @__PURE__ */ jsx27(DialogPrimitive2.Close, { "data-slot": "drawer-close", className, ...props });
2526
+ }
2527
+
2528
+ // src/components/Combobox/Combobox.tsx
2529
+ import {
2530
+ Children as Children2,
2531
+ createContext as createContext2,
2532
+ isValidElement as isValidElement2,
2533
+ useCallback,
2534
+ useContext as useContext7,
2535
+ useId as useId3,
2536
+ useMemo,
2537
+ useState as useState3
2538
+ } from "react";
2539
+ import { Command } from "cmdk";
2540
+ import { Popover as PopoverPrimitive } from "radix-ui";
2541
+ import { cva as cva26 } from "class-variance-authority";
2542
+ import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
2543
+ var comboboxTriggerVariants = cva26("ddga-combobox-trigger", {
2544
+ variants: {
2545
+ size: {
2546
+ sm: "ddga-combobox-trigger--sm",
2547
+ md: "ddga-combobox-trigger--md"
2548
+ },
2549
+ error: {
2550
+ true: "ddga-combobox-trigger--error"
2551
+ }
2552
+ },
2553
+ defaultVariants: {
2554
+ size: "md"
2555
+ }
2556
+ });
2557
+ var comboboxVariants = comboboxTriggerVariants;
2558
+ var ComboboxContext = createContext2(null);
2559
+ function useComboboxContext(component) {
2560
+ const ctx = useContext7(ComboboxContext);
2561
+ if (!ctx) {
2562
+ throw new Error(`<${component}> must be rendered inside <Combobox>.`);
2563
+ }
2564
+ return ctx;
2565
+ }
2566
+ function Combobox({
2567
+ value: controlledValue,
2568
+ defaultValue,
2569
+ onValueChange,
2570
+ open: controlledOpen,
2571
+ defaultOpen,
2572
+ onOpenChange,
2573
+ label,
2574
+ helperText,
2575
+ errorMessage,
2576
+ error,
2577
+ required,
2578
+ disabled,
2579
+ size,
2580
+ placeholder,
2581
+ searchPlaceholder = "Search\u2026",
2582
+ emptyMessage = "No results.",
2583
+ getLabel,
2584
+ id: externalId,
2585
+ className,
2586
+ children,
2587
+ "aria-label": ariaLabel,
2588
+ "aria-labelledby": ariaLabelledBy
2589
+ }) {
2590
+ const [internalValue, setInternalValue] = useState3(defaultValue);
2591
+ const isControlled = controlledValue !== void 0;
2592
+ const value = isControlled ? controlledValue : internalValue;
2593
+ const [internalOpen, setInternalOpen] = useState3(defaultOpen ?? false);
2594
+ const isOpenControlled = controlledOpen !== void 0;
2595
+ const open = isOpenControlled ? controlledOpen : internalOpen;
2596
+ const setOpen = useCallback(
2597
+ (next) => {
2598
+ if (!isOpenControlled) setInternalOpen(next);
2599
+ onOpenChange?.(next);
2600
+ },
2601
+ [isOpenControlled, onOpenChange]
2602
+ );
2603
+ const select = useCallback(
2604
+ (next) => {
2605
+ if (!isControlled) setInternalValue(next);
2606
+ onValueChange?.(next);
2607
+ setOpen(false);
2608
+ },
2609
+ [isControlled, onValueChange, setOpen]
2610
+ );
2611
+ const ctx = useMemo(() => ({ value, select }), [value, select]);
2612
+ const itemLabels = useMemo(() => {
2613
+ const map = /* @__PURE__ */ new Map();
2614
+ const visit = (nodes) => {
2615
+ Children2.forEach(nodes, (child) => {
2616
+ if (!isValidElement2(child)) return;
2617
+ const childProps = child.props;
2618
+ if (typeof childProps.value === "string") {
2619
+ map.set(childProps.value, childProps.children);
2620
+ } else if (childProps.children) {
2621
+ visit(childProps.children);
2622
+ }
2623
+ });
2624
+ };
2625
+ visit(children);
2626
+ return map;
2627
+ }, [children]);
2628
+ const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
2629
+ name: "Combobox",
2630
+ id: externalId,
2631
+ label,
2632
+ error,
2633
+ errorMessage,
2634
+ helperText,
2635
+ "aria-label": ariaLabel,
2636
+ "aria-labelledby": ariaLabelledBy
2637
+ });
2638
+ const providerCtx = useContext7(DgaContext);
2639
+ const portalContainer = providerCtx?.rootEl ?? void 0;
2640
+ const triggerLabel = useMemo(() => {
2641
+ if (value === void 0) return null;
2642
+ if (getLabel) return getLabel(value);
2643
+ return itemLabels.get(value) ?? null;
2644
+ }, [value, getLabel, itemLabels]);
2645
+ const searchId = useId3();
2646
+ return /* @__PURE__ */ jsx28(ComboboxContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxs21("div", { "data-slot": "combobox-field", className: "ddga-field", children: [
2647
+ label && /* @__PURE__ */ jsxs21("label", { htmlFor: fieldId, className: "ddga-combobox__label", children: [
2648
+ label,
2649
+ required && /* @__PURE__ */ jsx28("span", { "aria-hidden": "true", className: "ddga-combobox__required", children: "*" })
2650
+ ] }),
2651
+ /* @__PURE__ */ jsxs21(PopoverPrimitive.Root, { open, onOpenChange: setOpen, children: [
2652
+ /* @__PURE__ */ jsx28(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs21(
2653
+ "button",
2654
+ {
2655
+ type: "button",
2656
+ ...controlProps,
2657
+ "aria-required": required || void 0,
2658
+ disabled,
2659
+ "data-slot": "combobox-trigger",
2660
+ className: cn(comboboxTriggerVariants({ size, error: hasError }), className),
2661
+ children: [
2662
+ /* @__PURE__ */ jsx28("span", { className: "ddga-combobox__value", children: triggerLabel ?? /* @__PURE__ */ jsx28("span", { className: "ddga-combobox__placeholder", children: placeholder }) }),
2663
+ /* @__PURE__ */ jsx28(ChevronDown, { "aria-hidden": "true", className: "ddga-combobox__icon" })
2664
+ ]
2665
+ }
2666
+ ) }),
2667
+ /* @__PURE__ */ jsx28(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx28(
2668
+ PopoverPrimitive.Content,
2669
+ {
2670
+ "data-slot": "combobox-content",
2671
+ className: "ddga-combobox-content",
2672
+ sideOffset: 4,
2673
+ align: "start",
2674
+ "aria-label": ariaLabel ?? (typeof label === "string" ? label : "Options"),
2675
+ "aria-labelledby": ariaLabelledBy,
2676
+ style: { inlineSize: "var(--radix-popover-trigger-width)" },
2677
+ onOpenAutoFocus: (event) => {
2678
+ event.preventDefault();
2679
+ },
2680
+ children: /* @__PURE__ */ jsxs21(
2681
+ Command,
2682
+ {
2683
+ id: searchId,
2684
+ "data-slot": "combobox-command",
2685
+ className: "ddga-combobox-command",
2686
+ children: [
2687
+ /* @__PURE__ */ jsx28(
2688
+ Command.Input,
2689
+ {
2690
+ autoFocus: true,
2691
+ placeholder: searchPlaceholder,
2692
+ "data-slot": "combobox-input",
2693
+ className: "ddga-combobox-input"
2694
+ }
2695
+ ),
2696
+ /* @__PURE__ */ jsxs21(Command.List, { "data-slot": "combobox-list", className: "ddga-combobox-list", children: [
2697
+ /* @__PURE__ */ jsx28(Command.Empty, { "data-slot": "combobox-empty", className: "ddga-combobox-empty", children: emptyMessage }),
2698
+ children
2699
+ ] })
2700
+ ]
2701
+ }
2702
+ )
2703
+ }
2704
+ ) })
2705
+ ] }),
2706
+ hasErrorMessage && /* @__PURE__ */ jsx28(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
2707
+ hasHelper && /* @__PURE__ */ jsx28(FieldMessage, { id: helperId, variant: "helper", children: helperText })
2708
+ ] }) });
2709
+ }
2710
+ function ComboboxItem({
2711
+ value,
2712
+ keywords,
2713
+ disabled,
2714
+ onSelect,
2715
+ className,
2716
+ children,
2717
+ ...props
2718
+ }) {
2719
+ const { value: selectedValue, select } = useComboboxContext("ComboboxItem");
2720
+ const isSelected = selectedValue === value;
2721
+ return /* @__PURE__ */ jsxs21(
2722
+ Command.Item,
2723
+ {
2724
+ value,
2725
+ keywords,
2726
+ disabled,
2727
+ onSelect: (v) => {
2728
+ onSelect?.(v);
2729
+ select(v);
2730
+ },
2731
+ "data-slot": "combobox-item",
2732
+ "data-active": isSelected ? "" : void 0,
2733
+ className: cn("ddga-combobox-item", className),
2734
+ ...props,
2735
+ children: [
2736
+ /* @__PURE__ */ jsx28("span", { className: "ddga-combobox-item__check", "aria-hidden": "true", children: isSelected ? /* @__PURE__ */ jsx28(Check, {}) : null }),
2737
+ /* @__PURE__ */ jsx28("span", { className: "ddga-combobox-item__label", children })
2738
+ ]
2739
+ }
2740
+ );
2741
+ }
2742
+ function ComboboxGroup({ className, heading, ...props }) {
2743
+ return /* @__PURE__ */ jsx28(
2744
+ Command.Group,
2745
+ {
2746
+ heading,
2747
+ "data-slot": "combobox-group",
2748
+ className: cn("ddga-combobox-group", className),
2749
+ ...props
2750
+ }
2751
+ );
2752
+ }
2753
+ function ComboboxSeparator({ className, ...props }) {
2754
+ return /* @__PURE__ */ jsx28(
2755
+ Command.Separator,
2756
+ {
2757
+ "data-slot": "combobox-separator",
2758
+ className: cn("ddga-combobox-separator", className),
2759
+ ...props
2760
+ }
2761
+ );
2762
+ }
2763
+
1239
2764
  // src/providers/DgaProvider.tsx
1240
- import { useState as useState2, useMemo, useContext as useContext5 } from "react";
2765
+ import { useState as useState4, useMemo as useMemo2, useContext as useContext8 } from "react";
1241
2766
  import { Direction as DirectionPrimitive, Tooltip as TooltipPrimitive2 } from "radix-ui";
1242
2767
  import { buildTheme } from "@dev-dga/tokens";
1243
- import { jsx as jsx14 } from "react/jsx-runtime";
2768
+ import { jsx as jsx29 } from "react/jsx-runtime";
1244
2769
  function DgaProvider({
1245
2770
  dir = "ltr",
1246
2771
  locale,
@@ -1251,17 +2776,17 @@ function DgaProvider({
1251
2776
  style: consumerStyle,
1252
2777
  children
1253
2778
  }) {
1254
- const parentCtx = useContext5(DgaContext);
2779
+ const parentCtx = useContext8(DgaContext);
1255
2780
  const isNested = parentCtx !== null;
1256
- const [rootEl, setRootEl] = useState2(null);
2781
+ const [rootEl, setRootEl] = useState4(null);
1257
2782
  const resolvedLocale = locale ?? (dir === "rtl" ? "ar" : "en");
1258
- const ctxValue = useMemo(
2783
+ const ctxValue = useMemo2(
1259
2784
  () => ({ dir, locale: resolvedLocale, mode, rootEl }),
1260
2785
  [dir, resolvedLocale, mode, rootEl]
1261
2786
  );
1262
- const themeVars = useMemo(() => theme ? buildTheme(theme) : null, [theme]);
1263
- const inner = /* @__PURE__ */ jsx14(DirectionPrimitive.Provider, { dir, children });
1264
- return /* @__PURE__ */ jsx14(DgaContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx14(
2787
+ const themeVars = useMemo2(() => theme ? buildTheme(theme) : null, [theme]);
2788
+ const inner = /* @__PURE__ */ jsx29(DirectionPrimitive.Provider, { dir, children });
2789
+ return /* @__PURE__ */ jsx29(DgaContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx29(
1265
2790
  Component,
1266
2791
  {
1267
2792
  ref: setRootEl,
@@ -1271,7 +2796,7 @@ function DgaProvider({
1271
2796
  "data-theme": mode,
1272
2797
  className,
1273
2798
  style: { colorScheme: mode, ...themeVars ?? {}, ...consumerStyle },
1274
- children: isNested ? inner : /* @__PURE__ */ jsx14(TooltipPrimitive2.Provider, { delayDuration: 300, skipDelayDuration: 100, children: inner })
2799
+ children: isNested ? inner : /* @__PURE__ */ jsx29(TooltipPrimitive2.Provider, { delayDuration: 300, skipDelayDuration: 100, children: inner })
1275
2800
  }
1276
2801
  ) });
1277
2802
  }
@@ -1281,12 +2806,63 @@ function useDir() {
1281
2806
  return useDga().dir;
1282
2807
  }
1283
2808
  export {
2809
+ Accordion,
2810
+ AccordionContent,
2811
+ AccordionItem,
2812
+ AccordionTrigger,
1284
2813
  Alert,
1285
2814
  AlertDescription,
1286
2815
  AlertTitle,
2816
+ Avatar,
2817
+ AvatarFallback,
2818
+ AvatarGroup,
2819
+ AvatarImage,
2820
+ Badge,
2821
+ Breadcrumb,
2822
+ BreadcrumbEllipsis,
2823
+ BreadcrumbItem,
2824
+ BreadcrumbLink,
2825
+ BreadcrumbList,
2826
+ BreadcrumbPage,
2827
+ BreadcrumbSeparator,
1287
2828
  Button,
2829
+ Card,
2830
+ CardContent,
2831
+ CardDescription,
2832
+ CardFooter,
2833
+ CardHeader,
2834
+ CardImage,
2835
+ CardTitle,
1288
2836
  Checkbox,
2837
+ CircularProgress,
2838
+ Combobox,
2839
+ ComboboxGroup,
2840
+ ComboboxItem,
2841
+ ComboboxSeparator,
1289
2842
  DgaProvider,
2843
+ Divider,
2844
+ Drawer,
2845
+ DrawerBody,
2846
+ DrawerClose,
2847
+ DrawerContent,
2848
+ DrawerDescription,
2849
+ DrawerFooter,
2850
+ DrawerHeader,
2851
+ DrawerTitle,
2852
+ DrawerTrigger,
2853
+ DropdownMenu,
2854
+ DropdownMenuCheckboxItem,
2855
+ DropdownMenuContent,
2856
+ DropdownMenuGroup,
2857
+ DropdownMenuItem,
2858
+ DropdownMenuLabel,
2859
+ DropdownMenuRadioGroup,
2860
+ DropdownMenuRadioItem,
2861
+ DropdownMenuSeparator,
2862
+ DropdownMenuSub,
2863
+ DropdownMenuSubContent,
2864
+ DropdownMenuSubTrigger,
2865
+ DropdownMenuTrigger,
1290
2866
  FieldMessage,
1291
2867
  Input,
1292
2868
  Modal,
@@ -1297,28 +2873,67 @@ export {
1297
2873
  ModalHeader,
1298
2874
  ModalTitle,
1299
2875
  ModalTrigger,
2876
+ Pagination,
2877
+ PaginationContent,
2878
+ PaginationEllipsis,
2879
+ PaginationItem,
2880
+ PaginationLink,
2881
+ PaginationNext,
2882
+ PaginationPrevious,
2883
+ Progress,
1300
2884
  Radio,
1301
2885
  RadioGroup,
1302
2886
  Select,
1303
2887
  SelectItem,
2888
+ Skeleton,
2889
+ Spinner,
2890
+ Step,
2891
+ StepDescription,
2892
+ StepIndicator,
2893
+ StepTitle,
2894
+ Steps,
1304
2895
  Switch,
2896
+ Tabs,
2897
+ TabsContent,
2898
+ TabsList,
2899
+ TabsTrigger,
1305
2900
  Textarea,
1306
2901
  Toaster,
1307
2902
  Tooltip,
1308
2903
  TooltipContent,
1309
2904
  TooltipTrigger,
2905
+ accordionVariants,
1310
2906
  alertVariants,
2907
+ avatarVariants,
2908
+ badgeVariants,
2909
+ breadcrumbVariants,
1311
2910
  buttonVariants,
2911
+ cardVariants,
1312
2912
  checkboxVariants,
2913
+ circularProgressVariants,
1313
2914
  cn,
2915
+ comboboxTriggerVariants,
2916
+ comboboxVariants,
1314
2917
  createToast,
1315
2918
  createToastStore,
2919
+ dividerVariants,
2920
+ drawerVariants,
2921
+ dropdownMenuVariants,
1316
2922
  inputVariants,
1317
2923
  modalContentVariants,
2924
+ paginationLinkVariants,
2925
+ paginationVariants,
2926
+ progressVariants,
1318
2927
  radioGroupVariants,
1319
2928
  radioVariants,
1320
2929
  selectTriggerVariants,
2930
+ skeletonVariants,
2931
+ spinnerVariants,
2932
+ stepVariants,
2933
+ stepsVariants,
1321
2934
  switchVariants,
2935
+ tabsListVariants,
2936
+ tabsVariants,
1322
2937
  textareaVariants,
1323
2938
  toast,
1324
2939
  toastStore,