@carbon/ibm-products 2.43.1 → 2.43.2-canary.100

Sign up to get free protection for your applications and to get access to all the features.
Files changed (365) hide show
  1. package/css/index-full-carbon.css +428 -143
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +218 -9
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +248 -105
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +349 -129
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/ActionBar/ActionBarItem.js +1 -1
  18. package/es/components/Coachmark/Coachmark.d.ts +6 -1
  19. package/es/components/Coachmark/Coachmark.js +47 -11
  20. package/es/components/Coachmark/CoachmarkOverlay.js +2 -4
  21. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -7
  22. package/es/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
  23. package/es/components/CoachmarkStack/CoachmarkStack.js +7 -3
  24. package/es/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
  25. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +76 -55
  26. package/es/components/ConditionBuilder/ConditionBuilder.js +82 -25
  27. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
  28. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +154 -0
  29. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
  30. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +29 -13
  31. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
  32. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +30 -8
  33. package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +14 -9
  34. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +19 -11
  35. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -13
  36. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +75 -62
  37. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +13 -7
  38. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +31 -8
  39. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
  40. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +35 -24
  41. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +40 -36
  42. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +40 -36
  43. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +6 -2
  44. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +98 -40
  45. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
  46. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
  47. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +27 -9
  48. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
  49. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +114 -0
  50. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
  51. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +71 -38
  52. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
  53. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +22 -9
  54. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
  55. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
  56. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +121 -40
  57. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
  58. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +45 -19
  59. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +2 -1
  60. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +137 -40
  61. package/es/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
  62. package/es/components/ConditionBuilder/utils/useTranslations.js +26 -0
  63. package/es/components/ConditionBuilder/utils/util.d.ts +6 -4
  64. package/es/components/ConditionBuilder/utils/util.js +42 -17
  65. package/es/components/CreateFullPage/CreateFullPage.js +2 -2
  66. package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +26 -0
  67. package/es/components/DataSpreadsheet/DataSpreadsheet.js +149 -54
  68. package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +25 -1
  69. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +50 -9
  70. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +16 -0
  71. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +32 -8
  72. package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +4 -1
  73. package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.d.ts +3 -1
  74. package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +15 -3
  75. package/es/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.d.ts +2 -1
  76. package/es/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +4 -3
  77. package/es/components/DataSpreadsheet/types/index.d.ts +3 -1
  78. package/es/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -2
  79. package/es/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
  80. package/es/components/Datagrid/Datagrid/Datagrid.js +4 -9
  81. package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  82. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
  83. package/es/components/Datagrid/Datagrid/DatagridRow.js +21 -8
  84. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
  85. package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  86. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +34 -10
  87. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
  88. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
  89. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
  90. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +7 -4
  91. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
  92. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +54 -17
  93. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  94. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +75 -12
  95. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
  96. package/es/components/Datagrid/types/index.d.ts +61 -9
  97. package/es/components/Datagrid/useActionsColumn.d.ts +8 -1
  98. package/es/components/Datagrid/useActionsColumn.js +7 -6
  99. package/es/components/Datagrid/useColumnCenterAlign.d.ts +8 -1
  100. package/es/components/Datagrid/useColumnCenterAlign.js +1 -1
  101. package/es/components/Datagrid/useColumnRightAlign.d.ts +8 -1
  102. package/es/components/Datagrid/useColumnRightAlign.js +4 -3
  103. package/es/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  104. package/es/components/Datagrid/useCustomizeColumns.js +4 -3
  105. package/es/components/Datagrid/useDefaultStringRenderer.js +0 -1
  106. package/es/components/Datagrid/useDisableSelectRows.d.ts +2 -1
  107. package/es/components/Datagrid/useDisableSelectRows.js +27 -22
  108. package/es/components/Datagrid/useInlineEdit.d.ts +8 -1
  109. package/es/components/Datagrid/useInlineEdit.js +13 -3
  110. package/es/components/Datagrid/useNestedRowExpander.js +1 -3
  111. package/es/components/Datagrid/useNestedRows.js +32 -13
  112. package/es/components/Datagrid/useRowExpander.js +1 -3
  113. package/es/components/Datagrid/useSelectRows.js +2 -1
  114. package/es/components/Datagrid/useStickyColumn.d.ts +8 -1
  115. package/es/components/Datagrid/useStickyColumn.js +12 -9
  116. package/es/components/Decorator/Decorator.js +2 -1
  117. package/es/components/DecoratorBase/DecoratorBase.js +3 -5
  118. package/es/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
  119. package/es/components/DecoratorLink/DecoratorLink.js +2 -1
  120. package/es/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
  121. package/es/components/EditInPlace/EditInPlace.d.ts +4 -0
  122. package/es/components/EditInPlace/EditInPlace.js +21 -10
  123. package/es/components/EditTearsheet/EditTearsheet.d.ts +7 -2
  124. package/es/components/EditTearsheet/EditTearsheet.js +44 -10
  125. package/es/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
  126. package/es/components/EditTearsheet/EditTearsheetForm.js +3 -0
  127. package/es/components/EmptyStates/EmptyStateV2.d.ts +63 -2
  128. package/es/components/EmptyStates/EmptyStateV2.js +2 -1
  129. package/es/components/FullPageError/FullPageError.d.ts +36 -2
  130. package/es/components/FullPageError/FullPageError.js +0 -3
  131. package/es/components/GetStartedCard/GetStartedCard.d.ts +61 -2
  132. package/es/components/GetStartedCard/GetStartedCard.js +9 -8
  133. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  134. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  135. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  136. package/es/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
  137. package/es/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
  138. package/es/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
  139. package/es/components/Nav/NavItem.js +12 -3
  140. package/es/components/OptionsTile/OptionsTile.js +11 -6
  141. package/es/components/PageHeader/PageHeader.js +1 -0
  142. package/es/components/RemoveModal/RemoveModal.d.ts +4 -0
  143. package/es/components/RemoveModal/RemoveModal.js +7 -1
  144. package/es/components/SearchBar/SearchBar.d.ts +1 -1
  145. package/es/components/SearchBar/SearchBar.js +2 -2
  146. package/es/components/SidePanel/SidePanel.js +17 -21
  147. package/es/components/SidePanel/motion/variants.d.ts +4 -6
  148. package/es/components/SidePanel/motion/variants.js +10 -11
  149. package/es/components/StatusIndicator/StatusIndicatorStep.js +87 -0
  150. package/es/components/StringFormatter/StringFormatter.js +14 -3
  151. package/es/components/StringFormatter/utils/enums.d.ts +20 -1
  152. package/es/components/StringFormatter/utils/enums.js +22 -2
  153. package/es/components/TagOverflow/TagOverflow.d.ts +35 -4
  154. package/es/components/TagOverflow/TagOverflow.js +47 -64
  155. package/es/components/TagOverflow/TagOverflowModal.js +4 -6
  156. package/es/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
  157. package/es/components/TagOverflow/TagOverflowPopover.js +38 -41
  158. package/es/components/Tearsheet/Tearsheet.d.ts +8 -1
  159. package/es/components/Tearsheet/Tearsheet.js +9 -1
  160. package/es/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
  161. package/es/components/Tearsheet/TearsheetNarrow.js +12 -0
  162. package/es/components/Tearsheet/TearsheetShell.d.ts +11 -1
  163. package/es/components/Tearsheet/TearsheetShell.js +28 -7
  164. package/es/components/Toolbar/ToolbarButton.js +1 -1
  165. package/es/components/WebTerminal/WebTerminal.js +10 -12
  166. package/es/components/index.d.ts +1 -1
  167. package/es/global/js/hooks/useFocus.d.ts +1 -0
  168. package/es/global/js/hooks/useFocus.js +5 -2
  169. package/es/global/js/hooks/usePrefersReducedMotion.js +14 -8
  170. package/es/global/js/package-settings.d.ts +1 -1
  171. package/es/global/js/package-settings.js +1 -1
  172. package/es/index.js +1 -0
  173. package/es/node_modules/@carbon/icon-helpers/es/index.js +49 -62
  174. package/es/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1020 -1058
  175. package/es/node_modules/@carbon/icons-react/es/generated/bucket-9.js +881 -758
  176. package/es/settings.d.ts +1 -1
  177. package/lib/components/ActionBar/ActionBarItem.js +1 -1
  178. package/lib/components/Coachmark/Coachmark.d.ts +6 -1
  179. package/lib/components/Coachmark/Coachmark.js +46 -10
  180. package/lib/components/Coachmark/CoachmarkOverlay.js +2 -4
  181. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -7
  182. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
  183. package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -3
  184. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
  185. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +74 -53
  186. package/lib/components/ConditionBuilder/ConditionBuilder.js +82 -25
  187. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
  188. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +163 -0
  189. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
  190. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +28 -11
  191. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
  192. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +29 -7
  193. package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +12 -7
  194. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +18 -10
  195. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -13
  196. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +73 -60
  197. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +13 -7
  198. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +31 -8
  199. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
  200. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +34 -24
  201. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +40 -36
  202. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +40 -36
  203. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +6 -2
  204. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +96 -38
  205. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
  206. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
  207. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +28 -10
  208. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
  209. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +122 -0
  210. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
  211. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +68 -35
  212. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
  213. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +21 -8
  214. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
  215. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
  216. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +118 -37
  217. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
  218. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +44 -17
  219. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +2 -1
  220. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +137 -39
  221. package/lib/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
  222. package/lib/components/ConditionBuilder/utils/useTranslations.js +30 -0
  223. package/lib/components/ConditionBuilder/utils/util.d.ts +6 -4
  224. package/lib/components/ConditionBuilder/utils/util.js +44 -16
  225. package/lib/components/CreateFullPage/CreateFullPage.js +2 -2
  226. package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +26 -0
  227. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +149 -54
  228. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +25 -1
  229. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +50 -9
  230. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +16 -0
  231. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +32 -8
  232. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +4 -1
  233. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.d.ts +3 -1
  234. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +15 -3
  235. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.d.ts +2 -1
  236. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +4 -3
  237. package/lib/components/DataSpreadsheet/types/index.d.ts +3 -1
  238. package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -2
  239. package/lib/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
  240. package/lib/components/Datagrid/Datagrid/Datagrid.js +4 -9
  241. package/lib/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  242. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
  243. package/lib/components/Datagrid/Datagrid/DatagridRow.js +21 -8
  244. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
  245. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  246. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +34 -10
  247. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
  248. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
  249. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
  250. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +7 -4
  251. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
  252. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +53 -16
  253. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  254. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +74 -11
  255. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
  256. package/lib/components/Datagrid/types/index.d.ts +61 -9
  257. package/lib/components/Datagrid/useActionsColumn.d.ts +8 -1
  258. package/lib/components/Datagrid/useActionsColumn.js +7 -6
  259. package/lib/components/Datagrid/useColumnCenterAlign.d.ts +8 -1
  260. package/lib/components/Datagrid/useColumnCenterAlign.js +1 -1
  261. package/lib/components/Datagrid/useColumnRightAlign.d.ts +8 -1
  262. package/lib/components/Datagrid/useColumnRightAlign.js +4 -3
  263. package/lib/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  264. package/lib/components/Datagrid/useCustomizeColumns.js +4 -3
  265. package/lib/components/Datagrid/useDefaultStringRenderer.js +0 -1
  266. package/lib/components/Datagrid/useDisableSelectRows.d.ts +2 -1
  267. package/lib/components/Datagrid/useDisableSelectRows.js +27 -22
  268. package/lib/components/Datagrid/useInlineEdit.d.ts +8 -1
  269. package/lib/components/Datagrid/useInlineEdit.js +13 -3
  270. package/lib/components/Datagrid/useNestedRowExpander.js +1 -3
  271. package/lib/components/Datagrid/useNestedRows.js +32 -13
  272. package/lib/components/Datagrid/useRowExpander.js +1 -3
  273. package/lib/components/Datagrid/useSelectRows.js +2 -1
  274. package/lib/components/Datagrid/useStickyColumn.d.ts +8 -1
  275. package/lib/components/Datagrid/useStickyColumn.js +12 -9
  276. package/lib/components/Decorator/Decorator.js +2 -1
  277. package/lib/components/DecoratorBase/DecoratorBase.js +3 -5
  278. package/lib/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
  279. package/lib/components/DecoratorLink/DecoratorLink.js +2 -1
  280. package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
  281. package/lib/components/EditInPlace/EditInPlace.d.ts +4 -0
  282. package/lib/components/EditInPlace/EditInPlace.js +21 -10
  283. package/lib/components/EditTearsheet/EditTearsheet.d.ts +7 -2
  284. package/lib/components/EditTearsheet/EditTearsheet.js +43 -9
  285. package/lib/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
  286. package/lib/components/EditTearsheet/EditTearsheetForm.js +3 -0
  287. package/lib/components/EmptyStates/EmptyStateV2.d.ts +63 -2
  288. package/lib/components/EmptyStates/EmptyStateV2.js +2 -1
  289. package/lib/components/FullPageError/FullPageError.d.ts +36 -2
  290. package/lib/components/FullPageError/FullPageError.js +0 -3
  291. package/lib/components/GetStartedCard/GetStartedCard.d.ts +61 -2
  292. package/lib/components/GetStartedCard/GetStartedCard.js +8 -7
  293. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  294. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  295. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  296. package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
  297. package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
  298. package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
  299. package/lib/components/Nav/NavItem.js +10 -1
  300. package/lib/components/OptionsTile/OptionsTile.js +11 -6
  301. package/lib/components/PageHeader/PageHeader.js +1 -0
  302. package/lib/components/RemoveModal/RemoveModal.d.ts +4 -0
  303. package/lib/components/RemoveModal/RemoveModal.js +7 -1
  304. package/lib/components/SearchBar/SearchBar.d.ts +1 -1
  305. package/lib/components/SearchBar/SearchBar.js +2 -2
  306. package/lib/components/SidePanel/SidePanel.js +16 -20
  307. package/lib/components/SidePanel/motion/variants.d.ts +4 -6
  308. package/lib/components/SidePanel/motion/variants.js +10 -11
  309. package/lib/components/StatusIndicator/StatusIndicatorStep.js +94 -0
  310. package/lib/components/StringFormatter/StringFormatter.js +13 -2
  311. package/lib/components/StringFormatter/utils/enums.d.ts +20 -1
  312. package/lib/components/StringFormatter/utils/enums.js +23 -1
  313. package/lib/components/TagOverflow/TagOverflow.d.ts +35 -4
  314. package/lib/components/TagOverflow/TagOverflow.js +46 -63
  315. package/lib/components/TagOverflow/TagOverflowModal.js +4 -6
  316. package/lib/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
  317. package/lib/components/TagOverflow/TagOverflowPopover.js +37 -40
  318. package/lib/components/Tearsheet/Tearsheet.d.ts +8 -1
  319. package/lib/components/Tearsheet/Tearsheet.js +9 -1
  320. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
  321. package/lib/components/Tearsheet/TearsheetNarrow.js +12 -0
  322. package/lib/components/Tearsheet/TearsheetShell.d.ts +11 -1
  323. package/lib/components/Tearsheet/TearsheetShell.js +26 -5
  324. package/lib/components/Toolbar/ToolbarButton.js +1 -1
  325. package/lib/components/WebTerminal/WebTerminal.js +10 -12
  326. package/lib/components/index.d.ts +1 -1
  327. package/lib/global/js/hooks/useFocus.d.ts +1 -0
  328. package/lib/global/js/hooks/useFocus.js +5 -1
  329. package/lib/global/js/hooks/usePrefersReducedMotion.js +13 -7
  330. package/lib/global/js/package-settings.d.ts +1 -1
  331. package/lib/global/js/package-settings.js +1 -1
  332. package/lib/index.js +5 -0
  333. package/lib/node_modules/@carbon/icon-helpers/es/index.js +49 -62
  334. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1036 -1074
  335. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +946 -823
  336. package/lib/settings.d.ts +1 -1
  337. package/package.json +9 -8
  338. package/scss/components/Coachmark/_coachmark-overlay.scss +6 -70
  339. package/scss/components/Coachmark/_coachmark.scss +5 -4
  340. package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +1 -3
  341. package/scss/components/ConditionBuilder/_condition-builder.scss +5 -1
  342. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +20 -3
  343. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +32 -3
  344. package/scss/components/CreateModal/_create-modal.scss +0 -4
  345. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +17 -2
  346. package/scss/components/Datagrid/_datagrid.scss +0 -4
  347. package/scss/components/Datagrid/styles/_useInlineEdit.scss +13 -0
  348. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +7 -5
  349. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +5 -4
  350. package/scss/components/HTTPErrors/_http-errors.scss +77 -0
  351. package/scss/components/OptionsTile/_options-tile.scss +6 -6
  352. package/scss/components/SidePanel/_side-panel.scss +1 -1
  353. package/scss/components/StatusIcon/_status-icon.scss +4 -4
  354. package/scss/components/StringFormatter/_string-formatter.scss +2 -2
  355. package/scss/components/UserProfileImage/_user-profile-image.scss +6 -2
  356. package/scss/components/_index-released-only.scss +1 -0
  357. package/telemetry.yml +32 -19
  358. package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
  359. package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -16
  360. package/es/global/js/utils/window.d.ts +0 -2
  361. package/es/global/js/utils/window.js +0 -12
  362. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
  363. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -20
  364. package/lib/global/js/utils/window.d.ts +0 -2
  365. package/lib/global/js/utils/window.js +0 -16
