@octavius2929-personal/design-system 0.13.0 → 0.15.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.cjs CHANGED
@@ -108,7 +108,47 @@ function useToggle(initial = false) {
108
108
  }
109
109
 
110
110
  // src/components/container/index.tsx
111
+ var import_react5 = require("react");
112
+
113
+ // src/testing/use-test-id.ts
114
+ var import_react4 = require("react");
115
+
116
+ // src/testing/compose.ts
117
+ function normalizeSegment(seg) {
118
+ return seg.trim().replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
119
+ }
120
+ function composeTestId(parts) {
121
+ return parts.filter((p) => typeof p === "string" && p.trim() !== "").map(normalizeSegment).join("__");
122
+ }
123
+
124
+ // src/testing/context/test-id-context.tsx
111
125
  var import_react3 = require("react");
126
+ var import_jsx_runtime = require("react/jsx-runtime");
127
+ var TestIdContext = (0, import_react3.createContext)([]);
128
+ function TestIdProvider({ context, children }) {
129
+ const parent = (0, import_react3.useContext)(TestIdContext);
130
+ const value = (0, import_react3.useMemo)(
131
+ () => [...parent, normalizeSegment(context)].filter((seg) => seg !== ""),
132
+ [parent, context]
133
+ );
134
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestIdContext.Provider, { value, children });
135
+ }
136
+ function useTestIdContext() {
137
+ return (0, import_react3.useContext)(TestIdContext);
138
+ }
139
+
140
+ // src/testing/use-test-id.ts
141
+ function useTestId(type, ownTestId) {
142
+ const ctx = useTestIdContext();
143
+ const testId = composeTestId([type, ...ctx, ownTestId]);
144
+ return (0, import_react4.useMemo)(
145
+ () => ({
146
+ testId,
147
+ slot: (name) => `${testId}__${normalizeSegment(name)}`
148
+ }),
149
+ [testId]
150
+ );
151
+ }
112
152
 
113
153
  // src/theme/styles/sprinkles/index.css.ts
114
154
  var import_createRuntimeSprinkles = require("@vanilla-extract/sprinkles/createRuntimeSprinkles");
@@ -130,25 +170,280 @@ function useStyles(props) {
130
170
  }
131
171
 
132
172
  // src/components/container/index.tsx
133
- var import_jsx_runtime = require("react/jsx-runtime");
134
- function ContainerImpl({ as, ...props }, ref) {
173
+ var import_jsx_runtime2 = require("react/jsx-runtime");
174
+ function ContainerImpl({ as, testId, ...props }, ref) {
135
175
  const Component = as ?? "div";
136
176
  const { className, rest } = useStyles(props);
137
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref, ...rest, className });
177
+ const { testId: dataTestId } = useTestId("layout", testId);
178
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, { ref, "data-testid": dataTestId, ...rest, className });
138
179
  }
139
- var ContainerForwarded = (0, import_react3.forwardRef)(ContainerImpl);
180
+ var ContainerForwarded = (0, import_react5.forwardRef)(ContainerImpl);
140
181
  ContainerForwarded.displayName = "Container";
141
182
  var Container = ContainerForwarded;
142
183
 
143
184
  // src/components/typography/index.tsx
144
- var import_react6 = require("react");
185
+ var import_react9 = require("react");
145
186
 
146
187
  // src/components/typography/use-styles.ts
147
- var import_react5 = require("react");
188
+ var import_react8 = require("react");
189
+
190
+ // ../core/dist/index.js
191
+ var import_react6 = require("react");
192
+ var tokens = {
193
+ font: {
194
+ display: "'DM Serif Display', 'Times New Roman', serif",
195
+ text: "'Newsreader', Georgia, serif",
196
+ mono: "'IBM Plex Mono', 'SFMono-Regular', monospace",
197
+ black: "'UnifrakturMaguntia', 'Grenze Gotisch', serif"
198
+ },
199
+ // Roles tipográficos: tamaño/interlineado/peso/tracking listos para typography.css.ts.
200
+ text: {
201
+ eyebrow: { size: "0.694rem", lineHeight: "1.2", weight: "500", letterSpacing: "0.14em" },
202
+ display: { size: "5.6rem", lineHeight: "1.05", weight: "600", letterSpacing: "-0.01em" },
203
+ h1: { size: "2.9rem", lineHeight: "1.05", weight: "600", letterSpacing: "-0.01em" },
204
+ h2: { size: "2.1rem", lineHeight: "1.2", weight: "600", letterSpacing: "0" },
205
+ h3: { size: "1.563rem", lineHeight: "1.2", weight: "500", letterSpacing: "0" },
206
+ h4: { size: "1.25rem", lineHeight: "1.2", weight: "600", letterSpacing: "0" },
207
+ body: { size: "1rem", lineHeight: "1.7", weight: "400", letterSpacing: "0" },
208
+ lead: { size: "1.25rem", lineHeight: "1.7", weight: "400", letterSpacing: "0" },
209
+ small: { size: "0.95rem", lineHeight: "1.5", weight: "400", letterSpacing: "0" },
210
+ caption: { size: "0.833rem", lineHeight: "1.5", weight: "400", letterSpacing: "0.04em" }
211
+ },
212
+ space: {
213
+ s0: "0",
214
+ s1: "0.25rem",
215
+ // 4
216
+ s2: "0.5rem",
217
+ // 8
218
+ s3: "0.75rem",
219
+ // 12
220
+ s4: "1rem",
221
+ // 16
222
+ s5: "1.5rem",
223
+ // 24
224
+ s6: "2rem",
225
+ // 32
226
+ s7: "3rem",
227
+ // 48
228
+ s8: "4rem",
229
+ // 64
230
+ s9: "6rem"
231
+ // 96
232
+ },
233
+ radius: { none: "0px", sm: "3px", md: "5px", lg: "8px", base: "4px", full: "999px" },
234
+ border: { hair: "1px", rule: "1.5px", heavy: "2px" },
235
+ // Tracking de mayúsculas: escala coherente alineada al uso real (eyebrow = widest).
236
+ tracking: { tight: "-0.01em", normal: "0", wide: "0.04em", wider: "0.1em", widest: "0.14em" },
237
+ weight: { light: "300", regular: "400", medium: "500", semibold: "600", bold: "700" },
238
+ dur: { fast: "120ms", base: "200ms", slow: "360ms" },
239
+ ease: { ink: "cubic-bezier(0.2, 0, 0, 1)" },
240
+ shadow: {
241
+ sm: "0 1px 0 rgba(20,17,14,0.06)",
242
+ md: "0 2px 10px -4px rgba(20,17,14,0.22)",
243
+ lg: "0 12px 32px -10px rgba(20,17,14,0.34)"
244
+ }
245
+ };
246
+ var tintaSchema = {
247
+ light: {
248
+ ...tokens,
249
+ color: {
250
+ bg1: "#F8F7F4",
251
+ bg2: "#FFFFFF",
252
+ bg3: "#EDEBE6",
253
+ bgInset: "#E4E1DA",
254
+ fg1: "#15130F",
255
+ fg2: "#494640",
256
+ fg3: "#737069",
257
+ fgOnAccent: "#F8F7F4",
258
+ border1: "rgba(21, 19, 15, 0.12)",
259
+ border2: "rgba(21, 19, 15, 0.26)",
260
+ borderStrong: "rgba(21, 19, 15, 0.85)",
261
+ accent: "#7B1E1E",
262
+ accentHover: "#631616",
263
+ accentSoft: "rgba(123, 30, 30, 0.10)",
264
+ ok: "#3E5C3A",
265
+ warn: "#8A6A1E",
266
+ danger: "#7B1E1E",
267
+ dangerHover: "#631616",
268
+ dangerSoft: "rgba(123, 30, 30, 0.10)",
269
+ info: "#2E4257",
270
+ focus: "#7B1E1E",
271
+ scrim: "rgba(20, 17, 14, 0.55)"
272
+ }
273
+ },
274
+ dark: {
275
+ ...tokens,
276
+ color: {
277
+ bg1: "#100E0B",
278
+ bg2: "#1A1611",
279
+ bg3: "#070605",
280
+ bgInset: "#221D16",
281
+ fg1: "#F2EDE2",
282
+ fg2: "#B7AF9F",
283
+ fg3: "#878070",
284
+ fgOnAccent: "#F2EDE2",
285
+ border1: "rgba(242, 237, 226, 0.13)",
286
+ border2: "rgba(242, 237, 226, 0.26)",
287
+ borderStrong: "rgba(242, 237, 226, 0.80)",
288
+ accent: "#B23A3A",
289
+ accentHover: "#CC4A4A",
290
+ accentSoft: "rgba(178, 58, 58, 0.16)",
291
+ ok: "#7FA178",
292
+ warn: "#C7A04E",
293
+ danger: "#C24A4A",
294
+ dangerHover: "#D45C5C",
295
+ dangerSoft: "rgba(194, 74, 74, 0.16)",
296
+ info: "#6E92B4",
297
+ focus: "#CC4A4A",
298
+ scrim: "rgba(7, 6, 5, 0.65)"
299
+ }
300
+ },
301
+ sepia: {
302
+ ...tokens,
303
+ color: {
304
+ bg1: "#E9DDC4",
305
+ bg2: "#F2E9D5",
306
+ bg3: "#DCCDAC",
307
+ bgInset: "#D2C09B",
308
+ fg1: "#2A2013",
309
+ fg2: "#5A4A33",
310
+ fg3: "#6E6046",
311
+ fgOnAccent: "#F2E9D5",
312
+ border1: "rgba(42, 32, 19, 0.16)",
313
+ border2: "rgba(42, 32, 19, 0.32)",
314
+ borderStrong: "rgba(42, 32, 19, 0.82)",
315
+ accent: "#7A2E12",
316
+ accentHover: "#5F2109",
317
+ accentSoft: "rgba(122, 46, 18, 0.12)",
318
+ ok: "#4A5A2E",
319
+ warn: "#8A6A1E",
320
+ danger: "#7A2E12",
321
+ dangerHover: "#5F2109",
322
+ dangerSoft: "rgba(122, 46, 18, 0.12)",
323
+ info: "#3C4E57",
324
+ focus: "#7A2E12",
325
+ scrim: "rgba(42, 32, 19, 0.55)"
326
+ }
327
+ },
328
+ contrast: {
329
+ ...tokens,
330
+ color: {
331
+ bg1: "#FFFFFF",
332
+ bg2: "#FFFFFF",
333
+ bg3: "#F2F2F2",
334
+ bgInset: "#EAEAEA",
335
+ fg1: "#000000",
336
+ fg2: "#000000",
337
+ fg3: "#2B2B2B",
338
+ fgOnAccent: "#FFFFFF",
339
+ border1: "#000000",
340
+ border2: "#000000",
341
+ borderStrong: "#000000",
342
+ accent: "#000000",
343
+ accentHover: "#2B2B2B",
344
+ accentSoft: "rgba(0, 0, 0, 0.08)",
345
+ ok: "#000000",
346
+ warn: "#000000",
347
+ danger: "#8B0000",
348
+ dangerHover: "#6B0000",
349
+ dangerSoft: "rgba(139, 0, 0, 0.10)",
350
+ info: "#000000",
351
+ focus: "#000000",
352
+ scrim: "rgba(0, 0, 0, 0.7)"
353
+ }
354
+ }
355
+ };
356
+ var schemas = { tinta: tintaSchema };
357
+ var modeNames2 = ["light", "dark", "sepia", "contrast"];
358
+ function resolveMode(preference, systemMode) {
359
+ return preference === "system" ? systemMode : preference;
360
+ }
361
+ function useThemeStore(options, storage, system) {
362
+ const { defaultSchema = "tinta", defaultMode = "light" } = options;
363
+ const [persisted] = (0, import_react6.useState)(() => storage.read());
364
+ const [schema, setSchema] = (0, import_react6.useState)(persisted?.schema ?? defaultSchema);
365
+ const [preference, setPreference] = (0, import_react6.useState)(
366
+ persisted?.preference ?? defaultMode
367
+ );
368
+ const [systemMode, setSystemMode] = (0, import_react6.useState)(() => system.get());
369
+ (0, import_react6.useEffect)(() => {
370
+ if (preference !== "system") return;
371
+ const update = () => setSystemMode(system.get());
372
+ update();
373
+ return system.subscribe(update);
374
+ }, [preference, system]);
375
+ const mode = resolveMode(preference, systemMode);
376
+ (0, import_react6.useEffect)(() => {
377
+ storage.write({ schema, preference });
378
+ }, [schema, preference, storage]);
379
+ return (0, import_react6.useMemo)(
380
+ () => ({
381
+ schema,
382
+ mode,
383
+ preference,
384
+ colorTokens: schemas[schema][mode].color,
385
+ setSchema,
386
+ setMode: setPreference,
387
+ toggleMode: () => setPreference(mode === "dark" ? "light" : "dark"),
388
+ cycleMode: () => {
389
+ const next = modeNames2[(modeNames2.indexOf(mode) + 1) % modeNames2.length];
390
+ if (next) setPreference(next);
391
+ }
392
+ }),
393
+ [schema, mode, preference]
394
+ );
395
+ }
148
396
 
