@carbon/react 1.76.0 → 1.77.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.
Files changed (188) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +810 -775
  2. package/es/components/Button/Button.d.ts +9 -1
  3. package/es/components/Button/Button.js +8 -0
  4. package/es/components/CodeSnippet/CodeSnippet.d.ts +2 -2
  5. package/es/components/ComboBox/ComboBox.d.ts +2 -2
  6. package/es/components/ComboBox/ComboBox.js +34 -12
  7. package/es/components/ComboButton/index.js +1 -2
  8. package/es/components/ComposedModal/ComposedModal.js +1 -1
  9. package/es/components/ContentSwitcher/index.d.ts +0 -1
  10. package/es/components/ContextMenu/useContextMenu.d.ts +0 -1
  11. package/es/components/Copy/Copy.js +1 -1
  12. package/es/components/DataTable/DataTable.d.ts +12 -20
  13. package/es/components/DataTable/DataTable.js +1 -9
  14. package/es/components/DataTable/Table.js +1 -1
  15. package/es/components/DataTable/TableActionList.d.ts +1 -1
  16. package/es/components/DataTable/TableBody.js +1 -1
  17. package/es/components/DataTable/TableContext.d.ts +0 -1
  18. package/es/components/DataTable/TableHead.d.ts +1 -1
  19. package/es/components/DataTable/TableToolbarContent.d.ts +1 -1
  20. package/es/components/DatePicker/plugins/fixEventsPlugin.js +2 -2
  21. package/es/components/DatePickerInput/DatePickerInput.js +1 -1
  22. package/es/components/Dropdown/Dropdown.js +1 -2
  23. package/es/components/FluidForm/FormContext.d.ts +0 -1
  24. package/es/components/Grid/CSSGrid.js +1 -1
  25. package/es/components/Grid/Grid.js +1 -1
  26. package/es/components/Grid/GridTypes.d.ts +0 -1
  27. package/es/components/Heading/index.d.ts +1 -1
  28. package/es/components/IconButton/index.d.ts +17 -1
  29. package/es/components/IconButton/index.js +20 -1
  30. package/es/components/InlineCheckbox/InlineCheckbox.js +1 -1
  31. package/es/components/InlineLoading/InlineLoading.d.ts +1 -1
  32. package/es/components/InlineLoading/InlineLoading.js +21 -7
  33. package/es/components/Menu/Menu.js +2 -2
  34. package/es/components/Menu/MenuContext.d.ts +1 -1
  35. package/es/components/MenuButton/index.d.ts +1 -1
  36. package/es/components/MenuButton/index.js +1 -2
  37. package/es/components/Modal/Modal.js +1 -1
  38. package/es/components/Modal/next/index.d.ts +175 -0
  39. package/es/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
  40. package/es/components/MultiSelect/FilterableMultiSelect.js +12 -5
  41. package/es/components/MultiSelect/MultiSelect.d.ts +1 -1
  42. package/es/components/MultiSelect/MultiSelect.js +1 -2
  43. package/es/components/Pagination/Pagination.js +2 -2
  44. package/es/components/Popover/index.js +2 -3
  45. package/es/components/PrimaryButton/PrimaryButton.d.ts +1 -1
  46. package/es/components/RadioTile/RadioTile.d.ts +1 -1
  47. package/es/components/SecondaryButton/SecondaryButton.d.ts +1 -1
  48. package/es/components/Slider/Slider.d.ts +1 -1
  49. package/es/components/Slider/Slider.js +1 -1
  50. package/es/components/Slider/index.d.ts +0 -1
  51. package/es/components/Tabs/Tabs.d.ts +3 -3
  52. package/es/components/Tabs/Tabs.js +4 -4
  53. package/es/components/Tag/DismissibleTag.d.ts +2 -2
  54. package/es/components/Tag/OperationalTag.d.ts +1 -1
  55. package/es/components/Tag/SelectableTag.d.ts +2 -2
  56. package/es/components/Text/index.d.ts +2 -2
  57. package/es/components/TextInput/PasswordInput.d.ts +1 -1
  58. package/es/components/Theme/index.d.ts +1 -1
  59. package/es/components/Tile/Tile.d.ts +1 -1
  60. package/es/components/Tile/Tile.js +1 -1
  61. package/es/components/Toggletip/index.d.ts +3 -3
  62. package/es/components/Toggletip/index.js +5 -4
  63. package/es/components/Tooltip/Tooltip.d.ts +17 -1
  64. package/es/components/Tooltip/Tooltip.js +12 -2
  65. package/es/components/TreeView/TreeNode.d.ts +27 -19
  66. package/es/components/TreeView/TreeNode.js +100 -31
  67. package/es/components/TreeView/TreeView.js +1 -1
  68. package/es/components/UIShell/Content.d.ts +9 -9
  69. package/es/components/UIShell/HeaderGlobalBar.d.ts +1 -1
  70. package/es/components/UIShell/HeaderMenu.d.ts +69 -25
  71. package/es/components/UIShell/HeaderMenuButton.d.ts +69 -27
  72. package/es/components/UIShell/HeaderMenuItem.d.ts +4 -3
  73. package/es/components/UIShell/HeaderMenuItem.js +1 -1
  74. package/es/components/UIShell/HeaderName.js +1 -1
  75. package/es/components/UIShell/HeaderNavigation.d.ts +69 -25
  76. package/es/components/UIShell/Link.d.ts +14 -11
  77. package/es/components/UIShell/Link.js +5 -6
  78. package/es/components/UIShell/SideNav.js +3 -3
  79. package/es/components/UIShell/SideNavLink.js +1 -1
  80. package/es/components/UIShell/SideNavMenuItem.d.ts +51 -3
  81. package/es/components/UIShell/SideNavMenuItem.js +6 -6
  82. package/es/components/UIShell/SwitcherItem.d.ts +2 -2
  83. package/es/components/UIShell/SwitcherItem.js +1 -1
  84. package/es/internal/PolymorphicProps.d.ts +0 -1
  85. package/es/internal/Selection.d.ts +38 -0
  86. package/es/internal/Selection.js +26 -113
  87. package/es/node_modules/es-toolkit/dist/compat/function/debounce.mjs.js +55 -0
  88. package/es/node_modules/es-toolkit/dist/compat/function/throttle.mjs.js +23 -0
  89. package/es/node_modules/es-toolkit/dist/function/debounce.mjs.js +70 -0
  90. package/es/tools/wrapComponent.d.ts +1 -1
  91. package/lib/components/Button/Button.d.ts +9 -1
  92. package/lib/components/Button/Button.js +8 -0
  93. package/lib/components/CodeSnippet/CodeSnippet.d.ts +2 -2
  94. package/lib/components/ComboBox/ComboBox.d.ts +2 -2
  95. package/lib/components/ComboBox/ComboBox.js +34 -12
  96. package/lib/components/ComboButton/index.js +1 -2
  97. package/lib/components/ComposedModal/ComposedModal.js +2 -2
  98. package/lib/components/ContentSwitcher/index.d.ts +0 -1
  99. package/lib/components/ContextMenu/useContextMenu.d.ts +0 -1
  100. package/lib/components/Copy/Copy.js +2 -2
  101. package/lib/components/DataTable/DataTable.d.ts +12 -20
  102. package/lib/components/DataTable/DataTable.js +1 -9
  103. package/lib/components/DataTable/Table.js +3 -3
  104. package/lib/components/DataTable/TableActionList.d.ts +1 -1
  105. package/lib/components/DataTable/TableBody.js +1 -1
  106. package/lib/components/DataTable/TableContext.d.ts +0 -1
  107. package/lib/components/DataTable/TableHead.d.ts +1 -1
  108. package/lib/components/DataTable/TableToolbarContent.d.ts +1 -1
  109. package/lib/components/DatePicker/plugins/fixEventsPlugin.js +2 -2
  110. package/lib/components/DatePickerInput/DatePickerInput.js +1 -1
  111. package/lib/components/Dropdown/Dropdown.js +1 -2
  112. package/lib/components/FluidForm/FormContext.d.ts +0 -1
  113. package/lib/components/Grid/CSSGrid.js +1 -1
  114. package/lib/components/Grid/Grid.js +1 -1
  115. package/lib/components/Grid/GridTypes.d.ts +0 -1
  116. package/lib/components/Heading/index.d.ts +1 -1
  117. package/lib/components/IconButton/index.d.ts +17 -1
  118. package/lib/components/IconButton/index.js +20 -1
  119. package/lib/components/InlineCheckbox/InlineCheckbox.js +1 -1
  120. package/lib/components/InlineLoading/InlineLoading.d.ts +1 -1
  121. package/lib/components/InlineLoading/InlineLoading.js +20 -6
  122. package/lib/components/Menu/Menu.js +2 -2
  123. package/lib/components/Menu/MenuContext.d.ts +1 -1
  124. package/lib/components/MenuButton/index.d.ts +1 -1
  125. package/lib/components/MenuButton/index.js +1 -2
  126. package/lib/components/Modal/Modal.js +2 -2
  127. package/lib/components/Modal/next/index.d.ts +175 -0
  128. package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
  129. package/lib/components/MultiSelect/FilterableMultiSelect.js +11 -4
  130. package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
  131. package/lib/components/MultiSelect/MultiSelect.js +1 -2
  132. package/lib/components/Pagination/Pagination.js +3 -2
  133. package/lib/components/Popover/index.js +2 -3
  134. package/lib/components/PrimaryButton/PrimaryButton.d.ts +1 -1
  135. package/lib/components/RadioTile/RadioTile.d.ts +1 -1
  136. package/lib/components/SecondaryButton/SecondaryButton.d.ts +1 -1
  137. package/lib/components/Slider/Slider.d.ts +1 -1
  138. package/lib/components/Slider/Slider.js +2 -2
  139. package/lib/components/Slider/index.d.ts +0 -1
  140. package/lib/components/Tabs/Tabs.d.ts +3 -3
  141. package/lib/components/Tabs/Tabs.js +6 -6
  142. package/lib/components/Tag/DismissibleTag.d.ts +2 -2
  143. package/lib/components/Tag/OperationalTag.d.ts +1 -1
  144. package/lib/components/Tag/SelectableTag.d.ts +2 -2
  145. package/lib/components/Text/index.d.ts +2 -2
  146. package/lib/components/TextInput/PasswordInput.d.ts +1 -1
  147. package/lib/components/Theme/index.d.ts +1 -1
  148. package/lib/components/Tile/Tile.d.ts +1 -1
  149. package/lib/components/Tile/Tile.js +1 -1
  150. package/lib/components/Toggletip/index.d.ts +3 -3
  151. package/lib/components/Toggletip/index.js +5 -4
  152. package/lib/components/Tooltip/Tooltip.d.ts +17 -1
  153. package/lib/components/Tooltip/Tooltip.js +12 -2
  154. package/lib/components/TreeView/TreeNode.d.ts +27 -19
  155. package/lib/components/TreeView/TreeNode.js +100 -31
  156. package/lib/components/TreeView/TreeView.js +1 -1
  157. package/lib/components/UIShell/Content.d.ts +9 -9
  158. package/lib/components/UIShell/HeaderGlobalBar.d.ts +1 -1
  159. package/lib/components/UIShell/HeaderMenu.d.ts +69 -25
  160. package/lib/components/UIShell/HeaderMenuButton.d.ts +69 -27
  161. package/lib/components/UIShell/HeaderMenuItem.d.ts +4 -3
  162. package/lib/components/UIShell/HeaderMenuItem.js +1 -1
  163. package/lib/components/UIShell/HeaderName.js +1 -1
  164. package/lib/components/UIShell/HeaderNavigation.d.ts +69 -25
  165. package/lib/components/UIShell/Link.d.ts +14 -11
  166. package/lib/components/UIShell/Link.js +4 -4
  167. package/lib/components/UIShell/SideNav.js +3 -3
  168. package/lib/components/UIShell/SideNavLink.js +1 -1
  169. package/lib/components/UIShell/SideNavMenuItem.d.ts +51 -3
  170. package/lib/components/UIShell/SideNavMenuItem.js +6 -6
  171. package/lib/components/UIShell/SwitcherItem.d.ts +2 -2
  172. package/lib/components/UIShell/SwitcherItem.js +1 -1
  173. package/lib/internal/PolymorphicProps.d.ts +0 -1
  174. package/lib/internal/Selection.d.ts +38 -0
  175. package/lib/internal/Selection.js +24 -114
  176. package/lib/node_modules/es-toolkit/dist/compat/function/debounce.mjs.js +59 -0
  177. package/lib/node_modules/es-toolkit/dist/compat/function/throttle.mjs.js +27 -0
  178. package/lib/node_modules/es-toolkit/dist/function/debounce.mjs.js +74 -0
  179. package/lib/tools/wrapComponent.d.ts +1 -1
  180. package/package.json +10 -9
  181. package/es/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +0 -896
  182. package/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +0 -76
  183. package/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +0 -139
  184. package/es/tools/array.js +0 -29
  185. package/lib/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +0 -909
  186. package/lib/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +0 -80
  187. package/lib/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +0 -163
  188. package/lib/tools/array.js +0 -33
