gantri-components 2.252.2 → 2.253.1

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 (50) hide show
  1. package/dist/components/aspect-ratio/aspect-ratio.types.d.ts +8 -0
  2. package/dist/components/badge/badge.types.d.ts +9 -0
  3. package/dist/components/banner/banner.types.d.ts +9 -0
  4. package/dist/components/box/box.types.d.ts +8 -0
  5. package/dist/components/breadcrumbs/breadcrumbs.types.d.ts +9 -0
  6. package/dist/components/button/button.types.d.ts +17 -0
  7. package/dist/components/button-menu/button-menu.types.d.ts +9 -0
  8. package/dist/components/carousel/carousel.types.d.ts +9 -0
  9. package/dist/components/cell/cell.types.d.ts +8 -0
  10. package/dist/components/checkbox/checkbox.types.d.ts +9 -0
  11. package/dist/components/checkbox-list/checkbox-list.types.d.ts +9 -0
  12. package/dist/components/circular-progress/circular-progress.types.d.ts +9 -0
  13. package/dist/components/color-picker/color-picker.types.d.ts +9 -0
  14. package/dist/components/confirmation-modal/confirmation-modal.types.d.ts +8 -0
  15. package/dist/components/dropdown/dropdown.types.d.ts +9 -0
  16. package/dist/components/dropdown-menu/dropdown-menu.types.d.ts +9 -0
  17. package/dist/components/file-uploader/file-uploader.types.d.ts +9 -0
  18. package/dist/components/filter-button/filter-button.types.d.ts +9 -0
  19. package/dist/components/icon/icon.types.d.ts +9 -0
  20. package/dist/components/image/image.types.d.ts +8 -0
  21. package/dist/components/label/label.types.d.ts +11 -0
  22. package/dist/components/line/line.types.d.ts +9 -0
  23. package/dist/components/linear-progress/linear-progress.types.d.ts +9 -0
  24. package/dist/components/max-width/max-width.types.d.ts +8 -0
  25. package/dist/components/modal/modal.types.d.ts +15 -0
  26. package/dist/components/multi-select-list/multi-select-list.types.d.ts +9 -0
  27. package/dist/components/option-selector/option-selector.types.d.ts +9 -0
  28. package/dist/components/overlay/overlay.types.d.ts +8 -0
  29. package/dist/components/picture/picture.types.d.ts +8 -0
  30. package/dist/components/pills/components/pill/pill.types.d.ts +9 -0
  31. package/dist/components/pills/pills.types.d.ts +9 -0
  32. package/dist/components/quantity/quantity.types.d.ts +9 -0
  33. package/dist/components/radio/radio.types.d.ts +9 -0
  34. package/dist/components/radio-list/radio-list.types.d.ts +9 -0
  35. package/dist/components/slider/slider.types.d.ts +9 -0
  36. package/dist/components/table/table.types.d.ts +8 -0
  37. package/dist/components/tabs/tabs.types.d.ts +9 -0
  38. package/dist/components/text-field/text-field.types.d.ts +9 -0
  39. package/dist/components/toggle/toggle.types.d.ts +8 -0
  40. package/dist/components/tooltip/tooltip.types.d.ts +9 -0
  41. package/dist/components/typography/typography.types.d.ts +8 -0
  42. package/dist/components/video/video.types.d.ts +14 -0
  43. package/dist/helpers/data-component/__tests__/data-component.test.d.ts +1 -0
  44. package/dist/helpers/data-component/data-component.d.ts +43 -0
  45. package/dist/helpers/data-component/data-component.types.d.ts +10 -0
  46. package/dist/helpers/data-component/index.d.ts +2 -0
  47. package/dist/helpers/index.d.ts +1 -0
  48. package/dist/index.cjs.js +1 -1
  49. package/dist/index.esm.js +1 -1
  50. package/package.json +1 -1
