gantri-components 2.269.0 → 2.269.2

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.
@@ -47,5 +47,6 @@ export interface CheckboxProps<T = boolean> {
47
47
  variant?: CheckboxVariant;
48
48
  }
49
49
  export interface LabelContentProps extends Pick<CheckboxProps, 'labelText' | 'labelTx' | 'labelTxComponents' | 'labelVariant' | 'labelColor' | 'Component' | 'labelHtmlText'> {
50
+ id?: string;
50
51
  isChecked: boolean;
51
52
  }
@@ -4,6 +4,12 @@ import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
4
4
  export type ColorPickerVariant = 'x-large' | 'large' | 'small';
5
5
  export type ColorPickerVariantProp = ResolutionAwareProp<ColorPickerVariant>;
6
6
  export interface ColorPickerProps extends Partial<ColorPickerDefaultProps> {
7
+ /**
8
+ * Accessible name for the swatch group, announced by screen readers. Used
9
+ * when `labelText` is not provided (e.g. the visible label lives elsewhere
10
+ * or comes from `labelTx`).
11
+ */
12
+ ariaLabel?: string;
7
13
  /**
8
14
  * When set, render swatches in a CSS grid with this many columns; each swatch
9
15
  * fills its column width. When omitted, swatches flow/wrap at their natural
@@ -11,8 +11,18 @@ export interface ColorPickerItemProps extends Partial<ColorPickerItemDefaultProp
11
11
  fillWidth?: boolean;
12
12
  onColorClick?: (color: ColorDetails) => void;
13
13
  readOnly?: boolean;
14
+ /**
15
+ * ARIA role of the swatch. `ColorPicker` uses `radio` for single selection
16
+ * and `checkbox` for multiple selection.
17
+ */
18
+ role?: 'checkbox' | 'radio';
14
19
  /** Overrides `variant`. */
15
20
  size?: CSSProperties['width'];
21
+ /**
22
+ * Keyboard tab order. Defaults to `0` when the swatch is clickable and `-1`
23
+ * otherwise. `ColorPicker` sets it to implement a roving tab stop.
24
+ */
25
+ tabIndex?: number;
16
26
  }
17
27
  export interface ColorPickerItemDefaultProps {
18
28
  variant: ColorPickerVariantProp;
@@ -16,3 +16,4 @@ export declare const StyledCustomPlaceholderContainer: import("styled-components
16
16
  export declare const StyledTextField: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../text-field").TextFieldProps, {
17
17
  $transparentInputText: boolean;
18
18
  }>> & string & Omit<import("react").FC<import("../text-field").TextFieldProps>, keyof import("react").Component<any, {}, any>>;
19
+ export declare const StyledVisuallyHidden: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
@@ -1,2 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  export declare const StyledContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const StyledQuantityButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
@@ -6,6 +6,11 @@ export interface QuantityChangeEvent extends Pick<ChangeEvent<HTMLInputElement>,
6
6
  };
7
7
  }
8
8
  export interface QuantityProps {
9
+ /**
10
+ * Name of the item being counted, used in the buttons' accessible names
11
+ * ("Decrease quantity of Gio Table Light").
12
+ */
13
+ itemName?: string;
9
14
  max?: number;
10
15
  min?: number;
11
16
  name?: string;
@@ -2,6 +2,8 @@ import { ReactElement } from 'react';
2
2
  import { TextVariant } from '../typography';
3
3
  export type RadioVariant = 'primary' | 'alert';
4
4
  export interface RadioProps {
5
+ /** Accessible name when the visible label is custom or absent. */
6
+ ariaLabel?: string;
5
7
  className?: string;
6
8
  disabled?: boolean;
7
9
  groupValue?: any;
@@ -125,5 +125,7 @@ export interface StyledParentContainerProps extends Pick<TextFieldProps, 'labelP
125
125
  }
126
126
  export interface ErrorMessageProps {
127
127
  errorMessage?: ErrorMessageType;
128
+ /** Referenced by the input's aria-describedby. */
129
+ id?: string;
128
130
  required?: boolean;
129
131
  }
@@ -1,6 +1,6 @@
1
1
  import { Property } from 'csstype';
2
2
  import { DefaultTheme } from 'styled-components';
3
- import { AriaAttributes, CSSProperties, ReactElement } from 'react';
3
+ import { AriaAttributes, AriaRole, CSSProperties, ReactElement } from 'react';
4
4
  import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
5
5
  import { ElementSpacingProps } from '../box/box.types';
6
6
  export type TypographyColor = keyof DefaultTheme['colors']['typography'];
@@ -18,6 +18,7 @@ export interface TypographyProps extends Partial<TypographyDefaultProps>, AriaAt
18
18
  htmlTag?: keyof HTMLElementTagNameMap;
19
19
  htmlText?: string;
20
20
  icon?: JSX.Element;
21
+ id?: string;
21
22
  /** Color for inner `<span>` and `<i>` elements when using `htmlText` */
22
23
  innerColor?: TypographyColor;
23
24
  justifySelf?: ResolutionAwareProp<Property.JustifySelf>;
@@ -26,6 +27,7 @@ export interface TypographyProps extends Partial<TypographyDefaultProps>, AriaAt
26
27
  maxWidth?: ResolutionAwareProp<string>;
27
28
  minWidth?: ResolutionAwareProp<string>;
28
29
  onClick?: (event: any) => void;
30
+ role?: AriaRole;
29
31
  style?: CSSProperties;
30
32
  /**
31
33
  * Escape hatch for end-to-end tests when no other prop distinguishes two