@dinofront/design_system 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/components/Accordion/Accordion.types.d.ts +4 -0
  2. package/dist/components/Badge/Badge.types.d.ts +11 -0
  3. package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -0
  4. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +19 -0
  5. package/dist/components/Breadcrumb/index.d.ts +2 -0
  6. package/dist/components/CardGroup/CardGroup.d.ts +2 -0
  7. package/dist/components/CardGroup/CardGroup.types.d.ts +19 -0
  8. package/dist/components/CardGroup/index.d.ts +2 -0
  9. package/dist/components/Copy/Copy.d.ts +2 -0
  10. package/dist/components/Copy/Copy.types.d.ts +17 -0
  11. package/dist/components/Copy/index.d.ts +2 -0
  12. package/dist/components/Counter/Counter.d.ts +2 -0
  13. package/dist/components/Counter/Counter.types.d.ts +20 -0
  14. package/dist/components/Counter/index.d.ts +2 -0
  15. package/dist/components/DistributionBar/DistributionBar.d.ts +2 -0
  16. package/dist/components/DistributionBar/DistributionBar.types.d.ts +20 -0
  17. package/dist/components/DistributionBar/index.d.ts +2 -0
  18. package/dist/components/Drawer/Drawer.types.d.ts +4 -0
  19. package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +22 -2
  20. package/dist/components/Empty/Empty.d.ts +2 -0
  21. package/dist/components/Empty/Empty.types.d.ts +12 -0
  22. package/dist/components/Empty/index.d.ts +2 -0
  23. package/dist/components/FormContainer/FormContainer.d.ts +2 -0
  24. package/dist/components/FormContainer/FormContainer.types.d.ts +18 -0
  25. package/dist/components/FormContainer/index.d.ts +2 -0
  26. package/dist/components/FormField/FormField.d.ts +2 -0
  27. package/dist/components/FormField/FormField.types.d.ts +22 -0
  28. package/dist/components/FormField/index.d.ts +2 -0
  29. package/dist/components/Input/Input.types.d.ts +2 -0
  30. package/dist/components/Link/Link.d.ts +2 -0
  31. package/dist/components/Link/Link.types.d.ts +15 -0
  32. package/dist/components/Link/index.d.ts +2 -0
  33. package/dist/components/MultiSelect/MultiSelect.types.d.ts +8 -0
  34. package/dist/components/Popover/Popover.d.ts +2 -0
  35. package/dist/components/Popover/Popover.types.d.ts +29 -0
  36. package/dist/components/Popover/index.d.ts +2 -0
  37. package/dist/components/ReadMore/ReadMore.d.ts +2 -0
  38. package/dist/components/ReadMore/ReadMore.types.d.ts +17 -0
  39. package/dist/components/ReadMore/index.d.ts +2 -0
  40. package/dist/components/Select/Select.types.d.ts +2 -0
  41. package/dist/components/StepIndicator/StepIndicator.d.ts +2 -0
  42. package/dist/components/StepIndicator/StepIndicator.types.d.ts +24 -0
  43. package/dist/components/StepIndicator/index.d.ts +2 -0
  44. package/dist/components/Tabs/Tabs.types.d.ts +16 -1
  45. package/dist/components/Text/Text.types.d.ts +2 -0
  46. package/dist/components/TextArea/TextArea.types.d.ts +2 -0
  47. package/dist/components/ThemeSwitch/ThemeSwitch.d.ts +2 -0
  48. package/dist/components/ThemeSwitch/ThemeSwitch.types.d.ts +7 -0
  49. package/dist/components/ThemeSwitch/index.d.ts +2 -0
  50. package/dist/components/UnderConstruction/UnderConstruction.d.ts +2 -0
  51. package/dist/components/UnderConstruction/UnderConstruction.types.d.ts +12 -0
  52. package/dist/components/UnderConstruction/index.d.ts +2 -0
  53. package/dist/components/Upload/Upload.types.d.ts +31 -2
  54. package/dist/components/Upload/index.d.ts +1 -1
  55. package/dist/hooks/index.d.ts +9 -0
  56. package/dist/hooks/useEscapeKey.d.ts +4 -0
  57. package/dist/hooks/useFormContext.d.ts +6 -0
  58. package/dist/hooks/useFormProps.d.ts +9 -0
  59. package/dist/hooks/useHideBodyScroll.d.ts +6 -0
  60. package/dist/hooks/useIsMobile.d.ts +9 -0
  61. package/dist/hooks/useOnOutsideClick.d.ts +6 -0
  62. package/dist/hooks/useStepper.d.ts +27 -0
  63. package/dist/icons/brands/AppleIcon.d.ts +1 -0
  64. package/dist/icons/brands/FacebookIcon.d.ts +1 -0
  65. package/dist/icons/brands/GoogleIcon.d.ts +1 -0
  66. package/dist/icons/brands/InstagramIcon.d.ts +1 -0
  67. package/dist/icons/brands/LinkedinIcon.d.ts +1 -0
  68. package/dist/icons/brands/MediumIcon.d.ts +1 -0
  69. package/dist/icons/brands/TelegramIcon.d.ts +1 -0
  70. package/dist/icons/brands/TwitterIcon.d.ts +1 -0
  71. package/dist/icons/brands/YoutubeIcon.d.ts +1 -0
  72. package/dist/icons/brands/index.d.ts +9 -0
  73. package/dist/icons/createIcon.d.ts +28 -0
  74. package/dist/icons/currency/AmdIcon.d.ts +1 -0
  75. package/dist/icons/currency/EurIcon.d.ts +1 -0
  76. package/dist/icons/currency/RubIcon.d.ts +1 -0
  77. package/dist/icons/currency/UsdIcon.d.ts +1 -0
  78. package/dist/icons/currency/index.d.ts +4 -0
  79. package/dist/icons/domain/BudgetTransferIcon.d.ts +1 -0
  80. package/dist/icons/domain/ContractCardIcon.d.ts +1 -0
  81. package/dist/icons/domain/HandOpenHeartIcon.d.ts +1 -0
  82. package/dist/icons/domain/OnlyEmployeeIcon.d.ts +1 -0
  83. package/dist/icons/domain/ProjectProductIcon.d.ts +1 -0
  84. package/dist/icons/domain/UnitsEmployeeIcon.d.ts +1 -0
  85. package/dist/icons/domain/VacationIcon.d.ts +1 -0
  86. package/dist/icons/domain/index.d.ts +7 -0
  87. package/dist/icons/flags/FlagAmIcon.d.ts +1 -0
  88. package/dist/icons/flags/FlagGbIcon.d.ts +1 -0
  89. package/dist/icons/flags/FlagRuIcon.d.ts +1 -0
  90. package/dist/icons/flags/FlagUsIcon.d.ts +1 -0
  91. package/dist/icons/flags/index.d.ts +4 -0
  92. package/dist/icons/index.d.ts +4 -0
  93. package/dist/icons.d.ts +2 -0
  94. package/dist/icons.js +342 -0
  95. package/dist/icons.js.map +1 -0
  96. package/dist/index.d.ts +15 -0
  97. package/dist/index.js +2283 -1158
  98. package/dist/index.js.map +1 -1
  99. package/dist/lib/FormContext.d.ts +22 -0
  100. package/dist/lib/mergeRefs.d.ts +4 -0
  101. package/dist/lib/motion.d.ts +11 -0
  102. package/dist/lib/useAnchoredPosition.d.ts +31 -0
  103. package/dist/lib/useFloatingPosition.d.ts +29 -0
  104. package/dist/lib/useMountTransition.d.ts +21 -0
  105. package/dist/styles.css +328 -0
  106. package/package.json +25 -4