@@ -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, slicedToArray as _slicedToArray, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, objectSpread2 as _objectSpread2, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { forwardRef, useState, useRef, useCallback, useEffect } from 'react';
10
10
  import cx from 'classnames';
11
11
  import PropTypes from '../../node_modules/prop-types/index.js';
@@ -17,8 +17,11 @@ import { useClickOutsideElement, useWindowEvent } from './utils/hooks.js';
17
17
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
18
18
  import { pkg } from '../../settings.js';
19
19
  import { throttle } from 'lodash';
20
+ import { Popover, PopoverContent } from '@carbon/react';
21
+ import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
22
+
23
+ var _excluded = ["align", "autoAlign", "children", "className", "onClose", "overlayClassName", "overlayKind", "overlayRef", "positionTune", "portalTarget", "target", "theme"];
20
24
 
21
- var _excluded = ["align", "children", "className", "onClose", "overlayClassName", "overlayKind", "overlayRef", "portalTarget", "positionTune", "target", "theme"];
22
25
  // The block part of our conventional BEM class names (blockClass__E--M).
23
26
  var blockClass = "".concat(pkg.prefix, "--coachmark");
24
27
  var overlayBlockClass = "".concat(blockClass, "-overlay");
@@ -36,9 +39,10 @@ var defaults = {
36
39
  */
37
40
 
38
41
  var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
39
- var _document$querySelect;
42
+ var _positionTune$y, _positionTune$x;
40
43
  var _ref$align = _ref.align,
41
44
  align = _ref$align === void 0 ? defaults.align : _ref$align,
45
+ autoAlign = _ref.autoAlign,
42
46
  children = _ref.children,
43
47
  className = _ref.className,
44
48
  _ref$onClose = _ref.onClose,
@@ -47,15 +51,14 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
47
51
  _ref$overlayKind = _ref.overlayKind,
48
52
  overlayKind = _ref$overlayKind === void 0 ? defaults.overlayKind : _ref$overlayKind,
49
53
  overlayRef = _ref.overlayRef,
50
- portalTarget = _ref.portalTarget,
51
54
  positionTune = _ref.positionTune,
55
+ portalTarget = _ref.portalTarget,
52
56
  target = _ref.target,
53
57
  _ref$theme = _ref.theme,
54
58
  theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
55
59
  rest = _objectWithoutProperties(_ref, _excluded);
56
60
  var isBeacon = overlayKind === COACHMARK_OVERLAY_KIND.TOOLTIP;
57
61
  var isStacked = overlayKind === COACHMARK_OVERLAY_KIND.STACKED;
58
- var portalNode = portalTarget ? (_document$querySelect = document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector('body') : document.querySelector('body');
59
62
  var _useState = useState(isStacked),
60
63
  _useState2 = _slicedToArray(_useState, 2),
61
64
  isOpen = _useState2[0],
@@ -79,6 +82,11 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
79
82
  var backupRef = useRef();
80
83
  var _coachmarkRef = ref || backupRef;
81
84
  var _overlayRef = overlayRef || overlayBackupRef;
85
+ var portalNode = useRef(null);
86
+ useIsomorphicEffect(function () {
87
+ var _document$querySelect, _document, _document2, _document3;
88
+ portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
89
+ }, [portalTarget]);
82
90
  var closeOverlay = function closeOverlay() {
83
91
  setIsOpen(false);
84
92
  };
@@ -120,6 +128,10 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
120
128
  setShouldResetPosition(true);
121
129
  }
122
130
  };