@@ -121,54 +121,98 @@ declare class HeaderMenu extends React.Component<HeaderMenuProps, HeaderMenuStat
121
121
  length: 1;
122
122
  toString(): string;
123
123
  toLocaleString(): string;
124
+ toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
124
125
  pop(): string | undefined;
125
126
  push(...items: string[]): number;
126
127
  concat(...items: ConcatArray<string>[]): string[];
127
128
  concat(...items: (string | ConcatArray<string>)[]): string[];
128
- join(separator?: string | undefined): string;
129
+ join(separator?: string): string;
129
130
  reverse(): string[];
130
131
  shift(): string | undefined;
131
- slice(start?: number | undefined, end?: number | undefined): string[];
132
+ slice(start?: number, end?: number): string[];
132
133
  sort(compareFn?: ((a: string, b: string) => number) | undefined): [key: string];
133
- splice(start: number, deleteCount?: number | undefined): string[];
134
+ splice(start: number, deleteCount?: number): string[];
134
135
  splice(start: number, deleteCount: number, ...items: string[]): string[];
135
136
  unshift(...items: string[]): number;
136
- indexOf(searchElement: string, fromIndex?: number | undefined): number;
137
- lastIndexOf(searchElement: string, fromIndex?: number | undefined): number;
137
+ indexOf(searchElement: string, fromIndex?: number): number;
138
+ lastIndexOf(searchElement: string, fromIndex?: number): number;
138
139
  every<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[];
