@octavius2929-personal/design-system 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -26,6 +26,46 @@ function useToggle(initial = false) {
26
26
  // src/components/container/index.tsx
27
27
  import { forwardRef } from "react";
28
28
 
29
+ // src/testing/use-test-id.ts
30
+ import { useMemo as useMemo2 } from "react";
31
+
32
+ // src/testing/compose.ts
33
+ function normalizeSegment(seg) {
34
+ return seg.trim().replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
35
+ }
36
+ function composeTestId(parts) {
37
+ return parts.filter((p) => typeof p === "string" && p.trim() !== "").map(normalizeSegment).join("__");
38
+ }
39
+
40
+ // src/testing/context/test-id-context.tsx
41
+ import { createContext, useContext, useMemo } from "react";
42
+ import { jsx } from "react/jsx-runtime";
43
+ var TestIdContext = createContext([]);
44
+ function TestIdProvider({ context, children }) {
45
+ const parent = useContext(TestIdContext);
46
+ const value = useMemo(
47
+ () => [...parent, normalizeSegment(context)].filter((seg) => seg !== ""),
48
+ [parent, context]
49
+ );
50
+ return /* @__PURE__ */ jsx(TestIdContext.Provider, { value, children });
51
+ }
52
+ function useTestIdContext() {
53
+ return useContext(TestIdContext);
54
+ }
55
+
56
+ // src/testing/use-test-id.ts
57
+ function useTestId(type, ownTestId) {
58
+ const ctx = useTestIdContext();
59
+ const testId = composeTestId([type, ...ctx, ownTestId]);
60
+ return useMemo2(
61
+ () => ({
62
+ testId,
63
+ slot: (name) => `${testId}__${normalizeSegment(name)}`
64
+ }),
65
+ [testId]
66
+ );
67
+ }
68
+
29
69
  // src/theme/styles/sprinkles/index.css.ts
30
70
  import { createSprinkles as _ad221 } from "@vanilla-extract/sprinkles/createRuntimeSprinkles";
31
71
  var sprinkles = _ad221({ conditions: void 0, styles: { p: { mappings: ["padding"] }, px: { mappings: ["paddingLeft", "paddingRight"] }, py: { mappings: ["paddingTop", "paddingBottom"] }, pt: { mappings: ["paddingTop"] }, pr: { mappings: ["paddingRight"] }, pb: { mappings: ["paddingBottom"] }, pl: { mappings: ["paddingLeft"] }, m: { mappings: ["marginTop", "marginRight", "marginBottom", "marginLeft"] }, mx: { mappings: ["marginLeft", "marginRight"] }, my: { mappings: ["marginTop", "marginBottom"] }, mt: { mappings: ["marginTop"] }, mr: { mappings: ["marginRight"] }, mb: { mappings: ["marginBottom"] }, ml: { mappings: ["marginLeft"] }, bg: { mappings: ["background"] }, radius: { mappings: ["borderRadius"] }, padding: { values: { s0: { defaultClass: "sprinkles_padding_s0__qhecrd0" }, s1: { defaultClass: "sprinkles_padding_s1__qhecrd1" }, s2: { defaultClass: "sprinkles_padding_s2__qhecrd2" }, s3: { defaultClass: "sprinkles_padding_s3__qhecrd3" }, s4: { defaultClass: "sprinkles_padding_s4__qhecrd4" }, s5: { defaultClass: "sprinkles_padding_s5__qhecrd5" }, s6: { defaultClass: "sprinkles_padding_s6__qhecrd6" }, s7: { defaultClass: "sprinkles_padding_s7__qhecrd7" }, s8: { defaultClass: "sprinkles_padding_s8__qhecrd8" }, s9: { defaultClass: "sprinkles_padding_s9__qhecrd9" } } }, paddingTop: { values: { s0: { defaultClass: "sprinkles_paddingTop_s0__qhecrda" }, s1: { defaultClass: "sprinkles_paddingTop_s1__qhecrdb" }, s2: { defaultClass: "sprinkles_paddingTop_s2__qhecrdc" }, s3: { defaultClass: "sprinkles_paddingTop_s3__qhecrdd" }, s4: { defaultClass: "sprinkles_paddingTop_s4__qhecrde" }, s5: { defaultClass: "sprinkles_paddingTop_s5__qhecrdf" }, s6: { defaultClass: "sprinkles_paddingTop_s6__qhecrdg" }, s7: { defaultClass: "sprinkles_paddingTop_s7__qhecrdh" }, s8: { defaultClass: "sprinkles_paddingTop_s8__qhecrdi" }, s9: { defaultClass: "sprinkles_paddingTop_s9__qhecrdj" } } }, paddingRight: { values: { s0: { defaultClass: "sprinkles_paddingRight_s0__qhecrdk" }, s1: { defaultClass: "sprinkles_paddingRight_s1__qhecrdl" }, s2: { defaultClass: "sprinkles_paddingRight_s2__qhecrdm" }, s3: { defaultClass: "sprinkles_paddingRight_s3__qhecrdn" }, s4: { defaultClass: "sprinkles_paddingRight_s4__qhecrdo" }, s5: { defaultClass: "sprinkles_paddingRight_s5__qhecrdp" }, s6: { defaultClass: "sprinkles_paddingRight_s6__qhecrdq" }, s7: { defaultClass: "sprinkles_paddingRight_s7__qhecrdr" }, s8: { defaultClass: "sprinkles_paddingRight_s8__qhecrds" }, s9: { defaultClass: "sprinkles_paddingRight_s9__qhecrdt" } } }, paddingBottom: { values: { s0: { defaultClass: "sprinkles_paddingBottom_s0__qhecrdu" }, s1: { defaultClass: "sprinkles_paddingBottom_s1__qhecrdv" }, s2: { defaultClass: "sprinkles_paddingBottom_s2__qhecrdw" }, s3: { defaultClass: "sprinkles_paddingBottom_s3__qhecrdx" }, s4: { defaultClass: "sprinkles_paddingBottom_s4__qhecrdy" }, s5: { defaultClass: "sprinkles_paddingBottom_s5__qhecrdz" }, s6: { defaultClass: "sprinkles_paddingBottom_s6__qhecrd10" }, s7: { defaultClass: "sprinkles_paddingBottom_s7__qhecrd11" }, s8: { defaultClass: "sprinkles_paddingBottom_s8__qhecrd12" }, s9: { defaultClass: "sprinkles_paddingBottom_s9__qhecrd13" } } }, paddingLeft: { values: { s0: { defaultClass: "sprinkles_paddingLeft_s0__qhecrd14" }, s1: { defaultClass: "sprinkles_paddingLeft_s1__qhecrd15" }, s2: { defaultClass: "sprinkles_paddingLeft_s2__qhecrd16" }, s3: { defaultClass: "sprinkles_paddingLeft_s3__qhecrd17" }, s4: { defaultClass: "sprinkles_paddingLeft_s4__qhecrd18" }, s5: { defaultClass: "sprinkles_paddingLeft_s5__qhecrd19" }, s6: { defaultClass: "sprinkles_paddingLeft_s6__qhecrd1a" }, s7: { defaultClass: "sprinkles_paddingLeft_s7__qhecrd1b" }, s8: { defaultClass: "sprinkles_paddingLeft_s8__qhecrd1c" }, s9: { defaultClass: "sprinkles_paddingLeft_s9__qhecrd1d" } } }, marginTop: { values: { s0: { defaultClass: "sprinkles_marginTop_s0__qhecrd1e" }, s1: { defaultClass: "sprinkles_marginTop_s1__qhecrd1f" }, s2: { defaultClass: "sprinkles_marginTop_s2__qhecrd1g" }, s3: { defaultClass: "sprinkles_marginTop_s3__qhecrd1h" }, s4: { defaultClass: "sprinkles_marginTop_s4__qhecrd1i" }, s5: { defaultClass: "sprinkles_marginTop_s5__qhecrd1j" }, s6: { defaultClass: "sprinkles_marginTop_s6__qhecrd1k" }, s7: { defaultClass: "sprinkles_marginTop_s7__qhecrd1l" }, s8: { defaultClass: "sprinkles_marginTop_s8__qhecrd1m" }, s9: { defaultClass: "sprinkles_marginTop_s9__qhecrd1n" } } }, marginRight: { values: { s0: { defaultClass: "sprinkles_marginRight_s0__qhecrd1o" }, s1: { defaultClass: "sprinkles_marginRight_s1__qhecrd1p" }, s2: { defaultClass: "sprinkles_marginRight_s2__qhecrd1q" }, s3: { defaultClass: "sprinkles_marginRight_s3__qhecrd1r" }, s4: { defaultClass: "sprinkles_marginRight_s4__qhecrd1s" }, s5: { defaultClass: "sprinkles_marginRight_s5__qhecrd1t" }, s6: { defaultClass: "sprinkles_marginRight_s6__qhecrd1u" }, s7: { defaultClass: "sprinkles_marginRight_s7__qhecrd1v" }, s8: { defaultClass: "sprinkles_marginRight_s8__qhecrd1w" }, s9: { defaultClass: "sprinkles_marginRight_s9__qhecrd1x" } } }, marginBottom: { values: { s0: { defaultClass: "sprinkles_marginBottom_s0__qhecrd1y" }, s1: { defaultClass: "sprinkles_marginBottom_s1__qhecrd1z" }, s2: { defaultClass: "sprinkles_marginBottom_s2__qhecrd20" }, s3: { defaultClass: "sprinkles_marginBottom_s3__qhecrd21" }, s4: { defaultClass: "sprinkles_marginBottom_s4__qhecrd22" }, s5: { defaultClass: "sprinkles_marginBottom_s5__qhecrd23" }, s6: { defaultClass: "sprinkles_marginBottom_s6__qhecrd24" }, s7: { defaultClass: "sprinkles_marginBottom_s7__qhecrd25" }, s8: { defaultClass: "sprinkles_marginBottom_s8__qhecrd26" }, s9: { defaultClass: "sprinkles_marginBottom_s9__qhecrd27" } } }, marginLeft: { values: { s0: { defaultClass: "sprinkles_marginLeft_s0__qhecrd28" }, s1: { defaultClass: "sprinkles_marginLeft_s1__qhecrd29" }, s2: { defaultClass: "sprinkles_marginLeft_s2__qhecrd2a" }, s3: { defaultClass: "sprinkles_marginLeft_s3__qhecrd2b" }, s4: { defaultClass: "sprinkles_marginLeft_s4__qhecrd2c" }, s5: { defaultClass: "sprinkles_marginLeft_s5__qhecrd2d" }, s6: { defaultClass: "sprinkles_marginLeft_s6__qhecrd2e" }, s7: { defaultClass: "sprinkles_marginLeft_s7__qhecrd2f" }, s8: { defaultClass: "sprinkles_marginLeft_s8__qhecrd2g" }, s9: { defaultClass: "sprinkles_marginLeft_s9__qhecrd2h" } } }, gap: { values: { s0: { defaultClass: "sprinkles_gap_s0__qhecrd2i" }, s1: { defaultClass: "sprinkles_gap_s1__qhecrd2j" }, s2: { defaultClass: "sprinkles_gap_s2__qhecrd2k" }, s3: { defaultClass: "sprinkles_gap_s3__qhecrd2l" }, s4: { defaultClass: "sprinkles_gap_s4__qhecrd2m" }, s5: { defaultClass: "sprinkles_gap_s5__qhecrd2n" }, s6: { defaultClass: "sprinkles_gap_s6__qhecrd2o" }, s7: { defaultClass: "sprinkles_gap_s7__qhecrd2p" }, s8: { defaultClass: "sprinkles_gap_s8__qhecrd2q" }, s9: { defaultClass: "sprinkles_gap_s9__qhecrd2r" } } }, rowGap: { values: { s0: { defaultClass: "sprinkles_rowGap_s0__qhecrd2s" }, s1: { defaultClass: "sprinkles_rowGap_s1__qhecrd2t" }, s2: { defaultClass: "sprinkles_rowGap_s2__qhecrd2u" }, s3: { defaultClass: "sprinkles_rowGap_s3__qhecrd2v" }, s4: { defaultClass: "sprinkles_rowGap_s4__qhecrd2w" }, s5: { defaultClass: "sprinkles_rowGap_s5__qhecrd2x" }, s6: { defaultClass: "sprinkles_rowGap_s6__qhecrd2y" }, s7: { defaultClass: "sprinkles_rowGap_s7__qhecrd2z" }, s8: { defaultClass: "sprinkles_rowGap_s8__qhecrd30" }, s9: { defaultClass: "sprinkles_rowGap_s9__qhecrd31" } } }, columnGap: { values: { s0: { defaultClass: "sprinkles_columnGap_s0__qhecrd32" }, s1: { defaultClass: "sprinkles_columnGap_s1__qhecrd33" }, s2: { defaultClass: "sprinkles_columnGap_s2__qhecrd34" }, s3: { defaultClass: "sprinkles_columnGap_s3__qhecrd35" }, s4: { defaultClass: "sprinkles_columnGap_s4__qhecrd36" }, s5: { defaultClass: "sprinkles_columnGap_s5__qhecrd37" }, s6: { defaultClass: "sprinkles_columnGap_s6__qhecrd38" }, s7: { defaultClass: "sprinkles_columnGap_s7__qhecrd39" }, s8: { defaultClass: "sprinkles_columnGap_s8__qhecrd3a" }, s9: { defaultClass: "sprinkles_columnGap_s9__qhecrd3b" } } }, background: { values: { bg1: { defaultClass: "sprinkles_background_bg1__qhecrd3c" }, bg2: { defaultClass: "sprinkles_background_bg2__qhecrd3d" }, bg3: { defaultClass: "sprinkles_background_bg3__qhecrd3e" }, bgInset: { defaultClass: "sprinkles_background_bgInset__qhecrd3f" }, fg1: { defaultClass: "sprinkles_background_fg1__qhecrd3g" }, fg2: { defaultClass: "sprinkles_background_fg2__qhecrd3h" }, fg3: { defaultClass: "sprinkles_background_fg3__qhecrd3i" }, fgOnAccent: { defaultClass: "sprinkles_background_fgOnAccent__qhecrd3j" }, border1: { defaultClass: "sprinkles_background_border1__qhecrd3k" }, border2: { defaultClass: "sprinkles_background_border2__qhecrd3l" }, borderStrong: { defaultClass: "sprinkles_background_borderStrong__qhecrd3m" }, accent: { defaultClass: "sprinkles_background_accent__qhecrd3n" }, accentHover: { defaultClass: "sprinkles_background_accentHover__qhecrd3o" }, accentSoft: { defaultClass: "sprinkles_background_accentSoft__qhecrd3p" }, ok: { defaultClass: "sprinkles_background_ok__qhecrd3q" }, warn: { defaultClass: "sprinkles_background_warn__qhecrd3r" }, danger: { defaultClass: "sprinkles_background_danger__qhecrd3s" }, dangerHover: { defaultClass: "sprinkles_background_dangerHover__qhecrd3t" }, dangerSoft: { defaultClass: "sprinkles_background_dangerSoft__qhecrd3u" }, info: { defaultClass: "sprinkles_background_info__qhecrd3v" }, focus: { defaultClass: "sprinkles_background_focus__qhecrd3w" }, scrim: { defaultClass: "sprinkles_background_scrim__qhecrd3x" } } }, color: { values: { bg1: { defaultClass: "sprinkles_color_bg1__qhecrd3y" }, bg2: { defaultClass: "sprinkles_color_bg2__qhecrd3z" }, bg3: { defaultClass: "sprinkles_color_bg3__qhecrd40" }, bgInset: { defaultClass: "sprinkles_color_bgInset__qhecrd41" }, fg1: { defaultClass: "sprinkles_color_fg1__qhecrd42" }, fg2: { defaultClass: "sprinkles_color_fg2__qhecrd43" }, fg3: { defaultClass: "sprinkles_color_fg3__qhecrd44" }, fgOnAccent: { defaultClass: "sprinkles_color_fgOnAccent__qhecrd45" }, border1: { defaultClass: "sprinkles_color_border1__qhecrd46" }, border2: { defaultClass: "sprinkles_color_border2__qhecrd47" }, borderStrong: { defaultClass: "sprinkles_color_borderStrong__qhecrd48" }, accent: { defaultClass: "sprinkles_color_accent__qhecrd49" }, accentHover: { defaultClass: "sprinkles_color_accentHover__qhecrd4a" }, accentSoft: { defaultClass: "sprinkles_color_accentSoft__qhecrd4b" }, ok: { defaultClass: "sprinkles_color_ok__qhecrd4c" }, warn: { defaultClass: "sprinkles_color_warn__qhecrd4d" }, danger: { defaultClass: "sprinkles_color_danger__qhecrd4e" }, dangerHover: { defaultClass: "sprinkles_color_dangerHover__qhecrd4f" }, dangerSoft: { defaultClass: "sprinkles_color_dangerSoft__qhecrd4g" }, info: { defaultClass: "sprinkles_color_info__qhecrd4h" }, focus: { defaultClass: "sprinkles_color_focus__qhecrd4i" }, scrim: { defaultClass: "sprinkles_color_scrim__qhecrd4j" } } }, borderRadius: { values: { none: { defaultClass: "sprinkles_borderRadius_none__qhecrd4k" }, sm: { defaultClass: "sprinkles_borderRadius_sm__qhecrd4l" }, md: { defaultClass: "sprinkles_borderRadius_md__qhecrd4m" }, lg: { defaultClass: "sprinkles_borderRadius_lg__qhecrd4n" }, base: { defaultClass: "sprinkles_borderRadius_base__qhecrd4o" }, full: { defaultClass: "sprinkles_borderRadius_full__qhecrd4p" } } }, display: { values: { block: { defaultClass: "sprinkles_display_block__qhecrd4q" }, "inline-block": { defaultClass: "sprinkles_display_inline-block__qhecrd4r" }, flex: { defaultClass: "sprinkles_display_flex__qhecrd4s" }, "inline-flex": { defaultClass: "sprinkles_display_inline-flex__qhecrd4t" }, grid: { defaultClass: "sprinkles_display_grid__qhecrd4u" }, none: { defaultClass: "sprinkles_display_none__qhecrd4v" } } }, flexDirection: { values: { row: { defaultClass: "sprinkles_flexDirection_row__qhecrd4w" }, column: { defaultClass: "sprinkles_flexDirection_column__qhecrd4x" }, "row-reverse": { defaultClass: "sprinkles_flexDirection_row-reverse__qhecrd4y" }, "column-reverse": { defaultClass: "sprinkles_flexDirection_column-reverse__qhecrd4z" } } }, alignItems: { values: { "flex-start": { defaultClass: "sprinkles_alignItems_flex-start__qhecrd50" }, center: { defaultClass: "sprinkles_alignItems_center__qhecrd51" }, "flex-end": { defaultClass: "sprinkles_alignItems_flex-end__qhecrd52" }, stretch: { defaultClass: "sprinkles_alignItems_stretch__qhecrd53" }, baseline: { defaultClass: "sprinkles_alignItems_baseline__qhecrd54" } } }, justifyContent: { values: { "flex-start": { defaultClass: "sprinkles_justifyContent_flex-start__qhecrd55" }, center: { defaultClass: "sprinkles_justifyContent_center__qhecrd56" }, "flex-end": { defaultClass: "sprinkles_justifyContent_flex-end__qhecrd57" }, "space-between": { defaultClass: "sprinkles_justifyContent_space-between__qhecrd58" }, "space-around": { defaultClass: "sprinkles_justifyContent_space-around__qhecrd59" }, "space-evenly": { defaultClass: "sprinkles_justifyContent_space-evenly__qhecrd5a" } } }, flexWrap: { values: { nowrap: { defaultClass: "sprinkles_flexWrap_nowrap__qhecrd5b" }, wrap: { defaultClass: "sprinkles_flexWrap_wrap__qhecrd5c" } } } } });
@@ -46,11 +86,12 @@ function useStyles(props) {
46
86
  }
47
87
 
48
88
  // src/components/container/index.tsx
49
- import { jsx } from "react/jsx-runtime";
50
- function ContainerImpl({ as, ...props }, ref) {
89
+ import { jsx as jsx2 } from "react/jsx-runtime";
90
+ function ContainerImpl({ as, testId, ...props }, ref) {
51
91
  const Component = as ?? "div";
52
92
  const { className, rest } = useStyles(props);
53
- return /* @__PURE__ */ jsx(Component, { ref, ...rest, className });
93
+ const { testId: dataTestId } = useTestId("layout", testId);
94
+ return /* @__PURE__ */ jsx2(Component, { ref, "data-testid": dataTestId, ...rest, className });
54
95
  }
55
96
  var ContainerForwarded = forwardRef(ContainerImpl);
56
97
  ContainerForwarded.displayName = "Container";
@@ -60,11 +101,11 @@ var Container = ContainerForwarded;
60
101
  import { forwardRef as forwardRef2 } from "react";
61
102
 
62
103
  // src/components/typography/use-styles.ts
63
- import { useMemo as useMemo2 } from "react";
104
+ import { useMemo as useMemo4 } from "react";
64
105
 
65
106
  // src/theme/context/theme-context.tsx
66
- import { createContext, useContext, useEffect as useEffect2, useMemo, useState as useState2 } from "react";
67
- import { jsx as jsx2 } from "react/jsx-runtime";
107
+ import { createContext as createContext2, useContext as useContext2, useEffect as useEffect2, useMemo as useMemo3, useState as useState2 } from "react";
108
+ import { jsx as jsx3 } from "react/jsx-runtime";
68
109
  var noop = () => {
69
110
  };
70
111
  var DEFAULT_VALUE = {
@@ -77,7 +118,7 @@ var DEFAULT_VALUE = {
77
118
  toggleMode: noop,
78
119
  cycleMode: noop
79
120
  };
80
- var ThemeContext = createContext(null);
121
+ var ThemeContext = createContext2(null);
81
122
  function resolveSystemMode() {
82
123
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return "light";
83
124
  if (window.matchMedia("(prefers-contrast: more)").matches) return "contrast";
@@ -131,7 +172,7 @@ function ThemeProvider({
131
172
  useEffect2(() => {
132
173
  if (persist) writeStored(storageKey, { schema, preference });
133
174
  }, [schema, preference, persist, storageKey]);
134
- const value = useMemo(
175
+ const value = useMemo3(
135
176
  () => ({
136
177
  schema,
137
178
  mode,
@@ -147,10 +188,10 @@ function ThemeProvider({
147
188
  }),
148
189
  [schema, mode, preference]
149
190
  );
150
- return /* @__PURE__ */ jsx2(ThemeContext.Provider, { value, children });
191
+ return /* @__PURE__ */ jsx3(ThemeContext.Provider, { value, children });
151
192
  }
152
193
  function useTheme() {
153
- return useContext(ThemeContext) ?? DEFAULT_VALUE;
194
+ return useContext2(ThemeContext) ?? DEFAULT_VALUE;
154
195
  }
155
196
 
156
197
  // src/theme/typography.css.ts
@@ -168,7 +209,7 @@ function useStyles2({
168
209
  align: align2
169
210
  }) {
170
211
  const { themeClass } = useTheme();
171
- const className = useMemo2(
212
+ const className = useMemo4(
172
213
  () => [
173
214
  themeClass,
174
215
  base,
@@ -182,7 +223,7 @@ function useStyles2({
182
223
  }
183
224
 
184
225
  // src/components/typography/index.tsx
185
- import { jsx as jsx3 } from "react/jsx-runtime";
226
+ import { jsx as jsx4 } from "react/jsx-runtime";
186
227
  var defaultElement = {
187
228
  display: "h1",
188
229
  h1: "h1",
@@ -197,10 +238,11 @@ var defaultElement = {
197
238
  code: "code",
198
239
  blackletter: "span"
199
240
  };
200
- function TypographyInner({ variant: variant2, as, color: color2, align: align2, ...rest }, ref) {
241
+ function TypographyInner({ variant: variant2, as, color: color2, align: align2, testId, ...rest }, ref) {
201
242
  const Component = as ?? defaultElement[variant2];
202
243
  const { text: text2 } = useStyles2({ variant: variant2, color: color2, align: align2 });
203
- return /* @__PURE__ */ jsx3(Component, { ref, ...rest, className: text2 });
244
+ const { testId: dataTestId } = useTestId("text", testId);
245
+ return /* @__PURE__ */ jsx4(Component, { ref, "data-testid": dataTestId, ...rest, className: text2 });
204
246
  }
205
247
  var TypographyForwarded = forwardRef2(
206
248
  TypographyInner
@@ -211,8 +253,14 @@ var Typography = TypographyForwarded;
211
253
  // src/components/button/index.tsx
212
254
  import { forwardRef as forwardRef3 } from "react";
213
255
 
256
+ // src/testing/states.ts
257
+ function states(map) {
258
+ const active2 = Object.keys(map).filter((key) => map[key]);
259
+ return active2.length > 0 ? active2.join(" ") : void 0;
260
+ }
261
+
214
262
  // src/components/button/use-styles.ts
215
- import { useMemo as useMemo3 } from "react";
263
+ import { useMemo as useMemo5 } from "react";
216
264
 
217
265
  // src/components/button/use-styles.css.ts
218
266
  var full = "use-styles_full__1pbtill4";
@@ -233,7 +281,7 @@ function useStyles3({
233
281
  className
234
282
  }) {
235
283
  const { themeClass } = useTheme();
236
- const container = useMemo3(
284
+ const container = useMemo5(
237
285
  () => [
238
286
  themeClass,
239
287
  root,
@@ -248,7 +296,7 @@ function useStyles3({
248
296
  }
249
297
 
250
298
  // src/components/button/index.tsx
251
- import { jsx as jsx4, jsxs } from "react/jsx-runtime";
299
+ import { jsx as jsx5, jsxs } from "react/jsx-runtime";
252
300
  var ICON_SIZE = { sm: 14, md: 16, lg: 18 };
253
301
  var Button = forwardRef3(function Button2({
254
302
  variant: variant2,
@@ -259,23 +307,36 @@ var Button = forwardRef3(function Button2({
259
307
  full: full2,
260
308
  className,
261
309
  type = "button",
310
+ testId,
262
311
  children,
263
312
  ...rest
264
313
  }, ref) {
265
314
  const { container } = useStyles3({ variant: variant2, tone: tone4, size: size3, full: full2, className });
315
+ const { testId: dataTestId } = useTestId("button", testId);
266
316
  const iconSize = ICON_SIZE[size3];
267
- return /* @__PURE__ */ jsxs("button", { ref, type, className: container, ...rest, children: [
268
- StartIcon && /* @__PURE__ */ jsx4(StartIcon, { size: iconSize }),
269
- children,
270
- EndIcon && /* @__PURE__ */ jsx4(EndIcon, { size: iconSize })
271
- ] });
317
+ return /* @__PURE__ */ jsxs(
318
+ "button",
319
+ {
320
+ ref,
321
+ type,
322
+ className: container,
323
+ "data-testid": dataTestId,
324
+ "data-state": states({ disabled: rest.disabled }),
325
+ ...rest,
326
+ children: [
327
+ StartIcon && /* @__PURE__ */ jsx5(StartIcon, { size: iconSize }),
328
+ children,
329
+ EndIcon && /* @__PURE__ */ jsx5(EndIcon, { size: iconSize })
330
+ ]
331
+ }
332
+ );
272
333
  });
273
334
 
274
335
  // src/components/divider/index.tsx
275
336
  import { forwardRef as forwardRef4 } from "react";
276
337
 
277
338
  // src/components/divider/use-styles.ts
278
- import { useMemo as useMemo4 } from "react";
339
+ import { useMemo as useMemo6 } from "react";
279
340
 
280
341
  // src/components/divider/use-styles.css.ts
281
342
  var horizontal = "use-styles_horizontal__1n7v7yj1";
@@ -288,7 +349,7 @@ var vertical = "use-styles_vertical__1n7v7yj2";
288
349
  // src/components/divider/use-styles.ts
289
350
  function useStyles4({ vertical: vertical2, hasLabel }) {
290
351
  const { themeClass } = useTheme();
291
- const root24 = useMemo4(
352
+ const root24 = useMemo6(
292
353
  () => [
293
354
  themeClass,
294
355
  root2,
@@ -300,25 +361,26 @@ function useStyles4({ vertical: vertical2, hasLabel }) {
300
361
  }
301
362
 
302
363
  // src/components/divider/index.tsx
303
- import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
304
- var Divider = forwardRef4(function Divider2({ vertical: vertical2, label: label7, ...rest }, ref) {
364
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
365
+ var Divider = forwardRef4(function Divider2({ vertical: vertical2, label: label7, testId, ...rest }, ref) {
305
366
  const hasLabel = label7 != null;
306
367
  const { root: root24, line: line2, label: labelClass } = useStyles4({ vertical: vertical2, hasLabel });
368
+ const { testId: dataTestId, slot } = useTestId("layout", testId);
307
369
  if (hasLabel) {
308
- return /* @__PURE__ */ jsxs2("div", { ref, role: "separator", className: root24, ...rest, children: [
309
- /* @__PURE__ */ jsx5("span", { className: line2 }),
310
- /* @__PURE__ */ jsx5("span", { className: labelClass, children: label7 }),
311
- /* @__PURE__ */ jsx5("span", { className: line2 })
370
+ return /* @__PURE__ */ jsxs2("div", { ref, role: "separator", className: root24, "data-testid": dataTestId, ...rest, children: [
371
+ /* @__PURE__ */ jsx6("span", { className: line2 }),
372
+ /* @__PURE__ */ jsx6("span", { className: labelClass, "data-testid": slot("label"), children: label7 }),
373
+ /* @__PURE__ */ jsx6("span", { className: line2 })
312
374
  ] });
313
375
  }
314
- return /* @__PURE__ */ jsx5("div", { ref, role: "separator", className: root24, ...rest });
376
+ return /* @__PURE__ */ jsx6("div", { ref, role: "separator", className: root24, "data-testid": dataTestId, ...rest });
315
377
  });
316
378
 
317
379
  // src/components/avatar/index.tsx
318
380
  import { forwardRef as forwardRef5 } from "react";
319
381
 
320
382
  // src/components/avatar/use-styles.ts
321
- import { useMemo as useMemo5 } from "react";
383
+ import { useMemo as useMemo7 } from "react";
322
384
 
323
385
  // src/components/avatar/use-styles.css.ts
324
386
  var root3 = "use-styles_root__1mn1rmu0";
@@ -332,7 +394,7 @@ function useStyles5({
332
394
  className
333
395
  }) {
334
396
  const { themeClass } = useTheme();
335
- const root24 = useMemo5(
397
+ const root24 = useMemo7(
336
398
  () => [
337
399
  themeClass,
338
400
  root3,
@@ -346,17 +408,18 @@ function useStyles5({
346
408
  }
347
409
 
348
410
  // src/components/avatar/index.tsx
349
- import { jsx as jsx6 } from "react/jsx-runtime";
350
- var Avatar = forwardRef5(function Avatar2({ size: size3, filled, className, children, ...rest }, ref) {
411
+ import { jsx as jsx7 } from "react/jsx-runtime";
412
+ var Avatar = forwardRef5(function Avatar2({ size: size3, filled, className, children, testId, ...rest }, ref) {
351
413
  const { root: root24 } = useStyles5({ size: size3, filled, className });
352
- return /* @__PURE__ */ jsx6("span", { ref, className: root24, ...rest, children });
414
+ const { testId: dataTestId } = useTestId("media", testId);
415
+ return /* @__PURE__ */ jsx7("span", { ref, className: root24, "data-testid": dataTestId, ...rest, children });
353
416
  });
354
417
 
355
418
  // src/components/badge/index.tsx
356
419
  import { forwardRef as forwardRef6 } from "react";
357
420
 
358
421
  // src/components/badge/use-styles.ts
359
- import { useMemo as useMemo6 } from "react";
422
+ import { useMemo as useMemo8 } from "react";
360
423
 
361
424
  // src/components/badge/use-styles.css.ts
362
425
  var dot = "use-styles_dot__1wpei6p1";
@@ -369,21 +432,22 @@ function useStyles6({
369
432
  className
370
433
  }) {
371
434
  const { themeClass } = useTheme();
372
- const root24 = useMemo6(
435
+ const root24 = useMemo8(
373
436
  () => [themeClass, root4, className].filter(Boolean).join(" "),
374
437
  [themeClass, className]
375
438
  );
376
- const dot3 = useMemo6(() => [dot, tone2[tone4]].join(" "), [tone4]);
439
+ const dot3 = useMemo8(() => [dot, tone2[tone4]].join(" "), [tone4]);
377
440
  return { root: root24, dot: dot3 };
378
441
  }
379
442
 
380
443
  // src/components/badge/index.tsx
381
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
382
- var Badge = forwardRef6(function Badge2({ count, tone: tone4, className, children, ...rest }, ref) {
444
+ import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
445
+ var Badge = forwardRef6(function Badge2({ count, tone: tone4, className, children, testId, ...rest }, ref) {
383
446
  const { root: root24, dot: dot3 } = useStyles6({ tone: tone4, className });
384
- return /* @__PURE__ */ jsxs3("span", { ref, className: root24, ...rest, children: [
447
+ const { testId: dataTestId, slot } = useTestId("media", testId);
448
+ return /* @__PURE__ */ jsxs3("span", { ref, className: root24, "data-testid": dataTestId, ...rest, children: [
385
449
  children,
386
- count != null && /* @__PURE__ */ jsx7("span", { className: dot3, children: count })
450
+ count != null && /* @__PURE__ */ jsx8("span", { className: dot3, "data-testid": slot("dot"), children: count })
387
451
  ] });
388
452
  });
389
453
 
@@ -391,7 +455,7 @@ var Badge = forwardRef6(function Badge2({ count, tone: tone4, className, childre
391
455
  import { forwardRef as forwardRef7 } from "react";
392
456
 
393
457
  // src/components/progress/use-styles.ts
394
- import { useMemo as useMemo7 } from "react";
458
+ import { useMemo as useMemo9 } from "react";
395
459
 
396
460
  // src/components/progress/use-styles.css.ts
397
461
  var bar = "use-styles_bar__kbop7v3";
@@ -407,7 +471,7 @@ function useStyles7({
407
471
  }) {
408
472
  const { themeClass } = useTheme();
409
473
  const indeterminate2 = value === void 0;
410
- return useMemo7(() => {
474
+ return useMemo9(() => {
411
475
  const root24 = (...classes) => [themeClass, ...classes, className].filter(Boolean).join(" ");
412
476
  if (variant2 === "circular") {
413
477
  return { track: "", bar: "", spinner: root24(spinner) };
@@ -421,12 +485,13 @@ function useStyles7({
421
485
  }
422
486
 
423
487
  // src/components/progress/index.tsx
424
- import { jsx as jsx8 } from "react/jsx-runtime";
425
- var Progress = forwardRef7(function Progress2({ variant: variant2 = "linear", value, size: size3 = 20, className, ...rest }, ref) {
488
+ import { jsx as jsx9 } from "react/jsx-runtime";
489
+ var Progress = forwardRef7(function Progress2({ variant: variant2 = "linear", value, size: size3 = 20, className, testId, ...rest }, ref) {
426
490
  const { track: track4, bar: bar2, spinner: spinner2 } = useStyles7({ variant: variant2, value, className });
427
491
  const indeterminate2 = value === void 0;
492
+ const { testId: dataTestId, slot } = useTestId("media", testId);
428
493
  if (variant2 === "circular") {
429
- return /* @__PURE__ */ jsx8(
494
+ return /* @__PURE__ */ jsx9(
430
495
  "span",
431
496
  {
432
497
  ref,
@@ -436,11 +501,13 @@ var Progress = forwardRef7(function Progress2({ variant: variant2 = "linear", va
436
501
  "aria-valuemin": indeterminate2 ? void 0 : 0,
437
502
  "aria-valuemax": indeterminate2 ? void 0 : 100,
438
503
  style: { width: size3, height: size3 },
504
+ "data-testid": dataTestId,
505
+ "data-state": states({ indeterminate: indeterminate2 }),
439
506
  ...rest
440
507
  }
441
508
  );
442
509
  }
443
- return /* @__PURE__ */ jsx8(
510
+ return /* @__PURE__ */ jsx9(
444
511
  "div",
445
512
  {
446
513
  ref,
@@ -449,8 +516,17 @@ var Progress = forwardRef7(function Progress2({ variant: variant2 = "linear", va
449
516
  "aria-valuenow": indeterminate2 ? void 0 : value,
450
517
  "aria-valuemin": indeterminate2 ? void 0 : 0,
451
518
  "aria-valuemax": indeterminate2 ? void 0 : 100,
519
+ "data-testid": dataTestId,
520
+ "data-state": states({ indeterminate: indeterminate2 }),
452
521
  ...rest,
453
- children: /* @__PURE__ */ jsx8("div", { className: bar2, style: indeterminate2 ? void 0 : { width: `${value}%` } })
522
+ children: /* @__PURE__ */ jsx9(
523
+ "div",
524
+ {
525
+ className: bar2,
526
+ style: indeterminate2 ? void 0 : { width: `${value}%` },
527
+ "data-testid": slot("bar")
528
+ }
529
+ )
454
530
  }
455
531
  );
456
532
  });
@@ -459,7 +535,7 @@ var Progress = forwardRef7(function Progress2({ variant: variant2 = "linear", va
459
535
  import { forwardRef as forwardRef8 } from "react";
460
536
 
461
537
  // src/components/icons/x/index.tsx
462
- import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
538
+ import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
463
539
  function XIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
464
540
  return /* @__PURE__ */ jsxs4(
465
541
  "svg",
@@ -476,15 +552,15 @@ function XIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
476
552
  "aria-hidden": "true",
477
553
  ...rest,
478
554
  children: [
479
- /* @__PURE__ */ jsx9("path", { d: "M18 6 6 18" }),
480
- /* @__PURE__ */ jsx9("path", { d: "m6 6 12 12" })
555
+ /* @__PURE__ */ jsx10("path", { d: "M18 6 6 18" }),
556
+ /* @__PURE__ */ jsx10("path", { d: "m6 6 12 12" })
481
557
  ]
482
558
  }
483
559
  );
484
560
  }
485
561
 
486
562
  // src/components/chip/use-styles.ts
487
- import { useMemo as useMemo8 } from "react";
563
+ import { useMemo as useMemo10 } from "react";
488
564
 
489
565
  // src/components/chip/use-styles.css.ts
490
566
  var clickable = "use-styles_clickable__1axilf44";
@@ -500,7 +576,7 @@ function useStyles8({
500
576
  clickable: clickable2
501
577
  }) {
502
578
  const { themeClass } = useTheme();
503
- const root24 = useMemo8(
579
+ const root24 = useMemo10(
504
580
  () => [
505
581
  themeClass,
506
582
  root5,
@@ -513,27 +589,49 @@ function useStyles8({
513
589
  }
514
590
 
515
591
  // src/components/chip/index.tsx
516
- import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
517
- var Chip = forwardRef8(function Chip2({ selected: selected3, tone: tone4, onDelete, onClick, children, ...rest }, ref) {
592
+ import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
593
+ var Chip = forwardRef8(function Chip2({ selected: selected3, tone: tone4, onDelete, onClick, children, testId, ...rest }, ref) {
518
594
  const clickable2 = Boolean(onClick);
519
595
  const { root: root24, deleteBtn: deleteBtn2 } = useStyles8({ selected: selected3, tone: tone4, clickable: clickable2 });
596
+ const { testId: dataTestId, slot } = useTestId("media", testId);
520
597
  const handleDelete = (event) => {
521
598
  event.stopPropagation();
522
599
  onDelete?.();
523
600
  };
524
- return /* @__PURE__ */ jsxs5("span", { ref, className: root24, onClick, ...rest, children: [
525
- children,
526
- onDelete && /* @__PURE__ */ jsx10("button", { type: "button", className: deleteBtn2, "aria-label": "Remove", onClick: handleDelete, children: /* @__PURE__ */ jsx10(XIcon, { size: 13 }) })
527
- ] });
601
+ return /* @__PURE__ */ jsxs5(
602
+ "span",
603
+ {
604
+ ref,
605
+ className: root24,
606
+ onClick,
607
+ "data-testid": dataTestId,
608
+ "data-state": states({ selected: selected3 }),
609
+ ...rest,
610
+ children: [
611
+ children,
612
+ onDelete && /* @__PURE__ */ jsx11(
613
+ "button",
614
+ {
615
+ type: "button",
616
+ className: deleteBtn2,
617
+ "aria-label": "Remove",
618
+ onClick: handleDelete,
619
+ "data-testid": slot("delete"),
620
+ children: /* @__PURE__ */ jsx11(XIcon, { size: 13 })
621
+ }
622
+ )
623
+ ]
624
+ }
625
+ );
528
626
  });
529
627
 
530
628
  // src/components/checkbox/index.tsx
531
629
  import { forwardRef as forwardRef9 } from "react";
532
630
 
533
631
  // src/components/icons/check/index.tsx
534
- import { jsx as jsx11 } from "react/jsx-runtime";
632
+ import { jsx as jsx12 } from "react/jsx-runtime";
535
633
  function CheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
536
- return /* @__PURE__ */ jsx11(
634
+ return /* @__PURE__ */ jsx12(
537
635
  "svg",
538
636
  {
539
637
  xmlns: "http://www.w3.org/2000/svg",
@@ -547,13 +645,13 @@ function CheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
547
645
  strokeLinejoin: "round",
548
646
  "aria-hidden": "true",
549
647
  ...rest,
550
- children: /* @__PURE__ */ jsx11("path", { d: "M20 6 9 17l-5-5" })
648
+ children: /* @__PURE__ */ jsx12("path", { d: "M20 6 9 17l-5-5" })
551
649
  }
552
650
  );
553
651
  }
554
652
 
555
653
  // src/components/checkbox/use-styles.ts
556
- import { useMemo as useMemo9 } from "react";
654
+ import { useMemo as useMemo11 } from "react";
557
655
 
558
656
  // src/components/checkbox/use-styles.css.ts
559
657
  var box = "use-styles_box__9zoga91";
@@ -566,11 +664,11 @@ var root6 = "use-styles_root__9zoga90";
566
664
  // src/components/checkbox/use-styles.ts
567
665
  function useStyles9({ checked, disabled: disabled3 }) {
568
666
  const { themeClass } = useTheme();
569
- const root24 = useMemo9(
667
+ const root24 = useMemo11(
570
668
  () => [themeClass, root6, disabled3 && disabled].filter(Boolean).join(" "),
571
669
  [themeClass, disabled3]
572
670
  );
573
- const box2 = useMemo9(
671
+ const box2 = useMemo11(
574
672
  () => [box, checked && boxChecked].filter(Boolean).join(" "),
575
673
  [checked]
576
674
  );
@@ -578,15 +676,16 @@ function useStyles9({ checked, disabled: disabled3 }) {
578
676
  }
579
677
 
580
678
  // src/components/checkbox/index.tsx
581
- import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
582
- var Checkbox = forwardRef9(function Checkbox2({ checked = false, onChange, label: label7, disabled: disabled3 = false, id, ...rest }, ref) {
679
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
680
+ var Checkbox = forwardRef9(function Checkbox2({ checked = false, onChange, label: label7, disabled: disabled3 = false, id, testId, ...rest }, ref) {
583
681
  const { root: root24, input: input6, box: box2, check: check2 } = useStyles9({ checked, disabled: disabled3 });
682
+ const { testId: dataTestId } = useTestId("toggle", testId);
584
683
  const handleChange = (e) => {
585
684
  if (disabled3) return;
586
685
  onChange?.(e.target.checked);
587
686
  };
588
- return /* @__PURE__ */ jsxs6("label", { className: root24, children: [
589
- /* @__PURE__ */ jsx12(
687
+ return /* @__PURE__ */ jsxs6("label", { className: root24, "data-testid": dataTestId, "data-state": states({ checked, disabled: disabled3 }), children: [
688
+ /* @__PURE__ */ jsx13(
590
689
  "input",
591
690
  {
592
691
  ref,
@@ -599,7 +698,7 @@ var Checkbox = forwardRef9(function Checkbox2({ checked = false, onChange, label
599
698
  ...rest
600
699
  }
601
700
  ),
602
- /* @__PURE__ */ jsx12("span", { className: box2, children: checked && /* @__PURE__ */ jsx12(CheckIcon, { size: 12, className: check2 }) }),
701
+ /* @__PURE__ */ jsx13("span", { className: box2, children: checked && /* @__PURE__ */ jsx13(CheckIcon, { size: 12, className: check2 }) }),
603
702
  label7
604
703
  ] });
605
704
  });
@@ -608,7 +707,7 @@ var Checkbox = forwardRef9(function Checkbox2({ checked = false, onChange, label
608
707
  import { forwardRef as forwardRef10 } from "react";
609
708
 
610
709
  // src/components/radio/use-styles.ts
611
- import { useMemo as useMemo10 } from "react";
710
+ import { useMemo as useMemo12 } from "react";
612
711
 
613
712
  // src/components/radio/use-styles.css.ts
614
713
  var circle = "use-styles_circle__vy61b42";
@@ -624,7 +723,7 @@ function useStyles10({
624
723
  className
625
724
  }) {
626
725
  const { themeClass } = useTheme();
627
- const root24 = useMemo10(
726
+ const root24 = useMemo12(
628
727
  () => [themeClass, root7, disabled3 && disabled2, className].filter(Boolean).join(" "),
629
728
  [themeClass, disabled3, className]
630
729
  );
@@ -638,11 +737,12 @@ function useStyles10({
638
737
  }
639
738
 
640
739
  // src/components/radio/index.tsx
641
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
642
- var Radio = forwardRef10(function Radio2({ checked, onChange, label: label7, name, value, disabled: disabled3, ...rest }, ref) {
740
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
741
+ var Radio = forwardRef10(function Radio2({ checked, onChange, label: label7, name, value, disabled: disabled3, testId, ...rest }, ref) {
643
742
  const { root: root24, input: input6, circle: circle2, dot: dot3, label: labelClass } = useStyles10({ disabled: disabled3 });
644
- return /* @__PURE__ */ jsxs7("label", { className: root24, children: [
645
- /* @__PURE__ */ jsx13(
743
+ const { testId: dataTestId } = useTestId("toggle", testId);
744
+ return /* @__PURE__ */ jsxs7("label", { className: root24, "data-testid": dataTestId, "data-state": states({ checked, disabled: disabled3 }), children: [
745
+ /* @__PURE__ */ jsx14(
646
746
  "input",
647
747
  {
648
748
  ref,
@@ -656,8 +756,8 @@ var Radio = forwardRef10(function Radio2({ checked, onChange, label: label7, nam
656
756
  ...rest
657
757
  }
658
758
  ),
659
- /* @__PURE__ */ jsx13("span", { className: circle2, children: checked && /* @__PURE__ */ jsx13("span", { className: dot3 }) }),
660
- label7 != null && /* @__PURE__ */ jsx13("span", { className: labelClass, children: label7 })
759
+ /* @__PURE__ */ jsx14("span", { className: circle2, children: checked && /* @__PURE__ */ jsx14("span", { className: dot3 }) }),
760
+ label7 != null && /* @__PURE__ */ jsx14("span", { className: labelClass, children: label7 })
661
761
  ] });
662
762
  });
663
763
 
@@ -665,7 +765,7 @@ var Radio = forwardRef10(function Radio2({ checked, onChange, label: label7, nam
665
765
  import { forwardRef as forwardRef11 } from "react";
666
766
 
667
767
  // src/components/switch/use-styles.ts
668
- import { useMemo as useMemo11 } from "react";
768
+ import { useMemo as useMemo13 } from "react";
669
769
 
670
770
  // src/components/switch/use-styles.css.ts
671
771
  var input3 = "surfaces_srOnly__1qa7atn0";
@@ -679,7 +779,7 @@ var trackChecked = "use-styles_trackChecked__1r6kem72";
679
779
  // src/components/switch/use-styles.ts
680
780
  function useStyles11({ checked }) {
681
781
  const { themeClass } = useTheme();
682
- return useMemo11(
782
+ return useMemo13(
683
783
  () => ({
684
784
  root: [themeClass, root8].filter(Boolean).join(" "),
685
785
  input: input3,
@@ -692,11 +792,12 @@ function useStyles11({ checked }) {
692
792
  }
693
793
 
694
794
  // src/components/switch/index.tsx
695
- import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
696
- var Switch = forwardRef11(function Switch2({ checked = false, onChange, label: label7, disabled: disabled3, ...rest }, ref) {
795
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
796
+ var Switch = forwardRef11(function Switch2({ checked = false, onChange, label: label7, disabled: disabled3, testId, ...rest }, ref) {
697
797
  const { root: root24, input: input6, track: track4, knob: knob2, label: labelClass } = useStyles11({ checked });
698
- return /* @__PURE__ */ jsxs8("label", { className: root24, children: [
699
- /* @__PURE__ */ jsx14(
798
+ const { testId: dataTestId } = useTestId("toggle", testId);
799
+ return /* @__PURE__ */ jsxs8("label", { className: root24, "data-testid": dataTestId, "data-state": states({ checked, disabled: disabled3 }), children: [
800
+ /* @__PURE__ */ jsx15(
700
801
  "input",
701
802
  {
702
803
  ref,
@@ -713,8 +814,8 @@ var Switch = forwardRef11(function Switch2({ checked = false, onChange, label: l
713
814
  ...rest
714
815
  }
715
816
  ),
716
- /* @__PURE__ */ jsx14("span", { className: track4, children: /* @__PURE__ */ jsx14("span", { className: knob2 }) }),
717
- label7 != null && /* @__PURE__ */ jsx14("span", { className: labelClass, children: label7 })
817
+ /* @__PURE__ */ jsx15("span", { className: track4, children: /* @__PURE__ */ jsx15("span", { className: knob2 }) }),
818
+ label7 != null && /* @__PURE__ */ jsx15("span", { className: labelClass, children: label7 })
718
819
  ] });
719
820
  });
720
821
 
@@ -725,7 +826,7 @@ import { forwardRef as forwardRef13 } from "react";
725
826
  import { forwardRef as forwardRef12, useId } from "react";
726
827
 
727
828
  // src/components/base-field/use-styles.ts
728
- import { useMemo as useMemo12 } from "react";
829
+ import { useMemo as useMemo14 } from "react";
729
830
 
730
831
  // src/components/base-field/use-styles.css.ts
731
832
  var field = "use-styles_field__1c3cgd3";
@@ -744,7 +845,7 @@ var trailingSlot = "use-styles_trailingSlot__1c3cgdb";
744
845
  // src/components/base-field/use-styles.ts
745
846
  function useStyles12({ error, hasStartIcon, hasTrailing, className }) {
746
847
  const { themeClass } = useTheme();
747
- return useMemo12(() => {
848
+ return useMemo14(() => {
748
849
  const root24 = [themeClass, root9].filter(Boolean).join(" ");
749
850
  const labelText2 = [labelText, error && labelTextError].filter(Boolean).join(" ");
750
851
  const input6 = [
@@ -768,8 +869,8 @@ function useStyles12({ error, hasStartIcon, hasTrailing, className }) {
768
869
  }
769
870
 
770
871
  // src/components/base-field/index.tsx
771
- import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
772
- var BaseField = forwardRef12(function BaseField2({ label: label7, help, error, startIcon: StartIcon, trailing: trailing2, id, className, children }, ref) {
872
+ import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
873
+ var BaseField = forwardRef12(function BaseField2({ label: label7, help, error, startIcon: StartIcon, trailing: trailing2, id, className, testId, children }, ref) {
773
874
  const autoId = useId();
774
875
  const controlId = id ?? autoId;
775
876
  const errorMessage = error != null && error !== false && error !== true && error !== "" ? error : null;
@@ -782,27 +883,30 @@ var BaseField = forwardRef12(function BaseField2({ label: label7, help, error, s
782
883
  hasTrailing: trailing2 != null,
783
884
  className
784
885
  });
886
+ const { testId: rootTestId, slot } = useTestId("field", testId);
785
887
  const control = {
786
888
  id: controlId,
787
889
  className: classes.input,
788
890
  ref,
789
891
  "aria-describedby": messageId,
790
- "aria-invalid": hasError ? true : void 0
892
+ "aria-invalid": hasError ? true : void 0,
893
+ "data-testid": slot("input")
791
894
  };
792
- return /* @__PURE__ */ jsxs9("div", { className: classes.root, children: [
793
- label7 != null && /* @__PURE__ */ jsx15("label", { htmlFor: controlId, className: classes.labelText, children: label7 }),
895
+ return /* @__PURE__ */ jsxs9("div", { className: classes.root, "data-testid": rootTestId, "data-state": states({ error: hasError }), children: [
896
+ label7 != null && /* @__PURE__ */ jsx16("label", { htmlFor: controlId, className: classes.labelText, "data-testid": slot("label"), children: label7 }),
794
897
  /* @__PURE__ */ jsxs9("div", { className: classes.field, children: [
795
- StartIcon != null && /* @__PURE__ */ jsx15("span", { className: classes.startIconSlot, children: /* @__PURE__ */ jsx15(StartIcon, { size: 18 }) }),
898
+ StartIcon != null && /* @__PURE__ */ jsx16("span", { className: classes.startIconSlot, children: /* @__PURE__ */ jsx16(StartIcon, { size: 18 }) }),
796
899
  children(control),
797
- trailing2 != null && /* @__PURE__ */ jsx15("span", { className: classes.trailingSlot, children: trailing2 })
900
+ trailing2 != null && /* @__PURE__ */ jsx16("span", { className: classes.trailingSlot, children: trailing2 })
798
901
  ] }),
799
902
  message2 != null && // `aria-live` solo cuando el mensaje es un error: anuncia la validación al aparecer.
800
- /* @__PURE__ */ jsx15(
903
+ /* @__PURE__ */ jsx16(
801
904
  "span",
802
905
  {
803
906
  id: messageId,
804
907
  className: classes.helpText,
805
908
  "aria-live": errorMessage ? "polite" : void 0,
909
+ "data-testid": slot("message"),
806
910
  children: message2
807
911
  }
808
912
  )
@@ -810,7 +914,7 @@ var BaseField = forwardRef12(function BaseField2({ label: label7, help, error, s
810
914
  });
811
915
 
812
916
  // src/components/text-field/index.tsx
813
- import { jsx as jsx16 } from "react/jsx-runtime";
917
+ import { jsx as jsx17 } from "react/jsx-runtime";
814
918
  var TextField = forwardRef13(function TextField2({
815
919
  label: label7,
816
920
  help,
@@ -822,9 +926,11 @@ var TextField = forwardRef13(function TextField2({
822
926
  onChange,
823
927
  className,
824
928
  id,
929
+ testId,
825
930
  ...rest
826
931
  }, ref) {
827
- return /* @__PURE__ */ jsx16(
932
+ const rawTestId = rest["data-testid"];
933
+ return /* @__PURE__ */ jsx17(
828
934
  BaseField,
829
935
  {
830
936
  ref,
@@ -834,23 +940,26 @@ var TextField = forwardRef13(function TextField2({
834
940
  startIcon,
835
941
  id,
836
942
  className,
943
+ testId,
837
944
  children: ({ ref: controlRef, ...control }) => multiline ? (
838
945
  // En multiline el control es un <textarea>: no reenviamos `controlRef` porque el
839
946
  // tipo público de la ref es HTMLInputElement (la ref aplica solo a la rama <input>).
840
- /* @__PURE__ */ jsx16(
947
+ /* @__PURE__ */ jsx17(
841
948
  "textarea",
842
949
  {
843
950
  ...rest,
844
951
  ...control,
952
+ "data-testid": rawTestId ?? control["data-testid"],
845
953
  rows: rows ?? 4,
846
954
  onChange: (e) => onChange?.(e.target.value)
847
955
  }
848
956
  )
849
- ) : /* @__PURE__ */ jsx16(
957
+ ) : /* @__PURE__ */ jsx17(
850
958
  "input",
851
959
  {
852
960
  ...rest,
853
961
  ...control,
962
+ "data-testid": rawTestId ?? control["data-testid"],
854
963
  ref: controlRef,
855
964
  type,
856
965
  onChange: (e) => onChange?.(e.target.value)
@@ -864,7 +973,7 @@ var TextField = forwardRef13(function TextField2({
864
973
  import { forwardRef as forwardRef14, useState as useState3 } from "react";
865
974
 
866
975
  // src/components/icons/eye/index.tsx
867
- import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
976
+ import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
868
977
  function EyeIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
869
978
  return /* @__PURE__ */ jsxs10(
870
979
  "svg",
@@ -881,15 +990,15 @@ function EyeIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
881
990
  "aria-hidden": "true",
882
991
  ...rest,
883
992
  children: [
884
- /* @__PURE__ */ jsx17("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
885
- /* @__PURE__ */ jsx17("circle", { cx: "12", cy: "12", r: "3" })
993
+ /* @__PURE__ */ jsx18("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
994
+ /* @__PURE__ */ jsx18("circle", { cx: "12", cy: "12", r: "3" })
886
995
  ]
887
996
  }
888
997
  );
889
998
  }
890
999
 
891
1000
  // src/components/icons/eye-off/index.tsx
892
- import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
1001
+ import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
893
1002
  function EyeOffIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
894
1003
  return /* @__PURE__ */ jsxs11(
895
1004
  "svg",
@@ -906,28 +1015,28 @@ function EyeOffIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
906
1015
  "aria-hidden": "true",
907
1016
  ...rest,
908
1017
  children: [
909
- /* @__PURE__ */ jsx18("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
910
- /* @__PURE__ */ jsx18("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
911
- /* @__PURE__ */ jsx18("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
912
- /* @__PURE__ */ jsx18("path", { d: "m2 2 20 20" })
1018
+ /* @__PURE__ */ jsx19("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
1019
+ /* @__PURE__ */ jsx19("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
1020
+ /* @__PURE__ */ jsx19("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
1021
+ /* @__PURE__ */ jsx19("path", { d: "m2 2 20 20" })
913
1022
  ]
914
1023
  }
915
1024
  );
916
1025
  }
917
1026
 
918
1027
  // src/components/password-field/use-styles.ts
919
- import { useMemo as useMemo13 } from "react";
1028
+ import { useMemo as useMemo15 } from "react";
920
1029
 
921
1030
  // src/components/password-field/use-styles.css.ts
922
1031
  var revealButton = "use-styles_revealButton__rsu9d50";
923
1032
 
924
1033
  // src/components/password-field/use-styles.ts
925
1034
  function useStyles13() {
926
- return useMemo13(() => ({ revealButton }), []);
1035
+ return useMemo15(() => ({ revealButton }), []);
927
1036
  }
928
1037
 
929
1038
  // src/components/password-field/index.tsx
930
- import { jsx as jsx19 } from "react/jsx-runtime";
1039
+ import { jsx as jsx20 } from "react/jsx-runtime";
931
1040
  var PasswordField = forwardRef14(
932
1041
  function PasswordField2({ label: label7, help, error, startIcon, onChange, id, className, ...rest }, ref) {
933
1042
  const [reveal, setReveal] = useState3(false);
@@ -938,7 +1047,7 @@ var PasswordField = forwardRef14(
938
1047
  const handleToggleMouseDown = (e) => {
939
1048
  e.preventDefault();
940
1049
  };
941
- const toggleButton = /* @__PURE__ */ jsx19(
1050
+ const toggleButton = /* @__PURE__ */ jsx20(
942
1051
  "button",
943
1052
  {
944
1053
  type: "button",
@@ -947,10 +1056,10 @@ var PasswordField = forwardRef14(
947
1056
  "aria-label": reveal ? "Ocultar contrase\xF1a" : "Mostrar contrase\xF1a",
948
1057
  onMouseDown: handleToggleMouseDown,
949
1058
  onClick: () => setReveal((r) => !r),
950
- children: reveal ? /* @__PURE__ */ jsx19(EyeOffIcon, { size: 18 }) : /* @__PURE__ */ jsx19(EyeIcon, { size: 18 })
1059
+ children: reveal ? /* @__PURE__ */ jsx20(EyeOffIcon, { size: 18 }) : /* @__PURE__ */ jsx20(EyeIcon, { size: 18 })
951
1060
  }
952
1061
  );
953
- return /* @__PURE__ */ jsx19(
1062
+ return /* @__PURE__ */ jsx20(
954
1063
  BaseField,
955
1064
  {
956
1065
  ref,
@@ -961,7 +1070,7 @@ var PasswordField = forwardRef14(
961
1070
  trailing: toggleButton,
962
1071
  id,
963
1072
  className,
964
- children: (control) => /* @__PURE__ */ jsx19(
1073
+ children: (control) => /* @__PURE__ */ jsx20(
965
1074
  "input",
966
1075
  {
967
1076
  ...rest,
@@ -976,8 +1085,8 @@ var PasswordField = forwardRef14(
976
1085
  );
977
1086
 
978
1087
  // src/components/money-field/index.tsx
979
- import { forwardRef as forwardRef15, useMemo as useMemo14, useState as useState4 } from "react";
980
- import { jsx as jsx20 } from "react/jsx-runtime";
1088
+ import { forwardRef as forwardRef15, useMemo as useMemo16, useState as useState4 } from "react";
1089
+ import { jsx as jsx21 } from "react/jsx-runtime";
981
1090
  function parseAmount(raw) {
982
1091
  const cleaned = raw.replace(/[^0-9.-]/g, "");
983
1092
  if (cleaned === "" || cleaned === "-" || cleaned === ".") return null;
@@ -1001,7 +1110,7 @@ var MoneyField = forwardRef15(function MoneyField2({
1001
1110
  }, ref) {
1002
1111
  const [focused, setFocused] = useState4(false);
1003
1112
  const [draft, setDraft] = useState4("");
1004
- const formatter = useMemo14(
1113
+ const formatter = useMemo16(
1005
1114
  () => new Intl.NumberFormat(locale, { style: "currency", currency }),
1006
1115
  [locale, currency]
1007
1116
  );
@@ -1017,7 +1126,7 @@ var MoneyField = forwardRef15(function MoneyField2({
1017
1126
  onChange?.(parseAmount(draft));
1018
1127
  onBlur?.(e);
1019
1128
  };
1020
- return /* @__PURE__ */ jsx20(
1129
+ return /* @__PURE__ */ jsx21(
1021
1130
  BaseField,
1022
1131
  {
1023
1132
  ref,
@@ -1027,7 +1136,7 @@ var MoneyField = forwardRef15(function MoneyField2({
1027
1136
  startIcon,
1028
1137
  id,
1029
1138
  className,
1030
- children: (control) => /* @__PURE__ */ jsx20(
1139
+ children: (control) => /* @__PURE__ */ jsx21(
1031
1140
  "input",
1032
1141
  {
1033
1142
  ...rest,
@@ -1047,7 +1156,7 @@ var MoneyField = forwardRef15(function MoneyField2({
1047
1156
  import { forwardRef as forwardRef16 } from "react";
1048
1157
 
1049
1158
  // src/components/icon-button/use-styles.ts
1050
- import { useMemo as useMemo15 } from "react";
1159
+ import { useMemo as useMemo17 } from "react";
1051
1160
 
1052
1161
  // src/components/icon-button/use-styles.css.ts
1053
1162
  var accent = "use-styles_accent__18np0q02";
@@ -1060,7 +1169,7 @@ function useStyles14({
1060
1169
  tone: tone4 = "ink"
1061
1170
  }) {
1062
1171
  const { themeClass } = useTheme();
1063
- const root24 = useMemo15(
1172
+ const root24 = useMemo17(
1064
1173
  () => [themeClass, root10, tone4 === "accent" && accent, active2 && active].filter(Boolean).join(" "),
1065
1174
  [themeClass, active2, tone4]
1066
1175
  );
@@ -1068,8 +1177,8 @@ function useStyles14({
1068
1177
  }
1069
1178
 
1070
1179
  // src/components/icon-button/index.tsx
1071
- import { jsx as jsx21 } from "react/jsx-runtime";
1072
- var IconButton = forwardRef16(function IconButton2({ icon: Icon, active: active2, tone: tone4, title, type = "button", ...rest }, ref) {
1180
+ import { jsx as jsx22 } from "react/jsx-runtime";
1181
+ var IconButton = forwardRef16(function IconButton2({ icon: Icon, active: active2, tone: tone4, title, type = "button", testId, ...rest }, ref) {
1073
1182
  if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
1074
1183
  const restProps = rest;
1075
1184
  const hasName = title.trim() !== "" || restProps["aria-label"] != null || restProps["aria-labelledby"] != null;
@@ -1078,14 +1187,28 @@ var IconButton = forwardRef16(function IconButton2({ icon: Icon, active: active2
1078
1187
  }
1079
1188
  }
1080
1189
  const { root: root24 } = useStyles14({ active: active2, tone: tone4 });
1081
- return /* @__PURE__ */ jsx21("button", { ref, type, className: root24, "aria-label": title, title, ...rest, children: /* @__PURE__ */ jsx21(Icon, { size: 18 }) });
1190
+ const { testId: dataTestId } = useTestId("button", testId);
1191
+ return /* @__PURE__ */ jsx22(
1192
+ "button",
1193
+ {
1194
+ ref,
1195
+ type,
1196
+ className: root24,
1197
+ "aria-label": title,
1198
+ title,
1199
+ "data-testid": dataTestId,
1200
+ "data-state": states({ active: active2, disabled: rest.disabled }),
1201
+ ...rest,
1202
+ children: /* @__PURE__ */ jsx22(Icon, { size: 18 })
1203
+ }
1204
+ );
1082
1205
  });
1083
1206
 
1084
1207
  // src/components/card/index.tsx
1085
1208
  import { forwardRef as forwardRef17 } from "react";
1086
1209
 
1087
1210
  // src/components/card/use-styles.ts
1088
- import { useMemo as useMemo16 } from "react";
1211
+ import { useMemo as useMemo18 } from "react";
1089
1212
 
1090
1213
  // src/components/card/use-styles.css.ts
1091
1214
  var body = "use-styles_body__1fuvd022";
@@ -1096,27 +1219,28 @@ var root11 = "use-styles_root__1fuvd020";
1096
1219
  // src/components/card/use-styles.ts
1097
1220
  function useStyles15() {
1098
1221
  const { themeClass } = useTheme();
1099
- const root24 = useMemo16(() => `${themeClass} ${root11}`, [themeClass]);
1222
+ const root24 = useMemo18(() => `${themeClass} ${root11}`, [themeClass]);
1100
1223
  return { root: root24, header, body, footer };
1101
1224
  }
1102
1225
 
1103
1226
  // src/components/card/index.tsx
1104
- import { jsx as jsx22 } from "react/jsx-runtime";
1105
- var CardRoot = forwardRef17(function Card({ children, ...rest }, ref) {
1227
+ import { jsx as jsx23 } from "react/jsx-runtime";
1228
+ var CardRoot = forwardRef17(function Card({ children, testId, ...rest }, ref) {
1106
1229
  const { root: root24 } = useStyles15();
1107
- return /* @__PURE__ */ jsx22("div", { ref, className: root24, ...rest, children });
1230
+ const { testId: dataTestId } = useTestId("layout", testId);
1231
+ return /* @__PURE__ */ jsx23("div", { ref, className: root24, "data-testid": dataTestId, ...rest, children });
1108
1232
  });
1109
1233
  function CardHeader({ children, ...rest }) {
1110
1234
  const { header: header3 } = useStyles15();
1111
- return /* @__PURE__ */ jsx22("div", { className: header3, ...rest, children });
1235
+ return /* @__PURE__ */ jsx23("div", { className: header3, ...rest, children });
1112
1236
  }
1113
1237
  function CardBody({ children, ...rest }) {
1114
1238
  const { body: body3 } = useStyles15();
1115
- return /* @__PURE__ */ jsx22("div", { className: body3, ...rest, children });
1239
+ return /* @__PURE__ */ jsx23("div", { className: body3, ...rest, children });
1116
1240
  }
1117
1241
  function CardFooter({ children, ...rest }) {
1118
1242
  const { footer: footer2 } = useStyles15();
1119
- return /* @__PURE__ */ jsx22("div", { className: footer2, ...rest, children });
1243
+ return /* @__PURE__ */ jsx23("div", { className: footer2, ...rest, children });
1120
1244
  }
1121
1245
  CardRoot.displayName = "Card";
1122
1246
  CardHeader.displayName = "Card.Header";
@@ -1132,7 +1256,7 @@ var Card2 = Object.assign(CardRoot, {
1132
1256
  import { forwardRef as forwardRef18 } from "react";
1133
1257
 
1134
1258
  // src/components/icons/circle-check/index.tsx
1135
- import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
1259
+ import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
1136
1260
  function CircleCheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1137
1261
  return /* @__PURE__ */ jsxs12(
1138
1262
  "svg",
@@ -1149,15 +1273,15 @@ function CircleCheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1149
1273
  "aria-hidden": "true",
1150
1274
  ...rest,
1151
1275
  children: [
1152
- /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
1153
- /* @__PURE__ */ jsx23("path", { d: "m9 12 2 2 4-4" })
1276
+ /* @__PURE__ */ jsx24("circle", { cx: "12", cy: "12", r: "10" }),
1277
+ /* @__PURE__ */ jsx24("path", { d: "m9 12 2 2 4-4" })
1154
1278
  ]
1155
1279
  }
1156
1280
  );
1157
1281
  }
1158
1282
 
1159
1283
  // src/components/icons/circle-x/index.tsx
1160
- import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
1284
+ import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
1161
1285
  function CircleXIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1162
1286
  return /* @__PURE__ */ jsxs13(
1163
1287
  "svg",
@@ -1174,16 +1298,16 @@ function CircleXIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1174
1298
  "aria-hidden": "true",
1175
1299
  ...rest,
1176
1300
  children: [
1177
- /* @__PURE__ */ jsx24("circle", { cx: "12", cy: "12", r: "10" }),
1178
- /* @__PURE__ */ jsx24("path", { d: "m15 9-6 6" }),
1179
- /* @__PURE__ */ jsx24("path", { d: "m9 9 6 6" })
1301
+ /* @__PURE__ */ jsx25("circle", { cx: "12", cy: "12", r: "10" }),
1302
+ /* @__PURE__ */ jsx25("path", { d: "m15 9-6 6" }),
1303
+ /* @__PURE__ */ jsx25("path", { d: "m9 9 6 6" })
1180
1304
  ]
1181
1305
  }
1182
1306
  );
1183
1307
  }
1184
1308
 
1185
1309
  // src/components/icons/info/index.tsx
1186
- import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
1310
+ import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
1187
1311
  function InfoIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1188
1312
  return /* @__PURE__ */ jsxs14(
1189
1313
  "svg",
@@ -1200,16 +1324,16 @@ function InfoIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1200
1324
  "aria-hidden": "true",
1201
1325
  ...rest,
1202
1326
  children: [
1203
- /* @__PURE__ */ jsx25("circle", { cx: "12", cy: "12", r: "10" }),
1204
- /* @__PURE__ */ jsx25("path", { d: "M12 16v-4" }),
1205
- /* @__PURE__ */ jsx25("path", { d: "M12 8h.01" })
1327
+ /* @__PURE__ */ jsx26("circle", { cx: "12", cy: "12", r: "10" }),
1328
+ /* @__PURE__ */ jsx26("path", { d: "M12 16v-4" }),
1329
+ /* @__PURE__ */ jsx26("path", { d: "M12 8h.01" })
1206
1330
  ]
1207
1331
  }
1208
1332
  );
1209
1333
  }
1210
1334
 
1211
1335
  // src/components/icons/triangle-alert/index.tsx
1212
- import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
1336
+ import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
1213
1337
  function TriangleAlertIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1214
1338
  return /* @__PURE__ */ jsxs15(
1215
1339
  "svg",
@@ -1226,16 +1350,16 @@ function TriangleAlertIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1226
1350
  "aria-hidden": "true",
1227
1351
  ...rest,
1228
1352
  children: [
1229
- /* @__PURE__ */ jsx26("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
1230
- /* @__PURE__ */ jsx26("path", { d: "M12 9v4" }),
1231
- /* @__PURE__ */ jsx26("path", { d: "M12 17h.01" })
1353
+ /* @__PURE__ */ jsx27("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
1354
+ /* @__PURE__ */ jsx27("path", { d: "M12 9v4" }),
1355
+ /* @__PURE__ */ jsx27("path", { d: "M12 17h.01" })
1232
1356
  ]
1233
1357
  }
1234
1358
  );
1235
1359
  }
1236
1360
 
1237
1361
  // src/components/alert/use-styles.ts
1238
- import { useMemo as useMemo17 } from "react";
1362
+ import { useMemo as useMemo19 } from "react";
1239
1363
 
1240
1364
  // src/components/alert/use-styles.css.ts
1241
1365
  var content = "use-styles_content__ivsh6u6";
@@ -1249,7 +1373,7 @@ function useStyles16({
1249
1373
  className
1250
1374
  }) {
1251
1375
  const { themeClass } = useTheme();
1252
- const root24 = useMemo17(
1376
+ const root24 = useMemo19(
1253
1377
  () => [themeClass, root12, severity[severity2], className].filter(Boolean).join(" "),
1254
1378
  [themeClass, severity2, className]
1255
1379
  );
@@ -1261,21 +1385,22 @@ function useStyles16({
1261
1385
  }
1262
1386
 
1263
1387
  // src/components/alert/index.tsx
1264
- import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
1388
+ import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
1265
1389
  var defaultIcons = {
1266
1390
  info: InfoIcon,
1267
1391
  ok: CircleCheckIcon,
1268
1392
  warn: TriangleAlertIcon,
1269
1393
  danger: CircleXIcon
1270
1394
  };
1271
- var Alert = forwardRef18(function Alert2({ severity: severity2 = "info", title, icon, className, children, ...rest }, ref) {
1395
+ var Alert = forwardRef18(function Alert2({ severity: severity2 = "info", title, icon, className, testId, children, ...rest }, ref) {
1272
1396
  const styles = useStyles16({ severity: severity2, className });
1397
+ const { testId: dataTestId, slot } = useTestId("feedback", testId);
1273
1398
  const IconComponent = icon ?? defaultIcons[severity2];
1274
- return /* @__PURE__ */ jsxs16("div", { ref, role: "alert", className: styles.root, ...rest, children: [
1275
- /* @__PURE__ */ jsx27("span", { className: styles.iconSlot, children: /* @__PURE__ */ jsx27(IconComponent, {}) }),
1276
- /* @__PURE__ */ jsxs16("div", { className: styles.content, children: [
1277
- title != null && /* @__PURE__ */ jsx27(Typography, { variant: "h4", children: title }),
1278
- children != null && /* @__PURE__ */ jsx27(Typography, { variant: "body", color: "fg2", children })
1399
+ return /* @__PURE__ */ jsxs16("div", { ref, role: "alert", className: styles.root, "data-testid": dataTestId, ...rest, children: [
1400
+ /* @__PURE__ */ jsx28("span", { className: styles.iconSlot, "data-testid": slot("icon"), children: /* @__PURE__ */ jsx28(IconComponent, {}) }),
1401
+ /* @__PURE__ */ jsxs16("div", { className: styles.content, "data-testid": slot("content"), children: [
1402
+ title != null && /* @__PURE__ */ jsx28(Typography, { variant: "h4", children: title }),
1403
+ children != null && /* @__PURE__ */ jsx28(Typography, { variant: "body", color: "fg2", children })
1279
1404
  ] })
1280
1405
  ] });
1281
1406
  });
@@ -1291,7 +1416,7 @@ import {
1291
1416
  } from "react";
1292
1417
 
1293
1418
  // src/components/tooltip/use-styles.ts
1294
- import { useMemo as useMemo18 } from "react";
1419
+ import { useMemo as useMemo20 } from "react";
1295
1420
 
1296
1421
  // src/components/tooltip/use-styles.css.ts
1297
1422
  var bubble = "use-styles_bubble__h9kvh1 surfaces_inkySurface__1qa7atn2";
@@ -1303,11 +1428,11 @@ function useStyles17({
1303
1428
  placement: placement2 = "top"
1304
1429
  }) {
1305
1430
  const { themeClass } = useTheme();
1306
- const wrapper4 = useMemo18(
1431
+ const wrapper4 = useMemo20(
1307
1432
  () => [themeClass, wrapper].filter(Boolean).join(" "),
1308
1433
  [themeClass]
1309
1434
  );
1310
- const bubble2 = useMemo18(
1435
+ const bubble2 = useMemo20(
1311
1436
  () => [bubble, placement[placement2]].filter(Boolean).join(" "),
1312
1437
  [placement2]
1313
1438
  );
@@ -1315,12 +1440,13 @@ function useStyles17({
1315
1440
  }
1316
1441
 
1317
1442
  // src/components/tooltip/index.tsx
1318
- import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
1443
+ import { jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
1319
1444
  var HIDE_DELAY = 120;
1320
- var Tooltip = forwardRef19(function Tooltip2({ label: label7, children, placement: placement2 }, ref) {
1445
+ var Tooltip = forwardRef19(function Tooltip2({ label: label7, children, placement: placement2, testId }, ref) {
1321
1446
  const [open, setOpen] = useState5(false);
1322
1447
  const tooltipId = useId2();
1323
1448
  const { wrapper: wrapper4, bubble: bubble2 } = useStyles17({ placement: placement2 });
1449
+ const { testId: dataTestId, slot } = useTestId("feedback", testId);
1324
1450
  const hideTimer = useRef2(null);
1325
1451
  const clearHide = () => {
1326
1452
  if (hideTimer.current) {
@@ -1359,6 +1485,7 @@ var Tooltip = forwardRef19(function Tooltip2({ label: label7, children, placemen
1359
1485
  {
1360
1486
  ref,
1361
1487
  className: wrapper4,
1488
+ "data-testid": dataTestId,
1362
1489
  onMouseEnter: show,
1363
1490
  onMouseLeave: scheduleHide,
1364
1491
  onFocus: show,
@@ -1366,12 +1493,13 @@ var Tooltip = forwardRef19(function Tooltip2({ label: label7, children, placemen
1366
1493
  onKeyDown: handleKeyDown,
1367
1494
  children: [
1368
1495
  trigger2,
1369
- open && /* @__PURE__ */ jsx28(
1496
+ open && /* @__PURE__ */ jsx29(
1370
1497
  "span",
1371
1498
  {
1372
1499
  id: tooltipId,
1373
1500
  role: "tooltip",
1374
1501
  className: bubble2,
1502
+ "data-testid": slot("bubble"),
1375
1503
  onMouseEnter: show,
1376
1504
  onMouseLeave: scheduleHide,
1377
1505
  children: label7
@@ -1386,9 +1514,9 @@ var Tooltip = forwardRef19(function Tooltip2({ label: label7, children, placemen
1386
1514
  import { forwardRef as forwardRef20, useEffect as useEffect4, useId as useId3, useRef as useRef3, useState as useState6 } from "react";
1387
1515
 
1388
1516
  // src/components/icons/chevron-down/index.tsx
1389
- import { jsx as jsx29 } from "react/jsx-runtime";
1517
+ import { jsx as jsx30 } from "react/jsx-runtime";
1390
1518
  function ChevronDownIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1391
- return /* @__PURE__ */ jsx29(
1519
+ return /* @__PURE__ */ jsx30(
1392
1520
  "svg",
1393
1521
  {
1394
1522
  xmlns: "http://www.w3.org/2000/svg",
@@ -1402,13 +1530,13 @@ function ChevronDownIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1402
1530
  strokeLinejoin: "round",
1403
1531
  "aria-hidden": "true",
1404
1532
  ...rest,
1405
- children: /* @__PURE__ */ jsx29("path", { d: "m6 9 6 6 6-6" })
1533
+ children: /* @__PURE__ */ jsx30("path", { d: "m6 9 6 6 6-6" })
1406
1534
  }
1407
1535
  );
1408
1536
  }
1409
1537
 
1410
1538
  // src/components/select/use-styles.ts
1411
- import { useMemo as useMemo19 } from "react";
1539
+ import { useMemo as useMemo21 } from "react";
1412
1540
 
1413
1541
  // src/components/select/use-styles.css.ts
1414
1542
  var chevron = "use-styles_chevron__1w1czpb4";
@@ -1427,7 +1555,7 @@ function useStyles18({
1427
1555
  open = false
1428
1556
  }) {
1429
1557
  const { themeClass } = useTheme();
1430
- return useMemo19(() => {
1558
+ return useMemo21(() => {
1431
1559
  const chevron3 = [chevron, open && chevronOpen].filter(Boolean).join(" ");
1432
1560
  return {
1433
1561
  root: [themeClass, root13].filter(Boolean).join(" "),
@@ -1442,7 +1570,7 @@ function useStyles18({
1442
1570
  }
1443
1571
 
1444
1572
  // src/components/select/index.tsx
1445
- import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
1573
+ import { jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
1446
1574
  var Select = forwardRef20(function Select2({ options, value, onChange, placeholder: placeholder2, label: label7, disabled: disabled3, ...rest }, ref) {
1447
1575
  const [open, setOpen] = useState6(false);
1448
1576
  const [activeIndex, setActiveIndex] = useState6(0);
@@ -1525,7 +1653,7 @@ var Select = forwardRef20(function Select2({ options, value, onChange, placehold
1525
1653
  }
1526
1654
  };
1527
1655
  return /* @__PURE__ */ jsxs18("div", { ref: setRootRef, className: root24, ...rest, children: [
1528
- label7 && /* @__PURE__ */ jsx30("span", { id: labelId, className: labelClass, children: label7 }),
1656
+ label7 && /* @__PURE__ */ jsx31("span", { id: labelId, className: labelClass, children: label7 }),
1529
1657
  /* @__PURE__ */ jsxs18(
1530
1658
  "button",
1531
1659
  {
@@ -1546,17 +1674,17 @@ var Select = forwardRef20(function Select2({ options, value, onChange, placehold
1546
1674
  },
1547
1675
  onKeyDown: handleKeyDown,
1548
1676
  children: [
1549
- selected3 ? selected3.label : /* @__PURE__ */ jsx30("span", { className: placeholderClass, children: placeholder2 }),
1550
- /* @__PURE__ */ jsx30("span", { className: chevron3, children: /* @__PURE__ */ jsx30(ChevronDownIcon, { size: 18 }) })
1677
+ selected3 ? selected3.label : /* @__PURE__ */ jsx31("span", { className: placeholderClass, children: placeholder2 }),
1678
+ /* @__PURE__ */ jsx31("span", { className: chevron3, children: /* @__PURE__ */ jsx31(ChevronDownIcon, { size: 18 }) })
1551
1679
  ]
1552
1680
  }
1553
1681
  ),
1554
- open && /* @__PURE__ */ jsx30("div", { className: menu2, role: "listbox", children: options.map((option2, index) => {
1682
+ open && /* @__PURE__ */ jsx31("div", { className: menu2, role: "listbox", children: options.map((option2, index) => {
1555
1683
  const isSelected = option2.value === value;
1556
1684
  const isActive = index === activeIndex;
1557
1685
  return (
1558
1686
  // biome-ignore lint/a11y/useKeyWithClickEvents: keyboard nav lives on the trigger via aria-activedescendant; options are not focusable.
1559
- /* @__PURE__ */ jsx30(
1687
+ /* @__PURE__ */ jsx31(
1560
1688
  "div",
1561
1689
  {
1562
1690
  id: optionId(index),
@@ -1578,7 +1706,7 @@ var Select = forwardRef20(function Select2({ options, value, onChange, placehold
1578
1706
  import { forwardRef as forwardRef21 } from "react";
1579
1707
 
1580
1708
  // src/components/slider/use-styles.ts
1581
- import { useMemo as useMemo20 } from "react";
1709
+ import { useMemo as useMemo22 } from "react";
1582
1710
 
1583
1711
  // src/components/slider/use-styles.css.ts
1584
1712
  var input5 = "use-styles_input__okw59n3";
@@ -1592,7 +1720,7 @@ var wrapper2 = "use-styles_wrapper__okw59n6";
1592
1720
  // src/components/slider/use-styles.ts
1593
1721
  function useStyles19() {
1594
1722
  const { themeClass } = useTheme();
1595
- return useMemo20(() => {
1723
+ return useMemo22(() => {
1596
1724
  const root24 = [themeClass, root14].filter(Boolean).join(" ");
1597
1725
  return {
1598
1726
  wrapper: wrapper2,
@@ -1607,7 +1735,7 @@ function useStyles19() {
1607
1735
  }
1608
1736
 
1609
1737
  // src/components/slider/index.tsx
1610
- import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
1738
+ import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
1611
1739
  var Slider = forwardRef21(function Slider2({ value = 0, onChange, min = 0, max = 100, step: step2 = 1, disabled: disabled3, label: label7, ...rest }, ref) {
1612
1740
  const { wrapper: wrapper4, label: labelClass, root: root24, track: track4, range: range2, thumb: thumb2, input: input6 } = useStyles19();
1613
1741
  const span = max - min;
@@ -1617,11 +1745,11 @@ var Slider = forwardRef21(function Slider2({ value = 0, onChange, min = 0, max =
1617
1745
  onChange?.(Number(e.target.value));
1618
1746
  };
1619
1747
  return /* @__PURE__ */ jsxs19("span", { className: wrapper4, children: [
1620
- label7 ? /* @__PURE__ */ jsx31("span", { className: labelClass, children: label7 }) : null,
1748
+ label7 ? /* @__PURE__ */ jsx32("span", { className: labelClass, children: label7 }) : null,
1621
1749
  /* @__PURE__ */ jsxs19("span", { className: root24, children: [
1622
- /* @__PURE__ */ jsx31("span", { className: track4 }),
1623
- /* @__PURE__ */ jsx31("span", { className: range2, style: { width: `${clamped}%` } }),
1624
- /* @__PURE__ */ jsx31(
1750
+ /* @__PURE__ */ jsx32("span", { className: track4 }),
1751
+ /* @__PURE__ */ jsx32("span", { className: range2, style: { width: `${clamped}%` } }),
1752
+ /* @__PURE__ */ jsx32(
1625
1753
  "input",
1626
1754
  {
1627
1755
  ref,
@@ -1636,7 +1764,7 @@ var Slider = forwardRef21(function Slider2({ value = 0, onChange, min = 0, max =
1636
1764
  ...rest
1637
1765
  }
1638
1766
  ),
1639
- /* @__PURE__ */ jsx31("span", { className: thumb2, style: { left: `${clamped}%` } })
1767
+ /* @__PURE__ */ jsx32("span", { className: thumb2, style: { left: `${clamped}%` } })
1640
1768
  ] })
1641
1769
  ] });
1642
1770
  });
@@ -1645,7 +1773,7 @@ var Slider = forwardRef21(function Slider2({ value = 0, onChange, min = 0, max =
1645
1773
  import { forwardRef as forwardRef22, useState as useState7 } from "react";
1646
1774
 
1647
1775
  // src/components/accordion/use-styles.ts
1648
- import { useMemo as useMemo21 } from "react";
1776
+ import { useMemo as useMemo23 } from "react";
1649
1777
 
1650
1778
  // src/components/accordion/use-styles.css.ts
1651
1779
  var chevron2 = "use-styles_chevron__1cjrdh93";
@@ -1658,7 +1786,7 @@ var root15 = "use-styles_root__1cjrdh90";
1658
1786
  // src/components/accordion/use-styles.ts
1659
1787
  function useStyles20({ className }) {
1660
1788
  const { themeClass } = useTheme();
1661
- return useMemo21(
1789
+ return useMemo23(
1662
1790
  () => ({
1663
1791
  root: [themeClass, root15, className].filter(Boolean).join(" "),
1664
1792
  item,
@@ -1671,10 +1799,11 @@ function useStyles20({ className }) {
1671
1799
  }
1672
1800
 
1673
1801
  // src/components/accordion/index.tsx
1674
- import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
1675
- var Accordion = forwardRef22(function Accordion2({ items, multiple = false, defaultOpen = [], className }, ref) {
1802
+ import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
1803
+ var Accordion = forwardRef22(function Accordion2({ items, multiple = false, defaultOpen = [], className, testId }, ref) {
1676
1804
  const [open, setOpen] = useState7(defaultOpen);
1677
1805
  const { root: root24, item: item3, header: header3, chevronFor, panel: panel3 } = useStyles20({ className });
1806
+ const { testId: dataTestId, slot } = useTestId("layout", testId);
1678
1807
  const toggle = (id) => {
1679
1808
  setOpen((current2) => {
1680
1809
  const isOpen = current2.includes(id);
@@ -1682,28 +1811,49 @@ var Accordion = forwardRef22(function Accordion2({ items, multiple = false, defa
1682
1811
  return multiple ? [...current2, id] : [id];
1683
1812
  });
1684
1813
  };
1685
- return /* @__PURE__ */ jsx32("div", { ref, className: root24, children: items.map((it) => {
1814
+ return /* @__PURE__ */ jsx33("div", { ref, className: root24, "data-testid": dataTestId, children: items.map((it) => {
1686
1815
  const isOpen = open.includes(it.id);
1687
1816
  const panelId = `accordion-panel-${it.id}`;
1688
1817
  const headerId = `accordion-header-${it.id}`;
1689
- return /* @__PURE__ */ jsxs20("div", { className: item3, children: [
1690
- /* @__PURE__ */ jsxs20(
1691
- "button",
1692
- {
1693
- type: "button",
1694
- id: headerId,
1695
- className: header3,
1696
- "aria-expanded": isOpen,
1697
- "aria-controls": panelId,
1698
- onClick: () => toggle(it.id),
1699
- children: [
1700
- it.title,
1701
- /* @__PURE__ */ jsx32(ChevronDownIcon, { className: chevronFor(isOpen) })
1702
- ]
1703
- }
1704
- ),
1705
- isOpen && /* @__PURE__ */ jsx32("div", { id: panelId, className: panel3, role: "region", "aria-labelledby": headerId, children: it.content })
1706
- ] }, it.id);
1818
+ const itemSlot = slot(`item-${it.id}`);
1819
+ return /* @__PURE__ */ jsxs20(
1820
+ "div",
1821
+ {
1822
+ className: item3,
1823
+ "data-testid": itemSlot,
1824
+ "data-state": states({ expanded: isOpen }),
1825
+ children: [
1826
+ /* @__PURE__ */ jsxs20(
1827
+ "button",
1828
+ {
1829
+ type: "button",
1830
+ id: headerId,
1831
+ className: header3,
1832
+ "aria-expanded": isOpen,
1833
+ "aria-controls": panelId,
1834
+ "data-testid": `${itemSlot}__trigger`,
1835
+ onClick: () => toggle(it.id),
1836
+ children: [
1837
+ it.title,
1838
+ /* @__PURE__ */ jsx33(ChevronDownIcon, { className: chevronFor(isOpen) })
1839
+ ]
1840
+ }
1841
+ ),
1842
+ isOpen && /* @__PURE__ */ jsx33(
1843
+ "div",
1844
+ {
1845
+ id: panelId,
1846
+ className: panel3,
1847
+ role: "region",
1848
+ "aria-labelledby": headerId,
1849
+ "data-testid": `${itemSlot}__panel`,
1850
+ children: it.content
1851
+ }
1852
+ )
1853
+ ]
1854
+ },
1855
+ it.id
1856
+ );
1707
1857
  }) });
1708
1858
  });
1709
1859
 
@@ -1711,9 +1861,9 @@ var Accordion = forwardRef22(function Accordion2({ items, multiple = false, defa
1711
1861
  import { Fragment, forwardRef as forwardRef23 } from "react";
1712
1862
 
1713
1863
  // src/components/icons/chevron-right/index.tsx
1714
- import { jsx as jsx33 } from "react/jsx-runtime";
1864
+ import { jsx as jsx34 } from "react/jsx-runtime";
1715
1865
  function ChevronRightIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1716
- return /* @__PURE__ */ jsx33(
1866
+ return /* @__PURE__ */ jsx34(
1717
1867
  "svg",
1718
1868
  {
1719
1869
  xmlns: "http://www.w3.org/2000/svg",
@@ -1727,13 +1877,13 @@ function ChevronRightIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1727
1877
  strokeLinejoin: "round",
1728
1878
  "aria-hidden": "true",
1729
1879
  ...rest,
1730
- children: /* @__PURE__ */ jsx33("path", { d: "m9 18 6-6-6-6" })
1880
+ children: /* @__PURE__ */ jsx34("path", { d: "m9 18 6-6-6-6" })
1731
1881
  }
1732
1882
  );
1733
1883
  }
1734
1884
 
1735
1885
  // src/components/breadcrumbs/use-styles.ts
1736
- import { useMemo as useMemo22 } from "react";
1886
+ import { useMemo as useMemo24 } from "react";
1737
1887
 
1738
1888
  // src/components/breadcrumbs/use-styles.css.ts
1739
1889
  var crumb = "use-styles_crumb__7u0du61";
@@ -1744,7 +1894,7 @@ var separator = "use-styles_separator__7u0du63";
1744
1894
  // src/components/breadcrumbs/use-styles.ts
1745
1895
  function useStyles21({ className }) {
1746
1896
  const { themeClass } = useTheme();
1747
- const root24 = useMemo22(
1897
+ const root24 = useMemo24(
1748
1898
  () => [themeClass, root16, className].filter(Boolean).join(" "),
1749
1899
  [themeClass, className]
1750
1900
  );
@@ -1752,15 +1902,16 @@ function useStyles21({ className }) {
1752
1902
  }
1753
1903
 
1754
1904
  // src/components/breadcrumbs/index.tsx
1755
- import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
1756
- var Breadcrumbs = forwardRef23(function Breadcrumbs2({ items, className, ...rest }, ref) {
1905
+ import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
1906
+ var Breadcrumbs = forwardRef23(function Breadcrumbs2({ items, className, testId, ...rest }, ref) {
1757
1907
  const { root: root24, crumb: crumb2, current: current2, separator: separator2 } = useStyles21({ className });
1758
- return /* @__PURE__ */ jsx34("nav", { ref, "aria-label": "Breadcrumb", className: root24, ...rest, children: items.map((item3, index) => {
1908
+ const { testId: dataTestId, slot } = useTestId("nav", testId);
1909
+ return /* @__PURE__ */ jsx35("nav", { ref, "aria-label": "Breadcrumb", className: root24, "data-testid": dataTestId, ...rest, children: items.map((item3, index) => {
1759
1910
  const isLast = index === items.length - 1;
1760
1911
  const key = index;
1761
1912
  return /* @__PURE__ */ jsxs21(Fragment, { children: [
1762
- isLast ? /* @__PURE__ */ jsx34("span", { className: current2, "aria-current": "page", children: item3.label }) : item3.href ? /* @__PURE__ */ jsx34("a", { className: crumb2, href: item3.href, children: item3.label }) : /* @__PURE__ */ jsx34("span", { className: crumb2, children: item3.label }),
1763
- !isLast && /* @__PURE__ */ jsx34("span", { className: separator2, children: /* @__PURE__ */ jsx34(ChevronRightIcon, { size: 14 }) })
1913
+ isLast ? /* @__PURE__ */ jsx35("span", { className: current2, "aria-current": "page", "data-testid": slot(`crumb-${index}`), children: item3.label }) : item3.href ? /* @__PURE__ */ jsx35("a", { className: crumb2, href: item3.href, "data-testid": slot(`crumb-${index}`), children: item3.label }) : /* @__PURE__ */ jsx35("span", { className: crumb2, "data-testid": slot(`crumb-${index}`), children: item3.label }),
1914
+ !isLast && /* @__PURE__ */ jsx35("span", { className: separator2, children: /* @__PURE__ */ jsx35(ChevronRightIcon, { size: 14 }) })
1764
1915
  ] }, key);
1765
1916
  }) });
1766
1917
  });
@@ -1769,9 +1920,9 @@ var Breadcrumbs = forwardRef23(function Breadcrumbs2({ items, className, ...rest
1769
1920
  import { forwardRef as forwardRef24 } from "react";
1770
1921
 
1771
1922
  // src/components/icons/chevron-left/index.tsx
1772
- import { jsx as jsx35 } from "react/jsx-runtime";
1923
+ import { jsx as jsx36 } from "react/jsx-runtime";
1773
1924
  function ChevronLeftIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1774
- return /* @__PURE__ */ jsx35(
1925
+ return /* @__PURE__ */ jsx36(
1775
1926
  "svg",
1776
1927
  {
1777
1928
  xmlns: "http://www.w3.org/2000/svg",
@@ -1785,13 +1936,13 @@ function ChevronLeftIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1785
1936
  strokeLinejoin: "round",
1786
1937
  "aria-hidden": "true",
1787
1938
  ...rest,
1788
- children: /* @__PURE__ */ jsx35("path", { d: "m15 18-6-6 6-6" })
1939
+ children: /* @__PURE__ */ jsx36("path", { d: "m15 18-6-6 6-6" })
1789
1940
  }
1790
1941
  );
1791
1942
  }
1792
1943
 
1793
1944
  // src/components/pagination/use-styles.ts
1794
- import { useMemo as useMemo23 } from "react";
1945
+ import { useMemo as useMemo25 } from "react";
1795
1946
 
1796
1947
  // src/components/pagination/use-styles.css.ts
1797
1948
  var ellipsis = "use-styles_ellipsis__1azgzoh3";
@@ -1803,7 +1954,7 @@ var root17 = "use-styles_root__1azgzoh0";
1803
1954
  // src/components/pagination/use-styles.ts
1804
1955
  function useStyles22() {
1805
1956
  const { themeClass } = useTheme();
1806
- return useMemo23(
1957
+ return useMemo25(
1807
1958
  () => ({
1808
1959
  root: [themeClass, root17].filter(Boolean).join(" "),
1809
1960
  pageBtnFor: (active2) => [pageBtn, active2 && pageActive].filter(Boolean).join(" "),
@@ -1815,7 +1966,7 @@ function useStyles22() {
1815
1966
  }
1816
1967
 
1817
1968
  // src/components/pagination/index.tsx
1818
- import { jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
1969
+ import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
1819
1970
  function buildItems(count, page, siblingCount) {
1820
1971
  const total = Math.max(1, count);
1821
1972
  const first = 1;
@@ -1829,49 +1980,58 @@ function buildItems(count, page, siblingCount) {
1829
1980
  if (last > first) items.push(last);
1830
1981
  return items;
1831
1982
  }
1832
- var Pagination = forwardRef24(function Pagination2({ count, page = 1, onChange, siblingCount = 1, ...rest }, ref) {
1983
+ var Pagination = forwardRef24(function Pagination2({ count, page = 1, onChange, siblingCount = 1, testId, ...rest }, ref) {
1833
1984
  const { root: root24, pageBtnFor, ellipsis: ellipsis2, nav: nav2 } = useStyles22();
1985
+ const { testId: dataTestId, slot } = useTestId("nav", testId);
1834
1986
  const total = Math.max(1, count);
1835
1987
  const current2 = Math.min(Math.max(1, page), total);
1836
1988
  const items = buildItems(total, current2, siblingCount);
1837
1989
  const go = (n) => onChange?.(Math.min(Math.max(1, n), total));
1838
- return /* @__PURE__ */ jsxs22("nav", { ref, className: root24, "aria-label": "Pagination", ...rest, children: [
1839
- /* @__PURE__ */ jsx36(
1990
+ return /* @__PURE__ */ jsxs22("nav", { ref, className: root24, "aria-label": "Pagination", "data-testid": dataTestId, ...rest, children: [
1991
+ /* @__PURE__ */ jsx37(
1840
1992
  "button",
1841
1993
  {
1842
1994
  type: "button",
1843
1995
  className: nav2,
1844
1996
  "aria-label": "Previous page",
1845
1997
  disabled: current2 <= 1,
1998
+ "data-testid": slot("prev"),
1846
1999
  onClick: () => go(current2 - 1),
1847
- children: /* @__PURE__ */ jsx36(ChevronLeftIcon, { size: 18 })
2000
+ children: /* @__PURE__ */ jsx37(ChevronLeftIcon, { size: 18 })
1848
2001
  }
1849
2002
  ),
1850
2003
  items.map(
1851
- (item3, index) => item3 === "ellipsis" ? (
1852
- // biome-ignore lint/suspicious/noArrayIndexKey: ellipsis position is stable per render
1853
- /* @__PURE__ */ jsx36("span", { className: ellipsis2, children: "\u2026" }, `ellipsis-${index}`)
1854
- ) : /* @__PURE__ */ jsx36(
2004
+ (item3, index) => item3 === "ellipsis" ? /* @__PURE__ */ jsx37(
2005
+ "span",
2006
+ {
2007
+ className: ellipsis2,
2008
+ "data-testid": slot(`ellipsis-${index}`),
2009
+ children: "\u2026"
2010
+ },
2011
+ `ellipsis-${index}`
2012
+ ) : /* @__PURE__ */ jsx37(
1855
2013
  "button",
1856
2014
  {
1857
2015
  type: "button",
1858
2016
  className: pageBtnFor(item3 === current2),
1859
2017
  "aria-current": item3 === current2 ? "page" : void 0,
2018
+ "data-testid": slot(`page-${item3}`),
1860
2019
  onClick: () => go(item3),
1861
2020
  children: item3
1862
2021
  },
1863
2022
  item3
1864
2023
  )
1865
2024
  ),
1866
- /* @__PURE__ */ jsx36(
2025
+ /* @__PURE__ */ jsx37(
1867
2026
  "button",
1868
2027
  {
1869
2028
  type: "button",
1870
2029
  className: nav2,
1871
2030
  "aria-label": "Next page",
1872
2031
  disabled: current2 >= total,
2032
+ "data-testid": slot("next"),
1873
2033
  onClick: () => go(current2 + 1),
1874
- children: /* @__PURE__ */ jsx36(ChevronRightIcon, { size: 18 })
2034
+ children: /* @__PURE__ */ jsx37(ChevronRightIcon, { size: 18 })
1875
2035
  }
1876
2036
  )
1877
2037
  ] });
@@ -1881,7 +2041,7 @@ var Pagination = forwardRef24(function Pagination2({ count, page = 1, onChange,
1881
2041
  import { Fragment as Fragment2, forwardRef as forwardRef25 } from "react";
1882
2042
 
1883
2043
  // src/components/stepper/use-styles.ts
1884
- import { useMemo as useMemo24 } from "react";
2044
+ import { useMemo as useMemo26 } from "react";
1885
2045
 
1886
2046
  // src/components/stepper/use-styles.css.ts
1887
2047
  var connector = "use-styles_connector__79pt4e7";
@@ -1896,7 +2056,7 @@ var step = "use-styles_step__79pt4e1";
1896
2056
  // src/components/stepper/use-styles.ts
1897
2057
  function useStyles23({ className }) {
1898
2058
  const { themeClass } = useTheme();
1899
- return useMemo24(() => {
2059
+ return useMemo26(() => {
1900
2060
  const root24 = [themeClass, root18, className].filter(Boolean).join(" ");
1901
2061
  const markerFor = (state) => [
1902
2062
  marker,
@@ -1909,20 +2069,30 @@ function useStyles23({ className }) {
1909
2069
  }
1910
2070
 
1911
2071
  // src/components/stepper/index.tsx
1912
- import { jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
1913
- var Stepper = forwardRef25(function Stepper2({ steps, active: active2 = 0, className, ...rest }, ref) {
2072
+ import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
2073
+ var Stepper = forwardRef25(function Stepper2({ steps, active: active2 = 0, className, testId, ...rest }, ref) {
1914
2074
  const { root: root24, step: step2, connector: connector2, markerFor, labelFor } = useStyles23({ className });
1915
- return /* @__PURE__ */ jsx37("div", { ref, className: root24, ...rest, children: steps.map((s, index) => {
2075
+ const { testId: dataTestId, slot } = useTestId("nav", testId);
2076
+ return /* @__PURE__ */ jsx38("div", { ref, className: root24, "data-testid": dataTestId, ...rest, children: steps.map((s, index) => {
1916
2077
  const state = index < active2 ? "done" : index === active2 ? "active" : "upcoming";
1917
2078
  const isActive = state === "active";
1918
2079
  return (
1919
2080
  // biome-ignore lint/suspicious/noArrayIndexKey: steps are a static, ordered list with no stable id.
1920
2081
  /* @__PURE__ */ jsxs23(Fragment2, { children: [
1921
- /* @__PURE__ */ jsxs23("div", { className: step2, "aria-current": isActive ? "step" : void 0, children: [
1922
- /* @__PURE__ */ jsx37("span", { className: markerFor(state), children: state === "done" ? /* @__PURE__ */ jsx37(CheckIcon, { size: 14 }) : index + 1 }),
1923
- /* @__PURE__ */ jsx37("span", { className: labelFor(isActive), children: s.label })
1924
- ] }),
1925
- index < steps.length - 1 && /* @__PURE__ */ jsx37("span", { "data-part": "connector", className: connector2 })
2082
+ /* @__PURE__ */ jsxs23(
2083
+ "div",
2084
+ {
2085
+ className: step2,
2086
+ "aria-current": isActive ? "step" : void 0,
2087
+ "data-testid": slot(`step-${index}`),
2088
+ "data-state": states({ done: state === "done", active: isActive }),
2089
+ children: [
2090
+ /* @__PURE__ */ jsx38("span", { className: markerFor(state), children: state === "done" ? /* @__PURE__ */ jsx38(CheckIcon, { size: 14 }) : index + 1 }),
2091
+ /* @__PURE__ */ jsx38("span", { className: labelFor(isActive), children: s.label })
2092
+ ]
2093
+ }
2094
+ ),
2095
+ index < steps.length - 1 && /* @__PURE__ */ jsx38("span", { "data-part": "connector", className: connector2 })
1926
2096
  ] }, index)
1927
2097
  );
1928
2098
  }) });
@@ -1932,7 +2102,7 @@ var Stepper = forwardRef25(function Stepper2({ steps, active: active2 = 0, class
1932
2102
  import { forwardRef as forwardRef26, useId as useId4, useRef as useRef4 } from "react";
1933
2103
 
1934
2104
  // src/components/tabs/use-styles.ts
1935
- import { useMemo as useMemo25 } from "react";
2105
+ import { useMemo as useMemo27 } from "react";
1936
2106
 
1937
2107
  // src/components/tabs/use-styles.css.ts
1938
2108
  var panel2 = "use-styles_panel__1l4m7t43";
@@ -1943,7 +2113,7 @@ var tabActive = "use-styles_tabActive__1l4m7t42";
1943
2113
  // src/components/tabs/use-styles.ts
1944
2114
  function useStyles24() {
1945
2115
  const { themeClass } = useTheme();
1946
- return useMemo25(() => {
2116
+ return useMemo27(() => {
1947
2117
  const root24 = [themeClass, root19].filter(Boolean).join(" ");
1948
2118
  const tabClass = (active2) => [tab, active2 && tabActive].filter(Boolean).join(" ");
1949
2119
  return { root: root24, tab, tabClass, panel: panel2 };
@@ -1951,9 +2121,10 @@ function useStyles24() {
1951
2121
  }
1952
2122
 
1953
2123
  // src/components/tabs/index.tsx
1954
- import { Fragment as Fragment3, jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
1955
- var Tabs = forwardRef26(function Tabs2({ items, value, onChange, ...rest }, ref) {
2124
+ import { Fragment as Fragment3, jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
2125
+ var Tabs = forwardRef26(function Tabs2({ items, value, onChange, testId, ...rest }, ref) {
1956
2126
  const { root: root24, tabClass, panel: panel3 } = useStyles24();
2127
+ const { testId: dataTestId, slot } = useTestId("nav", testId);
1957
2128
  const baseId = useId4();
1958
2129
  const tabRefs = useRef4([]);
1959
2130
  const hasPanels = items.some((item3) => item3.content !== void 0);
@@ -1988,10 +2159,10 @@ var Tabs = forwardRef26(function Tabs2({ items, value, onChange, ...rest }, ref)
1988
2159
  }
1989
2160
  };
1990
2161
  return /* @__PURE__ */ jsxs24(Fragment3, { children: [
1991
- /* @__PURE__ */ jsx38("div", { ref, role: "tablist", className: root24, ...rest, children: items.map((item3, index) => {
2162
+ /* @__PURE__ */ jsx39("div", { ref, role: "tablist", className: root24, "data-testid": dataTestId, ...rest, children: items.map((item3, index) => {
1992
2163
  const active2 = item3.value === value;
1993
2164
  const tabbable = active2 || activeIndex === -1 && index === 0;
1994
- return /* @__PURE__ */ jsx38(
2165
+ return /* @__PURE__ */ jsx39(
1995
2166
  "button",
1996
2167
  {
1997
2168
  ref: (el) => {
@@ -2004,6 +2175,8 @@ var Tabs = forwardRef26(function Tabs2({ items, value, onChange, ...rest }, ref)
2004
2175
  "aria-controls": hasPanels ? panelId(item3.value) : void 0,
2005
2176
  tabIndex: tabbable ? 0 : -1,
2006
2177
  className: tabClass(active2),
2178
+ "data-testid": slot(`tab-${index}`),
2179
+ "data-state": states({ selected: active2 }),
2007
2180
  onClick: () => onChange?.(item3.value),
2008
2181
  onKeyDown: (event) => onKeyDown(event, index),
2009
2182
  children: item3.label
@@ -2011,7 +2184,7 @@ var Tabs = forwardRef26(function Tabs2({ items, value, onChange, ...rest }, ref)
2011
2184
  item3.value
2012
2185
  );
2013
2186
  }) }),
2014
- hasPanels && items.map((item3) => /* @__PURE__ */ jsx38(
2187
+ hasPanels && items.map((item3) => /* @__PURE__ */ jsx39(
2015
2188
  "div",
2016
2189
  {
2017
2190
  role: "tabpanel",
@@ -2020,6 +2193,7 @@ var Tabs = forwardRef26(function Tabs2({ items, value, onChange, ...rest }, ref)
2020
2193
  hidden: item3.value !== value,
2021
2194
  tabIndex: 0,
2022
2195
  className: panel3,
2196
+ "data-testid": slot(`panel-${item3.value}`),
2023
2197
  children: item3.content
2024
2198
  },
2025
2199
  item3.value
@@ -2038,7 +2212,7 @@ import {
2038
2212
  } from "react";
2039
2213
 
2040
2214
  // src/components/menu/use-styles.ts
2041
- import { useMemo as useMemo26 } from "react";
2215
+ import { useMemo as useMemo28 } from "react";
2042
2216
 
2043
2217
  // src/components/menu/use-styles.css.ts
2044
2218
  var danger = "use-styles_danger__1uyxaj3";
@@ -2049,7 +2223,7 @@ var wrapper3 = "use-styles_wrapper__1uyxaj0";
2049
2223
  // src/components/menu/use-styles.ts
2050
2224
  function useStyles25() {
2051
2225
  const { themeClass } = useTheme();
2052
- return useMemo26(
2226
+ return useMemo28(
2053
2227
  () => ({
2054
2228
  wrapper: [themeClass, wrapper3].filter(Boolean).join(" "),
2055
2229
  list,
@@ -2061,13 +2235,14 @@ function useStyles25() {
2061
2235
  }
2062
2236
 
2063
2237
  // src/components/menu/index.tsx
2064
- import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
2238
+ import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
2065
2239
  function assignRef(ref, value) {
2066
2240
  if (typeof ref === "function") ref(value);
2067
2241
  else if (ref) ref.current = value;
2068
2242
  }
2069
- var Menu = forwardRef27(function Menu2({ trigger: trigger2, items }, ref) {
2243
+ var Menu = forwardRef27(function Menu2({ trigger: trigger2, items, testId }, ref) {
2070
2244
  const { wrapper: wrapper4, list: list2, item: item3, dangerItem } = useStyles25();
2245
+ const { testId: rootTestId, slot } = useTestId("menu", testId);
2071
2246
  const [open, setOpen] = useState8(false);
2072
2247
  const [alignEnd, setAlignEnd] = useState8(false);
2073
2248
  const rootRef = useRef5(null);
@@ -2165,34 +2340,45 @@ var Menu = forwardRef27(function Menu2({ trigger: trigger2, items }, ref) {
2165
2340
  setOpen((prev) => !prev);
2166
2341
  }
2167
2342
  });
2168
- return /* @__PURE__ */ jsxs25("div", { ref: setRootRef, className: wrapper4, children: [
2169
- clonedTrigger,
2170
- open && /* @__PURE__ */ jsx39(
2171
- "div",
2172
- {
2173
- ref: listRef,
2174
- role: "menu",
2175
- className: list2,
2176
- "data-align": alignEnd ? "end" : "start",
2177
- onKeyDown: onMenuKeyDown,
2178
- children: items.map((entry, index) => /* @__PURE__ */ jsx39(
2179
- "button",
2343
+ return /* @__PURE__ */ jsxs25(
2344
+ "div",
2345
+ {
2346
+ ref: setRootRef,
2347
+ className: wrapper4,
2348
+ "data-testid": rootTestId,
2349
+ "data-state": open ? "open" : "closed",
2350
+ children: [
2351
+ clonedTrigger,
2352
+ open && /* @__PURE__ */ jsx40(
2353
+ "div",
2180
2354
  {
2181
- type: "button",
2182
- role: "menuitem",
2183
- tabIndex: -1,
2184
- className: entry.danger ? dangerItem : item3,
2185
- onClick: () => {
2186
- entry.onClick?.();
2187
- setOpen(false);
2188
- },
2189
- children: entry.label
2190
- },
2191
- index
2192
- ))
2193
- }
2194
- )
2195
- ] });
2355
+ ref: listRef,
2356
+ role: "menu",
2357
+ className: list2,
2358
+ "data-align": alignEnd ? "end" : "start",
2359
+ "data-testid": slot("list"),
2360
+ onKeyDown: onMenuKeyDown,
2361
+ children: items.map((entry, index) => /* @__PURE__ */ jsx40(
2362
+ "button",
2363
+ {
2364
+ type: "button",
2365
+ role: "menuitem",
2366
+ tabIndex: -1,
2367
+ className: entry.danger ? dangerItem : item3,
2368
+ "data-testid": slot(`item-${index}`),
2369
+ onClick: () => {
2370
+ entry.onClick?.();
2371
+ setOpen(false);
2372
+ },
2373
+ children: entry.label
2374
+ },
2375
+ index
2376
+ ))
2377
+ }
2378
+ )
2379
+ ]
2380
+ }
2381
+ );
2196
2382
  });
2197
2383
 
2198
2384
  // src/components/dialog/index.tsx
@@ -2205,7 +2391,7 @@ import {
2205
2391
  import { createPortal } from "react-dom";
2206
2392
 
2207
2393
  // src/components/dialog/use-styles.ts
2208
- import { useMemo as useMemo27 } from "react";
2394
+ import { useMemo as useMemo29 } from "react";
2209
2395
 
2210
2396
  // src/components/dialog/use-styles.css.ts
2211
2397
  var actions = "use-styles_actions__5tstu83";
@@ -2216,7 +2402,7 @@ var surface = "use-styles_surface__5tstu81";
2216
2402
  // src/components/dialog/use-styles.ts
2217
2403
  function useStyles26() {
2218
2404
  const { themeClass } = useTheme();
2219
- return useMemo27(
2405
+ return useMemo29(
2220
2406
  () => ({
2221
2407
  overlay: [themeClass, overlay].filter(Boolean).join(" "),
2222
2408
  surface,
@@ -2228,14 +2414,15 @@ function useStyles26() {
2228
2414
  }
2229
2415
 
2230
2416
  // src/components/dialog/index.tsx
2231
- import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
2417
+ import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
2232
2418
  var FOCUSABLE = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
2233
2419
  function assignRef2(ref, value) {
2234
2420
  if (typeof ref === "function") ref(value);
2235
2421
  else if (ref) ref.current = value;
2236
2422
  }
2237
- var Dialog = forwardRef28(function Dialog2({ open, onClose, title, actions: actions3, children }, ref) {
2423
+ var Dialog = forwardRef28(function Dialog2({ open, onClose, title, actions: actions3, children, testId }, ref) {
2238
2424
  const { overlay: overlay2, surface: surface2, body: body3, actions: actionsClass } = useStyles26();
2425
+ const { testId: rootTestId, slot } = useTestId("dialog", testId);
2239
2426
  const surfaceRef = useRef6(null);
2240
2427
  const setSurfaceRef = (node) => {
2241
2428
  surfaceRef.current = node;
@@ -2296,7 +2483,7 @@ var Dialog = forwardRef28(function Dialog2({ open, onClose, title, actions: acti
2296
2483
  };
2297
2484
  return createPortal(
2298
2485
  // biome-ignore lint/a11y/useKeyWithClickEvents: ESC handled by a document keydown listener.
2299
- /* @__PURE__ */ jsx40("div", { className: overlay2, "data-testid": "dialog-overlay", onClick: onClose, children: /* @__PURE__ */ jsxs26(
2486
+ /* @__PURE__ */ jsx41("div", { className: overlay2, "data-testid": slot("overlay"), onClick: onClose, children: /* @__PURE__ */ jsxs26(
2300
2487
  "div",
2301
2488
  {
2302
2489
  ref: setSurfaceRef,
@@ -2305,12 +2492,13 @@ var Dialog = forwardRef28(function Dialog2({ open, onClose, title, actions: acti
2305
2492
  "aria-modal": "true",
2306
2493
  "aria-labelledby": titleId,
2307
2494
  tabIndex: -1,
2495
+ "data-testid": rootTestId,
2308
2496
  onClick: stop,
2309
2497
  onKeyDown: onSurfaceKeyDown,
2310
2498
  children: [
2311
- title != null && /* @__PURE__ */ jsx40(Typography, { variant: "h3", as: "h2", id: titleId, children: title }),
2312
- children != null && /* @__PURE__ */ jsx40("div", { className: body3, children: /* @__PURE__ */ jsx40(Typography, { variant: "body", color: "fg2", children }) }),
2313
- actions3 != null && /* @__PURE__ */ jsx40("div", { className: actionsClass, children: actions3 })
2499
+ title != null && /* @__PURE__ */ jsx41(Typography, { variant: "h3", as: "h2", id: titleId, children: title }),
2500
+ children != null && /* @__PURE__ */ jsx41("div", { className: body3, children: /* @__PURE__ */ jsx41(Typography, { variant: "body", color: "fg2", children }) }),
2501
+ actions3 != null && /* @__PURE__ */ jsx41("div", { className: actionsClass, children: actions3 })
2314
2502
  ]
2315
2503
  }
2316
2504
  ) }),
@@ -2323,7 +2511,7 @@ import { forwardRef as forwardRef29 } from "react";
2323
2511
  import { createPortal as createPortal2 } from "react-dom";
2324
2512
 
2325
2513
  // src/components/snackbar/use-styles.ts
2326
- import { useMemo as useMemo28 } from "react";
2514
+ import { useMemo as useMemo30 } from "react";
2327
2515
 
2328
2516
  // src/components/snackbar/use-styles.css.ts
2329
2517
  var closeBtn = "use-styles_closeBtn__ihzsep2";
@@ -2333,7 +2521,7 @@ var root20 = "use-styles_root__ihzsep0 surfaces_inkySurface__1qa7atn2";
2333
2521
  // src/components/snackbar/use-styles.ts
2334
2522
  function useStyles27() {
2335
2523
  const { themeClass } = useTheme();
2336
- return useMemo28(
2524
+ return useMemo30(
2337
2525
  () => ({
2338
2526
  root: [themeClass, root20].filter(Boolean).join(" "),
2339
2527
  message,
@@ -2344,15 +2532,26 @@ function useStyles27() {
2344
2532
  }
2345
2533
 
2346
2534
  // src/components/snackbar/index.tsx
2347
- import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
2348
- var Snackbar = forwardRef29(function Snackbar2({ open, message: message2, action, onClose }, ref) {
2535
+ import { jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
2536
+ var Snackbar = forwardRef29(function Snackbar2({ open, message: message2, action, onClose, testId }, ref) {
2349
2537
  const { root: root24, message: messageClass, closeBtn: closeBtn2 } = useStyles27();
2538
+ const { testId: dataTestId, slot } = useTestId("feedback", testId);
2350
2539
  if (!open || typeof document === "undefined") return null;
2351
2540
  return createPortal2(
2352
- /* @__PURE__ */ jsxs27("div", { ref, role: "status", className: root24, children: [
2353
- /* @__PURE__ */ jsx41("span", { className: messageClass, children: message2 }),
2541
+ /* @__PURE__ */ jsxs27("div", { ref, role: "status", className: root24, "data-testid": dataTestId, children: [
2542
+ /* @__PURE__ */ jsx42("span", { className: messageClass, "data-testid": slot("message"), children: message2 }),
2354
2543
  action,
2355
- onClose && /* @__PURE__ */ jsx41("button", { type: "button", "aria-label": "Close", className: closeBtn2, onClick: onClose, children: /* @__PURE__ */ jsx41(XIcon, { size: 18 }) })
2544
+ onClose && /* @__PURE__ */ jsx42(
2545
+ "button",
2546
+ {
2547
+ type: "button",
2548
+ "aria-label": "Close",
2549
+ className: closeBtn2,
2550
+ "data-testid": slot("close"),
2551
+ onClick: onClose,
2552
+ children: /* @__PURE__ */ jsx42(XIcon, { size: 18 })
2553
+ }
2554
+ )
2356
2555
  ] }),
2357
2556
  document.body
2358
2557
  );
@@ -2362,7 +2561,7 @@ var Snackbar = forwardRef29(function Snackbar2({ open, message: message2, action
2362
2561
  import { forwardRef as forwardRef30 } from "react";
2363
2562
 
2364
2563
  // src/components/table/use-styles.ts
2365
- import { useMemo as useMemo29 } from "react";
2564
+ import { useMemo as useMemo31 } from "react";
2366
2565
 
2367
2566
  // src/components/table/use-styles.css.ts
2368
2567
  var alignRight = "use-styles_alignRight__1n2cz6i3";
@@ -2374,7 +2573,7 @@ var th = "use-styles_th__1n2cz6i1";
2374
2573
  // src/components/table/use-styles.ts
2375
2574
  function useStyles28({ className }) {
2376
2575
  const { themeClass } = useTheme();
2377
- const root24 = useMemo29(
2576
+ const root24 = useMemo31(
2378
2577
  () => [themeClass, root21, className].filter(Boolean).join(" "),
2379
2578
  [themeClass, className]
2380
2579
  );
@@ -2388,15 +2587,16 @@ function useStyles28({ className }) {
2388
2587
  }
2389
2588
 
2390
2589
  // src/components/table/index.tsx
2391
- import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
2392
- function TableInner({ columns, rows, getRowKey, className, caption: caption2, ...rest }, ref) {
2590
+ import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
2591
+ function TableInner({ columns, rows, getRowKey, className, caption: caption2, testId, ...rest }, ref) {
2393
2592
  const { root: root24, th: th2, td: td2, alignRight: alignRight2, caption: captionClass } = useStyles28({ className });
2593
+ const { testId: dataTestId, slot } = useTestId("list", testId);
2394
2594
  const headClass = (column) => column.align === "right" ? `${th2} ${alignRight2}` : th2;
2395
2595
  const cellClass = (column) => column.align === "right" ? `${td2} ${alignRight2}` : td2;
2396
- return /* @__PURE__ */ jsxs28("table", { ref, className: root24, ...rest, children: [
2397
- caption2 != null && /* @__PURE__ */ jsx42("caption", { className: captionClass, children: caption2 }),
2398
- /* @__PURE__ */ jsx42("thead", { children: /* @__PURE__ */ jsx42("tr", { children: columns.map((column) => /* @__PURE__ */ jsx42("th", { scope: "col", className: headClass(column), children: column.header }, column.key)) }) }),
2399
- /* @__PURE__ */ jsx42("tbody", { children: rows.map((row, index) => /* @__PURE__ */ jsx42("tr", { children: columns.map((column) => /* @__PURE__ */ jsx42("td", { className: cellClass(column), children: column.render ? column.render(row) : String(row[column.key]) }, column.key)) }, getRowKey ? getRowKey(row, index) : index)) })
2596
+ return /* @__PURE__ */ jsxs28("table", { ref, className: root24, "data-testid": dataTestId, ...rest, children: [
2597
+ caption2 != null && /* @__PURE__ */ jsx43("caption", { className: captionClass, children: caption2 }),
2598
+ /* @__PURE__ */ jsx43("thead", { children: /* @__PURE__ */ jsx43("tr", { children: columns.map((column) => /* @__PURE__ */ jsx43("th", { scope: "col", className: headClass(column), children: column.header }, column.key)) }) }),
2599
+ /* @__PURE__ */ jsx43("tbody", { children: rows.map((row, index) => /* @__PURE__ */ jsx43("tr", { "data-testid": slot(`row-${index}`), children: columns.map((column) => /* @__PURE__ */ jsx43("td", { className: cellClass(column), children: column.render ? column.render(row) : String(row[column.key]) }, column.key)) }, getRowKey ? getRowKey(row, index) : index)) })
2400
2600
  ] });
2401
2601
  }
2402
2602
  var TableForwarded = forwardRef30(TableInner);
@@ -2407,7 +2607,7 @@ var Table = TableForwarded;
2407
2607
  import { forwardRef as forwardRef31 } from "react";
2408
2608
 
2409
2609
  // src/components/app-bar/use-styles.ts
2410
- import { useMemo as useMemo30 } from "react";
2610
+ import { useMemo as useMemo32 } from "react";
2411
2611
 
2412
2612
  // src/components/app-bar/use-styles.css.ts
2413
2613
  var actions2 = "use-styles_actions__1h133nh2";
@@ -2417,7 +2617,7 @@ var root22 = "use-styles_root__1h133nh0";
2417
2617
  // src/components/app-bar/use-styles.ts
2418
2618
  function useStyles29({ className }) {
2419
2619
  const { themeClass } = useTheme();
2420
- const root24 = useMemo30(
2620
+ const root24 = useMemo32(
2421
2621
  () => [themeClass, root22, className].filter(Boolean).join(" "),
2422
2622
  [themeClass, className]
2423
2623
  );
@@ -2425,13 +2625,14 @@ function useStyles29({ className }) {
2425
2625
  }
2426
2626
 
2427
2627
  // src/components/app-bar/index.tsx
2428
- import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
2429
- var AppBar = forwardRef31(function AppBar2({ brand: brand2, actions: actions3, className, children, ...rest }, ref) {
2628
+ import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
2629
+ var AppBar = forwardRef31(function AppBar2({ brand: brand2, actions: actions3, className, children, testId, ...rest }, ref) {
2430
2630
  const styles = useStyles29({ className });
2431
- return /* @__PURE__ */ jsxs29("header", { ref, className: styles.root, ...rest, children: [
2432
- brand2 !== void 0 ? /* @__PURE__ */ jsx43("div", { className: styles.brand, children: brand2 }) : null,
2631
+ const { testId: dataTestId, slot } = useTestId("nav", testId);
2632
+ return /* @__PURE__ */ jsxs29("header", { ref, className: styles.root, "data-testid": dataTestId, ...rest, children: [
2633
+ brand2 !== void 0 ? /* @__PURE__ */ jsx44("div", { className: styles.brand, "data-testid": slot("brand"), children: brand2 }) : null,
2433
2634
  children,
2434
- actions3 !== void 0 ? /* @__PURE__ */ jsx43("div", { className: styles.actions, children: actions3 }) : null
2635
+ actions3 !== void 0 ? /* @__PURE__ */ jsx44("div", { className: styles.actions, "data-testid": slot("actions"), children: actions3 }) : null
2435
2636
  ] });
2436
2637
  });
2437
2638
 
@@ -2439,7 +2640,7 @@ var AppBar = forwardRef31(function AppBar2({ brand: brand2, actions: actions3, c
2439
2640
  import { forwardRef as forwardRef32 } from "react";
2440
2641
 
2441
2642
  // src/components/list-item/use-styles.ts
2442
- import { useMemo as useMemo31 } from "react";
2643
+ import { useMemo as useMemo33 } from "react";
2443
2644
 
2444
2645
  // src/components/list-item/use-styles.css.ts
2445
2646
  var content2 = "use-styles_content__kbreq13";
@@ -2454,7 +2655,7 @@ function useStyles30({
2454
2655
  className
2455
2656
  }) {
2456
2657
  const { themeClass } = useTheme();
2457
- const root24 = useMemo31(
2658
+ const root24 = useMemo33(
2458
2659
  () => [themeClass, root23, selected3 && selected2, className].filter(Boolean).join(" "),
2459
2660
  [themeClass, selected3, className]
2460
2661
  );
@@ -2462,20 +2663,31 @@ function useStyles30({
2462
2663
  }
2463
2664
 
2464
2665
  // src/components/list-item/index.tsx
2465
- import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
2466
- var ListItem = forwardRef32(function ListItem2({ leading: leading2, trailing: trailing2, selected: selected3, className, children, ...rest }, ref) {
2666
+ import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
2667
+ var ListItem = forwardRef32(function ListItem2({ leading: leading2, trailing: trailing2, selected: selected3, className, testId, children, ...rest }, ref) {
2467
2668
  const styles = useStyles30({ selected: selected3, className });
2468
- return /* @__PURE__ */ jsxs30("div", { ref, className: styles.root, ...rest, children: [
2469
- leading2 != null && /* @__PURE__ */ jsx44("span", { className: styles.leading, children: leading2 }),
2470
- /* @__PURE__ */ jsx44("span", { className: styles.content, children }),
2471
- trailing2 != null && /* @__PURE__ */ jsx44("span", { className: styles.trailing, children: trailing2 })
2472
- ] });
2669
+ const { testId: dataTestId, slot } = useTestId("list", testId);
2670
+ return /* @__PURE__ */ jsxs30(
2671
+ "div",
2672
+ {
2673
+ ref,
2674
+ className: styles.root,
2675
+ "data-testid": dataTestId,
2676
+ "data-state": states({ selected: selected3 }),
2677
+ ...rest,
2678
+ children: [
2679
+ leading2 != null && /* @__PURE__ */ jsx45("span", { className: styles.leading, "data-testid": slot("leading"), children: leading2 }),
2680
+ /* @__PURE__ */ jsx45("span", { className: styles.content, "data-testid": slot("content"), children }),
2681
+ trailing2 != null && /* @__PURE__ */ jsx45("span", { className: styles.trailing, "data-testid": slot("trailing"), children: trailing2 })
2682
+ ]
2683
+ }
2684
+ );
2473
2685
  });
2474
2686
 
2475
2687
  // src/components/icons/chevron-up/index.tsx
2476
- import { jsx as jsx45 } from "react/jsx-runtime";
2688
+ import { jsx as jsx46 } from "react/jsx-runtime";
2477
2689
  function ChevronUpIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2478
- return /* @__PURE__ */ jsx45(
2690
+ return /* @__PURE__ */ jsx46(
2479
2691
  "svg",
2480
2692
  {
2481
2693
  xmlns: "http://www.w3.org/2000/svg",
@@ -2489,13 +2701,13 @@ function ChevronUpIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2489
2701
  strokeLinejoin: "round",
2490
2702
  "aria-hidden": "true",
2491
2703
  ...rest,
2492
- children: /* @__PURE__ */ jsx45("path", { d: "m18 15-6-6-6 6" })
2704
+ children: /* @__PURE__ */ jsx46("path", { d: "m18 15-6-6-6 6" })
2493
2705
  }
2494
2706
  );
2495
2707
  }
2496
2708
 
2497
2709
  // src/components/icons/search/index.tsx
2498
- import { jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
2710
+ import { jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
2499
2711
  function SearchIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2500
2712
  return /* @__PURE__ */ jsxs31(
2501
2713
  "svg",
@@ -2512,15 +2724,15 @@ function SearchIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2512
2724
  "aria-hidden": "true",
2513
2725
  ...rest,
2514
2726
  children: [
2515
- /* @__PURE__ */ jsx46("circle", { cx: "11", cy: "11", r: "8" }),
2516
- /* @__PURE__ */ jsx46("path", { d: "m21 21-4.3-4.3" })
2727
+ /* @__PURE__ */ jsx47("circle", { cx: "11", cy: "11", r: "8" }),
2728
+ /* @__PURE__ */ jsx47("path", { d: "m21 21-4.3-4.3" })
2517
2729
  ]
2518
2730
  }
2519
2731
  );
2520
2732
  }
2521
2733
 
2522
2734
  // src/components/icons/plus/index.tsx
2523
- import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
2735
+ import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
2524
2736
  function PlusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2525
2737
  return /* @__PURE__ */ jsxs32(
2526
2738
  "svg",
@@ -2537,17 +2749,17 @@ function PlusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2537
2749
  "aria-hidden": "true",
2538
2750
  ...rest,
2539
2751
  children: [
2540
- /* @__PURE__ */ jsx47("path", { d: "M5 12h14" }),
2541
- /* @__PURE__ */ jsx47("path", { d: "M12 5v14" })
2752
+ /* @__PURE__ */ jsx48("path", { d: "M5 12h14" }),
2753
+ /* @__PURE__ */ jsx48("path", { d: "M12 5v14" })
2542
2754
  ]
2543
2755
  }
2544
2756
  );
2545
2757
  }
2546
2758
 
2547
2759
  // src/components/icons/minus/index.tsx
2548
- import { jsx as jsx48 } from "react/jsx-runtime";
2760
+ import { jsx as jsx49 } from "react/jsx-runtime";
2549
2761
  function MinusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2550
- return /* @__PURE__ */ jsx48(
2762
+ return /* @__PURE__ */ jsx49(
2551
2763
  "svg",
2552
2764
  {
2553
2765
  xmlns: "http://www.w3.org/2000/svg",
@@ -2561,13 +2773,13 @@ function MinusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2561
2773
  strokeLinejoin: "round",
2562
2774
  "aria-hidden": "true",
2563
2775
  ...rest,
2564
- children: /* @__PURE__ */ jsx48("path", { d: "M5 12h14" })
2776
+ children: /* @__PURE__ */ jsx49("path", { d: "M5 12h14" })
2565
2777
  }
2566
2778
  );
2567
2779
  }
2568
2780
 
2569
2781
  // src/components/icons/more-horizontal/index.tsx
2570
- import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
2782
+ import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
2571
2783
  function MoreHorizontalIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2572
2784
  return /* @__PURE__ */ jsxs33(
2573
2785
  "svg",
@@ -2584,9 +2796,9 @@ function MoreHorizontalIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
2584
2796
  "aria-hidden": "true",
2585
2797
  ...rest,
2586
2798
  children: [
2587
- /* @__PURE__ */ jsx49("circle", { cx: "12", cy: "12", r: "1" }),
2588
- /* @__PURE__ */ jsx49("circle", { cx: "19", cy: "12", r: "1" }),
2589
- /* @__PURE__ */ jsx49("circle", { cx: "5", cy: "12", r: "1" })
2799
+ /* @__PURE__ */ jsx50("circle", { cx: "12", cy: "12", r: "1" }),
2800
+ /* @__PURE__ */ jsx50("circle", { cx: "19", cy: "12", r: "1" }),
2801
+ /* @__PURE__ */ jsx50("circle", { cx: "5", cy: "12", r: "1" })
2590
2802
  ]
2591
2803
  }
2592
2804
  );
@@ -2634,6 +2846,7 @@ export {
2634
2846
  Switch,
2635
2847
  Table,
2636
2848
  Tabs,
2849
+ TestIdProvider,
2637
2850
  TextField,
2638
2851
  ThemeProvider,
2639
2852
  Tooltip,
@@ -2647,6 +2860,7 @@ export {
2647
2860
  vars as theme,
2648
2861
  themes,
2649
2862
  usePrevious,
2863
+ useTestId,
2650
2864
  useTheme,
2651
2865
  useToggle
2652
2866
  };