@carbon/react 1.29.0 → 1.30.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 (580) hide show
  1. package/es/_virtual/_rollupPluginBabelHelpers.js +16 -5
  2. package/es/components/Accordion/Accordion.Skeleton.js +0 -7
  3. package/es/components/Accordion/Accordion.js +1 -8
  4. package/es/components/Accordion/AccordionItem.js +5 -19
  5. package/es/components/AspectRatio/AspectRatio.js +0 -5
  6. package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +0 -3
  7. package/es/components/Breadcrumb/Breadcrumb.js +0 -3
  8. package/es/components/Breadcrumb/BreadcrumbItem.js +0 -7
  9. package/es/components/Button/Button.Skeleton.js +2 -7
  10. package/es/components/Button/Button.js +2 -36
  11. package/es/components/ButtonSet/ButtonSet.js +0 -2
  12. package/es/components/Checkbox/Checkbox.Skeleton.js +0 -1
  13. package/es/components/Checkbox/Checkbox.js +4 -20
  14. package/es/components/CheckboxGroup/CheckboxGroup.js +0 -11
  15. package/es/components/ClassPrefix/index.d.ts +26 -0
  16. package/es/components/ClassPrefix/index.js +0 -2
  17. package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +0 -5
  18. package/es/components/CodeSnippet/CodeSnippet.js +6 -45
  19. package/es/components/ComboBox/ComboBox.js +12 -79
  20. package/es/components/ComboBox/tools/filter.js +0 -1
  21. package/es/components/ComboButton/index.js +0 -14
  22. package/es/components/ComposedModal/ComposedModal.js +2 -32
  23. package/es/components/ComposedModal/ModalFooter.js +0 -21
  24. package/es/components/ComposedModal/ModalHeader.js +0 -12
  25. package/es/components/ContainedList/ContainedList.js +5 -32
  26. package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -6
  27. package/es/components/ContentSwitcher/ContentSwitcher.js +11 -23
  28. package/es/components/ContextMenu/useContextMenu.js +1 -6
  29. package/es/components/Copy/Copy.js +8 -31
  30. package/es/components/CopyButton/CopyButton.js +0 -4
  31. package/es/components/DangerButton/DangerButton.js +0 -1
  32. package/es/components/DataTable/DataTable.js +171 -91
  33. package/es/components/DataTable/Table.js +0 -6
  34. package/es/components/DataTable/TableBatchAction.js +0 -4
  35. package/es/components/DataTable/TableBatchActions.js +0 -8
  36. package/es/components/DataTable/TableBody.js +0 -1
  37. package/es/components/DataTable/TableContainer.js +0 -5
  38. package/es/components/DataTable/TableExpandHeader.js +0 -7
  39. package/es/components/DataTable/TableExpandRow.js +0 -6
  40. package/es/components/DataTable/TableExpandedRow.js +0 -6
  41. package/es/components/DataTable/TableHeader.d.ts +1 -1
  42. package/es/components/DataTable/TableHeader.js +3 -19
  43. package/es/components/DataTable/TableRow.js +4 -5
  44. package/es/components/DataTable/TableSelectAll.js +0 -8
  45. package/es/components/DataTable/TableSelectRow.js +2 -10
  46. package/es/components/DataTable/TableToolbar.js +0 -3
  47. package/es/components/DataTable/TableToolbarMenu.d.ts +1 -1
  48. package/es/components/DataTable/TableToolbarMenu.js +3 -6
  49. package/es/components/DataTable/TableToolbarSearch.js +2 -30
  50. package/es/components/DataTable/state/getDerivedStateFromProps.js +0 -4
  51. package/es/components/DataTable/state/sorting.js +5 -8
  52. package/es/components/DataTable/tools/denormalize.js +2 -2
  53. package/es/components/DataTable/tools/filter.js +0 -2
  54. package/es/components/DataTable/tools/instanceId.js +0 -1
  55. package/es/components/DataTable/tools/normalize.js +10 -10
  56. package/es/components/DataTable/tools/sorting.js +5 -13
  57. package/es/components/DataTableSkeleton/DataTableSkeleton.js +5 -20
  58. package/es/components/DatePicker/DatePicker.Skeleton.js +0 -6
  59. package/es/components/DatePicker/DatePicker.js +154 -177
  60. package/es/components/DatePicker/plugins/appendToPlugin.js +3 -7
  61. package/es/components/DatePicker/plugins/fixEventsPlugin.js +14 -25
  62. package/es/components/DatePicker/plugins/rangePlugin.js +2 -7
  63. package/es/components/DatePickerInput/DatePickerInput.js +2 -28
  64. package/es/components/Dropdown/Dropdown.Skeleton.js +0 -2
  65. package/es/components/Dropdown/Dropdown.js +43 -52
  66. package/es/components/ErrorBoundary/ErrorBoundary.js +0 -10
  67. package/es/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
  68. package/es/components/ExpandableSearch/ExpandableSearch.js +1 -10
  69. package/es/components/FeatureFlags/index.js +8 -20
  70. package/es/components/FileUploader/FileUploader.Skeleton.js +0 -2
  71. package/es/components/FileUploader/FileUploader.js +3 -38
  72. package/es/components/FileUploader/FileUploaderButton.js +3 -24
  73. package/es/components/FileUploader/FileUploaderDropContainer.js +1 -28
  74. package/es/components/FileUploader/FileUploaderItem.js +1 -11
  75. package/es/components/FileUploader/Filename.js +0 -10
  76. package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +0 -1
  77. package/es/components/FluidComboBox/FluidComboBox.js +0 -18
  78. package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +0 -2
  79. package/es/components/FluidDatePicker/FluidDatePicker.js +0 -6
  80. package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
  81. package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +0 -1
  82. package/es/components/FluidDropdown/FluidDropdown.js +0 -18
  83. package/es/components/FluidForm/FluidForm.js +0 -2
  84. package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +0 -1
  85. package/es/components/FluidMultiSelect/FluidMultiSelect.js +0 -19
  86. package/es/components/FluidSelect/FluidSelect.Skeleton.js +0 -1
  87. package/es/components/FluidSelect/FluidSelect.js +0 -10
  88. package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +0 -1
  89. package/es/components/FluidTextArea/FluidTextArea.js +0 -20
  90. package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +0 -1
  91. package/es/components/FluidTextInput/FluidTextInput.js +0 -14
  92. package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +0 -3
  93. package/es/components/FluidTimePicker/FluidTimePicker.js +1 -11
  94. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +0 -6
  95. package/es/components/Form/Form.d.ts +23 -0
  96. package/es/components/Form/Form.js +3 -6
  97. package/es/components/Form/index.d.ts +7 -0
  98. package/es/components/FormGroup/FormGroup.js +0 -7
  99. package/es/components/FormItem/FormItem.js +0 -2
  100. package/es/components/FormLabel/FormLabel.js +1 -7
  101. package/es/components/Grid/CSSGrid.js +2 -15
  102. package/es/components/Grid/Column.js +18 -59
  103. package/es/components/Grid/ColumnHang.js +2 -5
  104. package/es/components/Grid/FlexGrid.js +2 -8
  105. package/es/components/Grid/Grid.js +0 -8
  106. package/es/components/Grid/GridContext.js +1 -3
  107. package/es/components/Grid/Row.js +2 -7
  108. package/es/components/Heading/index.js +0 -4
  109. package/es/components/Icon/Icon.Skeleton.js +2 -2
  110. package/es/components/IconButton/index.js +0 -10
  111. package/es/components/IdPrefix/index.js +0 -2
  112. package/es/components/InlineCheckbox/InlineCheckbox.js +0 -14
  113. package/es/components/InlineLoading/InlineLoading.js +0 -12
  114. package/es/components/Layer/index.js +3 -6
  115. package/es/components/Layout/LayoutDirection.js +0 -3
  116. package/es/components/Layout/useLayoutDirection.js +0 -1
  117. package/es/components/Link/Link.js +3 -10
  118. package/es/components/ListBox/ListBox.js +2 -13
  119. package/es/components/ListBox/ListBoxField.js +0 -5
  120. package/es/components/ListBox/ListBoxMenuIcon.js +0 -4
  121. package/es/components/ListBox/ListBoxMenuItem.js +2 -6
  122. package/es/components/ListBox/ListBoxPropTypes.d.ts +2 -2
  123. package/es/components/ListBox/ListBoxSelection.js +1 -13
  124. package/es/components/ListBox/next/ListBoxSelection.js +1 -14
  125. package/es/components/ListBox/next/ListBoxTrigger.js +1 -3
  126. package/es/components/ListItem/ListItem.d.ts +23 -0
  127. package/es/components/ListItem/ListItem.js +4 -8
  128. package/es/components/ListItem/index.d.ts +7 -0
  129. package/es/components/Loading/Loading.js +0 -6
  130. package/es/components/Menu/Menu.js +22 -40
  131. package/es/components/Menu/MenuContext.js +4 -5
  132. package/es/components/Menu/MenuItem.js +5 -39
  133. package/es/components/MenuButton/index.js +0 -9
  134. package/es/components/Modal/Modal.js +0 -43
  135. package/es/components/ModalWrapper/ModalWrapper.js +2 -15
  136. package/es/components/MultiSelect/FilterableMultiSelect.js +2 -60
  137. package/es/components/MultiSelect/MultiSelect.js +22 -70
  138. package/es/components/MultiSelect/MultiSelectPropTypes.js +0 -1
  139. package/es/components/MultiSelect/index.js +0 -1
  140. package/es/components/MultiSelect/tools/itemToString.js +0 -2
  141. package/es/components/MultiSelect/tools/sorting.js +3 -4
  142. package/es/components/Notification/Notification.js +0 -78
  143. package/es/components/NumberInput/NumberInput.Skeleton.js +0 -2
  144. package/es/components/NumberInput/NumberInput.js +3 -60
  145. package/es/components/OrderedList/OrderedList.d.ts +39 -0
  146. package/es/components/OrderedList/OrderedList.js +7 -19
  147. package/es/components/{Form/index.js → OrderedList/index.d.ts} +1 -3
  148. package/es/components/OverflowMenu/OverflowMenu.js +65 -86
  149. package/es/components/OverflowMenuItem/OverflowMenuItem.js +6 -23
  150. package/es/components/OverflowMenuV2/index.js +0 -5
  151. package/es/components/Pagination/Pagination.Skeleton.js +0 -2
  152. package/es/components/Pagination/Pagination.js +11 -47
  153. package/es/components/Pagination/experimental/PageSelector.js +0 -10
  154. package/es/components/Pagination/experimental/Pagination.js +2 -48
  155. package/es/components/PaginationNav/PaginationNav.js +15 -59
  156. package/es/components/Popover/index.d.ts +14 -8
  157. package/es/components/Popover/index.js +44 -48
  158. package/es/components/PrimaryButton/PrimaryButton.js +0 -1
  159. package/es/components/ProgressBar/ProgressBar.js +0 -15
  160. package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +0 -4
  161. package/es/components/ProgressIndicator/ProgressIndicator.js +2 -40
  162. package/es/components/RadioButton/RadioButton.Skeleton.js +0 -1
  163. package/es/components/RadioButton/RadioButton.js +0 -13
  164. package/es/components/RadioButtonGroup/RadioButtonGroup.js +3 -23
  165. package/es/components/RadioTile/RadioTile.js +0 -12
  166. package/es/components/Search/Search.Skeleton.js +0 -2
  167. package/es/components/Search/Search.js +1 -28
  168. package/es/components/SecondaryButton/SecondaryButton.js +0 -1
  169. package/es/components/Select/Select.Skeleton.js +0 -2
  170. package/es/components/Select/Select.d.ts +1 -1
  171. package/es/components/Select/Select.js +6 -33
  172. package/es/components/SelectItem/SelectItem.js +0 -5
  173. package/es/components/SelectItemGroup/SelectItemGroup.d.ts +0 -1
  174. package/es/components/SelectItemGroup/SelectItemGroup.js +1 -7
  175. package/es/components/SkeletonIcon/SkeletonIcon.js +0 -2
  176. package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +0 -1
  177. package/es/components/SkeletonText/SkeletonText.js +0 -12
  178. package/es/components/Slider/Slider.Skeleton.js +0 -2
  179. package/es/components/Slider/Slider.d.ts +0 -1
  180. package/es/components/Slider/Slider.js +112 -135
  181. package/es/components/Stack/Stack.js +1 -8
  182. package/es/components/StructuredList/StructuredList.Skeleton.js +0 -5
  183. package/es/components/StructuredList/StructuredList.js +1 -25
  184. package/es/components/Switch/IconSwitch.js +0 -18
  185. package/es/components/Switch/Switch.js +0 -11
  186. package/es/components/TabContent/TabContent.js +2 -6
  187. package/es/components/Tabs/Tabs.Skeleton.js +0 -4
  188. package/es/components/Tabs/Tabs.js +135 -104
  189. package/es/components/Tabs/usePressable.js +18 -31
  190. package/es/components/Tag/Tag.Skeleton.js +0 -2
  191. package/es/components/Tag/Tag.js +0 -15
  192. package/es/components/Text/Text.js +5 -18
  193. package/es/components/Text/TextDirection.js +0 -3
  194. package/es/components/Text/TextDirectionContext.js +0 -1
  195. package/es/components/Text/createTextComponent.js +0 -3
  196. package/es/components/TextArea/TextArea.Skeleton.js +0 -2
  197. package/es/components/TextArea/TextArea.js +11 -33
  198. package/es/components/TextInput/ControlledPasswordInput.js +0 -20
  199. package/es/components/TextInput/PasswordInput.js +0 -25
  200. package/es/components/TextInput/TextInput.Skeleton.js +0 -2
  201. package/es/components/TextInput/TextInput.d.ts +1 -1
  202. package/es/components/TextInput/TextInput.js +5 -33
  203. package/es/components/TextInput/util.js +3 -5
  204. package/es/components/Theme/index.js +1 -6
  205. package/es/components/Tile/Tile.js +32 -59
  206. package/es/components/TileGroup/TileGroup.js +1 -22
  207. package/es/components/TimePicker/TimePicker.js +6 -32
  208. package/es/components/TimePickerSelect/TimePickerSelect.js +2 -5
  209. package/es/components/Toggle/Toggle.Skeleton.js +0 -8
  210. package/es/components/Toggle/Toggle.js +0 -16
  211. package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +0 -7
  212. package/es/components/Toggletip/index.d.ts +148 -0
  213. package/es/components/Toggletip/index.js +20 -44
  214. package/es/components/Tooltip/DefinitionTooltip.js +0 -11
  215. package/es/components/Tooltip/Tooltip.d.ts +1 -1
  216. package/es/components/Tooltip/Tooltip.js +4 -21
  217. package/es/components/TreeView/TreeNode.js +21 -66
  218. package/es/components/TreeView/TreeView.js +11 -67
  219. package/es/components/UIShell/Content.js +2 -4
  220. package/es/components/UIShell/Header.js +0 -2
  221. package/es/components/UIShell/HeaderContainer.d.ts +33 -0
  222. package/es/components/UIShell/HeaderContainer.js +13 -11
  223. package/es/components/UIShell/HeaderGlobalAction.js +0 -6
  224. package/es/components/UIShell/HeaderGlobalBar.js +0 -1
  225. package/es/components/UIShell/HeaderMenu.js +32 -31
  226. package/es/components/UIShell/HeaderMenuButton.js +2 -4
  227. package/es/components/UIShell/HeaderMenuItem.js +0 -8
  228. package/es/components/UIShell/HeaderName.js +0 -5
  229. package/es/components/UIShell/HeaderNavigation.js +0 -2
  230. package/es/components/UIShell/HeaderPanel.js +0 -2
  231. package/es/components/UIShell/HeaderSideNavItems.js +0 -2
  232. package/es/components/UIShell/Link.js +2 -3
  233. package/es/components/UIShell/SideNav.d.ts +3 -1
  234. package/es/components/UIShell/SideNav.js +44 -36
  235. package/es/components/UIShell/SideNavDetails.js +0 -3
  236. package/es/components/UIShell/SideNavDivider.js +0 -1
  237. package/es/components/UIShell/SideNavFooter.js +1 -4
  238. package/es/components/UIShell/SideNavHeader.js +0 -4
  239. package/es/components/UIShell/SideNavIcon.js +0 -3
  240. package/es/components/UIShell/SideNavItem.js +0 -3
  241. package/es/components/UIShell/SideNavItems.js +2 -6
  242. package/es/components/UIShell/SideNavLink.js +3 -7
  243. package/es/components/UIShell/SideNavLinkText.js +0 -2
  244. package/es/components/UIShell/SideNavMenu.js +0 -16
  245. package/es/components/UIShell/SideNavMenuItem.js +0 -2
  246. package/es/components/UIShell/SideNavSwitcher.js +2 -5
  247. package/es/components/UIShell/SkipToContent.d.ts +32 -0
  248. package/es/components/UIShell/SkipToContent.js +8 -15
  249. package/es/components/UIShell/Switcher.js +0 -2
  250. package/es/components/UIShell/SwitcherDivider.js +0 -1
  251. package/es/components/UIShell/SwitcherItem.js +0 -3
  252. package/es/components/UnorderedList/UnorderedList.d.ts +34 -0
  253. package/es/components/UnorderedList/UnorderedList.js +6 -16
  254. package/es/components/UnorderedList/index.d.ts +7 -0
  255. package/es/index.js +7 -8
  256. package/es/internal/ClickListener.js +3 -13
  257. package/es/internal/FloatingMenu.js +57 -63
  258. package/es/internal/OptimizedResize.js +6 -12
  259. package/es/internal/Selection.js +2 -25
  260. package/es/internal/createClassWrapper.js +0 -2
  261. package/es/internal/deprecateFieldOnObject.js +0 -4
  262. package/es/internal/focus/index.js +0 -1
  263. package/es/internal/keyboard/keys.js +2 -1
  264. package/es/internal/keyboard/match.js +1 -6
  265. package/es/internal/keyboard/navigation.js +8 -7
  266. package/es/internal/useAnnouncer.js +0 -1
  267. package/es/internal/useAttachedMenu.js +1 -9
  268. package/es/internal/useControllableState.js +6 -13
  269. package/es/internal/useDelayedState.js +2 -4
  270. package/es/internal/useEffectOnce.js +0 -1
  271. package/es/internal/useEvent.js +61 -3
  272. package/es/internal/useId.js +2 -5
  273. package/es/internal/useIsomorphicEffect.js +1 -0
  274. package/es/internal/useMergedRefs.js +2 -2
  275. package/es/internal/useNoInteractiveChildren.js +2 -13
  276. package/es/internal/useNormalizedInputProps.js +0 -3
  277. package/es/internal/useSavedCallback.js +1 -2
  278. package/es/internal/warning.js +0 -3
  279. package/es/internal/wrapFocus.js +1 -8
  280. package/es/prop-types/deprecate.js +2 -5
  281. package/es/prop-types/isRequiredOneOf.js +2 -5
  282. package/es/prop-types/requiredIfGivenPropIsTruthy.js +0 -2
  283. package/es/tools/array.js +0 -3
  284. package/es/tools/events.js +0 -3
  285. package/es/tools/mergeRefs.js +0 -2
  286. package/es/tools/wrapComponent.js +2 -5
  287. package/lib/_virtual/_rollupPluginBabelHelpers.js +17 -4
  288. package/lib/components/Accordion/Accordion.Skeleton.js +0 -7
  289. package/lib/components/Accordion/Accordion.js +1 -27
  290. package/lib/components/Accordion/AccordionItem.js +5 -19
  291. package/lib/components/AspectRatio/AspectRatio.js +0 -5
  292. package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +0 -3
  293. package/lib/components/Breadcrumb/Breadcrumb.js +0 -3
  294. package/lib/components/Breadcrumb/BreadcrumbItem.js +0 -7
  295. package/lib/components/Button/Button.Skeleton.js +2 -26
  296. package/lib/components/Button/Button.js +2 -36
  297. package/lib/components/ButtonSet/ButtonSet.js +0 -2
  298. package/lib/components/Checkbox/Checkbox.Skeleton.js +0 -1
  299. package/lib/components/Checkbox/Checkbox.js +4 -20
  300. package/lib/components/CheckboxGroup/CheckboxGroup.js +0 -11
  301. package/lib/components/ClassPrefix/index.d.ts +26 -0
  302. package/lib/components/ClassPrefix/index.js +0 -2
  303. package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +0 -5
  304. package/lib/components/CodeSnippet/CodeSnippet.js +6 -45
  305. package/lib/components/ComboBox/ComboBox.js +19 -86
  306. package/lib/components/ComboBox/tools/filter.js +0 -1
  307. package/lib/components/ComboButton/index.js +0 -14
  308. package/lib/components/ComposedModal/ComposedModal.js +2 -32
  309. package/lib/components/ComposedModal/ModalFooter.js +0 -21
  310. package/lib/components/ComposedModal/ModalHeader.js +0 -12
  311. package/lib/components/ContainedList/ContainedList.js +5 -32
  312. package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -6
  313. package/lib/components/ContentSwitcher/ContentSwitcher.js +11 -23
  314. package/lib/components/ContextMenu/useContextMenu.js +1 -6
  315. package/lib/components/Copy/Copy.js +8 -50
  316. package/lib/components/CopyButton/CopyButton.js +0 -4
  317. package/lib/components/DangerButton/DangerButton.js +0 -1
  318. package/lib/components/DataTable/DataTable.js +171 -91
  319. package/lib/components/DataTable/Table.js +0 -6
  320. package/lib/components/DataTable/TableBatchAction.js +0 -4
  321. package/lib/components/DataTable/TableBatchActions.js +0 -8
  322. package/lib/components/DataTable/TableBody.js +0 -1
  323. package/lib/components/DataTable/TableContainer.js +0 -5
  324. package/lib/components/DataTable/TableExpandHeader.js +0 -7
  325. package/lib/components/DataTable/TableExpandRow.js +0 -6
  326. package/lib/components/DataTable/TableExpandedRow.js +0 -6
  327. package/lib/components/DataTable/TableHeader.d.ts +1 -1
  328. package/lib/components/DataTable/TableHeader.js +3 -19
  329. package/lib/components/DataTable/TableRow.js +4 -5
  330. package/lib/components/DataTable/TableSelectAll.js +0 -8
  331. package/lib/components/DataTable/TableSelectRow.js +2 -10
  332. package/lib/components/DataTable/TableToolbar.js +0 -3
  333. package/lib/components/DataTable/TableToolbarMenu.d.ts +1 -1
  334. package/lib/components/DataTable/TableToolbarMenu.js +3 -6
  335. package/lib/components/DataTable/TableToolbarSearch.js +2 -30
  336. package/lib/components/DataTable/state/getDerivedStateFromProps.js +0 -4
  337. package/lib/components/DataTable/state/sorting.js +5 -8
  338. package/lib/components/DataTable/tools/denormalize.js +2 -2
  339. package/lib/components/DataTable/tools/filter.js +0 -2
  340. package/lib/components/DataTable/tools/instanceId.js +0 -1
  341. package/lib/components/DataTable/tools/normalize.js +10 -10
  342. package/lib/components/DataTable/tools/sorting.js +5 -13
  343. package/lib/components/DataTableSkeleton/DataTableSkeleton.js +5 -20
  344. package/lib/components/DatePicker/DatePicker.Skeleton.js +0 -6
  345. package/lib/components/DatePicker/DatePicker.js +154 -177
  346. package/lib/components/DatePicker/plugins/appendToPlugin.js +3 -7
  347. package/lib/components/DatePicker/plugins/fixEventsPlugin.js +14 -25
  348. package/lib/components/DatePicker/plugins/rangePlugin.js +2 -7
  349. package/lib/components/DatePickerInput/DatePickerInput.js +2 -28
  350. package/lib/components/Dropdown/Dropdown.Skeleton.js +0 -2
  351. package/lib/components/Dropdown/Dropdown.js +50 -59
  352. package/lib/components/ErrorBoundary/ErrorBoundary.js +0 -10
  353. package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
  354. package/lib/components/ExpandableSearch/ExpandableSearch.js +1 -10
  355. package/lib/components/FeatureFlags/index.js +8 -20
  356. package/lib/components/FileUploader/FileUploader.Skeleton.js +0 -2
  357. package/lib/components/FileUploader/FileUploader.js +3 -57
  358. package/lib/components/FileUploader/FileUploaderButton.js +3 -43
  359. package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -28
  360. package/lib/components/FileUploader/FileUploaderItem.js +1 -30
  361. package/lib/components/FileUploader/Filename.js +0 -10
  362. package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +0 -1
  363. package/lib/components/FluidComboBox/FluidComboBox.js +0 -18
  364. package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +0 -2
  365. package/lib/components/FluidDatePicker/FluidDatePicker.js +0 -6
  366. package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
  367. package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +0 -1
  368. package/lib/components/FluidDropdown/FluidDropdown.js +0 -18
  369. package/lib/components/FluidForm/FluidForm.js +0 -2
  370. package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +0 -1
  371. package/lib/components/FluidMultiSelect/FluidMultiSelect.js +0 -19
  372. package/lib/components/FluidSelect/FluidSelect.Skeleton.js +0 -1
  373. package/lib/components/FluidSelect/FluidSelect.js +0 -10
  374. package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +0 -1
  375. package/lib/components/FluidTextArea/FluidTextArea.js +0 -20
  376. package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +0 -1
  377. package/lib/components/FluidTextInput/FluidTextInput.js +0 -14
  378. package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +0 -3
  379. package/lib/components/FluidTimePicker/FluidTimePicker.js +1 -11
  380. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +0 -6
  381. package/lib/components/Form/Form.d.ts +23 -0
  382. package/lib/components/Form/Form.js +3 -6
  383. package/lib/components/Form/index.d.ts +7 -0
  384. package/lib/components/FormGroup/FormGroup.js +0 -7
  385. package/lib/components/FormItem/FormItem.js +0 -2
  386. package/lib/components/FormLabel/FormLabel.js +1 -26
  387. package/lib/components/Grid/CSSGrid.js +2 -15
  388. package/lib/components/Grid/Column.js +18 -59
  389. package/lib/components/Grid/ColumnHang.js +2 -5
  390. package/lib/components/Grid/FlexGrid.js +2 -8
  391. package/lib/components/Grid/Grid.js +0 -8
  392. package/lib/components/Grid/GridContext.js +1 -3
  393. package/lib/components/Grid/Row.js +2 -7
  394. package/lib/components/Heading/index.js +0 -4
  395. package/lib/components/Icon/Icon.Skeleton.js +2 -2
  396. package/lib/components/IconButton/index.js +0 -10
  397. package/lib/components/IdPrefix/index.js +0 -2
  398. package/lib/components/InlineCheckbox/InlineCheckbox.js +0 -14
  399. package/lib/components/InlineLoading/InlineLoading.js +0 -12
  400. package/lib/components/Layer/index.js +3 -6
  401. package/lib/components/Layout/LayoutDirection.js +0 -3
  402. package/lib/components/Layout/useLayoutDirection.js +0 -1
  403. package/lib/components/Link/Link.js +3 -10
  404. package/lib/components/ListBox/ListBox.js +2 -13
  405. package/lib/components/ListBox/ListBoxField.js +0 -5
  406. package/lib/components/ListBox/ListBoxMenuIcon.js +0 -4
  407. package/lib/components/ListBox/ListBoxMenuItem.js +2 -6
  408. package/lib/components/ListBox/ListBoxPropTypes.d.ts +2 -2
  409. package/lib/components/ListBox/ListBoxSelection.js +1 -13
  410. package/lib/components/ListBox/next/ListBoxSelection.js +1 -14
  411. package/lib/components/ListBox/next/ListBoxTrigger.js +1 -3
  412. package/lib/components/ListItem/ListItem.d.ts +23 -0
  413. package/lib/components/ListItem/ListItem.js +4 -8
  414. package/lib/components/ListItem/index.d.ts +7 -0
  415. package/lib/components/Loading/Loading.js +0 -6
  416. package/lib/components/Menu/Menu.js +22 -40
  417. package/lib/components/Menu/MenuContext.js +4 -5
  418. package/lib/components/Menu/MenuItem.js +5 -39
  419. package/lib/components/MenuButton/index.js +0 -9
  420. package/lib/components/Modal/Modal.js +0 -43
  421. package/lib/components/ModalWrapper/ModalWrapper.js +2 -15
  422. package/lib/components/MultiSelect/FilterableMultiSelect.js +8 -66
  423. package/lib/components/MultiSelect/MultiSelect.js +30 -78
  424. package/lib/components/MultiSelect/MultiSelectPropTypes.js +0 -1
  425. package/lib/components/MultiSelect/index.js +0 -1
  426. package/lib/components/MultiSelect/tools/itemToString.js +0 -2
  427. package/lib/components/MultiSelect/tools/sorting.js +3 -4
  428. package/lib/components/Notification/Notification.js +0 -78
  429. package/lib/components/NumberInput/NumberInput.Skeleton.js +0 -2
  430. package/lib/components/NumberInput/NumberInput.js +3 -60
  431. package/lib/components/OrderedList/OrderedList.d.ts +39 -0
  432. package/lib/components/OrderedList/OrderedList.js +7 -19
  433. package/lib/components/OrderedList/index.d.ts +7 -0
  434. package/lib/components/OverflowMenu/OverflowMenu.js +65 -86
  435. package/lib/components/OverflowMenuItem/OverflowMenuItem.js +6 -23
  436. package/lib/components/OverflowMenuV2/index.js +0 -5
  437. package/lib/components/Pagination/Pagination.Skeleton.js +0 -2
  438. package/lib/components/Pagination/Pagination.js +11 -47
  439. package/lib/components/Pagination/experimental/PageSelector.js +0 -10
  440. package/lib/components/Pagination/experimental/Pagination.js +2 -67
  441. package/lib/components/PaginationNav/PaginationNav.js +15 -78
  442. package/lib/components/Popover/index.d.ts +14 -8
  443. package/lib/components/Popover/index.js +44 -48
  444. package/lib/components/PrimaryButton/PrimaryButton.js +0 -1
  445. package/lib/components/ProgressBar/ProgressBar.js +0 -15
  446. package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +0 -4
  447. package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -40
  448. package/lib/components/RadioButton/RadioButton.Skeleton.js +0 -1
  449. package/lib/components/RadioButton/RadioButton.js +0 -13
  450. package/lib/components/RadioButtonGroup/RadioButtonGroup.js +3 -23
  451. package/lib/components/RadioTile/RadioTile.js +0 -12
  452. package/lib/components/Search/Search.Skeleton.js +0 -2
  453. package/lib/components/Search/Search.js +1 -28
  454. package/lib/components/SecondaryButton/SecondaryButton.js +0 -1
  455. package/lib/components/Select/Select.Skeleton.js +0 -2
  456. package/lib/components/Select/Select.d.ts +1 -1
  457. package/lib/components/Select/Select.js +6 -33
  458. package/lib/components/SelectItem/SelectItem.js +0 -5
  459. package/lib/components/SelectItemGroup/SelectItemGroup.d.ts +0 -1
  460. package/lib/components/SelectItemGroup/SelectItemGroup.js +1 -26
  461. package/lib/components/SkeletonIcon/SkeletonIcon.js +0 -2
  462. package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +0 -1
  463. package/lib/components/SkeletonText/SkeletonText.js +0 -12
  464. package/lib/components/Slider/Slider.Skeleton.js +0 -2
  465. package/lib/components/Slider/Slider.d.ts +0 -1
  466. package/lib/components/Slider/Slider.js +112 -154
  467. package/lib/components/Stack/Stack.js +1 -8
  468. package/lib/components/StructuredList/StructuredList.Skeleton.js +0 -5
  469. package/lib/components/StructuredList/StructuredList.js +1 -25
  470. package/lib/components/Switch/IconSwitch.js +0 -18
  471. package/lib/components/Switch/Switch.js +0 -11
  472. package/lib/components/TabContent/TabContent.js +2 -6
  473. package/lib/components/Tabs/Tabs.Skeleton.js +0 -4
  474. package/lib/components/Tabs/Tabs.js +133 -102
  475. package/lib/components/Tabs/usePressable.js +18 -31
  476. package/lib/components/Tag/Tag.Skeleton.js +0 -2
  477. package/lib/components/Tag/Tag.js +0 -15
  478. package/lib/components/Text/Text.js +5 -18
  479. package/lib/components/Text/TextDirection.js +0 -3
  480. package/lib/components/Text/TextDirectionContext.js +0 -1
  481. package/lib/components/Text/createTextComponent.js +0 -3
  482. package/lib/components/TextArea/TextArea.Skeleton.js +0 -2
  483. package/lib/components/TextArea/TextArea.js +10 -32
  484. package/lib/components/TextInput/ControlledPasswordInput.js +0 -20
  485. package/lib/components/TextInput/PasswordInput.js +0 -25
  486. package/lib/components/TextInput/TextInput.Skeleton.js +0 -2
  487. package/lib/components/TextInput/TextInput.d.ts +1 -1
  488. package/lib/components/TextInput/TextInput.js +5 -52
  489. package/lib/components/TextInput/util.js +3 -5
  490. package/lib/components/Theme/index.js +1 -6
  491. package/lib/components/Tile/Tile.js +31 -58
  492. package/lib/components/TileGroup/TileGroup.js +1 -22
  493. package/lib/components/TimePicker/TimePicker.js +6 -32
  494. package/lib/components/TimePickerSelect/TimePickerSelect.js +2 -5
  495. package/lib/components/Toggle/Toggle.Skeleton.js +0 -8
  496. package/lib/components/Toggle/Toggle.js +0 -16
  497. package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +0 -7
  498. package/lib/components/Toggletip/index.d.ts +148 -0
  499. package/lib/components/Toggletip/index.js +20 -44
  500. package/lib/components/Tooltip/DefinitionTooltip.js +0 -11
  501. package/lib/components/Tooltip/Tooltip.d.ts +1 -1
  502. package/lib/components/Tooltip/Tooltip.js +4 -21
  503. package/lib/components/TreeView/TreeNode.js +21 -66
  504. package/lib/components/TreeView/TreeView.js +11 -67
  505. package/lib/components/UIShell/Content.js +2 -4
  506. package/lib/components/UIShell/Header.js +0 -2
  507. package/lib/components/UIShell/HeaderContainer.d.ts +33 -0
  508. package/lib/components/UIShell/HeaderContainer.js +13 -11
  509. package/lib/components/UIShell/HeaderGlobalAction.js +0 -6
  510. package/lib/components/UIShell/HeaderGlobalBar.js +0 -1
  511. package/lib/components/UIShell/HeaderMenu.js +32 -31
  512. package/lib/components/UIShell/HeaderMenuButton.js +2 -4
  513. package/lib/components/UIShell/HeaderMenuItem.js +0 -8
  514. package/lib/components/UIShell/HeaderName.js +0 -5
  515. package/lib/components/UIShell/HeaderNavigation.js +0 -2
  516. package/lib/components/UIShell/HeaderPanel.js +0 -2
  517. package/lib/components/UIShell/HeaderSideNavItems.js +0 -2
  518. package/lib/components/UIShell/Link.js +2 -3
  519. package/lib/components/UIShell/SideNav.d.ts +3 -1
  520. package/lib/components/UIShell/SideNav.js +43 -35
  521. package/lib/components/UIShell/SideNavDetails.js +0 -3
  522. package/lib/components/UIShell/SideNavDivider.js +0 -1
  523. package/lib/components/UIShell/SideNavFooter.js +1 -4
  524. package/lib/components/UIShell/SideNavHeader.js +0 -4
  525. package/lib/components/UIShell/SideNavIcon.js +0 -3
  526. package/lib/components/UIShell/SideNavItem.js +0 -3
  527. package/lib/components/UIShell/SideNavItems.js +2 -6
  528. package/lib/components/UIShell/SideNavLink.js +3 -7
  529. package/lib/components/UIShell/SideNavLinkText.js +0 -2
  530. package/lib/components/UIShell/SideNavMenu.js +0 -16
  531. package/lib/components/UIShell/SideNavMenuItem.js +0 -2
  532. package/lib/components/UIShell/SideNavSwitcher.js +2 -5
  533. package/lib/components/UIShell/SkipToContent.d.ts +32 -0
  534. package/lib/components/UIShell/SkipToContent.js +8 -15
  535. package/lib/components/UIShell/Switcher.js +0 -2
  536. package/lib/components/UIShell/SwitcherDivider.js +0 -1
  537. package/lib/components/UIShell/SwitcherItem.js +0 -3
  538. package/lib/components/UnorderedList/UnorderedList.d.ts +34 -0
  539. package/lib/components/UnorderedList/UnorderedList.js +6 -16
  540. package/lib/components/UnorderedList/index.d.ts +7 -0
  541. package/lib/index.js +42 -43
  542. package/lib/internal/ClickListener.js +3 -13
  543. package/lib/internal/FloatingMenu.js +57 -63
  544. package/lib/internal/OptimizedResize.js +6 -12
  545. package/lib/internal/Selection.js +2 -25
  546. package/lib/internal/createClassWrapper.js +0 -2
  547. package/lib/internal/deprecateFieldOnObject.js +0 -4
  548. package/lib/internal/focus/index.js +0 -1
  549. package/lib/internal/keyboard/keys.js +2 -1
  550. package/lib/internal/keyboard/match.js +1 -6
  551. package/lib/internal/keyboard/navigation.js +8 -7
  552. package/lib/internal/useAnnouncer.js +0 -1
  553. package/lib/internal/useAttachedMenu.js +1 -9
  554. package/lib/internal/useControllableState.js +6 -13
  555. package/lib/internal/useDelayedState.js +2 -4
  556. package/lib/internal/useEffectOnce.js +0 -1
  557. package/lib/internal/useEvent.js +61 -2
  558. package/lib/internal/useId.js +2 -5
  559. package/lib/internal/useIsomorphicEffect.js +1 -0
  560. package/lib/internal/useMergedRefs.js +2 -2
  561. package/lib/internal/useNoInteractiveChildren.js +2 -13
  562. package/lib/internal/useNormalizedInputProps.js +0 -3
  563. package/lib/internal/useSavedCallback.js +1 -2
  564. package/lib/internal/warning.js +0 -3
  565. package/lib/internal/wrapFocus.js +1 -8
  566. package/lib/prop-types/deprecate.js +2 -5
  567. package/lib/prop-types/isRequiredOneOf.js +2 -5
  568. package/lib/prop-types/requiredIfGivenPropIsTruthy.js +0 -2
  569. package/lib/tools/array.js +0 -3
  570. package/lib/tools/events.js +0 -3
  571. package/lib/tools/mergeRefs.js +0 -2
  572. package/lib/tools/wrapComponent.js +2 -5
  573. package/package.json +9 -9
  574. package/es/components/Tab/Tab.js +0 -185
  575. package/es/components/Tab/index.js +0 -14
  576. package/es/components/TimePickerSelect/index.js +0 -13
  577. package/lib/components/Form/index.js +0 -17
  578. package/lib/components/Tab/Tab.js +0 -214
  579. package/lib/components/Tab/index.js +0 -39
  580. package/lib/components/TimePickerSelect/index.js +0 -38
