@kenlo/kdls-design-system 2.30.2 → 2.31.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.
@@ -7,18 +7,27 @@ export interface HeaderNavItem {
7
7
  label: string;
8
8
  href?: string;
9
9
  isNew?: boolean;
10
+ /** `keywords`: other words the dropdown search finds this child by (e.g. Portuguese names
11
+ * of an English label). Only read when the item is `searchable`; never drawn. */
10
12
  children?: {
11
13
  label: string;
12
14
  href?: string;
13
15
  onClick?: () => void;
16
+ keywords?: string[];
14
17
  }[];
15
- /** Adds a search field to this item's dropdown and filters its children by it.
18
+ /** Adds a search field to this item's dropdown and filters its children by it, ignoring
19
+ * accents, case and spaces, by label and keywords.
16
20
  * Use when the list is long enough that scanning it beats reading it. */
17
21
  searchable?: boolean;
18
22
  /** Floating label of that search field. Default: 'Buscar' */
19
23
  searchLabel?: string;
20
24
  onClick?: () => void;
21
25
  }
26
+ /** True when the query is part of the label or of one of the keywords. */
27
+ export declare function navChildMatches(child: {
28
+ label: string;
29
+ keywords?: string[];
30
+ }, query: string): boolean;
22
31
  export interface HeaderNotification {
23
32
  id: string;
24
33
  title: string;