149
397
  // src/theme/context/theme-context.tsx
150
- var import_react4 = require("react");
151
- var import_jsx_runtime2 = require("react/jsx-runtime");
398
+ var import_react7 = require("react");
399
+
400
+ // src/theme/adapters.ts
401
+ var SYSTEM_QUERIES = ["(prefers-contrast: more)", "(prefers-color-scheme: dark)"];
402
+ function createWebStorageAdapter(storageKey, persist) {
403
+ return {
404
+ read() {
405
+ if (!persist || typeof window === "undefined") return null;
406
+ try {
407
+ const raw = window.localStorage.getItem(storageKey);
408
+ return raw ? JSON.parse(raw) : null;
409
+ } catch {
410
+ return null;
411
+ }
412
+ },
413
+ write(value) {
414
+ if (!persist || typeof window === "undefined") return;
415
+ try {
416
+ window.localStorage.setItem(storageKey, JSON.stringify(value));
417
+ } catch {
418
+ }
419
+ }
420
+ };
421
+ }
422
+ function createWebSystemModeAdapter() {
423
+ function get() {
424
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") return "light";
425
+ if (window.matchMedia("(prefers-contrast: more)").matches) return "contrast";
426
+ if (window.matchMedia("(prefers-color-scheme: dark)").matches) return "dark";
427
+ return "light";
428
+ }
429
+ return {
430
+ get,
431
+ subscribe(onChange) {
432
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
433
+ return () => {
434
+ };
435
+ }
436
+ const mqls = SYSTEM_QUERIES.map((q) => window.matchMedia(q));
437
+ for (const mql of mqls) mql.addEventListener?.("change", onChange);
438
+ return () => {
439
+ for (const mql of mqls) mql.removeEventListener?.("change", onChange);
440
+ };
441
+ }
442
+ };
443
+ }
444
+
445
+ // src/theme/context/theme-context.tsx
446
+ var import_jsx_runtime3 = require("react/jsx-runtime");
152
447
  var noop = () => {
153
448
  };