@@ -7,5 +7,13 @@ export interface AspectRatioProps extends BaseProps {
7
7
  backgroundColor?: ResolutionAwareProp<Color>;
8
8
  height?: ResolutionAwareProp<Property.Height>;
9
9
  hidden?: ResolutionAwareProp<boolean>;
10
+ /**
11
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
12
+ * sibling instances. When provided, the root receives
13
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
14
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
15
+ * attributes are usually sufficient. See `helpers/data-component`.
16
+ */
17
+ testId?: string;
10
18
  width?: ResolutionAwareProp<Property.Width>;
11
19
  }
@@ -16,6 +16,15 @@ export interface BadgeProps {
16
16
  semanticColor?: BadgeSemanticColor;
17
17
  size?: BadgeSize;
18
18
  style?: CSSProperties;
19
+ /**
20
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
21
+ * sibling instances. When provided, the root receives
22
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
23
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
24
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
25
+ * are usually sufficient. See `helpers/data-component`.
26
+ */
27
+ testId?: string;
19
28
  text?: string;
20
29
  textColor?: PaletteColor;
21
30
  tx?: string;
@@ -22,6 +22,15 @@ export interface BannerProps {
22
22
  closeable?: boolean;
23
23
  /** Callback when the close button is clicked. */
24
24
  onClose?: () => void;
25
+ /**
26
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
27
+ * sibling instances. When provided, the root receives
28
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
29
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
30
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
31
+ * are usually sufficient. See `helpers/data-component`.
32
+ */
33
+ testId?: string;
25
34
  }
26
35
  export interface StyledBannerProps {
27
36
  $variant: BannerVariant;
@@ -51,6 +51,14 @@ export interface BoxProps extends BaseProps, ElementSpacingProps {
51
51
  minHeight?: ResolutionAwareProp<Property.MinHeight>;
52
52
  minWidth?: ResolutionAwareProp<string>;
53
53
  overflow?: Property.Overflow;
54
+ /**
55
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
56
+ * sibling instances. When provided, the root receives
57
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
58
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
59
+ * attributes are usually sufficient. See `helpers/data-component`.
60
+ */
61
+ testId?: string;
54
62
  textAlign?: ResolutionAwareProp<string>;
55
63
  width?: ResolutionAwareProp<string>;
56
64
  }
@@ -3,4 +3,13 @@ export interface BreadcrumbsProps {
3
3
  'aria-label'?: string;
4
4
  gap?: Property.Gap;
5
5
  separator?: string;
6
+ /**
7
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
8
+ * sibling instances. When provided, the root receives
9
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
10
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
11
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
12
+ * are usually sufficient. See `helpers/data-component`.
13
+ */
14
+ testId?: string;
6
15
  }
@@ -32,6 +32,23 @@ export interface ButtonProps extends Pick<BaseProps, Exclude<keyof BaseProps, 'c
32
32
  */
33
33
  rounded?: boolean;
34
34
  size?: ResolutionAwareProp<ButtonSize>;
35
+ /**
36
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
37
+ * sibling instances. When provided, the root receives
38
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
39
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
40
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
41
+ * are usually sufficient. See `helpers/data-component`.
42
+ */
43
+ testId?: string;
44
+ /**
45
+ * @internal Library use only. Lets a parent gantri-components component
46
+ * override the auto-emitted `data-component="button"` with a more
47
+ * specific name (e.g., `confirmation-modal-confirm`, `button-menu-trigger`,
48
+ * `carousel-arrow-prev`). Not a public API — consumers should not pass
49
+ * this directly.
50
+ */
51
+ _dataComponentName?: string;
35
52
  text?: string;
36
53
  textLineHeight?: Property.LineHeight;
37
54
  textVariant?: TextVariant;
@@ -22,5 +22,14 @@ export interface ButtonMenuProps<T extends Record<string, unknown>> extends Drop
22
22
  onClose?: () => void;
23
23
  onOpen?: () => void;
24
24
  position?: OverlayPosition;
25
+ /**
26
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
27
+ * sibling instances. When provided, the root receives
28
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
29
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
30
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
31
+ * are usually sufficient. See `helpers/data-component`.
32
+ */
33
+ testId?: string;
25
34
  triggerEvent?: 'click' | 'hover' | 'manual';
26
35
  }
@@ -20,6 +20,15 @@ export interface CarouselProps {
20
20
  style?: CSSProperties;
21
21
  swipeThreshold?: number;
22
22
  swipeable?: boolean;
23
+ /**
24
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
25
+ * sibling instances. When provided, the root receives
26
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
27
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
28
+ * attributes (`data-component`, `data-items-per-page`, etc.) are usually
29
+ * sufficient. See `helpers/data-component`.
30
+ */
31
+ testId?: string;
23
32
  transitionDuration?: number;
24
33
  transitionEasing?: string;
25
34
  }
@@ -38,6 +38,14 @@ export interface CellProps extends BaseProps {
38
38
  row?: ResolutionAwareProp<any>;
39
39
  rowGap?: ResolutionAwareProp<string>;
40
40
  style?: CSSProperties;
41
+ /**
42
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
43
+ * sibling instances. When provided, the root receives
44
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
45
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
46
+ * attributes are usually sufficient. See `helpers/data-component`.
47
+ */
48
+ testId?: string;
41
49
  textAlign?: ResolutionAwareProp<Property.TextAlign>;
42
50
  verticalMargin?: ResolutionAwareProp<BoxDimension>;
43
51
  verticalPadding?: ResolutionAwareProp<BoxDimension>;
@@ -35,6 +35,15 @@ export interface CheckboxProps<T = boolean> {
35
35
  onClick?: MouseEventHandler<HTMLDivElement>;
36
36
  onFocus?: (event: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
37
37
  onSelected?: (value: T) => void;
38
+ /**
39
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
40
+ * sibling instances. When provided, the root receives
41
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
42
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
43
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
44
+ * are usually sufficient. See `helpers/data-component`.
45
+ */
46
+ testId?: string;
38
47
  variant?: CheckboxVariant;
39
48
  }
40
49
  export interface LabelContentProps extends Pick<CheckboxProps, 'labelText' | 'labelTx' | 'labelTxComponents' | 'labelVariant' | 'labelColor' | 'Component' | 'labelHtmlText'> {
@@ -14,6 +14,15 @@ export interface CheckboxListProps<Value extends string | Record<any, any>> exte
14
14
  };
15
15
  items: (Value extends string ? Value : CheckboxItem<Value>)[];
16
16
  onValueChange: OnCheckboxListValueChange<Value>;
17
+ /**
18
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
19
+ * sibling instances. When provided, the root receives
20
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
21
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
22
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
23
+ * are usually sufficient. See `helpers/data-component`.
24
+ */
25
+ testId?: string;
17
26
  values: string[];
18
27
  }
19
28
  export interface CheckboxListDefaultProps<Value extends string | Record<any, any>> {
@@ -2,4 +2,13 @@ import { Property } from 'csstype';
2
2
  export type CircularProgressBaseSize = 'small' | 'medium' | 'large';
3
3
  export interface CircularProgressProps {
4
4
  size?: CircularProgressBaseSize | Property.Height;
5
+ /**
6
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
7
+ * sibling instances. When provided, the root receives
8
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
9
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
10
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
11
+ * are usually sufficient. See `helpers/data-component`.
12
+ */
13
+ testId?: string;
5
14
  }
@@ -11,6 +11,15 @@ export interface ColorPickerProps extends Partial<ColorPickerDefaultProps> {
11
11
  onChange?: (event: ColorPickerChangeEvent) => void;
12
12
  onValueChange?: (selected: ColorDetails | ColorDetails[] | null) => void;
13
13
  readOnly?: boolean;
14
+ /**
15
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
16
+ * sibling instances. When provided, the root receives
17
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
18
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
19
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
20
+ * are usually sufficient. See `helpers/data-component`.
21
+ */
22
+ testId?: string;
14
23
  value?: string | string[];
15
24
  }
16
25
  export interface ColorPickerDefaultProps {
@@ -13,4 +13,12 @@ export interface ConfirmationModalProps extends Partial<ModalProps> {
13
13
  headerTx?: string;
14
14
  onCancel?: () => void;
15
15
  onConfirm: () => void;
16
+ /**
17
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
18
+ * sibling instances. When provided, the root receives
19
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
20
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
21
+ * attributes are usually sufficient. See `helpers/data-component`.
22
+ */
23
+ testId?: string;
16
24
  }
@@ -43,6 +43,15 @@ export interface DropdownProps<T extends Record<any, any>> extends Omit<Dropdown
43
43
  resetSelectionOnDisabled?: boolean;
44
44
  size?: ResolutionAwareProp<TextFieldSize>;
45
45
  style?: CSSProperties;
46
+ /**
47
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
48
+ * sibling instances. When provided, the root receives
49
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
50
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
51
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
52
+ * are usually sufficient. See `helpers/data-component`.
53
+ */
54
+ testId?: string;
46
55
  variant?: TextFieldVariant;
47
56
  zIndex?: number;
48
57
  }
@@ -32,6 +32,15 @@ export interface DropdownMenuProps<T extends DynamicListItem<Record<any, any>>>
32
32
  searchable?: boolean;
33
33
  /** Optionally provide to highlight multiple items as selected. */
34
34
  selectedItems?: DynamicListItem<T>[];
35
+ /**
36
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
37
+ * sibling instances. When provided, the root receives
38
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
39
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
40
+ * attributes (`data-component`, `data-id`, `data-label`, etc.) are usually
41
+ * sufficient. See `helpers/data-component`.
42
+ */
43
+ testId?: string;
35
44
  value?: string | number;
36
45
  width?: Property.Width<string | number>;
37
46
  }
@@ -37,6 +37,15 @@ export type FileUploaderProps = {
37
37
  /** Used to show loading indicator for `'thumbnail'` variant. For the `'button'` variant, it can be passed here or as part of `buttonProps`. */
38
38
  processing: boolean;
39
39
  purifyFileName?: boolean;
40
+ /**
41
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
42
+ * sibling instances. When provided, the root receives
43
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
44
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
45
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
46
+ * are usually sufficient. See `helpers/data-component`.
47
+ */
48
+ testId?: string;
40
49
  transformThumbnailSrc?: TransformThumbnailSrc;
41
50
  /** If invalid, return the error message to display. */
42
51
  validateFile?: ValidateFile;
@@ -23,5 +23,14 @@ export interface FilterButtonProps {
23
23
  resetButtonText?: string;
24
24
  resetButtonTx?: string;
25
25
  size?: ResolutionAwareProp<ButtonSize>;
26
+ /**
27
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
28
+ * sibling instances. When provided, the root receives
29
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
30
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
31
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
32
+ * are usually sufficient. See `helpers/data-component`.
33
+ */
34
+ testId?: string;
26
35
  variant?: 'primary' | 'secondary';
27
36
  }
@@ -13,6 +13,15 @@ export interface IconProps extends SVGProps<any> {
13
13
  opacity?: number;
14
14
  right?: Property.Right;
15
15
  size?: ResolutionAwareProp<Property.Height<string>>;
16
+ /**
17
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
18
+ * sibling instances. When provided, the root receives
19
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
20
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
21
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
22
+ * are usually sufficient. See `helpers/data-component`.
23
+ */
24
+ testId?: string;
16
25
  top?: Property.Top;
17
26
  width?: ResolutionAwareProp<Property.Width<string | any>>;
18
27
  }
@@ -42,6 +42,14 @@ export interface ImageProps {
42
42
  source?: Optional<ImageSource>;
43
43
  src: ResolutionAwareProp<string>;
44
44
  style?: CSSProperties;
45
+ /**
46
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
47
+ * sibling instances. When provided, the root receives
48
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
49
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
50
+ * attributes are usually sufficient. See `helpers/data-component`.
51
+ */
52
+ testId?: string;
45
53
  transformations?: Optional<ResolutionAwareProp<Transformations>>;
46
54
  transformationsVariant?: Optional<ImageTransformationsVariant>;
47
55
  /**
@@ -18,4 +18,15 @@ export interface LabelProps {
18
18
  required?: boolean;
19
19
  /** Whether to show the "(Optional)" suffix. Defaults to false. */
20
20
  showOptional?: boolean;
21
+ /** The `for` attribute target (HTML `for`). */
22
+ htmlFor?: string;
23
+ /**
24
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
25
+ * sibling instances. When provided, the root receives
26
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
27
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
28
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
29
+ * are usually sufficient. See `helpers/data-component`.
30
+ */
31
+ testId?: string;
21
32
  }
@@ -4,4 +4,13 @@ import { MarginProps } from '../box/box.types';
4
4
  export interface LineProps extends MarginProps {
5
5
  color?: keyof DefaultTheme['colors']['dividers'];
6
6
  height?: Property.Height;
7
+ /**
8
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
9
+ * sibling instances. When provided, the root receives
10
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
11
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
12
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
13
+ * are usually sufficient. See `helpers/data-component`.
14
+ */
15
+ testId?: string;
7
16
  }
@@ -10,6 +10,15 @@ export interface LinearProgressProps {
10
10
  progressStrokeColor?: Property.BackgroundColor;
11
11
  progressStrokeSize?: Property.Width;
12
12
  showText?: boolean;
13
+ /**
14
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
15
+ * sibling instances. When provided, the root receives
16
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
17
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
18
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
19
+ * are usually sufficient. See `helpers/data-component`.
20
+ */
21
+ testId?: string;
13
22
  textColor?: TypographyProps['color'];
14
23
  total: number;
15
24
  transition?: Property.Transition;
@@ -8,4 +8,12 @@ export interface MaxWidthProps {
8
8
  backgroundColor?: ResolutionAwareProp<Color>;
9
9
  borderBottom?: Divider;
10
10
  borderTop?: Divider;
11
+ /**
12
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
13
+ * sibling instances. When provided, the root receives
14
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
15
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
16
+ * attributes are usually sufficient. See `helpers/data-component`.
17
+ */
18
+ testId?: string;
11
19
  }
@@ -20,6 +20,13 @@ export type ModalSurface = 'solid' | 'dynamic';
20
20
  */
21
21
  export type ModalFooterLayout = 'auto' | 'fullWidth';
22
22
  export interface ModalProps {
23
+ /**
24
+ * Internal: lets compound components (e.g. `ConfirmationModal`) override
25
+ * the `data-component` value emitted on the modal root so end-to-end
26
+ * tests can target them by their wrapper name. Defaults to `'modal'`.
27
+ * Not part of the public API.
28
+ */
29
+ _dataComponentName?: string;
23
30
  bodyStyle?: CSSProperties;
24
31
  closeable?: boolean;
25
32
  /** Allows passing/overriding props on the inner-most content wrapper. */
@@ -59,6 +66,14 @@ export interface ModalProps {
59
66
  * On classic themes this falls back to the solid look.
60
67
  */
61
68
  surface?: ModalSurface;
69
+ /**
70
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
71
+ * sibling instances. When provided, the root receives
72
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
73
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
74
+ * attributes are usually sufficient. See `helpers/data-component`.
75
+ */
76
+ testId?: string;
62
77
  /** Ignored if `isFullScreen` is `true`. */
63
78
  top?: ResolutionAwareProp<Property.Top>;
64
79
  width?: ResolutionAwareProp<Property.Width>;
@@ -5,6 +5,15 @@ export interface MultiSelectListProps<Item extends Record<any, any>> extends Par
5
5
  /** Overrides the default item removal behavior. */
6
6
  onRemove?: (itemToRemove: Item) => void;
7
7
  setItems: (newItems: Item[]) => void;
8
+ /**
9
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
10
+ * sibling instances. When provided, the root receives
11
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
12
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
13
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
14
+ * are usually sufficient. See `helpers/data-component`.
15
+ */
16
+ testId?: string;
8
17
  }
9
18
  export interface MultiSelectListDefaultProps<Item extends Record<any, any>> {
10
19
  clearButtonText?: string;
@@ -69,6 +69,15 @@ interface OptionSelectorBaseProps {
69
69
  * always on and this prop is ignored. Defaults to true.
70
70
  */
71
71
  allowDeselect?: boolean;
72
+ /**
73
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
74
+ * sibling instances. When provided, the root receives
75
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
76
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
77
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
78
+ * are usually sufficient. See `helpers/data-component`.
79
+ */
80
+ testId?: string;
72
81
  }
73
82
  interface OptionSelectorSingleProps extends OptionSelectorBaseProps {
74
83
  /** Single-selection mode (default). */
@@ -30,6 +30,14 @@ export interface OverlayProps {
30
30
  prerenderContent?: boolean;
31
31
  renderInPortal?: boolean;
32
32
  showBackdropOnManualMode?: boolean;
33
+ /**
34
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
35
+ * sibling instances. When provided, the root receives
36
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
37
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
38
+ * attributes are usually sufficient. See `helpers/data-component`.
39
+ */
40
+ testId?: string;
33
41
  triggerEvent?: OverlayTriggerEvent;
34
42
  /** Overrides the default automatically calculated z-index. */
35
43
  zIndex?: number;
@@ -95,6 +95,14 @@ export interface PictureProps extends PicturePassThroughProps {
95
95
  onClick?: () => void;
96
96
  onLoad?: ReactEventHandler<HTMLImageElement>;
97
97
  onError?: ReactEventHandler<HTMLImageElement>;
98
+ /**
99
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
100
+ * sibling instances. When provided, the root receives
101
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
102
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
103
+ * attributes are usually sufficient. See `helpers/data-component`.
104
+ */
105
+ testId?: string;
98
106
  }
99
107
  export interface StyledPictureContainerProps {
100
108
  $aspectRatio?: PictureProps['aspectRatio'];
@@ -5,6 +5,15 @@ export interface PillProps<Value extends string | number> {
5
5
  icon?: JSX.Element;
6
6
  onSelected?: (value: Value) => void;
7
7
  selected?: boolean;
8
+ /**
9
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
10
+ * sibling instances. When provided, the root receives
11
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
12
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
13
+ * attributes (`data-component`, `data-tx`, `data-text`, etc.) are usually
14
+ * sufficient. See `helpers/data-component`.
15
+ */
16
+ testId?: string;
8
17
  text?: string;
9
18
  tx?: string;
10
19
  txValues?: Record<string, unknown>;
@@ -10,6 +10,15 @@ export interface PillsProps<Value extends string | number> extends Partial<Omit<
10
10
  onChange?: (event: PillsChangeEvent) => void;
11
11
  onFocus?: (event: FocusChangeEvent) => void;
12
12
  onSelect?: (value: Value) => void;
13
+ /**
14
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
15
+ * sibling instances. When provided, the root receives
16
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
17
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
18
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
19
+ * are usually sufficient. See `helpers/data-component`.
20
+ */
21
+ testId?: string;
13
22
  value?: Value;
14
23
  }
15
24
  export interface PillsChangeEvent<T = string | number> extends Pick<ChangeEvent<HTMLInputElement>, Exclude<keyof ChangeEvent<HTMLInputElement>, 'target'>> {
@@ -13,5 +13,14 @@ export interface QuantityProps {
13
13
  onDecrement?: (value: number) => void;
14
14
  onIncrement?: (value: number) => void;
15
15
  onValueChange?: (value: number) => void;
16
+ /**
17
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
18
+ * sibling instances. When provided, the root receives
19
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
20
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
21
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
22
+ * are usually sufficient. See `helpers/data-component`.
23
+ */
24
+ testId?: string;
16
25
  value: number;
17
26
  }
@@ -17,6 +17,15 @@ export interface RadioProps {
17
17
  onChange?: (event: any) => void;
18
18
  onSelected?: (value: any) => void;
19
19
  showAsTile?: boolean;
20
+ /**
21
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
22
+ * sibling instances. When provided, the root receives
23
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
24
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
25
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
26
+ * are usually sufficient. See `helpers/data-component`.
27
+ */
28
+ testId?: string;
20
29
  value?: any;
21
30
  variant?: RadioVariant;
22
31
  }
@@ -15,6 +15,15 @@ export interface RadioListProps<Value extends string> extends Partial<RadioListD
15
15
  items: (Value | RadioItem)[];
16
16
  onSelected: (value: Value) => void | Promise<void>;
17
17
  showAsTiles?: boolean;
18
+ /**
19
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
20
+ * sibling instances. When provided, the root receives
21
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
22
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
23
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
24
+ * are usually sufficient. See `helpers/data-component`.
25
+ */
26
+ testId?: string;
18
27
  value: Value;
19
28
  }
20
29
  export interface RadioListDefaultProps<Value extends string | Record<any, any>> {
@@ -10,6 +10,15 @@ export interface SliderProps {
10
10
  onValueChange?: (value: number) => void;
11
11
  step?: number;
12
12
  stepsVisible?: boolean;
13
+ /**
14
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
15
+ * sibling instances. When provided, the root receives
16
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
17
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
18
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
19
+ * are usually sufficient. See `helpers/data-component`.
20
+ */
21
+ testId?: string;
13
22
  value?: number;
14
23
  width?: Property.Width<string | number>;
15
24
  }
@@ -70,6 +70,14 @@ export interface TableProps<TData extends RowData> extends Partial<TableDefaultP
70
70
  search?: Omit<SearchProps, 'columns'>;
71
71
  sorting?: SortProps;
72
72
  syncState?: SyncState;
73
+ /**
74
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
75
+ * sibling instances. When provided, the root receives
76
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
77
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
78
+ * attributes are usually sufficient. See `helpers/data-component`.
79
+ */
80
+ testId?: string;
73
81
  }
74
82
  export interface TableDefaultProps {
75
83
  stickyFirstColumn: boolean;
@@ -1,3 +1,12 @@
1
1
  export interface TabsProps {
2
+ /**
3
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
4
+ * sibling instances. When provided, the root receives
5
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
6
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
7
+ * attributes (`data-component`, `data-value`, etc.) are usually sufficient.
8
+ * See `helpers/data-component`.
9
+ */
10
+ testId?: string;
2
11
  value: string | number;
3
12
  }
@@ -91,6 +91,15 @@ export interface TextFieldProps {
91
91
  * back to theme-based behavior.
92
92
  */
93
93
  surface?: TextFieldSurface;
94
+ /**
95
+ * Escape hatch for end-to-end tests when no other prop distinguishes two
96
+ * sibling instances. When provided, the root receives
97
+ * `data-testid={testId}` in addition to the auto-emitted `data-component`
98
+ * and projected `data-*` attributes. Rarely needed — the auto-emitted
99
+ * attributes (`data-component`, `data-name`, `data-tx`, `data-label`, etc.)
100
+ * are usually sufficient. See `helpers/data-component`.
101
+ */
102
+ testId?: string;
94
103
  throttle?: number;
95
104
  type?: HTMLInputTypeAttribute | undefined;
96
105
  value?: string;