@carbon/ibm-products 2.43.2-canary.11 → 2.43.2-canary.112

Sign up to get free protection for your applications and to get access to all the features.
Files changed (416) hide show
  1. package/css/config-dev.css +6 -1
  2. package/css/config-dev.css.map +1 -1
  3. package/css/config.css +6 -1
  4. package/css/config.css.map +1 -1
  5. package/css/index-full-carbon.css +1846 -499
  6. package/css/index-full-carbon.css.map +1 -1
  7. package/css/index-full-carbon.min.css +1 -1
  8. package/css/index-full-carbon.min.css.map +1 -1
  9. package/css/index-without-carbon-released-only.css +267 -65
  10. package/css/index-without-carbon-released-only.css.map +1 -1
  11. package/css/index-without-carbon-released-only.min.css +1 -1
  12. package/css/index-without-carbon-released-only.min.css.map +1 -1
  13. package/css/index-without-carbon.css +1455 -250
  14. package/css/index-without-carbon.css.map +1 -1
  15. package/css/index-without-carbon.min.css +1 -1
  16. package/css/index-without-carbon.min.css.map +1 -1
  17. package/css/index.css +1651 -369
  18. package/css/index.css.map +1 -1
  19. package/css/index.min.css +1 -1
  20. package/css/index.min.css.map +1 -1
  21. package/es/components/APIKeyModal/APIKeyModal.types.d.ts +6 -0
  22. package/es/components/ActionBar/ActionBar.d.ts +58 -2
  23. package/es/components/ActionBar/ActionBar.js +14 -9
  24. package/es/components/ActionBar/ActionBarItem.d.ts +36 -2
  25. package/es/components/ActionBar/ActionBarItem.js +8 -5
  26. package/es/components/ActionBar/ActionBarOverflowItems.d.ts +55 -16
  27. package/es/components/ActionBar/ActionBarOverflowItems.js +8 -4
  28. package/es/components/AddSelect/types/index.d.ts +6 -0
  29. package/es/components/Card/Card.d.ts +68 -2
  30. package/es/components/Card/Card.js +28 -35
  31. package/es/components/Card/CardFooter.d.ts +51 -48
  32. package/es/components/Card/CardFooter.js +4 -2
  33. package/es/components/Card/CardHeader.d.ts +67 -49
  34. package/es/components/Card/CardHeader.js +4 -2
  35. package/es/components/Coachmark/Coachmark.d.ts +6 -1
  36. package/es/components/Coachmark/Coachmark.js +47 -11
  37. package/es/components/Coachmark/CoachmarkOverlay.js +2 -4
  38. package/es/components/Coachmark/utils/enums.d.ts +6 -0
  39. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -7
  40. package/es/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
  41. package/es/components/CoachmarkStack/CoachmarkStack.js +7 -3
  42. package/es/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
  43. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +1 -0
  44. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +90 -56
  45. package/es/components/ConditionBuilder/ConditionBuilder.js +82 -25
  46. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
  47. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +154 -0
  48. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
  49. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +29 -13
  50. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
  51. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +35 -11
  52. package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +18 -10
  53. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +19 -11
  54. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -13
  55. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +83 -64
  56. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +13 -7
  57. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +31 -8
  58. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
  59. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +35 -24
  60. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +43 -36
  61. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +43 -36
  62. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +6 -2
  63. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +114 -40
  64. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
  65. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
  66. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +27 -9
  67. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
  68. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +114 -0
  69. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
  70. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +71 -38
  71. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
  72. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +22 -9
  73. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
  74. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
  75. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +131 -42
  76. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +5 -1
  77. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +51 -19
  78. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +2 -1
  79. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +152 -42
  80. package/es/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
  81. package/es/components/ConditionBuilder/utils/useTranslations.js +26 -0
  82. package/es/components/ConditionBuilder/utils/util.d.ts +6 -4
  83. package/es/components/ConditionBuilder/utils/util.js +42 -17
  84. package/es/components/CreateFullPage/CreateFullPage.js +2 -2
  85. package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +26 -0
  86. package/es/components/DataSpreadsheet/DataSpreadsheet.js +129 -53
  87. package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +16 -0
  88. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +32 -7
  89. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
  90. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +16 -3
  91. package/es/components/DataSpreadsheet/types/index.d.ts +7 -0
  92. package/es/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
  93. package/es/components/Datagrid/Datagrid/Datagrid.js +4 -9
  94. package/es/components/Datagrid/Datagrid/DatagridBody.d.ts +6 -0
  95. package/es/components/Datagrid/Datagrid/DatagridContent.js +4 -3
  96. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
  97. package/es/components/Datagrid/Datagrid/DatagridRefBody.d.ts +6 -0
  98. package/es/components/Datagrid/Datagrid/DatagridRow.js +21 -8
  99. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +6 -6
  100. package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  101. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.d.ts +6 -0
  102. package/es/components/Datagrid/Datagrid/DraggableElement.d.ts +6 -0
  103. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +34 -10
  104. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
  105. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
  106. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +6 -3
  107. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +20 -12
  108. package/es/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +7 -0
  109. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
  110. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +54 -17
  111. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  112. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +75 -12
  113. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
  114. package/es/components/Datagrid/common-column-ids.d.ts +6 -0
  115. package/es/components/Datagrid/types/index.d.ts +63 -9
  116. package/es/components/Datagrid/useActionsColumn.d.ts +8 -1
  117. package/es/components/Datagrid/useActionsColumn.js +7 -6
  118. package/es/components/Datagrid/useColumnRightAlign.d.ts +8 -1
  119. package/es/components/Datagrid/useColumnRightAlign.js +4 -3
  120. package/es/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  121. package/es/components/Datagrid/useCustomizeColumns.js +4 -3
  122. package/es/components/Datagrid/useDatagrid.d.ts +6 -0
  123. package/es/components/Datagrid/useDefaultStringRenderer.js +0 -1
  124. package/es/components/Datagrid/useDisableSelectRows.d.ts +8 -1
  125. package/es/components/Datagrid/useDisableSelectRows.js +27 -22
  126. package/es/components/Datagrid/useInlineEdit.js +12 -2
  127. package/es/components/Datagrid/useNestedRowExpander.js +1 -3
  128. package/es/components/Datagrid/useNestedRows.js +32 -13
  129. package/es/components/Datagrid/useRowExpander.js +1 -3
  130. package/es/components/Datagrid/useRowIsMouseOver.d.ts +6 -0
  131. package/es/components/Datagrid/useSelectRows.js +2 -1
  132. package/es/components/Datagrid/useStickyColumn.d.ts +8 -1
  133. package/es/components/Datagrid/useStickyColumn.js +12 -9
  134. package/es/components/EditInPlace/EditInPlace.d.ts +4 -0
  135. package/es/components/EditInPlace/EditInPlace.js +21 -10
  136. package/es/components/EditTearsheet/EditTearsheet.d.ts +7 -2
  137. package/es/components/EditTearsheet/EditTearsheet.js +44 -10
  138. package/es/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
  139. package/es/components/EditTearsheet/EditTearsheetForm.js +3 -0
  140. package/es/components/EmptyStates/EmptyState.d.ts +72 -5
  141. package/es/components/EmptyStates/EmptyState.js +8 -5
  142. package/es/components/EmptyStates/EmptyStateV2.d.ts +63 -2
  143. package/es/components/EmptyStates/EmptyStateV2.js +3 -2
  144. package/es/components/FullPageError/FullPageError.d.ts +36 -2
  145. package/es/components/FullPageError/FullPageError.js +0 -3
  146. package/es/components/GetStartedCard/GetStartedCard.d.ts +60 -2
  147. package/es/components/GetStartedCard/GetStartedCard.js +11 -10
  148. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  149. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  150. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  151. package/es/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
  152. package/es/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
  153. package/es/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
  154. package/es/components/Nav/NavItem.js +12 -3
  155. package/es/components/OptionsTile/OptionsTile.js +11 -6
  156. package/es/components/PageHeader/PageHeader.js +1 -0
  157. package/es/components/PageHeader/PageHeaderUtils.js +1 -1
  158. package/es/components/RemoveModal/RemoveModal.d.ts +4 -0
  159. package/es/components/RemoveModal/RemoveModal.js +7 -1
  160. package/es/components/SearchBar/SearchBar.d.ts +1 -1
  161. package/es/components/SearchBar/SearchBar.js +2 -2
  162. package/es/components/SidePanel/SidePanel.js +17 -21
  163. package/es/components/SidePanel/motion/variants.d.ts +4 -6
  164. package/es/components/SidePanel/motion/variants.js +10 -11
  165. package/es/components/StatusIndicator/StatusIndicatorStep.js +87 -0
  166. package/es/components/StringFormatter/StringFormatter.js +14 -3
  167. package/es/components/StringFormatter/utils/enums.d.ts +20 -1
  168. package/es/components/StringFormatter/utils/enums.js +29 -2
  169. package/es/components/TagOverflow/TagOverflow.d.ts +35 -4
  170. package/es/components/TagOverflow/TagOverflow.js +47 -64
  171. package/es/components/TagOverflow/TagOverflowModal.js +4 -6
  172. package/es/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
  173. package/es/components/TagOverflow/TagOverflowPopover.js +38 -41
  174. package/es/components/Tearsheet/Tearsheet.d.ts +8 -1
  175. package/es/components/Tearsheet/Tearsheet.js +9 -1
  176. package/es/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
  177. package/es/components/Tearsheet/TearsheetNarrow.js +12 -0
  178. package/es/components/Tearsheet/TearsheetShell.d.ts +11 -1
  179. package/es/components/Tearsheet/TearsheetShell.js +28 -7
  180. package/es/components/Toolbar/ToolbarButton.js +1 -1
  181. package/es/components/UserAvatar/UserAvatar.d.ts +59 -1
  182. package/es/components/UserAvatar/UserAvatar.js +7 -23
  183. package/es/components/WebTerminal/WebTerminal.js +10 -12
  184. package/es/components/index.d.ts +1 -1
  185. package/es/global/js/hooks/useFocus.d.ts +1 -0
  186. package/es/global/js/hooks/useFocus.js +5 -2
  187. package/es/global/js/hooks/usePrefersReducedMotion.js +14 -8
  188. package/es/global/js/package-settings.d.ts +1 -1
  189. package/es/global/js/package-settings.js +1 -1
  190. package/es/global/js/utils/scrollableAncestor.js +7 -0
  191. package/es/global/js/utils/uuidv4.d.ts +6 -0
  192. package/es/global/js/utils/uuidv4.js +2 -0
  193. package/es/global/js/utils/wait.d.ts +6 -0
  194. package/es/global/js/utils/wait.js +2 -0
  195. package/es/index.js +1 -0
  196. package/es/node_modules/@carbon/icon-helpers/es/index.js +49 -62
  197. package/es/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1020 -1058
  198. package/es/node_modules/@carbon/icons-react/es/generated/bucket-9.js +881 -758
  199. package/es/settings.d.ts +1 -1
  200. package/flags.js +7 -0
  201. package/lib/components/APIKeyModal/APIKeyModal.types.d.ts +6 -0
  202. package/lib/components/ActionBar/ActionBar.d.ts +58 -2
  203. package/lib/components/ActionBar/ActionBar.js +14 -9
  204. package/lib/components/ActionBar/ActionBarItem.d.ts +36 -2
  205. package/lib/components/ActionBar/ActionBarItem.js +7 -4
  206. package/lib/components/ActionBar/ActionBarOverflowItems.d.ts +55 -16
  207. package/lib/components/ActionBar/ActionBarOverflowItems.js +8 -4
  208. package/lib/components/AddSelect/types/index.d.ts +6 -0
  209. package/lib/components/Card/Card.d.ts +68 -2
  210. package/lib/components/Card/Card.js +28 -35
  211. package/lib/components/Card/CardFooter.d.ts +51 -48
  212. package/lib/components/Card/CardFooter.js +4 -2
  213. package/lib/components/Card/CardHeader.d.ts +67 -49
  214. package/lib/components/Card/CardHeader.js +4 -2
  215. package/lib/components/Coachmark/Coachmark.d.ts +6 -1
  216. package/lib/components/Coachmark/Coachmark.js +46 -10
  217. package/lib/components/Coachmark/CoachmarkOverlay.js +2 -4
  218. package/lib/components/Coachmark/utils/enums.d.ts +6 -0
  219. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -7
  220. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
  221. package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -3
  222. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
  223. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +1 -0
  224. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +87 -53
  225. package/lib/components/ConditionBuilder/ConditionBuilder.js +82 -25
  226. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
  227. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +163 -0
  228. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
  229. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +28 -11
  230. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
  231. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +33 -9
  232. package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +16 -8
  233. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +18 -10
  234. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -13
  235. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +81 -62
  236. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +13 -7
  237. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +31 -8
  238. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
  239. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +34 -24
  240. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +43 -36
  241. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +43 -36
  242. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +6 -2
  243. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +112 -38
  244. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
  245. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
  246. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +28 -10
  247. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
  248. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +122 -0
  249. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
  250. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +68 -35
  251. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
  252. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +21 -8
  253. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
  254. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
  255. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +128 -39
  256. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +5 -1
  257. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +50 -17
  258. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +2 -1
  259. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +152 -41
  260. package/lib/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
  261. package/lib/components/ConditionBuilder/utils/useTranslations.js +30 -0
  262. package/lib/components/ConditionBuilder/utils/util.d.ts +6 -4
  263. package/lib/components/ConditionBuilder/utils/util.js +44 -16
  264. package/lib/components/CreateFullPage/CreateFullPage.js +2 -2
  265. package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +26 -0
  266. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +129 -53
  267. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +16 -0
  268. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +32 -7
  269. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
  270. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +16 -3
  271. package/lib/components/DataSpreadsheet/types/index.d.ts +7 -0
  272. package/lib/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
  273. package/lib/components/Datagrid/Datagrid/Datagrid.js +4 -9
  274. package/lib/components/Datagrid/Datagrid/DatagridBody.d.ts +6 -0
  275. package/lib/components/Datagrid/Datagrid/DatagridContent.js +4 -3
  276. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
  277. package/lib/components/Datagrid/Datagrid/DatagridRefBody.d.ts +6 -0
  278. package/lib/components/Datagrid/Datagrid/DatagridRow.js +21 -8
  279. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +6 -6
  280. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  281. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.d.ts +6 -0
  282. package/lib/components/Datagrid/Datagrid/DraggableElement.d.ts +6 -0
  283. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +34 -10
  284. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
  285. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
  286. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +6 -3
  287. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +20 -12
  288. package/lib/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +7 -0
  289. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
  290. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +53 -16
  291. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  292. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +74 -11
  293. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
  294. package/lib/components/Datagrid/common-column-ids.d.ts +6 -0
  295. package/lib/components/Datagrid/types/index.d.ts +63 -9
  296. package/lib/components/Datagrid/useActionsColumn.d.ts +8 -1
  297. package/lib/components/Datagrid/useActionsColumn.js +7 -6
  298. package/lib/components/Datagrid/useColumnRightAlign.d.ts +8 -1
  299. package/lib/components/Datagrid/useColumnRightAlign.js +4 -3
  300. package/lib/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  301. package/lib/components/Datagrid/useCustomizeColumns.js +4 -3
  302. package/lib/components/Datagrid/useDatagrid.d.ts +6 -0
  303. package/lib/components/Datagrid/useDefaultStringRenderer.js +0 -1
  304. package/lib/components/Datagrid/useDisableSelectRows.d.ts +8 -1
  305. package/lib/components/Datagrid/useDisableSelectRows.js +27 -22
  306. package/lib/components/Datagrid/useInlineEdit.js +12 -2
  307. package/lib/components/Datagrid/useNestedRowExpander.js +1 -3
  308. package/lib/components/Datagrid/useNestedRows.js +32 -13
  309. package/lib/components/Datagrid/useRowExpander.js +1 -3
  310. package/lib/components/Datagrid/useRowIsMouseOver.d.ts +6 -0
  311. package/lib/components/Datagrid/useSelectRows.js +2 -1
  312. package/lib/components/Datagrid/useStickyColumn.d.ts +8 -1
  313. package/lib/components/Datagrid/useStickyColumn.js +12 -9
  314. package/lib/components/EditInPlace/EditInPlace.d.ts +4 -0
  315. package/lib/components/EditInPlace/EditInPlace.js +21 -10
  316. package/lib/components/EditTearsheet/EditTearsheet.d.ts +7 -2
  317. package/lib/components/EditTearsheet/EditTearsheet.js +43 -9
  318. package/lib/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
  319. package/lib/components/EditTearsheet/EditTearsheetForm.js +3 -0
  320. package/lib/components/EmptyStates/EmptyState.d.ts +72 -5
  321. package/lib/components/EmptyStates/EmptyState.js +8 -5
  322. package/lib/components/EmptyStates/EmptyStateV2.d.ts +63 -2
  323. package/lib/components/EmptyStates/EmptyStateV2.js +3 -2
  324. package/lib/components/FullPageError/FullPageError.d.ts +36 -2
  325. package/lib/components/FullPageError/FullPageError.js +0 -3
  326. package/lib/components/GetStartedCard/GetStartedCard.d.ts +60 -2
  327. package/lib/components/GetStartedCard/GetStartedCard.js +10 -9
  328. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  329. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  330. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  331. package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
  332. package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
  333. package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
  334. package/lib/components/Nav/NavItem.js +10 -1
  335. package/lib/components/OptionsTile/OptionsTile.js +11 -6
  336. package/lib/components/PageHeader/PageHeader.js +1 -0
  337. package/lib/components/PageHeader/PageHeaderUtils.js +1 -1
  338. package/lib/components/RemoveModal/RemoveModal.d.ts +4 -0
  339. package/lib/components/RemoveModal/RemoveModal.js +7 -1
  340. package/lib/components/SearchBar/SearchBar.d.ts +1 -1
  341. package/lib/components/SearchBar/SearchBar.js +2 -2
  342. package/lib/components/SidePanel/SidePanel.js +16 -20
  343. package/lib/components/SidePanel/motion/variants.d.ts +4 -6
  344. package/lib/components/SidePanel/motion/variants.js +10 -11
  345. package/lib/components/StatusIndicator/StatusIndicatorStep.js +94 -0
  346. package/lib/components/StringFormatter/StringFormatter.js +13 -2
  347. package/lib/components/StringFormatter/utils/enums.d.ts +20 -1
  348. package/lib/components/StringFormatter/utils/enums.js +30 -1
  349. package/lib/components/TagOverflow/TagOverflow.d.ts +35 -4
  350. package/lib/components/TagOverflow/TagOverflow.js +46 -63
  351. package/lib/components/TagOverflow/TagOverflowModal.js +4 -6
  352. package/lib/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
  353. package/lib/components/TagOverflow/TagOverflowPopover.js +37 -40
  354. package/lib/components/Tearsheet/Tearsheet.d.ts +8 -1
  355. package/lib/components/Tearsheet/Tearsheet.js +9 -1
  356. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
  357. package/lib/components/Tearsheet/TearsheetNarrow.js +12 -0
  358. package/lib/components/Tearsheet/TearsheetShell.d.ts +11 -1
  359. package/lib/components/Tearsheet/TearsheetShell.js +26 -5
  360. package/lib/components/Toolbar/ToolbarButton.js +1 -1
  361. package/lib/components/UserAvatar/UserAvatar.d.ts +59 -1
  362. package/lib/components/UserAvatar/UserAvatar.js +7 -23
  363. package/lib/components/WebTerminal/WebTerminal.js +10 -12
  364. package/lib/components/index.d.ts +1 -1
  365. package/lib/global/js/hooks/useFocus.d.ts +1 -0
  366. package/lib/global/js/hooks/useFocus.js +5 -1
  367. package/lib/global/js/hooks/usePrefersReducedMotion.js +13 -7
  368. package/lib/global/js/package-settings.d.ts +1 -1
  369. package/lib/global/js/package-settings.js +1 -1
  370. package/lib/global/js/utils/scrollableAncestor.js +7 -0
  371. package/lib/global/js/utils/uuidv4.d.ts +6 -0
  372. package/lib/global/js/utils/uuidv4.js +2 -0
  373. package/lib/global/js/utils/wait.d.ts +6 -0
  374. package/lib/global/js/utils/wait.js +2 -0
  375. package/lib/index.js +5 -0
  376. package/lib/node_modules/@carbon/icon-helpers/es/index.js +49 -62
  377. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1036 -1074
  378. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +946 -823
  379. package/lib/settings.d.ts +1 -1
  380. package/package.json +8 -7
  381. package/scss/components/Coachmark/_coachmark-overlay.scss +6 -70
  382. package/scss/components/Coachmark/_coachmark.scss +5 -4
  383. package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +1 -3
  384. package/scss/components/ConditionBuilder/_condition-builder.scss +8 -1
  385. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +38 -5
  386. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +68 -22
  387. package/scss/components/ConditionBuilder/styles/_index.scss +7 -0
  388. package/scss/components/CreateModal/_create-modal.scss +0 -4
  389. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +16 -2
  390. package/scss/components/Datagrid/_datagrid.scss +0 -4
  391. package/scss/components/Datagrid/styles/_datagrid.scss +1 -0
  392. package/scss/components/Datagrid/styles/_useActionsColumn.scss +6 -7
  393. package/scss/components/Datagrid/styles/_useColumnRightAlign.scss +6 -7
  394. package/scss/components/Datagrid/styles/_useExpandedRow.scss +6 -7
  395. package/scss/components/Datagrid/styles/_useInlineEdit.scss +19 -7
  396. package/scss/components/Datagrid/styles/_useNestedRows.scss +6 -7
  397. package/scss/components/Datagrid/styles/_useNestedTable.scss +6 -7
  398. package/scss/components/Datagrid/styles/_useStickyColumn.scss +6 -7
  399. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +7 -5
  400. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +5 -4
  401. package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +6 -7
  402. package/scss/components/HTTPErrors/_http-errors.scss +77 -0
  403. package/scss/components/OptionsTile/_options-tile.scss +6 -6
  404. package/scss/components/SidePanel/_side-panel.scss +1 -1
  405. package/scss/components/_index-released-only.scss +1 -0
  406. package/scss/config-dev.scss +7 -0
  407. package/scss/config.scss +7 -0
  408. package/telemetry.yml +32 -19
  409. package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
  410. package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -16
  411. package/es/global/js/utils/window.d.ts +0 -2
  412. package/es/global/js/utils/window.js +0 -12
  413. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
  414. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -20
  415. package/lib/global/js/utils/window.d.ts +0 -2
  416. package/lib/global/js/utils/window.js +0 -16