154
449
  var DEFAULT_VALUE = {
@@ -161,29 +456,7 @@ var DEFAULT_VALUE = {
161
456
  toggleMode: noop,
162
457
  cycleMode: noop
163
458
  };
164
- var ThemeContext = (0, import_react4.createContext)(null);
165
- function resolveSystemMode() {
166
- if (typeof window === "undefined" || typeof window.matchMedia !== "function") return "light";
167
- if (window.matchMedia("(prefers-contrast: more)").matches) return "contrast";
168
- if (window.matchMedia("(prefers-color-scheme: dark)").matches) return "dark";
169
- return "light";
170
- }
171
- function readStored(key) {
172
- if (typeof window === "undefined") return null;
173
- try {
174
- const raw = window.localStorage.getItem(key);
175
- return raw ? JSON.parse(raw) : null;
176
- } catch {
177
- return null;
178
- }
179
- }
180
- function writeStored(key, value) {
181
- if (typeof window === "undefined") return;
182
- try {
183
- window.localStorage.setItem(key, JSON.stringify(value));
184
- } catch {
185
- }
186
- }
459
+ var ThemeContext = (0, import_react7.createContext)(null);
187
460
  function ThemeProvider({
188
461
  children,
189
462
  defaultSchema = "tinta",
@@ -191,50 +464,29 @@ function ThemeProvider({
191
464
  storageKey = "ds-theme",
192
465
  persist = true
193
466
  }) {
194
- const [schema, setSchema] = (0, import_react4.useState)(
195
- () => persist && readStored(storageKey)?.schema || defaultSchema
196
- );
197
- const [preference, setPreference] = (0, import_react4.useState)(
198
- () => (persist ? readStored(storageKey)?.preference : null) ?? defaultMode
467
+ const storage = (0, import_react7.useMemo)(
468
+ () => createWebStorageAdapter(storageKey, persist),
469
+ [storageKey, persist]
199
470
  );
200
- const [systemMode, setSystemMode] = (0, import_react4.useState)(resolveSystemMode);
201
- (0, import_react4.useEffect)(() => {
202
- if (preference !== "system") return;
203
- if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
204
- const mqls = ["(prefers-contrast: more)", "(prefers-color-scheme: dark)"].map(
205
- (q) => window.matchMedia(q)
206
- );
207
- const onChange = () => setSystemMode(resolveSystemMode());
208
- onChange();
209
- for (const mql of mqls) mql.addEventListener?.("change", onChange);
210
- return () => {
211
- for (const mql of mqls) mql.removeEventListener?.("change", onChange);
212
- };
213
- }, [preference]);
214
- const mode = preference === "system" ? systemMode : preference;
215
- (0, import_react4.useEffect)(() => {
216
- if (persist) writeStored(storageKey, { schema, preference });
217
- }, [schema, preference, persist, storageKey]);
218
- const value = (0, import_react4.useMemo)(
471
+ const system = (0, import_react7.useMemo)(() => createWebSystemModeAdapter(), []);
472
+ const store = useThemeStore({ defaultSchema, defaultMode }, storage, system);
473
+ const value = (0, import_react7.useMemo)(
219
474
  () => ({
220
- schema,
221
- mode,
222
- preference,
223
- themeClass: themes[schema][mode],
224
- setSchema,
225
- setMode: setPreference,
226
- toggleMode: () => setPreference(mode === "dark" ? "light" : "dark"),
227
- cycleMode: () => {
228
- const next = modeNames[(modeNames.indexOf(mode) + 1) % modeNames.length];
229
- if (next) setPreference(next);
230
- }
475
+ schema: store.schema,
476
+ mode: store.mode,
477
+ preference: store.preference,
478
+ themeClass: themes[store.schema][store.mode],
479
+ setSchema: store.setSchema,
480
+ setMode: store.setMode,
481
+ toggleMode: store.toggleMode,
482
+ cycleMode: store.cycleMode
231
483
  }),
232
- [schema, mode, preference]
484
+ [store]
233
485
  );
234
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ThemeContext.Provider, { value, children });
486
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ThemeContext.Provider, { value, children });
235
487
  }
236
488
  function useTheme() {
237
- return (0, import_react4.useContext)(ThemeContext) ?? DEFAULT_VALUE;
489
+ return (0, import_react7.useContext)(ThemeContext) ?? DEFAULT_VALUE;
238
490
  }
239
491
 
240
492
  // src/theme/typography.css.ts
@@ -252,7 +504,7 @@ function useStyles2({
252
504
  align: align2
253
505
  }) {
254
506
  const { themeClass } = useTheme();
255
- const className = (0, import_react5.useMemo)(
507
+ const className = (0, import_react8.useMemo)(
256
508
  () => [
257
509
  themeClass,
258
510
  base,
@@ -266,7 +518,7 @@ function useStyles2({
266
518
  }
267
519
 
268
520
  // src/components/typography/index.tsx
269
- var import_jsx_runtime3 = require("react/jsx-runtime");
521
+ var import_jsx_runtime4 = require("react/jsx-runtime");
270
522
  var defaultElement = {
271
523
  display: "h1",
272
524
  h1: "h1",
@@ -281,19 +533,20 @@ var defaultElement = {
281
533
  code: "code",
282
534
  blackletter: "span"
283
535
  };
284
- function TypographyInner({ variant: variant2, as, color: color2, align: align2, ...rest }, ref) {
536
+ function TypographyInner({ variant: variant2, as, color: color2, align: align2, testId, ...rest }, ref) {
285
537
  const Component = as ?? defaultElement[variant2];
286
538
  const { text: text2 } = useStyles2({ variant: variant2, color: color2, align: align2 });
287
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Component, { ref, ...rest, className: text2 });
539
+ const { testId: dataTestId } = useTestId("text", testId);
540
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Component, { ref, "data-testid": dataTestId, ...rest, className: text2 });
288
541
  }
289
- var TypographyForwarded = (0, import_react6.forwardRef)(
542
+ var TypographyForwarded = (0, import_react9.forwardRef)(
290
543
  TypographyInner
291
544
  );
292
545
  TypographyForwarded.displayName = "Typography";
293
546
  var Typography = TypographyForwarded;
294
547
 
295
548
  // src/components/button/index.tsx
296
- var import_react10 = require("react");
549
+ var import_react11 = require("react");
297
550
 
298
551
  // src/testing/states.ts
299
552
  function states(map) {
@@ -301,48 +554,8 @@ function states(map) {
301
554
  return active2.length > 0 ? active2.join(" ") : void 0;
302
555
  }
303
556
 
304
- // src/testing/use-test-id.ts
305
- var import_react8 = require("react");
306
-
307
- // src/testing/compose.ts
308
- function normalizeSegment(seg) {
309
- return seg.trim().replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
310
- }
311
- function composeTestId(parts) {
312
- return parts.filter((p) => typeof p === "string" && p.trim() !== "").map(normalizeSegment).join("__");
313
- }
314
-
315
- // src/testing/context/test-id-context.tsx
316
- var import_react7 = require("react");
317
- var import_jsx_runtime4 = require("react/jsx-runtime");
318
- var TestIdContext = (0, import_react7.createContext)([]);
319
- function TestIdProvider({ context, children }) {
320
- const parent = (0, import_react7.useContext)(TestIdContext);
321
- const value = (0, import_react7.useMemo)(
322
- () => [...parent, normalizeSegment(context)].filter((seg) => seg !== ""),
323
- [parent, context]
324
- );
325
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TestIdContext.Provider, { value, children });
326
- }
327
- function useTestIdContext() {
328
- return (0, import_react7.useContext)(TestIdContext);
329
- }
330
-
331
- // src/testing/use-test-id.ts
332
- function useTestId(type, ownTestId) {
333
- const ctx = useTestIdContext();
334
- const testId = composeTestId([type, ...ctx, ownTestId]);
335
- return (0, import_react8.useMemo)(
336
- () => ({
337
- testId,
338
- slot: (name) => `${testId}__${normalizeSegment(name)}`
339
- }),
340
- [testId]
341
- );
342
- }
343
-
344
557
  // src/components/button/use-styles.ts
345
- var import_react9 = require("react");
558
+ var import_react10 = require("react");
346
559
 
347
560
  // src/components/button/use-styles.css.ts
348
561
  var full = "use-styles_full__1pbtill4";
@@ -363,7 +576,7 @@ function useStyles3({
363
576
  className
364
577
  }) {
365
578
  const { themeClass } = useTheme();
366
- const container = (0, import_react9.useMemo)(
579
+ const container = (0, import_react10.useMemo)(
367
580
  () => [
368
581
  themeClass,
369
582
  root,
@@ -380,7 +593,7 @@ function useStyles3({
380
593
  // src/components/button/index.tsx
381
594
  var import_jsx_runtime5 = require("react/jsx-runtime");
382
595
  var ICON_SIZE = { sm: 14, md: 16, lg: 18 };
383
- var Button = (0, import_react10.forwardRef)(function Button2({
596
+ var Button = (0, import_react11.forwardRef)(function Button2({
384
597
  variant: variant2,
385
598
  tone: tone4,
386
599
  size: size3 = "md",
@@ -415,10 +628,10 @@ var Button = (0, import_react10.forwardRef)(function Button2({
415
628
  });
416
629
 
417
630
  // src/components/divider/index.tsx
418
- var import_react12 = require("react");
631
+ var import_react13 = require("react");
419
632
 
420
633
  // src/components/divider/use-styles.ts
421
- var import_react11 = require("react");
634
+ var import_react12 = require("react");
422
635
 
423
636
  // src/components/divider/use-styles.css.ts
424
637
  var horizontal = "use-styles_horizontal__1n7v7yj1";
@@ -431,7 +644,7 @@ var vertical = "use-styles_vertical__1n7v7yj2";
431
644
  // src/components/divider/use-styles.ts
432
645
  function useStyles4({ vertical: vertical2, hasLabel }) {
433
646
  const { themeClass } = useTheme();
434
- const root24 = (0, import_react11.useMemo)(
647
+ const root24 = (0, import_react12.useMemo)(
435
648
  () => [
436
649
  themeClass,
437
650
  root2,
@@ -444,24 +657,25 @@ function useStyles4({ vertical: vertical2, hasLabel }) {
444
657
 
445
658
  // src/components/divider/index.tsx
446
659
  var import_jsx_runtime6 = require("react/jsx-runtime");
447
- var Divider = (0, import_react12.forwardRef)(function Divider2({ vertical: vertical2, label: label7, ...rest }, ref) {
660
+ var Divider = (0, import_react13.forwardRef)(function Divider2({ vertical: vertical2, label: label7, testId, ...rest }, ref) {
448
661
  const hasLabel = label7 != null;
449
662
  const { root: root24, line: line2, label: labelClass } = useStyles4({ vertical: vertical2, hasLabel });
663
+ const { testId: dataTestId, slot } = useTestId("layout", testId);
450
664
  if (hasLabel) {
451
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { ref, role: "separator", className: root24, ...rest, children: [
665
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { ref, role: "separator", className: root24, "data-testid": dataTestId, ...rest, children: [
452
666
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: line2 }),
453
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: labelClass, children: label7 }),
667
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: labelClass, "data-testid": slot("label"), children: label7 }),
454
668
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: line2 })
455
669
  ] });
456
670
  }
457
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, role: "separator", className: root24, ...rest });
671
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, role: "separator", className: root24, "data-testid": dataTestId, ...rest });
458
672
  });
459
673
 
460
674
  // src/components/avatar/index.tsx
461
- var import_react14 = require("react");
675
+ var import_react15 = require("react");
462
676
 
463
677
  // src/components/avatar/use-styles.ts
464
- var import_react13 = require("react");
678
+ var import_react14 = require("react");
465
679
 
466
680
  // src/components/avatar/use-styles.css.ts
467
681
  var root3 = "use-styles_root__1mn1rmu0";
@@ -475,7 +689,7 @@ function useStyles5({
475
689
  className
476
690
  }) {
477
691
  const { themeClass } = useTheme();
478
- const root24 = (0, import_react13.useMemo)(
692
+ const root24 = (0, import_react14.useMemo)(
479
693
  () => [
480
694
  themeClass,
481
695
  root3,
@@ -490,16 +704,17 @@ function useStyles5({
490
704
 
491
705
  // src/components/avatar/index.tsx
492
706
  var import_jsx_runtime7 = require("react/jsx-runtime");
493
- var Avatar = (0, import_react14.forwardRef)(function Avatar2({ size: size3, filled, className, children, ...rest }, ref) {
707
+ var Avatar = (0, import_react15.forwardRef)(function Avatar2({ size: size3, filled, className, children, testId, ...rest }, ref) {
494
708
  const { root: root24 } = useStyles5({ size: size3, filled, className });
495
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { ref, className: root24, ...rest, children });
709
+ const { testId: dataTestId } = useTestId("media", testId);
710
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { ref, className: root24, "data-testid": dataTestId, ...rest, children });
496
711
  });
497
712
 
498
713
  // src/components/badge/index.tsx
499
- var import_react16 = require("react");
714
+ var import_react17 = require("react");
500
715
 
501
716
  // src/components/badge/use-styles.ts
502
- var import_react15 = require("react");
717
+ var import_react16 = require("react");
503
718
 
504
719
  // src/components/badge/use-styles.css.ts
505
720
  var dot = "use-styles_dot__1wpei6p1";
@@ -512,29 +727,30 @@ function useStyles6({
512
727
  className
513
728
  }) {
514
729
  const { themeClass } = useTheme();
515
- const root24 = (0, import_react15.useMemo)(
730
+ const root24 = (0, import_react16.useMemo)(
516
731
  () => [themeClass, root4, className].filter(Boolean).join(" "),
517
732
  [themeClass, className]
518
733
  );
519
- const dot3 = (0, import_react15.useMemo)(() => [dot, tone2[tone4]].join(" "), [tone4]);
734
+ const dot3 = (0, import_react16.useMemo)(() => [dot, tone2[tone4]].join(" "), [tone4]);
520
735
  return { root: root24, dot: dot3 };
521
736
  }
522
737
 
523
738
  // src/components/badge/index.tsx
524
739
  var import_jsx_runtime8 = require("react/jsx-runtime");
525
- var Badge = (0, import_react16.forwardRef)(function Badge2({ count, tone: tone4, className, children, ...rest }, ref) {
740
+ var Badge = (0, import_react17.forwardRef)(function Badge2({ count, tone: tone4, className, children, testId, ...rest }, ref) {
526
741
  const { root: root24, dot: dot3 } = useStyles6({ tone: tone4, className });
527
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { ref, className: root24, ...rest, children: [
742
+ const { testId: dataTestId, slot } = useTestId("media", testId);
743
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { ref, className: root24, "data-testid": dataTestId, ...rest, children: [
528
744
  children,
529
- count != null && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: dot3, children: count })
745
+ count != null && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: dot3, "data-testid": slot("dot"), children: count })
530
746
  ] });
531
747
  });
532
748
 
533
749
  // src/components/progress/index.tsx
534
- var import_react18 = require("react");
750
+ var import_react19 = require("react");
535
751
 
536
752
  // src/components/progress/use-styles.ts
537
- var import_react17 = require("react");
753
+ var import_react18 = require("react");
538
754
 
539
755
  // src/components/progress/use-styles.css.ts
540
756
  var bar = "use-styles_bar__kbop7v3";
@@ -550,7 +766,7 @@ function useStyles7({
550
766
  }) {
551
767
  const { themeClass } = useTheme();
552
768
  const indeterminate2 = value === void 0;
553
- return (0, import_react17.useMemo)(() => {
769
+ return (0, import_react18.useMemo)(() => {
554
770
  const root24 = (...classes) => [themeClass, ...classes, className].filter(Boolean).join(" ");
555
771
  if (variant2 === "circular") {
556
772
  return { track: "", bar: "", spinner: root24(spinner) };
@@ -565,9 +781,10 @@ function useStyles7({
565
781
 
566
782
  // src/components/progress/index.tsx
567
783
  var import_jsx_runtime9 = require("react/jsx-runtime");
568
- var Progress = (0, import_react18.forwardRef)(function Progress2({ variant: variant2 = "linear", value, size: size3 = 20, className, ...rest }, ref) {
784
+ var Progress = (0, import_react19.forwardRef)(function Progress2({ variant: variant2 = "linear", value, size: size3 = 20, className, testId, ...rest }, ref) {
569
785
  const { track: track4, bar: bar2, spinner: spinner2 } = useStyles7({ variant: variant2, value, className });
570
786
  const indeterminate2 = value === void 0;
787
+ const { testId: dataTestId, slot } = useTestId("media", testId);
571
788
  if (variant2 === "circular") {
572
789
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
573
790
  "span",
@@ -579,6 +796,8 @@ var Progress = (0, import_react18.forwardRef)(function Progress2({ variant: vari
579
796
  "aria-valuemin": indeterminate2 ? void 0 : 0,
580
797
  "aria-valuemax": indeterminate2 ? void 0 : 100,
581
798
  style: { width: size3, height: size3 },
799
+ "data-testid": dataTestId,
800
+ "data-state": states({ indeterminate: indeterminate2 }),
582
801
  ...rest
583
802
  }
584
803
  );
@@ -592,14 +811,23 @@ var Progress = (0, import_react18.forwardRef)(function Progress2({ variant: vari
592
811
  "aria-valuenow": indeterminate2 ? void 0 : value,
593
812
  "aria-valuemin": indeterminate2 ? void 0 : 0,
594
813
  "aria-valuemax": indeterminate2 ? void 0 : 100,
814
+ "data-testid": dataTestId,
815
+ "data-state": states({ indeterminate: indeterminate2 }),
595
816
  ...rest,
596
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: bar2, style: indeterminate2 ? void 0 : { width: `${value}%` } })
817
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
818
+ "div",
819
+ {
820
+ className: bar2,
821
+ style: indeterminate2 ? void 0 : { width: `${value}%` },
822
+ "data-testid": slot("bar")
823
+ }
824
+ )
597
825
  }
598
826
  );
599
827
  });
600
828
 
601
829
  // src/components/chip/index.tsx
602
- var import_react20 = require("react");
830
+ var import_react21 = require("react");
603
831
 
604
832
  // src/components/icons/x/index.tsx
605
833
  var import_jsx_runtime10 = require("react/jsx-runtime");
@@ -627,7 +855,7 @@ function XIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
627
855
  }
628
856
 
629
857
  // src/components/chip/use-styles.ts
630
- var import_react19 = require("react");
858
+ var import_react20 = require("react");
631
859
 
632
860
  // src/components/chip/use-styles.css.ts
633
861
  var clickable = "use-styles_clickable__1axilf44";
@@ -643,7 +871,7 @@ function useStyles8({
643
871
  clickable: clickable2
644
872
  }) {
645
873
  const { themeClass } = useTheme();
646
- const root24 = (0, import_react19.useMemo)(
874
+ const root24 = (0, import_react20.useMemo)(
647
875
  () => [
648
876
  themeClass,
649
877
  root5,
@@ -657,21 +885,43 @@ function useStyles8({
657
885
 
658
886
  // src/components/chip/index.tsx
659
887
  var import_jsx_runtime11 = require("react/jsx-runtime");
660
- var Chip = (0, import_react20.forwardRef)(function Chip2({ selected: selected3, tone: tone4, onDelete, onClick, children, ...rest }, ref) {
888
+ var Chip = (0, import_react21.forwardRef)(function Chip2({ selected: selected3, tone: tone4, onDelete, onClick, children, testId, ...rest }, ref) {
661
889
  const clickable2 = Boolean(onClick);
662
890
  const { root: root24, deleteBtn: deleteBtn2 } = useStyles8({ selected: selected3, tone: tone4, clickable: clickable2 });
891
+ const { testId: dataTestId, slot } = useTestId("media", testId);
663
892
  const handleDelete = (event) => {
664
893
  event.stopPropagation();
665
894
  onDelete?.();
666
895
  };
667
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { ref, className: root24, onClick, ...rest, children: [
668
- children,
669
- onDelete && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { type: "button", className: deleteBtn2, "aria-label": "Remove", onClick: handleDelete, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(XIcon, { size: 13 }) })
670
- ] });
896
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
897
+ "span",
898
+ {
899
+ ref,
900
+ className: root24,
901
+ onClick,
902
+ "data-testid": dataTestId,
903
+ "data-state": states({ selected: selected3 }),
904
+ ...rest,
905
+ children: [
906
+ children,
907
+ onDelete && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
908
+ "button",
909
+ {
910
+ type: "button",
911
+ className: deleteBtn2,
912
+ "aria-label": "Remove",
913
+ onClick: handleDelete,
914
+ "data-testid": slot("delete"),
915
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(XIcon, { size: 13 })
916
+ }
917
+ )
918
+ ]
919
+ }
920
+ );
671
921
  });
672
922
 
673
923
  // src/components/checkbox/index.tsx
674
- var import_react22 = require("react");
924
+ var import_react23 = require("react");
675
925
 
676
926
  // src/components/icons/check/index.tsx
677
927
  var import_jsx_runtime12 = require("react/jsx-runtime");
@@ -696,7 +946,7 @@ function CheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
696
946
  }
697
947
 
698
948
  // src/components/checkbox/use-styles.ts
699
- var import_react21 = require("react");
949
+ var import_react22 = require("react");
700
950
 
701
951
  // src/components/checkbox/use-styles.css.ts
702
952
  var box = "use-styles_box__9zoga91";
@@ -709,11 +959,11 @@ var root6 = "use-styles_root__9zoga90";
709
959
  // src/components/checkbox/use-styles.ts
710
960
  function useStyles9({ checked, disabled: disabled3 }) {
711
961
  const { themeClass } = useTheme();
712
- const root24 = (0, import_react21.useMemo)(
962
+ const root24 = (0, import_react22.useMemo)(
713
963
  () => [themeClass, root6, disabled3 && disabled].filter(Boolean).join(" "),
714
964
  [themeClass, disabled3]
715
965
  );
716
- const box2 = (0, import_react21.useMemo)(
966
+ const box2 = (0, import_react22.useMemo)(
717
967
  () => [box, checked && boxChecked].filter(Boolean).join(" "),
718
968
  [checked]
719
969
  );
@@ -722,13 +972,14 @@ function useStyles9({ checked, disabled: disabled3 }) {
722
972
 
723
973
  // src/components/checkbox/index.tsx
724
974
  var import_jsx_runtime13 = require("react/jsx-runtime");
725
- var Checkbox = (0, import_react22.forwardRef)(function Checkbox2({ checked = false, onChange, label: label7, disabled: disabled3 = false, id, ...rest }, ref) {
975
+ var Checkbox = (0, import_react23.forwardRef)(function Checkbox2({ checked = false, onChange, label: label7, disabled: disabled3 = false, id, testId, ...rest }, ref) {
726
976
  const { root: root24, input: input6, box: box2, check: check2 } = useStyles9({ checked, disabled: disabled3 });
977
+ const { testId: dataTestId } = useTestId("toggle", testId);
727
978
  const handleChange = (e) => {
728
979
  if (disabled3) return;
729
980
  onChange?.(e.target.checked);
730
981
  };
731
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: root24, children: [
982
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: root24, "data-testid": dataTestId, "data-state": states({ checked, disabled: disabled3 }), children: [
732
983
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
733
984
  "input",
734
985
  {
@@ -748,10 +999,10 @@ var Checkbox = (0, import_react22.forwardRef)(function Checkbox2({ checked = fal
748
999
  });
749
1000
 
750
1001
  // src/components/radio/index.tsx
751
- var import_react24 = require("react");
1002
+ var import_react25 = require("react");
752
1003
 
753
1004
  // src/components/radio/use-styles.ts
754
- var import_react23 = require("react");
1005
+ var import_react24 = require("react");
755
1006
 
756
1007
  // src/components/radio/use-styles.css.ts
757
1008
  var circle = "use-styles_circle__vy61b42";
@@ -767,7 +1018,7 @@ function useStyles10({
767
1018
  className
768
1019
  }) {
769
1020
  const { themeClass } = useTheme();
770
- const root24 = (0, import_react23.useMemo)(
1021
+ const root24 = (0, import_react24.useMemo)(
771
1022
  () => [themeClass, root7, disabled3 && disabled2, className].filter(Boolean).join(" "),
772
1023
  [themeClass, disabled3, className]
773
1024
  );
@@ -782,9 +1033,10 @@ function useStyles10({
782
1033
 
783
1034
  // src/components/radio/index.tsx
784
1035
  var import_jsx_runtime14 = require("react/jsx-runtime");
785
- var Radio = (0, import_react24.forwardRef)(function Radio2({ checked, onChange, label: label7, name, value, disabled: disabled3, ...rest }, ref) {
1036
+ var Radio = (0, import_react25.forwardRef)(function Radio2({ checked, onChange, label: label7, name, value, disabled: disabled3, testId, ...rest }, ref) {
786
1037
  const { root: root24, input: input6, circle: circle2, dot: dot3, label: labelClass } = useStyles10({ disabled: disabled3 });
787
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: root24, children: [
1038
+ const { testId: dataTestId } = useTestId("toggle", testId);
1039
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: root24, "data-testid": dataTestId, "data-state": states({ checked, disabled: disabled3 }), children: [
788
1040
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
789
1041
  "input",
790
1042
  {
@@ -805,10 +1057,10 @@ var Radio = (0, import_react24.forwardRef)(function Radio2({ checked, onChange,
805
1057
  });
806
1058
 
807
1059
  // src/components/switch/index.tsx
808
- var import_react26 = require("react");
1060
+ var import_react27 = require("react");
809
1061
 
810
1062
  // src/components/switch/use-styles.ts
811
- var import_react25 = require("react");
1063
+ var import_react26 = require("react");
812
1064
 
813
1065
  // src/components/switch/use-styles.css.ts
814
1066
  var input3 = "surfaces_srOnly__1qa7atn0";
@@ -822,7 +1074,7 @@ var trackChecked = "use-styles_trackChecked__1r6kem72";
822
1074
  // src/components/switch/use-styles.ts
823
1075
  function useStyles11({ checked }) {
824
1076
  const { themeClass } = useTheme();
825
- return (0, import_react25.useMemo)(
1077
+ return (0, import_react26.useMemo)(
826
1078
  () => ({
827
1079
  root: [themeClass, root8].filter(Boolean).join(" "),
828
1080
  input: input3,
@@ -836,9 +1088,10 @@ function useStyles11({ checked }) {
836
1088
 
837
1089
  // src/components/switch/index.tsx
838
1090
  var import_jsx_runtime15 = require("react/jsx-runtime");
839
- var Switch = (0, import_react26.forwardRef)(function Switch2({ checked = false, onChange, label: label7, disabled: disabled3, ...rest }, ref) {
1091
+ var Switch = (0, import_react27.forwardRef)(function Switch2({ checked = false, onChange, label: label7, disabled: disabled3, testId, ...rest }, ref) {
840
1092
  const { root: root24, input: input6, track: track4, knob: knob2, label: labelClass } = useStyles11({ checked });
841
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: root24, children: [
1093
+ const { testId: dataTestId } = useTestId("toggle", testId);
1094
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: root24, "data-testid": dataTestId, "data-state": states({ checked, disabled: disabled3 }), children: [
842
1095
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
843
1096
  "input",
844
1097
  {
@@ -862,13 +1115,13 @@ var Switch = (0, import_react26.forwardRef)(function Switch2({ checked = false,
862
1115
  });
863
1116
 
864
1117
  // src/components/text-field/index.tsx
865
- var import_react29 = require("react");
1118
+ var import_react30 = require("react");
866
1119
 
867
1120
  // src/components/base-field/index.tsx
868
- var import_react28 = require("react");
1121
+ var import_react29 = require("react");
869
1122
 
870
1123
  // src/components/base-field/use-styles.ts
871
- var import_react27 = require("react");
1124
+ var import_react28 = require("react");
872
1125
 
873
1126
  // src/components/base-field/use-styles.css.ts
874
1127
  var field = "use-styles_field__1c3cgd3";
@@ -887,7 +1140,7 @@ var trailingSlot = "use-styles_trailingSlot__1c3cgdb";
887
1140
  // src/components/base-field/use-styles.ts
888
1141
  function useStyles12({ error, hasStartIcon, hasTrailing, className }) {
889
1142
  const { themeClass } = useTheme();
890
- return (0, import_react27.useMemo)(() => {
1143
+ return (0, import_react28.useMemo)(() => {
891
1144
  const root24 = [themeClass, root9].filter(Boolean).join(" ");
892
1145
  const labelText2 = [labelText, error && labelTextError].filter(Boolean).join(" ");
893
1146
  const input6 = [
@@ -912,8 +1165,8 @@ function useStyles12({ error, hasStartIcon, hasTrailing, className }) {
912
1165
 
913
1166
  // src/components/base-field/index.tsx
914
1167
  var import_jsx_runtime16 = require("react/jsx-runtime");
915
- var BaseField = (0, import_react28.forwardRef)(function BaseField2({ label: label7, help, error, startIcon: StartIcon, trailing: trailing2, id, className, testId, children }, ref) {
916
- const autoId = (0, import_react28.useId)();
1168
+ var BaseField = (0, import_react29.forwardRef)(function BaseField2({ label: label7, help, error, startIcon: StartIcon, trailing: trailing2, id, className, testId, children }, ref) {
1169
+ const autoId = (0, import_react29.useId)();
917
1170
  const controlId = id ?? autoId;
918
1171
  const errorMessage = error != null && error !== false && error !== true && error !== "" ? error : null;
919
1172
  const hasError = error === true || errorMessage != null;
@@ -961,7 +1214,7 @@ var import_jsx_runtime17 = (
961
1214
  // tipo público de la ref es HTMLInputElement (la ref aplica solo a la rama <input>).
962
1215
  require("react/jsx-runtime")
963
1216
  );
964
- var TextField = (0, import_react29.forwardRef)(function TextField2({
1217
+ var TextField = (0, import_react30.forwardRef)(function TextField2({
965
1218
  label: label7,
966
1219
  help,
967
1220
  error,
@@ -1012,7 +1265,7 @@ var TextField = (0, import_react29.forwardRef)(function TextField2({
1012
1265
  });
1013
1266
 
1014
1267
  // src/components/password-field/index.tsx
1015
- var import_react31 = require("react");
1268
+ var import_react32 = require("react");
1016
1269
 
1017
1270
  // src/components/icons/eye/index.tsx
1018
1271
  var import_jsx_runtime18 = require("react/jsx-runtime");
@@ -1067,21 +1320,21 @@ function EyeOffIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1067
1320
  }
1068
1321
 
1069
1322
  // src/components/password-field/use-styles.ts
1070
- var import_react30 = require("react");
1323
+ var import_react31 = require("react");
1071
1324
 
1072
1325
  // src/components/password-field/use-styles.css.ts
1073
1326
  var revealButton = "use-styles_revealButton__rsu9d50";
1074
1327
 
1075
1328
  // src/components/password-field/use-styles.ts
1076
1329
  function useStyles13() {
1077
- return (0, import_react30.useMemo)(() => ({ revealButton }), []);
1330
+ return (0, import_react31.useMemo)(() => ({ revealButton }), []);
1078
1331
  }
1079
1332
 
1080
1333
  // src/components/password-field/index.tsx
1081
1334
  var import_jsx_runtime20 = require("react/jsx-runtime");
1082
- var PasswordField = (0, import_react31.forwardRef)(
1335
+ var PasswordField = (0, import_react32.forwardRef)(
1083
1336
  function PasswordField2({ label: label7, help, error, startIcon, onChange, id, className, ...rest }, ref) {
1084
- const [reveal, setReveal] = (0, import_react31.useState)(false);
1337
+ const [reveal, setReveal] = (0, import_react32.useState)(false);
1085
1338
  const classes = useStyles13();
1086
1339
  const handleChange = (e) => {
1087
1340
  onChange?.(e.target.value);
@@ -1127,7 +1380,7 @@ var PasswordField = (0, import_react31.forwardRef)(
1127
1380
  );
1128
1381
 
1129
1382
  // src/components/money-field/index.tsx
1130
- var import_react32 = require("react");
1383
+ var import_react33 = require("react");
1131
1384
  var import_jsx_runtime21 = require("react/jsx-runtime");
1132
1385
  function parseAmount(raw) {
1133
1386
  const cleaned = raw.replace(/[^0-9.-]/g, "");
@@ -1135,7 +1388,7 @@ function parseAmount(raw) {
1135
1388
  const n = Number.parseFloat(cleaned);
1136
1389
  return Number.isNaN(n) ? null : n;
1137
1390
  }
1138
- var MoneyField = (0, import_react32.forwardRef)(function MoneyField2({
1391
+ var MoneyField = (0, import_react33.forwardRef)(function MoneyField2({
1139
1392
  value,
1140
1393
  onChange,
1141
1394
  currency = "USD",
@@ -1150,9 +1403,9 @@ var MoneyField = (0, import_react32.forwardRef)(function MoneyField2({
1150
1403
  onBlur,
1151
1404
  ...rest
1152
1405
  }, ref) {
1153
- const [focused, setFocused] = (0, import_react32.useState)(false);
1154
- const [draft, setDraft] = (0, import_react32.useState)("");
1155
- const formatter = (0, import_react32.useMemo)(
1406
+ const [focused, setFocused] = (0, import_react33.useState)(false);
1407
+ const [draft, setDraft] = (0, import_react33.useState)("");
1408
+ const formatter = (0, import_react33.useMemo)(
1156
1409
  () => new Intl.NumberFormat(locale, { style: "currency", currency }),
1157
1410
  [locale, currency]
1158
1411
  );
@@ -1195,10 +1448,10 @@ var MoneyField = (0, import_react32.forwardRef)(function MoneyField2({
1195
1448
  });
1196
1449
 
1197
1450
  // src/components/icon-button/index.tsx
1198
- var import_react34 = require("react");
1451
+ var import_react35 = require("react");
1199
1452
 
1200
1453
  // src/components/icon-button/use-styles.ts
1201
- var import_react33 = require("react");
1454
+ var import_react34 = require("react");
1202
1455
 
1203
1456
  // src/components/icon-button/use-styles.css.ts
1204
1457
  var accent = "use-styles_accent__18np0q02";
@@ -1211,7 +1464,7 @@ function useStyles14({
1211
1464
  tone: tone4 = "ink"
1212
1465
  }) {
1213
1466
  const { themeClass } = useTheme();
1214
- const root24 = (0, import_react33.useMemo)(
1467
+ const root24 = (0, import_react34.useMemo)(
1215
1468
  () => [themeClass, root10, tone4 === "accent" && accent, active2 && active].filter(Boolean).join(" "),
1216
1469
  [themeClass, active2, tone4]
1217
1470
  );
@@ -1220,7 +1473,7 @@ function useStyles14({
1220
1473
 
1221
1474
  // src/components/icon-button/index.tsx
1222
1475
  var import_jsx_runtime22 = require("react/jsx-runtime");
1223
- var IconButton = (0, import_react34.forwardRef)(function IconButton2({ icon: Icon, active: active2, tone: tone4, title, type = "button", testId, ...rest }, ref) {
1476
+ var IconButton = (0, import_react35.forwardRef)(function IconButton2({ icon: Icon, active: active2, tone: tone4, title, type = "button", testId, ...rest }, ref) {
1224
1477
  if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
1225
1478
  const restProps = rest;
1226
1479
  const hasName = title.trim() !== "" || restProps["aria-label"] != null || restProps["aria-labelledby"] != null;
@@ -1247,10 +1500,10 @@ var IconButton = (0, import_react34.forwardRef)(function IconButton2({ icon: Ico
1247
1500
  });
1248
1501
 
1249
1502
  // src/components/card/index.tsx
1250
- var import_react36 = require("react");
1503
+ var import_react37 = require("react");
1251
1504
 
1252
1505
  // src/components/card/use-styles.ts
1253
- var import_react35 = require("react");
1506
+ var import_react36 = require("react");
1254
1507
 
1255
1508
  // src/components/card/use-styles.css.ts
1256
1509
  var body = "use-styles_body__1fuvd022";
@@ -1261,15 +1514,16 @@ var root11 = "use-styles_root__1fuvd020";
1261
1514
  // src/components/card/use-styles.ts
1262
1515
  function useStyles15() {
1263
1516
  const { themeClass } = useTheme();
1264
- const root24 = (0, import_react35.useMemo)(() => `${themeClass} ${root11}`, [themeClass]);
1517
+ const root24 = (0, import_react36.useMemo)(() => `${themeClass} ${root11}`, [themeClass]);
1265
1518
  return { root: root24, header, body, footer };
1266
1519
  }
1267
1520
 
1268
1521
  // src/components/card/index.tsx
1269
1522
  var import_jsx_runtime23 = require("react/jsx-runtime");
1270
- var CardRoot = (0, import_react36.forwardRef)(function Card({ children, ...rest }, ref) {
1523
+ var CardRoot = (0, import_react37.forwardRef)(function Card({ children, testId, ...rest }, ref) {
1271
1524
  const { root: root24 } = useStyles15();
1272
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref, className: root24, ...rest, children });
1525
+ const { testId: dataTestId } = useTestId("layout", testId);
1526
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref, className: root24, "data-testid": dataTestId, ...rest, children });
1273
1527
  });
1274
1528
  function CardHeader({ children, ...rest }) {
1275
1529
  const { header: header3 } = useStyles15();
@@ -1294,7 +1548,7 @@ var Card2 = Object.assign(CardRoot, {
1294
1548
  });
1295
1549
 
1296
1550
  // src/components/alert/index.tsx
1297
- var import_react38 = require("react");
1551
+ var import_react39 = require("react");
1298
1552
 
1299
1553
  // src/components/icons/circle-check/index.tsx
1300
1554
  var import_jsx_runtime24 = require("react/jsx-runtime");
@@ -1400,7 +1654,7 @@ function TriangleAlertIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1400
1654
  }
1401
1655
 
1402
1656
  // src/components/alert/use-styles.ts
1403
- var import_react37 = require("react");
1657
+ var import_react38 = require("react");
1404
1658
 
1405
1659
  // src/components/alert/use-styles.css.ts
1406
1660
  var content = "use-styles_content__ivsh6u6";
@@ -1414,7 +1668,7 @@ function useStyles16({
1414
1668
  className
1415
1669
  }) {
1416
1670
  const { themeClass } = useTheme();
1417
- const root24 = (0, import_react37.useMemo)(
1671
+ const root24 = (0, import_react38.useMemo)(
1418
1672
  () => [themeClass, root12, severity[severity2], className].filter(Boolean).join(" "),
1419
1673
  [themeClass, severity2, className]
1420
1674
  );
@@ -1433,12 +1687,13 @@ var defaultIcons = {
1433
1687
  warn: TriangleAlertIcon,
1434
1688
  danger: CircleXIcon
1435
1689
  };
1436
- var Alert = (0, import_react38.forwardRef)(function Alert2({ severity: severity2 = "info", title, icon, className, children, ...rest }, ref) {
1690
+ var Alert = (0, import_react39.forwardRef)(function Alert2({ severity: severity2 = "info", title, icon, className, testId, children, ...rest }, ref) {
1437
1691
  const styles = useStyles16({ severity: severity2, className });
1692
+ const { testId: dataTestId, slot } = useTestId("feedback", testId);
1438
1693
  const IconComponent = icon ?? defaultIcons[severity2];
1439
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { ref, role: "alert", className: styles.root, ...rest, children: [
1440
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: styles.iconSlot, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconComponent, {}) }),
1441
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: styles.content, children: [
1694
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { ref, role: "alert", className: styles.root, "data-testid": dataTestId, ...rest, children: [
1695
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: styles.iconSlot, "data-testid": slot("icon"), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconComponent, {}) }),
1696
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: styles.content, "data-testid": slot("content"), children: [
1442
1697
  title != null && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Typography, { variant: "h4", children: title }),
1443
1698
  children != null && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Typography, { variant: "body", color: "fg2", children })
1444
1699
  ] })
@@ -1446,10 +1701,10 @@ var Alert = (0, import_react38.forwardRef)(function Alert2({ severity: severity2
1446
1701
  });
1447
1702
 
1448
1703
  // src/components/tooltip/index.tsx
1449
- var import_react40 = require("react");
1704
+ var import_react41 = require("react");
1450
1705
 
1451
1706
  // src/components/tooltip/use-styles.ts
1452
- var import_react39 = require("react");
1707
+ var import_react40 = require("react");
1453
1708
 
1454
1709
  // src/components/tooltip/use-styles.css.ts
1455
1710
  var bubble = "use-styles_bubble__h9kvh1 surfaces_inkySurface__1qa7atn2";
@@ -1461,11 +1716,11 @@ function useStyles17({
1461
1716
  placement: placement2 = "top"
1462
1717
  }) {
1463
1718
  const { themeClass } = useTheme();
1464
- const wrapper4 = (0, import_react39.useMemo)(
1719
+ const wrapper4 = (0, import_react40.useMemo)(
1465
1720
  () => [themeClass, wrapper].filter(Boolean).join(" "),
1466
1721
  [themeClass]
1467
1722
  );
1468
- const bubble2 = (0, import_react39.useMemo)(
1723
+ const bubble2 = (0, import_react40.useMemo)(
1469
1724
  () => [bubble, placement[placement2]].filter(Boolean).join(" "),
1470
1725
  [placement2]
1471
1726
  );
@@ -1475,11 +1730,12 @@ function useStyles17({
1475
1730
  // src/components/tooltip/index.tsx
1476
1731
  var import_jsx_runtime29 = require("react/jsx-runtime");
1477
1732
  var HIDE_DELAY = 120;
1478
- var Tooltip = (0, import_react40.forwardRef)(function Tooltip2({ label: label7, children, placement: placement2 }, ref) {
1479
- const [open, setOpen] = (0, import_react40.useState)(false);
1480
- const tooltipId = (0, import_react40.useId)();
1733
+ var Tooltip = (0, import_react41.forwardRef)(function Tooltip2({ label: label7, children, placement: placement2, testId }, ref) {
1734
+ const [open, setOpen] = (0, import_react41.useState)(false);
1735
+ const tooltipId = (0, import_react41.useId)();
1481
1736
  const { wrapper: wrapper4, bubble: bubble2 } = useStyles17({ placement: placement2 });
1482
- const hideTimer = (0, import_react40.useRef)(null);
1737
+ const { testId: dataTestId, slot } = useTestId("feedback", testId);
1738
+ const hideTimer = (0, import_react41.useRef)(null);
1483
1739
  const clearHide = () => {
1484
1740
  if (hideTimer.current) {
1485
1741
  clearTimeout(hideTimer.current);
@@ -1498,7 +1754,7 @@ var Tooltip = (0, import_react40.forwardRef)(function Tooltip2({ label: label7,
1498
1754
  clearHide();
1499
1755
  setOpen(false);
1500
1756
  };
1501
- (0, import_react40.useEffect)(() => {
1757
+ (0, import_react41.useEffect)(() => {
1502
1758
  return () => {
1503
1759
  if (hideTimer.current) clearTimeout(hideTimer.current);
1504
1760
  };
@@ -1511,12 +1767,13 @@ var Tooltip = (0, import_react40.forwardRef)(function Tooltip2({ label: label7,
1511
1767
  };
1512
1768
  const previousDescribedBy = children.props["aria-describedby"];
1513
1769
  const describedBy = open ? [previousDescribedBy, tooltipId].filter(Boolean).join(" ") : previousDescribedBy;
1514
- const trigger2 = (0, import_react40.cloneElement)(children, { "aria-describedby": describedBy });
1770
+ const trigger2 = (0, import_react41.cloneElement)(children, { "aria-describedby": describedBy });
1515
1771
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
1516
1772
  "span",
1517
1773
  {
1518
1774
  ref,
1519
1775
  className: wrapper4,
1776
+ "data-testid": dataTestId,
1520
1777
  onMouseEnter: show,
1521
1778
  onMouseLeave: scheduleHide,
1522
1779
  onFocus: show,
@@ -1530,6 +1787,7 @@ var Tooltip = (0, import_react40.forwardRef)(function Tooltip2({ label: label7,
1530
1787
  id: tooltipId,
1531
1788
  role: "tooltip",
1532
1789
  className: bubble2,
1790
+ "data-testid": slot("bubble"),
1533
1791
  onMouseEnter: show,
1534
1792
  onMouseLeave: scheduleHide,
1535
1793
  children: label7
@@ -1541,7 +1799,7 @@ var Tooltip = (0, import_react40.forwardRef)(function Tooltip2({ label: label7,
1541
1799
  });
1542
1800
 
1543
1801
  // src/components/select/index.tsx
1544
- var import_react42 = require("react");
1802
+ var import_react43 = require("react");
1545
1803
 
1546
1804
  // src/components/icons/chevron-down/index.tsx
1547
1805
  var import_jsx_runtime30 = require("react/jsx-runtime");
@@ -1566,7 +1824,7 @@ function ChevronDownIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1566
1824
  }
1567
1825
 
1568
1826
  // src/components/select/use-styles.ts
1569
- var import_react41 = require("react");
1827
+ var import_react42 = require("react");
1570
1828
 
1571
1829
  // src/components/select/use-styles.css.ts
1572
1830
  var chevron = "use-styles_chevron__1w1czpb4";
@@ -1585,7 +1843,7 @@ function useStyles18({
1585
1843
  open = false
1586
1844
  }) {
1587
1845
  const { themeClass } = useTheme();
1588
- return (0, import_react41.useMemo)(() => {
1846
+ return (0, import_react42.useMemo)(() => {
1589
1847
  const chevron3 = [chevron, open && chevronOpen].filter(Boolean).join(" ");
1590
1848
  return {
1591
1849
  root: [themeClass, root13].filter(Boolean).join(" "),
@@ -1601,16 +1859,16 @@ function useStyles18({
1601
1859
 
1602
1860
  // src/components/select/index.tsx
1603
1861
  var import_jsx_runtime31 = require("react/jsx-runtime");
1604
- var Select = (0, import_react42.forwardRef)(function Select2({ options, value, onChange, placeholder: placeholder2, label: label7, disabled: disabled3, ...rest }, ref) {
1605
- const [open, setOpen] = (0, import_react42.useState)(false);
1606
- const [activeIndex, setActiveIndex] = (0, import_react42.useState)(0);
1607
- const rootRef = (0, import_react42.useRef)(null);
1862
+ var Select = (0, import_react43.forwardRef)(function Select2({ options, value, onChange, placeholder: placeholder2, label: label7, disabled: disabled3, ...rest }, ref) {
1863
+ const [open, setOpen] = (0, import_react43.useState)(false);
1864
+ const [activeIndex, setActiveIndex] = (0, import_react43.useState)(0);
1865
+ const rootRef = (0, import_react43.useRef)(null);
1608
1866
  const setRootRef = (node) => {
1609
1867
  rootRef.current = node;
1610
1868
  if (typeof ref === "function") ref(node);
1611
1869
  else if (ref) ref.current = node;
1612
1870
  };
1613
- const baseId = (0, import_react42.useId)();
1871
+ const baseId = (0, import_react43.useId)();
1614
1872
  const labelId = `${baseId}-label`;
1615
1873
  const optionId = (index) => `${baseId}-option-${index}`;
1616
1874
  const {
@@ -1622,7 +1880,7 @@ var Select = (0, import_react42.forwardRef)(function Select2({ options, value, o
1622
1880
  menu: menu2,
1623
1881
  optionClass
1624
1882
  } = useStyles18({ open });
1625
- (0, import_react42.useEffect)(() => {
1883
+ (0, import_react43.useEffect)(() => {
1626
1884
  if (!open) return;
1627
1885
  const onPointerDown = (event) => {
1628
1886
  if (rootRef.current && !rootRef.current.contains(event.target)) {
@@ -1733,10 +1991,10 @@ var Select = (0, import_react42.forwardRef)(function Select2({ options, value, o
1733
1991
  });
1734
1992
 
1735
1993
  // src/components/slider/index.tsx
1736
- var import_react44 = require("react");
1994
+ var import_react45 = require("react");
1737
1995
 
1738
1996
  // src/components/slider/use-styles.ts
1739
- var import_react43 = require("react");
1997
+ var import_react44 = require("react");
1740
1998
 
1741
1999
  // src/components/slider/use-styles.css.ts
1742
2000
  var input5 = "use-styles_input__okw59n3";
@@ -1750,7 +2008,7 @@ var wrapper2 = "use-styles_wrapper__okw59n6";
1750
2008
  // src/components/slider/use-styles.ts
1751
2009
  function useStyles19() {
1752
2010
  const { themeClass } = useTheme();
1753
- return (0, import_react43.useMemo)(() => {
2011
+ return (0, import_react44.useMemo)(() => {
1754
2012
  const root24 = [themeClass, root14].filter(Boolean).join(" ");
1755
2013
  return {
1756
2014
  wrapper: wrapper2,
@@ -1766,7 +2024,7 @@ function useStyles19() {
1766
2024
 
1767
2025
  // src/components/slider/index.tsx
1768
2026
  var import_jsx_runtime32 = require("react/jsx-runtime");
1769
- var Slider = (0, import_react44.forwardRef)(function Slider2({ value = 0, onChange, min = 0, max = 100, step: step2 = 1, disabled: disabled3, label: label7, ...rest }, ref) {
2027
+ var Slider = (0, import_react45.forwardRef)(function Slider2({ value = 0, onChange, min = 0, max = 100, step: step2 = 1, disabled: disabled3, label: label7, ...rest }, ref) {
1770
2028
  const { wrapper: wrapper4, label: labelClass, root: root24, track: track4, range: range2, thumb: thumb2, input: input6 } = useStyles19();
1771
2029
  const span = max - min;
1772
2030
  const percent = span > 0 ? (value - min) / span * 100 : 0;
@@ -1800,10 +2058,10 @@ var Slider = (0, import_react44.forwardRef)(function Slider2({ value = 0, onChan
1800
2058
  });
1801
2059
 
1802
2060
  // src/components/accordion/index.tsx
1803
- var import_react46 = require("react");
2061
+ var import_react47 = require("react");
1804
2062
 
1805
2063
  // src/components/accordion/use-styles.ts
1806
- var import_react45 = require("react");
2064
+ var import_react46 = require("react");
1807
2065
 
1808
2066
  // src/components/accordion/use-styles.css.ts
1809
2067
  var chevron2 = "use-styles_chevron__1cjrdh93";
@@ -1816,7 +2074,7 @@ var root15 = "use-styles_root__1cjrdh90";
1816
2074
  // src/components/accordion/use-styles.ts
1817
2075
  function useStyles20({ className }) {
1818
2076
  const { themeClass } = useTheme();
1819
- return (0, import_react45.useMemo)(
2077
+ return (0, import_react46.useMemo)(
1820
2078
  () => ({
1821
2079
  root: [themeClass, root15, className].filter(Boolean).join(" "),
1822
2080
  item,
@@ -1830,9 +2088,10 @@ function useStyles20({ className }) {
1830
2088
 
1831
2089
  // src/components/accordion/index.tsx
1832
2090
  var import_jsx_runtime33 = require("react/jsx-runtime");
1833
- var Accordion = (0, import_react46.forwardRef)(function Accordion2({ items, multiple = false, defaultOpen = [], className }, ref) {
1834
- const [open, setOpen] = (0, import_react46.useState)(defaultOpen);
2091
+ var Accordion = (0, import_react47.forwardRef)(function Accordion2({ items, multiple = false, defaultOpen = [], className, testId }, ref) {
2092
+ const [open, setOpen] = (0, import_react47.useState)(defaultOpen);
1835
2093
  const { root: root24, item: item3, header: header3, chevronFor, panel: panel3 } = useStyles20({ className });
2094
+ const { testId: dataTestId, slot } = useTestId("layout", testId);
1836
2095
  const toggle = (id) => {
1837
2096
  setOpen((current2) => {
1838
2097
  const isOpen = current2.includes(id);
@@ -1840,33 +2099,54 @@ var Accordion = (0, import_react46.forwardRef)(function Accordion2({ items, mult
1840
2099
  return multiple ? [...current2, id] : [id];
1841
2100
  });
1842
2101
  };
1843
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref, className: root24, children: items.map((it) => {
2102
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref, className: root24, "data-testid": dataTestId, children: items.map((it) => {
1844
2103
  const isOpen = open.includes(it.id);
1845
2104
  const panelId = `accordion-panel-${it.id}`;
1846
2105
  const headerId = `accordion-header-${it.id}`;
1847
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: item3, children: [
1848
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1849
- "button",
1850
- {
1851
- type: "button",
1852
- id: headerId,
1853
- className: header3,
1854
- "aria-expanded": isOpen,
1855
- "aria-controls": panelId,
1856
- onClick: () => toggle(it.id),
1857
- children: [
1858
- it.title,
1859
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ChevronDownIcon, { className: chevronFor(isOpen) })
1860
- ]
1861
- }
1862
- ),
1863
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { id: panelId, className: panel3, role: "region", "aria-labelledby": headerId, children: it.content })
1864
- ] }, it.id);
2106
+ const itemSlot = slot(`item-${it.id}`);
2107
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2108
+ "div",
2109
+ {
2110
+ className: item3,
2111
+ "data-testid": itemSlot,
2112
+ "data-state": states({ expanded: isOpen }),
2113
+ children: [
2114
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2115
+ "button",
2116
+ {
2117
+ type: "button",
2118
+ id: headerId,
2119
+ className: header3,
2120
+ "aria-expanded": isOpen,
2121
+ "aria-controls": panelId,
2122
+ "data-testid": `${itemSlot}__trigger`,
2123
+ onClick: () => toggle(it.id),
2124
+ children: [
2125
+ it.title,
2126
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ChevronDownIcon, { className: chevronFor(isOpen) })
2127
+ ]
2128
+ }
2129
+ ),
2130
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2131
+ "div",
2132
+ {
2133
+ id: panelId,
2134
+ className: panel3,
2135
+ role: "region",
2136
+ "aria-labelledby": headerId,
2137
+ "data-testid": `${itemSlot}__panel`,
2138
+ children: it.content
2139
+ }
2140
+ )
2141
+ ]
2142
+ },
2143
+ it.id
2144
+ );
1865
2145
  }) });
1866
2146
  });
1867
2147
 
1868
2148
  // src/components/breadcrumbs/index.tsx
1869
- var import_react48 = require("react");
2149
+ var import_react49 = require("react");
1870
2150
 
1871
2151
  // src/components/icons/chevron-right/index.tsx
1872
2152
  var import_jsx_runtime34 = require("react/jsx-runtime");
@@ -1891,7 +2171,7 @@ function ChevronRightIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1891
2171
  }
1892
2172
 
1893
2173
  // src/components/breadcrumbs/use-styles.ts
1894
- var import_react47 = require("react");
2174
+ var import_react48 = require("react");
1895
2175
 
1896
2176
  // src/components/breadcrumbs/use-styles.css.ts
1897
2177
  var crumb = "use-styles_crumb__7u0du61";
@@ -1902,7 +2182,7 @@ var separator = "use-styles_separator__7u0du63";
1902
2182
  // src/components/breadcrumbs/use-styles.ts
1903
2183
  function useStyles21({ className }) {
1904
2184
  const { themeClass } = useTheme();
1905
- const root24 = (0, import_react47.useMemo)(
2185
+ const root24 = (0, import_react48.useMemo)(
1906
2186
  () => [themeClass, root16, className].filter(Boolean).join(" "),
1907
2187
  [themeClass, className]
1908
2188
  );
@@ -1911,20 +2191,21 @@ function useStyles21({ className }) {
1911
2191
 
1912
2192
  // src/components/breadcrumbs/index.tsx
1913
2193
  var import_jsx_runtime35 = require("react/jsx-runtime");
1914
- var Breadcrumbs = (0, import_react48.forwardRef)(function Breadcrumbs2({ items, className, ...rest }, ref) {
2194
+ var Breadcrumbs = (0, import_react49.forwardRef)(function Breadcrumbs2({ items, className, testId, ...rest }, ref) {
1915
2195
  const { root: root24, crumb: crumb2, current: current2, separator: separator2 } = useStyles21({ className });
1916
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("nav", { ref, "aria-label": "Breadcrumb", className: root24, ...rest, children: items.map((item3, index) => {
2196
+ const { testId: dataTestId, slot } = useTestId("nav", testId);
2197
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("nav", { ref, "aria-label": "Breadcrumb", className: root24, "data-testid": dataTestId, ...rest, children: items.map((item3, index) => {
1917
2198
  const isLast = index === items.length - 1;
1918
2199
  const key = index;
1919
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react48.Fragment, { children: [
1920
- isLast ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: current2, "aria-current": "page", children: item3.label }) : item3.href ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("a", { className: crumb2, href: item3.href, children: item3.label }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: crumb2, children: item3.label }),
2200
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react49.Fragment, { children: [
2201
+ isLast ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: current2, "aria-current": "page", "data-testid": slot(`crumb-${index}`), children: item3.label }) : item3.href ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("a", { className: crumb2, href: item3.href, "data-testid": slot(`crumb-${index}`), children: item3.label }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: crumb2, "data-testid": slot(`crumb-${index}`), children: item3.label }),
1921
2202
  !isLast && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: separator2, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ChevronRightIcon, { size: 14 }) })
1922
2203
  ] }, key);
1923
2204
  }) });
1924
2205
  });
1925
2206
 
1926
2207
  // src/components/pagination/index.tsx
1927
- var import_react50 = require("react");
2208
+ var import_react51 = require("react");
1928
2209
 
1929
2210
  // src/components/icons/chevron-left/index.tsx
1930
2211
  var import_jsx_runtime36 = require("react/jsx-runtime");
@@ -1949,7 +2230,7 @@ function ChevronLeftIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
1949
2230
  }
1950
2231
 
1951
2232
  // src/components/pagination/use-styles.ts
1952
- var import_react49 = require("react");
2233
+ var import_react50 = require("react");
1953
2234
 
1954
2235
  // src/components/pagination/use-styles.css.ts
1955
2236
  var ellipsis = "use-styles_ellipsis__1azgzoh3";
@@ -1961,7 +2242,7 @@ var root17 = "use-styles_root__1azgzoh0";
1961
2242
  // src/components/pagination/use-styles.ts
1962
2243
  function useStyles22() {
1963
2244
  const { themeClass } = useTheme();
1964
- return (0, import_react49.useMemo)(
2245
+ return (0, import_react50.useMemo)(
1965
2246
  () => ({
1966
2247
  root: [themeClass, root17].filter(Boolean).join(" "),
1967
2248
  pageBtnFor: (active2) => [pageBtn, active2 && pageActive].filter(Boolean).join(" "),
@@ -1987,13 +2268,14 @@ function buildItems(count, page, siblingCount) {
1987
2268
  if (last > first) items.push(last);
1988
2269
  return items;
1989
2270
  }
1990
- var Pagination = (0, import_react50.forwardRef)(function Pagination2({ count, page = 1, onChange, siblingCount = 1, ...rest }, ref) {
2271
+ var Pagination = (0, import_react51.forwardRef)(function Pagination2({ count, page = 1, onChange, siblingCount = 1, testId, ...rest }, ref) {
1991
2272
  const { root: root24, pageBtnFor, ellipsis: ellipsis2, nav: nav2 } = useStyles22();
2273
+ const { testId: dataTestId, slot } = useTestId("nav", testId);
1992
2274
  const total = Math.max(1, count);
1993
2275
  const current2 = Math.min(Math.max(1, page), total);
1994
2276
  const items = buildItems(total, current2, siblingCount);
1995
2277
  const go = (n) => onChange?.(Math.min(Math.max(1, n), total));
1996
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("nav", { ref, className: root24, "aria-label": "Pagination", ...rest, children: [
2278
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("nav", { ref, className: root24, "aria-label": "Pagination", "data-testid": dataTestId, ...rest, children: [
1997
2279
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1998
2280
  "button",
1999
2281
  {
@@ -2001,20 +2283,27 @@ var Pagination = (0, import_react50.forwardRef)(function Pagination2({ count, pa
2001
2283
  className: nav2,
2002
2284
  "aria-label": "Previous page",
2003
2285
  disabled: current2 <= 1,
2286
+ "data-testid": slot("prev"),
2004
2287
  onClick: () => go(current2 - 1),
2005
2288
  children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ChevronLeftIcon, { size: 18 })
2006
2289
  }
2007
2290
  ),
2008
2291
  items.map(
2009
- (item3, index) => item3 === "ellipsis" ? (
2010
- // biome-ignore lint/suspicious/noArrayIndexKey: ellipsis position is stable per render
2011
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: ellipsis2, children: "\u2026" }, `ellipsis-${index}`)
2292
+ (item3, index) => item3 === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2293
+ "span",
2294
+ {
2295
+ className: ellipsis2,
2296
+ "data-testid": slot(`ellipsis-${index}`),
2297
+ children: "\u2026"
2298
+ },
2299
+ `ellipsis-${index}`
2012
2300
  ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2013
2301
  "button",
2014
2302
  {
2015
2303
  type: "button",
2016
2304
  className: pageBtnFor(item3 === current2),
2017
2305
  "aria-current": item3 === current2 ? "page" : void 0,
2306
+ "data-testid": slot(`page-${item3}`),
2018
2307
  onClick: () => go(item3),
2019
2308
  children: item3
2020
2309
  },
@@ -2028,6 +2317,7 @@ var Pagination = (0, import_react50.forwardRef)(function Pagination2({ count, pa
2028
2317
  className: nav2,
2029
2318
  "aria-label": "Next page",
2030
2319
  disabled: current2 >= total,
2320
+ "data-testid": slot("next"),
2031
2321
  onClick: () => go(current2 + 1),
2032
2322
  children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ChevronRightIcon, { size: 18 })
2033
2323
  }
@@ -2036,10 +2326,10 @@ var Pagination = (0, import_react50.forwardRef)(function Pagination2({ count, pa
2036
2326
  });
2037
2327
 
2038
2328
  // src/components/stepper/index.tsx
2039
- var import_react52 = require("react");
2329
+ var import_react53 = require("react");
2040
2330
 
2041
2331
  // src/components/stepper/use-styles.ts
2042
- var import_react51 = require("react");
2332
+ var import_react52 = require("react");
2043
2333
 
2044
2334
  // src/components/stepper/use-styles.css.ts
2045
2335
  var connector = "use-styles_connector__79pt4e7";
@@ -2054,7 +2344,7 @@ var step = "use-styles_step__79pt4e1";
2054
2344
  // src/components/stepper/use-styles.ts
2055
2345
  function useStyles23({ className }) {
2056
2346
  const { themeClass } = useTheme();
2057
- return (0, import_react51.useMemo)(() => {
2347
+ return (0, import_react52.useMemo)(() => {
2058
2348
  const root24 = [themeClass, root18, className].filter(Boolean).join(" ");
2059
2349
  const markerFor = (state) => [
2060
2350
  marker,
@@ -2068,18 +2358,28 @@ function useStyles23({ className }) {
2068
2358
 
2069
2359
  // src/components/stepper/index.tsx
2070
2360
  var import_jsx_runtime38 = require("react/jsx-runtime");
2071
- var Stepper = (0, import_react52.forwardRef)(function Stepper2({ steps, active: active2 = 0, className, ...rest }, ref) {
2361
+ var Stepper = (0, import_react53.forwardRef)(function Stepper2({ steps, active: active2 = 0, className, testId, ...rest }, ref) {
2072
2362
  const { root: root24, step: step2, connector: connector2, markerFor, labelFor } = useStyles23({ className });
2073
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { ref, className: root24, ...rest, children: steps.map((s, index) => {
2363
+ const { testId: dataTestId, slot } = useTestId("nav", testId);
2364
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { ref, className: root24, "data-testid": dataTestId, ...rest, children: steps.map((s, index) => {
2074
2365
  const state = index < active2 ? "done" : index === active2 ? "active" : "upcoming";
2075
2366
  const isActive = state === "active";
2076
2367
  return (
2077
2368
  // biome-ignore lint/suspicious/noArrayIndexKey: steps are a static, ordered list with no stable id.
2078
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react52.Fragment, { children: [
2079
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: step2, "aria-current": isActive ? "step" : void 0, children: [
2080
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: markerFor(state), children: state === "done" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CheckIcon, { size: 14 }) : index + 1 }),
2081
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: labelFor(isActive), children: s.label })
2082
- ] }),
2369
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react53.Fragment, { children: [
2370
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2371
+ "div",
2372
+ {
2373
+ className: step2,
2374
+ "aria-current": isActive ? "step" : void 0,
2375
+ "data-testid": slot(`step-${index}`),
2376
+ "data-state": states({ done: state === "done", active: isActive }),
2377
+ children: [
2378
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: markerFor(state), children: state === "done" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CheckIcon, { size: 14 }) : index + 1 }),
2379
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: labelFor(isActive), children: s.label })
2380
+ ]
2381
+ }
2382
+ ),
2083
2383
  index < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "data-part": "connector", className: connector2 })
2084
2384
  ] }, index)
2085
2385
  );
@@ -2087,10 +2387,10 @@ var Stepper = (0, import_react52.forwardRef)(function Stepper2({ steps, active:
2087
2387
  });
2088
2388
 
2089
2389
  // src/components/tabs/index.tsx
2090
- var import_react54 = require("react");
2390
+ var import_react55 = require("react");
2091
2391
 
2092
2392
  // src/components/tabs/use-styles.ts
2093
- var import_react53 = require("react");
2393
+ var import_react54 = require("react");
2094
2394
 
2095
2395
  // src/components/tabs/use-styles.css.ts
2096
2396
  var panel2 = "use-styles_panel__1l4m7t43";
@@ -2101,7 +2401,7 @@ var tabActive = "use-styles_tabActive__1l4m7t42";
2101
2401
  // src/components/tabs/use-styles.ts
2102
2402
  function useStyles24() {
2103
2403
  const { themeClass } = useTheme();
2104
- return (0, import_react53.useMemo)(() => {
2404
+ return (0, import_react54.useMemo)(() => {
2105
2405
  const root24 = [themeClass, root19].filter(Boolean).join(" ");
2106
2406
  const tabClass = (active2) => [tab, active2 && tabActive].filter(Boolean).join(" ");
2107
2407
  return { root: root24, tab, tabClass, panel: panel2 };
@@ -2110,10 +2410,11 @@ function useStyles24() {
2110
2410
 
2111
2411
  // src/components/tabs/index.tsx
2112
2412
  var import_jsx_runtime39 = require("react/jsx-runtime");
2113
- var Tabs = (0, import_react54.forwardRef)(function Tabs2({ items, value, onChange, ...rest }, ref) {
2413
+ var Tabs = (0, import_react55.forwardRef)(function Tabs2({ items, value, onChange, testId, ...rest }, ref) {
2114
2414
  const { root: root24, tabClass, panel: panel3 } = useStyles24();
2115
- const baseId = (0, import_react54.useId)();
2116
- const tabRefs = (0, import_react54.useRef)([]);
2415
+ const { testId: dataTestId, slot } = useTestId("nav", testId);
2416
+ const baseId = (0, import_react55.useId)();
2417
+ const tabRefs = (0, import_react55.useRef)([]);
2117
2418
  const hasPanels = items.some((item3) => item3.content !== void 0);
2118
2419
  const activeIndex = items.findIndex((item3) => item3.value === value);
2119
2420
  const tabId = (v) => `${baseId}-tab-${v}`;
@@ -2146,7 +2447,7 @@ var Tabs = (0, import_react54.forwardRef)(function Tabs2({ items, value, onChang
2146
2447
  }
2147
2448
  };
2148
2449
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
2149
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, role: "tablist", className: root24, ...rest, children: items.map((item3, index) => {
2450
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, role: "tablist", className: root24, "data-testid": dataTestId, ...rest, children: items.map((item3, index) => {
2150
2451
  const active2 = item3.value === value;
2151
2452
  const tabbable = active2 || activeIndex === -1 && index === 0;
2152
2453
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
@@ -2162,6 +2463,8 @@ var Tabs = (0, import_react54.forwardRef)(function Tabs2({ items, value, onChang
2162
2463
  "aria-controls": hasPanels ? panelId(item3.value) : void 0,
2163
2464
  tabIndex: tabbable ? 0 : -1,
2164
2465
  className: tabClass(active2),
2466
+ "data-testid": slot(`tab-${index}`),
2467
+ "data-state": states({ selected: active2 }),
2165
2468
  onClick: () => onChange?.(item3.value),
2166
2469
  onKeyDown: (event) => onKeyDown(event, index),
2167
2470
  children: item3.label
@@ -2178,6 +2481,7 @@ var Tabs = (0, import_react54.forwardRef)(function Tabs2({ items, value, onChang
2178
2481
  hidden: item3.value !== value,
2179
2482
  tabIndex: 0,
2180
2483
  className: panel3,
2484
+ "data-testid": slot(`panel-${item3.value}`),
2181
2485
  children: item3.content
2182
2486
  },
2183
2487
  item3.value
@@ -2186,10 +2490,10 @@ var Tabs = (0, import_react54.forwardRef)(function Tabs2({ items, value, onChang
2186
2490
  });
2187
2491
 
2188
2492
  // src/components/menu/index.tsx
2189
- var import_react56 = require("react");
2493
+ var import_react57 = require("react");
2190
2494
 
2191
2495
  // src/components/menu/use-styles.ts
2192
- var import_react55 = require("react");
2496
+ var import_react56 = require("react");
2193
2497
 
2194
2498
  // src/components/menu/use-styles.css.ts
2195
2499
  var danger = "use-styles_danger__1uyxaj3";
@@ -2200,7 +2504,7 @@ var wrapper3 = "use-styles_wrapper__1uyxaj0";
2200
2504
  // src/components/menu/use-styles.ts
2201
2505
  function useStyles25() {
2202
2506
  const { themeClass } = useTheme();
2203
- return (0, import_react55.useMemo)(
2507
+ return (0, import_react56.useMemo)(
2204
2508
  () => ({
2205
2509
  wrapper: [themeClass, wrapper3].filter(Boolean).join(" "),
2206
2510
  list,
@@ -2217,18 +2521,18 @@ function assignRef(ref, value) {
2217
2521
  if (typeof ref === "function") ref(value);
2218
2522
  else if (ref) ref.current = value;
2219
2523
  }
2220
- var Menu = (0, import_react56.forwardRef)(function Menu2({ trigger: trigger2, items, testId }, ref) {
2524
+ var Menu = (0, import_react57.forwardRef)(function Menu2({ trigger: trigger2, items, testId }, ref) {
2221
2525
  const { wrapper: wrapper4, list: list2, item: item3, dangerItem } = useStyles25();
2222
2526
  const { testId: rootTestId, slot } = useTestId("menu", testId);
2223
- const [open, setOpen] = (0, import_react56.useState)(false);
2224
- const [alignEnd, setAlignEnd] = (0, import_react56.useState)(false);
2225
- const rootRef = (0, import_react56.useRef)(null);
2527
+ const [open, setOpen] = (0, import_react57.useState)(false);
2528
+ const [alignEnd, setAlignEnd] = (0, import_react57.useState)(false);
2529
+ const rootRef = (0, import_react57.useRef)(null);
2226
2530
  const setRootRef = (node) => {
2227
2531
  rootRef.current = node;
2228
2532
  assignRef(ref, node);
2229
2533
  };
2230
- const listRef = (0, import_react56.useRef)(null);
2231
- const triggerRef = (0, import_react56.useRef)(null);
2534
+ const listRef = (0, import_react57.useRef)(null);
2535
+ const triggerRef = (0, import_react57.useRef)(null);
2232
2536
  const getMenuItems = () => Array.from(listRef.current?.querySelectorAll('[role="menuitem"]') ?? []);
2233
2537
  const focusItemAt = (index) => {
2234
2538
  const menuItems = getMenuItems();
@@ -2240,7 +2544,7 @@ var Menu = (0, import_react56.forwardRef)(function Menu2({ trigger: trigger2, it
2240
2544
  setOpen(false);
2241
2545
  triggerRef.current?.focus();
2242
2546
  };
2243
- (0, import_react56.useLayoutEffect)(() => {
2547
+ (0, import_react57.useLayoutEffect)(() => {
2244
2548
  if (!open) {
2245
2549
  setAlignEnd(false);
2246
2550
  return;
@@ -2252,7 +2556,7 @@ var Menu = (0, import_react56.forwardRef)(function Menu2({ trigger: trigger2, it
2252
2556
  const viewport = document.documentElement.clientWidth;
2253
2557
  setAlignEnd(rootLeft + listEl.offsetWidth > viewport);
2254
2558
  }, [open]);
2255
- (0, import_react56.useEffect)(() => {
2559
+ (0, import_react57.useEffect)(() => {
2256
2560
  if (!open) return;
2257
2561
  listRef.current?.querySelector('[role="menuitem"]')?.focus();
2258
2562
  const onDocMouseDown = (event) => {
@@ -2308,7 +2612,7 @@ var Menu = (0, import_react56.forwardRef)(function Menu2({ trigger: trigger2, it
2308
2612
  triggerRef.current = node;
2309
2613
  assignRef(consumerRef, node);
2310
2614
  };
2311
- const clonedTrigger = (0, import_react56.cloneElement)(trigger2, {
2615
+ const clonedTrigger = (0, import_react57.cloneElement)(trigger2, {
2312
2616
  ref: mergedTriggerRef,
2313
2617
  "aria-haspopup": "menu",
2314
2618
  "aria-expanded": open,
@@ -2359,11 +2663,11 @@ var Menu = (0, import_react56.forwardRef)(function Menu2({ trigger: trigger2, it
2359
2663
  });
2360
2664
 
2361
2665
  // src/components/dialog/index.tsx
2362
- var import_react58 = require("react");
2666
+ var import_react59 = require("react");
2363
2667
  var import_react_dom = require("react-dom");
2364
2668
 
2365
2669
  // src/components/dialog/use-styles.ts
2366
- var import_react57 = require("react");
2670
+ var import_react58 = require("react");
2367
2671
 
2368
2672
  // src/components/dialog/use-styles.css.ts
2369
2673
  var actions = "use-styles_actions__5tstu83";
@@ -2374,7 +2678,7 @@ var surface = "use-styles_surface__5tstu81";
2374
2678
  // src/components/dialog/use-styles.ts
2375
2679
  function useStyles26() {
2376
2680
  const { themeClass } = useTheme();
2377
- return (0, import_react57.useMemo)(
2681
+ return (0, import_react58.useMemo)(
2378
2682
  () => ({
2379
2683
  overlay: [themeClass, overlay].filter(Boolean).join(" "),
2380
2684
  surface,
@@ -2392,18 +2696,18 @@ function assignRef2(ref, value) {
2392
2696
  if (typeof ref === "function") ref(value);
2393
2697
  else if (ref) ref.current = value;
2394
2698
  }
2395
- var Dialog = (0, import_react58.forwardRef)(function Dialog2({ open, onClose, title, actions: actions3, children, testId }, ref) {
2699
+ var Dialog = (0, import_react59.forwardRef)(function Dialog2({ open, onClose, title, actions: actions3, children, testId }, ref) {
2396
2700
  const { overlay: overlay2, surface: surface2, body: body3, actions: actionsClass } = useStyles26();
2397
2701
  const { testId: rootTestId, slot } = useTestId("dialog", testId);
2398
- const surfaceRef = (0, import_react58.useRef)(null);
2702
+ const surfaceRef = (0, import_react59.useRef)(null);
2399
2703
  const setSurfaceRef = (node) => {
2400
2704
  surfaceRef.current = node;
2401
2705
  assignRef2(ref, node);
2402
2706
  };
2403
- const previouslyFocused = (0, import_react58.useRef)(null);
2404
- const generatedId = (0, import_react58.useId)();
2707
+ const previouslyFocused = (0, import_react59.useRef)(null);
2708
+ const generatedId = (0, import_react59.useId)();
2405
2709
  const titleId = title != null ? generatedId : void 0;
2406
- (0, import_react58.useEffect)(() => {
2710
+ (0, import_react59.useEffect)(() => {
2407
2711
  if (!open) return;
2408
2712
  const onKeyDown = (event) => {
2409
2713
  if (event.key === "Escape") onClose();
@@ -2411,13 +2715,13 @@ var Dialog = (0, import_react58.forwardRef)(function Dialog2({ open, onClose, ti
2411
2715
  document.addEventListener("keydown", onKeyDown);
2412
2716
  return () => document.removeEventListener("keydown", onKeyDown);
2413
2717
  }, [open, onClose]);
2414
- (0, import_react58.useEffect)(() => {
2718
+ (0, import_react59.useEffect)(() => {
2415
2719
  if (!open) return;
2416
2720
  previouslyFocused.current = document.activeElement;
2417
2721
  surfaceRef.current?.focus();
2418
2722
  return () => previouslyFocused.current?.focus?.();
2419
2723
  }, [open]);
2420
- (0, import_react58.useEffect)(() => {
2724
+ (0, import_react59.useEffect)(() => {
2421
2725
  if (!open) return;
2422
2726
  const previousOverflow = document.body.style.overflow;
2423
2727
  document.body.style.overflow = "hidden";
@@ -2479,11 +2783,11 @@ var Dialog = (0, import_react58.forwardRef)(function Dialog2({ open, onClose, ti
2479
2783
  });
2480
2784
 
2481
2785
  // src/components/snackbar/index.tsx
2482
- var import_react60 = require("react");
2786
+ var import_react61 = require("react");
2483
2787
  var import_react_dom2 = require("react-dom");
2484
2788
 
2485
2789
  // src/components/snackbar/use-styles.ts
2486
- var import_react59 = require("react");
2790
+ var import_react60 = require("react");
2487
2791
 
2488
2792
  // src/components/snackbar/use-styles.css.ts
2489
2793
  var closeBtn = "use-styles_closeBtn__ihzsep2";
@@ -2493,7 +2797,7 @@ var root20 = "use-styles_root__ihzsep0 surfaces_inkySurface__1qa7atn2";
2493
2797
  // src/components/snackbar/use-styles.ts
2494
2798
  function useStyles27() {
2495
2799
  const { themeClass } = useTheme();
2496
- return (0, import_react59.useMemo)(
2800
+ return (0, import_react60.useMemo)(
2497
2801
  () => ({
2498
2802
  root: [themeClass, root20].filter(Boolean).join(" "),
2499
2803
  message,
@@ -2505,24 +2809,35 @@ function useStyles27() {
2505
2809
 
2506
2810
  // src/components/snackbar/index.tsx
2507
2811
  var import_jsx_runtime42 = require("react/jsx-runtime");
2508
- var Snackbar = (0, import_react60.forwardRef)(function Snackbar2({ open, message: message2, action, onClose }, ref) {
2812
+ var Snackbar = (0, import_react61.forwardRef)(function Snackbar2({ open, message: message2, action, onClose, testId }, ref) {
2509
2813
  const { root: root24, message: messageClass, closeBtn: closeBtn2 } = useStyles27();
2814
+ const { testId: dataTestId, slot } = useTestId("feedback", testId);
2510
2815
  if (!open || typeof document === "undefined") return null;
2511
2816
  return (0, import_react_dom2.createPortal)(
2512
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { ref, role: "status", className: root24, children: [
2513
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: messageClass, children: message2 }),
2817
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { ref, role: "status", className: root24, "data-testid": dataTestId, children: [
2818
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: messageClass, "data-testid": slot("message"), children: message2 }),
2514
2819
  action,
2515
- onClose && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("button", { type: "button", "aria-label": "Close", className: closeBtn2, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(XIcon, { size: 18 }) })
2820
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2821
+ "button",
2822
+ {
2823
+ type: "button",
2824
+ "aria-label": "Close",
2825
+ className: closeBtn2,
2826
+ "data-testid": slot("close"),
2827
+ onClick: onClose,
2828
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(XIcon, { size: 18 })
2829
+ }
2830
+ )
2516
2831
  ] }),
2517
2832
  document.body
2518
2833
  );
2519
2834
  });
2520
2835
 
2521
2836
  // src/components/table/index.tsx
2522
- var import_react62 = require("react");
2837
+ var import_react63 = require("react");
2523
2838
 
2524
2839
  // src/components/table/use-styles.ts
2525
- var import_react61 = require("react");
2840
+ var import_react62 = require("react");
2526
2841
 
2527
2842
  // src/components/table/use-styles.css.ts
2528
2843
  var alignRight = "use-styles_alignRight__1n2cz6i3";
@@ -2534,7 +2849,7 @@ var th = "use-styles_th__1n2cz6i1";
2534
2849
  // src/components/table/use-styles.ts
2535
2850
  function useStyles28({ className }) {
2536
2851
  const { themeClass } = useTheme();
2537
- const root24 = (0, import_react61.useMemo)(
2852
+ const root24 = (0, import_react62.useMemo)(
2538
2853
  () => [themeClass, root21, className].filter(Boolean).join(" "),
2539
2854
  [themeClass, className]
2540
2855
  );
@@ -2549,25 +2864,26 @@ function useStyles28({ className }) {
2549
2864
 
2550
2865
  // src/components/table/index.tsx
2551
2866
  var import_jsx_runtime43 = require("react/jsx-runtime");
2552
- function TableInner({ columns, rows, getRowKey, className, caption: caption2, ...rest }, ref) {
2867
+ function TableInner({ columns, rows, getRowKey, className, caption: caption2, testId, ...rest }, ref) {
2553
2868
  const { root: root24, th: th2, td: td2, alignRight: alignRight2, caption: captionClass } = useStyles28({ className });
2869
+ const { testId: dataTestId, slot } = useTestId("list", testId);
2554
2870
  const headClass = (column) => column.align === "right" ? `${th2} ${alignRight2}` : th2;
2555
2871
  const cellClass = (column) => column.align === "right" ? `${td2} ${alignRight2}` : td2;
2556
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("table", { ref, className: root24, ...rest, children: [
2872
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("table", { ref, className: root24, "data-testid": dataTestId, ...rest, children: [
2557
2873
  caption2 != null && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("caption", { className: captionClass, children: caption2 }),
2558
2874
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("tr", { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("th", { scope: "col", className: headClass(column), children: column.header }, column.key)) }) }),
2559
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("tbody", { children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("tr", { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("td", { className: cellClass(column), children: column.render ? column.render(row) : String(row[column.key]) }, column.key)) }, getRowKey ? getRowKey(row, index) : index)) })
2875
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("tbody", { children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("tr", { "data-testid": slot(`row-${index}`), children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("td", { className: cellClass(column), children: column.render ? column.render(row) : String(row[column.key]) }, column.key)) }, getRowKey ? getRowKey(row, index) : index)) })
2560
2876
  ] });
2561
2877
  }
2562
- var TableForwarded = (0, import_react62.forwardRef)(TableInner);
2878
+ var TableForwarded = (0, import_react63.forwardRef)(TableInner);
2563
2879
  TableForwarded.displayName = "Table";
2564
2880
  var Table = TableForwarded;
2565
2881
 
2566
2882
  // src/components/app-bar/index.tsx
2567
- var import_react64 = require("react");
2883
+ var import_react65 = require("react");
2568
2884
 
2569
2885
  // src/components/app-bar/use-styles.ts
2570
- var import_react63 = require("react");
2886
+ var import_react64 = require("react");
2571
2887
 
2572
2888
  // src/components/app-bar/use-styles.css.ts
2573
2889
  var actions2 = "use-styles_actions__1h133nh2";
@@ -2577,7 +2893,7 @@ var root22 = "use-styles_root__1h133nh0";
2577
2893
  // src/components/app-bar/use-styles.ts
2578
2894
  function useStyles29({ className }) {
2579
2895
  const { themeClass } = useTheme();
2580
- const root24 = (0, import_react63.useMemo)(
2896
+ const root24 = (0, import_react64.useMemo)(
2581
2897
  () => [themeClass, root22, className].filter(Boolean).join(" "),
2582
2898
  [themeClass, className]
2583
2899
  );
@@ -2586,20 +2902,21 @@ function useStyles29({ className }) {
2586
2902
 
2587
2903
  // src/components/app-bar/index.tsx
2588
2904
  var import_jsx_runtime44 = require("react/jsx-runtime");
2589
- var AppBar = (0, import_react64.forwardRef)(function AppBar2({ brand: brand2, actions: actions3, className, children, ...rest }, ref) {
2905
+ var AppBar = (0, import_react65.forwardRef)(function AppBar2({ brand: brand2, actions: actions3, className, children, testId, ...rest }, ref) {
2590
2906
  const styles = useStyles29({ className });
2591
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("header", { ref, className: styles.root, ...rest, children: [
2592
- brand2 !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: styles.brand, children: brand2 }) : null,
2907
+ const { testId: dataTestId, slot } = useTestId("nav", testId);
2908
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("header", { ref, className: styles.root, "data-testid": dataTestId, ...rest, children: [
2909
+ brand2 !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: styles.brand, "data-testid": slot("brand"), children: brand2 }) : null,
2593
2910
  children,
2594
- actions3 !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: styles.actions, children: actions3 }) : null
2911
+ actions3 !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: styles.actions, "data-testid": slot("actions"), children: actions3 }) : null
2595
2912
  ] });
2596
2913
  });
2597
2914
 
2598
2915
  // src/components/list-item/index.tsx
2599
- var import_react66 = require("react");
2916
+ var import_react67 = require("react");
2600
2917
 
2601
2918
  // src/components/list-item/use-styles.ts
2602
- var import_react65 = require("react");
2919
+ var import_react66 = require("react");
2603
2920
 
2604
2921
  // src/components/list-item/use-styles.css.ts
2605
2922
  var content2 = "use-styles_content__kbreq13";
@@ -2614,7 +2931,7 @@ function useStyles30({
2614
2931
  className
2615
2932
  }) {
2616
2933
  const { themeClass } = useTheme();
2617
- const root24 = (0, import_react65.useMemo)(
2934
+ const root24 = (0, import_react66.useMemo)(
2618
2935
  () => [themeClass, root23, selected3 && selected2, className].filter(Boolean).join(" "),
2619
2936
  [themeClass, selected3, className]
2620
2937
  );
@@ -2623,13 +2940,24 @@ function useStyles30({
2623
2940
 
2624
2941
  // src/components/list-item/index.tsx
2625
2942
  var import_jsx_runtime45 = require("react/jsx-runtime");
2626
- var ListItem = (0, import_react66.forwardRef)(function ListItem2({ leading: leading2, trailing: trailing2, selected: selected3, className, children, ...rest }, ref) {
2943
+ var ListItem = (0, import_react67.forwardRef)(function ListItem2({ leading: leading2, trailing: trailing2, selected: selected3, className, testId, children, ...rest }, ref) {
2627
2944
  const styles = useStyles30({ selected: selected3, className });
2628
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { ref, className: styles.root, ...rest, children: [
2629
- leading2 != null && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: styles.leading, children: leading2 }),
2630
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: styles.content, children }),
2631
- trailing2 != null && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: styles.trailing, children: trailing2 })
2632
- ] });
2945
+ const { testId: dataTestId, slot } = useTestId("list", testId);
2946
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
2947
+ "div",
2948
+ {
2949
+ ref,
2950
+ className: styles.root,
2951
+ "data-testid": dataTestId,
2952
+ "data-state": states({ selected: selected3 }),
2953
+ ...rest,
2954
+ children: [
2955
+ leading2 != null && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: styles.leading, "data-testid": slot("leading"), children: leading2 }),
2956
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: styles.content, "data-testid": slot("content"), children }),
2957
+ trailing2 != null && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: styles.trailing, "data-testid": slot("trailing"), children: trailing2 })
2958
+ ]
2959
+ }
2960
+ );
2633
2961
  });
2634
2962
 
2635
2963
  // src/components/icons/chevron-up/index.tsx