131
+ var overlayPositionStyle = {
132
+ top: ((_positionTune$y = positionTune === null || positionTune === void 0 ? void 0 : positionTune.y) !== null && _positionTune$y !== void 0 ? _positionTune$y : 0) - 16,
133
+ left: ((_positionTune$x = positionTune === null || positionTune === void 0 ? void 0 : positionTune.x) !== null && _positionTune$x !== void 0 ? _positionTune$x : 0) - 16
134
+ };
123
135
  var contextValue = {
124
136
  buttonProps: {
125
137
  'aria-expanded': isOpen,
@@ -135,7 +147,8 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
135
147
  targetRect: targetRect,
136
148
  targetOffset: targetOffset,
137
149
  align: align,
138
- positionTune: positionTune
150
+ positionTune: positionTune,
151
+ isOpen: isOpen
139
152
  };
140
153
  var handleResize = throttle(function () {
141
154
  closeOverlay();
@@ -169,18 +182,35 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
169
182
  }, /*#__PURE__*/React__default.createElement("div", _extends({
170
183
  className: cx(blockClass, "".concat(blockClass, "__").concat(theme), className),
171
184
  ref: _coachmarkRef
172
- }, rest, getDevtoolsProps(componentName)), target, isOpen && /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
185
+ }, rest, getDevtoolsProps(componentName)), overlayKind !== 'tooltip' ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, target, isOpen && (portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) && /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
173
186
  ref: _overlayRef,
174
187
  fixedIsVisible: false,
175
188
  kind: overlayKind,
176
189
  onClose: handleClose,
177
190
  theme: theme,
178
191
  className: cx(overlayClassName, "".concat(overlayBlockClass, "--is-visible"))
179
- }, children),
180
- // Default to `document.body` when `portalNode` is `null`
181
- portalNode || document.body)));
192
+ }, children), // Default to `document.body` when `portalNode` is `null`
193
+ portalNode === null || portalNode === void 0 ? void 0 : portalNode.current)) : /*#__PURE__*/React__default.createElement(Popover, {
194
+ highContrast: true,
195
+ caret: true,
196
+ style: _objectSpread2({
197
+ position: 'absolute'
198
+ }, overlayPositionStyle),
199
+ align: align,
200
+ autoAlign: autoAlign,
201
+ open: isOpen
202
+ }, target, /*#__PURE__*/React__default.createElement(PopoverContent, null, isOpen && /*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
203
+ ref: _overlayRef,
204
+ fixedIsVisible: false,
205
+ kind: overlayKind,
206
+ onClose: handleClose,
207
+ theme: theme,
208
+ className: cx(overlayClassName, _defineProperty({}, "".concat(overlayBlockClass, "--is-visible"), isOpen))
209
+ }, children)))));
182
210
  });
183
- var overlayRefType = typeof HTMLElement === 'undefined' ? PropTypes.object : PropTypes.instanceOf(HTMLElement);
211
+ var overlayRefType = typeof HTMLElement === 'undefined' ? PropTypes.object :
212
+ // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
213
+ PropTypes.instanceOf(HTMLElement);
184
214
 
185
215
  // Return a placeholder if not released and not enabled by feature flag
186
216
  Coachmark = pkg.checkComponentEnabled(Coachmark, componentName);
@@ -199,6 +229,11 @@ Coachmark.propTypes = {
199
229
  * @see COACHMARK_ALIGNMENT
200
230
  */
201
231
  align: PropTypes.oneOf(['bottom', 'bottom-left', 'bottom-right', 'left', 'left-top', 'left-bottom', 'right', 'right-top', 'right-bottom', 'top', 'top-left', 'top-right']),
232
+ /**
233
+ * Auto aligns the coachmark based on screen boundaries
234
+ * Applies only to Tooltip Coachmarks.
235
+ */
236
+ autoAlign: PropTypes.bool,
202
237
  /**
203
238
  * Coachmark should use a single CoachmarkOverlayElements component as a child.
204
239
  * @see CoachmarkOverlayElements
@@ -237,6 +272,7 @@ Coachmark.propTypes = {
237
272
  /**
238
273
  * Fine tune the position of the target in pixels. Applies only to Beacons.
239
274
  */
275
+ // @ts-ignore
240
276
  positionTune: PropTypes.shape({
241
277
  x: PropTypes.number,
242
278
  y: PropTypes.number
@@ -55,7 +55,7 @@ var CoachmarkOverlay = /*#__PURE__*/forwardRef(function (_ref, ref) {
55
55
  var coachmark = useCoachmark();
56
56
  var isBeacon = kind === COACHMARK_OVERLAY_KIND.TOOLTIP;
57
57
  var isDraggable = kind === COACHMARK_OVERLAY_KIND.FLOATING;
58
- var isVisible = className && className.includes('is-visible');
58
+ var isVisible = className === null || className === void 0 ? void 0 : className.includes('is-visible');
59
59
  var handleKeyPress = function handleKeyPress(event) {
60
60
  var shiftKey = event.shiftKey,
61
61
  key = event.key;
@@ -163,9 +163,7 @@ var CoachmarkOverlay = /*#__PURE__*/forwardRef(function (_ref, ref) {
163
163
  return /*#__PURE__*/React__default.cloneElement(child, {
164
164
  isVisible: isVisible
165
165
  });
166
- })), isBeacon && /*#__PURE__*/React__default.createElement("span", {
167
- className: "".concat(blockClass, "__caret")
168
- }));
166
+ })));
169
167
  });
