@carbon/react 1.83.0 → 1.84.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 (510) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +980 -945
  2. package/README.md +1 -1
  3. package/es/components/AILabel/index.js +27 -30
  4. package/es/components/AISkeleton/AISkeletonIcon.js +4 -5
  5. package/es/components/AISkeleton/AISkeletonPlaceholder.js +4 -5
  6. package/es/components/AISkeleton/AISkeletonText.js +4 -5
  7. package/es/components/Accordion/Accordion.Skeleton.js +9 -10
  8. package/es/components/Accordion/Accordion.js +10 -11
  9. package/es/components/Accordion/AccordionItem.js +13 -14
  10. package/es/components/Accordion/AccordionProvider.js +4 -5
  11. package/es/components/AspectRatio/AspectRatio.js +7 -8
  12. package/es/components/BadgeIndicator/index.js +5 -6
  13. package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +4 -5
  14. package/es/components/Button/Button.Skeleton.js +7 -8
  15. package/es/components/Button/ButtonBase.js +23 -24
  16. package/es/components/ChatButton/ChatButton.Skeleton.js +5 -6
  17. package/es/components/ChatButton/ChatButton.js +11 -12
  18. package/es/components/Checkbox/Checkbox.Skeleton.js +4 -5
  19. package/es/components/Checkbox/Checkbox.js +19 -20
  20. package/es/components/CheckboxGroup/CheckboxGroup.js +16 -17
  21. package/es/components/ClassPrefix/index.js +4 -5
  22. package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +5 -6
  23. package/es/components/CodeSnippet/CodeSnippet.js +25 -26
  24. package/es/components/ComboBox/ComboBox.js +24 -30
  25. package/es/components/ComboBox/tools/filter.js +9 -12
  26. package/es/components/ComboButton/index.js +16 -18
  27. package/es/components/ComposedModal/ComposedModal.js +31 -34
  28. package/es/components/ComposedModal/ModalFooter.js +37 -42
  29. package/es/components/ComposedModal/ModalHeader.js +14 -15
  30. package/es/components/ContainedList/ContainedList.js +10 -11
  31. package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +9 -10
  32. package/es/components/ContentSwitcher/ContentSwitcher.d.ts +9 -29
  33. package/es/components/ContentSwitcher/ContentSwitcher.js +96 -128
  34. package/es/components/ContentSwitcher/index.d.ts +3 -4
  35. package/es/components/ContextMenu/useContextMenu.js +1 -2
  36. package/es/components/Copy/Copy.js +11 -12
  37. package/es/components/CopyButton/CopyButton.js +10 -11
  38. package/es/components/DataTable/DataTable.js +45 -53
  39. package/es/components/DataTable/Table.js +15 -18
  40. package/es/components/DataTable/TableBatchAction.js +8 -11
  41. package/es/components/DataTable/TableBatchActions.js +18 -20
  42. package/es/components/DataTable/TableBody.js +8 -11
  43. package/es/components/DataTable/TableContainer.js +9 -10
  44. package/es/components/DataTable/TableDecoratorRow.js +4 -5
  45. package/es/components/DataTable/TableExpandHeader.js +14 -15
  46. package/es/components/DataTable/TableExpandRow.js +13 -14
  47. package/es/components/DataTable/TableExpandedRow.js +6 -7
  48. package/es/components/DataTable/TableHeader.js +15 -16
  49. package/es/components/DataTable/TableSelectAll.js +11 -12
  50. package/es/components/DataTable/TableSelectRow.js +12 -13
  51. package/es/components/DataTable/TableSlugRow.js +4 -5
  52. package/es/components/DataTable/TableToolbar.js +7 -8
  53. package/es/components/DataTable/TableToolbarMenu.js +8 -9
  54. package/es/components/DataTable/TableToolbarSearch.js +22 -24
  55. package/es/components/DataTable/state/sorting.js +3 -4
  56. package/es/components/DataTable/tools/filter.js +10 -12
  57. package/es/components/DataTable/tools/normalize.js +6 -8
  58. package/es/components/DataTable/tools/sorting.js +24 -30
  59. package/es/components/DataTableSkeleton/DataTableSkeleton.js +11 -12
  60. package/es/components/DatePicker/DatePicker.Skeleton.js +7 -8
  61. package/es/components/DatePicker/DatePicker.js +88 -65
  62. package/es/components/DatePickerInput/DatePickerInput.js +5 -6
  63. package/es/components/Dialog/index.d.ts +193 -8
  64. package/es/components/Dialog/index.js +454 -35
  65. package/es/components/Dropdown/Dropdown.Skeleton.js +6 -7
  66. package/es/components/Dropdown/Dropdown.js +40 -43
  67. package/es/components/ErrorBoundary/ErrorBoundary.js +2 -2
  68. package/es/components/ExpandableSearch/ExpandableSearch.js +9 -10
  69. package/es/components/FeatureFlags/index.js +11 -12
  70. package/es/components/FileUploader/FileUploader.Skeleton.js +4 -5
  71. package/es/components/FileUploader/FileUploader.js +22 -24
  72. package/es/components/FileUploader/FileUploaderButton.js +16 -17
  73. package/es/components/FileUploader/FileUploaderDropContainer.js +15 -16
  74. package/es/components/FileUploader/FileUploaderItem.js +13 -14
  75. package/es/components/FileUploader/Filename.js +9 -10
  76. package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +4 -5
  77. package/es/components/FluidComboBox/FluidComboBox.js +5 -6
  78. package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +5 -6
  79. package/es/components/FluidDatePicker/FluidDatePicker.js +10 -11
  80. package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +4 -5
  81. package/es/components/FluidDropdown/FluidDropdown.js +5 -6
  82. package/es/components/FluidForm/FluidForm.js +5 -6
  83. package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +4 -5
  84. package/es/components/FluidMultiSelect/FluidMultiSelect.js +6 -7
  85. package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +4 -5
  86. package/es/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
  87. package/es/components/FluidNumberInput/FluidNumberInput.js +38 -5
  88. package/es/components/FluidSearch/FluidSearch.Skeleton.js +4 -5
  89. package/es/components/FluidSearch/FluidSearch.js +4 -5
  90. package/es/components/FluidSelect/FluidSelect.Skeleton.js +4 -5
  91. package/es/components/FluidSelect/FluidSelect.js +5 -6
  92. package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +4 -5
  93. package/es/components/FluidTextArea/FluidTextArea.js +4 -5
  94. package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +4 -5
  95. package/es/components/FluidTextInput/FluidTextInput.js +5 -6
  96. package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +5 -6
  97. package/es/components/FluidTimePicker/FluidTimePicker.js +11 -12
  98. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +5 -6
  99. package/es/components/Form/Form.js +5 -6
  100. package/es/components/FormGroup/FormGroup.js +11 -12
  101. package/es/components/FormItem/FormItem.js +5 -6
  102. package/es/components/FormLabel/FormLabel.js +6 -7
  103. package/es/components/Grid/CSSGrid.js +17 -19
  104. package/es/components/Grid/Column.js +28 -27
  105. package/es/components/Grid/ColumnHang.js +6 -7
  106. package/es/components/Grid/FlexGrid.js +9 -10
  107. package/es/components/Grid/GridContext.js +5 -6
  108. package/es/components/Grid/Row.js +8 -9
  109. package/es/components/Heading/index.js +5 -6
  110. package/es/components/Icon/Icon.Skeleton.js +4 -5
  111. package/es/components/IconButton/index.js +20 -21
  112. package/es/components/IconIndicator/index.js +7 -8
  113. package/es/components/IdPrefix/index.js +4 -5
  114. package/es/components/InlineLoading/InlineLoading.js +9 -10
  115. package/es/components/Layer/index.js +8 -9
  116. package/es/components/Layout/index.js +21 -26
  117. package/es/components/LayoutDirection/LayoutDirection.js +6 -7
  118. package/es/components/Link/Link.d.ts +1 -1
  119. package/es/components/Link/Link.js +14 -15
  120. package/es/components/ListBox/ListBoxField.js +6 -7
  121. package/es/components/ListBox/ListBoxMenu.js +5 -6
  122. package/es/components/ListBox/ListBoxMenuIcon.js +4 -5
  123. package/es/components/ListBox/ListBoxMenuItem.js +8 -10
  124. package/es/components/ListBox/ListBoxSelection.js +8 -9
  125. package/es/components/ListBox/next/ListBoxSelection.js +9 -10
  126. package/es/components/ListBox/next/ListBoxTrigger.js +5 -6
  127. package/es/components/ListItem/ListItem.js +5 -6
  128. package/es/components/Loading/Loading.js +8 -9
  129. package/es/components/Menu/Menu.js +23 -24
  130. package/es/components/Menu/MenuItem.js +39 -44
  131. package/es/components/MenuButton/index.js +16 -18
  132. package/es/components/Modal/Modal.js +55 -63
  133. package/es/components/ModalWrapper/ModalWrapper.js +2 -2
  134. package/es/components/MultiSelect/FilterableMultiSelect.js +46 -48
  135. package/es/components/MultiSelect/MultiSelect.js +43 -45
  136. package/es/components/MultiSelect/tools/sorting.js +11 -15
  137. package/es/components/Notification/Notification.js +96 -105
  138. package/es/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
  139. package/es/components/NumberInput/NumberFormatPropTypes.js +40 -0
  140. package/es/components/NumberInput/NumberInput.Skeleton.js +6 -7
  141. package/es/components/NumberInput/NumberInput.d.ts +39 -3
  142. package/es/components/NumberInput/NumberInput.js +174 -44
  143. package/es/components/OrderedList/OrderedList.js +7 -8
  144. package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
  145. package/es/components/OverflowMenu/OverflowMenu.js +35 -41
  146. package/es/components/OverflowMenu/next/index.js +12 -13
  147. package/es/components/PageHeader/PageHeader.d.ts +29 -5
  148. package/es/components/PageHeader/PageHeader.js +119 -73
  149. package/es/components/Pagination/Pagination.Skeleton.js +4 -5
  150. package/es/components/Pagination/Pagination.js +24 -25
  151. package/es/components/Pagination/experimental/PageSelector.js +8 -9
  152. package/es/components/Pagination/experimental/Pagination.js +20 -21
  153. package/es/components/PaginationNav/PaginationNav.js +33 -38
  154. package/es/components/Popover/index.js +26 -28
  155. package/es/components/ProgressBar/ProgressBar.js +11 -12
  156. package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +5 -6
  157. package/es/components/ProgressIndicator/ProgressIndicator.js +29 -32
  158. package/es/components/RadioTile/RadioTile.js +17 -18
  159. package/es/components/Search/Search.Skeleton.js +5 -6
  160. package/es/components/Search/Search.js +26 -28
  161. package/es/components/Select/Select.Skeleton.js +5 -6
  162. package/es/components/Select/Select.js +24 -25
  163. package/es/components/SelectItem/SelectItem.js +8 -9
  164. package/es/components/SelectItemGroup/SelectItemGroup.js +7 -8
  165. package/es/components/ShapeIndicator/index.js +7 -8
  166. package/es/components/SkeletonIcon/SkeletonIcon.js +4 -5
  167. package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -5
  168. package/es/components/SkeletonText/SkeletonText.js +8 -9
  169. package/es/components/Slider/Slider.Skeleton.js +8 -9
  170. package/es/components/Slider/Slider.js +69 -83
  171. package/es/components/Slider/SliderHandles.js +6 -6
  172. package/es/components/StructuredList/StructuredList.Skeleton.js +5 -6
  173. package/es/components/Tabs/Tabs.Skeleton.js +5 -6
  174. package/es/components/Tabs/Tabs.js +83 -98
  175. package/es/components/Tabs/usePressable.js +7 -8
  176. package/es/components/Tag/DismissibleTag.js +16 -17
  177. package/es/components/Tag/OperationalTag.js +10 -11
  178. package/es/components/Tag/SelectableTag.js +13 -14
  179. package/es/components/Tag/Tag.Skeleton.js +5 -6
  180. package/es/components/Tag/Tag.js +19 -20
  181. package/es/components/Text/Text.js +6 -7
  182. package/es/components/Text/TextDirection.js +5 -6
  183. package/es/components/TextArea/TextArea.js +3 -3
  184. package/es/components/TextInput/ControlledPasswordInput.js +24 -25
  185. package/es/components/TextInput/PasswordInput.js +26 -27
  186. package/es/components/TextInput/TextInput.Skeleton.js +5 -6
  187. package/es/components/TextInput/TextInput.js +27 -28
  188. package/es/components/TextInput/util.js +14 -17
  189. package/es/components/Theme/index.js +10 -12
  190. package/es/components/Tile/Tile.js +68 -74
  191. package/es/components/Toggle/Toggle.Skeleton.js +4 -5
  192. package/es/components/Toggle/Toggle.js +17 -18
  193. package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +6 -7
  194. package/es/components/Toggletip/index.js +33 -39
  195. package/es/components/Tooltip/DefinitionTooltip.js +13 -14
  196. package/es/components/Tooltip/Tooltip.js +15 -16
  197. package/es/components/TreeView/TreeNode.js +20 -21
  198. package/es/components/TreeView/TreeView.js +14 -16
  199. package/es/components/UIShell/Content.js +6 -7
  200. package/es/components/UIShell/Header.js +5 -6
  201. package/es/components/UIShell/HeaderContainer.js +5 -6
  202. package/es/components/UIShell/HeaderGlobalAction.js +12 -13
  203. package/es/components/UIShell/HeaderMenu.d.ts +10 -112
  204. package/es/components/UIShell/HeaderMenu.js +154 -201
  205. package/es/components/UIShell/HeaderMenuButton.js +10 -11
  206. package/es/components/UIShell/HeaderMenuItem.js +10 -11
  207. package/es/components/UIShell/HeaderName.js +6 -7
  208. package/es/components/UIShell/HeaderNavigation.js +7 -8
  209. package/es/components/UIShell/HeaderPanel.js +9 -10
  210. package/es/components/UIShell/HeaderSideNavItems.js +5 -6
  211. package/es/components/UIShell/Link.js +8 -9
  212. package/es/components/UIShell/SideNav.js +23 -25
  213. package/es/components/UIShell/SideNavDetails.js +6 -7
  214. package/es/components/UIShell/SideNavDivider.js +3 -4
  215. package/es/components/UIShell/SideNavFooter.js +6 -7
  216. package/es/components/UIShell/SideNavHeader.js +5 -6
  217. package/es/components/UIShell/SideNavIcon.js +5 -6
  218. package/es/components/UIShell/SideNavItem.js +5 -6
  219. package/es/components/UIShell/SideNavItems.js +5 -6
  220. package/es/components/UIShell/SideNavLink.js +10 -11
  221. package/es/components/UIShell/SideNavLinkText.js +5 -6
  222. package/es/components/UIShell/SideNavMenu.js +11 -12
  223. package/es/components/UIShell/SkipToContent.js +7 -8
  224. package/es/components/UIShell/Switcher.js +4 -5
  225. package/es/components/UIShell/SwitcherDivider.js +4 -5
  226. package/es/components/UnorderedList/UnorderedList.js +6 -7
  227. package/es/index.js +2 -2
  228. package/es/internal/FloatingMenu.js +26 -28
  229. package/es/internal/Selection.js +15 -17
  230. package/es/internal/getAnnouncement.d.ts +8 -0
  231. package/es/internal/getAnnouncement.js +22 -0
  232. package/es/internal/keyboard/match.js +6 -7
  233. package/es/internal/useControllableState.d.ts +1 -1
  234. package/es/internal/useControllableState.js +8 -9
  235. package/es/internal/useDelayedState.js +1 -2
  236. package/es/internal/useDocumentLang.d.ts +12 -0
  237. package/es/internal/useId.js +2 -4
  238. package/es/internal/useMatchMedia.js +1 -2
  239. package/es/internal/useMergedRefs.d.ts +1 -1
  240. package/es/internal/useNoInteractiveChildren.js +2 -4
  241. package/es/internal/useNormalizedInputProps.js +9 -10
  242. package/es/internal/useResizeObserver.js +4 -5
  243. package/es/internal/useSavedCallback.js +1 -3
  244. package/es/internal/wrapFocus.js +20 -29
  245. package/es/prop-types/deprecate.js +1 -4
  246. package/es/prop-types/deprecateValuesWithin.js +1 -4
  247. package/es/prop-types/isRequiredOneOf.js +1 -4
  248. package/es/prop-types/requiredIfGivenPropIsTruthy.js +1 -4
  249. package/es/tools/events.js +1 -4
  250. package/es/tools/mergeRefs.js +9 -14
  251. package/es/tools/uniqueId.js +1 -2
  252. package/es/tools/wrapComponent.js +9 -11
  253. package/lib/components/AILabel/index.js +27 -30
  254. package/lib/components/AISkeleton/AISkeletonIcon.js +4 -5
  255. package/lib/components/AISkeleton/AISkeletonPlaceholder.js +4 -5
  256. package/lib/components/AISkeleton/AISkeletonText.js +4 -5
  257. package/lib/components/Accordion/Accordion.Skeleton.js +9 -10
  258. package/lib/components/Accordion/Accordion.js +10 -11
  259. package/lib/components/Accordion/AccordionItem.js +13 -14
  260. package/lib/components/Accordion/AccordionProvider.js +4 -5
  261. package/lib/components/AspectRatio/AspectRatio.js +7 -8
  262. package/lib/components/BadgeIndicator/index.js +5 -6
  263. package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +4 -5
  264. package/lib/components/Button/Button.Skeleton.js +7 -8
  265. package/lib/components/Button/ButtonBase.js +23 -24
  266. package/lib/components/ChatButton/ChatButton.Skeleton.js +5 -6
  267. package/lib/components/ChatButton/ChatButton.js +11 -12
  268. package/lib/components/Checkbox/Checkbox.Skeleton.js +4 -5
  269. package/lib/components/Checkbox/Checkbox.js +19 -20
  270. package/lib/components/CheckboxGroup/CheckboxGroup.js +16 -17
  271. package/lib/components/ClassPrefix/index.js +4 -5
  272. package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +5 -6
  273. package/lib/components/CodeSnippet/CodeSnippet.js +25 -26
  274. package/lib/components/ComboBox/ComboBox.js +24 -30
  275. package/lib/components/ComboBox/tools/filter.js +9 -12
  276. package/lib/components/ComboButton/index.js +16 -18
  277. package/lib/components/ComposedModal/ComposedModal.js +31 -34
  278. package/lib/components/ComposedModal/ModalFooter.js +37 -42
  279. package/lib/components/ComposedModal/ModalHeader.js +14 -15
  280. package/lib/components/ContainedList/ContainedList.js +10 -11
  281. package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +9 -10
  282. package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +9 -29
  283. package/lib/components/ContentSwitcher/ContentSwitcher.js +94 -126
  284. package/lib/components/ContentSwitcher/index.d.ts +3 -4
  285. package/lib/components/ContextMenu/useContextMenu.js +1 -2
  286. package/lib/components/Copy/Copy.js +11 -12
  287. package/lib/components/CopyButton/CopyButton.js +10 -11
  288. package/lib/components/DataTable/DataTable.js +45 -53
  289. package/lib/components/DataTable/Table.js +15 -18
  290. package/lib/components/DataTable/TableBatchAction.js +8 -11
  291. package/lib/components/DataTable/TableBatchActions.js +18 -20
  292. package/lib/components/DataTable/TableBody.js +8 -11
  293. package/lib/components/DataTable/TableContainer.js +9 -10
  294. package/lib/components/DataTable/TableDecoratorRow.js +4 -5
  295. package/lib/components/DataTable/TableExpandHeader.js +14 -15
  296. package/lib/components/DataTable/TableExpandRow.js +13 -14
  297. package/lib/components/DataTable/TableExpandedRow.js +6 -7
  298. package/lib/components/DataTable/TableHeader.js +15 -16
  299. package/lib/components/DataTable/TableSelectAll.js +11 -12
  300. package/lib/components/DataTable/TableSelectRow.js +12 -13
  301. package/lib/components/DataTable/TableSlugRow.js +4 -5
  302. package/lib/components/DataTable/TableToolbar.js +7 -8
  303. package/lib/components/DataTable/TableToolbarMenu.js +8 -9
  304. package/lib/components/DataTable/TableToolbarSearch.js +22 -24
  305. package/lib/components/DataTable/state/sorting.js +3 -4
  306. package/lib/components/DataTable/tools/filter.js +10 -12
  307. package/lib/components/DataTable/tools/normalize.js +6 -8
  308. package/lib/components/DataTable/tools/sorting.js +24 -30
  309. package/lib/components/DataTableSkeleton/DataTableSkeleton.js +11 -12
  310. package/lib/components/DatePicker/DatePicker.Skeleton.js +7 -8
  311. package/lib/components/DatePicker/DatePicker.js +87 -64
  312. package/lib/components/DatePickerInput/DatePickerInput.js +5 -6
  313. package/lib/components/Dialog/index.d.ts +193 -8
  314. package/lib/components/Dialog/index.js +457 -33
  315. package/lib/components/Dropdown/Dropdown.Skeleton.js +6 -7
  316. package/lib/components/Dropdown/Dropdown.js +40 -43
  317. package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -2
  318. package/lib/components/ExpandableSearch/ExpandableSearch.js +9 -10
  319. package/lib/components/FeatureFlags/index.js +11 -12
  320. package/lib/components/FileUploader/FileUploader.Skeleton.js +4 -5
  321. package/lib/components/FileUploader/FileUploader.js +22 -24
  322. package/lib/components/FileUploader/FileUploaderButton.js +16 -17
  323. package/lib/components/FileUploader/FileUploaderDropContainer.js +15 -16
  324. package/lib/components/FileUploader/FileUploaderItem.js +13 -14
  325. package/lib/components/FileUploader/Filename.js +9 -10
  326. package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +4 -5
  327. package/lib/components/FluidComboBox/FluidComboBox.js +5 -6
  328. package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +5 -6
  329. package/lib/components/FluidDatePicker/FluidDatePicker.js +10 -11
  330. package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +4 -5
  331. package/lib/components/FluidDropdown/FluidDropdown.js +5 -6
  332. package/lib/components/FluidForm/FluidForm.js +5 -6
  333. package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +4 -5
  334. package/lib/components/FluidMultiSelect/FluidMultiSelect.js +6 -7
  335. package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +4 -5
  336. package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
  337. package/lib/components/FluidNumberInput/FluidNumberInput.js +38 -5
  338. package/lib/components/FluidSearch/FluidSearch.Skeleton.js +4 -5
  339. package/lib/components/FluidSearch/FluidSearch.js +4 -5
  340. package/lib/components/FluidSelect/FluidSelect.Skeleton.js +4 -5
  341. package/lib/components/FluidSelect/FluidSelect.js +5 -6
  342. package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +4 -5
  343. package/lib/components/FluidTextArea/FluidTextArea.js +4 -5
  344. package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +4 -5
  345. package/lib/components/FluidTextInput/FluidTextInput.js +5 -6
  346. package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +5 -6
  347. package/lib/components/FluidTimePicker/FluidTimePicker.js +11 -12
  348. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +5 -6
  349. package/lib/components/Form/Form.js +5 -6
  350. package/lib/components/FormGroup/FormGroup.js +11 -12
  351. package/lib/components/FormItem/FormItem.js +5 -6
  352. package/lib/components/FormLabel/FormLabel.js +6 -7
  353. package/lib/components/Grid/CSSGrid.js +17 -19
  354. package/lib/components/Grid/Column.js +28 -27
  355. package/lib/components/Grid/ColumnHang.js +6 -7
  356. package/lib/components/Grid/FlexGrid.js +9 -10
  357. package/lib/components/Grid/GridContext.js +5 -6
  358. package/lib/components/Grid/Row.js +8 -9
  359. package/lib/components/Heading/index.js +5 -6
  360. package/lib/components/Icon/Icon.Skeleton.js +4 -5
  361. package/lib/components/IconButton/index.js +20 -21
  362. package/lib/components/IconIndicator/index.js +7 -8
  363. package/lib/components/IdPrefix/index.js +4 -5
  364. package/lib/components/InlineLoading/InlineLoading.js +9 -10
  365. package/lib/components/Layer/index.js +8 -9
  366. package/lib/components/Layout/index.js +21 -26
  367. package/lib/components/LayoutDirection/LayoutDirection.js +6 -7
  368. package/lib/components/Link/Link.d.ts +1 -1
  369. package/lib/components/Link/Link.js +14 -15
  370. package/lib/components/ListBox/ListBoxField.js +6 -7
  371. package/lib/components/ListBox/ListBoxMenu.js +5 -6
  372. package/lib/components/ListBox/ListBoxMenuIcon.js +4 -5
  373. package/lib/components/ListBox/ListBoxMenuItem.js +8 -10
  374. package/lib/components/ListBox/ListBoxSelection.js +8 -9
  375. package/lib/components/ListBox/next/ListBoxSelection.js +9 -10
  376. package/lib/components/ListBox/next/ListBoxTrigger.js +5 -6
  377. package/lib/components/ListItem/ListItem.js +5 -6
  378. package/lib/components/Loading/Loading.js +8 -9
  379. package/lib/components/Menu/Menu.js +23 -24
  380. package/lib/components/Menu/MenuItem.js +39 -44
  381. package/lib/components/MenuButton/index.js +16 -18
  382. package/lib/components/Modal/Modal.js +55 -63
  383. package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
  384. package/lib/components/MultiSelect/FilterableMultiSelect.js +45 -47
  385. package/lib/components/MultiSelect/MultiSelect.js +43 -45
  386. package/lib/components/MultiSelect/tools/sorting.js +11 -15
  387. package/lib/components/Notification/Notification.js +96 -105
  388. package/lib/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
  389. package/lib/components/NumberInput/NumberFormatPropTypes.js +48 -0
  390. package/lib/components/NumberInput/NumberInput.Skeleton.js +6 -7
  391. package/lib/components/NumberInput/NumberInput.d.ts +39 -3
  392. package/lib/components/NumberInput/NumberInput.js +173 -43
  393. package/lib/components/OrderedList/OrderedList.js +7 -8
  394. package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
  395. package/lib/components/OverflowMenu/OverflowMenu.js +35 -41
  396. package/lib/components/OverflowMenu/next/index.js +12 -13
  397. package/lib/components/PageHeader/PageHeader.d.ts +29 -5
  398. package/lib/components/PageHeader/PageHeader.js +119 -73
  399. package/lib/components/Pagination/Pagination.Skeleton.js +4 -5
  400. package/lib/components/Pagination/Pagination.js +24 -25
  401. package/lib/components/Pagination/experimental/PageSelector.js +8 -9
  402. package/lib/components/Pagination/experimental/Pagination.js +20 -21
  403. package/lib/components/PaginationNav/PaginationNav.js +33 -38
  404. package/lib/components/Popover/index.js +26 -28
  405. package/lib/components/ProgressBar/ProgressBar.js +11 -12
  406. package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +5 -6
  407. package/lib/components/ProgressIndicator/ProgressIndicator.js +29 -32
  408. package/lib/components/RadioTile/RadioTile.js +17 -18
  409. package/lib/components/Search/Search.Skeleton.js +5 -6
  410. package/lib/components/Search/Search.js +26 -28
  411. package/lib/components/Select/Select.Skeleton.js +5 -6
  412. package/lib/components/Select/Select.js +24 -25
  413. package/lib/components/SelectItem/SelectItem.js +8 -9
  414. package/lib/components/SelectItemGroup/SelectItemGroup.js +7 -8
  415. package/lib/components/ShapeIndicator/index.js +7 -8
  416. package/lib/components/SkeletonIcon/SkeletonIcon.js +4 -5
  417. package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -5
  418. package/lib/components/SkeletonText/SkeletonText.js +8 -9
  419. package/lib/components/Slider/Slider.Skeleton.js +8 -9
  420. package/lib/components/Slider/Slider.js +69 -83
  421. package/lib/components/Slider/SliderHandles.js +6 -6
  422. package/lib/components/StructuredList/StructuredList.Skeleton.js +5 -6
  423. package/lib/components/Tabs/Tabs.Skeleton.js +5 -6
  424. package/lib/components/Tabs/Tabs.js +83 -98
  425. package/lib/components/Tabs/usePressable.js +7 -8
  426. package/lib/components/Tag/DismissibleTag.js +16 -17
  427. package/lib/components/Tag/OperationalTag.js +10 -11
  428. package/lib/components/Tag/SelectableTag.js +13 -14
  429. package/lib/components/Tag/Tag.Skeleton.js +5 -6
  430. package/lib/components/Tag/Tag.js +19 -20
  431. package/lib/components/Text/Text.js +6 -7
  432. package/lib/components/Text/TextDirection.js +5 -6
  433. package/lib/components/TextArea/TextArea.js +3 -3
  434. package/lib/components/TextInput/ControlledPasswordInput.js +24 -25
  435. package/lib/components/TextInput/PasswordInput.js +26 -27
  436. package/lib/components/TextInput/TextInput.Skeleton.js +5 -6
  437. package/lib/components/TextInput/TextInput.js +27 -28
  438. package/lib/components/TextInput/util.js +14 -17
  439. package/lib/components/Theme/index.js +10 -12
  440. package/lib/components/Tile/Tile.js +68 -74
  441. package/lib/components/Toggle/Toggle.Skeleton.js +4 -5
  442. package/lib/components/Toggle/Toggle.js +17 -18
  443. package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +6 -7
  444. package/lib/components/Toggletip/index.js +33 -39
  445. package/lib/components/Tooltip/DefinitionTooltip.js +13 -14
  446. package/lib/components/Tooltip/Tooltip.js +15 -16
  447. package/lib/components/TreeView/TreeNode.js +20 -21
  448. package/lib/components/TreeView/TreeView.js +14 -16
  449. package/lib/components/UIShell/Content.js +6 -7
  450. package/lib/components/UIShell/Header.js +5 -6
  451. package/lib/components/UIShell/HeaderContainer.js +5 -6
  452. package/lib/components/UIShell/HeaderGlobalAction.js +12 -13
  453. package/lib/components/UIShell/HeaderMenu.d.ts +10 -112
  454. package/lib/components/UIShell/HeaderMenu.js +152 -199
  455. package/lib/components/UIShell/HeaderMenuButton.js +10 -11
  456. package/lib/components/UIShell/HeaderMenuItem.js +10 -11
  457. package/lib/components/UIShell/HeaderName.js +6 -7
  458. package/lib/components/UIShell/HeaderNavigation.js +7 -8
  459. package/lib/components/UIShell/HeaderPanel.js +9 -10
  460. package/lib/components/UIShell/HeaderSideNavItems.js +5 -6
  461. package/lib/components/UIShell/Link.js +8 -9
  462. package/lib/components/UIShell/SideNav.js +23 -25
  463. package/lib/components/UIShell/SideNavDetails.js +6 -7
  464. package/lib/components/UIShell/SideNavDivider.js +3 -4
  465. package/lib/components/UIShell/SideNavFooter.js +6 -7
  466. package/lib/components/UIShell/SideNavHeader.js +5 -6
  467. package/lib/components/UIShell/SideNavIcon.js +5 -6
  468. package/lib/components/UIShell/SideNavItem.js +5 -6
  469. package/lib/components/UIShell/SideNavItems.js +5 -6
  470. package/lib/components/UIShell/SideNavLink.js +10 -11
  471. package/lib/components/UIShell/SideNavLinkText.js +5 -6
  472. package/lib/components/UIShell/SideNavMenu.js +11 -12
  473. package/lib/components/UIShell/SkipToContent.js +7 -8
  474. package/lib/components/UIShell/Switcher.js +4 -5
  475. package/lib/components/UIShell/SwitcherDivider.js +4 -5
  476. package/lib/components/UnorderedList/UnorderedList.js +6 -7
  477. package/lib/index.js +35 -35
  478. package/lib/internal/FloatingMenu.js +26 -28
  479. package/lib/internal/Selection.js +15 -17
  480. package/lib/internal/getAnnouncement.d.ts +8 -0
  481. package/lib/internal/getAnnouncement.js +26 -0
  482. package/lib/internal/keyboard/match.js +6 -7
  483. package/lib/internal/useControllableState.d.ts +1 -1
  484. package/lib/internal/useControllableState.js +8 -9
  485. package/lib/internal/useDelayedState.js +1 -2
  486. package/lib/internal/useDocumentLang.d.ts +12 -0
  487. package/lib/internal/useId.js +2 -4
  488. package/lib/internal/useMatchMedia.js +1 -2
  489. package/lib/internal/useMergedRefs.d.ts +1 -1
  490. package/lib/internal/useNoInteractiveChildren.js +2 -4
  491. package/lib/internal/useNormalizedInputProps.js +9 -10
  492. package/lib/internal/useResizeObserver.js +4 -5
  493. package/lib/internal/useSavedCallback.js +1 -3
  494. package/lib/internal/wrapFocus.js +20 -29
  495. package/lib/prop-types/deprecate.js +1 -4
  496. package/lib/prop-types/deprecateValuesWithin.js +1 -4
  497. package/lib/prop-types/isRequiredOneOf.js +1 -4
  498. package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -4
  499. package/lib/tools/events.js +1 -4
  500. package/lib/tools/mergeRefs.js +9 -14
  501. package/lib/tools/uniqueId.js +1 -2
  502. package/lib/tools/wrapComponent.js +9 -11
  503. package/package.json +21 -19
  504. package/telemetry.yml +23 -1
  505. package/es/components/ContentSwitcher/index.js +0 -13
  506. package/es/feature-flags.d.ts +0 -7
  507. package/es/internal/useAnnouncer.js +0 -21
  508. package/lib/components/ContentSwitcher/index.js +0 -18
  509. package/lib/feature-flags.d.ts +0 -7
  510. package/lib/internal/useAnnouncer.js +0 -25
