@ds-mo/ui 0.2.4 → 0.3.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 (215) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +29 -0
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -0
  3. package/dist/components/Accordion/index.d.ts +3 -0
  4. package/dist/components/Accordion/index.d.ts.map +1 -0
  5. package/dist/components/Badge/Badge.d.ts +18 -0
  6. package/dist/components/Badge/Badge.d.ts.map +1 -0
  7. package/dist/components/Badge/index.d.ts +3 -0
  8. package/dist/components/Badge/index.d.ts.map +1 -0
  9. package/dist/components/Banner/Banner.d.ts +16 -0
  10. package/dist/components/Banner/Banner.d.ts.map +1 -0
  11. package/dist/components/Banner/index.d.ts +3 -0
  12. package/dist/components/Banner/index.d.ts.map +1 -0
  13. package/dist/components/Breadcrumb/Breadcrumb.d.ts +15 -0
  14. package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -0
  15. package/dist/components/Breadcrumb/index.d.ts +3 -0
  16. package/dist/components/Breadcrumb/index.d.ts.map +1 -0
  17. package/dist/components/Button/Button.d.ts +85 -0
  18. package/dist/components/Button/Button.d.ts.map +1 -0
  19. package/dist/components/Button/index.d.ts +3 -0
  20. package/dist/components/Button/index.d.ts.map +1 -0
  21. package/dist/components/ButtonGroup/ButtonGroup.d.ts +26 -0
  22. package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
  23. package/dist/components/ButtonGroup/index.d.ts +3 -0
  24. package/dist/components/ButtonGroup/index.d.ts.map +1 -0
  25. package/dist/components/Card/Card.d.ts +20 -0
  26. package/dist/components/Card/Card.d.ts.map +1 -0
  27. package/dist/components/Card/index.d.ts +3 -0
  28. package/dist/components/Card/index.d.ts.map +1 -0
  29. package/dist/components/Checkbox/Checkbox.d.ts +18 -0
  30. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
  31. package/dist/components/Checkbox/index.d.ts +3 -0
  32. package/dist/components/Checkbox/index.d.ts.map +1 -0
  33. package/dist/components/Divider/Divider.d.ts +9 -0
  34. package/dist/components/Divider/Divider.d.ts.map +1 -0
  35. package/dist/components/Divider/index.d.ts +3 -0
  36. package/dist/components/Divider/index.d.ts.map +1 -0
  37. package/dist/components/EmptyState/EmptyState.d.ts +9 -0
  38. package/dist/components/EmptyState/EmptyState.d.ts.map +1 -0
  39. package/dist/components/EmptyState/index.d.ts +3 -0
  40. package/dist/components/EmptyState/index.d.ts.map +1 -0
  41. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +18 -0
  42. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
  43. package/dist/components/ErrorBoundary/index.d.ts +3 -0
  44. package/dist/components/ErrorBoundary/index.d.ts.map +1 -0
  45. package/dist/components/Fade/Fade.d.ts +11 -0
  46. package/dist/components/Fade/Fade.d.ts.map +1 -0
  47. package/dist/components/Fade/index.d.ts +3 -0
  48. package/dist/components/Fade/index.d.ts.map +1 -0
  49. package/dist/components/Field/Field.d.ts +9 -0
  50. package/dist/components/Field/Field.d.ts.map +1 -0
  51. package/dist/components/Field/index.d.ts +3 -0
  52. package/dist/components/Field/index.d.ts.map +1 -0
  53. package/dist/components/Header/Header.d.ts +12 -0
  54. package/dist/components/Header/Header.d.ts.map +1 -0
  55. package/dist/components/Header/index.d.ts +3 -0
  56. package/dist/components/Header/index.d.ts.map +1 -0
  57. package/dist/components/Input/Input.d.ts +27 -0
  58. package/dist/components/Input/Input.d.ts.map +1 -0
  59. package/dist/components/Input/index.d.ts +3 -0
  60. package/dist/components/Input/index.d.ts.map +1 -0
  61. package/dist/components/LabelWrap/LabelWrap.d.ts +27 -0
  62. package/dist/components/LabelWrap/LabelWrap.d.ts.map +1 -0
  63. package/dist/components/LabelWrap/index.d.ts +2 -0
  64. package/dist/components/LabelWrap/index.d.ts.map +1 -0
  65. package/dist/components/Loader/Loader.d.ts +33 -0
  66. package/dist/components/Loader/Loader.d.ts.map +1 -0
  67. package/dist/components/Loader/index.d.ts +3 -0
  68. package/dist/components/Loader/index.d.ts.map +1 -0
  69. package/dist/components/Menu/DestructiveMenuItem.d.ts +12 -0
  70. package/dist/components/Menu/DestructiveMenuItem.d.ts.map +1 -0
  71. package/dist/components/Menu/Menu.d.ts +55 -0
  72. package/dist/components/Menu/Menu.d.ts.map +1 -0
  73. package/dist/components/Menu/MenuItem.d.ts +33 -0
  74. package/dist/components/Menu/MenuItem.d.ts.map +1 -0
  75. package/dist/components/Menu/index.d.ts +7 -0
  76. package/dist/components/Menu/index.d.ts.map +1 -0
  77. package/dist/components/Modal/Modal.d.ts +15 -0
  78. package/dist/components/Modal/Modal.d.ts.map +1 -0
  79. package/dist/components/Modal/index.d.ts +3 -0
  80. package/dist/components/Modal/index.d.ts.map +1 -0
  81. package/dist/components/Pagination/Pagination.d.ts +16 -0
  82. package/dist/components/Pagination/Pagination.d.ts.map +1 -0
  83. package/dist/components/Pagination/index.d.ts +3 -0
  84. package/dist/components/Pagination/index.d.ts.map +1 -0
  85. package/dist/components/Radio/Radio.d.ts +35 -0
  86. package/dist/components/Radio/Radio.d.ts.map +1 -0
  87. package/dist/components/Radio/index.d.ts +3 -0
  88. package/dist/components/Radio/index.d.ts.map +1 -0
  89. package/dist/components/Scrollbar/Scrollbar.d.ts +13 -0
  90. package/dist/components/Scrollbar/Scrollbar.d.ts.map +1 -0
  91. package/dist/components/Scrollbar/index.d.ts +3 -0
  92. package/dist/components/Scrollbar/index.d.ts.map +1 -0
  93. package/dist/components/Select/Select.d.ts +22 -0
  94. package/dist/components/Select/Select.d.ts.map +1 -0
  95. package/dist/components/Select/index.d.ts +3 -0
  96. package/dist/components/Select/index.d.ts.map +1 -0
  97. package/dist/components/Sidebar/Sidebar.d.ts +15 -0
  98. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -0
  99. package/dist/components/Sidebar/SidebarItem.d.ts +14 -0
  100. package/dist/components/Sidebar/SidebarItem.d.ts.map +1 -0
  101. package/dist/components/Sidebar/SidebarSection.d.ts +10 -0
  102. package/dist/components/Sidebar/SidebarSection.d.ts.map +1 -0
  103. package/dist/components/Sidebar/index.d.ts +7 -0
  104. package/dist/components/Sidebar/index.d.ts.map +1 -0
  105. package/dist/components/Skeleton/Skeleton.d.ts +17 -0
  106. package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
  107. package/dist/components/Skeleton/index.d.ts +3 -0
  108. package/dist/components/Skeleton/index.d.ts.map +1 -0
  109. package/dist/components/Slider/Slider.d.ts +16 -0
  110. package/dist/components/Slider/Slider.d.ts.map +1 -0
  111. package/dist/components/Slider/index.d.ts +3 -0
  112. package/dist/components/Slider/index.d.ts.map +1 -0
  113. package/dist/components/Surface/Surface.d.ts +59 -0
  114. package/dist/components/Surface/Surface.d.ts.map +1 -0
  115. package/dist/components/Surface/index.d.ts +3 -0
  116. package/dist/components/Surface/index.d.ts.map +1 -0
  117. package/dist/components/Tab/Tab.d.ts +21 -0
  118. package/dist/components/Tab/Tab.d.ts.map +1 -0
  119. package/dist/components/Tab/index.d.ts +3 -0
  120. package/dist/components/Tab/index.d.ts.map +1 -0
  121. package/dist/components/TabGroup/TabGroup.d.ts +26 -0
  122. package/dist/components/TabGroup/TabGroup.d.ts.map +1 -0
  123. package/dist/components/TabGroup/index.d.ts +3 -0
  124. package/dist/components/TabGroup/index.d.ts.map +1 -0
  125. package/dist/components/Table/Table.d.ts +46 -0
  126. package/dist/components/Table/Table.d.ts.map +1 -0
  127. package/dist/components/Table/index.d.ts +3 -0
  128. package/dist/components/Table/index.d.ts.map +1 -0
  129. package/dist/components/Tag/Tag.d.ts +38 -0
  130. package/dist/components/Tag/Tag.d.ts.map +1 -0
  131. package/dist/components/Tag/index.d.ts +3 -0
  132. package/dist/components/Tag/index.d.ts.map +1 -0
  133. package/dist/components/Text/Text.d.ts +41 -0
  134. package/dist/components/Text/Text.d.ts.map +1 -0
  135. package/dist/components/Text/index.d.ts +3 -0
  136. package/dist/components/Text/index.d.ts.map +1 -0
  137. package/dist/components/Toast/Toast.d.ts +33 -0
  138. package/dist/components/Toast/Toast.d.ts.map +1 -0
  139. package/dist/components/Toast/index.d.ts +3 -0
  140. package/dist/components/Toast/index.d.ts.map +1 -0
  141. package/dist/components/Toggle/Toggle.d.ts +17 -0
  142. package/dist/components/Toggle/Toggle.d.ts.map +1 -0
  143. package/dist/components/Toggle/index.d.ts +3 -0
  144. package/dist/components/Toggle/index.d.ts.map +1 -0
  145. package/dist/components/ToggleButton/ToggleButton.d.ts +35 -0
  146. package/dist/components/ToggleButton/ToggleButton.d.ts.map +1 -0
  147. package/dist/components/ToggleButton/index.d.ts +3 -0
  148. package/dist/components/ToggleButton/index.d.ts.map +1 -0
  149. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +24 -0
  150. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +1 -0
  151. package/dist/components/ToggleButtonGroup/index.d.ts +3 -0
  152. package/dist/components/ToggleButtonGroup/index.d.ts.map +1 -0
  153. package/dist/components/Tooltip/Tooltip.d.ts +17 -0
  154. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
  155. package/dist/components/Tooltip/index.d.ts +3 -0
  156. package/dist/components/Tooltip/index.d.ts.map +1 -0
  157. package/dist/index.css +1 -1
  158. package/dist/index.d.ts +82 -969
  159. package/dist/index.d.ts.map +1 -0
  160. package/dist/index.js +1641 -1165
  161. package/dist/index.js.map +1 -1
  162. package/dist/r/badge.json +1 -1
  163. package/dist/r/banner.json +2 -2
  164. package/dist/r/loader.json +2 -2
  165. package/dist/r/menu.json +4 -4
  166. package/dist/r/select.json +1 -1
  167. package/dist/r/tab-group.json +1 -1
  168. package/dist/r/tab.json +1 -1
  169. package/dist/r/toggle.json +1 -1
  170. package/dist/types/icons.d.ts +14 -0
  171. package/dist/types/icons.d.ts.map +1 -0
  172. package/dist/types/index.d.ts +2 -0
  173. package/dist/types/index.d.ts.map +1 -0
  174. package/dist/utils/cn.d.ts +5 -0
  175. package/dist/utils/cn.d.ts.map +1 -0
  176. package/dist/utils/css-tokens.d.ts +11 -0
  177. package/dist/utils/css-tokens.d.ts.map +1 -0
  178. package/package.json +17 -12
  179. package/src/components/Accordion/Accordion.tsx +10 -1
  180. package/src/components/Badge/Badge.stories.tsx +32 -0
  181. package/src/components/Badge/Badge.tsx +19 -2
  182. package/src/components/Banner/Banner.module.css +38 -0
  183. package/src/components/Banner/Banner.tsx +34 -4
  184. package/src/components/Button/Button.stories.tsx +1 -1
  185. package/src/components/Button/Button.tsx +42 -11
  186. package/src/components/Checkbox/Checkbox.tsx +6 -3
  187. package/src/components/Field/Field.tsx +20 -7
  188. package/src/components/Input/Input.module.css +21 -0
  189. package/src/components/Input/Input.tsx +62 -21
  190. package/src/components/Loader/Loader.module.css +17 -0
  191. package/src/components/Loader/Loader.stories.tsx +9 -0
  192. package/src/components/Loader/Loader.tsx +42 -20
  193. package/src/components/Menu/DestructiveMenuItem.tsx +59 -6
  194. package/src/components/Menu/Menu.tsx +160 -11
  195. package/src/components/Menu/MenuItem.module.css +2 -0
  196. package/src/components/Menu/MenuItem.tsx +48 -5
  197. package/src/components/Modal/Modal.tsx +81 -4
  198. package/src/components/Radio/Radio.tsx +117 -29
  199. package/src/components/Scrollbar/Scrollbar.module.css +5 -0
  200. package/src/components/Scrollbar/Scrollbar.tsx +18 -4
  201. package/src/components/Select/Select.tsx +139 -9
  202. package/src/components/Sidebar/Sidebar.module.css +7 -0
  203. package/src/components/Sidebar/Sidebar.tsx +102 -4
  204. package/src/components/Slider/Slider.module.css +5 -1
  205. package/src/components/Slider/Slider.stories.tsx +25 -0
  206. package/src/components/Slider/Slider.tsx +4 -4
  207. package/src/components/Tab/Tab.tsx +32 -2
  208. package/src/components/TabGroup/TabGroup.stories.tsx +46 -15
  209. package/src/components/TabGroup/TabGroup.tsx +77 -10
  210. package/src/components/Table/Table.module.css +10 -0
  211. package/src/components/Table/Table.tsx +58 -29
  212. package/src/components/Tag/Tag.tsx +5 -2
  213. package/src/components/Toast/Toast.tsx +44 -8
  214. package/src/components/Toggle/Toggle.tsx +23 -22
  215. package/src/components/Tooltip/Tooltip.tsx +42 -6
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import e, { Component as t, forwardRef as n, useCallback as r, useEffect as i, useId as a, useLayoutEffect as o, useMemo as s, useRef as c, useState as l, useSyncExternalStore as u } from "react";
2
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
3
- import { ChevronDown as m, Cross as h } from "@ds-mo/icons";
4
- import g, { createPortal as _ } from "react-dom";
5
- var v = {
1
+ import e, { Component as t, cloneElement as n, forwardRef as r, isValidElement as i, useCallback as a, useEffect as o, useId as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d, useSyncExternalStore as f } from "react";
2
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
3
+ import { ChevronDown as g, Cross as _ } from "@ds-mo/icons";
4
+ import v, { createPortal as y } from "react-dom";
5
+ var b = {
6
6
  text: "_text_12t2m_1",
7
7
  truncate1Line: "_truncate1Line_12t2m_9",
8
8
  truncate2Lines: "_truncate2Lines_12t2m_15",
@@ -32,60 +32,60 @@ var v = {
32
32
  alignLeft: "_alignLeft_12t2m_156",
33
33
  alignCenter: "_alignCenter_12t2m_160",
34
34
  alignRight: "_alignRight_12t2m_164"
35
- }, y = {
36
- primary: v.colorPrimary,
37
- secondary: v.colorSecondary,
38
- tertiary: v.colorTertiary,
39
- brand: v.colorBrand,
40
- negative: v.colorNegative,
41
- positive: v.colorPositive,
42
- warning: v.colorWarning,
43
- caution: v.colorCaution,
44
- ai: v.colorAi,
45
- "on-strong": v.colorOnStrong,
46
- "on-bold": v.colorOnBold,
47
- inherit: v.colorInherit
48
- }, b = {
49
- none: v.decorationNone,
50
- underline: v.decorationUnderline,
51
- "dotted-underline": v.decorationDottedUnderline
52
35
  }, x = {
53
- left: v.alignLeft,
54
- center: v.alignCenter,
55
- right: v.alignRight
36
+ primary: b.colorPrimary,
37
+ secondary: b.colorSecondary,
38
+ tertiary: b.colorTertiary,
39
+ brand: b.colorBrand,
40
+ negative: b.colorNegative,
41
+ positive: b.colorPositive,
42
+ warning: b.colorWarning,
43
+ caution: b.colorCaution,
44
+ ai: b.colorAi,
45
+ "on-strong": b.colorOnStrong,
46
+ "on-bold": b.colorOnBold,
47
+ inherit: b.colorInherit
56
48
  }, S = {
57
- 1: v.truncate1Line,
58
- 2: v.truncate2Lines,
59
- 3: v.truncate3Lines,
60
- 4: v.truncate4Lines,
61
- 5: v.truncate5Lines,
62
- none: v.noTruncation
63
- }, C = (e) => e.startsWith("var(--"), w = n(({ variant: e = "text-body-medium", children: t, color: n, decoration: r, italic: i, align: a, lineTruncation: o = "none", wrap: s, as: c = "p", id: l, htmlFor: u, className: d = "", style: p }, m) => {
64
- let h = s === "nowrap" ? v.wrapNowrap : s === "balance" ? v.wrapBalance : s === "pretty" ? v.wrapPretty : "", g = s === "nowrap" ? "" : S[o], _ = [
49
+ none: b.decorationNone,
50
+ underline: b.decorationUnderline,
51
+ "dotted-underline": b.decorationDottedUnderline
52
+ }, C = {
53
+ left: b.alignLeft,
54
+ center: b.alignCenter,
55
+ right: b.alignRight
56
+ }, w = {
57
+ 1: b.truncate1Line,
58
+ 2: b.truncate2Lines,
59
+ 3: b.truncate3Lines,
60
+ 4: b.truncate4Lines,
61
+ 5: b.truncate5Lines,
62
+ none: b.noTruncation
63
+ }, T = (e) => e.startsWith("var(--"), E = r(({ variant: e = "text-body-medium", children: t, color: n, decoration: r, italic: i, align: a, lineTruncation: o = "none", wrap: s, as: c = "p", id: l, htmlFor: u, className: d = "", style: f }, p) => {
64
+ let h = s === "nowrap" ? b.wrapNowrap : s === "balance" ? b.wrapBalance : s === "pretty" ? b.wrapPretty : "", g = s === "nowrap" ? "" : w[o], _ = [
65
65
  e,
66
- v.text,
66
+ b.text,
67
67
  h,
68
68
  g,
69
- n && !C(n) ? y[n] : "",
70
- r ? b[r] : "",
71
- i ? v.italic : "",
72
- a ? x[a] : "",
69
+ n && !T(n) ? x[n] : "",
70
+ r ? S[r] : "",
71
+ i ? b.italic : "",
72
+ a ? C[a] : "",
73
73
  d
74
- ].filter(Boolean).join(" "), w = {
75
- ...p,
76
- ...n && C(n) ? { color: n } : {}
74
+ ].filter(Boolean).join(" "), v = {
75
+ ...f,
76
+ ...n && T(n) ? { color: n } : {}
77
77
  };
78
- return /* @__PURE__ */ f(c, {
79
- ref: m,
78
+ return /* @__PURE__ */ m(c, {
79
+ ref: p,
80
80
  className: _,
81
- style: Object.keys(w).length > 0 ? w : void 0,
81
+ style: Object.keys(v).length > 0 ? v : void 0,
82
82
  ...l ? { id: l } : {},
83
83
  ...c === "label" && u ? { htmlFor: u } : {},
84
84
  children: t
85
85
  });
86
86
  });
87
- w.displayName = "Text";
88
- var T = {
87
+ E.displayName = "Text";
88
+ var D = {
89
89
  surface: "_surface_65ypw_7",
90
90
  bgPrimary: "_bgPrimary_65ypw_28",
91
91
  bgSecondary: "_bgSecondary_65ypw_32",
@@ -152,63 +152,63 @@ var T = {
152
152
  interactive: "_interactive_65ypw_172",
153
153
  selected: "_selected_65ypw_199",
154
154
  inactive: "_inactive_65ypw_218"
155
- }, E = {
156
- primary: T.bgPrimary,
157
- secondary: T.bgSecondary,
158
- transparent: T.bgTransparent,
159
- translucent: T.bgTranslucent
160
- }, D = {
161
- none: T.elevationNone,
162
- depressed: T.elevationDepressed,
163
- "depressed-md": T.elevationDepressedMd,
164
- flat: T.elevationFlat,
165
- elevated: T.elevationElevated,
166
- floating: T.elevationFloating,
167
- overlayTop: T.elevationOverlayTop,
168
- overlayRight: T.elevationOverlayRight,
169
- overlayBottom: T.elevationOverlayBottom,
170
- overlayLeft: T.elevationOverlayLeft
171
155
  }, O = {
172
- top: T.edgeTop,
173
- right: T.edgeRight,
174
- bottom: T.edgeBottom,
175
- left: T.edgeLeft
156
+ primary: D.bgPrimary,
157
+ secondary: D.bgSecondary,
158
+ transparent: D.bgTransparent,
159
+ translucent: D.bgTranslucent
176
160
  }, k = {
177
- none: T.radiusNone,
178
- xs: T.radiusXs,
179
- sm: T.radiusSm,
180
- md: T.radiusMd,
181
- lg: T.radiusLg,
182
- xl: T.radiusXl,
183
- "2xl": T.radius2xl,
184
- full: T.radiusFull
185
- }, A = (e, t) => T[`intent${e.charAt(0).toUpperCase() + e.slice(1)}${t.charAt(0).toUpperCase() + t.slice(1)}`] || "", j = (e) => e in k, M = n(({ children: e, background: t = "transparent", intent: n, contrast: r = "faint", elevation: i = "none", edge: a, radius: o, interactive: s = !1, selected: c = !1, inactive: l = !1, as: u = "div", className: d = "", style: p, type: m, ...h }, g) => {
161
+ none: D.elevationNone,
162
+ depressed: D.elevationDepressed,
163
+ "depressed-md": D.elevationDepressedMd,
164
+ flat: D.elevationFlat,
165
+ elevated: D.elevationElevated,
166
+ floating: D.elevationFloating,
167
+ overlayTop: D.elevationOverlayTop,
168
+ overlayRight: D.elevationOverlayRight,
169
+ overlayBottom: D.elevationOverlayBottom,
170
+ overlayLeft: D.elevationOverlayLeft
171
+ }, ee = {
172
+ top: D.edgeTop,
173
+ right: D.edgeRight,
174
+ bottom: D.edgeBottom,
175
+ left: D.edgeLeft
176
+ }, A = {
177
+ none: D.radiusNone,
178
+ xs: D.radiusXs,
179
+ sm: D.radiusSm,
180
+ md: D.radiusMd,
181
+ lg: D.radiusLg,
182
+ xl: D.radiusXl,
183
+ "2xl": D.radius2xl,
184
+ full: D.radiusFull
185
+ }, j = (e, t) => D[`intent${e.charAt(0).toUpperCase() + e.slice(1)}${t.charAt(0).toUpperCase() + t.slice(1)}`] || "", M = (e) => e in A, N = r(({ children: e, background: t = "transparent", intent: n, contrast: r = "faint", elevation: i = "none", edge: a, radius: o, interactive: s = !1, selected: c = !1, inactive: l = !1, as: u = "div", className: d = "", style: f, type: p, ...h }, g) => {
186
186
  let _ = [
187
- T.surface,
188
- n ? A(n, r) : E[t],
189
- D[i],
190
- ...a && i === "none" ? Array.isArray(a) ? a.map((e) => O[e]) : [O[a]] : [],
191
- o && j(o) ? k[o] : "",
192
- s ? T.interactive : "",
193
- c ? T.selected : "",
194
- l ? T.inactive : "",
187
+ D.surface,
188
+ n ? j(n, r) : O[t],
189
+ k[i],
190
+ ...a && i === "none" ? Array.isArray(a) ? a.map((e) => ee[e]) : [ee[a]] : [],
191
+ o && M(o) ? A[o] : "",
192
+ s ? D.interactive : "",
193
+ c ? D.selected : "",
194
+ l ? D.inactive : "",
195
195
  d
196
196
  ].filter(Boolean).join(" "), v = {
197
- ...p,
198
- ...o && !j(o) ? { borderRadius: o } : {}
197
+ ...f,
198
+ ...o && !M(o) ? { borderRadius: o } : {}
199
199
  };
200
- return /* @__PURE__ */ f(u, {
200
+ return /* @__PURE__ */ m(u, {
201
201
  ref: g,
202
202
  className: _,
203
- style: o && !j(o) || p && Object.keys(p).length > 0 ? v : void 0,
203
+ style: o && !M(o) || f && Object.keys(f).length > 0 ? v : void 0,
204
204
  disabled: u === "button" ? l : void 0,
205
- type: u === "button" ? m || "button" : void 0,
205
+ type: u === "button" ? p || "button" : void 0,
206
206
  ...h,
207
207
  children: e
208
208
  });
209
209
  });
210
- M.displayName = "Surface";
211
- var N = {
210
+ N.displayName = "Surface";
211
+ var P = {
212
212
  card: "_card_1idsz_6",
213
213
  elevationFlat: "_elevationFlat_1idsz_13",
214
214
  elevationElevated: "_elevationElevated_1idsz_14",
@@ -223,72 +223,85 @@ var N = {
223
223
  };
224
224
  //#endregion
225
225
  //#region src/utils/cn.ts
226
- function P(...e) {
226
+ function F(...e) {
227
227
  return e.filter(Boolean).join(" ");
228
228
  }
229
229
  //#endregion
230
230
  //#region src/components/Card/Card.tsx
231
- var ee = {
232
- flat: N.elevationFlat,
233
- elevated: N.elevationElevated,
234
- floating: N.elevationFloating
235
- }, F = {
236
- sm: N.radiusSm,
237
- md: N.radiusMd,
238
- lg: N.radiusLg,
239
- xl: N.radiusXl
240
- }, I = n(({ children: e, header: t, footer: n, elevation: r = "elevated", radius: i = "lg", className: a, style: o }, s) => /* @__PURE__ */ p("div", {
231
+ var I = {
232
+ flat: P.elevationFlat,
233
+ elevated: P.elevationElevated,
234
+ floating: P.elevationFloating
235
+ }, L = {
236
+ sm: P.radiusSm,
237
+ md: P.radiusMd,
238
+ lg: P.radiusLg,
239
+ xl: P.radiusXl
240
+ }, R = r(({ children: e, header: t, footer: n, elevation: r = "elevated", radius: i = "lg", className: a, style: o }, s) => /* @__PURE__ */ h("div", {
241
241
  ref: s,
242
- className: P(N.card, ee[r], F[i], a),
242
+ className: F(P.card, I[r], L[i], a),
243
243
  style: o,
244
244
  children: [
245
- t && /* @__PURE__ */ f("div", {
246
- className: N.header,
245
+ t && /* @__PURE__ */ m("div", {
246
+ className: P.header,
247
247
  children: t
248
248
  }),
249
- /* @__PURE__ */ f("div", {
250
- className: N.body,
249
+ /* @__PURE__ */ m("div", {
250
+ className: P.body,
251
251
  children: e
252
252
  }),
253
- n && /* @__PURE__ */ f("div", {
254
- className: N.footer,
253
+ n && /* @__PURE__ */ m("div", {
254
+ className: P.footer,
255
255
  children: n
256
256
  })
257
257
  ]
258
258
  }));
259
- I.displayName = "Card";
260
- var L = {
259
+ R.displayName = "Card";
260
+ var z = {
261
261
  labelWrap: "_labelWrap_1t38o_8",
262
262
  sizeSm: "_sizeSm_1t38o_16",
263
263
  sizeXs: "_sizeXs_1t38o_19",
264
264
  truncate: "_truncate_1t38o_22"
265
- }, R = ({ children: e, size: t = "md", truncate: n = !1, className: r }) => /* @__PURE__ */ f("span", {
266
- className: P(L.labelWrap, t === "sm" && L.sizeSm, t === "xs" && L.sizeXs, n && L.truncate, r),
265
+ }, te = ({ children: e, size: t = "md", truncate: n = !1, className: r }) => /* @__PURE__ */ m("span", {
266
+ className: F(z.labelWrap, t === "sm" && z.sizeSm, t === "xs" && z.sizeXs, n && z.truncate, r),
267
267
  children: e
268
268
  });
269
- R.displayName = "LabelWrap";
270
- var te = {
271
- loader: "_loader_fz5t7_1",
272
- spin: "_spin_fz5t7_1"
273
- }, z = ({ size: e = 20, className: t }) => /* @__PURE__ */ f("svg", {
274
- width: e,
275
- height: e,
276
- viewBox: "0 0 16 16",
277
- fill: "none",
278
- className: `${te.loader}${t ? ` ${t}` : ""}`,
279
- "aria-hidden": "true",
280
- children: /* @__PURE__ */ f("circle", {
281
- cx: "8",
282
- cy: "8",
283
- r: "5",
284
- stroke: "currentColor",
285
- strokeWidth: "1",
286
- strokeLinecap: "round",
287
- strokeDasharray: "23.6 7.9"
288
- })
289
- });
290
- z.displayName = "Loader";
269
+ te.displayName = "LabelWrap";
291
270
  var B = {
271
+ loader: "_loader_ebm28_1",
272
+ spin: "_spin_ebm28_1",
273
+ status: "_status_ebm28_6",
274
+ visuallyHidden: "_visuallyHidden_ebm28_11"
275
+ }, ne = ({ size: e = 20, className: t, label: n }) => {
276
+ let r = /* @__PURE__ */ m("svg", {
277
+ width: e,
278
+ height: e,
279
+ viewBox: "0 0 16 16",
280
+ fill: "none",
281
+ className: `${B.loader}${t ? ` ${t}` : ""}`,
282
+ "aria-hidden": "true",
283
+ children: /* @__PURE__ */ m("circle", {
284
+ cx: "8",
285
+ cy: "8",
286
+ r: "5",
287
+ stroke: "currentColor",
288
+ strokeWidth: "1",
289
+ strokeLinecap: "round",
290
+ strokeDasharray: "23.6 7.9"
291
+ })
292
+ });
293
+ return n === void 0 ? r : /* @__PURE__ */ h("span", {
294
+ role: "status",
295
+ "aria-live": "polite",
296
+ className: B.status,
297
+ children: [r, /* @__PURE__ */ m("span", {
298
+ className: B.visuallyHidden,
299
+ children: n
300
+ })]
301
+ });
302
+ };
303
+ ne.displayName = "Loader";
304
+ var V = {
292
305
  button: "_button_1vroe_6",
293
306
  inactive: "_inactive_1vroe_35",
294
307
  onMedium: "_onMedium_1vroe_50",
@@ -322,50 +335,56 @@ var B = {
322
335
  rounded: "_rounded_1vroe_302",
323
336
  badge: "_badge_1vroe_324",
324
337
  fullWidth: "_fullWidth_1vroe_340"
325
- }, V = {
338
+ }, re = {
326
339
  xs: 12,
327
340
  sm: 16,
328
341
  md: 20,
329
342
  lg: 24
330
- }, ne = {
343
+ }, H = {
331
344
  xs: "text-caption-emphasis",
332
345
  sm: "text-body-small-emphasis",
333
346
  md: "text-body-medium-emphasis",
334
347
  lg: "text-body-large-emphasis"
335
- }, re = n(({ as: e, variant: t = "primary", label: n, icon: r, intent: i = "brand", size: a = "md", rounded: o = !1, fullWidth: s = !1, width: c, contrast: l = "bold", background: u, dropdown: d = !1, badgeCount: h, elevation: g, loading: _ = !1, onClick: v, onMouseEnter: y, onMouseLeave: b, className: x, inactive: S = !1, type: C = "button", id: T, "aria-label": E, href: D, target: O, rel: k }, A) => {
336
- let j = e ?? "button", M = !e || e === "button", N = !S && !_, ee = !!r, F = !!n, I = ee || _, L = I && !F, te = F && !I, re = I && F, H = V[a], ie = ne[a], ae = g ?? (t === "primary" ? "none" : "flat"), oe = ae.charAt(0).toUpperCase() + ae.slice(1), U = P(B.button, B[t], B[`intent${i.charAt(0).toUpperCase() + i.slice(1)}`], a !== "md" && B[`size${a.toUpperCase()}`], o && B.rounded, (S || _) && B.inactive, L && B.iconOnly, te && B.labelOnly, re && B.iconAndLabel, d && B.dropdown, t === "primary" && i !== "none" && l !== "bold" && B[`contrast${l.charAt(0).toUpperCase() + l.slice(1)}`], B[`elevation${oe}`], u && u !== "faint" && B[u === "always-dark" ? "onAlwaysDark" : `on${u.charAt(0).toUpperCase() + u.slice(1)}`], s && B.fullWidth, x), se = E || n || "button", W = {};
337
- return M && (W.type = C, W.disabled = S || _), D && (W.href = D), O && (W.target = O), k && (W.rel = k), /* @__PURE__ */ p(j, {
338
- ref: A,
339
- id: T,
340
- className: U,
341
- style: c ? { width: c } : void 0,
342
- onClick: N ? v : void 0,
343
- onMouseEnter: N ? y : void 0,
344
- onMouseLeave: N ? b : void 0,
345
- "aria-label": se,
346
- "aria-busy": _ || void 0,
347
- ...W,
348
+ }, ie = r((e, t) => {
349
+ let { as: n, variant: r = "primary", label: i, icon: a, intent: o = "brand", size: s = "md", rounded: c = !1, fullWidth: l = !1, width: u, contrast: d = "bold", background: f, dropdown: p = !1, badgeCount: _, elevation: v, loading: y = !1, onClick: b, onMouseEnter: x, onMouseLeave: S, className: C, inactive: w = !1, type: T = "button", id: D, "aria-label": O, "aria-labelledby": k, href: ee, target: A, rel: j } = e, M = n ?? "button", N = !n || n === "button", P = !N && n !== "a", I = !w && !y, L = !!a, R = !!i, z = L || y, B = z && !R, ie = R && !z, U = z && R, W = re[s], ae = H[s], oe = v ?? (r === "primary" ? "none" : "flat"), G = oe.charAt(0).toUpperCase() + oe.slice(1), K = F(V.button, V[r], V[`intent${o.charAt(0).toUpperCase() + o.slice(1)}`], s !== "md" && V[`size${s.toUpperCase()}`], c && V.rounded, (w || y) && V.inactive, B && V.iconOnly, ie && V.labelOnly, U && V.iconAndLabel, p && V.dropdown, r === "primary" && o !== "none" && d !== "bold" && V[`contrast${d.charAt(0).toUpperCase() + d.slice(1)}`], V[`elevation${G}`], f && f !== "faint" && V[f === "always-dark" ? "onAlwaysDark" : `on${f.charAt(0).toUpperCase() + f.slice(1)}`], l && V.fullWidth, C);
350
+ B && !O && !k && console.warn("[@ds-mo/ui Button] Icon-only Button is missing an accessible name. Provide `label`, `aria-label`, or `aria-labelledby`.");
351
+ let q = {};
352
+ return N && (q.type = T, q.disabled = w || y), ee && (q.href = ee), A && (q.target = A), j && (q.rel = j), P && (q.role = "button", q.tabIndex = I ? 0 : -1, I && (q.onKeyDown = (e) => {
353
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
354
+ })), /* @__PURE__ */ h(M, {
355
+ ref: t,
356
+ id: D,
357
+ className: K,
358
+ style: u ? { width: u } : void 0,
359
+ onClick: I ? b : void 0,
360
+ onMouseEnter: I ? x : void 0,
361
+ onMouseLeave: I ? S : void 0,
362
+ "aria-label": O,
363
+ "aria-labelledby": k,
364
+ "aria-disabled": w || y || void 0,
365
+ "aria-busy": y || void 0,
366
+ ...q,
348
367
  children: [
349
- _ ? /* @__PURE__ */ f(z, { size: H }) : r && /* @__PURE__ */ f(r, { size: H }),
350
- n && /* @__PURE__ */ f(R, {
351
- truncate: s,
352
- children: /* @__PURE__ */ f(w, {
353
- variant: ie,
368
+ y ? /* @__PURE__ */ m(ne, { size: W }) : a && /* @__PURE__ */ m(a, { size: W }),
369
+ i && /* @__PURE__ */ m(te, {
370
+ truncate: l,
371
+ children: /* @__PURE__ */ m(E, {
372
+ variant: ae,
354
373
  as: "span",
355
374
  color: "inherit",
356
- children: n
375
+ children: i
357
376
  })
358
377
  }),
359
- d && /* @__PURE__ */ f(m, { size: H }),
360
- h != null && h > 0 && /* @__PURE__ */ f("span", {
361
- className: B.badge,
362
- children: h > 9 ? "+" : h
378
+ p && /* @__PURE__ */ m(g, { size: W }),
379
+ _ != null && _ > 0 && /* @__PURE__ */ m("span", {
380
+ className: V.badge,
381
+ children: _ > 9 ? "+" : _
363
382
  })
364
383
  ]
365
384
  });
366
385
  });
367
- re.displayName = "Button";
368
- var H = {
386
+ ie.displayName = "Button";
387
+ var U = {
369
388
  toggleButton: "_toggleButton_ywix4_11",
370
389
  inactive: "_inactive_ywix4_38",
371
390
  onMedium: "_onMedium_ywix4_51",
@@ -383,7 +402,7 @@ var H = {
383
402
  sizeSM: "_sizeSM_ywix4_146",
384
403
  sizeXS: "_sizeXS_ywix4_151",
385
404
  rounded: "_rounded_ywix4_159"
386
- }, ie = {
405
+ }, W = {
387
406
  md: 20,
388
407
  sm: 16,
389
408
  xs: 12
@@ -391,18 +410,18 @@ var H = {
391
410
  md: "text-body-medium-emphasis",
392
411
  sm: "text-body-small-emphasis",
393
412
  xs: "text-caption-emphasis"
394
- }, oe = n(({ elevation: e = "elevated", label: t, icon: n, size: r = "md", rounded: i = !1, background: a, pressed: o, onPressedChange: s, inactive: c = !1, className: l, id: u, "aria-label": d }, m) => {
395
- let h = !!n, g = !!t, _ = h && !g, v = g && !h, y = h && g, b = ie[r], x = ae[r], S = e.charAt(0).toUpperCase() + e.slice(1);
396
- return /* @__PURE__ */ p("button", {
397
- ref: m,
413
+ }, oe = r(({ elevation: e = "elevated", label: t, icon: n, size: r = "md", rounded: i = !1, background: a, pressed: o, onPressedChange: s, inactive: c = !1, className: l, id: u, "aria-label": d }, f) => {
414
+ let p = !!n, g = !!t, _ = p && !g, v = g && !p, y = p && g, b = W[r], x = ae[r], S = e.charAt(0).toUpperCase() + e.slice(1);
415
+ return /* @__PURE__ */ h("button", {
416
+ ref: f,
398
417
  id: u,
399
- className: P(H.toggleButton, H[`elevation${S}`], r !== "md" && H[`size${r.toUpperCase()}`], i && H.rounded, c && H.inactive, _ && H.iconOnly, v && H.labelOnly, y && H.iconAndLabel, a && a !== "faint" && H[a === "always-dark" ? "onAlwaysDark" : `on${a.charAt(0).toUpperCase() + a.slice(1)}`], o && H.pressed, l),
418
+ className: F(U.toggleButton, U[`elevation${S}`], r !== "md" && U[`size${r.toUpperCase()}`], i && U.rounded, c && U.inactive, _ && U.iconOnly, v && U.labelOnly, y && U.iconAndLabel, a && a !== "faint" && U[a === "always-dark" ? "onAlwaysDark" : `on${a.charAt(0).toUpperCase() + a.slice(1)}`], o && U.pressed, l),
400
419
  onClick: c ? void 0 : () => s(!o),
401
420
  type: "button",
402
421
  disabled: c,
403
422
  "aria-label": d || t || "toggle",
404
423
  "aria-pressed": o,
405
- children: [n && /* @__PURE__ */ f(n, { size: b }), t && /* @__PURE__ */ f(R, { children: /* @__PURE__ */ f(w, {
424
+ children: [n && /* @__PURE__ */ m(n, { size: b }), t && /* @__PURE__ */ m(te, { children: /* @__PURE__ */ m(E, {
406
425
  variant: x,
407
426
  as: "span",
408
427
  color: "inherit",
@@ -411,7 +430,7 @@ var H = {
411
430
  });
412
431
  });
413
432
  oe.displayName = "ToggleButton";
414
- var U = {
433
+ var G = {
415
434
  group: "_group_1u9mw_5",
416
435
  groupElevated: "_groupElevated_1u9mw_27",
417
436
  groupFlat: "_groupFlat_1u9mw_31",
@@ -439,22 +458,22 @@ var U = {
439
458
  roundedFirstLG: "_roundedFirstLG_1u9mw_155",
440
459
  roundedLastLG: "_roundedLastLG_1u9mw_156",
441
460
  roundedMidLG: "_roundedMidLG_1u9mw_157"
442
- }, se = ({ children: t, className: n }) => {
461
+ }, K = ({ children: t, className: n }) => {
443
462
  let r = e.Children.toArray(t).filter(e.isValidElement), i = r.length, a = r[0]?.props, o = a?.variant ?? "secondary", s = a?.elevation ?? (o === "primary" ? "none" : "flat"), c = !!a?.rounded, l = s.charAt(0).toUpperCase() + s.slice(1);
444
- return /* @__PURE__ */ f("div", {
445
- className: P(U.group, U[`group${l}`], c && U.groupRounded, n),
463
+ return /* @__PURE__ */ m("div", {
464
+ className: F(G.group, G[`group${l}`], c && G.groupRounded, n),
446
465
  role: "group",
447
466
  children: r.map((t, n) => {
448
- let r = t, a = r.props, o = n === 0, s = n === i - 1, c = !o && !s, l = a.variant ?? "secondary", u = a.size ?? "md", d = a.contrast ?? "bold", m = a.intent ?? "brand", h = !!a.rounded, g = !!a.icon && !a.label, _ = l === "secondary" && (a.elevation ?? "flat") === "none", v = l === "primary" && m !== "none", y = d.charAt(0).toUpperCase() + d.slice(1), b = u.toUpperCase(), x = h && !g && u !== "xs", S = P(U.divider, _ && U.dividerGhost, _ && u === "xs" && U.dividerGhostXS, _ && u === "sm" && U.dividerGhostSM, _ && u === "lg" && U.dividerGhostLG, v && U[`divider${y}`]);
449
- return /* @__PURE__ */ p(e.Fragment, { children: [n > 0 && /* @__PURE__ */ f("div", {
467
+ let r = t, a = r.props, o = n === 0, s = n === i - 1, c = !o && !s, l = a.variant ?? "secondary", u = a.size ?? "md", d = a.contrast ?? "bold", f = a.intent ?? "brand", p = !!a.rounded, g = !!a.icon && !a.label, _ = l === "secondary" && (a.elevation ?? "flat") === "none", v = l === "primary" && f !== "none", y = d.charAt(0).toUpperCase() + d.slice(1), b = u.toUpperCase(), x = p && !g && u !== "xs", S = F(G.divider, _ && G.dividerGhost, _ && u === "xs" && G.dividerGhostXS, _ && u === "sm" && G.dividerGhostSM, _ && u === "lg" && G.dividerGhostLG, v && G[`divider${y}`]);
468
+ return /* @__PURE__ */ h(e.Fragment, { children: [n > 0 && /* @__PURE__ */ m("div", {
450
469
  className: S,
451
470
  "aria-hidden": "true"
452
- }), e.cloneElement(r, { className: P(a.className, U.item, o && U.first, s && U.last, c && U.middle, _ && U.itemShort, x && o && U[`roundedFirst${b}`], x && s && U[`roundedLast${b}`], x && c && U[`roundedMid${b}`]) })] }, n);
471
+ }), e.cloneElement(r, { className: F(a.className, G.item, o && G.first, s && G.last, c && G.middle, _ && G.itemShort, x && o && G[`roundedFirst${b}`], x && s && G[`roundedLast${b}`], x && c && G[`roundedMid${b}`]) })] }, n);
453
472
  })
454
473
  });
455
474
  };
456
- se.displayName = "ButtonGroup";
457
- var W = {
475
+ K.displayName = "ButtonGroup";
476
+ var q = {
458
477
  group: "_group_14dyx_5",
459
478
  groupElevated: "_groupElevated_14dyx_27",
460
479
  groupFlat: "_groupFlat_14dyx_31",
@@ -476,22 +495,22 @@ var W = {
476
495
  roundedFirstSM: "_roundedFirstSM_14dyx_161",
477
496
  roundedLastSM: "_roundedLastSM_14dyx_162",
478
497
  roundedMidSM: "_roundedMidSM_14dyx_163"
479
- }, ce = ({ children: t, className: n }) => {
498
+ }, se = ({ children: t, className: n }) => {
480
499
  let r = e.Children.toArray(t).filter(e.isValidElement), i = r.length, a = r[0]?.props, o = a?.elevation ?? "elevated", s = !!a?.rounded, c = o.charAt(0).toUpperCase() + o.slice(1);
481
- return /* @__PURE__ */ f("div", {
482
- className: P(W.group, W[`group${c}`], s && W.groupRounded, n),
500
+ return /* @__PURE__ */ m("div", {
501
+ className: F(q.group, q[`group${c}`], s && q.groupRounded, n),
483
502
  role: "group",
484
503
  children: r.map((t, n) => {
485
- let r = t, a = r.props, o = n === 0, s = n === i - 1, c = !o && !s, l = a.size ?? "md", u = !!a.rounded, d = !!a.pressed, m = !!a.icon && !a.label, h = (a.elevation ?? "elevated") === "none", g = l.toUpperCase(), _ = u && !m && l !== "xs", v = P(W.divider, h && W.dividerGhost, h && l === "xs" && W.dividerGhostXS, h && l === "sm" && W.dividerGhostSM);
486
- return /* @__PURE__ */ p(e.Fragment, { children: [n > 0 && /* @__PURE__ */ f("div", {
504
+ let r = t, a = r.props, o = n === 0, s = n === i - 1, c = !o && !s, l = a.size ?? "md", u = !!a.rounded, d = !!a.pressed, f = !!a.icon && !a.label, p = (a.elevation ?? "elevated") === "none", g = l.toUpperCase(), _ = u && !f && l !== "xs", v = F(q.divider, p && q.dividerGhost, p && l === "xs" && q.dividerGhostXS, p && l === "sm" && q.dividerGhostSM);
505
+ return /* @__PURE__ */ h(e.Fragment, { children: [n > 0 && /* @__PURE__ */ m("div", {
487
506
  className: v,
488
507
  "aria-hidden": "true"
489
- }), e.cloneElement(r, { className: P(a.className, W.item, o && W.first, s && W.last, c && W.middle, h && W.itemShort, h && d && W.itemPressed, _ && o && W[`roundedFirst${g}`], _ && s && W[`roundedLast${g}`], _ && c && W[`roundedMid${g}`]) })] }, n);
508
+ }), e.cloneElement(r, { className: F(a.className, q.item, o && q.first, s && q.last, c && q.middle, p && q.itemShort, p && d && q.itemPressed, _ && o && q[`roundedFirst${g}`], _ && s && q[`roundedLast${g}`], _ && c && q[`roundedMid${g}`]) })] }, n);
490
509
  })
491
510
  });
492
511
  };
493
- ce.displayName = "ToggleButtonGroup";
494
- var G = {
512
+ se.displayName = "ToggleButtonGroup";
513
+ var J = {
495
514
  tag: "_tag_1sd2v_6",
496
515
  sizeMd: "_sizeMd_1sd2v_27",
497
516
  sizeSm: "_sizeSm_1sd2v_28",
@@ -531,129 +550,124 @@ var G = {
531
550
  removable: "_removable_1sd2v_236",
532
551
  removeButton: "_removeButton_1sd2v_239",
533
552
  inactive: "_inactive_1sd2v_270"
534
- }, le = {
553
+ }, ce = {
535
554
  md: 20,
536
555
  sm: 16,
537
556
  xs: 12
538
- }, ue = {
557
+ }, le = {
539
558
  md: "text-body-medium",
540
559
  sm: "text-body-small",
541
560
  xs: "text-caption"
542
- }, de = n(({ label: e, intent: t = "neutral", contrast: n = "faint", elevation: r = "none", size: i = "md", rounded: a = !1, icon: o, removable: s = !1, onRemove: c, removeIcon: l, maxWidth: u, inactive: d = !1, background: m, onClick: g, pressed: _, onPressedChange: v, className: y }, b) => {
543
- let x = !!g || !!v, S = s && !!c, C = le[i], T = ue[i], E = r.charAt(0).toUpperCase() + r.slice(1), D = i.toUpperCase();
544
- return /* @__PURE__ */ p("div", {
561
+ }, ue = r(({ label: e, intent: t = "neutral", contrast: n = "faint", elevation: r = "none", size: i = "md", rounded: a = !1, icon: o, removable: s = !1, onRemove: c, removeIcon: l, maxWidth: u, inactive: d = !1, background: f, onClick: p, pressed: g, onPressedChange: v, className: y }, b) => {
562
+ let x = !!p || !!v, S = s && !!c, C = ce[i], w = le[i], T = r.charAt(0).toUpperCase() + r.slice(1), D = i.toUpperCase();
563
+ return /* @__PURE__ */ h("div", {
545
564
  ref: b,
546
- className: P(G.tag, G[`intent${t.charAt(0).toUpperCase() + t.slice(1)}`], G[`contrast${n.charAt(0).toUpperCase() + n.slice(1)}`], G[`elevation${E}`], G[`size${i.charAt(0).toUpperCase() + i.slice(1)}`], a && G.rounded, a && !o && G[`roundedLeft${D}`], a && !S && G[`roundedRight${D}`], !!o && G[`iconLeft${D}`], S && G[`iconRight${D}`], s && G.removable, x && G.interactive, m && m !== "faint" && G[m === "always-dark" ? "onAlwaysDark" : `on${m.charAt(0).toUpperCase() + m.slice(1)}`], d && G.inactive, _ && G.pressed, y),
565
+ className: F(J.tag, J[`intent${t.charAt(0).toUpperCase() + t.slice(1)}`], J[`contrast${n.charAt(0).toUpperCase() + n.slice(1)}`], J[`elevation${T}`], J[`size${i.charAt(0).toUpperCase() + i.slice(1)}`], a && J.rounded, a && !o && J[`roundedLeft${D}`], a && !S && J[`roundedRight${D}`], !!o && J[`iconLeft${D}`], S && J[`iconRight${D}`], s && J.removable, x && J.interactive, f && f !== "faint" && J[f === "always-dark" ? "onAlwaysDark" : `on${f.charAt(0).toUpperCase() + f.slice(1)}`], d && J.inactive, g && J.pressed, y),
547
566
  style: u == null ? void 0 : { maxWidth: typeof u == "number" ? `${u}px` : u },
548
567
  onClick: x && !d ? () => {
549
- v?.(!_), g?.();
568
+ v?.(!g), p?.();
550
569
  } : void 0,
551
570
  onKeyDown: x && !d ? (e) => {
552
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), v?.(!_), g?.());
571
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), v?.(!g), p?.());
553
572
  } : void 0,
554
573
  role: x ? "button" : void 0,
555
- tabIndex: x && !d ? 0 : void 0,
556
- "aria-pressed": v == null ? void 0 : _,
574
+ tabIndex: x ? d ? -1 : 0 : void 0,
575
+ "aria-pressed": x && g !== void 0 ? !!g : void 0,
557
576
  "aria-disabled": d || void 0,
558
577
  children: [
559
- o && /* @__PURE__ */ f(o, { size: C }),
560
- /* @__PURE__ */ f(R, {
578
+ o && /* @__PURE__ */ m(o, { size: C }),
579
+ /* @__PURE__ */ m(te, {
561
580
  size: i,
562
- children: /* @__PURE__ */ f(w, {
563
- variant: T,
581
+ children: /* @__PURE__ */ m(E, {
582
+ variant: w,
564
583
  as: "span",
565
584
  color: "inherit",
566
585
  children: e
567
586
  })
568
587
  }),
569
- s && c && /* @__PURE__ */ f("button", {
588
+ s && c && /* @__PURE__ */ m("button", {
570
589
  type: "button",
571
- className: G.removeButton,
590
+ className: J.removeButton,
572
591
  onClick: (e) => {
573
592
  e.stopPropagation(), c();
574
593
  },
575
594
  "aria-label": `Remove ${e}`,
576
595
  tabIndex: -1,
577
- children: f(l || h, { size: C })
596
+ children: m(l || _, { size: C })
578
597
  })
579
598
  ]
580
599
  });
581
600
  });
582
- de.displayName = "Tag";
583
- var fe = { badge: "_badge_1nscu_1" }, pe = ({ count: e, isSelected: t = !1, className: n }) => {
601
+ ue.displayName = "Tag";
602
+ var de = { badge: "_badge_1nscu_1" }, fe = ({ count: e, isSelected: t = !1, className: n, "aria-label": r, labelFormat: i }) => {
584
603
  if (e === 0) return null;
585
- let r = e > 9 ? "+" : e.toString();
586
- return /* @__PURE__ */ f("span", {
587
- className: `${fe.badge} ${n || ""}`,
588
- "aria-label": `${e} unread`,
589
- children: /* @__PURE__ */ f(w, {
604
+ let a = e > 9 ? "+" : e.toString(), o = r ?? i?.(e) ?? String(e);
605
+ return /* @__PURE__ */ m("span", {
606
+ className: `${de.badge} ${n || ""}`,
607
+ "aria-label": o,
608
+ children: /* @__PURE__ */ m(E, {
590
609
  variant: "text-caption-emphasis",
591
610
  as: "span",
592
611
  color: t ? "primary" : "secondary",
593
- children: r
612
+ children: a
594
613
  })
595
614
  });
596
615
  };
597
- pe.displayName = "Badge";
598
- var me = {
616
+ fe.displayName = "Badge";
617
+ var pe = {
599
618
  toggle: "_toggle_1aw6v_1",
600
619
  checked: "_checked_1aw6v_35",
601
620
  thumb: "_thumb_1aw6v_39",
602
621
  inactive: "_inactive_1aw6v_62"
603
- }, he = n(({ checked: e = !1, onChange: t, inactive: n = !1, className: r, "aria-label": i }, a) => {
604
- let [o, s] = l(!1);
605
- return /* @__PURE__ */ f("button", {
606
- ref: a,
607
- type: "button",
608
- role: "switch",
609
- "aria-checked": e,
610
- "aria-label": i,
611
- disabled: n,
612
- className: P(me.toggle, e && me.checked, n && me.inactive, r),
613
- onMouseDown: (e) => {
614
- n || (e.preventDefault(), s(!0));
615
- },
616
- onMouseUp: () => {
617
- n || !o || (s(!1), t?.(!e));
618
- },
619
- onMouseLeave: () => {
620
- o && s(!1);
621
- },
622
- children: /* @__PURE__ */ f("span", { className: me.thumb })
623
- });
624
- });
625
- he.displayName = "Toggle";
626
- var ge = {
622
+ }, me = r(({ checked: e = !1, onChange: t, inactive: n = !1, className: r, "aria-label": i, "aria-labelledby": a }, o) => /* @__PURE__ */ m("button", {
623
+ ref: o,
624
+ type: "button",
625
+ role: "switch",
626
+ "aria-checked": e,
627
+ "aria-label": i,
628
+ "aria-labelledby": a,
629
+ disabled: n,
630
+ className: F(pe.toggle, e && pe.checked, n && pe.inactive, r),
631
+ onClick: () => {
632
+ n || t?.(!e);
633
+ },
634
+ children: /* @__PURE__ */ m("span", { className: pe.thumb })
635
+ }));
636
+ me.displayName = "Toggle";
637
+ var he = {
627
638
  checkbox: "_checkbox_1brbf_1",
628
639
  inactive: "_inactive_1brbf_18",
629
640
  box: "_box_1brbf_25",
630
641
  boxChecked: "_boxChecked_1brbf_37",
631
642
  checkmark: "_checkmark_1brbf_42"
632
- }, _e = n(({ label: e, checked: t = !1, indeterminate: n = !1, onChange: r, inactive: i = !1, className: a, checkedIcon: o, uncheckedIcon: s, indeterminateIcon: c }, l) => {
633
- let u = () => {
643
+ }, ge = r(({ label: e, checked: t = !1, indeterminate: n = !1, onChange: r, inactive: i = !1, className: a, checkedIcon: o, uncheckedIcon: c, indeterminateIcon: l }, u) => {
644
+ let d = s(), f = () => {
634
645
  i || r?.(!t);
635
- }, d = n || t ? "var(--color-foreground-primary)" : "var(--color-foreground-secondary)", m = n ? c : t ? o : s;
636
- return /* @__PURE__ */ p("div", {
637
- ref: l,
646
+ }, p = n || t ? "var(--color-foreground-primary)" : "var(--color-foreground-secondary)", g = n ? l : t ? o : c;
647
+ return /* @__PURE__ */ h("div", {
648
+ ref: u,
638
649
  role: "checkbox",
639
650
  "aria-checked": n ? "mixed" : t,
640
- "aria-inactive": i,
651
+ "aria-disabled": i || void 0,
652
+ "aria-labelledby": d,
653
+ "data-inactive": i || void 0,
641
654
  tabIndex: i ? -1 : 0,
642
- className: P(ge.checkbox, i && ge.inactive, a),
643
- onClick: u,
655
+ className: F(he.checkbox, i && he.inactive, a),
656
+ onClick: f,
644
657
  onKeyDown: (e) => {
645
- (e.key === " " || e.key === "Enter") && (e.preventDefault(), u());
658
+ (e.key === " " || e.key === "Enter") && (e.preventDefault(), f());
646
659
  },
647
- children: [m ? /* @__PURE__ */ f(m, {
660
+ children: [g ? /* @__PURE__ */ m(g, {
648
661
  size: 20,
649
- color: d
650
- }) : /* @__PURE__ */ f("span", {
651
- className: P(ge.box, (t || n) && ge.boxChecked),
652
- children: (t || n) && /* @__PURE__ */ f("span", {
653
- className: ge.checkmark,
662
+ color: p
663
+ }) : /* @__PURE__ */ m("span", {
664
+ className: F(he.box, (t || n) && he.boxChecked),
665
+ children: (t || n) && /* @__PURE__ */ m("span", {
666
+ className: he.checkmark,
654
667
  children: n ? "−" : "✓"
655
668
  })
656
- }), /* @__PURE__ */ f(w, {
669
+ }), /* @__PURE__ */ m(E, {
670
+ id: d,
657
671
  variant: "text-body-medium",
658
672
  as: "span",
659
673
  color: "inherit",
@@ -661,136 +675,157 @@ var ge = {
661
675
  })]
662
676
  });
663
677
  });
664
- _e.displayName = "Checkbox";
665
- var ve = {
666
- wrapper: "_wrapper_14bd3_1",
667
- row: "_row_14bd3_16",
668
- input: "_input_14bd3_24",
669
- clearButton: "_clearButton_14bd3_49",
670
- suffix: "_suffix_14bd3_65"
671
- }, ye = n(({ value: e, onChange: t, id: n, placeholder: r, autoFocus: i = !1, className: a, type: o = "text", inactive: s = !1, onKeyDown: c, suffix: l, clearIcon: u, "aria-label": d }, m) => {
672
- let h = o === "search" && e.length > 0 && !s;
673
- return /* @__PURE__ */ f("div", {
674
- ref: m,
675
- className: P(ve.wrapper, a),
676
- children: /* @__PURE__ */ p("div", {
677
- className: ve.row,
678
- children: [
679
- /* @__PURE__ */ f("input", {
680
- type: o,
681
- id: n,
682
- value: e,
683
- onChange: t,
684
- onKeyDown: c,
685
- placeholder: r,
686
- className: ve.input,
687
- autoFocus: i,
688
- disabled: s,
689
- "aria-label": d
690
- }),
691
- h && /* @__PURE__ */ f("button", {
692
- type: "button",
693
- className: ve.clearButton,
694
- onClick: () => {
695
- t({ target: { value: "" } });
696
- },
697
- "aria-label": "Clear",
698
- children: u ? /* @__PURE__ */ f(u, { size: 16 }) : /* @__PURE__ */ f("span", {
699
- "aria-hidden": !0,
700
- children: "×"
678
+ ge.displayName = "Checkbox";
679
+ var _e = {
680
+ container: "_container_ce0xu_1",
681
+ wrapper: "_wrapper_ce0xu_8",
682
+ wrapperError: "_wrapperError_ce0xu_23",
683
+ errorText: "_errorText_ce0xu_31",
684
+ row: "_row_ce0xu_37",
685
+ input: "_input_ce0xu_45",
686
+ clearButton: "_clearButton_ce0xu_70",
687
+ suffix: "_suffix_ce0xu_86"
688
+ }, ve = () => !!import.meta.env?.DEV, ye = r(({ value: e, onChange: t, id: n, placeholder: r, autoFocus: i = !1, className: a, type: c = "text", inactive: l = !1, onKeyDown: u, suffix: d, clearIcon: f, "aria-label": p, "aria-labelledby": g, "aria-describedby": _, error: v = !1, errorMessage: y }, b) => {
689
+ let x = `${s()}-error`, S = c === "search" && e.length > 0 && !l, C = v && !!y, w = [_, C ? x : void 0].filter(Boolean).join(" ") || void 0;
690
+ return o(() => {
691
+ ve() && !n && !p && !g && console.warn("[@ds-mo/ui] <Input> is missing an accessible name. Provide one of: `id` (paired with a <label htmlFor>), `aria-label`, or `aria-labelledby`.");
692
+ }, [
693
+ n,
694
+ p,
695
+ g
696
+ ]), /* @__PURE__ */ h("div", {
697
+ className: _e.container,
698
+ children: [/* @__PURE__ */ m("div", {
699
+ ref: b,
700
+ className: F(_e.wrapper, v && _e.wrapperError, a),
701
+ children: /* @__PURE__ */ h("div", {
702
+ className: _e.row,
703
+ children: [
704
+ /* @__PURE__ */ m("input", {
705
+ type: c,
706
+ id: n,
707
+ value: e,
708
+ onChange: t,
709
+ onKeyDown: u,
710
+ placeholder: r,
711
+ className: _e.input,
712
+ autoFocus: i,
713
+ disabled: l,
714
+ "aria-label": p,
715
+ "aria-labelledby": g,
716
+ "aria-describedby": w,
717
+ "aria-invalid": v || void 0
718
+ }),
719
+ S && /* @__PURE__ */ m("button", {
720
+ type: "button",
721
+ className: _e.clearButton,
722
+ onClick: () => {
723
+ t({ target: { value: "" } });
724
+ },
725
+ "aria-label": "Clear",
726
+ children: f ? /* @__PURE__ */ m(f, { size: 16 }) : /* @__PURE__ */ m("span", {
727
+ "aria-hidden": !0,
728
+ children: "×"
729
+ })
730
+ }),
731
+ d && /* @__PURE__ */ m("div", {
732
+ className: _e.suffix,
733
+ children: d
701
734
  })
702
- }),
703
- l && /* @__PURE__ */ f("div", {
704
- className: ve.suffix,
705
- children: l
706
- })
707
- ]
708
- })
735
+ ]
736
+ })
737
+ }), C && /* @__PURE__ */ m("div", {
738
+ id: x,
739
+ role: "alert",
740
+ className: _e.errorText,
741
+ children: y
742
+ })]
709
743
  });
710
744
  });
711
745
  ye.displayName = "Input";
712
- var K = {
713
- field: "_field_6azt6_1",
714
- labelRow: "_labelRow_6azt6_2",
715
- track: "_track_6azt6_4",
716
- trackInner: "_trackInner_6azt6_10",
717
- fillTrack: "_fillTrack_6azt6_16",
718
- fill: "_fill_6azt6_16",
719
- trackAtMin: "_trackAtMin_6azt6_27",
720
- thumb: "_thumb_6azt6_29",
721
- trackInactive: "_trackInactive_6azt6_49",
722
- input: "_input_6azt6_54"
723
- }, be = n(({ value: e, onChange: t, min: n = 0, max: o = 100, step: s = 1, label: u, id: d, inactive: m = !1, className: h }, g) => {
724
- let _ = a(), v = d ?? _, y = c(null), [b, x] = l(() => {
725
- let t = o - n;
746
+ var Y = {
747
+ field: "_field_x9zdb_1",
748
+ labelRow: "_labelRow_x9zdb_2",
749
+ track: "_track_x9zdb_4",
750
+ trackInner: "_trackInner_x9zdb_10",
751
+ fillTrack: "_fillTrack_x9zdb_16",
752
+ fill: "_fill_x9zdb_16",
753
+ trackAtMin: "_trackAtMin_x9zdb_31",
754
+ thumb: "_thumb_x9zdb_33",
755
+ trackInactive: "_trackInactive_x9zdb_53",
756
+ input: "_input_x9zdb_58"
757
+ }, be = r(({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, label: c, id: l, inactive: f = !1, className: p, valueText: g }, _) => {
758
+ let v = s(), y = l ?? v, b = u(null), [x, S] = d(() => {
759
+ let t = r - n;
726
760
  return t === 0 ? 0 : Math.round((e - n) / t * 100);
727
- }), S = r(() => {
728
- let t = o - n;
729
- x(t === 0 ? 0 : Math.round((e - n) / t * 100));
761
+ }), C = a(() => {
762
+ let t = r - n;
763
+ S(t === 0 ? 0 : Math.round((e - n) / t * 100));
730
764
  }, [
731
765
  e,
732
766
  n,
733
- o
767
+ r
734
768
  ]);
735
- return i(() => {
736
- S();
737
- }, [S]), /* @__PURE__ */ p("div", {
738
- ref: g,
739
- className: P(K.field, h),
740
- children: [/* @__PURE__ */ p("div", {
741
- className: K.labelRow,
742
- children: [/* @__PURE__ */ f(w, {
769
+ return o(() => {
770
+ C();
771
+ }, [C]), /* @__PURE__ */ h("div", {
772
+ ref: _,
773
+ className: F(Y.field, p),
774
+ children: [/* @__PURE__ */ h("div", {
775
+ className: Y.labelRow,
776
+ children: [/* @__PURE__ */ m(E, {
743
777
  variant: "text-body-small-emphasis",
744
778
  as: "label",
745
- htmlFor: v,
746
- children: u
747
- }), /* @__PURE__ */ f(w, {
779
+ htmlFor: y,
780
+ children: c
781
+ }), /* @__PURE__ */ m(E, {
748
782
  variant: "text-body-small-emphasis",
749
783
  as: "span",
750
784
  children: e
751
785
  })]
752
- }), /* @__PURE__ */ p("div", {
753
- ref: y,
754
- className: P(K.track, m && K.trackInactive, b === 0 && K.trackAtMin),
755
- style: { "--slider-pct": b },
756
- children: [/* @__PURE__ */ p("div", {
757
- className: K.trackInner,
758
- children: [/* @__PURE__ */ f("div", {
759
- className: K.fillTrack,
760
- children: /* @__PURE__ */ f("div", { className: K.fill })
761
- }), /* @__PURE__ */ f("div", { className: K.thumb })]
762
- }), /* @__PURE__ */ f("input", {
786
+ }), /* @__PURE__ */ h("div", {
787
+ ref: b,
788
+ className: F(Y.track, f && Y.trackInactive, x === 0 && Y.trackAtMin),
789
+ style: { "--slider-pct": x },
790
+ children: [/* @__PURE__ */ h("div", {
791
+ className: Y.trackInner,
792
+ children: [/* @__PURE__ */ m("div", {
793
+ className: Y.fillTrack,
794
+ children: /* @__PURE__ */ m("div", { className: Y.fill })
795
+ }), /* @__PURE__ */ m("div", { className: Y.thumb })]
796
+ }), /* @__PURE__ */ m("input", {
763
797
  type: "range",
764
- id: v,
798
+ id: y,
765
799
  min: n,
766
- max: o,
767
- step: s,
800
+ max: r,
801
+ step: i,
768
802
  value: e,
769
803
  onChange: (e) => {
770
804
  t(Number(e.target.value));
771
805
  },
772
- disabled: m,
773
- className: K.input,
774
- "aria-valuemin": n,
775
- "aria-valuemax": o,
776
- "aria-valuenow": e
806
+ disabled: f,
807
+ className: Y.input,
808
+ "aria-valuetext": g
777
809
  })]
778
810
  })]
779
811
  });
780
812
  });
781
813
  be.displayName = "Slider";
782
- var xe = { field: "_field_140we_1" }, Se = n(({ label: e, children: t, id: n, className: r }, i) => /* @__PURE__ */ p("div", {
783
- ref: i,
784
- className: P(xe.field, r),
785
- children: [/* @__PURE__ */ f(w, {
786
- variant: "text-body-small-emphasis",
787
- as: "label",
788
- htmlFor: n,
789
- children: e
790
- }), t]
791
- }));
814
+ var xe = { field: "_field_140we_1" }, Se = r(({ label: e, children: t, id: r, className: a }, o) => {
815
+ let c = s(), l = r ?? c, u = t;
816
+ return i(t) && t.props.id === void 0 && (u = n(t, { id: l })), /* @__PURE__ */ h("div", {
817
+ ref: o,
818
+ className: F(xe.field, a),
819
+ children: [/* @__PURE__ */ m(E, {
820
+ variant: "text-body-small-emphasis",
821
+ as: "label",
822
+ htmlFor: l,
823
+ children: e
824
+ }), u]
825
+ });
826
+ });
792
827
  Se.displayName = "Field";
793
- var q = {
828
+ var Ce = {
794
829
  backdrop: "_backdrop_k4mxw_1",
795
830
  modalBackdropFadeIn: "_modalBackdropFadeIn_k4mxw_1",
796
831
  closing: "_closing_k4mxw_15",
@@ -802,211 +837,303 @@ var q = {
802
837
  subtitle: "_subtitle_k4mxw_55",
803
838
  body: "_body_k4mxw_60",
804
839
  footer: "_footer_k4mxw_65"
805
- }, Ce = {
840
+ }, we = {
806
841
  sm: "var(--dimension-modal-width-sm, 400px)",
807
842
  md: "var(--dimension-modal-width-md, 560px)",
808
843
  lg: "var(--dimension-modal-width-lg, 720px)"
809
- }, we = 220, Te = ({ isOpen: e, onClose: t, title: n, subtitle: r, children: o, footer: u, width: d = "md", bodyClassName: m }) => {
810
- let h = c(null), g = a(), [v, y] = l(!1), [b, x] = l(e), S = s(() => d === "sm" || d === "md" || d === "lg" ? Ce[d] : d, [d]);
811
- return i(() => {
812
- if (e) x(!0), y(!1);
813
- else if (b) {
814
- y(!0);
844
+ }, Te = 220, Ee = [
845
+ "a[href]",
846
+ "area[href]",
847
+ "button:not([disabled])",
848
+ "input:not([disabled]):not([type=\"hidden\"])",
849
+ "select:not([disabled])",
850
+ "textarea:not([disabled])",
851
+ "iframe",
852
+ "object",
853
+ "embed",
854
+ "[contenteditable=\"true\"]",
855
+ "[tabindex]:not([tabindex=\"-1\"])"
856
+ ].join(","), De = (e) => {
857
+ let t = e.querySelectorAll(Ee);
858
+ return Array.from(t).filter((e) => !e.hasAttribute("disabled") && e.getAttribute("aria-hidden") !== "true");
859
+ }, Oe = ({ isOpen: e, onClose: t, title: n, subtitle: r, children: i, footer: a, width: c = "md", bodyClassName: f, initialFocus: p }) => {
860
+ let g = u(null), _ = u(null), v = s(), b = s(), [x, S] = d(!1), [C, w] = d(e), T = l(() => c === "sm" || c === "md" || c === "lg" ? we[c] : c, [c]);
861
+ o(() => {
862
+ if (e) w(!0), S(!1);
863
+ else if (C) {
864
+ S(!0);
815
865
  let e = setTimeout(() => {
816
- x(!1), y(!1);
817
- }, we);
866
+ w(!1), S(!1);
867
+ }, Te);
818
868
  return () => clearTimeout(e);
819
869
  }
820
- }, [e, b]), i(() => {
870
+ }, [e, C]), o(() => {
821
871
  if (!e) return;
822
872
  let n = (e) => {
823
873
  e.key === "Escape" && t();
824
874
  };
825
875
  return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
826
- }, [e, t]), i(() => {
827
- if (!e || !b) return;
876
+ }, [e, t]), o(() => {
877
+ if (!e || !C) return;
878
+ _.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
828
879
  let t = requestAnimationFrame(() => {
829
- h.current?.focus();
880
+ let e = g.current;
881
+ if (!e) return;
882
+ if (p?.current) {
883
+ p.current.focus();
884
+ return;
885
+ }
886
+ let t = De(e);
887
+ t.length > 0 ? t[0].focus() : e.focus();
830
888
  });
831
- return () => cancelAnimationFrame(t);
832
- }, [e, b]), b ? _(/* @__PURE__ */ f("div", {
833
- className: `${q.backdrop} ${v ? q.closing : ""}`,
889
+ return () => {
890
+ cancelAnimationFrame(t);
891
+ let e = _.current;
892
+ e && document.contains(e) && e.focus(), _.current = null;
893
+ };
894
+ }, [
895
+ e,
896
+ C,
897
+ p
898
+ ]);
899
+ let D = (e) => {
900
+ if (e.key !== "Tab") return;
901
+ let t = g.current;
902
+ if (!t) return;
903
+ let n = De(t);
904
+ if (n.length === 0) {
905
+ e.preventDefault(), t.focus();
906
+ return;
907
+ }
908
+ let r = n[0], i = n[n.length - 1], a = document.activeElement;
909
+ e.shiftKey ? (a === r || a === t || !t.contains(a)) && (e.preventDefault(), i.focus()) : (a === i || !t.contains(a)) && (e.preventDefault(), r.focus());
910
+ };
911
+ if (!C) return null;
912
+ let O = r == null ? void 0 : b;
913
+ return y(/* @__PURE__ */ m("div", {
914
+ className: `${Ce.backdrop} ${x ? Ce.closing : ""}`,
834
915
  onMouseDown: (e) => {
835
916
  e.target === e.currentTarget && t();
836
917
  },
837
- children: /* @__PURE__ */ p(M, {
838
- ref: h,
918
+ onKeyDown: D,
919
+ children: /* @__PURE__ */ h(N, {
920
+ ref: g,
839
921
  background: "primary",
840
922
  elevation: "floating",
841
923
  radius: "var(--dimension-radius-275, 22px)",
842
- className: q.dialog,
843
- style: { width: `min(${S}, calc(100vw - 32px))` },
924
+ className: Ce.dialog,
925
+ style: { width: `min(${T}, calc(100vw - 32px))` },
844
926
  role: "dialog",
845
927
  "aria-modal": "true",
846
- "aria-labelledby": g,
928
+ "aria-labelledby": v,
929
+ "aria-describedby": O,
847
930
  tabIndex: -1,
848
931
  children: [
849
- /* @__PURE__ */ p("div", {
850
- className: q.header,
851
- children: [/* @__PURE__ */ f(w, {
852
- id: g,
932
+ /* @__PURE__ */ h("div", {
933
+ className: Ce.header,
934
+ children: [/* @__PURE__ */ m(E, {
935
+ id: v,
853
936
  as: "h2",
854
937
  variant: "text-title-small",
855
938
  children: n
856
- }), r != null && /* @__PURE__ */ f("div", {
857
- className: q.subtitle,
939
+ }), r != null && /* @__PURE__ */ m("div", {
940
+ id: b,
941
+ className: Ce.subtitle,
858
942
  children: r
859
943
  })]
860
944
  }),
861
- /* @__PURE__ */ f("div", {
862
- className: `${q.body} ${m ?? ""}`.trim(),
863
- children: o
945
+ /* @__PURE__ */ m("div", {
946
+ className: `${Ce.body} ${f ?? ""}`.trim(),
947
+ children: i
864
948
  }),
865
- u != null && /* @__PURE__ */ f("div", {
866
- className: q.footer,
867
- children: u
949
+ a != null && /* @__PURE__ */ m("div", {
950
+ className: Ce.footer,
951
+ children: a
868
952
  })
869
953
  ]
870
954
  })
871
- }), document.body) : null;
955
+ }), document.body);
872
956
  };
873
- Te.displayName = "Modal";
874
- var J = {
875
- menuItem: "_menuItem_ozcs1_1",
876
- subtext: "_subtext_ozcs1_15",
877
- iconPrefix: "_iconPrefix_ozcs1_17",
878
- menuItemSelected: "_menuItemSelected_ozcs1_24",
879
- content: "_content_ozcs1_26",
880
- label: "_label_ozcs1_34",
881
- menuItemLabelTertiary: "_menuItemLabelTertiary_ozcs1_37",
882
- menuItemNegative: "_menuItemNegative_ozcs1_38",
883
- menuItemInactive: "_menuItemInactive_ozcs1_42",
884
- toggleSuffix: "_toggleSuffix_ozcs1_44",
885
- toggle: "_toggle_ozcs1_44",
886
- toggleOn: "_toggleOn_ozcs1_55",
887
- toggleThumb: "_toggleThumb_ozcs1_57",
888
- checkSuffix: "_checkSuffix_ozcs1_70",
889
- chevronSuffix: "_chevronSuffix_ozcs1_77"
890
- }, Ee = n(({ label: e, onClick: t, isSelected: n = !1, isInactive: r = !1, icon: i, labelColor: a, subtext: o, showToggle: s = !1, toggleValue: c = !1, intent: l, selectionStyle: u = "highlight", showTrailingChevron: d = !1, checkIcon: m, chevronIcon: h }, g) => {
891
- let _ = u === "radio";
892
- return /* @__PURE__ */ p(M, {
893
- ref: g,
957
+ Oe.displayName = "Modal";
958
+ var X = {
959
+ menuItem: "_menuItem_1yf1s_1",
960
+ subtext: "_subtext_1yf1s_15",
961
+ iconPrefix: "_iconPrefix_1yf1s_17",
962
+ menuItemSelected: "_menuItemSelected_1yf1s_24",
963
+ content: "_content_1yf1s_26",
964
+ label: "_label_1yf1s_34",
965
+ menuItemLabelTertiary: "_menuItemLabelTertiary_1yf1s_37",
966
+ menuItemNegative: "_menuItemNegative_1yf1s_38",
967
+ menuItemInactive: "_menuItemInactive_1yf1s_42",
968
+ menuItemActive: "_menuItemActive_1yf1s_44",
969
+ toggleSuffix: "_toggleSuffix_1yf1s_46",
970
+ toggle: "_toggle_1yf1s_46",
971
+ toggleOn: "_toggleOn_1yf1s_57",
972
+ toggleThumb: "_toggleThumb_1yf1s_59",
973
+ checkSuffix: "_checkSuffix_1yf1s_72",
974
+ chevronSuffix: "_chevronSuffix_1yf1s_79"
975
+ }, ke = r(({ label: e, onClick: t, isSelected: n = !1, isInactive: r = !1, icon: i, labelColor: a, subtext: o, showToggle: s = !1, toggleValue: c = !1, intent: l, selectionStyle: u = "highlight", showTrailingChevron: d = !1, checkIcon: f, chevronIcon: p, role: g, id: _, ariaSelected: v, isActive: y = !1, tabIndex: b, onKeyDown: x, onFocus: S }, C) => {
976
+ let w = u === "radio", T = n && !(u === "noOverlay" || w), D = g ?? (s ? "menuitemcheckbox" : w ? "menuitemradio" : "menuitem"), O = g ? void 0 : D === "menuitemcheckbox" ? !!c : D === "menuitemradio" ? !!n : void 0, k = g && v !== void 0 ? v : void 0;
977
+ return /* @__PURE__ */ h(N, {
978
+ ref: C,
894
979
  as: "button",
895
980
  interactive: !r,
896
- selected: n && !(u === "noOverlay" || _),
981
+ selected: T,
897
982
  radius: "sm",
898
- className: `${J.menuItem} ${n ? J.menuItemSelected : ""} ${r ? J.menuItemInactive : ""} ${l === "negative" ? J.menuItemNegative : ""} ${a === "tertiary" ? J.menuItemLabelTertiary : ""}`,
983
+ className: `${X.menuItem} ${n ? X.menuItemSelected : ""} ${r ? X.menuItemInactive : ""} ${l === "negative" ? X.menuItemNegative : ""} ${a === "tertiary" ? X.menuItemLabelTertiary : ""} ${y ? X.menuItemActive : ""}`,
899
984
  onClick: t,
900
985
  type: "button",
901
986
  inactive: r,
987
+ role: D,
988
+ id: _,
989
+ "aria-checked": O,
990
+ "aria-selected": k,
991
+ "aria-disabled": r || void 0,
992
+ tabIndex: b,
993
+ onKeyDown: x,
994
+ onFocus: S,
902
995
  children: [
903
- i && /* @__PURE__ */ f("div", {
904
- className: J.iconPrefix,
905
- children: /* @__PURE__ */ f(i, { size: 20 })
996
+ i && /* @__PURE__ */ m("div", {
997
+ className: X.iconPrefix,
998
+ "aria-hidden": "true",
999
+ children: /* @__PURE__ */ m(i, { size: 20 })
906
1000
  }),
907
- /* @__PURE__ */ p("div", {
908
- className: J.content,
909
- children: [/* @__PURE__ */ f(w, {
1001
+ /* @__PURE__ */ h("div", {
1002
+ className: X.content,
1003
+ children: [/* @__PURE__ */ m(E, {
910
1004
  variant: n ? "text-body-medium-emphasis" : "text-body-medium",
911
1005
  color: a,
912
1006
  as: "span",
913
- className: J.label,
1007
+ className: X.label,
914
1008
  children: e
915
- }), o && /* @__PURE__ */ f(w, {
1009
+ }), o && /* @__PURE__ */ m(E, {
916
1010
  variant: "text-body-small",
917
1011
  as: "span",
918
- className: J.subtext,
1012
+ className: X.subtext,
919
1013
  children: o
920
1014
  })]
921
1015
  }),
922
- s && /* @__PURE__ */ f("div", {
923
- className: J.toggleSuffix,
924
- children: /* @__PURE__ */ f("div", {
925
- className: `${J.toggle} ${c ? J.toggleOn : ""}`,
926
- children: /* @__PURE__ */ f("div", { className: J.toggleThumb })
1016
+ s && /* @__PURE__ */ m("div", {
1017
+ className: X.toggleSuffix,
1018
+ "aria-hidden": "true",
1019
+ children: /* @__PURE__ */ m("div", {
1020
+ className: `${X.toggle} ${c ? X.toggleOn : ""}`,
1021
+ children: /* @__PURE__ */ m("div", { className: X.toggleThumb })
927
1022
  })
928
1023
  }),
929
- _ && n && m && /* @__PURE__ */ f("div", {
930
- className: J.checkSuffix,
931
- children: /* @__PURE__ */ f(m, { size: 20 })
1024
+ w && n && f && /* @__PURE__ */ m("div", {
1025
+ className: X.checkSuffix,
1026
+ "aria-hidden": "true",
1027
+ children: /* @__PURE__ */ m(f, { size: 20 })
932
1028
  }),
933
- d && h && /* @__PURE__ */ f("div", {
934
- className: J.chevronSuffix,
935
- children: /* @__PURE__ */ f(h, { size: 20 })
1029
+ d && p && /* @__PURE__ */ m("div", {
1030
+ className: X.chevronSuffix,
1031
+ "aria-hidden": "true",
1032
+ children: /* @__PURE__ */ m(p, { size: 20 })
936
1033
  })
937
1034
  ]
938
1035
  });
939
1036
  });
940
- Ee.displayName = "MenuItem";
941
- var De = {
1037
+ ke.displayName = "MenuItem";
1038
+ var Ae = {
942
1039
  destructiveMenuItem: "_destructiveMenuItem_1t03u_1",
943
1040
  subtext: "_subtext_1t03u_19",
944
1041
  progressFill: "_progressFill_1t03u_21",
945
1042
  content: "_content_1t03u_44",
946
1043
  label: "_label_1t03u_53"
947
- }, Oe = n(({ label: e, onClick: t, holdDuration: n = 4e3, subtext: r }, a) => {
948
- let [o, s] = l(0), u = c(null), d = c(0), m = c(null), h = () => {
949
- s(0), u.current &&= (clearTimeout(u.current), null), m.current &&= (cancelAnimationFrame(m.current), null);
950
- };
951
- return i(() => () => {
952
- h();
953
- }, []), /* @__PURE__ */ p("button", {
954
- ref: a,
955
- className: De.destructiveMenuItem,
956
- onMouseDown: (e) => {
957
- if (e.stopPropagation(), e.preventDefault(), n === 0) {
958
- t();
1044
+ }, je = r(({ label: e, onClick: t, holdDuration: n = 4e3, subtext: r, tabIndex: i, onKeyDown: a, onFocus: s }, c) => {
1045
+ let [l, f] = d(0), p = u(null), g = u(0), _ = u(null), v = u(!1), y = () => {
1046
+ f(0), v.current = !1, p.current &&= (clearTimeout(p.current), null), _.current &&= (cancelAnimationFrame(_.current), null);
1047
+ }, b = () => {
1048
+ if (v.current) return;
1049
+ if (v.current = !0, n === 0) {
1050
+ t(), y();
1051
+ return;
1052
+ }
1053
+ g.current = performance.now();
1054
+ let e = () => {
1055
+ let t = performance.now() - g.current, r = Math.min(t / n * 100, 100);
1056
+ f(r), r < 100 && (_.current = requestAnimationFrame(e));
1057
+ };
1058
+ _.current = requestAnimationFrame(e), p.current = window.setTimeout(() => {
1059
+ t(), y();
1060
+ }, n);
1061
+ }, x = (e) => {
1062
+ e.stopPropagation(), e.preventDefault(), b();
1063
+ }, S = (e) => {
1064
+ e.stopPropagation(), y();
1065
+ }, C = (e) => {
1066
+ e.stopPropagation(), y();
1067
+ }, w = (e) => e.key === " " || e.key === "Spacebar";
1068
+ return o(() => () => {
1069
+ y();
1070
+ }, []), /* @__PURE__ */ h("button", {
1071
+ ref: c,
1072
+ className: Ae.destructiveMenuItem,
1073
+ onMouseDown: x,
1074
+ onMouseUp: S,
1075
+ onMouseLeave: C,
1076
+ onKeyDown: (e) => {
1077
+ if (w(e)) {
1078
+ if (e.preventDefault(), e.repeat) return;
1079
+ e.stopPropagation(), b();
959
1080
  return;
960
1081
  }
961
- d.current = performance.now();
962
- let r = () => {
963
- let e = performance.now() - d.current, t = Math.min(e / n * 100, 100);
964
- s(t), t < 100 && (m.current = requestAnimationFrame(r));
965
- };
966
- m.current = requestAnimationFrame(r), u.current = window.setTimeout(() => {
967
- t(), h();
968
- }, n);
1082
+ if (e.key === "Enter") {
1083
+ e.preventDefault();
1084
+ return;
1085
+ }
1086
+ a?.(e);
969
1087
  },
970
- onMouseUp: (e) => {
971
- e.stopPropagation(), h();
1088
+ onKeyUp: (e) => {
1089
+ w(e) && (e.preventDefault(), e.stopPropagation(), y());
972
1090
  },
973
- onMouseLeave: (e) => {
974
- e.stopPropagation(), h();
1091
+ onBlur: () => {
1092
+ y();
975
1093
  },
1094
+ onFocus: s,
976
1095
  type: "button",
977
- children: [/* @__PURE__ */ f("div", {
978
- className: De.progressFill,
979
- style: { width: `${o}%` }
980
- }), /* @__PURE__ */ p("div", {
981
- className: De.content,
982
- children: [/* @__PURE__ */ f(w, {
1096
+ role: "menuitem",
1097
+ tabIndex: i ?? -1,
1098
+ "aria-keyshortcuts": "Space",
1099
+ children: [/* @__PURE__ */ m("div", {
1100
+ className: Ae.progressFill,
1101
+ style: { width: `${l}%` },
1102
+ role: "progressbar",
1103
+ "aria-valuenow": Math.round(l),
1104
+ "aria-valuemin": 0,
1105
+ "aria-valuemax": 100,
1106
+ "aria-label": `Hold to confirm ${e}`
1107
+ }), /* @__PURE__ */ h("div", {
1108
+ className: Ae.content,
1109
+ children: [/* @__PURE__ */ m(E, {
983
1110
  variant: "text-body-medium",
984
1111
  as: "span",
985
- className: De.label,
1112
+ className: Ae.label,
986
1113
  children: e
987
- }), r && /* @__PURE__ */ f(w, {
1114
+ }), r && /* @__PURE__ */ m(E, {
988
1115
  variant: "text-body-small",
989
1116
  as: "span",
990
- className: De.subtext,
1117
+ className: Ae.subtext,
991
1118
  children: r
992
1119
  })]
993
1120
  })]
994
1121
  });
995
1122
  });
996
- Oe.displayName = "DestructiveMenuItem";
1123
+ je.displayName = "DestructiveMenuItem";
997
1124
  //#endregion
998
1125
  //#region src/utils/css-tokens.ts
999
- function ke(e, t) {
1126
+ function Me(e, t) {
1000
1127
  if (typeof document > "u") return t;
1001
1128
  let n = getComputedStyle(document.documentElement).getPropertyValue(e).trim(), r = parseFloat(n);
1002
1129
  return Number.isNaN(r) ? t : r;
1003
1130
  }
1004
- function Ae(e, t) {
1131
+ function Ne(e, t) {
1005
1132
  if (typeof document > "u") return t;
1006
1133
  let n = getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1007
1134
  return n.endsWith("ms") ? parseFloat(n) || t : n.endsWith("s") && (parseFloat(n) || 0) * 1e3 || t;
1008
1135
  }
1009
- var je = {
1136
+ var Pe = {
1010
1137
  menuContainer: "_menuContainer_ljt4d_1",
1011
1138
  menuFadeIn: "_menuFadeIn_ljt4d_1",
1012
1139
  closing: "_closing_ljt4d_21",
@@ -1014,78 +1141,83 @@ var je = {
1014
1141
  menuSection: "_menuSection_ljt4d_30",
1015
1142
  sectionHeader: "_sectionHeader_ljt4d_37",
1016
1143
  sectionLabel: "_sectionLabel_ljt4d_46"
1017
- }, Me = 220, Ne = ({ isOpen: e, onClose: t, anchorRef: n, items: r, sections: a, side: s = "bottom", align: u = "start", sideOffset: d = 4, alignOffset: m = 0, sideOffsetToken: h, alignOffsetToken: g, width: v, minWidth: y, maxWidth: b, matchAnchorWidth: x = !1, matchAnchorWidthOffset: S = 0, usePortal: C = !0 }) => {
1018
- let [T, E] = l(!1), [D, O] = l(e), [k, A] = l(!1), [j, N] = l({
1144
+ }, Fe = 220, Ie = ({ isOpen: e, onClose: t, anchorRef: n, items: r, sections: i, side: s = "bottom", align: f = "start", sideOffset: p = 4, alignOffset: g = 0, sideOffsetToken: _, alignOffsetToken: v, width: b, minWidth: x, maxWidth: S, matchAnchorWidth: C = !1, matchAnchorWidthOffset: w = 0, usePortal: T = !0, role: D = "menu", id: O, ariaLabel: k, activeIndex: ee, getOptionId: A }) => {
1145
+ let j = D === "listbox", [M, P] = d(!1), [F, I] = d(e), [L, R] = d(!1), [z, te] = d({
1019
1146
  x: 0,
1020
1147
  y: 0
1021
- }), [P, ee] = l({
1148
+ }), [B, ne] = d({
1022
1149
  width: 0,
1023
1150
  height: 0
1024
- }), [F, I] = l({
1151
+ }), [V, re] = d({
1025
1152
  width: 0,
1026
1153
  height: 0
1027
- }), L = c(!1), R = c(null), te = c([]), z = a || (r ? [{ items: r }] : []), B = z.some((e) => e.items.length > 0);
1028
- !T && z.length > 0 && B && (te.current = z);
1029
- let V = T ? te.current : z;
1030
- if (i(() => {
1031
- if (e) O(!0), E(!1), A(!1), L.current = !1;
1032
- else if (D) {
1033
- E(!0);
1154
+ }), [H, ie] = d(0), U = u(!1), W = u(null), ae = u([]), oe = u([]), G = u(!1), K = i || (r ? [{ items: r }] : []), q = K.some((e) => e.items.length > 0);
1155
+ !M && K.length > 0 && q && (ae.current = K);
1156
+ let se = M ? ae.current : K, J = l(() => {
1157
+ let e = [];
1158
+ return se.forEach((t) => {
1159
+ t.items.forEach((t) => e.push(t));
1160
+ }), e;
1161
+ }, [se]);
1162
+ o(() => {
1163
+ if (e) I(!0), P(!1), R(!1), U.current = !1;
1164
+ else if (F) {
1165
+ P(!0);
1034
1166
  let e = setTimeout(() => {
1035
- O(!1), E(!1), L.current = !1;
1036
- }, Me);
1167
+ I(!1), P(!1), U.current = !1;
1168
+ }, Fe);
1037
1169
  return () => clearTimeout(e);
1038
1170
  }
1039
- }, [e, D]), o(() => {
1040
- if (!e || !D || !R.current) return;
1171
+ }, [e, F]), c(() => {
1172
+ if (!e || !F || !W.current) return;
1041
1173
  let t = () => {
1042
- if (!R.current) return;
1043
- let e = R.current.getBoundingClientRect();
1044
- e.width > 0 && e.height > 0 && ee({
1174
+ if (!W.current) return;
1175
+ let e = W.current.getBoundingClientRect();
1176
+ e.width > 0 && e.height > 0 && ne({
1045
1177
  width: e.width,
1046
1178
  height: e.height
1047
1179
  });
1048
1180
  };
1049
1181
  if (t(), requestAnimationFrame(() => requestAnimationFrame(t)), typeof ResizeObserver < "u") {
1050
1182
  let e = new ResizeObserver(t);
1051
- return e.observe(R.current), () => e.disconnect();
1183
+ return e.observe(W.current), () => e.disconnect();
1052
1184
  }
1053
1185
  }, [
1054
1186
  e,
1055
- D,
1056
- z.length
1057
- ]), o(() => {
1058
- if (!e || !D || !n.current || !R.current) return;
1187
+ F,
1188
+ K.length
1189
+ ]), c(() => {
1190
+ if (!e || !F || !n.current || !W.current) return;
1059
1191
  let t = () => {
1060
- let e = n.current, t = R.current;
1192
+ let e = n.current, t = W.current;
1061
1193
  if (!e || !t) return;
1062
- let r = e.getBoundingClientRect(), i = t.getBoundingClientRect(), a = i.width || P.width || 200, o = i.height || P.height || 160;
1063
- I({
1194
+ let r = e.getBoundingClientRect(), i = t.getBoundingClientRect(), a = i.width || B.width || 200, o = i.height || B.height || 160;
1195
+ re({
1064
1196
  width: r.width,
1065
1197
  height: r.height
1066
1198
  });
1067
- let c = h == null ? d : ke(h, 12), l = g == null ? m : ke(g, 4), f = 0, p = 0;
1199
+ let c = _ == null ? p : Me(_, 12), l = v == null ? g : Me(v, 4), u = 0, d = 0;
1068
1200
  switch (s) {
1069
1201
  case "top":
1070
- p = r.top - o - c, f = u === "start" ? r.left + l : u === "end" ? r.right - a + l : r.left + r.width / 2 - a / 2 + l;
1202
+ d = r.top - o - c, u = f === "start" ? r.left + l : f === "end" ? r.right - a + l : r.left + r.width / 2 - a / 2 + l;
1071
1203
  break;
1072
1204
  case "bottom":
1073
- p = r.bottom + c, f = u === "start" ? r.left + l : u === "end" ? r.right - a + l : r.left + r.width / 2 - a / 2 + l;
1205
+ d = r.bottom + c, u = f === "start" ? r.left + l : f === "end" ? r.right - a + l : r.left + r.width / 2 - a / 2 + l;
1074
1206
  break;
1075
1207
  case "left":
1076
- f = r.left - a - c, p = u === "start" ? r.top + l : u === "end" ? r.bottom - o + l : r.top + r.height / 2 - o / 2 + l;
1208
+ u = r.left - a - c, d = f === "start" ? r.top + l : f === "end" ? r.bottom - o + l : r.top + r.height / 2 - o / 2 + l;
1077
1209
  break;
1078
1210
  case "right":
1079
- f = r.right + c, p = u === "start" ? r.top + l : u === "end" ? r.bottom - o + l : r.top + r.height / 2 - o / 2 + l;
1211
+ u = r.right + c, d = f === "start" ? r.top + l : f === "end" ? r.bottom - o + l : r.top + r.height / 2 - o / 2 + l;
1080
1212
  break;
1081
1213
  }
1082
- N({
1083
- x: Math.min(Math.max(f, 4), window.innerWidth - a - 4),
1084
- y: Math.min(Math.max(p, 4), window.innerHeight - o - 4)
1085
- }), L.current = !0, A(!0);
1214
+ te({
1215
+ x: Math.min(Math.max(u, 4), window.innerWidth - a - 4),
1216
+ y: Math.min(Math.max(d, 4), window.innerHeight - o - 4)
1217
+ }), U.current = !0, R(!0);
1086
1218
  };
1087
- L.current || (t(), requestAnimationFrame(() => {
1088
- L.current || t();
1219
+ U.current || (t(), requestAnimationFrame(() => {
1220
+ U.current || t();
1089
1221
  }));
1090
1222
  let r = () => t();
1091
1223
  return window.addEventListener("scroll", r, !0), window.addEventListener("resize", r), () => {
@@ -1093,519 +1225,710 @@ var je = {
1093
1225
  };
1094
1226
  }, [
1095
1227
  e,
1096
- D,
1228
+ F,
1097
1229
  n,
1098
1230
  s,
1099
- u,
1100
- d,
1101
- m,
1102
- h,
1231
+ f,
1232
+ p,
1103
1233
  g,
1104
- P.width,
1105
- P.height,
1106
- z.length,
1107
- S
1108
- ]), i(() => {
1109
- if (!e || !D) return;
1234
+ _,
1235
+ v,
1236
+ B.width,
1237
+ B.height,
1238
+ K.length,
1239
+ w
1240
+ ]);
1241
+ let ce = a(() => {
1242
+ let e = document.activeElement;
1243
+ e && W.current?.contains(e) && n.current && n.current.focus(), t();
1244
+ }, [t, n]);
1245
+ o(() => {
1246
+ if (!e || !F) return;
1110
1247
  let r = (e) => {
1111
1248
  let r = e.target;
1112
- R.current?.contains(r) || n.current?.contains(r) || t();
1249
+ W.current?.contains(r) || n.current?.contains(r) || t();
1113
1250
  };
1114
1251
  return document.addEventListener("mousedown", r, !0), () => document.removeEventListener("mousedown", r, !0);
1115
1252
  }, [
1116
1253
  e,
1117
- D,
1254
+ F,
1118
1255
  t,
1119
1256
  n
1120
- ]), i(() => {
1257
+ ]), o(() => {
1121
1258
  if (!e) return;
1122
1259
  let n = (e) => {
1123
- e.key === "Escape" && t();
1260
+ e.key === "Escape" && (j ? t() : (e.preventDefault(), ce()));
1124
1261
  };
1125
1262
  return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
1126
- }, [e, t]), !D || V.length === 0) return null;
1127
- let ne = (e, n) => e.isDestructive ? /* @__PURE__ */ f(Oe, {
1128
- label: e.label,
1129
- subtext: e.subtext,
1130
- holdDuration: e.holdDuration ?? 4e3,
1131
- onClick: () => {
1132
- e.onClick(), e.keepOpenOnClick || t();
1263
+ }, [
1264
+ e,
1265
+ j,
1266
+ t,
1267
+ ce
1268
+ ]), o(() => {
1269
+ if (!e) {
1270
+ G.current = !1;
1271
+ return;
1133
1272
  }
1134
- }, n) : /* @__PURE__ */ f(Ee, {
1135
- icon: e.icon,
1136
- label: e.label,
1137
- subtext: e.subtext,
1138
- onClick: () => {
1139
- e.isInactive || (e.onClick(), e.keepOpenOnClick || t());
1140
- },
1141
- isSelected: e.isSelected,
1142
- isInactive: e.isInactive,
1143
- intent: e.intent,
1144
- showToggle: e.showToggle,
1145
- toggleValue: e.toggleValue,
1146
- selectionStyle: e.selectionStyle
1147
- }, n), re = {
1273
+ if (j || !L || G.current) return;
1274
+ let t = J.findIndex((e) => !e.isInactive), n = t >= 0 ? t : 0;
1275
+ ie(n), oe.current[n]?.focus(), G.current = !0;
1276
+ }, [
1277
+ e,
1278
+ j,
1279
+ L,
1280
+ J
1281
+ ]);
1282
+ let le = a((e) => {
1283
+ ie(e), oe.current[e]?.focus();
1284
+ }, []), ue = a((e) => {
1285
+ if (j || !J.length) return;
1286
+ let t = [];
1287
+ if (J.forEach((e, n) => {
1288
+ e.isInactive || t.push(n);
1289
+ }), !t.length) return;
1290
+ let n = t.indexOf(H), r = n < 0 ? 0 : n;
1291
+ switch (e.key) {
1292
+ case "ArrowDown":
1293
+ e.preventDefault(), e.stopPropagation(), le(t[(r + 1) % t.length]);
1294
+ break;
1295
+ case "ArrowUp":
1296
+ e.preventDefault(), e.stopPropagation(), le(t[(r - 1 + t.length) % t.length]);
1297
+ break;
1298
+ case "Home":
1299
+ e.preventDefault(), e.stopPropagation(), le(t[0]);
1300
+ break;
1301
+ case "End":
1302
+ e.preventDefault(), e.stopPropagation(), le(t[t.length - 1]);
1303
+ break;
1304
+ case "Tab":
1305
+ e.preventDefault(), ce();
1306
+ break;
1307
+ }
1308
+ }, [
1309
+ j,
1310
+ J,
1311
+ H,
1312
+ le,
1313
+ ce
1314
+ ]);
1315
+ if (!F || se.length === 0) return null;
1316
+ let de = (e) => (t) => {
1317
+ oe.current[e] = t;
1318
+ }, fe = (e) => () => {
1319
+ ie(e);
1320
+ }, pe = (e) => {
1321
+ e.isInactive || (e.onClick(), !e.keepOpenOnClick && (j ? t() : ce()));
1322
+ }, me = (e, n, r) => {
1323
+ if (e.isDestructive) {
1324
+ let i = j ? -1 : H === r ? 0 : -1;
1325
+ return /* @__PURE__ */ m(je, {
1326
+ ref: de(r),
1327
+ label: e.label,
1328
+ subtext: e.subtext,
1329
+ holdDuration: e.holdDuration ?? 4e3,
1330
+ onClick: () => {
1331
+ e.onClick(), e.keepOpenOnClick || (j ? t() : ce());
1332
+ },
1333
+ tabIndex: i,
1334
+ onFocus: fe(r)
1335
+ }, n);
1336
+ }
1337
+ let i = j && A ? A(r) : void 0, a = j ? -1 : H === r ? 0 : -1;
1338
+ return /* @__PURE__ */ m(ke, {
1339
+ ref: de(r),
1340
+ icon: e.icon,
1341
+ label: e.label,
1342
+ subtext: e.subtext,
1343
+ onClick: () => pe(e),
1344
+ isSelected: e.isSelected,
1345
+ isInactive: e.isInactive,
1346
+ intent: e.intent,
1347
+ showToggle: e.showToggle,
1348
+ toggleValue: e.toggleValue,
1349
+ selectionStyle: e.selectionStyle,
1350
+ role: j ? "option" : void 0,
1351
+ id: i,
1352
+ ariaSelected: j ? !!e.isSelected : void 0,
1353
+ isActive: j && ee === r,
1354
+ tabIndex: a,
1355
+ onFocus: fe(r)
1356
+ }, n);
1357
+ }, he = {
1148
1358
  position: "absolute",
1149
1359
  left: 0,
1150
1360
  top: 0,
1151
- transform: `translate(${Math.round(j.x)}px, ${Math.round(j.y)}px)`,
1361
+ transform: `translate(${Math.round(z.x)}px, ${Math.round(z.y)}px)`,
1152
1362
  willChange: "transform",
1153
1363
  zIndex: 9998,
1154
- visibility: k ? "visible" : "hidden",
1155
- ...x && F.width > 0 ? { width: `${F.width + S}px` } : v ? { width: v } : {},
1156
- ...y ? { minWidth: y } : {},
1157
- ...b ? { maxWidth: b } : {}
1158
- }, H = /* @__PURE__ */ f("div", {
1159
- ref: R,
1160
- className: `${je.menuContainer} ${T ? je.closing : ""}`,
1161
- style: re,
1162
- role: "menu",
1163
- "aria-label": "Menu",
1164
- children: V.map((e, t) => /* @__PURE__ */ p(M, {
1364
+ visibility: L ? "visible" : "hidden",
1365
+ ...C && V.width > 0 ? { width: `${V.width + w}px` } : b ? { width: b } : {},
1366
+ ...x ? { minWidth: x } : {},
1367
+ ...S ? { maxWidth: S } : {}
1368
+ }, ge = 0, _e = k ?? (j ? void 0 : "Menu"), ve = /* @__PURE__ */ m("div", {
1369
+ ref: W,
1370
+ id: O,
1371
+ className: `${Pe.menuContainer} ${M ? Pe.closing : ""}`,
1372
+ style: he,
1373
+ role: D,
1374
+ "aria-label": _e,
1375
+ "aria-orientation": "vertical",
1376
+ onKeyDown: ue,
1377
+ children: se.map((e, t) => /* @__PURE__ */ h(N, {
1165
1378
  as: "div",
1166
- className: je.menuSection,
1167
- edge: t < V.length - 1 ? "bottom" : void 0,
1379
+ className: Pe.menuSection,
1380
+ edge: t < se.length - 1 ? "bottom" : void 0,
1168
1381
  elevation: "none",
1169
- children: [e.header && /* @__PURE__ */ f("div", {
1170
- className: je.sectionHeader,
1171
- children: /* @__PURE__ */ f(w, {
1382
+ role: e.header ? "group" : void 0,
1383
+ "aria-label": e.header,
1384
+ children: [e.header && /* @__PURE__ */ m("div", {
1385
+ className: Pe.sectionHeader,
1386
+ "aria-hidden": "true",
1387
+ children: /* @__PURE__ */ m(E, {
1172
1388
  variant: "text-body-small-emphasis",
1173
1389
  as: "span",
1174
- className: je.sectionLabel,
1390
+ className: Pe.sectionLabel,
1175
1391
  children: e.header
1176
1392
  })
1177
- }), e.items.map((e, t) => ne(e, t))]
1393
+ }), e.items.map((e, t) => me(e, t, ge++))]
1178
1394
  }, t))
1179
1395
  });
1180
- return C ? _(H, document.body) : H;
1396
+ return T ? y(ve, document.body) : ve;
1181
1397
  };
1182
- Ne.displayName = "Menu";
1183
- var Pe = {
1398
+ Ie.displayName = "Menu";
1399
+ var Le = {
1184
1400
  tooltip: "_tooltip_3kdaq_1",
1185
1401
  tooltipFadeIn: "_tooltipFadeIn_3kdaq_1",
1186
1402
  tooltipInner: "_tooltipInner_3kdaq_14",
1187
1403
  keyHint: "_keyHint_3kdaq_21",
1188
1404
  closing: "_closing_3kdaq_33",
1189
1405
  tooltipFadeOut: "_tooltipFadeOut_3kdaq_1"
1190
- }, Fe = 1e3, Ie = 300, Le = 200, Re = 0, ze = ({ label: t, children: n, delay: a, side: s = "top", align: u = "center", sideOffset: m = 4, alignOffset: h = 0, shortcutKey: g, shortcutKeyPosition: v = "end", usePortal: y = !0 }) => {
1191
- let b = Ae("--effect-animation-delay-medium-3", Fe), x = a ?? b, S = c(null), C = c(null), T = r((t) => {
1192
- S.current = t;
1406
+ }, Re = 1e3, ze = 300, Be = 200, Ve = 0, He = ({ label: t, children: n, delay: r, side: i = "top", align: l = "center", sideOffset: f = 4, alignOffset: g = 0, shortcutKey: _, shortcutKeyPosition: v = "end", usePortal: b = !0 }) => {
1407
+ let x = Ne("--effect-animation-delay-medium-3", Re), S = r ?? x, C = u(null), w = u(null), T = s(), D = a((t) => {
1408
+ C.current = t;
1193
1409
  let r = e.Children.only(n), i = "ref" in r ? r.ref : void 0;
1194
1410
  typeof i == "function" ? i(t) : i && typeof i == "object" && (i.current = t);
1195
- }, [n]), [E, D] = l(!1), [O, k] = l(!1), [A, j] = l(!1), [M, N] = l({
1411
+ }, [n]), [O, k] = d(!1), [ee, A] = d(!1), [j, M] = d(!1), [N, P] = d({
1196
1412
  x: 0,
1197
1413
  y: 0
1198
- }), [P, ee] = l({
1414
+ }), [F, I] = d({
1199
1415
  width: 0,
1200
1416
  height: 0
1201
- }), F = c(null), I = c(null), L = () => {
1202
- F.current &&= (clearTimeout(F.current), null);
1203
- }, R = () => {
1204
- if (L(), Date.now() - Re < Ie) {
1205
- D(!0), j(!0), k(!1);
1417
+ }), L = u(null), R = u(null), z = () => {
1418
+ L.current &&= (clearTimeout(L.current), null);
1419
+ }, te = () => {
1420
+ if (z(), Date.now() - Ve < ze) {
1421
+ k(!0), M(!0), A(!1);
1206
1422
  return;
1207
1423
  }
1208
- F.current = setTimeout(() => {
1209
- F.current = null, D(!0), j(!0), k(!1);
1210
- }, x);
1211
- }, te = () => {
1212
- L(), I.current &&= (clearTimeout(I.current), null), !(!E && !A) && (Re = Date.now(), k(!0), I.current = setTimeout(() => {
1213
- I.current = null, j(!1), D(!1), k(!1);
1214
- }, Le));
1424
+ L.current = setTimeout(() => {
1425
+ L.current = null, k(!0), M(!0), A(!1);
1426
+ }, S);
1427
+ }, B = () => {
1428
+ z(), R.current &&= (clearTimeout(R.current), null), !(!O && !j) && (Ve = Date.now(), A(!0), R.current = setTimeout(() => {
1429
+ R.current = null, M(!1), k(!1), A(!1);
1430
+ }, Be));
1215
1431
  };
1216
- i(() => () => {
1217
- L(), I.current && clearTimeout(I.current);
1432
+ o(() => () => {
1433
+ z(), R.current && clearTimeout(R.current);
1218
1434
  }, []), o(() => {
1219
- if (!A || !C.current) return;
1435
+ if (!j) return;
1436
+ let e = (e) => {
1437
+ e.key === "Escape" && B();
1438
+ };
1439
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1440
+ }, [j]), c(() => {
1441
+ if (!j || !w.current) return;
1220
1442
  let e = () => {
1221
- if (!C.current) return;
1222
- let e = C.current.getBoundingClientRect(), t = e.width || C.current.offsetWidth, n = e.height || C.current.offsetHeight;
1223
- t > 0 && n > 0 && ee({
1443
+ if (!w.current) return;
1444
+ let e = w.current.getBoundingClientRect(), t = e.width || w.current.offsetWidth, n = e.height || w.current.offsetHeight;
1445
+ t > 0 && n > 0 && I({
1224
1446
  width: t,
1225
1447
  height: n
1226
1448
  });
1227
1449
  };
1228
1450
  if (e(), requestAnimationFrame(e), typeof ResizeObserver < "u") {
1229
1451
  let t = new ResizeObserver(e);
1230
- return t.observe(C.current), () => t.disconnect();
1452
+ return t.observe(w.current), () => t.disconnect();
1231
1453
  }
1232
1454
  }, [
1233
- A,
1455
+ j,
1234
1456
  t,
1235
- g,
1457
+ _,
1236
1458
  v
1237
- ]), o(() => {
1238
- if (!A || !S.current || !C.current) return;
1459
+ ]), c(() => {
1460
+ if (!j || !C.current || !w.current) return;
1239
1461
  let e = () => {
1240
- if (!S.current || !C.current) return;
1241
- let e = S.current.getBoundingClientRect(), t = C.current.getBoundingClientRect().width || P.width || 80, n = C.current.getBoundingClientRect().height || P.height || 24, r = 0, i = 0;
1242
- switch (s) {
1462
+ if (!C.current || !w.current) return;
1463
+ let e = C.current.getBoundingClientRect(), t = w.current.getBoundingClientRect().width || F.width || 80, n = w.current.getBoundingClientRect().height || F.height || 24, r = 0, a = 0;
1464
+ switch (i) {
1243
1465
  case "top":
1244
- i = e.top - n - m, r = u === "start" ? e.left + h : u === "end" ? e.right - t + h : e.left + e.width / 2 - t / 2 + h;
1466
+ a = e.top - n - f, r = l === "start" ? e.left + g : l === "end" ? e.right - t + g : e.left + e.width / 2 - t / 2 + g;
1245
1467
  break;
1246
1468
  case "bottom":
1247
- i = e.bottom + m, r = u === "start" ? e.left + h : u === "end" ? e.right - t + h : e.left + e.width / 2 - t / 2 + h;
1469
+ a = e.bottom + f, r = l === "start" ? e.left + g : l === "end" ? e.right - t + g : e.left + e.width / 2 - t / 2 + g;
1248
1470
  break;
1249
1471
  case "left":
1250
- r = e.left - t - m, i = u === "start" ? e.top + h : u === "end" ? e.bottom - n + h : e.top + e.height / 2 - n / 2 + h;
1472
+ r = e.left - t - f, a = l === "start" ? e.top + g : l === "end" ? e.bottom - n + g : e.top + e.height / 2 - n / 2 + g;
1251
1473
  break;
1252
1474
  case "right":
1253
- r = e.right + m, i = u === "start" ? e.top + h : u === "end" ? e.bottom - n + h : e.top + e.height / 2 - n / 2 + h;
1475
+ r = e.right + f, a = l === "start" ? e.top + g : l === "end" ? e.bottom - n + g : e.top + e.height / 2 - n / 2 + g;
1254
1476
  break;
1255
1477
  }
1256
- N({
1478
+ P({
1257
1479
  x: Math.min(Math.max(r, 4), window.innerWidth - t - 4),
1258
- y: Math.min(Math.max(i, 4), window.innerHeight - n - 4)
1480
+ y: Math.min(Math.max(a, 4), window.innerHeight - n - 4)
1259
1481
  });
1260
1482
  };
1261
1483
  e(), requestAnimationFrame(() => requestAnimationFrame(e));
1262
1484
  }, [
1263
- A,
1264
- s,
1265
- u,
1266
- m,
1267
- h,
1268
- P.width,
1269
- P.height,
1485
+ j,
1486
+ i,
1487
+ l,
1488
+ f,
1489
+ g,
1490
+ F.width,
1491
+ F.height,
1270
1492
  t
1271
- ]), i(() => {
1272
- if (!A) return;
1493
+ ]), o(() => {
1494
+ if (!j) return;
1273
1495
  let e = () => {
1274
- if (!S.current || !C.current) return;
1275
- let e = S.current.getBoundingClientRect(), t = P.width || 80, n = P.height || 24, r = 0, i = 0;
1276
- switch (s) {
1496
+ if (!C.current || !w.current) return;
1497
+ let e = C.current.getBoundingClientRect(), t = F.width || 80, n = F.height || 24, r = 0, a = 0;
1498
+ switch (i) {
1277
1499
  case "top":
1278
- i = e.top - n - m, r = u === "start" ? e.left + h : u === "end" ? e.right - t + h : e.left + e.width / 2 - t / 2 + h;
1500
+ a = e.top - n - f, r = l === "start" ? e.left + g : l === "end" ? e.right - t + g : e.left + e.width / 2 - t / 2 + g;
1279
1501
  break;
1280
1502
  case "bottom":
1281
- i = e.bottom + m, r = u === "start" ? e.left + h : u === "end" ? e.right - t + h : e.left + e.width / 2 - t / 2 + h;
1503
+ a = e.bottom + f, r = l === "start" ? e.left + g : l === "end" ? e.right - t + g : e.left + e.width / 2 - t / 2 + g;
1282
1504
  break;
1283
1505
  case "left":
1284
- r = e.left - t - m, i = u === "start" ? e.top + h : u === "end" ? e.bottom - n + h : e.top + e.height / 2 - n / 2 + h;
1506
+ r = e.left - t - f, a = l === "start" ? e.top + g : l === "end" ? e.bottom - n + g : e.top + e.height / 2 - n / 2 + g;
1285
1507
  break;
1286
1508
  case "right":
1287
- r = e.right + m, i = u === "start" ? e.top + h : u === "end" ? e.bottom - n + h : e.top + e.height / 2 - n / 2 + h;
1509
+ r = e.right + f, a = l === "start" ? e.top + g : l === "end" ? e.bottom - n + g : e.top + e.height / 2 - n / 2 + g;
1288
1510
  break;
1289
1511
  }
1290
- N({
1512
+ P({
1291
1513
  x: Math.min(Math.max(r, 4), window.innerWidth - t - 4),
1292
- y: Math.min(Math.max(i, 4), window.innerHeight - n - 4)
1514
+ y: Math.min(Math.max(a, 4), window.innerHeight - n - 4)
1293
1515
  });
1294
1516
  };
1295
1517
  return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
1296
1518
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
1297
1519
  };
1298
1520
  }, [
1299
- A,
1300
- s,
1301
- u,
1302
- m,
1303
- h,
1304
- P.width,
1305
- P.height
1521
+ j,
1522
+ i,
1523
+ l,
1524
+ f,
1525
+ g,
1526
+ F.width,
1527
+ F.height
1306
1528
  ]);
1307
- let z = g ? /* @__PURE__ */ f("div", {
1308
- className: Pe.keyHint,
1529
+ let ne = _ ? /* @__PURE__ */ m("div", {
1530
+ className: Le.keyHint,
1309
1531
  "aria-hidden": !0,
1310
- children: /* @__PURE__ */ f(w, {
1532
+ children: /* @__PURE__ */ m(E, {
1311
1533
  variant: "text-caption-emphasis",
1312
1534
  as: "span",
1313
1535
  color: "primary",
1314
- children: g
1536
+ children: _
1315
1537
  })
1316
- }) : null, B = A ? /* @__PURE__ */ f("div", {
1317
- ref: C,
1318
- className: `${Pe.tooltip} ${O ? Pe.closing : ""}`,
1538
+ }) : null, V = j ? /* @__PURE__ */ m("div", {
1539
+ ref: w,
1540
+ id: T,
1541
+ className: `${Le.tooltip} ${ee ? Le.closing : ""}`,
1319
1542
  style: {
1320
1543
  position: "fixed",
1321
1544
  left: 0,
1322
1545
  top: 0,
1323
- transform: `translate(${Math.round(M.x)}px, ${Math.round(M.y)}px)`,
1546
+ transform: `translate(${Math.round(N.x)}px, ${Math.round(N.y)}px)`,
1324
1547
  willChange: "transform",
1325
1548
  zIndex: 1e4
1326
1549
  },
1327
1550
  role: "tooltip",
1328
- children: /* @__PURE__ */ p("div", {
1329
- className: Pe.tooltipInner,
1551
+ onMouseEnter: te,
1552
+ onMouseLeave: B,
1553
+ children: /* @__PURE__ */ h("div", {
1554
+ className: Le.tooltipInner,
1330
1555
  children: [
1331
- g && v === "start" && z,
1332
- /* @__PURE__ */ f(w, {
1556
+ _ && v === "start" && ne,
1557
+ /* @__PURE__ */ m(E, {
1333
1558
  variant: "text-body-small",
1334
1559
  as: "span",
1335
1560
  color: "primary",
1336
1561
  children: t
1337
1562
  }),
1338
- g && v === "end" && z
1563
+ _ && v === "end" && ne
1339
1564
  ]
1340
1565
  })
1341
- }) : null, V = e.Children.only(n);
1342
- return /* @__PURE__ */ p(d, { children: [e.isValidElement(V) ? e.cloneElement(V, {
1343
- ref: T,
1566
+ }) : null, re = e.Children.only(n), H = e.isValidElement(re) ? re : null, ie = [H?.props["aria-describedby"], j ? T : void 0].filter(Boolean).join(" ") || void 0;
1567
+ return /* @__PURE__ */ h(p, { children: [H ? e.cloneElement(H, {
1568
+ ref: D,
1569
+ "aria-describedby": ie,
1344
1570
  onMouseEnter: (e) => {
1345
- R(), V.props.onMouseEnter?.(e);
1571
+ te(), H.props.onMouseEnter?.(e);
1346
1572
  },
1347
1573
  onMouseLeave: (e) => {
1348
- te(), V.props.onMouseLeave?.(e);
1574
+ B(), H.props.onMouseLeave?.(e);
1575
+ },
1576
+ onFocus: (e) => {
1577
+ te(), H.props.onFocus?.(e);
1578
+ },
1579
+ onBlur: (e) => {
1580
+ B(), H.props.onBlur?.(e);
1349
1581
  }
1350
- }) : n, y ? _(B, document.body) : B] });
1582
+ }) : n, b ? y(V, document.body) : V] });
1351
1583
  };
1352
- ze.displayName = "Tooltip";
1353
- var Be = {
1584
+ He.displayName = "Tooltip";
1585
+ var Ue = {
1354
1586
  selectWrapper: "_selectWrapper_17kkf_1",
1355
1587
  selectButton: "_selectButton_17kkf_6",
1356
1588
  chevron: "_chevron_17kkf_26"
1357
- }, Ve = n(({ value: e, onChange: t, options: n, placeholder: r = "Select option", className: i, inactive: a = !1, id: o, chevronIcon: s }, u) => {
1358
- let [d, m] = l(!1), h = c(null), g = n.find((t) => t.value === e), _ = g?.label || r, v = n.map((n) => ({
1359
- label: n.label,
1360
- onClick: () => {
1361
- t(n.value), m(!1);
1362
- },
1363
- isSelected: n.value === e
1364
- }));
1365
- return /* @__PURE__ */ p("div", {
1366
- ref: u,
1367
- className: `${Be.selectWrapper} ${i || ""}`,
1368
- children: [/* @__PURE__ */ p(M, {
1369
- id: o,
1370
- ref: h,
1589
+ }, We = r(({ value: e, onChange: t, options: n, placeholder: r = "Select option", className: i, inactive: c = !1, id: l, chevronIcon: f, "aria-label": p, "aria-labelledby": g }, _) => {
1590
+ let [v, y] = d(!1), [b, x] = d(-1), S = u(null), C = s(), w = l ?? `select-${C}`, T = `${w}-listbox`, D = a((e) => `${w}-option-${e}`, [w]), O = n.findIndex((t) => t.value === e), k = O >= 0 ? n[O] : void 0, ee = k?.label || r, A = a((e) => {
1591
+ let r = n[e];
1592
+ r && (t(r.value), y(!1));
1593
+ }, [n, t]), j = a((e) => {
1594
+ c || n.length === 0 || (x(Math.max(0, Math.min(n.length - 1, e))), y(!0));
1595
+ }, [c, n.length]);
1596
+ o(() => {
1597
+ x(v ? (e) => e >= 0 && e < n.length ? e : O >= 0 ? O : 0 : -1);
1598
+ }, [
1599
+ v,
1600
+ n.length,
1601
+ O
1602
+ ]);
1603
+ let M = n.map((t, n) => ({
1604
+ label: t.label,
1605
+ onClick: () => A(n),
1606
+ isSelected: t.value === e
1607
+ })), P = () => {
1608
+ c || (v ? y(!1) : j(O >= 0 ? O : 0));
1609
+ }, F = (e) => {
1610
+ if (c || n.length === 0) return;
1611
+ let t = n.length - 1;
1612
+ if (!v) switch (e.key) {
1613
+ case "ArrowDown":
1614
+ case "ArrowUp":
1615
+ case "Enter":
1616
+ case " ":
1617
+ e.preventDefault(), j(O >= 0 ? O : 0);
1618
+ return;
1619
+ case "Home":
1620
+ e.preventDefault(), j(0);
1621
+ return;
1622
+ case "End":
1623
+ e.preventDefault(), j(t);
1624
+ return;
1625
+ default: return;
1626
+ }
1627
+ switch (e.key) {
1628
+ case "ArrowDown":
1629
+ e.preventDefault(), x((e) => Math.min(t, (e < 0 ? -1 : e) + 1));
1630
+ break;
1631
+ case "ArrowUp":
1632
+ e.preventDefault(), x((e) => Math.max(0, (e < 0 ? n.length : e) - 1));
1633
+ break;
1634
+ case "Home":
1635
+ e.preventDefault(), x(0);
1636
+ break;
1637
+ case "End":
1638
+ e.preventDefault(), x(t);
1639
+ break;
1640
+ case "Enter":
1641
+ case " ":
1642
+ e.preventDefault(), b >= 0 && A(b);
1643
+ break;
1644
+ case "Escape":
1645
+ e.preventDefault(), y(!1);
1646
+ break;
1647
+ case "Tab":
1648
+ y(!1);
1649
+ break;
1650
+ }
1651
+ }, I = v && b >= 0 ? D(b) : void 0;
1652
+ return /* @__PURE__ */ h("div", {
1653
+ ref: _,
1654
+ className: `${Ue.selectWrapper} ${i || ""}`,
1655
+ children: [/* @__PURE__ */ h(N, {
1656
+ id: w,
1657
+ ref: S,
1371
1658
  as: "button",
1372
1659
  type: "button",
1373
1660
  elevation: "elevated",
1374
1661
  radius: "sm",
1375
1662
  interactive: !0,
1376
- selected: d,
1377
- className: Be.selectButton,
1378
- onClick: () => {
1379
- a || m((e) => !e);
1380
- },
1381
- inactive: a,
1382
- children: [/* @__PURE__ */ f(w, {
1663
+ selected: v,
1664
+ className: Ue.selectButton,
1665
+ onClick: P,
1666
+ onKeyDown: F,
1667
+ inactive: c,
1668
+ role: "combobox",
1669
+ "aria-haspopup": "listbox",
1670
+ "aria-expanded": v,
1671
+ "aria-controls": v ? T : void 0,
1672
+ "aria-activedescendant": I,
1673
+ "aria-label": p,
1674
+ "aria-labelledby": g,
1675
+ children: [/* @__PURE__ */ m(E, {
1383
1676
  variant: "text-body-medium",
1384
1677
  as: "span",
1385
- color: g ? "primary" : "secondary",
1386
- children: _
1387
- }), s && /* @__PURE__ */ f("span", {
1388
- className: Be.chevron,
1389
- children: /* @__PURE__ */ f(s, { size: 16 })
1678
+ color: k ? "primary" : "secondary",
1679
+ children: ee
1680
+ }), f && /* @__PURE__ */ m("span", {
1681
+ className: Ue.chevron,
1682
+ children: /* @__PURE__ */ m(f, { size: 16 })
1390
1683
  })]
1391
- }), /* @__PURE__ */ f(Ne, {
1392
- isOpen: d,
1393
- onClose: () => m(!1),
1394
- anchorRef: h,
1395
- items: v,
1684
+ }), /* @__PURE__ */ m(Ie, {
1685
+ isOpen: v,
1686
+ onClose: () => y(!1),
1687
+ anchorRef: S,
1688
+ items: M,
1396
1689
  side: "bottom",
1397
1690
  align: "start",
1398
1691
  sideOffset: 4,
1399
1692
  alignOffset: -4,
1400
1693
  matchAnchorWidth: !0,
1401
- matchAnchorWidthOffset: 8
1694
+ matchAnchorWidthOffset: 8,
1695
+ role: "listbox",
1696
+ id: T,
1697
+ activeIndex: b,
1698
+ getOptionId: D
1402
1699
  })]
1403
1700
  });
1404
1701
  });
1405
- Ve.displayName = "Select";
1406
- var Y = {
1407
- bannerWrapper: "_bannerWrapper_xz2oj_1",
1408
- banner: "_banner_xz2oj_1",
1409
- bannerHeaderSurface: "_bannerHeaderSurface_xz2oj_10",
1410
- bannerHeader: "_bannerHeader_xz2oj_10",
1411
- bannerBody: "_bannerBody_xz2oj_30",
1412
- message: "_message_xz2oj_35",
1413
- floatingPosition: "_floatingPosition_xz2oj_41",
1414
- floatingToast: "_floatingToast_xz2oj_49",
1415
- toastFadeIn: "_toastFadeIn_xz2oj_1",
1416
- closing: "_closing_xz2oj_55",
1417
- toastFadeOut: "_toastFadeOut_xz2oj_1"
1418
- }, He = 4e3, Ue = 200, We = (e, t) => t === "bold" ? "var(--color-foreground-on-bold-background-primary)" : `var(--color-foreground-${t === "faint" ? "bold" : t === "medium" ? "strong" : "medium"}-${e})`, Ge = ({ intent: e, contrast: t, message: n, header: a = !1, className: o = "", floating: s = !1, onDismiss: u }) => {
1419
- let d = Ae("--effect-animation-delay-long-2", He), m = We(e, t), [h, g] = l(!1), v = c(null), y = c(null), b = r(() => {
1420
- v.current && clearTimeout(v.current), y.current && clearTimeout(y.current), v.current = setTimeout(() => {
1421
- v.current = null, g(!0), y.current = setTimeout(() => {
1422
- y.current = null, u?.();
1423
- }, Ue);
1424
- }, d);
1425
- }, [u, d]);
1426
- i(() => (s && n && b(), () => {
1427
- v.current && clearTimeout(v.current), y.current && clearTimeout(y.current);
1702
+ We.displayName = "Select";
1703
+ var Z = {
1704
+ bannerWrapper: "_bannerWrapper_1vv8f_1",
1705
+ banner: "_banner_1vv8f_1",
1706
+ bannerHeaderSurface: "_bannerHeaderSurface_1vv8f_10",
1707
+ bannerHeader: "_bannerHeader_1vv8f_10",
1708
+ bannerBody: "_bannerBody_1vv8f_30",
1709
+ message: "_message_1vv8f_38",
1710
+ dismiss: "_dismiss_1vv8f_46",
1711
+ floatingPosition: "_floatingPosition_1vv8f_79",
1712
+ floatingToast: "_floatingToast_1vv8f_87",
1713
+ toastFadeIn: "_toastFadeIn_1vv8f_1",
1714
+ closing: "_closing_1vv8f_93",
1715
+ toastFadeOut: "_toastFadeOut_1vv8f_1"
1716
+ }, Ge = 4e3, Ke = 200, qe = (e, t) => t === "bold" ? "var(--color-foreground-on-bold-background-primary)" : `var(--color-foreground-${t === "faint" ? "bold" : t === "medium" ? "strong" : "medium"}-${e})`, Je = ({ intent: e, contrast: t, message: n, header: r = !1, className: i = "", floating: s = !1, onDismiss: c, dismissLabel: l = "Dismiss" }) => {
1717
+ let f = Ne("--effect-animation-delay-long-2", Ge), p = qe(e, t), [g, v] = d(!1), b = u(null), x = u(null), S = a(() => {
1718
+ b.current && clearTimeout(b.current), x.current && clearTimeout(x.current), b.current = null, s ? (v(!0), x.current = setTimeout(() => {
1719
+ x.current = null, c?.();
1720
+ }, Ke)) : c?.();
1721
+ }, [s, c]), C = a(() => {
1722
+ b.current && clearTimeout(b.current), b.current = setTimeout(() => {
1723
+ b.current = null, S();
1724
+ }, f);
1725
+ }, [S, f]);
1726
+ o(() => (s && n && C(), () => {
1727
+ b.current && clearTimeout(b.current), x.current && clearTimeout(x.current);
1428
1728
  }), [
1429
1729
  s,
1430
1730
  n,
1431
- b
1731
+ C
1432
1732
  ]);
1433
- let x = /* @__PURE__ */ f("div", {
1434
- className: `${Y.bannerWrapper} ${o}`.trim(),
1435
- style: { "--banner-content": m },
1436
- children: /* @__PURE__ */ p(M, {
1733
+ let w = e === "negative", T = w ? "alert" : "status", D = w ? void 0 : "polite", O = /* @__PURE__ */ m("div", {
1734
+ className: `${Z.bannerWrapper} ${i}`.trim(),
1735
+ style: { "--banner-content": p },
1736
+ role: T,
1737
+ "aria-live": D,
1738
+ children: /* @__PURE__ */ h(N, {
1437
1739
  elevation: s ? "floating" : "elevated",
1438
1740
  intent: e,
1439
1741
  contrast: t,
1440
1742
  radius: "sm",
1441
- className: Y.banner,
1442
- children: [a && /* @__PURE__ */ f("div", {
1443
- className: Y.bannerHeaderSurface,
1444
- children: /* @__PURE__ */ f("div", {
1445
- className: Y.bannerHeader,
1743
+ className: Z.banner,
1744
+ children: [r && /* @__PURE__ */ m("div", {
1745
+ className: Z.bannerHeaderSurface,
1746
+ children: /* @__PURE__ */ m("div", {
1747
+ className: Z.bannerHeader,
1446
1748
  "aria-hidden": !0
1447
1749
  })
1448
- }), /* @__PURE__ */ f("div", {
1449
- className: Y.bannerBody,
1450
- children: /* @__PURE__ */ f(w, {
1750
+ }), /* @__PURE__ */ h("div", {
1751
+ className: Z.bannerBody,
1752
+ children: [/* @__PURE__ */ m(E, {
1451
1753
  variant: "text-body-medium",
1452
1754
  as: "span",
1453
- className: Y.message,
1755
+ className: Z.message,
1454
1756
  children: n
1455
- })
1757
+ }), c && /* @__PURE__ */ m("button", {
1758
+ type: "button",
1759
+ className: Z.dismiss,
1760
+ onClick: S,
1761
+ "aria-label": l,
1762
+ children: /* @__PURE__ */ m(_, { size: 16 })
1763
+ })]
1456
1764
  })]
1457
1765
  })
1458
1766
  });
1459
- return s ? _(/* @__PURE__ */ f("div", {
1460
- className: Y.floatingPosition,
1767
+ return s ? y(/* @__PURE__ */ m("div", {
1768
+ className: Z.floatingPosition,
1461
1769
  style: { zIndex: 9998 },
1462
- children: /* @__PURE__ */ f("div", {
1463
- className: `${Y.floatingToast} ${h ? Y.closing : ""}`,
1464
- children: x
1770
+ children: /* @__PURE__ */ m("div", {
1771
+ className: `${Z.floatingToast} ${g ? Z.closing : ""}`,
1772
+ children: O
1465
1773
  })
1466
- }), document.body) : x;
1774
+ }), document.body) : O;
1467
1775
  };
1468
- Ge.displayName = "Banner";
1469
- var X = {
1470
- tableWrapper: "_tableWrapper_1xqt4_1",
1471
- tableScroll: "_tableScroll_1xqt4_9",
1472
- table: "_table_1xqt4_1",
1473
- headerRow: "_headerRow_1xqt4_20",
1474
- headerCell: "_headerCell_1xqt4_24",
1475
- sortable: "_sortable_1xqt4_38",
1476
- sortIndicator: "_sortIndicator_1xqt4_46",
1477
- row: "_row_1xqt4_51",
1478
- cell: "_cell_1xqt4_55",
1479
- rowSelected: "_rowSelected_1xqt4_59",
1480
- rowClickable: "_rowClickable_1xqt4_63",
1481
- alignRight: "_alignRight_1xqt4_77",
1482
- alignCenter: "_alignCenter_1xqt4_78",
1483
- emptyRow: "_emptyRow_1xqt4_80",
1484
- skeleton: "_skeleton_1xqt4_88",
1485
- shimmer: "_shimmer_1xqt4_1",
1486
- pagination: "_pagination_1xqt4_102",
1487
- pageButton: "_pageButton_1xqt4_112"
1776
+ Je.displayName = "Banner";
1777
+ var Q = {
1778
+ tableWrapper: "_tableWrapper_b4sqy_1",
1779
+ tableScroll: "_tableScroll_b4sqy_9",
1780
+ table: "_table_b4sqy_1",
1781
+ headerRow: "_headerRow_b4sqy_20",
1782
+ headerCell: "_headerCell_b4sqy_24",
1783
+ sortable: "_sortable_b4sqy_38",
1784
+ sortIndicator: "_sortIndicator_b4sqy_51",
1785
+ row: "_row_b4sqy_56",
1786
+ cell: "_cell_b4sqy_60",
1787
+ rowSelected: "_rowSelected_b4sqy_64",
1788
+ rowClickable: "_rowClickable_b4sqy_68",
1789
+ alignRight: "_alignRight_b4sqy_87",
1790
+ alignCenter: "_alignCenter_b4sqy_88",
1791
+ emptyRow: "_emptyRow_b4sqy_90",
1792
+ skeleton: "_skeleton_b4sqy_98",
1793
+ shimmer: "_shimmer_b4sqy_1",
1794
+ pagination: "_pagination_b4sqy_112",
1795
+ pageButton: "_pageButton_b4sqy_122"
1488
1796
  };
1489
1797
  //#endregion
1490
1798
  //#region src/components/Table/Table.tsx
1491
- function Ke(e, t) {
1799
+ function Ye(e, t) {
1492
1800
  if (e.accessorKey) return t[e.accessorKey];
1493
1801
  if (e.accessor) return e.accessor(t);
1494
1802
  }
1495
- function qe(e, t, n) {
1803
+ function Xe(e, t, n) {
1496
1804
  let r = n === "asc" ? 1 : -1;
1497
1805
  return e == null && t == null ? 0 : e == null ? r : t == null ? -r : typeof e == "number" && typeof t == "number" ? (e - t) * r : String(e).localeCompare(String(t)) * r;
1498
1806
  }
1499
- function Je({ columns: e, data: t, sortState: n, onSort: r, className: i, onRowClick: a, selectedRows: o, loading: c = !1, pagination: l, onPaginationChange: u, emptyMessage: d = "No results found." }) {
1500
- let m = s(() => e.filter((e) => !e.hide), [e]), h = s(() => m.map((e) => e.width ? typeof e.width == "number" ? `${e.width}px` : e.width : "minmax(120px, 1fr)").join(" "), [m]), g = s(() => {
1807
+ function Ze({ columns: e, data: t, sortState: n, onSort: r, className: i, onRowClick: a, selectedRows: o, loading: s = !1, pagination: c, onPaginationChange: u, emptyMessage: d = "No results found." }) {
1808
+ let f = l(() => e.filter((e) => !e.hide), [e]), p = l(() => f.map((e) => e.width ? typeof e.width == "number" ? `${e.width}px` : e.width : "minmax(120px, 1fr)").join(" "), [f]), g = l(() => {
1501
1809
  if (!n) return t;
1502
1810
  let r = e.find((e) => e.id === n.columnId);
1503
- return r ? [...t].sort((e, t) => qe(Ke(r, e), Ke(r, t), n.direction)) : t;
1811
+ return r ? [...t].sort((e, t) => Xe(Ye(r, e), Ye(r, t), n.direction)) : t;
1504
1812
  }, [
1505
1813
  t,
1506
1814
  e,
1507
1815
  n
1508
- ]), _ = s(() => {
1509
- if (!l) return g;
1510
- let e = l.pageIndex * l.pageSize;
1511
- return g.slice(e, e + l.pageSize);
1512
- }, [g, l]), v = l ? Math.ceil(g.length / l.pageSize) : 1, y = !c && _.length === 0, b = (e) => {
1816
+ ]), _ = l(() => {
1817
+ if (!c) return g;
1818
+ let e = c.pageIndex * c.pageSize;
1819
+ return g.slice(e, e + c.pageSize);
1820
+ }, [g, c]), v = c ? Math.ceil(g.length / c.pageSize) : 1, y = !s && _.length === 0, b = (e) => {
1513
1821
  r && r(e);
1514
1822
  };
1515
- return /* @__PURE__ */ p("div", {
1516
- className: P(X.tableWrapper, i),
1517
- children: [/* @__PURE__ */ f("div", {
1518
- className: X.tableScroll,
1519
- children: /* @__PURE__ */ p("div", {
1520
- className: X.table,
1521
- style: { gridTemplateColumns: h },
1823
+ return /* @__PURE__ */ h("div", {
1824
+ className: F(Q.tableWrapper, i),
1825
+ "aria-busy": s || void 0,
1826
+ children: [/* @__PURE__ */ m("div", {
1827
+ className: Q.tableScroll,
1828
+ children: /* @__PURE__ */ h("div", {
1829
+ className: Q.table,
1830
+ style: { gridTemplateColumns: p },
1522
1831
  role: "table",
1523
1832
  children: [
1524
- /* @__PURE__ */ f("div", {
1525
- className: X.headerRow,
1833
+ /* @__PURE__ */ m("div", {
1834
+ className: Q.headerRow,
1526
1835
  role: "row",
1527
- children: m.map((e) => /* @__PURE__ */ p("div", {
1528
- className: P(X.headerCell, e.sortable && X.sortable, e.align === "right" && X.alignRight, e.align === "center" && X.alignCenter),
1529
- role: "columnheader",
1530
- onClick: () => e.sortable && b(e.id),
1531
- style: e.minWidth ? { minWidth: typeof e.minWidth == "number" ? `${e.minWidth}px` : e.minWidth } : void 0,
1532
- children: [typeof e.header == "string" ? /* @__PURE__ */ f(w, {
1533
- variant: "text-body-small-emphasis",
1534
- as: "span",
1535
- color: "secondary",
1536
- children: e.header
1537
- }) : e.header, n?.columnId === e.id && /* @__PURE__ */ f("span", {
1538
- className: X.sortIndicator,
1539
- "aria-hidden": !0,
1540
- children: n.direction === "asc" ? "↑" : "↓"
1541
- })]
1542
- }, e.id))
1836
+ children: f.map((e) => {
1837
+ let t = n?.columnId === e.id, r = e.sortable ? t ? n.direction === "asc" ? "ascending" : "descending" : "none" : void 0, i = () => e.sortable && b(e.id);
1838
+ return /* @__PURE__ */ h("div", {
1839
+ className: F(Q.headerCell, e.sortable && Q.sortable, e.align === "right" && Q.alignRight, e.align === "center" && Q.alignCenter),
1840
+ role: "columnheader",
1841
+ "aria-sort": r,
1842
+ tabIndex: e.sortable ? 0 : void 0,
1843
+ onClick: i,
1844
+ onKeyDown: e.sortable ? (e) => {
1845
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i());
1846
+ } : void 0,
1847
+ style: e.minWidth ? { minWidth: typeof e.minWidth == "number" ? `${e.minWidth}px` : e.minWidth } : void 0,
1848
+ children: [typeof e.header == "string" ? /* @__PURE__ */ m(E, {
1849
+ variant: "text-body-small-emphasis",
1850
+ as: "span",
1851
+ color: "secondary",
1852
+ children: e.header
1853
+ }) : e.header, t && /* @__PURE__ */ m("span", {
1854
+ className: Q.sortIndicator,
1855
+ "aria-hidden": !0,
1856
+ children: n.direction === "asc" ? "↑" : "↓"
1857
+ })]
1858
+ }, e.id);
1859
+ })
1543
1860
  }),
1544
- c && Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ f("div", {
1545
- className: X.row,
1546
- role: "row",
1547
- children: m.map((e) => /* @__PURE__ */ f("div", {
1548
- className: X.cell,
1861
+ s && Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ m("div", {
1862
+ className: Q.row,
1863
+ role: t === 0 ? "status" : "row",
1864
+ "aria-label": t === 0 ? "Loading" : void 0,
1865
+ children: f.map((e) => /* @__PURE__ */ m("div", {
1866
+ className: Q.cell,
1549
1867
  role: "cell",
1550
- children: /* @__PURE__ */ f("div", { className: X.skeleton })
1868
+ children: /* @__PURE__ */ m("div", { className: Q.skeleton })
1551
1869
  }, e.id))
1552
1870
  }, `skeleton-${t}`)),
1553
- y && /* @__PURE__ */ f("div", {
1554
- className: X.emptyRow,
1871
+ y && /* @__PURE__ */ m("div", {
1872
+ className: Q.emptyRow,
1555
1873
  style: { gridColumn: "1 / -1" },
1556
- children: /* @__PURE__ */ f(w, {
1874
+ children: /* @__PURE__ */ m(E, {
1557
1875
  variant: "text-body-medium",
1558
1876
  as: "p",
1559
1877
  color: "secondary",
1560
1878
  children: d
1561
1879
  })
1562
1880
  }),
1563
- !c && _.map((e, t) => {
1564
- let n = o?.has(t);
1565
- return /* @__PURE__ */ f("div", {
1566
- className: P(X.row, n && X.rowSelected, a && X.rowClickable),
1881
+ !s && _.map((e, t) => {
1882
+ let n = o?.has(t), r = !!a;
1883
+ return /* @__PURE__ */ m("div", {
1884
+ className: F(Q.row, n && Q.rowSelected, r && Q.rowClickable),
1567
1885
  role: "row",
1886
+ tabIndex: r ? 0 : void 0,
1887
+ "aria-selected": o ? !!n : void 0,
1568
1888
  onClick: () => a?.(e, t),
1569
- children: m.map((n) => /* @__PURE__ */ f("div", {
1570
- className: P(X.cell, n.align === "right" && X.alignRight, n.align === "center" && X.alignCenter),
1889
+ onKeyDown: r ? (n) => {
1890
+ (n.key === "Enter" || n.key === " ") && (n.preventDefault(), a?.(e, t));
1891
+ } : void 0,
1892
+ children: f.map((n) => /* @__PURE__ */ m("div", {
1893
+ className: F(Q.cell, n.align === "right" && Q.alignRight, n.align === "center" && Q.alignCenter),
1571
1894
  role: "cell",
1572
- children: n.renderCell ? n.renderCell(e, t) : /* @__PURE__ */ f(w, {
1895
+ children: n.renderCell ? n.renderCell(e, t) : /* @__PURE__ */ m(E, {
1573
1896
  variant: "text-body-medium",
1574
1897
  as: "span",
1575
1898
  lineTruncation: 1,
1576
- children: String(Ke(n, e) ?? "")
1899
+ children: String(Ye(n, e) ?? "")
1577
1900
  })
1578
1901
  }, n.id))
1579
1902
  }, t);
1580
1903
  })
1581
1904
  ]
1582
1905
  })
1583
- }), l && u && v > 1 && /* @__PURE__ */ p("div", {
1584
- className: X.pagination,
1906
+ }), c && u && v > 1 && /* @__PURE__ */ h("div", {
1907
+ className: Q.pagination,
1585
1908
  children: [
1586
- /* @__PURE__ */ f("button", {
1587
- className: X.pageButton,
1588
- disabled: l.pageIndex === 0,
1589
- onClick: () => u(l.pageIndex - 1, l.pageSize),
1909
+ /* @__PURE__ */ m("button", {
1910
+ className: Q.pageButton,
1911
+ disabled: c.pageIndex === 0,
1912
+ onClick: () => u(c.pageIndex - 1, c.pageSize),
1590
1913
  type: "button",
1591
- children: /* @__PURE__ */ f(w, {
1914
+ children: /* @__PURE__ */ m(E, {
1592
1915
  variant: "text-body-small",
1593
1916
  as: "span",
1594
1917
  children: "Previous"
1595
1918
  })
1596
1919
  }),
1597
- /* @__PURE__ */ f(w, {
1920
+ /* @__PURE__ */ m(E, {
1598
1921
  variant: "text-body-small",
1599
1922
  as: "span",
1600
1923
  color: "secondary",
1601
- children: `Page ${l.pageIndex + 1} of ${v}`
1924
+ children: `Page ${c.pageIndex + 1} of ${v}`
1602
1925
  }),
1603
- /* @__PURE__ */ f("button", {
1604
- className: X.pageButton,
1605
- disabled: l.pageIndex >= v - 1,
1606
- onClick: () => u(l.pageIndex + 1, l.pageSize),
1926
+ /* @__PURE__ */ m("button", {
1927
+ className: Q.pageButton,
1928
+ disabled: c.pageIndex >= v - 1,
1929
+ onClick: () => u(c.pageIndex + 1, c.pageSize),
1607
1930
  type: "button",
1608
- children: /* @__PURE__ */ f(w, {
1931
+ children: /* @__PURE__ */ m(E, {
1609
1932
  variant: "text-body-small",
1610
1933
  as: "span",
1611
1934
  children: "Next"
@@ -1615,62 +1938,68 @@ function Je({ columns: e, data: t, sortState: n, onSort: r, className: i, onRowC
1615
1938
  })]
1616
1939
  });
1617
1940
  }
1618
- Je.displayName = "Table";
1619
- var Ye = {
1941
+ Ze.displayName = "Table";
1942
+ var Qe = {
1620
1943
  tab: "_tab_7ngwl_5",
1621
1944
  tabSelected: "_tabSelected_7ngwl_33",
1622
1945
  onMedium: "_onMedium_7ngwl_39",
1623
1946
  onBold: "_onBold_7ngwl_44",
1624
1947
  onStrong: "_onStrong_7ngwl_52",
1625
1948
  onAlwaysDark: "_onAlwaysDark_7ngwl_60"
1626
- }, Xe = n(({ id: e, label: t, isSelected: n = !1, background: r, onClick: i, className: a }, o) => {
1627
- let s = r && r !== "faint" ? Ye[r === "always-dark" ? "onAlwaysDark" : `on${r.charAt(0).toUpperCase() + r.slice(1)}`] : void 0;
1628
- return /* @__PURE__ */ f("button", {
1629
- ref: o,
1949
+ }, $e = r(({ id: e, controls: t, label: n, isSelected: r = !1, disabled: i = !1, background: a, onClick: o, onKeyDown: s, onFocus: c, tabIndex: l, className: u }, d) => {
1950
+ let f = a && a !== "faint" ? Qe[a === "always-dark" ? "onAlwaysDark" : `on${a.charAt(0).toUpperCase() + a.slice(1)}`] : void 0, p = l ?? (r ? 0 : -1);
1951
+ return /* @__PURE__ */ m("button", {
1952
+ ref: d,
1630
1953
  id: e,
1631
- className: P(Ye.tab, n && Ye.tabSelected, s, a),
1632
- onClick: i,
1954
+ className: F(Qe.tab, r && Qe.tabSelected, f, u),
1955
+ onClick: o,
1956
+ onKeyDown: s,
1957
+ onFocus: c,
1633
1958
  type: "button",
1634
- "aria-selected": n,
1635
1959
  role: "tab",
1636
- children: /* @__PURE__ */ f(w, {
1637
- variant: n ? "text-body-medium-emphasis" : "text-body-medium",
1960
+ "aria-selected": r,
1961
+ "aria-controls": t,
1962
+ "aria-disabled": i || void 0,
1963
+ disabled: i,
1964
+ tabIndex: p,
1965
+ children: /* @__PURE__ */ m(E, {
1966
+ variant: r ? "text-body-medium-emphasis" : "text-body-medium",
1638
1967
  as: "span",
1639
- children: t
1968
+ children: n
1640
1969
  })
1641
1970
  });
1642
1971
  });
1643
- Xe.displayName = "Tab";
1644
- var Ze = { emptyState: "_emptyState_1988v_1" }, Qe = {
1972
+ $e.displayName = "Tab";
1973
+ var et = { emptyState: "_emptyState_1988v_1" }, tt = {
1645
1974
  "no-content": "No page contents to display.",
1646
1975
  "no-results": "No results found.",
1647
1976
  "no-results-filter": "No results found. Please update search criteria.",
1648
1977
  "no-access": "You don't have access to this page."
1649
- }, $e = n(({ type: e = "no-content", message: t, className: n }, r) => /* @__PURE__ */ f("div", {
1978
+ }, nt = r(({ type: e = "no-content", message: t, className: n }, r) => /* @__PURE__ */ m("div", {
1650
1979
  ref: r,
1651
- className: P(Ze.emptyState, n),
1652
- children: /* @__PURE__ */ f(w, {
1980
+ className: F(et.emptyState, n),
1981
+ children: /* @__PURE__ */ m(E, {
1653
1982
  variant: "text-body-medium",
1654
1983
  as: "p",
1655
1984
  color: "secondary",
1656
- children: t || Qe[e]
1985
+ children: t || tt[e]
1657
1986
  })
1658
1987
  }));
1659
- $e.displayName = "EmptyState";
1660
- var et = {
1988
+ nt.displayName = "EmptyState";
1989
+ var rt = {
1661
1990
  fade: "_fade_8nnao_1",
1662
1991
  fadeTop: "_fadeTop_8nnao_13",
1663
1992
  fadeBottom: "_fadeBottom_8nnao_18",
1664
1993
  fadeLeft: "_fadeLeft_8nnao_23",
1665
1994
  fadeRight: "_fadeRight_8nnao_28"
1666
- }, tt = {
1995
+ }, it = {
1667
1996
  top: "fadeTop",
1668
1997
  bottom: "fadeBottom",
1669
1998
  left: "fadeLeft",
1670
1999
  right: "fadeRight"
1671
- }, nt = n(({ side: e, height: t, background: n = "var(--color-background-secondary)", className: r, style: i = {} }, a) => /* @__PURE__ */ f("div", {
2000
+ }, at = r(({ side: e, height: t, background: n = "var(--color-background-secondary)", className: r, style: i = {} }, a) => /* @__PURE__ */ m("div", {
1672
2001
  ref: a,
1673
- className: P(et.fade, et[tt[e]], r),
2002
+ className: F(rt.fade, rt[it[e]], r),
1674
2003
  style: {
1675
2004
  ...i,
1676
2005
  height: t,
@@ -1678,22 +2007,22 @@ var et = {
1678
2007
  },
1679
2008
  "aria-hidden": "true"
1680
2009
  }));
1681
- nt.displayName = "Fade";
1682
- var rt = {
1683
- container: "_container_153sa_1",
1684
- content: "_content_153sa_8",
1685
- track: "_track_153sa_20",
1686
- thumb: "_thumb_153sa_35",
1687
- trackHorizontal: "_trackHorizontal_153sa_49",
1688
- thumbHorizontal: "_thumbHorizontal_153sa_64",
1689
- thick: "_thick_153sa_78"
1690
- }, it = ({ children: e, className: t, variant: n = "default", showTrackOnHover: a = !0, onScroll: o, fadeOverlay: s, contentRef: u }) => {
1691
- let d = c(null), m = c(null), h = u || m, g = c(null), _ = c(null), [v, y] = l(0), [b, x] = l(0), [S, C] = l(0), [w, T] = l(0), [E, D] = l(!1), [O, k] = l(!1), [A, j] = l(!1), M = c(0), N = c(0), ee = c(0), F = c(0), I = r(() => {
1692
- a && j(!0);
1693
- }, [a]), L = r(() => {
1694
- j(!1);
1695
- }, []), R = r(() => {
1696
- let e = d.current, t = h.current;
2010
+ at.displayName = "Fade";
2011
+ var ot = {
2012
+ container: "_container_1pmuk_1",
2013
+ content: "_content_1pmuk_8",
2014
+ track: "_track_1pmuk_25",
2015
+ thumb: "_thumb_1pmuk_40",
2016
+ trackHorizontal: "_trackHorizontal_1pmuk_54",
2017
+ thumbHorizontal: "_thumbHorizontal_1pmuk_69",
2018
+ thick: "_thick_1pmuk_83"
2019
+ }, st = ({ children: e, className: t, variant: n = "default", showTrackOnHover: r = !0, onScroll: i, fadeOverlay: s, contentRef: c }) => {
2020
+ let l = u(null), f = u(null), p = c || f, g = u(null), _ = u(null), [v, y] = d(0), [b, x] = d(0), [S, C] = d(0), [w, T] = d(0), [E, D] = d(!1), [O, k] = d(!1), [ee, A] = d(!1), j = u(0), M = u(0), N = u(0), P = u(0), I = a(() => {
2021
+ r && A(!0);
2022
+ }, [r]), L = a(() => {
2023
+ A(!1);
2024
+ }, []), R = a(() => {
2025
+ let e = l.current, t = p.current;
1697
2026
  if (!e || !t) return;
1698
2027
  let n = e.clientHeight, r = e.clientWidth, i = t.scrollHeight, a = t.scrollWidth, o = t.scrollTop, s = t.scrollLeft;
1699
2028
  if (i <= n) y(0);
@@ -1706,20 +2035,20 @@ var rt = {
1706
2035
  let e = r / a, t = Math.max(20, r * e);
1707
2036
  C(t), T(s / (a - r) * (r - t));
1708
2037
  }
1709
- }, [h]);
1710
- i(() => {
1711
- let e = h.current;
2038
+ }, [p]);
2039
+ o(() => {
2040
+ let e = p.current;
1712
2041
  if (!e) return;
1713
2042
  let t = (e) => {
1714
- R(), o && o(e);
2043
+ R(), i && i(e);
1715
2044
  };
1716
2045
  return e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
1717
2046
  }, [
1718
2047
  R,
1719
- o,
1720
- h
1721
- ]), i(() => {
1722
- let e = h.current;
2048
+ i,
2049
+ p
2050
+ ]), o(() => {
2051
+ let e = p.current;
1723
2052
  if (!e) return;
1724
2053
  let t = () => R();
1725
2054
  if (window.addEventListener("resize", t), typeof ResizeObserver < "u") {
@@ -1729,84 +2058,87 @@ var rt = {
1729
2058
  };
1730
2059
  }
1731
2060
  return () => window.removeEventListener("resize", t);
1732
- }, [R, h]), i(() => {
2061
+ }, [R, p]), o(() => {
1733
2062
  R();
1734
2063
  }, [R, e]);
1735
- let te = r((e) => {
2064
+ let z = a((e) => {
1736
2065
  e.preventDefault(), e.stopPropagation();
1737
- let t = h.current;
2066
+ let t = p.current;
1738
2067
  if (!t) return;
1739
- D(!0), M.current = e.clientY, N.current = t.scrollTop;
2068
+ D(!0), j.current = e.clientY, M.current = t.scrollTop;
1740
2069
  let n = (e) => {
1741
- let n = d.current;
2070
+ let n = l.current;
1742
2071
  if (!n || !t) return;
1743
- let r = e.clientY - M.current, i = t.scrollHeight - n.clientHeight, a = i / (n.clientHeight - v);
1744
- t.scrollTop = Math.max(0, Math.min(i, N.current + r * a));
2072
+ let r = e.clientY - j.current, i = t.scrollHeight - n.clientHeight, a = i / (n.clientHeight - v);
2073
+ t.scrollTop = Math.max(0, Math.min(i, M.current + r * a));
1745
2074
  }, r = () => {
1746
2075
  D(!1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r);
1747
2076
  };
1748
2077
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", r);
1749
- }, [v, h]), z = r((e) => {
2078
+ }, [v, p]), te = a((e) => {
1750
2079
  e.preventDefault(), e.stopPropagation();
1751
- let t = h.current;
2080
+ let t = p.current;
1752
2081
  if (!t) return;
1753
- k(!0), ee.current = e.clientX, F.current = t.scrollLeft;
2082
+ k(!0), N.current = e.clientX, P.current = t.scrollLeft;
1754
2083
  let n = (e) => {
1755
- let n = d.current;
2084
+ let n = l.current;
1756
2085
  if (!n || !t) return;
1757
- let r = e.clientX - ee.current, i = t.scrollWidth - n.clientWidth, a = i / (n.clientWidth - S);
1758
- t.scrollLeft = Math.max(0, Math.min(i, F.current + r * a));
2086
+ let r = e.clientX - N.current, i = t.scrollWidth - n.clientWidth, a = i / (n.clientWidth - S);
2087
+ t.scrollLeft = Math.max(0, Math.min(i, P.current + r * a));
1759
2088
  }, r = () => {
1760
2089
  k(!1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r);
1761
2090
  };
1762
2091
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", r);
1763
- }, [S, h]), B = v > 0, V = S > 0, ne = a && (A || E || O);
1764
- return /* @__PURE__ */ p("div", {
1765
- ref: d,
1766
- className: P(rt.container, n === "thick" && rt.thick, t),
2092
+ }, [S, p]), B = v > 0, ne = S > 0, V = r && (ee || E || O), re = B || ne;
2093
+ return /* @__PURE__ */ h("div", {
2094
+ ref: l,
2095
+ className: F(ot.container, n === "thick" && ot.thick, t),
1767
2096
  onMouseEnter: I,
1768
2097
  onMouseLeave: L,
1769
2098
  "data-dragging": E || O,
1770
- "data-show-track": ne ? "true" : "false",
2099
+ "data-show-track": V ? "true" : "false",
1771
2100
  children: [
1772
- /* @__PURE__ */ f("div", {
1773
- ref: h,
1774
- className: rt.content,
2101
+ /* @__PURE__ */ m("div", {
2102
+ ref: p,
2103
+ className: ot.content,
2104
+ tabIndex: re ? 0 : void 0,
1775
2105
  children: e
1776
2106
  }),
1777
2107
  s,
1778
- B && /* @__PURE__ */ f("div", {
1779
- className: rt.track,
1780
- children: /* @__PURE__ */ f("div", {
2108
+ B && /* @__PURE__ */ m("div", {
2109
+ className: ot.track,
2110
+ "aria-hidden": "true",
2111
+ children: /* @__PURE__ */ m("div", {
1781
2112
  ref: g,
1782
- className: rt.thumb,
2113
+ className: ot.thumb,
1783
2114
  style: {
1784
2115
  height: `${v}px`,
1785
2116
  top: `${b}px`
1786
2117
  },
1787
- onMouseDown: te
2118
+ onMouseDown: z
1788
2119
  })
1789
2120
  }),
1790
- V && /* @__PURE__ */ f("div", {
1791
- className: rt.trackHorizontal,
1792
- children: /* @__PURE__ */ f("div", {
2121
+ ne && /* @__PURE__ */ m("div", {
2122
+ className: ot.trackHorizontal,
2123
+ "aria-hidden": "true",
2124
+ children: /* @__PURE__ */ m("div", {
1793
2125
  ref: _,
1794
- className: rt.thumbHorizontal,
2126
+ className: ot.thumbHorizontal,
1795
2127
  style: {
1796
2128
  width: `${S}px`,
1797
2129
  left: `${w}px`
1798
2130
  },
1799
- onMouseDown: z
2131
+ onMouseDown: te
1800
2132
  })
1801
2133
  })
1802
2134
  ]
1803
2135
  });
1804
2136
  };
1805
- it.displayName = "Scrollbar";
1806
- var at = {
2137
+ st.displayName = "Scrollbar";
2138
+ var ct = {
1807
2139
  errorBoundary: "_errorBoundary_1avvb_1",
1808
2140
  errorDetails: "_errorDetails_1avvb_11"
1809
- }, ot = class extends t {
2141
+ }, lt = class extends t {
1810
2142
  constructor(e) {
1811
2143
  super(e), this.handleReset = () => {
1812
2144
  this.setState({
@@ -1828,11 +2160,11 @@ var at = {
1828
2160
  console.error("ErrorBoundary caught an error:", e, t);
1829
2161
  }
1830
2162
  render() {
1831
- return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ p("div", {
1832
- className: at.errorBoundary,
1833
- children: [/* @__PURE__ */ f($e, { type: "no-content" }), /* @__PURE__ */ f("div", {
1834
- className: at.errorDetails,
1835
- children: /* @__PURE__ */ f(w, {
2163
+ return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ h("div", {
2164
+ className: ct.errorBoundary,
2165
+ children: [/* @__PURE__ */ m(nt, { type: "no-content" }), /* @__PURE__ */ m("div", {
2166
+ className: ct.errorDetails,
2167
+ children: /* @__PURE__ */ m(E, {
1836
2168
  variant: "text-body-small",
1837
2169
  as: "p",
1838
2170
  color: "secondary",
@@ -1841,173 +2173,240 @@ var at = {
1841
2173
  })]
1842
2174
  }) : this.props.children;
1843
2175
  }
1844
- }, Z = {
1845
- sidebar: "_sidebar_1al5s_2",
1846
- resizing: "_resizing_1al5s_14",
1847
- collapsed: "_collapsed_1al5s_16",
1848
- mobile: "_mobile_1al5s_18",
1849
- mini: "_mini_1al5s_26",
1850
- itemLabel: "_itemLabel_1al5s_26",
1851
- itemBadge: "_itemBadge_1al5s_27",
1852
- sectionHeader: "_sectionHeader_1al5s_28",
1853
- backdrop: "_backdrop_1al5s_30",
1854
- content: "_content_1al5s_37",
1855
- footer: "_footer_1al5s_47",
1856
- resizeHandle: "_resizeHandle_1al5s_54",
1857
- section: "_section_1al5s_28",
1858
- sectionHeaderClickable: "_sectionHeaderClickable_1al5s_87",
1859
- sectionItems: "_sectionItems_1al5s_89",
1860
- itemWrapper: "_itemWrapper_1al5s_96",
1861
- item: "_item_1al5s_26",
1862
- itemSelected: "_itemSelected_1al5s_130",
1863
- itemDisabled: "_itemDisabled_1al5s_133",
1864
- itemIcon: "_itemIcon_1al5s_135",
1865
- subItems: "_subItems_1al5s_156"
1866
- }, st = 56, ct = 240, lt = 180, ut = 140, dt = n(({ children: e, isCollapsed: t = !1, onToggle: n, width: a = "default", onWidthChange: o, resizable: s = !0, footer: u, className: m, isMobile: h = !1 }, g) => {
1867
- let _ = c(null), v = g || _, [y, b] = l(!1), x = a === "mini", S = a === "mini" ? st : a === "default" ? ct : a, C = r((e) => {
1868
- if (!s || !o) return;
1869
- e.preventDefault(), b(!0), e.clientX;
2176
+ }, $ = {
2177
+ sidebar: "_sidebar_3oy49_2",
2178
+ resizing: "_resizing_3oy49_14",
2179
+ collapsed: "_collapsed_3oy49_16",
2180
+ mobile: "_mobile_3oy49_18",
2181
+ mini: "_mini_3oy49_26",
2182
+ itemLabel: "_itemLabel_3oy49_26",
2183
+ itemBadge: "_itemBadge_3oy49_27",
2184
+ sectionHeader: "_sectionHeader_3oy49_28",
2185
+ backdrop: "_backdrop_3oy49_30",
2186
+ content: "_content_3oy49_37",
2187
+ footer: "_footer_3oy49_47",
2188
+ resizeHandle: "_resizeHandle_3oy49_54",
2189
+ section: "_section_3oy49_28",
2190
+ sectionHeaderClickable: "_sectionHeaderClickable_3oy49_94",
2191
+ sectionItems: "_sectionItems_3oy49_96",
2192
+ itemWrapper: "_itemWrapper_3oy49_103",
2193
+ item: "_item_3oy49_26",
2194
+ itemSelected: "_itemSelected_3oy49_137",
2195
+ itemDisabled: "_itemDisabled_3oy49_140",
2196
+ itemIcon: "_itemIcon_3oy49_142",
2197
+ subItems: "_subItems_3oy49_163"
2198
+ }, ut = 56, dt = 240, ft = 480, pt = 180, mt = 140, ht = 16, gt = [
2199
+ "a[href]",
2200
+ "button:not([disabled])",
2201
+ "input:not([disabled])",
2202
+ "select:not([disabled])",
2203
+ "textarea:not([disabled])",
2204
+ "[tabindex]:not([tabindex=\"-1\"])"
2205
+ ].join(","), _t = r(({ children: e, isCollapsed: t = !1, onToggle: n, width: r = "default", onWidthChange: i, resizable: s = !0, footer: c, className: l, isMobile: f = !1 }, g) => {
2206
+ let _ = u(null), v = g || _, y = u(null), [b, x] = d(!1), S = r === "mini", C = r === "mini" ? ut : r === "default" ? dt : r, w = a((e) => {
2207
+ if (!s || !i) return;
2208
+ e.preventDefault(), x(!0);
1870
2209
  let t = (e) => {
1871
2210
  let t = e.clientX;
1872
- o(t < ut ? "mini" : t < lt ? "default" : t);
2211
+ i(t < mt ? "mini" : t < pt ? "default" : t);
1873
2212
  }, n = () => {
1874
- b(!1), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n), document.body.style.cursor = "", document.body.style.userSelect = "";
2213
+ x(!1), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n), document.body.style.cursor = "", document.body.style.userSelect = "";
1875
2214
  };
1876
2215
  document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
1877
- }, [s, o]);
1878
- return i(() => {
1879
- if (!h || t) return;
2216
+ }, [s, i]), T = a((e) => {
2217
+ if (!(!s || !i)) switch (e.key) {
2218
+ case "ArrowLeft": {
2219
+ if (e.preventDefault(), r === "mini") return;
2220
+ let t = C - ht;
2221
+ i(t < pt ? "mini" : t);
2222
+ break;
2223
+ }
2224
+ case "ArrowRight":
2225
+ if (e.preventDefault(), r === "mini") {
2226
+ i("default");
2227
+ return;
2228
+ }
2229
+ i(Math.min(C + ht, ft));
2230
+ break;
2231
+ case "Home":
2232
+ e.preventDefault(), i("mini");
2233
+ break;
2234
+ case "End":
2235
+ e.preventDefault(), i(ft);
2236
+ break;
2237
+ }
2238
+ }, [
2239
+ s,
2240
+ i,
2241
+ r,
2242
+ C
2243
+ ]);
2244
+ o(() => {
2245
+ if (!f || t) return;
1880
2246
  let e = (e) => {
1881
2247
  e.key === "Escape" && n?.();
1882
2248
  };
1883
2249
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1884
2250
  }, [
1885
- h,
2251
+ f,
1886
2252
  t,
1887
2253
  n
1888
- ]), t && !h ? null : /* @__PURE__ */ p(d, { children: [h && !t && /* @__PURE__ */ f("div", {
1889
- className: Z.backdrop,
2254
+ ]);
2255
+ let E = f && !t;
2256
+ if (o(() => {
2257
+ if (!E) return;
2258
+ y.current = document.activeElement ?? null;
2259
+ let e = v.current;
2260
+ if (!e) return;
2261
+ let t = () => Array.from(e.querySelectorAll(gt)).filter((e) => !e.hasAttribute("aria-hidden") && e.offsetParent !== null);
2262
+ (t()[0] ?? e).focus();
2263
+ let n = (n) => {
2264
+ if (n.key !== "Tab") return;
2265
+ let r = t();
2266
+ if (r.length === 0) {
2267
+ n.preventDefault(), e.focus();
2268
+ return;
2269
+ }
2270
+ let i = r[0], a = r[r.length - 1], o = document.activeElement;
2271
+ n.shiftKey && (o === i || !e.contains(o)) ? (n.preventDefault(), a.focus()) : !n.shiftKey && (o === a || !e.contains(o)) && (n.preventDefault(), i.focus());
2272
+ };
2273
+ return document.addEventListener("keydown", n), () => {
2274
+ document.removeEventListener("keydown", n), y.current?.focus?.(), y.current = null;
2275
+ };
2276
+ }, [E, v]), t && !f) return null;
2277
+ let D = E ? {
2278
+ role: "dialog",
2279
+ "aria-modal": !0,
2280
+ tabIndex: -1
2281
+ } : { role: "navigation" };
2282
+ return /* @__PURE__ */ h(p, { children: [f && !t && /* @__PURE__ */ m("div", {
2283
+ className: $.backdrop,
1890
2284
  onClick: n,
1891
- "aria-hidden": !0
1892
- }), /* @__PURE__ */ p("aside", {
2285
+ "aria-hidden": "true"
2286
+ }), /* @__PURE__ */ h("aside", {
1893
2287
  ref: v,
1894
- className: P(Z.sidebar, x && Z.mini, h && Z.mobile, t && Z.collapsed, y && Z.resizing, m),
1895
- style: { width: t ? 0 : S },
1896
- role: "navigation",
2288
+ className: F($.sidebar, S && $.mini, f && $.mobile, t && $.collapsed, b && $.resizing, l),
2289
+ style: { width: t ? 0 : C },
1897
2290
  "aria-label": "Sidebar",
2291
+ ...D,
1898
2292
  children: [
1899
- /* @__PURE__ */ f("div", {
1900
- className: Z.content,
2293
+ /* @__PURE__ */ m("div", {
2294
+ className: $.content,
1901
2295
  children: e
1902
2296
  }),
1903
- u && /* @__PURE__ */ f("div", {
1904
- className: Z.footer,
1905
- children: u
2297
+ c && /* @__PURE__ */ m("div", {
2298
+ className: $.footer,
2299
+ children: c
1906
2300
  }),
1907
- s && !h && /* @__PURE__ */ f("div", {
1908
- className: Z.resizeHandle,
1909
- onMouseDown: C,
2301
+ s && !f && /* @__PURE__ */ m("div", {
2302
+ className: $.resizeHandle,
2303
+ onMouseDown: w,
2304
+ onKeyDown: T,
1910
2305
  role: "separator",
1911
2306
  "aria-orientation": "vertical",
1912
- "aria-label": "Resize sidebar"
2307
+ "aria-label": "Resize sidebar",
2308
+ "aria-valuenow": C,
2309
+ "aria-valuemin": ut,
2310
+ "aria-valuemax": ft,
2311
+ tabIndex: 0
1913
2312
  })
1914
2313
  ]
1915
2314
  })] });
1916
2315
  });
1917
- dt.displayName = "Sidebar";
2316
+ _t.displayName = "Sidebar";
1918
2317
  //#endregion
1919
2318
  //#region src/components/Sidebar/SidebarSection.tsx
1920
- var ft = n(({ label: e, children: t, collapsible: n = !1, defaultCollapsed: r = !1, className: i }, a) => {
1921
- let [o, s] = l(r);
1922
- return /* @__PURE__ */ p("div", {
2319
+ var vt = r(({ label: e, children: t, collapsible: n = !1, defaultCollapsed: r = !1, className: i }, a) => {
2320
+ let [o, s] = d(r);
2321
+ return /* @__PURE__ */ h("div", {
1923
2322
  ref: a,
1924
- className: P(Z.section, i),
1925
- children: [e && /* @__PURE__ */ f("div", {
1926
- className: P(Z.sectionHeader, n && Z.sectionHeaderClickable),
2323
+ className: F($.section, i),
2324
+ children: [e && /* @__PURE__ */ m("div", {
2325
+ className: F($.sectionHeader, n && $.sectionHeaderClickable),
1927
2326
  onClick: n ? () => s((e) => !e) : void 0,
1928
2327
  role: n ? "button" : void 0,
1929
2328
  "aria-expanded": n ? !o : void 0,
1930
- children: /* @__PURE__ */ f(w, {
2329
+ children: /* @__PURE__ */ m(E, {
1931
2330
  variant: "text-caption-emphasis",
1932
2331
  as: "span",
1933
2332
  color: "tertiary",
1934
2333
  children: e
1935
2334
  })
1936
- }), !o && /* @__PURE__ */ f("div", {
1937
- className: Z.sectionItems,
2335
+ }), !o && /* @__PURE__ */ m("div", {
2336
+ className: $.sectionItems,
1938
2337
  children: t
1939
2338
  })]
1940
2339
  });
1941
2340
  });
1942
- ft.displayName = "SidebarSection";
2341
+ vt.displayName = "SidebarSection";
1943
2342
  //#endregion
1944
2343
  //#region src/components/Sidebar/SidebarItem.tsx
1945
- var pt = n(({ label: e, icon: t, isSelected: n = !1, isDisabled: r = !1, onClick: i, badge: a, children: o, className: s }, c) => /* @__PURE__ */ p("div", {
1946
- className: P(Z.itemWrapper, s),
1947
- children: [/* @__PURE__ */ p("button", {
2344
+ var yt = r(({ label: e, icon: t, isSelected: n = !1, isDisabled: r = !1, onClick: i, badge: a, children: o, className: s }, c) => /* @__PURE__ */ h("div", {
2345
+ className: F($.itemWrapper, s),
2346
+ children: [/* @__PURE__ */ h("button", {
1948
2347
  ref: c,
1949
- className: P(Z.item, n && Z.itemSelected, r && Z.itemDisabled),
2348
+ className: F($.item, n && $.itemSelected, r && $.itemDisabled),
1950
2349
  onClick: i,
1951
2350
  disabled: r,
1952
2351
  type: "button",
1953
2352
  "aria-current": n ? "page" : void 0,
1954
2353
  children: [
1955
- t && /* @__PURE__ */ f("span", {
1956
- className: Z.itemIcon,
1957
- children: /* @__PURE__ */ f(t, { size: 20 })
2354
+ t && /* @__PURE__ */ m("span", {
2355
+ className: $.itemIcon,
2356
+ children: /* @__PURE__ */ m(t, { size: 20 })
1958
2357
  }),
1959
- /* @__PURE__ */ f(w, {
2358
+ /* @__PURE__ */ m(E, {
1960
2359
  variant: n ? "text-body-medium-emphasis" : "text-body-medium",
1961
2360
  as: "span",
1962
- className: Z.itemLabel,
2361
+ className: $.itemLabel,
1963
2362
  lineTruncation: 1,
1964
2363
  children: e
1965
2364
  }),
1966
- a && /* @__PURE__ */ f("span", {
1967
- className: Z.itemBadge,
2365
+ a && /* @__PURE__ */ m("span", {
2366
+ className: $.itemBadge,
1968
2367
  children: a
1969
2368
  })
1970
2369
  ]
1971
- }), o && n && /* @__PURE__ */ f("div", {
1972
- className: Z.subItems,
2370
+ }), o && n && /* @__PURE__ */ m("div", {
2371
+ className: $.subItems,
1973
2372
  children: o
1974
2373
  })]
1975
2374
  }));
1976
- pt.displayName = "SidebarItem";
1977
- var mt = {
2375
+ yt.displayName = "SidebarItem";
2376
+ var bt = {
1978
2377
  header: "_header_1902d_1",
1979
2378
  left: "_left_1902d_11",
1980
2379
  center: "_center_1902d_19",
1981
2380
  right: "_right_1902d_28"
1982
- }, ht = n(({ title: e, left: t, center: n, right: r, background: i = "secondary", className: a }, o) => /* @__PURE__ */ p(M, {
2381
+ }, xt = r(({ title: e, left: t, center: n, right: r, background: i = "secondary", className: a }, o) => /* @__PURE__ */ h(N, {
1983
2382
  ref: o,
1984
2383
  as: "header",
1985
2384
  background: i,
1986
2385
  elevation: "none",
1987
2386
  edge: "bottom",
1988
- className: P(mt.header, a),
2387
+ className: F(bt.header, a),
1989
2388
  children: [
1990
- /* @__PURE__ */ p("div", {
1991
- className: mt.left,
1992
- children: [t, e && !n && /* @__PURE__ */ f(w, {
2389
+ /* @__PURE__ */ h("div", {
2390
+ className: bt.left,
2391
+ children: [t, e && !n && /* @__PURE__ */ m(E, {
1993
2392
  variant: "text-title-small",
1994
2393
  as: "h1",
1995
2394
  lineTruncation: 1,
1996
2395
  children: e
1997
2396
  })]
1998
2397
  }),
1999
- n && /* @__PURE__ */ f("div", {
2000
- className: mt.center,
2398
+ n && /* @__PURE__ */ m("div", {
2399
+ className: bt.center,
2001
2400
  children: n
2002
2401
  }),
2003
- /* @__PURE__ */ f("div", {
2004
- className: mt.right,
2402
+ /* @__PURE__ */ m("div", {
2403
+ className: bt.right,
2005
2404
  children: r
2006
2405
  })
2007
2406
  ]
2008
2407
  }));
2009
- ht.displayName = "Header";
2010
- var gt = {
2408
+ xt.displayName = "Header";
2409
+ var St = {
2011
2410
  group: "_group_9khnl_1",
2012
2411
  horizontal: "_horizontal_9khnl_7",
2013
2412
  radio: "_radio_9khnl_14",
@@ -2015,37 +2414,72 @@ var gt = {
2015
2414
  circle: "_circle_9khnl_39",
2016
2415
  circleChecked: "_circleChecked_9khnl_52",
2017
2416
  dot: "_dot_9khnl_56"
2018
- }, _t = n(({ value: e, onChange: t, options: n, "aria-label": r, direction: i = "vertical", inactive: a = !1, className: o }, s) => /* @__PURE__ */ f("div", {
2019
- ref: s,
2020
- role: "radiogroup",
2021
- "aria-label": r,
2022
- className: P(gt.group, i === "horizontal" && gt.horizontal, o),
2023
- children: n.map((n) => /* @__PURE__ */ f(vt, {
2024
- label: n.label,
2025
- checked: e === n.value,
2026
- inactive: a || n.inactive,
2027
- onChange: () => t(n.value)
2028
- }, n.value))
2029
- }));
2030
- _t.displayName = "RadioGroup";
2031
- var vt = n(({ label: e, checked: t = !1, onChange: n, inactive: r = !1, className: i }, a) => {
2032
- let o = () => {
2417
+ }, Ct = r(({ value: e, onChange: t, options: n, "aria-label": r, "aria-labelledby": i, direction: a = "vertical", inactive: o = !1, className: s }, c) => {
2418
+ !r && !i && globalThis.process?.env?.NODE_ENV !== "production" && console.warn("RadioGroup: an accessible name is required. Pass either `aria-label` or `aria-labelledby`.");
2419
+ let l = u([]), d = (e) => e >= 0 && e < n.length && !o && !n[e].inactive, f = n.reduce((e, t, n) => (d(n) && e.push(n), e), []), p = n.findIndex((t) => t.value === e), h = d(p) ? p : f[0] ?? -1, g = (r) => {
2420
+ l.current[r]?.focus(), n[r].value !== e && t(n[r].value);
2421
+ }, _ = (e, t) => {
2422
+ if (f.length === 0) return;
2423
+ let n = f.indexOf(e);
2424
+ g(f[((n === -1 ? t === 1 ? -1 : 0 : n) + t + f.length) % f.length]);
2425
+ };
2426
+ return /* @__PURE__ */ m("div", {
2427
+ ref: c,
2428
+ role: "radiogroup",
2429
+ "aria-label": r,
2430
+ "aria-labelledby": i,
2431
+ onKeyDown: (e) => {
2432
+ let t = e.target, n = l.current.findIndex((e) => e === t);
2433
+ if (n !== -1) switch (e.key) {
2434
+ case "ArrowDown":
2435
+ case "ArrowRight":
2436
+ e.preventDefault(), _(n, 1);
2437
+ break;
2438
+ case "ArrowUp":
2439
+ case "ArrowLeft":
2440
+ e.preventDefault(), _(n, -1);
2441
+ break;
2442
+ case "Home":
2443
+ e.preventDefault(), f.length && g(f[0]);
2444
+ break;
2445
+ case "End":
2446
+ e.preventDefault(), f.length && g(f[f.length - 1]);
2447
+ break;
2448
+ }
2449
+ },
2450
+ className: F(St.group, a === "horizontal" && St.horizontal, s),
2451
+ children: n.map((n, r) => /* @__PURE__ */ m(wt, {
2452
+ ref: (e) => {
2453
+ l.current[r] = e;
2454
+ },
2455
+ label: n.label,
2456
+ checked: e === n.value,
2457
+ inactive: o || n.inactive,
2458
+ tabIndex: r === h ? 0 : -1,
2459
+ onChange: () => t(n.value)
2460
+ }, n.value))
2461
+ });
2462
+ });
2463
+ Ct.displayName = "RadioGroup";
2464
+ var wt = r(({ label: e, checked: t = !1, onChange: n, inactive: r = !1, tabIndex: i, className: a }, o) => {
2465
+ let s = () => {
2033
2466
  !r && !t && n?.();
2034
2467
  };
2035
- return /* @__PURE__ */ p("div", {
2036
- ref: a,
2468
+ return /* @__PURE__ */ h("div", {
2469
+ ref: o,
2037
2470
  role: "radio",
2038
2471
  "aria-checked": t,
2039
- tabIndex: r ? -1 : 0,
2040
- className: P(gt.radio, r && gt.inactive, i),
2041
- onClick: o,
2472
+ "aria-disabled": r || void 0,
2473
+ tabIndex: i ?? (r ? -1 : 0),
2474
+ className: F(St.radio, r && St.inactive, a),
2475
+ onClick: s,
2042
2476
  onKeyDown: (e) => {
2043
- (e.key === " " || e.key === "Enter") && (e.preventDefault(), o());
2477
+ (e.key === " " || e.key === "Enter") && (e.preventDefault(), s());
2044
2478
  },
2045
- children: [/* @__PURE__ */ f("span", {
2046
- className: P(gt.circle, t && gt.circleChecked),
2047
- children: t && /* @__PURE__ */ f("span", { className: gt.dot })
2048
- }), /* @__PURE__ */ f(w, {
2479
+ children: [/* @__PURE__ */ m("span", {
2480
+ className: F(St.circle, t && St.circleChecked),
2481
+ children: t && /* @__PURE__ */ m("span", { className: St.dot })
2482
+ }), /* @__PURE__ */ m(E, {
2049
2483
  variant: "text-body-medium",
2050
2484
  as: "span",
2051
2485
  color: "inherit",
@@ -2053,57 +2487,76 @@ var vt = n(({ label: e, checked: t = !1, onChange: n, inactive: r = !1, classNam
2053
2487
  })]
2054
2488
  });
2055
2489
  });
2056
- vt.displayName = "RadioItem";
2057
- var yt = {
2490
+ wt.displayName = "RadioItem";
2491
+ var Tt = {
2058
2492
  tabGroup: "_tabGroup_1kx0a_1",
2059
2493
  tabsRow: "_tabsRow_1kx0a_7",
2060
2494
  track: "_track_1kx0a_12",
2061
2495
  indicator: "_indicator_1kx0a_18"
2062
- }, bt = n(({ tabs: e, activeIndex: t = 0, onTabChange: n, className: a }, o) => {
2063
- let s = c([]), [u, d] = l({
2496
+ }, Et = r(({ tabs: e, activeIndex: t = 0, onTabChange: n, orientation: r = "horizontal", className: i, "aria-label": s, "aria-labelledby": c }, l) => {
2497
+ let f = u([]), [p, g] = d({
2064
2498
  left: 0,
2065
2499
  width: 0
2066
- }), m = r(() => {
2067
- let e = s.current[t];
2068
- e && e.parentElement && d({
2500
+ }), _ = a(() => {
2501
+ let e = f.current[t];
2502
+ e && g({
2069
2503
  left: e.offsetLeft,
2070
2504
  width: e.offsetWidth
2071
2505
  });
2072
2506
  }, [t]);
2073
- return i(() => {
2074
- m();
2075
- }, [m]), i(() => {
2076
- let e = new ResizeObserver(m), t = s.current[0]?.parentElement;
2507
+ o(() => {
2508
+ _();
2509
+ }, [_]), o(() => {
2510
+ let e = new ResizeObserver(_), t = f.current[0]?.parentElement;
2077
2511
  return t && e.observe(t), () => e.disconnect();
2078
- }, [m]), /* @__PURE__ */ p("div", {
2079
- ref: o,
2512
+ }, [_]);
2513
+ let v = a((t, n) => {
2514
+ let r = e.length;
2515
+ if (r === 0) return t;
2516
+ let i = t;
2517
+ for (let t = 0; t < r; t++) if (i = (i + n + r) % r, !e[i].disabled) return i;
2518
+ return t;
2519
+ }, [e]), y = a((e) => {
2520
+ e !== t && n?.(e), f.current[e]?.focus();
2521
+ }, [t, n]);
2522
+ return /* @__PURE__ */ h("div", {
2523
+ ref: l,
2080
2524
  role: "tablist",
2081
- className: P(yt.tabGroup, a),
2082
- children: [/* @__PURE__ */ f("div", {
2083
- className: yt.tabsRow,
2084
- children: e.map((e, r) => /* @__PURE__ */ f(Xe, {
2525
+ "aria-label": s,
2526
+ "aria-labelledby": c,
2527
+ "aria-orientation": r === "vertical" ? "vertical" : void 0,
2528
+ onKeyDown: (n) => {
2529
+ let i = r !== "vertical", a = i ? "ArrowRight" : "ArrowDown", o = i ? "ArrowLeft" : "ArrowUp", s = null;
2530
+ n.key === a ? s = v(t, 1) : n.key === o ? s = v(t, -1) : n.key === "Home" ? s = v(-1, 1) : n.key === "End" && (s = v(e.length, -1)), s !== null && (n.preventDefault(), y(s));
2531
+ },
2532
+ className: F(Tt.tabGroup, i),
2533
+ children: [/* @__PURE__ */ m("div", {
2534
+ className: Tt.tabsRow,
2535
+ children: e.map((e, r) => /* @__PURE__ */ m($e, {
2085
2536
  ref: (e) => {
2086
- s.current[r] = e;
2537
+ f.current[r] = e;
2087
2538
  },
2088
2539
  id: e.id,
2540
+ controls: e.panelId,
2089
2541
  label: e.label,
2090
2542
  isSelected: r === t,
2543
+ disabled: e.disabled,
2091
2544
  onClick: () => n?.(r)
2092
2545
  }, e.id ?? r))
2093
- }), /* @__PURE__ */ f("div", {
2094
- className: yt.track,
2095
- children: /* @__PURE__ */ f("div", {
2096
- className: yt.indicator,
2546
+ }), /* @__PURE__ */ m("div", {
2547
+ className: Tt.track,
2548
+ children: /* @__PURE__ */ m("div", {
2549
+ className: Tt.indicator,
2097
2550
  style: {
2098
- transform: `translateX(${u.left}px)`,
2099
- width: u.width
2551
+ transform: `translateX(${p.left}px)`,
2552
+ width: p.width
2100
2553
  }
2101
2554
  })
2102
2555
  })]
2103
2556
  });
2104
2557
  });
2105
- bt.displayName = "TabGroup";
2106
- var Q = {
2558
+ Et.displayName = "TabGroup";
2559
+ var Dt = {
2107
2560
  accordion: "_accordion_15kid_1",
2108
2561
  item: "_item_15kid_8",
2109
2562
  inactive: "_inactive_15kid_16",
@@ -2112,111 +2565,117 @@ var Q = {
2112
2565
  chevronOpen: "_chevronOpen_15kid_52",
2113
2566
  body: "_body_15kid_58",
2114
2567
  bodyInner: "_bodyInner_15kid_63"
2115
- }, xt = n(({ items: e, multiple: t = !1, expandedIds: n, onExpandedChange: r, className: i }, a) => {
2116
- let [o, s] = l([]), c = n ?? o, u = (e) => {
2568
+ }, Ot = r(({ items: e, multiple: t = !1, expandedIds: n, onExpandedChange: r, className: i }, a) => {
2569
+ let [o, s] = d([]), c = n ?? o, l = (e) => {
2117
2570
  let n;
2118
2571
  n = c.includes(e) ? c.filter((t) => t !== e) : t ? [...c, e] : [e], s(n), r?.(n);
2119
2572
  };
2120
- return /* @__PURE__ */ f("div", {
2573
+ return /* @__PURE__ */ m("div", {
2121
2574
  ref: a,
2122
- className: P(Q.accordion, i),
2123
- children: e.map((e) => /* @__PURE__ */ f(St, {
2575
+ className: F(Dt.accordion, i),
2576
+ children: e.map((e) => /* @__PURE__ */ m(kt, {
2124
2577
  label: e.label,
2125
2578
  isExpanded: c.includes(e.id),
2126
2579
  inactive: e.inactive,
2127
- onToggle: () => u(e.id),
2580
+ onToggle: () => l(e.id),
2128
2581
  children: e.content
2129
2582
  }, e.id))
2130
2583
  });
2131
2584
  });
2132
- xt.displayName = "Accordion";
2133
- var St = n(({ label: e, children: t, isExpanded: n = !1, onToggle: a, inactive: o = !1, className: s }, u) => {
2134
- let d = c(null), [m, h] = l(0), g = r(() => {
2135
- d.current && h(d.current.scrollHeight);
2585
+ Ot.displayName = "Accordion";
2586
+ var kt = r(({ label: e, children: t, isExpanded: n = !1, onToggle: r, inactive: i = !1, className: c }, l) => {
2587
+ let f = u(null), [p, g] = d(0), _ = s(), v = `${_}-trigger`, y = `${_}-panel`, b = a(() => {
2588
+ f.current && g(f.current.scrollHeight);
2136
2589
  }, []);
2137
- return i(() => {
2138
- g();
2139
- let e = d.current;
2590
+ return o(() => {
2591
+ b();
2592
+ let e = f.current;
2140
2593
  if (!e) return;
2141
- let t = new ResizeObserver(g);
2594
+ let t = new ResizeObserver(b);
2142
2595
  return t.observe(e), () => t.disconnect();
2143
- }, [g]), /* @__PURE__ */ p("div", {
2144
- ref: u,
2145
- className: P(Q.item, o && Q.inactive, s),
2146
- children: [/* @__PURE__ */ p("button", {
2596
+ }, [b]), /* @__PURE__ */ h("div", {
2597
+ ref: l,
2598
+ className: F(Dt.item, i && Dt.inactive, c),
2599
+ children: [/* @__PURE__ */ h("button", {
2147
2600
  type: "button",
2148
- className: Q.trigger,
2149
- onClick: () => !o && a?.(),
2601
+ id: v,
2602
+ className: Dt.trigger,
2603
+ onClick: () => !i && r?.(),
2150
2604
  "aria-expanded": n,
2151
- tabIndex: o ? -1 : 0,
2152
- children: [/* @__PURE__ */ f(w, {
2605
+ "aria-controls": y,
2606
+ "aria-disabled": i || void 0,
2607
+ tabIndex: i ? -1 : 0,
2608
+ children: [/* @__PURE__ */ m(E, {
2153
2609
  variant: "text-body-medium-emphasis",
2154
2610
  as: "span",
2155
2611
  color: "inherit",
2156
2612
  children: e
2157
- }), /* @__PURE__ */ f("span", {
2158
- className: P(Q.chevron, n && Q.chevronOpen),
2613
+ }), /* @__PURE__ */ m("span", {
2614
+ className: F(Dt.chevron, n && Dt.chevronOpen),
2159
2615
  children: "›"
2160
2616
  })]
2161
- }), /* @__PURE__ */ f("div", {
2162
- className: Q.body,
2163
- style: { height: n ? m : 0 },
2617
+ }), /* @__PURE__ */ m("div", {
2618
+ id: y,
2619
+ role: "region",
2620
+ "aria-labelledby": v,
2621
+ className: Dt.body,
2622
+ style: { height: n ? p : 0 },
2164
2623
  "aria-hidden": !n,
2165
- children: /* @__PURE__ */ f("div", {
2166
- ref: d,
2167
- className: Q.bodyInner,
2624
+ children: /* @__PURE__ */ m("div", {
2625
+ ref: f,
2626
+ className: Dt.bodyInner,
2168
2627
  children: t
2169
2628
  })
2170
2629
  })]
2171
2630
  });
2172
2631
  });
2173
- St.displayName = "AccordionItem";
2174
- var Ct = {
2632
+ kt.displayName = "AccordionItem";
2633
+ var At = {
2175
2634
  breadcrumb: "_breadcrumb_1xq6b_1",
2176
2635
  list: "_list_1xq6b_6",
2177
2636
  item: "_item_1xq6b_15",
2178
2637
  link: "_link_1xq6b_21",
2179
2638
  separator: "_separator_1xq6b_41"
2180
- }, wt = n(({ items: e, separator: t = "/", className: n }, r) => /* @__PURE__ */ f("nav", {
2639
+ }, jt = r(({ items: e, separator: t = "/", className: n }, r) => /* @__PURE__ */ m("nav", {
2181
2640
  ref: r,
2182
2641
  "aria-label": "Breadcrumb",
2183
- className: P(Ct.breadcrumb, n),
2184
- children: /* @__PURE__ */ f("ol", {
2185
- className: Ct.list,
2642
+ className: F(At.breadcrumb, n),
2643
+ children: /* @__PURE__ */ m("ol", {
2644
+ className: At.list,
2186
2645
  children: e.map((n, r) => {
2187
2646
  let i = r === e.length - 1;
2188
- return /* @__PURE__ */ f("li", {
2189
- className: Ct.item,
2190
- children: i ? /* @__PURE__ */ f(w, {
2647
+ return /* @__PURE__ */ m("li", {
2648
+ className: At.item,
2649
+ children: i ? /* @__PURE__ */ m(E, {
2191
2650
  variant: "text-body-medium-emphasis",
2192
2651
  as: "span",
2193
2652
  color: "primary",
2194
2653
  "aria-current": "page",
2195
2654
  children: n.label
2196
- }) : /* @__PURE__ */ p(d, { children: [n.href ? /* @__PURE__ */ f("a", {
2655
+ }) : /* @__PURE__ */ h(p, { children: [n.href ? /* @__PURE__ */ m("a", {
2197
2656
  href: n.href,
2198
- className: Ct.link,
2657
+ className: At.link,
2199
2658
  onClick: (e) => {
2200
2659
  n.onClick && (e.preventDefault(), n.onClick());
2201
2660
  },
2202
- children: /* @__PURE__ */ f(w, {
2661
+ children: /* @__PURE__ */ m(E, {
2203
2662
  variant: "text-body-medium",
2204
2663
  as: "span",
2205
2664
  color: "inherit",
2206
2665
  children: n.label
2207
2666
  })
2208
- }) : /* @__PURE__ */ f("button", {
2667
+ }) : /* @__PURE__ */ m("button", {
2209
2668
  type: "button",
2210
- className: Ct.link,
2669
+ className: At.link,
2211
2670
  onClick: n.onClick,
2212
- children: /* @__PURE__ */ f(w, {
2671
+ children: /* @__PURE__ */ m(E, {
2213
2672
  variant: "text-body-medium",
2214
2673
  as: "span",
2215
2674
  color: "inherit",
2216
2675
  children: n.label
2217
2676
  })
2218
- }), /* @__PURE__ */ f("span", {
2219
- className: Ct.separator,
2677
+ }), /* @__PURE__ */ m("span", {
2678
+ className: At.separator,
2220
2679
  "aria-hidden": "true",
2221
2680
  children: t
2222
2681
  })] })
@@ -2224,8 +2683,8 @@ var Ct = {
2224
2683
  })
2225
2684
  })
2226
2685
  }));
2227
- wt.displayName = "Breadcrumb";
2228
- var $ = {
2686
+ jt.displayName = "Breadcrumb";
2687
+ var Mt = {
2229
2688
  pagination: "_pagination_ax4c0_1",
2230
2689
  inactive: "_inactive_ax4c0_9",
2231
2690
  button: "_button_ax4c0_16",
@@ -2235,82 +2694,82 @@ var $ = {
2235
2694
  };
2236
2695
  //#endregion
2237
2696
  //#region src/components/Pagination/Pagination.tsx
2238
- function Tt(e, t) {
2697
+ function Nt(e, t) {
2239
2698
  let n = [];
2240
2699
  for (let r = e; r <= t; r++) n.push(r);
2241
2700
  return n;
2242
2701
  }
2243
- function Et(e, t, n) {
2244
- if (t <= n * 2 + 5) return Tt(1, t);
2702
+ function Pt(e, t, n) {
2703
+ if (t <= n * 2 + 5) return Nt(1, t);
2245
2704
  let r = Math.max(e - n, 2), i = Math.min(e + n, t - 1), a = r > 2, o = i < t - 1;
2246
2705
  return !a && o ? [
2247
- ...Tt(1, n * 2 + 3),
2706
+ ...Nt(1, n * 2 + 3),
2248
2707
  "ellipsis",
2249
2708
  t
2250
2709
  ] : a && !o ? [
2251
2710
  1,
2252
2711
  "ellipsis",
2253
- ...Tt(t - (n * 2 + 2), t)
2712
+ ...Nt(t - (n * 2 + 2), t)
2254
2713
  ] : [
2255
2714
  1,
2256
2715
  "ellipsis",
2257
- ...Tt(r, i),
2716
+ ...Nt(r, i),
2258
2717
  "ellipsis",
2259
2718
  t
2260
2719
  ];
2261
2720
  }
2262
- var Dt = n(({ page: e, totalPages: t, onPageChange: n, siblingCount: r = 1, inactive: i = !1, className: a }, o) => {
2263
- let c = s(() => Et(e, t, r), [
2721
+ var Ft = r(({ page: e, totalPages: t, onPageChange: n, siblingCount: r = 1, inactive: i = !1, className: a }, o) => {
2722
+ let s = l(() => Pt(e, t, r), [
2264
2723
  e,
2265
2724
  t,
2266
2725
  r
2267
2726
  ]);
2268
- return t <= 1 ? null : /* @__PURE__ */ p("nav", {
2727
+ return t <= 1 ? null : /* @__PURE__ */ h("nav", {
2269
2728
  ref: o,
2270
2729
  "aria-label": "Pagination",
2271
- className: P($.pagination, i && $.inactive, a),
2730
+ className: F(Mt.pagination, i && Mt.inactive, a),
2272
2731
  children: [
2273
- /* @__PURE__ */ f("button", {
2732
+ /* @__PURE__ */ m("button", {
2274
2733
  type: "button",
2275
- className: P($.button, $.nav),
2734
+ className: F(Mt.button, Mt.nav),
2276
2735
  disabled: e <= 1 || i,
2277
2736
  onClick: () => n(e - 1),
2278
2737
  "aria-label": "Previous page",
2279
- children: /* @__PURE__ */ f(w, {
2738
+ children: /* @__PURE__ */ m(E, {
2280
2739
  variant: "text-body-small",
2281
2740
  as: "span",
2282
2741
  color: "inherit",
2283
2742
  children: "‹"
2284
2743
  })
2285
2744
  }),
2286
- c.map((t, r) => t === "ellipsis" ? /* @__PURE__ */ f("span", {
2287
- className: $.ellipsis,
2288
- children: /* @__PURE__ */ f(w, {
2745
+ s.map((t, r) => t === "ellipsis" ? /* @__PURE__ */ m("span", {
2746
+ className: Mt.ellipsis,
2747
+ children: /* @__PURE__ */ m(E, {
2289
2748
  variant: "text-body-small",
2290
2749
  as: "span",
2291
2750
  color: "tertiary",
2292
2751
  children: "…"
2293
2752
  })
2294
- }, `e${r}`) : /* @__PURE__ */ f("button", {
2753
+ }, `e${r}`) : /* @__PURE__ */ m("button", {
2295
2754
  type: "button",
2296
- className: P($.button, t === e && $.active),
2755
+ className: F(Mt.button, t === e && Mt.active),
2297
2756
  onClick: () => n(t),
2298
2757
  "aria-current": t === e ? "page" : void 0,
2299
2758
  disabled: i,
2300
- children: /* @__PURE__ */ f(w, {
2759
+ children: /* @__PURE__ */ m(E, {
2301
2760
  variant: t === e ? "text-body-small-emphasis" : "text-body-small",
2302
2761
  as: "span",
2303
2762
  color: "inherit",
2304
2763
  children: t
2305
2764
  })
2306
2765
  }, t)),
2307
- /* @__PURE__ */ f("button", {
2766
+ /* @__PURE__ */ m("button", {
2308
2767
  type: "button",
2309
- className: P($.button, $.nav),
2768
+ className: F(Mt.button, Mt.nav),
2310
2769
  disabled: e >= t || i,
2311
2770
  onClick: () => n(e + 1),
2312
2771
  "aria-label": "Next page",
2313
- children: /* @__PURE__ */ f(w, {
2772
+ children: /* @__PURE__ */ m(E, {
2314
2773
  variant: "text-body-small",
2315
2774
  as: "span",
2316
2775
  color: "inherit",
@@ -2320,18 +2779,18 @@ var Dt = n(({ page: e, totalPages: t, onPageChange: n, siblingCount: r = 1, inac
2320
2779
  ]
2321
2780
  });
2322
2781
  });
2323
- Dt.displayName = "Pagination";
2324
- var Ot = {
2782
+ Ft.displayName = "Pagination";
2783
+ var It = {
2325
2784
  divider: "_divider_yo1st_1",
2326
2785
  vertical: "_vertical_yo1st_9"
2327
- }, kt = n(({ orientation: e = "horizontal", className: t }, n) => /* @__PURE__ */ f("hr", {
2786
+ }, Lt = r(({ orientation: e = "horizontal", className: t }, n) => /* @__PURE__ */ m("hr", {
2328
2787
  ref: n,
2329
2788
  role: "separator",
2330
2789
  "aria-orientation": e,
2331
- className: P(Ot.divider, e === "vertical" && Ot.vertical, t)
2790
+ className: F(It.divider, e === "vertical" && It.vertical, t)
2332
2791
  }));
2333
- kt.displayName = "Divider";
2334
- var At = {
2792
+ Lt.displayName = "Divider";
2793
+ var Rt = {
2335
2794
  skeleton: "_skeleton_gebkr_1",
2336
2795
  text: "_text_gebkr_9",
2337
2796
  circular: "_circular_gebkr_15",
@@ -2339,28 +2798,28 @@ var At = {
2339
2798
  textGroup: "_textGroup_gebkr_29",
2340
2799
  animate: "_animate_gebkr_37",
2341
2800
  shimmer: "_shimmer_gebkr_1"
2342
- }, jt = n(({ variant: e = "text", width: t, height: n, lines: r = 1, animate: i = !0, className: a }, o) => e === "text" && r > 1 ? /* @__PURE__ */ f("div", {
2801
+ }, zt = r(({ variant: e = "text", width: t, height: n, lines: r = 1, animate: i = !0, className: a }, o) => e === "text" && r > 1 ? /* @__PURE__ */ m("div", {
2343
2802
  ref: o,
2344
- className: P(At.textGroup, a),
2803
+ className: F(Rt.textGroup, a),
2345
2804
  style: { width: t },
2346
- children: Array.from({ length: r }, (e, t) => /* @__PURE__ */ f("div", {
2347
- className: P(At.skeleton, At.text, i && At.animate),
2805
+ children: Array.from({ length: r }, (e, t) => /* @__PURE__ */ m("div", {
2806
+ className: F(Rt.skeleton, Rt.text, i && Rt.animate),
2348
2807
  style: {
2349
2808
  width: t === r - 1 ? "60%" : "100%",
2350
2809
  height: n
2351
2810
  }
2352
2811
  }, t))
2353
- }) : /* @__PURE__ */ f("div", {
2812
+ }) : /* @__PURE__ */ m("div", {
2354
2813
  ref: o,
2355
- className: P(At.skeleton, At[e], i && At.animate, a),
2814
+ className: F(Rt.skeleton, Rt[e], i && Rt.animate, a),
2356
2815
  style: {
2357
2816
  width: t,
2358
2817
  height: n
2359
2818
  },
2360
2819
  "aria-hidden": "true"
2361
2820
  }));
2362
- jt.displayName = "Skeleton";
2363
- var Mt = {
2821
+ zt.displayName = "Skeleton";
2822
+ var Bt = {
2364
2823
  container: "_container_ssyox_3",
2365
2824
  topCenter: "_topCenter_ssyox_16",
2366
2825
  topRight: "_topRight_ssyox_23",
@@ -2371,114 +2830,131 @@ var Mt = {
2371
2830
  toastExit: "_toastExit_ssyox_54",
2372
2831
  fadeOut: "_fadeOut_ssyox_1",
2373
2832
  dismiss: "_dismiss_ssyox_58"
2374
- }, Nt = [], Pt = /* @__PURE__ */ new Set();
2375
- function Ft() {
2376
- Pt.forEach((e) => e());
2833
+ }, Vt = [], Ht = /* @__PURE__ */ new Set();
2834
+ function Ut() {
2835
+ Ht.forEach((e) => e());
2377
2836
  }
2378
- function It() {
2379
- return Nt;
2837
+ function Wt() {
2838
+ return Vt;
2380
2839
  }
2381
- function Lt(e) {
2382
- return Pt.add(e), () => {
2383
- Pt.delete(e);
2840
+ function Gt(e) {
2841
+ return Ht.add(e), () => {
2842
+ Ht.delete(e);
2384
2843
  };
2385
2844
  }
2386
- var Rt = 0, zt = {
2845
+ var Kt = 0, qt = {
2387
2846
  show(e) {
2388
- let t = `toast-${++Rt}`;
2389
- return Nt = [...Nt, {
2847
+ let t = `toast-${++Kt}`;
2848
+ return Vt = [...Vt, {
2390
2849
  id: t,
2391
2850
  ...e
2392
- }], Ft(), t;
2851
+ }], Ut(), t;
2393
2852
  },
2394
2853
  info(e, t) {
2395
- return zt.show({
2854
+ return qt.show({
2396
2855
  message: e,
2397
2856
  intent: "neutral",
2398
2857
  ...t
2399
2858
  });
2400
2859
  },
2401
2860
  success(e, t) {
2402
- return zt.show({
2861
+ return qt.show({
2403
2862
  message: e,
2404
2863
  intent: "positive",
2405
2864
  ...t
2406
2865
  });
2407
2866
  },
2408
2867
  error(e, t) {
2409
- return zt.show({
2868
+ return qt.show({
2410
2869
  message: e,
2411
2870
  intent: "negative",
2412
2871
  ...t
2413
2872
  });
2414
2873
  },
2415
2874
  warning(e, t) {
2416
- return zt.show({
2875
+ return qt.show({
2417
2876
  message: e,
2418
2877
  intent: "warning",
2419
2878
  ...t
2420
2879
  });
2421
2880
  },
2422
2881
  dismiss(e) {
2423
- Nt = Nt.filter((t) => t.id !== e), Ft();
2882
+ Vt = Vt.filter((t) => t.id !== e), Ut();
2424
2883
  },
2425
2884
  dismissAll() {
2426
- Nt = [], Ft();
2885
+ Vt = [], Ut();
2427
2886
  }
2428
2887
  };
2429
- function Bt() {
2430
- return u(Lt, It, It);
2888
+ function Jt() {
2889
+ return f(Gt, Wt, Wt);
2431
2890
  }
2432
- var Vt = {
2891
+ var Yt = {
2433
2892
  neutral: "neutral",
2434
2893
  brand: "brand",
2435
2894
  positive: "positive",
2436
2895
  negative: "negative",
2437
2896
  warning: "warning",
2438
2897
  caution: "caution"
2439
- }, Ht = ({ data: e }) => {
2440
- let [t, n] = l(!1), a = c(void 0), o = r(() => {
2898
+ }, Xt = ({ data: e }) => {
2899
+ let [t, n] = d(!1), r = u(void 0), i = u(e.duration ?? 4e3), s = u(0), c = u(!1), l = a(() => {
2441
2900
  n(!0), setTimeout(() => {
2442
- zt.dismiss(e.id), e.onDismiss?.();
2901
+ qt.dismiss(e.id), e.onDismiss?.();
2443
2902
  }, 200);
2444
- }, [e]);
2445
- return i(() => {
2446
- let t = e.duration ?? 4e3;
2447
- return t > 0 && (a.current = setTimeout(o, t)), () => {
2448
- a.current && clearTimeout(a.current);
2449
- };
2450
- }, [e.duration, o]), /* @__PURE__ */ p(M, {
2451
- intent: Vt[e.intent ?? "neutral"],
2903
+ }, [e]), f = a(() => {
2904
+ r.current &&= (clearTimeout(r.current), void 0);
2905
+ }, []), p = a((e) => {
2906
+ e <= 0 || (s.current = Date.now(), r.current = setTimeout(l, e));
2907
+ }, [l]), g = a(() => {
2908
+ if (c.current || !r.current) return;
2909
+ c.current = !0;
2910
+ let e = Date.now() - s.current;
2911
+ i.current = Math.max(0, i.current - e), f();
2912
+ }, [f]), _ = a(() => {
2913
+ c.current && (c.current = !1, p(i.current));
2914
+ }, [p]);
2915
+ o(() => (i.current = e.duration ?? 4e3, c.current = !1, p(i.current), f), [
2916
+ e.duration,
2917
+ p,
2918
+ f
2919
+ ]);
2920
+ let v = e.intent === "negative";
2921
+ return /* @__PURE__ */ h(N, {
2922
+ intent: Yt[e.intent ?? "neutral"],
2452
2923
  contrast: "bold",
2453
2924
  elevation: "floating",
2454
2925
  radius: "lg",
2455
- className: P(Mt.toast, t && Mt.toastExit),
2456
- role: "status",
2457
- "aria-live": "polite",
2458
- children: [/* @__PURE__ */ f(w, {
2926
+ className: F(Bt.toast, t && Bt.toastExit),
2927
+ role: v ? "alert" : "status",
2928
+ "aria-live": v ? "assertive" : "polite",
2929
+ onMouseEnter: g,
2930
+ onMouseLeave: _,
2931
+ onFocus: g,
2932
+ onBlur: _,
2933
+ children: [/* @__PURE__ */ m(E, {
2459
2934
  variant: "text-body-medium",
2460
2935
  as: "span",
2461
2936
  color: "inherit",
2462
2937
  children: e.message
2463
- }), /* @__PURE__ */ f("button", {
2938
+ }), /* @__PURE__ */ m("button", {
2464
2939
  type: "button",
2465
- className: Mt.dismiss,
2466
- onClick: o,
2940
+ className: Bt.dismiss,
2941
+ onClick: l,
2467
2942
  "aria-label": "Dismiss",
2468
2943
  children: "×"
2469
2944
  })]
2470
2945
  });
2471
- }, Ut = n(({ position: e = "top-center" }, t) => {
2472
- let n = Bt();
2473
- return typeof document > "u" ? null : g.createPortal(/* @__PURE__ */ f("div", {
2946
+ }, Zt = r(({ position: e = "top-center" }, t) => {
2947
+ let n = Jt();
2948
+ return typeof document > "u" ? null : v.createPortal(/* @__PURE__ */ m("div", {
2474
2949
  ref: t,
2475
- className: P(Mt.container, Mt[Wt(e)]),
2950
+ className: F(Bt.container, Bt[Qt(e)]),
2951
+ role: "region",
2476
2952
  "aria-label": "Notifications",
2477
- children: n.map((e) => /* @__PURE__ */ f(Ht, { data: e }, e.id))
2953
+ children: n.map((e) => /* @__PURE__ */ m(Xt, { data: e }, e.id))
2478
2954
  }), document.body);
2479
2955
  });
2480
- Ut.displayName = "ToastContainer";
2481
- function Wt(e) {
2956
+ Zt.displayName = "ToastContainer";
2957
+ function Qt(e) {
2482
2958
  switch (e) {
2483
2959
  case "top-center": return "topCenter";
2484
2960
  case "top-right": return "topRight";
@@ -2487,6 +2963,6 @@ function Wt(e) {
2487
2963
  }
2488
2964
  }
2489
2965
  //#endregion
2490
- export { xt as Accordion, St as AccordionItem, pe as Badge, Ge as Banner, wt as Breadcrumb, re as Button, se as ButtonGroup, I as Card, _e as Checkbox, Oe as DestructiveMenuItem, kt as Divider, $e as EmptyState, ot as ErrorBoundary, nt as Fade, Se as Field, ht as Header, ye as Input, z as Loader, Ne as Menu, Ee as MenuItem, Te as Modal, Dt as Pagination, _t as RadioGroup, vt as RadioItem, it as Scrollbar, Ve as Select, dt as Sidebar, pt as SidebarItem, ft as SidebarSection, jt as Skeleton, be as Slider, M as Surface, Xe as Tab, bt as TabGroup, Je as Table, de as Tag, w as Text, Ut as ToastContainer, he as Toggle, oe as ToggleButton, ce as ToggleButtonGroup, ze as Tooltip, zt as toast, Bt as useToasts };
2966
+ export { Ot as Accordion, kt as AccordionItem, fe as Badge, Je as Banner, jt as Breadcrumb, ie as Button, K as ButtonGroup, R as Card, ge as Checkbox, je as DestructiveMenuItem, Lt as Divider, nt as EmptyState, lt as ErrorBoundary, at as Fade, Se as Field, xt as Header, ye as Input, ne as Loader, Ie as Menu, ke as MenuItem, Oe as Modal, Ft as Pagination, Ct as RadioGroup, wt as RadioItem, st as Scrollbar, We as Select, _t as Sidebar, yt as SidebarItem, vt as SidebarSection, zt as Skeleton, be as Slider, N as Surface, $e as Tab, Et as TabGroup, Ze as Table, ue as Tag, E as Text, Zt as ToastContainer, me as Toggle, oe as ToggleButton, se as ToggleButtonGroup, He as Tooltip, qt as toast, Jt as useToasts };
2491
2967
 
2492
2968
  //# sourceMappingURL=index.js.map