@apolitical/component-library 5.0.1-jc.0 → 5.0.2-jc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type IAriaLive } from '../../types';
2
3
  interface Props {
3
4
  /** The ID of the element */
4
5
  id?: string;
@@ -25,7 +26,7 @@ interface Props {
25
26
  /** Additional aria props */
26
27
  'aria-expanded'?: boolean;
27
28
  'aria-controls'?: string;
28
- 'aria-live'?: 'off' | 'polite' | 'assertive';
29
+ 'aria-live'?: IAriaLive;
29
30
  }
30
31
  declare const _default: React.MemoExoticComponent<({ element, showOnFocus, children, className, ...props }: Props) => React.DetailedReactHTMLElement<{
31
32
  className: string;
@@ -47,6 +48,6 @@ declare const _default: React.MemoExoticComponent<({ element, showOnFocus, child
47
48
  /** Additional aria props */
48
49
  'aria-expanded'?: boolean | undefined;
49
50
  'aria-controls'?: string | undefined;
50
- 'aria-live'?: "off" | "polite" | "assertive" | undefined;
51
+ 'aria-live'?: IAriaLive | undefined;
51
52
  }, HTMLElement>>;
52
53
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "5.0.1-jc.0",
3
+ "version": "5.0.2-jc.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type IAriaLive } from '../../types';
2
3
  export type HelperTextBoxTypes = 'default' | 'warning' | 'error' | 'success';
3
4
  interface Props {
4
5
  /** The ID of the helper textbox */
@@ -11,8 +12,10 @@ interface Props {
11
12
  heading?: string | false;
12
13
  /** The content to display in the box */
13
14
  children: React.ReactNode | JSX.Element | string;
15
+ /** Optional tab index, to make it tabbable */
16
+ tabIndex?: number;
14
17
  /** Optional aria live, for screen readers */
15
- 'aria-live'?: 'polite' | 'assertive';
18
+ 'aria-live'?: IAriaLive;
16
19
  }
17
20
  declare const HelperTextBox: ({ type, className, heading, children, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
18
21
  export default HelperTextBox;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type IAriaLive } from '../../types';
2
3
  export interface IHighlightedTextBoxProps {
3
4
  /** The style of box being rendered */
4
5
  variant?: 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'subtle' | 'subtle-alt' | 'bold' | 'muted';
@@ -17,6 +18,8 @@ export interface IHighlightedTextBoxProps {
17
18
  children: React.ReactNode | JSX.Element;
18
19
  /** Additional props to pass to the box */
19
20
  style?: React.CSSProperties;
21
+ /** Optional aria live property, for screen readers */
22
+ 'aria-live'?: IAriaLive;
20
23
  }
21
24
  declare const HighlightedTextBoxWrapper: ({ variant, icon, styling, className, children, ...props }: IHighlightedTextBoxProps) => import("react/jsx-runtime").JSX.Element;
22
25
  export default HighlightedTextBoxWrapper;
package/types/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from './accessibility';
1
2
  export * from './reducer';
File without changes