@dev-dga/react 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -80,6 +80,16 @@ var buttonVariants = cva2("ddga-button", {
80
80
  */
81
81
  inverted: {
82
82
  true: "ddga-button--inverted"
83
+ },
84
+ /**
85
+ * Floating action button: fully-rounded + elevated. Orthogonal to `variant`
86
+ * (color) and `size` — pair with `size="icon"` for a circular FAB, or a text
87
+ * size for an extended pill FAB. Positioning (`position: fixed`, safe-area
88
+ * insets) is the consumer's responsibility — see the placement recipe in the
89
+ * stories. Keep it a modifier, not a `Fab` wrapper component.
90
+ */
91
+ fab: {
92
+ true: "ddga-button--fab"
83
93
  }
84
94
  },
85
95
  compoundVariants: [],
@@ -93,6 +103,7 @@ function Button({
93
103
  size,
94
104
  fullWidth,
95
105
  inverted,
106
+ fab,
96
107
  loading,
97
108
  disabled,
98
109
  startIcon,
@@ -122,7 +133,7 @@ function Button({
122
133
  "aria-busy": loading || void 0,
123
134
  "data-slot": "button",
124
135
  className: cn(
125
- buttonVariants({ variant, size, fullWidth, inverted }),
136
+ buttonVariants({ variant, size, fullWidth, inverted, fab }),
126
137
  loading && "ddga-button--loading",
127
138
  className
128
139
  ),
@@ -704,6 +715,43 @@ function CaretDown(props) {
704
715
  }
705
716
  );
706
717
  }
718
+ function ExternalLink(props) {
719
+ return /* @__PURE__ */ jsxs4(
720
+ "svg",
721
+ {
722
+ xmlns: "http://www.w3.org/2000/svg",
723
+ width: "1em",
724
+ height: "1em",
725
+ viewBox: "0 0 24 24",
726
+ fill: "none",
727
+ stroke: "currentColor",
728
+ strokeWidth: "2",
729
+ strokeLinecap: "round",
730
+ strokeLinejoin: "round",
731
+ ...props,
732
+ children: [
733
+ /* @__PURE__ */ jsx6("path", { d: "M15 3h6v6" }),
734
+ /* @__PURE__ */ jsx6("path", { d: "M10 14 21 3" }),
735
+ /* @__PURE__ */ jsx6("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" })
736
+ ]
737
+ }
738
+ );
739
+ }
740
+ function QuoteMark(props) {
741
+ return /* @__PURE__ */ jsx6(
742
+ "svg",
743
+ {
744
+ xmlns: "http://www.w3.org/2000/svg",
745
+ width: "1em",
746
+ height: "1em",
747
+ viewBox: "0 0 24 24",
748
+ fill: "currentColor",
749
+ stroke: "none",
750
+ ...props,
751
+ children: /* @__PURE__ */ jsx6("path", { d: "M7 7C4.8 7 3 8.8 3 11s1.8 4 4 4c.2 0 .4 0 .6-.1C7.2 16.4 6 17.5 4.2 17.7L4 17.7V20c3.6-.3 6-3.2 6-7v-1.2C10 8.7 8.4 7 7 7zM18 7c-2.2 0-4 1.8-4 4s1.8 4 4 4c.2 0 .4 0 .6-.1-.4 1.5-1.6 2.6-3.4 2.8l-.2 0V20c3.6-.3 6-3.2 6-7v-1.2C21 8.7 19.4 7 18 7z" })
752
+ }
753
+ );
754
+ }
707
755
  function PanelLeft(props) {
708
756
  return /* @__PURE__ */ jsxs4(
709
757
  "svg",
@@ -998,6 +1046,8 @@ function Select({
998
1046
  placeholder,
999
1047
  className,
1000
1048
  children,
1049
+ "aria-label": ariaLabel,
1050
+ "aria-labelledby": ariaLabelledby,
1001
1051
  ...rootProps
1002
1052
  }) {
1003
1053
  const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
@@ -1007,8 +1057,8 @@ function Select({
1007
1057
  error,
1008
1058
  errorMessage,
1009
1059
  helperText,
1010
- "aria-label": rootProps["aria-label"],
1011
- "aria-labelledby": rootProps["aria-labelledby"]
1060
+ "aria-label": ariaLabel,
1061
+ "aria-labelledby": ariaLabelledby
1012
1062
  });
1013
1063
  const ctx = useContext2(DgaContext);
1014
1064
  const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? void 0;
@@ -1022,6 +1072,8 @@ function Select({
1022
1072
  SelectPrimitive.Trigger,
1023
1073
  {
1024
1074
  ...controlProps,
1075
+ "aria-label": ariaLabel,
1076
+ "aria-labelledby": ariaLabelledby,
1025
1077
  "data-slot": "select-trigger",
1026
1078
  className: cn(selectTriggerVariants({ size, error: hasError }), className),
1027
1079
  children: [
@@ -1350,7 +1402,7 @@ function Avatar({ size, shape, status, statusLabel, className, children, ...prop
1350
1402
  "span",
1351
1403
  {
1352
1404
  className: cn("ddga-avatar__status", `ddga-avatar__status--${status}`),
1353
- role: "status",
1405
+ role: "img",
1354
1406
  "aria-label": statusLabel ?? status
1355
1407
  }
1356
1408
  ) : null
@@ -1840,9 +1892,10 @@ function ToastItem({ toast: t, store, closeButton, closeLabel, hideIcon }) {
1840
1892
  }
1841
1893
 
1842
1894
  // src/components/Tabs/Tabs.tsx
1895
+ import "react";
1843
1896
  import { Tabs as TabsPrimitive } from "radix-ui";
1844
1897
  import { cva as cva17 } from "class-variance-authority";
1845
- import { jsx as jsx19 } from "react/jsx-runtime";
1898
+ import { Fragment, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
1846
1899
  var tabsVariants = cva17("ddga-tabs", {
1847
1900
  variants: {
1848
1901
  variant: {
@@ -1886,13 +1939,49 @@ function TabsList({ fullWidth, className, ...props }) {
1886
1939
  }
1887
1940
  );
1888
1941
  }
1889
- function TabsTrigger({ className, ...props }) {
1942
+ function TabsTrigger({
1943
+ className,
1944
+ startIcon,
1945
+ endIcon,
1946
+ children,
1947
+ asChild,
1948
+ ...props
1949
+ }) {
1950
+ const hasIcon = startIcon != null || endIcon != null;
1951
+ const hasText = children != null && children !== "" && typeof children !== "boolean";
1952
+ const isIconOnly = !asChild && hasIcon && !hasText;
1953
+ if (process.env.NODE_ENV === "development") {
1954
+ if (isIconOnly && !props["aria-label"] && !props["aria-labelledby"]) {
1955
+ console.warn(
1956
+ "[@dev-dga/react] An icon-only TabsTrigger (icon with no text label) requires an aria-label or aria-labelledby for screen reader accessibility."
1957
+ );
1958
+ }
1959
+ if (asChild && hasIcon) {
1960
+ console.warn(
1961
+ "[@dev-dga/react] TabsTrigger `startIcon`/`endIcon` are ignored when `asChild` is set \u2014 render the icons inside your child element instead."
1962
+ );
1963
+ }
1964
+ }
1890
1965
  return /* @__PURE__ */ jsx19(
1891
1966
  TabsPrimitive.Trigger,
1892
1967
  {
1893
1968
  "data-slot": "tabs-trigger",
1894
- className: cn("ddga-tabs__trigger", className),
1895
- ...props
1969
+ asChild,
1970
+ className: cn("ddga-tabs__trigger", isIconOnly && "ddga-tabs__trigger--icon-only", className),
1971
+ ...props,
1972
+ children: asChild ? children : /* @__PURE__ */ jsxs15(Fragment, { children: [
1973
+ startIcon && /* @__PURE__ */ jsx19(
1974
+ "span",
1975
+ {
1976
+ className: "ddga-tabs__icon",
1977
+ "data-slot": "tabs-trigger-start-icon",
1978
+ "aria-hidden": "true",
1979
+ children: startIcon
1980
+ }
1981
+ ),
1982
+ children,
1983
+ endIcon && /* @__PURE__ */ jsx19("span", { className: "ddga-tabs__icon", "data-slot": "tabs-trigger-end-icon", "aria-hidden": "true", children: endIcon })
1984
+ ] })
1896
1985
  }
1897
1986
  );
1898
1987
  }
@@ -1992,7 +2081,7 @@ function BreadcrumbEllipsis({ className, ...props }) {
1992
2081
  // src/components/Pagination/Pagination.tsx
1993
2082
  import { Slot as SlotPrimitive7 } from "radix-ui";
1994
2083
  import { cva as cva19 } from "class-variance-authority";
1995
- import { Fragment, jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
2084
+ import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
1996
2085
  var paginationVariants = cva19("ddga-pagination", {
1997
2086
  variants: {
1998
2087
  size: {
@@ -2063,7 +2152,7 @@ function PaginationPrevious({
2063
2152
  "data-slot": "pagination-previous",
2064
2153
  className: cn("ddga-pagination__nav", "ddga-pagination__nav--previous", className),
2065
2154
  ...props,
2066
- children: children ?? /* @__PURE__ */ jsxs15(Fragment, { children: [
2155
+ children: children ?? /* @__PURE__ */ jsxs16(Fragment2, { children: [
2067
2156
  /* @__PURE__ */ jsx21(ChevronRight, { className: "ddga-pagination__nav-icon ddga-pagination__nav-icon--previous" }),
2068
2157
  /* @__PURE__ */ jsx21("span", { children: label })
2069
2158
  ] })
@@ -2085,7 +2174,7 @@ function PaginationNext({
2085
2174
  "data-slot": "pagination-next",
2086
2175
  className: cn("ddga-pagination__nav", "ddga-pagination__nav--next", className),
2087
2176
  ...props,
2088
- children: children ?? /* @__PURE__ */ jsxs15(Fragment, { children: [
2177
+ children: children ?? /* @__PURE__ */ jsxs16(Fragment2, { children: [
2089
2178
  /* @__PURE__ */ jsx21("span", { children: label }),
2090
2179
  /* @__PURE__ */ jsx21(ChevronRight, { className: "ddga-pagination__nav-icon ddga-pagination__nav-icon--next" })
2091
2180
  ] })
@@ -2109,7 +2198,7 @@ function PaginationEllipsis({ className, ...props }) {
2109
2198
  // src/components/Accordion/Accordion.tsx
2110
2199
  import { Accordion as AccordionPrimitive } from "radix-ui";
2111
2200
  import { cva as cva20 } from "class-variance-authority";
2112
- import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
2201
+ import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
2113
2202
  var accordionVariants = cva20("ddga-accordion", {
2114
2203
  variants: {
2115
2204
  size: {
@@ -2142,7 +2231,7 @@ function AccordionItem({ className, ...props }) {
2142
2231
  );
2143
2232
  }
2144
2233
  function AccordionTrigger({ className, children, ...props }) {
2145
- return /* @__PURE__ */ jsx22(AccordionPrimitive.Header, { className: "ddga-accordion__header", children: /* @__PURE__ */ jsxs16(
2234
+ return /* @__PURE__ */ jsx22(AccordionPrimitive.Header, { className: "ddga-accordion__header", children: /* @__PURE__ */ jsxs17(
2146
2235
  AccordionPrimitive.Trigger,
2147
2236
  {
2148
2237
  "data-slot": "accordion-trigger",
@@ -2176,7 +2265,7 @@ function AccordionContent({ className, children, ...props }) {
2176
2265
 
2177
2266
  // src/components/Steps/Steps.tsx
2178
2267
  import { cva as cva21 } from "class-variance-authority";
2179
- import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
2268
+ import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
2180
2269
  var stepsVariants = cva21("ddga-steps", {
2181
2270
  variants: {
2182
2271
  size: {
@@ -2229,7 +2318,7 @@ function Step({ state, className, ...props }) {
2229
2318
  );
2230
2319
  }
2231
2320
  function StepIndicator({ step, className, ...props }) {
2232
- return /* @__PURE__ */ jsxs17(
2321
+ return /* @__PURE__ */ jsxs18(
2233
2322
  "span",
2234
2323
  {
2235
2324
  "aria-hidden": "true",
@@ -2299,7 +2388,7 @@ function Skeleton({ shape, animation, width, height, className, style, ...props
2299
2388
  // src/components/Progress/Progress.tsx
2300
2389
  import { Progress as ProgressPrimitive } from "radix-ui";
2301
2390
  import { cva as cva23 } from "class-variance-authority";
2302
- import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
2391
+ import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
2303
2392
  var progressVariants = cva23("ddga-progress", {
2304
2393
  variants: {
2305
2394
  size: {
@@ -2362,30 +2451,65 @@ function Progress({ value = null, max = 100, size, color, className, ...props })
2362
2451
  }
2363
2452
  var CIRCULAR_SIZES = { sm: 32, md: 48, lg: 72 };
2364
2453
  var CIRCULAR_DEFAULT_THICKNESS = { sm: 4, md: 5, lg: 6 };
2454
+ var SEGMENT_GAP_FRACTION = 0.16;
2365
2455
  function CircularProgress({
2366
2456
  value = null,
2367
2457
  max = 100,
2368
2458
  size,
2369
2459
  color,
2370
2460
  thickness,
2461
+ segments,
2371
2462
  showLabel = false,
2372
2463
  className,
2373
2464
  ...props
2374
2465
  }) {
2466
+ if (process.env.NODE_ENV === "development" && !props["aria-label"] && !props["aria-labelledby"]) {
2467
+ console.warn(
2468
+ "[dga/Progress] <CircularProgress> has no accessible name. Pass `aria-label` or `aria-labelledby` so screen-reader users know what the progress represents."
2469
+ );
2470
+ }
2375
2471
  const isIndeterminate = value === null;
2472
+ const isSegmented = typeof segments === "number" && segments >= 2;
2376
2473
  const sizeKey = size ?? "md";
2377
2474
  const diameter = CIRCULAR_SIZES[sizeKey];
2378
2475
  const strokeWidth = thickness ?? CIRCULAR_DEFAULT_THICKNESS[sizeKey];
2379
2476
  const radius = (diameter - strokeWidth) / 2;
2380
2477
  const circumference = 2 * Math.PI * radius;
2478
+ const center = diameter / 2;
2381
2479
  const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / max * 100));
2382
2480
  const dashOffset = isIndeterminate ? circumference * 0.75 : circumference * (1 - pct / 100);
2383
2481
  const state = isIndeterminate ? "indeterminate" : value >= max ? "complete" : "loading";
2384
- return /* @__PURE__ */ jsxs18(
2482
+ const segmentEls = isSegmented && segments ? (() => {
2483
+ const filled = isIndeterminate ? 0 : Math.round(pct / 100 * segments);
2484
+ const segAngle = 360 / segments;
2485
+ const gapAngle = segAngle * SEGMENT_GAP_FRACTION;
2486
+ const segLen = circumference * ((1 - SEGMENT_GAP_FRACTION) / segments);
2487
+ return Array.from({ length: segments }, (_, i) => /* @__PURE__ */ jsx25(
2488
+ "circle",
2489
+ {
2490
+ className: cn(
2491
+ "ddga-circular-progress__segment",
2492
+ i < filled && "ddga-circular-progress__segment--filled"
2493
+ ),
2494
+ cx: center,
2495
+ cy: center,
2496
+ r: radius,
2497
+ fill: "none",
2498
+ strokeWidth,
2499
+ strokeLinecap: "butt",
2500
+ strokeDasharray: `${segLen} ${circumference}`,
2501
+ transform: `rotate(${-90 + i * segAngle + gapAngle / 2} ${center} ${center})`
2502
+ },
2503
+ i
2504
+ ));
2505
+ })() : null;
2506
+ const labelText = isSegmented ? `${segments ? Math.round(pct / 100 * segments) : 0}/${segments}` : `${Math.round(pct)}%`;
2507
+ return /* @__PURE__ */ jsxs19(
2385
2508
  "div",
2386
2509
  {
2387
2510
  "data-slot": "circular-progress",
2388
2511
  "data-state": state,
2512
+ "data-segmented": isSegmented ? "" : void 0,
2389
2513
  role: "progressbar",
2390
2514
  "aria-valuemin": 0,
2391
2515
  "aria-valuemax": max,
@@ -2394,7 +2518,7 @@ function CircularProgress({
2394
2518
  style: { inlineSize: diameter, blockSize: diameter },
2395
2519
  ...props,
2396
2520
  children: [
2397
- /* @__PURE__ */ jsxs18(
2521
+ /* @__PURE__ */ jsx25(
2398
2522
  "svg",
2399
2523
  {
2400
2524
  className: "ddga-circular-progress__svg",
@@ -2403,13 +2527,13 @@ function CircularProgress({
2403
2527
  height: diameter,
2404
2528
  "aria-hidden": "true",
2405
2529
  focusable: "false",
2406
- children: [
2530
+ children: isSegmented ? segmentEls : /* @__PURE__ */ jsxs19(Fragment3, { children: [
2407
2531
  /* @__PURE__ */ jsx25(
2408
2532
  "circle",
2409
2533
  {
2410
2534
  className: "ddga-circular-progress__track",
2411
- cx: diameter / 2,
2412
- cy: diameter / 2,
2535
+ cx: center,
2536
+ cy: center,
2413
2537
  r: radius,
2414
2538
  fill: "none",
2415
2539
  strokeWidth
@@ -2419,24 +2543,21 @@ function CircularProgress({
2419
2543
  "circle",
2420
2544
  {
2421
2545
  className: "ddga-circular-progress__indicator",
2422
- cx: diameter / 2,
2423
- cy: diameter / 2,
2546
+ cx: center,
2547
+ cy: center,
2424
2548
  r: radius,
2425
2549
  fill: "none",
2426
2550
  strokeWidth,
2427
2551
  strokeLinecap: "round",
2428
2552
  strokeDasharray: circumference,
2429
2553
  strokeDashoffset: dashOffset,
2430
- transform: `rotate(-90 ${diameter / 2} ${diameter / 2})`
2554
+ transform: `rotate(-90 ${center} ${center})`
2431
2555
  }
2432
2556
  )
2433
- ]
2557
+ ] })
2434
2558
  }
2435
2559
  ),
2436
- showLabel && !isIndeterminate ? /* @__PURE__ */ jsxs18("span", { className: "ddga-circular-progress__label", "aria-hidden": "true", children: [
2437
- Math.round(pct),
2438
- "%"
2439
- ] }) : null
2560
+ showLabel && !isIndeterminate ? /* @__PURE__ */ jsx25("span", { className: "ddga-circular-progress__label", "aria-hidden": "true", children: labelText }) : null
2440
2561
  ]
2441
2562
  }
2442
2563
  );
@@ -2446,7 +2567,7 @@ function CircularProgress({
2446
2567
  import { useContext as useContext5 } from "react";
2447
2568
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2448
2569
  import { cva as cva24 } from "class-variance-authority";
2449
- import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
2570
+ import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
2450
2571
  var dropdownMenuVariants = cva24("ddga-dropdown-menu", {
2451
2572
  variants: {
2452
2573
  size: {
@@ -2490,7 +2611,7 @@ function DropdownMenuItem({
2490
2611
  children,
2491
2612
  ...props
2492
2613
  }) {
2493
- return /* @__PURE__ */ jsxs19(
2614
+ return /* @__PURE__ */ jsxs20(
2494
2615
  DropdownMenuPrimitive.Item,
2495
2616
  {
2496
2617
  "data-slot": "dropdown-menu-item",
@@ -2514,7 +2635,7 @@ function DropdownMenuCheckboxItem({
2514
2635
  const handleSelect = onSelect ?? ((event) => {
2515
2636
  event.preventDefault();
2516
2637
  });
2517
- return /* @__PURE__ */ jsxs19(
2638
+ return /* @__PURE__ */ jsxs20(
2518
2639
  DropdownMenuPrimitive.CheckboxItem,
2519
2640
  {
2520
2641
  "data-slot": "dropdown-menu-checkbox-item",
@@ -2540,7 +2661,7 @@ function DropdownMenuRadioItem({
2540
2661
  const handleSelect = onSelect ?? ((event) => {
2541
2662
  event.preventDefault();
2542
2663
  });
2543
- return /* @__PURE__ */ jsxs19(
2664
+ return /* @__PURE__ */ jsxs20(
2544
2665
  DropdownMenuPrimitive.RadioItem,
2545
2666
  {
2546
2667
  "data-slot": "dropdown-menu-radio-item",
@@ -2586,7 +2707,7 @@ function DropdownMenuSubTrigger({
2586
2707
  children,
2587
2708
  ...props
2588
2709
  }) {
2589
- return /* @__PURE__ */ jsxs19(
2710
+ return /* @__PURE__ */ jsxs20(
2590
2711
  DropdownMenuPrimitive.SubTrigger,
2591
2712
  {
2592
2713
  "data-slot": "dropdown-menu-sub-trigger",
@@ -2617,7 +2738,7 @@ function DropdownMenuSubContent({ size, className, ...props }) {
2617
2738
  import { useContext as useContext6 } from "react";
2618
2739
  import { Dialog as DialogPrimitive2, Slot as SlotPrimitive8 } from "radix-ui";
2619
2740
  import { cva as cva25 } from "class-variance-authority";
2620
- import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
2741
+ import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
2621
2742
  var drawerVariants = cva25("ddga-drawer", {
2622
2743
  variants: {
2623
2744
  side: {
@@ -2655,9 +2776,9 @@ function DrawerContent({
2655
2776
  }) {
2656
2777
  const ctx = useContext6(DgaContext);
2657
2778
  const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? void 0;
2658
- return /* @__PURE__ */ jsxs20(DialogPrimitive2.Portal, { container: portalContainer, children: [
2779
+ return /* @__PURE__ */ jsxs21(DialogPrimitive2.Portal, { container: portalContainer, children: [
2659
2780
  /* @__PURE__ */ jsx27(DialogPrimitive2.Overlay, { className: "ddga-drawer__overlay", "data-slot": "drawer-overlay" }),
2660
- /* @__PURE__ */ jsxs20(
2781
+ /* @__PURE__ */ jsxs21(
2661
2782
  DialogPrimitive2.Content,
2662
2783
  {
2663
2784
  "data-slot": "drawer-content",
@@ -2731,7 +2852,7 @@ import {
2731
2852
  import { Command } from "cmdk";
2732
2853
  import { Popover as PopoverPrimitive } from "radix-ui";
2733
2854
  import { cva as cva26 } from "class-variance-authority";
2734
- import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
2855
+ import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
2735
2856
  var comboboxTriggerVariants = cva26("ddga-combobox-trigger", {
2736
2857
  variants: {
2737
2858
  size: {
@@ -2835,13 +2956,13 @@ function Combobox({
2835
2956
  return itemLabels.get(value) ?? null;
2836
2957
  }, [value, getLabel, itemLabels]);
2837
2958
  const searchId = useId3();
2838
- return /* @__PURE__ */ jsx28(ComboboxContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxs21("div", { "data-slot": "combobox-field", className: "ddga-field", children: [
2839
- label && /* @__PURE__ */ jsxs21("label", { htmlFor: fieldId, className: "ddga-combobox__label", children: [
2959
+ return /* @__PURE__ */ jsx28(ComboboxContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxs22("div", { "data-slot": "combobox-field", className: "ddga-field", children: [
2960
+ label && /* @__PURE__ */ jsxs22("label", { htmlFor: fieldId, className: "ddga-combobox__label", children: [
2840
2961
  label,
2841
2962
  required && /* @__PURE__ */ jsx28("span", { "aria-hidden": "true", className: "ddga-combobox__required", children: "*" })
2842
2963
  ] }),
2843
- /* @__PURE__ */ jsxs21(PopoverPrimitive.Root, { open, onOpenChange: setOpen, children: [
2844
- /* @__PURE__ */ jsx28(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs21(
2964
+ /* @__PURE__ */ jsxs22(PopoverPrimitive.Root, { open, onOpenChange: setOpen, children: [
2965
+ /* @__PURE__ */ jsx28(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs22(
2845
2966
  "button",
2846
2967
  {
2847
2968
  type: "button",
@@ -2869,7 +2990,7 @@ function Combobox({
2869
2990
  onOpenAutoFocus: (event) => {
2870
2991
  event.preventDefault();
2871
2992
  },
2872
- children: /* @__PURE__ */ jsxs21(
2993
+ children: /* @__PURE__ */ jsxs22(
2873
2994
  Command,
2874
2995
  {
2875
2996
  id: searchId,
@@ -2885,7 +3006,7 @@ function Combobox({
2885
3006
  className: "ddga-combobox-input"
2886
3007
  }
2887
3008
  ),
2888
- /* @__PURE__ */ jsxs21(Command.List, { "data-slot": "combobox-list", className: "ddga-combobox-list", children: [
3009
+ /* @__PURE__ */ jsxs22(Command.List, { "data-slot": "combobox-list", className: "ddga-combobox-list", children: [
2889
3010
  /* @__PURE__ */ jsx28(Command.Empty, { "data-slot": "combobox-empty", className: "ddga-combobox-empty", children: emptyMessage }),
2890
3011
  children
2891
3012
  ] })
@@ -2910,7 +3031,7 @@ function ComboboxItem({
2910
3031
  }) {
2911
3032
  const { value: selectedValue, select } = useComboboxContext("ComboboxItem");
2912
3033
  const isSelected = selectedValue === value;
2913
- return /* @__PURE__ */ jsxs21(
3034
+ return /* @__PURE__ */ jsxs22(
2914
3035
  Command.Item,
2915
3036
  {
2916
3037
  value,
@@ -2954,7 +3075,7 @@ function ComboboxSeparator({ className, ...props }) {
2954
3075
  }
2955
3076
 
2956
3077
  // src/components/DatePicker/DatePicker.tsx
2957
- import { useCallback as useCallback2, useContext as useContext8, useMemo as useMemo2, useState as useState4 } from "react";
3078
+ import { useCallback as useCallback2, useContext as useContext9, useMemo as useMemo3, useState as useState4 } from "react";
2958
3079
  import {
2959
3080
  Button as AriaButton,
2960
3081
  Calendar as AriaCalendar,
@@ -2963,7 +3084,7 @@ import {
2963
3084
  CalendarGridBody as AriaCalendarGridBody,
2964
3085
  CalendarGridHeader as AriaCalendarGridHeader,
2965
3086
  CalendarHeaderCell as AriaCalendarHeaderCell,
2966
- CalendarStateContext as AriaCalendarStateContext,
3087
+ CalendarStateContext as AriaCalendarStateContext2,
2967
3088
  DateInput as AriaDateInput,
2968
3089
  DatePicker as AriaDatePicker,
2969
3090
  DateSegment as AriaDateSegment,
@@ -2975,29 +3096,24 @@ import {
2975
3096
  Popover as AriaPopover,
2976
3097
  Text as AriaText
2977
3098
  } from "react-aria-components";
3099
+ import { CalendarDate as CalendarDate2 } from "@internationalized/date";
3100
+ import { cva as cva27 } from "class-variance-authority";
3101
+
3102
+ // src/internal/calendar/calendar-core.tsx
3103
+ import { useContext as useContext8, useMemo as useMemo2 } from "react";
3104
+ import {
3105
+ CalendarStateContext as AriaCalendarStateContext,
3106
+ RangeCalendarStateContext as AriaRangeCalendarStateContext
3107
+ } from "react-aria-components";
2978
3108
  import {
2979
3109
  CalendarDate,
2980
3110
  GregorianCalendar,
2981
3111
  IslamicUmalquraCalendar,
2982
3112
  toCalendar
2983
3113
  } from "@internationalized/date";
2984
- import { cva as cva27 } from "class-variance-authority";
2985
- import { Fragment as Fragment2, jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
2986
- var datePickerTriggerVariants = cva27("ddga-date-picker-trigger", {
2987
- variants: {
2988
- size: {
2989
- sm: "ddga-date-picker-trigger--sm",
2990
- md: "ddga-date-picker-trigger--md"
2991
- },
2992
- error: {
2993
- true: "ddga-date-picker-trigger--error"
2994
- }
2995
- },
2996
- defaultVariants: {
2997
- size: "md"
2998
- }
2999
- });
3000
- var datePickerVariants = datePickerTriggerVariants;
3114
+ import { Fragment as Fragment4, jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
3115
+ var GREGORIAN = new GregorianCalendar();
3116
+ var ISLAMIC_UMALQURA = new IslamicUmalquraCalendar();
3001
3117
  function dateToCalendarDate(date) {
3002
3118
  if (!date) return null;
3003
3119
  return new CalendarDate(date.getFullYear(), date.getMonth() + 1, date.getDate());
@@ -3015,14 +3131,91 @@ function composeLocale(dgaLocale, calendar) {
3015
3131
  }
3016
3132
  return isArabic ? `${base}-u-nu-latn` : base;
3017
3133
  }
3018
- var GREGORIAN = new GregorianCalendar();
3019
- var ISLAMIC_UMALQURA = new IslamicUmalquraCalendar();
3020
3134
  function secondaryDayNumber(date, mainCalendar) {
3021
3135
  const other = mainCalendar === "hijri" ? GREGORIAN : ISLAMIC_UMALQURA;
3022
3136
  return toCalendar(date, other).day;
3023
3137
  }
3138
+ function useCalendarChrome(calendarSystem, calendarLabels) {
3139
+ const dgaCtx = useContext8(DgaContext);
3140
+ const dgaLocale = dgaCtx?.locale ?? "en";
3141
+ const dir = dgaCtx?.dir ?? "ltr";
3142
+ const locale = useMemo2(
3143
+ () => composeLocale(dgaLocale, calendarSystem),
3144
+ [dgaLocale, calendarSystem]
3145
+ );
3146
+ const portalContainer = dgaCtx?.portalEl ?? dgaCtx?.rootEl ?? void 0;
3147
+ const PrevChevron = dir === "rtl" ? ChevronRight : ChevronLeft;
3148
+ const NextChevron = dir === "rtl" ? ChevronLeft : ChevronRight;
3149
+ const resolvedLabels = useMemo2(() => {
3150
+ if (calendarLabels) return calendarLabels;
3151
+ return dgaLocale.startsWith("ar") ? { gregorian: "\u0645\u064A\u0644\u0627\u062F\u064A", hijri: "\u0647\u062C\u0631\u064A" } : { gregorian: "Gregorian", hijri: "Hijri" };
3152
+ }, [calendarLabels, dgaLocale]);
3153
+ const navLabels = useMemo2(
3154
+ () => dgaLocale.startsWith("ar") ? { month: "\u0627\u0644\u0634\u0647\u0631", year: "\u0627\u0644\u0633\u0646\u0629" } : { month: "Month", year: "Year" },
3155
+ [dgaLocale]
3156
+ );
3157
+ const a11yLabels = useMemo2(
3158
+ () => dgaLocale.startsWith("ar") ? { openCalendar: "\u0641\u062A\u062D \u0627\u0644\u062A\u0642\u0648\u064A\u0645", calendarSystem: "\u0646\u0638\u0627\u0645 \u0627\u0644\u062A\u0642\u0648\u064A\u0645" } : { openCalendar: "Open calendar", calendarSystem: "Calendar system" },
3159
+ [dgaLocale]
3160
+ );
3161
+ return {
3162
+ dgaLocale,
3163
+ dir,
3164
+ locale,
3165
+ portalContainer,
3166
+ PrevChevron,
3167
+ NextChevron,
3168
+ resolvedLabels,
3169
+ navLabels,
3170
+ a11yLabels
3171
+ };
3172
+ }
3173
+ function CalendarSystemToggle({
3174
+ value,
3175
+ onChange,
3176
+ labels,
3177
+ groupLabel
3178
+ }) {
3179
+ return /* @__PURE__ */ jsxs23(
3180
+ "div",
3181
+ {
3182
+ role: "tablist",
3183
+ "aria-label": groupLabel,
3184
+ className: "ddga-calendar-toggle",
3185
+ "data-slot": "calendar-toggle",
3186
+ children: [
3187
+ /* @__PURE__ */ jsx29(
3188
+ "button",
3189
+ {
3190
+ type: "button",
3191
+ role: "tab",
3192
+ "aria-selected": value === "gregorian",
3193
+ className: "ddga-calendar-toggle__button",
3194
+ "data-active": value === "gregorian" ? "" : void 0,
3195
+ onClick: () => onChange("gregorian"),
3196
+ children: labels.gregorian
3197
+ }
3198
+ ),
3199
+ /* @__PURE__ */ jsx29(
3200
+ "button",
3201
+ {
3202
+ type: "button",
3203
+ role: "tab",
3204
+ "aria-selected": value === "hijri",
3205
+ className: "ddga-calendar-toggle__button",
3206
+ "data-active": value === "hijri" ? "" : void 0,
3207
+ onClick: () => onChange("hijri"),
3208
+ children: labels.hijri
3209
+ }
3210
+ )
3211
+ ]
3212
+ }
3213
+ );
3214
+ }
3024
3215
  function CalendarNavHeader({ locale, monthLabel, yearLabel }) {
3025
- const state = useContext8(AriaCalendarStateContext);
3216
+ const rangeState = useContext8(AriaRangeCalendarStateContext);
3217
+ const singleState = useContext8(AriaCalendarStateContext);
3218
+ const state = rangeState ?? singleState;
3026
3219
  const focusedDate = state?.focusedDate ?? null;
3027
3220
  const focusedYear = focusedDate?.year ?? 0;
3028
3221
  const focusedCalendar = focusedDate?.calendar ?? GREGORIAN;
@@ -3047,13 +3240,13 @@ function CalendarNavHeader({ locale, monthLabel, yearLabel }) {
3047
3240
  return Array.from({ length: end - start + 1 }, (_, i) => start + i);
3048
3241
  }, [focusedDate, focusedCalendar, focusedYear, minValue, maxValue]);
3049
3242
  if (!state || !focusedDate) return null;
3050
- return /* @__PURE__ */ jsxs22("div", { className: "ddga-date-picker-calendar__nav-selects", "data-slot": "date-picker-calendar-nav", children: [
3243
+ return /* @__PURE__ */ jsxs23("div", { className: "ddga-calendar__nav-selects", "data-slot": "calendar-nav", children: [
3051
3244
  /* @__PURE__ */ jsx29(
3052
3245
  "select",
3053
3246
  {
3054
3247
  "aria-label": monthLabel,
3055
- className: "ddga-date-picker-calendar__select ddga-date-picker-calendar__month-select",
3056
- "data-slot": "date-picker-month-select",
3248
+ className: "ddga-calendar__select ddga-calendar__month-select",
3249
+ "data-slot": "calendar-month-select",
3057
3250
  value: focusedDate.month,
3058
3251
  onChange: (e) => state.setFocusedDate(focusedDate.set({ month: Number(e.target.value) })),
3059
3252
  children: monthNames.map((name, i) => /* @__PURE__ */ jsx29("option", { value: i + 1, children: name }, i + 1))
@@ -3063,8 +3256,8 @@ function CalendarNavHeader({ locale, monthLabel, yearLabel }) {
3063
3256
  "select",
3064
3257
  {
3065
3258
  "aria-label": yearLabel,
3066
- className: "ddga-date-picker-calendar__select ddga-date-picker-calendar__year-select",
3067
- "data-slot": "date-picker-year-select",
3259
+ className: "ddga-calendar__select ddga-calendar__year-select",
3260
+ "data-slot": "calendar-year-select",
3068
3261
  value: focusedDate.year,
3069
3262
  onChange: (e) => state.setFocusedDate(focusedDate.set({ year: Number(e.target.value) })),
3070
3263
  children: yearOptions.map((y) => /* @__PURE__ */ jsx29("option", { value: y, children: y }, y))
@@ -3072,8 +3265,33 @@ function CalendarNavHeader({ locale, monthLabel, yearLabel }) {
3072
3265
  )
3073
3266
  ] });
3074
3267
  }
3268
+ function renderDayContent(primary, opts) {
3269
+ if (!opts.showSecondary) return primary;
3270
+ return /* @__PURE__ */ jsxs23(Fragment4, { children: [
3271
+ /* @__PURE__ */ jsx29("span", { className: "ddga-calendar__cell-primary", children: primary }),
3272
+ /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", className: "ddga-calendar__cell-secondary", children: secondaryDayNumber(opts.date, opts.calendarSystem) })
3273
+ ] });
3274
+ }
3275
+
3276
+ // src/components/DatePicker/DatePicker.tsx
3277
+ import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
3278
+ var datePickerTriggerVariants = cva27("ddga-date-picker-trigger", {
3279
+ variants: {
3280
+ size: {
3281
+ sm: "ddga-date-picker-trigger--sm",
3282
+ md: "ddga-date-picker-trigger--md"
3283
+ },
3284
+ error: {
3285
+ true: "ddga-date-picker-trigger--error"
3286
+ }
3287
+ },
3288
+ defaultVariants: {
3289
+ size: "md"
3290
+ }
3291
+ });
3292
+ var datePickerVariants = datePickerTriggerVariants;
3075
3293
  function CalendarDayCell({ date, showSecondary, calendarSystem }) {
3076
- const state = useContext8(AriaCalendarStateContext);
3294
+ const state = useContext9(AriaCalendarStateContext2);
3077
3295
  const start = state?.visibleRange.start;
3078
3296
  const isOutside = !!start && (date.year !== start.year || date.month !== start.month);
3079
3297
  const isOutOfBounds = state ? state.isInvalid(date) : false;
@@ -3084,27 +3302,21 @@ function CalendarDayCell({ date, showSecondary, calendarSystem }) {
3084
3302
  state.setFocusedDate(date);
3085
3303
  state.selectDate(date);
3086
3304
  };
3087
- return /* @__PURE__ */ jsx29("td", { role: "gridcell", children: /* @__PURE__ */ jsx29(
3305
+ return /* @__PURE__ */ jsx30("td", { role: "gridcell", children: /* @__PURE__ */ jsx30(
3088
3306
  "button",
3089
3307
  {
3090
3308
  type: "button",
3091
3309
  tabIndex: -1,
3092
- className: "ddga-date-picker-calendar__cell",
3310
+ className: "ddga-calendar__cell",
3093
3311
  "data-outside-month": "",
3094
3312
  "data-selected": isSelected ? "" : void 0,
3095
3313
  "data-slot": "date-picker-day-cell",
3096
3314
  onClick: handleSelect,
3097
- children: showSecondary ? /* @__PURE__ */ jsxs22(Fragment2, { children: [
3098
- /* @__PURE__ */ jsx29("span", { className: "ddga-date-picker-calendar__cell-primary", children: date.day }),
3099
- /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", className: "ddga-date-picker-calendar__cell-secondary", children: secondaryDayNumber(date, calendarSystem) })
3100
- ] }) : String(date.day)
3315
+ children: renderDayContent(date.day, { showSecondary, date, calendarSystem })
3101
3316
  }
3102
3317
  ) });
3103
3318
  }
3104
- return /* @__PURE__ */ jsx29(AriaCalendarCell, { date, className: "ddga-date-picker-calendar__cell", children: ({ formattedDate }) => showSecondary ? /* @__PURE__ */ jsxs22(Fragment2, { children: [
3105
- /* @__PURE__ */ jsx29("span", { className: "ddga-date-picker-calendar__cell-primary", children: formattedDate }),
3106
- /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", className: "ddga-date-picker-calendar__cell-secondary", children: secondaryDayNumber(date, calendarSystem) })
3107
- ] }) : formattedDate });
3319
+ return /* @__PURE__ */ jsx30(AriaCalendarCell, { date, className: "ddga-calendar__cell", children: ({ formattedDate }) => renderDayContent(formattedDate, { showSecondary, date, calendarSystem }) });
3108
3320
  }
3109
3321
  function DatePicker({
3110
3322
  value: controlledValue,
@@ -3137,7 +3349,7 @@ function DatePicker({
3137
3349
  const value = isValueControlled ? dateToCalendarDate(controlledValue) : internalValue;
3138
3350
  const handleAriaChange = useCallback2(
3139
3351
  (next) => {
3140
- const nextCD = next ? new CalendarDate(next.year, next.month, next.day) : null;
3352
+ const nextCD = next ? new CalendarDate2(next.year, next.month, next.day) : null;
3141
3353
  if (!isValueControlled) setInternalValue(nextCD);
3142
3354
  onChange?.(calendarDateToDate(nextCD));
3143
3355
  },
@@ -3153,33 +3365,24 @@ function DatePicker({
3153
3365
  },
3154
3366
  [isCalendarControlled, onCalendarChange]
3155
3367
  );
3156
- const dgaCtx = useContext8(DgaContext);
3157
- const dgaLocale = dgaCtx?.locale ?? "en";
3158
- const ariaLocale = useMemo2(
3159
- () => composeLocale(dgaLocale, calendarSystem),
3160
- [dgaLocale, calendarSystem]
3161
- );
3162
- const portalContainer = dgaCtx?.portalEl ?? dgaCtx?.rootEl ?? void 0;
3163
- const dgaDir = dgaCtx?.dir ?? "ltr";
3164
- const PrevChevron = dgaDir === "rtl" ? ChevronRight : ChevronLeft;
3165
- const NextChevron = dgaDir === "rtl" ? ChevronLeft : ChevronRight;
3166
- const resolvedLabels = useMemo2(() => {
3167
- if (calendarLabels) return calendarLabels;
3168
- const isArabic = dgaLocale.startsWith("ar");
3169
- return isArabic ? { gregorian: "\u0645\u064A\u0644\u0627\u062F\u064A", hijri: "\u0647\u062C\u0631\u064A" } : { gregorian: "Gregorian", hijri: "Hijri" };
3170
- }, [calendarLabels, dgaLocale]);
3171
- const navLabels = useMemo2(
3172
- () => dgaLocale.startsWith("ar") ? { month: "\u0627\u0644\u0634\u0647\u0631", year: "\u0627\u0644\u0633\u0646\u0629" } : { month: "Month", year: "Year" },
3173
- [dgaLocale]
3174
- );
3175
- const ariaMinValue = useMemo2(() => dateToCalendarDate(minValue) ?? void 0, [minValue]);
3176
- const ariaMaxValue = useMemo2(() => dateToCalendarDate(maxValue) ?? void 0, [maxValue]);
3177
- const dialogAriaLabel = ariaLabel ?? (typeof label === "string" ? label : ariaLabelledBy ? void 0 : "Date");
3368
+ const {
3369
+ dgaLocale,
3370
+ locale: ariaLocale,
3371
+ portalContainer,
3372
+ PrevChevron,
3373
+ NextChevron,
3374
+ resolvedLabels,
3375
+ navLabels,
3376
+ a11yLabels
3377
+ } = useCalendarChrome(calendarSystem, calendarLabels);
3378
+ const ariaMinValue = useMemo3(() => dateToCalendarDate(minValue) ?? void 0, [minValue]);
3379
+ const ariaMaxValue = useMemo3(() => dateToCalendarDate(maxValue) ?? void 0, [maxValue]);
3380
+ const dialogAriaLabel = ariaLabel ?? (typeof label === "string" ? label : ariaLabelledBy ? void 0 : dgaLocale.startsWith("ar") ? "\u0627\u0644\u062A\u0627\u0631\u064A\u062E" : "Date");
3178
3381
  const showToggle = showCalendarToggle && !isCalendarControlled;
3179
3382
  const hasError = !!error;
3180
3383
  const hasErrorMessage = hasError && errorMessage != null && errorMessage !== "";
3181
3384
  const hasHelper = !hasErrorMessage && helperText != null && helperText !== "";
3182
- return /* @__PURE__ */ jsx29(I18nProvider, { locale: ariaLocale, children: /* @__PURE__ */ jsxs22(
3385
+ return /* @__PURE__ */ jsx30(I18nProvider, { locale: ariaLocale, children: /* @__PURE__ */ jsxs24(
3183
3386
  AriaDatePicker,
3184
3387
  {
3185
3388
  value,
@@ -3196,17 +3399,17 @@ function DatePicker({
3196
3399
  className: "ddga-field",
3197
3400
  "data-slot": "date-picker-field",
3198
3401
  children: [
3199
- label && /* @__PURE__ */ jsxs22(AriaLabel, { className: "ddga-date-picker__label", children: [
3402
+ label && /* @__PURE__ */ jsxs24(AriaLabel, { className: "ddga-date-picker__label", children: [
3200
3403
  label,
3201
- required && /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", className: "ddga-date-picker__required", children: "*" })
3404
+ required && /* @__PURE__ */ jsx30("span", { "aria-hidden": "true", className: "ddga-date-picker__required", children: "*" })
3202
3405
  ] }),
3203
- /* @__PURE__ */ jsxs22(
3406
+ /* @__PURE__ */ jsxs24(
3204
3407
  AriaGroup,
3205
3408
  {
3206
3409
  "data-slot": "date-picker-trigger",
3207
3410
  className: cn(datePickerTriggerVariants({ size, error: hasError }), className),
3208
3411
  children: [
3209
- /* @__PURE__ */ jsx29(AriaDateInput, { className: "ddga-date-picker__input", "data-slot": "date-picker-input", children: (segment) => /* @__PURE__ */ jsx29(
3412
+ /* @__PURE__ */ jsx30(AriaDateInput, { className: "ddga-date-picker__input", "data-slot": "date-picker-input", children: (segment) => /* @__PURE__ */ jsx30(
3210
3413
  AriaDateSegment,
3211
3414
  {
3212
3415
  segment,
@@ -3214,19 +3417,19 @@ function DatePicker({
3214
3417
  "data-slot": "date-picker-segment"
3215
3418
  }
3216
3419
  ) }),
3217
- /* @__PURE__ */ jsx29(
3420
+ /* @__PURE__ */ jsx30(
3218
3421
  AriaButton,
3219
3422
  {
3220
3423
  className: "ddga-date-picker__icon-button",
3221
- "aria-label": "Open calendar",
3424
+ "aria-label": a11yLabels.openCalendar,
3222
3425
  "data-slot": "date-picker-trigger-button",
3223
- children: /* @__PURE__ */ jsx29(CalendarIcon, { "aria-hidden": "true", className: "ddga-date-picker__icon" })
3426
+ children: /* @__PURE__ */ jsx30(CalendarIcon, { "aria-hidden": "true", className: "ddga-date-picker__icon" })
3224
3427
  }
3225
3428
  )
3226
3429
  ]
3227
3430
  }
3228
3431
  ),
3229
- hasHelper && /* @__PURE__ */ jsx29(
3432
+ hasHelper && /* @__PURE__ */ jsx30(
3230
3433
  AriaText,
3231
3434
  {
3232
3435
  slot: "description",
@@ -3235,7 +3438,7 @@ function DatePicker({
3235
3438
  children: helperText
3236
3439
  }
3237
3440
  ),
3238
- hasErrorMessage && /* @__PURE__ */ jsx29(
3441
+ hasErrorMessage && /* @__PURE__ */ jsx30(
3239
3442
  AriaFieldError,
3240
3443
  {
3241
3444
  className: "ddga-field__message ddga-field__message--error",
@@ -3243,69 +3446,43 @@ function DatePicker({
3243
3446
  children: errorMessage
3244
3447
  }
3245
3448
  ),
3246
- /* @__PURE__ */ jsx29(
3449
+ /* @__PURE__ */ jsx30(
3247
3450
  AriaPopover,
3248
3451
  {
3249
3452
  UNSTABLE_portalContainer: portalContainer,
3250
- className: "ddga-date-picker-popover",
3453
+ className: "ddga-calendar-popover",
3251
3454
  "data-slot": "date-picker-popover",
3252
3455
  offset: 6,
3253
3456
  containerPadding: 12,
3254
- children: /* @__PURE__ */ jsxs22(
3457
+ children: /* @__PURE__ */ jsxs24(
3255
3458
  AriaDialog,
3256
3459
  {
3257
- className: "ddga-date-picker-dialog",
3460
+ className: "ddga-calendar-dialog",
3258
3461
  "data-slot": "date-picker-dialog",
3259
3462
  "aria-label": dialogAriaLabel,
3260
3463
  "aria-labelledby": ariaLabelledBy,
3261
3464
  children: [
3262
- showToggle && /* @__PURE__ */ jsxs22(
3263
- "div",
3465
+ showToggle && /* @__PURE__ */ jsx30(
3466
+ CalendarSystemToggle,
3264
3467
  {
3265
- role: "tablist",
3266
- "aria-label": "Calendar system",
3267
- className: "ddga-date-picker-toggle",
3268
- "data-slot": "date-picker-toggle",
3269
- children: [
3270
- /* @__PURE__ */ jsx29(
3271
- "button",
3272
- {
3273
- type: "button",
3274
- role: "tab",
3275
- "aria-selected": calendarSystem === "gregorian",
3276
- className: "ddga-date-picker-toggle__button",
3277
- "data-active": calendarSystem === "gregorian" ? "" : void 0,
3278
- onClick: () => setCalendar("gregorian"),
3279
- children: resolvedLabels.gregorian
3280
- }
3281
- ),
3282
- /* @__PURE__ */ jsx29(
3283
- "button",
3284
- {
3285
- type: "button",
3286
- role: "tab",
3287
- "aria-selected": calendarSystem === "hijri",
3288
- className: "ddga-date-picker-toggle__button",
3289
- "data-active": calendarSystem === "hijri" ? "" : void 0,
3290
- onClick: () => setCalendar("hijri"),
3291
- children: resolvedLabels.hijri
3292
- }
3293
- )
3294
- ]
3468
+ value: calendarSystem,
3469
+ onChange: setCalendar,
3470
+ labels: resolvedLabels,
3471
+ groupLabel: a11yLabels.calendarSystem
3295
3472
  }
3296
3473
  ),
3297
- /* @__PURE__ */ jsxs22(AriaCalendar, { className: "ddga-date-picker-calendar", "data-slot": "date-picker-calendar", children: [
3298
- /* @__PURE__ */ jsxs22("header", { className: "ddga-date-picker-calendar__header", children: [
3299
- /* @__PURE__ */ jsx29(
3474
+ /* @__PURE__ */ jsxs24(AriaCalendar, { className: "ddga-calendar", "data-slot": "date-picker-calendar", children: [
3475
+ /* @__PURE__ */ jsxs24("header", { className: "ddga-calendar__header", children: [
3476
+ /* @__PURE__ */ jsx30(
3300
3477
  AriaButton,
3301
3478
  {
3302
3479
  slot: "previous",
3303
- className: "ddga-date-picker-calendar__nav",
3480
+ className: "ddga-calendar__nav",
3304
3481
  "data-slot": "date-picker-calendar-prev",
3305
- children: /* @__PURE__ */ jsx29(PrevChevron, { "aria-hidden": "true" })
3482
+ children: /* @__PURE__ */ jsx30(PrevChevron, { "aria-hidden": "true" })
3306
3483
  }
3307
3484
  ),
3308
- /* @__PURE__ */ jsx29(
3485
+ /* @__PURE__ */ jsx30(
3309
3486
  CalendarNavHeader,
3310
3487
  {
3311
3488
  locale: ariaLocale,
@@ -3313,19 +3490,19 @@ function DatePicker({
3313
3490
  yearLabel: navLabels.year
3314
3491
  }
3315
3492
  ),
3316
- /* @__PURE__ */ jsx29(
3493
+ /* @__PURE__ */ jsx30(
3317
3494
  AriaButton,
3318
3495
  {
3319
3496
  slot: "next",
3320
- className: "ddga-date-picker-calendar__nav",
3497
+ className: "ddga-calendar__nav",
3321
3498
  "data-slot": "date-picker-calendar-next",
3322
- children: /* @__PURE__ */ jsx29(NextChevron, { "aria-hidden": "true" })
3499
+ children: /* @__PURE__ */ jsx30(NextChevron, { "aria-hidden": "true" })
3323
3500
  }
3324
3501
  )
3325
3502
  ] }),
3326
- /* @__PURE__ */ jsxs22(AriaCalendarGrid, { className: "ddga-date-picker-calendar__grid", children: [
3327
- /* @__PURE__ */ jsx29(AriaCalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx29(AriaCalendarHeaderCell, { className: "ddga-date-picker-calendar__weekday", children: day }) }),
3328
- /* @__PURE__ */ jsx29(AriaCalendarGridBody, { children: (date) => /* @__PURE__ */ jsx29(
3503
+ /* @__PURE__ */ jsxs24(AriaCalendarGrid, { className: "ddga-calendar__grid", children: [
3504
+ /* @__PURE__ */ jsx30(AriaCalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx30(AriaCalendarHeaderCell, { className: "ddga-calendar__weekday", children: day }) }),
3505
+ /* @__PURE__ */ jsx30(AriaCalendarGridBody, { children: (date) => /* @__PURE__ */ jsx30(
3329
3506
  CalendarDayCell,
3330
3507
  {
3331
3508
  date,
@@ -3347,7 +3524,7 @@ function DatePicker({
3347
3524
 
3348
3525
  // src/components/FileUpload/FileUpload.tsx
3349
3526
  import { useRef, useState as useState5 } from "react";
3350
- import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
3527
+ import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
3351
3528
  function matchesAccept(file, accept) {
3352
3529
  if (!accept) return true;
3353
3530
  const tokens = accept.split(",").map((t) => t.trim().toLowerCase()).filter(Boolean);
@@ -3451,12 +3628,12 @@ function FileUpload({
3451
3628
  setIsDragging(false);
3452
3629
  }
3453
3630
  }
3454
- return /* @__PURE__ */ jsxs23("div", { "data-slot": "file-upload-field", className: cn("ddga-field", "ddga-file-upload", className), children: [
3455
- label && /* @__PURE__ */ jsxs23("label", { htmlFor: fieldId, className: "ddga-file-upload__label", children: [
3631
+ return /* @__PURE__ */ jsxs25("div", { "data-slot": "file-upload-field", className: cn("ddga-field", "ddga-file-upload", className), children: [
3632
+ label && /* @__PURE__ */ jsxs25("label", { htmlFor: fieldId, className: "ddga-file-upload__label", children: [
3456
3633
  label,
3457
- required && /* @__PURE__ */ jsx30("span", { "aria-hidden": "true", className: "ddga-file-upload__required", children: "*" })
3634
+ required && /* @__PURE__ */ jsx31("span", { "aria-hidden": "true", className: "ddga-file-upload__required", children: "*" })
3458
3635
  ] }),
3459
- /* @__PURE__ */ jsxs23(
3636
+ /* @__PURE__ */ jsxs25(
3460
3637
  "div",
3461
3638
  {
3462
3639
  "data-slot": "file-upload-dropzone",
@@ -3474,9 +3651,9 @@ function FileUpload({
3474
3651
  onDragLeave: handleDragLeave,
3475
3652
  onDrop: handleDrop,
3476
3653
  children: [
3477
- /* @__PURE__ */ jsx30(Upload, { className: "ddga-file-upload__icon", "aria-hidden": "true" }),
3478
- /* @__PURE__ */ jsx30("span", { className: "ddga-file-upload__hint", children: hint }),
3479
- /* @__PURE__ */ jsx30(
3654
+ /* @__PURE__ */ jsx31(Upload, { className: "ddga-file-upload__icon", "aria-hidden": "true" }),
3655
+ /* @__PURE__ */ jsx31("span", { className: "ddga-file-upload__hint", children: hint }),
3656
+ /* @__PURE__ */ jsx31(
3480
3657
  "input",
3481
3658
  {
3482
3659
  ...controlProps,
@@ -3495,24 +3672,24 @@ function FileUpload({
3495
3672
  ]
3496
3673
  }
3497
3674
  ),
3498
- hasErrorMessage && /* @__PURE__ */ jsx30(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
3499
- hasHelper && /* @__PURE__ */ jsx30(FieldMessage, { id: helperId, variant: "helper", children: helperText }),
3500
- files.length > 0 && /* @__PURE__ */ jsx30("ul", { "data-slot": "file-upload-list", className: "ddga-file-upload__list", children: files.map((item) => {
3675
+ hasErrorMessage && /* @__PURE__ */ jsx31(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
3676
+ hasHelper && /* @__PURE__ */ jsx31(FieldMessage, { id: helperId, variant: "helper", children: helperText }),
3677
+ files.length > 0 && /* @__PURE__ */ jsx31("ul", { "data-slot": "file-upload-list", className: "ddga-file-upload__list", children: files.map((item) => {
3501
3678
  const status = item.status ?? "pending";
3502
- return /* @__PURE__ */ jsxs23(
3679
+ return /* @__PURE__ */ jsxs25(
3503
3680
  "li",
3504
3681
  {
3505
3682
  "data-slot": "file-upload-item",
3506
3683
  "data-status": status,
3507
3684
  className: "ddga-file-upload__item",
3508
3685
  children: [
3509
- /* @__PURE__ */ jsx30("span", { className: "ddga-file-upload__item-icon", "aria-hidden": "true", children: status === "success" ? /* @__PURE__ */ jsx30(Check, {}) : status === "error" ? /* @__PURE__ */ jsx30(AlertCircle, {}) : /* @__PURE__ */ jsx30(Upload, {}) }),
3510
- /* @__PURE__ */ jsxs23("div", { className: "ddga-file-upload__item-main", children: [
3511
- /* @__PURE__ */ jsxs23("div", { className: "ddga-file-upload__item-head", children: [
3512
- /* @__PURE__ */ jsx30("span", { className: "ddga-file-upload__item-name", title: item.file.name, children: item.file.name }),
3513
- /* @__PURE__ */ jsx30("span", { className: "ddga-file-upload__item-meta", children: formatBytes(item.file.size) })
3686
+ /* @__PURE__ */ jsx31("span", { className: "ddga-file-upload__item-icon", "aria-hidden": "true", children: status === "success" ? /* @__PURE__ */ jsx31(Check, {}) : status === "error" ? /* @__PURE__ */ jsx31(AlertCircle, {}) : /* @__PURE__ */ jsx31(Upload, {}) }),
3687
+ /* @__PURE__ */ jsxs25("div", { className: "ddga-file-upload__item-main", children: [
3688
+ /* @__PURE__ */ jsxs25("div", { className: "ddga-file-upload__item-head", children: [
3689
+ /* @__PURE__ */ jsx31("span", { className: "ddga-file-upload__item-name", title: item.file.name, children: item.file.name }),
3690
+ /* @__PURE__ */ jsx31("span", { className: "ddga-file-upload__item-meta", children: formatBytes(item.file.size) })
3514
3691
  ] }),
3515
- status === "uploading" && /* @__PURE__ */ jsx30(
3692
+ status === "uploading" && /* @__PURE__ */ jsx31(
3516
3693
  Progress,
3517
3694
  {
3518
3695
  size: "sm",
@@ -3521,9 +3698,9 @@ function FileUpload({
3521
3698
  className: "ddga-file-upload__item-progress"
3522
3699
  }
3523
3700
  ),
3524
- status === "error" && item.error && /* @__PURE__ */ jsx30("span", { role: "alert", className: "ddga-file-upload__item-error", children: item.error })
3701
+ status === "error" && item.error && /* @__PURE__ */ jsx31("span", { role: "alert", className: "ddga-file-upload__item-error", children: item.error })
3525
3702
  ] }),
3526
- onRemove && /* @__PURE__ */ jsx30(
3703
+ onRemove && /* @__PURE__ */ jsx31(
3527
3704
  Button,
3528
3705
  {
3529
3706
  type: "button",
@@ -3532,7 +3709,7 @@ function FileUpload({
3532
3709
  "aria-label": `${removeLabel}: ${item.file.name}`,
3533
3710
  onClick: () => onRemove(item.id),
3534
3711
  className: "ddga-file-upload__item-remove",
3535
- children: /* @__PURE__ */ jsx30(Close, { "aria-hidden": "true" })
3712
+ children: /* @__PURE__ */ jsx31(Close, { "aria-hidden": "true" })
3536
3713
  }
3537
3714
  )
3538
3715
  ]
@@ -3547,7 +3724,7 @@ function FileUpload({
3547
3724
  import { useId as useId4 } from "react";
3548
3725
  import { Slider as SliderPrimitive } from "radix-ui";
3549
3726
  import { cva as cva28 } from "class-variance-authority";
3550
- import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
3727
+ import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
3551
3728
  var sliderVariants = cva28("ddga-slider", {
3552
3729
  variants: {
3553
3730
  size: {
@@ -3603,12 +3780,12 @@ function Slider({
3603
3780
  const wrap = (next) => isRange ? next : next[0];
3604
3781
  const currentForRender = valueArray ?? defaultArray;
3605
3782
  const fmt = (n) => formatValue ? formatValue(n) : String(n);
3606
- return /* @__PURE__ */ jsxs24("div", { "data-slot": "slider-field", className: "ddga-field", children: [
3607
- (label || showValue) && /* @__PURE__ */ jsxs24("div", { className: "ddga-slider__header", children: [
3608
- label && /* @__PURE__ */ jsx31("span", { id: labelId, className: "ddga-slider__label", children: label }),
3609
- showValue && /* @__PURE__ */ jsx31("span", { className: "ddga-slider__value", "aria-hidden": "true", children: currentForRender.map(fmt).join(" \u2013 ") })
3783
+ return /* @__PURE__ */ jsxs26("div", { "data-slot": "slider-field", className: "ddga-field", children: [
3784
+ (label || showValue) && /* @__PURE__ */ jsxs26("div", { className: "ddga-slider__header", children: [
3785
+ label && /* @__PURE__ */ jsx32("span", { id: labelId, className: "ddga-slider__label", children: label }),
3786
+ showValue && /* @__PURE__ */ jsx32("span", { className: "ddga-slider__value", "aria-hidden": "true", children: currentForRender.map(fmt).join(" \u2013 ") })
3610
3787
  ] }),
3611
- /* @__PURE__ */ jsxs24(
3788
+ /* @__PURE__ */ jsxs26(
3612
3789
  SliderPrimitive.Root,
3613
3790
  {
3614
3791
  ...props,
@@ -3623,8 +3800,8 @@ function Slider({
3623
3800
  "data-slot": "slider",
3624
3801
  className: cn(sliderVariants({ size, error: hasError }), className),
3625
3802
  children: [
3626
- /* @__PURE__ */ jsx31(SliderPrimitive.Track, { "data-slot": "slider-track", className: "ddga-slider__track", children: /* @__PURE__ */ jsx31(SliderPrimitive.Range, { "data-slot": "slider-range", className: "ddga-slider__range" }) }),
3627
- currentForRender.map((thumbValue, index) => /* @__PURE__ */ jsx31(
3803
+ /* @__PURE__ */ jsx32(SliderPrimitive.Track, { "data-slot": "slider-track", className: "ddga-slider__track", children: /* @__PURE__ */ jsx32(SliderPrimitive.Range, { "data-slot": "slider-range", className: "ddga-slider__range" }) }),
3804
+ currentForRender.map((thumbValue, index) => /* @__PURE__ */ jsx32(
3628
3805
  SliderPrimitive.Thumb,
3629
3806
  {
3630
3807
  "data-slot": "slider-thumb",
@@ -3639,15 +3816,15 @@ function Slider({
3639
3816
  ]
3640
3817
  }
3641
3818
  ),
3642
- hasErrorMessage && /* @__PURE__ */ jsx31(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
3643
- hasHelper && /* @__PURE__ */ jsx31(FieldMessage, { id: helperId, variant: "helper", children: helperText })
3819
+ hasErrorMessage && /* @__PURE__ */ jsx32(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
3820
+ hasHelper && /* @__PURE__ */ jsx32(FieldMessage, { id: helperId, variant: "helper", children: helperText })
3644
3821
  ] });
3645
3822
  }
3646
3823
 
3647
3824
  // src/components/NumberInput/NumberInput.tsx
3648
3825
  import { useState as useState6 } from "react";
3649
3826
  import { cva as cva29 } from "class-variance-authority";
3650
- import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
3827
+ import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
3651
3828
  var numberInputVariants = cva29("ddga-number-input", {
3652
3829
  variants: {
3653
3830
  size: {
@@ -3757,18 +3934,18 @@ function NumberInput({
3757
3934
  }
3758
3935
  const atMin = min != null && numericValue != null && numericValue <= min;
3759
3936
  const atMax = max != null && numericValue != null && numericValue >= max;
3760
- return /* @__PURE__ */ jsxs25("div", { "data-slot": "number-input-field", className: "ddga-field", children: [
3761
- label && /* @__PURE__ */ jsxs25("label", { htmlFor: fieldId, className: "ddga-number-input__label", children: [
3937
+ return /* @__PURE__ */ jsxs27("div", { "data-slot": "number-input-field", className: "ddga-field", children: [
3938
+ label && /* @__PURE__ */ jsxs27("label", { htmlFor: fieldId, className: "ddga-number-input__label", children: [
3762
3939
  label,
3763
- required && /* @__PURE__ */ jsx32("span", { "aria-hidden": "true", className: "ddga-number-input__required", children: "*" })
3940
+ required && /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: "ddga-number-input__required", children: "*" })
3764
3941
  ] }),
3765
- /* @__PURE__ */ jsxs25(
3942
+ /* @__PURE__ */ jsxs27(
3766
3943
  "div",
3767
3944
  {
3768
3945
  "data-slot": "number-input-control",
3769
3946
  className: cn(numberInputVariants({ size, error: hasError }), className),
3770
3947
  children: [
3771
- !hideControls && /* @__PURE__ */ jsx32(
3948
+ !hideControls && /* @__PURE__ */ jsx33(
3772
3949
  "button",
3773
3950
  {
3774
3951
  type: "button",
@@ -3778,10 +3955,10 @@ function NumberInput({
3778
3955
  onClick: () => stepBy(-1),
3779
3956
  disabled: disabled || atMin,
3780
3957
  tabIndex: -1,
3781
- children: /* @__PURE__ */ jsx32(Minus, { "aria-hidden": "true" })
3958
+ children: /* @__PURE__ */ jsx33(Minus, { "aria-hidden": "true" })
3782
3959
  }
3783
3960
  ),
3784
- /* @__PURE__ */ jsx32(
3961
+ /* @__PURE__ */ jsx33(
3785
3962
  "input",
3786
3963
  {
3787
3964
  ...props,
@@ -3798,7 +3975,7 @@ function NumberInput({
3798
3975
  className: "ddga-number-input__field"
3799
3976
  }
3800
3977
  ),
3801
- !hideControls && /* @__PURE__ */ jsx32(
3978
+ !hideControls && /* @__PURE__ */ jsx33(
3802
3979
  "button",
3803
3980
  {
3804
3981
  type: "button",
@@ -3808,21 +3985,21 @@ function NumberInput({
3808
3985
  onClick: () => stepBy(1),
3809
3986
  disabled: disabled || atMax,
3810
3987
  tabIndex: -1,
3811
- children: /* @__PURE__ */ jsx32(Plus, { "aria-hidden": "true" })
3988
+ children: /* @__PURE__ */ jsx33(Plus, { "aria-hidden": "true" })
3812
3989
  }
3813
3990
  )
3814
3991
  ]
3815
3992
  }
3816
3993
  ),
3817
- hasErrorMessage && /* @__PURE__ */ jsx32(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
3818
- hasHelper && /* @__PURE__ */ jsx32(FieldMessage, { id: helperId, variant: "helper", children: helperText })
3994
+ hasErrorMessage && /* @__PURE__ */ jsx33(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
3995
+ hasHelper && /* @__PURE__ */ jsx33(FieldMessage, { id: helperId, variant: "helper", children: helperText })
3819
3996
  ] });
3820
3997
  }
3821
3998
 
3822
3999
  // src/components/Rating/Rating.tsx
3823
4000
  import { useRef as useRef2, useState as useState7 } from "react";
3824
4001
  import { cva as cva30 } from "class-variance-authority";
3825
- import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
4002
+ import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
3826
4003
  var ratingVariants = cva30("ddga-rating", {
3827
4004
  variants: {
3828
4005
  size: {
@@ -3931,7 +4108,7 @@ function Rating({
3931
4108
  }
3932
4109
  const stars = Array.from({ length: max }, (_, index) => {
3933
4110
  const level = fillFor(index, displayValue, allowHalf);
3934
- return /* @__PURE__ */ jsxs26(
4111
+ return /* @__PURE__ */ jsxs28(
3935
4112
  "span",
3936
4113
  {
3937
4114
  "data-slot": "rating-star",
@@ -3940,8 +4117,8 @@ function Rating({
3940
4117
  onPointerMove: interactive ? (event) => setHover(pointerValue(event, index)) : void 0,
3941
4118
  onClick: interactive ? (event) => commit(pointerValue(event, index)) : void 0,
3942
4119
  children: [
3943
- /* @__PURE__ */ jsx33(Star, { className: "ddga-rating__star-bg", "aria-hidden": "true" }),
3944
- /* @__PURE__ */ jsx33("span", { className: "ddga-rating__star-fill", "aria-hidden": "true", children: /* @__PURE__ */ jsx33(Star, { className: "ddga-rating__star-fg", "aria-hidden": "true" }) })
4120
+ /* @__PURE__ */ jsx34(Star, { className: "ddga-rating__star-bg", "aria-hidden": "true" }),
4121
+ /* @__PURE__ */ jsx34("span", { className: "ddga-rating__star-fill", "aria-hidden": "true", children: /* @__PURE__ */ jsx34(Star, { className: "ddga-rating__star-fg", "aria-hidden": "true" }) })
3945
4122
  ]
3946
4123
  },
3947
4124
  index
@@ -3956,9 +4133,9 @@ function Rating({
3956
4133
  };
3957
4134
  const labelledBy = label ? `${fieldId}-label` : props["aria-labelledby"];
3958
4135
  const ariaLabel = labelledBy ? void 0 : props["aria-label"] ?? "Rating";
3959
- return /* @__PURE__ */ jsxs26("div", { "data-slot": "rating-field", className: "ddga-field", children: [
3960
- label && /* @__PURE__ */ jsx33("span", { id: `${fieldId}-label`, className: "ddga-rating__label", children: label }),
3961
- readOnly ? /* @__PURE__ */ jsx33("div", { ...sharedProps, role: "img", "aria-label": formatValueText(currentValue, max), children: stars }) : /* @__PURE__ */ jsx33(
4136
+ return /* @__PURE__ */ jsxs28("div", { "data-slot": "rating-field", className: "ddga-field", children: [
4137
+ label && /* @__PURE__ */ jsx34("span", { id: `${fieldId}-label`, className: "ddga-rating__label", children: label }),
4138
+ readOnly ? /* @__PURE__ */ jsx34("div", { ...sharedProps, role: "img", "aria-label": formatValueText(currentValue, max), children: stars }) : /* @__PURE__ */ jsx34(
3962
4139
  "div",
3963
4140
  {
3964
4141
  ...sharedProps,
@@ -3978,15 +4155,15 @@ function Rating({
3978
4155
  children: stars
3979
4156
  }
3980
4157
  ),
3981
- hasErrorMessage && /* @__PURE__ */ jsx33(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
3982
- hasHelper && /* @__PURE__ */ jsx33(FieldMessage, { id: helperId, variant: "helper", children: helperText })
4158
+ hasErrorMessage && /* @__PURE__ */ jsx34(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
4159
+ hasHelper && /* @__PURE__ */ jsx34(FieldMessage, { id: helperId, variant: "helper", children: helperText })
3983
4160
  ] });
3984
4161
  }
3985
4162
 
3986
4163
  // src/components/Toggle/Toggle.tsx
3987
4164
  import { Toggle as TogglePrimitive, ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
3988
4165
  import { cva as cva31 } from "class-variance-authority";
3989
- import { jsx as jsx34 } from "react/jsx-runtime";
4166
+ import { jsx as jsx35 } from "react/jsx-runtime";
3990
4167
  var toggleVariants = cva31("ddga-toggle", {
3991
4168
  variants: {
3992
4169
  variant: {
@@ -4022,7 +4199,7 @@ var toggleGroupVariants = cva31("ddga-toggle-group", {
4022
4199
  }
4023
4200
  });
4024
4201
  function Toggle({ variant, size, className, ...props }) {
4025
- return /* @__PURE__ */ jsx34(
4202
+ return /* @__PURE__ */ jsx35(
4026
4203
  TogglePrimitive.Root,
4027
4204
  {
4028
4205
  "data-slot": "toggle",
@@ -4037,7 +4214,7 @@ function ToggleGroup({ variant, size, className, ...props }) {
4037
4214
  "[@dev-dga/react] ToggleGroup should have an `aria-label` or `aria-labelledby` so the button group has an accessible name."
4038
4215
  );
4039
4216
  }
4040
- return /* @__PURE__ */ jsx34(
4217
+ return /* @__PURE__ */ jsx35(
4041
4218
  ToggleGroupPrimitive.Root,
4042
4219
  {
4043
4220
  "data-slot": "toggle-group",
@@ -4047,7 +4224,7 @@ function ToggleGroup({ variant, size, className, ...props }) {
4047
4224
  );
4048
4225
  }
4049
4226
  function ToggleGroupItem({ className, ...props }) {
4050
- return /* @__PURE__ */ jsx34(
4227
+ return /* @__PURE__ */ jsx35(
4051
4228
  ToggleGroupPrimitive.Item,
4052
4229
  {
4053
4230
  "data-slot": "toggle-group-item",
@@ -4059,7 +4236,7 @@ function ToggleGroupItem({ className, ...props }) {
4059
4236
 
4060
4237
  // src/components/DescriptionList/DescriptionList.tsx
4061
4238
  import { cva as cva32 } from "class-variance-authority";
4062
- import { jsx as jsx35 } from "react/jsx-runtime";
4239
+ import { jsx as jsx36 } from "react/jsx-runtime";
4063
4240
  var descriptionListVariants = cva32("ddga-description-list", {
4064
4241
  variants: {
4065
4242
  orientation: {
@@ -4075,7 +4252,7 @@ var descriptionListVariants = cva32("ddga-description-list", {
4075
4252
  }
4076
4253
  });
4077
4254
  function DescriptionList({ orientation, divided, className, ...props }) {
4078
- return /* @__PURE__ */ jsx35(
4255
+ return /* @__PURE__ */ jsx36(
4079
4256
  "dl",
4080
4257
  {
4081
4258
  "data-slot": "description-list",
@@ -4085,7 +4262,7 @@ function DescriptionList({ orientation, divided, className, ...props }) {
4085
4262
  );
4086
4263
  }
4087
4264
  function DescriptionItem({ className, ...props }) {
4088
- return /* @__PURE__ */ jsx35(
4265
+ return /* @__PURE__ */ jsx36(
4089
4266
  "div",
4090
4267
  {
4091
4268
  "data-slot": "description-item",
@@ -4095,7 +4272,7 @@ function DescriptionItem({ className, ...props }) {
4095
4272
  );
4096
4273
  }
4097
4274
  function DescriptionTerm({ className, ...props }) {
4098
- return /* @__PURE__ */ jsx35(
4275
+ return /* @__PURE__ */ jsx36(
4099
4276
  "dt",
4100
4277
  {
4101
4278
  "data-slot": "description-term",
@@ -4105,7 +4282,7 @@ function DescriptionTerm({ className, ...props }) {
4105
4282
  );
4106
4283
  }
4107
4284
  function DescriptionDetails({ className, ...props }) {
4108
- return /* @__PURE__ */ jsx35(
4285
+ return /* @__PURE__ */ jsx36(
4109
4286
  "dd",
4110
4287
  {
4111
4288
  "data-slot": "description-details",
@@ -4119,7 +4296,7 @@ function DescriptionDetails({ className, ...props }) {
4119
4296
  import "react";
4120
4297
  import { Slot as SlotPrimitive9 } from "radix-ui";
4121
4298
  import { cva as cva33 } from "class-variance-authority";
4122
- import { Fragment as Fragment3, jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
4299
+ import { Fragment as Fragment5, jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
4123
4300
  var emptyStateVariants = cva33("ddga-empty-state", {
4124
4301
  variants: {
4125
4302
  variant: {
@@ -4140,10 +4317,10 @@ var emptyStateVariants = cva33("ddga-empty-state", {
4140
4317
  }
4141
4318
  });
4142
4319
  var DEFAULT_ICONS3 = {
4143
- default: /* @__PURE__ */ jsx36(Inbox, { "aria-hidden": "true" }),
4144
- search: /* @__PURE__ */ jsx36(Search, { "aria-hidden": "true" }),
4145
- error: /* @__PURE__ */ jsx36(AlertCircle, { "aria-hidden": "true" }),
4146
- success: /* @__PURE__ */ jsx36(Check, { "aria-hidden": "true" })
4320
+ default: /* @__PURE__ */ jsx37(Inbox, { "aria-hidden": "true" }),
4321
+ search: /* @__PURE__ */ jsx37(Search, { "aria-hidden": "true" }),
4322
+ error: /* @__PURE__ */ jsx37(AlertCircle, { "aria-hidden": "true" }),
4323
+ success: /* @__PURE__ */ jsx37(Check, { "aria-hidden": "true" })
4147
4324
  };
4148
4325
  function EmptyState({
4149
4326
  variant,
@@ -4153,24 +4330,26 @@ function EmptyState({
4153
4330
  description,
4154
4331
  action,
4155
4332
  secondaryAction,
4333
+ asChild,
4156
4334
  className,
4157
4335
  children,
4158
4336
  ...props
4159
4337
  }) {
4160
4338
  const resolvedIcon = icon === false ? null : icon !== void 0 ? icon : DEFAULT_ICONS3[variant ?? "default"];
4161
- return /* @__PURE__ */ jsx36(
4162
- "div",
4339
+ const Comp = asChild ? SlotPrimitive9.Slot : "div";
4340
+ return /* @__PURE__ */ jsx37(
4341
+ Comp,
4163
4342
  {
4164
4343
  "data-slot": "empty-state",
4165
4344
  "data-variant": variant ?? "default",
4166
4345
  "data-size": size ?? "md",
4167
4346
  className: cn(emptyStateVariants({ variant, size }), className),
4168
4347
  ...props,
4169
- children: children ?? /* @__PURE__ */ jsxs27(Fragment3, { children: [
4170
- resolvedIcon ? /* @__PURE__ */ jsx36(EmptyStateMedia, { children: resolvedIcon }) : null,
4171
- title ? /* @__PURE__ */ jsx36(EmptyStateTitle, { children: title }) : null,
4172
- description ? /* @__PURE__ */ jsx36(EmptyStateDescription, { children: description }) : null,
4173
- action || secondaryAction ? /* @__PURE__ */ jsxs27(EmptyStateActions, { children: [
4348
+ children: children ?? /* @__PURE__ */ jsxs29(Fragment5, { children: [
4349
+ resolvedIcon ? /* @__PURE__ */ jsx37(EmptyStateMedia, { children: resolvedIcon }) : null,
4350
+ title ? /* @__PURE__ */ jsx37(EmptyStateTitle, { children: title }) : null,
4351
+ description ? /* @__PURE__ */ jsx37(EmptyStateDescription, { children: description }) : null,
4352
+ action || secondaryAction ? /* @__PURE__ */ jsxs29(EmptyStateActions, { children: [
4174
4353
  action,
4175
4354
  secondaryAction
4176
4355
  ] }) : null
@@ -4179,7 +4358,7 @@ function EmptyState({
4179
4358
  );
4180
4359
  }
4181
4360
  function EmptyStateMedia({ className, ...props }) {
4182
- return /* @__PURE__ */ jsx36(
4361
+ return /* @__PURE__ */ jsx37(
4183
4362
  "div",
4184
4363
  {
4185
4364
  "data-slot": "empty-state-media",
@@ -4191,7 +4370,7 @@ function EmptyStateMedia({ className, ...props }) {
4191
4370
  }
4192
4371
  function EmptyStateTitle({ asChild, className, ...props }) {
4193
4372
  const Comp = asChild ? SlotPrimitive9.Slot : "h3";
4194
- return /* @__PURE__ */ jsx36(
4373
+ return /* @__PURE__ */ jsx37(
4195
4374
  Comp,
4196
4375
  {
4197
4376
  "data-slot": "empty-state-title",
@@ -4202,7 +4381,7 @@ function EmptyStateTitle({ asChild, className, ...props }) {
4202
4381
  }
4203
4382
  function EmptyStateDescription({ asChild, className, ...props }) {
4204
4383
  const Comp = asChild ? SlotPrimitive9.Slot : "p";
4205
- return /* @__PURE__ */ jsx36(
4384
+ return /* @__PURE__ */ jsx37(
4206
4385
  Comp,
4207
4386
  {
4208
4387
  "data-slot": "empty-state-description",
@@ -4213,7 +4392,7 @@ function EmptyStateDescription({ asChild, className, ...props }) {
4213
4392
  }
4214
4393
  function EmptyStateActions({ asChild, className, ...props }) {
4215
4394
  const Comp = asChild ? SlotPrimitive9.Slot : "div";
4216
- return /* @__PURE__ */ jsx36(
4395
+ return /* @__PURE__ */ jsx37(
4217
4396
  Comp,
4218
4397
  {
4219
4398
  "data-slot": "empty-state-actions",
@@ -4226,18 +4405,22 @@ function EmptyStateActions({ asChild, className, ...props }) {
4226
4405
  // src/components/Stat/Stat.tsx
4227
4406
  import "react";
4228
4407
  import { cva as cva34 } from "class-variance-authority";
4229
- import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
4408
+ import { jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
4230
4409
  var statVariants = cva34("ddga-stat", {
4231
4410
  variants: {
4232
4411
  variant: {
4233
4412
  flat: "ddga-stat--flat",
4234
4413
  elevated: "ddga-stat--elevated",
4235
- accent: "ddga-stat--accent"
4414
+ accent: "ddga-stat--accent",
4415
+ // Soft sentiment-tinted gradient surface (reuses the accent tint vars).
4416
+ gradient: "ddga-stat--gradient"
4236
4417
  },
4237
4418
  size: {
4238
4419
  sm: "ddga-stat--sm",
4239
4420
  md: "ddga-stat--md",
4240
- lg: "ddga-stat--lg"
4421
+ lg: "ddga-stat--lg",
4422
+ // Hero/display size for headline KPIs (display-scale value).
4423
+ xl: "ddga-stat--xl"
4241
4424
  }
4242
4425
  },
4243
4426
  defaultVariants: {
@@ -4246,9 +4429,9 @@ var statVariants = cva34("ddga-stat", {
4246
4429
  }
4247
4430
  });
4248
4431
  var TREND_ICONS = {
4249
- up: /* @__PURE__ */ jsx37(CaretUp, { "aria-hidden": "true" }),
4250
- down: /* @__PURE__ */ jsx37(CaretDown, { "aria-hidden": "true" }),
4251
- flat: /* @__PURE__ */ jsx37(Minus, { "aria-hidden": "true" })
4432
+ up: /* @__PURE__ */ jsx38(CaretUp, { "aria-hidden": "true" }),
4433
+ down: /* @__PURE__ */ jsx38(CaretDown, { "aria-hidden": "true" }),
4434
+ flat: /* @__PURE__ */ jsx38(Minus, { "aria-hidden": "true" })
4252
4435
  };
4253
4436
  var TREND_SENTIMENT = {
4254
4437
  up: "positive",
@@ -4269,13 +4452,14 @@ function Stat({
4269
4452
  changeLabel,
4270
4453
  trend,
4271
4454
  sentiment,
4455
+ changeVariant,
4272
4456
  icon,
4273
4457
  className,
4274
4458
  children,
4275
4459
  ...props
4276
4460
  }) {
4277
4461
  const resolvedSentiment = resolveSentiment(trend, sentiment);
4278
- return /* @__PURE__ */ jsxs28(
4462
+ return /* @__PURE__ */ jsxs30(
4279
4463
  "div",
4280
4464
  {
4281
4465
  "data-slot": "stat",
@@ -4285,14 +4469,14 @@ function Stat({
4285
4469
  className: cn(statVariants({ variant, size }), className),
4286
4470
  ...props,
4287
4471
  children: [
4288
- label || icon ? /* @__PURE__ */ jsxs28("div", { className: "ddga-stat__label-row", children: [
4289
- label ? /* @__PURE__ */ jsx37(StatLabel, { children: label }) : null,
4290
- icon ? /* @__PURE__ */ jsx37("span", { className: "ddga-stat__icon", "aria-hidden": "true", children: icon }) : null
4472
+ label || icon ? /* @__PURE__ */ jsxs30("div", { className: "ddga-stat__label-row", children: [
4473
+ label ? /* @__PURE__ */ jsx38(StatLabel, { children: label }) : null,
4474
+ icon ? /* @__PURE__ */ jsx38("span", { className: "ddga-stat__icon", "aria-hidden": "true", children: icon }) : null
4291
4475
  ] }) : null,
4292
- value ? /* @__PURE__ */ jsx37(StatValue, { children: value }) : null,
4293
- change || changeLabel ? /* @__PURE__ */ jsxs28("div", { className: "ddga-stat__change-row", children: [
4294
- change ? /* @__PURE__ */ jsx37(StatChange, { trend, sentiment, children: change }) : null,
4295
- changeLabel ? /* @__PURE__ */ jsx37("span", { className: "ddga-stat__change-label", children: changeLabel }) : null
4476
+ value ? /* @__PURE__ */ jsx38(StatValue, { children: value }) : null,
4477
+ change || changeLabel ? /* @__PURE__ */ jsxs30("div", { className: "ddga-stat__change-row", children: [
4478
+ change ? /* @__PURE__ */ jsx38(StatChange, { trend, sentiment, variant: changeVariant, children: change }) : null,
4479
+ changeLabel ? /* @__PURE__ */ jsx38("span", { className: "ddga-stat__change-label", children: changeLabel }) : null
4296
4480
  ] }) : null,
4297
4481
  children
4298
4482
  ]
@@ -4300,14 +4484,17 @@ function Stat({
4300
4484
  );
4301
4485
  }
4302
4486
  function StatLabel({ className, ...props }) {
4303
- return /* @__PURE__ */ jsx37("div", { "data-slot": "stat-label", className: cn("ddga-stat__label", className), ...props });
4487
+ return /* @__PURE__ */ jsx38("div", { "data-slot": "stat-label", className: cn("ddga-stat__label", className), ...props });
4304
4488
  }
4305
4489
  function StatValue({ className, ...props }) {
4306
- return /* @__PURE__ */ jsx37("div", { "data-slot": "stat-value", className: cn("ddga-stat__value", className), ...props });
4490
+ return /* @__PURE__ */ jsx38("div", { "data-slot": "stat-value", className: cn("ddga-stat__value", className), ...props });
4307
4491
  }
4308
- function StatChange({ trend, sentiment, className, children, ...props }) {
4492
+ function StatChart({ className, ...props }) {
4493
+ return /* @__PURE__ */ jsx38("div", { "data-slot": "stat-chart", className: cn("ddga-stat__chart", className), ...props });
4494
+ }
4495
+ function StatChange({ trend, sentiment, variant, className, children, ...props }) {
4309
4496
  const resolvedSentiment = resolveSentiment(trend, sentiment);
4310
- return /* @__PURE__ */ jsxs28(
4497
+ return /* @__PURE__ */ jsxs30(
4311
4498
  "div",
4312
4499
  {
4313
4500
  "data-slot": "stat-change",
@@ -4316,11 +4503,12 @@ function StatChange({ trend, sentiment, className, children, ...props }) {
4316
4503
  className: cn(
4317
4504
  "ddga-stat__change",
4318
4505
  resolvedSentiment ? `ddga-stat__change--${resolvedSentiment}` : null,
4506
+ variant === "chip" && "ddga-stat__change--chip",
4319
4507
  className
4320
4508
  ),
4321
4509
  ...props,
4322
4510
  children: [
4323
- trend ? /* @__PURE__ */ jsx37("span", { className: "ddga-stat__change-icon", children: TREND_ICONS[trend] }) : null,
4511
+ trend ? /* @__PURE__ */ jsx38("span", { className: "ddga-stat__change-icon", children: TREND_ICONS[trend] }) : null,
4324
4512
  children
4325
4513
  ]
4326
4514
  }
@@ -4329,7 +4517,7 @@ function StatChange({ trend, sentiment, className, children, ...props }) {
4329
4517
 
4330
4518
  // src/components/Stat/StatGroup.tsx
4331
4519
  import { cva as cva35 } from "class-variance-authority";
4332
- import { jsx as jsx38 } from "react/jsx-runtime";
4520
+ import { jsx as jsx39 } from "react/jsx-runtime";
4333
4521
  var statGroupVariants = cva35("ddga-stat-group", {
4334
4522
  variants: {
4335
4523
  orientation: {
@@ -4348,7 +4536,7 @@ var statGroupVariants = cva35("ddga-stat-group", {
4348
4536
  }
4349
4537
  });
4350
4538
  function StatGroup({ orientation, gap, columns, className, style, ...props }) {
4351
- return /* @__PURE__ */ jsx38(
4539
+ return /* @__PURE__ */ jsx39(
4352
4540
  "div",
4353
4541
  {
4354
4542
  "data-slot": "stat-group",
@@ -4364,10 +4552,10 @@ function StatGroup({ orientation, gap, columns, className, style, ...props }) {
4364
4552
  }
4365
4553
 
4366
4554
  // src/components/Popover/Popover.tsx
4367
- import { useContext as useContext9 } from "react";
4555
+ import { useContext as useContext10 } from "react";
4368
4556
  import { Popover as PopoverPrimitive2 } from "radix-ui";
4369
4557
  import { cva as cva36 } from "class-variance-authority";
4370
- import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
4558
+ import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
4371
4559
  var popoverContentVariants = cva36("ddga-popover", {
4372
4560
  variants: {
4373
4561
  size: {
@@ -4380,13 +4568,13 @@ var popoverContentVariants = cva36("ddga-popover", {
4380
4568
  }
4381
4569
  });
4382
4570
  function Popover(props) {
4383
- return /* @__PURE__ */ jsx39(PopoverPrimitive2.Root, { ...props });
4571
+ return /* @__PURE__ */ jsx40(PopoverPrimitive2.Root, { ...props });
4384
4572
  }
4385
4573
  function PopoverTrigger({ className, ...props }) {
4386
- return /* @__PURE__ */ jsx39(PopoverPrimitive2.Trigger, { "data-slot": "popover-trigger", className, ...props });
4574
+ return /* @__PURE__ */ jsx40(PopoverPrimitive2.Trigger, { "data-slot": "popover-trigger", className, ...props });
4387
4575
  }
4388
4576
  function PopoverAnchor(props) {
4389
- return /* @__PURE__ */ jsx39(PopoverPrimitive2.Anchor, { "data-slot": "popover-anchor", ...props });
4577
+ return /* @__PURE__ */ jsx40(PopoverPrimitive2.Anchor, { "data-slot": "popover-anchor", ...props });
4390
4578
  }
4391
4579
  function PopoverContent({
4392
4580
  size,
@@ -4401,9 +4589,9 @@ function PopoverContent({
4401
4589
  '[@dev-dga/react] PopoverContent renders role="dialog" and should have an `aria-label` or `aria-labelledby` so the panel has an accessible name.'
4402
4590
  );
4403
4591
  }
4404
- const ctx = useContext9(DgaContext);
4592
+ const ctx = useContext10(DgaContext);
4405
4593
  const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? void 0;
4406
- return /* @__PURE__ */ jsx39(PopoverPrimitive2.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs29(
4594
+ return /* @__PURE__ */ jsx40(PopoverPrimitive2.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs31(
4407
4595
  PopoverPrimitive2.Content,
4408
4596
  {
4409
4597
  "data-slot": "popover-content",
@@ -4412,7 +4600,7 @@ function PopoverContent({
4412
4600
  ...props,
4413
4601
  children: [
4414
4602
  children,
4415
- arrow ? /* @__PURE__ */ jsx39(PopoverPrimitive2.Arrow, { className: "ddga-popover__arrow", width: 16, height: 8 }) : null
4603
+ arrow ? /* @__PURE__ */ jsx40(PopoverPrimitive2.Arrow, { className: "ddga-popover__arrow", width: 16, height: 8 }) : null
4416
4604
  ]
4417
4605
  }
4418
4606
  ) });
@@ -4426,7 +4614,7 @@ function PopoverClose({
4426
4614
  }) {
4427
4615
  const hasRenderableChildren = children != null && children !== false;
4428
4616
  if (asChild || hasRenderableChildren) {
4429
- return /* @__PURE__ */ jsx39(
4617
+ return /* @__PURE__ */ jsx40(
4430
4618
  PopoverPrimitive2.Close,
4431
4619
  {
4432
4620
  "data-slot": "popover-close",
@@ -4437,27 +4625,27 @@ function PopoverClose({
4437
4625
  }
4438
4626
  );
4439
4627
  }
4440
- return /* @__PURE__ */ jsx39(
4628
+ return /* @__PURE__ */ jsx40(
4441
4629
  PopoverPrimitive2.Close,
4442
4630
  {
4443
4631
  "data-slot": "popover-close",
4444
4632
  "aria-label": closeLabel,
4445
4633
  className: cn("ddga-popover__close", className),
4446
4634
  ...props,
4447
- children: /* @__PURE__ */ jsx39(Close, { "aria-hidden": "true" })
4635
+ children: /* @__PURE__ */ jsx40(Close, { "aria-hidden": "true" })
4448
4636
  }
4449
4637
  );
4450
4638
  }
4451
4639
 
4452
4640
  // src/components/Sidebar/Sidebar.tsx
4453
- import { useCallback as useCallback3, useEffect as useEffect2, useMemo as useMemo3, useState as useState9 } from "react";
4641
+ import { useCallback as useCallback3, useEffect as useEffect2, useMemo as useMemo4, useState as useState9 } from "react";
4454
4642
  import { Slot as SlotPrimitive10 } from "radix-ui";
4455
4643
 
4456
4644
  // src/components/Sidebar/SidebarContext.ts
4457
- import { createContext as createContext3, useContext as useContext10 } from "react";
4645
+ import { createContext as createContext3, useContext as useContext11 } from "react";
4458
4646
  var SidebarContext = createContext3(null);
4459
4647
  function useSidebar() {
4460
- const ctx = useContext10(SidebarContext);
4648
+ const ctx = useContext11(SidebarContext);
4461
4649
  if (!ctx) {
4462
4650
  throw new Error("useSidebar must be used within a <SidebarProvider>");
4463
4651
  }
@@ -4479,7 +4667,7 @@ function useIsMobile(breakpoint = 768) {
4479
4667
  }
4480
4668
 
4481
4669
  // src/components/Sidebar/Sidebar.tsx
4482
- import { jsx as jsx40 } from "react/jsx-runtime";
4670
+ import { jsx as jsx41 } from "react/jsx-runtime";
4483
4671
  function SidebarProvider({
4484
4672
  defaultOpen = true,
4485
4673
  open: openProp,
@@ -4526,11 +4714,11 @@ function SidebarProvider({
4526
4714
  return () => window.removeEventListener("keydown", onKeyDown);
4527
4715
  }, [keyboardShortcut, toggleSidebar]);
4528
4716
  const state = open ? "expanded" : "collapsed";
4529
- const value = useMemo3(
4717
+ const value = useMemo4(
4530
4718
  () => ({ state, open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar }),
4531
4719
  [state, open, setOpen, openMobile, isMobile, toggleSidebar]
4532
4720
  );
4533
- return /* @__PURE__ */ jsx40(SidebarContext.Provider, { value, children: /* @__PURE__ */ jsx40(
4721
+ return /* @__PURE__ */ jsx41(SidebarContext.Provider, { value, children: /* @__PURE__ */ jsx41(
4534
4722
  "div",
4535
4723
  {
4536
4724
  "data-slot": "sidebar-wrapper",
@@ -4552,7 +4740,7 @@ function Sidebar({
4552
4740
  }) {
4553
4741
  const { isMobile, openMobile, setOpenMobile, state } = useSidebar();
4554
4742
  if (isMobile) {
4555
- return /* @__PURE__ */ jsx40(Drawer, { open: openMobile, onOpenChange: setOpenMobile, children: /* @__PURE__ */ jsx40(
4743
+ return /* @__PURE__ */ jsx41(Drawer, { open: openMobile, onOpenChange: setOpenMobile, children: /* @__PURE__ */ jsx41(
4556
4744
  DrawerContent,
4557
4745
  {
4558
4746
  side,
@@ -4562,11 +4750,12 @@ function Sidebar({
4562
4750
  "data-variant": variant,
4563
4751
  "data-side": side,
4564
4752
  className: cn("ddga-sidebar", "ddga-sidebar--mobile", className),
4753
+ ...props,
4565
4754
  children
4566
4755
  }
4567
4756
  ) });
4568
4757
  }
4569
- return /* @__PURE__ */ jsx40(
4758
+ return /* @__PURE__ */ jsx41(
4570
4759
  "aside",
4571
4760
  {
4572
4761
  "data-slot": "sidebar",
@@ -4591,7 +4780,7 @@ function SidebarTrigger({
4591
4780
  }) {
4592
4781
  const { toggleSidebar, open, openMobile, isMobile } = useSidebar();
4593
4782
  const Comp = asChild ? SlotPrimitive10.Slot : "button";
4594
- return /* @__PURE__ */ jsx40(
4783
+ return /* @__PURE__ */ jsx41(
4595
4784
  Comp,
4596
4785
  {
4597
4786
  type: asChild ? void 0 : "button",
@@ -4605,7 +4794,7 @@ function SidebarTrigger({
4605
4794
  toggleSidebar();
4606
4795
  },
4607
4796
  ...props,
4608
- children: children ?? /* @__PURE__ */ jsx40(PanelLeft, { "aria-hidden": "true" })
4797
+ children: children ?? /* @__PURE__ */ jsx41(PanelLeft, { "aria-hidden": "true" })
4609
4798
  }
4610
4799
  );
4611
4800
  }
@@ -4615,7 +4804,7 @@ function SidebarRail({
4615
4804
  ...props
4616
4805
  }) {
4617
4806
  const { toggleSidebar } = useSidebar();
4618
- return /* @__PURE__ */ jsx40(
4807
+ return /* @__PURE__ */ jsx41(
4619
4808
  "button",
4620
4809
  {
4621
4810
  type: "button",
@@ -4631,15 +4820,15 @@ function SidebarRail({
4631
4820
  }
4632
4821
  function SidebarInset({ asChild, className, ...props }) {
4633
4822
  const Comp = asChild ? SlotPrimitive10.Slot : "main";
4634
- return /* @__PURE__ */ jsx40(Comp, { "data-slot": "sidebar-inset", className: cn("ddga-sidebar-inset", className), ...props });
4823
+ return /* @__PURE__ */ jsx41(Comp, { "data-slot": "sidebar-inset", className: cn("ddga-sidebar-inset", className), ...props });
4635
4824
  }
4636
4825
  function SidebarHeader({ asChild, className, ...props }) {
4637
4826
  const Comp = asChild ? SlotPrimitive10.Slot : "div";
4638
- return /* @__PURE__ */ jsx40(Comp, { "data-slot": "sidebar-header", className: cn("ddga-sidebar__header", className), ...props });
4827
+ return /* @__PURE__ */ jsx41(Comp, { "data-slot": "sidebar-header", className: cn("ddga-sidebar__header", className), ...props });
4639
4828
  }
4640
4829
  function SidebarContent({ asChild, className, ...props }) {
4641
4830
  const Comp = asChild ? SlotPrimitive10.Slot : "div";
4642
- return /* @__PURE__ */ jsx40(
4831
+ return /* @__PURE__ */ jsx41(
4643
4832
  Comp,
4644
4833
  {
4645
4834
  "data-slot": "sidebar-content",
@@ -4650,10 +4839,10 @@ function SidebarContent({ asChild, className, ...props }) {
4650
4839
  }
4651
4840
  function SidebarFooter({ asChild, className, ...props }) {
4652
4841
  const Comp = asChild ? SlotPrimitive10.Slot : "div";
4653
- return /* @__PURE__ */ jsx40(Comp, { "data-slot": "sidebar-footer", className: cn("ddga-sidebar__footer", className), ...props });
4842
+ return /* @__PURE__ */ jsx41(Comp, { "data-slot": "sidebar-footer", className: cn("ddga-sidebar__footer", className), ...props });
4654
4843
  }
4655
4844
  function SidebarSeparator({ className, ...props }) {
4656
- return /* @__PURE__ */ jsx40(
4845
+ return /* @__PURE__ */ jsx41(
4657
4846
  "hr",
4658
4847
  {
4659
4848
  "data-slot": "sidebar-separator",
@@ -4665,10 +4854,10 @@ function SidebarSeparator({ className, ...props }) {
4665
4854
 
4666
4855
  // src/components/Sidebar/SidebarGroup.tsx
4667
4856
  import { Slot as SlotPrimitive11 } from "radix-ui";
4668
- import { jsx as jsx41 } from "react/jsx-runtime";
4857
+ import { jsx as jsx42 } from "react/jsx-runtime";
4669
4858
  function SidebarGroup({ asChild, className, ...props }) {
4670
4859
  const Comp = asChild ? SlotPrimitive11.Slot : "div";
4671
- return /* @__PURE__ */ jsx41(
4860
+ return /* @__PURE__ */ jsx42(
4672
4861
  Comp,
4673
4862
  {
4674
4863
  "data-slot": "sidebar-group",
@@ -4680,7 +4869,7 @@ function SidebarGroup({ asChild, className, ...props }) {
4680
4869
  }
4681
4870
  function SidebarGroupLabel({ asChild, className, ...props }) {
4682
4871
  const Comp = asChild ? SlotPrimitive11.Slot : "div";
4683
- return /* @__PURE__ */ jsx41(
4872
+ return /* @__PURE__ */ jsx42(
4684
4873
  Comp,
4685
4874
  {
4686
4875
  "data-slot": "sidebar-group-label",
@@ -4691,7 +4880,7 @@ function SidebarGroupLabel({ asChild, className, ...props }) {
4691
4880
  }
4692
4881
  function SidebarGroupAction({ asChild, className, ...props }) {
4693
4882
  const Comp = asChild ? SlotPrimitive11.Slot : "button";
4694
- return /* @__PURE__ */ jsx41(
4883
+ return /* @__PURE__ */ jsx42(
4695
4884
  Comp,
4696
4885
  {
4697
4886
  type: asChild ? void 0 : "button",
@@ -4703,7 +4892,7 @@ function SidebarGroupAction({ asChild, className, ...props }) {
4703
4892
  }
4704
4893
  function SidebarGroupContent({ asChild, className, ...props }) {
4705
4894
  const Comp = asChild ? SlotPrimitive11.Slot : "div";
4706
- return /* @__PURE__ */ jsx41(
4895
+ return /* @__PURE__ */ jsx42(
4707
4896
  Comp,
4708
4897
  {
4709
4898
  "data-slot": "sidebar-group-content",
@@ -4723,12 +4912,12 @@ function useDir() {
4723
4912
  }
4724
4913
 
4725
4914
  // src/components/Sidebar/SidebarMenu.tsx
4726
- import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
4915
+ import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
4727
4916
  function SidebarMenu({ className, ...props }) {
4728
- return /* @__PURE__ */ jsx42("ul", { "data-slot": "sidebar-menu", className: cn("ddga-sidebar__menu", className), ...props });
4917
+ return /* @__PURE__ */ jsx43("ul", { "data-slot": "sidebar-menu", className: cn("ddga-sidebar__menu", className), ...props });
4729
4918
  }
4730
4919
  function SidebarMenuItem({ className, ...props }) {
4731
- return /* @__PURE__ */ jsx42(
4920
+ return /* @__PURE__ */ jsx43(
4732
4921
  "li",
4733
4922
  {
4734
4923
  "data-slot": "sidebar-menu-item",
@@ -4758,7 +4947,7 @@ function SidebarMenuButton({
4758
4947
  const { state, isMobile } = useSidebar();
4759
4948
  const dir = useDir();
4760
4949
  const Comp = asChild ? SlotPrimitive12.Slot : "button";
4761
- const button = /* @__PURE__ */ jsx42(
4950
+ const button = /* @__PURE__ */ jsx43(
4762
4951
  Comp,
4763
4952
  {
4764
4953
  type: asChild ? void 0 : "button",
@@ -4773,14 +4962,14 @@ function SidebarMenuButton({
4773
4962
  if (!tooltip || state !== "collapsed" || isMobile) {
4774
4963
  return button;
4775
4964
  }
4776
- return /* @__PURE__ */ jsxs30(Tooltip, { children: [
4777
- /* @__PURE__ */ jsx42(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx42("span", { "data-slot": "tooltip-trigger", style: { display: "contents" }, children: button }) }),
4778
- /* @__PURE__ */ jsx42(TooltipContent, { side: dir === "rtl" ? "left" : "right", children: tooltip })
4965
+ return /* @__PURE__ */ jsxs32(Tooltip, { children: [
4966
+ /* @__PURE__ */ jsx43(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx43("span", { "data-slot": "tooltip-trigger", style: { display: "contents" }, children: button }) }),
4967
+ /* @__PURE__ */ jsx43(TooltipContent, { side: dir === "rtl" ? "left" : "right", children: tooltip })
4779
4968
  ] });
4780
4969
  }
4781
4970
  function SidebarMenuAction({ asChild, showOnHover, className, ...props }) {
4782
4971
  const Comp = asChild ? SlotPrimitive12.Slot : "button";
4783
- return /* @__PURE__ */ jsx42(
4972
+ return /* @__PURE__ */ jsx43(
4784
4973
  Comp,
4785
4974
  {
4786
4975
  type: asChild ? void 0 : "button",
@@ -4792,7 +4981,7 @@ function SidebarMenuAction({ asChild, showOnHover, className, ...props }) {
4792
4981
  );
4793
4982
  }
4794
4983
  function SidebarMenuBadge({ className, ...props }) {
4795
- return /* @__PURE__ */ jsx42(
4984
+ return /* @__PURE__ */ jsx43(
4796
4985
  "span",
4797
4986
  {
4798
4987
  "data-slot": "sidebar-menu-badge",
@@ -4802,21 +4991,21 @@ function SidebarMenuBadge({ className, ...props }) {
4802
4991
  );
4803
4992
  }
4804
4993
  function SidebarMenuSkeleton({ showIcon, className, ...props }) {
4805
- return /* @__PURE__ */ jsxs30(
4994
+ return /* @__PURE__ */ jsxs32(
4806
4995
  "div",
4807
4996
  {
4808
4997
  "data-slot": "sidebar-menu-skeleton",
4809
4998
  className: cn("ddga-sidebar__menu-skeleton", className),
4810
4999
  ...props,
4811
5000
  children: [
4812
- showIcon ? /* @__PURE__ */ jsx42(Skeleton, { shape: "circle", width: "1rem", height: "1rem" }) : null,
4813
- /* @__PURE__ */ jsx42(Skeleton, { shape: "text", className: "ddga-sidebar__menu-skeleton-text" })
5001
+ showIcon ? /* @__PURE__ */ jsx43(Skeleton, { shape: "circle", width: "1rem", height: "1rem" }) : null,
5002
+ /* @__PURE__ */ jsx43(Skeleton, { shape: "text", className: "ddga-sidebar__menu-skeleton-text" })
4814
5003
  ]
4815
5004
  }
4816
5005
  );
4817
5006
  }
4818
5007
  function SidebarMenuSub({ className, ...props }) {
4819
- return /* @__PURE__ */ jsx42(
5008
+ return /* @__PURE__ */ jsx43(
4820
5009
  "ul",
4821
5010
  {
4822
5011
  "data-slot": "sidebar-menu-sub",
@@ -4826,7 +5015,7 @@ function SidebarMenuSub({ className, ...props }) {
4826
5015
  );
4827
5016
  }
4828
5017
  function SidebarMenuSubItem({ className, ...props }) {
4829
- return /* @__PURE__ */ jsx42(
5018
+ return /* @__PURE__ */ jsx43(
4830
5019
  "li",
4831
5020
  {
4832
5021
  "data-slot": "sidebar-menu-sub-item",
@@ -4852,7 +5041,7 @@ function SidebarMenuSubButton({
4852
5041
  ...props
4853
5042
  }) {
4854
5043
  const Comp = asChild ? SlotPrimitive12.Slot : "a";
4855
- return /* @__PURE__ */ jsx42(
5044
+ return /* @__PURE__ */ jsx43(
4856
5045
  Comp,
4857
5046
  {
4858
5047
  "data-slot": "sidebar-menu-sub-button",
@@ -4868,7 +5057,7 @@ function SidebarMenuSubButton({
4868
5057
  // src/components/ScrollArea/ScrollArea.tsx
4869
5058
  import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
4870
5059
  import { cva as cva38 } from "class-variance-authority";
4871
- import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
5060
+ import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
4872
5061
  var scrollAreaVariants = cva38("ddga-scroll-area", {
4873
5062
  variants: {
4874
5063
  orientation: {
@@ -4905,7 +5094,7 @@ function ScrollArea({
4905
5094
  const showVertical = orientation === "vertical" || orientation === "both";
4906
5095
  const showHorizontal = orientation === "horizontal" || orientation === "both";
4907
5096
  const { className: viewportClassName, ...restViewportProps } = viewportProps ?? {};
4908
- return /* @__PURE__ */ jsxs31(
5097
+ return /* @__PURE__ */ jsxs33(
4909
5098
  ScrollAreaPrimitive.Root,
4910
5099
  {
4911
5100
  "data-slot": "scroll-area",
@@ -4914,7 +5103,7 @@ function ScrollArea({
4914
5103
  className: cn(scrollAreaVariants({ orientation }), className),
4915
5104
  ...props,
4916
5105
  children: [
4917
- /* @__PURE__ */ jsx43(
5106
+ /* @__PURE__ */ jsx44(
4918
5107
  ScrollAreaPrimitive.Viewport,
4919
5108
  {
4920
5109
  "data-slot": "scroll-area-viewport",
@@ -4928,35 +5117,35 @@ function ScrollArea({
4928
5117
  children
4929
5118
  }
4930
5119
  ),
4931
- showVertical ? /* @__PURE__ */ jsx43(
5120
+ showVertical ? /* @__PURE__ */ jsx44(
4932
5121
  ScrollAreaPrimitive.Scrollbar,
4933
5122
  {
4934
5123
  "data-slot": "scroll-area-scrollbar",
4935
5124
  orientation: "vertical",
4936
5125
  className: "ddga-scroll-area__scrollbar",
4937
- children: /* @__PURE__ */ jsx43(ScrollAreaPrimitive.Thumb, { className: "ddga-scroll-area__thumb" })
5126
+ children: /* @__PURE__ */ jsx44(ScrollAreaPrimitive.Thumb, { className: "ddga-scroll-area__thumb" })
4938
5127
  }
4939
5128
  ) : null,
4940
- showHorizontal ? /* @__PURE__ */ jsx43(
5129
+ showHorizontal ? /* @__PURE__ */ jsx44(
4941
5130
  ScrollAreaPrimitive.Scrollbar,
4942
5131
  {
4943
5132
  "data-slot": "scroll-area-scrollbar",
4944
5133
  orientation: "horizontal",
4945
5134
  className: "ddga-scroll-area__scrollbar",
4946
- children: /* @__PURE__ */ jsx43(ScrollAreaPrimitive.Thumb, { className: "ddga-scroll-area__thumb" })
5135
+ children: /* @__PURE__ */ jsx44(ScrollAreaPrimitive.Thumb, { className: "ddga-scroll-area__thumb" })
4947
5136
  }
4948
5137
  ) : null,
4949
- orientation === "both" ? /* @__PURE__ */ jsx43(ScrollAreaPrimitive.Corner, { className: "ddga-scroll-area__corner" }) : null
5138
+ orientation === "both" ? /* @__PURE__ */ jsx44(ScrollAreaPrimitive.Corner, { className: "ddga-scroll-area__corner" }) : null
4950
5139
  ]
4951
5140
  }
4952
5141
  );
4953
5142
  }
4954
5143
 
4955
5144
  // src/components/Menubar/Menubar.tsx
4956
- import { useContext as useContext11 } from "react";
5145
+ import { useContext as useContext12 } from "react";
4957
5146
  import { Menubar as MenubarPrimitive } from "radix-ui";
4958
5147
  import { cva as cva39 } from "class-variance-authority";
4959
- import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
5148
+ import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
4960
5149
  var menubarContentVariants = cva39("ddga-menubar-menu", {
4961
5150
  variants: {
4962
5151
  size: {
@@ -4980,7 +5169,7 @@ var menubarTriggerVariants = cva39("ddga-menubar__trigger", {
4980
5169
  }
4981
5170
  });
4982
5171
  function Menubar({ className, ...props }) {
4983
- return /* @__PURE__ */ jsx44(
5172
+ return /* @__PURE__ */ jsx45(
4984
5173
  MenubarPrimitive.Root,
4985
5174
  {
4986
5175
  "data-slot": "menubar",
@@ -4990,10 +5179,10 @@ function Menubar({ className, ...props }) {
4990
5179
  );
4991
5180
  }
4992
5181
  function MenubarMenu(props) {
4993
- return /* @__PURE__ */ jsx44(MenubarPrimitive.Menu, { ...props });
5182
+ return /* @__PURE__ */ jsx45(MenubarPrimitive.Menu, { ...props });
4994
5183
  }
4995
5184
  function MenubarTrigger({ variant, className, ...props }) {
4996
- return /* @__PURE__ */ jsx44(
5185
+ return /* @__PURE__ */ jsx45(
4997
5186
  MenubarPrimitive.Trigger,
4998
5187
  {
4999
5188
  "data-slot": "menubar-trigger",
@@ -5004,9 +5193,9 @@ function MenubarTrigger({ variant, className, ...props }) {
5004
5193
  );
5005
5194
  }
5006
5195
  function MenubarContent({ size, className, sideOffset = 6, ...props }) {
5007
- const ctx = useContext11(DgaContext);
5196
+ const ctx = useContext12(DgaContext);
5008
5197
  const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? void 0;
5009
- return /* @__PURE__ */ jsx44(MenubarPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx44(
5198
+ return /* @__PURE__ */ jsx45(MenubarPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx45(
5010
5199
  MenubarPrimitive.Content,
5011
5200
  {
5012
5201
  "data-slot": "menubar-content",
@@ -5024,7 +5213,7 @@ function MenubarItem({
5024
5213
  children,
5025
5214
  ...props
5026
5215
  }) {
5027
- return /* @__PURE__ */ jsxs32(
5216
+ return /* @__PURE__ */ jsxs34(
5028
5217
  MenubarPrimitive.Item,
5029
5218
  {
5030
5219
  "data-slot": "menubar-item",
@@ -5032,9 +5221,9 @@ function MenubarItem({
5032
5221
  className: cn("ddga-menubar-menu__item", className),
5033
5222
  ...props,
5034
5223
  children: [
5035
- startIcon ? /* @__PURE__ */ jsx44("span", { className: "ddga-menubar-menu__icon", "aria-hidden": "true", children: startIcon }) : null,
5036
- /* @__PURE__ */ jsx44("span", { className: "ddga-menubar-menu__label", children }),
5037
- shortcut ? /* @__PURE__ */ jsx44("span", { className: "ddga-menubar-menu__shortcut", "aria-hidden": "true", children: shortcut }) : null
5224
+ startIcon ? /* @__PURE__ */ jsx45("span", { className: "ddga-menubar-menu__icon", "aria-hidden": "true", children: startIcon }) : null,
5225
+ /* @__PURE__ */ jsx45("span", { className: "ddga-menubar-menu__label", children }),
5226
+ shortcut ? /* @__PURE__ */ jsx45("span", { className: "ddga-menubar-menu__shortcut", "aria-hidden": "true", children: shortcut }) : null
5038
5227
  ]
5039
5228
  }
5040
5229
  );
@@ -5048,7 +5237,7 @@ function MenubarCheckboxItem({
5048
5237
  const handleSelect = onSelect ?? ((event) => {
5049
5238
  event.preventDefault();
5050
5239
  });
5051
- return /* @__PURE__ */ jsxs32(
5240
+ return /* @__PURE__ */ jsxs34(
5052
5241
  MenubarPrimitive.CheckboxItem,
5053
5242
  {
5054
5243
  "data-slot": "menubar-checkbox-item",
@@ -5056,20 +5245,20 @@ function MenubarCheckboxItem({
5056
5245
  onSelect: handleSelect,
5057
5246
  ...props,
5058
5247
  children: [
5059
- /* @__PURE__ */ jsx44("span", { className: "ddga-menubar-menu__indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx44(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx44(Check, { className: "ddga-menubar-menu__indicator-icon" }) }) }),
5060
- /* @__PURE__ */ jsx44("span", { className: "ddga-menubar-menu__label", children })
5248
+ /* @__PURE__ */ jsx45("span", { className: "ddga-menubar-menu__indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx45(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx45(Check, { className: "ddga-menubar-menu__indicator-icon" }) }) }),
5249
+ /* @__PURE__ */ jsx45("span", { className: "ddga-menubar-menu__label", children })
5061
5250
  ]
5062
5251
  }
5063
5252
  );
5064
5253
  }
5065
5254
  function MenubarRadioGroup(props) {
5066
- return /* @__PURE__ */ jsx44(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
5255
+ return /* @__PURE__ */ jsx45(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
5067
5256
  }
5068
5257
  function MenubarRadioItem({ className, children, onSelect, ...props }) {
5069
5258
  const handleSelect = onSelect ?? ((event) => {
5070
5259
  event.preventDefault();
5071
5260
  });
5072
- return /* @__PURE__ */ jsxs32(
5261
+ return /* @__PURE__ */ jsxs34(
5073
5262
  MenubarPrimitive.RadioItem,
5074
5263
  {
5075
5264
  "data-slot": "menubar-radio-item",
@@ -5077,14 +5266,14 @@ function MenubarRadioItem({ className, children, onSelect, ...props }) {
5077
5266
  onSelect: handleSelect,
5078
5267
  ...props,
5079
5268
  children: [
5080
- /* @__PURE__ */ jsx44("span", { className: "ddga-menubar-menu__indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx44(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx44("span", { className: "ddga-menubar-menu__radio-dot" }) }) }),
5081
- /* @__PURE__ */ jsx44("span", { className: "ddga-menubar-menu__label", children })
5269
+ /* @__PURE__ */ jsx45("span", { className: "ddga-menubar-menu__indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx45(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx45("span", { className: "ddga-menubar-menu__radio-dot" }) }) }),
5270
+ /* @__PURE__ */ jsx45("span", { className: "ddga-menubar-menu__label", children })
5082
5271
  ]
5083
5272
  }
5084
5273
  );
5085
5274
  }
5086
5275
  function MenubarLabel({ className, ...props }) {
5087
- return /* @__PURE__ */ jsx44(
5276
+ return /* @__PURE__ */ jsx45(
5088
5277
  MenubarPrimitive.Label,
5089
5278
  {
5090
5279
  "data-slot": "menubar-label",
@@ -5094,7 +5283,7 @@ function MenubarLabel({ className, ...props }) {
5094
5283
  );
5095
5284
  }
5096
5285
  function MenubarSeparator({ className, ...props }) {
5097
- return /* @__PURE__ */ jsx44(
5286
+ return /* @__PURE__ */ jsx45(
5098
5287
  MenubarPrimitive.Separator,
5099
5288
  {
5100
5289
  "data-slot": "menubar-separator",
@@ -5104,30 +5293,30 @@ function MenubarSeparator({ className, ...props }) {
5104
5293
  );
5105
5294
  }
5106
5295
  function MenubarGroup(props) {
5107
- return /* @__PURE__ */ jsx44(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
5296
+ return /* @__PURE__ */ jsx45(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
5108
5297
  }
5109
5298
  function MenubarSub(props) {
5110
- return /* @__PURE__ */ jsx44(MenubarPrimitive.Sub, { ...props });
5299
+ return /* @__PURE__ */ jsx45(MenubarPrimitive.Sub, { ...props });
5111
5300
  }
5112
5301
  function MenubarSubTrigger({ className, startIcon, children, ...props }) {
5113
- return /* @__PURE__ */ jsxs32(
5302
+ return /* @__PURE__ */ jsxs34(
5114
5303
  MenubarPrimitive.SubTrigger,
5115
5304
  {
5116
5305
  "data-slot": "menubar-sub-trigger",
5117
5306
  className: cn("ddga-menubar-menu__item", "ddga-menubar-menu__item--sub", className),
5118
5307
  ...props,
5119
5308
  children: [
5120
- startIcon ? /* @__PURE__ */ jsx44("span", { className: "ddga-menubar-menu__icon", "aria-hidden": "true", children: startIcon }) : null,
5121
- /* @__PURE__ */ jsx44("span", { className: "ddga-menubar-menu__label", children }),
5122
- /* @__PURE__ */ jsx44(ChevronRight, { className: "ddga-menubar-menu__sub-chevron", "aria-hidden": "true" })
5309
+ startIcon ? /* @__PURE__ */ jsx45("span", { className: "ddga-menubar-menu__icon", "aria-hidden": "true", children: startIcon }) : null,
5310
+ /* @__PURE__ */ jsx45("span", { className: "ddga-menubar-menu__label", children }),
5311
+ /* @__PURE__ */ jsx45(ChevronRight, { className: "ddga-menubar-menu__sub-chevron", "aria-hidden": "true" })
5123
5312
  ]
5124
5313
  }
5125
5314
  );
5126
5315
  }
5127
5316
  function MenubarSubContent({ size, className, ...props }) {
5128
- const ctx = useContext11(DgaContext);
5317
+ const ctx = useContext12(DgaContext);
5129
5318
  const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? void 0;
5130
- return /* @__PURE__ */ jsx44(MenubarPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx44(
5319
+ return /* @__PURE__ */ jsx45(MenubarPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx45(
5131
5320
  MenubarPrimitive.SubContent,
5132
5321
  {
5133
5322
  "data-slot": "menubar-sub-content",
@@ -5139,7 +5328,7 @@ function MenubarSubContent({ size, className, ...props }) {
5139
5328
 
5140
5329
  // src/components/Timeline/Timeline.tsx
5141
5330
  import { cva as cva40 } from "class-variance-authority";
5142
- import { jsx as jsx45 } from "react/jsx-runtime";
5331
+ import { jsx as jsx46 } from "react/jsx-runtime";
5143
5332
  var timelineVariants = cva40("ddga-timeline", {
5144
5333
  variants: {
5145
5334
  size: {
@@ -5171,7 +5360,7 @@ var timelineMarkerVariants = cva40("ddga-timeline__marker", {
5171
5360
  }
5172
5361
  });
5173
5362
  function Timeline({ size, orientation, className, ...props }) {
5174
- return /* @__PURE__ */ jsx45(
5363
+ return /* @__PURE__ */ jsx46(
5175
5364
  "ol",
5176
5365
  {
5177
5366
  "data-slot": "timeline",
@@ -5182,12 +5371,12 @@ function Timeline({ size, orientation, className, ...props }) {
5182
5371
  );
5183
5372
  }
5184
5373
  function TimelineItem({ className, ...props }) {
5185
- return /* @__PURE__ */ jsx45("li", { "data-slot": "timeline-item", className: cn("ddga-timeline__item", className), ...props });
5374
+ return /* @__PURE__ */ jsx46("li", { "data-slot": "timeline-item", className: cn("ddga-timeline__item", className), ...props });
5186
5375
  }
5187
5376
  function TimelineMarker({ status, className, children, ...props }) {
5188
5377
  const resolved = status ?? "default";
5189
5378
  const reached = resolved !== "default";
5190
- return /* @__PURE__ */ jsx45(
5379
+ return /* @__PURE__ */ jsx46(
5191
5380
  "span",
5192
5381
  {
5193
5382
  "aria-hidden": "true",
@@ -5196,12 +5385,12 @@ function TimelineMarker({ status, className, children, ...props }) {
5196
5385
  "data-reached": reached ? "" : void 0,
5197
5386
  className: cn(timelineMarkerVariants({ status }), className),
5198
5387
  ...props,
5199
- children: children ?? /* @__PURE__ */ jsx45("span", { className: "ddga-timeline__dot" })
5388
+ children: children ?? /* @__PURE__ */ jsx46("span", { className: "ddga-timeline__dot" })
5200
5389
  }
5201
5390
  );
5202
5391
  }
5203
5392
  function TimelineContent({ className, ...props }) {
5204
- return /* @__PURE__ */ jsx45(
5393
+ return /* @__PURE__ */ jsx46(
5205
5394
  "div",
5206
5395
  {
5207
5396
  "data-slot": "timeline-content",
@@ -5211,10 +5400,10 @@ function TimelineContent({ className, ...props }) {
5211
5400
  );
5212
5401
  }
5213
5402
  function TimelineTitle({ className, ...props }) {
5214
- return /* @__PURE__ */ jsx45("span", { "data-slot": "timeline-title", className: cn("ddga-timeline__title", className), ...props });
5403
+ return /* @__PURE__ */ jsx46("span", { "data-slot": "timeline-title", className: cn("ddga-timeline__title", className), ...props });
5215
5404
  }
5216
5405
  function TimelineDescription({ className, ...props }) {
5217
- return /* @__PURE__ */ jsx45(
5406
+ return /* @__PURE__ */ jsx46(
5218
5407
  "span",
5219
5408
  {
5220
5409
  "data-slot": "timeline-description",
@@ -5224,47 +5413,1422 @@ function TimelineDescription({ className, ...props }) {
5224
5413
  );
5225
5414
  }
5226
5415
  function TimelineTime({ className, ...props }) {
5227
- return /* @__PURE__ */ jsx45("time", { "data-slot": "timeline-time", className: cn("ddga-timeline__time", className), ...props });
5416
+ return /* @__PURE__ */ jsx46("time", { "data-slot": "timeline-time", className: cn("ddga-timeline__time", className), ...props });
5228
5417
  }
5229
5418
 
5230
- // src/providers/DgaProvider.tsx
5231
- import { useState as useState10, useMemo as useMemo4, useContext as useContext12, useEffect as useEffect3, useRef as useRef3 } from "react";
5232
- import { Direction as DirectionPrimitive, Tooltip as TooltipPrimitive2 } from "radix-ui";
5233
- import { buildTheme } from "@dev-dga/tokens";
5234
- import { jsx as jsx46 } from "react/jsx-runtime";
5235
- function DgaProvider({
5236
- dir = "ltr",
5237
- locale,
5238
- mode = "light",
5239
- theme,
5240
- as: Component = "div",
5419
+ // src/components/Command/Command.tsx
5420
+ import { useCallback as useCallback4, useContext as useContext13, useEffect as useEffect3, useRef as useRef3, useState as useState10 } from "react";
5421
+ import { Command as CommandPrimitive } from "cmdk";
5422
+ import { Dialog as DialogPrimitive3, VisuallyHidden } from "radix-ui";
5423
+ import { cva as cva41 } from "class-variance-authority";
5424
+ import { jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
5425
+ var commandVariants = cva41("ddga-command");
5426
+ function Command2({ className, ...props }) {
5427
+ return /* @__PURE__ */ jsx47(CommandPrimitive, { "data-slot": "command", className: cn(commandVariants(), className), ...props });
5428
+ }
5429
+ function CommandInput({
5241
5430
  className,
5242
- style: consumerStyle,
5431
+ placeholder,
5432
+ "aria-label": ariaLabel,
5433
+ ...props
5434
+ }) {
5435
+ return /* @__PURE__ */ jsxs35("div", { className: "ddga-command__input-wrapper", "data-slot": "command-input-wrapper", children: [
5436
+ /* @__PURE__ */ jsx47(Search, { className: "ddga-command__search-icon", "aria-hidden": "true" }),
5437
+ /* @__PURE__ */ jsx47(
5438
+ CommandPrimitive.Input,
5439
+ {
5440
+ "data-slot": "command-input",
5441
+ className: cn("ddga-command__input", className),
5442
+ placeholder,
5443
+ "aria-label": ariaLabel ?? (typeof placeholder === "string" ? placeholder : void 0),
5444
+ ...props
5445
+ }
5446
+ )
5447
+ ] });
5448
+ }
5449
+ function CommandList({ className, ...props }) {
5450
+ return /* @__PURE__ */ jsx47(
5451
+ CommandPrimitive.List,
5452
+ {
5453
+ "data-slot": "command-list",
5454
+ className: cn("ddga-command__list", className),
5455
+ ...props
5456
+ }
5457
+ );
5458
+ }
5459
+ function CommandEmpty({ className, ...props }) {
5460
+ return /* @__PURE__ */ jsx47(
5461
+ CommandPrimitive.Empty,
5462
+ {
5463
+ "data-slot": "command-empty",
5464
+ className: cn("ddga-command__empty", className),
5465
+ ...props
5466
+ }
5467
+ );
5468
+ }
5469
+ function CommandGroup({ className, ...props }) {
5470
+ return /* @__PURE__ */ jsx47(
5471
+ CommandPrimitive.Group,
5472
+ {
5473
+ "data-slot": "command-group",
5474
+ className: cn("ddga-command__group", className),
5475
+ ...props
5476
+ }
5477
+ );
5478
+ }
5479
+ function CommandSeparator({
5480
+ className,
5481
+ "aria-hidden": ariaHidden = true,
5482
+ ...props
5483
+ }) {
5484
+ return /* @__PURE__ */ jsx47(
5485
+ CommandPrimitive.Separator,
5486
+ {
5487
+ "aria-hidden": ariaHidden,
5488
+ "data-slot": "command-separator",
5489
+ className: cn("ddga-command__separator", className),
5490
+ ...props
5491
+ }
5492
+ );
5493
+ }
5494
+ function CommandItem({
5495
+ startIcon,
5496
+ shortcut,
5497
+ className,
5498
+ children,
5499
+ keywords,
5500
+ ...props
5501
+ }) {
5502
+ const labelText = typeof children === "string" ? children : void 0;
5503
+ const mergedKeywords = labelText && !keywords?.includes(labelText) ? [...keywords ?? [], labelText] : keywords;
5504
+ return /* @__PURE__ */ jsxs35(
5505
+ CommandPrimitive.Item,
5506
+ {
5507
+ "data-slot": "command-item",
5508
+ className: cn("ddga-command__item", className),
5509
+ keywords: mergedKeywords,
5510
+ ...props,
5511
+ children: [
5512
+ startIcon != null && /* @__PURE__ */ jsx47("span", { className: "ddga-command__item-icon", "aria-hidden": "true", children: startIcon }),
5513
+ /* @__PURE__ */ jsx47("span", { className: "ddga-command__item-label", children }),
5514
+ shortcut != null && /* @__PURE__ */ jsx47("span", { className: "ddga-command__item-shortcut", children: shortcut })
5515
+ ]
5516
+ }
5517
+ );
5518
+ }
5519
+ function CommandDialog({
5520
+ open: controlledOpen,
5521
+ defaultOpen,
5522
+ onOpenChange,
5523
+ shortcut = "k",
5524
+ label = "Command palette",
5525
+ description,
5526
+ className,
5527
+ filter,
5528
+ shouldFilter,
5529
+ loop,
5243
5530
  children
5244
5531
  }) {
5245
- const parentCtx = useContext12(DgaContext);
5246
- const isNested = parentCtx !== null;
5247
- const [rootEl, setRootEl] = useState10(null);
5248
- const portalRef = useRef3(null);
5249
- const [portalEl, setPortalEl] = useState10(null);
5250
- const resolvedLocale = locale ?? (dir === "rtl" ? "ar" : "en");
5251
- const themeVars = useMemo4(() => theme ? buildTheme(theme) : null, [theme]);
5532
+ const [internalOpen, setInternalOpen] = useState10(defaultOpen ?? false);
5533
+ const isControlled = controlledOpen !== void 0;
5534
+ const open = isControlled ? controlledOpen : internalOpen;
5535
+ const setOpen = useCallback4(
5536
+ (next) => {
5537
+ if (!isControlled) setInternalOpen(next);
5538
+ onOpenChange?.(next);
5539
+ },
5540
+ [isControlled, onOpenChange]
5541
+ );
5542
+ const openRef = useRef3(open);
5252
5543
  useEffect3(() => {
5253
- if (typeof document === "undefined") return;
5254
- const el = document.createElement("div");
5255
- el.setAttribute("data-slot", "dga-portal");
5256
- el.style.position = "relative";
5257
- el.style.zIndex = "50";
5258
- document.body.appendChild(el);
5259
- portalRef.current = el;
5260
- setPortalEl(el);
5261
- return () => {
5262
- el.remove();
5263
- portalRef.current = null;
5264
- setPortalEl(null);
5265
- };
5266
- }, []);
5544
+ openRef.current = open;
5545
+ });
5267
5546
  useEffect3(() => {
5547
+ if (typeof shortcut !== "string") return;
5548
+ const key = shortcut.toLowerCase();
5549
+ const onKeyDown = (event) => {
5550
+ if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === key) {
5551
+ event.preventDefault();
5552
+ setOpen(!openRef.current);
5553
+ }
5554
+ };
5555
+ document.addEventListener("keydown", onKeyDown);
5556
+ return () => document.removeEventListener("keydown", onKeyDown);
5557
+ }, [shortcut, setOpen]);
5558
+ const ctx = useContext13(DgaContext);
5559
+ const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? void 0;
5560
+ return /* @__PURE__ */ jsx47(DialogPrimitive3.Root, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs35(DialogPrimitive3.Portal, { container: portalContainer, children: [
5561
+ /* @__PURE__ */ jsx47(DialogPrimitive3.Overlay, { className: "ddga-command__overlay", "data-slot": "command-overlay" }),
5562
+ /* @__PURE__ */ jsxs35(
5563
+ DialogPrimitive3.Content,
5564
+ {
5565
+ "data-slot": "command-dialog",
5566
+ className: cn("ddga-command-dialog", className),
5567
+ ...description == null ? { "aria-describedby": void 0 } : {},
5568
+ children: [
5569
+ /* @__PURE__ */ jsx47(DialogPrimitive3.Title, { asChild: true, children: /* @__PURE__ */ jsx47(VisuallyHidden.Root, { children: label }) }),
5570
+ description != null && /* @__PURE__ */ jsx47(DialogPrimitive3.Description, { asChild: true, children: /* @__PURE__ */ jsx47(VisuallyHidden.Root, { children: description }) }),
5571
+ /* @__PURE__ */ jsx47(
5572
+ Command2,
5573
+ {
5574
+ "data-slot": "command-dialog-command",
5575
+ className: "ddga-command--dialog",
5576
+ label: typeof label === "string" ? label : "Command palette",
5577
+ filter,
5578
+ shouldFilter,
5579
+ loop,
5580
+ children
5581
+ }
5582
+ )
5583
+ ]
5584
+ }
5585
+ )
5586
+ ] }) });
5587
+ }
5588
+
5589
+ // src/components/Table/Table.tsx
5590
+ import { cva as cva42 } from "class-variance-authority";
5591
+ import { Fragment as Fragment6, jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
5592
+ var tableVariants = cva42("ddga-table", {
5593
+ variants: {
5594
+ size: {
5595
+ sm: "ddga-table--sm",
5596
+ md: "ddga-table--md",
5597
+ lg: "ddga-table--lg"
5598
+ },
5599
+ striped: { true: "ddga-table--striped" },
5600
+ divided: { true: "ddga-table--divided" },
5601
+ bordered: { true: "ddga-table--bordered" },
5602
+ stickyHeader: { true: "ddga-table--sticky" }
5603
+ },
5604
+ defaultVariants: {
5605
+ size: "md"
5606
+ }
5607
+ });
5608
+ function Table({
5609
+ size,
5610
+ striped,
5611
+ divided,
5612
+ bordered,
5613
+ stickyHeader,
5614
+ className,
5615
+ maxHeight,
5616
+ "aria-label": ariaLabel,
5617
+ "aria-labelledby": ariaLabelledby,
5618
+ ...props
5619
+ }) {
5620
+ const named = Boolean(ariaLabel || ariaLabelledby);
5621
+ if (process.env.NODE_ENV !== "production" && !named) {
5622
+ console.warn(
5623
+ "[ddga] <Table> wraps its table in a horizontally scrollable container. Pass `aria-label` (or `aria-labelledby`) so keyboard and screen-reader users can identify and scroll it. Without a name it degrades to a plain scroll container with no landmark."
5624
+ );
5625
+ }
5626
+ if (process.env.NODE_ENV !== "production" && ariaLabel && ariaLabelledby) {
5627
+ console.warn(
5628
+ "[ddga] <Table> received both `aria-label` and `aria-labelledby`. `aria-labelledby` takes precedence; `aria-label` will be ignored by assistive technology."
5629
+ );
5630
+ }
5631
+ return /* @__PURE__ */ jsx48(
5632
+ "div",
5633
+ {
5634
+ "data-slot": "table-region",
5635
+ className: "ddga-table__region",
5636
+ style: maxHeight != null ? { maxBlockSize: maxHeight, overflowY: "auto" } : void 0,
5637
+ ...named ? {
5638
+ role: "region",
5639
+ tabIndex: 0,
5640
+ "aria-label": ariaLabel,
5641
+ "aria-labelledby": ariaLabelledby
5642
+ } : {},
5643
+ children: /* @__PURE__ */ jsx48(
5644
+ "table",
5645
+ {
5646
+ "data-slot": "table",
5647
+ className: cn(tableVariants({ size, striped, divided, bordered, stickyHeader }), className),
5648
+ ...props
5649
+ }
5650
+ )
5651
+ }
5652
+ );
5653
+ }
5654
+ function TableHeader({ className, ...props }) {
5655
+ return /* @__PURE__ */ jsx48("thead", { "data-slot": "table-header", className: cn("ddga-table__header", className), ...props });
5656
+ }
5657
+ function TableBody({ className, ...props }) {
5658
+ return /* @__PURE__ */ jsx48("tbody", { "data-slot": "table-body", className: cn("ddga-table__body", className), ...props });
5659
+ }
5660
+ function TableFooter({ className, ...props }) {
5661
+ return /* @__PURE__ */ jsx48("tfoot", { "data-slot": "table-footer", className: cn("ddga-table__footer", className), ...props });
5662
+ }
5663
+ function TableRow({ className, selected, ...props }) {
5664
+ return /* @__PURE__ */ jsx48(
5665
+ "tr",
5666
+ {
5667
+ "data-slot": "table-row",
5668
+ "data-state": selected ? "selected" : void 0,
5669
+ className: cn("ddga-table__row", className),
5670
+ ...props
5671
+ }
5672
+ );
5673
+ }
5674
+ function TableHead({
5675
+ className,
5676
+ align,
5677
+ sortable,
5678
+ sortDirection = false,
5679
+ sortLabel,
5680
+ onClick,
5681
+ children,
5682
+ ...props
5683
+ }) {
5684
+ const headClass = cn("ddga-table__head", align && `ddga-table__head--align-${align}`, className);
5685
+ if (process.env.NODE_ENV !== "production" && sortable && !sortLabel) {
5686
+ console.warn(
5687
+ '[ddga] <TableHead sortable> has no `sortLabel`. `aria-sort` conveys the sort state, but pass a localized cue (e.g. "activate to sort") so a focused sort button announces its action to screen-reader users.'
5688
+ );
5689
+ }
5690
+ if (!sortable) {
5691
+ return /* @__PURE__ */ jsx48("th", { scope: "col", "data-slot": "table-head", className: headClass, ...props, children });
5692
+ }
5693
+ const ariaSort = sortDirection === "asc" ? "ascending" : sortDirection === "desc" ? "descending" : "none";
5694
+ return /* @__PURE__ */ jsx48("th", { scope: "col", "data-slot": "table-head", "aria-sort": ariaSort, className: headClass, ...props, children: /* @__PURE__ */ jsxs36(
5695
+ "button",
5696
+ {
5697
+ type: "button",
5698
+ "data-slot": "table-sort-button",
5699
+ className: "ddga-table__sort-button",
5700
+ onClick,
5701
+ children: [
5702
+ children,
5703
+ sortLabel ? /* @__PURE__ */ jsx48("span", { className: "ddga-sr-only", children: sortLabel }) : null,
5704
+ /* @__PURE__ */ jsx48("span", { className: "ddga-table__sort-icon", "data-slot": "table-sort-icon", "aria-hidden": "true", children: sortDirection === "asc" ? /* @__PURE__ */ jsx48(CaretUp, {}) : sortDirection === "desc" ? /* @__PURE__ */ jsx48(CaretDown, {}) : (
5705
+ // Neutral affordance: stacked carets, dimmed via CSS.
5706
+ /* @__PURE__ */ jsxs36(Fragment6, { children: [
5707
+ /* @__PURE__ */ jsx48(CaretUp, {}),
5708
+ /* @__PURE__ */ jsx48(CaretDown, {})
5709
+ ] })
5710
+ ) })
5711
+ ]
5712
+ }
5713
+ ) });
5714
+ }
5715
+ function TableCell({ className, align, ...props }) {
5716
+ return /* @__PURE__ */ jsx48(
5717
+ "td",
5718
+ {
5719
+ "data-slot": "table-cell",
5720
+ className: cn("ddga-table__cell", align && `ddga-table__cell--align-${align}`, className),
5721
+ ...props
5722
+ }
5723
+ );
5724
+ }
5725
+ function TableCaption({ className, ...props }) {
5726
+ return /* @__PURE__ */ jsx48(
5727
+ "caption",
5728
+ {
5729
+ "data-slot": "table-caption",
5730
+ className: cn("ddga-table__caption", className),
5731
+ ...props
5732
+ }
5733
+ );
5734
+ }
5735
+
5736
+ // src/components/InputOTP/InputOTP.tsx
5737
+ import { useMemo as useMemo5, useRef as useRef4, useState as useState11, Fragment as Fragment7 } from "react";
5738
+ import { cva as cva43 } from "class-variance-authority";
5739
+ import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
5740
+ var DEFAULT_PATTERN = "^[0-9]*$";
5741
+ var inputOTPVariants = cva43("ddga-input-otp", {
5742
+ variants: {
5743
+ size: {
5744
+ sm: "ddga-input-otp--sm",
5745
+ md: "ddga-input-otp--md",
5746
+ lg: "ddga-input-otp--lg"
5747
+ },
5748
+ error: {
5749
+ true: "ddga-input-otp--error"
5750
+ }
5751
+ },
5752
+ defaultVariants: {
5753
+ size: "md"
5754
+ }
5755
+ });
5756
+ function resolveGroups(length, groupSizes) {
5757
+ if (!groupSizes || groupSizes.length === 0) return [length];
5758
+ const sum = groupSizes.reduce((total, n) => total + n, 0);
5759
+ if (sum !== length) {
5760
+ if (process.env.NODE_ENV === "development") {
5761
+ console.warn(
5762
+ `[@dev-dga/react] InputOTP: groupSizes must sum to length (${length}); got ${sum}. Falling back to a single group.`
5763
+ );
5764
+ }
5765
+ return [length];
5766
+ }
5767
+ return groupSizes;
5768
+ }
5769
+ function Slot({
5770
+ char,
5771
+ active,
5772
+ caret,
5773
+ mask
5774
+ }) {
5775
+ return /* @__PURE__ */ jsxs37(
5776
+ "div",
5777
+ {
5778
+ "data-slot": "input-otp-slot",
5779
+ "data-active": active || void 0,
5780
+ "data-filled": char != null || void 0,
5781
+ className: "ddga-input-otp__slot",
5782
+ children: [
5783
+ char != null ? mask ? "\u2022" : char : null,
5784
+ caret && /* @__PURE__ */ jsx49("div", { "aria-hidden": "true", "data-slot": "input-otp-caret", className: "ddga-input-otp__caret" })
5785
+ ]
5786
+ }
5787
+ );
5788
+ }
5789
+ function InputOTP({
5790
+ id: externalId,
5791
+ length = 6,
5792
+ groupSizes,
5793
+ value,
5794
+ defaultValue,
5795
+ onChange,
5796
+ onComplete,
5797
+ pattern = DEFAULT_PATTERN,
5798
+ mask = false,
5799
+ separator,
5800
+ size,
5801
+ disabled,
5802
+ autoFocus,
5803
+ name,
5804
+ required,
5805
+ label,
5806
+ helperText,
5807
+ errorMessage,
5808
+ error,
5809
+ className,
5810
+ "aria-label": ariaLabel,
5811
+ "aria-labelledby": ariaLabelledby,
5812
+ ...props
5813
+ }) {
5814
+ const inputRef = useRef4(null);
5815
+ const [focused, setFocused] = useState11(false);
5816
+ const isControlled = value !== void 0;
5817
+ const [internal, setInternal] = useState11(defaultValue ?? "");
5818
+ const current = isControlled ? value : internal;
5819
+ const compiledPattern = useMemo5(() => {
5820
+ try {
5821
+ return new RegExp(pattern);
5822
+ } catch {
5823
+ if (process.env.NODE_ENV === "development") {
5824
+ console.warn(
5825
+ `[@dev-dga/react] InputOTP: invalid \`pattern\` regex "${pattern}". Falling back to digits-only.`
5826
+ );
5827
+ }
5828
+ return new RegExp(DEFAULT_PATTERN);
5829
+ }
5830
+ }, [pattern]);
5831
+ const completedRef = useRef4(null);
5832
+ const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
5833
+ name: "InputOTP",
5834
+ id: externalId,
5835
+ label,
5836
+ error,
5837
+ errorMessage,
5838
+ helperText,
5839
+ "aria-label": ariaLabel,
5840
+ "aria-labelledby": ariaLabelledby
5841
+ });
5842
+ function handleChange(event) {
5843
+ const next = event.target.value.replace(/[\s-]/g, "").slice(0, length);
5844
+ if (!compiledPattern.test(next)) return;
5845
+ if (!isControlled) setInternal(next);
5846
+ onChange?.(next);
5847
+ if (next.length === length) {
5848
+ if (completedRef.current !== next) {
5849
+ completedRef.current = next;
5850
+ onComplete?.(next);
5851
+ }
5852
+ } else {
5853
+ completedRef.current = null;
5854
+ }
5855
+ }
5856
+ function moveCaretToEnd() {
5857
+ const el = inputRef.current;
5858
+ if (el) el.setSelectionRange(el.value.length, el.value.length);
5859
+ }
5860
+ const groups = resolveGroups(length, groupSizes);
5861
+ const lastGroup = groups.length - 1;
5862
+ const activeIndex = focused ? Math.min(current.length, length - 1) : -1;
5863
+ const inputMode = pattern === DEFAULT_PATTERN ? "numeric" : "text";
5864
+ return /* @__PURE__ */ jsxs37("div", { "data-slot": "input-otp-field", className: "ddga-field", ...props, children: [
5865
+ label && /* @__PURE__ */ jsxs37("label", { htmlFor: fieldId, className: "ddga-input-otp__label", children: [
5866
+ label,
5867
+ required && /* @__PURE__ */ jsx49("span", { "aria-hidden": "true", className: "ddga-input-otp__required", children: "*" })
5868
+ ] }),
5869
+ /* @__PURE__ */ jsxs37(
5870
+ "div",
5871
+ {
5872
+ className: cn(inputOTPVariants({ size, error: hasError }), className),
5873
+ "data-slot": "input-otp",
5874
+ children: [
5875
+ /* @__PURE__ */ jsx49(
5876
+ "input",
5877
+ {
5878
+ ...controlProps,
5879
+ ref: inputRef,
5880
+ type: "text",
5881
+ inputMode,
5882
+ autoComplete: "one-time-code",
5883
+ value: current,
5884
+ maxLength: length,
5885
+ disabled,
5886
+ autoFocus,
5887
+ name,
5888
+ required,
5889
+ "aria-label": ariaLabel,
5890
+ "aria-labelledby": ariaLabelledby,
5891
+ onChange: handleChange,
5892
+ onFocus: () => {
5893
+ setFocused(true);
5894
+ moveCaretToEnd();
5895
+ },
5896
+ onBlur: () => setFocused(false),
5897
+ onPointerUp: moveCaretToEnd,
5898
+ className: "ddga-input-otp__input",
5899
+ "data-slot": "input-otp-input"
5900
+ }
5901
+ ),
5902
+ /* @__PURE__ */ jsx49("div", { dir: "ltr", "aria-hidden": "true", "data-slot": "input-otp-row", className: "ddga-input-otp__row", children: groups.map((count, groupIndex) => {
5903
+ const start = groups.slice(0, groupIndex).reduce((total, n) => total + n, 0);
5904
+ return /* @__PURE__ */ jsxs37(Fragment7, { children: [
5905
+ /* @__PURE__ */ jsx49("div", { "data-slot": "input-otp-group", className: "ddga-input-otp__group", children: Array.from({ length: count }, (_, offset) => {
5906
+ const index = start + offset;
5907
+ return /* @__PURE__ */ jsx49(
5908
+ Slot,
5909
+ {
5910
+ char: current[index],
5911
+ active: index === activeIndex,
5912
+ caret: index === activeIndex && current.length < length,
5913
+ mask
5914
+ },
5915
+ index
5916
+ );
5917
+ }) }),
5918
+ groupIndex < lastGroup && /* @__PURE__ */ jsx49(
5919
+ "span",
5920
+ {
5921
+ "aria-hidden": "true",
5922
+ "data-slot": "input-otp-separator",
5923
+ className: "ddga-input-otp__separator",
5924
+ children: separator ?? /* @__PURE__ */ jsx49("span", { className: "ddga-input-otp__separator-dash" })
5925
+ }
5926
+ )
5927
+ ] }, groupIndex);
5928
+ }) })
5929
+ ]
5930
+ }
5931
+ ),
5932
+ hasErrorMessage && /* @__PURE__ */ jsx49(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
5933
+ hasHelper && /* @__PURE__ */ jsx49(FieldMessage, { id: helperId, variant: "helper", children: helperText })
5934
+ ] });
5935
+ }
5936
+
5937
+ // src/components/Link/Link.tsx
5938
+ import "react";
5939
+ import { Slot as SlotPrimitive13 } from "radix-ui";
5940
+ import { cva as cva44 } from "class-variance-authority";
5941
+ import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
5942
+ var linkVariants = cva44("ddga-link", {
5943
+ variants: {
5944
+ variant: {
5945
+ // Inline links in running prose. Underlined always — color alone fails
5946
+ // WCAG 1.4.1 when a link sits inside a block of text.
5947
+ default: "ddga-link--default",
5948
+ // Links in UI chrome (footers, meta rows) where context makes them
5949
+ // obviously links: no underline until hover.
5950
+ subtle: "ddga-link--subtle",
5951
+ // Block-level CTAs ("Learn more →"): inline-flex with gapped icons,
5952
+ // no underline. Not for mid-sentence use.
5953
+ standalone: "ddga-link--standalone"
5954
+ }
5955
+ },
5956
+ defaultVariants: {
5957
+ variant: "default"
5958
+ }
5959
+ });
5960
+ function Link({
5961
+ variant,
5962
+ external,
5963
+ startIcon,
5964
+ endIcon,
5965
+ iconFlip,
5966
+ asChild,
5967
+ className,
5968
+ children,
5969
+ rel,
5970
+ ...props
5971
+ }) {
5972
+ if (process.env.NODE_ENV === "development" && !asChild && props.href == null) {
5973
+ console.warn(
5974
+ '[@dev-dga/react] Link rendered without an `href`. A link needs an href to be focusable and exposed as a link to assistive tech. Provide `href`, use `asChild` to render your own element (e.g. a router Link), or use `Button variant="ghost"` for an action that is not navigation.'
5975
+ );
5976
+ }
5977
+ const Comp = asChild ? SlotPrimitive13.Slot : "a";
5978
+ const relValue = external ? Array.from(
5979
+ /* @__PURE__ */ new Set([...rel ? rel.split(/\s+/).filter(Boolean) : [], "noopener", "noreferrer"])
5980
+ ).join(" ") : rel;
5981
+ const showExternalIcon = external && !endIcon;
5982
+ return /* @__PURE__ */ jsxs38(
5983
+ Comp,
5984
+ {
5985
+ "data-slot": "link",
5986
+ className: cn(linkVariants({ variant }), className),
5987
+ rel: relValue,
5988
+ ...props,
5989
+ children: [
5990
+ startIcon && /* @__PURE__ */ jsx50(
5991
+ "span",
5992
+ {
5993
+ className: cn("ddga-link__icon", iconFlip && "ddga-icon-flip"),
5994
+ "data-slot": "link-start-icon",
5995
+ "aria-hidden": "true",
5996
+ children: startIcon
5997
+ }
5998
+ ),
5999
+ asChild ? /* @__PURE__ */ jsx50(SlotPrimitive13.Slottable, { children }) : children,
6000
+ endIcon && /* @__PURE__ */ jsx50(
6001
+ "span",
6002
+ {
6003
+ className: cn("ddga-link__icon", iconFlip && "ddga-icon-flip"),
6004
+ "data-slot": "link-end-icon",
6005
+ "aria-hidden": "true",
6006
+ children: endIcon
6007
+ }
6008
+ ),
6009
+ showExternalIcon && /* @__PURE__ */ jsx50(
6010
+ "span",
6011
+ {
6012
+ className: "ddga-link__icon ddga-link__icon--external",
6013
+ "data-slot": "link-external-icon",
6014
+ "aria-hidden": "true",
6015
+ children: /* @__PURE__ */ jsx50(ExternalLink, {})
6016
+ }
6017
+ )
6018
+ ]
6019
+ }
6020
+ );
6021
+ }
6022
+
6023
+ // src/components/SearchBox/SearchBox.tsx
6024
+ import { useCallback as useCallback5, useRef as useRef5, useState as useState12 } from "react";
6025
+ import { jsx as jsx51 } from "react/jsx-runtime";
6026
+ function setNativeInputValue(el, value) {
6027
+ const setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
6028
+ setter?.call(el, value);
6029
+ el.dispatchEvent(new Event("input", { bubbles: true }));
6030
+ }
6031
+ function SearchBox({
6032
+ value,
6033
+ defaultValue,
6034
+ onChange,
6035
+ onKeyDown,
6036
+ onSearch,
6037
+ onClear,
6038
+ clearable = true,
6039
+ clearLabel = "Clear search",
6040
+ className,
6041
+ ref,
6042
+ ...rest
6043
+ }) {
6044
+ const inputRef = useRef5(null);
6045
+ const setRefs = useCallback5(
6046
+ (node) => {
6047
+ inputRef.current = node;
6048
+ if (typeof ref === "function") ref(node);
6049
+ else if (ref) ref.current = node;
6050
+ },
6051
+ [ref]
6052
+ );
6053
+ const isControlled = value !== void 0;
6054
+ const [internal, setInternal] = useState12(
6055
+ defaultValue != null ? String(defaultValue) : ""
6056
+ );
6057
+ const currentValue = isControlled ? String(value ?? "") : internal;
6058
+ const handleChange = (event) => {
6059
+ if (!isControlled) setInternal(event.target.value);
6060
+ onChange?.(event);
6061
+ };
6062
+ const clear = () => {
6063
+ const el = inputRef.current;
6064
+ if (!el) return;
6065
+ setNativeInputValue(el, "");
6066
+ el.focus();
6067
+ onClear?.();
6068
+ };
6069
+ const handleKeyDown = (event) => {
6070
+ onKeyDown?.(event);
6071
+ if (event.defaultPrevented) return;
6072
+ if (event.key === "Enter") {
6073
+ onSearch?.(currentValue);
6074
+ } else if (event.key === "Escape" && currentValue.length > 0) {
6075
+ event.preventDefault();
6076
+ event.stopPropagation();
6077
+ clear();
6078
+ }
6079
+ };
6080
+ const showClear = clearable && currentValue.length > 0;
6081
+ return /* @__PURE__ */ jsx51(
6082
+ Input,
6083
+ {
6084
+ ...rest,
6085
+ ref: setRefs,
6086
+ type: "search",
6087
+ value: currentValue,
6088
+ onChange: handleChange,
6089
+ onKeyDown: handleKeyDown,
6090
+ className: cn("ddga-search-box", className),
6091
+ startAdornment: /* @__PURE__ */ jsx51(Search, { "data-slot": "search-box-icon", "aria-hidden": "true" }),
6092
+ endAdornment: showClear ? /* @__PURE__ */ jsx51(
6093
+ Button,
6094
+ {
6095
+ type: "button",
6096
+ variant: "ghost",
6097
+ size: "icon-sm",
6098
+ "aria-label": clearLabel,
6099
+ "data-slot": "search-box-clear",
6100
+ onClick: clear,
6101
+ children: /* @__PURE__ */ jsx51(Close, { "aria-hidden": "true" })
6102
+ }
6103
+ ) : void 0
6104
+ }
6105
+ );
6106
+ }
6107
+
6108
+ // src/components/List/List.tsx
6109
+ import { cva as cva45 } from "class-variance-authority";
6110
+ import { Fragment as Fragment8, jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
6111
+ var listVariants = cva45("ddga-list", {
6112
+ variants: {
6113
+ variant: {
6114
+ plain: "ddga-list--plain",
6115
+ bulleted: "ddga-list--bulleted",
6116
+ numbered: "ddga-list--numbered",
6117
+ lettered: "ddga-list--lettered"
6118
+ },
6119
+ divided: {
6120
+ true: "ddga-list--divided"
6121
+ }
6122
+ },
6123
+ defaultVariants: {
6124
+ variant: "plain"
6125
+ }
6126
+ });
6127
+ function List({ variant, divided, className, start, reversed, ...props }) {
6128
+ const classes = cn(listVariants({ variant, divided }), className);
6129
+ const ordered = variant === "numbered" || variant === "lettered";
6130
+ if (ordered) {
6131
+ return /* @__PURE__ */ jsx52(
6132
+ "ol",
6133
+ {
6134
+ "data-slot": "list",
6135
+ "data-variant": variant,
6136
+ className: classes,
6137
+ start,
6138
+ reversed,
6139
+ ...props
6140
+ }
6141
+ );
6142
+ }
6143
+ return /* @__PURE__ */ jsx52("ul", { "data-slot": "list", "data-variant": variant ?? "plain", className: classes, ...props });
6144
+ }
6145
+ function ListItem({ className, ...props }) {
6146
+ return /* @__PURE__ */ jsx52("li", { "data-slot": "list-item", className: cn("ddga-list__item", className), ...props });
6147
+ }
6148
+ function ListItemIcon({ className, ...props }) {
6149
+ return /* @__PURE__ */ jsx52("span", { "data-slot": "list-item-icon", className: cn("ddga-list__icon", className), ...props });
6150
+ }
6151
+ function ListItemContent({
6152
+ primary,
6153
+ secondary,
6154
+ className,
6155
+ children,
6156
+ ...props
6157
+ }) {
6158
+ if (process.env.NODE_ENV === "development" && children != null && (primary != null || secondary != null)) {
6159
+ console.warn(
6160
+ "[@dev-dga/react] ListItemContent: `children` overrides `primary`/`secondary`. Pass one or the other, not both."
6161
+ );
6162
+ }
6163
+ return /* @__PURE__ */ jsx52("div", { "data-slot": "list-item-content", className: cn("ddga-list__content", className), ...props, children: children ?? /* @__PURE__ */ jsxs39(Fragment8, { children: [
6164
+ primary != null && primary !== "" && /* @__PURE__ */ jsx52("span", { "data-slot": "list-item-primary", className: "ddga-list__primary", children: primary }),
6165
+ secondary != null && secondary !== "" && /* @__PURE__ */ jsx52("span", { "data-slot": "list-item-secondary", className: "ddga-list__secondary", children: secondary })
6166
+ ] }) });
6167
+ }
6168
+ function ListItemAction({ className, ...props }) {
6169
+ return /* @__PURE__ */ jsx52("div", { "data-slot": "list-item-action", className: cn("ddga-list__action", className), ...props });
6170
+ }
6171
+
6172
+ // src/components/Quote/Quote.tsx
6173
+ import "react";
6174
+ import { Slot as SlotPrimitive14 } from "radix-ui";
6175
+ import { cva as cva46 } from "class-variance-authority";
6176
+ import { jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
6177
+ var quoteVariants = cva46("ddga-quote", {
6178
+ variants: {
6179
+ variant: {
6180
+ /** Inline-start accent border (SA Green). The everyday blockquote. */
6181
+ default: "ddga-quote--default",
6182
+ /** Large editorial quote, centered, prominent mark — breaks up prose. */
6183
+ pullquote: "ddga-quote--pullquote",
6184
+ /** Card surface (border + bg + shadow), sized for an avatar + attribution. */
6185
+ testimonial: "ddga-quote--testimonial",
6186
+ /** Bare — no border, no surface. For inline / tightly-composed use. */
6187
+ plain: "ddga-quote--plain"
6188
+ }
6189
+ },
6190
+ defaultVariants: {
6191
+ variant: "default"
6192
+ }
6193
+ });
6194
+ function Quote({
6195
+ variant,
6196
+ quoteMark = false,
6197
+ avatar,
6198
+ author,
6199
+ byline,
6200
+ source,
6201
+ cite,
6202
+ className,
6203
+ children,
6204
+ ...props
6205
+ }) {
6206
+ const hasAttribution = author != null || byline != null || source != null;
6207
+ const mark = quoteMark ? /* @__PURE__ */ jsx53(QuoteMark, { "aria-hidden": "true", className: "ddga-quote__mark" }) : null;
6208
+ if (!hasAttribution) {
6209
+ return /* @__PURE__ */ jsxs40(
6210
+ "blockquote",
6211
+ {
6212
+ "data-slot": "quote",
6213
+ "data-variant": variant ?? "default",
6214
+ className: cn(quoteVariants({ variant }), className),
6215
+ cite,
6216
+ ...props,
6217
+ children: [
6218
+ mark,
6219
+ /* @__PURE__ */ jsx53(QuoteContent, { children })
6220
+ ]
6221
+ }
6222
+ );
6223
+ }
6224
+ return /* @__PURE__ */ jsxs40(
6225
+ "figure",
6226
+ {
6227
+ "data-slot": "quote",
6228
+ "data-variant": variant ?? "default",
6229
+ className: cn(quoteVariants({ variant }), className),
6230
+ ...props,
6231
+ children: [
6232
+ /* @__PURE__ */ jsxs40("blockquote", { "data-slot": "quote-blockquote", className: "ddga-quote__blockquote", cite, children: [
6233
+ mark,
6234
+ /* @__PURE__ */ jsx53(QuoteContent, { children })
6235
+ ] }),
6236
+ /* @__PURE__ */ jsxs40(QuoteCaption, { children: [
6237
+ avatar != null ? /* @__PURE__ */ jsx53("span", { "data-slot": "quote-avatar", "aria-hidden": "true", className: "ddga-quote__avatar", children: avatar }) : null,
6238
+ /* @__PURE__ */ jsxs40("span", { className: "ddga-quote__attribution", children: [
6239
+ author != null ? /* @__PURE__ */ jsx53(QuoteAuthor, { children: author }) : null,
6240
+ byline != null ? /* @__PURE__ */ jsx53("span", { className: "ddga-quote__byline", children: byline }) : null,
6241
+ source != null ? /* @__PURE__ */ jsx53(QuoteSource, { children: source }) : null
6242
+ ] })
6243
+ ] })
6244
+ ]
6245
+ }
6246
+ );
6247
+ }
6248
+ function QuoteContent({ asChild, className, ...props }) {
6249
+ const Comp = asChild ? SlotPrimitive14.Slot : "div";
6250
+ return /* @__PURE__ */ jsx53(Comp, { "data-slot": "quote-content", className: cn("ddga-quote__content", className), ...props });
6251
+ }
6252
+ function QuoteCaption({ asChild, className, ...props }) {
6253
+ const Comp = asChild ? SlotPrimitive14.Slot : "figcaption";
6254
+ return /* @__PURE__ */ jsx53(Comp, { "data-slot": "quote-caption", className: cn("ddga-quote__caption", className), ...props });
6255
+ }
6256
+ function QuoteAuthor({ asChild, className, ...props }) {
6257
+ const Comp = asChild ? SlotPrimitive14.Slot : "span";
6258
+ return /* @__PURE__ */ jsx53(Comp, { "data-slot": "quote-author", className: cn("ddga-quote__author", className), ...props });
6259
+ }
6260
+ function QuoteSource({ asChild, className, ...props }) {
6261
+ const Comp = asChild ? SlotPrimitive14.Slot : "cite";
6262
+ return /* @__PURE__ */ jsx53(Comp, { "data-slot": "quote-source", className: cn("ddga-quote__source", className), ...props });
6263
+ }
6264
+
6265
+ // src/components/Collapsible/Collapsible.tsx
6266
+ import { Collapsible as CollapsiblePrimitive } from "radix-ui";
6267
+ import { jsx as jsx54 } from "react/jsx-runtime";
6268
+ function Collapsible({ className, ...props }) {
6269
+ return /* @__PURE__ */ jsx54(
6270
+ CollapsiblePrimitive.Root,
6271
+ {
6272
+ "data-slot": "collapsible",
6273
+ className: cn("ddga-collapsible", className),
6274
+ ...props
6275
+ }
6276
+ );
6277
+ }
6278
+ function CollapsibleTrigger({ className, ...props }) {
6279
+ return /* @__PURE__ */ jsx54(
6280
+ CollapsiblePrimitive.Trigger,
6281
+ {
6282
+ "data-slot": "collapsible-trigger",
6283
+ className: cn("ddga-collapsible__trigger", className),
6284
+ ...props
6285
+ }
6286
+ );
6287
+ }
6288
+ function CollapsibleContent({ className, children, ...props }) {
6289
+ return /* @__PURE__ */ jsx54(
6290
+ CollapsiblePrimitive.Content,
6291
+ {
6292
+ "data-slot": "collapsible-content",
6293
+ className: cn("ddga-collapsible__content", className),
6294
+ ...props,
6295
+ children: /* @__PURE__ */ jsx54("div", { className: "ddga-collapsible__content-inner", children })
6296
+ }
6297
+ );
6298
+ }
6299
+
6300
+ // src/components/TagInput/TagInput.tsx
6301
+ import { useRef as useRef6, useState as useState13 } from "react";
6302
+ import { cva as cva47 } from "class-variance-authority";
6303
+ import { jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
6304
+ var tagInputVariants = cva47("ddga-tag-input", {
6305
+ variants: {
6306
+ size: {
6307
+ sm: "ddga-tag-input--sm",
6308
+ md: "ddga-tag-input--md",
6309
+ lg: "ddga-tag-input--lg"
6310
+ },
6311
+ error: {
6312
+ true: "ddga-tag-input--error"
6313
+ }
6314
+ },
6315
+ defaultVariants: {
6316
+ size: "md"
6317
+ }
6318
+ });
6319
+ function TagInput({
6320
+ id: externalId,
6321
+ value,
6322
+ defaultValue,
6323
+ onChange,
6324
+ label,
6325
+ helperText,
6326
+ errorMessage,
6327
+ error,
6328
+ size,
6329
+ disabled,
6330
+ placeholder,
6331
+ max,
6332
+ allowDuplicates = false,
6333
+ caseSensitive = false,
6334
+ validate,
6335
+ delimiters = [","],
6336
+ chipVariant = "secondary",
6337
+ removeLabel = (tag) => `Remove ${tag}`,
6338
+ formatAnnouncement = (tag, action) => `${tag} ${action === "add" ? "added" : "removed"}`,
6339
+ className,
6340
+ ...props
6341
+ }) {
6342
+ const isControlled = value !== void 0;
6343
+ const [uncontrolledTags, setUncontrolledTags] = useState13(defaultValue ?? []);
6344
+ const tags = isControlled ? value : uncontrolledTags;
6345
+ const [draft, setDraft] = useState13("");
6346
+ const [announcement, setAnnouncement] = useState13("");
6347
+ const inputRef = useRef6(null);
6348
+ const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
6349
+ name: "TagInput",
6350
+ id: externalId,
6351
+ label,
6352
+ error,
6353
+ errorMessage,
6354
+ helperText,
6355
+ "aria-label": props["aria-label"],
6356
+ "aria-labelledby": props["aria-labelledby"]
6357
+ });
6358
+ const commit = (next) => {
6359
+ if (!isControlled) setUncontrolledTags(next);
6360
+ onChange?.(next);
6361
+ };
6362
+ const norm = (t) => caseSensitive ? t : t.toLowerCase();
6363
+ const accept = (raw, current) => {
6364
+ let next = current;
6365
+ for (const fragment of raw) {
6366
+ const trimmed = fragment.trim();
6367
+ if (!trimmed) continue;
6368
+ if (max !== void 0 && next.length >= max) break;
6369
+ if (!allowDuplicates && next.some((t) => norm(t) === norm(trimmed))) continue;
6370
+ if (validate && !validate(trimmed, next)) continue;
6371
+ next = [...next, trimmed];
6372
+ }
6373
+ return next;
6374
+ };
6375
+ const announceAdded = (added) => {
6376
+ if (added.length > 0) {
6377
+ setAnnouncement(added.map((t) => formatAnnouncement(t, "add")).join(", "));
6378
+ }
6379
+ };
6380
+ const commitDraft = () => {
6381
+ const next = accept([draft], tags);
6382
+ if (next.length > tags.length) {
6383
+ commit(next);
6384
+ announceAdded(next.slice(tags.length));
6385
+ setDraft("");
6386
+ }
6387
+ };
6388
+ const splitPaste = (text) => {
6389
+ const escaped = delimiters.map((d) => d.replace(/[.*+?^${}()|[\]\\-]/g, "\\$&"));
6390
+ const pattern = new RegExp(`[${escaped.join("")}\\n\\r]`);
6391
+ return text.split(pattern);
6392
+ };
6393
+ const removeTag = (index) => {
6394
+ const removed = tags[index];
6395
+ commit(tags.filter((_, i) => i !== index));
6396
+ setAnnouncement(formatAnnouncement(removed, "remove"));
6397
+ inputRef.current?.focus();
6398
+ };
6399
+ const handleKeyDown = (event) => {
6400
+ if (disabled) return;
6401
+ if (event.key === "Enter") {
6402
+ event.preventDefault();
6403
+ if (draft.trim()) commitDraft();
6404
+ } else if (delimiters.includes(event.key)) {
6405
+ event.preventDefault();
6406
+ if (draft.trim()) commitDraft();
6407
+ } else if (event.key === "Backspace" && draft === "" && tags.length > 0) {
6408
+ event.preventDefault();
6409
+ removeTag(tags.length - 1);
6410
+ }
6411
+ };
6412
+ const handlePaste = (event) => {
6413
+ if (disabled) return;
6414
+ const text = event.clipboardData.getData("text");
6415
+ const fragments = splitPaste(text);
6416
+ if (fragments.length <= 1) return;
6417
+ event.preventDefault();
6418
+ const next = accept(fragments, tags);
6419
+ if (next.length > tags.length) {
6420
+ commit(next);
6421
+ announceAdded(next.slice(tags.length));
6422
+ setDraft("");
6423
+ }
6424
+ };
6425
+ const handleBoxMouseDown = (event) => {
6426
+ const target = event.target;
6427
+ if (target === inputRef.current || target.closest("button")) return;
6428
+ event.preventDefault();
6429
+ inputRef.current?.focus();
6430
+ };
6431
+ const chipSize = size === "lg" ? "md" : "sm";
6432
+ return /* @__PURE__ */ jsxs41("div", { "data-slot": "tag-input-field", className: "ddga-field", children: [
6433
+ label && /* @__PURE__ */ jsx55("label", { htmlFor: fieldId, className: "ddga-tag-input__label", children: label }),
6434
+ /* @__PURE__ */ jsxs41(
6435
+ "div",
6436
+ {
6437
+ "data-slot": "tag-input-control",
6438
+ className: cn(tagInputVariants({ size, error: hasError }), className),
6439
+ "data-disabled": disabled || void 0,
6440
+ onMouseDown: disabled ? void 0 : handleBoxMouseDown,
6441
+ children: [
6442
+ tags.length > 0 && /* @__PURE__ */ jsx55("ul", { "data-slot": "tag-input-list", className: "ddga-tag-input__list", role: "list", children: tags.map((tag, index) => /* @__PURE__ */ jsx55(
6443
+ "li",
6444
+ {
6445
+ "data-slot": "tag-input-item",
6446
+ className: "ddga-tag-input__item",
6447
+ role: "listitem",
6448
+ children: /* @__PURE__ */ jsx55(
6449
+ Badge,
6450
+ {
6451
+ variant: chipVariant,
6452
+ size: chipSize,
6453
+ open: true,
6454
+ dismissible: !disabled,
6455
+ onDismiss: () => removeTag(index),
6456
+ closeLabel: removeLabel(tag),
6457
+ children: tag
6458
+ }
6459
+ )
6460
+ },
6461
+ `${tag}-${index}`
6462
+ )) }),
6463
+ /* @__PURE__ */ jsx55(
6464
+ "input",
6465
+ {
6466
+ ...props,
6467
+ ...controlProps,
6468
+ ref: inputRef,
6469
+ "data-slot": "tag-input",
6470
+ className: "ddga-tag-input__field",
6471
+ type: "text",
6472
+ value: draft,
6473
+ disabled,
6474
+ placeholder: tags.length === 0 ? placeholder : void 0,
6475
+ onChange: (event) => setDraft(event.target.value),
6476
+ onKeyDown: handleKeyDown,
6477
+ onPaste: handlePaste
6478
+ }
6479
+ )
6480
+ ]
6481
+ }
6482
+ ),
6483
+ /* @__PURE__ */ jsx55("div", { "data-slot": "tag-input-live", className: "ddga-sr-only", role: "status", "aria-live": "polite", children: announcement }),
6484
+ hasErrorMessage && /* @__PURE__ */ jsx55(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
6485
+ hasHelper && /* @__PURE__ */ jsx55(FieldMessage, { id: helperId, variant: "helper", children: helperText })
6486
+ ] });
6487
+ }
6488
+
6489
+ // src/components/DateRangePicker/DateRangePicker.tsx
6490
+ import { useCallback as useCallback6, useMemo as useMemo6, useState as useState14 } from "react";
6491
+ import {
6492
+ Button as AriaButton2,
6493
+ CalendarCell as AriaCalendarCell2,
6494
+ CalendarGrid as AriaCalendarGrid2,
6495
+ CalendarGridBody as AriaCalendarGridBody2,
6496
+ CalendarGridHeader as AriaCalendarGridHeader2,
6497
+ CalendarHeaderCell as AriaCalendarHeaderCell2,
6498
+ DateInput as AriaDateInput2,
6499
+ DateRangePicker as AriaDateRangePicker,
6500
+ DateSegment as AriaDateSegment2,
6501
+ Dialog as AriaDialog2,
6502
+ FieldError as AriaFieldError2,
6503
+ Group as AriaGroup2,
6504
+ I18nProvider as I18nProvider2,
6505
+ Label as AriaLabel2,
6506
+ Popover as AriaPopover2,
6507
+ RangeCalendar as AriaRangeCalendar,
6508
+ Text as AriaText2
6509
+ } from "react-aria-components";
6510
+ import { CalendarDate as CalendarDate3 } from "@internationalized/date";
6511
+ import { cva as cva48 } from "class-variance-authority";
6512
+ import { jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
6513
+ var dateRangePickerTriggerVariants = cva48("ddga-date-range-picker-trigger", {
6514
+ variants: {
6515
+ size: {
6516
+ sm: "ddga-date-range-picker-trigger--sm",
6517
+ md: "ddga-date-range-picker-trigger--md"
6518
+ },
6519
+ error: {
6520
+ true: "ddga-date-range-picker-trigger--error"
6521
+ }
6522
+ },
6523
+ defaultVariants: {
6524
+ size: "md"
6525
+ }
6526
+ });
6527
+ var dateRangePickerVariants = dateRangePickerTriggerVariants;
6528
+ function toAriaRange(range) {
6529
+ if (!range) return null;
6530
+ const start = dateToCalendarDate(range.start);
6531
+ const end = dateToCalendarDate(range.end);
6532
+ if (!start || !end) return null;
6533
+ return { start, end };
6534
+ }
6535
+ function fromAriaRange(value) {
6536
+ if (!value) return null;
6537
+ const start = calendarDateToDate(value.start);
6538
+ const end = calendarDateToDate(value.end);
6539
+ if (!start || !end) return null;
6540
+ return { start, end };
6541
+ }
6542
+ function DateRangePicker({
6543
+ value: controlledValue,
6544
+ defaultValue,
6545
+ onChange,
6546
+ minValue,
6547
+ maxValue,
6548
+ label,
6549
+ helperText,
6550
+ errorMessage,
6551
+ error,
6552
+ required,
6553
+ disabled,
6554
+ size,
6555
+ id,
6556
+ className,
6557
+ "aria-label": ariaLabel,
6558
+ "aria-labelledby": ariaLabelledBy,
6559
+ calendar: controlledCalendar,
6560
+ defaultCalendar = "gregorian",
6561
+ onCalendarChange,
6562
+ showCalendarToggle = true,
6563
+ calendarLabels,
6564
+ showSecondaryCalendar = false
6565
+ }) {
6566
+ const isValueControlled = controlledValue !== void 0;
6567
+ const [internalValue, setInternalValue] = useState14(
6568
+ () => toAriaRange(defaultValue)
6569
+ );
6570
+ const value = isValueControlled ? toAriaRange(controlledValue) : internalValue;
6571
+ const handleAriaChange = useCallback6(
6572
+ (next) => {
6573
+ const nextRange = next ? {
6574
+ start: new CalendarDate3(next.start.year, next.start.month, next.start.day),
6575
+ end: new CalendarDate3(next.end.year, next.end.month, next.end.day)
6576
+ } : null;
6577
+ if (!isValueControlled) setInternalValue(nextRange);
6578
+ onChange?.(fromAriaRange(nextRange));
6579
+ },
6580
+ [isValueControlled, onChange]
6581
+ );
6582
+ const isCalendarControlled = controlledCalendar !== void 0;
6583
+ const [internalCalendar, setInternalCalendar] = useState14(defaultCalendar);
6584
+ const calendarSystem = isCalendarControlled ? controlledCalendar : internalCalendar;
6585
+ const setCalendar = useCallback6(
6586
+ (next) => {
6587
+ if (!isCalendarControlled) setInternalCalendar(next);
6588
+ onCalendarChange?.(next);
6589
+ },
6590
+ [isCalendarControlled, onCalendarChange]
6591
+ );
6592
+ const {
6593
+ dgaLocale,
6594
+ locale: ariaLocale,
6595
+ portalContainer,
6596
+ PrevChevron,
6597
+ NextChevron,
6598
+ resolvedLabels,
6599
+ navLabels,
6600
+ a11yLabels
6601
+ } = useCalendarChrome(calendarSystem, calendarLabels);
6602
+ const ariaMinValue = useMemo6(() => dateToCalendarDate(minValue) ?? void 0, [minValue]);
6603
+ const ariaMaxValue = useMemo6(() => dateToCalendarDate(maxValue) ?? void 0, [maxValue]);
6604
+ const dialogAriaLabel = ariaLabel ?? (typeof label === "string" ? label : ariaLabelledBy ? void 0 : dgaLocale.startsWith("ar") ? "\u0646\u0637\u0627\u0642 \u0627\u0644\u062A\u0627\u0631\u064A\u062E" : "Date range");
6605
+ const showToggle = showCalendarToggle && !isCalendarControlled;
6606
+ const hasError = !!error;
6607
+ const hasErrorMessage = hasError && errorMessage != null && errorMessage !== "";
6608
+ const hasHelper = !hasErrorMessage && helperText != null && helperText !== "";
6609
+ return /* @__PURE__ */ jsx56(I18nProvider2, { locale: ariaLocale, children: /* @__PURE__ */ jsxs42(
6610
+ AriaDateRangePicker,
6611
+ {
6612
+ value,
6613
+ onChange: handleAriaChange,
6614
+ minValue: ariaMinValue,
6615
+ maxValue: ariaMaxValue,
6616
+ isRequired: required,
6617
+ isDisabled: disabled,
6618
+ isInvalid: hasError,
6619
+ shouldCloseOnSelect: true,
6620
+ id,
6621
+ "aria-label": ariaLabel,
6622
+ "aria-labelledby": ariaLabelledBy,
6623
+ className: "ddga-field",
6624
+ "data-slot": "date-range-picker-field",
6625
+ children: [
6626
+ label && /* @__PURE__ */ jsxs42(AriaLabel2, { className: "ddga-date-range-picker__label", children: [
6627
+ label,
6628
+ required && /* @__PURE__ */ jsx56("span", { "aria-hidden": "true", className: "ddga-date-range-picker__required", children: "*" })
6629
+ ] }),
6630
+ /* @__PURE__ */ jsxs42(
6631
+ AriaGroup2,
6632
+ {
6633
+ "data-slot": "date-range-picker-trigger",
6634
+ className: cn(dateRangePickerTriggerVariants({ size, error: hasError }), className),
6635
+ children: [
6636
+ /* @__PURE__ */ jsx56(
6637
+ AriaDateInput2,
6638
+ {
6639
+ slot: "start",
6640
+ className: "ddga-date-range-picker__input",
6641
+ "data-slot": "date-range-picker-input-start",
6642
+ children: (segment) => /* @__PURE__ */ jsx56(
6643
+ AriaDateSegment2,
6644
+ {
6645
+ segment,
6646
+ className: "ddga-date-range-picker__segment",
6647
+ "data-slot": "date-range-picker-segment"
6648
+ }
6649
+ )
6650
+ }
6651
+ ),
6652
+ /* @__PURE__ */ jsx56("span", { "aria-hidden": "true", className: "ddga-date-range-picker__separator", children: "\u2013" }),
6653
+ /* @__PURE__ */ jsx56(
6654
+ AriaDateInput2,
6655
+ {
6656
+ slot: "end",
6657
+ className: "ddga-date-range-picker__input",
6658
+ "data-slot": "date-range-picker-input-end",
6659
+ children: (segment) => /* @__PURE__ */ jsx56(
6660
+ AriaDateSegment2,
6661
+ {
6662
+ segment,
6663
+ className: "ddga-date-range-picker__segment",
6664
+ "data-slot": "date-range-picker-segment"
6665
+ }
6666
+ )
6667
+ }
6668
+ ),
6669
+ /* @__PURE__ */ jsx56(
6670
+ AriaButton2,
6671
+ {
6672
+ className: "ddga-date-range-picker__icon-button",
6673
+ "aria-label": a11yLabels.openCalendar,
6674
+ "data-slot": "date-range-picker-trigger-button",
6675
+ children: /* @__PURE__ */ jsx56(CalendarIcon, { "aria-hidden": "true", className: "ddga-date-range-picker__icon" })
6676
+ }
6677
+ )
6678
+ ]
6679
+ }
6680
+ ),
6681
+ hasHelper && /* @__PURE__ */ jsx56(
6682
+ AriaText2,
6683
+ {
6684
+ slot: "description",
6685
+ className: "ddga-field__message ddga-field__message--helper",
6686
+ "data-slot": "field-helper",
6687
+ children: helperText
6688
+ }
6689
+ ),
6690
+ hasErrorMessage && /* @__PURE__ */ jsx56(
6691
+ AriaFieldError2,
6692
+ {
6693
+ className: "ddga-field__message ddga-field__message--error",
6694
+ "data-slot": "field-error",
6695
+ children: errorMessage
6696
+ }
6697
+ ),
6698
+ /* @__PURE__ */ jsx56(
6699
+ AriaPopover2,
6700
+ {
6701
+ UNSTABLE_portalContainer: portalContainer,
6702
+ className: "ddga-calendar-popover",
6703
+ "data-slot": "date-range-picker-popover",
6704
+ offset: 6,
6705
+ containerPadding: 12,
6706
+ children: /* @__PURE__ */ jsxs42(
6707
+ AriaDialog2,
6708
+ {
6709
+ className: "ddga-calendar-dialog",
6710
+ "data-slot": "date-range-picker-dialog",
6711
+ "aria-label": dialogAriaLabel,
6712
+ "aria-labelledby": ariaLabelledBy,
6713
+ children: [
6714
+ showToggle && /* @__PURE__ */ jsx56(
6715
+ CalendarSystemToggle,
6716
+ {
6717
+ value: calendarSystem,
6718
+ onChange: setCalendar,
6719
+ labels: resolvedLabels,
6720
+ groupLabel: a11yLabels.calendarSystem
6721
+ }
6722
+ ),
6723
+ /* @__PURE__ */ jsxs42(
6724
+ AriaRangeCalendar,
6725
+ {
6726
+ className: "ddga-calendar ddga-calendar--range",
6727
+ "data-slot": "date-range-picker-calendar",
6728
+ children: [
6729
+ /* @__PURE__ */ jsxs42("header", { className: "ddga-calendar__header", children: [
6730
+ /* @__PURE__ */ jsx56(
6731
+ AriaButton2,
6732
+ {
6733
+ slot: "previous",
6734
+ className: "ddga-calendar__nav",
6735
+ "data-slot": "date-range-picker-calendar-prev",
6736
+ children: /* @__PURE__ */ jsx56(PrevChevron, { "aria-hidden": "true" })
6737
+ }
6738
+ ),
6739
+ /* @__PURE__ */ jsx56(
6740
+ CalendarNavHeader,
6741
+ {
6742
+ locale: ariaLocale,
6743
+ monthLabel: navLabels.month,
6744
+ yearLabel: navLabels.year
6745
+ }
6746
+ ),
6747
+ /* @__PURE__ */ jsx56(
6748
+ AriaButton2,
6749
+ {
6750
+ slot: "next",
6751
+ className: "ddga-calendar__nav",
6752
+ "data-slot": "date-range-picker-calendar-next",
6753
+ children: /* @__PURE__ */ jsx56(NextChevron, { "aria-hidden": "true" })
6754
+ }
6755
+ )
6756
+ ] }),
6757
+ /* @__PURE__ */ jsxs42(AriaCalendarGrid2, { className: "ddga-calendar__grid", children: [
6758
+ /* @__PURE__ */ jsx56(AriaCalendarGridHeader2, { children: (day) => /* @__PURE__ */ jsx56(AriaCalendarHeaderCell2, { className: "ddga-calendar__weekday", children: day }) }),
6759
+ /* @__PURE__ */ jsx56(AriaCalendarGridBody2, { children: (date) => /* @__PURE__ */ jsx56(AriaCalendarCell2, { date, className: "ddga-calendar__cell", children: ({ formattedDate }) => renderDayContent(formattedDate, {
6760
+ showSecondary: showSecondaryCalendar,
6761
+ date,
6762
+ calendarSystem
6763
+ }) }) })
6764
+ ] })
6765
+ ]
6766
+ }
6767
+ )
6768
+ ]
6769
+ }
6770
+ )
6771
+ }
6772
+ )
6773
+ ]
6774
+ }
6775
+ ) });
6776
+ }
6777
+
6778
+ // src/components/AspectRatio/AspectRatio.tsx
6779
+ import { Slot as SlotPrimitive15 } from "radix-ui";
6780
+ import { jsx as jsx57 } from "react/jsx-runtime";
6781
+ function AspectRatio({ ratio = 1, asChild, className, style, ...props }) {
6782
+ const Comp = asChild ? SlotPrimitive15.Slot : "div";
6783
+ return /* @__PURE__ */ jsx57(
6784
+ Comp,
6785
+ {
6786
+ "data-slot": "aspect-ratio",
6787
+ className: cn("ddga-aspect-ratio", className),
6788
+ style: { "--ddga-aspect-ratio": ratio, ...style },
6789
+ ...props
6790
+ }
6791
+ );
6792
+ }
6793
+
6794
+ // src/providers/DgaProvider.tsx
6795
+ import { useState as useState15, useMemo as useMemo7, useContext as useContext14, useEffect as useEffect4, useRef as useRef7 } from "react";
6796
+ import { Direction as DirectionPrimitive, Tooltip as TooltipPrimitive2 } from "radix-ui";
6797
+ import { buildTheme } from "@dev-dga/tokens";
6798
+ import { jsx as jsx58 } from "react/jsx-runtime";
6799
+ function DgaProvider({
6800
+ dir = "ltr",
6801
+ locale,
6802
+ mode = "light",
6803
+ theme,
6804
+ as: Component = "div",
6805
+ className,
6806
+ style: consumerStyle,
6807
+ children
6808
+ }) {
6809
+ const parentCtx = useContext14(DgaContext);
6810
+ const isNested = parentCtx !== null;
6811
+ const [rootEl, setRootEl] = useState15(null);
6812
+ const portalRef = useRef7(null);
6813
+ const [portalEl, setPortalEl] = useState15(null);
6814
+ const resolvedLocale = locale ?? (dir === "rtl" ? "ar" : "en");
6815
+ const themeVars = useMemo7(() => theme ? buildTheme(theme) : null, [theme]);
6816
+ useEffect4(() => {
6817
+ if (typeof document === "undefined") return;
6818
+ const el = document.createElement("div");
6819
+ el.setAttribute("data-slot", "dga-portal");
6820
+ el.style.position = "relative";
6821
+ el.style.zIndex = "50";
6822
+ document.body.appendChild(el);
6823
+ portalRef.current = el;
6824
+ setPortalEl(el);
6825
+ return () => {
6826
+ el.remove();
6827
+ portalRef.current = null;
6828
+ setPortalEl(null);
6829
+ };
6830
+ }, []);
6831
+ useEffect4(() => {
5268
6832
  const el = portalRef.current;
5269
6833
  if (!el) return;
5270
6834
  el.setAttribute("data-theme", mode);
@@ -5276,12 +6840,12 @@ function DgaProvider({
5276
6840
  }
5277
6841
  }
5278
6842
  }, [mode, dir, themeVars, portalEl]);
5279
- const ctxValue = useMemo4(
6843
+ const ctxValue = useMemo7(
5280
6844
  () => ({ dir, locale: resolvedLocale, mode, rootEl, portalEl }),
5281
6845
  [dir, resolvedLocale, mode, rootEl, portalEl]
5282
6846
  );
5283
- const inner = /* @__PURE__ */ jsx46(DirectionPrimitive.Provider, { dir, children });
5284
- return /* @__PURE__ */ jsx46(DgaContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx46(
6847
+ const inner = /* @__PURE__ */ jsx58(DirectionPrimitive.Provider, { dir, children });
6848
+ return /* @__PURE__ */ jsx58(DgaContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx58(
5285
6849
  Component,
5286
6850
  {
5287
6851
  ref: setRootEl,
@@ -5291,7 +6855,7 @@ function DgaProvider({
5291
6855
  "data-theme": mode,
5292
6856
  className,
5293
6857
  style: { colorScheme: mode, ...themeVars ?? {}, ...consumerStyle },
5294
- children: isNested ? inner : /* @__PURE__ */ jsx46(TooltipPrimitive2.Provider, { delayDuration: 300, skipDelayDuration: 100, children: inner })
6858
+ children: isNested ? inner : /* @__PURE__ */ jsx58(TooltipPrimitive2.Provider, { delayDuration: 300, skipDelayDuration: 100, children: inner })
5295
6859
  }
5296
6860
  ) });
5297
6861
  }
@@ -5303,6 +6867,7 @@ export {
5303
6867
  Alert,
5304
6868
  AlertDescription,
5305
6869
  AlertTitle,
6870
+ AspectRatio,
5306
6871
  Avatar,
5307
6872
  AvatarFallback,
5308
6873
  AvatarGroup,
@@ -5325,11 +6890,23 @@ export {
5325
6890
  CardTitle,
5326
6891
  Checkbox,
5327
6892
  CircularProgress,
6893
+ Collapsible,
6894
+ CollapsibleContent,
6895
+ CollapsibleTrigger,
5328
6896
  Combobox,
5329
6897
  ComboboxGroup,
5330
6898
  ComboboxItem,
5331
6899
  ComboboxSeparator,
6900
+ Command2 as Command,
6901
+ CommandDialog,
6902
+ CommandEmpty,
6903
+ CommandGroup,
6904
+ CommandInput,
6905
+ CommandItem,
6906
+ CommandList,
6907
+ CommandSeparator,
5332
6908
  DatePicker,
6909
+ DateRangePicker,
5333
6910
  DescriptionDetails,
5334
6911
  DescriptionItem,
5335
6912
  DescriptionList,
@@ -5366,6 +6943,13 @@ export {
5366
6943
  FieldMessage,
5367
6944
  FileUpload,
5368
6945
  Input,
6946
+ InputOTP,
6947
+ Link,
6948
+ List,
6949
+ ListItem,
6950
+ ListItemAction,
6951
+ ListItemContent,
6952
+ ListItemIcon,
5369
6953
  Menubar,
5370
6954
  MenubarCheckboxItem,
5371
6955
  MenubarContent,
@@ -5402,10 +6986,16 @@ export {
5402
6986
  PopoverContent,
5403
6987
  PopoverTrigger,
5404
6988
  Progress,
6989
+ Quote,
6990
+ QuoteAuthor,
6991
+ QuoteCaption,
6992
+ QuoteContent,
6993
+ QuoteSource,
5405
6994
  Radio,
5406
6995
  RadioGroup,
5407
6996
  Rating,
5408
6997
  ScrollArea,
6998
+ SearchBox,
5409
6999
  Select,
5410
7000
  SelectItem,
5411
7001
  Sidebar,
@@ -5435,6 +7025,7 @@ export {
5435
7025
  Spinner,
5436
7026
  Stat,
5437
7027
  StatChange,
7028
+ StatChart,
5438
7029
  StatGroup,
5439
7030
  StatLabel,
5440
7031
  StatValue,
@@ -5444,10 +7035,19 @@ export {
5444
7035
  StepTitle,
5445
7036
  Steps,
5446
7037
  Switch,
7038
+ Table,
7039
+ TableBody,
7040
+ TableCaption,
7041
+ TableCell,
7042
+ TableFooter,
7043
+ TableHead,
7044
+ TableHeader,
7045
+ TableRow,
5447
7046
  Tabs,
5448
7047
  TabsContent,
5449
7048
  TabsList,
5450
7049
  TabsTrigger,
7050
+ TagInput,
5451
7051
  Textarea,
5452
7052
  Timeline,
5453
7053
  TimelineContent,
@@ -5475,15 +7075,21 @@ export {
5475
7075
  cn,
5476
7076
  comboboxTriggerVariants,
5477
7077
  comboboxVariants,
7078
+ commandVariants,
5478
7079
  createToast,
5479
7080
  createToastStore,
5480
7081
  datePickerVariants,
7082
+ dateRangePickerTriggerVariants,
7083
+ dateRangePickerVariants,
5481
7084
  descriptionListVariants,
5482
7085
  dividerVariants,
5483
7086
  drawerVariants,
5484
7087
  dropdownMenuVariants,
5485
7088
  emptyStateVariants,
7089
+ inputOTPVariants,
5486
7090
  inputVariants,
7091
+ linkVariants,
7092
+ listVariants,
5487
7093
  menubarContentVariants,
5488
7094
  menubarTriggerVariants,
5489
7095
  modalContentVariants,
@@ -5492,6 +7098,7 @@ export {
5492
7098
  paginationVariants,
5493
7099
  popoverContentVariants,
5494
7100
  progressVariants,
7101
+ quoteVariants,
5495
7102
  radioGroupVariants,
5496
7103
  radioVariants,
5497
7104
  ratingVariants,
@@ -5507,8 +7114,10 @@ export {
5507
7114
  stepVariants,
5508
7115
  stepsVariants,
5509
7116
  switchVariants,
7117
+ tableVariants,
5510
7118
  tabsListVariants,
5511
7119
  tabsVariants,
7120
+ tagInputVariants,
5512
7121
  textareaVariants,
5513
7122
  timelineMarkerVariants,
5514
7123
  timelineVariants,