@carbon/react 1.99.0-rc.0 → 1.100.0-rc.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 (255) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +942 -942
  2. package/es/components/BadgeIndicator/index.d.ts +1 -1
  3. package/es/components/BadgeIndicator/index.js +8 -6
  4. package/es/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  5. package/es/components/Breadcrumb/BreadcrumbItem.js +6 -7
  6. package/es/components/Button/Button.Skeleton.d.ts +28 -2
  7. package/es/components/Button/Button.js +3 -2
  8. package/es/components/ChatButton/ChatButton.d.ts +3 -2
  9. package/es/components/CheckboxGroup/CheckboxGroup.d.ts +60 -2
  10. package/es/components/ComboBox/ComboBox.d.ts +4 -4
  11. package/es/components/ComboBox/ComboBox.js +21 -3
  12. package/es/components/ComposedModal/ComposedModal.d.ts +2 -2
  13. package/es/components/ContainedList/ContainedList.d.ts +35 -6
  14. package/es/components/ContainedList/ContainedList.js +3 -1
  15. package/es/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +32 -3
  16. package/es/components/ContainedList/index.d.ts +1 -1
  17. package/es/components/ContainedList/index.js +4 -1
  18. package/es/components/DangerButton/DangerButton.d.ts +1 -1
  19. package/es/components/DataTable/DataTable.d.ts +22 -5
  20. package/es/components/DataTable/DataTable.js +1 -1
  21. package/es/components/DataTable/TableExpandRow.d.ts +1 -1
  22. package/es/components/DataTable/TableExpandRow.js +2 -2
  23. package/es/components/DataTable/TableHeader.d.ts +1 -1
  24. package/es/components/DataTable/TableHeader.js +18 -16
  25. package/es/components/DataTable/TableToolbar.d.ts +25 -1
  26. package/es/components/DataTable/TableToolbarMenu.d.ts +25 -5
  27. package/es/components/DataTable/TableToolbarMenu.js +0 -3
  28. package/es/components/DataTableSkeleton/DataTableSkeleton.d.ts +51 -2
  29. package/es/components/DataTableSkeleton/DataTableSkeleton.js +6 -0
  30. package/es/components/DatePicker/DatePicker.d.ts +2 -2
  31. package/es/components/DatePicker/DatePicker.js +38 -53
  32. package/es/components/DatePicker/plugins/fixEventsPlugin.js +28 -2
  33. package/es/components/DatePickerInput/DatePickerInput.d.ts +1 -1
  34. package/es/components/DatePickerInput/DatePickerInput.js +3 -2
  35. package/es/components/Dialog/Dialog.d.ts +1 -1
  36. package/es/components/Dropdown/Dropdown.Skeleton.d.ts +19 -2
  37. package/es/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
  38. package/es/components/ExpandableSearch/ExpandableSearch.js +14 -12
  39. package/es/components/FileUploader/FileUploader.d.ts +1 -1
  40. package/es/components/FileUploader/FileUploader.js +2 -2
  41. package/es/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
  42. package/es/components/FileUploader/FileUploaderDropContainer.js +28 -10
  43. package/es/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
  44. package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
  45. package/es/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
  46. package/es/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
  47. package/es/components/FluidForm/FluidForm.d.ts +15 -2
  48. package/es/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
  49. package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
  50. package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
  51. package/es/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
  52. package/es/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
  53. package/es/components/FluidSearch/FluidSearch.d.ts +1 -1
  54. package/es/components/FluidSearch/FluidSearch.js +3 -3
  55. package/es/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
  56. package/es/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
  57. package/es/components/FluidTextArea/FluidTextArea.d.ts +95 -1
  58. package/es/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
  59. package/es/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
  60. package/es/components/Grid/GridContext.d.ts +19 -1
  61. package/es/components/IconButton/index.d.ts +1 -1
  62. package/es/components/IconButton/index.js +2 -2
  63. package/es/components/Link/Link.js +3 -0
  64. package/es/components/ListBox/ListBoxField.d.ts +35 -2
  65. package/es/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
  66. package/es/components/ListBox/ListBoxMenuItem.d.ts +1 -1
  67. package/es/components/ListBox/ListBoxSelection.d.ts +34 -3
  68. package/es/components/Menu/MenuItem.d.ts +2 -2
  69. package/es/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
  70. package/es/components/MultiSelect/FilterableMultiSelect.js +22 -13
  71. package/es/components/MultiSelect/MultiSelect.js +22 -13
  72. package/es/components/Notification/Notification.d.ts +8 -7
  73. package/es/components/Notification/Notification.js +0 -1
  74. package/es/components/NumberInput/NumberInput.d.ts +9 -0
  75. package/es/components/NumberInput/NumberInput.js +206 -38
  76. package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
  77. package/es/components/OverflowMenu/OverflowMenu.js +0 -1
  78. package/es/components/OverflowMenu/index.d.ts +1 -1
  79. package/es/components/PageHeader/PageHeader.d.ts +3 -3
  80. package/es/components/Popover/index.js +21 -12
  81. package/es/components/Search/Search.d.ts +2 -2
  82. package/es/components/Select/Select.d.ts +1 -1
  83. package/es/components/Select/Select.js +2 -2
  84. package/es/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
  85. package/es/components/SkeletonText/SkeletonText.d.ts +1 -1
  86. package/es/components/Tag/Tag.d.ts +1 -1
  87. package/es/components/Tag/Tag.js +2 -0
  88. package/es/components/Text/Text.d.ts +1 -1
  89. package/es/components/Text/Text.js +4 -3
  90. package/es/components/Text/TextDirection.d.ts +1 -1
  91. package/es/components/Text/TextDirection.js +1 -3
  92. package/es/components/Text/TextDirectionContext.d.ts +3 -3
  93. package/es/components/TextInput/ControlledPasswordInput.d.ts +1 -1
  94. package/es/components/TextInput/ControlledPasswordInput.js +2 -2
  95. package/es/components/TextInput/PasswordInput.d.ts +1 -1
  96. package/es/components/TextInput/PasswordInput.js +2 -2
  97. package/es/components/TextInput/TextInput.d.ts +1 -1
  98. package/es/components/TextInput/TextInput.js +2 -2
  99. package/es/components/Toggle/Toggle.Skeleton.d.ts +9 -3
  100. package/es/components/Toggletip/index.d.ts +1 -1
  101. package/es/components/Toggletip/index.js +9 -7
  102. package/es/components/Tooltip/DefinitionTooltip.d.ts +52 -1
  103. package/es/components/Tooltip/Tooltip.js +2 -0
  104. package/es/components/TreeView/TreeNode.d.ts +4 -4
  105. package/es/components/UIShell/Header.d.ts +20 -3
  106. package/es/components/UIShell/HeaderGlobalAction.d.ts +2 -2
  107. package/es/components/UIShell/HeaderName.js +1 -1
  108. package/es/components/UIShell/Link.d.ts +1 -1
  109. package/es/components/UIShell/Link.js +14 -14
  110. package/es/components/UIShell/SideNav.d.ts +3 -3
  111. package/es/components/UIShell/SideNav.js +26 -25
  112. package/es/components/UIShell/SideNavDivider.d.ts +11 -3
  113. package/es/components/UIShell/SideNavHeader.d.ts +24 -1
  114. package/es/components/UIShell/SideNavIcon.d.ts +20 -2
  115. package/es/components/UIShell/SideNavItem.d.ts +20 -2
  116. package/es/components/UIShell/SideNavItems.d.ts +22 -2
  117. package/es/components/UIShell/SideNavLink.d.ts +1 -1
  118. package/es/components/UIShell/SideNavLink.js +14 -14
  119. package/es/components/UIShell/SideNavMenu.d.ts +1 -1
  120. package/es/components/UIShell/SideNavMenu.js +2 -2
  121. package/es/components/UIShell/SideNavMenuItem.d.ts +2 -2
  122. package/es/components/UIShell/SideNavMenuItem.js +2 -2
  123. package/es/components/UIShell/SwitcherDivider.d.ts +10 -2
  124. package/es/internal/FloatingMenu.d.ts +1 -1
  125. package/es/internal/FloatingMenu.js +0 -2
  126. package/es/internal/PolymorphicProps.d.ts +3 -3
  127. package/es/internal/useNoInteractiveChildren.d.ts +1 -1
  128. package/es/internal/useNoInteractiveChildren.js +8 -10
  129. package/es/internal/useOutsideClick.d.ts +1 -1
  130. package/es/internal/useOutsideClick.js +0 -4
  131. package/lib/components/BadgeIndicator/index.d.ts +1 -1
  132. package/lib/components/BadgeIndicator/index.js +7 -5
  133. package/lib/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  134. package/lib/components/Breadcrumb/BreadcrumbItem.js +5 -6
  135. package/lib/components/Button/Button.Skeleton.d.ts +28 -2
  136. package/lib/components/Button/Button.js +3 -2
  137. package/lib/components/ChatButton/ChatButton.d.ts +3 -2
  138. package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +60 -2
  139. package/lib/components/ComboBox/ComboBox.d.ts +4 -4
  140. package/lib/components/ComboBox/ComboBox.js +21 -3
  141. package/lib/components/ComposedModal/ComposedModal.d.ts +2 -2
  142. package/lib/components/ContainedList/ContainedList.d.ts +35 -6
  143. package/lib/components/ContainedList/ContainedList.js +3 -1
  144. package/lib/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +32 -3
  145. package/lib/components/ContainedList/index.d.ts +1 -1
  146. package/lib/components/ContainedList/index.js +4 -1
  147. package/lib/components/DangerButton/DangerButton.d.ts +1 -1
  148. package/lib/components/DataTable/DataTable.d.ts +22 -5
  149. package/lib/components/DataTable/DataTable.js +1 -1
  150. package/lib/components/DataTable/TableExpandRow.d.ts +1 -1
  151. package/lib/components/DataTable/TableHeader.d.ts +1 -1
  152. package/lib/components/DataTable/TableHeader.js +17 -15
  153. package/lib/components/DataTable/TableToolbar.d.ts +25 -1
  154. package/lib/components/DataTable/TableToolbarMenu.d.ts +25 -5
  155. package/lib/components/DataTable/TableToolbarMenu.js +0 -3
  156. package/lib/components/DataTableSkeleton/DataTableSkeleton.d.ts +51 -2
  157. package/lib/components/DataTableSkeleton/DataTableSkeleton.js +6 -0
  158. package/lib/components/DatePicker/DatePicker.d.ts +2 -2
  159. package/lib/components/DatePicker/DatePicker.js +37 -52
  160. package/lib/components/DatePicker/plugins/fixEventsPlugin.js +28 -2
  161. package/lib/components/DatePickerInput/DatePickerInput.d.ts +1 -1
  162. package/lib/components/DatePickerInput/DatePickerInput.js +2 -1
  163. package/lib/components/Dialog/Dialog.d.ts +1 -1
  164. package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +19 -2
  165. package/lib/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
  166. package/lib/components/ExpandableSearch/ExpandableSearch.js +13 -11
  167. package/lib/components/FileUploader/FileUploader.d.ts +1 -1
  168. package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
  169. package/lib/components/FileUploader/FileUploaderDropContainer.js +28 -10
  170. package/lib/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
  171. package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
  172. package/lib/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
  173. package/lib/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
  174. package/lib/components/FluidForm/FluidForm.d.ts +15 -2
  175. package/lib/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
  176. package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
  177. package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
  178. package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
  179. package/lib/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
  180. package/lib/components/FluidSearch/FluidSearch.d.ts +1 -1
  181. package/lib/components/FluidSearch/FluidSearch.js +2 -2
  182. package/lib/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
  183. package/lib/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
  184. package/lib/components/FluidTextArea/FluidTextArea.d.ts +95 -1
  185. package/lib/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
  186. package/lib/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
  187. package/lib/components/Grid/GridContext.d.ts +19 -1
  188. package/lib/components/IconButton/index.d.ts +1 -1
  189. package/lib/components/Link/Link.js +3 -0
  190. package/lib/components/ListBox/ListBoxField.d.ts +35 -2
  191. package/lib/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
  192. package/lib/components/ListBox/ListBoxMenuItem.d.ts +1 -1
  193. package/lib/components/ListBox/ListBoxSelection.d.ts +34 -3
  194. package/lib/components/Menu/MenuItem.d.ts +2 -2
  195. package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
  196. package/lib/components/MultiSelect/FilterableMultiSelect.js +22 -13
  197. package/lib/components/MultiSelect/MultiSelect.js +22 -13
  198. package/lib/components/Notification/Notification.d.ts +8 -7
  199. package/lib/components/Notification/Notification.js +0 -1
  200. package/lib/components/NumberInput/NumberInput.d.ts +9 -0
  201. package/lib/components/NumberInput/NumberInput.js +206 -37
  202. package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
  203. package/lib/components/OverflowMenu/OverflowMenu.js +0 -1
  204. package/lib/components/OverflowMenu/index.d.ts +1 -1
  205. package/lib/components/PageHeader/PageHeader.d.ts +3 -3
  206. package/lib/components/Popover/index.js +19 -10
  207. package/lib/components/Search/Search.d.ts +2 -2
  208. package/lib/components/Select/Select.d.ts +1 -1
  209. package/lib/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
  210. package/lib/components/SkeletonText/SkeletonText.d.ts +1 -1
  211. package/lib/components/Tag/Tag.d.ts +1 -1
  212. package/lib/components/Tag/Tag.js +2 -0
  213. package/lib/components/Text/Text.d.ts +1 -1
  214. package/lib/components/Text/Text.js +3 -2
  215. package/lib/components/Text/TextDirection.d.ts +1 -1
  216. package/lib/components/Text/TextDirection.js +1 -3
  217. package/lib/components/Text/TextDirectionContext.d.ts +3 -3
  218. package/lib/components/TextInput/ControlledPasswordInput.d.ts +1 -1
  219. package/lib/components/TextInput/PasswordInput.d.ts +1 -1
  220. package/lib/components/TextInput/TextInput.d.ts +1 -1
  221. package/lib/components/Toggle/Toggle.Skeleton.d.ts +9 -3
  222. package/lib/components/Toggletip/index.d.ts +1 -1
  223. package/lib/components/Toggletip/index.js +7 -5
  224. package/lib/components/Tooltip/DefinitionTooltip.d.ts +52 -1
  225. package/lib/components/Tooltip/Tooltip.js +2 -0
  226. package/lib/components/TreeView/TreeNode.d.ts +4 -4
  227. package/lib/components/UIShell/Header.d.ts +20 -3
  228. package/lib/components/UIShell/HeaderGlobalAction.d.ts +2 -2
  229. package/lib/components/UIShell/HeaderName.js +1 -1
  230. package/lib/components/UIShell/Link.d.ts +1 -1
  231. package/lib/components/UIShell/Link.js +13 -13
  232. package/lib/components/UIShell/SideNav.d.ts +3 -3
  233. package/lib/components/UIShell/SideNav.js +25 -24
  234. package/lib/components/UIShell/SideNavDivider.d.ts +11 -3
  235. package/lib/components/UIShell/SideNavHeader.d.ts +24 -1
  236. package/lib/components/UIShell/SideNavIcon.d.ts +20 -2
  237. package/lib/components/UIShell/SideNavItem.d.ts +20 -2
  238. package/lib/components/UIShell/SideNavItems.d.ts +22 -2
  239. package/lib/components/UIShell/SideNavLink.d.ts +1 -1
  240. package/lib/components/UIShell/SideNavLink.js +14 -14
  241. package/lib/components/UIShell/SideNavMenu.d.ts +1 -1
  242. package/lib/components/UIShell/SideNavMenuItem.d.ts +2 -2
  243. package/lib/components/UIShell/SwitcherDivider.d.ts +10 -2
  244. package/lib/internal/FloatingMenu.d.ts +1 -1
  245. package/lib/internal/FloatingMenu.js +0 -2
  246. package/lib/internal/PolymorphicProps.d.ts +3 -3
  247. package/lib/internal/useNoInteractiveChildren.d.ts +1 -1
  248. package/lib/internal/useNoInteractiveChildren.js +8 -10
  249. package/lib/internal/useOutsideClick.d.ts +1 -1
  250. package/lib/internal/useOutsideClick.js +0 -4
  251. package/package.json +8 -8
  252. package/scss/_carbon-utilities.scss +9 -0
  253. package/telemetry.yml +0 -1
  254. package/es/internal/createClassWrapper.d.ts +0 -12
  255. package/lib/internal/createClassWrapper.d.ts +0 -12