@@ -14,7 +14,6 @@ import { WarningFilled, WarningAltFilled, Checkmark } from '@carbon/icons-react'
14
14
  import ListBox from '../ListBox/index.js';
15
15
  import mergeRefs from '../../tools/mergeRefs.js';
16
16
  import deprecate from '../../prop-types/deprecate.js';
17
- import { useFeatureFlag } from '../FeatureFlags/index.js';
18
17
  import { usePrefix } from '../../internal/usePrefix.js';
19
18
  import '../FluidForm/FluidForm.js';
20
19
  import { FormContext } from '../FluidForm/FormContext.js';
@@ -22,23 +21,18 @@ import setupGetInstanceId from '../../tools/setupGetInstanceId.js';
22
21
  import { ListBoxSize, ListBoxType } from '../ListBox/ListBoxPropTypes.js';
23
22
 
24
23
  const getInstanceId = setupGetInstanceId();
25
-
26
24
  const defaultItemToString = item => {
27
25
  if (typeof item === 'string') {
28
26
  return item;
29
27
  }
30
-
31
28
  if (typeof item === 'number') {
32
29
  return `${item}`;
33
30
  }
34
-
35
31
  if (item !== null && typeof item === 'object' && 'label' in item && typeof item['label'] === 'string') {
36
32
  return item['label'];
37
33
  }
38
-
39
34
  return '';
40
35
  };