@@ -1,5 +1,61 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import { ButtonProps } from '@carbon/type';
3
+ import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
4
+ interface Action extends ButtonProps {
5
+ id?: string;
6
+ key: string;
7
+ iconDescription: string;
8
+ label: string;
9
+ onClick?: () => void;
10
+ renderIcon: CarbonIconType;
11
+ }
12
+ interface ActionBarProps extends PropsWithChildren {
13
+ /**
14
+ * Specifies the action bar items. Each item is specified as an object
15
+ * with required fields: key for array rendering, renderIcon, iconDescription and
16
+ * label to provide the icon to display,
17
+ * and optional 'onClick' to receive notifications when the button is clicked.
18
+ * Additional fields in the object will be passed to the
19
+ * Button component, and these can include 'disabled', 'ref', 'className',
20
+ * and any other Button props.
21
+ *
22
+ * Note that the Button props 'kind', 'size',
23
+ * 'tooltipPosition', 'tooltipAlignment' and 'type' are ignored, as these
24
+ * cannot be used for an action bar item.
25
+ *
26
+ * Carbon Button API https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
27
+ */
28
+ actions?: readonly Action[];
29
+ /**
30
+ * className
31
+ */
32
+ className?: string;
33
+ /**
34
+ * maxVisible : Maximum action bar items visible before going into the overflow menu
35
+ */
36
+ maxVisible?: number;
37
+ /**
38
+ * class name applied to the overflow options
39
+ */
40
+ menuOptionsClass?: string;
41
+ /**
42
+ * onItemCountChange - event reporting maxWidth
43
+ */
44
+ onWidthChange?: (sizes: {
45
+ minWidth: number;
46
+ maxWidth: number;
47
+ }) => void;
48
+ /**
49
+ * overflowAriaLabel label for open close button overflow used for action bar items that do nto fit.
50
+ */
51
+ overflowAriaLabel: string;
52
+ /**
53
+ * align tags to right of available space
54
+ */
55
+ rightAlign?: boolean;
56
+ }
1
57
  /**
2
58
  * The ActionBar is used internally by the PageHeader to wrap ActionBarItems.
3
59
  */