@@ -4,13 +4,46 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import React, { type HTMLAttributes } from 'react';
7
+ import { type HTMLAttributes } from 'react';
8
+ import PropTypes from 'prop-types';
8
9
  export interface ListBoxFieldProps extends HTMLAttributes<HTMLDivElement> {
9
10
  /**
10
11
  * Specify if the parent <ListBox> is disabled
11
12
  */
12
13
  disabled?: boolean;
13
14
  }
14
- export type ListBoxFieldComponent = React.FC<ListBoxFieldProps>;
15
+ /**
16
+ * `ListBoxField` is responsible for creating the containing node for valid
17
+ * elements inside of a field. It also provides a11y-related attributes like
18
+ * `role` to make sure a user can focus the given field.
19
+ */
20
+ declare function ListBoxField({ children, disabled, tabIndex, ...rest }: ListBoxFieldProps): import("react/jsx-runtime").JSX.Element;
21
+ declare namespace ListBoxField {
22
+ var propTypes: {
23
+ /**
24
+ * Typically set by `getToggleButtonProps`, this should specify whether the
25
+ * field has a popup.
26
+ */
27
+ 'aria-haspopup': PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
28
+ /**
29
+ * Provide the contents of your ListBoxField
30
+ */
31
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
32
+ /**
33
+ * Specify if the parent <ListBox> is disabled
34
+ */
35
+ disabled: PropTypes.Requireable<boolean>;
36
+ /**
37
+ * The role for the component, should be set by `getToggleButtonProps` coming
38
+ * from Downshift
39
+ */
40
+ role: PropTypes.Requireable<string>;
41
+ /**
42
+ * Optional prop to specify the tabIndex of the <ListBox> trigger button
43
+ */
44
+ tabIndex: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
45
+ };
46
+ }
47
+ export type ListBoxFieldComponent = typeof ListBoxField;
15
48
  declare const _default: ListBoxFieldComponent;