41
-
42
36
  const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
43
37
  let {
44
38
  className: containerClassName,
@@ -74,7 +68,8 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
74
68
  const {
75
69
  isFluid
76
70
  } = useContext(FormContext);
77
- const selectProps = { ...downshiftProps,
71
+ const selectProps = {
72
+ ...downshiftProps,
78
73
  items,
79
74
  itemToString,
80
75
  initialSelectedItem,
@@ -82,13 +77,13 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
82
77
  };
83
78
  const {
84
79
  current: dropdownInstanceId
85
- } = useRef(getInstanceId()); // only set selectedItem if the prop is defined. Setting if it is undefined
86
- // will overwrite default selected items from useSelect
80
+ } = useRef(getInstanceId());
87
81
 
82
+ // only set selectedItem if the prop is defined. Setting if it is undefined
83
+ // will overwrite default selected items from useSelect
88
84
  if (controlledSelectedItem !== undefined) {
89
85
  selectProps.selectedItem = controlledSelectedItem;
90
86
  }
91
-
92
87
  const {
93
88
  isOpen,
94
89
  getToggleButtonProps,
@@ -100,9 +95,8 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
100
95
  } = useSelect(selectProps);
101
96
  const inline = type === 'inline';
102
97
  const showWarning = !invalid && warn;
103
- const enabled = useFeatureFlag('enable-v11-release');
104
98
  const [isFocused, setIsFocused] = useState(false);
105
- const className = cx(`${prefix}--dropdown`, [enabled ? null : containerClassName], {
99
+ const className = cx(`${prefix}--dropdown`, {
106
100
  [`${prefix}--dropdown--invalid`]: invalid,
107
101
  [`${prefix}--dropdown--warning`]: showWarning,
108
102
  [`${prefix}--dropdown--open`]: isOpen,
@@ -120,7 +114,7 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
120
114
  const helperClasses = cx(`${prefix}--form__helper-text`, {
121
115
  [`${prefix}--form__helper-text--disabled`]: disabled
122
116
  });
123
- const wrapperClasses = cx(`${prefix}--dropdown__wrapper`, `${prefix}--list-box__wrapper`, [enabled ? containerClassName : null], {
117
+ const wrapperClasses = cx(`${prefix}--dropdown__wrapper`, `${prefix}--list-box__wrapper`, containerClassName, {
124
118
  [`${prefix}--dropdown__wrapper--inline`]: inline,
125
119
  [`${prefix}--list-box__wrapper--inline`]: inline,
126
120
  [`${prefix}--dropdown__wrapper--inline--invalid`]: inline && invalid,
@@ -128,52 +122,74 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
128
122
  [`${prefix}--list-box__wrapper--fluid--invalid`]: isFluid && invalid,
129
123
  [`${prefix}--list-box__wrapper--fluid--focus`]: isFluid && isFocused && !isOpen
130
124
  });
131
- const helperId = !helperText ? undefined : `dropdown-helper-text-${dropdownInstanceId}`; // needs to be Capitalized for react to render it correctly
125
+ const helperId = !helperText ? undefined : `dropdown-helper-text-${dropdownInstanceId}`;
132
126
 
127
+ // needs to be Capitalized for react to render it correctly
133
128
  const ItemToElement = itemToElement;
134
129
  const toggleButtonProps = getToggleButtonProps();
135
130
  const helper = helperText && !isFluid ? /*#__PURE__*/React__default.createElement("div", {
136
131
  id: helperId,
137
132
  className: helperClasses
138
133
  }, helperText) : null;
139
-
140
134
  function onSelectedItemChange(_ref2) {
141
135
  let {
142
136
  selectedItem
143
137
  } = _ref2;
144
138
  setIsFocused(false);
145
-
146
139
  if (onChange) {
147
140
  onChange({
148
141
  selectedItem: selectedItem ?? null
149
142
  });
150
143
  }
151
144
  }
152
-
153
145
  const menuItemOptionRefs = useRef(items.map(_ => /*#__PURE__*/React__default.createRef()));
154
-
155
146
  const handleFocus = evt => {
156
147
  setIsFocused(evt.type === 'focus' ? true : false);
157
148
  };
158
-
159
149
  const mergedRef = mergeRefs(toggleButtonProps.ref, ref);
150
+ const [currTimer, setCurrTimer] = useState();
151
+
152
+ // eslint-disable-next-line prefer-const
153
+ let [isTyping, setIsTyping] = useState(false);
160
154
  const readOnlyEventHandlers = readOnly ? {
161
155
  onClick: evt => {
162
156
  // NOTE: does not prevent click
163
- evt.preventDefault(); // focus on the element as per readonly input behavior
164
-
157
+ evt.preventDefault();
158
+ // focus on the element as per readonly input behavior
165
159
  if (mergedRef.current !== undefined) {
166
160
  mergedRef.current.focus();
167
161
  }
168
162
  },
169
163
  onKeyDown: evt => {
170
- const selectAccessKeys = ['ArrowDown', 'ArrowUp', ' ', 'Enter']; // This prevents the select from opening for the above keys
171
-
164
+ const selectAccessKeys = ['ArrowDown', 'ArrowUp', ' ', 'Enter'];
165
+ // This prevents the select from opening for the above keys
172
166
  if (selectAccessKeys.includes(evt.key)) {
173
167
  evt.preventDefault();
174
168
  }
175
169
  }
176
- } : {};
170
+ } : {
171
+ onKeyDown: evt => {
172
+ console.log('typing should be false', isTyping);
173
+ if (evt.code !== 'Space' || !['ArrowDown', 'ArrowUp', ' ', 'Enter'].includes(evt.key)) {
174
+ setIsTyping(true);
175
+ }
176
+ if (isTyping && evt.code === 'Space' || !['ArrowDown', 'ArrowUp', ' ', 'Enter'].includes(evt.key)) {
177
+ console.log(evt.key);
178
+ if (evt.code === 'Space') {
179
+ evt.preventDefault();
180
+ return;
181
+ }
182
+ if (currTimer) {
183
+ clearTimeout(currTimer);
184
+ }
185
+ setCurrTimer(setTimeout(() => {
186
+ setIsTyping(false);
187
+ }, 3000));
188
+ }
189
+ toggleButtonProps.onKeyDown(evt);
190
+ }
191
+ };
192
+ const menuProps = getMenuProps();
177
193
  return /*#__PURE__*/React__default.createElement("div", _extends({
178
194
  className: wrapperClasses
179
195
  }, other), titleText && /*#__PURE__*/React__default.createElement("label", _extends({
@@ -196,7 +212,8 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
196
212
  }), showWarning && /*#__PURE__*/React__default.createElement(WarningAltFilled, {
197
213
  className: `${prefix}--list-box__invalid-icon ${prefix}--list-box__invalid-icon--warning`
198
214
  }), /*#__PURE__*/React__default.createElement("button", _extends({
199
- type: "button" // aria-expanded is already being passed through {...toggleButtonProps}
215
+ type: "button"
216
+ // aria-expanded is already being passed through {...toggleButtonProps}
200
217
  ,
201
218
  role: "combobox" // eslint-disable-line jsx-a11y/role-has-required-aria-props
202
219
  ,
@@ -214,7 +231,7 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
214
231
  }, selectedItem ? renderSelectedItem ? renderSelectedItem(selectedItem) : itemToString(selectedItem) : label), /*#__PURE__*/React__default.createElement(ListBox.MenuIcon, {
215
232
  isOpen: isOpen,
216
233
  translateWithId: translateWithId
217
- })), /*#__PURE__*/React__default.createElement(ListBox.Menu, getMenuProps(), isOpen && items.map((item, index) => {
234
+ })), /*#__PURE__*/React__default.createElement(ListBox.Menu, menuProps, isOpen && items.map((item, index) => {
218
235
  const isObject = item !== null && typeof item === 'object';
219
236
  const disabled = isObject && 'disabled' in item && item.disabled === true;
220
237
  const itemProps = getItemProps({
@@ -245,143 +262,117 @@ Dropdown.propTypes = {
245
262
  * Specify a label to be read by screen readers on the container node
246
263
  */
247
264
  ['aria-label']: PropTypes.string,
248
-
249
265
  /**
250
266
  * Deprecated, please use `aria-label` instead.
251
267
  * Specify a label to be read by screen readers on the container note.
252
268
  */
253
269
  ariaLabel: deprecate(PropTypes.string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
254
-
255
270
  /**
256
271
  * Provide a custom className to be applied on the bx--dropdown node
257
272
  */
258
273
  className: PropTypes.string,
259
-
260
274
  /**
261
275
  * Specify the direction of the dropdown. Can be either top or bottom.
262
276
  */
263
277
  direction: PropTypes.oneOf(['top', 'bottom']),
264
-
265
278
  /**
266
279
  * Disable the control
267
280
  */
268
281
  disabled: PropTypes.bool,
269
-
270
282
  /**
271
283
  * Additional props passed to Downshift
272
284
  */
273
285
  downshiftProps: PropTypes.object,
274
-
275
286
  /**
276
287
  * Provide helper text that is used alongside the control label for
277
288
  * additional help
278
289
  */
279
290
  helperText: PropTypes.node,
280
-
281
291
  /**
282
292
  * Specify whether the title text should be hidden or not
283
293
  */
284
294
  hideLabel: PropTypes.bool,
285
-
286
295
  /**
287
296
  * Specify a custom `id`
288
297
  */
289
298
  id: PropTypes.string.isRequired,
290
-
291
299
  /**
292
300
  * Allow users to pass in an arbitrary item or a string (in case their items are an array of strings)
293
301
  * from their collection that are pre-selected
294
302
  */
295
303
  initialSelectedItem: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.number]),
296
-
297
304
  /**
298
305
  * Specify if the currently selected value is invalid.
299
306
  */
300
307
  invalid: PropTypes.bool,
301
-
302
308
  /**
303
309
  * Message which is displayed if the value is invalid.
304
310
  */
305
311
  invalidText: PropTypes.node,
306
-
307
312
  /**
308
313
  * Function to render items as custom components instead of strings.
309
314
  * Defaults to null and is overridden by a getter
310
315
  */
311
316
  itemToElement: PropTypes.func,
312
-
313
317
  /**
314
318
  * Helper function passed to downshift that allows the library to render a
315
319
  * given item to a string label. By default, it extracts the `label` field
316
320
  * from a given item to serve as the item label in the list.
317
321
  */
318
322
  itemToString: PropTypes.func,
319
-
320
323
  /**
321
324
  * We try to stay as generic as possible here to allow individuals to pass
322
325
  * in a collection of whatever kind of data structure they prefer
323
326
  */
324
327
  items: PropTypes.array.isRequired,
325
-
326
328
  /**
327
329
  * Generic `label` that will be used as the textual representation of what
328
330
  * this field is for
329
331
  */
330
332
  label: PropTypes.node.isRequired,
331
-
332
333
  /**
333
334
  * `true` to use the light version.
334
335
  */
335
336
  light: deprecate(PropTypes.bool, 'The `light` prop for `Dropdown` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
336
-
337
337
  /**
338
338
  * `onChange` is a utility for this controlled component to communicate to a
339
339
  * consuming component what kind of internal state changes are occurring.
340
340
  */
341
341
  onChange: PropTypes.func,
342
-
343
342
  /**
344
343
  * Whether or not the Dropdown is readonly
345
344
  */
346
345
  readOnly: PropTypes.bool,
347
-
348
346
  /**
349
347
  * An optional callback to render the currently selected item as a react element instead of only
350
348
  * as a string.
351
349
  */
352
350
  renderSelectedItem: PropTypes.func,
353
-
354
351
  /**
355
352
  * In the case you want to control the dropdown selection entirely.
356
353
  */
357
354
  selectedItem: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.number]),
358
-
359
355
  /**
360
356
  * Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
361
357
  */
362
358
  size: ListBoxSize,
363
-
364
359
  /**
365
360
  * Provide the title text that will be read by a screen reader when
366
361
  * visiting this control
367
362
  */
368
363
  titleText: PropTypes.node.isRequired,
369
-
370
364
  /**
371
365
  * Callback function for translating ListBoxMenuIcon SVG title
372
366
  */
373
367
  translateWithId: PropTypes.func,
374
-
375
368
  /**
376
369
  * The dropdown type, `default` or `inline`
377
370
  */
378
371
  type: ListBoxType,
379
-
380
372
  /**
381
373
  * Specify whether the control is currently in warning state
382
374
  */
383
375
  warn: PropTypes.bool,
384
-
385
376
  /**
386
377
  * Provide the text that is displayed when the control is in warning state
387
378
  */
@@ -27,26 +27,21 @@ import { ErrorBoundaryContext } from './ErrorBoundaryContext.js';
27
27
  * Reference:
28
28
  * https://reactjs.org/docs/error-boundaries.html#introducing-error-boundaries
29
29
  */
30
-
31
30
  class ErrorBoundary extends React__default.Component {
32
31
  constructor() {
33
32
  super(...arguments);
34
-
35
33
  _defineProperty(this, "state", {
36
34
  hasError: false
37
35
  });
38
36
  }
39
-
40
37
  static getDerivedStateFromError() {
41
38
  return {
42
39
  hasError: true
43
40
  };
44
41
  }
45
-
46
42
  componentDidCatch(error, info) {
47
43
  this.context.log(error, info);
48
44
  }
49
-
50
45
  componentDidUpdate(prevProps) {
51
46
  if (prevProps.children !== this.props.children) {
52
47
  this.setState({
@@ -54,22 +49,17 @@ class ErrorBoundary extends React__default.Component {
54
49
  });
55
50
  }
56
51
  }
57
-
58
52
  render() {
59
53
  if (this.state.hasError) {
60
54
  return this.props.fallback;
61
55
  }
62
-
63
56
  return this.props.children;
64
57
  }
65
-
66
58
  }
67
-
68
59
  _defineProperty(ErrorBoundary, "propTypes", {
69
60
  children: PropTypes.node,
70
61
  fallback: PropTypes.node
71
62
  });
72
-
73
63
  _defineProperty(ErrorBoundary, "contextType", ErrorBoundaryContext);
74
64
 
75
65
  export { ErrorBoundary as default };
@@ -11,7 +11,6 @@ const ErrorBoundaryContext = /*#__PURE__*/createContext({
11
11
  log(error, info) {
12
12
  console.log(info.componentStack);
13
13
  }
14
-
15
14
  });
16
15
 
17
16
  export { ErrorBoundaryContext };
@@ -25,31 +25,23 @@ function ExpandableSearch(_ref) {
25
25
  const [hasContent, setHasContent] = useState(false);
26
26
  const searchRef = useRef(null);
27
27
  const prefix = usePrefix();
28
-
29
28
  function handleFocus() {
30
29
  if (!expanded) {
31
30
  setExpanded(true);
32
31
  }
33
32
  }
34
-
35
33
  function handleBlur(evt) {
36
34
  const relatedTargetIsAllowed = evt.relatedTarget && evt.relatedTarget.classList.contains(`${prefix}--search-close`);
37
-
38
35
  if (expanded && !relatedTargetIsAllowed && !hasContent) {
39
36
  setExpanded(false);
40
37
  }
41
38
  }
42
-
43
39
  function handleChange(evt) {
44
40
  setHasContent(evt.target.value !== '');
45
41
  }
46
-
47
42
  function handleExpand() {
48
- var _searchRef$current, _searchRef$current$fo;
49
-
50
- (_searchRef$current = searchRef.current) === null || _searchRef$current === void 0 ? void 0 : (_searchRef$current$fo = _searchRef$current.focus) === null || _searchRef$current$fo === void 0 ? void 0 : _searchRef$current$fo.call(_searchRef$current);
43
+ searchRef.current?.focus?.();
51
44
  }
52
-
53
45
  const classes = cx(`${prefix}--search--expandable`, {
54
46
  [`${prefix}--search--expanded`]: expanded
55
47
  }, props.className);
@@ -62,7 +54,6 @@ function ExpandableSearch(_ref) {
62
54
  onExpand: composeEventHandlers([onExpand, handleExpand])
63
55
  }));
64
56
  }
65
-
66
57
  ExpandableSearch.propTypes = Search.propTypes;
67
58
  ExpandableSearch.displayName = 'ExpandableSearch';
68
59
 
@@ -13,14 +13,13 @@ import React__default, { useContext, useState, useRef, useEffect, createContext
13
13
  * Our FeatureFlagContext is used alongside the FeatureFlags component to enable
14
14
  * or disable feature flags in a given React tree
15
15
  */
16
-
17
16
  const FeatureFlagContext = /*#__PURE__*/createContext(FeatureFlags$1);
17
+
18
18
  /**
19
19
  * Supports an object of feature flag values with the `flags` prop, merging them
20
20
  * along with the current `FeatureFlagContext` to provide consumers to check if
21
21
  * a feature flag is enabled or disabled in a given React tree
22
22
  */
23
-
24
23
  function FeatureFlags(_ref) {
25
24
  let {
26
25
  children,
@@ -33,17 +32,16 @@ function FeatureFlags(_ref) {
33
32
  scope.mergeWithScope(parentScope);
34
33
  return scope;
35
34
  });
36
-
37
35
  if (parentScope !== prevParentScope) {
38
36
  const scope = createScope(flags);
39
37
  scope.mergeWithScope(parentScope);
40
38
  updateScope(scope);
41
39
  setPrevParentScope(parentScope);
42
- } // We use a custom hook to detect if any of the keys or their values change
40
+ }
41
+
42
+ // We use a custom hook to detect if any of the keys or their values change
43
43
  // for flags that are passed in. If they have changed, then we re-create the
44
44
  // FeatureFlagScope using the new flags
45
-
46
-
47
45
  useChangedValue(flags, isEqual, changedFlags => {
48
46
  const scope = createScope(changedFlags);
49
47
  scope.mergeWithScope(parentScope);
@@ -53,15 +51,14 @@ function FeatureFlags(_ref) {
53
51
  value: scope
54
52
  }, children);
55
53
  }
56
-
57
54
  FeatureFlags.propTypes = {
58
55
  children: PropTypes.node,
59
-
60
56
  /**
61
57
  * Provide the feature flags to enabled or disabled in the current React tree
62
58
  */
63
59
  flags: PropTypes.objectOf(PropTypes.bool)
64
60
  };
61
+
65
62
  /**
66
63
  * This hook will store previous versions of the given `value` and compare the
67
64
  * current value to the previous one using the `compare` function. If the
@@ -72,16 +69,13 @@ FeatureFlags.propTypes = {
72
69
  * @param {Function} compare
73
70
  * @param {Function} callback
74
71
  */
75
-
76
72
  function useChangedValue(value, compare, callback) {
77
73
  const initialRender = useRef(false);
78
74
  const savedCallback = useRef(callback);
79
75
  const [prevValue, setPrevValue] = useState(value);
80
-
81
76
  if (!compare(prevValue, value)) {
82
77
  setPrevValue(value);
83
78
  }
84
-
85
79
  useEffect(() => {
86
80
  savedCallback.current = callback;
87
81
  });
@@ -95,28 +89,27 @@ function useChangedValue(value, compare, callback) {
95
89
  initialRender.current = true;
96
90
  }, []);
97
91
  }
92
+
98
93
  /**
99
94
  * Access whether a given flag is enabled or disabled in a given
100
95
  * FeatureFlagContext
101
96
  *
102
97
  * @returns {boolean}
103
98
  */
104
-
105
-
106
99
  function useFeatureFlag(flag) {
107
100
  const scope = useContext(FeatureFlagContext);
108
101
  return scope.enabled(flag);
109
102
  }
103
+
110
104
  /**
111
105
  * Access all feature flag information for the given FeatureFlagContext
112
106
  *
113
107
  * @returns {FeatureFlagScope}
114
108
  */
115
-
116
-
117
109
  function useFeatureFlags() {
118
110
  return useContext(FeatureFlagContext);
119
111
  }
112
+
120
113
  /**
121
114
  * Compare two objects and determine if they are equal. This is a shallow
122
115
  * comparison since the objects we are comparing are objects with boolean flags
@@ -126,25 +119,20 @@ function useFeatureFlags() {
126
119
  * @param {object} b
127
120
  * @returns {boolean}
128
121
  */
129
-
130
-
131
122
  function isEqual(a, b) {
132
123
  if (a === b) {
133
124
  return true;
134
125
  }
135
-
136
126
  for (const key of Object.keys(a)) {
137
127
  if (a[key] !== b[key]) {
138
128
  return false;
139
129
  }
140
130
  }
141
-
142
131
  for (const key of Object.keys(b)) {
143
132
  if (b[key] !== a[key]) {
144
133
  return false;
145
134
  }
146
135
  }
147
-
148
136
  return true;
149
137
  }
150
138
 
@@ -14,7 +14,6 @@ import ButtonSkeleton from '../Button/Button.Skeleton.js';
14
14
  import { usePrefix } from '../../internal/usePrefix.js';
15
15
 
16
16
  var _SkeletonText, _ButtonSkeleton;
17
-
18
17
  function FileUploaderSkeleton(_ref) {
19
18
  let {
20
19
  className,
@@ -31,7 +30,6 @@ function FileUploaderSkeleton(_ref) {
31
30
  className: `${prefix}--label-description`
32
31
  }), _ButtonSkeleton || (_ButtonSkeleton = /*#__PURE__*/React__default.createElement(ButtonSkeleton, null)));
33
32
  }
34
-
35
33
  FileUploaderSkeleton.propTypes = {
36
34
  /**
37
35
  * Specify an optional className to add.