170
168
  function getWindowDimensions() {
171
169
  var _window = window,
@@ -26,7 +26,6 @@ var defaults = {
26
26
  * Use beacon for the target prop of a Coachmark component.
27
27
  */
28
28
  var CoachmarkBeacon = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
29
- var _coachmark$positionTu, _coachmark$positionTu2, _coachmark$positionTu3, _coachmark$positionTu4;
30
29
  var label = _ref.label,
31
30
  className = _ref.className,
32
31
  _ref$kind = _ref.kind,
@@ -36,14 +35,9 @@ var CoachmarkBeacon = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
36
35
  if (!coachmark) {
37
36
  return _div || (_div = /*#__PURE__*/React__default.createElement("div", null, "CoachmarkBeacon is to be use exclusively within the target prop of Coachmark"));
38
37
  }
39
- var overlayPositionStyle = {
40
- top: (_coachmark$positionTu = (_coachmark$positionTu2 = coachmark.positionTune) === null || _coachmark$positionTu2 === void 0 ? void 0 : _coachmark$positionTu2.y) !== null && _coachmark$positionTu !== void 0 ? _coachmark$positionTu : 0,
41
- left: (_coachmark$positionTu3 = (_coachmark$positionTu4 = coachmark.positionTune) === null || _coachmark$positionTu4 === void 0 ? void 0 : _coachmark$positionTu4.x) !== null && _coachmark$positionTu3 !== void 0 ? _coachmark$positionTu3 : 0
42
- };
43
38
  return /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
44
39
  className: cx(blockClass, "".concat(blockClass, "-").concat(kind), className),
45
- ref: ref,
46
- style: overlayPositionStyle
40
+ ref: ref
47
41
  }, getDevtoolsProps(componentName), {
48
42
  role: "tooltip"
49
43
  }), /*#__PURE__*/React__default.createElement("button", _extends({
@@ -16,6 +16,8 @@ import { CoachmarkOverlay } from '../Coachmark/CoachmarkOverlay.js';
16
16
  import { CoachmarkTagline } from '../Coachmark/CoachmarkTagline.js';
17
17
  import { CoachmarkContext } from '../Coachmark/utils/context.js';
18
18
  import { COACHMARK_OVERLAY_KIND } from '../Coachmark/utils/enums.js';
19
+ import { useReducedMotion } from 'framer-motion';
20
+ import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
19
21
 
20
22
  var _excluded = ["children", "className", "onClose", "portalTarget", "tagline", "theme"];
21
23
  // Carbon and package components we use.
@@ -39,7 +41,6 @@ var defaults = {
39
41
  * This variant allows the a coachmark overlay to be displayed by interacting with the tagline.
40
42
  */
41
43
  var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
42
- var _document$querySelect;
43
44
  var children = _ref.children,
44
45
  className = _ref.className,
45
46
  _ref$onClose = _ref.onClose,
@@ -51,7 +52,7 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
51
52
  theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
52
53
  rest = _objectWithoutProperties(_ref, _excluded);
53
54
  var overlayRef = useRef(null);
54
- var portalNode = portalTarget ? (_document$querySelect = document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector('body') : document.querySelector('body');
55
+ var portalNode = useRef(null);
55
56
  var _useState = useState(false),
56
57
  _useState2 = _slicedToArray(_useState, 2),
57
58
  isOpen = _useState2[0],
@@ -75,17 +76,19 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
75
76
  _useState10 = _slicedToArray(_useState9, 2),
76
77
  fixedIsVisible = _useState10[0],
77
78
  setFixedIsVisible = _useState10[1];
78
- var prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
79
+ var shouldReduceMotion = useReducedMotion();
80
+ useIsomorphicEffect(function () {
81
+ var _document$querySelect, _document, _document2, _document3;
82
+ portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
83
+ }, [portalTarget]);
79
84
  var handleClose = useCallback(function () {
80
- console.log('HANDLING CLOSE HERE...');
81
- if (prefersReducedMotion.matches) {
85
+ if (shouldReduceMotion) {
82
86
  setIsOpen(false);
83
87
  } else {
84
88
  setFixedIsVisible(false);
85
89
  }
86
- }, [prefersReducedMotion.matches]);
90
+ }, [shouldReduceMotion]);
87
91
  var handleTransitionEnd = function handleTransitionEnd(e) {
88
- console.log('Here at transition end... ', e.propertyName === 'transform' && !fixedIsVisible);
89
92
  if (e.propertyName === 'transform' && !fixedIsVisible) {
90
93
  setIsOpen(false);
91
94
  onClose();
@@ -164,7 +167,7 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
164
167
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement(CoachmarkTagline, {
165
168
  title: tagline,
166
169
  onClose: onClose
167
- }), isOpen && /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
170
+ }), isOpen && (portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) && /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
168
171
  ref: overlayRef,
169
172
  fixedIsVisible: fixedIsVisible,
170
173
  kind: COACHMARK_OVERLAY_KIND.FIXED,
@@ -172,9 +175,8 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
172
175
  onTransitionEnd: handleTransitionEnd,
173
176
  theme: theme,
174
177
  className: cx(fixedIsVisible && "".concat(overlayBlockClass, "--is-visible"), overlayBlockClass)
175
- }, children),
176
- // Default to `document.body` when `portalNode` is `null`
177
- portalNode || document.body)));
178
+ }, children), // Default to `document.body` when `portalNode` is `null`
179
+ portalNode === null || portalNode === void 0 ? void 0 : portalNode.current)));
178
180
  });