139
140
  every(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
140
141
  some(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
141
142
  forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
142
143
  map<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[];
143
- filter<S_1 extends string>(predicate: (value: string, index: number, array: string[]) => value is S_1, thisArg?: any): S_1[];
144
+ filter<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[];
144
145
  filter(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
145
146
  reduce(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
146
147
  reduce(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
147
- reduce<U_1>(callbackfn: (previousValue: U_1, currentValue: string, currentIndex: number, array: string[]) => U_1, initialValue: U_1): U_1;
148
+ reduce<U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U;
148
149
  reduceRight(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
149
150
  reduceRight(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
150
- reduceRight<U_2>(callbackfn: (previousValue: U_2, currentValue: string, currentIndex: number, array: string[]) => U_2, initialValue: U_2): U_2;
151
- find<S_2 extends string>(predicate: (this: void, value: string, index: number, obj: string[]) => value is S_2, thisArg?: any): S_2 | undefined;
151
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U;
152
+ find<S extends string>(predicate: (value: string, index: number, obj: string[]) => value is S, thisArg?: any): S | undefined;
152
153
  find(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
153
154
  findIndex(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): number;
154
- fill(value: string, start?: number | undefined, end?: number | undefined): [key: string];
155
- copyWithin(target: number, start: number, end?: number | undefined): [key: string];
156
- entries(): IterableIterator<[number, string]>;
157
- keys(): IterableIterator<number>;
158
- values(): IterableIterator<string>;
159
- includes(searchElement: string, fromIndex?: number | undefined): boolean;
160
- flatMap<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[];
155
+ fill(value: string, start?: number, end?: number): [key: string];
156
+ copyWithin(target: number, start: number, end?: number): [key: string];
157
+ entries(): ArrayIterator<[number, string]>;
158
+ keys(): ArrayIterator<number>;
159
+ values(): ArrayIterator<string>;
160
+ includes(searchElement: string, fromIndex?: number): boolean;
161
+ flatMap<U, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U | readonly U[], thisArg?: This | undefined): U[];
161
162
  flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
162
163
  at(index: number): string | undefined;
163
- [Symbol.iterator](): IterableIterator<string>;
164
- [Symbol.unscopables](): {
165
- copyWithin: boolean;
166
- entries: boolean;
167
- fill: boolean;
168
- find: boolean;
169
- findIndex: boolean;
170
- keys: boolean;
171
- values: boolean;
164
+ findLast<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S | undefined;
165
+ findLast(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string | undefined;
166
+ findLastIndex(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): number;
167
+ toReversed(): string[];
168
+ toSorted(compareFn?: ((a: string, b: string) => number) | undefined): string[];
169
+ toSpliced(start: number, deleteCount: number, ...items: string[]): string[];
170
+ toSpliced(start: number, deleteCount?: number): string[];
171
+ with(index: number, value: string): string[];
172
+ [Symbol.iterator](): ArrayIterator<string>;
173
+ [Symbol.unscopables]: {
174
+ [x: number]: boolean | undefined;
175
+ length?: boolean | undefined;
176
+ toString?: boolean | undefined;
177
+ toLocaleString?: boolean | undefined;
178
+ pop?: boolean | undefined;
179
+ push?: boolean | undefined;
180
+ concat?: boolean | undefined;
181
+ join?: boolean | undefined;
182
+ reverse?: boolean | undefined;
183
+ shift?: boolean | undefined;
184
+ slice?: boolean | undefined;
185
+ sort?: boolean | undefined;
186
+ splice?: boolean | undefined;
187
+ unshift?: boolean | undefined;
188
+ indexOf?: boolean | undefined;
189
+ lastIndexOf?: boolean | undefined;
190
+ every?: boolean | undefined;
191
+ some?: boolean | undefined;
192
+ forEach?: boolean | undefined;
193
+ map?: boolean | undefined;
194
+ filter?: boolean | undefined;
195
+ reduce?: boolean | undefined;
196
+ reduceRight?: boolean | undefined;
197
+ find?: boolean | undefined;
198
+ findIndex?: boolean | undefined;
199
+ fill?: boolean | undefined;
200
+ copyWithin?: boolean | undefined;
201
+ entries?: boolean | undefined;
202
+ keys?: boolean | undefined;
203
+ values?: boolean | undefined;
204
+ includes?: boolean | undefined;
205
+ flatMap?: boolean | undefined;
206
+ flat?: boolean | undefined;
207
+ at?: boolean | undefined;
208
+ findLast?: boolean | undefined;
209
+ findLastIndex?: boolean | undefined;
210
+ toReversed?: boolean | undefined;
211
+ toSorted?: boolean | undefined;
212
+ toSpliced?: boolean | undefined;
213
+ with?: boolean | undefined;
214
+ [Symbol.iterator]?: boolean | undefined;
215
+ readonly [Symbol.unscopables]?: boolean | undefined;
172
216
  };
173
217
  };
174
218
  static contextType: React.Context<string>;
@@ -41,56 +41,98 @@ declare namespace HeaderMenuButton {
41
41
  length: 1;
42
42
  toString(): string;
43
43
  toLocaleString(): string;
44
+ toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
44
45
  pop(): string | undefined;
45
46
  push(...items: string[]): number;
46
47
  concat(...items: ConcatArray<string>[]): string[];
47
48
  concat(...items: (string | ConcatArray<string>)[]): string[];
48
- join(separator?: string | undefined): string;
49
+ join(separator?: string): string;
49
50
  reverse(): string[];
50
51
  shift(): string | undefined;
51
- slice(start?: number | undefined, end?: number | undefined): string[];
52
+ slice(start?: number, end?: number): string[];
52
53
  sort(compareFn?: ((a: string, b: string) => number) | undefined): [key: string];
53
- splice(start: number, deleteCount?: number | undefined): string[];
54
+ splice(start: number, deleteCount?: number): string[];
54
55
  splice(start: number, deleteCount: number, ...items: string[]): string[];
55
56
  unshift(...items: string[]): number;
56
- indexOf(searchElement: string, fromIndex?: number | undefined): number;
57
- lastIndexOf(searchElement: string, fromIndex?: number | undefined): number;
57
+ indexOf(searchElement: string, fromIndex?: number): number;
58
+ lastIndexOf(searchElement: string, fromIndex?: number): number;
58
59
  every<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[];
59
60
  every(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
60
61
  some(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
61
62
  forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
62
63
  map<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[];
63
- filter<S_1 extends string>(predicate: (value: string, index: number, array: string[]) => value is S_1, thisArg?: any): S_1[];
64
+ filter<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[];
64
65
  filter(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
65
66
  reduce(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
66
67
  reduce(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
67
- reduce<U_1>(callbackfn: (previousValue: U_1, currentValue: string, currentIndex: number, array: string[]) => U_1, initialValue: U_1): U_1;
68
+ reduce<U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U;
68
69
  reduceRight(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
69
70
  reduceRight(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
70
- reduceRight<U_2>(callbackfn: (previousValue: U_2, currentValue: string, currentIndex: number, array: string[]) => U_2, initialValue: U_2): U_2;
71
- find<S_2 extends string>(predicate: (this: void, value: string, index: number, obj: string[]) => value is S_2, thisArg?: any): S_2 | undefined;
71
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U;
72
+ find<S extends string>(predicate: (value: string, index: number, obj: string[]) => value is S, thisArg?: any): S | undefined;
72
73
  find(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
73
74
  findIndex(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): number;
74
- fill(value: string, start?: number | undefined, end?: number | undefined): [key: string];
75
- copyWithin(target: number, start: number, end?: number | undefined): [key: string];
76
- entries(): IterableIterator<[number, string]>;
77
- keys(): IterableIterator<number>; /**
78
- * Specify whether the menu button is collapsible.
79
- */
80
- values(): IterableIterator<string>;
81
- includes(searchElement: string, fromIndex?: number | undefined): boolean;
82
- flatMap<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[];
75
+ fill(value: string, start?: number, end?: number): [key: string];
76
+ copyWithin(target: number, start: number, end?: number): [key: string];
77
+ entries(): ArrayIterator<[number, string]>;
78
+ keys(): ArrayIterator<number>;
79
+ values(): ArrayIterator<string>;
80
+ includes(searchElement: string, fromIndex?: number): boolean;
81
+ flatMap<U, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U | readonly U[], thisArg?: This | undefined): U[];
83
82
  flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
84
83
  at(index: number): string | undefined;
85
- [Symbol.iterator](): IterableIterator<string>;
86
- [Symbol.unscopables](): {
87
- copyWithin: boolean;
88
- entries: boolean;
89
- fill: boolean;
90
- find: boolean;
91
- findIndex: boolean;
92
- keys: boolean;
93
- values: boolean;
84
+ findLast<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S | undefined;
85
+ findLast(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string | undefined;
86
+ findLastIndex(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): number;
87
+ toReversed(): string[];
88
+ toSorted(compareFn?: ((a: string, b: string) => number) | undefined): string[];
89
+ toSpliced(start: number, deleteCount: number, ...items: string[]): string[];
90
+ toSpliced(start: number, deleteCount?: number): string[];
91
+ with(index: number, value: string): string[];
92
+ [Symbol.iterator](): ArrayIterator<string>;
93
+ [Symbol.unscopables]: {
94
+ [x: number]: boolean | undefined;
95
+ length?: boolean | undefined;
96
+ toString?: boolean | undefined;
97
+ toLocaleString?: boolean | undefined;
98
+ pop?: boolean | undefined;
99
+ push?: boolean | undefined;
100
+ concat?: boolean | undefined;
101
+ join?: boolean | undefined;
102
+ reverse?: boolean | undefined;
103
+ shift?: boolean | undefined;
104
+ slice?: boolean | undefined;
105
+ sort?: boolean | undefined;
106
+ splice?: boolean | undefined;
107
+ unshift?: boolean | undefined;
108
+ indexOf?: boolean | undefined;
109
+ lastIndexOf?: boolean | undefined;
110
+ every?: boolean | undefined;
111
+ some?: boolean | undefined;
112
+ forEach?: boolean | undefined;
113
+ map?: boolean | undefined;
114
+ filter?: boolean | undefined;
115
+ reduce?: boolean | undefined;
116
+ reduceRight?: boolean | undefined;
117
+ find?: boolean | undefined;
118
+ findIndex?: boolean | undefined;
119
+ fill?: boolean | undefined;
120
+ copyWithin?: boolean | undefined;
121
+ entries?: boolean | undefined;
122
+ keys?: boolean | undefined;
123
+ values?: boolean | undefined;
124
+ includes?: boolean | undefined;
125
+ flatMap?: boolean | undefined;
126
+ flat?: boolean | undefined;
127
+ at?: boolean | undefined;
128
+ findLast?: boolean | undefined;
129
+ findLastIndex?: boolean | undefined;
130
+ toReversed?: boolean | undefined;
131
+ toSorted?: boolean | undefined;
132
+ toSpliced?: boolean | undefined;
133
+ with?: boolean | undefined;
134
+ [Symbol.iterator]?: boolean | undefined;
135
+ readonly [Symbol.unscopables]?: boolean | undefined;
94
136
  };
95
137
  };
96
138
  }
@@ -5,8 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { type ComponentProps, type ForwardedRef, type ReactNode, ElementType, WeakValidationMap } from 'react';
8
- import { LinkProps } from './Link';
9
- export type HeaderMenuItemProps<E extends ElementType> = LinkProps<E> & {
8
+ import { PolymorphicComponentPropWithRef } from '../../internal/PolymorphicProps';
9
+ export interface HeaderMenuItemBaseProps {
10
10
  className?: string | undefined;
11
11
  isActive?: boolean | undefined;
12
12
  isCurrentPage?: boolean | undefined;
@@ -14,7 +14,8 @@ export type HeaderMenuItemProps<E extends ElementType> = LinkProps<E> & {
14
14
  children: ReactNode;
15
15
  role?: ComponentProps<'li'>['role'];
16
16
  tabIndex?: number | undefined;
17
- };
17
+ }
18
+ export type HeaderMenuItemProps<E extends ElementType = 'a'> = PolymorphicComponentPropWithRef<E, HeaderMenuItemBaseProps>;
18
19
  export interface HeaderMenuItemComponent {
19
20
  <E extends ElementType = 'a'>(props: HeaderMenuItemProps<E> & {
20
21
  ref?: ForwardedRef<ElementType>;
@@ -9,7 +9,7 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
9
9
  import PropTypes from 'prop-types';
10
10
  import React__default, { forwardRef } from 'react';
11
11
  import cx from 'classnames';
12
- import Link, { LinkPropTypes } from './Link.js';
12
+ import { LinkPropTypes, Link } from './Link.js';
13
13
  import { usePrefix } from '../../internal/usePrefix.js';
14
14
  import deprecate from '../../prop-types/deprecate.js';
15
15
 
@@ -9,7 +9,7 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
9
9
  import cx from 'classnames';
10
10
  import React__default from 'react';
11
11
  import PropTypes from 'prop-types';
12
- import Link, { LinkPropTypes } from './Link.js';
12
+ import { LinkPropTypes, Link } from './Link.js';
13
13
  import { usePrefix } from '../../internal/usePrefix.js';
14
14
 
15
15
  function HeaderName(_ref) {
@@ -23,54 +23,98 @@ declare namespace HeaderNavigation {
23
23
  length: 1;
24
24
  toString(): string;
25
25
  toLocaleString(): string;
26
+ toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
26
27
  pop(): string | undefined;
27
28
  push(...items: string[]): number;
28
29
  concat(...items: ConcatArray<string>[]): string[];
29
30
  concat(...items: (string | ConcatArray<string>)[]): string[];
30
- join(separator?: string | undefined): string;
31
+ join(separator?: string): string;
31
32
  reverse(): string[];
32
33
  shift(): string | undefined;
33
- slice(start?: number | undefined, end?: number | undefined): string[];
34
+ slice(start?: number, end?: number): string[];
34
35
  sort(compareFn?: ((a: string, b: string) => number) | undefined): [key: string];
35
- splice(start: number, deleteCount?: number | undefined): string[];
36
+ splice(start: number, deleteCount?: number): string[];
36
37
  splice(start: number, deleteCount: number, ...items: string[]): string[];
37
38
  unshift(...items: string[]): number;
38
- indexOf(searchElement: string, fromIndex?: number | undefined): number;
39
- lastIndexOf(searchElement: string, fromIndex?: number | undefined): number;
39
+ indexOf(searchElement: string, fromIndex?: number): number;
40
+ lastIndexOf(searchElement: string, fromIndex?: number): number;
40
41
  every<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[];
41
42
  every(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
42
43
  some(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
43
44
  forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
44
45
  map<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[];
45
- filter<S_1 extends string>(predicate: (value: string, index: number, array: string[]) => value is S_1, thisArg?: any): S_1[];
46
+ filter<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[];
46
47
  filter(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
47
48
  reduce(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
48
49
  reduce(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
49
- reduce<U_1>(callbackfn: (previousValue: U_1, currentValue: string, currentIndex: number, array: string[]) => U_1, initialValue: U_1): U_1;
50
+ reduce<U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U;
50
51
  reduceRight(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
51
52
  reduceRight(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
52
- reduceRight<U_2>(callbackfn: (previousValue: U_2, currentValue: string, currentIndex: number, array: string[]) => U_2, initialValue: U_2): U_2;
53
- find<S_2 extends string>(predicate: (this: void, value: string, index: number, obj: string[]) => value is S_2, thisArg?: any): S_2 | undefined;
53
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U;
54
+ find<S extends string>(predicate: (value: string, index: number, obj: string[]) => value is S, thisArg?: any): S | undefined;
54
55
  find(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
55
56
  findIndex(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): number;
56
- fill(value: string, start?: number | undefined, end?: number | undefined): [key: string];
57
- copyWithin(target: number, start: number, end?: number | undefined): [key: string];
58
- entries(): IterableIterator<[number, string]>;
59
- keys(): IterableIterator<number>;
60
- values(): IterableIterator<string>;
61
- includes(searchElement: string, fromIndex?: number | undefined): boolean;
62
- flatMap<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[];
57
+ fill(value: string, start?: number, end?: number): [key: string];
58
+ copyWithin(target: number, start: number, end?: number): [key: string];
59
+ entries(): ArrayIterator<[number, string]>;
60
+ keys(): ArrayIterator<number>;
61
+ values(): ArrayIterator<string>;
62
+ includes(searchElement: string, fromIndex?: number): boolean;
63
+ flatMap<U, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U | readonly U[], thisArg?: This | undefined): U[];
63
64
  flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
64
65
  at(index: number): string | undefined;
65
- [Symbol.iterator](): IterableIterator<string>;
66
- [Symbol.unscopables](): {
67
- copyWithin: boolean;
68
- entries: boolean;
69
- fill: boolean;
70
- find: boolean;
71
- findIndex: boolean;
72
- keys: boolean;
73
- values: boolean;
66
+ findLast<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S | undefined;
67
+ findLast(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string | undefined;
68
+ findLastIndex(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): number;
69
+ toReversed(): string[];
70
+ toSorted(compareFn?: ((a: string, b: string) => number) | undefined): string[];
71
+ toSpliced(start: number, deleteCount: number, ...items: string[]): string[];
72
+ toSpliced(start: number, deleteCount?: number): string[];
73
+ with(index: number, value: string): string[];
74
+ [Symbol.iterator](): ArrayIterator<string>;
75
+ [Symbol.unscopables]: {
76
+ [x: number]: boolean | undefined;
77
+ length?: boolean | undefined;
78
+ toString?: boolean | undefined;
79
+ toLocaleString?: boolean | undefined;
80
+ pop?: boolean | undefined;
81
+ push?: boolean | undefined;
82
+ concat?: boolean | undefined;
83
+ join?: boolean | undefined;
84
+ reverse?: boolean | undefined;
85
+ shift?: boolean | undefined;
86
+ slice?: boolean | undefined;
87
+ sort?: boolean | undefined;
88
+ splice?: boolean | undefined;
89
+ unshift?: boolean | undefined;
90
+ indexOf?: boolean | undefined;
91
+ lastIndexOf?: boolean | undefined;
92
+ every?: boolean | undefined;
93
+ some?: boolean | undefined;
94
+ forEach?: boolean | undefined;
95
+ map?: boolean | undefined;
96
+ filter?: boolean | undefined;
97
+ reduce?: boolean | undefined;
98
+ reduceRight?: boolean | undefined;
99
+ find?: boolean | undefined;
100
+ findIndex?: boolean | undefined;
101
+ fill?: boolean | undefined;
102
+ copyWithin?: boolean | undefined;
103
+ entries?: boolean | undefined;
104
+ keys?: boolean | undefined;
105
+ values?: boolean | undefined;
106
+ includes?: boolean | undefined;
107
+ flatMap?: boolean | undefined;
108
+ flat?: boolean | undefined;
109
+ at?: boolean | undefined;
110
+ findLast?: boolean | undefined;
111
+ findLastIndex?: boolean | undefined;
112
+ toReversed?: boolean | undefined;
113
+ toSorted?: boolean | undefined;
114
+ toSpliced?: boolean | undefined;
115
+ with?: boolean | undefined;
116
+ [Symbol.iterator]?: boolean | undefined;
117
+ readonly [Symbol.unscopables]?: boolean | undefined;
74
118
  };
75
119
  };
76
120
  }
@@ -5,26 +5,29 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import PropTypes from 'prop-types';
8
- import React, { type ElementType, type Ref } from 'react';
9
- import { type PolymorphicProps } from '../../types/common';
10
- type LinkBaseProps<E extends ElementType> = {
8
+ import React, { ForwardedRef, type ElementType, type WeakValidationMap } from 'react';
9
+ import { PolymorphicProps } from '../../types/common';
10
+ import { HeaderMenuItemBaseProps } from './HeaderMenuItem';
11
+ export interface LinkBaseProps {
11
12
  /**
12
13
  * @deprecated Use `as` instead
13
14
  */
14
- element?: E | undefined;
15
- ref?: Ref<E>;
16
- };
17
- export type LinkProps<E extends ElementType> = PolymorphicProps<E, LinkBaseProps<E>>;
15
+ element?: undefined;
16
+ ref?: ForwardedRef<ElementType>;
17
+ }
18
+ export type LinkProps<E extends React.ElementType> = PolymorphicProps<E, LinkBaseProps>;
19
+ export interface LinkComponent {
20
+ <E extends ElementType = 'a'>(props: LinkProps<E> | HeaderMenuItemBaseProps): JSX.Element | null;
21
+ displayName?: string;
22
+ propTypes?: WeakValidationMap<LinkProps<any>>;
23
+ }
24
+ export declare const Link: LinkComponent;
18
25
  /**
19
26
  * Link is a custom component that allows us to supporting rendering elements
20
27
  * other than `a` in our markup. The goal is to allow users to support passing
21
28
  * in their own components to support use-cases like `react-router` or
22
29
  * `@reach/router`
23
30
  */
24
- declare const Link: (<E extends React.ElementType<any, keyof React.JSX.IntrinsicElements> = "a">(props: LinkProps<E>) => JSX.Element) & {
25
- displayName?: string | undefined;
26
- propTypes?: React.WeakValidationMap<LinkProps<any>> | undefined;
27
- };
28
31
  declare const LinkPropTypes: {
29
32
  /**
30
33
  * Provide a custom element or component to render the top-level node for the
@@ -7,13 +7,13 @@
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import PropTypes from 'prop-types';
10
- import React__default, { forwardRef } from 'react';
10
+ import React__default from 'react';
11
11
  import deprecate from '../../prop-types/deprecate.js';
12
12
 
13
13
  // Note: Maybe we should use `as` instead of `element`? `as` appears to be
14
14
  // standard and is used in other places in this project.
15
15
 
16
- function LinkRenderFunction(_ref, ref) {
16
+ const Link = /*#__PURE__*/React__default.forwardRef(function LinkRenderFunction(_ref, ref) {
17
17
  let {
18
18
  element,
19
19
  as: BaseComponent,
@@ -26,15 +26,14 @@ function LinkRenderFunction(_ref, ref) {
26
26
  return /*#__PURE__*/React__default.createElement(BaseComponentAsAny, _extends({
27
27
  ref: ref
28
28
  }, rest));
29
- }
30
-
29
+ });
31
30
  /**
32
31
  * Link is a custom component that allows us to supporting rendering elements
33
32
  * other than `a` in our markup. The goal is to allow users to support passing
34
33
  * in their own components to support use-cases like `react-router` or
35
34
  * `@reach/router`
36
35
  */
37
- const Link = /*#__PURE__*/forwardRef(LinkRenderFunction);
36
+
38
37
  const LinkPropTypes = {
39
38
  /**
40
39
  * Provide a custom element or component to render the top-level node for the
@@ -57,4 +56,4 @@ const LinkPropTypes = {
57
56
  Link.displayName = 'Link';
58
57
  Link.propTypes = LinkPropTypes;
59
58
 
60
- export { LinkPropTypes, Link as default };
59
+ export { Link, LinkPropTypes, Link as default };
@@ -198,12 +198,12 @@ SideNav.propTypes = {
198
198
  */
199
199
  defaultExpanded: PropTypes.bool,
200
200
  /**
201
- * Specify the duration in milliseconds to delay before displaying the sidenavigation
201
+ * Specify the duration in milliseconds to delay before displaying the side navigation
202
202
  */
203
203
  enterDelayMs: PropTypes.number,
204
204
  /**
205
205
  * If `true`, the SideNav will be expanded, otherwise it will be collapsed.
206
- * Using this prop causes SideNav to become a controled component.
206
+ * Using this prop causes SideNav to become a controlled component.
207
207
  */
208
208
  expanded: PropTypes.bool,
209
209
  /**
@@ -249,7 +249,7 @@ SideNav.propTypes = {
249
249
 
250
250
  /**
251
251
  * Provide a custom function for translating all message ids within this
252
- * component. This function will take in two arguments: the mesasge Id and the
252
+ * component. This function will take in two arguments: the message Id and the
253
253
  * state of the component. From this, you should return a string representing
254
254
  * the label you want displayed or read by screen readers.
255
255
  */
@@ -9,7 +9,7 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
9
9
  import cx from 'classnames';
10
10
  import PropTypes from 'prop-types';
11
11
  import React__default, { forwardRef, useContext } from 'react';
12
- import Link, { LinkPropTypes } from './Link.js';
12
+ import { LinkPropTypes, Link } from './Link.js';
13
13
  import SideNavIcon from './SideNavIcon.js';
14
14
  import SideNavItem from './SideNavItem.js';
15
15
  import SideNavLinkText from './SideNavLinkText.js';
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import React, { ElementType, ComponentProps } from 'react';
8
8
  import Link from './Link';
9
- export interface SideNavMenuItemProps extends ComponentProps<typeof Link> {
9
+ export type SideNavMenuItemProps = ComponentProps<typeof Link> & {
10
10
  /**
11
11
  * Specify the children to be rendered inside of the `SideNavMenuItem`
12
12
  */
@@ -29,6 +29,54 @@ export interface SideNavMenuItemProps extends ComponentProps<typeof Link> {
29
29
  * Optional component to render instead of default Link
30
30
  */
31
31
  as?: ElementType;
32
- }
33
- declare const SideNavMenuItem: React.ForwardRefExoticComponent<Omit<SideNavMenuItemProps, "ref"> & React.RefAttributes<HTMLElement>>;
32
+ };
33
+ declare const SideNavMenuItem: React.ForwardRefExoticComponent<((import("./HeaderMenuItem").HeaderMenuItemBaseProps & {
34
+ /**
35
+ * Specify the children to be rendered inside of the `SideNavMenuItem`
36
+ */
37
+ children?: React.ReactNode;
38
+ /**
39
+ * Provide an optional class to be applied to the containing node
40
+ */
41
+ className?: string;
42
+ /**
43
+ * Optionally specify whether the link is "active". An active link is one that
44
+ * has an href that is the same as the current page. Can also pass in
45
+ * `aria-current="page"`, as well.
46
+ */
47
+ isActive?: boolean;
48
+ /**
49
+ * Optionally provide an href for the underlying li`
50
+ */
51
+ href?: string;
52
+ /**
53
+ * Optional component to render instead of default Link
54
+ */
55
+ as?: ElementType;
56
+ }) | Omit<import("./Link").LinkBaseProps & Omit<any, "as"> & {
57
+ as?: React.ElementType | undefined;
58
+ } & {
59
+ /**
60
+ * Specify the children to be rendered inside of the `SideNavMenuItem`
61
+ */
62
+ children?: React.ReactNode;
63
+ /**
64
+ * Provide an optional class to be applied to the containing node
65
+ */
66
+ className?: string;
67
+ /**
68
+ * Optionally specify whether the link is "active". An active link is one that
69
+ * has an href that is the same as the current page. Can also pass in
70
+ * `aria-current="page"`, as well.
71
+ */
72
+ isActive?: boolean;
73
+ /**
74
+ * Optionally provide an href for the underlying li`
75
+ */
76
+ href?: string;
77
+ /**
78
+ * Optional component to render instead of default Link
79
+ */
80
+ as?: ElementType;
81
+ }, "ref">) & React.RefAttributes<HTMLElement>>;
34
82
  export default SideNavMenuItem;
@@ -10,7 +10,7 @@ import cx from 'classnames';
10
10
  import PropTypes from 'prop-types';
11
11
  import React__default from 'react';
12
12
  import SideNavLinkText from './SideNavLinkText.js';
13
- import Link from './Link.js';
13
+ import { Link } from './Link.js';
14
14
  import { usePrefix } from '../../internal/usePrefix.js';
15
15
 
16
16
  const SideNavMenuItem = /*#__PURE__*/React__default.forwardRef(function SideNavMenuItem(props, ref) {
@@ -36,6 +36,10 @@ const SideNavMenuItem = /*#__PURE__*/React__default.forwardRef(function SideNavM
36
36
  });
37
37
  SideNavMenuItem.displayName = 'SideNavMenuItem';
38
38
  SideNavMenuItem.propTypes = {
39
+ /**
40
+ * Optional component to render instead of default Link
41
+ */
42
+ as: PropTypes.elementType,
39
43
  /**
40
44
  * Specify the children to be rendered inside of the `SideNavMenuItem`
41
45
  */
@@ -53,11 +57,7 @@ SideNavMenuItem.propTypes = {
53
57
  * has an href that is the same as the current page. Can also pass in
54
58
  * `aria-current="page"`, as well.
55
59
  */
56
- isActive: PropTypes.bool,
57
- /**
58
- * Optional component to render instead of default Link
59
- */
60
- as: PropTypes.elementType
60
+ isActive: PropTypes.bool
61
61
  };
62
62
 
63
63
  export { SideNavMenuItem as default };