16
49
  export default _default;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  import type { TranslateWithId } from '../../types/common';
9
9
  declare const translationIds: {
10
10
  readonly 'close.menu': "close.menu";
@@ -18,10 +18,23 @@ export interface ListBoxMenuIconProps extends TranslateWithId<TranslationKey> {
18
18
  */
19
19
  isOpen: boolean;
20
20
  }
21
- export type ListBoxMenuIconComponent = React.FC<ListBoxMenuIconProps>;
21
+ export type ListBoxMenuIconComponent = typeof ListBoxMenuIcon;
22
22
  /**
23
23
  * `ListBoxMenuIcon` is used to orient the icon up or down depending on the
24
24
  * state of the menu for a given `ListBox`
25
25
  */
26
- declare const ListBoxMenuIcon: ListBoxMenuIconComponent;
26
+ declare const ListBoxMenuIcon: {
27
+ ({ isOpen, translateWithId: t, }: ListBoxMenuIconProps): import("react/jsx-runtime").JSX.Element;
28
+ propTypes: {
29
+ /**
30
+ * Specify whether the menu is currently open, which will influence the
31
+ * direction of the menu icon
32
+ */
33
+ isOpen: PropTypes.Validator<boolean>;
34
+ /**
35
+ * Translates component strings using your i18n tool.
36
+ */
37
+ translateWithId: PropTypes.Requireable<(...args: any[]) => any>;
38
+ };
39
+ };
27
40
  export default ListBoxMenuIcon;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  import { KeyboardEvent, MouseEvent } from 'react';
9
9
  import type { TranslateWithId } from '../../types/common';
10
10
  export interface ListBoxSelectionProps extends TranslateWithId<TranslationKey> {
@@ -32,7 +32,7 @@ export interface ListBoxSelectionProps extends TranslateWithId<TranslationKey> {
32
32
  */
33
33
  selectionCount?: number;
34
34
  }
35
- export type ListBoxSelectionComponent = React.FC<ListBoxSelectionProps>;
35
+ export type ListBoxSelectionComponent = typeof ListBoxSelection;
36
36
  declare const translationIds: {
37
37
  readonly 'clear.all': "clear.all";
38
38
  readonly 'clear.selection': "clear.selection";
@@ -43,5 +43,36 @@ type TranslationKey = keyof typeof translationIds;
43
43
  * addition to conditionally rendering a badge if the control has more than one
44
44
  * selection.
45
45
  */
46
- declare const ListBoxSelection: ListBoxSelectionComponent;
46
+ declare const ListBoxSelection: {
47
+ ({ clearSelection, selectionCount, translateWithId: t, disabled, onClearSelection, readOnly, }: ListBoxSelectionProps): import("react/jsx-runtime").JSX.Element;
48
+ propTypes: {
49
+ /**
50
+ * Specify a function to be invoked when a user interacts with the clear
51
+ * selection element.
52
+ */
53
+ clearSelection: PropTypes.Validator<(...args: any[]) => any>;
54
+ /**
55
+ * Specify whether or not the clear selection element should be disabled
56
+ */
57
+ disabled: PropTypes.Requireable<boolean>;
58
+ /**
59
+ * Specify an optional `onClearSelection` handler that is called when the underlying
60
+ * element is cleared
61
+ */
62
+ onClearSelection: PropTypes.Requireable<(...args: any[]) => any>;
63
+ /**
64
+ * Whether or not the Dropdown is readonly
65
+ */
66
+ readOnly: PropTypes.Requireable<boolean>;
67
+ /**
68
+ * Specify an optional `selectionCount` value that will be used to determine
69
+ * whether the selection should display a badge or a single clear icon.
70
+ */
71
+ selectionCount: PropTypes.Requireable<number>;
72
+ /**
73
+ * Translates component strings using your i18n tool.
74
+ */
75
+ translateWithId: PropTypes.Requireable<(...args: any[]) => any>;
76
+ };
77
+ };
47
78
  export default ListBoxSelection;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import React, { ComponentProps, FC, KeyboardEvent, LiHTMLAttributes, MouseEvent, ReactNode } from 'react';
7
+ import React, { type ComponentProps, type ElementType, type KeyboardEvent, type LiHTMLAttributes, type MouseEvent, type ReactNode } from 'react';
8
8
  export interface MenuItemProps extends LiHTMLAttributes<HTMLLIElement> {
9
9
  /**
10
10
  * Optionally provide another Menu to create a submenu. props.children can't be used to specify the content of the MenuItem itself. Use props.label instead.
@@ -33,7 +33,7 @@ export interface MenuItemProps extends LiHTMLAttributes<HTMLLIElement> {
33
33
  /**
34
34
  * A component used to render an icon.
35
35
  */
36
- renderIcon?: FC;
36
+ renderIcon?: ElementType;
37
37
  /**
38
38
  * Provide a shortcut for the action of this MenuItem. Note that the component will only render it as a hint but not actually register the shortcut.
39
39
  */
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { type UseComboboxProps, type UseMultipleSelectionProps } from 'downshift';
8
- import React, { type FunctionComponent, type ReactElement, type ReactNode } from 'react';
8
+ import React, { type ReactElement, type ReactNode } from 'react';
9
9
  import { type MultiSelectSortingProps } from './MultiSelectPropTypes';
10
10
  import { type ListBoxMenuIconTranslationKey, type ListBoxSelectionTranslationKey, type ListBoxSize, type ListBoxType } from '../ListBox';
11
11
  import type { TranslateWithId } from '../../types/common';
@@ -93,7 +93,7 @@ export interface FilterableMultiSelectProps<ItemType> extends MultiSelectSorting
93
93
  * Function to render items as custom components instead of strings.
94
94
  * Defaults to null and is overridden by a getter
95
95
  */
96
- itemToElement?: FunctionComponent<ItemType>;
96
+ itemToElement?: (item: ItemType) => ReactNode;
97
97
  /**
98
98
  * Helper function passed to downshift that allows the library to render
99
99
  * a given item to a string label.
@@ -35,6 +35,7 @@ var react = require('@floating-ui/react');
35
35
  var index = require('../AILabel/index.js');
36
36
  var defaultItemToString = require('../../internal/defaultItemToString.js');
37
37
  var utils = require('../../internal/utils.js');
38
+ var useNormalizedInputProps = require('../../internal/useNormalizedInputProps.js');
38
39
  var ListBoxPropTypes = require('../ListBox/ListBoxPropTypes.js');
39
40
 
40
41
  const {
@@ -73,7 +74,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
73
74
  hideLabel,
74
75
  id,
75
76
  initialSelectedItems = [],
76
- invalid,
77
+ invalid = false,
77
78
  invalidText,
78
79
  items,
79
80
  itemToElement: ItemToElement,
@@ -95,7 +96,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
95
96
  sortItems = sorting.defaultSortItems,
96
97
  translateWithId,
97
98
  useTitleInItem,
98
- warn,
99
+ warn = false,
99
100
  warnText,
100
101
  slug,
101
102
  inputProps
@@ -239,15 +240,23 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
239
240
  return sortedReal;
240
241
  // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
241
242
  }, [items, inputValue, controlledSelectedItems, topItems, selectionFeedback, itemToString, compareItems, locale, sortItems, nonSelectAllItems]);
243
+ const normalizedProps = useNormalizedInputProps.useNormalizedInputProps({
244
+ id,
245
+ disabled,
246
+ readOnly,
247
+ invalid,
248
+ warn
249
+ });
242
250
  const inline = type === 'inline';
243
- const showWarning = !invalid && warn;
251
+ const showWarning = normalizedProps.warn;
252
+ const showHelperText = !normalizedProps.warn && !normalizedProps.invalid;
244
253
  const wrapperClasses = cx(`${prefix}--multi-select__wrapper`, `${prefix}--multi-select--filterable__wrapper`, `${prefix}--list-box__wrapper`, containerClassName, {
245
254
  [`${prefix}--multi-select__wrapper--inline`]: inline,
246
255
  [`${prefix}--list-box__wrapper--inline`]: inline,
247
- [`${prefix}--multi-select__wrapper--inline--invalid`]: inline && invalid,
248
- [`${prefix}--list-box__wrapper--inline--invalid`]: inline && invalid,
256
+ [`${prefix}--multi-select__wrapper--inline--invalid`]: inline && normalizedProps.invalid,
257
+ [`${prefix}--list-box__wrapper--inline--invalid`]: inline && normalizedProps.invalid,
249
258
  [`${prefix}--list-box--up`]: direction === 'top',
250
- [`${prefix}--list-box__wrapper--fluid--invalid`]: isFluid && invalid,
259
+ [`${prefix}--list-box__wrapper--fluid--invalid`]: isFluid && normalizedProps.invalid,
251
260
  [`${prefix}--list-box__wrapper--slug`]: slug,
252
261
  [`${prefix}--list-box__wrapper--decorator`]: decorator,
253
262
  [`${prefix}--autoalign`]: autoAlign
@@ -521,8 +530,8 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
521
530
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
522
531
  item => !item.isSelectAll).length;
523
532
  const className = cx(`${prefix}--multi-select`, `${prefix}--combo-box`, `${prefix}--multi-select--filterable`, {
524
- [`${prefix}--multi-select--invalid`]: invalid,
525
- [`${prefix}--multi-select--invalid--focused`]: invalid && inputFocused,
533
+ [`${prefix}--multi-select--invalid`]: normalizedProps.invalid,
534
+ [`${prefix}--multi-select--invalid--focused`]: inputFocused && normalizedProps.invalid,
526
535
  [`${prefix}--multi-select--open`]: isOpen,
527
536
  [`${prefix}--multi-select--inline`]: inline,
528
537
  [`${prefix}--multi-select--selected`]: controlledSelectedItems?.length > 0,
@@ -554,7 +563,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
554
563
  });
555
564
  const inputProp = getInputProps(getDropdownProps({
556
565
  'aria-controls': isOpen ? menuId : undefined,
557
- 'aria-describedby': helperText && !invalid && !warn ? helperId : undefined,
566
+ 'aria-describedby': helperText && showHelperText ? helperId : undefined,
558
567
  'aria-haspopup': 'listbox',
559
568
  // Remove excess aria `aria-labelledby`. HTML <label for>
560
569
  // provides this aria information.
@@ -649,9 +658,9 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
649
658
  light: light,
650
659
  ref: ref,
651
660
  id: id,
652
- invalid: invalid,
661
+ invalid: normalizedProps.invalid,
653
662
  invalidText: invalidText,
654
- warn: warn,
663
+ warn: normalizedProps.warn,
655
664
  warnText: warnText,
656
665
  isOpen: !readOnly && isOpen,
657
666
  size: size
@@ -675,7 +684,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
675
684
  ref: mergedRef
676
685
  }, readOnlyEventHandlers, {
677
686
  readOnly: readOnly
678
- })), invalid && /*#__PURE__*/React.createElement(iconsReact.WarningFilled, {
687
+ })), normalizedProps.invalid && /*#__PURE__*/React.createElement(iconsReact.WarningFilled, {
679
688
  className: `${prefix}--list-box__invalid-icon`
680
689
  }), showWarning && /*#__PURE__*/React.createElement(iconsReact.WarningAltFilled, {
681
690
  className: `${prefix}--list-box__invalid-icon ${prefix}--list-box__invalid-icon--warning`
@@ -744,7 +753,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
744
753
  disabled: disabled,
745
754
  tabIndex: -1
746
755
  })));
747
- }) : null)), !inline && !invalid && !warn ? helper : null);
756
+ }) : null)), !inline && showHelperText ? helper : null);
748
757
  });
