@ngrr/ds 0.1.20 → 0.1.21

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.
@@ -121,6 +121,11 @@ export interface ButtonProps {
121
121
  'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
122
122
  /** Additional CSS class names. */
123
123
  className?: string;
124
+ /**
125
+ * Overrides the default tab order. Use `-1` to remove the button from
126
+ * sequential keyboard navigation while keeping it accessible to AT browse mode.
127
+ */
128
+ tabIndex?: number;
124
129
  }
125
130
  /**
126
131
  * **Button** — triggers an action.
@@ -154,5 +159,5 @@ export interface ButtonProps {
154
159
  * <Button loading>Saving…</Button>
155
160
  * ```
156
161
  */
157
- export declare function Button({ variant, size, disabled, loading, destructive, showLeadingIcon, leadingIcon, showLabel, children, showTrailingIcon, trailingIcon, shortcut, shortcutLabel, shortcutAriaLabel, type, onClick, 'aria-label': ariaLabel, 'aria-haspopup': ariaHasPopup, className, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
162
+ export declare function Button({ variant, size, disabled, loading, destructive, showLeadingIcon, leadingIcon, showLabel, children, showTrailingIcon, trailingIcon, shortcut, shortcutLabel, shortcutAriaLabel, type, onClick, 'aria-label': ariaLabel, 'aria-haspopup': ariaHasPopup, className, tabIndex, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
158
163
  export default Button;
@@ -55,6 +55,13 @@ export interface ChipProps {
55
55
  * Calling `onDismiss` removes the chip value; it does NOT toggle selection.
56
56
  */
57
57
  onDismiss?: () => void;
58
+ /**
59
+ * Ref to focus when this chip is dismissed and there are no adjacent chips
60
+ * to move focus to — e.g. the search input in a combobox chip stack.
61
+ * When omitted, focus moves to the nearest sibling dismiss button if one
62
+ * exists; otherwise focus is left unmanaged.
63
+ */
64
+ dismissFocusFallback?: React.RefObject<HTMLElement | null>;
58
65
  /**
59
66
  * Click / keyboard handler invoked when the user toggles the chip.
60
67
  * The consumer is responsible for updating `selected` in response.
@@ -79,5 +86,5 @@ export interface ChipGroupProps {
79
86
  /** Additional CSS class names merged onto the group element. */
80
87
  className?: string;
81
88
  }
82
- export declare function Chip({ label, selected, disabled, size, leadingIcon, trailingIcon, showLeadingIcon, showTrailingIcon, onDismiss, onClick, className, 'aria-label': ariaLabel, }: ChipProps): import("react/jsx-runtime").JSX.Element;
89
+ export declare function Chip({ label, selected, disabled, size, leadingIcon, trailingIcon, showLeadingIcon, showTrailingIcon, onDismiss, onClick, className, 'aria-label': ariaLabel, dismissFocusFallback, }: ChipProps): import("react/jsx-runtime").JSX.Element;
83
90
  export declare function ChipGroup({ label, children, className }: ChipGroupProps): import("react/jsx-runtime").JSX.Element;
@@ -28,6 +28,9 @@ export interface DataTableHeaderCellProps {
28
28
  leadingAccessory?: React.ReactNode;
29
29
  className?: string;
30
30
  'aria-label'?: string;
31
+ /** When true, omits role="columnheader" and aria-sort from the root div.
32
+ * Use when the div is already inside a <th scope="col"> that carries those attributes. */
33
+ noRole?: boolean;
31
34
  }
32
- export declare function DataTableHeaderCell({ variant, state, label, width, sortable, sortDirection, reorderable, resizable, checkboxChecked, checkboxIndeterminate, onCheckboxChange, onSortChange, onResizeCommand, onResizePointerDown, onMoreClick, onReorderDragStart, onReorderDragEnd, filterValue: _filterValue, onFilterChange: _onFilterChange, leadingAccessory, className, 'aria-label': ariaLabel, }: DataTableHeaderCellProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function DataTableHeaderCell({ variant, state, label, width, sortable, sortDirection, reorderable, resizable, checkboxChecked, checkboxIndeterminate, onCheckboxChange, onSortChange, onResizeCommand, onResizePointerDown, onMoreClick, onReorderDragStart, onReorderDragEnd, filterValue: _filterValue, onFilterChange: _onFilterChange, leadingAccessory, className, 'aria-label': ariaLabel, noRole, }: DataTableHeaderCellProps): import("react/jsx-runtime").JSX.Element;
33
36
  export default DataTableHeaderCell;
@@ -41,6 +41,10 @@ export interface MenuCellProps {
41
41
  tabIndex?: number;
42
42
  className?: string;
43
43
  'aria-label'?: string;
44
+ /** Override the default "menuitem" role — pass "option" when MenuCell is used inside a listbox. */
45
+ role?: React.AriaRole;
46
+ /** Conveys selection state when role="option" (listbox pattern). */
47
+ 'aria-selected'?: boolean;
44
48
  }
45
49
  export declare const MenuCell: React.ForwardRefExoticComponent<MenuCellProps & React.RefAttributes<HTMLElement>>;
46
50
  export default MenuCell;
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  export type PopoverWrapperRole = 'menu' | 'dialog' | 'listbox' | 'group';
3
3
  export type PopoverWrapperContentPadding = 'none' | 'small';
4
4
  export interface PopoverWrapperProps {
5
+ id?: string;
5
6
  header?: React.ReactNode;
6
7
  segment?: React.ReactNode;
7
8
  search?: React.ReactNode;
@@ -19,5 +20,5 @@ export interface PopoverWrapperProps {
19
20
  minWidth?: number;
20
21
  'aria-label'?: string;
21
22
  }
22
- export declare function PopoverWrapper({ header, segment, search, content, bottomBar, role, width, contentPadding, className, contentClassName, anchorRef, offset, viewportMargin, matchAnchorWidth, minWidth, 'aria-label': ariaLabel, }: PopoverWrapperProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function PopoverWrapper({ id, header, segment, search, content, bottomBar, role, width, contentPadding, className, contentClassName, anchorRef, offset, viewportMargin, matchAnchorWidth, minWidth, 'aria-label': ariaLabel, }: PopoverWrapperProps): import("react/jsx-runtime").JSX.Element;
23
24
  export default PopoverWrapper;