4
- export let ActionBar: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
60
+ export declare let ActionBar: React.ForwardRefExoticComponent<ActionBarProps & React.RefAttributes<HTMLDivElement>>;
61
+ export {};
@@ -20,7 +20,6 @@ import { ActionBarOverflowItems } from './ActionBarOverflowItems.js';
20
20
  var _excluded = ["actions", "className", "maxVisible", "menuOptionsClass", "onWidthChange", "overflowAriaLabel", "rightAlign"],
21
21
  _excluded2 = ["key", "id"],
22
22
  _excluded3 = ["key"];
23
-
24
23
  // The block part of our conventional BEM class names (blockClass__E--M).
25
24
  var blockClass = "".concat(pkg.prefix, "--action-bar");
26
25
  var componentName = 'ActionBar';
@@ -29,7 +28,6 @@ var componentName = 'ActionBar';
29
28
  var defaults = {
30
29
  actions: Object.freeze([])
31
30
  };
32
-
33
31
  // NOTE: the component SCSS is not imported here: it is rolled up separately.
34
32
 
35
33
  /**
@@ -53,7 +51,7 @@ var ActionBar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
53
51
  _useState4 = _slicedToArray(_useState3, 2),
54
52
  displayedItems = _useState4[0],
55
53
  setDisplayedItems = _useState4[1];
56
- var _useState5 = useState([]),
54
+ var _useState5 = useState(null),
57
55
  _useState6 = _slicedToArray(_useState5, 2),
58
56
  hiddenSizingItems = _useState6[0],
59
57
  setHiddenSizingItems = _useState6[1];
@@ -61,7 +59,7 @@ var ActionBar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
61
59
  var refDisplayedItems = useRef(null);
62
60
  var sizingRef = useRef(null);
63
61
  var sizes = useRef({});
64
- var backupRef = useRef();
62
+ var backupRef = useRef(null);
65
63
  var localRef = ref || backupRef;
66
64
 
67
65
  // create hidden sizing items
@@ -121,24 +119,25 @@ var ActionBar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
121
119
  var checkFullyVisibleItems = function checkFullyVisibleItems() {
122
120
  /* istanbul ignore if */