749
758
  FilterableMultiSelect.displayName = 'FilterableMultiSelect';
750
759
  FilterableMultiSelect.propTypes = {
@@ -34,6 +34,7 @@ var index = require('../FeatureFlags/index.js');
34
34
  var index$1 = require('../AILabel/index.js');
35
35
  var defaultItemToString = require('../../internal/defaultItemToString.js');
36
36
  var utils = require('../../internal/utils.js');
37
+ var useNormalizedInputProps = require('../../internal/useNormalizedInputProps.js');
37
38
  var ListBoxPropTypes = require('../ListBox/ListBoxPropTypes.js');
38
39
 
39
40
  const {
@@ -73,9 +74,9 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
73
74
  clearAnnouncement = 'all items have been cleared',
74
75
  clearSelectionDescription = 'Total items selected: ',
75
76
  light,
76
- invalid,
77
+ invalid = false,
77
78
  invalidText,
78
- warn,
79
+ warn = false,
79
80
  warnText,
80
81
  useTitleInItem,
81
82
  translateWithId,
@@ -256,14 +257,22 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
256
257
  setIsOpenWrapper(open);
257
258
  setPrevOpenProp(open);
258
259
  }
260
+ const normalizedProps = useNormalizedInputProps.useNormalizedInputProps({
261
+ id,
262
+ disabled,
263
+ readOnly,
264
+ invalid,
265
+ warn
266
+ });
259
267
  const inline = type === 'inline';
260
- const showWarning = !invalid && warn;
268
+ const showWarning = normalizedProps.warn;
269
+ const showHelperText = !normalizedProps.warn && !normalizedProps.invalid && helperText;
261
270
  const wrapperClasses = cx(`${prefix}--multi-select__wrapper`, `${prefix}--list-box__wrapper`, containerClassName, {
262
271
  [`${prefix}--multi-select__wrapper--inline`]: inline,
263
272
  [`${prefix}--list-box__wrapper--inline`]: inline,
264
- [`${prefix}--multi-select__wrapper--inline--invalid`]: inline && invalid,
265
- [`${prefix}--list-box__wrapper--inline--invalid`]: inline && invalid,
266
- [`${prefix}--list-box__wrapper--fluid--invalid`]: isFluid && invalid,
273
+ [`${prefix}--multi-select__wrapper--inline--invalid`]: inline && normalizedProps.invalid,
274
+ [`${prefix}--list-box__wrapper--inline--invalid`]: inline && normalizedProps.invalid,
275
+ [`${prefix}--list-box__wrapper--fluid--invalid`]: isFluid && normalizedProps.invalid,
267
276
  [`${prefix}--list-box__wrapper--slug`]: slug,
268
277
  [`${prefix}--list-box__wrapper--decorator`]: decorator
269
278
  });
@@ -277,8 +286,8 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
277
286
  [`${prefix}--form__helper-text--disabled`]: disabled
278
287
  });