179
181
 
180
182
  // Return a placeholder if not released and not enabled by feature flag
@@ -17,6 +17,7 @@ import { CoachmarkStackHome } from './CoachmarkStackHome.js';
17
17
  import { CoachmarkTagline } from '../Coachmark/CoachmarkTagline.js';
18
18
  import { CoachmarkContext } from '../Coachmark/utils/context.js';
19
19
  import { COACHMARK_OVERLAY_KIND } from '../Coachmark/utils/enums.js';
20
+ import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
20
21
 
21
22
  var _excluded = ["children", "className", "onClose", "description", "media", "navLinkLabels", "portalTarget", "closeButtonLabel", "tagline", "theme", "title"];
22
23
 
@@ -47,7 +48,6 @@ var defaults = {
47
48
  * This variant allows the stacking of multiple coachmark overlays to be displayed by interacting with the tagline.
48
49
  */
49
50
  var CoachmarkStack = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
50
- var _document$querySelect;
51
51
  var children = _ref.children,
52
52
  className = _ref.className,
53
53
  _ref$onClose = _ref.onClose,
@@ -63,7 +63,11 @@ var CoachmarkStack = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
63
63
  theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
64
64
  title = _ref.title,
65
65
  rest = _objectWithoutProperties(_ref, _excluded);
66
- var portalNode = portalTarget ? (_document$querySelect = document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector('body') : document.querySelector('body');
66
+ var portalNode = useRef();
67
+ useIsomorphicEffect(function () {
68
+ var _document$querySelect, _document, _document2, _document3;
69
+ portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
70
+ }, [portalTarget]);
67
71
  var stackHomeRef = useRef();
68
72
  var stackedCoachmarkRefs = useRef([]);
69
73
  var _useState = useState(false),
@@ -206,7 +210,7 @@ var CoachmarkStack = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
206
210
  portalTarget: portalTarget,
207
211
  closeButtonLabel: closeButtonLabel,
208
212
  title: title
209
- }), /*#__PURE__*/createPortal(wrappedChildren, portalNode)));
213
+ }), portalNode !== null && portalNode !== void 0 && portalNode.current ? /*#__PURE__*/createPortal(wrappedChildren, portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) : null));
210
214
  });