123
121
  if (sizingRef.current) {
122
+ var _refDisplayedItems$cu;
124
123
  var sizingItems = Array.from(sizingRef.current.querySelectorAll(".".concat(blockClass, "__hidden-sizing-item")));
125
124
 
126
125
  // first item is always the overflow even if nothing else is rendered
127
126
  var overflowItem = sizingItems.shift();
128
127
 
129
128
  // determine how many will fit
130
- var spaceAvailable = refDisplayedItems.current.offsetWidth;
129
+ var spaceAvailable = (_refDisplayedItems$cu = refDisplayedItems.current) === null || _refDisplayedItems$cu === void 0 ? void 0 : _refDisplayedItems$cu.offsetWidth;
131
130
  var willFit = 0;
132
131
  var maxVisibleWidth = 0;
133
132
  var fitLimit = maxVisible ? Math.min(maxVisible, sizingItems.length) : sizingItems.length;
134
133
 
135
134
  // loop checking the space available
136
135
  for (var i = 0; i < fitLimit; i++) {
137
- var newSpaceAvailable = spaceAvailable - sizingItems[i].offsetWidth;
136
+ var newSpaceAvailable = spaceAvailable && spaceAvailable - sizingItems[i].offsetWidth;
138
137
 
139
138
  // update maxVisibleWidth for later use by onWidthChange
140
139
  maxVisibleWidth += sizingItems[i].offsetWidth;
141
- if (newSpaceAvailable >= 0) {
140
+ if (newSpaceAvailable && newSpaceAvailable >= 0) {
142
141
  spaceAvailable = newSpaceAvailable;
143
142
  willFit += 1;
144
143
  }
@@ -148,7 +147,7 @@ var ActionBar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
148
147
  var overflowWidth = overflowItem.offsetWidth;
149
148
  if (willFit < sizingItems.length) {
150
149
  // Check space for overflow
151
- while (willFit > 0 && spaceAvailable < overflowWidth) {
150
+ while (willFit > 0 && spaceAvailable && spaceAvailable < overflowWidth) {
152
151
  willFit -= 1;
153
152
 
154
153
  // Highly unlikely that any action bar item is narrower than the overflow item
@@ -161,7 +160,10 @@ var ActionBar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
161
160
  sizes.current.minWidth = overflowWidth;
162
161
  sizes.current.maxWidth = maxVisibleWidth;
163
162
  // emit onWidthChange
164
- onWidthChange(_objectSpread2({}, sizes.current));
163
+ onWidthChange({
164
+ minWidth: overflowWidth,
165
+ maxWidth: maxVisibleWidth
166
+ });
165
167
  }
166
168
  if (willFit < 1) {
167
169
  setDisplayCount(0);
@@ -212,14 +214,17 @@ ActionBar.propTypes = {
212
214
  *
213
215
  * Carbon Button API https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
214
216
  */
217
+ /**@ts-ignore */
215
218
  actions: PropTypes.arrayOf(PropTypes.shape(_objectSpread2(_objectSpread2({}, prepareProps(Button.propTypes, [
216
219
  // props not desired from Button.propTypes
217
220
  'kind', 'size', 'tooltipPosition', 'tooltipAlignment'])), {}, {
221
+ id: PropTypes.string,
218
222
  // Additional props
219
223
  key: PropTypes.string.isRequired,
220
224
  // Redefine as form different to Button and a key prop used by ActionBarItems
221
225
  iconDescription: PropTypes.string.isRequired,
222
226
  label: PropTypes.string.isRequired,
227
+ /**@ts-ignore */
223
228
  renderIcon: Button.propTypes.renderIcon.isRequired,
224
229
  // We duplicate onClick here to improve DocGen in Storybook
225
230
  onClick: PropTypes.func
@@ -1,5 +1,39 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
3
+ interface ActionBarItemProps extends PropsWithChildren {
4
+ /**
5
+ * Specify an optional className to be added to your Button
6
+ *
7
+ * (inherited from Carbon Button)
8
+ */
9
+ className?: string;
10
+ /**
11
+ * If specifying the `renderIcon` prop, provide a description for that icon that can
12
+ * be read by screen readers
13
+ *
14
+ * (inherited from Carbon Button)
15
+ */
16
+ label?: string;
17
+ /**
18
+ * Optional click handler
19
+ *
20
+ * (inherited from Carbon Button)
21
+ */
22
+ onClick?: () => void;
23
+ /**
24
+ * Optional prop to allow overriding the icon rendering.
25
+ * Can be a React component class
26
+ *
27
+ * (inherited from Carbon Button)
28
+ */
29
+ renderIcon?: CarbonIconType;
30
+ /**
31
+ * Optional tab index
32
+ */
33
+ tabIndex?: number;
34
+ }
1
35
  /**
2
36
  * The ActionBarItem is used in the page header to populate the action bar
3
37
  */
4
- export let ActionBarItem: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
38
+ export declare let ActionBarItem: React.ForwardRefExoticComponent<ActionBarItemProps & React.RefAttributes<HTMLDivElement>>;
39
+ export {};
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default from 'react';
10
10
  import PropTypes from '../../node_modules/prop-types/index.js';
11
11
  import cx from 'classnames';
@@ -13,11 +13,9 @@ import { pkg } from '../../settings.js';
13
13
  import { IconButton } from '@carbon/react';
14
14
 
15
15
  var _excluded = ["label", "className", "renderIcon"];
16
-
17
16
  // The block part of our conventional BEM class names (blockClass__E--M).
18
17
  var componentName = 'ActionBarItem';
19
18
  var blockClass = "".concat(pkg.prefix, "--action-bar-item");
20
-
21
19
  // NOTE: the component SCSS is not imported here: it is rolled up separately.
22
20
 
23
21
  /**
@@ -34,7 +32,7 @@ var ActionBarItem = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
34
32
  className: cx(blockClass, className),
35
33
  kind: 'ghost',
36
34
  size: 'md',
37
- align: 'bottom-right',
35
+ align: 'bottom-end',
38
36
  type: 'button',
39
37
  label: label
40
38
  }), Icon ? /*#__PURE__*/React__default.createElement(Icon, null) : null);
@@ -85,7 +83,12 @@ ActionBarItem.propTypes = _objectSpread2(_objectSpread2({}, propTypes), {}, {
85
83
  *
86
84
  * (inherited from Carbon Button)
87
85
  */
88
- renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
86
+ /**@ts-ignore */
87
+ renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
88
+ /**
89
+ * Optional tab index
90
+ */
91
+ tabIndex: PropTypes.number
89
92
  });
90
93
 
91
94
  export { ActionBarItem };
@@ -1,18 +1,57 @@
1
- export function ActionBarOverflowItems({ className, menuOptionsClass, overflowItems, overflowAriaLabel, }: {
2
- className: any;
3
- menuOptionsClass: any;
4
- overflowItems: any;
5
- overflowAriaLabel: any;
6
- }): import("react/jsx-runtime").JSX.Element;
7
- export namespace ActionBarOverflowItems {
8
- export { componentName as displayName };
9
- export namespace propTypes {
10
- let className: PropTypes.Requireable<string>;
11
- let menuOptionsClass: PropTypes.Requireable<string>;
12
- let overflowAriaLabel: PropTypes.Requireable<string>;
13
- let overflowItems: PropTypes.Requireable<(PropTypes.ReactElementLike | null | undefined)[]>;
14
- }
15
- }
16
- declare const componentName: "ActionBar";
1
+ import { PropsWithChildren, ReactElement } from 'react';
17
2
  import PropTypes from 'prop-types';
3
+ import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
4
+ type OverflowItem = {
5
+ label: string;
6
+ onClick: () => void;
7
+ renderIcon: CarbonIconType;
8
+ };
9
+ interface ActionBarOverflowItemProps extends PropsWithChildren {
10
+ /**
11
+ * className
12
+ */
13
+ className?: string;
14
+ /**
15
+ * class name applied to the overflow options
16
+ */
17
+ menuOptionsClass?: string;
18
+ /**
19
+ * overflowAriaLabel label for open close button overflow used for action bar items that do nto fit.
20
+ */
21
+ overflowAriaLabel?: string;
22
+ /**
23
+ * overflowItems: items to bre shown in the ActionBar overflow menu
24
+ */
25
+ overflowItems?: ReactElement<OverflowItem>[];
26
+ /**
27
+ * Optional tab index
28
+ */
29
+ tabIndex?: number;
30
+ }
31
+ export declare const ActionBarOverflowItems: {
32
+ ({ className, menuOptionsClass, overflowItems, overflowAriaLabel, }: ActionBarOverflowItemProps): import("react/jsx-runtime").JSX.Element;
33
+ displayName: string;
34
+ propTypes: {
35
+ /**
36
+ * className
37
+ */
38
+ className: PropTypes.Requireable<string>;
39
+ /**
40
+ * class name applied to the overflow options
41
+ */
42
+ menuOptionsClass: PropTypes.Requireable<string>;
43
+ /**
44
+ * overflowAriaLabel label for open close button overflow used for action bar items that do nto fit.
45
+ */
46
+ overflowAriaLabel: PropTypes.Requireable<string>;
47
+ /**
48
+ * overflowItems: items to bre shown in the ActionBar overflow menu
49
+ */
50
+ overflowItems: PropTypes.Requireable<(PropTypes.ReactElementLike | null | undefined)[]>;
51
+ /**
52
+ * Optional tab index
53
+ */
54
+ tabIndex: PropTypes.Requireable<number>;
55
+ };
56
+ };
18
57
  export {};
@@ -33,17 +33,17 @@ var ActionBarOverflowItems = function ActionBarOverflowItems(_ref) {
33
33
  // This uses a copy of a menu item option
34
34
  // NOTE: Cannot use a real Tooltip icon below as it uses a <button /> the
35
35
  // div equivalent below is based on Carbon 10.25.0
36
- var ItemIcon = item.props.renderIcon;
36
+ var ItemIcon = item === null || item === void 0 ? void 0 : item.props.renderIcon;
37
37
  return /*#__PURE__*/React__default.createElement(OverflowMenuItem, {
38
38
  className: "".concat(blockClass, "__item"),
39
- onClick: item.props.onClick,
39
+ onClick: item === null || item === void 0 ? void 0 : item.props.onClick,
40
40
  itemText: /*#__PURE__*/React__default.createElement("div", {
41
41
  className: "".concat(blockClass, "__item-content"),
42
42
  "aria-describedby": "".concat(internalId.current, "-").concat(index, "--item-label")
43
43
  }, /*#__PURE__*/React__default.createElement("span", {
44
44
  className: "".concat(blockClass, "__item-label"),
45
45
  id: "".concat(internalId.current, "-").concat(index, "--item-label")
46
- }, item.props.label), typeof item.props.renderIcon === 'function' ? /*#__PURE__*/React__default.createElement(ItemIcon, null) : item.props.renderIcon)
46
+ }, item === null || item === void 0 ? void 0 : item.props.label), typeof (item === null || item === void 0 ? void 0 : item.props.renderIcon) === 'function' ? /*#__PURE__*/React__default.createElement(ItemIcon, null) : item === null || item === void 0 ? void 0 : item.props.renderIcon)
47
47
  });
48
48
  }));
49
49
  };
@@ -65,7 +65,11 @@ ActionBarOverflowItems.propTypes = {
65
65
  /**
66
66
  * overflowItems: items to bre shown in the ActionBar overflow menu
67
67
  */
68
- overflowItems: PropTypes.arrayOf(PropTypes.element)
68
+ overflowItems: PropTypes.arrayOf(PropTypes.element),
69
+ /**
70
+ * Optional tab index
71
+ */
72
+ tabIndex: PropTypes.number
69
73
  };
70
74
 
71
75
  export { ActionBarOverflowItems };
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
1
7
  import { ReactNode } from 'react';
2
8
  export type Theme = 'light' | 'dark';
3
9
  export interface Filter {
@@ -1,2 +1,68 @@
1
- export let Card: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
- import React from 'react';
1
+ import React, { PropsWithChildren, ReactNode } from 'react';
2
+ type ActionIcon = {
3
+ id?: string;
4
+ icon?: () => ReactNode;
5
+ onKeydown?: () => void;
6
+ onClick?: () => void;
7
+ iconDescription?: string;
8
+ href?: string;
9
+ };
10
+ type OverflowActions = {
11
+ id?: string;
12
+ itemText?: string;
13
+ onClick?: () => void;
14
+ onKeydown?: () => void;
15
+ };
16
+ type Metadata = {
17
+ id?: string;
18
+ icon?: () => ReactNode;
19
+ iconDescription?: string;
20
+ onClick?: () => void;
21
+ href?: string;
22
+ };
23
+ interface CardProp extends PropsWithChildren {
24
+ actionIcons?: readonly ActionIcon[];
25
+ actionsPlacement?: 'top' | 'bottom';
26
+ children?: ReactNode;
27
+ className?: string;
28
+ clickZone?: 'one' | 'two' | 'three';
29
+ description?: ReactNode;
30
+ disabled?: boolean;
31
+ footerActionIcon?: React.ElementType;
32
+ getStarted?: boolean;
33
+ label?: ReactNode;
34
+ media?: ReactNode;
35
+ mediaPosition?: 'top' | 'left';
36
+ metadata?: readonly Metadata[];
37
+ onClick?: () => void;
38
+ onKeyDown?: () => void;
39
+ onPrimaryButtonClick?: () => void;
40
+ onSecondaryButtonClick?: () => void;
41
+ overflowActions?: readonly OverflowActions[];
42
+ overflowAriaLabel?: string;
43
+ pictogram?: () => ReactNode;
44
+ primaryButtonDisabled?: boolean;
45
+ primaryButtonHref?: string;
46
+ primaryButtonIcon?: React.ElementType;
47
+ primaryButtonKind?: 'primary' | 'ghost';
48
+ primaryButtonPlacement?: 'top' | 'bottom';
49
+ primaryButtonText?: string;
50
+ productive?: boolean;
51
+ secondaryButtonDisabled?: boolean;
52
+ secondaryButtonHref?: string;
53
+ secondaryButtonIcon?: React.ElementType;
54
+ secondaryButtonKind?: 'secondary' | 'ghost';
55
+ secondaryButtonPlacement?: 'top' | 'bottom';
56
+ secondaryButtonText?: string;
57
+ sequence?: number;
58
+ /**
59
+ * **Experimental?** For all cases a `Slug` component can be provided.
60
+ * Clickable tiles only accept a boolean value of true and display a hollow slug.
61
+ */
62
+ slug?: ReactNode | boolean;
63
+ status?: 'complete' | 'incomplete';
64
+ title?: ReactNode;
65
+ titleSize?: 'default' | 'large';
66
+ }
67
+ export declare const Card: React.ForwardRefExoticComponent<CardProp & React.RefAttributes<HTMLDivElement>>;
68
+ export {};
@@ -20,32 +20,17 @@ var _excluded = ["actionIcons", "actionsPlacement", "metadata", "children", "cla
20
20
  _excluded2 = ["id"],
21
21
  _excluded3 = ["id", "icon", "onClick", "iconDescription", "href"];
22
22
  var componentName = 'Card';
23
-
24
- // Default values for props
25
- var defaults = {
26
- actionIcons: Object.freeze([]),
27
- actionsPlacement: 'bottom',
28
- clickZone: 'one',
29
- mediaPosition: 'top',
30
- overflowActions: Object.freeze([]),
31
- primaryButtonKind: 'primary',
32
- primaryButtonPlacement: 'bottom',
33
- productive: false,
34
- secondaryButtonKind: 'secondary',
35
- secondaryButtonPlacement: 'bottom',
36
- titleSize: 'default'
37
- };
38
23
  var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
39
24
  var _ref$actionIcons = _ref.actionIcons,
40
- actionIcons = _ref$actionIcons === void 0 ? defaults.actionIcons : _ref$actionIcons,
25
+ actionIcons = _ref$actionIcons === void 0 ? Object.freeze([]) : _ref$actionIcons,
41
26
  _ref$actionsPlacement = _ref.actionsPlacement,
42
- actionsPlacement = _ref$actionsPlacement === void 0 ? defaults.actionsPlacement : _ref$actionsPlacement,
27
+ actionsPlacement = _ref$actionsPlacement === void 0 ? 'bottom' : _ref$actionsPlacement,
43
28
  _ref$metadata = _ref.metadata,
44
- metadata = _ref$metadata === void 0 ? defaults.actionIcons : _ref$metadata,
29
+ metadata = _ref$metadata === void 0 ? Object.freeze([]) : _ref$metadata,
45
30
  children = _ref.children,
46
31
  className = _ref.className,
47
32
  _ref$clickZone = _ref.clickZone,
48
- clickZone = _ref$clickZone === void 0 ? defaults.clickZone : _ref$clickZone,
33
+ clickZone = _ref$clickZone === void 0 ? 'one' : _ref$clickZone,
49
34
  description = _ref.description,
50
35
  disabled = _ref.disabled,
51
36
  footerActionIcon = _ref.footerActionIcon,
@@ -53,12 +38,12 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
53
38
  label = _ref.label,
54
39
  media = _ref.media,
55
40
  _ref$mediaPosition = _ref.mediaPosition,
56
- mediaPosition = _ref$mediaPosition === void 0 ? defaults.mediaPosition : _ref$mediaPosition,
41
+ mediaPosition = _ref$mediaPosition === void 0 ? 'top' : _ref$mediaPosition,
57
42
  onClick = _ref.onClick,
58
43
  onKeyDown = _ref.onKeyDown,
59
44
  onPrimaryButtonClick = _ref.onPrimaryButtonClick,
60
45
  _ref$overflowActions = _ref.overflowActions,
61
- overflowActions = _ref$overflowActions === void 0 ? defaults.overflowActions : _ref$overflowActions,
46
+ overflowActions = _ref$overflowActions === void 0 ? Object.freeze([]) : _ref$overflowActions,
62
47
  overflowAriaLabel = _ref.overflowAriaLabel,
63
48
  onSecondaryButtonClick = _ref.onSecondaryButtonClick,
64
49
  Pictogram = _ref.pictogram,
@@ -66,26 +51,26 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
66
51
  primaryButtonHref = _ref.primaryButtonHref,
67
52
  primaryButtonIcon = _ref.primaryButtonIcon,
68
53
  _ref$primaryButtonKin = _ref.primaryButtonKind,
69
- primaryButtonKind = _ref$primaryButtonKin === void 0 ? defaults.primaryButtonKind : _ref$primaryButtonKin,
54
+ primaryButtonKind = _ref$primaryButtonKin === void 0 ? 'primary' : _ref$primaryButtonKin,
70
55
  _ref$primaryButtonPla = _ref.primaryButtonPlacement,
71
- primaryButtonPlacement = _ref$primaryButtonPla === void 0 ? defaults.primaryButtonPlacement : _ref$primaryButtonPla,
56
+ primaryButtonPlacement = _ref$primaryButtonPla === void 0 ? 'bottom' : _ref$primaryButtonPla,
72
57
  primaryButtonText = _ref.primaryButtonText,
73
58
  _ref$productive = _ref.productive,
74
- productive = _ref$productive === void 0 ? defaults.productive : _ref$productive,
59
+ productive = _ref$productive === void 0 ? false : _ref$productive,
75
60
  secondaryButtonDisabled = _ref.secondaryButtonDisabled,
76
61
  secondaryButtonHref = _ref.secondaryButtonHref,
77
62
  secondaryButtonIcon = _ref.secondaryButtonIcon,
78
63
  _ref$secondaryButtonK = _ref.secondaryButtonKind,
79
- secondaryButtonKind = _ref$secondaryButtonK === void 0 ? defaults.secondaryButtonKind : _ref$secondaryButtonK,
64
+ secondaryButtonKind = _ref$secondaryButtonK === void 0 ? 'secondary' : _ref$secondaryButtonK,
80
65
  _ref$secondaryButtonP = _ref.secondaryButtonPlacement,
81
- secondaryButtonPlacement = _ref$secondaryButtonP === void 0 ? defaults.secondaryButtonPlacement : _ref$secondaryButtonP,
66
+ secondaryButtonPlacement = _ref$secondaryButtonP === void 0 ? 'bottom' : _ref$secondaryButtonP,
82
67
  secondaryButtonText = _ref.secondaryButtonText,
83
68
  slug = _ref.slug,
84
69
  status = _ref.status,
85
70
  sequence = _ref.sequence,
86
71
  title = _ref.title,
87
72
  _ref$titleSize = _ref.titleSize,
88
- titleSize = _ref$titleSize === void 0 ? defaults.titleSize : _ref$titleSize,
73
+ titleSize = _ref$titleSize === void 0 ? 'default' : _ref$titleSize,
89
74
  rest = _objectWithoutProperties(_ref, _excluded);
90
75
  var getIcons = function getIcons() {
91
76
  return getStarted ? metadata : actionIcons;
@@ -101,7 +86,7 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
101
86
  onClick: onClick,
102
87
  onKeyDown: onKeyDown,
103
88
  role: 'button',
104
- tabIndex: '0'
89
+ tabIndex: 0
105
90
  };
106
91
 
107
92
  // actions can either be an overflow menu or series of icons
@@ -135,7 +120,7 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
135
120
  return /*#__PURE__*/React__default.createElement("span", {
136
121
  key: id,
137
122
  className: "".concat(blockClass, "__icon")
138
- }, /*#__PURE__*/React__default.createElement(Icon, {
123
+ }, Icon && /*#__PURE__*/React__default.createElement(Icon, {
139
124
  "aria-label": iconDescription
140
125
  }), iconDescription);
141
126
  }
@@ -157,7 +142,7 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
157
142
  className: "".concat(blockClass, "__icon"),
158
143
  href: href,
159
144
  onClick: onClick
160
- }, /*#__PURE__*/React__default.createElement(Icon, {
145
+ }, Icon && /*#__PURE__*/React__default.createElement(Icon, {
161
146
  "aria-label": iconDescription
162
147
  }));
163
148
  }
@@ -168,7 +153,7 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
168
153
  onClick: onClick,
169
154
  kind: "ghost",
170
155
  size: "sm"
171
- }, /*#__PURE__*/React__default.createElement(Icon, {
156
+ }, Icon && /*#__PURE__*/React__default.createElement(Icon, {
172
157
  "aria-label": iconDescription
173
158
  }));
174
159
  });
@@ -265,6 +250,7 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
265
250
  }, media)), hasBottomBar && /*#__PURE__*/React__default.createElement(CardFooter, getFooterProps())));