279
288
  const className = cx(`${prefix}--multi-select`, {
280
- [`${prefix}--multi-select--invalid`]: invalid,
281
- [`${prefix}--multi-select--invalid--focused`]: invalid && inputFocused,
289
+ [`${prefix}--multi-select--invalid`]: normalizedProps.invalid,
290
+ [`${prefix}--multi-select--invalid--focused`]: inputFocused && normalizedProps.invalid,
282
291
  [`${prefix}--multi-select--warning`]: showWarning,
283
292
  [`${prefix}--multi-select--inline`]: inline,
284
293
  [`${prefix}--multi-select--selected`]: selectedItems && selectedItems.length > 0,
@@ -449,13 +458,13 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
449
458
  className: className,
450
459
  disabled: disabled,
451
460
  light: light,
452
- invalid: invalid,
461
+ invalid: normalizedProps.invalid,
453
462
  invalidText: invalidText,
454
- warn: warn,
463
+ warn: normalizedProps.warn,
455
464
  warnText: warnText,
456
465
  isOpen: isOpen,
457
466
  id: id
458
- }, invalid && /*#__PURE__*/React.createElement(iconsReact.WarningFilled, {
467
+ }, normalizedProps.invalid && /*#__PURE__*/React.createElement(iconsReact.WarningFilled, {
459
468
  className: `${prefix}--list-box__invalid-icon`
460
469
  }), showWarning && /*#__PURE__*/React.createElement(iconsReact.WarningAltFilled, {
461
470
  className: `${prefix}--list-box__invalid-icon ${prefix}--list-box__invalid-icon--warning`
@@ -475,7 +484,7 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
475
484
  className: `${prefix}--list-box__field`,
476
485
  disabled: disabled,
477
486
  "aria-disabled": disabled || readOnly,
478
- "aria-describedby": !inline && !invalid && !warn && helperText ? helperId : undefined
487
+ "aria-describedby": !inline && showHelperText ? helperId : undefined
479
488
  }, toggleButtonProps, {
480
489
  ref: mergedRef
481
490
  }, readOnlyEventHandlers), /*#__PURE__*/React.createElement("span", {
@@ -530,7 +539,7 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
530
539
  })), itemsCleared && /*#__PURE__*/React.createElement("span", {
531
540
  "aria-live": "assertive",
532
541
  "aria-label": clearAnnouncement
533
- })), !inline && !invalid && !warn && helperText && /*#__PURE__*/React.createElement("div", {
542
+ })), !inline && showHelperText && /*#__PURE__*/React.createElement("div", {
534
543
  id: helperId,
535
544
  className: helperClasses
536
545
  }, helperText));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -7,6 +7,7 @@
