@teja-app/ui 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/components/Alert/Alert.d.ts.map +1 -1
  2. package/dist/components/Alert/Alert.types.d.ts +2 -0
  3. package/dist/components/Alert/Alert.types.d.ts.map +1 -1
  4. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  5. package/dist/components/Avatar/Avatar.types.d.ts +2 -0
  6. package/dist/components/Avatar/Avatar.types.d.ts.map +1 -1
  7. package/dist/components/Badge/Badge.d.ts.map +1 -1
  8. package/dist/components/Badge/Badge.types.d.ts +2 -0
  9. package/dist/components/Badge/Badge.types.d.ts.map +1 -1
  10. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  11. package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +2 -0
  12. package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts.map +1 -1
  13. package/dist/components/Card/Card.d.ts.map +1 -1
  14. package/dist/components/Card/Card.types.d.ts +2 -0
  15. package/dist/components/Card/Card.types.d.ts.map +1 -1
  16. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  17. package/dist/components/Checkbox/Checkbox.types.d.ts +2 -0
  18. package/dist/components/Checkbox/Checkbox.types.d.ts.map +1 -1
  19. package/dist/components/Combobox/Combobox.d.ts +1 -1
  20. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  21. package/dist/components/Combobox/Combobox.types.d.ts +2 -0
  22. package/dist/components/Combobox/Combobox.types.d.ts.map +1 -1
  23. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
  24. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
  25. package/dist/components/ConfirmDialog/ConfirmDialog.types.d.ts +2 -0
  26. package/dist/components/ConfirmDialog/ConfirmDialog.types.d.ts.map +1 -1
  27. package/dist/components/Drawer/Drawer.d.ts +1 -1
  28. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  29. package/dist/components/Drawer/Drawer.types.d.ts +2 -0
  30. package/dist/components/Drawer/Drawer.types.d.ts.map +1 -1
  31. package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
  32. package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
  33. package/dist/components/EmptyState/EmptyState.types.d.ts.map +1 -1
  34. package/dist/components/Input/Input.d.ts.map +1 -1
  35. package/dist/components/Input/Input.types.d.ts +2 -0
  36. package/dist/components/Input/Input.types.d.ts.map +1 -1
  37. package/dist/components/Modal/Modal.d.ts +1 -1
  38. package/dist/components/Modal/Modal.d.ts.map +1 -1
  39. package/dist/components/Modal/Modal.types.d.ts +2 -0
  40. package/dist/components/Modal/Modal.types.d.ts.map +1 -1
  41. package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
  42. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  43. package/dist/components/MultiSelect/MultiSelect.types.d.ts +2 -0
  44. package/dist/components/MultiSelect/MultiSelect.types.d.ts.map +1 -1
  45. package/dist/components/Pagination/Pagination.d.ts +1 -1
  46. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  47. package/dist/components/Pagination/Pagination.types.d.ts +2 -0
  48. package/dist/components/Pagination/Pagination.types.d.ts.map +1 -1
  49. package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
  50. package/dist/components/PasswordInput/PasswordInput.types.d.ts +2 -0
  51. package/dist/components/PasswordInput/PasswordInput.types.d.ts.map +1 -1
  52. package/dist/components/Radio/Radio.d.ts.map +1 -1
  53. package/dist/components/Radio/Radio.types.d.ts +4 -0
  54. package/dist/components/Radio/Radio.types.d.ts.map +1 -1
  55. package/dist/components/Radio/RadioGroup.d.ts +1 -1
  56. package/dist/components/Radio/RadioGroup.d.ts.map +1 -1
  57. package/dist/components/Select/Select.d.ts +1 -1
  58. package/dist/components/Select/Select.d.ts.map +1 -1
  59. package/dist/components/Select/Select.types.d.ts +2 -0
  60. package/dist/components/Select/Select.types.d.ts.map +1 -1
  61. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
  62. package/dist/components/Sidebar/Sidebar.types.d.ts +4 -0
  63. package/dist/components/Sidebar/Sidebar.types.d.ts.map +1 -1
  64. package/dist/components/Sidebar/SidebarItem.d.ts +1 -1
  65. package/dist/components/Sidebar/SidebarItem.d.ts.map +1 -1
  66. package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
  67. package/dist/components/Skeleton/Skeleton.types.d.ts +2 -0
  68. package/dist/components/Skeleton/Skeleton.types.d.ts.map +1 -1
  69. package/dist/components/Spinner/Spinner.d.ts.map +1 -1
  70. package/dist/components/Spinner/Spinner.types.d.ts +2 -0
  71. package/dist/components/Spinner/Spinner.types.d.ts.map +1 -1
  72. package/dist/components/Tabs/Tabs.d.ts +2 -2
  73. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  74. package/dist/components/Tabs/Tabs.types.d.ts +4 -0
  75. package/dist/components/Tabs/Tabs.types.d.ts.map +1 -1
  76. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  77. package/dist/components/Textarea/Textarea.types.d.ts +2 -0
  78. package/dist/components/Textarea/Textarea.types.d.ts.map +1 -1
  79. package/dist/components/Toggle/Toggle.d.ts +1 -1
  80. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  81. package/dist/components/Toggle/Toggle.types.d.ts +2 -0
  82. package/dist/components/Toggle/Toggle.types.d.ts.map +1 -1
  83. package/dist/index.cjs +202 -66
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.js +202 -66
  86. package/dist/index.js.map +1 -1
  87. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -168,6 +168,7 @@ const Spinner = React.forwardRef(
168
168
  color = "current",
169
169
  label = "Loading",
170
170
  className,
171
+ testId,
171
172
  ...props
172
173
  }, ref) => {
173
174
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -185,6 +186,7 @@ const Spinner = React.forwardRef(
185
186
  xmlns: "http://www.w3.org/2000/svg",
186
187
  role: "status",
187
188
  "aria-label": label,
189
+ "data-testid": testId,
188
190
  ...props,
189
191
  children: [
190
192
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -225,18 +227,20 @@ const Input = React.forwardRef(
225
227
  required,
226
228
  disabled,
227
229
  isLoading = false,
230
+ testId,
228
231
  ...props
229
232
  }, ref) => {
230
233
  const inputId = id || label?.toLowerCase().replace(/\s+/g, "-");
231
234
  const hasError = !!error2;
232
235
  const errorId = hasError ? `${inputId}-error` : void 0;
233
236
  const showRightIcon = rightIcon || isLoading;
234
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto"), children: [
237
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto"), "data-testid": testId, children: [
235
238
  label && /* @__PURE__ */ jsxRuntime.jsxs(
236
239
  "label",
237
240
  {
238
241
  htmlFor: inputId,
239
242
  className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
243
+ "data-testid": testId ? `${testId}-label` : void 0,
240
244
  children: [
241
245
  label,
242
246
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
@@ -244,7 +248,14 @@ const Input = React.forwardRef(
244
248
  }
245
249
  ),
246
250
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
247
- leftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-primary-400 dark:text-primary-500", children: leftIcon }),
251
+ leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
252
+ "div",
253
+ {
254
+ className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-primary-400 dark:text-primary-500",
255
+ "data-testid": testId ? `${testId}-left-icon` : void 0,
256
+ children: leftIcon
257
+ }
258
+ ),
248
259
  /* @__PURE__ */ jsxRuntime.jsx(
249
260
  "input",
250
261
  {
@@ -255,6 +266,7 @@ const Input = React.forwardRef(
255
266
  "aria-label": !label ? props.placeholder || "Input" : void 0,
256
267
  "aria-invalid": hasError ? "true" : void 0,
257
268
  "aria-describedby": errorId,
269
+ "data-testid": testId ? `${testId}-input` : void 0,
258
270
  className: utils_index.cn(
259
271
  // Base styles - Light mode
260
272
  "block w-full rounded-md border bg-white px-4 py-2.5 text-sm text-primary-900",
@@ -277,13 +289,21 @@ const Input = React.forwardRef(
277
289
  ...props
278
290
  }
279
291
  ),
280
- showRightIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-primary-400 dark:text-primary-500", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: "primary" }) : rightIcon })
292
+ showRightIcon && /* @__PURE__ */ jsxRuntime.jsx(
293
+ "div",
294
+ {
295
+ className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-primary-400 dark:text-primary-500",
296
+ "data-testid": testId ? `${testId}-right-icon` : void 0,
297
+ children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: "primary" }) : rightIcon
298
+ }
299
+ )
281
300
  ] }),
282
301
  (error2 || helperText) && /* @__PURE__ */ jsxRuntime.jsx(
283
302
  "p",
284
303
  {
285
304
  id: errorId,
286
305
  role: hasError ? "alert" : void 0,
306
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
287
307
  className: utils_index.cn(
288
308
  "mt-1.5 text-sm",
289
309
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -363,7 +383,7 @@ function getPasswordStrength(password) {
363
383
  }
364
384
  }
365
385
  const PasswordInput = React.forwardRef(
366
- ({ showStrengthIndicator = false, value, className, ...props }, ref) => {
386
+ ({ showStrengthIndicator = false, value, className, testId, ...props }, ref) => {
367
387
  const [showPassword, setShowPassword] = React.useState(false);
368
388
  const togglePasswordVisibility = () => {
369
389
  setShowPassword((prev) => !prev);
@@ -382,10 +402,11 @@ const PasswordInput = React.forwardRef(
382
402
  "dark:text-primary-500 dark:hover:text-primary-300"
383
403
  ),
384
404
  "aria-label": showPassword ? "Hide password" : "Show password",
405
+ "data-testid": testId ? `${testId}-toggle-button` : void 0,
385
406
  children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(EyeSlashIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(EyeIcon, {})
386
407
  }
387
408
  );
388
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn("w-full", className), children: [
409
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn("w-full", className), "data-testid": testId, children: [
389
410
  /* @__PURE__ */ jsxRuntime.jsx(
390
411
  Input,
391
412
  {
@@ -393,7 +414,8 @@ const PasswordInput = React.forwardRef(
393
414
  ref,
394
415
  type: showPassword ? "text" : "password",
395
416
  value,
396
- rightIcon: toggleButton
417
+ rightIcon: toggleButton,
418
+ testId: testId ? `${testId}-input` : void 0
397
419
  }
398
420
  ),
399
421
  showStrengthIndicator && passwordValue && strength && strength.label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2", children: [
@@ -442,6 +464,7 @@ const Textarea = React.forwardRef(
442
464
  defaultValue,
443
465
  onChange,
444
466
  isLoading = false,
467
+ testId,
445
468
  ...props
446
469
  }, ref) => {
447
470
  const textareaId = id || label?.toLowerCase().replace(/\s+/g, "-");
@@ -482,12 +505,13 @@ const Textarea = React.forwardRef(
482
505
  adjustHeight();
483
506
  }
484
507
  }, [autoResize, adjustHeight, value, defaultValue]);
485
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto"), children: [
508
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto"), "data-testid": testId, children: [
486
509
  label && /* @__PURE__ */ jsxRuntime.jsxs(
487
510
  "label",
488
511
  {
489
512
  htmlFor: textareaId,
490
513
  className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
514
+ "data-testid": testId ? `${testId}-label` : void 0,
491
515
  children: [
492
516
  label,
493
517
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
@@ -510,6 +534,7 @@ const Textarea = React.forwardRef(
510
534
  "aria-invalid": hasError ? "true" : void 0,
511
535
  "aria-describedby": errorId,
512
536
  onChange: handleChange,
537
+ "data-testid": testId ? `${testId}-textarea` : void 0,
513
538
  className: utils_index.cn(
514
539
  // Base styles - Light mode
515
540
  "block w-full rounded-md border bg-white px-4 py-2.5 text-sm text-primary-900",
@@ -540,6 +565,7 @@ const Textarea = React.forwardRef(
540
565
  {
541
566
  id: errorId,
542
567
  role: hasError ? "alert" : void 0,
568
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
543
569
  className: utils_index.cn(
544
570
  "text-sm",
545
571
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -7241,18 +7267,20 @@ function Select({
7241
7267
  className,
7242
7268
  isLoading = false,
7243
7269
  loadingText = "Loading...",
7244
- placement = "bottom"
7270
+ placement = "bottom",
7271
+ testId
7245
7272
  }) {
7246
7273
  const selectedOption = options.find((opt) => opt.value === value);
7247
7274
  const hasError = !!error2;
7248
7275
  const isDisabled = disabled || isLoading;
7249
7276
  const labelId = React.useId();
7250
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), children: [
7277
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), "data-testid": testId, children: [
7251
7278
  label && /* @__PURE__ */ jsxRuntime.jsxs(
7252
7279
  "label",
7253
7280
  {
7254
7281
  id: labelId,
7255
7282
  className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
7283
+ "data-testid": testId ? `${testId}-label` : void 0,
7256
7284
  children: [
7257
7285
  label,
7258
7286
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
@@ -7265,6 +7293,7 @@ function Select({
7265
7293
  {
7266
7294
  "aria-label": !label ? placeholder : void 0,
7267
7295
  "aria-labelledby": label ? labelId : void 0,
7296
+ "data-testid": testId ? `${testId}-button` : void 0,
7268
7297
  className: utils_index.cn(
7269
7298
  // Base styles - Light mode
7270
7299
  "relative w-full rounded-md border bg-white px-4 py-2.5 text-left text-sm",
@@ -7322,11 +7351,13 @@ function Select({
7322
7351
  "absolute z-dropdown max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-primary-800 dark:ring-primary-700",
7323
7352
  placement === "top" ? "bottom-full mb-1" : "top-full mt-1"
7324
7353
  ),
7325
- children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
7354
+ "data-testid": testId ? `${testId}-options` : void 0,
7355
+ children: options.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsx(
7326
7356
  It,
7327
7357
  {
7328
7358
  disabled: option.disabled,
7329
7359
  value: option.value,
7360
+ "data-testid": testId ? `${testId}-option-${index2}` : void 0,
7330
7361
  className: ({ active, selected }) => utils_index.cn(
7331
7362
  "relative cursor-pointer select-none py-2.5 pl-10 pr-4",
7332
7363
  // Light mode
@@ -7368,6 +7399,7 @@ function Select({
7368
7399
  "p",
7369
7400
  {
7370
7401
  role: hasError ? "alert" : void 0,
7402
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
7371
7403
  className: utils_index.cn(
7372
7404
  "mt-1.5 text-sm",
7373
7405
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -7413,7 +7445,8 @@ function Modal({
7413
7445
  footer,
7414
7446
  closeOnOverlay = true,
7415
7447
  className,
7416
- isLoading = false
7448
+ isLoading = false,
7449
+ testId
7417
7450
  }) {
7418
7451
  const handleClose = closeOnOverlay ? onClose : () => {
7419
7452
  };
@@ -7428,7 +7461,7 @@ function Modal({
7428
7461
  leave: "ease-in duration-100",
7429
7462
  leaveFrom: "opacity-100",
7430
7463
  leaveTo: "opacity-0",
7431
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm" })
7464
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm", "data-testid": testId ? `${testId}-overlay` : void 0 })
7432
7465
  }
7433
7466
  ),
7434
7467
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 flex items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -7453,6 +7486,7 @@ function Modal({
7453
7486
  sizeStyles$b[size2],
7454
7487
  className
7455
7488
  ),
7489
+ "data-testid": testId,
7456
7490
  children: [
7457
7491
  (title || showCloseButton) && /* @__PURE__ */ jsxRuntime.jsxs(
7458
7492
  "div",
@@ -7461,6 +7495,7 @@ function Modal({
7461
7495
  "flex items-start justify-between px-6 py-4",
7462
7496
  (children || footer) && "border-b border-primary-200 dark:border-primary-700"
7463
7497
  ),
7498
+ "data-testid": testId ? `${testId}-header` : void 0,
7464
7499
  children: [
7465
7500
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
7466
7501
  title && /* @__PURE__ */ jsxRuntime.jsx(Qe, { className: "text-lg font-semibold text-primary-900 dark:text-white", children: title }),
@@ -7479,13 +7514,14 @@ function Modal({
7479
7514
  "focus:outline-none focus:ring-2 focus:ring-gold-500/20",
7480
7515
  "transition-colors"
7481
7516
  ),
7517
+ "data-testid": testId ? `${testId}-close-button` : void 0,
7482
7518
  children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon$2, {})
7483
7519
  }
7484
7520
  )
7485
7521
  ]
7486
7522
  }
7487
7523
  ),
7488
- children && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative px-6 py-4 text-primary-700 dark:text-primary-300", children: [
7524
+ children && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative px-6 py-4 text-primary-700 dark:text-primary-300", "data-testid": testId ? `${testId}-body` : void 0, children: [
7489
7525
  children,
7490
7526
  isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-white/60 dark:bg-primary-800/60", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "md", color: "primary" }) })
7491
7527
  ] }),
@@ -7498,6 +7534,7 @@ function Modal({
7498
7534
  "bg-primary-50 dark:bg-primary-900/50",
7499
7535
  "rounded-b-lg"
7500
7536
  ),
7537
+ "data-testid": testId ? `${testId}-footer` : void 0,
7501
7538
  children: footer
7502
7539
  }
7503
7540
  )
@@ -7542,7 +7579,8 @@ function Drawer({
7542
7579
  showCloseButton = true,
7543
7580
  footer,
7544
7581
  className,
7545
- isLoading = false
7582
+ isLoading = false,
7583
+ testId
7546
7584
  }) {
7547
7585
  return /* @__PURE__ */ jsxRuntime.jsx(Ke$2, { show: isOpen, as: React.Fragment, children: /* @__PURE__ */ jsxRuntime.jsxs(ht$1, { className: "relative z-50", onClose, children: [
7548
7586
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -7555,7 +7593,7 @@ function Drawer({
7555
7593
  leave: "ease-in duration-200",
7556
7594
  leaveFrom: "opacity-100",
7557
7595
  leaveTo: "opacity-0",
7558
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm" })
7596
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm", "data-testid": testId ? `${testId}-overlay` : void 0 })
7559
7597
  }
7560
7598
  ),
7561
7599
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -7580,6 +7618,7 @@ function Drawer({
7580
7618
  sizeStyles$a[size2],
7581
7619
  className
7582
7620
  ),
7621
+ "data-testid": testId,
7583
7622
  children: [
7584
7623
  (title || showCloseButton) && /* @__PURE__ */ jsxRuntime.jsxs(
7585
7624
  "div",
@@ -7603,13 +7642,14 @@ function Drawer({
7603
7642
  "focus:outline-none focus:ring-2 focus:ring-gold-500/20",
7604
7643
  "transition-colors"
7605
7644
  ),
7645
+ "data-testid": testId ? `${testId}-close-button` : void 0,
7606
7646
  children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon$1, {})
7607
7647
  }
7608
7648
  )
7609
7649
  ]
7610
7650
  }
7611
7651
  ),
7612
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 overflow-y-auto px-6 py-4 text-primary-700 dark:text-primary-300", children: [
7652
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 overflow-y-auto px-6 py-4 text-primary-700 dark:text-primary-300", "data-testid": testId ? `${testId}-content` : void 0, children: [
7613
7653
  children,
7614
7654
  isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-white/60 dark:bg-primary-800/60", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "md", color: "primary" }) })
7615
7655
  ] }),
@@ -7647,7 +7687,8 @@ function ConfirmDialog({
7647
7687
  variant = "neutral",
7648
7688
  cancelText = "Cancel",
7649
7689
  confirmText = "Confirm",
7650
- loading = false
7690
+ loading = false,
7691
+ testId
7651
7692
  }) {
7652
7693
  const buttonVariant = variantToButton[variant];
7653
7694
  const handleConfirm = () => {
@@ -7663,6 +7704,7 @@ function ConfirmDialog({
7663
7704
  size: "sm",
7664
7705
  showCloseButton: false,
7665
7706
  closeOnOverlay: !loading,
7707
+ testId,
7666
7708
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-3", children: [
7667
7709
  /* @__PURE__ */ jsxRuntime.jsx(
7668
7710
  Button,
@@ -7670,6 +7712,7 @@ function ConfirmDialog({
7670
7712
  variant: "secondary",
7671
7713
  onClick: onClose,
7672
7714
  disabled: loading,
7715
+ "data-testid": testId ? `${testId}-cancel-button` : void 0,
7673
7716
  children: cancelText
7674
7717
  }
7675
7718
  ),
@@ -7679,6 +7722,7 @@ function ConfirmDialog({
7679
7722
  variant: buttonVariant,
7680
7723
  onClick: handleConfirm,
7681
7724
  disabled: loading,
7725
+ "data-testid": testId ? `${testId}-confirm-button` : void 0,
7682
7726
  children: loading ? "Loading..." : confirmText
7683
7727
  }
7684
7728
  )
@@ -7718,6 +7762,7 @@ const Card = React.forwardRef(
7718
7762
  hoverable = false,
7719
7763
  children,
7720
7764
  className,
7765
+ testId,
7721
7766
  ...props
7722
7767
  }, ref) => {
7723
7768
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -7743,6 +7788,7 @@ const Card = React.forwardRef(
7743
7788
  ],
7744
7789
  className
7745
7790
  ),
7791
+ "data-testid": testId,
7746
7792
  ...props,
7747
7793
  children
7748
7794
  }
@@ -7772,6 +7818,7 @@ const Checkbox = React.forwardRef(
7772
7818
  indeterminate = false,
7773
7819
  className,
7774
7820
  id,
7821
+ testId,
7775
7822
  ...props
7776
7823
  }, forwardedRef) => {
7777
7824
  const checkboxId = id || label?.toLowerCase().replace(/\s+/g, "-");
@@ -7798,7 +7845,7 @@ const Checkbox = React.forwardRef(
7798
7845
  const handleChange = (e2) => {
7799
7846
  onChange?.(e2.target.checked);
7800
7847
  };
7801
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
7848
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, "data-testid": testId, children: [
7802
7849
  /* @__PURE__ */ jsxRuntime.jsxs(
7803
7850
  "label",
7804
7851
  {
@@ -7807,6 +7854,7 @@ const Checkbox = React.forwardRef(
7807
7854
  "inline-flex items-center gap-2",
7808
7855
  disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
7809
7856
  ),
7857
+ "data-testid": testId ? `${testId}-label` : void 0,
7810
7858
  children: [
7811
7859
  /* @__PURE__ */ jsxRuntime.jsx(
7812
7860
  "input",
@@ -7819,6 +7867,7 @@ const Checkbox = React.forwardRef(
7819
7867
  "aria-invalid": hasError ? "true" : void 0,
7820
7868
  "aria-describedby": errorId,
7821
7869
  onChange: handleChange,
7870
+ "data-testid": testId ? `${testId}-checkbox` : void 0,
7822
7871
  className: utils_index.cn(
7823
7872
  sizeStyles$9[size2],
7824
7873
  "rounded border transition-colors",
@@ -7863,6 +7912,7 @@ const Checkbox = React.forwardRef(
7863
7912
  {
7864
7913
  id: errorId,
7865
7914
  role: hasError ? "alert" : void 0,
7915
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
7866
7916
  className: utils_index.cn(
7867
7917
  "mt-1 text-sm",
7868
7918
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -7892,6 +7942,7 @@ const Radio = React.forwardRef(
7892
7942
  error: error2 = false,
7893
7943
  className,
7894
7944
  id,
7945
+ testId,
7895
7946
  ...props
7896
7947
  }, ref) => {
7897
7948
  const radioId = id || (label ? `${props.name}-${label.toLowerCase().replace(/\s+/g, "-")}` : void 0);
@@ -7904,6 +7955,7 @@ const Radio = React.forwardRef(
7904
7955
  disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
7905
7956
  className
7906
7957
  ),
7958
+ "data-testid": testId,
7907
7959
  children: [
7908
7960
  /* @__PURE__ */ jsxRuntime.jsx(
7909
7961
  "input",
@@ -7912,6 +7964,7 @@ const Radio = React.forwardRef(
7912
7964
  type: "radio",
7913
7965
  id: radioId,
7914
7966
  disabled,
7967
+ "data-testid": testId ? `${testId}-radio` : void 0,
7915
7968
  className: utils_index.cn(
7916
7969
  sizeStyles$8[size2],
7917
7970
  "border transition-colors",
@@ -7943,6 +7996,7 @@ const Radio = React.forwardRef(
7943
7996
  "text-primary-700 dark:text-primary-200",
7944
7997
  error2 && "text-error"
7945
7998
  ),
7999
+ "data-testid": testId ? `${testId}-label` : void 0,
7946
8000
  children: label
7947
8001
  }
7948
8002
  )
@@ -7964,7 +8018,8 @@ function RadioGroup({
7964
8018
  disabled = false,
7965
8019
  orientation = "vertical",
7966
8020
  className,
7967
- isLoading = false
8021
+ isLoading = false,
8022
+ testId
7968
8023
  }) {
7969
8024
  const hasError = !!error2;
7970
8025
  const groupId = `${name}-group`;
@@ -7972,7 +8027,7 @@ function RadioGroup({
7972
8027
  const handleChange = (e2) => {
7973
8028
  onChange?.(e2.target.value);
7974
8029
  };
7975
- return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className, role: "radiogroup", "aria-labelledby": label ? groupId : void 0, children: [
8030
+ return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className, role: "radiogroup", "aria-labelledby": label ? groupId : void 0, "data-testid": testId, children: [
7976
8031
  label && /* @__PURE__ */ jsxRuntime.jsxs(
7977
8032
  "legend",
7978
8033
  {
@@ -7990,7 +8045,7 @@ function RadioGroup({
7990
8045
  className: utils_index.cn(
7991
8046
  orientation === "vertical" ? "space-y-2" : "flex flex-wrap gap-4"
7992
8047
  ),
7993
- children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
8048
+ children: options.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsx(
7994
8049
  Radio,
7995
8050
  {
7996
8051
  name,
@@ -8000,7 +8055,8 @@ function RadioGroup({
8000
8055
  disabled: isDisabled || option.disabled,
8001
8056
  error: hasError,
8002
8057
  checked: value === option.value,
8003
- onChange: handleChange
8058
+ onChange: handleChange,
8059
+ testId: testId ? `${testId}-option-${index2}` : void 0
8004
8060
  },
8005
8061
  option.value
8006
8062
  ))
@@ -8010,6 +8066,7 @@ function RadioGroup({
8010
8066
  "p",
8011
8067
  {
8012
8068
  role: hasError ? "alert" : void 0,
8069
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
8013
8070
  className: utils_index.cn(
8014
8071
  "mt-2 text-sm",
8015
8072
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -8045,11 +8102,12 @@ function Toggle({
8045
8102
  disabled = false,
8046
8103
  size: size2 = "md",
8047
8104
  className,
8048
- isLoading = false
8105
+ isLoading = false,
8106
+ testId
8049
8107
  }) {
8050
8108
  const currentSize = sizeStyles$7[size2];
8051
8109
  const isDisabled = disabled || isLoading;
8052
- return /* @__PURE__ */ jsxRuntime.jsx(W, { className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
8110
+ return /* @__PURE__ */ jsxRuntime.jsx(W, { className, "data-testid": testId, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
8053
8111
  (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 mr-4", children: [
8054
8112
  label && /* @__PURE__ */ jsxRuntime.jsx(
8055
8113
  Z,
@@ -8071,6 +8129,7 @@ function Toggle({
8071
8129
  disabled: isDisabled,
8072
8130
  onChange,
8073
8131
  "aria-label": !label ? "Toggle" : void 0,
8132
+ "data-testid": testId ? `${testId}-toggle` : void 0,
8074
8133
  className: utils_index.cn(
8075
8134
  currentSize.switch,
8076
8135
  "relative inline-flex shrink-0 cursor-pointer rounded-full",
@@ -8156,7 +8215,8 @@ function Combobox({
8156
8215
  isLoading = false,
8157
8216
  loadingText = "Loading...",
8158
8217
  emptyText = "No results found",
8159
- onSearch
8218
+ onSearch,
8219
+ testId
8160
8220
  }) {
8161
8221
  const [query, setQuery] = React.useState("");
8162
8222
  const hasError = !!error2;
@@ -8176,12 +8236,13 @@ function Combobox({
8176
8236
  onChange?.(newValue);
8177
8237
  setQuery("");
8178
8238
  };
8179
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), children: [
8239
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), "data-testid": testId, children: [
8180
8240
  label && /* @__PURE__ */ jsxRuntime.jsxs(
8181
8241
  "label",
8182
8242
  {
8183
8243
  id: labelId,
8184
8244
  className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
8245
+ "data-testid": testId ? `${testId}-label` : void 0,
8185
8246
  children: [
8186
8247
  label,
8187
8248
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
@@ -8208,6 +8269,7 @@ function Combobox({
8208
8269
  onSearch?.(newQuery);
8209
8270
  },
8210
8271
  placeholder,
8272
+ "data-testid": testId ? `${testId}-input` : void 0,
8211
8273
  className: utils_index.cn(
8212
8274
  // Base styles - Light mode
8213
8275
  "w-full rounded-md border bg-white px-4 py-2.5 pr-10 text-sm text-primary-900",
@@ -8241,30 +8303,38 @@ function Combobox({
8241
8303
  leaveFrom: "opacity-100",
8242
8304
  leaveTo: "opacity-0",
8243
8305
  afterLeave: () => setQuery(""),
8244
- children: /* @__PURE__ */ jsxRuntime.jsx(Uo, { className: "absolute z-dropdown mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-primary-800 dark:ring-primary-700", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 px-4 py-2.5 text-primary-500 dark:text-primary-400", children: [
8245
- /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: "primary" }),
8246
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: loadingText })
8247
- ] }) : filteredOptions.length === 0 && query !== "" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative cursor-default select-none px-4 py-2.5 text-primary-500 dark:text-primary-400", children: emptyText }) : filteredOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
8248
- Ho,
8306
+ children: /* @__PURE__ */ jsxRuntime.jsx(
8307
+ Uo,
8249
8308
  {
8250
- value: option.value,
8251
- disabled: option.disabled,
8252
- className: ({ active, selected }) => utils_index.cn(
8253
- "relative cursor-pointer select-none py-2.5 pl-10 pr-4",
8254
- // Light mode
8255
- active ? "bg-gold-50 text-primary-900" : "text-primary-900",
8256
- // Dark mode
8257
- active ? "dark:bg-primary-700 dark:text-primary-100" : "dark:text-primary-200",
8258
- option.disabled && "cursor-not-allowed opacity-50",
8259
- selected && "font-medium"
8260
- ),
8261
- children: ({ selected }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8262
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate", children: option.label }),
8263
- selected && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-gold-600 dark:text-gold-400", children: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, {}) })
8264
- ] })
8265
- },
8266
- option.value
8267
- )) })
8309
+ className: "absolute z-dropdown mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-primary-800 dark:ring-primary-700",
8310
+ "data-testid": testId ? `${testId}-options` : void 0,
8311
+ children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 px-4 py-2.5 text-primary-500 dark:text-primary-400", children: [
8312
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: "primary" }),
8313
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: loadingText })
8314
+ ] }) : filteredOptions.length === 0 && query !== "" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative cursor-default select-none px-4 py-2.5 text-primary-500 dark:text-primary-400", children: emptyText }) : filteredOptions.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsx(
8315
+ Ho,
8316
+ {
8317
+ value: option.value,
8318
+ disabled: option.disabled,
8319
+ "data-testid": testId ? `${testId}-option-${index2}` : void 0,
8320
+ className: ({ active, selected }) => utils_index.cn(
8321
+ "relative cursor-pointer select-none py-2.5 pl-10 pr-4",
8322
+ // Light mode
8323
+ active ? "bg-gold-50 text-primary-900" : "text-primary-900",
8324
+ // Dark mode
8325
+ active ? "dark:bg-primary-700 dark:text-primary-100" : "dark:text-primary-200",
8326
+ option.disabled && "cursor-not-allowed opacity-50",
8327
+ selected && "font-medium"
8328
+ ),
8329
+ children: ({ selected }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8330
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate", children: option.label }),
8331
+ selected && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-gold-600 dark:text-gold-400", children: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, {}) })
8332
+ ] })
8333
+ },
8334
+ option.value
8335
+ ))
8336
+ }
8337
+ )
8268
8338
  }
8269
8339
  )
8270
8340
  ] })
@@ -8274,6 +8344,7 @@ function Combobox({
8274
8344
  "p",
8275
8345
  {
8276
8346
  role: hasError ? "alert" : void 0,
8347
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
8277
8348
  className: utils_index.cn(
8278
8349
  "mt-1.5 text-sm",
8279
8350
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -8316,7 +8387,7 @@ const sizeStyles$6 = {
8316
8387
  lg: "px-3 py-1.5 text-base"
8317
8388
  };
8318
8389
  const Badge = React.forwardRef(
8319
- ({ variant = "default", size: size2 = "md", children, className, ...props }, ref) => {
8390
+ ({ variant = "default", size: size2 = "md", children, className, testId, ...props }, ref) => {
8320
8391
  return /* @__PURE__ */ jsxRuntime.jsx(
8321
8392
  "span",
8322
8393
  {
@@ -8327,6 +8398,7 @@ const Badge = React.forwardRef(
8327
8398
  sizeStyles$6[size2],
8328
8399
  className
8329
8400
  ),
8401
+ "data-testid": testId,
8330
8402
  ...props,
8331
8403
  children
8332
8404
  }
@@ -8496,6 +8568,7 @@ function Tabs({
8496
8568
  size: size2 = "md",
8497
8569
  className,
8498
8570
  "aria-label": ariaLabel = "Navigation tabs",
8571
+ testId,
8499
8572
  ...props
8500
8573
  }) {
8501
8574
  const selectedIndex = React.useMemo(
@@ -8523,11 +8596,13 @@ function Tabs({
8523
8596
  fullWidth && "w-full",
8524
8597
  className
8525
8598
  ),
8599
+ "data-testid": testId,
8526
8600
  ...props,
8527
- children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
8601
+ children: tabs.map((tab, index2) => /* @__PURE__ */ jsxRuntime.jsx(
8528
8602
  dt,
8529
8603
  {
8530
8604
  disabled: tab.disabled,
8605
+ "data-testid": testId ? `${testId}-tab-${index2}` : void 0,
8531
8606
  className: ({ selected }) => utils_index.cn(
8532
8607
  "relative outline-none transition-colors duration-normal",
8533
8608
  "focus-visible:ring-2 focus-visible:ring-gold-500/50",
@@ -8574,6 +8649,7 @@ function TabContentPanels({
8574
8649
  children,
8575
8650
  className,
8576
8651
  isLoading = false,
8652
+ testId,
8577
8653
  ...props
8578
8654
  }) {
8579
8655
  const activeContent = activeTab && children[activeTab];
@@ -8582,6 +8658,7 @@ function TabContentPanels({
8582
8658
  {
8583
8659
  role: "tabpanel",
8584
8660
  className: utils_index.cn("relative mt-4", className),
8661
+ "data-testid": testId,
8585
8662
  ...props,
8586
8663
  children: [
8587
8664
  activeContent,
@@ -8646,6 +8723,7 @@ const Breadcrumbs = React.forwardRef(
8646
8723
  maxItems = 0,
8647
8724
  renderLink,
8648
8725
  className,
8726
+ testId,
8649
8727
  ...props
8650
8728
  }, ref) => {
8651
8729
  const [isExpanded, setIsExpanded] = React.useState(false);
@@ -8697,12 +8775,20 @@ const Breadcrumbs = React.forwardRef(
8697
8775
  ref,
8698
8776
  "aria-label": "Breadcrumb",
8699
8777
  className: utils_index.cn("text-sm", className),
8778
+ "data-testid": testId,
8700
8779
  ...props,
8701
8780
  children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center flex-wrap gap-1", children: displayItems.map((item, index2) => {
8702
8781
  const isLast = index2 === displayItems.length - 1;
8703
8782
  const showEllipsis = shouldCollapse && index2 === 0;
8704
8783
  return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
8705
- /* @__PURE__ */ jsxRuntime.jsx("li", { className: "inline-flex items-center", children: renderItem(item, index2, isLast) }),
8784
+ /* @__PURE__ */ jsxRuntime.jsx(
8785
+ "li",
8786
+ {
8787
+ className: "inline-flex items-center",
8788
+ "data-testid": testId ? `${testId}-item-${index2}` : void 0,
8789
+ children: renderItem(item, index2, isLast)
8790
+ }
8791
+ ),
8706
8792
  showEllipsis && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8707
8793
  /* @__PURE__ */ jsxRuntime.jsx("li", { className: "inline-flex items-center", "aria-hidden": "true", children: separatorElement }),
8708
8794
  /* @__PURE__ */ jsxRuntime.jsx("li", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(EllipsisButton, { onClick: () => setIsExpanded(true) }) })
@@ -8730,6 +8816,7 @@ const Skeleton = React.forwardRef(
8730
8816
  label = "Loading...",
8731
8817
  className,
8732
8818
  style,
8819
+ testId,
8733
8820
  ...props
8734
8821
  }, ref) => {
8735
8822
  const widthValue = typeof width === "number" ? `${width}px` : width;
@@ -8744,6 +8831,7 @@ const Skeleton = React.forwardRef(
8744
8831
  role: "status",
8745
8832
  "aria-label": label,
8746
8833
  "aria-busy": "true",
8834
+ "data-testid": testId,
8747
8835
  ...props,
8748
8836
  children: [
8749
8837
  Array.from({ length: lines }).map((_2, index2) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -8785,6 +8873,7 @@ const Skeleton = React.forwardRef(
8785
8873
  role: "status",
8786
8874
  "aria-label": label,
8787
8875
  "aria-busy": "true",
8876
+ "data-testid": testId,
8788
8877
  ...props,
8789
8878
  children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: label })
8790
8879
  }
@@ -8885,6 +8974,7 @@ const EmptyState = React.forwardRef(
8885
8974
  action,
8886
8975
  size: size2 = "md",
8887
8976
  className,
8977
+ testId,
8888
8978
  ...props
8889
8979
  }, ref) => {
8890
8980
  const styles = sizeStyles$4[size2];
@@ -8897,9 +8987,17 @@ const EmptyState = React.forwardRef(
8897
8987
  styles.container,
8898
8988
  className
8899
8989
  ),
8990
+ "data-testid": testId,
8900
8991
  ...props,
8901
8992
  children: [
8902
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn(styles.icon, typeColors[type], "mb-4"), children: icon || defaultIcons$1[type] }),
8993
+ /* @__PURE__ */ jsxRuntime.jsx(
8994
+ "div",
8995
+ {
8996
+ className: utils_index.cn(styles.icon, typeColors[type], "mb-4"),
8997
+ "data-testid": testId ? `${testId}-icon` : void 0,
8998
+ children: icon || defaultIcons$1[type]
8999
+ }
9000
+ ),
8903
9001
  /* @__PURE__ */ jsxRuntime.jsx(
8904
9002
  "h3",
8905
9003
  {
@@ -8908,6 +9006,7 @@ const EmptyState = React.forwardRef(
8908
9006
  "text-primary-900 dark:text-primary-100",
8909
9007
  "mb-1"
8910
9008
  ),
9009
+ "data-testid": testId ? `${testId}-title` : void 0,
8911
9010
  children: title
8912
9011
  }
8913
9012
  ),
@@ -8919,10 +9018,11 @@ const EmptyState = React.forwardRef(
8919
9018
  "text-primary-500 dark:text-primary-400",
8920
9019
  "max-w-sm mb-4"
8921
9020
  ),
9021
+ "data-testid": testId ? `${testId}-description` : void 0,
8922
9022
  children: description
8923
9023
  }
8924
9024
  ),
8925
- action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: action })
9025
+ action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", "data-testid": testId ? `${testId}-action` : void 0, children: action })
8926
9026
  ]
8927
9027
  }
8928
9028
  );
@@ -8978,7 +9078,8 @@ function Pagination({
8978
9078
  totalItems,
8979
9079
  disabled = false,
8980
9080
  size: size2 = "md",
8981
- className
9081
+ className,
9082
+ testId
8982
9083
  }) {
8983
9084
  const pageSizeId = React.useId();
8984
9085
  const currentSize = sizeStyles$3[size2];
@@ -9011,13 +9112,14 @@ function Pagination({
9011
9112
  };
9012
9113
  if (variant === "load-more") {
9013
9114
  if (!canGoNext) return null;
9014
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn("flex justify-center", className), children: /* @__PURE__ */ jsxRuntime.jsx(
9115
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn("flex justify-center", className), "data-testid": testId, children: /* @__PURE__ */ jsxRuntime.jsx(
9015
9116
  Button,
9016
9117
  {
9017
9118
  variant: "secondary",
9018
9119
  size: size2 === "sm" ? "sm" : "md",
9019
9120
  onClick: handleNext,
9020
9121
  disabled,
9122
+ "data-testid": testId ? `${testId}-load-more` : void 0,
9021
9123
  children: "Load more"
9022
9124
  }
9023
9125
  ) });
@@ -9028,6 +9130,7 @@ function Pagination({
9028
9130
  {
9029
9131
  "aria-label": "Pagination",
9030
9132
  className: utils_index.cn("flex items-center justify-between gap-4", className),
9133
+ "data-testid": testId,
9031
9134
  children: [
9032
9135
  /* @__PURE__ */ jsxRuntime.jsxs(
9033
9136
  Button,
@@ -9037,6 +9140,7 @@ function Pagination({
9037
9140
  onClick: handlePrevious,
9038
9141
  disabled: disabled || !canGoPrevious,
9039
9142
  "aria-label": "Previous page",
9143
+ "data-testid": testId ? `${testId}-prev` : void 0,
9040
9144
  children: [
9041
9145
  /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, {}),
9042
9146
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: "Previous" })
@@ -9057,6 +9161,7 @@ function Pagination({
9057
9161
  onClick: handleNext,
9058
9162
  disabled: disabled || !canGoNext,
9059
9163
  "aria-label": "Next page",
9164
+ "data-testid": testId ? `${testId}-next` : void 0,
9060
9165
  children: [
9061
9166
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", children: "Next" }),
9062
9167
  /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, {})
@@ -9072,6 +9177,7 @@ function Pagination({
9072
9177
  {
9073
9178
  "aria-label": "Pagination",
9074
9179
  className: utils_index.cn("flex items-center justify-between gap-4", className),
9180
+ "data-testid": testId,
9075
9181
  children: [
9076
9182
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
9077
9183
  itemsRange && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: utils_index.cn("text-primary-600 dark:text-primary-400", currentSize.text), children: [
@@ -9118,6 +9224,7 @@ function Pagination({
9118
9224
  onClick: handlePrevious,
9119
9225
  disabled: disabled || !canGoPrevious,
9120
9226
  "aria-label": "Previous page",
9227
+ "data-testid": testId ? `${testId}-prev` : void 0,
9121
9228
  className: utils_index.cn(
9122
9229
  "inline-flex items-center justify-center rounded-md",
9123
9230
  "border border-primary-300 dark:border-primary-600",
@@ -9152,6 +9259,7 @@ function Pagination({
9152
9259
  disabled,
9153
9260
  "aria-label": `Page ${page}`,
9154
9261
  "aria-current": page === currentPage ? "page" : void 0,
9262
+ "data-testid": testId ? `${testId}-page-${page}` : void 0,
9155
9263
  className: utils_index.cn(
9156
9264
  "inline-flex items-center justify-center rounded-md",
9157
9265
  "border transition-colors",
@@ -9180,6 +9288,7 @@ function Pagination({
9180
9288
  onClick: handleNext,
9181
9289
  disabled: disabled || !canGoNext,
9182
9290
  "aria-label": "Next page",
9291
+ "data-testid": testId ? `${testId}-next` : void 0,
9183
9292
  className: utils_index.cn(
9184
9293
  "inline-flex items-center justify-center rounded-md",
9185
9294
  "border border-primary-300 dark:border-primary-600",
@@ -9247,7 +9356,8 @@ function MultiSelect({
9247
9356
  required = false,
9248
9357
  disabled = false,
9249
9358
  fullWidth = false,
9250
- className
9359
+ className,
9360
+ testId
9251
9361
  }) {
9252
9362
  const [query, setQuery] = React.useState("");
9253
9363
  const searchInputRef = React.useRef(null);
@@ -9303,12 +9413,13 @@ function MultiSelect({
9303
9413
  };
9304
9414
  const displayedChips = selectedOptions.slice(0, maxDisplayedItems);
9305
9415
  const hiddenCount = selectedOptions.length - maxDisplayedItems;
9306
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), children: [
9416
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), "data-testid": testId, children: [
9307
9417
  label && /* @__PURE__ */ jsxRuntime.jsxs(
9308
9418
  "label",
9309
9419
  {
9310
9420
  id: labelId,
9311
9421
  className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
9422
+ "data-testid": testId ? `${testId}-label` : void 0,
9312
9423
  children: [
9313
9424
  label,
9314
9425
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
@@ -9336,7 +9447,7 @@ function MultiSelect({
9336
9447
  hasError ? "border-error focus-within:border-error focus-within:ring-2 focus-within:ring-error/20" : "border-primary-300 dark:border-primary-600 focus-within:border-gold-500 focus-within:ring-2 focus-within:ring-gold-500/20"
9337
9448
  ),
9338
9449
  children: [
9339
- displayedChips.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
9450
+ displayedChips.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsxs(
9340
9451
  "span",
9341
9452
  {
9342
9453
  className: utils_index.cn(
@@ -9344,6 +9455,7 @@ function MultiSelect({
9344
9455
  "bg-primary-100 dark:bg-primary-700",
9345
9456
  "text-sm text-primary-700 dark:text-primary-200"
9346
9457
  ),
9458
+ "data-testid": testId ? `${testId}-chip-${index2}` : void 0,
9347
9459
  children: [
9348
9460
  option.label,
9349
9461
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -9404,6 +9516,7 @@ function MultiSelect({
9404
9516
  {
9405
9517
  static: true,
9406
9518
  className: "absolute z-dropdown mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-primary-800 dark:ring-primary-700",
9519
+ "data-testid": testId ? `${testId}-options` : void 0,
9407
9520
  children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 px-4 py-2.5 text-primary-500 dark:text-primary-400", children: [
9408
9521
  /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: "primary" }),
9409
9522
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: loadingText })
@@ -9419,6 +9532,7 @@ function MultiSelect({
9419
9532
  value: query,
9420
9533
  onChange: handleSearchChange,
9421
9534
  placeholder: "Search...",
9535
+ "data-testid": testId ? `${testId}-input` : void 0,
9422
9536
  className: utils_index.cn(
9423
9537
  "w-full rounded border border-primary-300 px-2 py-1 text-sm",
9424
9538
  "bg-white dark:bg-primary-900",
@@ -9460,11 +9574,12 @@ function MultiSelect({
9460
9574
  ]
9461
9575
  }
9462
9576
  ),
9463
- filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-2.5 text-primary-500 dark:text-primary-400", children: emptyText }) : filteredOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
9577
+ filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-2.5 text-primary-500 dark:text-primary-400", children: emptyText }) : filteredOptions.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsxs(
9464
9578
  It,
9465
9579
  {
9466
9580
  value: option.value,
9467
9581
  disabled: option.disabled,
9582
+ "data-testid": testId ? `${testId}-option-${index2}` : void 0,
9468
9583
  className: ({ active }) => utils_index.cn(
9469
9584
  "flex cursor-pointer items-center gap-2 px-4 py-2.5",
9470
9585
  active && "bg-primary-50 dark:bg-primary-700",
@@ -9498,6 +9613,7 @@ function MultiSelect({
9498
9613
  "p",
9499
9614
  {
9500
9615
  role: hasError ? "alert" : void 0,
9616
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
9501
9617
  className: utils_index.cn(
9502
9618
  "mt-1.5 text-sm",
9503
9619
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -9566,6 +9682,7 @@ function SidebarItem({
9566
9682
  onNavigate,
9567
9683
  LinkComponent,
9568
9684
  className,
9685
+ testId,
9569
9686
  ...props
9570
9687
  }) {
9571
9688
  if (!shouldShowItem(item)) {
@@ -9612,6 +9729,7 @@ function SidebarItem({
9612
9729
  disabled: item.disabled,
9613
9730
  "aria-label": item["aria-label"] || item.label,
9614
9731
  title: collapsed ? item.label : void 0,
9732
+ "data-testid": testId,
9615
9733
  className: utils_index.cn(
9616
9734
  // Base styles
9617
9735
  "flex w-full items-center rounded-lg font-medium",
@@ -9644,6 +9762,7 @@ function SidebarItem({
9644
9762
  {
9645
9763
  to: item.href,
9646
9764
  onClick: handleClick,
9765
+ "data-testid": testId,
9647
9766
  className: utils_index.cn(
9648
9767
  // Base styles
9649
9768
  "flex items-center rounded-lg font-medium",
@@ -9781,6 +9900,7 @@ const Sidebar = React.forwardRef(
9781
9900
  collapsedWidth = "4rem",
9782
9901
  className,
9783
9902
  "aria-label": ariaLabel = "Main navigation",
9903
+ testId,
9784
9904
  ...props
9785
9905
  }, ref) => {
9786
9906
  React.useEffect(() => {
@@ -9888,6 +10008,7 @@ const Sidebar = React.forwardRef(
9888
10008
  "focus:outline-none focus:ring-2 focus:ring-primary-500/20"
9889
10009
  ),
9890
10010
  "aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
10011
+ "data-testid": testId ? `${testId}-toggle` : void 0,
9891
10012
  children: /* @__PURE__ */ jsxRuntime.jsx(
9892
10013
  "svg",
9893
10014
  {
@@ -9919,7 +10040,8 @@ const Sidebar = React.forwardRef(
9919
10040
  {
9920
10041
  className: "fixed inset-0 z-40 bg-black/20 lg:hidden",
9921
10042
  onClick: handleOverlayClick,
9922
- "aria-hidden": "true"
10043
+ "aria-hidden": "true",
10044
+ "data-testid": testId ? `${testId}-overlay` : void 0
9923
10045
  }
9924
10046
  ),
9925
10047
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -9940,6 +10062,7 @@ const Sidebar = React.forwardRef(
9940
10062
  ),
9941
10063
  style: { width: sidebarWidth },
9942
10064
  "aria-label": ariaLabel,
10065
+ "data-testid": testId,
9943
10066
  ...props,
9944
10067
  children: sidebarContent
9945
10068
  }
@@ -9994,7 +10117,7 @@ const variantStyles = {
9994
10117
  }
9995
10118
  };
9996
10119
  const Alert = React.forwardRef(
9997
- ({ variant = "info", title, message, icon, onClose, className, ...props }, ref) => {
10120
+ ({ variant = "info", title, message, icon, onClose, className, testId, ...props }, ref) => {
9998
10121
  const styles = variantStyles[variant];
9999
10122
  const displayIcon = icon === null ? null : icon ?? defaultIcons[variant];
10000
10123
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -10007,9 +10130,18 @@ const Alert = React.forwardRef(
10007
10130
  styles.container,
10008
10131
  className
10009
10132
  ),
10133
+ "data-testid": testId,
10010
10134
  ...props,
10011
10135
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start", children: [
10012
- displayIcon !== null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn("flex-shrink-0", styles.icon), "aria-hidden": "true", children: displayIcon }),
10136
+ displayIcon !== null && /* @__PURE__ */ jsxRuntime.jsx(
10137
+ "div",
10138
+ {
10139
+ className: utils_index.cn("flex-shrink-0", styles.icon),
10140
+ "aria-hidden": "true",
10141
+ "data-testid": testId ? `${testId}-icon` : void 0,
10142
+ children: displayIcon
10143
+ }
10144
+ ),
10013
10145
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn("flex-1", displayIcon !== null && "ml-3"), children: [
10014
10146
  title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: utils_index.cn("text-sm font-medium", styles.title), children: title }),
10015
10147
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn("text-sm", title && "mt-1"), children: message })
@@ -10025,6 +10157,7 @@ const Alert = React.forwardRef(
10025
10157
  "focus:ring-current/20",
10026
10158
  "dark:focus:ring-offset-primary-900"
10027
10159
  ),
10160
+ "data-testid": testId ? `${testId}-close-button` : void 0,
10028
10161
  children: [
10029
10162
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Dismiss" }),
10030
10163
  /* @__PURE__ */ jsxRuntime.jsx(XMarkIcon, {})
@@ -10051,7 +10184,7 @@ const statusStyles = {
10051
10184
  busy: "bg-error"
10052
10185
  };
10053
10186
  const Avatar = React.forwardRef(
10054
- ({ name, src, size: size2 = "md", alt, status, className, ...props }, ref) => {
10187
+ ({ name, src, size: size2 = "md", alt, status, className, testId, ...props }, ref) => {
10055
10188
  const getInitials = (fullName) => {
10056
10189
  const names = fullName.trim().split(" ");
10057
10190
  if (names.length === 1) {
@@ -10077,6 +10210,7 @@ const Avatar = React.forwardRef(
10077
10210
  styles.container,
10078
10211
  className
10079
10212
  ),
10213
+ "data-testid": testId,
10080
10214
  ...props,
10081
10215
  children: [
10082
10216
  src ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -10084,7 +10218,8 @@ const Avatar = React.forwardRef(
10084
10218
  {
10085
10219
  src,
10086
10220
  alt: alt || `${name}'s avatar`,
10087
- className: "w-full h-full rounded-full object-cover"
10221
+ className: "w-full h-full rounded-full object-cover",
10222
+ "data-testid": testId ? `${testId}-image` : void 0
10088
10223
  }
10089
10224
  ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.text, children: initials }),
10090
10225
  status && /* @__PURE__ */ jsxRuntime.jsx(
@@ -10097,7 +10232,8 @@ const Avatar = React.forwardRef(
10097
10232
  styles.status,
10098
10233
  statusStyles[status]
10099
10234
  ),
10100
- "aria-label": `Status: ${status}`
10235
+ "aria-label": `Status: ${status}`,
10236
+ "data-testid": testId ? `${testId}-status` : void 0
10101
10237
  }
10102
10238
  )
10103
10239
  ]