@teja-app/ui 0.0.5 → 0.0.7

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 +205 -66
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.js +205 -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",
@@ -7318,15 +7347,18 @@ function Select({
7318
7347
  children: /* @__PURE__ */ jsxRuntime.jsx(
7319
7348
  Bt,
7320
7349
  {
7350
+ portal: true,
7321
7351
  className: utils_index.cn(
7322
7352
  "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
7353
  placement === "top" ? "bottom-full mb-1" : "top-full mt-1"
7324
7354
  ),
7325
- children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
7355
+ "data-testid": testId ? `${testId}-options` : void 0,
7356
+ children: options.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsx(
7326
7357
  It,
7327
7358
  {
7328
7359
  disabled: option.disabled,
7329
7360
  value: option.value,
7361
+ "data-testid": testId ? `${testId}-option-${index2}` : void 0,
7330
7362
  className: ({ active, selected }) => utils_index.cn(
7331
7363
  "relative cursor-pointer select-none py-2.5 pl-10 pr-4",
7332
7364
  // Light mode
@@ -7368,6 +7400,7 @@ function Select({
7368
7400
  "p",
7369
7401
  {
7370
7402
  role: hasError ? "alert" : void 0,
7403
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
7371
7404
  className: utils_index.cn(
7372
7405
  "mt-1.5 text-sm",
7373
7406
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -7413,7 +7446,8 @@ function Modal({
7413
7446
  footer,
7414
7447
  closeOnOverlay = true,
7415
7448
  className,
7416
- isLoading = false
7449
+ isLoading = false,
7450
+ testId
7417
7451
  }) {
7418
7452
  const handleClose = closeOnOverlay ? onClose : () => {
7419
7453
  };
@@ -7428,7 +7462,7 @@ function Modal({
7428
7462
  leave: "ease-in duration-100",
7429
7463
  leaveFrom: "opacity-100",
7430
7464
  leaveTo: "opacity-0",
7431
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm" })
7465
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm", "data-testid": testId ? `${testId}-overlay` : void 0 })
7432
7466
  }
7433
7467
  ),
7434
7468
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 flex items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -7453,6 +7487,7 @@ function Modal({
7453
7487
  sizeStyles$b[size2],
7454
7488
  className
7455
7489
  ),
7490
+ "data-testid": testId,
7456
7491
  children: [
7457
7492
  (title || showCloseButton) && /* @__PURE__ */ jsxRuntime.jsxs(
7458
7493
  "div",
@@ -7461,6 +7496,7 @@ function Modal({
7461
7496
  "flex items-start justify-between px-6 py-4",
7462
7497
  (children || footer) && "border-b border-primary-200 dark:border-primary-700"
7463
7498
  ),
7499
+ "data-testid": testId ? `${testId}-header` : void 0,
7464
7500
  children: [
7465
7501
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
7466
7502
  title && /* @__PURE__ */ jsxRuntime.jsx(Qe, { className: "text-lg font-semibold text-primary-900 dark:text-white", children: title }),
@@ -7479,13 +7515,14 @@ function Modal({
7479
7515
  "focus:outline-none focus:ring-2 focus:ring-gold-500/20",
7480
7516
  "transition-colors"
7481
7517
  ),
7518
+ "data-testid": testId ? `${testId}-close-button` : void 0,
7482
7519
  children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon$2, {})
7483
7520
  }
7484
7521
  )
7485
7522
  ]
7486
7523
  }
7487
7524
  ),
7488
- children && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative px-6 py-4 text-primary-700 dark:text-primary-300", children: [
7525
+ 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
7526
  children,
7490
7527
  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
7528
  ] }),
@@ -7498,6 +7535,7 @@ function Modal({
7498
7535
  "bg-primary-50 dark:bg-primary-900/50",
7499
7536
  "rounded-b-lg"
7500
7537
  ),
7538
+ "data-testid": testId ? `${testId}-footer` : void 0,
7501
7539
  children: footer
7502
7540
  }
7503
7541
  )
@@ -7542,7 +7580,8 @@ function Drawer({
7542
7580
  showCloseButton = true,
7543
7581
  footer,
7544
7582
  className,
7545
- isLoading = false
7583
+ isLoading = false,
7584
+ testId
7546
7585
  }) {
7547
7586
  return /* @__PURE__ */ jsxRuntime.jsx(Ke$2, { show: isOpen, as: React.Fragment, children: /* @__PURE__ */ jsxRuntime.jsxs(ht$1, { className: "relative z-50", onClose, children: [
7548
7587
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -7555,7 +7594,7 @@ function Drawer({
7555
7594
  leave: "ease-in duration-200",
7556
7595
  leaveFrom: "opacity-100",
7557
7596
  leaveTo: "opacity-0",
7558
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm" })
7597
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black/40 backdrop-blur-sm", "data-testid": testId ? `${testId}-overlay` : void 0 })
7559
7598
  }
7560
7599
  ),
7561
7600
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -7580,6 +7619,7 @@ function Drawer({
7580
7619
  sizeStyles$a[size2],
7581
7620
  className
7582
7621
  ),
7622
+ "data-testid": testId,
7583
7623
  children: [
7584
7624
  (title || showCloseButton) && /* @__PURE__ */ jsxRuntime.jsxs(
7585
7625
  "div",
@@ -7603,13 +7643,14 @@ function Drawer({
7603
7643
  "focus:outline-none focus:ring-2 focus:ring-gold-500/20",
7604
7644
  "transition-colors"
7605
7645
  ),
7646
+ "data-testid": testId ? `${testId}-close-button` : void 0,
7606
7647
  children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon$1, {})
7607
7648
  }
7608
7649
  )
7609
7650
  ]
7610
7651
  }
7611
7652
  ),
7612
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 overflow-y-auto px-6 py-4 text-primary-700 dark:text-primary-300", children: [
7653
+ /* @__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
7654
  children,
7614
7655
  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
7656
  ] }),
@@ -7647,7 +7688,8 @@ function ConfirmDialog({
7647
7688
  variant = "neutral",
7648
7689
  cancelText = "Cancel",
7649
7690
  confirmText = "Confirm",
7650
- loading = false
7691
+ loading = false,
7692
+ testId
7651
7693
  }) {
7652
7694
  const buttonVariant = variantToButton[variant];
7653
7695
  const handleConfirm = () => {
@@ -7663,6 +7705,7 @@ function ConfirmDialog({
7663
7705
  size: "sm",
7664
7706
  showCloseButton: false,
7665
7707
  closeOnOverlay: !loading,
7708
+ testId,
7666
7709
  footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-3", children: [
7667
7710
  /* @__PURE__ */ jsxRuntime.jsx(
7668
7711
  Button,
@@ -7670,6 +7713,7 @@ function ConfirmDialog({
7670
7713
  variant: "secondary",
7671
7714
  onClick: onClose,
7672
7715
  disabled: loading,
7716
+ "data-testid": testId ? `${testId}-cancel-button` : void 0,
7673
7717
  children: cancelText
7674
7718
  }
7675
7719
  ),
@@ -7679,6 +7723,7 @@ function ConfirmDialog({
7679
7723
  variant: buttonVariant,
7680
7724
  onClick: handleConfirm,
7681
7725
  disabled: loading,
7726
+ "data-testid": testId ? `${testId}-confirm-button` : void 0,
7682
7727
  children: loading ? "Loading..." : confirmText
7683
7728
  }
7684
7729
  )
@@ -7718,6 +7763,7 @@ const Card = React.forwardRef(
7718
7763
  hoverable = false,
7719
7764
  children,
7720
7765
  className,
7766
+ testId,
7721
7767
  ...props
7722
7768
  }, ref) => {
7723
7769
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -7743,6 +7789,7 @@ const Card = React.forwardRef(
7743
7789
  ],
7744
7790
  className
7745
7791
  ),
7792
+ "data-testid": testId,
7746
7793
  ...props,
7747
7794
  children
7748
7795
  }
@@ -7772,6 +7819,7 @@ const Checkbox = React.forwardRef(
7772
7819
  indeterminate = false,
7773
7820
  className,
7774
7821
  id,
7822
+ testId,
7775
7823
  ...props
7776
7824
  }, forwardedRef) => {
7777
7825
  const checkboxId = id || label?.toLowerCase().replace(/\s+/g, "-");
@@ -7798,7 +7846,7 @@ const Checkbox = React.forwardRef(
7798
7846
  const handleChange = (e2) => {
7799
7847
  onChange?.(e2.target.checked);
7800
7848
  };
7801
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
7849
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, "data-testid": testId, children: [
7802
7850
  /* @__PURE__ */ jsxRuntime.jsxs(
7803
7851
  "label",
7804
7852
  {
@@ -7807,6 +7855,7 @@ const Checkbox = React.forwardRef(
7807
7855
  "inline-flex items-center gap-2",
7808
7856
  disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
7809
7857
  ),
7858
+ "data-testid": testId ? `${testId}-label` : void 0,
7810
7859
  children: [
7811
7860
  /* @__PURE__ */ jsxRuntime.jsx(
7812
7861
  "input",
@@ -7819,6 +7868,7 @@ const Checkbox = React.forwardRef(
7819
7868
  "aria-invalid": hasError ? "true" : void 0,
7820
7869
  "aria-describedby": errorId,
7821
7870
  onChange: handleChange,
7871
+ "data-testid": testId ? `${testId}-checkbox` : void 0,
7822
7872
  className: utils_index.cn(
7823
7873
  sizeStyles$9[size2],
7824
7874
  "rounded border transition-colors",
@@ -7863,6 +7913,7 @@ const Checkbox = React.forwardRef(
7863
7913
  {
7864
7914
  id: errorId,
7865
7915
  role: hasError ? "alert" : void 0,
7916
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
7866
7917
  className: utils_index.cn(
7867
7918
  "mt-1 text-sm",
7868
7919
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -7892,6 +7943,7 @@ const Radio = React.forwardRef(
7892
7943
  error: error2 = false,
7893
7944
  className,
7894
7945
  id,
7946
+ testId,
7895
7947
  ...props
7896
7948
  }, ref) => {
7897
7949
  const radioId = id || (label ? `${props.name}-${label.toLowerCase().replace(/\s+/g, "-")}` : void 0);
@@ -7904,6 +7956,7 @@ const Radio = React.forwardRef(
7904
7956
  disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
7905
7957
  className
7906
7958
  ),
7959
+ "data-testid": testId,
7907
7960
  children: [
7908
7961
  /* @__PURE__ */ jsxRuntime.jsx(
7909
7962
  "input",
@@ -7912,6 +7965,7 @@ const Radio = React.forwardRef(
7912
7965
  type: "radio",
7913
7966
  id: radioId,
7914
7967
  disabled,
7968
+ "data-testid": testId ? `${testId}-radio` : void 0,
7915
7969
  className: utils_index.cn(
7916
7970
  sizeStyles$8[size2],
7917
7971
  "border transition-colors",
@@ -7943,6 +7997,7 @@ const Radio = React.forwardRef(
7943
7997
  "text-primary-700 dark:text-primary-200",
7944
7998
  error2 && "text-error"
7945
7999
  ),
8000
+ "data-testid": testId ? `${testId}-label` : void 0,
7946
8001
  children: label
7947
8002
  }
7948
8003
  )
@@ -7964,7 +8019,8 @@ function RadioGroup({
7964
8019
  disabled = false,
7965
8020
  orientation = "vertical",
7966
8021
  className,
7967
- isLoading = false
8022
+ isLoading = false,
8023
+ testId
7968
8024
  }) {
7969
8025
  const hasError = !!error2;
7970
8026
  const groupId = `${name}-group`;
@@ -7972,7 +8028,7 @@ function RadioGroup({
7972
8028
  const handleChange = (e2) => {
7973
8029
  onChange?.(e2.target.value);
7974
8030
  };
7975
- return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className, role: "radiogroup", "aria-labelledby": label ? groupId : void 0, children: [
8031
+ return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className, role: "radiogroup", "aria-labelledby": label ? groupId : void 0, "data-testid": testId, children: [
7976
8032
  label && /* @__PURE__ */ jsxRuntime.jsxs(
7977
8033
  "legend",
7978
8034
  {
@@ -7990,7 +8046,7 @@ function RadioGroup({
7990
8046
  className: utils_index.cn(
7991
8047
  orientation === "vertical" ? "space-y-2" : "flex flex-wrap gap-4"
7992
8048
  ),
7993
- children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
8049
+ children: options.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsx(
7994
8050
  Radio,
7995
8051
  {
7996
8052
  name,
@@ -8000,7 +8056,8 @@ function RadioGroup({
8000
8056
  disabled: isDisabled || option.disabled,
8001
8057
  error: hasError,
8002
8058
  checked: value === option.value,
8003
- onChange: handleChange
8059
+ onChange: handleChange,
8060
+ testId: testId ? `${testId}-option-${index2}` : void 0
8004
8061
  },
8005
8062
  option.value
8006
8063
  ))
@@ -8010,6 +8067,7 @@ function RadioGroup({
8010
8067
  "p",
8011
8068
  {
8012
8069
  role: hasError ? "alert" : void 0,
8070
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
8013
8071
  className: utils_index.cn(
8014
8072
  "mt-2 text-sm",
8015
8073
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -8045,11 +8103,12 @@ function Toggle({
8045
8103
  disabled = false,
8046
8104
  size: size2 = "md",
8047
8105
  className,
8048
- isLoading = false
8106
+ isLoading = false,
8107
+ testId
8049
8108
  }) {
8050
8109
  const currentSize = sizeStyles$7[size2];
8051
8110
  const isDisabled = disabled || isLoading;
8052
- return /* @__PURE__ */ jsxRuntime.jsx(W, { className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
8111
+ return /* @__PURE__ */ jsxRuntime.jsx(W, { className, "data-testid": testId, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
8053
8112
  (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 mr-4", children: [
8054
8113
  label && /* @__PURE__ */ jsxRuntime.jsx(
8055
8114
  Z,
@@ -8071,6 +8130,7 @@ function Toggle({
8071
8130
  disabled: isDisabled,
8072
8131
  onChange,
8073
8132
  "aria-label": !label ? "Toggle" : void 0,
8133
+ "data-testid": testId ? `${testId}-toggle` : void 0,
8074
8134
  className: utils_index.cn(
8075
8135
  currentSize.switch,
8076
8136
  "relative inline-flex shrink-0 cursor-pointer rounded-full",
@@ -8156,7 +8216,8 @@ function Combobox({
8156
8216
  isLoading = false,
8157
8217
  loadingText = "Loading...",
8158
8218
  emptyText = "No results found",
8159
- onSearch
8219
+ onSearch,
8220
+ testId
8160
8221
  }) {
8161
8222
  const [query, setQuery] = React.useState("");
8162
8223
  const hasError = !!error2;
@@ -8176,12 +8237,13 @@ function Combobox({
8176
8237
  onChange?.(newValue);
8177
8238
  setQuery("");
8178
8239
  };
8179
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), children: [
8240
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), "data-testid": testId, children: [
8180
8241
  label && /* @__PURE__ */ jsxRuntime.jsxs(
8181
8242
  "label",
8182
8243
  {
8183
8244
  id: labelId,
8184
8245
  className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
8246
+ "data-testid": testId ? `${testId}-label` : void 0,
8185
8247
  children: [
8186
8248
  label,
8187
8249
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
@@ -8208,6 +8270,7 @@ function Combobox({
8208
8270
  onSearch?.(newQuery);
8209
8271
  },
8210
8272
  placeholder,
8273
+ "data-testid": testId ? `${testId}-input` : void 0,
8211
8274
  className: utils_index.cn(
8212
8275
  // Base styles - Light mode
8213
8276
  "w-full rounded-md border bg-white px-4 py-2.5 pr-10 text-sm text-primary-900",
@@ -8241,30 +8304,39 @@ function Combobox({
8241
8304
  leaveFrom: "opacity-100",
8242
8305
  leaveTo: "opacity-0",
8243
8306
  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,
8307
+ children: /* @__PURE__ */ jsxRuntime.jsx(
8308
+ Uo,
8249
8309
  {
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
- )) })
8310
+ portal: true,
8311
+ 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",
8312
+ "data-testid": testId ? `${testId}-options` : void 0,
8313
+ 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: [
8314
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: "primary" }),
8315
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: loadingText })
8316
+ ] }) : 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(
8317
+ Ho,
8318
+ {
8319
+ value: option.value,
8320
+ disabled: option.disabled,
8321
+ "data-testid": testId ? `${testId}-option-${index2}` : void 0,
8322
+ className: ({ active, selected }) => utils_index.cn(
8323
+ "relative cursor-pointer select-none py-2.5 pl-10 pr-4",
8324
+ // Light mode
8325
+ active ? "bg-gold-50 text-primary-900" : "text-primary-900",
8326
+ // Dark mode
8327
+ active ? "dark:bg-primary-700 dark:text-primary-100" : "dark:text-primary-200",
8328
+ option.disabled && "cursor-not-allowed opacity-50",
8329
+ selected && "font-medium"
8330
+ ),
8331
+ children: ({ selected }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8332
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate", children: option.label }),
8333
+ 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, {}) })
8334
+ ] })
8335
+ },
8336
+ option.value
8337
+ ))
8338
+ }
8339
+ )
8268
8340
  }
8269
8341
  )
8270
8342
  ] })
@@ -8274,6 +8346,7 @@ function Combobox({
8274
8346
  "p",
8275
8347
  {
8276
8348
  role: hasError ? "alert" : void 0,
8349
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
8277
8350
  className: utils_index.cn(
8278
8351
  "mt-1.5 text-sm",
8279
8352
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -8316,7 +8389,7 @@ const sizeStyles$6 = {
8316
8389
  lg: "px-3 py-1.5 text-base"
8317
8390
  };
8318
8391
  const Badge = React.forwardRef(
8319
- ({ variant = "default", size: size2 = "md", children, className, ...props }, ref) => {
8392
+ ({ variant = "default", size: size2 = "md", children, className, testId, ...props }, ref) => {
8320
8393
  return /* @__PURE__ */ jsxRuntime.jsx(
8321
8394
  "span",
8322
8395
  {
@@ -8327,6 +8400,7 @@ const Badge = React.forwardRef(
8327
8400
  sizeStyles$6[size2],
8328
8401
  className
8329
8402
  ),
8403
+ "data-testid": testId,
8330
8404
  ...props,
8331
8405
  children
8332
8406
  }
@@ -8496,6 +8570,7 @@ function Tabs({
8496
8570
  size: size2 = "md",
8497
8571
  className,
8498
8572
  "aria-label": ariaLabel = "Navigation tabs",
8573
+ testId,
8499
8574
  ...props
8500
8575
  }) {
8501
8576
  const selectedIndex = React.useMemo(
@@ -8523,11 +8598,13 @@ function Tabs({
8523
8598
  fullWidth && "w-full",
8524
8599
  className
8525
8600
  ),
8601
+ "data-testid": testId,
8526
8602
  ...props,
8527
- children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
8603
+ children: tabs.map((tab, index2) => /* @__PURE__ */ jsxRuntime.jsx(
8528
8604
  dt,
8529
8605
  {
8530
8606
  disabled: tab.disabled,
8607
+ "data-testid": testId ? `${testId}-tab-${index2}` : void 0,
8531
8608
  className: ({ selected }) => utils_index.cn(
8532
8609
  "relative outline-none transition-colors duration-normal",
8533
8610
  "focus-visible:ring-2 focus-visible:ring-gold-500/50",
@@ -8574,6 +8651,7 @@ function TabContentPanels({
8574
8651
  children,
8575
8652
  className,
8576
8653
  isLoading = false,
8654
+ testId,
8577
8655
  ...props
8578
8656
  }) {
8579
8657
  const activeContent = activeTab && children[activeTab];
@@ -8582,6 +8660,7 @@ function TabContentPanels({
8582
8660
  {
8583
8661
  role: "tabpanel",
8584
8662
  className: utils_index.cn("relative mt-4", className),
8663
+ "data-testid": testId,
8585
8664
  ...props,
8586
8665
  children: [
8587
8666
  activeContent,
@@ -8646,6 +8725,7 @@ const Breadcrumbs = React.forwardRef(
8646
8725
  maxItems = 0,
8647
8726
  renderLink,
8648
8727
  className,
8728
+ testId,
8649
8729
  ...props
8650
8730
  }, ref) => {
8651
8731
  const [isExpanded, setIsExpanded] = React.useState(false);
@@ -8697,12 +8777,20 @@ const Breadcrumbs = React.forwardRef(
8697
8777
  ref,
8698
8778
  "aria-label": "Breadcrumb",
8699
8779
  className: utils_index.cn("text-sm", className),
8780
+ "data-testid": testId,
8700
8781
  ...props,
8701
8782
  children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center flex-wrap gap-1", children: displayItems.map((item, index2) => {
8702
8783
  const isLast = index2 === displayItems.length - 1;
8703
8784
  const showEllipsis = shouldCollapse && index2 === 0;
8704
8785
  return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
8705
- /* @__PURE__ */ jsxRuntime.jsx("li", { className: "inline-flex items-center", children: renderItem(item, index2, isLast) }),
8786
+ /* @__PURE__ */ jsxRuntime.jsx(
8787
+ "li",
8788
+ {
8789
+ className: "inline-flex items-center",
8790
+ "data-testid": testId ? `${testId}-item-${index2}` : void 0,
8791
+ children: renderItem(item, index2, isLast)
8792
+ }
8793
+ ),
8706
8794
  showEllipsis && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8707
8795
  /* @__PURE__ */ jsxRuntime.jsx("li", { className: "inline-flex items-center", "aria-hidden": "true", children: separatorElement }),
8708
8796
  /* @__PURE__ */ jsxRuntime.jsx("li", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(EllipsisButton, { onClick: () => setIsExpanded(true) }) })
@@ -8730,6 +8818,7 @@ const Skeleton = React.forwardRef(
8730
8818
  label = "Loading...",
8731
8819
  className,
8732
8820
  style,
8821
+ testId,
8733
8822
  ...props
8734
8823
  }, ref) => {
8735
8824
  const widthValue = typeof width === "number" ? `${width}px` : width;
@@ -8744,6 +8833,7 @@ const Skeleton = React.forwardRef(
8744
8833
  role: "status",
8745
8834
  "aria-label": label,
8746
8835
  "aria-busy": "true",
8836
+ "data-testid": testId,
8747
8837
  ...props,
8748
8838
  children: [
8749
8839
  Array.from({ length: lines }).map((_2, index2) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -8785,6 +8875,7 @@ const Skeleton = React.forwardRef(
8785
8875
  role: "status",
8786
8876
  "aria-label": label,
8787
8877
  "aria-busy": "true",
8878
+ "data-testid": testId,
8788
8879
  ...props,
8789
8880
  children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: label })
8790
8881
  }
@@ -8885,6 +8976,7 @@ const EmptyState = React.forwardRef(
8885
8976
  action,
8886
8977
  size: size2 = "md",
8887
8978
  className,
8979
+ testId,
8888
8980
  ...props
8889
8981
  }, ref) => {
8890
8982
  const styles = sizeStyles$4[size2];
@@ -8897,9 +8989,17 @@ const EmptyState = React.forwardRef(
8897
8989
  styles.container,
8898
8990
  className
8899
8991
  ),
8992
+ "data-testid": testId,
8900
8993
  ...props,
8901
8994
  children: [
8902
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn(styles.icon, typeColors[type], "mb-4"), children: icon || defaultIcons$1[type] }),
8995
+ /* @__PURE__ */ jsxRuntime.jsx(
8996
+ "div",
8997
+ {
8998
+ className: utils_index.cn(styles.icon, typeColors[type], "mb-4"),
8999
+ "data-testid": testId ? `${testId}-icon` : void 0,
9000
+ children: icon || defaultIcons$1[type]
9001
+ }
9002
+ ),
8903
9003
  /* @__PURE__ */ jsxRuntime.jsx(
8904
9004
  "h3",
8905
9005
  {
@@ -8908,6 +9008,7 @@ const EmptyState = React.forwardRef(
8908
9008
  "text-primary-900 dark:text-primary-100",
8909
9009
  "mb-1"
8910
9010
  ),
9011
+ "data-testid": testId ? `${testId}-title` : void 0,
8911
9012
  children: title
8912
9013
  }
8913
9014
  ),
@@ -8919,10 +9020,11 @@ const EmptyState = React.forwardRef(
8919
9020
  "text-primary-500 dark:text-primary-400",
8920
9021
  "max-w-sm mb-4"
8921
9022
  ),
9023
+ "data-testid": testId ? `${testId}-description` : void 0,
8922
9024
  children: description
8923
9025
  }
8924
9026
  ),
8925
- action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: action })
9027
+ action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", "data-testid": testId ? `${testId}-action` : void 0, children: action })
8926
9028
  ]
8927
9029
  }
8928
9030
  );
@@ -8978,7 +9080,8 @@ function Pagination({
8978
9080
  totalItems,
8979
9081
  disabled = false,
8980
9082
  size: size2 = "md",
8981
- className
9083
+ className,
9084
+ testId
8982
9085
  }) {
8983
9086
  const pageSizeId = React.useId();
8984
9087
  const currentSize = sizeStyles$3[size2];
@@ -9011,13 +9114,14 @@ function Pagination({
9011
9114
  };
9012
9115
  if (variant === "load-more") {
9013
9116
  if (!canGoNext) return null;
9014
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn("flex justify-center", className), children: /* @__PURE__ */ jsxRuntime.jsx(
9117
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn("flex justify-center", className), "data-testid": testId, children: /* @__PURE__ */ jsxRuntime.jsx(
9015
9118
  Button,
9016
9119
  {
9017
9120
  variant: "secondary",
9018
9121
  size: size2 === "sm" ? "sm" : "md",
9019
9122
  onClick: handleNext,
9020
9123
  disabled,
9124
+ "data-testid": testId ? `${testId}-load-more` : void 0,
9021
9125
  children: "Load more"
9022
9126
  }
9023
9127
  ) });
@@ -9028,6 +9132,7 @@ function Pagination({
9028
9132
  {
9029
9133
  "aria-label": "Pagination",
9030
9134
  className: utils_index.cn("flex items-center justify-between gap-4", className),
9135
+ "data-testid": testId,
9031
9136
  children: [
9032
9137
  /* @__PURE__ */ jsxRuntime.jsxs(
9033
9138
  Button,
@@ -9037,6 +9142,7 @@ function Pagination({
9037
9142
  onClick: handlePrevious,
9038
9143
  disabled: disabled || !canGoPrevious,
9039
9144
  "aria-label": "Previous page",
9145
+ "data-testid": testId ? `${testId}-prev` : void 0,
9040
9146
  children: [
9041
9147
  /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, {}),
9042
9148
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: "Previous" })
@@ -9057,6 +9163,7 @@ function Pagination({
9057
9163
  onClick: handleNext,
9058
9164
  disabled: disabled || !canGoNext,
9059
9165
  "aria-label": "Next page",
9166
+ "data-testid": testId ? `${testId}-next` : void 0,
9060
9167
  children: [
9061
9168
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", children: "Next" }),
9062
9169
  /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, {})
@@ -9072,6 +9179,7 @@ function Pagination({
9072
9179
  {
9073
9180
  "aria-label": "Pagination",
9074
9181
  className: utils_index.cn("flex items-center justify-between gap-4", className),
9182
+ "data-testid": testId,
9075
9183
  children: [
9076
9184
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
9077
9185
  itemsRange && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: utils_index.cn("text-primary-600 dark:text-primary-400", currentSize.text), children: [
@@ -9118,6 +9226,7 @@ function Pagination({
9118
9226
  onClick: handlePrevious,
9119
9227
  disabled: disabled || !canGoPrevious,
9120
9228
  "aria-label": "Previous page",
9229
+ "data-testid": testId ? `${testId}-prev` : void 0,
9121
9230
  className: utils_index.cn(
9122
9231
  "inline-flex items-center justify-center rounded-md",
9123
9232
  "border border-primary-300 dark:border-primary-600",
@@ -9152,6 +9261,7 @@ function Pagination({
9152
9261
  disabled,
9153
9262
  "aria-label": `Page ${page}`,
9154
9263
  "aria-current": page === currentPage ? "page" : void 0,
9264
+ "data-testid": testId ? `${testId}-page-${page}` : void 0,
9155
9265
  className: utils_index.cn(
9156
9266
  "inline-flex items-center justify-center rounded-md",
9157
9267
  "border transition-colors",
@@ -9180,6 +9290,7 @@ function Pagination({
9180
9290
  onClick: handleNext,
9181
9291
  disabled: disabled || !canGoNext,
9182
9292
  "aria-label": "Next page",
9293
+ "data-testid": testId ? `${testId}-next` : void 0,
9183
9294
  className: utils_index.cn(
9184
9295
  "inline-flex items-center justify-center rounded-md",
9185
9296
  "border border-primary-300 dark:border-primary-600",
@@ -9247,7 +9358,8 @@ function MultiSelect({
9247
9358
  required = false,
9248
9359
  disabled = false,
9249
9360
  fullWidth = false,
9250
- className
9361
+ className,
9362
+ testId
9251
9363
  }) {
9252
9364
  const [query, setQuery] = React.useState("");
9253
9365
  const searchInputRef = React.useRef(null);
@@ -9303,12 +9415,13 @@ function MultiSelect({
9303
9415
  };
9304
9416
  const displayedChips = selectedOptions.slice(0, maxDisplayedItems);
9305
9417
  const hiddenCount = selectedOptions.length - maxDisplayedItems;
9306
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), children: [
9418
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn(fullWidth ? "w-full" : "w-auto", className), "data-testid": testId, children: [
9307
9419
  label && /* @__PURE__ */ jsxRuntime.jsxs(
9308
9420
  "label",
9309
9421
  {
9310
9422
  id: labelId,
9311
9423
  className: "mb-2 block text-sm font-medium text-primary-700 dark:text-white",
9424
+ "data-testid": testId ? `${testId}-label` : void 0,
9312
9425
  children: [
9313
9426
  label,
9314
9427
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
@@ -9336,7 +9449,7 @@ function MultiSelect({
9336
9449
  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
9450
  ),
9338
9451
  children: [
9339
- displayedChips.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
9452
+ displayedChips.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsxs(
9340
9453
  "span",
9341
9454
  {
9342
9455
  className: utils_index.cn(
@@ -9344,6 +9457,7 @@ function MultiSelect({
9344
9457
  "bg-primary-100 dark:bg-primary-700",
9345
9458
  "text-sm text-primary-700 dark:text-primary-200"
9346
9459
  ),
9460
+ "data-testid": testId ? `${testId}-chip-${index2}` : void 0,
9347
9461
  children: [
9348
9462
  option.label,
9349
9463
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -9402,8 +9516,10 @@ function MultiSelect({
9402
9516
  children: /* @__PURE__ */ jsxRuntime.jsx(
9403
9517
  Bt,
9404
9518
  {
9519
+ portal: true,
9405
9520
  static: true,
9406
9521
  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",
9522
+ "data-testid": testId ? `${testId}-options` : void 0,
9407
9523
  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
9524
  /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: "primary" }),
9409
9525
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: loadingText })
@@ -9419,6 +9535,7 @@ function MultiSelect({
9419
9535
  value: query,
9420
9536
  onChange: handleSearchChange,
9421
9537
  placeholder: "Search...",
9538
+ "data-testid": testId ? `${testId}-input` : void 0,
9422
9539
  className: utils_index.cn(
9423
9540
  "w-full rounded border border-primary-300 px-2 py-1 text-sm",
9424
9541
  "bg-white dark:bg-primary-900",
@@ -9460,11 +9577,12 @@ function MultiSelect({
9460
9577
  ]
9461
9578
  }
9462
9579
  ),
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(
9580
+ 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
9581
  It,
9465
9582
  {
9466
9583
  value: option.value,
9467
9584
  disabled: option.disabled,
9585
+ "data-testid": testId ? `${testId}-option-${index2}` : void 0,
9468
9586
  className: ({ active }) => utils_index.cn(
9469
9587
  "flex cursor-pointer items-center gap-2 px-4 py-2.5",
9470
9588
  active && "bg-primary-50 dark:bg-primary-700",
@@ -9498,6 +9616,7 @@ function MultiSelect({
9498
9616
  "p",
9499
9617
  {
9500
9618
  role: hasError ? "alert" : void 0,
9619
+ "data-testid": testId ? hasError ? `${testId}-error` : `${testId}-helper-text` : void 0,
9501
9620
  className: utils_index.cn(
9502
9621
  "mt-1.5 text-sm",
9503
9622
  hasError ? "text-error" : "text-primary-500 dark:text-primary-400"
@@ -9566,6 +9685,7 @@ function SidebarItem({
9566
9685
  onNavigate,
9567
9686
  LinkComponent,
9568
9687
  className,
9688
+ testId,
9569
9689
  ...props
9570
9690
  }) {
9571
9691
  if (!shouldShowItem(item)) {
@@ -9612,6 +9732,7 @@ function SidebarItem({
9612
9732
  disabled: item.disabled,
9613
9733
  "aria-label": item["aria-label"] || item.label,
9614
9734
  title: collapsed ? item.label : void 0,
9735
+ "data-testid": testId,
9615
9736
  className: utils_index.cn(
9616
9737
  // Base styles
9617
9738
  "flex w-full items-center rounded-lg font-medium",
@@ -9644,6 +9765,7 @@ function SidebarItem({
9644
9765
  {
9645
9766
  to: item.href,
9646
9767
  onClick: handleClick,
9768
+ "data-testid": testId,
9647
9769
  className: utils_index.cn(
9648
9770
  // Base styles
9649
9771
  "flex items-center rounded-lg font-medium",
@@ -9781,6 +9903,7 @@ const Sidebar = React.forwardRef(
9781
9903
  collapsedWidth = "4rem",
9782
9904
  className,
9783
9905
  "aria-label": ariaLabel = "Main navigation",
9906
+ testId,
9784
9907
  ...props
9785
9908
  }, ref) => {
9786
9909
  React.useEffect(() => {
@@ -9888,6 +10011,7 @@ const Sidebar = React.forwardRef(
9888
10011
  "focus:outline-none focus:ring-2 focus:ring-primary-500/20"
9889
10012
  ),
9890
10013
  "aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
10014
+ "data-testid": testId ? `${testId}-toggle` : void 0,
9891
10015
  children: /* @__PURE__ */ jsxRuntime.jsx(
9892
10016
  "svg",
9893
10017
  {
@@ -9919,7 +10043,8 @@ const Sidebar = React.forwardRef(
9919
10043
  {
9920
10044
  className: "fixed inset-0 z-40 bg-black/20 lg:hidden",
9921
10045
  onClick: handleOverlayClick,
9922
- "aria-hidden": "true"
10046
+ "aria-hidden": "true",
10047
+ "data-testid": testId ? `${testId}-overlay` : void 0
9923
10048
  }
9924
10049
  ),
9925
10050
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -9940,6 +10065,7 @@ const Sidebar = React.forwardRef(
9940
10065
  ),
9941
10066
  style: { width: sidebarWidth },
9942
10067
  "aria-label": ariaLabel,
10068
+ "data-testid": testId,
9943
10069
  ...props,
9944
10070
  children: sidebarContent
9945
10071
  }
@@ -9994,7 +10120,7 @@ const variantStyles = {
9994
10120
  }
9995
10121
  };
9996
10122
  const Alert = React.forwardRef(
9997
- ({ variant = "info", title, message, icon, onClose, className, ...props }, ref) => {
10123
+ ({ variant = "info", title, message, icon, onClose, className, testId, ...props }, ref) => {
9998
10124
  const styles = variantStyles[variant];
9999
10125
  const displayIcon = icon === null ? null : icon ?? defaultIcons[variant];
10000
10126
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -10007,9 +10133,18 @@ const Alert = React.forwardRef(
10007
10133
  styles.container,
10008
10134
  className
10009
10135
  ),
10136
+ "data-testid": testId,
10010
10137
  ...props,
10011
10138
  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 }),
10139
+ displayIcon !== null && /* @__PURE__ */ jsxRuntime.jsx(
10140
+ "div",
10141
+ {
10142
+ className: utils_index.cn("flex-shrink-0", styles.icon),
10143
+ "aria-hidden": "true",
10144
+ "data-testid": testId ? `${testId}-icon` : void 0,
10145
+ children: displayIcon
10146
+ }
10147
+ ),
10013
10148
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_index.cn("flex-1", displayIcon !== null && "ml-3"), children: [
10014
10149
  title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: utils_index.cn("text-sm font-medium", styles.title), children: title }),
10015
10150
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_index.cn("text-sm", title && "mt-1"), children: message })
@@ -10025,6 +10160,7 @@ const Alert = React.forwardRef(
10025
10160
  "focus:ring-current/20",
10026
10161
  "dark:focus:ring-offset-primary-900"
10027
10162
  ),
10163
+ "data-testid": testId ? `${testId}-close-button` : void 0,
10028
10164
  children: [
10029
10165
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Dismiss" }),
10030
10166
  /* @__PURE__ */ jsxRuntime.jsx(XMarkIcon, {})
@@ -10051,7 +10187,7 @@ const statusStyles = {
10051
10187
  busy: "bg-error"
10052
10188
  };
10053
10189
  const Avatar = React.forwardRef(
10054
- ({ name, src, size: size2 = "md", alt, status, className, ...props }, ref) => {
10190
+ ({ name, src, size: size2 = "md", alt, status, className, testId, ...props }, ref) => {
10055
10191
  const getInitials = (fullName) => {
10056
10192
  const names = fullName.trim().split(" ");
10057
10193
  if (names.length === 1) {
@@ -10077,6 +10213,7 @@ const Avatar = React.forwardRef(
10077
10213
  styles.container,
10078
10214
  className
10079
10215
  ),
10216
+ "data-testid": testId,
10080
10217
  ...props,
10081
10218
  children: [
10082
10219
  src ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -10084,7 +10221,8 @@ const Avatar = React.forwardRef(
10084
10221
  {
10085
10222
  src,
10086
10223
  alt: alt || `${name}'s avatar`,
10087
- className: "w-full h-full rounded-full object-cover"
10224
+ className: "w-full h-full rounded-full object-cover",
10225
+ "data-testid": testId ? `${testId}-image` : void 0
10088
10226
  }
10089
10227
  ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.text, children: initials }),
10090
10228
  status && /* @__PURE__ */ jsxRuntime.jsx(
@@ -10097,7 +10235,8 @@ const Avatar = React.forwardRef(
10097
10235
  styles.status,
10098
10236
  statusStyles[status]
10099
10237
  ),
10100
- "aria-label": `Status: ${status}`
10238
+ "aria-label": `Status: ${status}`,
10239
+ "data-testid": testId ? `${testId}-status` : void 0
10101
10240
  }
10102
10241
  )
10103
10242
  ]