7
7
  import PropTypes from 'prop-types';
8
8
  import React, { type ReactNode, type MouseEvent, type ButtonHTMLAttributes, type HTMLAttributes, type ComponentProps } from 'react';
9
9
  import Button, { type ButtonProps } from '../Button';
10
+ type NotificationCloseHandler = ((event: MouseEvent) => boolean) | ((event: MouseEvent) => void);
10
11
  export interface NotificationActionButtonProps extends ButtonProps<'button'> {
11
12
  /**
12
13
  * Specify the content of the notification action button.
@@ -151,7 +152,7 @@ export interface ToastNotificationProps extends HTMLAttributes<HTMLDivElement> {
151
152
  /**
152
153
  * Provide a function that is called when menu is closed
153
154
  */
154
- onClose?(event: MouseEvent): boolean | void;
155
+ onClose?: NotificationCloseHandler;
155
156
  /**
156
157
  * Provide a function that is called when the close button is clicked
157
158
  */
@@ -277,7 +278,7 @@ export interface InlineNotificationProps extends HTMLAttributes<HTMLDivElement>
277
278
  /**
278
279
  * Provide a function that is called when menu is closed
279
280
  */
280
- onClose?(event: MouseEvent): boolean | void;
281
+ onClose?: NotificationCloseHandler;
281
282
  /**
282
283
  * Provide a function that is called when the close button is clicked
283
284
  */
@@ -409,7 +410,7 @@ export interface ActionableNotificationProps extends HTMLAttributes<HTMLDivEleme
409
410
  * Provide a function that is called when menu is closed.
410
411
  * Default behavior of hiding the notification is prevented if this function returns false.
411
412
  */
412
- onClose?(event: MouseEvent): boolean | void;
413
+ onClose?: NotificationCloseHandler;
413
414
  /**
414
415
  * Provide a function that is called when the close button is clicked
415
416
  */
@@ -617,6 +618,6 @@ export declare namespace Callout {
617
618
  /**
618
619
  * @deprecated Use `CalloutProps` instead.
619
620
  */
620
- export interface StaticNotificationProps extends CalloutProps {
621
- }
622
- export declare const StaticNotification: React.FC<StaticNotificationProps>;
621
+ export type StaticNotificationProps = CalloutProps;
622
+ export declare const StaticNotification: (props: StaticNotificationProps) => import("react/jsx-runtime").JSX.Element;
623
+ export {};
@@ -812,7 +812,6 @@ Callout.propTypes = {
812
812
  /**
813
813
  * @deprecated Use `CalloutProps` instead.
814
814
  */
815
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- https://github.com/carbon-design-system/carbon/issues/20452
816
815
 
817
816
  let didWarnAboutDeprecation = false;
818
817
  const StaticNotification = props => {
@@ -207,6 +207,15 @@ export interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInp
207
207
  */
208
208
  warnText?: ReactNode;
209
209
  }
210
+ /**
211
+ * Converts a string with any Unicode numeral system to a JavaScript number.
212
+ * Handles all numeral systems supported by Intl.NumberFormat.
213
+ *
214
+ * @param {string} input - The input string with numerals in any Unicode system
215
+ * @param {string} locale - The locale for parsing separators
216
+ * @returns {number} The parsed number, or NaN if invalid
217
+ */
218
+ export declare const parseNumberWithLocale: (input: string, locale: string) => number;
210
219
  export declare const validateNumberSeparators: (input: string, locale: string) => boolean;
211
220
  declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
212
221
  export { NumberInput };