@boomerang-io/carbon-addons-boomerang-react 4.6.14-beta.8 → 4.6.15-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/README.md +162 -162
  2. package/dist/cjs/components/AboutPlatform/AboutPlatform.js +50 -50
  3. package/dist/cjs/components/AdvantageSideNav/AdvantageSideNav.js +221 -221
  4. package/dist/cjs/components/AutoSuggest/AutoSuggest.js +101 -101
  5. package/dist/cjs/components/Avatar/Avatar.js +18 -18
  6. package/dist/cjs/components/CheckboxList/CheckboxList.js +34 -34
  7. package/dist/cjs/components/ComboBox/ComboBox.js +103 -103
  8. package/dist/cjs/components/ComboBoxMultiSelect/ComboBoxMultiSelect.js +32 -32
  9. package/dist/cjs/components/ComboBoxMultiSelect/MultiSelect.js +208 -208
  10. package/dist/cjs/components/ComposedModal/ComposedModal.js +80 -80
  11. package/dist/cjs/components/ConfirmModal/ConfirmModal.js +43 -43
  12. package/dist/cjs/components/Creatable/Creatable.js +137 -137
  13. package/dist/cjs/components/DataDrivenInput/DataDrivenInput.js +226 -226
  14. package/dist/cjs/components/DateInput/DateInput.js +35 -35
  15. package/dist/cjs/components/DecisionButtons/DecisionButtons.js +61 -61
  16. package/dist/cjs/components/DelayedRender/DelayedRender.js +17 -17
  17. package/dist/cjs/components/DynamicFormik/DynamicFormik.js +578 -578
  18. package/dist/cjs/components/Error403/Error403.js +13 -13
  19. package/dist/cjs/components/Error403/ForbiddenErrorBackground.js +113 -113
  20. package/dist/cjs/components/Error403/GraphicWrangler/GraphicWrangler.js +62 -62
  21. package/dist/cjs/components/Error404/Error404.js +13 -13
  22. package/dist/cjs/components/Error404/GraphicLoch/GraphicLoch.js +17 -17
  23. package/dist/cjs/components/Error404/NotFoundErrorBackground.js +129 -129
  24. package/dist/cjs/components/ErrorBoundary/ErrorBoundary.js +32 -32
  25. package/dist/cjs/components/ErrorDragon/ErrorDragon.js +13 -13
  26. package/dist/cjs/components/ErrorDragon/assets/ErrorGraphic.js +35 -35
  27. package/dist/cjs/components/ErrorFullPage/ErrorFullPage.js +10 -10
  28. package/dist/cjs/components/ErrorMessage/ErrorMessage.js +22 -22
  29. package/dist/cjs/components/ErrorPage/ErrorPage.js +11 -11
  30. package/dist/cjs/components/ErrorPageCore/ErrorPageCore.js +15 -15
  31. package/dist/cjs/components/ErrorPageCore/GenericErrorBackground.js +124 -124
  32. package/dist/cjs/components/FeatureHeader/FeatureHeader.js +29 -29
  33. package/dist/cjs/components/FeatureNavTab/FeatureNavTab.js +12 -12
  34. package/dist/cjs/components/FeatureNavTabs/FeatureNavTabs.js +12 -12
  35. package/dist/cjs/components/FeatureSideNav/FeatureSideNav.js +12 -12
  36. package/dist/cjs/components/FeatureSideNav/FeatureSideNavFooter.js +8 -8
  37. package/dist/cjs/components/FeatureSideNav/FeatureSideNavHeader.js +8 -8
  38. package/dist/cjs/components/FeatureSideNav/FeatureSideNavLinks.js +14 -14
  39. package/dist/cjs/components/FeatureSideNavLink/FeatureSideNavLink.js +12 -12
  40. package/dist/cjs/components/Feedback/Feedback.js +38 -38
  41. package/dist/cjs/components/FlowModal/FlowModal.js +141 -141
  42. package/dist/cjs/components/FlowModal/FlowModalForm.js +12 -12
  43. package/dist/cjs/components/Header/Header.js +187 -187
  44. package/dist/cjs/components/Header/HeaderAppSwitcher.js +94 -94
  45. package/dist/cjs/components/Header/HeaderMenu.js +7 -7
  46. package/dist/cjs/components/Header/HeaderMenuItem.js +51 -51
  47. package/dist/cjs/components/Header/HeaderTeamSwitcher.js +329 -332
  48. package/dist/cjs/components/Header/UserRequests.js +29 -29
  49. package/dist/cjs/components/ImageModal/ImageModal.js +17 -17
  50. package/dist/cjs/components/Loading/Loading.js +8 -8
  51. package/dist/cjs/components/MemberBar/MemberBar.js +20 -20
  52. package/dist/cjs/components/Modal/Modal.js +20 -20
  53. package/dist/cjs/components/ModalConfirmEdit/ModalConfirmArray.js +14 -14
  54. package/dist/cjs/components/ModalConfirmEdit/ModalConfirmDetails.js +11 -11
  55. package/dist/cjs/components/ModalConfirmEdit/ModalConfirmEdit.js +17 -17
  56. package/dist/cjs/components/ModalForm/ModalForm.js +9 -9
  57. package/dist/cjs/components/Notifications/NotificationsContainer.js +22 -22
  58. package/dist/cjs/components/Notifications/ToastNotification.js +21 -21
  59. package/dist/cjs/components/Notifications/notify.js +17 -17
  60. package/dist/cjs/components/PlatformBanner/PlatformBanner.js +8 -8
  61. package/dist/cjs/components/PlatformNotifications/PlatformNotification.js +17 -17
  62. package/dist/cjs/components/PlatformNotifications/PlatformNotificationsContainer.js +136 -136
  63. package/dist/cjs/components/Portal/Portal.js +14 -14
  64. package/dist/cjs/components/PrivacyRedirect/PrivacyRedirect.js +30 -30
  65. package/dist/cjs/components/PrivacyStatement/PrivacyStatement.js +90 -90
  66. package/dist/cjs/components/ProfileSettings/ProfileSettings.js +124 -140
  67. package/dist/cjs/components/ProtectedRoute/ProtectedRoute.js +13 -13
  68. package/dist/cjs/components/RadioGroup/RadioGroup.js +33 -33
  69. package/dist/cjs/components/RichTextArea/RichTextArea.js +142 -142
  70. package/dist/cjs/components/SignOut/SignOut.js +27 -27
  71. package/dist/cjs/components/SupportCenter/SupportCenter.js +65 -65
  72. package/dist/cjs/components/TextArea/TextArea.js +16 -16
  73. package/dist/cjs/components/TextInput/TextInput.js +13 -13
  74. package/dist/cjs/components/Toggle/Toggle.js +22 -22
  75. package/dist/cjs/components/TooltipHover/TooltipHover.js +39 -39
  76. package/dist/cjs/components/UIShell/UIShell.js +95 -95
  77. package/dist/cjs/config/servicesConfig.js +22 -22
  78. package/dist/cjs/constants/DataDrivenInputTypes.js +74 -74
  79. package/dist/cjs/constants/UserType.js +13 -13
  80. package/dist/cjs/hooks/useHeaderMenu.js +49 -49
  81. package/dist/cjs/hooks/usePortal.js +74 -74
  82. package/dist/cjs/hooks/useWindowSize.js +33 -33
  83. package/dist/cjs/internal/ListBox/ListBox.js +41 -41
  84. package/dist/cjs/internal/ListBox/ListBoxField.js +19 -19
  85. package/dist/cjs/internal/ListBox/ListBoxMenu.js +19 -19
  86. package/dist/cjs/internal/ListBox/ListBoxMenuIcon.js +31 -31
  87. package/dist/cjs/internal/ListBox/ListBoxMenuItem.js +38 -38
  88. package/dist/cjs/internal/ListBox/ListBoxSelection.js +64 -64
  89. package/dist/cjs/internal/ListBox/index.js +10 -10
  90. package/dist/cjs/internal/keyboard/keys.js +16 -16
  91. package/dist/cjs/internal/keyboard/match.js +67 -67
  92. package/dist/cjs/internal/settings.js +5 -5
  93. package/dist/cjs/tools/accessibility.js +13 -13
  94. package/dist/cjs/tools/createPropAdapter.js +44 -44
  95. package/dist/cjs/tools/isUrl.js +39 -39
  96. package/dist/cjs/tools/setupGetInstanceId.js +20 -20
  97. package/dist/cjs/tools/useSetState.js +12 -12
  98. package/dist/cjs/tools/yupAst/astGenerator.js +212 -212
  99. package/dist/cjs/tools/yupAst/customValidators.js +17 -17
  100. package/dist/esm/components/AboutPlatform/AboutPlatform.js +50 -50
  101. package/dist/esm/components/AdvantageSideNav/AdvantageSideNav.js +221 -221
  102. package/dist/esm/components/AutoSuggest/AutoSuggest.js +101 -101
  103. package/dist/esm/components/Avatar/Avatar.js +18 -18
  104. package/dist/esm/components/CheckboxList/CheckboxList.js +34 -34
  105. package/dist/esm/components/ComboBox/ComboBox.js +103 -103
  106. package/dist/esm/components/ComboBoxMultiSelect/ComboBoxMultiSelect.js +32 -32
  107. package/dist/esm/components/ComboBoxMultiSelect/MultiSelect.js +208 -208
  108. package/dist/esm/components/ComposedModal/ComposedModal.js +80 -80
  109. package/dist/esm/components/ConfirmModal/ConfirmModal.js +43 -43
  110. package/dist/esm/components/Creatable/Creatable.js +137 -137
  111. package/dist/esm/components/DataDrivenInput/DataDrivenInput.js +226 -226
  112. package/dist/esm/components/DateInput/DateInput.js +35 -35
  113. package/dist/esm/components/DecisionButtons/DecisionButtons.js +61 -61
  114. package/dist/esm/components/DelayedRender/DelayedRender.js +17 -17
  115. package/dist/esm/components/DynamicFormik/DynamicFormik.js +578 -578
  116. package/dist/esm/components/Error403/Error403.js +13 -13
  117. package/dist/esm/components/Error403/ForbiddenErrorBackground.js +113 -113
  118. package/dist/esm/components/Error403/GraphicWrangler/GraphicWrangler.js +62 -62
  119. package/dist/esm/components/Error404/Error404.js +13 -13
  120. package/dist/esm/components/Error404/GraphicLoch/GraphicLoch.js +17 -17
  121. package/dist/esm/components/Error404/NotFoundErrorBackground.js +129 -129
  122. package/dist/esm/components/ErrorBoundary/ErrorBoundary.js +32 -32
  123. package/dist/esm/components/ErrorDragon/ErrorDragon.js +13 -13
  124. package/dist/esm/components/ErrorDragon/assets/ErrorGraphic.js +35 -35
  125. package/dist/esm/components/ErrorFullPage/ErrorFullPage.js +10 -10
  126. package/dist/esm/components/ErrorMessage/ErrorMessage.js +22 -22
  127. package/dist/esm/components/ErrorPage/ErrorPage.js +11 -11
  128. package/dist/esm/components/ErrorPageCore/ErrorPageCore.js +15 -15
  129. package/dist/esm/components/ErrorPageCore/GenericErrorBackground.js +124 -124
  130. package/dist/esm/components/FeatureHeader/FeatureHeader.js +29 -29
  131. package/dist/esm/components/FeatureNavTab/FeatureNavTab.js +12 -12
  132. package/dist/esm/components/FeatureNavTabs/FeatureNavTabs.js +12 -12
  133. package/dist/esm/components/FeatureSideNav/FeatureSideNav.js +12 -12
  134. package/dist/esm/components/FeatureSideNav/FeatureSideNavFooter.js +8 -8
  135. package/dist/esm/components/FeatureSideNav/FeatureSideNavHeader.js +8 -8
  136. package/dist/esm/components/FeatureSideNav/FeatureSideNavLinks.js +14 -14
  137. package/dist/esm/components/FeatureSideNavLink/FeatureSideNavLink.js +12 -12
  138. package/dist/esm/components/Feedback/Feedback.js +38 -38
  139. package/dist/esm/components/FlowModal/FlowModal.js +141 -141
  140. package/dist/esm/components/FlowModal/FlowModalForm.js +12 -12
  141. package/dist/esm/components/Header/Header.js +187 -187
  142. package/dist/esm/components/Header/HeaderAppSwitcher.js +94 -94
  143. package/dist/esm/components/Header/HeaderMenu.js +7 -7
  144. package/dist/esm/components/Header/HeaderMenuItem.js +51 -51
  145. package/dist/esm/components/Header/HeaderTeamSwitcher.js +329 -332
  146. package/dist/esm/components/Header/UserRequests.js +29 -29
  147. package/dist/esm/components/ImageModal/ImageModal.js +17 -17
  148. package/dist/esm/components/Loading/Loading.js +8 -8
  149. package/dist/esm/components/MemberBar/MemberBar.js +20 -20
  150. package/dist/esm/components/Modal/Modal.js +20 -20
  151. package/dist/esm/components/ModalConfirmEdit/ModalConfirmArray.js +14 -14
  152. package/dist/esm/components/ModalConfirmEdit/ModalConfirmDetails.js +11 -11
  153. package/dist/esm/components/ModalConfirmEdit/ModalConfirmEdit.js +17 -17
  154. package/dist/esm/components/ModalForm/ModalForm.js +9 -9
  155. package/dist/esm/components/Notifications/NotificationsContainer.js +22 -22
  156. package/dist/esm/components/Notifications/ToastNotification.js +21 -21
  157. package/dist/esm/components/Notifications/notify.js +17 -17
  158. package/dist/esm/components/PlatformBanner/PlatformBanner.js +8 -8
  159. package/dist/esm/components/PlatformNotifications/PlatformNotification.js +17 -17
  160. package/dist/esm/components/PlatformNotifications/PlatformNotificationsContainer.js +136 -136
  161. package/dist/esm/components/Portal/Portal.js +14 -14
  162. package/dist/esm/components/PrivacyRedirect/PrivacyRedirect.js +30 -30
  163. package/dist/esm/components/PrivacyStatement/PrivacyStatement.js +90 -90
  164. package/dist/esm/components/ProfileSettings/ProfileSettings.js +124 -140
  165. package/dist/esm/components/ProtectedRoute/ProtectedRoute.js +13 -13
  166. package/dist/esm/components/RadioGroup/RadioGroup.js +33 -33
  167. package/dist/esm/components/RichTextArea/RichTextArea.js +142 -142
  168. package/dist/esm/components/SignOut/SignOut.js +27 -27
  169. package/dist/esm/components/SupportCenter/SupportCenter.js +65 -65
  170. package/dist/esm/components/TextArea/TextArea.js +16 -16
  171. package/dist/esm/components/TextInput/TextInput.js +13 -13
  172. package/dist/esm/components/Toggle/Toggle.js +22 -22
  173. package/dist/esm/components/TooltipHover/TooltipHover.js +39 -39
  174. package/dist/esm/components/UIShell/UIShell.js +95 -95
  175. package/dist/esm/config/servicesConfig.js +22 -22
  176. package/dist/esm/constants/DataDrivenInputTypes.js +74 -74
  177. package/dist/esm/constants/UserType.js +13 -13
  178. package/dist/esm/hooks/useHeaderMenu.js +49 -49
  179. package/dist/esm/hooks/usePortal.js +74 -74
  180. package/dist/esm/hooks/useWindowSize.js +33 -33
  181. package/dist/esm/internal/ListBox/ListBox.js +41 -41
  182. package/dist/esm/internal/ListBox/ListBoxField.js +19 -19
  183. package/dist/esm/internal/ListBox/ListBoxMenu.js +19 -19
  184. package/dist/esm/internal/ListBox/ListBoxMenuIcon.js +31 -31
  185. package/dist/esm/internal/ListBox/ListBoxMenuItem.js +38 -38
  186. package/dist/esm/internal/ListBox/ListBoxSelection.js +64 -64
  187. package/dist/esm/internal/ListBox/index.js +10 -10
  188. package/dist/esm/internal/keyboard/keys.js +16 -16
  189. package/dist/esm/internal/keyboard/match.js +67 -67
  190. package/dist/esm/internal/settings.js +5 -5
  191. package/dist/esm/tools/accessibility.js +13 -13
  192. package/dist/esm/tools/createPropAdapter.js +44 -44
  193. package/dist/esm/tools/isUrl.js +39 -39
  194. package/dist/esm/tools/setupGetInstanceId.js +20 -20
  195. package/dist/esm/tools/useSetState.js +12 -12
  196. package/dist/esm/tools/yupAst/astGenerator.js +212 -212
  197. package/dist/esm/tools/yupAst/customValidators.js +17 -17
  198. package/dist/types/index.d.ts +1359 -1360
  199. package/package.json +167 -167
  200. package/scss/components/AboutPlatform/_aboutPlatform.scss +139 -139
  201. package/scss/components/AdvantageSideNav/_advantageSideNav.scss +272 -272
  202. package/scss/components/AutoSuggest/_autoSuggest.scss +62 -62
  203. package/scss/components/Avatar/_avatar.scss +32 -32
  204. package/scss/components/CheckboxList/_checkboxList.scss +26 -26
  205. package/scss/components/ComboBox/_combobox.scss +23 -23
  206. package/scss/components/ComboBoxMultiSelect/_comboBoxMultiSelect.scss +53 -53
  207. package/scss/components/ConfirmModal/_confirmModal.scss +12 -12
  208. package/scss/components/Creatable/_creatable.scss +48 -48
  209. package/scss/components/DateInput/_dateInput.scss +36 -36
  210. package/scss/components/DecisionButtons/_decisionButtons.scss +132 -132
  211. package/scss/components/DynamicFormik/_dynamicFormik.scss +17 -17
  212. package/scss/components/ErrorBoundary/_errorBoundary.scss +12 -12
  213. package/scss/components/ErrorDragon/_errorDragon.scss +55 -55
  214. package/scss/components/ErrorMessage/_errorMessage.scss +43 -43
  215. package/scss/components/ErrorPage/_errorPage.scss +66 -66
  216. package/scss/components/ErrorPageCore/_errorPageCore.scss +73 -73
  217. package/scss/components/FeatureHeader/_featureHeader.scss +67 -67
  218. package/scss/components/FeatureNavTab/_featureNavTab.scss +27 -27
  219. package/scss/components/FeatureSideNav/_featureSideNav.scss +76 -76
  220. package/scss/components/FeatureSideNavLink/_featureSideNavLink.scss +49 -49
  221. package/scss/components/Feedback/_feedback.scss +50 -50
  222. package/scss/components/Header/_header.scss +179 -179
  223. package/scss/components/Header/_headerAppSwitcher.scss +117 -117
  224. package/scss/components/Header/_headerMenu.scss +30 -30
  225. package/scss/components/Header/_headerMenuItem.scss +65 -65
  226. package/scss/components/Header/_headerTeamSwitcher.scss +222 -222
  227. package/scss/components/Header/_userRequests.scss +36 -36
  228. package/scss/components/ImageModal/_imageModal.scss +51 -51
  229. package/scss/components/MemberBar/_memberBar.scss +99 -99
  230. package/scss/components/Modal/_modal.scss +163 -163
  231. package/scss/components/ModalConfirmEdit/_modalConfirmEdit.scss +113 -113
  232. package/scss/components/Notifications/_notifications.scss +57 -57
  233. package/scss/components/PlatformBanner/_platformBanner.scss +30 -30
  234. package/scss/components/PlatformNotifications/_platformNotifications.scss +230 -230
  235. package/scss/components/PrivacyRedirect/_privacyRedirect.scss +43 -43
  236. package/scss/components/PrivacyStatement/_privacyStatement.scss +137 -137
  237. package/scss/components/ProfileSettings/_profileSettings.scss +117 -117
  238. package/scss/components/ProtectedRoute/_protectedRoute.scss +32 -32
  239. package/scss/components/RadioGroup/_radioGroup.scss +46 -46
  240. package/scss/components/RichTextArea/_richTextArea.scss +82 -82
  241. package/scss/components/SignOut/_signOut.scss +51 -51
  242. package/scss/components/SupportCenter/_supportCenter.scss +16 -16
  243. package/scss/components/TextArea/_textArea.scss +19 -19
  244. package/scss/components/TextInput/_textInput.scss +26 -26
  245. package/scss/components/Toggle/_toggle.scss +80 -80
  246. package/scss/components/TooltipHover/_tooltip.scss +48 -48
  247. package/scss/global/_config.scss +14 -14
  248. package/scss/global/_tippy.scss +49 -49
  249. package/scss/global/index.scss +401 -401
  250. package/scss/global/themes/_boomerang.scss +184 -184
  251. package/scss/global/themes/_default.scss +79 -79
  252. package/scss/global/themes/_shell-tokens.scss +42 -42
  253. package/scss/global/utils/_animations.scss +15 -15
  254. package/scss/global/utils/_mixins.scss +67 -67
  255. package/scss/global/utils/index.scss +10 -10