211
215
 
212
216
  // Return a placeholder if not released and not enabled by feature flag
@@ -16,6 +16,7 @@ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
16
16
  import { pkg } from '../../settings.js';
17
17
  import { createPortal } from 'react-dom';
18
18
  import { CoachmarkHeader } from '../Coachmark/CoachmarkHeader.js';
19
+ import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
19
20
  import { SteppedAnimatedMedia } from '../SteppedAnimatedMedia/SteppedAnimatedMedia.js';
20
21
 
21
22
  var _excluded = ["className", "description", "isOpen", "media", "navLinkLabels", "onClickNavItem", "onClose", "portalTarget", "closeButtonLabel", "title"];
@@ -33,7 +34,6 @@ var componentName = 'CoachmarkStackHome';
33
34
  * of other Onboarding components.
34
35
  */
35
36
  var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
36
- var _document$querySelect;
37
37
  var className = _ref.className,
38
38
  description = _ref.description,
39
39
  isOpen = _ref.isOpen,
@@ -57,11 +57,15 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
57
57
  }
58
58
  }, 100);
59
59
  }, [isOpen]);
60
+ var portalNode = useRef();
61
+ useIsomorphicEffect(function () {
62
+ var _document$querySelect, _document, _document2, _document3;
63
+ portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
64
+ }, [portalTarget]);
60
65
  if (!navLinkLabels) {
61
66
  return pconsole.warn("".concat(componentName, " is an Onboarding internal component and is not intended for general use."));
62
67
  }
63
- var portalNode = portalTarget ? (_document$querySelect = document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector('body') : document.querySelector('body');
64
- return /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
68
+ return portalNode !== null && portalNode !== void 0 && portalNode.current ? /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
65
69
  className: cx(blockClass, className),
66
70
  ref: ref,
67
71
  role: "main"
@@ -103,7 +107,7 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
103
107
  setLinkFocusIndex(0);
104
108
  _onClose();
105
109
  }
