@acusti/dropdown 1.0.0-alpha.3 → 1.0.0-alpha.5

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.
package/dist/helpers.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type SyntheticEvent } from 'react';
1
+ import { type ReactNode, type SyntheticEvent } from 'react';
2
2
  import { type Item } from './Dropdown.js';
3
3
  export declare const ITEM_SELECTOR = "[data-ukt-item], [data-ukt-value]";
4
4
  export declare const SUBMENU_SELECTOR = "[data-ukt-submenu]";
@@ -8,6 +8,7 @@ export declare const getLevelRoot: (element: HTMLElement) => MaybeHTMLElement;
8
8
  export declare const getSubmenuOfItem: (item: HTMLElement) => MaybeHTMLElement;
9
9
  export declare const getParentItem: (levelRoot: HTMLElement) => MaybeHTMLElement;
10
10
  export declare const getItemLabel: (item: HTMLElement) => string;
11
+ export declare const getLabelFromChildren: (children: ReactNode, value: string) => string | undefined;
11
12
  export declare const getItemPath: (element: MaybeHTMLElement) => Item['path'];
12
13
  export declare const getItemElements: (dropdownElement: MaybeHTMLElement, levelRoot?: MaybeHTMLElement) => Array<HTMLElement> | null;
13
14
  export declare const getItemForTarget: (dropdownElement: HTMLElement, target: HTMLElement) => MaybeHTMLElement;
@@ -16,13 +17,14 @@ export declare const getActiveItemElement: (dropdownElement: MaybeHTMLElement) =
16
17
  export declare const getDeepestExpandedItem: (dropdownElement: MaybeHTMLElement) => MaybeHTMLElement;
17
18
  export declare const isItemExpanded: (item: HTMLElement) => boolean;
18
19
  export declare const annotateParentItems: (bodyElement: MaybeHTMLElement) => void;
20
+ export declare const annotateItemRoles: (bodyElement: MaybeHTMLElement, popupRole: 'listbox' | 'menu') => void;
19
21
  export declare const expandItem: (item: HTMLElement, onToggleSubmenu?: OnToggleSubmenu) => void;
20
22
  export declare const collapseItem: (item: HTMLElement, onToggleSubmenu?: OnToggleSubmenu) => void;
21
23
  export declare const collapseItemsOutsidePath: (dropdownElement: MaybeHTMLElement, element: MaybeHTMLElement, onToggleSubmenu?: OnToggleSubmenu) => void;
22
24
  type BaseSetActiveItemPayload = {
23
25
  dropdownElement: HTMLElement;
24
26
  element?: null;
25
- event: Event | SyntheticEvent<HTMLElement>;
27
+ event?: Event | SyntheticEvent<HTMLElement>;
26
28
  index?: null;
27
29
  indexAddend?: null;
28
30
  isExactMatch?: null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acusti/dropdown",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.5",
4
4
  "description": "React component that renders a dropdown with a trigger and supports searching, keyboard access, and more",
5
5
  "keywords": [
6
6
  "a11y",