@@ -9,17 +9,14 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
9
9
  import PropTypes from 'prop-types';
10
10
  import React from 'react';
11
11
 
12
- const TableBody = _ref => {
13
- let {
14
- children,
15
- className,
16
- ...rest
17
- } = _ref;
18
- return /*#__PURE__*/React.createElement("tbody", _extends({
19
- "aria-live": rest['aria-live'] ?? 'polite',
20
- className: className
21
- }, rest), children);
22
- };
12
+ const TableBody = ({
13
+ children,
14
+ className,
15
+ ...rest
16
+ }) => /*#__PURE__*/React.createElement("tbody", _extends({
17
+ "aria-live": rest['aria-live'] ?? 'polite',
18
+ className: className
19
+ }, rest), children);
23
20
  TableBody.propTypes = {
24
21
  /**
25
22
  * `polite` Adjust the notification behavior of screen readers
@@ -14,16 +14,15 @@ import { useId } from '../../internal/useId.js';
14
14
  import { TableContext } from './TableContext.js';
15
15
  import { Section, Heading } from '../Heading/index.js';
16
16
 
17
- const TableContainer = _ref => {
18
- let {
19
- className,
20
- children,
21
- title,
22
- description,
23
- stickyHeader,
24
- useStaticWidth,
25
- ...rest
26
- } = _ref;
17
+ const TableContainer = ({
18
+ className,
19
+ children,
20
+ title,
21
+ description,
22
+ stickyHeader,
23
+ useStaticWidth,
24
+ ...rest
25
+ }) => {
27
26
  const baseId = useId('tc');
28
27
  const titleId = `${baseId}-title`;
29
28
  const descriptionId = `${baseId}-description`;
@@ -10,11 +10,10 @@ import React from 'react';
10
10
  import cx from 'classnames';
11
11
  import { usePrefix } from '../../internal/usePrefix.js';
12
12
 
13
- const TableDecoratorRow = _ref => {
14
- let {
15
- className,
16
- decorator
17
- } = _ref;
13
+ const TableDecoratorRow = ({
14
+ className,
15
+ decorator
16
+ }) => {
18
17
  const prefix = usePrefix();
19
18
  const TableDecoratorRowClasses = cx({
20
19
  ...(className && {
@@ -14,21 +14,20 @@ import { usePrefix } from '../../internal/usePrefix.js';
14
14
  import deprecate from '../../prop-types/deprecate.js';
15
15
  import requiredIfGivenPropIsTruthy from '../../prop-types/requiredIfGivenPropIsTruthy.js';
16
16
 
17
- const TableExpandHeader = _ref => {
18
- let {
19
- ['aria-controls']: ariaControls,
20
- ['aria-label']: ariaLabel,
21
- ariaLabel: deprecatedAriaLabel,
22
- className: headerClassName,
23
- enableExpando,
24
- enableToggle,
25
- id = 'expand',
26
- isExpanded,
27
- onExpand,
28
- expandIconDescription,
29
- children,
30
- ...rest
31
- } = _ref;
17
+ const TableExpandHeader = ({
18
+ ['aria-controls']: ariaControls,
19
+ ['aria-label']: ariaLabel,
20
+ ariaLabel: deprecatedAriaLabel,
21
+ className: headerClassName,
22
+ enableExpando,
23
+ enableToggle,
24
+ id = 'expand',
25
+ isExpanded,
26
+ onExpand,
27
+ expandIconDescription,
28
+ children,
29
+ ...rest
30
+ }) => {
32
31
  const prefix = usePrefix();
33
32
  const className = cx(`${prefix}--table-expand`, headerClassName);
34
33
  const previousValue = isExpanded ? 'collapsed' : undefined;
@@ -13,20 +13,19 @@ import { ChevronRight } from '@carbon/icons-react';
13
13
  import TableCell from './TableCell.js';
14
14
  import { usePrefix } from '../../internal/usePrefix.js';
15
15
 
16
- const TableExpandRow = /*#__PURE__*/React.forwardRef((_ref, ref) => {
17
- let {
18
- ['aria-controls']: ariaControls,
19
- ['aria-label']: ariaLabel,
20
- ariaLabel: deprecatedAriaLabel,
21
- className: rowClassName,
22
- children,
23
- isExpanded,
24
- onExpand,
25
- expandIconDescription,
26
- isSelected,
27
- expandHeader = 'expand',
28
- ...rest
29
- } = _ref;
16
+ const TableExpandRow = /*#__PURE__*/React.forwardRef(({
17
+ ['aria-controls']: ariaControls,
18
+ ['aria-label']: ariaLabel,
19
+ ariaLabel: deprecatedAriaLabel,
20
+ className: rowClassName,
21
+ children,
22
+ isExpanded,
23
+ onExpand,
24
+ expandIconDescription,
25
+ isSelected,
26
+ expandHeader = 'expand',
27
+ ...rest
28
+ }, ref) => {
30
29
  const prefix = usePrefix();
31
30
 
32
31
  // We need to put the AILabel and Decorator before the expansion arrow and all other table cells after the arrow.
@@ -12,13 +12,12 @@ import React, { useRef } from 'react';
12
12
  import TableCell from './TableCell.js';
13
13
  import { usePrefix } from '../../internal/usePrefix.js';
14
14
 
15
- const TableExpandedRow = _ref => {
16
- let {
17
- className: customClassName,
18
- children,
19
- colSpan,
20
- ...rest
21
- } = _ref;
15
+ const TableExpandedRow = ({
16
+ className: customClassName,
17
+ children,
18
+ colSpan,
19
+ ...rest
20
+ }) => {
22
21
  const rowRef = useRef(null);
23
22
  const prefix = usePrefix();
24
23
  const className = cx(`${prefix}--expandable-row`, customClassName);
@@ -41,22 +41,21 @@ const sortDirections = {
41
41
  [sortStates.ASC]: 'ascending',
42
42
  [sortStates.DESC]: 'descending'
43
43
  };
44
- const TableHeader = /*#__PURE__*/React.forwardRef(function TableHeader(_ref, ref) {
45
- let {
46
- className: headerClassName,
47
- children,
48
- colSpan,
49
- decorator,
50
- isSortable = false,
51
- isSortHeader,
52
- onClick,
53
- scope = defaultScope,
54
- sortDirection,
55
- translateWithId: t = translateWithId,
56
- slug,
57
- id,
58
- ...rest
59
- } = _ref;
44
+ const TableHeader = /*#__PURE__*/React.forwardRef(function TableHeader({
45
+ className: headerClassName,
46
+ children,
47
+ colSpan,
48
+ decorator,
49
+ isSortable = false,
50
+ isSortHeader,
51
+ onClick,
52
+ scope = defaultScope,
53
+ sortDirection,
54
+ translateWithId: t = translateWithId,
55
+ slug,
56
+ id,
57
+ ...rest
58
+ }, ref) {
60
59
  const prefix = usePrefix();
61
60
  const uniqueId = useId('table-sort');
62
61
 
@@ -12,18 +12,17 @@ import cx from 'classnames';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
13
  import deprecate from '../../prop-types/deprecate.js';
14
14
 
15
- const TableSelectAll = _ref => {
16
- let {
17
- ariaLabel: deprecatedAriaLabel = 'Select all rows in the table',
18
- ['aria-label']: ariaLabel,
19
- checked,
20
- id,
21
- indeterminate,
22
- name,
23
- onSelect,
24
- disabled,
25
- className
26
- } = _ref;
15
+ const TableSelectAll = ({
16
+ ariaLabel: deprecatedAriaLabel = 'Select all rows in the table',
17
+ ['aria-label']: ariaLabel,
18
+ checked,
19
+ id,
20
+ indeterminate,
21
+ name,
22
+ onSelect,
23
+ disabled,
24
+ className
25
+ }) => {
27
26
  const prefix = usePrefix();
28
27
  return /*#__PURE__*/React.createElement("th", {
29
28
  "aria-live": "off",
@@ -15,19 +15,18 @@ import { useId } from '../../internal/useId.js';
15
15
  import { usePrefix } from '../../internal/usePrefix.js';
16
16
  import deprecate from '../../prop-types/deprecate.js';
17
17
 
18
- const TableSelectRow = _ref => {
19
- let {
20
- ariaLabel: deprecatedAriaLabel,
21
- ['aria-label']: ariaLabel,
22
- checked,
23
- id,
24
- name,
25
- onSelect,
26
- onChange,
27
- disabled,
28
- radio,
29
- className
30
- } = _ref;
18
+ const TableSelectRow = ({
19
+ ariaLabel: deprecatedAriaLabel,
20
+ ['aria-label']: ariaLabel,
21
+ checked,
22
+ id,
23
+ name,
24
+ onSelect,
25
+ onChange,
26
+ disabled,
27
+ radio,
28
+ className
29
+ }) => {
31
30
  const prefix = usePrefix();
32
31
  const uniqueNameId = useId();
33
32
  const handleRadioChange = onChange ? (value, name, event) => {
@@ -11,11 +11,10 @@ import cx from 'classnames';
11
11
  import { usePrefix } from '../../internal/usePrefix.js';
12
12
  import deprecateComponent from '../../prop-types/deprecateComponent.js';
13
13
 
14
- const TableSlugRow = _ref => {
15
- let {
16
- className,
17
- slug
18
- } = _ref;
14
+ const TableSlugRow = ({
15
+ className,
16
+ slug
17
+ }) => {
19
18
  useEffect(() => {
20
19
  deprecateComponent('TableSlugRow', 'The `TableSlugRow` component has been deprecated and will be removed in the next major version. Use the TableDecoratorRow component instead.');
21
20
  }, []);
@@ -12,14 +12,13 @@ import React from 'react';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
13
  import deprecate from '../../prop-types/deprecate.js';
14
14
 
15
- const TableToolbar = _ref => {
16
- let {
17
- ['aria-label']: ariaLabel = 'data table toolbar',
18
- ariaLabel: deprecatedAriaLabel,
19
- children,
20
- size,
21
- ...rest
22
- } = _ref;
15
+ const TableToolbar = ({
16
+ ['aria-label']: ariaLabel = 'data table toolbar',
17
+ ariaLabel: deprecatedAriaLabel,
18
+ children,
19
+ size,
20
+ ...rest
21
+ }) => {
23
22
  const prefix = usePrefix();
24
23
  const className = cx({
25
24
  [`${prefix}--table-toolbar`]: true,
@@ -14,15 +14,14 @@ import { usePrefix } from '../../internal/usePrefix.js';
14
14
  import OverflowMenu from '../OverflowMenu/index.js';
15
15
 
16
16
  const defaultIconDescription = 'Settings';
17
- const TableToolbarMenu = _ref => {
18
- let {
19
- className,
20
- renderIcon = Settings,
21
- iconDescription = defaultIconDescription,
22
- children,
23
- menuOptionsClass,
24
- ...rest
25
- } = _ref;
17
+ const TableToolbarMenu = ({
18
+ className,
19
+ renderIcon = Settings,
20
+ iconDescription = defaultIconDescription,
21
+ children,
22
+ menuOptionsClass,
23
+ ...rest
24
+ }) => {
26
25
  const prefix = usePrefix();
27
26
  const toolbarActionClasses = cx(className, `${prefix}--toolbar-action ${prefix}--overflow-menu`);
28
27
  const menuOptionsClasses = cx(menuOptionsClass, `${prefix}--toolbar-action__menu`);
@@ -26,28 +26,27 @@ const translationKeys = {
26
26
  const translateWithId = id => {
27
27
  return translationKeys[id];
28
28
  };
29
- const TableToolbarSearch = _ref => {
30
- let {
31
- className,
32
- searchContainerClass,
33
- onChange: onChangeProp,
34
- onClear = noopFn,
35
- translateWithId: t = translateWithId,
36
- placeholder,
37
- labelText,
38
- expanded: expandedProp,
39
- defaultExpanded,
40
- defaultValue,
41
- disabled,
42
- onExpand,
43
- persistent = false,
44
- id,
45
- onBlur,
46
- onFocus,
47
- size = 'lg',
48
- tabIndex = '0',
49
- ...rest
50
- } = _ref;
29
+ const TableToolbarSearch = ({
30
+ className,
31
+ searchContainerClass,
32
+ onChange: onChangeProp,
33
+ onClear = noopFn,
34
+ translateWithId: t = translateWithId,
35
+ placeholder,
36
+ labelText,
37
+ expanded: expandedProp,
38
+ defaultExpanded,
39
+ defaultValue,
40
+ disabled,
41
+ onExpand,
42
+ persistent = false,
43
+ id,
44
+ onBlur,
45
+ onFocus,
46
+ size = 'lg',
47
+ tabIndex = '0',
48
+ ...rest
49
+ }) => {
51
50
  const {
52
51
  current: controlled
53
52
  } = useRef(expandedProp !== undefined);
@@ -78,8 +77,7 @@ const TableToolbarSearch = _ref => {
78
77
  [`${prefix}--toolbar-search-container-expandable`]: !persistent,
79
78
  [`${prefix}--toolbar-search-container-persistent`]: persistent
80
79
  });
81
- const handleExpand = function (event) {
82
- let value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !expanded;
80
+ const handleExpand = (event, value = !expanded) => {
83
81
  if (!disabled) {
84
82
  if (!controlled && !persistent) {
85
83
  setExpandedState(value);
@@ -40,10 +40,9 @@ const getNextSortDirection = (prevHeader, header, prevState) => {
40
40
  // in descending order by default
41
41
  return sortStates.ASC;
42
42
  };
43
- const getNextSortState = (props, state, _ref) => {
44
- let {
45
- key
46
- } = _ref;
43
+ const getNextSortState = (props, state, {
44
+ key
45
+ }) => {
47
46
  const {
48
47
  sortDirection,
49
48
  sortHeaderKey
@@ -9,20 +9,18 @@
9
9
  * Filters row IDs based on whether any of the cell values in the row include
10
10
  * the input value as a substring. Boolean cell values are ignored.
11
11
  */
12
- const defaultFilterRows = _ref => {
13
- let {
14
- rowIds,
15
- headers,
16
- cellsById,
17
- inputValue,
18
- getCellId
19
- } = _ref;
12
+ const defaultFilterRows = ({
13
+ rowIds,
14
+ headers,
15
+ cellsById,
16
+ inputValue,
17
+ getCellId
18
+ }) => {
20
19
  const normalizedInput = inputValue.trim().toLowerCase();
21
20
  if (!normalizedInput) return rowIds;
22
- return rowIds.filter(rowId => headers.some(_ref2 => {
23
- let {
24
- key
25
- } = _ref2;
21
+ return rowIds.filter(rowId => headers.some(({
22
+ key
23
+ }) => {
26
24
  const cellId = getCellId(rowId, key);
27
25
  const cell = cellsById[cellId];
28
26
  if (typeof cell.value === 'boolean') return false;
@@ -14,8 +14,7 @@ import { getCellId } from './cells.js';
14
14
  * @param {Array<object>} headers
15
15
  * @returns {object}
16
16
  */
17
- const normalize = function (rows, headers) {
18
- let prevState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
17
+ const normalize = (rows, headers, prevState = {}) => {
19
18
  const {
20
19
  rowsById: prevRowsByIds
21
20
  } = prevState;
@@ -46,12 +45,11 @@ const normalize = function (rows, headers) {
46
45
  rowsById[row.id].isSelected = prevRowsByIds[row.id].isSelected;
47
46
  rowsById[row.id].isExpanded = prevRowsByIds[row.id].isExpanded;
48
47
  }
49
- headers.forEach((_ref, i) => {
50
- let {
51
- key,
52
- slug,
53
- decorator
54
- } = _ref;
48
+ headers.forEach(({
49
+ key,
50
+ slug,
51
+ decorator
52
+ }, i) => {
55
53
  const id = getCellId(row.id, key);
56
54
  // Initialize the cell info and state values, namely for editing
57
55
  cellsById[id] = {
@@ -13,8 +13,7 @@ import { sortStates } from '../state/sortStates.js';
13
13
  * type, the default sort algorithm will be used for those types. Otherwise, the
14
14
  * values will be converted to strings for comparison.
15
15
  */
16
- const compare = function (a, b) {
17
- let locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'en';
16
+ const compare = (a, b, locale = 'en') => {
18
17
  // prevent multiple null values in one column (sorting breaks)
19
18
  if (a === null) a = '';
20
19
  if (b === null) b = '';
@@ -37,8 +36,7 @@ const compare = function (a, b) {
37
36
  *
38
37
  * Note: Uses numeric comparison if strings are numeric.
39
38
  */
40
- const compareStrings = function (a, b) {
41
- let locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'en';
39
+ const compareStrings = (a, b, locale = 'en') => {
42
40
  const isNumeric = !isNaN(parseFloat(a)) && !isNaN(parseFloat(b));
43
41
  return a.localeCompare(b, locale, {
44
42
  numeric: isNumeric
@@ -47,38 +45,34 @@ const compareStrings = function (a, b) {
47
45
  /**
48
46
  * Sorts table rows based on the provided column key and direction.
49
47
  */
50
- const sortRows = _ref => {
51
- let {
52
- rowIds,
53
- cellsById,
54
- sortDirection,
48
+ const sortRows = ({
49
+ rowIds,
50
+ cellsById,
51
+ sortDirection,
52
+ key,
53
+ locale = 'en',
54
+ sortRow = defaultSortRow
55
+ }) => rowIds.slice().sort((a, b) => {
56
+ const cellA = cellsById[getCellId(a, key)];
57
+ const cellB = cellsById[getCellId(b, key)];
58
+ return sortRow(cellA?.value, cellB?.value, {
55
59
  key,
56
- locale = 'en',
57
- sortRow = defaultSortRow
58
- } = _ref;
59
- return rowIds.slice().sort((a, b) => {
60
- const cellA = cellsById[getCellId(a, key)];
61
- const cellB = cellsById[getCellId(b, key)];
62
- return sortRow(cellA?.value, cellB?.value, {
63
- key,
64
- sortDirection,
65
- sortStates,
66
- locale,
67
- compare,
68
- rowIds: [a, b]
69
- });
60
+ sortDirection,
61
+ sortStates,
62
+ locale,
63
+ compare,
64
+ rowIds: [a, b]
70
65
  });
71
- };
66
+ });
72
67
 
73
68
  /**
74
69
  * Sorts table rows based on the sort direction.
75
70
  */
76
- const defaultSortRow = (cellA, cellB, _ref2) => {
77
- let {
78
- sortDirection,
79
- sortStates,
80
- locale
81
- } = _ref2;
71
+ const defaultSortRow = (cellA, cellB, {
72
+ sortDirection,
73
+ sortStates,
74
+ locale
75
+ }) => {
82
76
  if (sortDirection === sortStates.ASC) {
83
77
  return compare(cellA, cellB, locale);
84
78
  }
@@ -12,18 +12,17 @@ import cx from 'classnames';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
13
 
14
14
  var _span, _span2;
15
- const DataTableSkeleton = _ref => {
16
- let {
17
- headers,
18
- rowCount = 5,
19
- columnCount = 5,
20
- zebra = false,
21
- compact = false,
22
- className,
23
- showHeader = true,
24
- showToolbar = true,
25
- ...rest
26
- } = _ref;
15
+ const DataTableSkeleton = ({
16
+ headers,
17
+ rowCount = 5,
18
+ columnCount = 5,
19
+ zebra = false,
20
+ compact = false,
21
+ className,
22
+ showHeader = true,
23
+ showToolbar = true,
24
+ ...rest
25
+ }) => {
27
26
  const prefix = usePrefix();
28
27
  const dataTableSkeletonClasses = cx(className, {
29
28
  [`${prefix}--skeleton`]: true,
@@ -11,14 +11,13 @@ import React from 'react';
11
11
  import cx from 'classnames';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
13
 
14
- const DatePickerSkeleton = _ref => {
15
- let {
16
- range,
17
- id,
18
- hideLabel,
19
- className,
20
- ...rest
21
- } = _ref;
14
+ const DatePickerSkeleton = ({
15
+ range,
16
+ id,
17
+ hideLabel,
18
+ className,
19
+ ...rest
20
+ }) => {
22
21
  const prefix = usePrefix();
23
22
  const dateInput = /*#__PURE__*/React.createElement("div", {
24
23
  className: `${prefix}--date-picker-container`