266
251
  });
267
252
  Card.propTypes = {
253
+ /**@ts-ignore */
268
254
  actionIcons: PropTypes.arrayOf(PropTypes.shape({
269
255
  id: PropTypes.string,
270
256
  icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
@@ -277,13 +263,16 @@ Card.propTypes = {
277
263
  children: PropTypes.node,
278
264
  className: PropTypes.string,
279
265
  clickZone: PropTypes.oneOf(['one', 'two', 'three']),
280
- description: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.node]),
266
+ /**@ts-ignore */
267
+ description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
281
268
  disabled: PropTypes.bool,
269
+ /**@ts-ignore */
282
270
  footerActionIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
283
271
  getStarted: PropTypes.bool,
284
- label: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.node]),
272
+ label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
285
273
  media: PropTypes.node,
286
274
  mediaPosition: PropTypes.oneOf(['top', 'left']),
275
+ /**@ts-ignore */
287
276
  metadata: PropTypes.arrayOf(PropTypes.shape({
288
277
  id: PropTypes.string,
289
278
  icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
@@ -293,6 +282,7 @@ Card.propTypes = {
293
282
  onKeyDown: PropTypes.func,
294
283
  onPrimaryButtonClick: PropTypes.func,
295
284
  onSecondaryButtonClick: PropTypes.func,
285
+ /**@ts-ignore */
296
286
  overflowActions: PropTypes.arrayOf(PropTypes.shape({
297
287
  id: PropTypes.string,
298
288
  itemText: PropTypes.string,
@@ -300,16 +290,19 @@ Card.propTypes = {
300
290
  onKeyDown: PropTypes.func
301
291
  })),
302
292
  overflowAriaLabel: PropTypes.string,
293
+ /**@ts-ignore */
303
294
  pictogram: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
304
295
  primaryButtonDisabled: PropTypes.bool,
305
296
  primaryButtonHref: PropTypes.string,
297
+ /**@ts-ignore */
306
298
  primaryButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
307
299
  primaryButtonKind: PropTypes.oneOf(['primary', 'ghost']),
308
300
  primaryButtonPlacement: PropTypes.oneOf(['top', 'bottom']),
309
- primaryButtonText: PropTypes.node,
301
+ primaryButtonText: PropTypes.string,
310
302
  productive: PropTypes.bool,
311
303
  secondaryButtonDisabled: PropTypes.bool,
312
304
  secondaryButtonHref: PropTypes.string,
305
+ /**@ts-ignore */
313
306
  secondaryButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
314
307
  secondaryButtonKind: PropTypes.oneOf(['secondary', 'ghost']),
315
308
  secondaryButtonPlacement: PropTypes.oneOf(['top', 'bottom']),
@@ -321,7 +314,7 @@ Card.propTypes = {
321
314
  */
322
315
  slug: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),
323
316
  status: PropTypes.oneOf(['complete', 'incomplete']),
324
- title: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.node]),
317
+ title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
325
318
  titleSize: PropTypes.oneOf(['default', 'large'])
326
319
  };
327
320
  Card.displayName = componentName;