@@ -11,44 +11,44 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
11
  var React__default = /*#__PURE__*/_interopDefault(React);
12
12
  var cx__default = /*#__PURE__*/_interopDefault(cx);
13
13
 
14
- /*
15
- IBM Confidential
16
- 694970X, 69497O0
17
- © Copyright IBM Corp. 2022, 2024
18
- */
19
- /**
20
- * Copyright IBM Corp. 2016, 2018
21
- *
22
- * This source code is licensed under the Apache-2.0 license found in the
23
- * LICENSE file in the root directory of this source tree.
24
- */
25
- function useIsTruncated(ref) {
26
- const [isTruncated, setIsTruncated] = React.useState(false);
27
- React.useEffect(() => {
28
- const { offsetWidth, scrollWidth } = ref.current;
29
- setIsTruncated(offsetWidth < scrollWidth);
30
- }, [ref, setIsTruncated]);
31
- return isTruncated;
32
- }
33
- /**
34
- * `ListBoxMenuItem` is a helper component for managing the container class
35
- * name, alongside any classes for any corresponding states, for a generic list
36
- * box menu item.
37
- */
38
- const ListBoxMenuItem = React__default.default.forwardRef(function ListBoxMenuItem({ children, isActive, isHighlighted, title, ...rest }, forwardedRef) {
39
- const ref = React.useRef(null);
40
- const isTruncated = useIsTruncated(forwardedRef?.menuItemOptionRef || ref);
41
- const className = cx__default.default(`${settings.prefix}--list-box__menu-item`, {
42
- [`${settings.prefix}--list-box__menu-item--active`]: isActive,
43
- [`${settings.prefix}--list-box__menu-item--highlighted`]: isHighlighted,
44
- });
45
- return (React__default.default.createElement("div", { ...rest, className: className, title: isTruncated ? title : undefined },
46
- React__default.default.createElement("div", { className: `${settings.prefix}--list-box__menu-item__option`, ref: forwardedRef?.menuItemOptionRef || ref }, children)));
47
- });
48
- ListBoxMenuItem.displayName = "ListBoxMenuItem";
49
- ListBoxMenuItem.defaultProps = {
50
- isActive: false,
51
- isHighlighted: false,
14
+ /*
15
+ IBM Confidential
16
+ 694970X, 69497O0
17
+ © Copyright IBM Corp. 2022, 2024
18
+ */
19
+ /**
20
+ * Copyright IBM Corp. 2016, 2018
21
+ *
22
+ * This source code is licensed under the Apache-2.0 license found in the
23
+ * LICENSE file in the root directory of this source tree.
24
+ */
25
+ function useIsTruncated(ref) {
26
+ const [isTruncated, setIsTruncated] = React.useState(false);
27
+ React.useEffect(() => {
28
+ const { offsetWidth, scrollWidth } = ref.current;
29
+ setIsTruncated(offsetWidth < scrollWidth);
30
+ }, [ref, setIsTruncated]);
31
+ return isTruncated;
32
+ }
33
+ /**
34
+ * `ListBoxMenuItem` is a helper component for managing the container class
35
+ * name, alongside any classes for any corresponding states, for a generic list
36
+ * box menu item.
37
+ */
38
+ const ListBoxMenuItem = React__default.default.forwardRef(function ListBoxMenuItem({ children, isActive, isHighlighted, title, ...rest }, forwardedRef) {
39
+ const ref = React.useRef(null);
40
+ const isTruncated = useIsTruncated(forwardedRef?.menuItemOptionRef || ref);
41
+ const className = cx__default.default(`${settings.prefix}--list-box__menu-item`, {
42
+ [`${settings.prefix}--list-box__menu-item--active`]: isActive,
43
+ [`${settings.prefix}--list-box__menu-item--highlighted`]: isHighlighted,
44
+ });
45
+ return (React__default.default.createElement("div", { ...rest, className: className, title: isTruncated ? title : undefined },
46
+ React__default.default.createElement("div", { className: `${settings.prefix}--list-box__menu-item__option`, ref: forwardedRef?.menuItemOptionRef || ref }, children)));
47
+ });
48
+ ListBoxMenuItem.displayName = "ListBoxMenuItem";
49
+ ListBoxMenuItem.defaultProps = {
50
+ isActive: false,
51
+ isHighlighted: false,
52
52
  };
53
53
 
54
54
  exports.default = ListBoxMenuItem;
@@ -14,70 +14,70 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
14
  var React__default = /*#__PURE__*/_interopDefault(React);
15
15
  var cx__default = /*#__PURE__*/_interopDefault(cx);
16
16
 
17
- /*
18
- IBM Confidential
19
- 694970X, 69497O0
20
- © Copyright IBM Corp. 2022, 2024
21
- */
22
- /**
23
- * Copyright IBM Corp. 2016, 2018
24
- *
25
- * This source code is licensed under the Apache-2.0 license found in the
26
- * LICENSE file in the root directory of this source tree.
27
- */
28
- /**
29
- * `ListBoxSelection` is used to provide controls for clearing a selection, in
30
- * addition to conditionally rendering a badge if the control has more than one
31
- * selection.
32
- */
33
- function ListBoxSelection({ clearSelection, selectionCount, translateWithId: t = (id) => defaultTranslations[id], disabled, onClearSelection, }) {
34
- const className = cx__default.default(`${settings.prefix}--list-box__selection`, {
35
- [`${settings.prefix}--tag--filter`]: selectionCount,
36
- [`${settings.prefix}--list-box__selection--multi`]: selectionCount,
37
- });
38
- const handleOnClick = (event) => {
39
- event.stopPropagation();
40
- if (disabled) {
41
- return;
42
- }
43
- clearSelection(event);
44
- if (onClearSelection) {
45
- onClearSelection(event);
46
- }
47
- };
48
- const handleOnKeyDown = (event) => {
49
- event.stopPropagation();
50
- if (disabled) {
51
- return;
52
- }
53
- // When a user hits ENTER, we'll clear the selection
54
- if (match.match(event, keys.Enter)) {
55
- clearSelection(event);
56
- if (onClearSelection) {
57
- onClearSelection(event);
58
- }
59
- }
60
- };
61
- const description = selectionCount ? t("clear.all") : t("clear.selection");
62
- const tagClasses = cx__default.default(`${settings.prefix}--tag`, `${settings.prefix}--tag--filter`, `${settings.prefix}--tag--high-contrast`, {
63
- [`${settings.prefix}--tag--disabled`]: disabled,
64
- });
65
- return selectionCount ? (React__default.default.createElement("div", { className: tagClasses },
66
- React__default.default.createElement("span", { className: `${settings.prefix}--tag__label`, title: String(selectionCount) }, selectionCount),
67
- React__default.default.createElement("div", { role: "button", tabIndex: disabled ? -1 : 0, className: `${settings.prefix}--tag__close-icon`, onClick: handleOnClick, onKeyDown: handleOnKeyDown,
68
- // @ts-expect-error TS(2322)
69
- disabled: disabled, "aria-label": t("clear.all"), title: description },
70
- React__default.default.createElement(icons.Close, null)))) : (React__default.default.createElement("div", { role: "button", className: className, tabIndex: disabled ? -1 : 0, onClick: handleOnClick, onKeyDown: handleOnKeyDown, "aria-label": description, title: description },
71
- selectionCount,
72
- React__default.default.createElement(icons.Close, null)));
73
- }
74
- const translationIds = {
75
- "clear.all": "clear.all",
76
- "clear.selection": "clear.selection",
77
- };
78
- const defaultTranslations = {
79
- [translationIds["clear.all"]]: "Clear all selected items",
80
- [translationIds["clear.selection"]]: "Clear selected item",
17
+ /*
18
+ IBM Confidential
19
+ 694970X, 69497O0
20
+ © Copyright IBM Corp. 2022, 2024
21
+ */
22
+ /**
23
+ * Copyright IBM Corp. 2016, 2018
24
+ *
25
+ * This source code is licensed under the Apache-2.0 license found in the
26
+ * LICENSE file in the root directory of this source tree.
27
+ */
28
+ /**
29
+ * `ListBoxSelection` is used to provide controls for clearing a selection, in
30
+ * addition to conditionally rendering a badge if the control has more than one
31
+ * selection.
32
+ */
33
+ function ListBoxSelection({ clearSelection, selectionCount, translateWithId: t = (id) => defaultTranslations[id], disabled, onClearSelection, }) {
34
+ const className = cx__default.default(`${settings.prefix}--list-box__selection`, {
35
+ [`${settings.prefix}--tag--filter`]: selectionCount,
36
+ [`${settings.prefix}--list-box__selection--multi`]: selectionCount,
37
+ });
38
+ const handleOnClick = (event) => {
39
+ event.stopPropagation();
40
+ if (disabled) {
41
+ return;
42
+ }
43
+ clearSelection(event);
44
+ if (onClearSelection) {
45
+ onClearSelection(event);
46
+ }
47
+ };
48
+ const handleOnKeyDown = (event) => {
49
+ event.stopPropagation();
50
+ if (disabled) {
51
+ return;
52
+ }
53
+ // When a user hits ENTER, we'll clear the selection
54
+ if (match.match(event, keys.Enter)) {
55
+ clearSelection(event);
56
+ if (onClearSelection) {
57
+ onClearSelection(event);
58
+ }
59
+ }
60
+ };
61
+ const description = selectionCount ? t("clear.all") : t("clear.selection");
62
+ const tagClasses = cx__default.default(`${settings.prefix}--tag`, `${settings.prefix}--tag--filter`, `${settings.prefix}--tag--high-contrast`, {
63
+ [`${settings.prefix}--tag--disabled`]: disabled,
64
+ });
65
+ return selectionCount ? (React__default.default.createElement("div", { className: tagClasses },
66
+ React__default.default.createElement("span", { className: `${settings.prefix}--tag__label`, title: String(selectionCount) }, selectionCount),
67
+ React__default.default.createElement("div", { role: "button", tabIndex: disabled ? -1 : 0, className: `${settings.prefix}--tag__close-icon`, onClick: handleOnClick, onKeyDown: handleOnKeyDown,
68
+ // @ts-expect-error TS(2322)
69
+ disabled: disabled, "aria-label": t("clear.all"), title: description },
70
+ React__default.default.createElement(icons.Close, null)))) : (React__default.default.createElement("div", { role: "button", className: className, tabIndex: disabled ? -1 : 0, onClick: handleOnClick, onKeyDown: handleOnKeyDown, "aria-label": description, title: description },
71
+ selectionCount,
72
+ React__default.default.createElement(icons.Close, null)));
73
+ }
74
+ const translationIds = {
75
+ "clear.all": "clear.all",
76
+ "clear.selection": "clear.selection",
77
+ };
78
+ const defaultTranslations = {
79
+ [translationIds["clear.all"]]: "Clear all selected items",
80
+ [translationIds["clear.selection"]]: "Clear selected item",
81
81
  };
82
82
 
83
83
  exports.default = ListBoxSelection;
@@ -7,16 +7,16 @@ var ListBoxMenuIcon = require('./ListBoxMenuIcon.js');
7
7
  var ListBoxMenuItem = require('./ListBoxMenuItem.js');
8
8
  var ListBoxSelection = require('./ListBoxSelection.js');
9
9
 
10
- /*
11
- IBM Confidential
12
- 694970X, 69497O0
13
- © Copyright IBM Corp. 2022, 2024
14
- */
15
- /**
16
- * Copyright IBM Corp. 2016, 2018
17
- *
18
- * This source code is licensed under the Apache-2.0 license found in the
19
- * LICENSE file in the root directory of this source tree.
10
+ /*
11
+ IBM Confidential
12
+ 694970X, 69497O0
13
+ © Copyright IBM Corp. 2022, 2024
14
+ */
15
+ /**
16
+ * Copyright IBM Corp. 2016, 2018
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
20
  */
21
21
 
22
22
  exports.ListBox = ListBox.default;
@@ -1,21 +1,21 @@
1
1
  'use strict';
2
2
 
3
- /*
4
- IBM Confidential
5
- 694970X, 69497O0
6
- © Copyright IBM Corp. 2022, 2024
7
- */
8
- /**
9
- * Copyright IBM Corp. 2016, 2018
10
- *
11
- * This source code is licensed under the Apache-2.0 license found in the
12
- * LICENSE file in the root directory of this source tree.
13
- */
14
- const Enter = {
15
- key: "Enter",
16
- which: 13,
17
- keyCode: 13,
18
- code: "Enter",
3
+ /*
4
+ IBM Confidential
5
+ 694970X, 69497O0
6
+ © Copyright IBM Corp. 2022, 2024
7
+ */
8
+ /**
9
+ * Copyright IBM Corp. 2016, 2018
10
+ *
11
+ * This source code is licensed under the Apache-2.0 license found in the
12
+ * LICENSE file in the root directory of this source tree.
13
+ */
14
+ const Enter = {
15
+ key: "Enter",
16
+ which: 13,
17
+ keyCode: 13,
18
+ code: "Enter",
19
19
  };
20
20
 
21
21
  exports.Enter = Enter;
@@ -1,72 +1,72 @@
1
1
  'use strict';
2
2
 
3
- /*
4
- IBM Confidential
5
- 694970X, 69497O0
6
- © Copyright IBM Corp. 2022, 2024
7
- */
8
- /**
9
- * Copyright IBM Corp. 2016, 2018
10
- *
11
- * This source code is licensed under the Apache-2.0 license found in the
12
- * LICENSE file in the root directory of this source tree.
13
- */
14
- /**
15
- * @typedef Key
16
- * @property key {Array<string>|string}
17
- * @property which {number}
18
- * @property keyCode {number}
19
- */
20
- /**
21
- * Check to see if at least one key code matches the key code of the
22
- * given event.
23
- *
24
- * @example
25
- * import * as keys from '../keys';
26
- * import { matches } from '../match';
27
- *
28
- * function handleOnKeyDown(event) {
29
- * if (matches(event, [keys.Enter, keys.Space]) {
30
- * // ...
31
- * }
32
- * }
33
- *
34
- * @param {Event} event
35
- * @param {Array<Key>} keysToMatch
36
- * @returns {boolean}
37
- */
38
- /**
39
- * Check to see if the given key matches the corresponding keyboard event. Also
40
- * supports passing in the value directly if you can't used the given event.
41
- *
42
- * @example
43
- * import * as keys from '../keys';
44
- * import { matches } from '../match';
45
- *
46
- * function handleOnKeyDown(event) {
47
- * if (match(event, keys.Enter) {
48
- * // ...
49
- * }
50
- * }
51
- *
52
- * @param {Event|number|string} eventOrCode
53
- * @param {Key} key
54
- * @returns {boolean}
55
- */
56
- function match(eventOrCode, { key, which, keyCode, code } = {}) {
57
- if (typeof eventOrCode === "string") {
58
- return eventOrCode === key;
59
- }
60
- if (typeof eventOrCode === "number") {
61
- return eventOrCode === which || eventOrCode === keyCode;
62
- }
63
- if (eventOrCode.key && Array.isArray(key)) {
64
- return key.indexOf(eventOrCode.key) !== -1;
65
- }
66
- return (eventOrCode.key === key ||
67
- eventOrCode.which === which ||
68
- eventOrCode.keyCode === keyCode ||
69
- eventOrCode.code === code);
3
+ /*
4
+ IBM Confidential
5
+ 694970X, 69497O0
6
+ © Copyright IBM Corp. 2022, 2024
7
+ */
8
+ /**
9
+ * Copyright IBM Corp. 2016, 2018
10
+ *
11
+ * This source code is licensed under the Apache-2.0 license found in the
12
+ * LICENSE file in the root directory of this source tree.
13
+ */
14
+ /**
15
+ * @typedef Key
16
+ * @property key {Array<string>|string}
17
+ * @property which {number}
18
+ * @property keyCode {number}
19
+ */
20
+ /**
21
+ * Check to see if at least one key code matches the key code of the
22
+ * given event.
23
+ *
24
+ * @example
25
+ * import * as keys from '../keys';
26
+ * import { matches } from '../match';
27
+ *
28
+ * function handleOnKeyDown(event) {
29
+ * if (matches(event, [keys.Enter, keys.Space]) {
30
+ * // ...
31
+ * }
32
+ * }
33
+ *
34
+ * @param {Event} event
35
+ * @param {Array<Key>} keysToMatch
36
+ * @returns {boolean}
37
+ */
38
+ /**
39
+ * Check to see if the given key matches the corresponding keyboard event. Also
40
+ * supports passing in the value directly if you can't used the given event.
41
+ *
42
+ * @example
43
+ * import * as keys from '../keys';
44
+ * import { matches } from '../match';
45
+ *
46
+ * function handleOnKeyDown(event) {
47
+ * if (match(event, keys.Enter) {
48
+ * // ...
49
+ * }
50
+ * }
51
+ *
52
+ * @param {Event|number|string} eventOrCode
53
+ * @param {Key} key
54
+ * @returns {boolean}
55
+ */
56
+ function match(eventOrCode, { key, which, keyCode, code } = {}) {
57
+ if (typeof eventOrCode === "string") {
58
+ return eventOrCode === key;
59
+ }
60
+ if (typeof eventOrCode === "number") {
61
+ return eventOrCode === which || eventOrCode === keyCode;
62
+ }
63
+ if (eventOrCode.key && Array.isArray(key)) {
64
+ return key.indexOf(eventOrCode.key) !== -1;
65
+ }
66
+ return (eventOrCode.key === key ||
67
+ eventOrCode.which === which ||
68
+ eventOrCode.keyCode === keyCode ||
69
+ eventOrCode.code === code);
70
70
  }
71
71
 
72
72
  exports.match = match;
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- /*
4
- IBM Confidential
5
- 694970X, 69497O0
6
- © Copyright IBM Corp. 2022, 2024
7
- */
3
+ /*
4
+ IBM Confidential
5
+ 694970X, 69497O0
6
+ © Copyright IBM Corp. 2022, 2024
7
+ */
8
8
  const prefix = "cds";
9
9
 
10
10
  exports.prefix = prefix;
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- /*
4
- IBM Confidential
5
- 694970X, 69497O0
6
- © Copyright IBM Corp. 2022, 2024
7
- */
8
- /**
9
- * Determine if keydown event is accessible
10
- * @param {Object} event the first array
11
- * @param {Array} arr2 the second array
12
- * @returns {boolean} true if both arrays have the same contents, otherwise false
13
- */
14
- const isAccessibleKeyDownEvent = (evt) => {
15
- return evt.which === 13 || evt.which === 32 || evt.type === "click";
3
+ /*
4
+ IBM Confidential
5
+ 694970X, 69497O0
6
+ © Copyright IBM Corp. 2022, 2024
7
+ */
8
+ /**
9
+ * Determine if keydown event is accessible
10
+ * @param {Object} event the first array
11
+ * @param {Array} arr2 the second array
12
+ * @returns {boolean} true if both arrays have the same contents, otherwise false
13
+ */
14
+ const isAccessibleKeyDownEvent = (evt) => {
15
+ return evt.which === 13 || evt.which === 32 || evt.type === "click";
16
16
  };
17
17
 
18
18
  exports.isAccessibleKeyDownEvent = isAccessibleKeyDownEvent;
@@ -1,49 +1,49 @@
1
1
  'use strict';
2
2
 
3
- /*
4
- IBM Confidential
5
- 694970X, 69497O0
6
- © Copyright IBM Corp. 2022, 2024
7
- */
8
- /**
9
- * Copyright IBM Corp. 2016, 2018
10
- *
11
- * This source code is licensed under the Apache-2.0 license found in the
12
- * LICENSE file in the root directory of this source tree.
13
- */
14
- /**
15
- * Create an adapter that converts an object of props with potentially deprecated
16
- * prop names to the replacement prop names in a newer version. Useful for guarding
17
- * against breaking changes when a prop has been renamed
18
- *
19
- * @param {Array} spec - an array of options which specify a text or regex
20
- * matcher alongside a replacement if there is a match
21
- * @returns {Function}
22
- */
23
- function createPropAdapter(spec) {
24
- // if props aren't passed in we should default the prop to empty object
25
- return (input = {}) => {
26
- const output = {};
27
- Object.keys(input).forEach((key) => {
28
- const match = spec.find(([regex]) => {
29
- return key.match(regex);
30
- });
31
- if (match) {
32
- const [regex, replacer] = match;
33
- output[key.replace(regex, replacer)] = input[key];
34
- return;
35
- }
36
- output[key] = input[key];
37
- });
38
- return output;
39
- };
40
- }
41
- /**
42
- * TODO: REMOVE IN v11
43
- * props staring with "default..." were changed to "initial..." in Downshift v3
44
- *
45
- * @see https://github.com/downshift-js/downshift/releases/tag/v3.0.0
46
- */
3
+ /*
4
+ IBM Confidential
5
+ 694970X, 69497O0
6
+ © Copyright IBM Corp. 2022, 2024
7
+ */
8
+ /**
9
+ * Copyright IBM Corp. 2016, 2018
10
+ *
11
+ * This source code is licensed under the Apache-2.0 license found in the
12
+ * LICENSE file in the root directory of this source tree.
13
+ */
14
+ /**
15
+ * Create an adapter that converts an object of props with potentially deprecated
16
+ * prop names to the replacement prop names in a newer version. Useful for guarding
17
+ * against breaking changes when a prop has been renamed
18
+ *
19
+ * @param {Array} spec - an array of options which specify a text or regex
20
+ * matcher alongside a replacement if there is a match
21
+ * @returns {Function}
22
+ */
23
+ function createPropAdapter(spec) {
24
+ // if props aren't passed in we should default the prop to empty object
25
+ return (input = {}) => {
26
+ const output = {};
27
+ Object.keys(input).forEach((key) => {
28
+ const match = spec.find(([regex]) => {
29
+ return key.match(regex);
30
+ });
31
+ if (match) {
32
+ const [regex, replacer] = match;
33
+ output[key.replace(regex, replacer)] = input[key];
34
+ return;
35
+ }
36
+ output[key] = input[key];
37
+ });
38
+ return output;
39
+ };
40
+ }
41
+ /**
42
+ * TODO: REMOVE IN v11
43
+ * props staring with "default..." were changed to "initial..." in Downshift v3
44
+ *
45
+ * @see https://github.com/downshift-js/downshift/releases/tag/v3.0.0
46
+ */
47
47
  const mapDownshiftProps = createPropAdapter([[/^default/g, "initial"]]);
48
48
 
49
49
  exports.mapDownshiftProps = mapDownshiftProps;
@@ -2,45 +2,45 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /*
6
- IBM Confidential
7
- 694970X, 69497O0
8
- © Copyright IBM Corp. 2022, 2024
9
- */
10
- /* eslint-disable */
11
- /**
12
- * https://github.com/segmentio/is-url
13
- */
14
- /**
15
- * RegExps.
16
- * A URL must match #1 and then at least one of #2/#3.
17
- * Use two levels of REs to avoid REDOS.
18
- */
19
- const protocolAndDomainRE = /^(?:\w+:)?\/\/(\S+)$/;
20
- const localhostDomainRE = /^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/;
21
- const nonLocalhostDomainRE = /^[^\s\.]+\.\S{2,}$/;
22
- /**
23
- * Loosely validate a URL `string`.
24
- *
25
- * @param {String} string
26
- * @return {Boolean}
27
- */
28
- function isUrl(string) {
29
- if (typeof string !== "string") {
30
- return false;
31
- }
32
- const match = string.match(protocolAndDomainRE);
33
- if (!match) {
34
- return false;
35
- }
36
- const everythingAfterProtocol = match[1];
37
- if (!everythingAfterProtocol) {
38
- return false;
39
- }
40
- if (localhostDomainRE.test(everythingAfterProtocol) || nonLocalhostDomainRE.test(everythingAfterProtocol)) {
41
- return true;
42
- }
43
- return false;
5
+ /*
6
+ IBM Confidential
7
+ 694970X, 69497O0
8
+ © Copyright IBM Corp. 2022, 2024
9
+ */
10
+ /* eslint-disable */
11
+ /**
12
+ * https://github.com/segmentio/is-url
13
+ */
14
+ /**
15
+ * RegExps.
16
+ * A URL must match #1 and then at least one of #2/#3.
17
+ * Use two levels of REs to avoid REDOS.
18
+ */
19
+ const protocolAndDomainRE = /^(?:\w+:)?\/\/(\S+)$/;
20
+ const localhostDomainRE = /^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/;
21
+ const nonLocalhostDomainRE = /^[^\s\.]+\.\S{2,}$/;
22
+ /**
23
+ * Loosely validate a URL `string`.
24
+ *
25
+ * @param {String} string
26
+ * @return {Boolean}
27
+ */
28
+ function isUrl(string) {
29
+ if (typeof string !== "string") {
30
+ return false;
31
+ }
32
+ const match = string.match(protocolAndDomainRE);
33
+ if (!match) {
34
+ return false;
35
+ }
36
+ const everythingAfterProtocol = match[1];
37
+ if (!everythingAfterProtocol) {
38
+ return false;
39
+ }
40
+ if (localhostDomainRE.test(everythingAfterProtocol) || nonLocalhostDomainRE.test(everythingAfterProtocol)) {
41
+ return true;
42
+ }
43
+ return false;
44
44
  }
45
45
 
46
46
  exports.default = isUrl;