package/dist/index.js CHANGED
@@ -1,95 +1,153 @@
1
- import { Children as e, cloneElement as t, createContext as n, createElement as r, forwardRef as i, isValidElement as a, useCallback as o, useContext as s, useEffect as c, useId as l, useMemo as u, useRef as d, useState as f } from "react";
2
- import { AlertCircle as p, AlertTriangle as m, ArrowDown as h, ArrowUp as g, Calendar as _, Check as v, CheckCircle2 as y, ChevronDown as b, ChevronLeft as x, ChevronRight as S, ChevronsUpDown as C, File as w, Info as T, Loader2 as E, Menu as ee, Minus as D, MoreHorizontal as O, Search as k, Sparkles as A, Trash2 as j, UploadCloud as M, User as N, Users as te, X as P, XCircle as F } from "lucide-react";
3
- import { clsx as I } from "clsx";
4
- import { twMerge as L } from "tailwind-merge";
5
- import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
6
- import { createPortal as V } from "react-dom";
1
+ import { Children as e, Fragment as t, cloneElement as n, createContext as r, createElement as i, forwardRef as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
2
+ import { AlertCircle as h, AlertTriangle as g, ArrowDown as _, ArrowUp as v, Calendar as y, Check as b, CheckCircle2 as x, ChevronDown as S, ChevronLeft as C, ChevronRight as w, ChevronsUpDown as T, CircleCheck as E, CircleX as D, Construction as O, Copy as k, File as A, Info as j, Loader2 as M, Menu as N, Minus as P, Moon as F, MoreHorizontal as I, Paperclip as L, Pencil as R, Plus as z, Search as ee, SearchX as te, Sparkles as ne, Sun as re, Trash2 as ie, UploadCloud as ae, User as B, Users as oe, X as V, XCircle as H } from "lucide-react";
3
+ import { clsx as se } from "clsx";
4
+ import { extendTailwindMerge as ce } from "tailwind-merge";
5
+ import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
6
+ import { createPortal as K } from "react-dom";
7
+ import { Controller as le, useForm as ue } from "react-hook-form";
8
+ import { yupResolver as de } from "@hookform/resolvers/yup";
7
9
  //#region src/lib/cn.ts
8
- function H(...e) {
9
- return L(I(e));
10
+ var fe = ce({ extend: { theme: { text: [
11
+ "h-xl",
12
+ "h-lg",
13
+ "h-md",
14
+ "h-std",
15
+ "h-sm",
16
+ "h-xs",
17
+ "p-lg",
18
+ "p-md",
19
+ "p-std",
20
+ "p-sm",
21
+ "p-xs",
22
+ "label-lg",
23
+ "label-md",
24
+ "label-std",
25
+ "label-sm",
26
+ "label-xs",
27
+ "label-xxs"
28
+ ] } } });
29
+ function q(...e) {
30
+ return fe(se(e));
10
31
  }
11
32
  //#endregion
12
- //#region src/components/Accordion/Accordion.tsx
13
- var ne = n(null);
14
- function re() {
15
- let e = s(ne);
33
+ //#region src/components/Divider/Divider.tsx
34
+ var pe = {
35
+ horizontal: "h-0 w-full border-t",
36
+ vertical: "w-0 h-full self-stretch border-l"
37
+ }, me = {
38
+ solid: "border-solid",
39
+ dashed: "border-dashed"
40
+ }, he = {
41
+ default: "border-border-default",
42
+ subtle: "border-border-subtle",
43
+ strong: "border-border-strong",
44
+ brand: "border-border-brand"
45
+ }, ge = a(function({ orientation: e = "horizontal", variant: t = "solid", color: n = "default", className: r, dataTestId: i, ...a }, o) {
46
+ return /* @__PURE__ */ W("div", {
47
+ ref: o,
48
+ role: "separator",
49
+ "aria-orientation": e,
50
+ "data-test-id": i,
51
+ className: q("shrink-0", pe[e], me[t], he[n], r),
52
+ ...a
53
+ });
54
+ }), _e = r(null);
55
+ function ve() {
56
+ let e = c(_e);
16
57
  if (!e) throw Error("AccordionItem must be used inside <Accordion>");
17
58
  return e;
18
59
  }
19
- function U(e) {
60
+ function ye(e) {
20
61
  return e === void 0 ? [] : Array.isArray(e) ? e : [e];
21
62
  }
22
- var W = i(function({ type: e = "single", defaultValue: t, value: n, onValueChange: r, className: i, children: a, dataTestId: o, ...s }, c) {
23
- let [l, u] = f(() => U(t)), d = n !== void 0, p = d ? U(n) : l;
24
- return /* @__PURE__ */ z(ne.Provider, {
63
+ var be = a(function({ type: e = "single", defaultValue: t, value: n, onValueChange: r, animated: i = !0, showDivider: a = !1, className: o, children: s, dataTestId: c, ...l }, u) {
64
+ let [d, f] = m(() => ye(t)), p = n !== void 0, h = p ? ye(n) : d;
65
+ return /* @__PURE__ */ W(_e.Provider, {
25
66
  value: {
26
- openValues: p,
67
+ openValues: h,
27
68
  toggle: (t) => {
28
69
  let n;
29
- n = e === "single" ? p.includes(t) ? [] : [t] : p.includes(t) ? p.filter((e) => e !== t) : [...p, t], d || u(n), r?.(e === "single" ? n[0] ?? "" : n);
30
- }
70
+ n = e === "single" ? h.includes(t) ? [] : [t] : h.includes(t) ? h.filter((e) => e !== t) : [...h, t], p || f(n), r?.(e === "single" ? n[0] ?? "" : n);
71
+ },
72
+ animated: i,
73
+ showDivider: a
31
74
  },
32
- children: /* @__PURE__ */ z("div", {
33
- ref: c,
34
- "data-test-id": o,
35
- className: H("flex flex-col divide-y divide-border-default border border-border-default rounded-lg overflow-hidden bg-bg-default", i),
36
- ...s,
37
- children: a
75
+ children: /* @__PURE__ */ W("div", {
76
+ ref: u,
77
+ "data-test-id": c,
78
+ className: q("flex flex-col divide-y divide-border-default border border-border-default rounded-lg overflow-hidden bg-bg-default", o),
79
+ ...l,
80
+ children: s
38
81
  })
39
82
  });
40
- }), G = i(function({ value: e, title: t, icon: n, disabled: r, className: i, children: a, dataTestId: o, ...s }, c) {
41
- let { openValues: u, toggle: d } = re(), f = u.includes(e), p = l();
42
- return /* @__PURE__ */ B("div", {
83
+ }), xe = a(function({ value: e, title: t, icon: n, disabled: r, className: i, children: a, dataTestId: o, ...s }, c) {
84
+ let { openValues: l, toggle: d, animated: f, showDivider: p } = ve(), m = l.includes(e), h = u(), g = u(), _ = /* @__PURE__ */ G(U, { children: [p && /* @__PURE__ */ W(ge, { className: "mb-4" }), a] });
85
+ return /* @__PURE__ */ G("div", {
43
86
  ref: c,
44
87
  "data-test-id": o,
45
- "data-state": f ? "open" : "closed",
46
- className: H("group", i),
88
+ "data-state": m ? "open" : "closed",
89
+ className: q("group", i),
47
90
  ...s,
48
- children: [/* @__PURE__ */ z("h3", { children: /* @__PURE__ */ B("button", {
91
+ children: [/* @__PURE__ */ W("h3", { children: /* @__PURE__ */ G("button", {
92
+ id: g,
49
93
  type: "button",
50
94
  onClick: () => d(e),
51
95
  disabled: r,
52
- "aria-expanded": f,
53
- "aria-controls": p,
54
- className: H("flex w-full items-center justify-between gap-3 px-5 py-4 text-left", "text-p-md font-medium text-fg-default", "hover:bg-bg-container transition-colors", "focus-visible:outline-none focus-visible:bg-bg-container", "disabled:opacity-50 disabled:cursor-not-allowed"),
55
- children: [/* @__PURE__ */ B("span", {
96
+ "aria-expanded": m,
97
+ "aria-controls": h,
98
+ className: q("flex w-full items-center justify-between gap-3 px-5 py-4 text-left", "text-p-md font-medium text-fg-default", "hover:bg-bg-container transition-colors", "focus-visible:outline-none focus-visible:bg-bg-container", "disabled:opacity-50 disabled:cursor-not-allowed"),
99
+ children: [/* @__PURE__ */ G("span", {
56
100
  className: "inline-flex items-center gap-3",
57
- children: [n && /* @__PURE__ */ z("span", {
101
+ children: [n && /* @__PURE__ */ W("span", {
58
102
  className: "inline-flex text-fg-secondary",
59
103
  children: n
60
104
  }), t]
61
- }), /* @__PURE__ */ z(b, {
62
- className: H("h-5 w-5 shrink-0 text-fg-secondary transition-transform duration-200", f && "rotate-180"),
105
+ }), /* @__PURE__ */ W(S, {
106
+ className: q("h-5 w-5 shrink-0 text-fg-secondary transition-transform duration-200", m && "rotate-180"),
63
107
  "aria-hidden": !0
64
108
  })]
65
- }) }), /* @__PURE__ */ z("div", {
66
- id: p,
109
+ }) }), f ? /* @__PURE__ */ W("div", {
110
+ className: q("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none", m ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
111
+ children: /* @__PURE__ */ W("div", {
112
+ className: "overflow-hidden min-h-0",
113
+ children: /* @__PURE__ */ W("div", {
114
+ id: h,
115
+ role: "region",
116
+ "aria-labelledby": g,
117
+ inert: !m || void 0,
118
+ className: "px-5 pb-4 text-p-std text-fg-secondary",
119
+ children: _
120
+ })
121
+ })
122
+ }) : /* @__PURE__ */ W("div", {
123
+ id: h,
67
124
  role: "region",
68
- hidden: !f,
125
+ "aria-labelledby": g,
126
+ hidden: !m,
69
127
  className: "px-5 pb-4 text-p-std text-fg-secondary",
70
- children: a
128
+ children: _
71
129
  })]
72
130
  });
73
- }), ie = {
131
+ }), Se = {
74
132
  xs: "h-6 w-6 text-p-xs",
75
133
  sm: "h-8 w-8 text-p-sm",
76
134
  md: "h-10 w-10 text-p-std",
77
135
  lg: "h-12 w-12 text-p-md",
78
136
  xl: "h-16 w-16 text-h-xs",
79
137
  "2xl": "h-20 w-20 text-h-xs"
80
- }, ae = {
138
+ }, Ce = {
81
139
  xs: "h-1.5 w-1.5",
82
140
  sm: "h-2 w-2",
83
141
  md: "h-2.5 w-2.5",
84
142
  lg: "h-3 w-3",
85
143
  xl: "h-3.5 w-3.5",
86
144
  "2xl": "h-4 w-4"
87
- }, oe = {
145
+ }, we = {
88
146
  online: "bg-green-500",
89
147
  offline: "bg-gray-400 dark:bg-gray-500",
90
148
  away: "bg-yellow-600",
91
149
  busy: "bg-red-600"
92
- }, se = {
150
+ }, Te = {
93
151
  xs: "-ml-1.5",
94
152
  sm: "-ml-2",
95
153
  md: "-ml-2.5",
@@ -97,11 +155,11 @@ var W = i(function({ type: e = "single", defaultValue: t, value: n, onValueChang
97
155
  xl: "-ml-4",
98
156
  "2xl": "-ml-5"
99
157
  };
100
- function ce(e) {
158
+ function Ee(e) {
101
159
  let t = e.trim().split(/\s+/);
102
160
  return t.length === 0 ? "" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
103
161
  }
104
- function le(e) {
162
+ function De(e) {
105
163
  let t = [
106
164
  "bg-brand-500",
107
165
  "bg-blue-600",
@@ -113,51 +171,66 @@ function le(e) {
113
171
  for (let t = 0; t < e.length; t++) n = (n << 5) - n + e.charCodeAt(t), n |= 0;
114
172
  return t[Math.abs(n) % t.length];
115
173
  }
116
- var K = i(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape: a = "circle", fallback: o, className: s, dataTestId: c, ...l }, u) {
117
- let [d, p] = f(!1), m = !!e && !d, h = n ? ce(n) : "", g = n ? le(n) : "bg-gray-300 dark:bg-gray-600";
118
- return /* @__PURE__ */ B("span", {
174
+ var Oe = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape: a = "circle", fallback: o, className: s, dataTestId: c, ...l }, u) {
175
+ let [d, f] = m(!1), p = !!e && !d, h = n ? Ee(n) : "", g = n ? De(n) : "bg-gray-300 dark:bg-gray-600";
176
+ return /* @__PURE__ */ G("span", {
119
177
  ref: u,
120
178
  "data-test-id": c,
121
- className: H("relative inline-flex shrink-0", s),
179
+ className: q("relative inline-flex shrink-0", s),
122
180
  ...l,
123
- children: [/* @__PURE__ */ z("span", {
124
- className: H("inline-flex items-center justify-center overflow-hidden font-semibold text-white select-none", ie[r], a === "circle" ? "rounded-full" : "rounded-md", !m && g),
125
- children: m ? /* @__PURE__ */ z("img", {
181
+ children: [/* @__PURE__ */ W("span", {
182
+ className: q("inline-flex items-center justify-center overflow-hidden font-semibold text-white select-none", Se[r], a === "circle" ? "rounded-full" : "rounded-md", !p && g),
183
+ children: p ? /* @__PURE__ */ W("img", {
126
184
  src: e,
127
185
  alt: t ?? n ?? "",
128
- onError: () => p(!0),
186
+ onError: () => f(!0),
129
187
  className: "h-full w-full object-cover"
130
- }) : n ? h : o ?? /* @__PURE__ */ z(N, { className: "h-1/2 w-1/2 text-white/90" })
131
- }), i && /* @__PURE__ */ z("span", {
188
+ }) : n ? h : o ?? /* @__PURE__ */ W(B, { className: "h-1/2 w-1/2 text-white/90" })
189
+ }), i && /* @__PURE__ */ W("span", {
132
190
  "aria-label": i,
133
- className: H("absolute right-0 bottom-0 rounded-full ring-2 ring-white", ae[r], oe[i])
191
+ className: q("absolute right-0 bottom-0 rounded-full ring-2 ring-white", Ce[r], we[i])
134
192
  })]
135
193
  });
136
- }), ue = i(function({ size: e = "md", max: t, children: n, className: r, dataTestId: i, ...a }, o) {
194
+ }), ke = a(function({ size: e = "md", max: t, children: n, className: r, dataTestId: i, ...a }, o) {
137
195
  let s = Array.isArray(n) ? n : [n], c = t === void 0 ? s : s.slice(0, t), l = t === void 0 ? 0 : s.length - t;
138
- return /* @__PURE__ */ B("div", {
196
+ return /* @__PURE__ */ G("div", {
139
197
  ref: o,
140
198
  "data-test-id": i,
141
- className: H("inline-flex items-center", r),
199
+ className: q("inline-flex items-center", r),
142
200
  ...a,
143
- children: [c.map((t, n) => /* @__PURE__ */ z("div", {
144
- className: H("rounded-full ring-2 ring-white", n > 0 && se[e]),
201
+ children: [c.map((t, n) => /* @__PURE__ */ W("div", {
202
+ className: q("rounded-full ring-2 ring-white", n > 0 && Te[e]),
145
203
  style: { zIndex: c.length - n },
146
204
  children: t
147
- }, n)), l > 0 && /* @__PURE__ */ z("div", {
148
- className: H("rounded-full ring-2 ring-white", se[e]),
149
- children: /* @__PURE__ */ z(K, {
205
+ }, n)), l > 0 && /* @__PURE__ */ W("div", {
206
+ className: q("rounded-full ring-2 ring-white", Te[e]),
207
+ children: /* @__PURE__ */ W(Oe, {
150
208
  size: e,
151
209
  name: `+${l}`
152
210
  })
153
211
  })]
154
212
  });
155
- }), de = {
156
- lg: "h-7 px-2.5 text-p-std gap-1.5 rounded-md",
157
- md: "h-6 px-2 text-p-sm gap-1 rounded-md",
158
- sm: "h-5 px-1.5 text-p-sm gap-1 rounded",
159
- xs: "h-4 px-1 text-p-xs gap-0.5 rounded"
160
- }, fe = {
213
+ }), Ae = {
214
+ lg: "h-7 px-2.5 text-p-std gap-1.5",
215
+ md: "h-6 px-2 text-p-sm gap-1",
216
+ sm: "h-5 px-1.5 text-p-sm gap-1",
217
+ xs: "h-4 px-1 text-p-xs gap-0.5"
218
+ }, je = {
219
+ lg: "rounded-md",
220
+ md: "rounded-md",
221
+ sm: "rounded",
222
+ xs: "rounded"
223
+ }, Me = {
224
+ lg: "size-2.5",
225
+ md: "size-2",
226
+ sm: "size-1.5",
227
+ xs: "size-1"
228
+ }, Ne = {
229
+ lg: "min-w-7 px-0 justify-center",
230
+ md: "min-w-6 px-0 justify-center",
231
+ sm: "min-w-5 px-0 justify-center",
232
+ xs: "min-w-4 px-0 justify-center"
233
+ }, Pe = {
161
234
  neutral: "bg-bg-subtle text-fg-default border border-border-default",
162
235
  brand: "bg-brand-20 text-brand-800 border border-brand-100",
163
236
  success: "bg-green-50 text-green-800 border border-green-100",
@@ -165,7 +238,7 @@ var K = i(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
165
238
  danger: "bg-red-50 text-red-800 border border-red-100",
166
239
  info: "bg-blue-50 text-blue-800 border border-blue-100",
167
240
  privacy: "bg-purple-50 text-purple-800 border border-purple-100"
168
- }, pe = {
241
+ }, Fe = {
169
242
  neutral: "bg-transparent text-fg-default border border-border-strong",
170
243
  brand: "bg-transparent text-brand-700 border border-brand-500",
171
244
  success: "bg-transparent text-green-700 border border-green-500",
@@ -173,7 +246,7 @@ var K = i(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
173
246
  danger: "bg-transparent text-red-700 border border-red-500",
174
247
  info: "bg-transparent text-blue-700 border border-blue-500",
175
248
  privacy: "bg-transparent text-purple-700 border border-purple-500"
176
- }, me = {
249
+ }, Ie = {
177
250
  neutral: "bg-fg-default text-bg-default",
178
251
  brand: "bg-brand-500 text-white",
179
252
  success: "bg-green-600 text-white",
@@ -181,41 +254,108 @@ var K = i(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
181
254
  danger: "bg-red-700 text-white",
182
255
  info: "bg-blue-600 text-white",
183
256
  privacy: "bg-purple-500 text-white"
184
- }, he = i(function({ variant: e = "neutral", appearance: t = "filled", size: n = "md", leftIcon: r, rightIcon: i, onDismiss: a, className: o, children: s, dataTestId: c, ...l }, u) {
185
- let d = t === "filled" ? fe[e] : t === "outline" ? pe[e] : me[e];
186
- return /* @__PURE__ */ B("span", {
187
- ref: u,
188
- "data-test-id": c,
189
- className: H("inline-flex items-center font-medium whitespace-nowrap select-none", de[n], d, o),
190
- ...l,
257
+ }, Le = {
258
+ filled: "hover:brightness-95 active:brightness-90",
259
+ outline: "hover:bg-bg-subtle active:bg-bg-container",
260
+ accent: "hover:brightness-90 active:brightness-80"
261
+ }, Re = a(function({ variant: e = "neutral", appearance: t = "filled", size: n = "md", shape: r = "rounded", leftIcon: i, rightIcon: a, onDismiss: o, dot: s = !1, withDot: c = !1, disabled: l = !1, interactive: u = !1, className: d, children: f, dataTestId: p, onClick: m, onKeyDown: h, ...g }, _) {
262
+ let v = t === "filled" ? Pe[e] : t === "outline" ? Fe[e] : Ie[e];
263
+ if (s) return /* @__PURE__ */ W("span", {
264
+ ref: _,
265
+ "data-test-id": p,
266
+ "aria-hidden": !g["aria-label"] || void 0,
267
+ onClick: l ? void 0 : m,
268
+ className: q("inline-block shrink-0 rounded-full", Me[n], Ie[e], l && "opacity-50", d),
269
+ ...g
270
+ });
271
+ let y = f == null && !c && !!(i || a), b = r === "pill" ? "rounded-full" : je[n];
272
+ return /* @__PURE__ */ G("span", {
273
+ ref: _,
274
+ "data-test-id": p,
275
+ role: u ? "button" : void 0,
276
+ tabIndex: u && !l ? 0 : void 0,
277
+ "aria-disabled": u && l ? !0 : void 0,
278
+ onClick: l ? void 0 : m,
279
+ onKeyDown: u ? (e) => {
280
+ h?.(e), !(l || !m) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), m(e));
281
+ } : h,
282
+ className: q("inline-flex items-center font-medium whitespace-nowrap select-none", Ae[n], b, v, y && Ne[n], u && !l && q("cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", Le[t]), l && "opacity-50 cursor-not-allowed pointer-events-none", d),
283
+ ...g,
191
284
  children: [
192
- r && /* @__PURE__ */ z("span", {
285
+ c ? /* @__PURE__ */ W("span", {
286
+ className: q("inline-block shrink-0 rounded-full", Me[n], Ie[e]),
287
+ "aria-hidden": !0
288
+ }) : i && /* @__PURE__ */ W("span", {
193
289
  className: "inline-flex shrink-0",
194
- children: r
290
+ children: i
195
291
  }),
196
- s,
197
- i && !a && /* @__PURE__ */ z("span", {
292
+ f,
293
+ a && !o && /* @__PURE__ */ W("span", {
198
294
  className: "inline-flex shrink-0",
199
- children: i
295
+ children: a
200
296
  }),
201
- a && /* @__PURE__ */ z("button", {
297
+ o && /* @__PURE__ */ W("button", {
202
298
  type: "button",
203
- onClick: a,
299
+ onClick: o,
300
+ disabled: l,
204
301
  "aria-label": "Dismiss",
205
302
  className: "inline-flex shrink-0 -mr-0.5 rounded-full p-0.5 hover:bg-black/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
206
- children: /* @__PURE__ */ z(P, { className: "h-3 w-3" })
303
+ children: /* @__PURE__ */ W(V, { className: "h-3 w-3" })
207
304
  })
208
305
  ]
209
306
  });
210
- }), ge = {
307
+ }), ze = {
308
+ md: "text-p-sm",
309
+ sm: "text-p-xs"
310
+ }, Be = "rounded-sm text-fg-tertiary transition-colors hover:text-fg-secondary outline-none focus-visible:ring-2 focus-visible:ring-brand-300", Ve = a(function({ items: e, currentValue: n, onSelect: r, separator: i = "/", size: a = "md", className: o, dataTestId: s, ...c }, l) {
311
+ let u = n ?? e[e.length - 1]?.value;
312
+ return /* @__PURE__ */ W("nav", {
313
+ ref: l,
314
+ "aria-label": "Breadcrumb",
315
+ "data-test-id": s,
316
+ className: q(ze[a], o),
317
+ ...c,
318
+ children: /* @__PURE__ */ W("ol", {
319
+ className: "flex items-center",
320
+ children: e.map((e, n) => {
321
+ let a = e.value === u;
322
+ return /* @__PURE__ */ G(t, { children: [n > 0 && /* @__PURE__ */ W("li", {
323
+ "aria-hidden": "true",
324
+ className: "px-1.5 text-fg-tertiary",
325
+ children: i
326
+ }), /* @__PURE__ */ W("li", {
327
+ className: "flex items-center",
328
+ children: a ? /* @__PURE__ */ W("span", {
329
+ "aria-current": "page",
330
+ className: "font-medium text-fg-default",
331
+ children: e.label
332
+ }) : e.disabled ? /* @__PURE__ */ W("span", {
333
+ className: "cursor-not-allowed text-fg-disabled",
334
+ children: e.label
335
+ }) : e.href ? /* @__PURE__ */ W("a", {
336
+ href: e.href,
337
+ onClick: () => r?.(e.value),
338
+ className: Be,
339
+ children: e.label
340
+ }) : /* @__PURE__ */ W("button", {
341
+ type: "button",
342
+ onClick: () => r?.(e.value),
343
+ className: Be,
344
+ children: e.label
345
+ })
346
+ })] }, e.value);
347
+ })
348
+ })
349
+ });
350
+ }), He = {
211
351
  lg: "h-12 px-5 text-p-md gap-2 rounded-lg",
212
352
  md: "h-10 px-4 text-p-std gap-2 rounded-lg",
213
353
  sm: "h-8 px-3 text-p-sm gap-1.5 rounded-md"
214
- }, _e = {
354
+ }, Ue = {
215
355
  lg: "h-12 w-12 rounded-lg",
216
356
  md: "h-10 w-10 rounded-lg",
217
357
  sm: "h-8 w-8 rounded-md"
218
- }, ve = {
358
+ }, We = {
219
359
  primary: [
220
360
  "bg-brand-500 text-white border border-transparent",
221
361
  "hover:bg-brand-600 active:bg-brand-700",
@@ -240,13 +380,13 @@ var K = i(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
240
380
  "disabled:bg-bg-subtle disabled:text-fg-disabled disabled:cursor-not-allowed",
241
381
  "focus-visible:ring-2 focus-visible:ring-red-300 focus-visible:ring-offset-2"
242
382
  ].join(" ")
243
- }, ye = {
383
+ }, Ge = {
244
384
  primary: "bg-brand-700",
245
385
  secondary: "bg-bg-subtle",
246
386
  tertiary: "bg-bg-subtle",
247
387
  danger: "bg-red-900"
248
- }, be = i(function({ variant: e = "primary", size: t = "md", leftIcon: n, rightIcon: r, loading: i = !1, iconOnly: a = !1, fullWidth: o = !1, pressed: s = !1, disabled: c, className: l, children: u, onClick: d, dataTestId: f, ...p }, m) {
249
- return /* @__PURE__ */ z("button", {
388
+ }, Ke = a(function({ variant: e = "primary", size: t = "md", leftIcon: n, rightIcon: r, loading: i = !1, iconOnly: a = !1, fullWidth: o = !1, pressed: s = !1, disabled: c, className: l, children: u, onClick: d, dataTestId: f, ...p }, m) {
389
+ return /* @__PURE__ */ W("button", {
250
390
  ref: m,
251
391
  disabled: c || i,
252
392
  "aria-pressed": s,
@@ -258,81 +398,108 @@ var K = i(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
258
398
  }
259
399
  d?.(e);
260
400
  },
261
- className: H("inline-flex items-center justify-center font-medium transition-colors outline-none", a ? _e[t] : ge[t], ve[e], s && ye[e], o && "w-full", l),
401
+ className: q("inline-flex items-center justify-center font-medium transition-colors outline-none", a ? Ue[t] : He[t], We[e], s && Ge[e], o && "w-full", l),
262
402
  ...p,
263
- children: i ? /* @__PURE__ */ z(E, {
403
+ children: i ? /* @__PURE__ */ W(M, {
264
404
  className: "h-4 w-4 animate-spin",
265
405
  "aria-hidden": !0
266
- }) : /* @__PURE__ */ B(R, { children: [
267
- n && /* @__PURE__ */ z("span", {
406
+ }) : /* @__PURE__ */ G(U, { children: [
407
+ n && /* @__PURE__ */ W("span", {
268
408
  className: "inline-flex shrink-0",
269
409
  children: n
270
410
  }),
271
411
  u,
272
- r && /* @__PURE__ */ z("span", {
412
+ r && /* @__PURE__ */ W("span", {
273
413
  className: "inline-flex shrink-0",
274
414
  children: r
275
415
  })
276
416
  ] })
277
417
  });
278
- }), xe = {
418
+ }), qe = {
279
419
  horizontal: "flex-row [&>*]:rounded-none [&>*:first-child]:rounded-l-lg [&>*:last-child]:rounded-r-lg [&>*:not(:first-child)]:-ml-px",
280
420
  vertical: "flex-col [&>*]:rounded-none [&>*:first-child]:rounded-t-lg [&>*:last-child]:rounded-b-lg [&>*:not(:first-child)]:-mt-px"
281
- }, Se = i(function({ orientation: e = "horizontal", className: t, children: n, dataTestId: r, ...i }, a) {
282
- return /* @__PURE__ */ z("div", {
421
+ }, Je = a(function({ orientation: e = "horizontal", className: t, children: n, dataTestId: r, ...i }, a) {
422
+ return /* @__PURE__ */ W("div", {
283
423
  ref: a,
284
424
  role: "group",
285
425
  "data-test-id": r,
286
- className: H("inline-flex isolate", xe[e], "[&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10", t),
426
+ className: q("inline-flex isolate", qe[e], "[&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10", t),
287
427
  ...i,
288
428
  children: n
289
429
  });
290
- }), Ce = {
430
+ }), Ye = {
291
431
  elevated: "bg-bg-default border border-border-default shadow-z1",
292
432
  outlined: "bg-bg-default border border-border-default",
293
433
  filled: "bg-bg-container border border-transparent"
294
- }, we = {
434
+ }, Xe = {
295
435
  none: "p-0",
296
436
  sm: "p-4",
297
437
  md: "p-5",
298
438
  lg: "p-6"
299
- }, Te = i(function({ variant: e = "outlined", padding: t = "md", header: n, footer: r, interactive: i = !1, className: a, children: o, dataTestId: s, ...c }, l) {
439
+ }, Ze = a(function({ variant: e = "outlined", padding: t = "md", header: n, footer: r, interactive: i = !1, className: a, children: o, dataTestId: s, ...c }, l) {
300
440
  let u = n || r;
301
- return /* @__PURE__ */ B("div", {
441
+ return /* @__PURE__ */ G("div", {
302
442
  ref: l,
303
443
  "data-test-id": s,
304
- className: H("rounded-xl overflow-hidden", Ce[e], i && "transition-all hover:border-brand-500 hover:shadow-z2", !u && we[t], a),
444
+ className: q("rounded-xl overflow-hidden", Ye[e], i && "transition-all hover:border-brand-500 hover:shadow-z2", !u && Xe[t], a),
305
445
  ...c,
306
446
  children: [
307
- n && /* @__PURE__ */ z("div", {
308
- className: H("border-b border-border-subtle", we[t]),
447
+ n && /* @__PURE__ */ W("div", {
448
+ className: q("border-b border-border-subtle", Xe[t]),
309
449
  children: n
310
450
  }),
311
- u ? /* @__PURE__ */ z("div", {
312
- className: we[t],
451
+ u ? /* @__PURE__ */ W("div", {
452
+ className: Xe[t],
313
453
  children: o
314
454
  }) : o,
315
- r && /* @__PURE__ */ z("div", {
316
- className: H("border-t border-border-subtle", we[t]),
455
+ r && /* @__PURE__ */ W("div", {
456
+ className: q("border-t border-border-subtle", Xe[t]),
317
457
  children: r
318
458
  })
319
459
  ]
320
460
  });
321
- }), Ee = {
461
+ }), Qe = {
462
+ brand: "bg-bg-brand-lighter text-brand-800",
463
+ blue: "bg-bg-info-lighter text-blue-800",
464
+ purple: "bg-purple-50 text-purple-800 dark:bg-purple-900/30 dark:text-purple-200",
465
+ pink: "bg-pink-50 text-pink-800 dark:bg-pink-900/30 dark:text-pink-200",
466
+ yellow: "bg-bg-warning-lighter text-yellow-900",
467
+ gray: "bg-bg-subtle text-fg-secondary"
468
+ }, $e = a(function({ title: e, header: t, children: n, noDivider: r = !1, className: i, dataTestId: a, ...o }, s) {
469
+ let c = e?.placement ?? "left", l = !!e && c !== "top", u = e && /* @__PURE__ */ W("div", {
470
+ className: q("flex shrink-0 items-center justify-center text-center text-label-md font-bold", l ? q("px-2 [writing-mode:vertical-rl]", c === "left" && "rotate-180") : "px-4 py-2", Qe[e.color ?? "gray"]),
471
+ children: e.text
472
+ });
473
+ return /* @__PURE__ */ W(Ze, {
474
+ ref: s,
475
+ dataTestId: a,
476
+ variant: "outlined",
477
+ padding: "none",
478
+ className: i,
479
+ ...o,
480
+ children: /* @__PURE__ */ G("div", {
481
+ className: q("flex", l ? c === "right" ? "flex-row-reverse" : "flex-row" : "flex-col"),
482
+ children: [u, /* @__PURE__ */ G("div", {
483
+ className: q("min-w-0 flex-1", !r && "[&>*:not(:last-child)]:border-b [&>*:not(:last-child)]:border-border-default"),
484
+ children: [t, n]
485
+ })]
486
+ })
487
+ });
488
+ }), et = {
322
489
  md: "h-5 w-5 rounded-sm",
323
490
  sm: "h-4 w-4 rounded-sm"
324
- }, De = {
491
+ }, tt = {
325
492
  md: "h-3.5 w-3.5",
326
493
  sm: "h-3 w-3"
327
- }, Oe = i(function({ size: e = "md", label: t, description: n, indeterminate: r = !1, error: i = !1, id: a, disabled: o, checked: s, defaultChecked: c, className: u, dataTestId: d, ...f }, p) {
328
- let m = l(), h = a ?? m;
329
- return /* @__PURE__ */ B("label", {
494
+ }, nt = a(function({ size: e = "md", label: t, description: n, indeterminate: r = !1, error: i = !1, id: a, disabled: o, checked: s, defaultChecked: c, className: l, dataTestId: d, ...f }, p) {
495
+ let m = u(), h = a ?? m;
496
+ return /* @__PURE__ */ G("label", {
330
497
  htmlFor: h,
331
498
  "data-test-id": d,
332
- className: H("inline-flex items-start gap-2.5 group/checkbox", o ? "cursor-not-allowed opacity-60" : "cursor-pointer", u),
333
- children: [/* @__PURE__ */ B("span", {
499
+ className: q("inline-flex items-start gap-2.5 group/checkbox", o ? "cursor-not-allowed opacity-60" : "cursor-pointer", l),
500
+ children: [/* @__PURE__ */ G("span", {
334
501
  className: "relative inline-flex shrink-0 items-center justify-center mt-0.5",
335
- children: [/* @__PURE__ */ z("input", {
502
+ children: [/* @__PURE__ */ W("input", {
336
503
  ref: p,
337
504
  id: h,
338
505
  type: "checkbox",
@@ -343,30 +510,354 @@ var K = i(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
343
510
  "aria-invalid": i || void 0,
344
511
  "aria-checked": r ? "mixed" : void 0,
345
512
  ...f
346
- }), /* @__PURE__ */ z("span", {
347
- className: H("flex items-center justify-center border transition-colors", Ee[e], !r && "bg-bg-default", i ? "border-red-600" : r ? "border-brand-500" : "border-border-strong", !o && !r && (i ? "peer-hover:border-red-700" : "peer-hover:border-fg-tertiary"), "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", !r && "peer-checked:bg-brand-500 peer-checked:border-brand-500", r && "bg-brand-500", o && !r && "peer-checked:bg-bg-subtle peer-checked:border-border-strong", !r && "[&_svg]:opacity-0 peer-checked:[&_svg]:opacity-100 [&_svg]:transition-opacity"),
348
- children: z(r ? D : v, {
349
- className: H(De[e], "text-white"),
513
+ }), /* @__PURE__ */ W("span", {
514
+ className: q("flex items-center justify-center border transition-colors", et[e], !r && "bg-bg-default", i ? "border-red-600" : r ? "border-brand-500" : "border-border-strong", !o && !r && (i ? "peer-hover:border-red-700" : "peer-hover:border-fg-tertiary"), "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", !r && "peer-checked:bg-brand-500 peer-checked:border-brand-500", r && "bg-brand-500", o && !r && "peer-checked:bg-bg-subtle peer-checked:border-border-strong", !r && "[&_svg]:opacity-0 peer-checked:[&_svg]:opacity-100 [&_svg]:transition-opacity"),
515
+ children: W(r ? P : b, {
516
+ className: q(tt[e], "text-white"),
350
517
  strokeWidth: 3,
351
518
  "aria-hidden": !0
352
519
  })
353
520
  })]
354
- }), (t || n) && /* @__PURE__ */ B("span", {
521
+ }), (t || n) && /* @__PURE__ */ G("span", {
355
522
  className: "flex flex-col gap-0.5",
356
- children: [t && /* @__PURE__ */ z("span", {
523
+ children: [t && /* @__PURE__ */ W("span", {
357
524
  className: "text-p-std font-medium text-fg-default leading-tight",
358
525
  children: t
359
- }), n && /* @__PURE__ */ z("span", {
526
+ }), n && /* @__PURE__ */ W("span", {
360
527
  className: "text-p-sm text-fg-secondary leading-snug",
361
528
  children: n
362
529
  })]
363
530
  })]
364
531
  });
365
- }), ke = {
532
+ });
533
+ //#endregion
534
+ //#region src/lib/mergeRefs.ts
535
+ function J(...e) {
536
+ return (t) => {
537
+ for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
538
+ };
539
+ }
540
+ //#endregion
541
+ //#region src/lib/useFloatingPosition.ts
542
+ var rt = 8, it = 10;
543
+ function at({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center", offset: a = 8, flip: o = !0, shift: s = !0 }) {
544
+ let [c, l] = m({
545
+ style: {
546
+ position: "fixed",
547
+ top: 0,
548
+ left: 0,
549
+ visibility: "hidden"
550
+ },
551
+ arrowStyle: {},
552
+ resolvedSide: r
553
+ });
554
+ return d(() => {
555
+ if (!n || !t) return;
556
+ let c = () => {
557
+ let n = e?.current;
558
+ if (!n) return;
559
+ let c = n.getBoundingClientRect(), u = t.getBoundingClientRect(), d = window.innerWidth, f = window.innerHeight, p = r === "top" || r === "bottom", m = r;
560
+ if (o) if (p) {
561
+ let e = c.top, t = f - c.bottom;
562
+ r === "top" && e < u.height + a && t > e ? m = "bottom" : r === "bottom" && t < u.height + a && e > t && (m = "top");
563
+ } else {
564
+ let e = c.left, t = d - c.right;
565
+ r === "left" && e < u.width + a && t > e ? m = "right" : r === "right" && t < u.width + a && e > t && (m = "left");
566
+ }
567
+ let h = m === "top" || m === "bottom", g, _;
568
+ h ? (g = m === "bottom" ? c.bottom + a : c.top - u.height - a, _ = i === "start" ? c.left : i === "end" ? c.right - u.width : c.left + c.width / 2 - u.width / 2) : (_ = m === "right" ? c.right + a : c.left - u.width - a, g = i === "start" ? c.top : i === "end" ? c.bottom - u.height : c.top + c.height / 2 - u.height / 2), s && (h ? _ = Math.min(Math.max(_, rt), d - u.width - rt) : g = Math.min(Math.max(g, rt), f - u.height - rt));
569
+ let v;
570
+ if (h) {
571
+ let e = c.left + c.width / 2;
572
+ v = {
573
+ left: Math.min(Math.max(e - _, it), u.width - it),
574
+ [m === "bottom" ? "top" : "bottom"]: -8 / 2
575
+ };
576
+ } else {
577
+ let e = c.top + c.height / 2;
578
+ v = {
579
+ top: Math.min(Math.max(e - g, it), u.height - it),
580
+ [m === "right" ? "left" : "right"]: -8 / 2
581
+ };
582
+ }
583
+ l({
584
+ style: {
585
+ position: "fixed",
586
+ top: g,
587
+ left: _
588
+ },
589
+ arrowStyle: v,
590
+ resolvedSide: m
591
+ });
592
+ };
593
+ return c(), window.addEventListener("resize", c), document.addEventListener("scroll", c, {
594
+ capture: !0,
595
+ passive: !0
596
+ }), () => {
597
+ window.removeEventListener("resize", c), document.removeEventListener("scroll", c, { capture: !0 });
598
+ };
599
+ }, [
600
+ n,
601
+ e,
602
+ t,
603
+ r,
604
+ i,
605
+ a,
606
+ o,
607
+ s
608
+ ]), c;
609
+ }
610
+ //#endregion
611
+ //#region src/components/Popover/Popover.tsx
612
+ var ot = {
613
+ bottom: "border-l border-t",
614
+ top: "border-b border-r",
615
+ left: "border-t border-r",
616
+ right: "border-b border-l"
617
+ };
618
+ function st({ content: e, children: t, side: r = "top", align: i = "center", offset: a = 8, open: s, defaultOpen: c = !1, onOpenChange: d, flip: f = !0, showArrow: h = !0, closeOnScroll: g = !0, autoFocus: _ = !1, container: v, className: y, dataTestId: b }) {
619
+ let [x, S] = m(c), C = s !== void 0, w = C ? s : x, T = p(null), [E, D] = m(null), O = u(), k = (e) => {
620
+ C || S(e), d?.(e);
621
+ }, { style: A, arrowStyle: j, resolvedSide: M } = at({
622
+ anchor: T,
623
+ panel: E,
624
+ open: w,
625
+ side: r,
626
+ align: i,
627
+ offset: a,
628
+ flip: f
629
+ });
630
+ if (l(() => {
631
+ if (!w) return;
632
+ let e = (e) => {
633
+ let t = e.target;
634
+ E?.contains(t) || T.current?.contains(t) || k(!1);
635
+ }, t = (e) => {
636
+ e.key === "Escape" && k(!1);
637
+ };
638
+ return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
639
+ document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
640
+ };
641
+ }, [w, E]), l(() => {
642
+ if (!w || !g) return;
643
+ let e = () => k(!1);
644
+ return document.addEventListener("scroll", e, {
645
+ capture: !0,
646
+ passive: !0
647
+ }), () => document.removeEventListener("scroll", e, { capture: !0 });
648
+ }, [w, g]), l(() => {
649
+ if (!w || !_ || !E) return;
650
+ let e = document.activeElement;
651
+ return (E.querySelector("a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])") ?? E).focus(), () => e?.focus?.();
652
+ }, [
653
+ w,
654
+ _,
655
+ E
656
+ ]), !o(t)) return t;
657
+ let N = t.props ?? {}, P = t.ref, F = n(t, {
658
+ ref: J(T, P),
659
+ onClick: (e) => {
660
+ N.onClick?.(e), e.defaultPrevented || k(!w);
661
+ },
662
+ "aria-haspopup": "dialog",
663
+ "aria-expanded": w
664
+ }), I = v ?? (typeof document < "u" ? document.body : null);
665
+ return /* @__PURE__ */ G(U, { children: [F, w && I && K(/* @__PURE__ */ G("div", {
666
+ ref: J(D),
667
+ id: O,
668
+ role: "dialog",
669
+ "aria-label": typeof e == "string" ? e : void 0,
670
+ tabIndex: -1,
671
+ "data-side": M,
672
+ "data-test-id": b,
673
+ style: A,
674
+ className: q("fixed z-50 max-w-60 max-h-54 overflow-auto rounded-lg border border-border-default bg-bg-default p-3 text-fg-default shadow-z4", y),
675
+ children: [e, h && /* @__PURE__ */ W("span", {
676
+ "aria-hidden": !0,
677
+ style: j,
678
+ className: q("absolute size-2 rotate-45 bg-bg-default", ot[M])
679
+ })]
680
+ }), I)] });
681
+ }
682
+ //#endregion
683
+ //#region src/components/Copy/Copy.tsx
684
+ var ct = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to clipboard", timeout: r = 1500, icon: i, onCopy: a, onError: o, disabled: s, dataTestId: c, ...u }, d) {
685
+ let [f, h] = m(!1), g = p(null), _ = typeof navigator < "u" && typeof navigator.clipboard?.writeText == "function";
686
+ return l(() => () => {
687
+ g.current && clearTimeout(g.current);
688
+ }, []), /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(st, {
689
+ open: f,
690
+ content: t,
691
+ side: "top",
692
+ align: "center",
693
+ children: /* @__PURE__ */ W(Ke, {
694
+ ref: d,
695
+ type: "button",
696
+ variant: "tertiary",
697
+ iconOnly: !0,
698
+ size: "sm",
699
+ disabled: s || !_,
700
+ onClick: () => {
701
+ _ && navigator.clipboard.writeText(e).then(() => {
702
+ a?.(e), h(!0), g.current && clearTimeout(g.current), g.current = setTimeout(() => h(!1), r);
703
+ }, (e) => o?.(e));
704
+ },
705
+ "aria-label": n,
706
+ dataTestId: c,
707
+ ...u,
708
+ children: f ? /* @__PURE__ */ W(b, { className: "size-4" }) : i ?? /* @__PURE__ */ W(k, { className: "size-4" })
709
+ })
710
+ }), /* @__PURE__ */ W("span", {
711
+ role: "status",
712
+ "aria-live": "polite",
713
+ className: "sr-only",
714
+ children: f ? t : ""
715
+ })] });
716
+ }), lt = {
717
+ lg: "h-12 text-p-md",
718
+ md: "h-10 text-p-std",
719
+ sm: "h-8 text-p-sm"
720
+ }, ut = {
721
+ lg: "pl-10",
722
+ md: "pl-9",
723
+ sm: "pl-8"
724
+ }, dt = {
725
+ lg: "pr-10",
726
+ md: "pr-9",
727
+ sm: "pr-8"
728
+ }, ft = {
729
+ lg: "w-10",
730
+ md: "w-9",
731
+ sm: "w-8"
732
+ }, pt = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, size: i = "md", leftIcon: a, rightIcon: o, leftAddon: s, rightAddon: c, error: l = !1, id: d, disabled: f, className: p, wrapperClassName: m, required: g, dataTestId: _, ...v }, y) {
733
+ let b = u(), x = d ?? b, S = r ? `${x}-error` : n ? `${x}-help` : void 0, C = l || !!r;
734
+ return /* @__PURE__ */ G("div", {
735
+ className: q("flex flex-col gap-1.5 w-full", m),
736
+ "data-test-id": _,
737
+ children: [
738
+ (e || t) && /* @__PURE__ */ G("div", {
739
+ className: "flex items-center gap-1.5",
740
+ children: [e && /* @__PURE__ */ G("label", {
741
+ htmlFor: x,
742
+ className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
743
+ children: [e, g && /* @__PURE__ */ W("span", {
744
+ className: "text-red-600",
745
+ "aria-hidden": !0,
746
+ children: "*"
747
+ })]
748
+ }), t && /* @__PURE__ */ W("span", {
749
+ className: "inline-flex items-center gap-1",
750
+ children: t
751
+ })]
752
+ }),
753
+ /* @__PURE__ */ G("div", {
754
+ className: q("flex items-stretch w-full rounded-lg bg-bg-default transition-colors", "border", C ? "border-red-600" : "border-border-default", !f && !C && "hover:border-border-strong", "focus-within:ring-2 focus-within:ring-offset-0", C ? "focus-within:ring-red-300 focus-within:border-red-600" : "focus-within:ring-brand-300 focus-within:border-brand-500", f && "bg-bg-container border-border-default cursor-not-allowed", lt[i]),
755
+ children: [
756
+ s && /* @__PURE__ */ W("span", {
757
+ className: "inline-flex items-center px-3 text-fg-secondary bg-bg-container border-r border-border-default rounded-l-lg whitespace-nowrap",
758
+ children: s
759
+ }),
760
+ /* @__PURE__ */ G("div", {
761
+ className: "relative flex-1 min-w-0",
762
+ children: [
763
+ a && /* @__PURE__ */ W("span", {
764
+ "aria-hidden": !0,
765
+ className: q("absolute inset-y-0 left-0 flex items-center justify-center text-fg-secondary pointer-events-none", ft[i]),
766
+ children: a
767
+ }),
768
+ /* @__PURE__ */ W("input", {
769
+ ref: y,
770
+ id: x,
771
+ disabled: f,
772
+ required: g,
773
+ "aria-invalid": C || void 0,
774
+ "aria-describedby": S,
775
+ className: q("w-full h-full bg-transparent outline-none", "placeholder:text-fg-tertiary text-fg-default", "disabled:cursor-not-allowed disabled:text-fg-disabled", a ? ut[i] : "pl-3", o || C ? dt[i] : "pr-3", p),
776
+ ...v
777
+ }),
778
+ (o || C) && /* @__PURE__ */ W("span", {
779
+ "aria-hidden": !0,
780
+ className: q("absolute inset-y-0 right-0 flex items-center justify-center pointer-events-none", ft[i], C ? "text-red-600" : "text-fg-secondary"),
781
+ children: C ? /* @__PURE__ */ W(h, { className: "h-4 w-4" }) : o
782
+ })
783
+ ]
784
+ }),
785
+ c && /* @__PURE__ */ W("span", {
786
+ className: "inline-flex items-center px-3 text-fg-secondary bg-bg-container border-l border-border-default rounded-r-lg whitespace-nowrap",
787
+ children: c
788
+ })
789
+ ]
790
+ }),
791
+ r ? /* @__PURE__ */ W("p", {
792
+ id: `${x}-error`,
793
+ className: "text-p-sm text-red-700",
794
+ children: r
795
+ }) : n ? /* @__PURE__ */ W("p", {
796
+ id: `${x}-help`,
797
+ className: "text-p-sm text-fg-secondary",
798
+ children: n
799
+ }) : null
800
+ ]
801
+ });
802
+ }), mt = "inline-flex items-center justify-center text-fg-secondary transition-colors hover:text-fg-default disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none", ht = a(function({ value: e, defaultValue: t = 0, onValueChange: n, min: r = 0, max: i = 2 ** 53 - 1, step: a = 1, size: o = "md", label: s, helperText: c, errorText: u, error: d, disabled: f, className: p, wrapperClassName: h, dataTestId: g, ..._ }, v) {
803
+ let y = e !== void 0, [b, x] = m(t), S = y ? e : b, [C, w] = m(String(S));
804
+ l(() => {
805
+ w(String(S));
806
+ }, [S]);
807
+ let T = (e) => {
808
+ let t = Math.min(i, Math.max(r, e));
809
+ return y || x(t), n?.(t), t;
810
+ };
811
+ return /* @__PURE__ */ W(pt, {
812
+ ref: v,
813
+ type: "number",
814
+ min: r,
815
+ max: i,
816
+ step: a,
817
+ size: o,
818
+ label: s,
819
+ helperText: c,
820
+ errorText: u,
821
+ error: d,
822
+ disabled: f,
823
+ dataTestId: g,
824
+ wrapperClassName: q("max-w-[140px]", h),
825
+ value: C,
826
+ onChange: (e) => {
827
+ w(e.target.value);
828
+ },
829
+ onBlur: () => {
830
+ let e = Number.parseInt(C, 10);
831
+ if (Number.isNaN(e)) {
832
+ w(String(S));
833
+ return;
834
+ }
835
+ w(String(T(e)));
836
+ },
837
+ leftAddon: /* @__PURE__ */ W("button", {
838
+ type: "button",
839
+ disabled: f || S <= r,
840
+ onClick: () => T(S - a),
841
+ "aria-label": "Decrease",
842
+ className: mt,
843
+ children: /* @__PURE__ */ W(P, { className: "size-4" })
844
+ }),
845
+ rightAddon: /* @__PURE__ */ W("button", {
846
+ type: "button",
847
+ disabled: f || S >= i,
848
+ onClick: () => T(S + a),
849
+ "aria-label": "Increase",
850
+ className: mt,
851
+ children: /* @__PURE__ */ W(z, { className: "size-4" })
852
+ }),
853
+ className: q("text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", p),
854
+ ..._
855
+ });
856
+ }), gt = {
366
857
  lg: "h-12 text-p-md px-3.5",
367
858
  md: "h-10 text-p-std px-3",
368
859
  sm: "h-8 text-p-sm px-2.5"
369
- }, Ae = [
860
+ }, _t = [
370
861
  "Jan",
371
862
  "Feb",
372
863
  "Mar",
@@ -379,7 +870,7 @@ var K = i(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
379
870
  "Oct",
380
871
  "Nov",
381
872
  "Dec"
382
- ], je = [
873
+ ], vt = [
383
874
  "Mo",
384
875
  "Tu",
385
876
  "We",
@@ -388,35 +879,35 @@ var K = i(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
388
879
  "Sa",
389
880
  "Su"
390
881
  ];
391
- function Me(e) {
882
+ function yt(e) {
392
883
  return new Date(e.getFullYear(), e.getMonth(), 1);
393
884
  }
394
- function Ne(e, t) {
885
+ function bt(e, t) {
395
886
  return !!e && !!t && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
396
887
  }
397
- function Pe(e) {
888
+ function xt(e) {
398
889
  return `${String(e.getDate()).padStart(2, "0")}.${String(e.getMonth() + 1).padStart(2, "0")}.${e.getFullYear()}`;
399
890
  }
400
- function Fe(e) {
401
- let t = (Me(e).getDay() + 6) % 7, n = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate(), r = [];
891
+ function St(e) {
892
+ let t = (yt(e).getDay() + 6) % 7, n = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate(), r = [];
402
893
  for (let e = 0; e < t; e++) r.push(null);
403
894
  for (let t = 1; t <= n; t++) r.push(new Date(e.getFullYear(), e.getMonth(), t));
404
895
  for (; r.length % 7 != 0;) r.push(null);
405
896
  return r;
406
897
  }
407
- var Ie = i(function({ value: e, onChange: t, range: n = !1, rangeValue: r, onChangeRange: i, size: a = "md", label: o, placeholder: s = "Select date", fullWidth: u = !1, id: p, className: m, wrapperClassName: h, dataTestId: g }, v) {
408
- let y = l(), b = p ?? y, [C, w] = f(!1), [T, E] = f(e ?? r?.start ?? /* @__PURE__ */ new Date()), [ee, D] = f(null), O = d(null);
409
- c(() => {
410
- if (!C) return;
898
+ var Ct = a(function({ value: e, onChange: t, range: n = !1, rangeValue: r, onChangeRange: i, size: a = "md", label: o, placeholder: s = "Select date", fullWidth: c = !1, id: d, className: f, wrapperClassName: h, dataTestId: g }, _) {
899
+ let v = u(), b = d ?? v, [x, S] = m(!1), [T, E] = m(e ?? r?.start ?? /* @__PURE__ */ new Date()), [D, O] = m(null), k = p(null);
900
+ l(() => {
901
+ if (!x) return;
411
902
  let e = (e) => {
412
- O.current && !O.current.contains(e.target) && w(!1);
903
+ k.current && !k.current.contains(e.target) && S(!1);
413
904
  };
414
905
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
415
- }, [C]);
416
- let k = n ? r?.start ? `${Pe(r.start)}${r.end ? ` – ${Pe(r.end)}` : ""}` : "" : e ? Pe(e) : "";
417
- function A(e) {
906
+ }, [x]);
907
+ let A = n ? r?.start ? `${xt(r.start)}${r.end ? ` – ${xt(r.end)}` : ""}` : "" : e ? xt(e) : "";
908
+ function j(e) {
418
909
  if (!n) {
419
- t?.(e), w(!1);
910
+ t?.(e), S(!1);
420
911
  return;
421
912
  }
422
913
  let a = r ?? {
@@ -440,73 +931,73 @@ var Ie = i(function({ value: e, onChange: t, range: n = !1, rangeValue: r, onCha
440
931
  i?.({
441
932
  start: a.start,
442
933
  end: e
443
- }), w(!1);
934
+ }), S(!1);
444
935
  }
445
- let j = Fe(T), M = r ?? {
936
+ let M = St(T), N = r ?? {
446
937
  start: null,
447
938
  end: null
448
- }, N = M.end ?? ee;
449
- return /* @__PURE__ */ B("div", {
450
- ref: O,
939
+ }, P = N.end ?? D;
940
+ return /* @__PURE__ */ G("div", {
941
+ ref: k,
451
942
  "data-test-id": g,
452
- className: H("flex flex-col gap-1.5", u && "w-full", h),
453
- children: [o && /* @__PURE__ */ z("label", {
943
+ className: q("flex flex-col gap-1.5", c && "w-full", h),
944
+ children: [o && /* @__PURE__ */ W("label", {
454
945
  htmlFor: b,
455
946
  className: "text-p-std font-medium text-fg-default inline-flex",
456
947
  children: o
457
- }), /* @__PURE__ */ B("div", {
948
+ }), /* @__PURE__ */ G("div", {
458
949
  className: "relative",
459
- children: [/* @__PURE__ */ B("button", {
460
- ref: v,
950
+ children: [/* @__PURE__ */ G("button", {
951
+ ref: _,
461
952
  id: b,
462
953
  type: "button",
463
- onClick: () => w((e) => !e),
464
- className: H("inline-flex items-center gap-2 rounded-lg border border-border-default bg-bg-default text-left transition-colors hover:border-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:border-brand-500", u ? "w-full min-w-0" : "min-w-[260px]", ke[a], m),
465
- children: [/* @__PURE__ */ z("span", {
466
- className: H("flex-1 text-left truncate", k ? "text-fg-default" : "text-fg-tertiary"),
467
- children: k || s
468
- }), /* @__PURE__ */ z(_, { className: "w-4 h-4 text-fg-secondary" })]
469
- }), C && /* @__PURE__ */ B("div", {
954
+ onClick: () => S((e) => !e),
955
+ className: q("inline-flex items-center gap-2 rounded-lg border border-border-default bg-bg-default text-left transition-colors hover:border-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:border-brand-500", c ? "w-full min-w-0" : "min-w-[260px]", gt[a], f),
956
+ children: [/* @__PURE__ */ W("span", {
957
+ className: q("flex-1 text-left truncate", A ? "text-fg-default" : "text-fg-tertiary"),
958
+ children: A || s
959
+ }), /* @__PURE__ */ W(y, { className: "w-4 h-4 text-fg-secondary" })]
960
+ }), x && /* @__PURE__ */ G("div", {
470
961
  className: "absolute z-50 mt-1 left-0 rounded-xl border border-border-default bg-bg-default shadow-z3 p-3 w-[300px]",
471
- children: [/* @__PURE__ */ B("div", {
962
+ children: [/* @__PURE__ */ G("div", {
472
963
  className: "flex items-center justify-between mb-2",
473
964
  children: [
474
- /* @__PURE__ */ z("button", {
965
+ /* @__PURE__ */ W("button", {
475
966
  type: "button",
476
967
  className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
477
968
  onClick: () => E(new Date(T.getFullYear(), T.getMonth() - 1, 1)),
478
969
  "aria-label": "Previous month",
479
- children: /* @__PURE__ */ z(x, { className: "w-4 h-4" })
970
+ children: /* @__PURE__ */ W(C, { className: "w-4 h-4" })
480
971
  }),
481
- /* @__PURE__ */ B("div", {
972
+ /* @__PURE__ */ G("div", {
482
973
  className: "text-p-md font-semibold text-fg-default",
483
974
  children: [
484
- Ae[T.getMonth()],
975
+ _t[T.getMonth()],
485
976
  " ",
486
977
  T.getFullYear()
487
978
  ]
488
979
  }),
489
- /* @__PURE__ */ z("button", {
980
+ /* @__PURE__ */ W("button", {
490
981
  type: "button",
491
982
  className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
492
983
  onClick: () => E(new Date(T.getFullYear(), T.getMonth() + 1, 1)),
493
984
  "aria-label": "Next month",
494
- children: /* @__PURE__ */ z(S, { className: "w-4 h-4" })
985
+ children: /* @__PURE__ */ W(w, { className: "w-4 h-4" })
495
986
  })
496
987
  ]
497
- }), /* @__PURE__ */ B("div", {
988
+ }), /* @__PURE__ */ G("div", {
498
989
  className: "grid grid-cols-7 gap-1 text-center",
499
- children: [je.map((e) => /* @__PURE__ */ z("div", {
990
+ children: [vt.map((e) => /* @__PURE__ */ W("div", {
500
991
  className: "text-p-xs text-fg-tertiary py-1",
501
992
  children: e
502
- }, e)), j.map((t, r) => {
503
- if (!t) return /* @__PURE__ */ z("div", {}, r);
504
- let i = !n && Ne(t, e ?? null), a = n && Ne(t, M.start), o = n && Ne(t, N), s = n && !!M.start && !!N && t > M.start && t < N;
505
- return /* @__PURE__ */ z("button", {
993
+ }, e)), M.map((t, r) => {
994
+ if (!t) return /* @__PURE__ */ W("div", {}, r);
995
+ let i = !n && bt(t, e ?? null), a = n && bt(t, N.start), o = n && bt(t, P), s = n && !!N.start && !!P && t > N.start && t < P;
996
+ return /* @__PURE__ */ W("button", {
506
997
  type: "button",
507
- onMouseEnter: () => n && M.start && !M.end && D(t),
508
- onClick: () => A(t),
509
- className: H("h-8 rounded-md text-p-sm font-medium", i || a || o ? "bg-brand-500 text-white" : s ? "bg-bg-brand-lighter text-brand-700" : "text-fg-default hover:bg-bg-container"),
998
+ onMouseEnter: () => n && N.start && !N.end && O(t),
999
+ onClick: () => j(t),
1000
+ className: q("h-8 rounded-md text-p-sm font-medium", i || a || o ? "bg-brand-500 text-white" : s ? "bg-bg-brand-lighter text-brand-700" : "text-fg-default hover:bg-bg-container"),
510
1001
  children: t.getDate()
511
1002
  }, r);
512
1003
  })]
@@ -514,300 +1005,381 @@ var Ie = i(function({ value: e, onChange: t, range: n = !1, rangeValue: r, onCha
514
1005
  })]
515
1006
  })]
516
1007
  });
517
- }), Le = {
518
- horizontal: "h-0 w-full border-t",
519
- vertical: "w-0 h-full self-stretch border-l"
520
- }, Re = {
521
- solid: "border-solid",
522
- dashed: "border-dashed"
523
- }, ze = {
524
- default: "border-border-default",
525
- subtle: "border-border-subtle",
526
- strong: "border-border-strong",
527
- brand: "border-border-brand"
528
- }, Be = i(function({ orientation: e = "horizontal", variant: t = "solid", color: n = "default", className: r, dataTestId: i, ...a }, o) {
529
- return /* @__PURE__ */ z("div", {
530
- ref: o,
531
- role: "separator",
532
- "aria-orientation": e,
533
- "data-test-id": i,
534
- className: H("shrink-0", Le[e], Re[t], ze[n], r),
535
- ...a
1008
+ }), wt = {
1009
+ brand: "bg-brand-500",
1010
+ blue: "bg-blue-500",
1011
+ purple: "bg-purple-500",
1012
+ pink: "bg-pink-500",
1013
+ yellow: "bg-yellow-500",
1014
+ red: "bg-red-500",
1015
+ gray: "bg-gray-400"
1016
+ }, Tt = {
1017
+ sm: "h-1",
1018
+ lg: "h-2"
1019
+ }, Et = (e) => new Intl.NumberFormat().format(e), Dt = a(function({ segments: e, hideLegend: t = !1, formatValue: n = Et, size: r = "lg", className: i, dataTestId: a, ...o }, s) {
1020
+ let c = e.reduce((e, t) => e + t.value, 0);
1021
+ return /* @__PURE__ */ G("div", {
1022
+ ref: s,
1023
+ "data-test-id": a,
1024
+ className: q("flex flex-col gap-3", i),
1025
+ ...o,
1026
+ children: [/* @__PURE__ */ W("div", {
1027
+ className: q("flex w-full overflow-hidden rounded-full bg-bg-subtle", Tt[r]),
1028
+ children: e.map((e, t) => /* @__PURE__ */ W("div", {
1029
+ style: { flexBasis: `${c > 0 ? e.value / c * 100 : 0}%` },
1030
+ className: q("transition-[flex-basis] duration-700 ease-out", wt[e.color])
1031
+ }, t))
1032
+ }), !t && /* @__PURE__ */ W("ul", {
1033
+ className: "flex flex-col [&>li:not(:last-child)]:border-b [&>li:not(:last-child)]:border-border-default",
1034
+ children: e.filter((e) => !e.hideFromLegend).map((e, t) => /* @__PURE__ */ G("li", {
1035
+ className: "flex items-center justify-between gap-3 py-1.5",
1036
+ children: [/* @__PURE__ */ G("span", {
1037
+ className: "flex min-w-0 items-center gap-2",
1038
+ children: [/* @__PURE__ */ W("span", { className: q("size-2 shrink-0 rounded-full", wt[e.color]) }), /* @__PURE__ */ W("span", {
1039
+ className: "truncate text-p-sm text-fg-tertiary",
1040
+ children: e.label
1041
+ })]
1042
+ }), /* @__PURE__ */ G("span", {
1043
+ className: "shrink-0 text-p-sm text-fg-default tabular-nums",
1044
+ children: [n(e.value), e.unit ? ` ${e.unit}` : ""]
1045
+ })]
1046
+ }, t))
1047
+ })]
536
1048
  });
537
- }), Ve = {
1049
+ }), Ot = {
1050
+ fast: 150,
1051
+ base: 200,
1052
+ slow: 300
1053
+ };
1054
+ function kt() {
1055
+ return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1056
+ }
1057
+ //#endregion
1058
+ //#region src/lib/useMountTransition.ts
1059
+ function At(e, t) {
1060
+ let [n, r] = m(e), [i, a] = m(e ? "entered" : "closed"), o = p(null), s = p(null);
1061
+ return l(() => {
1062
+ o.current && clearTimeout(o.current), s.current && cancelAnimationFrame(s.current), e ? (r(!0), a("entering"), s.current = requestAnimationFrame(() => {
1063
+ s.current = requestAnimationFrame(() => a("entered"));
1064
+ })) : (() => {
1065
+ a((e) => e === "closed" ? "closed" : "exiting");
1066
+ let e = kt() ? 0 : t;
1067
+ e === 0 ? (r(!1), a("closed")) : o.current = setTimeout(() => {
1068
+ r(!1), a("closed");
1069
+ }, e);
1070
+ })();
1071
+ }, [e, t]), l(() => () => {
1072
+ o.current && clearTimeout(o.current), s.current && cancelAnimationFrame(s.current);
1073
+ }, []), {
1074
+ mounted: n,
1075
+ state: i
1076
+ };
1077
+ }
1078
+ //#endregion
1079
+ //#region src/components/Drawer/Drawer.tsx
1080
+ var jt = {
538
1081
  sm: "w-[320px]",
539
1082
  md: "w-[420px]",
540
1083
  lg: "w-[560px]",
541
1084
  xl: "w-[720px]"
542
- }, He = {
1085
+ }, Mt = {
543
1086
  sm: "h-[240px]",
544
1087
  md: "h-[360px]",
545
1088
  lg: "h-[480px]",
546
1089
  xl: "h-[600px]"
547
- }, Ue = {
1090
+ }, Nt = {
548
1091
  right: "inset-y-0 right-0 border-l",
549
1092
  left: "inset-y-0 left-0 border-r",
550
1093
  top: "inset-x-0 top-0 border-b",
551
1094
  bottom: "inset-x-0 bottom-0 border-t"
552
- };
553
- function We(...e) {
554
- return (t) => {
555
- for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
556
- };
557
- }
558
- var Ge = i(function({ open: e, onClose: t, side: n = "right", size: r = "md", title: i, description: a, children: o, footer: s, closeOnOverlayClick: l = !0, showClose: u = !0, className: f, dataTestId: p }, m) {
559
- let h = d(null);
560
- if (c(() => {
561
- if (!e) return;
562
- let n = (e) => {
1095
+ }, Pt = {
1096
+ right: "translate-x-full",
1097
+ left: "-translate-x-full",
1098
+ top: "-translate-y-full",
1099
+ bottom: "translate-y-full"
1100
+ }, Ft = a(function({ open: e, onClose: t, side: n = "right", size: r = "md", title: i, description: a, children: o, footer: s, closeOnOverlayClick: c = !0, showClose: u = !0, animated: d = !0, headerActions: f, className: m, dataTestId: h }, g) {
1101
+ let _ = p(null), { mounted: v, state: y } = At(e, d ? Ot.slow : 0), b = y === "entered";
1102
+ if (l(() => {
1103
+ if (!v) return;
1104
+ let e = (e) => {
563
1105
  e.key === "Escape" && t();
564
1106
  };
565
- document.addEventListener("keydown", n);
566
- let r = document.body.style.overflow;
1107
+ document.addEventListener("keydown", e);
1108
+ let n = document.body.style.overflow;
567
1109
  return document.body.style.overflow = "hidden", () => {
568
- document.removeEventListener("keydown", n), document.body.style.overflow = r;
1110
+ document.removeEventListener("keydown", e), document.body.style.overflow = n;
569
1111
  };
570
- }, [e, t]), c(() => {
1112
+ }, [v, t]), l(() => {
571
1113
  if (!e) return;
572
1114
  let t = document.activeElement;
573
- return h.current?.focus(), () => t?.focus?.();
574
- }, [e]), !e) return null;
575
- let g = n === "left" || n === "right", _ = g ? Ve[r] : He[r];
576
- return V(/* @__PURE__ */ B("div", {
1115
+ return _.current?.focus(), () => t?.focus?.();
1116
+ }, [e]), !v) return null;
1117
+ let x = n === "left" || n === "right", S = x ? jt[r] : Mt[r];
1118
+ return K(/* @__PURE__ */ G("div", {
577
1119
  role: "dialog",
578
1120
  "aria-modal": "true",
1121
+ "aria-hidden": y === "exiting" || void 0,
579
1122
  "aria-labelledby": i ? "drawer-title" : void 0,
580
1123
  "aria-describedby": a ? "drawer-desc" : void 0,
581
1124
  className: "fixed inset-0 z-50",
582
- "data-test-id": p,
583
- children: [/* @__PURE__ */ z("div", {
584
- className: "absolute inset-0 bg-black/50",
585
- onClick: () => l && t(),
1125
+ "data-test-id": h,
1126
+ children: [/* @__PURE__ */ W("div", {
1127
+ className: q("absolute inset-0 bg-black/50", d && "transition-opacity duration-200 motion-reduce:transition-none", b ? "opacity-100" : "opacity-0"),
1128
+ onClick: () => c && t(),
586
1129
  "aria-hidden": !0
587
- }), /* @__PURE__ */ B("div", {
588
- ref: We(m, h),
1130
+ }), /* @__PURE__ */ G("div", {
1131
+ ref: J(g, _),
589
1132
  tabIndex: -1,
590
- className: H("absolute bg-bg-default shadow-z5 outline-none flex flex-col", Ue[n], g ? `${_} h-full max-w-full` : `${_} w-full max-h-full`, "border-border-default", f),
1133
+ className: q("absolute bg-bg-default shadow-z5 outline-none flex flex-col", Nt[n], x ? `${S} h-full max-w-full` : `${S} w-full max-h-full`, "border-border-default", d && "transition-transform duration-300 ease-out motion-reduce:transition-none will-change-transform", b ? "translate-x-0 translate-y-0" : Pt[n], m),
591
1134
  children: [
592
- (i || u) && /* @__PURE__ */ B("div", {
1135
+ (i || u || f) && /* @__PURE__ */ G("div", {
593
1136
  className: "flex items-start justify-between gap-4 px-6 pt-6 pb-4 border-b border-border-default",
594
- children: [/* @__PURE__ */ B("div", {
1137
+ children: [/* @__PURE__ */ G("div", {
595
1138
  className: "flex-1 min-w-0",
596
- children: [i && /* @__PURE__ */ z("h2", {
1139
+ children: [i && /* @__PURE__ */ W("h2", {
597
1140
  id: "drawer-title",
598
1141
  className: "text-h-xs font-semibold text-fg-default",
599
1142
  children: i
600
- }), a && /* @__PURE__ */ z("p", {
1143
+ }), a && /* @__PURE__ */ W("p", {
601
1144
  id: "drawer-desc",
602
1145
  className: "mt-1 text-p-std text-fg-secondary",
603
1146
  children: a
604
1147
  })]
605
- }), u && /* @__PURE__ */ z("button", {
606
- type: "button",
607
- onClick: t,
608
- "aria-label": "Close",
609
- className: "-mr-2 -mt-2 p-2 rounded-md text-fg-secondary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
610
- children: /* @__PURE__ */ z(P, { className: "h-5 w-5" })
1148
+ }), /* @__PURE__ */ G("div", {
1149
+ className: "flex items-center gap-1 shrink-0 -mr-2 -mt-2",
1150
+ children: [f, u && /* @__PURE__ */ W("button", {
1151
+ type: "button",
1152
+ onClick: t,
1153
+ "aria-label": "Close",
1154
+ className: "p-2 rounded-md text-fg-secondary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
1155
+ children: /* @__PURE__ */ W(V, { className: "h-5 w-5" })
1156
+ })]
611
1157
  })]
612
1158
  }),
613
- o && /* @__PURE__ */ z("div", {
1159
+ o && /* @__PURE__ */ W("div", {
614
1160
  className: "flex-1 overflow-y-auto px-6 py-4",
615
1161
  children: o
616
1162
  }),
617
- s && /* @__PURE__ */ z("div", {
1163
+ s && /* @__PURE__ */ W("div", {
618
1164
  className: "flex items-center justify-end gap-2 px-6 py-4 border-t border-border-default bg-bg-container",
619
1165
  children: s
620
1166
  })
621
1167
  ]
622
1168
  })]
623
1169
  }), document.body);
624
- }), Ke = n(null);
625
- function qe() {
626
- let e = s(Ke);
1170
+ }), It = 8;
1171
+ function Lt({ anchor: e, panel: t, open: n, side: r = "bottom", align: i = "start", offset: a = 4, flip: o = !0, shift: s = !0, matchAnchorWidth: c = !1 }) {
1172
+ let [l, u] = m({
1173
+ style: {
1174
+ position: "fixed",
1175
+ top: 0,
1176
+ left: 0,
1177
+ visibility: "hidden"
1178
+ },
1179
+ resolvedSide: r
1180
+ });
1181
+ return d(() => {
1182
+ if (!n || !t) return;
1183
+ let l = () => {
1184
+ let n = e?.current;
1185
+ if (!n) return;
1186
+ let l = n.getBoundingClientRect(), d = t.getBoundingClientRect(), f = window.innerHeight, p = window.innerWidth, m = r;
1187
+ if (o) {
1188
+ let e = f - l.bottom, t = l.top;
1189
+ r === "bottom" && e < d.height + a && t > e ? m = "top" : r === "top" && t < d.height + a && e > t && (m = "bottom");
1190
+ }
1191
+ let h = m === "bottom" ? l.bottom + a : l.top - d.height - a, g = i === "end" ? l.right - d.width : l.left;
1192
+ s && (g = Math.min(Math.max(g, It), p - d.width - It)), u({
1193
+ style: {
1194
+ position: "fixed",
1195
+ top: h,
1196
+ left: g,
1197
+ minWidth: c ? l.width : void 0
1198
+ },
1199
+ resolvedSide: m
1200
+ });
1201
+ };
1202
+ return l(), window.addEventListener("resize", l), document.addEventListener("scroll", l, {
1203
+ capture: !0,
1204
+ passive: !0
1205
+ }), () => {
1206
+ window.removeEventListener("resize", l), document.removeEventListener("scroll", l, { capture: !0 });
1207
+ };
1208
+ }, [
1209
+ n,
1210
+ e,
1211
+ t,
1212
+ r,
1213
+ i,
1214
+ a,
1215
+ o,
1216
+ s,
1217
+ c
1218
+ ]), l;
1219
+ }
1220
+ //#endregion
1221
+ //#region src/components/DropdownMenu/DropdownMenu.tsx
1222
+ var Rt = r(null);
1223
+ function zt() {
1224
+ let e = c(Rt);
627
1225
  if (!e) throw Error("Dropdown parts must be used inside <DropdownMenu>");
628
1226
  return e;
629
1227
  }
630
- function Je(...e) {
631
- return (t) => {
632
- for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
633
- };
634
- }
635
- var Ye = i(function({ children: e, defaultOpen: t = !1, open: n, onOpenChange: r, className: i, dataTestId: a, ...o }, s) {
636
- let [l, u] = f(t), p = n !== void 0, m = p ? n : l, h = d(null), g = (e) => {
637
- p || u(e), r?.(e);
1228
+ var Bt = a(function({ children: e, defaultOpen: t = !1, open: n, onOpenChange: r, anchorRef: i, className: a, dataTestId: o, ...s }, c) {
1229
+ let [u, d] = m(t), f = n !== void 0, h = f ? n : u, g = p(null), _ = (e) => {
1230
+ f || d(e), r?.(e);
638
1231
  };
639
- return c(() => {
640
- if (!m) return;
1232
+ return l(() => {
1233
+ if (!h) return;
641
1234
  let e = (e) => {
642
- e.key === "Escape" && g(!1);
1235
+ e.key === "Escape" && _(!1);
643
1236
  };
644
1237
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
645
- }, [m]), /* @__PURE__ */ z(Ke.Provider, {
1238
+ }, [h]), /* @__PURE__ */ W(Rt.Provider, {
646
1239
  value: {
647
- open: m,
648
- setOpen: g,
649
- triggerRef: h
1240
+ open: h,
1241
+ setOpen: _,
1242
+ triggerRef: g,
1243
+ anchorRef: i
650
1244
  },
651
- children: /* @__PURE__ */ z("div", {
652
- ref: s,
653
- "data-test-id": a,
654
- className: H("relative inline-block", i),
655
- ...o,
1245
+ children: /* @__PURE__ */ W("div", {
1246
+ ref: c,
1247
+ "data-test-id": o,
1248
+ className: q("relative inline-block", a),
1249
+ ...s,
656
1250
  children: e
657
1251
  })
658
1252
  });
659
1253
  });
660
- function Xe({ children: e }) {
661
- let { open: n, setOpen: r, triggerRef: i } = qe();
662
- if (!a(e)) return e;
663
- let o = e.props ?? {};
664
- return t(e, {
1254
+ function Vt({ children: e }) {
1255
+ let { open: t, setOpen: r, triggerRef: i } = zt();
1256
+ if (!o(e)) return e;
1257
+ let a = e.props ?? {};
1258
+ return n(e, {
665
1259
  ref: i,
666
1260
  onClick: (e) => {
667
- let t = o.onClick;
668
- t?.(e), e.defaultPrevented || r(!n);
1261
+ let n = a.onClick;
1262
+ n?.(e), e.defaultPrevented || r(!t);
669
1263
  },
670
1264
  "aria-haspopup": "menu",
671
- "aria-expanded": n
1265
+ "aria-expanded": t
672
1266
  });
673
1267
  }
674
- var Ze = i(function({ children: e, align: t = "start", className: n, dataTestId: r, ...i }, a) {
675
- let { open: o, setOpen: s, triggerRef: l } = qe(), u = d(null);
676
- return c(() => {
677
- if (!o) return;
1268
+ var Ht = "min-w-[200px] rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 py-1", Ut = a(function({ children: e, align: t = "start", strategy: n = "fixed", side: r = "bottom", sideOffset: i = 4, flip: a = !0, shift: o = !0, matchTriggerWidth: s = !1, closeOnScroll: c = !1, className: u, dataTestId: d, ...f }, h) {
1269
+ let { open: g, setOpen: _, triggerRef: v, anchorRef: y } = zt(), b = p(null), [x, S] = m(null), { style: C, resolvedSide: w } = Lt({
1270
+ anchor: y ?? v,
1271
+ panel: x,
1272
+ open: g && n === "fixed",
1273
+ side: r,
1274
+ align: t,
1275
+ offset: i,
1276
+ flip: a,
1277
+ shift: o,
1278
+ matchAnchorWidth: s
1279
+ });
1280
+ if (l(() => {
1281
+ if (!g) return;
678
1282
  let e = (e) => {
679
1283
  let t = e.target;
680
- u.current?.contains(t) || l.current?.contains(t) || s(!1);
1284
+ b.current?.contains(t) || v.current?.contains(t) || y?.current?.contains(t) || _(!1);
681
1285
  };
682
1286
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
683
1287
  }, [
684
- o,
685
- s,
686
- l
687
- ]), o ? /* @__PURE__ */ z("div", {
688
- ref: Je(a, u),
1288
+ g,
1289
+ _,
1290
+ v,
1291
+ y
1292
+ ]), l(() => {
1293
+ if (!g || !c) return;
1294
+ let e = () => _(!1);
1295
+ return document.addEventListener("scroll", e, {
1296
+ capture: !0,
1297
+ passive: !0
1298
+ }), () => document.removeEventListener("scroll", e, { capture: !0 });
1299
+ }, [
1300
+ g,
1301
+ c,
1302
+ _
1303
+ ]), l(() => {
1304
+ if (!g) return;
1305
+ let e = requestAnimationFrame(() => {
1306
+ (b.current?.querySelector("[role=\"menuitem\"]:not(:disabled)"))?.focus();
1307
+ });
1308
+ return () => cancelAnimationFrame(e);
1309
+ }, [g]), !g) return null;
1310
+ let T = /* @__PURE__ */ W("div", {
1311
+ ref: J(h, b, n === "fixed" ? S : void 0),
689
1312
  role: "menu",
690
- "data-test-id": r,
691
- className: H("absolute top-full mt-1 min-w-[200px] rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 py-1", t === "end" ? "right-0" : "left-0", n),
692
- ...i,
1313
+ "data-test-id": d,
1314
+ "data-side": n === "fixed" ? w : void 0,
1315
+ "data-align": t,
1316
+ onKeyDown: (e) => {
1317
+ let t = Array.from(b.current?.querySelectorAll("[role=\"menuitem\"]:not(:disabled)") ?? []);
1318
+ if (!t.length) return;
1319
+ let n = t.indexOf(document.activeElement);
1320
+ e.key === "ArrowDown" ? (e.preventDefault(), t[(n + 1 + t.length) % t.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), t[(n - 1 + t.length) % t.length]?.focus()) : e.key === "Home" ? (e.preventDefault(), t[0]?.focus()) : e.key === "End" && (e.preventDefault(), t[t.length - 1]?.focus());
1321
+ },
1322
+ style: n === "fixed" ? C : void 0,
1323
+ className: q(Ht, n === "absolute" && q("absolute top-full mt-1", t === "end" ? "right-0" : "left-0"), u),
1324
+ ...f,
693
1325
  children: e
694
- }) : null;
695
- }), Qe = i(function({ children: e, onSelect: t, disabled: n, icon: r, shortcut: i, destructive: a, checked: o, className: s, dataTestId: c, onClick: l, ...u }, d) {
696
- let { setOpen: f } = qe();
697
- return /* @__PURE__ */ B("button", {
698
- ref: d,
1326
+ });
1327
+ return n === "fixed" ? K(T, document.body) : T;
1328
+ }), Wt = a(function({ children: e, onSelect: t, disabled: n, icon: r, shortcut: i, destructive: a, checked: o, meta: s, className: c, dataTestId: l, onClick: u, ...d }, f) {
1329
+ let { setOpen: p } = zt();
1330
+ return /* @__PURE__ */ G("button", {
1331
+ ref: f,
699
1332
  type: "button",
700
1333
  role: "menuitem",
701
1334
  disabled: n,
702
- "data-test-id": c,
1335
+ "data-test-id": l,
703
1336
  onClick: (e) => {
704
- l?.(e), t?.(), f(!1);
1337
+ u?.(e), t?.(), p(!1);
705
1338
  },
706
- className: H("flex w-full items-center gap-2 px-3 py-2 text-left text-p-std text-fg-default", "hover:bg-bg-subtle focus-visible:outline-none focus-visible:bg-bg-subtle", n && "opacity-50 cursor-not-allowed hover:bg-transparent", a && "text-red-700 hover:bg-red-50", s),
707
- ...u,
1339
+ className: q("flex w-full gap-2 px-3 py-2 text-left text-p-std text-fg-default", s ? "items-start" : "items-center", "hover:bg-bg-subtle focus-visible:outline-none focus-visible:bg-bg-subtle", n && "opacity-50 cursor-not-allowed hover:bg-transparent", a && "text-red-700 hover:bg-red-50", c),
1340
+ ...d,
708
1341
  children: [
709
- o !== void 0 && /* @__PURE__ */ z("span", {
1342
+ o !== void 0 && /* @__PURE__ */ W("span", {
710
1343
  className: "w-4 shrink-0",
711
- children: o && /* @__PURE__ */ z(v, { className: "h-4 w-4 text-brand-500" })
1344
+ children: o && /* @__PURE__ */ W(b, { className: "h-4 w-4 text-brand-500" })
712
1345
  }),
713
- r && /* @__PURE__ */ z("span", {
1346
+ r && /* @__PURE__ */ W("span", {
714
1347
  className: "inline-flex shrink-0 text-fg-secondary",
715
1348
  children: r
716
1349
  }),
717
- /* @__PURE__ */ z("span", {
718
- className: "flex-1 truncate",
719
- children: e
1350
+ /* @__PURE__ */ G("span", {
1351
+ className: "flex-1 min-w-0 text-left",
1352
+ children: [/* @__PURE__ */ W("span", {
1353
+ className: "block truncate",
1354
+ children: e
1355
+ }), s && /* @__PURE__ */ W("span", {
1356
+ className: "block truncate text-p-sm text-fg-tertiary",
1357
+ children: s
1358
+ })]
720
1359
  }),
721
- i && /* @__PURE__ */ z("span", {
1360
+ i && /* @__PURE__ */ W("span", {
722
1361
  className: "text-p-sm text-fg-tertiary shrink-0 tabular-nums",
723
1362
  children: i
724
1363
  })
725
1364
  ]
726
1365
  });
727
- }), $e = i(function({ className: e, dataTestId: t, ...n }, r) {
728
- return /* @__PURE__ */ z("div", {
1366
+ }), Gt = a(function({ className: e, dataTestId: t, ...n }, r) {
1367
+ return /* @__PURE__ */ W("div", {
729
1368
  ref: r,
730
1369
  role: "separator",
731
1370
  "data-test-id": t,
732
- className: H("my-1 h-px bg-border-default", e),
1371
+ className: q("my-1 h-px bg-border-default", e),
733
1372
  ...n
734
1373
  });
735
- }), et = i(function({ children: e, className: t, dataTestId: n, ...r }, i) {
736
- return /* @__PURE__ */ z("div", {
1374
+ }), Kt = a(function({ children: e, className: t, dataTestId: n, ...r }, i) {
1375
+ return /* @__PURE__ */ W("div", {
737
1376
  ref: i,
738
1377
  "data-test-id": n,
739
- className: H("px-3 py-1.5 text-p-xs font-semibold uppercase tracking-wider text-fg-tertiary", t),
1378
+ className: q("px-3 py-1.5 text-p-xs font-semibold uppercase tracking-wider text-fg-tertiary", t),
740
1379
  ...r,
741
1380
  children: e
742
1381
  });
743
- }), tt = {
744
- lg: "h-10 px-3 text-p-std gap-2",
745
- md: "h-9 px-2.5 text-p-std gap-1.5",
746
- sm: "h-8 px-2 text-p-sm gap-1.5"
747
- };
748
- function nt(...e) {
749
- return (t) => {
750
- for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
751
- };
752
- }
753
- var rt = i(function({ label: e, value: t, active: n = !1, size: r = "md", disabled: i, onClear: a, children: o, className: s, dataTestId: l, ...u }, p) {
754
- let [m, h] = f(!1), g = d(null);
755
- c(() => {
756
- if (!m) return;
757
- let e = (e) => {
758
- g.current?.contains(e.target) || h(!1);
759
- };
760
- return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
761
- }, [m]);
762
- let _ = n || t !== void 0;
763
- return /* @__PURE__ */ B("div", {
764
- ref: nt(p, g),
765
- "data-test-id": l,
766
- className: H("relative inline-flex", s),
767
- ...u,
768
- children: [/* @__PURE__ */ B("button", {
769
- type: "button",
770
- disabled: i,
771
- onClick: () => h((e) => !e),
772
- "aria-haspopup": "dialog",
773
- "aria-expanded": m,
774
- className: H("inline-flex items-center rounded-full border transition-colors outline-none", tt[r], _ ? "bg-brand-20 text-brand-800 border-brand-500" : "bg-bg-default text-fg-default border-border-default", !i && "hover:border-border-strong", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", i && "bg-bg-container text-fg-disabled cursor-not-allowed"),
775
- children: [
776
- /* @__PURE__ */ z("span", {
777
- className: "font-medium",
778
- children: e
779
- }),
780
- t !== void 0 && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z("span", {
781
- className: "mx-0.5 text-fg-tertiary",
782
- "aria-hidden": !0,
783
- children: "•"
784
- }), /* @__PURE__ */ z("span", {
785
- className: "font-semibold truncate max-w-[140px]",
786
- children: t
787
- })] }),
788
- _ && a ? /* @__PURE__ */ z("span", {
789
- role: "button",
790
- tabIndex: 0,
791
- "aria-label": "Clear filter",
792
- onClick: (e) => {
793
- e.stopPropagation(), a();
794
- },
795
- onKeyDown: (e) => {
796
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), a());
797
- },
798
- className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-black/10",
799
- children: /* @__PURE__ */ z(P, { className: "h-3 w-3" })
800
- }) : /* @__PURE__ */ z(b, {
801
- className: H("h-4 w-4 text-fg-secondary transition-transform", m && "rotate-180"),
802
- "aria-hidden": !0
803
- })
804
- ]
805
- }), m && o && /* @__PURE__ */ z("div", {
806
- className: "absolute left-0 top-full mt-1 min-w-[220px] rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 p-3",
807
- children: o
808
- })]
809
- });
810
- }), it = {
1382
+ }), qt = {
811
1383
  brand: {
812
1384
  bg: "bg-bg-brand-lighter",
813
1385
  icon: "text-brand-700"
@@ -844,7 +1416,7 @@ var rt = i(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
844
1416
  bg: "bg-bg-danger-lighter",
845
1417
  icon: "text-red-700"
846
1418
  }
847
- }, at = {
1419
+ }, Jt = {
848
1420
  sm: {
849
1421
  box: "h-8 w-8",
850
1422
  icon: "h-4 w-4",
@@ -865,207 +1437,382 @@ var rt = i(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
865
1437
  icon: "h-7 w-7",
866
1438
  radius: "rounded-xl"
867
1439
  }
868
- }, ot = i(function({ icon: e, tone: t = "gray", size: n = "md", shape: r = "rounded", className: i, dataTestId: a, ...o }, s) {
869
- let c = it[t], l = at[n];
870
- return /* @__PURE__ */ z("div", {
1440
+ }, Yt = a(function({ icon: e, tone: t = "gray", size: n = "md", shape: r = "rounded", className: i, dataTestId: a, ...o }, s) {
1441
+ let c = qt[t], l = Jt[n];
1442
+ return /* @__PURE__ */ W("div", {
871
1443
  ref: s,
872
1444
  "data-test-id": a,
873
1445
  "aria-hidden": !o["aria-label"] || void 0,
874
- className: H("inline-flex items-center justify-center shrink-0", l.box, r === "circle" ? "rounded-full" : l.radius, c.bg, i),
1446
+ className: q("inline-flex items-center justify-center shrink-0", l.box, r === "circle" ? "rounded-full" : l.radius, c.bg, i),
875
1447
  ...o,
876
- children: /* @__PURE__ */ z(e, { className: H(l.icon, c.icon) })
1448
+ children: /* @__PURE__ */ W(e, { className: q(l.icon, c.icon) })
1449
+ });
1450
+ }), Xt = {
1451
+ "h-xl": "text-h-xl",
1452
+ "h-lg": "text-h-lg",
1453
+ "h-md": "text-h-md",
1454
+ "h-std": "text-h-std",
1455
+ "h-sm": "text-h-sm",
1456
+ "h-xs": "text-h-xs",
1457
+ "p-lg": "text-p-lg",
1458
+ "p-md": "text-p-md",
1459
+ "p-std": "text-p-std",
1460
+ "p-sm": "text-p-sm",
1461
+ "p-xs": "text-p-xs",
1462
+ "label-lg": "text-label-lg",
1463
+ "label-md": "text-label-md",
1464
+ "label-std": "text-label-std",
1465
+ "label-sm": "text-label-sm",
1466
+ "label-xs": "text-label-xs",
1467
+ "label-xxs": "text-label-xxs"
1468
+ }, Zt = {
1469
+ normal: "font-normal",
1470
+ medium: "font-medium",
1471
+ semibold: "font-semibold",
1472
+ bold: "font-bold"
1473
+ }, Qt = {
1474
+ default: "text-fg-default",
1475
+ secondary: "text-fg-secondary",
1476
+ tertiary: "text-fg-tertiary",
1477
+ disabled: "text-fg-disabled",
1478
+ inverse: "text-fg-inverse",
1479
+ brand: "text-fg-brand",
1480
+ info: "text-fg-info",
1481
+ success: "text-fg-success",
1482
+ warning: "text-fg-warning",
1483
+ danger: "text-fg-danger"
1484
+ }, $t = {
1485
+ "h-xl": "h1",
1486
+ "h-lg": "h1",
1487
+ "h-md": "h2",
1488
+ "h-std": "h3",
1489
+ "h-sm": "h4",
1490
+ "h-xs": "h5",
1491
+ "p-lg": "p",
1492
+ "p-md": "p",
1493
+ "p-std": "p",
1494
+ "p-sm": "p",
1495
+ "p-xs": "p",
1496
+ "label-lg": "span",
1497
+ "label-md": "span",
1498
+ "label-std": "span",
1499
+ "label-sm": "span",
1500
+ "label-xs": "span",
1501
+ "label-xxs": "span"
1502
+ }, en = a(function({ variant: e = "p-std", weight: t, color: n = "default", as: r, truncate: a, clamp: o, style: s, className: c, children: l, dataTestId: u, ...d }, f) {
1503
+ return i(r ?? $t[e], {
1504
+ ref: f,
1505
+ "data-test-id": u,
1506
+ className: q(Xt[e], t && Zt[t], Qt[n], a && "truncate", o && !a && "overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]", c),
1507
+ style: o && !a ? {
1508
+ ...s,
1509
+ WebkitLineClamp: o
1510
+ } : s,
1511
+ ...d
1512
+ }, l);
1513
+ }), tn = {
1514
+ lg: "py-20 px-6 gap-2",
1515
+ sm: "py-10 px-4 gap-1"
1516
+ }, nn = {
1517
+ lg: "xl",
1518
+ sm: "lg"
1519
+ }, rn = a(function({ size: e = "lg", title: t, description: n, illustration: r, action: i, className: a, dataTestId: o, ...s }, c) {
1520
+ return /* @__PURE__ */ G("div", {
1521
+ ref: c,
1522
+ "data-test-id": o,
1523
+ className: q("flex flex-col items-center justify-center text-center", tn[e], a),
1524
+ ...s,
1525
+ children: [
1526
+ r ?? /* @__PURE__ */ W(Yt, {
1527
+ icon: te,
1528
+ tone: "gray",
1529
+ shape: "circle",
1530
+ size: nn[e]
1531
+ }),
1532
+ t && /* @__PURE__ */ W(en, {
1533
+ as: "h3",
1534
+ variant: e === "lg" ? "h-sm" : "h-xs",
1535
+ weight: "semibold",
1536
+ className: "mt-2",
1537
+ children: t
1538
+ }),
1539
+ n && /* @__PURE__ */ W(en, {
1540
+ variant: e === "lg" ? "p-sm" : "p-xs",
1541
+ color: "secondary",
1542
+ className: "max-w-sm",
1543
+ children: n
1544
+ }),
1545
+ i && /* @__PURE__ */ W("div", {
1546
+ className: "mt-4",
1547
+ children: i
1548
+ })
1549
+ ]
1550
+ });
1551
+ }), an = {
1552
+ lg: "h-10 px-3 text-p-std gap-2",
1553
+ md: "h-9 px-2.5 text-p-std gap-1.5",
1554
+ sm: "h-8 px-2 text-p-sm gap-1.5"
1555
+ };
1556
+ function on(...e) {
1557
+ return (t) => {
1558
+ for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
1559
+ };
1560
+ }
1561
+ var sn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabled: i, onClear: a, children: o, className: s, dataTestId: c, ...u }, d) {
1562
+ let [f, h] = m(!1), g = p(null);
1563
+ l(() => {
1564
+ if (!f) return;
1565
+ let e = (e) => {
1566
+ g.current?.contains(e.target) || h(!1);
1567
+ };
1568
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1569
+ }, [f]);
1570
+ let _ = n || t !== void 0;
1571
+ return /* @__PURE__ */ G("div", {
1572
+ ref: on(d, g),
1573
+ "data-test-id": c,
1574
+ className: q("relative inline-flex", s),
1575
+ ...u,
1576
+ children: [/* @__PURE__ */ G("button", {
1577
+ type: "button",
1578
+ disabled: i,
1579
+ onClick: () => h((e) => !e),
1580
+ "aria-haspopup": "dialog",
1581
+ "aria-expanded": f,
1582
+ className: q("inline-flex items-center rounded-full border transition-colors outline-none", an[r], _ ? "bg-brand-20 text-brand-800 border-brand-500" : "bg-bg-default text-fg-default border-border-default", !i && "hover:border-border-strong", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", i && "bg-bg-container text-fg-disabled cursor-not-allowed"),
1583
+ children: [
1584
+ /* @__PURE__ */ W("span", {
1585
+ className: "font-medium",
1586
+ children: e
1587
+ }),
1588
+ t !== void 0 && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", {
1589
+ className: "mx-0.5 text-fg-tertiary",
1590
+ "aria-hidden": !0,
1591
+ children: "•"
1592
+ }), /* @__PURE__ */ W("span", {
1593
+ className: "font-semibold truncate max-w-[140px]",
1594
+ children: t
1595
+ })] }),
1596
+ _ && a ? /* @__PURE__ */ W("span", {
1597
+ role: "button",
1598
+ tabIndex: 0,
1599
+ "aria-label": "Clear filter",
1600
+ onClick: (e) => {
1601
+ e.stopPropagation(), a();
1602
+ },
1603
+ onKeyDown: (e) => {
1604
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), a());
1605
+ },
1606
+ className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-black/10",
1607
+ children: /* @__PURE__ */ W(V, { className: "h-3 w-3" })
1608
+ }) : /* @__PURE__ */ W(S, {
1609
+ className: q("h-4 w-4 text-fg-secondary transition-transform", f && "rotate-180"),
1610
+ "aria-hidden": !0
1611
+ })
1612
+ ]
1613
+ }), f && o && /* @__PURE__ */ W("div", {
1614
+ className: "absolute left-0 top-full mt-1 min-w-[220px] rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 p-3",
1615
+ children: o
1616
+ })]
877
1617
  });
878
- }), st = i(function({ icon: e, iconTone: t = "brand", label: n, value: r, action: i, className: a, dataTestId: o, ...s }, c) {
879
- return /* @__PURE__ */ B("div", {
1618
+ }), cn = r(null), ln = a(function({ children: e, className: t, validationSchema: n, defaultValues: r, buttons: i, mode: a = "onBlur", shouldUnregister: o, shouldFocusError: s = !0, formId: c, onSubmit: l, dataTestId: u, ...d }, f) {
1619
+ let { handleSubmit: p, register: m, setValue: h, control: g, formState: _, getValues: v, watch: y, reset: b, clearErrors: x, setError: S, trigger: C, getFieldState: w, unregister: T } = ue({
1620
+ mode: a,
1621
+ resolver: de(n),
1622
+ defaultValues: r,
1623
+ shouldFocusError: s,
1624
+ shouldUnregister: o
1625
+ }), { errors: E, isDirty: D, isSubmitted: O, isSubmitting: k, dirtyFields: A, isValid: j } = _, M = p((e) => {
1626
+ l?.(e, _);
1627
+ }), N = {
1628
+ control: g,
1629
+ register: m,
1630
+ errors: E,
1631
+ setValue: h,
1632
+ getValues: v,
1633
+ watch: y,
1634
+ reset: b,
1635
+ trigger: C,
1636
+ clearErrors: x,
1637
+ setError: S,
1638
+ getFieldState: w,
1639
+ unregister: T,
1640
+ isDirty: D,
1641
+ isSubmitted: O,
1642
+ isSubmitting: k,
1643
+ isValid: j,
1644
+ dirtyFields: A,
1645
+ submit: M
1646
+ };
1647
+ return /* @__PURE__ */ W("form", {
1648
+ ref: f,
1649
+ id: c,
1650
+ onSubmit: M,
1651
+ "data-test-id": u,
1652
+ className: q("flex flex-col gap-4", t),
1653
+ ...d,
1654
+ children: /* @__PURE__ */ G(cn.Provider, {
1655
+ value: N,
1656
+ children: [e, i && i.length > 0 && /* @__PURE__ */ W("div", {
1657
+ className: "flex items-center gap-3",
1658
+ "data-test-id": u ? `${u}-buttons` : void 0,
1659
+ children: i.map((e, t) => /* @__PURE__ */ W(Ke, { ...e }, t))
1660
+ })]
1661
+ })
1662
+ });
1663
+ }), un = a(function({ name: e, defaultValue: t, render: n, className: r, dataTestId: i, ...a }, o) {
1664
+ let s = c(cn);
1665
+ if (!s) throw Error("FormField must be rendered inside a FormContainer.");
1666
+ return /* @__PURE__ */ W("div", {
1667
+ ref: o,
1668
+ className: q(r),
1669
+ "data-test-id": i,
1670
+ ...a,
1671
+ children: /* @__PURE__ */ W(le, {
1672
+ control: s.control,
1673
+ name: e,
1674
+ defaultValue: t,
1675
+ render: ({ field: e, fieldState: t }) => n({
1676
+ ...e,
1677
+ error: !!t.error,
1678
+ errorText: t.error?.message,
1679
+ dataTestId: i
1680
+ })
1681
+ })
1682
+ });
1683
+ }), dn = a(function({ icon: e, iconTone: t = "brand", label: n, value: r, action: i, className: a, dataTestId: o, ...s }, c) {
1684
+ return /* @__PURE__ */ G("div", {
880
1685
  ref: c,
881
1686
  "data-test-id": o,
882
- className: H("flex items-start gap-3", a),
1687
+ className: q("flex items-start gap-3", a),
883
1688
  ...s,
884
1689
  children: [
885
- /* @__PURE__ */ z(ot, {
1690
+ /* @__PURE__ */ W(Yt, {
886
1691
  icon: e,
887
1692
  tone: t,
888
1693
  size: "md"
889
1694
  }),
890
- /* @__PURE__ */ B("div", {
1695
+ /* @__PURE__ */ G("div", {
891
1696
  className: "min-w-0 flex-1",
892
- children: [/* @__PURE__ */ z("div", {
1697
+ children: [/* @__PURE__ */ W("div", {
893
1698
  className: "text-p-xs font-medium uppercase tracking-widest text-fg-tertiary",
894
1699
  children: n
895
- }), /* @__PURE__ */ z("div", {
1700
+ }), /* @__PURE__ */ W("div", {
896
1701
  className: "text-p-std font-semibold text-fg-default mt-1 break-words",
897
1702
  children: r
898
1703
  })]
899
1704
  }),
900
- i && /* @__PURE__ */ z("div", {
1705
+ i && /* @__PURE__ */ W("div", {
901
1706
  className: "shrink-0 flex items-center",
902
1707
  children: i
903
1708
  })
904
1709
  ]
905
1710
  });
906
- }), ct = {
1711
+ }), fn = {
907
1712
  success: {
908
1713
  container: "bg-green-50 border-green-200",
909
1714
  iconColor: "text-green-600",
910
- DefaultIcon: y
1715
+ DefaultIcon: x
911
1716
  },
912
1717
  warning: {
913
1718
  container: "bg-yellow-50 border-yellow-200",
914
1719
  iconColor: "text-yellow-800",
915
- DefaultIcon: m
1720
+ DefaultIcon: g
916
1721
  },
917
1722
  danger: {
918
1723
  container: "bg-red-50 border-red-200",
919
1724
  iconColor: "text-red-700",
920
- DefaultIcon: F
1725
+ DefaultIcon: H
921
1726
  },
922
1727
  info: {
923
1728
  container: "bg-blue-50 border-blue-200",
924
1729
  iconColor: "text-blue-700",
925
- DefaultIcon: T
1730
+ DefaultIcon: j
926
1731
  },
927
1732
  discovery: {
928
1733
  container: "bg-purple-50 border-purple-200",
929
1734
  iconColor: "text-purple-700",
930
- DefaultIcon: A
1735
+ DefaultIcon: ne
931
1736
  }
932
- }, lt = i(function({ variant: e = "info", title: t, description: n, onDismiss: r, actions: i, icon: a, className: o, dataTestId: s, ...c }, l) {
933
- let { container: u, iconColor: d, DefaultIcon: f } = ct[e];
934
- return /* @__PURE__ */ B("div", {
1737
+ }, pn = a(function({ variant: e = "info", title: t, description: n, onDismiss: r, actions: i, icon: a, className: o, dataTestId: s, ...c }, l) {
1738
+ let { container: u, iconColor: d, DefaultIcon: f } = fn[e];
1739
+ return /* @__PURE__ */ G("div", {
935
1740
  ref: l,
936
1741
  role: "alert",
937
1742
  "data-test-id": s,
938
- className: H("flex gap-3 p-4 border rounded-lg", u, o),
1743
+ className: q("flex gap-3 p-4 border rounded-lg", u, o),
939
1744
  ...c,
940
1745
  children: [
941
- /* @__PURE__ */ z("div", {
942
- className: H("flex-shrink-0 mt-0.5", d),
943
- children: a ?? /* @__PURE__ */ z(f, {
1746
+ /* @__PURE__ */ W("div", {
1747
+ className: q("flex-shrink-0 mt-0.5", d),
1748
+ children: a ?? /* @__PURE__ */ W(f, {
944
1749
  className: "h-5 w-5",
945
1750
  "aria-hidden": !0
946
1751
  })
947
1752
  }),
948
- /* @__PURE__ */ B("div", {
1753
+ /* @__PURE__ */ G("div", {
949
1754
  className: "flex-1 min-w-0",
950
1755
  children: [
951
- t && /* @__PURE__ */ z("div", {
1756
+ t && /* @__PURE__ */ W("div", {
952
1757
  className: "text-p-std font-semibold text-fg-default mb-0.5",
953
1758
  children: t
954
1759
  }),
955
- n && /* @__PURE__ */ z("div", {
1760
+ n && /* @__PURE__ */ W("div", {
956
1761
  className: "text-p-std text-fg-secondary",
957
1762
  children: n
958
1763
  }),
959
- i && /* @__PURE__ */ z("div", {
1764
+ i && /* @__PURE__ */ W("div", {
960
1765
  className: "mt-3 flex flex-wrap items-center gap-2",
961
1766
  children: i
962
1767
  })
963
1768
  ]
964
1769
  }),
965
- r && /* @__PURE__ */ z("button", {
1770
+ r && /* @__PURE__ */ W("button", {
966
1771
  type: "button",
967
1772
  onClick: r,
968
1773
  "aria-label": "Dismiss",
969
1774
  className: "flex-shrink-0 -mr-1 -mt-1 p-1 rounded-md text-fg-secondary hover:text-fg-default hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
970
- children: /* @__PURE__ */ z(P, { className: "h-4 w-4" })
1775
+ children: /* @__PURE__ */ W(V, { className: "h-4 w-4" })
971
1776
  })
972
1777
  ]
973
1778
  });
974
- }), ut = {
975
- lg: "h-12 text-p-md",
976
- md: "h-10 text-p-std",
977
- sm: "h-8 text-p-sm"
978
- }, dt = {
979
- lg: "pl-10",
980
- md: "pl-9",
981
- sm: "pl-8"
982
- }, ft = {
983
- lg: "pr-10",
984
- md: "pr-9",
985
- sm: "pr-8"
986
- }, pt = {
987
- lg: "w-10",
988
- md: "w-9",
989
- sm: "w-8"
990
- }, mt = i(function({ label: e, helperText: t, errorText: n, size: r = "md", leftIcon: i, rightIcon: a, leftAddon: o, rightAddon: s, error: c = !1, id: u, disabled: d, className: f, wrapperClassName: m, required: h, dataTestId: g, ..._ }, v) {
991
- let y = l(), b = u ?? y, x = n ? `${b}-error` : t ? `${b}-help` : void 0, S = c || !!n;
992
- return /* @__PURE__ */ B("div", {
993
- className: H("flex flex-col gap-1.5 w-full", m),
994
- "data-test-id": g,
995
- children: [
996
- e && /* @__PURE__ */ B("label", {
997
- htmlFor: b,
998
- className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
999
- children: [e, h && /* @__PURE__ */ z("span", {
1000
- className: "text-red-600",
1001
- "aria-hidden": !0,
1002
- children: "*"
1003
- })]
1004
- }),
1005
- /* @__PURE__ */ B("div", {
1006
- className: H("flex items-stretch w-full rounded-lg bg-bg-default transition-colors", "border", S ? "border-red-600" : "border-border-default", !d && !S && "hover:border-border-strong", "focus-within:ring-2 focus-within:ring-offset-0", S ? "focus-within:ring-red-300 focus-within:border-red-600" : "focus-within:ring-brand-300 focus-within:border-brand-500", d && "bg-bg-container border-border-default cursor-not-allowed", ut[r]),
1007
- children: [
1008
- o && /* @__PURE__ */ z("span", {
1009
- className: "inline-flex items-center px-3 text-fg-secondary bg-bg-container border-r border-border-default rounded-l-lg whitespace-nowrap",
1010
- children: o
1011
- }),
1012
- /* @__PURE__ */ B("div", {
1013
- className: "relative flex-1 min-w-0",
1014
- children: [
1015
- i && /* @__PURE__ */ z("span", {
1016
- "aria-hidden": !0,
1017
- className: H("absolute inset-y-0 left-0 flex items-center justify-center text-fg-secondary pointer-events-none", pt[r]),
1018
- children: i
1019
- }),
1020
- /* @__PURE__ */ z("input", {
1021
- ref: v,
1022
- id: b,
1023
- disabled: d,
1024
- required: h,
1025
- "aria-invalid": S || void 0,
1026
- "aria-describedby": x,
1027
- className: H("w-full h-full bg-transparent outline-none", "placeholder:text-fg-tertiary text-fg-default", "disabled:cursor-not-allowed disabled:text-fg-disabled", i ? dt[r] : "pl-3", a || S ? ft[r] : "pr-3", f),
1028
- ..._
1029
- }),
1030
- (a || S) && /* @__PURE__ */ z("span", {
1031
- "aria-hidden": !0,
1032
- className: H("absolute inset-y-0 right-0 flex items-center justify-center pointer-events-none", pt[r], S ? "text-red-600" : "text-fg-secondary"),
1033
- children: S ? /* @__PURE__ */ z(p, { className: "h-4 w-4" }) : a
1034
- })
1035
- ]
1036
- }),
1037
- s && /* @__PURE__ */ z("span", {
1038
- className: "inline-flex items-center px-3 text-fg-secondary bg-bg-container border-l border-border-default rounded-r-lg whitespace-nowrap",
1039
- children: s
1040
- })
1041
- ]
1779
+ }), mn = a(function({ variant: e = "p-std", weight: t, color: n = "brand", underline: r = "hover", leftIcon: i, rightIcon: a, truncate: o, className: s, children: c, dataTestId: l, target: u, rel: d, ...f }, p) {
1780
+ let m = {
1781
+ ...f,
1782
+ target: u,
1783
+ rel: d ?? (u === "_blank" ? "noopener noreferrer" : void 0)
1784
+ };
1785
+ return /* @__PURE__ */ G(en, {
1786
+ as: "a",
1787
+ ref: p,
1788
+ variant: e,
1789
+ weight: t,
1790
+ color: n,
1791
+ truncate: o,
1792
+ dataTestId: l,
1793
+ className: q("inline-flex items-center gap-1 rounded-sm outline-none transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", r === "always" && "underline", r === "hover" && "hover:underline", s),
1794
+ ...m,
1795
+ children: [
1796
+ i && /* @__PURE__ */ W("span", {
1797
+ className: "inline-flex shrink-0",
1798
+ children: i
1042
1799
  }),
1043
- n ? /* @__PURE__ */ z("p", {
1044
- id: `${b}-error`,
1045
- className: "text-p-sm text-red-700",
1046
- children: n
1047
- }) : t ? /* @__PURE__ */ z("p", {
1048
- id: `${b}-help`,
1049
- className: "text-p-sm text-fg-secondary",
1050
- children: t
1051
- }) : null
1800
+ c,
1801
+ a && /* @__PURE__ */ W("span", {
1802
+ className: "inline-flex shrink-0",
1803
+ children: a
1804
+ })
1052
1805
  ]
1053
1806
  });
1054
- }), ht = {
1807
+ }), hn = {
1055
1808
  sm: "max-w-sm",
1056
1809
  md: "max-w-md",
1057
1810
  lg: "max-w-lg",
1058
1811
  xl: "max-w-2xl",
1059
1812
  "2xl": "max-w-4xl"
1060
- };
1061
- function gt(...e) {
1062
- return (t) => {
1063
- for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
1064
- };
1065
- }
1066
- var _t = i(function({ open: e, onClose: t, title: n, description: r, children: i, footer: a, size: o = "md", closeOnOverlayClick: s = !0, showClose: l = !0, className: u, dataTestId: f }, p) {
1067
- let m = d(null);
1068
- return c(() => {
1813
+ }, gn = a(function({ open: e, onClose: t, title: n, description: r, children: i, footer: a, size: o = "md", closeOnOverlayClick: s = !0, showClose: c = !0, className: u, dataTestId: d }, f) {
1814
+ let m = p(null);
1815
+ return l(() => {
1069
1816
  if (!e) return;
1070
1817
  let n = (e) => {
1071
1818
  e.key === "Escape" && t();
@@ -1075,59 +1822,59 @@ var _t = i(function({ open: e, onClose: t, title: n, description: r, children: i
1075
1822
  return document.body.style.overflow = "hidden", () => {
1076
1823
  document.removeEventListener("keydown", n), document.body.style.overflow = r;
1077
1824
  };
1078
- }, [e, t]), c(() => {
1825
+ }, [e, t]), l(() => {
1079
1826
  if (!e) return;
1080
1827
  let t = document.activeElement;
1081
1828
  return m.current?.focus(), () => t?.focus?.();
1082
- }, [e]), e ? V(/* @__PURE__ */ B("div", {
1829
+ }, [e]), e ? K(/* @__PURE__ */ G("div", {
1083
1830
  role: "dialog",
1084
1831
  "aria-modal": "true",
1085
1832
  "aria-labelledby": n ? "modal-title" : void 0,
1086
1833
  "aria-describedby": r ? "modal-desc" : void 0,
1087
1834
  className: "fixed inset-0 z-50 flex items-center justify-center p-4",
1088
- children: [/* @__PURE__ */ z("div", {
1835
+ children: [/* @__PURE__ */ W("div", {
1089
1836
  className: "absolute inset-0 bg-black/50",
1090
1837
  onClick: () => s && t(),
1091
1838
  "aria-hidden": !0
1092
- }), /* @__PURE__ */ B("div", {
1093
- ref: gt(m, p),
1839
+ }), /* @__PURE__ */ G("div", {
1840
+ ref: J(m, f),
1094
1841
  tabIndex: -1,
1095
- "data-test-id": f,
1096
- className: H("relative w-full bg-bg-default rounded-xl shadow-z5 outline-none flex flex-col max-h-[90vh]", ht[o], u),
1842
+ "data-test-id": d,
1843
+ className: q("relative w-full bg-bg-default rounded-xl shadow-z5 outline-none flex flex-col max-h-[90vh]", hn[o], u),
1097
1844
  children: [
1098
- (n || l) && /* @__PURE__ */ B("div", {
1845
+ (n || c) && /* @__PURE__ */ G("div", {
1099
1846
  className: "flex items-start justify-between gap-4 px-6 pt-6 pb-4",
1100
- children: [/* @__PURE__ */ B("div", {
1847
+ children: [/* @__PURE__ */ G("div", {
1101
1848
  className: "flex-1 min-w-0",
1102
- children: [n && /* @__PURE__ */ z("h2", {
1849
+ children: [n && /* @__PURE__ */ W("h2", {
1103
1850
  id: "modal-title",
1104
1851
  className: "text-h-xs font-semibold text-fg-default",
1105
1852
  children: n
1106
- }), r && /* @__PURE__ */ z("p", {
1853
+ }), r && /* @__PURE__ */ W("p", {
1107
1854
  id: "modal-desc",
1108
1855
  className: "mt-1 text-p-std text-fg-secondary",
1109
1856
  children: r
1110
1857
  })]
1111
- }), l && /* @__PURE__ */ z("button", {
1858
+ }), c && /* @__PURE__ */ W("button", {
1112
1859
  type: "button",
1113
1860
  onClick: t,
1114
1861
  "aria-label": "Close",
1115
1862
  className: "-mr-2 -mt-2 p-2 rounded-md text-fg-secondary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
1116
- children: /* @__PURE__ */ z(P, { className: "h-5 w-5" })
1863
+ children: /* @__PURE__ */ W(V, { className: "h-5 w-5" })
1117
1864
  })]
1118
1865
  }),
1119
- i && /* @__PURE__ */ z("div", {
1866
+ i && /* @__PURE__ */ W("div", {
1120
1867
  className: "px-6 pb-6 overflow-y-auto",
1121
1868
  children: i
1122
1869
  }),
1123
- a && /* @__PURE__ */ z("div", {
1870
+ a && /* @__PURE__ */ W("div", {
1124
1871
  className: "flex items-center justify-end gap-2 px-6 py-4 border-t border-border-default bg-bg-container rounded-b-xl",
1125
1872
  children: a
1126
1873
  })
1127
1874
  ]
1128
1875
  })]
1129
1876
  }), document.body) : null;
1130
- }), q = {
1877
+ }), _n = {
1131
1878
  sm: {
1132
1879
  box: "px-1.5 py-1.5 gap-1",
1133
1880
  chip: "h-6 pl-0.5 pr-1.5",
@@ -1149,158 +1896,164 @@ var _t = i(function({ open: e, onClose: t, title: n, description: r, children: i
1149
1896
  input: "h-8 text-p-md min-w-[140px]",
1150
1897
  avatar: "sm"
1151
1898
  }
1152
- }, vt = i(function({ options: e, value: t, onChange: n, size: r = "md", placeholder: i = "Select…", addMorePlaceholder: a = "Add another…", disabled: o = !1, error: s = !1, label: p, helperText: m, errorText: h, required: g = !1, lockedValues: _ = [], max: v, searchable: y = !0, suggestionsLabel: b = "Suggestions", emptyText: x = "No matches. Try a different search.", id: S, className: C, wrapperClassName: w, dataTestId: T }, E) {
1153
- let ee = l(), D = S ?? ee, O = `${D}-listbox`, A = s || !!h, [j, M] = f(""), [N, F] = f(!1), [I, L] = f(0), R = d(null), V = d(null), ne = (e) => {
1154
- V.current = e, typeof E == "function" ? E(e) : E && (E.current = e);
1155
- }, re = u(() => new Map(e.map((e) => [e.value, e])), [e]), U = u(() => t.map((e) => re.get(e)).filter((e) => !!e), [t, re]), W = u(() => {
1156
- let n = j.trim().toLowerCase();
1899
+ }, vn = a(function({ options: e, value: t, onChange: n, onAdd: r, onRemove: i, size: a = "md", placeholder: o = "Select…", addMorePlaceholder: s = "Add another…", disabled: c = !1, error: d = !1, label: h, labelAddons: g, helperText: _, errorText: v, required: y = !1, lockedValues: b = [], max: x, searchable: S = !0, suggestionsLabel: C = "Suggestions", emptyText: w = "No matches. Try a different search.", showAvatars: T = !1, id: E, className: D, wrapperClassName: O, dataTestId: k }, A) {
1900
+ let j = u(), M = E ?? j, N = `${M}-listbox`, P = d || !!v, [F, I] = m(""), [L, R] = m(!1), [z, te] = m(0), ne = p(null), re = p(null), ie = (e) => {
1901
+ re.current = e, typeof A == "function" ? A(e) : A && (A.current = e);
1902
+ }, ae = f(() => new Map(e.map((e) => [e.value, e])), [e]), B = f(() => t.map((e) => ae.get(e)).filter((e) => !!e), [t, ae]), H = f(() => {
1903
+ let n = F.trim().toLowerCase();
1157
1904
  return e.filter((e) => !t.includes(e.value) && (n === "" || e.label.toLowerCase().includes(n) || (e.description ?? "").toLowerCase().includes(n)));
1158
1905
  }, [
1159
1906
  e,
1160
1907
  t,
1161
- j
1162
- ]), G = v !== void 0 && t.length >= v;
1163
- c(() => {
1164
- if (!N) return;
1908
+ F
1909
+ ]), se = x !== void 0 && t.length >= x;
1910
+ l(() => {
1911
+ if (!L) return;
1165
1912
  let e = (e) => {
1166
- R.current && !R.current.contains(e.target) && F(!1);
1913
+ ne.current && !ne.current.contains(e.target) && R(!1);
1167
1914
  };
1168
1915
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1169
- }, [N]), c(() => {
1170
- L((e) => Math.min(e, Math.max(0, W.length - 1)));
1171
- }, [W.length]);
1172
- let ie = (e) => {
1173
- let r = re.get(e);
1174
- o || G || !r || r.disabled || (n([...t, e]), M(""), L(0), V.current?.focus());
1175
- }, ae = (e) => {
1176
- o || _.includes(e) || n(t.filter((t) => t !== e));
1177
- }, oe = (e) => {
1178
- if (!W.length) return;
1179
- let t = I;
1180
- for (let n = 0; n < W.length && (t = (t + e + W.length) % W.length, W[t]?.disabled); n++);
1181
- L(t);
1182
- }, se = (e) => {
1183
- if (e.key === "ArrowDown") e.preventDefault(), N ? oe(1) : F(!0);
1184
- else if (e.key === "ArrowUp") e.preventDefault(), oe(-1);
1185
- else if (e.key === "Enter") N && W[I] && !W[I].disabled && (e.preventDefault(), ie(W[I].value));
1186
- else if (e.key === "Escape") F(!1);
1187
- else if (e.key === "Backspace" && j === "" && U.length > 0) {
1188
- let e = [...U].reverse().find((e) => !_.includes(e.value));
1189
- e && ae(e.value);
1916
+ }, [L]), l(() => {
1917
+ te((e) => Math.min(e, Math.max(0, H.length - 1)));
1918
+ }, [H.length]);
1919
+ let ce = (e) => {
1920
+ let i = ae.get(e);
1921
+ c || se || !i || i.disabled || (n([...t, e]), r?.(i), I(""), te(0), re.current?.focus());
1922
+ }, U = (e) => {
1923
+ c || b.includes(e) || (n(t.filter((t) => t !== e)), i?.(e));
1924
+ }, K = (e) => {
1925
+ if (!H.length) return;
1926
+ let t = z;
1927
+ for (let n = 0; n < H.length && (t = (t + e + H.length) % H.length, H[t]?.disabled); n++);
1928
+ te(t);
1929
+ }, le = (e) => {
1930
+ if (e.key === "ArrowDown") e.preventDefault(), L ? K(1) : R(!0);
1931
+ else if (e.key === "ArrowUp") e.preventDefault(), K(-1);
1932
+ else if (e.key === "Enter") L && H[z] && !H[z].disabled && (e.preventDefault(), ce(H[z].value));
1933
+ else if (e.key === "Escape") R(!1);
1934
+ else if (e.key === "Backspace" && F === "" && B.length > 0) {
1935
+ let e = [...B].reverse().find((e) => !b.includes(e.value));
1936
+ e && U(e.value);
1190
1937
  }
1191
- }, ce = h ? `${D}-error` : m ? `${D}-help` : void 0;
1192
- return /* @__PURE__ */ B("div", {
1193
- "data-test-id": T,
1194
- className: H("flex flex-col gap-1.5 w-full", w),
1938
+ }, ue = v ? `${M}-error` : _ ? `${M}-help` : void 0;
1939
+ return /* @__PURE__ */ G("div", {
1940
+ "data-test-id": k,
1941
+ className: q("flex flex-col gap-1.5 w-full", O),
1195
1942
  children: [
1196
- p && /* @__PURE__ */ B("label", {
1197
- htmlFor: D,
1198
- className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
1199
- children: [p, g && /* @__PURE__ */ z("span", {
1200
- className: "text-red-600",
1201
- "aria-hidden": !0,
1202
- children: "*"
1943
+ (h || g) && /* @__PURE__ */ G("div", {
1944
+ className: "flex items-center gap-1.5",
1945
+ children: [h && /* @__PURE__ */ G("label", {
1946
+ htmlFor: M,
1947
+ className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
1948
+ children: [h, y && /* @__PURE__ */ W("span", {
1949
+ className: "text-red-600",
1950
+ "aria-hidden": !0,
1951
+ children: "*"
1952
+ })]
1953
+ }), g && /* @__PURE__ */ W("span", {
1954
+ className: "inline-flex items-center gap-1",
1955
+ children: g
1203
1956
  })]
1204
1957
  }),
1205
- /* @__PURE__ */ B("div", {
1206
- ref: R,
1958
+ /* @__PURE__ */ G("div", {
1959
+ ref: ne,
1207
1960
  className: "relative",
1208
- children: [/* @__PURE__ */ B("div", {
1209
- className: H("flex flex-wrap items-center rounded-lg border bg-bg-default transition-colors", q[r].box, o ? "opacity-60 cursor-not-allowed border-border-default" : A ? "border-red-500 focus-within:ring-2 focus-within:ring-red-300 focus-within:ring-offset-1 cursor-text" : "border-border-default hover:border-border-strong focus-within:border-fg-tertiary focus-within:ring-2 focus-within:ring-brand-300 focus-within:ring-offset-1 cursor-text", C),
1210
- onClick: () => !o && V.current?.focus(),
1211
- children: [U.map((e) => {
1212
- let t = _.includes(e.value);
1213
- return /* @__PURE__ */ B("span", {
1214
- className: H("inline-flex items-center gap-1.5 rounded-full text-fg-default bg-bg-subtle", q[r].chip, q[r].chipText),
1961
+ children: [/* @__PURE__ */ G("div", {
1962
+ className: q("flex flex-wrap items-center rounded-lg border bg-bg-default transition-colors", _n[a].box, c ? "opacity-60 cursor-not-allowed border-border-default" : P ? "border-red-500 focus-within:ring-2 focus-within:ring-red-300 focus-within:ring-offset-1 cursor-text" : "border-border-default hover:border-border-strong focus-within:border-fg-tertiary focus-within:ring-2 focus-within:ring-brand-300 focus-within:ring-offset-1 cursor-text", D),
1963
+ onClick: () => !c && re.current?.focus(),
1964
+ children: [B.map((e) => {
1965
+ let t = b.includes(e.value);
1966
+ return /* @__PURE__ */ G("span", {
1967
+ className: q("inline-flex items-center gap-1.5 rounded-full text-fg-default bg-bg-subtle", _n[a].chip, _n[a].chipText),
1215
1968
  title: e.description,
1216
1969
  children: [
1217
- e.avatarSrc && /* @__PURE__ */ z(K, {
1970
+ (T || e.avatarSrc) && /* @__PURE__ */ W(Oe, {
1218
1971
  src: e.avatarSrc,
1219
1972
  name: e.label,
1220
- size: q[r].avatar
1973
+ size: _n[a].avatar
1221
1974
  }),
1222
- /* @__PURE__ */ z("span", {
1975
+ /* @__PURE__ */ W("span", {
1223
1976
  className: "font-medium",
1224
1977
  children: e.label
1225
1978
  }),
1226
- e.badge && /* @__PURE__ */ z("span", {
1979
+ e.badge && /* @__PURE__ */ W("span", {
1227
1980
  className: "text-label-xxs uppercase tracking-wider opacity-70",
1228
1981
  children: e.badge
1229
1982
  }),
1230
- !t && !o && /* @__PURE__ */ z("button", {
1983
+ !t && !c && /* @__PURE__ */ W("button", {
1231
1984
  type: "button",
1232
1985
  onClick: (t) => {
1233
- t.stopPropagation(), ae(e.value);
1986
+ t.stopPropagation(), U(e.value);
1234
1987
  },
1235
1988
  "aria-label": `Remove ${e.label}`,
1236
1989
  className: "-mr-0.5 ml-0.5 text-fg-tertiary hover:text-fg-default p-0.5 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
1237
- children: /* @__PURE__ */ z(P, { className: "w-3 h-3" })
1990
+ children: /* @__PURE__ */ W(V, { className: "w-3 h-3" })
1238
1991
  })
1239
1992
  ]
1240
1993
  }, e.value);
1241
- }), /* @__PURE__ */ z("input", {
1242
- ref: ne,
1243
- id: D,
1994
+ }), /* @__PURE__ */ W("input", {
1995
+ ref: ie,
1996
+ id: M,
1244
1997
  type: "text",
1245
1998
  role: "combobox",
1246
- "aria-expanded": N,
1247
- "aria-controls": O,
1999
+ "aria-expanded": L,
2000
+ "aria-controls": N,
1248
2001
  "aria-autocomplete": "list",
1249
- "aria-activedescendant": N && W[I] ? `${O}-opt-${I}` : void 0,
1250
- "aria-invalid": A || void 0,
1251
- "aria-describedby": ce,
1252
- value: j,
1253
- readOnly: !y,
1254
- disabled: o || G,
2002
+ "aria-activedescendant": L && H[z] ? `${N}-opt-${z}` : void 0,
2003
+ "aria-invalid": P || void 0,
2004
+ "aria-describedby": ue,
2005
+ value: F,
2006
+ readOnly: !S,
2007
+ disabled: c || se,
1255
2008
  onChange: (e) => {
1256
- M(e.target.value), F(!0);
2009
+ I(e.target.value), R(!0);
1257
2010
  },
1258
- onFocus: () => F(!0),
1259
- onKeyDown: se,
1260
- placeholder: U.length === 0 ? i : G ? `Limit ${v} reached` : a,
1261
- className: H("flex-1 bg-transparent outline-none text-fg-default placeholder:text-fg-tertiary disabled:cursor-not-allowed", !y && "cursor-pointer", q[r].input)
2011
+ onFocus: () => R(!0),
2012
+ onKeyDown: le,
2013
+ placeholder: B.length === 0 ? o : se ? `Limit ${x} reached` : s,
2014
+ className: q("flex-1 bg-transparent outline-none text-fg-default placeholder:text-fg-tertiary disabled:cursor-not-allowed", !S && "cursor-pointer", _n[a].input)
1262
2015
  })]
1263
- }), N && !o && !G && /* @__PURE__ */ B("div", {
2016
+ }), L && !c && !se && /* @__PURE__ */ G("div", {
1264
2017
  className: "absolute top-full left-0 right-0 mt-1 z-20 max-h-80 overflow-y-auto rounded-lg border border-border-default bg-bg-default shadow-z4",
1265
- children: [/* @__PURE__ */ B("div", {
2018
+ children: [/* @__PURE__ */ G("div", {
1266
2019
  className: "px-3 py-2 border-b border-border-subtle flex items-center gap-2 text-p-sm text-fg-tertiary",
1267
- children: [/* @__PURE__ */ z(k, { className: "w-3.5 h-3.5 shrink-0" }), /* @__PURE__ */ z("span", {
2020
+ children: [/* @__PURE__ */ W(ee, { className: "w-3.5 h-3.5 shrink-0" }), /* @__PURE__ */ W("span", {
1268
2021
  className: "truncate",
1269
- children: j ? `Matches for "${j}"` : b
2022
+ children: F ? `Matches for "${F}"` : C
1270
2023
  })]
1271
- }), W.length === 0 ? /* @__PURE__ */ B("div", {
2024
+ }), H.length === 0 ? /* @__PURE__ */ G("div", {
1272
2025
  className: "px-3 py-6 text-center",
1273
- children: [/* @__PURE__ */ z(te, { className: "w-5 h-5 mx-auto text-fg-tertiary mb-2" }), /* @__PURE__ */ z("span", {
2026
+ children: [/* @__PURE__ */ W(oe, { className: "w-5 h-5 mx-auto text-fg-tertiary mb-2" }), /* @__PURE__ */ W("span", {
1274
2027
  className: "text-p-sm text-fg-secondary",
1275
- children: x
2028
+ children: w
1276
2029
  })]
1277
- }) : /* @__PURE__ */ z("ul", {
2030
+ }) : /* @__PURE__ */ W("ul", {
1278
2031
  role: "listbox",
1279
- id: O,
2032
+ id: N,
1280
2033
  className: "py-1",
1281
- children: W.map((e, t) => /* @__PURE__ */ z("li", {
2034
+ children: H.map((e, t) => /* @__PURE__ */ W("li", {
1282
2035
  role: "option",
1283
- id: `${O}-opt-${t}`,
1284
- "aria-selected": t === I,
2036
+ id: `${N}-opt-${t}`,
2037
+ "aria-selected": t === z,
1285
2038
  "aria-disabled": e.disabled || void 0,
1286
- children: /* @__PURE__ */ B("button", {
2039
+ children: /* @__PURE__ */ G("button", {
1287
2040
  type: "button",
1288
2041
  disabled: e.disabled,
1289
- onMouseEnter: () => L(t),
2042
+ onMouseEnter: () => te(t),
1290
2043
  onMouseDown: (t) => {
1291
- t.preventDefault(), ie(e.value);
2044
+ t.preventDefault(), ce(e.value);
1292
2045
  },
1293
- className: H("w-full px-3 py-2 flex items-center gap-3 text-left transition", e.disabled ? "opacity-50 cursor-not-allowed" : t === I ? "bg-bg-subtle" : "hover:bg-bg-subtle"),
1294
- children: [e.avatarSrc && /* @__PURE__ */ z(K, {
2046
+ className: q("w-full px-3 py-2 flex items-center gap-3 text-left transition", e.disabled ? "opacity-50 cursor-not-allowed" : t === z ? "bg-bg-subtle" : "hover:bg-bg-subtle"),
2047
+ children: [(T || e.avatarSrc) && /* @__PURE__ */ W(Oe, {
1295
2048
  src: e.avatarSrc,
1296
2049
  name: e.label,
1297
2050
  size: "sm"
1298
- }), /* @__PURE__ */ B("span", {
2051
+ }), /* @__PURE__ */ G("span", {
1299
2052
  className: "flex-1 min-w-0",
1300
- children: [/* @__PURE__ */ z("span", {
2053
+ children: [/* @__PURE__ */ W("span", {
1301
2054
  className: "block text-p-std font-medium text-fg-default truncate",
1302
2055
  children: e.label
1303
- }), e.description && /* @__PURE__ */ z("span", {
2056
+ }), e.description && /* @__PURE__ */ W("span", {
1304
2057
  className: "block text-p-sm text-fg-secondary truncate",
1305
2058
  children: e.description
1306
2059
  })]
@@ -1310,49 +2063,49 @@ var _t = i(function({ open: e, onClose: t, title: n, description: r, children: i
1310
2063
  })]
1311
2064
  })]
1312
2065
  }),
1313
- h ? /* @__PURE__ */ z("p", {
1314
- id: `${D}-error`,
2066
+ v ? /* @__PURE__ */ W("p", {
2067
+ id: `${M}-error`,
1315
2068
  className: "text-p-sm text-red-700",
1316
- children: h
1317
- }) : m ? /* @__PURE__ */ z("p", {
1318
- id: `${D}-help`,
2069
+ children: v
2070
+ }) : _ ? /* @__PURE__ */ W("p", {
2071
+ id: `${M}-help`,
1319
2072
  className: "text-p-sm text-fg-secondary",
1320
- children: m
2073
+ children: _
1321
2074
  }) : null
1322
2075
  ]
1323
2076
  });
1324
- }), yt = {
2077
+ }), yn = {
1325
2078
  brand: "bg-brand-500 text-white",
1326
2079
  danger: "bg-red-600 text-white",
1327
2080
  success: "bg-green-600 text-white",
1328
2081
  warning: "bg-yellow-600 text-gray-900 dark:text-gray-900",
1329
2082
  info: "bg-blue-600 text-white"
1330
- }, bt = {
2083
+ }, bn = {
1331
2084
  lg: "min-w-[18px] h-[18px] px-1 text-[11px]",
1332
2085
  sm: "min-w-[14px] h-[14px] px-0.5 text-[10px]"
1333
- }, xt = {
2086
+ }, xn = {
1334
2087
  lg: "h-2.5 w-2.5",
1335
2088
  sm: "h-1.5 w-1.5"
1336
2089
  };
1337
- function St(e, t) {
2090
+ function Sn(e, t) {
1338
2091
  return e > t ? `${t}+` : e >= 1e3 ? `${(e / 1e3).toFixed(0)}K` : String(e);
1339
2092
  }
1340
- var Ct = i(function({ count: e = 0, max: t = 99, kind: n = "count", size: r = "lg", variant: i = "danger", children: a, showZero: o = !1, className: s, dataTestId: c, ...l }, u) {
1341
- let d = n === "dot" || e > 0 || o, f = a != null && a !== !1, p = d ? /* @__PURE__ */ z("span", {
2093
+ var Cn = a(function({ count: e = 0, max: t = 99, kind: n = "count", size: r = "lg", variant: i = "danger", children: a, showZero: o = !1, className: s, dataTestId: c, ...l }, u) {
2094
+ let d = n === "dot" || e > 0 || o, f = a != null && a !== !1, p = d ? /* @__PURE__ */ W("span", {
1342
2095
  ref: u,
1343
2096
  "data-test-id": c,
1344
- className: H("inline-flex items-center justify-center rounded-full font-semibold ring-2 ring-white", yt[i], n === "count" ? bt[r] : xt[r], f ? "absolute -top-1 -right-1" : "static", s),
2097
+ className: q("inline-flex items-center justify-center rounded-full font-semibold ring-2 ring-white", yn[i], n === "count" ? bn[r] : xn[r], f ? "absolute -top-1 -right-1" : "static", s),
1345
2098
  ...l,
1346
- children: n === "count" && St(e, t)
2099
+ children: n === "count" && Sn(e, t)
1347
2100
  }) : null;
1348
- return f ? /* @__PURE__ */ B("span", {
2101
+ return f ? /* @__PURE__ */ G("span", {
1349
2102
  className: "relative inline-flex",
1350
2103
  children: [a, p]
1351
2104
  }) : p;
1352
2105
  });
1353
2106
  //#endregion
1354
2107
  //#region src/components/Pagination/Pagination.tsx
1355
- function wt(e, t, n, r) {
2108
+ function wn(e, t, n, r) {
1356
2109
  if (t <= n * 2 + 3 + r * 2) return Array.from({ length: t }, (e, t) => t + 1);
1357
2110
  let i = Math.max(e - n, r + 2), a = Math.min(e + n, t - r - 1), o = i > r + 2, s = a < t - r - 1, c = Array.from({ length: r }, (e, t) => t + 1), l = Array.from({ length: r }, (e, n) => t - r + 1 + n), u = [];
1358
2111
  if (o) {
@@ -1367,49 +2120,49 @@ function wt(e, t, n, r) {
1367
2120
  ...l
1368
2121
  ];
1369
2122
  }
1370
- var Tt = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", Et = "text-fg-default hover:bg-bg-subtle disabled:text-fg-disabled disabled:hover:bg-transparent disabled:cursor-not-allowed", Dt = i(function({ page: e, pageCount: t, onPageChange: n, siblingCount: r = 1, boundaryCount: i = 1, className: a, dataTestId: o, "aria-label": s, ...c }, l) {
1371
- let u = wt(e, t, r, i), d = e <= 1, f = e >= t;
1372
- return /* @__PURE__ */ B("nav", {
2123
+ var Tn = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", En = "text-fg-default hover:bg-bg-subtle disabled:text-fg-disabled disabled:hover:bg-transparent disabled:cursor-not-allowed", Dn = a(function({ page: e, pageCount: t, onPageChange: n, siblingCount: r = 1, boundaryCount: i = 1, className: a, dataTestId: o, "aria-label": s, ...c }, l) {
2124
+ let u = wn(e, t, r, i), d = e <= 1, f = e >= t;
2125
+ return /* @__PURE__ */ G("nav", {
1373
2126
  ref: l,
1374
2127
  "aria-label": s ?? "Pagination",
1375
2128
  "data-test-id": o,
1376
- className: H("inline-flex items-center gap-1", a),
2129
+ className: q("inline-flex items-center gap-1", a),
1377
2130
  ...c,
1378
2131
  children: [
1379
- /* @__PURE__ */ z("button", {
2132
+ /* @__PURE__ */ W("button", {
1380
2133
  type: "button",
1381
2134
  onClick: () => !d && n(e - 1),
1382
2135
  disabled: d,
1383
2136
  "aria-label": "Previous page",
1384
- className: H(Tt, Et),
1385
- children: /* @__PURE__ */ z(x, { className: "h-4 w-4" })
2137
+ className: q(Tn, En),
2138
+ children: /* @__PURE__ */ W(C, { className: "h-4 w-4" })
1386
2139
  }),
1387
2140
  u.map((t, r) => {
1388
- if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */ z("span", {
2141
+ if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */ W("span", {
1389
2142
  "aria-hidden": !0,
1390
2143
  className: "inline-flex items-center justify-center w-9 h-9 text-fg-tertiary",
1391
- children: /* @__PURE__ */ z(O, { className: "h-4 w-4" })
2144
+ children: /* @__PURE__ */ W(I, { className: "h-4 w-4" })
1392
2145
  }, `${t}-${r}`);
1393
2146
  let i = t === e;
1394
- return /* @__PURE__ */ z("button", {
2147
+ return /* @__PURE__ */ W("button", {
1395
2148
  type: "button",
1396
2149
  onClick: () => n(t),
1397
2150
  "aria-current": i ? "page" : void 0,
1398
- className: H(Tt, i ? "bg-brand-500 text-white font-semibold hover:bg-brand-600" : "text-fg-default hover:bg-bg-subtle"),
2151
+ className: q(Tn, i ? "bg-brand-500 text-white font-semibold hover:bg-brand-600" : "text-fg-default hover:bg-bg-subtle"),
1399
2152
  children: t
1400
2153
  }, t);
1401
2154
  }),
1402
- /* @__PURE__ */ z("button", {
2155
+ /* @__PURE__ */ W("button", {
1403
2156
  type: "button",
1404
2157
  onClick: () => !f && n(e + 1),
1405
2158
  disabled: f,
1406
2159
  "aria-label": "Next page",
1407
- className: H(Tt, Et),
1408
- children: /* @__PURE__ */ z(S, { className: "h-4 w-4" })
2160
+ className: q(Tn, En),
2161
+ children: /* @__PURE__ */ W(w, { className: "h-4 w-4" })
1409
2162
  })
1410
2163
  ]
1411
2164
  });
1412
- }), Ot = {
2165
+ }), On = {
1413
2166
  sm: {
1414
2167
  padding: "px-3 py-2",
1415
2168
  avatar: "sm",
@@ -1420,64 +2173,64 @@ var Tt = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
1420
2173
  avatar: "md",
1421
2174
  gap: "gap-3"
1422
2175
  }
1423
- }, kt = {
2176
+ }, kn = {
1424
2177
  default: "border-border-default bg-bg-default hover:border-fg-tertiary/40",
1425
2178
  highlight: "border-brand-500 bg-brand-200/15 dark:bg-brand-500/10 ring-1 ring-brand-500/40",
1426
2179
  warning: "border-yellow-500 bg-yellow-50 dark:bg-yellow-900/20"
1427
- }, At = i(function({ name: e, role: t, avatar: n, variant: r = "default", size: i = "md", badge: a, onClick: o, className: s, dataTestId: c, ...l }, u) {
1428
- let d = Ot[i], f = kt[r], p = /* @__PURE__ */ B(R, { children: [
1429
- /* @__PURE__ */ z(K, {
2180
+ }, An = a(function({ name: e, role: t, avatar: n, variant: r = "default", size: i = "md", badge: a, onClick: o, className: s, dataTestId: c, ...l }, u) {
2181
+ let d = On[i], f = kn[r], p = /* @__PURE__ */ G(U, { children: [
2182
+ /* @__PURE__ */ W(Oe, {
1430
2183
  src: n,
1431
2184
  name: e,
1432
2185
  size: d.avatar
1433
2186
  }),
1434
- /* @__PURE__ */ B("div", {
2187
+ /* @__PURE__ */ G("div", {
1435
2188
  className: "min-w-0 flex-1",
1436
- children: [/* @__PURE__ */ z("div", {
2189
+ children: [/* @__PURE__ */ W("div", {
1437
2190
  className: "text-p-std font-semibold text-fg-default truncate leading-tight",
1438
2191
  children: e
1439
- }), t && /* @__PURE__ */ z("div", {
2192
+ }), t && /* @__PURE__ */ W("div", {
1440
2193
  className: "text-p-sm text-fg-secondary truncate mt-0.5 leading-tight",
1441
2194
  children: t
1442
2195
  })]
1443
2196
  }),
1444
- a && /* @__PURE__ */ z("span", {
2197
+ a && /* @__PURE__ */ W("span", {
1445
2198
  className: "shrink-0 self-center",
1446
2199
  children: a
1447
2200
  })
1448
- ] }), m = H("relative inline-flex items-center rounded-xl border transition", d.padding, d.gap, f, o && "cursor-pointer hover:shadow-z1", s);
1449
- return o ? /* @__PURE__ */ z("button", {
2201
+ ] }), m = q("relative inline-flex items-center rounded-xl border transition", d.padding, d.gap, f, o && "cursor-pointer hover:shadow-z1", s);
2202
+ return o ? /* @__PURE__ */ W("button", {
1450
2203
  ref: u,
1451
2204
  type: "button",
1452
2205
  onClick: o,
1453
2206
  "data-test-id": c,
1454
- className: H(m, "text-left"),
2207
+ className: q(m, "text-left"),
1455
2208
  ...l,
1456
2209
  children: p
1457
- }) : /* @__PURE__ */ z("div", {
2210
+ }) : /* @__PURE__ */ W("div", {
1458
2211
  ref: u,
1459
2212
  "data-test-id": c,
1460
2213
  className: m,
1461
2214
  ...l,
1462
2215
  children: p
1463
2216
  });
1464
- }), jt = {
2217
+ }), jn = {
1465
2218
  sm: 29,
1466
2219
  lg: 45
1467
- }, Mt = {
2220
+ }, Mn = {
1468
2221
  sm: 2,
1469
2222
  lg: 4
1470
- }, Nt = {
2223
+ }, Nn = {
1471
2224
  sm: "h-1",
1472
2225
  lg: "h-2"
1473
- }, Pt = {
2226
+ }, Pn = {
1474
2227
  sm: "text-p-xs",
1475
2228
  lg: "text-p-sm"
1476
- }, Ft = i(function({ variant: e = "linear", size: t = "lg", percent: n = 0, stepCount: r, currentStep: i, hideLabel: a = !1, dimension: o, loop: s = !1, className: c, dataTestId: l, ...u }, d) {
2229
+ }, Fn = a(function({ variant: e = "linear", size: t = "lg", percent: n = 0, stepCount: r, currentStep: i, hideLabel: a = !1, dimension: o, loop: s = !1, className: c, dataTestId: l, ...u }, d) {
1477
2230
  let f = r && i ? i / r * 100 : n, p = Math.min(100, Math.max(0, f)), m = r ? `${i}/${r}` : `${Math.round(p)}%`;
1478
2231
  if (e === "circular") {
1479
- let e = o ?? jt[t], n = e - 5, r = 2 * n * Math.PI, i = Mt[t];
1480
- return /* @__PURE__ */ B("div", {
2232
+ let e = o ?? jn[t], n = e - 5, r = 2 * n * Math.PI, i = Mn[t];
2233
+ return /* @__PURE__ */ G("div", {
1481
2234
  ref: d,
1482
2235
  role: "progressbar",
1483
2236
  "aria-valuemin": 0,
@@ -1485,24 +2238,24 @@ var Tt = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
1485
2238
  "aria-valuenow": s ? void 0 : p,
1486
2239
  "aria-valuetext": s ? void 0 : m,
1487
2240
  "data-test-id": l,
1488
- className: H("relative inline-flex items-center justify-center", c),
2241
+ className: q("relative inline-flex items-center justify-center", c),
1489
2242
  style: {
1490
2243
  width: e * 2,
1491
2244
  height: e * 2
1492
2245
  },
1493
2246
  ...u,
1494
- children: [/* @__PURE__ */ B("svg", {
2247
+ children: [/* @__PURE__ */ G("svg", {
1495
2248
  width: e * 2,
1496
2249
  height: e * 2,
1497
2250
  viewBox: `0 0 ${e * 2} ${e * 2}`,
1498
- className: H("-rotate-90", s && "animate-spin"),
1499
- children: [/* @__PURE__ */ z("circle", {
2251
+ className: q("-rotate-90", s && "animate-spin"),
2252
+ children: [/* @__PURE__ */ W("circle", {
1500
2253
  cx: e,
1501
2254
  cy: e,
1502
2255
  r: n,
1503
2256
  strokeWidth: i,
1504
2257
  className: "fill-none stroke-bg-subtle"
1505
- }), /* @__PURE__ */ z("circle", {
2258
+ }), /* @__PURE__ */ W("circle", {
1506
2259
  cx: e,
1507
2260
  cy: e,
1508
2261
  r: n,
@@ -1514,14 +2267,14 @@ var Tt = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
1514
2267
  strokeDashoffset: s ? `${r * .75}px` : `${r - r * p / 100}px`
1515
2268
  }
1516
2269
  })]
1517
- }), !a && !s && /* @__PURE__ */ z("span", {
1518
- className: H("absolute text-fg-secondary", Pt[t]),
2270
+ }), !a && !s && /* @__PURE__ */ W("span", {
2271
+ className: q("absolute text-fg-secondary", Pn[t]),
1519
2272
  "data-test-id": l ? `${l}-text` : void 0,
1520
2273
  children: m
1521
2274
  })]
1522
2275
  });
1523
2276
  }
1524
- return /* @__PURE__ */ B("div", {
2277
+ return /* @__PURE__ */ G("div", {
1525
2278
  ref: d,
1526
2279
  role: "progressbar",
1527
2280
  "aria-valuemin": 0,
@@ -1529,23 +2282,23 @@ var Tt = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
1529
2282
  "aria-valuenow": p,
1530
2283
  "aria-valuetext": m,
1531
2284
  "data-test-id": l,
1532
- className: H("flex w-full items-center gap-2", c),
2285
+ className: q("flex w-full items-center gap-2", c),
1533
2286
  ...u,
1534
- children: [/* @__PURE__ */ z("div", {
1535
- className: H("w-full overflow-hidden rounded-full bg-bg-subtle", Nt[t]),
1536
- children: /* @__PURE__ */ z("div", {
2287
+ children: [/* @__PURE__ */ W("div", {
2288
+ className: q("w-full overflow-hidden rounded-full bg-bg-subtle", Nn[t]),
2289
+ children: /* @__PURE__ */ W("div", {
1537
2290
  className: "h-full rounded-full bg-brand-500 transition-all duration-300 ease-linear",
1538
2291
  style: { width: `${p}%` }
1539
2292
  })
1540
- }), !a && /* @__PURE__ */ z("span", {
1541
- className: H("shrink-0 text-fg-secondary", Pt[t]),
2293
+ }), !a && /* @__PURE__ */ W("span", {
2294
+ className: q("shrink-0 text-fg-secondary", Pn[t]),
1542
2295
  "data-test-id": l ? `${l}-text` : void 0,
1543
2296
  children: m
1544
2297
  })]
1545
2298
  });
1546
- }), It = n(null), Lt = i(function({ name: e, value: t, defaultValue: n, onChange: r, disabled: i, size: a = "md", orientation: o = "vertical", children: s, className: c, dataTestId: u }, d) {
1547
- let f = l(), p = e ?? f;
1548
- return /* @__PURE__ */ z(It.Provider, {
2299
+ }), In = r(null), Ln = a(function({ name: e, value: t, defaultValue: n, onChange: r, disabled: i, size: a = "md", orientation: o = "vertical", children: s, className: c, dataTestId: l }, d) {
2300
+ let f = u(), p = e ?? f;
2301
+ return /* @__PURE__ */ W(In.Provider, {
1549
2302
  value: {
1550
2303
  name: p,
1551
2304
  value: t,
@@ -1554,29 +2307,29 @@ var Tt = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
1554
2307
  disabled: i,
1555
2308
  size: a
1556
2309
  },
1557
- children: /* @__PURE__ */ z("div", {
2310
+ children: /* @__PURE__ */ W("div", {
1558
2311
  ref: d,
1559
2312
  role: "radiogroup",
1560
- "data-test-id": u,
1561
- className: H("flex gap-3", o === "vertical" ? "flex-col" : "flex-row flex-wrap items-center gap-4", c),
2313
+ "data-test-id": l,
2314
+ className: q("flex gap-3", o === "vertical" ? "flex-col" : "flex-row flex-wrap items-center gap-4", c),
1562
2315
  children: s
1563
2316
  })
1564
2317
  });
1565
- }), Rt = {
2318
+ }), Rn = {
1566
2319
  md: "h-5 w-5",
1567
2320
  sm: "h-4 w-4"
1568
- }, zt = {
2321
+ }, zn = {
1569
2322
  md: "h-2 w-2",
1570
2323
  sm: "h-1.5 w-1.5"
1571
- }, Bt = i(function({ value: e, size: t, label: n, description: r, error: i = !1, id: a, disabled: o, checked: c, defaultChecked: u, onChange: d, className: f, dataTestId: p, ...m }, h) {
1572
- let g = s(It), _ = l(), v = a ?? _, y = t ?? g?.size ?? "md", b = o ?? g?.disabled, x = g !== null, S = x && g.value !== void 0 ? g.value === e : void 0, C = x && g.defaultValue !== void 0 ? g.defaultValue === e : void 0, w = x ? S : c, T = x ? C : u;
1573
- return /* @__PURE__ */ B("label", {
2324
+ }, Bn = a(function({ value: e, size: t, label: n, description: r, error: i = !1, id: a, disabled: o, checked: s, defaultChecked: l, onChange: d, className: f, dataTestId: p, ...m }, h) {
2325
+ let g = c(In), _ = u(), v = a ?? _, y = t ?? g?.size ?? "md", b = o ?? g?.disabled, x = g !== null, S = x && g.value !== void 0 ? g.value === e : void 0, C = x && g.defaultValue !== void 0 ? g.defaultValue === e : void 0, w = x ? S : s, T = x ? C : l;
2326
+ return /* @__PURE__ */ G("label", {
1574
2327
  htmlFor: v,
1575
2328
  "data-test-id": p,
1576
- className: H("inline-flex items-start gap-2.5", b ? "cursor-not-allowed opacity-60" : "cursor-pointer", f),
1577
- children: [/* @__PURE__ */ B("span", {
2329
+ className: q("inline-flex items-start gap-2.5", b ? "cursor-not-allowed opacity-60" : "cursor-pointer", f),
2330
+ children: [/* @__PURE__ */ G("span", {
1578
2331
  className: "relative inline-flex shrink-0 items-center justify-center mt-0.5",
1579
- children: [/* @__PURE__ */ z("input", {
2332
+ children: [/* @__PURE__ */ W("input", {
1580
2333
  ref: h,
1581
2334
  id: v,
1582
2335
  type: "radio",
@@ -1591,190 +2344,222 @@ var Tt = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
1591
2344
  className: "peer sr-only",
1592
2345
  "aria-invalid": i || void 0,
1593
2346
  ...m
1594
- }), /* @__PURE__ */ z("span", {
1595
- className: H("flex items-center justify-center rounded-full border bg-bg-default transition-colors", Rt[y], i ? "border-red-600" : "border-border-strong", !b && !i && "peer-hover:border-fg-tertiary", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", "peer-checked:border-brand-500", b && "!bg-bg-subtle !border-border-default", "[&>span]:opacity-0 peer-checked:[&>span]:opacity-100"),
1596
- children: /* @__PURE__ */ z("span", { className: H("rounded-full bg-brand-500 transition-opacity", zt[y], b && "!bg-fg-disabled") })
2347
+ }), /* @__PURE__ */ W("span", {
2348
+ className: q("flex items-center justify-center rounded-full border bg-bg-default transition-colors", Rn[y], i ? "border-red-600" : "border-border-strong", !b && !i && "peer-hover:border-fg-tertiary", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", "peer-checked:border-brand-500", b && "!bg-bg-subtle !border-border-default", "[&>span]:opacity-0 peer-checked:[&>span]:opacity-100"),
2349
+ children: /* @__PURE__ */ W("span", { className: q("rounded-full bg-brand-500 transition-opacity", zn[y], b && "!bg-fg-disabled") })
1597
2350
  })]
1598
- }), (n || r) && /* @__PURE__ */ B("span", {
2351
+ }), (n || r) && /* @__PURE__ */ G("span", {
1599
2352
  className: "flex flex-col gap-0.5",
1600
- children: [n && /* @__PURE__ */ z("span", {
2353
+ children: [n && /* @__PURE__ */ W("span", {
1601
2354
  className: "text-p-std font-medium text-fg-default leading-tight",
1602
2355
  children: n
1603
- }), r && /* @__PURE__ */ z("span", {
2356
+ }), r && /* @__PURE__ */ W("span", {
1604
2357
  className: "text-p-sm text-fg-secondary leading-snug",
1605
2358
  children: r
1606
2359
  })]
1607
2360
  })]
1608
2361
  });
1609
- }), Vt = {
2362
+ }), Vn = a(function({ children: e, clamp: t = 3, collapsedContent: n, expandLabel: r = "Show more", collapseLabel: i = "Show less", defaultExpanded: a = !1, expanded: o, onExpandedChange: s, textProps: c, className: l, dataTestId: d, ...f }, p) {
2363
+ let [h, g] = m(a), _ = o !== void 0, v = _ ? o : h, y = u(), b = () => {
2364
+ let e = !v;
2365
+ _ || g(e), s?.(e);
2366
+ };
2367
+ return /* @__PURE__ */ G("div", {
2368
+ ref: p,
2369
+ "data-test-id": d,
2370
+ className: q("flex flex-col gap-1", l),
2371
+ ...f,
2372
+ children: [/* @__PURE__ */ W(en, {
2373
+ id: y,
2374
+ clamp: v ? void 0 : t,
2375
+ ...c,
2376
+ children: v ? e : n ?? e
2377
+ }), /* @__PURE__ */ W("button", {
2378
+ type: "button",
2379
+ onClick: (e) => {
2380
+ e.stopPropagation(), b();
2381
+ },
2382
+ "aria-expanded": v,
2383
+ "aria-controls": y,
2384
+ className: "self-start rounded-sm text-p-sm font-medium text-fg-brand outline-none hover:underline focus-visible:ring-2 focus-visible:ring-brand-300",
2385
+ children: v ? i : r
2386
+ })]
2387
+ });
2388
+ }), Hn = {
1610
2389
  lg: "h-12 text-p-md px-3.5",
1611
2390
  md: "h-10 text-p-std px-3",
1612
2391
  sm: "h-8 text-p-sm px-2.5"
1613
- }, Ht = i(function({ options: e, value: t, defaultValue: n, onChange: r, placeholder: i = "Select…", label: a, helperText: o, errorText: s, error: u = !1, size: p = "md", disabled: m, id: h, className: g, wrapperClassName: _, dataTestId: y }, x) {
1614
- let S = l(), C = h ?? S, [w, T] = f(!1), [E, ee] = f(n), D = t !== void 0, O = D ? t : E, k = d(null), [A, j] = f(-1), M = u || !!s, N = e.find((e) => e.value === O), te = (e) => {
1615
- D || ee(e), r?.(e), T(!1);
2392
+ }, Un = a(function({ options: e, value: t, defaultValue: n, onChange: r, placeholder: i = "Select…", label: a, labelAddons: o, helperText: s, errorText: c, error: d = !1, size: f = "md", disabled: h, id: g, className: _, wrapperClassName: v, dataTestId: y }, x) {
2393
+ let C = u(), w = g ?? C, [T, E] = m(!1), [D, O] = m(n), k = t !== void 0, A = k ? t : D, j = p(null), [M, N] = m(-1), P = d || !!c, F = e.find((e) => e.value === A), I = (e) => {
2394
+ k || O(e), r?.(e), E(!1);
1616
2395
  };
1617
- return c(() => {
1618
- if (!w) return;
2396
+ return l(() => {
2397
+ if (!T) return;
1619
2398
  let e = (e) => {
1620
- k.current?.contains(e.target) || T(!1);
2399
+ j.current?.contains(e.target) || E(!1);
1621
2400
  };
1622
2401
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1623
- }, [w]), c(() => {
1624
- if (w) {
1625
- let t = e.findIndex((e) => e.value === O);
1626
- j(t >= 0 ? t : 0);
1627
- } else j(-1);
2402
+ }, [T]), l(() => {
2403
+ if (T) {
2404
+ let t = e.findIndex((e) => e.value === A);
2405
+ N(t >= 0 ? t : 0);
2406
+ } else N(-1);
1628
2407
  }, [
1629
- w,
1630
- O,
2408
+ T,
2409
+ A,
1631
2410
  e
1632
- ]), /* @__PURE__ */ B("div", {
1633
- ref: k,
2411
+ ]), /* @__PURE__ */ G("div", {
2412
+ ref: j,
1634
2413
  "data-test-id": y,
1635
- className: H("flex flex-col gap-1.5 w-full relative", _),
2414
+ className: q("flex flex-col gap-1.5 w-full relative", v),
1636
2415
  children: [
1637
- a && /* @__PURE__ */ z("label", {
1638
- htmlFor: C,
1639
- className: "text-p-std font-medium text-fg-default inline-flex",
1640
- children: a
2416
+ (a || o) && /* @__PURE__ */ G("div", {
2417
+ className: "flex items-center gap-1.5",
2418
+ children: [a && /* @__PURE__ */ W("label", {
2419
+ htmlFor: w,
2420
+ className: "text-p-std font-medium text-fg-default inline-flex",
2421
+ children: a
2422
+ }), o && /* @__PURE__ */ W("span", {
2423
+ className: "inline-flex items-center gap-1",
2424
+ children: o
2425
+ })]
1641
2426
  }),
1642
- /* @__PURE__ */ B("button", {
2427
+ /* @__PURE__ */ G("button", {
1643
2428
  ref: x,
1644
- id: C,
2429
+ id: w,
1645
2430
  type: "button",
1646
- disabled: m,
1647
- onClick: () => T((e) => !e),
2431
+ disabled: h,
2432
+ onClick: () => E((e) => !e),
1648
2433
  onKeyDown: (t) => {
1649
- if (!m) if (t.key === "ArrowDown" || t.key === "ArrowUp" || t.key === "Enter" || t.key === " ") {
1650
- if (t.preventDefault(), !w) {
1651
- T(!0);
2434
+ if (!h) if (t.key === "ArrowDown" || t.key === "ArrowUp" || t.key === "Enter" || t.key === " ") {
2435
+ if (t.preventDefault(), !T) {
2436
+ E(!0);
1652
2437
  return;
1653
2438
  }
1654
2439
  if (t.key === "Enter" || t.key === " ") {
1655
- let t = e[A];
1656
- t && !t.disabled && te(t.value);
2440
+ let t = e[M];
2441
+ t && !t.disabled && I(t.value);
1657
2442
  return;
1658
2443
  }
1659
- let n = t.key === "ArrowDown" ? 1 : -1, r = A;
2444
+ let n = t.key === "ArrowDown" ? 1 : -1, r = M;
1660
2445
  for (let t = 0; t < e.length && (r = (r + n + e.length) % e.length, e[r]?.disabled); t++);
1661
- j(r);
1662
- } else t.key === "Escape" && T(!1);
2446
+ N(r);
2447
+ } else t.key === "Escape" && E(!1);
1663
2448
  },
1664
2449
  "aria-haspopup": "listbox",
1665
- "aria-expanded": w,
1666
- "aria-invalid": M || void 0,
1667
- className: H("inline-flex items-center justify-between w-full rounded-lg border bg-bg-default transition-colors outline-none", "text-left", M ? "border-red-600" : "border-border-default", !m && !M && "hover:border-border-strong", "focus-visible:ring-2", M ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", m && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", Vt[p], g),
1668
- children: [/* @__PURE__ */ z("span", {
1669
- className: H("truncate", !N && "text-fg-tertiary"),
1670
- children: N ? N.label : i
1671
- }), /* @__PURE__ */ z(b, {
1672
- className: H("h-4 w-4 ml-2 shrink-0 text-fg-secondary transition-transform", w && "rotate-180"),
2450
+ "aria-expanded": T,
2451
+ "aria-invalid": P || void 0,
2452
+ className: q("inline-flex items-center justify-between w-full rounded-lg border bg-bg-default transition-colors outline-none", "text-left", P ? "border-red-600" : "border-border-default", !h && !P && "hover:border-border-strong", "focus-visible:ring-2", P ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", h && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", Hn[f], _),
2453
+ children: [/* @__PURE__ */ W("span", {
2454
+ className: q("truncate", !F && "text-fg-tertiary"),
2455
+ children: F ? F.label : i
2456
+ }), /* @__PURE__ */ W(S, {
2457
+ className: q("h-4 w-4 ml-2 shrink-0 text-fg-secondary transition-transform", T && "rotate-180"),
1673
2458
  "aria-hidden": !0
1674
2459
  })]
1675
2460
  }),
1676
- w && /* @__PURE__ */ z("ul", {
2461
+ T && /* @__PURE__ */ W("ul", {
1677
2462
  role: "listbox",
1678
2463
  className: "absolute left-0 right-0 top-full mt-1 max-h-60 overflow-y-auto rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 py-1",
1679
2464
  children: e.map((e, t) => {
1680
- let n = e.value === O, r = t === A;
1681
- return /* @__PURE__ */ B("li", {
2465
+ let n = e.value === A, r = t === M;
2466
+ return /* @__PURE__ */ G("li", {
1682
2467
  role: "option",
1683
2468
  "aria-selected": n,
1684
2469
  "aria-disabled": e.disabled || void 0,
1685
- onMouseEnter: () => !e.disabled && j(t),
1686
- onClick: () => !e.disabled && te(e.value),
1687
- className: H("flex items-center justify-between gap-2 px-3 py-2 text-p-std cursor-pointer select-none", e.disabled && "opacity-50 cursor-not-allowed", r && !e.disabled && "bg-bg-subtle", n && "font-medium"),
1688
- children: [/* @__PURE__ */ z("span", {
2470
+ onMouseEnter: () => !e.disabled && N(t),
2471
+ onClick: () => !e.disabled && I(e.value),
2472
+ className: q("flex items-center justify-between gap-2 px-3 py-2 text-p-std cursor-pointer select-none", e.disabled && "opacity-50 cursor-not-allowed", r && !e.disabled && "bg-bg-subtle", n && "font-medium"),
2473
+ children: [/* @__PURE__ */ W("span", {
1689
2474
  className: "truncate",
1690
2475
  children: e.label
1691
- }), n && /* @__PURE__ */ z(v, { className: "h-4 w-4 text-brand-500 shrink-0" })]
2476
+ }), n && /* @__PURE__ */ W(b, { className: "h-4 w-4 text-brand-500 shrink-0" })]
1692
2477
  }, e.value);
1693
2478
  })
1694
2479
  }),
1695
- s ? /* @__PURE__ */ z("p", {
2480
+ c ? /* @__PURE__ */ W("p", {
1696
2481
  className: "text-p-sm text-red-700",
1697
- children: s
1698
- }) : o ? /* @__PURE__ */ z("p", {
2482
+ children: c
2483
+ }) : s ? /* @__PURE__ */ W("p", {
1699
2484
  className: "text-p-sm text-fg-secondary",
1700
- children: o
2485
+ children: s
1701
2486
  }) : null
1702
2487
  ]
1703
2488
  });
1704
- }), Ut = n(null);
1705
- function Wt() {
1706
- return s(Ut) ?? {
2489
+ }), Wn = r(null);
2490
+ function Gn() {
2491
+ return c(Wn) ?? {
1707
2492
  collapsed: !1,
1708
2493
  toggle: () => {}
1709
2494
  };
1710
2495
  }
1711
- var Gt = i(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, children: r, className: i, logo: a, title: o, subtitle: s, dataTestId: c, ...l }, u) {
1712
- let [d, p] = f(e), m = t !== void 0, h = m ? t : d, g = () => {
2496
+ var Kn = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, children: r, className: i, logo: a, title: o, subtitle: s, dataTestId: c, ...l }, u) {
2497
+ let [d, f] = m(e), p = t !== void 0, h = p ? t : d, g = () => {
1713
2498
  let e = !h;
1714
- m || p(e), n?.(e);
2499
+ p || f(e), n?.(e);
1715
2500
  };
1716
- return /* @__PURE__ */ z(Ut.Provider, {
2501
+ return /* @__PURE__ */ W(Wn.Provider, {
1717
2502
  value: {
1718
2503
  collapsed: h,
1719
2504
  toggle: g
1720
2505
  },
1721
- children: /* @__PURE__ */ B("aside", {
2506
+ children: /* @__PURE__ */ G("aside", {
1722
2507
  ref: u,
1723
2508
  "data-test-id": c,
1724
- className: H("flex flex-col bg-bg-default border-r border-border-default transition-all duration-200", h ? "w-16" : "w-64", i),
2509
+ className: q("flex flex-col bg-bg-default border-r border-border-default transition-all duration-200", h ? "w-16" : "w-64", i),
1725
2510
  ...l,
1726
- children: [/* @__PURE__ */ B("div", {
1727
- className: H("flex items-center gap-3 px-4 py-4 border-b border-border-default", h && "justify-center px-2"),
2511
+ children: [/* @__PURE__ */ G("div", {
2512
+ className: q("flex items-center gap-3 px-4 py-4 border-b border-border-default", h && "justify-center px-2"),
1728
2513
  children: [
1729
- a && /* @__PURE__ */ z("div", {
2514
+ a && /* @__PURE__ */ W("div", {
1730
2515
  className: "shrink-0",
1731
2516
  children: a
1732
2517
  }),
1733
- !h && /* @__PURE__ */ B("div", {
2518
+ !h && /* @__PURE__ */ G("div", {
1734
2519
  className: "flex flex-col min-w-0",
1735
- children: [o && /* @__PURE__ */ z("div", {
2520
+ children: [o && /* @__PURE__ */ W("div", {
1736
2521
  className: "text-p-md font-semibold text-fg-default truncate",
1737
2522
  children: o
1738
- }), s && /* @__PURE__ */ z("div", {
2523
+ }), s && /* @__PURE__ */ W("div", {
1739
2524
  className: "text-p-sm text-fg-secondary truncate",
1740
2525
  children: s
1741
2526
  })]
1742
2527
  }),
1743
- /* @__PURE__ */ z("button", {
2528
+ /* @__PURE__ */ W("button", {
1744
2529
  type: "button",
1745
2530
  onClick: g,
1746
2531
  "aria-label": h ? "Expand sidebar" : "Collapse sidebar",
1747
- className: H("ml-auto inline-flex items-center justify-center h-8 w-8 rounded-md text-fg-secondary hover:bg-bg-subtle hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", h && "ml-0"),
1748
- children: /* @__PURE__ */ z(ee, { className: "h-4 w-4" })
2532
+ className: q("ml-auto inline-flex items-center justify-center h-8 w-8 rounded-md text-fg-secondary hover:bg-bg-subtle hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", h && "ml-0"),
2533
+ children: /* @__PURE__ */ W(N, { className: "h-4 w-4" })
1749
2534
  })
1750
2535
  ]
1751
- }), /* @__PURE__ */ z("nav", {
2536
+ }), /* @__PURE__ */ W("nav", {
1752
2537
  className: "flex-1 overflow-y-auto p-2 flex flex-col gap-0.5",
1753
2538
  children: r
1754
2539
  })]
1755
2540
  })
1756
2541
  });
1757
- }), Kt = i(function({ icon: e, label: t, active: n, badge: r, children: i, onClick: a, href: o, className: s, dataTestId: c, ...l }, u) {
1758
- let { collapsed: d } = Wt(), [p, m] = f(n ?? !1), h = !!i, g = /* @__PURE__ */ B(R, { children: [e && /* @__PURE__ */ z("span", {
2542
+ }), qn = a(function({ icon: e, label: t, active: n, badge: r, children: i, onClick: a, href: o, className: s, dataTestId: c, ...l }, u) {
2543
+ let { collapsed: d } = Gn(), [f, p] = m(n ?? !1), h = !!i, g = /* @__PURE__ */ G(U, { children: [e && /* @__PURE__ */ W("span", {
1759
2544
  className: "inline-flex shrink-0",
1760
2545
  children: e
1761
- }), !d && /* @__PURE__ */ B(R, { children: [
1762
- /* @__PURE__ */ z("span", {
2546
+ }), !d && /* @__PURE__ */ G(U, { children: [
2547
+ /* @__PURE__ */ W("span", {
1763
2548
  className: "flex-1 truncate text-left",
1764
2549
  children: t
1765
2550
  }),
1766
- r && /* @__PURE__ */ z("span", {
2551
+ r && /* @__PURE__ */ W("span", {
1767
2552
  className: "shrink-0",
1768
2553
  children: r
1769
2554
  }),
1770
- h && /* @__PURE__ */ z(S, {
1771
- className: H("h-4 w-4 shrink-0 text-fg-tertiary transition-transform", p && "rotate-90"),
2555
+ h && /* @__PURE__ */ W(w, {
2556
+ className: q("h-4 w-4 shrink-0 text-fg-tertiary transition-transform", f && "rotate-90"),
1772
2557
  "aria-hidden": !0
1773
2558
  })
1774
2559
  ] })] }), _ = () => {
1775
- h && m((e) => !e), a?.();
1776
- }, v = H("group relative flex items-center gap-3 rounded-md px-3 py-2 text-p-std font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", d && "px-2 justify-center", n ? "bg-brand-20 text-brand-800 before:absolute before:left-0 before:top-1/2 before:-translate-y-1/2 before:h-5 before:w-0.5 before:rounded-r before:bg-brand-500" : "text-fg-default hover:bg-bg-container", s);
1777
- return /* @__PURE__ */ B(R, { children: [o ? /* @__PURE__ */ z("a", {
2560
+ h && p((e) => !e), a?.();
2561
+ }, v = q("group relative flex items-center gap-3 rounded-md px-3 py-2 text-p-std font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", d && "px-2 justify-center", n ? "bg-brand-20 text-brand-800 before:absolute before:left-0 before:top-1/2 before:-translate-y-1/2 before:h-5 before:w-0.5 before:rounded-r before:bg-brand-500" : "text-fg-default hover:bg-bg-container", s);
2562
+ return /* @__PURE__ */ G(U, { children: [o ? /* @__PURE__ */ W("a", {
1778
2563
  ref: u,
1779
2564
  href: o,
1780
2565
  onClick: _,
@@ -1782,24 +2567,24 @@ var Gt = i(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
1782
2567
  className: v,
1783
2568
  ...l,
1784
2569
  children: g
1785
- }) : /* @__PURE__ */ z("button", {
2570
+ }) : /* @__PURE__ */ W("button", {
1786
2571
  ref: u,
1787
2572
  type: "button",
1788
2573
  onClick: _,
1789
2574
  "data-test-id": c,
1790
- className: H(v, "w-full"),
2575
+ className: q(v, "w-full"),
1791
2576
  ...l,
1792
2577
  children: g
1793
- }), h && p && !d && /* @__PURE__ */ z("div", {
2578
+ }), h && f && !d && /* @__PURE__ */ W("div", {
1794
2579
  className: "flex flex-col gap-0.5 pl-8",
1795
2580
  children: i
1796
2581
  })] });
1797
- }), qt = {
2582
+ }), Jn = {
1798
2583
  text: "h-[1em] mb-[0.4em] origin-[0%_55%] scale-y-[0.6] rounded-sm",
1799
2584
  circular: "size-10 rounded-full",
1800
2585
  rectangular: "h-4 w-full",
1801
2586
  rounded: "h-4 w-full rounded-md"
1802
- }, Jt = {
2587
+ }, Yn = {
1803
2588
  pulse: "animate-pulse",
1804
2589
  wave: [
1805
2590
  "relative overflow-hidden",
@@ -1809,40 +2594,40 @@ var Gt = i(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
1809
2594
  ].join(" "),
1810
2595
  none: ""
1811
2596
  };
1812
- function Yt(e) {
2597
+ function Xn(e) {
1813
2598
  if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
1814
2599
  }
1815
- var Xt = i(function({ variant: e = "text", animation: t = "pulse", width: n, height: r, count: i = 1, children: a, style: o, className: s, dataTestId: c, ...l }, u) {
2600
+ var Zn = a(function({ variant: e = "text", animation: t = "pulse", width: n, height: r, count: i = 1, children: a, style: o, className: s, dataTestId: c, ...l }, u) {
1816
2601
  let d = a != null, f = Math.max(1, i), p = {
1817
- ...n === void 0 ? null : { width: Yt(n) },
1818
- ...r === void 0 ? null : { height: Yt(r) },
2602
+ ...n === void 0 ? null : { width: Xn(n) },
2603
+ ...r === void 0 ? null : { height: Xn(r) },
1819
2604
  ...o
1820
- }, m = H("block bg-bg-subtle leading-none", qt[e], Jt[t]);
1821
- return d ? /* @__PURE__ */ z("span", {
2605
+ }, m = q("block bg-bg-subtle leading-none", Jn[e], Yn[t]);
2606
+ return d ? /* @__PURE__ */ W("span", {
1822
2607
  ref: u,
1823
2608
  "data-test-id": c,
1824
- className: H(m, "inline-block h-auto w-auto scale-100", s),
2609
+ className: q(m, "inline-block h-auto w-auto scale-100", s),
1825
2610
  style: p,
1826
2611
  ...l,
1827
- children: /* @__PURE__ */ z("span", {
2612
+ children: /* @__PURE__ */ W("span", {
1828
2613
  className: "invisible inline-block",
1829
2614
  "aria-hidden": !0,
1830
2615
  children: a
1831
2616
  })
1832
- }) : f === 1 ? /* @__PURE__ */ z("span", {
2617
+ }) : f === 1 ? /* @__PURE__ */ W("span", {
1833
2618
  ref: u,
1834
2619
  "data-test-id": c,
1835
- className: H(m, s),
2620
+ className: q(m, s),
1836
2621
  style: p,
1837
2622
  role: "status",
1838
2623
  "aria-label": "Loading",
1839
2624
  ...l
1840
- }) : /* @__PURE__ */ z("span", {
2625
+ }) : /* @__PURE__ */ W("span", {
1841
2626
  ref: u,
1842
2627
  "data-test-id": c,
1843
- className: H("block", s),
2628
+ className: q("block", s),
1844
2629
  ...l,
1845
- children: Array.from({ length: f }, (e, t) => /* @__PURE__ */ z("span", {
2630
+ children: Array.from({ length: f }, (e, t) => /* @__PURE__ */ W("span", {
1846
2631
  className: m,
1847
2632
  style: p,
1848
2633
  "aria-hidden": t !== 0 || void 0,
@@ -1850,45 +2635,45 @@ var Xt = i(function({ variant: e = "text", animation: t = "pulse", width: n, hei
1850
2635
  "aria-label": t === 0 ? "Loading" : void 0
1851
2636
  }, t))
1852
2637
  });
1853
- }), Zt = {
2638
+ }), Qn = {
1854
2639
  success: {
1855
2640
  container: "bg-gray-900 dark:bg-gray-700 text-white",
1856
- icon: y
2641
+ icon: x
1857
2642
  },
1858
2643
  warning: {
1859
2644
  container: "bg-gray-900 dark:bg-gray-700 text-white",
1860
- icon: m
2645
+ icon: g
1861
2646
  },
1862
2647
  danger: {
1863
2648
  container: "bg-gray-900 dark:bg-gray-700 text-white",
1864
- icon: F
2649
+ icon: H
1865
2650
  },
1866
2651
  info: {
1867
2652
  container: "bg-gray-900 dark:bg-gray-700 text-white",
1868
- icon: T
2653
+ icon: j
1869
2654
  },
1870
2655
  neutral: {
1871
2656
  container: "bg-gray-900 dark:bg-gray-700 text-white",
1872
- icon: T
2657
+ icon: j
1873
2658
  }
1874
- }, Qt = {
2659
+ }, $n = {
1875
2660
  success: "text-green-400",
1876
2661
  warning: "text-yellow-300",
1877
2662
  danger: "text-red-400",
1878
2663
  info: "text-blue-400",
1879
2664
  neutral: "text-white/70"
1880
- }, $t = n(null);
1881
- function en() {
1882
- let e = s($t);
2665
+ }, er = r(null);
2666
+ function tr() {
2667
+ let e = c(er);
1883
2668
  if (!e) throw Error("useSnackbar must be used inside <SnackbarProvider>");
1884
2669
  return e;
1885
2670
  }
1886
- function tn({ children: e, dataTestId: t }) {
1887
- let [n, r] = f([]), i = d(/* @__PURE__ */ new Map()), a = o((e) => {
2671
+ function nr({ children: e, dataTestId: t }) {
2672
+ let [n, r] = m([]), i = p(/* @__PURE__ */ new Map()), a = s((e) => {
1888
2673
  r((t) => t.filter((t) => t.id !== e));
1889
2674
  let t = i.current.get(e);
1890
2675
  t && (clearTimeout(t), i.current.delete(e));
1891
- }, []), s = o((e) => {
2676
+ }, []), o = s((e) => {
1892
2677
  let t = e.id ?? Math.random().toString(36).slice(2), n = {
1893
2678
  duration: 5e3,
1894
2679
  variant: "neutral",
@@ -1901,35 +2686,35 @@ function tn({ children: e, dataTestId: t }) {
1901
2686
  }
1902
2687
  return t;
1903
2688
  }, [a]);
1904
- return c(() => {
2689
+ return l(() => {
1905
2690
  let e = i.current;
1906
2691
  return () => {
1907
2692
  e.forEach(clearTimeout), e.clear();
1908
2693
  };
1909
- }, []), /* @__PURE__ */ B($t.Provider, {
2694
+ }, []), /* @__PURE__ */ G(er.Provider, {
1910
2695
  value: {
1911
- show: s,
2696
+ show: o,
1912
2697
  dismiss: a
1913
2698
  },
1914
- children: [e, V(/* @__PURE__ */ z("div", {
2699
+ children: [e, K(/* @__PURE__ */ W("div", {
1915
2700
  "data-test-id": t,
1916
2701
  className: "fixed left-1/2 -translate-x-1/2 bottom-6 z-[100] flex flex-col gap-2 w-[min(400px,calc(100vw-2rem))] pointer-events-none",
1917
2702
  children: n.map((e) => {
1918
- let { container: t, icon: n } = Zt[e.variant ?? "neutral"];
1919
- return /* @__PURE__ */ B("div", {
2703
+ let { container: t, icon: n } = Qn[e.variant ?? "neutral"];
2704
+ return /* @__PURE__ */ G("div", {
1920
2705
  role: "status",
1921
2706
  "data-test-id": e.dataTestId,
1922
- className: H("pointer-events-auto flex items-center gap-3 px-4 py-3 rounded-lg shadow-z4", t),
2707
+ className: q("pointer-events-auto flex items-center gap-3 px-4 py-3 rounded-lg shadow-z4", t),
1923
2708
  children: [
1924
- /* @__PURE__ */ z(n, {
1925
- className: H("h-5 w-5 shrink-0", Qt[e.variant ?? "neutral"]),
2709
+ /* @__PURE__ */ W(n, {
2710
+ className: q("h-5 w-5 shrink-0", $n[e.variant ?? "neutral"]),
1926
2711
  "aria-hidden": !0
1927
2712
  }),
1928
- /* @__PURE__ */ z("p", {
2713
+ /* @__PURE__ */ W("p", {
1929
2714
  className: "flex-1 text-p-std",
1930
2715
  children: e.message
1931
2716
  }),
1932
- e.action && /* @__PURE__ */ z("button", {
2717
+ e.action && /* @__PURE__ */ W("button", {
1933
2718
  type: "button",
1934
2719
  onClick: () => {
1935
2720
  e.action?.onClick(), a(e.id);
@@ -1937,12 +2722,12 @@ function tn({ children: e, dataTestId: t }) {
1937
2722
  className: "text-p-std font-semibold text-brand-400 hover:text-brand-300 px-1",
1938
2723
  children: e.action.label
1939
2724
  }),
1940
- /* @__PURE__ */ z("button", {
2725
+ /* @__PURE__ */ W("button", {
1941
2726
  type: "button",
1942
2727
  onClick: () => a(e.id),
1943
2728
  "aria-label": "Close",
1944
2729
  className: "shrink-0 p-1 rounded-md text-white/70 hover:text-white hover:bg-white/10",
1945
- children: /* @__PURE__ */ z(P, { className: "h-4 w-4" })
2730
+ children: /* @__PURE__ */ W(V, { className: "h-4 w-4" })
1946
2731
  })
1947
2732
  ]
1948
2733
  }, e.id);
@@ -1952,15 +2737,15 @@ function tn({ children: e, dataTestId: t }) {
1952
2737
  }
1953
2738
  //#endregion
1954
2739
  //#region src/components/Status/Status.tsx
1955
- var nn = {
2740
+ var rr = {
1956
2741
  lg: "h-7 px-2.5 text-p-std gap-1.5",
1957
2742
  md: "h-6 px-2 text-p-sm gap-1.5",
1958
2743
  sm: "h-5 px-1.5 text-p-sm gap-1"
1959
- }, rn = {
2744
+ }, ir = {
1960
2745
  lg: "h-2 w-2",
1961
2746
  md: "h-1.5 w-1.5",
1962
2747
  sm: "h-1.5 w-1.5"
1963
- }, an = {
2748
+ }, ar = {
1964
2749
  general: {
1965
2750
  container: "bg-bg-subtle text-fg-default dark:text-fg-default",
1966
2751
  dot: "bg-gray-600 dark:bg-gray-400"
@@ -1993,39 +2778,124 @@ var nn = {
1993
2778
  container: "bg-bg-subtle text-fg-disabled",
1994
2779
  dot: "bg-border-strong"
1995
2780
  }
1996
- }, on = i(function({ variant: e = "general", size: t = "md", leftIcon: n, rightIcon: r, dot: i = !0, className: a, children: o, dataTestId: s, ...c }, l) {
1997
- let { container: u, dot: d } = an[e];
1998
- return /* @__PURE__ */ B("span", {
2781
+ }, or = a(function({ variant: e = "general", size: t = "md", leftIcon: n, rightIcon: r, dot: i = !0, className: a, children: o, dataTestId: s, ...c }, l) {
2782
+ let { container: u, dot: d } = ar[e];
2783
+ return /* @__PURE__ */ G("span", {
1999
2784
  ref: l,
2000
2785
  "data-test-id": s,
2001
- className: H("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none", nn[t], u, a),
2786
+ className: q("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none", rr[t], u, a),
2002
2787
  ...c,
2003
2788
  children: [
2004
- n ? /* @__PURE__ */ z("span", {
2789
+ n ? /* @__PURE__ */ W("span", {
2005
2790
  className: "inline-flex shrink-0",
2006
2791
  children: n
2007
- }) : i ? /* @__PURE__ */ z("span", {
2008
- className: H("inline-block shrink-0 rounded-full", rn[t], d),
2792
+ }) : i ? /* @__PURE__ */ W("span", {
2793
+ className: q("inline-block shrink-0 rounded-full", ir[t], d),
2009
2794
  "aria-hidden": !0
2010
2795
  }) : null,
2011
2796
  o,
2012
- r && /* @__PURE__ */ z("span", {
2797
+ r && /* @__PURE__ */ W("span", {
2013
2798
  className: "inline-flex shrink-0",
2014
2799
  children: r
2015
2800
  })
2016
2801
  ]
2017
2802
  });
2018
- }), sn = {
2803
+ }), sr = {
2804
+ lg: "size-9",
2805
+ sm: "size-6"
2806
+ }, cr = {
2807
+ lg: "h-9",
2808
+ sm: "h-6"
2809
+ }, lr = {
2810
+ lg: "border-2",
2811
+ sm: "border"
2812
+ }, ur = {
2813
+ lg: "text-p-std",
2814
+ sm: "text-p-xs"
2815
+ }, dr = {
2816
+ lg: "size-5",
2817
+ sm: "size-3.5"
2818
+ }, fr = {
2819
+ lg: "size-3",
2820
+ sm: "size-2"
2821
+ }, pr = {
2822
+ lg: "text-p-std",
2823
+ sm: "text-p-sm"
2824
+ }, mr = {
2825
+ lg: "text-p-sm",
2826
+ sm: "text-p-xs"
2827
+ }, hr = {
2828
+ upcoming: "bg-bg-default border-border-strong text-fg-tertiary",
2829
+ active: "bg-bg-default border-brand-500 text-brand-700",
2830
+ completed: "bg-brand-500 border-brand-500 text-fg-inverse",
2831
+ rejected: "bg-red-700 border-red-800 text-fg-inverse"
2832
+ }, gr = {
2833
+ upcoming: "ring-4 ring-gray-100/80",
2834
+ active: "ring-4 ring-brand-40/80",
2835
+ completed: "ring-4 ring-brand-40/80",
2836
+ rejected: "ring-4 ring-red-100/80"
2837
+ };
2838
+ function _r(e, t, n, r) {
2839
+ return t === "completed" ? /* @__PURE__ */ W(E, { className: dr[r] }) : t === "rejected" ? /* @__PURE__ */ W(D, { className: dr[r] }) : e === "number" ? n + 1 : e === "dot" ? /* @__PURE__ */ W("span", { className: q("rounded-full", fr[r], t === "active" ? "bg-brand-500" : "bg-transparent") }) : null;
2840
+ }
2841
+ var vr = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "number", orientation: i = "horizontal", size: a = "lg", className: o, dataTestId: s, ...c }, l) {
2842
+ let u = i === "vertical", d = (e) => (e?.status ?? "upcoming") === "completed";
2843
+ return /* @__PURE__ */ W("ol", {
2844
+ ref: l,
2845
+ "data-test-id": s,
2846
+ className: q("flex", u ? "flex-col" : "w-full items-start", o),
2847
+ ...c,
2848
+ children: e.map((i, o) => {
2849
+ let s = i.status ?? "upcoming", c = o === 0, l = o === e.length - 1, f = !c && d(e[o - 1]), p = !l && d(i), m = /* @__PURE__ */ W("span", {
2850
+ className: q("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors", sr[a], lr[a], ur[a], hr[s], i.highlighted && gr[s]),
2851
+ children: _r(r, s, o, a)
2852
+ }), h = /* @__PURE__ */ G("div", {
2853
+ className: q("flex flex-col", u ? "gap-0.5 pb-6" : "mt-2 items-center gap-0.5 text-center"),
2854
+ children: [/* @__PURE__ */ W("span", {
2855
+ className: q("font-medium text-fg-default", pr[a]),
2856
+ children: i.label
2857
+ }), i.description && /* @__PURE__ */ W("span", {
2858
+ className: q("text-fg-secondary", mr[a]),
2859
+ children: i.description
2860
+ })]
2861
+ });
2862
+ return /* @__PURE__ */ G("li", {
2863
+ "aria-current": i.value === t ? "step" : void 0,
2864
+ className: q("relative flex", u ? "flex-row gap-3" : "flex-1 basis-0 min-w-0 flex-col"),
2865
+ children: [/* @__PURE__ */ G("div", {
2866
+ className: q("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : q("w-full items-center justify-center", cr[a])),
2867
+ children: [
2868
+ !c && /* @__PURE__ */ W("span", {
2869
+ "aria-hidden": !0,
2870
+ className: q("absolute", u ? "left-1/2 top-0 bottom-1/2 w-0.5 -translate-x-1/2" : "left-0 right-1/2 top-1/2 h-0.5 -translate-y-1/2", f ? "bg-brand-500" : "bg-border-default")
2871
+ }),
2872
+ !l && /* @__PURE__ */ W("span", {
2873
+ "aria-hidden": !0,
2874
+ className: q("absolute", u ? "left-1/2 top-1/2 bottom-0 w-0.5 -translate-x-1/2" : "left-1/2 right-0 top-1/2 h-0.5 -translate-y-1/2", p ? "bg-brand-500" : "bg-border-default")
2875
+ }),
2876
+ n ? /* @__PURE__ */ W("button", {
2877
+ type: "button",
2878
+ onClick: () => n(i.value),
2879
+ "aria-label": typeof i.label == "string" ? i.label : void 0,
2880
+ className: "relative z-10 rounded-full outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-2",
2881
+ children: m
2882
+ }) : m
2883
+ ]
2884
+ }), h]
2885
+ }, i.value);
2886
+ })
2887
+ });
2888
+ }), yr = {
2019
2889
  md: "h-6 w-11",
2020
2890
  sm: "h-5 w-9"
2021
- }, cn = {
2891
+ }, br = {
2022
2892
  md: "h-5 w-5 peer-checked:translate-x-5",
2023
2893
  sm: "h-4 w-4 peer-checked:translate-x-4"
2024
- }, ln = i(function({ size: e = "md", label: t, description: n, labelPosition: r = "right", id: i, disabled: a, checked: o, defaultChecked: s, className: c, dataTestId: u, ...d }, f) {
2025
- let p = l(), m = i ?? p, h = /* @__PURE__ */ B("span", {
2894
+ }, xr = a(function({ size: e = "md", label: t, description: n, labelPosition: r = "right", id: i, disabled: a, checked: o, defaultChecked: s, className: c, dataTestId: l, ...d }, f) {
2895
+ let p = u(), m = i ?? p, h = /* @__PURE__ */ G("span", {
2026
2896
  className: "relative inline-flex shrink-0",
2027
2897
  children: [
2028
- /* @__PURE__ */ z("input", {
2898
+ /* @__PURE__ */ W("input", {
2029
2899
  ref: f,
2030
2900
  id: m,
2031
2901
  type: "checkbox",
@@ -2036,44 +2906,44 @@ var nn = {
2036
2906
  className: "peer sr-only",
2037
2907
  ...d
2038
2908
  }),
2039
- /* @__PURE__ */ z("span", { className: H("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors", sn[e], "peer-checked:bg-brand-500 dark:peer-checked:bg-brand-500", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-2", a && "!bg-bg-subtle") }),
2040
- /* @__PURE__ */ z("span", { className: H("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform", cn[e]) })
2909
+ /* @__PURE__ */ W("span", { className: q("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors", yr[e], "peer-checked:bg-brand-500 dark:peer-checked:bg-brand-500", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-2", a && "!bg-bg-subtle") }),
2910
+ /* @__PURE__ */ W("span", { className: q("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform", br[e]) })
2041
2911
  ]
2042
2912
  });
2043
- return !t && !n ? /* @__PURE__ */ z("label", {
2913
+ return !t && !n ? /* @__PURE__ */ W("label", {
2044
2914
  htmlFor: m,
2045
- "data-test-id": u,
2046
- className: H("inline-flex", a ? "cursor-not-allowed opacity-60" : "cursor-pointer", c),
2915
+ "data-test-id": l,
2916
+ className: q("inline-flex", a ? "cursor-not-allowed opacity-60" : "cursor-pointer", c),
2047
2917
  children: h
2048
- }) : /* @__PURE__ */ B("label", {
2918
+ }) : /* @__PURE__ */ G("label", {
2049
2919
  htmlFor: m,
2050
- "data-test-id": u,
2051
- className: H("inline-flex items-start gap-3", r === "left" && "flex-row-reverse justify-end", a ? "cursor-not-allowed opacity-60" : "cursor-pointer", c),
2052
- children: [h, /* @__PURE__ */ B("span", {
2920
+ "data-test-id": l,
2921
+ className: q("inline-flex items-start gap-3", r === "left" && "flex-row-reverse justify-end", a ? "cursor-not-allowed opacity-60" : "cursor-pointer", c),
2922
+ children: [h, /* @__PURE__ */ G("span", {
2053
2923
  className: "flex flex-col gap-0.5",
2054
- children: [t && /* @__PURE__ */ z("span", {
2924
+ children: [t && /* @__PURE__ */ W("span", {
2055
2925
  className: "text-p-std font-medium text-fg-default leading-tight",
2056
2926
  children: t
2057
- }), n && /* @__PURE__ */ z("span", {
2927
+ }), n && /* @__PURE__ */ W("span", {
2058
2928
  className: "text-p-sm text-fg-secondary leading-snug",
2059
2929
  children: n
2060
2930
  })]
2061
2931
  })]
2062
2932
  });
2063
- }), un = {
2933
+ }), Sr = {
2064
2934
  comfortable: "[&_td]:py-3 [&_th]:py-3",
2065
2935
  compact: "[&_td]:py-2 [&_th]:py-2"
2066
- }, dn = {
2936
+ }, Cr = {
2067
2937
  left: "text-left",
2068
2938
  center: "text-center",
2069
2939
  right: "text-right"
2070
- }, fn = i(function({ density: e = "comfortable", striped: t = !1, hoverable: n = !0, stickyHeader: r = !1, wrapperClassName: i, className: a, children: o, dataTestId: s, ...c }, l) {
2071
- return /* @__PURE__ */ z("div", {
2940
+ }, wr = a(function({ density: e = "comfortable", striped: t = !1, hoverable: n = !0, stickyHeader: r = !1, wrapperClassName: i, className: a, children: o, dataTestId: s, ...c }, l) {
2941
+ return /* @__PURE__ */ W("div", {
2072
2942
  "data-test-id": s,
2073
- className: H("w-full overflow-x-auto rounded-lg border border-border-default bg-bg-default", i),
2074
- children: /* @__PURE__ */ z("table", {
2943
+ className: q("w-full overflow-x-auto rounded-lg border border-border-default bg-bg-default", i),
2944
+ children: /* @__PURE__ */ W("table", {
2075
2945
  ref: l,
2076
- className: H("w-full border-collapse text-p-std text-fg-default", un[e], a),
2946
+ className: q("w-full border-collapse text-p-std text-fg-default", Sr[e], a),
2077
2947
  "data-striped": t || void 0,
2078
2948
  "data-hoverable": n || void 0,
2079
2949
  "data-sticky": r || void 0,
@@ -2081,43 +2951,43 @@ var nn = {
2081
2951
  children: o
2082
2952
  })
2083
2953
  });
2084
- }), pn = i(function({ className: e, children: t, dataTestId: n, ...r }, i) {
2085
- return /* @__PURE__ */ z("thead", {
2954
+ }), Tr = a(function({ className: e, children: t, dataTestId: n, ...r }, i) {
2955
+ return /* @__PURE__ */ W("thead", {
2086
2956
  ref: i,
2087
2957
  "data-test-id": n,
2088
- className: H("bg-bg-container text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", "[[data-sticky]_&]:sticky [[data-sticky]_&]:top-0 [[data-sticky]_&]:z-10", e),
2958
+ className: q("bg-bg-container text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", "[[data-sticky]_&]:sticky [[data-sticky]_&]:top-0 [[data-sticky]_&]:z-10", e),
2089
2959
  ...r,
2090
2960
  children: t
2091
2961
  });
2092
- }), mn = i(function({ className: e, children: t, dataTestId: n, ...r }, i) {
2093
- return /* @__PURE__ */ z("tbody", {
2962
+ }), Er = a(function({ className: e, children: t, dataTestId: n, ...r }, i) {
2963
+ return /* @__PURE__ */ W("tbody", {
2094
2964
  ref: i,
2095
2965
  "data-test-id": n,
2096
- className: H("[&>tr]:border-t [&>tr]:border-border-default", "[[data-striped]_&>tr:nth-child(even)]:bg-bg-container", "[[data-hoverable]_&>tr:hover]:bg-bg-container", e),
2966
+ className: q("[&>tr]:border-t [&>tr]:border-border-default", "[[data-striped]_&>tr:nth-child(even)]:bg-bg-container", "[[data-hoverable]_&>tr:hover]:bg-bg-container", e),
2097
2967
  ...r,
2098
2968
  children: t
2099
2969
  });
2100
- }), hn = i(function({ className: e, children: t, dataTestId: n, ...r }, i) {
2101
- return /* @__PURE__ */ z("tr", {
2970
+ }), Dr = a(function({ className: e, children: t, dataTestId: n, ...r }, i) {
2971
+ return /* @__PURE__ */ W("tr", {
2102
2972
  ref: i,
2103
2973
  "data-test-id": n,
2104
2974
  className: e,
2105
2975
  ...r,
2106
2976
  children: t
2107
2977
  });
2108
- }), gn = i(function({ sortable: e = !1, sortDir: t = null, onSortChange: n, align: r = "left", className: i, children: a, dataTestId: o, ...s }, c) {
2109
- let l = /* @__PURE__ */ B(R, { children: [a, e && /* @__PURE__ */ z("span", {
2978
+ }), Or = a(function({ sortable: e = !1, sortDir: t = null, onSortChange: n, align: r = "left", className: i, children: a, dataTestId: o, ...s }, c) {
2979
+ let l = /* @__PURE__ */ G(U, { children: [a, e && /* @__PURE__ */ W("span", {
2110
2980
  className: "inline-flex ml-1 align-middle text-fg-tertiary",
2111
- children: z(t === "asc" ? g : t === "desc" ? h : C, { className: "h-3.5 w-3.5" })
2981
+ children: W(t === "asc" ? v : t === "desc" ? _ : T, { className: "h-3.5 w-3.5" })
2112
2982
  })] });
2113
- return /* @__PURE__ */ z("th", {
2983
+ return /* @__PURE__ */ W("th", {
2114
2984
  ref: c,
2115
2985
  scope: "col",
2116
2986
  "data-test-id": o,
2117
- className: H("px-4 whitespace-nowrap", dn[r], i),
2987
+ className: q("px-4 whitespace-nowrap", Cr[r], i),
2118
2988
  "aria-sort": t === "asc" ? "ascending" : t === "desc" ? "descending" : void 0,
2119
2989
  ...s,
2120
- children: e ? /* @__PURE__ */ z("button", {
2990
+ children: e ? /* @__PURE__ */ W("button", {
2121
2991
  type: "button",
2122
2992
  onClick: () => {
2123
2993
  n?.(t === "asc" ? "desc" : t === "desc" ? null : "asc");
@@ -2126,37 +2996,37 @@ var nn = {
2126
2996
  children: l
2127
2997
  }) : l
2128
2998
  });
2129
- }), _n = i(function({ align: e = "left", className: t, children: n, dataTestId: r, ...i }, a) {
2130
- return /* @__PURE__ */ z("td", {
2999
+ }), kr = a(function({ align: e = "left", className: t, children: n, dataTestId: r, ...i }, a) {
3000
+ return /* @__PURE__ */ W("td", {
2131
3001
  ref: a,
2132
3002
  "data-test-id": r,
2133
- className: H("px-4", dn[e], t),
3003
+ className: q("px-4", Cr[e], t),
2134
3004
  ...i,
2135
3005
  children: n
2136
3006
  });
2137
3007
  });
2138
- function vn({ columns: e, rows: t, rowKey: n, empty: r = "No results", density: i, striped: a, hoverable: o, sortKey: s, sortDir: c = null, onSortChange: l, onRowClick: u, className: d, dataTestId: f }) {
2139
- return /* @__PURE__ */ B(fn, {
3008
+ function Ar({ columns: e, rows: t, rowKey: n, empty: r = "No results", density: i, striped: a, hoverable: o, sortKey: s, sortDir: c = null, onSortChange: l, onRowClick: u, className: d, dataTestId: f }) {
3009
+ return /* @__PURE__ */ G(wr, {
2140
3010
  density: i,
2141
3011
  striped: a,
2142
3012
  hoverable: o,
2143
3013
  className: d,
2144
3014
  dataTestId: f,
2145
- children: [/* @__PURE__ */ z(pn, { children: /* @__PURE__ */ z(hn, { children: e.map((e) => /* @__PURE__ */ z(gn, {
3015
+ children: [/* @__PURE__ */ W(Tr, { children: /* @__PURE__ */ W(Dr, { children: e.map((e) => /* @__PURE__ */ W(Or, {
2146
3016
  align: e.align,
2147
3017
  sortable: e.sortable,
2148
3018
  sortDir: s === e.key ? c : null,
2149
3019
  onSortChange: (t) => l?.(e.key, t),
2150
3020
  children: e.header
2151
- }, e.key)) }) }), /* @__PURE__ */ z(mn, { children: t.length === 0 ? /* @__PURE__ */ z(hn, { children: /* @__PURE__ */ z(_n, {
3021
+ }, e.key)) }) }), /* @__PURE__ */ W(Er, { children: t.length === 0 ? /* @__PURE__ */ W(Dr, { children: /* @__PURE__ */ W(kr, {
2152
3022
  colSpan: e.length,
2153
3023
  className: "text-center text-fg-tertiary py-10",
2154
3024
  align: "center",
2155
3025
  children: r
2156
- }) }) : t.map((t, r) => /* @__PURE__ */ z(hn, {
3026
+ }) }) : t.map((t, r) => /* @__PURE__ */ W(Dr, {
2157
3027
  onClick: u ? () => u(t) : void 0,
2158
3028
  className: u ? "cursor-pointer" : void 0,
2159
- children: e.map((e) => /* @__PURE__ */ z(_n, {
3029
+ children: e.map((e) => /* @__PURE__ */ W(kr, {
2160
3030
  align: e.align,
2161
3031
  children: e.render ? e.render(t) : e.accessor ? e.accessor(t) : null
2162
3032
  }, e.key))
@@ -2165,62 +3035,76 @@ function vn({ columns: e, rows: t, rowKey: n, empty: r = "No results", density:
2165
3035
  }
2166
3036
  //#endregion
2167
3037
  //#region src/components/Tabs/Tabs.tsx
2168
- var yn = n(null);
2169
- function bn() {
2170
- let e = s(yn);
3038
+ var jr = r(null);
3039
+ function Mr() {
3040
+ let e = c(jr);
2171
3041
  if (!e) throw Error("Tab components must be used inside <Tabs>");
2172
3042
  return e;
2173
3043
  }
2174
- function xn(t) {
3044
+ function Nr(t) {
2175
3045
  let n = [];
2176
3046
  e.forEach(t, (e) => {
2177
- a(e) && n.push(e);
3047
+ o(e) && n.push(e);
2178
3048
  });
2179
3049
  let r = n.find((e) => e.type?.displayName === "TabList");
2180
- if (!a(r)) return "";
3050
+ if (!o(r)) return "";
2181
3051
  let i = e.toArray(r.props.children);
2182
- for (let e of i) if (a(e)) {
3052
+ for (let e of i) if (o(e)) {
2183
3053
  let t = e.props.value;
2184
3054
  if (t !== void 0) return t;
2185
3055
  }
2186
3056
  return "";
2187
3057
  }
2188
- var Sn = i(function({ defaultValue: e, value: t, onValueChange: n, variant: r = "underline", size: i = "md", className: a, children: o, dataTestId: s, ...c }, l) {
2189
- let [u, d] = f(() => e ?? xn(o)), p = t !== void 0, m = p ? t : u;
2190
- return /* @__PURE__ */ z(yn.Provider, {
3058
+ var Pr = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r = "underline", size: i = "md", disabled: a = !1, className: o, children: s, dataTestId: c, ...l }, d) {
3059
+ let [f, p] = m(() => e ?? Nr(s)), h = t !== void 0, g = h ? t : f, _ = u();
3060
+ return /* @__PURE__ */ W(jr.Provider, {
2191
3061
  value: {
2192
- value: m,
3062
+ value: g,
2193
3063
  setValue: (e) => {
2194
- p || d(e), n?.(e);
3064
+ h || p(e), n?.(e);
2195
3065
  },
2196
3066
  variant: r,
2197
- size: i
3067
+ size: i,
3068
+ tabsId: _,
3069
+ disabled: a
2198
3070
  },
2199
- children: /* @__PURE__ */ z("div", {
2200
- ref: l,
2201
- "data-test-id": s,
2202
- className: H("flex flex-col gap-4", a),
2203
- ...c,
2204
- children: o
3071
+ children: /* @__PURE__ */ W("div", {
3072
+ ref: d,
3073
+ "data-test-id": c,
3074
+ className: q("flex flex-col gap-4", o),
3075
+ ...l,
3076
+ children: s
2205
3077
  })
2206
3078
  });
2207
- }), Cn = i(function({ children: e, className: t, dataTestId: n, ...r }, i) {
2208
- let { variant: a } = bn();
2209
- return /* @__PURE__ */ z("div", {
2210
- ref: i,
3079
+ }), Fr = a(function({ children: e, scrollable: t = !1, className: n, dataTestId: r, onKeyDown: i, ...a }, o) {
3080
+ let { variant: s } = Mr(), c = p(null);
3081
+ return /* @__PURE__ */ W("div", {
3082
+ ref: J(o, c),
2211
3083
  role: "tablist",
2212
- "data-test-id": n,
2213
- className: H("inline-flex", a === "underline" && "border-b border-border-default gap-1 w-full", a === "pills" && "gap-1 p-1 rounded-full bg-bg-container", a === "boxed" && "gap-0 rounded-lg border border-border-default overflow-hidden bg-bg-container", t),
2214
- ...r,
3084
+ onKeyDown: (e) => {
3085
+ i?.(e);
3086
+ let t = Array.from(c.current?.querySelectorAll("[role=\"tab\"]:not(:disabled)") ?? []);
3087
+ if (!t.length) return;
3088
+ let n = t.indexOf(document.activeElement), r = null;
3089
+ if (e.key === "ArrowRight" ? r = (n + 1 + t.length) % t.length : e.key === "ArrowLeft" ? r = (n - 1 + t.length) % t.length : e.key === "Home" ? r = 0 : e.key === "End" && (r = t.length - 1), r === null) return;
3090
+ let a = t[r];
3091
+ a && (e.preventDefault(), a.focus(), a.scrollIntoView({
3092
+ block: "nearest",
3093
+ inline: "nearest"
3094
+ }), a.click());
3095
+ },
3096
+ "data-test-id": r,
3097
+ className: q("inline-flex", s === "underline" && "border-b border-border-default gap-1 w-full", s === "pills" && "gap-1 p-1 rounded-full bg-bg-container", s === "boxed" && "gap-0 rounded-lg border border-border-default overflow-hidden bg-bg-container", t && q("overflow-x-auto flex-nowrap scroll-smooth [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", "[mask-image:linear-gradient(to_right,transparent,black_16px,black_calc(100%-16px),transparent)]"), n),
3098
+ ...a,
2215
3099
  children: e
2216
3100
  });
2217
3101
  });
2218
- Cn.displayName = "TabList";
2219
- var wn = {
3102
+ Fr.displayName = "TabList";
3103
+ var Ir = {
2220
3104
  lg: "h-11 px-4 text-p-md",
2221
3105
  md: "h-10 px-3 text-p-std",
2222
3106
  sm: "h-8 px-2.5 text-p-sm"
2223
- }, Tn = {
3107
+ }, Lr = {
2224
3108
  underline: {
2225
3109
  on: "bg-brand-500 text-white",
2226
3110
  off: "bg-bg-subtle text-fg-secondary"
@@ -2233,305 +3117,428 @@ var wn = {
2233
3117
  on: "bg-brand-500 text-white",
2234
3118
  off: "bg-bg-subtle text-fg-secondary"
2235
3119
  }
2236
- }, En = i(function({ value: e, children: t, disabled: n, icon: r, badge: i, className: a, dataTestId: o, onClick: s, ...c }, l) {
2237
- let { value: u, setValue: d, variant: f, size: p } = bn(), m = u === e, h = i != null && i !== !1;
2238
- return /* @__PURE__ */ B("button", {
2239
- ref: l,
3120
+ }, Rr = a(function({ value: e, children: t, disabled: n, icon: r, badge: i, badgeProps: a, rightIcon: o, onRightIconClick: s, rightIconLabel: c, className: l, dataTestId: u, onClick: d, id: f, ...p }, m) {
3121
+ let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } = Mr(), x = h === e, S = b || n, C = i != null && i !== !1, w = f ?? `${y}-tab-${e}`, T = `${y}-panel-${e}`, E = q("group relative inline-flex items-center justify-center gap-2 font-medium outline-none transition-colors", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1 focus-visible:rounded-md", Ir[v], S && "opacity-50 cursor-not-allowed"), D = _ === "underline" ? q("rounded-t-lg", x ? "text-fg-default" : "text-fg-secondary hover:text-fg-default hover:bg-bg-subtle/60") : _ === "pills" ? q("rounded-full", x ? "bg-bg-default text-fg-default shadow-z1" : "bg-transparent text-fg-secondary hover:text-fg-default") : q("border-r border-border-default last:border-r-0", x ? "bg-bg-default text-fg-default" : "bg-transparent text-fg-secondary hover:bg-bg-subtle"), O = /* @__PURE__ */ G("button", {
3122
+ ref: m,
3123
+ id: w,
2240
3124
  type: "button",
2241
3125
  role: "tab",
2242
- "aria-selected": m,
2243
- disabled: n,
2244
- "data-test-id": o,
3126
+ "aria-selected": x,
3127
+ "aria-controls": T,
3128
+ tabIndex: x ? 0 : -1,
3129
+ disabled: S,
3130
+ "data-test-id": u,
2245
3131
  onClick: (t) => {
2246
- n || (d(e), s?.(t));
3132
+ S || (g(e), d?.(t));
2247
3133
  },
2248
- className: H(H("group relative inline-flex items-center justify-center gap-2 font-medium outline-none transition-colors", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1 focus-visible:rounded-md", wn[p], n && "opacity-50 cursor-not-allowed"), f === "underline" ? H("rounded-t-lg", m ? "text-fg-default" : "text-fg-secondary hover:text-fg-default hover:bg-bg-subtle/60") : f === "pills" ? H("rounded-full", m ? "bg-bg-default text-fg-default shadow-z1" : "bg-transparent text-fg-secondary hover:text-fg-default") : H("border-r border-border-default last:border-r-0", m ? "bg-bg-default text-fg-default" : "bg-transparent text-fg-secondary hover:bg-bg-subtle"), a),
2249
- ...c,
3134
+ className: q(E, D, o && "pr-9", l),
3135
+ ...p,
2250
3136
  children: [
2251
- r && /* @__PURE__ */ z("span", {
3137
+ r && /* @__PURE__ */ W("span", {
2252
3138
  className: "inline-flex shrink-0",
2253
3139
  children: r
2254
3140
  }),
2255
- /* @__PURE__ */ z("span", {
3141
+ /* @__PURE__ */ W("span", {
2256
3142
  className: "truncate",
2257
3143
  children: t
2258
3144
  }),
2259
- h && /* @__PURE__ */ z("span", {
2260
- className: H("inline-flex items-center justify-center shrink-0 rounded-full px-1.5 h-5 min-w-[1.25rem]", "text-label-xs font-semibold tabular-nums leading-none transition-colors", m ? Tn[f].on : Tn[f].off),
3145
+ C && (a ? /* @__PURE__ */ W(Re, {
3146
+ size: "xs",
3147
+ ...a,
2261
3148
  children: i
2262
- }),
2263
- f === "underline" && /* @__PURE__ */ z("span", {
3149
+ }) : /* @__PURE__ */ W("span", {
3150
+ className: q("inline-flex items-center justify-center shrink-0 rounded-full px-1.5 h-5 min-w-[1.25rem]", "text-label-xs font-semibold tabular-nums leading-none transition-colors", x ? Lr[_].on : Lr[_].off),
3151
+ children: i
3152
+ })),
3153
+ _ === "underline" && /* @__PURE__ */ W("span", {
2264
3154
  "aria-hidden": !0,
2265
- className: H("pointer-events-none absolute inset-x-0 -bottom-px h-[2px] rounded-full bg-brand-500 transition-opacity duration-150", m ? "opacity-100" : "opacity-0")
3155
+ className: q("pointer-events-none absolute inset-x-0 -bottom-px h-[2px] rounded-full bg-brand-500 transition-opacity duration-150", x ? "opacity-100" : "opacity-0")
2266
3156
  })
2267
3157
  ]
2268
3158
  });
2269
- }), Dn = i(function({ value: e, children: t, className: n, dataTestId: r, ...i }, a) {
2270
- let { value: o } = bn();
2271
- return o === e ? /* @__PURE__ */ z("div", {
2272
- ref: a,
3159
+ return o ? /* @__PURE__ */ G("span", {
3160
+ className: "relative inline-flex",
3161
+ children: [O, /* @__PURE__ */ W("button", {
3162
+ type: "button",
3163
+ "aria-label": c,
3164
+ disabled: S,
3165
+ onClick: (t) => {
3166
+ t.stopPropagation(), S || s?.(e);
3167
+ },
3168
+ className: "absolute right-1.5 top-1/2 -translate-y-1/2 inline-flex items-center justify-center size-5 rounded text-fg-tertiary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
3169
+ children: o
3170
+ })]
3171
+ }) : O;
3172
+ }), zr = a(function({ value: e, children: t, className: n, dataTestId: r, id: i, keepMounted: a = !1, ...o }, s) {
3173
+ let { value: c, tabsId: l } = Mr(), u = c === e;
3174
+ return !u && !a ? null : /* @__PURE__ */ W("div", {
3175
+ ref: s,
3176
+ id: i ?? `${l}-panel-${e}`,
2273
3177
  role: "tabpanel",
3178
+ "aria-labelledby": `${l}-tab-${e}`,
3179
+ hidden: !u,
2274
3180
  "data-test-id": r,
2275
3181
  className: n,
2276
- ...i,
3182
+ ...o,
2277
3183
  children: t
2278
- }) : null;
2279
- }), On = {
2280
- "h-xl": "text-h-xl",
2281
- "h-lg": "text-h-lg",
2282
- "h-md": "text-h-md",
2283
- "h-std": "text-h-std",
2284
- "h-sm": "text-h-sm",
2285
- "h-xs": "text-h-xs",
2286
- "p-lg": "text-p-lg",
2287
- "p-md": "text-p-md",
2288
- "p-std": "text-p-std",
2289
- "p-sm": "text-p-sm",
2290
- "p-xs": "text-p-xs",
2291
- "label-lg": "text-label-lg",
2292
- "label-md": "text-label-md",
2293
- "label-std": "text-label-std",
2294
- "label-sm": "text-label-sm",
2295
- "label-xs": "text-label-xs",
2296
- "label-xxs": "text-label-xxs"
2297
- }, kn = {
2298
- normal: "font-normal",
2299
- medium: "font-medium",
2300
- semibold: "font-semibold",
2301
- bold: "font-bold"
2302
- }, An = {
2303
- default: "text-fg-default",
2304
- secondary: "text-fg-secondary",
2305
- tertiary: "text-fg-tertiary",
2306
- disabled: "text-fg-disabled",
2307
- inverse: "text-fg-inverse",
2308
- brand: "text-fg-brand",
2309
- info: "text-fg-info",
2310
- success: "text-fg-success",
2311
- warning: "text-fg-warning",
2312
- danger: "text-fg-danger"
2313
- }, jn = {
2314
- "h-xl": "h1",
2315
- "h-lg": "h1",
2316
- "h-md": "h2",
2317
- "h-std": "h3",
2318
- "h-sm": "h4",
2319
- "h-xs": "h5",
2320
- "p-lg": "p",
2321
- "p-md": "p",
2322
- "p-std": "p",
2323
- "p-sm": "p",
2324
- "p-xs": "p",
2325
- "label-lg": "span",
2326
- "label-md": "span",
2327
- "label-std": "span",
2328
- "label-sm": "span",
2329
- "label-xs": "span",
2330
- "label-xxs": "span"
2331
- }, Mn = i(function({ variant: e = "p-std", weight: t, color: n = "default", as: i, truncate: a, className: o, children: s, dataTestId: c, ...l }, u) {
2332
- return r(i ?? jn[e], {
2333
- ref: u,
2334
- "data-test-id": c,
2335
- className: H(On[e], t && kn[t], An[n], a && "truncate", o),
2336
- ...l
2337
- }, s);
2338
- }), Nn = i(function({ label: e, helperText: t, errorText: n, error: r = !1, id: i, disabled: a, required: o, maxLength: s, showCount: c = !1, className: u, wrapperClassName: d, value: f, defaultValue: p, rows: m = 4, dataTestId: h, ...g }, _) {
2339
- let v = l(), y = i ?? v, b = r || !!n, x = n ? `${y}-error` : t ? `${y}-help` : void 0, S = f === void 0 ? p === void 0 ? 0 : String(p).length : String(f).length;
2340
- return /* @__PURE__ */ B("div", {
2341
- className: H("flex flex-col gap-1.5 w-full", d),
2342
- "data-test-id": h,
3184
+ });
3185
+ }), Br = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, error: i = !1, id: a, disabled: o, required: s, maxLength: c, showCount: l = !1, className: d, wrapperClassName: f, value: p, defaultValue: h, rows: g = 4, dataTestId: _, onChange: v, ...y }, b) {
3186
+ let x = u(), S = a ?? x, C = i || !!r, w = r ? `${S}-error` : n ? `${S}-help` : void 0, T = p !== void 0, E = l && !!c, [D, O] = m(() => String(h ?? "").length), k = T ? String(p).length : D;
3187
+ return /* @__PURE__ */ G("div", {
3188
+ className: q("flex flex-col gap-1.5 w-full", f),
3189
+ "data-test-id": _,
2343
3190
  children: [
2344
- e && /* @__PURE__ */ B("label", {
2345
- htmlFor: y,
2346
- className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
2347
- children: [e, o && /* @__PURE__ */ z("span", {
2348
- className: "text-red-600",
2349
- "aria-hidden": !0,
2350
- children: "*"
3191
+ (e || t) && /* @__PURE__ */ G("div", {
3192
+ className: "flex items-center gap-1.5",
3193
+ children: [e && /* @__PURE__ */ G("label", {
3194
+ htmlFor: S,
3195
+ className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
3196
+ children: [e, s && /* @__PURE__ */ W("span", {
3197
+ className: "text-red-600",
3198
+ "aria-hidden": !0,
3199
+ children: "*"
3200
+ })]
3201
+ }), t && /* @__PURE__ */ W("span", {
3202
+ className: "inline-flex items-center gap-1",
3203
+ children: t
2351
3204
  })]
2352
3205
  }),
2353
- /* @__PURE__ */ z("textarea", {
2354
- ref: _,
2355
- id: y,
2356
- disabled: a,
2357
- required: o,
2358
- maxLength: s,
2359
- rows: m,
2360
- value: f,
2361
- defaultValue: p,
2362
- "aria-invalid": b || void 0,
2363
- "aria-describedby": x,
2364
- className: H("w-full px-3 py-2.5 rounded-lg border bg-bg-default text-p-std text-fg-default placeholder:text-fg-tertiary outline-none transition-colors resize-y", b ? "border-red-600" : "border-border-default", !a && !b && "hover:border-border-strong", "focus:ring-2", b ? "focus:ring-red-300 focus:border-red-600" : "focus:ring-brand-300 focus:border-brand-500", a && "bg-bg-container border-border-default cursor-not-allowed", u),
2365
- ...g
3206
+ /* @__PURE__ */ W("textarea", {
3207
+ ref: b,
3208
+ id: S,
3209
+ disabled: o,
3210
+ required: s,
3211
+ maxLength: c,
3212
+ rows: g,
3213
+ value: p,
3214
+ defaultValue: h,
3215
+ onChange: (e) => {
3216
+ !T && E && O(e.target.value.length), v?.(e);
3217
+ },
3218
+ "aria-invalid": C || void 0,
3219
+ "aria-describedby": w,
3220
+ className: q("w-full px-3 py-2.5 rounded-lg border bg-bg-default text-p-std text-fg-default placeholder:text-fg-tertiary outline-none transition-colors resize-y", C ? "border-red-600" : "border-border-default", !o && !C && "hover:border-border-strong", "focus:ring-2", C ? "focus:ring-red-300 focus:border-red-600" : "focus:ring-brand-300 focus:border-brand-500", o && "bg-bg-container border-border-default cursor-not-allowed", d),
3221
+ ...y
2366
3222
  }),
2367
- /* @__PURE__ */ B("div", {
3223
+ /* @__PURE__ */ G("div", {
2368
3224
  className: "flex items-start justify-between gap-2",
2369
- children: [/* @__PURE__ */ z("div", {
3225
+ children: [/* @__PURE__ */ W("div", {
2370
3226
  className: "flex-1 min-w-0",
2371
- children: n ? /* @__PURE__ */ z("p", {
2372
- id: `${y}-error`,
3227
+ children: r ? /* @__PURE__ */ W("p", {
3228
+ id: `${S}-error`,
2373
3229
  className: "text-p-sm text-red-700",
2374
- children: n
2375
- }) : t ? /* @__PURE__ */ z("p", {
2376
- id: `${y}-help`,
3230
+ children: r
3231
+ }) : n ? /* @__PURE__ */ W("p", {
3232
+ id: `${S}-help`,
2377
3233
  className: "text-p-sm text-fg-secondary",
2378
- children: t
3234
+ children: n
2379
3235
  }) : null
2380
- }), c && s && /* @__PURE__ */ B("p", {
3236
+ }), E && /* @__PURE__ */ G("p", {
2381
3237
  className: "text-p-sm text-fg-tertiary tabular-nums shrink-0",
2382
3238
  children: [
2383
- S,
3239
+ k,
2384
3240
  "/",
2385
- s
3241
+ c
2386
3242
  ]
2387
3243
  })]
2388
3244
  })
2389
3245
  ]
2390
3246
  });
2391
- }), Pn = {
3247
+ }), Vr = a(function({ checked: e, label: t, id: n, disabled: r, className: i, dataTestId: a, ...o }, s) {
3248
+ let c = u(), l = n ?? c;
3249
+ return /* @__PURE__ */ G("label", {
3250
+ htmlFor: l,
3251
+ "data-test-id": a,
3252
+ className: q("inline-flex items-center gap-3", r ? "cursor-not-allowed opacity-60" : "cursor-pointer", i),
3253
+ children: [/* @__PURE__ */ G("span", {
3254
+ className: "relative inline-flex shrink-0",
3255
+ children: [
3256
+ /* @__PURE__ */ W("input", {
3257
+ ref: s,
3258
+ id: l,
3259
+ type: "checkbox",
3260
+ role: "switch",
3261
+ checked: e,
3262
+ disabled: r,
3263
+ "aria-label": t ? void 0 : "Dark mode",
3264
+ className: "peer sr-only",
3265
+ ...o
3266
+ }),
3267
+ /* @__PURE__ */ G("span", {
3268
+ className: q("inline-flex h-8 w-16 items-center justify-between rounded-full px-2 transition-colors", "bg-gray-200 peer-checked:bg-gray-700 dark:bg-gray-700 dark:peer-checked:bg-gray-900", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-2"),
3269
+ children: [/* @__PURE__ */ W(re, {
3270
+ className: "size-4 text-yellow-500",
3271
+ "aria-hidden": !0
3272
+ }), /* @__PURE__ */ W(F, {
3273
+ className: "size-4 text-gray-400",
3274
+ "aria-hidden": !0
3275
+ })]
3276
+ }),
3277
+ /* @__PURE__ */ W("span", {
3278
+ "aria-hidden": !0,
3279
+ className: "absolute left-1 top-1 size-6 rounded-full bg-white shadow-z1 transition-transform peer-checked:translate-x-8"
3280
+ })
3281
+ ]
3282
+ }), t && /* @__PURE__ */ W("span", {
3283
+ className: "text-p-std font-medium text-fg-default",
3284
+ children: t
3285
+ })]
3286
+ });
3287
+ }), Hr = {
2392
3288
  lg: "px-3 py-2 text-p-std",
2393
3289
  sm: "px-2 py-1 text-p-sm"
2394
- }, Fn = {
3290
+ }, Ur = {
2395
3291
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
2396
3292
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
2397
3293
  left: "right-full top-1/2 -translate-y-1/2 mr-2",
2398
3294
  right: "left-full top-1/2 -translate-y-1/2 ml-2"
2399
- }, In = {
3295
+ }, Wr = {
2400
3296
  top: "top-full left-1/2 -translate-x-1/2 border-t-fg-default border-x-transparent border-b-transparent",
2401
3297
  bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-fg-default border-x-transparent border-t-transparent",
2402
3298
  left: "left-full top-1/2 -translate-y-1/2 border-l-fg-default border-y-transparent border-r-transparent",
2403
3299
  right: "right-full top-1/2 -translate-y-1/2 border-r-fg-default border-y-transparent border-l-transparent"
2404
- }, Ln = i(function({ content: e, children: n, side: r = "top", size: i = "sm", delay: o = 150, className: s, dataTestId: c }, u) {
2405
- let [p, m] = f(!1), h = d(null), g = l(), _ = () => {
2406
- h.current && clearTimeout(h.current), h.current = setTimeout(() => m(!0), o);
3300
+ }, Gr = a(function({ content: e, children: t, side: r = "top", size: i = "sm", delay: a = 150, className: s, dataTestId: c }, l) {
3301
+ let [d, f] = m(!1), h = p(null), g = u(), _ = () => {
3302
+ h.current && clearTimeout(h.current), h.current = setTimeout(() => f(!0), a);
2407
3303
  }, v = () => {
2408
- h.current && clearTimeout(h.current), m(!1);
3304
+ h.current && clearTimeout(h.current), f(!1);
2409
3305
  };
2410
- if (!a(n)) return n;
2411
- let y = n.props ?? {};
2412
- return /* @__PURE__ */ B("span", {
2413
- ref: u,
3306
+ if (!o(t)) return t;
3307
+ let y = t.props ?? {};
3308
+ return /* @__PURE__ */ G("span", {
3309
+ ref: l,
2414
3310
  "data-test-id": c,
2415
3311
  className: "relative inline-flex",
2416
- children: [t(n, {
3312
+ children: [n(t, {
2417
3313
  onMouseEnter: _,
2418
3314
  onMouseLeave: v,
2419
3315
  onFocus: _,
2420
3316
  onBlur: v,
2421
- "aria-describedby": p ? g : y["aria-describedby"]
2422
- }), p && /* @__PURE__ */ B("span", {
3317
+ "aria-describedby": d ? g : y["aria-describedby"]
3318
+ }), d && /* @__PURE__ */ G("span", {
2423
3319
  role: "tooltip",
2424
3320
  id: g,
2425
- className: H("absolute z-50 whitespace-nowrap rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none", Pn[i], Fn[r], s),
2426
- children: [e, /* @__PURE__ */ z("span", {
3321
+ className: q("absolute z-50 whitespace-nowrap rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none", Hr[i], Ur[r], s),
3322
+ children: [e, /* @__PURE__ */ W("span", {
2427
3323
  "aria-hidden": !0,
2428
- className: H("absolute h-0 w-0 border-4", In[r])
3324
+ className: q("absolute h-0 w-0 border-4", Wr[r])
2429
3325
  })]
2430
3326
  })]
2431
3327
  });
2432
- }), Rn = i(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFiles: i, disabled: a, className: o, dataTestId: s, ...c }, l) {
2433
- let u = d(null), [p, m] = f(!1), h = (e) => {
2434
- if (e.preventDefault(), m(!1), a) return;
2435
- let t = Array.from(e.dataTransfer.files ?? []);
2436
- t.length && i?.(t);
2437
- }, g = r ?? `${e ? e.toUpperCase().replace(/\./g, "") : "Any file"}${n ? `, up to ${n} MB` : ""}`;
2438
- return /* @__PURE__ */ B("div", {
2439
- ref: l,
2440
- onDragOver: (e) => {
2441
- e.preventDefault(), a || m(!0);
3328
+ }), Kr = "We'll be back soon", qr = "We're currently performing scheduled maintenance to make your experience even better. Please check back shortly.", Jr = {
3329
+ lg: "xl",
3330
+ sm: "lg"
3331
+ }, Yr = a(function({ size: e = "lg", title: t, description: n, illustration: r, ...i }, a) {
3332
+ return /* @__PURE__ */ W(rn, {
3333
+ ref: a,
3334
+ size: e,
3335
+ title: t ?? Kr,
3336
+ description: n ?? qr,
3337
+ illustration: r ?? /* @__PURE__ */ W(Yt, {
3338
+ icon: O,
3339
+ tone: "brand",
3340
+ shape: "circle",
3341
+ size: Jr[e]
3342
+ }),
3343
+ ...i
3344
+ });
3345
+ });
3346
+ //#endregion
3347
+ //#region src/components/Upload/Upload.tsx
3348
+ function Xr(e, t) {
3349
+ let n = t.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
3350
+ if (!n.length) return !0;
3351
+ let r = e.name.toLowerCase(), i = e.type.toLowerCase();
3352
+ return n.some((e) => e.endsWith("/*") ? i.startsWith(e.slice(0, -1)) : e.startsWith(".") ? r.endsWith(e) : i === e);
3353
+ }
3354
+ var Zr = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFiles: i, disabled: a, validateFiles: o = !1, maxFiles: s, dedupe: c = o, currentFiles: l = [], onReject: u, mode: d = "dropzone", triggerLabel: f, triggerIcon: h, label: g, required: _, labelAddons: v, className: y, dataTestId: b, ...x }, S) {
3355
+ let C = p(null), [w, T] = m(!1), E = p(0), D = (t) => {
3356
+ if (!t.length) return;
3357
+ if (!o) {
3358
+ i?.(t);
3359
+ return;
3360
+ }
3361
+ let r = [], a = [], d = [...l], f = s === void 0 ? Infinity : Math.max(0, s - l.length);
3362
+ for (let i of t) {
3363
+ if (c && d.some((e) => e.name === i.name && e.size === i.size)) {
3364
+ a.push({
3365
+ file: i,
3366
+ reason: "duplicate"
3367
+ });
3368
+ continue;
3369
+ }
3370
+ if (e && !Xr(i, e)) {
3371
+ a.push({
3372
+ file: i,
3373
+ reason: "type"
3374
+ });
3375
+ continue;
3376
+ }
3377
+ if (n !== void 0 && i.size > n * 1024 * 1024) {
3378
+ a.push({
3379
+ file: i,
3380
+ reason: "size"
3381
+ });
3382
+ continue;
3383
+ }
3384
+ if (f <= 0) {
3385
+ a.push({
3386
+ file: i,
3387
+ reason: "maxFiles"
3388
+ });
3389
+ continue;
3390
+ }
3391
+ r.push(i), d.push(i), --f;
3392
+ }
3393
+ r.length && i?.(r), a.length && u?.(a);
3394
+ }, O = (e) => {
3395
+ e.preventDefault(), E.current = 0, T(!1), !a && D(Array.from(e.dataTransfer.files ?? []));
3396
+ }, k = r ?? `${e ? e.toUpperCase().replace(/\./g, "") : "Any file"}${n ? `, up to ${n} MB` : ""}`, A = /* @__PURE__ */ W("input", {
3397
+ ref: C,
3398
+ type: "file",
3399
+ accept: e,
3400
+ multiple: t,
3401
+ disabled: a,
3402
+ onChange: (e) => {
3403
+ D(Array.from(e.target.files ?? [])), e.target.value = "";
3404
+ },
3405
+ className: "sr-only"
3406
+ }), j = (g || v) && /* @__PURE__ */ G("div", {
3407
+ className: "flex items-center gap-1.5",
3408
+ children: [g && /* @__PURE__ */ G("span", {
3409
+ className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
3410
+ children: [g, _ && /* @__PURE__ */ W("span", {
3411
+ className: "text-red-600",
3412
+ "aria-hidden": !0,
3413
+ children: "*"
3414
+ })]
3415
+ }), v && /* @__PURE__ */ W("span", {
3416
+ className: "inline-flex items-center gap-1",
3417
+ children: v
3418
+ })]
3419
+ });
3420
+ if (d !== "dropzone") {
3421
+ let e = d === "icon";
3422
+ return /* @__PURE__ */ G("div", {
3423
+ ref: S,
3424
+ "data-test-id": b,
3425
+ className: q("flex flex-col gap-1.5", y),
3426
+ ...x,
3427
+ children: [
3428
+ j,
3429
+ /* @__PURE__ */ W(Ke, {
3430
+ type: "button",
3431
+ variant: "secondary",
3432
+ iconOnly: e,
3433
+ disabled: a,
3434
+ onClick: () => C.current?.click(),
3435
+ leftIcon: e ? void 0 : h ?? /* @__PURE__ */ W(L, { className: "h-4 w-4" }),
3436
+ "aria-label": e ? "Upload file" : void 0,
3437
+ children: e ? h ?? /* @__PURE__ */ W(R, { className: "h-4 w-4" }) : f ?? "Choose a file"
3438
+ }),
3439
+ A
3440
+ ]
3441
+ });
3442
+ }
3443
+ let M = /* @__PURE__ */ G("div", {
3444
+ ref: S,
3445
+ onDragEnter: () => {
3446
+ E.current += 1, a || T(!0);
2442
3447
  },
2443
- onDragLeave: () => m(!1),
2444
- onDrop: h,
2445
- onClick: () => !a && u.current?.click(),
3448
+ onDragOver: (e) => e.preventDefault(),
3449
+ onDragLeave: () => {
3450
+ E.current = Math.max(0, E.current - 1), E.current === 0 && T(!1);
3451
+ },
3452
+ onDrop: O,
3453
+ onClick: () => !a && C.current?.click(),
2446
3454
  role: "button",
2447
3455
  tabIndex: 0,
2448
3456
  onKeyDown: (e) => {
2449
- (e.key === "Enter" || e.key === " ") && !a && (e.preventDefault(), u.current?.click());
3457
+ (e.key === "Enter" || e.key === " ") && !a && (e.preventDefault(), C.current?.click());
2450
3458
  },
2451
3459
  "aria-disabled": a || void 0,
2452
- "data-test-id": s,
2453
- className: H("flex flex-col items-center justify-center text-center gap-2 px-6 py-8 rounded-lg border-2 border-dashed cursor-pointer transition-colors outline-none", p ? "border-brand-500 bg-brand-20" : "border-border-default bg-bg-container hover:bg-bg-subtle", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", a && "opacity-50 cursor-not-allowed", o),
2454
- ...c,
3460
+ "data-test-id": b,
3461
+ className: q("flex flex-col items-center justify-center text-center gap-2 px-6 py-8 rounded-lg border-2 border-dashed cursor-pointer transition-colors outline-none", w ? "border-brand-500 bg-brand-20" : "border-border-default bg-bg-container hover:bg-bg-subtle", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", a && "opacity-50 cursor-not-allowed", y),
3462
+ ...x,
2455
3463
  children: [
2456
- /* @__PURE__ */ z("div", {
3464
+ /* @__PURE__ */ W("div", {
2457
3465
  className: "h-10 w-10 rounded-full bg-bg-default flex items-center justify-center text-fg-secondary shadow-z1",
2458
- children: /* @__PURE__ */ z(M, { className: "h-5 w-5" })
3466
+ children: /* @__PURE__ */ W(ae, { className: "h-5 w-5" })
2459
3467
  }),
2460
- /* @__PURE__ */ B("div", {
3468
+ /* @__PURE__ */ G("div", {
2461
3469
  className: "flex flex-col gap-0.5",
2462
- children: [/* @__PURE__ */ B("p", {
3470
+ children: [/* @__PURE__ */ G("p", {
2463
3471
  className: "text-p-std text-fg-default",
2464
- children: [/* @__PURE__ */ z("span", {
3472
+ children: [/* @__PURE__ */ W("span", {
2465
3473
  className: "font-semibold text-brand-700",
2466
3474
  children: "Choose a file"
2467
3475
  }), " or drag & drop it here."]
2468
- }), /* @__PURE__ */ z("p", {
3476
+ }), /* @__PURE__ */ W("p", {
2469
3477
  className: "text-p-sm text-fg-tertiary",
2470
- children: g
3478
+ children: k
2471
3479
  })]
2472
3480
  }),
2473
- /* @__PURE__ */ z("input", {
2474
- ref: u,
2475
- type: "file",
2476
- accept: e,
2477
- multiple: t,
2478
- disabled: a,
2479
- onChange: (e) => {
2480
- let t = Array.from(e.target.files ?? []);
2481
- t.length && i?.(t), e.target.value = "";
2482
- },
2483
- className: "sr-only"
2484
- })
3481
+ A
2485
3482
  ]
2486
3483
  });
2487
- }), zn = {
3484
+ return j ? /* @__PURE__ */ G("div", {
3485
+ className: "flex flex-col gap-1.5",
3486
+ children: [j, M]
3487
+ }) : M;
3488
+ }), Qr = {
2488
3489
  processing: "border-border-default bg-bg-default",
2489
3490
  completed: "border-border-default bg-bg-default",
2490
3491
  error: "border-red-300 bg-bg-danger-lighter"
2491
- }, Bn = i(function({ name: e, meta: t, status: n = "processing", progress: r = 0, errorText: i, onRetry: a, onRemove: o, className: s, dataTestId: c, ...l }, u) {
2492
- return /* @__PURE__ */ B("div", {
2493
- ref: u,
2494
- "data-test-id": c,
2495
- className: H("flex items-start gap-3 px-3 py-2.5 rounded-lg border", zn[n], s),
2496
- ...l,
3492
+ }, $r = a(function({ name: e, meta: t, status: n = "processing", progress: r = 0, errorText: i, onRetry: a, onRemove: o, previewSrc: s, className: c, dataTestId: l, ...u }, d) {
3493
+ let [f, p] = m(!1), g = !!s && !f;
3494
+ return /* @__PURE__ */ G("div", {
3495
+ ref: d,
3496
+ "data-test-id": l,
3497
+ className: q("flex items-start gap-3 px-3 py-2.5 rounded-lg border", Qr[n], c),
3498
+ ...u,
2497
3499
  children: [
2498
- /* @__PURE__ */ z("div", {
2499
- className: H("shrink-0 flex items-center justify-center h-9 w-9 rounded-md", n === "error" ? "bg-red-100 dark:bg-red-900/30 text-red-700" : "bg-bg-subtle text-fg-secondary"),
2500
- children: /* @__PURE__ */ z(w, { className: "h-4 w-4" })
3500
+ /* @__PURE__ */ W("div", {
3501
+ className: q("shrink-0 flex items-center justify-center h-9 w-9 rounded-md overflow-hidden", !g && (n === "error" ? "bg-red-100 dark:bg-red-900/30 text-red-700" : "bg-bg-subtle text-fg-secondary")),
3502
+ children: g ? /* @__PURE__ */ W("img", {
3503
+ src: s,
3504
+ alt: "",
3505
+ className: "h-full w-full object-cover",
3506
+ onError: () => p(!0)
3507
+ }) : /* @__PURE__ */ W(A, { className: "h-4 w-4" })
2501
3508
  }),
2502
- /* @__PURE__ */ B("div", {
3509
+ /* @__PURE__ */ G("div", {
2503
3510
  className: "flex-1 min-w-0",
2504
3511
  children: [
2505
- /* @__PURE__ */ B("div", {
3512
+ /* @__PURE__ */ G("div", {
2506
3513
  className: "flex items-baseline justify-between gap-2",
2507
- children: [/* @__PURE__ */ z("p", {
3514
+ children: [/* @__PURE__ */ W("p", {
2508
3515
  className: "truncate text-p-std font-medium text-fg-default",
2509
3516
  children: e
2510
- }), /* @__PURE__ */ B("div", {
3517
+ }), /* @__PURE__ */ G("div", {
2511
3518
  className: "flex items-center gap-1 shrink-0",
2512
- children: [n === "completed" && /* @__PURE__ */ z(y, {
3519
+ children: [n === "completed" && /* @__PURE__ */ W(x, {
2513
3520
  className: "h-4 w-4 text-green-600",
2514
3521
  "aria-label": "Completed"
2515
- }), n === "error" && /* @__PURE__ */ z(p, {
3522
+ }), n === "error" && /* @__PURE__ */ W(h, {
2516
3523
  className: "h-4 w-4 text-red-600",
2517
3524
  "aria-label": "Failed"
2518
3525
  })]
2519
3526
  })]
2520
3527
  }),
2521
- t && /* @__PURE__ */ z("p", {
3528
+ t && /* @__PURE__ */ W("p", {
2522
3529
  className: "text-p-sm text-fg-tertiary mt-0.5",
2523
3530
  children: t
2524
3531
  }),
2525
- n === "processing" && /* @__PURE__ */ z("div", {
3532
+ n === "processing" && /* @__PURE__ */ W("div", {
2526
3533
  className: "mt-2 h-1 w-full rounded-full bg-bg-subtle overflow-hidden",
2527
- children: /* @__PURE__ */ z("div", {
3534
+ children: /* @__PURE__ */ W("div", {
2528
3535
  className: "h-full bg-brand-500 transition-[width] duration-200",
2529
3536
  style: { width: `${Math.min(100, Math.max(0, r))}%` }
2530
3537
  })
2531
3538
  }),
2532
- n === "error" && i && /* @__PURE__ */ B("p", {
3539
+ n === "error" && i && /* @__PURE__ */ G("p", {
2533
3540
  className: "text-p-sm text-red-700 mt-1",
2534
- children: [i, a && /* @__PURE__ */ z("button", {
3541
+ children: [i, a && /* @__PURE__ */ W("button", {
2535
3542
  type: "button",
2536
3543
  onClick: a,
2537
3544
  className: "ml-2 underline font-medium hover:no-underline",
@@ -2540,16 +3547,134 @@ var wn = {
2540
3547
  })
2541
3548
  ]
2542
3549
  }),
2543
- o && /* @__PURE__ */ z("button", {
3550
+ o && /* @__PURE__ */ W("button", {
2544
3551
  type: "button",
2545
3552
  onClick: o,
2546
3553
  "aria-label": "Remove",
2547
3554
  className: "shrink-0 p-1 rounded-md text-fg-tertiary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
2548
- children: z(n === "completed" ? j : P, { className: "h-4 w-4" })
3555
+ children: W(n === "completed" ? ie : V, { className: "h-4 w-4" })
2549
3556
  })
2550
3557
  ]
2551
3558
  });
2552
- }), J = {
3559
+ });
3560
+ //#endregion
3561
+ //#region src/hooks/useStepper.ts
3562
+ function ei(e, t) {
3563
+ return t <= 0 ? 0 : Math.min(Math.max(e, 0), t - 1);
3564
+ }
3565
+ function ti({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i = !1 }) {
3566
+ let [a, o] = m(() => ei(t, e)), s = n !== void 0, c = s ? ei(n, e) : a, l = (t) => {
3567
+ let n = ei(t, e);
3568
+ s || o(n), r?.(n);
3569
+ };
3570
+ return {
3571
+ step: c,
3572
+ count: e,
3573
+ isFirst: c === 0,
3574
+ isLast: c === e - 1,
3575
+ next: () => {
3576
+ if (c >= e - 1) {
3577
+ i && l(0);
3578
+ return;
3579
+ }
3580
+ l(c + 1);
3581
+ },
3582
+ prev: () => {
3583
+ if (c <= 0) {
3584
+ i && l(e - 1);
3585
+ return;
3586
+ }
3587
+ l(c - 1);
3588
+ },
3589
+ goTo: l,
3590
+ reset: () => l(t)
3591
+ };
3592
+ }
3593
+ //#endregion
3594
+ //#region src/hooks/useOnOutsideClick.ts
3595
+ function ni(e, t, n = !0) {
3596
+ l(() => {
3597
+ if (!n) return;
3598
+ let r = (n) => {
3599
+ let r = e?.current;
3600
+ !r || r.contains(n.target) || t(n);
3601
+ };
3602
+ return document.addEventListener("mousedown", r), document.addEventListener("touchstart", r), () => {
3603
+ document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r);
3604
+ };
3605
+ }, [
3606
+ e,
3607
+ t,
3608
+ n
3609
+ ]);
3610
+ }
3611
+ //#endregion
3612
+ //#region src/hooks/useEscapeKey.ts
3613
+ function ri(e, t = !0) {
3614
+ l(() => {
3615
+ if (!t) return;
3616
+ let n = (t) => {
3617
+ t.key === "Escape" && e();
3618
+ };
3619
+ return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
3620
+ }, [e, t]);
3621
+ }
3622
+ //#endregion
3623
+ //#region src/hooks/useHideBodyScroll.ts
3624
+ var ii = 0, ai = "";
3625
+ function oi(e) {
3626
+ l(() => {
3627
+ if (e) return ii === 0 && (ai = document.body.style.overflow, document.body.style.overflow = "hidden"), ii += 1, () => {
3628
+ --ii, ii === 0 && (document.body.style.overflow = ai);
3629
+ };
3630
+ }, [e]);
3631
+ }
3632
+ //#endregion
3633
+ //#region src/hooks/useIsMobile.ts
3634
+ var si = 768;
3635
+ function ci(e = si) {
3636
+ let [t, n] = m(!1);
3637
+ return l(() => {
3638
+ if (typeof window > "u" || typeof window.matchMedia != "function") return;
3639
+ let t = window.matchMedia(`(max-width: ${e}px)`), r = () => n(t.matches);
3640
+ return r(), t.addEventListener("change", r), () => t.removeEventListener("change", r);
3641
+ }, [e]), t;
3642
+ }
3643
+ //#endregion
3644
+ //#region src/hooks/useFormContext.ts
3645
+ function li() {
3646
+ let e = c(cn);
3647
+ if (!e) throw Error("useFormContext must be used inside a FormContainer.");
3648
+ return e;
3649
+ }
3650
+ //#endregion
3651
+ //#region src/hooks/useFormProps.ts
3652
+ var Y = (() => void 0), ui = {
3653
+ control: Y,
3654
+ register: Y,
3655
+ errors: {},
3656
+ setValue: Y,
3657
+ getValues: Y,
3658
+ watch: Y,
3659
+ reset: Y,
3660
+ trigger: Y,
3661
+ clearErrors: Y,
3662
+ setError: Y,
3663
+ getFieldState: Y,
3664
+ unregister: Y,
3665
+ isDirty: !1,
3666
+ isSubmitted: !1,
3667
+ isSubmitting: !1,
3668
+ isValid: !1,
3669
+ dirtyFields: {},
3670
+ submit: Y
3671
+ };
3672
+ function di() {
3673
+ return c(cn) ?? ui;
3674
+ }
3675
+ //#endregion
3676
+ //#region src/tokens/colors.ts
3677
+ var X = {
2553
3678
  900: "#31531C",
2554
3679
  800: "#416E26",
2555
3680
  700: "#518A2F",
@@ -2563,7 +3688,7 @@ var wn = {
2563
3688
  40: "#CAE7B9",
2564
3689
  30: "#DBEFD1",
2565
3690
  20: "#EDF7E8"
2566
- }, Y = {
3691
+ }, Z = {
2567
3692
  900: "#0e121b",
2568
3693
  800: "#222530",
2569
3694
  700: "#2b303b",
@@ -2575,7 +3700,7 @@ var wn = {
2575
3700
  100: "#f2f5f8",
2576
3701
  50: "#f5f7fa",
2577
3702
  20: "#f7f9fc"
2578
- }, X = "#FEFEFE", Vn = {
3703
+ }, Q = "#FEFEFE", fi = {
2579
3704
  900: "#0b4627",
2580
3705
  800: "#0f5c33",
2581
3706
  700: "#3D8B46",
@@ -2586,7 +3711,7 @@ var wn = {
2586
3711
  200: "#aeeacb",
2587
3712
  100: "#d0f5e1",
2588
3713
  50: "#e0faec"
2589
- }, Z = {
3714
+ }, pi = {
2590
3715
  900: "#2443B8",
2591
3716
  800: "#2E63D6",
2592
3717
  700: "#3475E8",
@@ -2597,7 +3722,7 @@ var wn = {
2597
3722
  200: "#9ACAFA",
2598
3723
  100: "#C1DEFC",
2599
3724
  50: "#E6F2FE"
2600
- }, Hn = {
3725
+ }, mi = {
2601
3726
  900: "#081FA6",
2602
3727
  800: "#0E2AB2",
2603
3728
  700: "#2431B9",
@@ -2609,7 +3734,7 @@ var wn = {
2609
3734
  100: "#CBC4ED",
2610
3735
  50: "#EAE7F7",
2611
3736
  20: "#F5F3FB"
2612
- }, Un = {
3737
+ }, hi = {
2613
3738
  900: "#4A0A20",
2614
3739
  800: "#79012F",
2615
3740
  700: "#A2023F",
@@ -2620,7 +3745,7 @@ var wn = {
2620
3745
  200: "#FE7DAF",
2621
3746
  100: "#FEA8C9",
2622
3747
  50: "#FFD4E4"
2623
- }, Q = {
3748
+ }, gi = {
2624
3749
  900: "#8b1822",
2625
3750
  800: "#ad1f2b",
2626
3751
  700: "#d02533",
@@ -2643,47 +3768,47 @@ var wn = {
2643
3768
  200: "#F7DE8E",
2644
3769
  100: "#FAEBB9",
2645
3770
  50: "#FDF7E4"
2646
- }, Wn = {
2647
- brand: J,
2648
- gray: Y,
2649
- green: Vn,
2650
- blue: Z,
2651
- purple: Hn,
2652
- pink: Un,
2653
- red: Q,
3771
+ }, _i = {
3772
+ brand: X,
3773
+ gray: Z,
3774
+ green: fi,
3775
+ blue: pi,
3776
+ purple: mi,
3777
+ pink: hi,
3778
+ red: gi,
2654
3779
  yellow: $
2655
- }, Gn = {
2656
- bgDefault: X,
2657
- bgContainer: Y[50],
2658
- bgSubtle: Y[100],
2659
- bgBrandLighter: J[20],
2660
- bgInfoLighter: Z[50],
2661
- bgSuccessLighter: Vn[50],
3780
+ }, vi = {
3781
+ bgDefault: Q,
3782
+ bgContainer: Z[50],
3783
+ bgSubtle: Z[100],
3784
+ bgBrandLighter: X[20],
3785
+ bgInfoLighter: pi[50],
3786
+ bgSuccessLighter: fi[50],
2662
3787
  bgWarningLighter: $[50],
2663
- bgDangerLighter: Q[50],
2664
- fgDefault: Y[900],
2665
- fgSecondary: Y[600],
2666
- fgTertiary: Y[500],
2667
- fgDisabled: Y[400],
2668
- fgInverse: X,
2669
- fgBrand: J[500],
2670
- fgInfo: Z[600],
2671
- fgSuccess: Vn[600],
3788
+ bgDangerLighter: gi[50],
3789
+ fgDefault: Z[900],
3790
+ fgSecondary: Z[600],
3791
+ fgTertiary: Z[500],
3792
+ fgDisabled: Z[400],
3793
+ fgInverse: Q,
3794
+ fgBrand: X[500],
3795
+ fgInfo: pi[600],
3796
+ fgSuccess: fi[600],
2672
3797
  fgWarning: $[800],
2673
- fgDanger: Q[800],
2674
- borderDefault: Y[200],
2675
- borderSubtle: Y[100],
2676
- borderStrong: Y[300],
2677
- borderBrand: J[500],
2678
- iconPrimary: Y[900],
2679
- iconSecondary: Y[600],
2680
- iconInverse: X,
2681
- iconBrand: J[500],
2682
- iconInfo: Z[600],
2683
- iconDanger: Q[800],
3798
+ fgDanger: gi[800],
3799
+ borderDefault: Z[200],
3800
+ borderSubtle: Z[100],
3801
+ borderStrong: Z[300],
3802
+ borderBrand: X[500],
3803
+ iconPrimary: Z[900],
3804
+ iconSecondary: Z[600],
3805
+ iconInverse: Q,
3806
+ iconBrand: X[500],
3807
+ iconInfo: pi[600],
3808
+ iconDanger: gi[800],
2684
3809
  iconWarning: $[800]
2685
- }, Kn = {
2686
- ...Gn,
3810
+ }, yi = {
3811
+ ...vi,
2687
3812
  bgDefault: "#0B1120",
2688
3813
  bgContainer: "#0F172A",
2689
3814
  bgSubtle: "#121C30",
@@ -2692,16 +3817,16 @@ var wn = {
2692
3817
  bgSuccessLighter: "rgba(31, 193, 107, 0.15)",
2693
3818
  bgWarningLighter: "rgba(237, 145, 42, 0.15)",
2694
3819
  bgDangerLighter: "rgba(230, 27, 0, 0.15)",
2695
- fgDefault: X,
2696
- fgSecondary: Y[400],
2697
- fgTertiary: Y[500],
2698
- fgDisabled: Y[600],
3820
+ fgDefault: Q,
3821
+ fgSecondary: Z[400],
3822
+ fgTertiary: Z[500],
3823
+ fgDisabled: Z[600],
2699
3824
  borderDefault: "rgba(255, 255, 255, 0.05)",
2700
3825
  borderSubtle: "rgba(255, 255, 255, 0.03)",
2701
3826
  borderStrong: "rgba(255, 255, 255, 0.10)",
2702
- iconPrimary: X,
2703
- iconSecondary: Y[400]
2704
- }, qn = {
3827
+ iconPrimary: Q,
3828
+ iconSecondary: Z[400]
3829
+ }, bi = {
2705
3830
  ps: [
2706
3831
  "Noto Sans Armenian",
2707
3832
  "Noto Sans",
@@ -2716,7 +3841,7 @@ var wn = {
2716
3841
  "system-ui",
2717
3842
  "sans-serif"
2718
3843
  ]
2719
- }, Jn = {
3844
+ }, xi = {
2720
3845
  xl: {
2721
3846
  fontSize: "64px",
2722
3847
  lineHeight: "72px"
@@ -2741,7 +3866,7 @@ var wn = {
2741
3866
  fontSize: "24px",
2742
3867
  lineHeight: "32px"
2743
3868
  }
2744
- }, Yn = {
3869
+ }, Si = {
2745
3870
  lg: {
2746
3871
  fontSize: "20px",
2747
3872
  lineHeight: "28px"
@@ -2762,7 +3887,7 @@ var wn = {
2762
3887
  fontSize: "10px",
2763
3888
  lineHeight: "14px"
2764
3889
  }
2765
- }, Xn = {
3890
+ }, Ci = {
2766
3891
  lg: {
2767
3892
  fontSize: "20px",
2768
3893
  lineHeight: "28px"
@@ -2787,19 +3912,19 @@ var wn = {
2787
3912
  fontSize: "6px",
2788
3913
  lineHeight: "6px"
2789
3914
  }
2790
- }, Zn = {
2791
- headline: Jn,
2792
- paragraph: Yn,
2793
- label: Xn
2794
- }, Qn = {
3915
+ }, wi = {
3916
+ headline: xi,
3917
+ paragraph: Si,
3918
+ label: Ci
3919
+ }, Ti = {
2795
3920
  sm: "2rem",
2796
3921
  md: "2.5rem",
2797
3922
  lg: "3rem"
2798
- }, $n = {
3923
+ }, Ei = {
2799
3924
  sm: "0.875rem",
2800
3925
  md: "1rem",
2801
3926
  lg: "1.25rem"
2802
- }, er = {
3927
+ }, Di = {
2803
3928
  xs: "2px",
2804
3929
  sm: "4px",
2805
3930
  md: "8px",
@@ -2808,7 +3933,7 @@ var wn = {
2808
3933
  "2xl": "20px",
2809
3934
  "3xl": "24px",
2810
3935
  full: "9999px"
2811
- }, tr = {
3936
+ }, Oi = {
2812
3937
  z1: "0 1px 2px 0 rgba(0, 0, 0, 0.06)",
2813
3938
  z2: "0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04)",
2814
3939
  z3: "0 4px 8px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.04)",
@@ -2816,6 +3941,6 @@ var wn = {
2816
3941
  z5: "0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12)"
2817
3942
  };
2818
3943
  //#endregion
2819
- export { W as Accordion, G as AccordionItem, K as Avatar, ue as AvatarGroup, he as Badge, be as Button, Se as ButtonGroup, Te as Card, Oe as Checkbox, vn as DataTable, Ie as DatePicker, Be as Divider, Ge as Drawer, Ze as DropdownContent, Qe as DropdownItem, et as DropdownLabel, Ye as DropdownMenu, $e as DropdownSeparator, Xe as DropdownTrigger, rt as Filter, ot as IconTile, st as InfoField, lt as InlineAlert, mt as Input, _t as Modal, vt as MultiSelect, Ct as NotificationBadge, Dt as Pagination, At as PersonCard, Ft as Progress, Bt as Radio, Lt as RadioGroup, Ht as Select, Gt as Sidebar, Kt as SidebarItem, Xt as Skeleton, tn as SnackbarProvider, on as Status, ln as Switch, mn as TBody, _n as TD, gn as TH, pn as THead, hn as TR, En as Tab, Cn as TabList, Dn as TabPanel, fn as Table, Sn as Tabs, Mn as Text, Nn as TextArea, Ln as Tooltip, Rn as Upload, Bn as UploadItem, Z as blue, J as brand, H as cn, Wn as colorPrimitives, Qn as controlHeight, Kn as darkTheme, qn as fontFamily, Y as gray, Vn as green, Jn as headline, $n as iconSize, Xn as label, Gn as lightTheme, Yn as paragraph, Un as pink, Hn as purple, er as radius, Q as red, tr as shadows, Zn as typography, en as useSnackbar, X as white, $ as yellow };
3944
+ export { be as Accordion, xe as AccordionItem, Oe as Avatar, ke as AvatarGroup, Re as Badge, Ve as Breadcrumb, Ke as Button, Je as ButtonGroup, Ze as Card, $e as CardGroup, nt as Checkbox, ct as Copy, ht as Counter, Ar as DataTable, Ct as DatePicker, Dt as DistributionBar, ge as Divider, Ft as Drawer, Ut as DropdownContent, Wt as DropdownItem, Kt as DropdownLabel, Bt as DropdownMenu, Gt as DropdownSeparator, Vt as DropdownTrigger, rn as Empty, sn as Filter, ln as FormContainer, un as FormField, Yt as IconTile, dn as InfoField, pn as InlineAlert, pt as Input, mn as Link, gn as Modal, vn as MultiSelect, Cn as NotificationBadge, Dn as Pagination, An as PersonCard, st as Popover, Fn as Progress, Bn as Radio, Ln as RadioGroup, Vn as ReadMore, Un as Select, Kn as Sidebar, qn as SidebarItem, Zn as Skeleton, nr as SnackbarProvider, or as Status, vr as StepIndicator, xr as Switch, Er as TBody, kr as TD, Or as TH, Tr as THead, Dr as TR, Rr as Tab, Fr as TabList, zr as TabPanel, wr as Table, Pr as Tabs, en as Text, Br as TextArea, Vr as ThemeSwitch, Gr as Tooltip, Yr as UnderConstruction, Zr as Upload, $r as UploadItem, pi as blue, X as brand, q as cn, _i as colorPrimitives, Ti as controlHeight, yi as darkTheme, bi as fontFamily, Z as gray, fi as green, xi as headline, Ei as iconSize, Ci as label, vi as lightTheme, Si as paragraph, hi as pink, mi as purple, Di as radius, gi as red, Oi as shadows, wi as typography, ri as useEscapeKey, li as useFormContext, di as useFormProps, oi as useHideBodyScroll, ci as useIsMobile, ni as useOnOutsideClick, tr as useSnackbar, ti as useStepper, Q as white, $ as yellow };
2820
3945
 
2821
3946
  //# sourceMappingURL=index.js.map