106
- }, closeButtonLabel))))), portalNode);
110
+ }, closeButtonLabel))))), portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) : null;
107
111
  function renderNavLink(index, label) {
108
112
  var ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
109
113
  return /*#__PURE__*/React__default.createElement("li", {
@@ -10,8 +10,7 @@ import React__default, { useContext, useState } from 'react';
10
10
  import { Close } from '@carbon/react/icons';
11
11
  import { ConditionBuilderItem } from '../ConditionBuilderItem/ConditionBuilderItem.js';
12
12
  import PropTypes from '../../../node_modules/prop-types/index.js';
13
- import { blockClass, translateWithId, statementConfig, operatorConfig } from '../ConditionBuilderContext/DataConfigs.js';
14
- import { ConditionBuilderItemOption } from '../ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js';
13
+ import { blockClass, statementConfig, operatorConfig } from '../ConditionBuilderContext/DataConfigs.js';
15
14
  import cx from 'classnames';
16
15
  import ConditionConnector from '../ConditionBuilderConnector/ConditionConnector.js';
17
16
  import { ConditionBuilderItemNumber } from '../ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js';
@@ -19,11 +18,15 @@ import { ConditionBuilderItemText } from '../ConditionBuilderItem/ConditionBuild
19
18
  import { ConditionBuilderItemDate } from '../ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js';
20
19
  import { ConditionBuilderContext } from '../ConditionBuilderContext/ConditionBuilderProvider.js';
21
20
  import { ConditionBuilderButton } from '../ConditionBuilderButton/ConditionBuilderButton.js';
22
- import { focusThisField } from '../utils/util.js';
21
+ import { checkIsValid, focusThisField } from '../utils/util.js';
23
22
  import { ConditionBuilderItemTime } from '../ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js';
24
23
  import ConditionBuilderAdd from '../ConditionBuilderAdd/ConditionBuilderAdd.js';
24
+ import { ItemOption } from '../ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js';
25
+ import { ItemOptionForValueField } from '../ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js';
26
+ import { useTranslations } from '../utils/useTranslations.js';
25
27
 
26
28
  var _div;
29
+
27
30
  /**
28
31
  * This component build each block of condition consisting of property, operator value and close button.
29
32
  */
@@ -52,41 +55,46 @@ var ConditionBlock = function ConditionBlock(props) {
52
55
  isLastCondition = props.isLastCondition;
53
56
  var _useContext = useContext(ConditionBuilderContext),
54
57
  inputConfig = _useContext.inputConfig,
55
- variant = _useContext.variant;
56
- //Below possible input types expected for value field.
57
- var itemComponents = {
58
- option: ConditionBuilderItemOption,
59
- text: ConditionBuilderItemText,
60
- number: ConditionBuilderItemNumber,
61
- date: ConditionBuilderItemDate,
62
- time: ConditionBuilderItemTime
63
- };
58
+ variant = _useContext.variant,
59
+ conditionBuilderRef = _useContext.conditionBuilderRef;
64
60
  var _useState = useState(false),
65
61
  _useState2 = _slicedToArray(_useState, 2),
66
62
  showDeletionPreview = _useState2[0],
67
63
  setShowDeletionPreview = _useState2[1];
64
+ var _useTranslations = useTranslations(['conditionRowText', 'conditionText', 'propertyText', 'operatorText', 'removeConditionText']),
65
+ _useTranslations2 = _slicedToArray(_useTranslations, 5),
66
+ conditionRowText = _useTranslations2[0],
67
+ conditionText = _useTranslations2[1],
68
+ propertyText = _useTranslations2[2],
69
+ operatorText = _useTranslations2[3],
70
+ removeConditionText = _useTranslations2[4];
68
71
 
69
72
  //filtering the current property to access its properties and config options
70
73
  var getCurrentConfig = function getCurrentConfig(property) {
71
74
  var _inputConfig$properti, _inputConfig$properti2;
72
- return (_inputConfig$properti = (_inputConfig$properti2 = inputConfig.properties) === null || _inputConfig$properti2 === void 0 ? void 0 : _inputConfig$properti2.filter(function (eachProperty) {
75
+ return (_inputConfig$properti = (_inputConfig$properti2 = inputConfig.properties) === null || _inputConfig$properti2 === void 0 ? void 0 : _inputConfig$properti2.find(function (eachProperty) {
73
76
  return eachProperty.id == property;
74
- })[0]) !== null && _inputConfig$properti !== void 0 ? _inputConfig$properti : {};
77
+ })) !== null && _inputConfig$properti !== void 0 ? _inputConfig$properti : {};
75
78
  };
76
79
  var _getCurrentConfig = getCurrentConfig(property),
77
80
  icon = _getCurrentConfig.icon,
78
81
  type = _getCurrentConfig.type,
79
82
  config = _getCurrentConfig.config,
80
83
  label = _getCurrentConfig.label;
81
- var ItemComponent;
82
- // if (type == 'custom') {
83
- // ItemComponent = config.component;
84
- // } else {
85
- ItemComponent = property ? itemComponents[type] : null;
86
- //}
87
84
 
85
+ //Below possible input types expected for value field.
86
+ var itemComponents = {
87
+ text: ConditionBuilderItemText,
88
+ number: ConditionBuilderItemNumber,
89
+ date: ConditionBuilderItemDate,
90
+ time: ConditionBuilderItemTime,
91
+ option: ItemOptionForValueField,
92
+ custom: config === null || config === void 0 ? void 0 : config.component,
93
+ textarea: ConditionBuilderItemText
94
+ };
95
+ var ItemComponent = property ? itemComponents[type] : null;
88
96
  var onStatementChangeHandler = function onStatementChangeHandler(v, evt) {
89
- focusThisField(evt);
97
+ focusThisField(evt, conditionBuilderRef);
90
98
  onStatementChange(v);
91
99
  };
92
100
  var onPropertyChangeHandler = function onPropertyChangeHandler(newProperty) {
@@ -94,20 +102,22 @@ var ConditionBlock = function ConditionBlock(props) {
94
102
  property: newProperty,
95
103
  operator: undefined,
96
104
  value: '',
97
- popoverToOpen: 'operatorField'
105
+ popoverToOpen: checkIsValid(newProperty) ? 'operatorField' : ''
98
106
  }));
99
107
  };
100
108
  var onOperatorChangeHandler = function onOperatorChangeHandler(newOperator) {
101
109
  onChange(_objectSpread2(_objectSpread2({}, condition), {}, {
102
110
  operator: newOperator,
103
111
  value: undefined,
104
- popoverToOpen: 'valueField'
112
+ popoverToOpen: checkIsValid(newOperator) ? 'valueField' : ''
105
113
  }));
106
114
  };
107
- var onValueChangeHandler = function onValueChangeHandler(newValue) {
108
- onChange(_objectSpread2(_objectSpread2({}, condition), {}, {
109
- value: newValue,
110
- popoverToOpen: ''
115
+ var onValueChangeHandler = function onValueChangeHandler(newValue, evt) {
116
+ var currentCondition = _objectSpread2({}, condition);
117
+ delete currentCondition.popoverToOpen;
118
+ focusThisField(evt, conditionBuilderRef);
119
+ onChange(_objectSpread2(_objectSpread2({}, currentCondition), {}, {
120
+ value: newValue
111
121
  }));
112
122
  };
113
123
  var handleShowDeletionPreview = function handleShowDeletionPreview() {
@@ -117,6 +127,9 @@ var ConditionBlock = function ConditionBlock(props) {
117
127
  setShowDeletionPreview(false);
118
128
  };
119
129
  var getOperators = function getOperators() {
130
+ if (config !== null && config !== void 0 && config.operators) {
131
+ return config.operators;
132
+ }
120
133
  return operatorConfig.filter(function (operator) {
121
134
  return operator.type.indexOf(type) != -1 || operator.type == 'all';
122
135
  });
@@ -128,11 +141,24 @@ var ConditionBlock = function ConditionBlock(props) {
128
141
  'aria-setsize': aria.setsize
129
142
  } : {};
130
143
  };
144
+ var renderChildren = function renderChildren(popoverRef) {
145
+ return /*#__PURE__*/React__default.createElement(ItemComponent, {
146
+ conditionState: {
147
+ property: property,
148
+ operator: operator,
149
+ value: value
150
+ },
151
+ onChange: onValueChangeHandler,
152
+ config: config,
153
+ "data-name": "valueField",
154
+ parentRef: popoverRef,
155
+ type: type
156
+ });
157
+ };
131
158
  return /*#__PURE__*/React__default.createElement("div", _extends({
132
159
  className: cx("".concat(blockClass, "__condition-block"), _defineProperty({}, "".concat(blockClass, "__condition__deletion-preview"), showDeletionPreview), _defineProperty({}, "".concat(blockClass, "__gap-bottom"), variant == 'tree' && !(conditionIndex + 1 >= group.conditions.length)), _defineProperty({}, "".concat(blockClass, "__gap ").concat(blockClass, "__gap-bottom"), variant == 'sentence')),
133
160
  role: "row",
134
- "aria-label": translateWithId('condition_row'),
135
- tabIndex: -1
161
+ "aria-label": conditionRowText
136
162
  }, getAriaAttributes()), conjunction ? /*#__PURE__*/React__default.createElement(ConditionConnector, {
137
163
  className: "".concat(blockClass, "__gap"),
138
164
  operator: conjunction,
@@ -143,74 +169,69 @@ var ConditionBlock = function ConditionBlock(props) {
143
169
  role: "gridcell"
144
170
  })), isStatement && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
145
171
  label: group.statement,
146
- title: translateWithId('condition'),
172
+ title: conditionText,
147
173
  "data-name": "connectorField",
148
174
  popOverClassName: "".concat(blockClass, "__gap"),
149
175
  className: "".concat(blockClass, "__statement-button")
150
- }, /*#__PURE__*/React__default.createElement(ConditionBuilderItemOption, {
176
+ }, /*#__PURE__*/React__default.createElement(ItemOption, {
151
177
  conditionState: {
152
178
  value: group.statement,
153
- label: translateWithId('condition')
179
+ label: conditionText
154
180
  },
155
181
  onChange: onStatementChangeHandler,
156
182
  config: {
157
183
  options: statementConfig
158
184
  }
159
185
  })), /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
160
- label: label,
161
- title: translateWithId('property'),
186
+ label: label !== null && label !== void 0 ? label : condition === null || condition === void 0 ? void 0 : condition.property,
187
+ title: propertyText,
162
188
  renderIcon: icon !== null && icon !== void 0 ? icon : null,
163
189
  className: "".concat(blockClass, "__property-field"),
164
190
  "data-name": "propertyField",
165
191
  condition: condition,
166
- type: type
167
- }, /*#__PURE__*/React__default.createElement(ConditionBuilderItemOption, {
192
+ type: type,
193
+ onChange: onPropertyChangeHandler
194
+ }, /*#__PURE__*/React__default.createElement(ItemOption, {
168
195
  conditionState: {
169
196
  value: property,
170
- label: translateWithId('property')
197
+ label: propertyText
171
198
  },
172
199
  onChange: onPropertyChangeHandler,
173
200
  config: {
174
201
  options: inputConfig.properties
175
202
  }
176
- })), property && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
203
+ })), checkIsValid(property) && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
177
204
  label: operator,
178
- title: translateWithId('operator'),
205
+ title: operatorText,
179
206
  "data-name": "operatorField",
180
207
  condition: condition,
181
- type: type
182
- }, /*#__PURE__*/React__default.createElement(ConditionBuilderItemOption, {
208
+ type: type,
209
+ onChange: onOperatorChangeHandler
210
+ }, /*#__PURE__*/React__default.createElement(ItemOption, {
183
211
  config: {
184
212
  options: getOperators()
185
213
  },
186
214
  conditionState: {
187
215
  value: operator,
188
- label: translateWithId('operator')
216
+ label: operatorText
189
217
  },
190
218
  onChange: onOperatorChangeHandler
191
- })), property && operator && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
219
+ })), checkIsValid(property) && checkIsValid(operator) && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
192
220
  label: value,
193
221
  type: type,
194
222
  title: label,
195
223
  showToolTip: true,
196
224
  "data-name": "valueField",
197
225
  condition: condition,
198
- config: config
199
- }, /*#__PURE__*/React__default.createElement(ItemComponent, {
200
- conditionState: {
201
- property: property,
202
- operator: operator,
203
- value: value
204
- },
205
- onChange: onValueChangeHandler,
206
226
  config: config,
207
- "data-name": "valueField"
208
- })), /*#__PURE__*/React__default.createElement("span", {
227
+ onChange: onValueChangeHandler,
228
+ renderChildren: renderChildren
229
+ }), /*#__PURE__*/React__default.createElement("span", {
209
230
  role: "gridcell",
210
- "aria-label": translateWithId('remove_condition')
231
+ "aria-label": removeConditionText
211
232
  }, /*#__PURE__*/React__default.createElement(ConditionBuilderButton, {
212
233
  hideLabel: true,
213
- label: translateWithId('remove_condition'),
234
+ label: removeConditionText,
214
235
  onClick: onRemove,
215
236
  onMouseEnter: handleShowDeletionPreview,
216
237
  onMouseLeave: handleHideDeletionPreview,