@kaizen/components 1.57.2 → 1.58.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 (225) hide show
  1. package/bin/codemod.sh +39 -0
  2. package/codemods/README.md +31 -0
  3. package/codemods/__tests__/utils/index.ts +1 -0
  4. package/codemods/__tests__/utils/parseJsx.ts +11 -0
  5. package/codemods/migrateBrandMomentMoodToVariant/index.ts +21 -0
  6. package/codemods/migrateBrandMomentMoodToVariant/transformBrandMomentMoodToVariant.spec.ts +44 -0
  7. package/codemods/migrateBrandMomentMoodToVariant/transformBrandMomentMoodToVariant.ts +24 -0
  8. package/codemods/migrateCardVariantToColor/index.ts +15 -0
  9. package/codemods/migrateCardVariantToColor/transformCardVariantToColor.spec.ts +91 -0
  10. package/codemods/migrateCardVariantToColor/transformCardVariantToColor.ts +32 -0
  11. package/codemods/migrateConfirmationModalMoodsToVariant/index.ts +19 -0
  12. package/codemods/migrateConfirmationModalMoodsToVariant/transformConfirmationModalMoodsToVariant.spec.ts +110 -0
  13. package/codemods/migrateConfirmationModalMoodsToVariant/transformConfirmationModalMoodsToVariant.ts +59 -0
  14. package/codemods/migrateEmptyStateIllustrationTypeToVariant/index.ts +21 -0
  15. package/codemods/migrateEmptyStateIllustrationTypeToVariant/transformEmptyStateIllustrationTypeToVariant.spec.ts +74 -0
  16. package/codemods/migrateEmptyStateIllustrationTypeToVariant/transformEmptyStateIllustrationTypeToVariant.ts +28 -0
  17. package/codemods/migrateGlobalNotificationTypeToVariant/index.ts +19 -0
  18. package/codemods/migrateInformationTileMoodToVariant/index.ts +21 -0
  19. package/codemods/migrateInformationTileMoodToVariant/transformInformationTileMoodToVariant.spec.ts +84 -0
  20. package/codemods/migrateInformationTileMoodToVariant/transformInformationTileMoodToVariant.ts +22 -0
  21. package/codemods/migrateInlineNotificationTypeToVariant/index.ts +19 -0
  22. package/codemods/migrateMultiActionTileMoodToVariant/index.ts +21 -0
  23. package/codemods/migrateMultiActionTileMoodToVariant/transformMultiActionTileMoodToVariant.spec.ts +84 -0
  24. package/codemods/migrateMultiActionTileMoodToVariant/transformMultiActionTileMoodToVariant.ts +22 -0
  25. package/codemods/migrateNotificationTypeToVariant/index.ts +1 -0
  26. package/codemods/migrateNotificationTypeToVariant/migrateNotificationTypeToVariant.spec.ts +107 -0
  27. package/codemods/migrateNotificationTypeToVariant/migrateNotificationTypeToVariant.ts +28 -0
  28. package/codemods/migrateProgressBarMoodToColor/index.ts +21 -0
  29. package/codemods/migrateProgressBarMoodToColor/transformProgressBarMoodToColor.spec.ts +54 -0
  30. package/codemods/migrateProgressBarMoodToColor/transformProgressBarMoodToColor.ts +26 -0
  31. package/codemods/migrateToastNotificationTypeToVariant/index.ts +19 -0
  32. package/codemods/migrateWellVariantToColor/index.ts +15 -0
  33. package/codemods/migrateWellVariantToColor/transformWellVariantToColor.spec.ts +192 -0
  34. package/codemods/migrateWellVariantToColor/transformWellVariantToColor.ts +75 -0
  35. package/codemods/removeInputEditModalMood/index.ts +19 -0
  36. package/codemods/removeInputEditModalMood/removeInputEditModalMood.spec.ts +80 -0
  37. package/codemods/removeInputEditModalMood/removeInputEditModalMood.ts +40 -0
  38. package/codemods/updateGuidanceBlockVariantProp/transformGuidanceBlockVariantProp.spec.ts +118 -0
  39. package/codemods/updateGuidanceBlockVariantProp/transformGuidanceBlockVariantProp.ts +64 -0
  40. package/codemods/utils/__fixtures__/KaioComponent.tsx +6 -0
  41. package/codemods/utils/__snapshots__/transformSource.spec.ts.snap +11 -0
  42. package/codemods/utils/getPropValueText.spec.ts +75 -0
  43. package/codemods/utils/getPropValueText.ts +21 -0
  44. package/codemods/utils/getTagName.spec.ts +24 -0
  45. package/codemods/utils/getTagName.ts +32 -0
  46. package/codemods/utils/index.ts +7 -0
  47. package/codemods/utils/migrateStringProp.spec.ts +129 -0
  48. package/codemods/utils/migrateStringProp.ts +43 -0
  49. package/codemods/utils/printAst.ts +6 -0
  50. package/codemods/utils/transformComponentsInDir.ts +42 -0
  51. package/codemods/utils/transformSource.spec.ts +56 -0
  52. package/codemods/utils/transformSource.ts +25 -0
  53. package/codemods/utils/updateJsxElementWithNewProps.spec.ts +67 -0
  54. package/codemods/utils/updateJsxElementWithNewProps.ts +24 -0
  55. package/dist/cjs/BrandMoment/BrandMoment.cjs +3 -2
  56. package/dist/cjs/BrandMoment/BrandMoment.module.scss.cjs +3 -1
  57. package/dist/cjs/Card/Card.cjs +7 -6
  58. package/dist/cjs/Card/Card.module.scss.cjs +10 -2
  59. package/dist/cjs/EmptyState/EmptyState.cjs +14 -6
  60. package/dist/cjs/EmptyState/EmptyState.module.scss.cjs +3 -0
  61. package/dist/cjs/ErrorPage/ErrorPage.cjs +1 -1
  62. package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.cjs +9 -5
  63. package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.module.scss.cjs +6 -2
  64. package/dist/cjs/Notification/ToastNotification/ToastNotification/ToastNotification.cjs +1 -3
  65. package/dist/cjs/Notification/ToastNotification/ToastNotificationsList/subcomponents/ToastNotificationsMap/ToastNotificationsMap.cjs +1 -3
  66. package/dist/cjs/Notification/subcomponents/GenericNotification/GenericNotification.cjs +6 -3
  67. package/dist/cjs/Notification/subcomponents/GenericNotification/GenericNotification.module.scss.cjs +5 -3
  68. package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.cjs +35 -3
  69. package/dist/cjs/ProgressBar/ProgressBar.cjs +3 -2
  70. package/dist/cjs/ProgressBar/ProgressBar.module.scss.cjs +8 -4
  71. package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.cjs +7 -5
  72. package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.module.scss.cjs +8 -6
  73. package/dist/cjs/Well/Well.cjs +5 -4
  74. package/dist/cjs/Well/Well.module.scss.cjs +9 -1
  75. package/dist/cjs/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.cjs +6 -6
  76. package/dist/cjs/__containers__/GuidanceBlock/v1/GuidanceBlock.module.scss.cjs +33 -0
  77. package/dist/cjs/__containers__/GuidanceBlock/v2/GuidanceBlock.cjs +160 -0
  78. package/dist/cjs/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss.cjs +28 -0
  79. package/dist/cjs/containersV1.cjs +4 -0
  80. package/dist/cjs/containersV2.cjs +4 -0
  81. package/dist/cjs/index.cjs +2 -2
  82. package/dist/esm/BrandMoment/BrandMoment.mjs +3 -2
  83. package/dist/esm/BrandMoment/BrandMoment.module.scss.mjs +3 -1
  84. package/dist/esm/Card/Card.mjs +7 -6
  85. package/dist/esm/Card/Card.module.scss.mjs +10 -2
  86. package/dist/esm/EmptyState/EmptyState.mjs +15 -7
  87. package/dist/esm/EmptyState/EmptyState.module.scss.mjs +3 -0
  88. package/dist/esm/ErrorPage/ErrorPage.mjs +1 -1
  89. package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.mjs +9 -5
  90. package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.module.scss.mjs +6 -2
  91. package/dist/esm/Notification/ToastNotification/ToastNotification/ToastNotification.mjs +1 -3
  92. package/dist/esm/Notification/ToastNotification/ToastNotificationsList/subcomponents/ToastNotificationsMap/ToastNotificationsMap.mjs +1 -3
  93. package/dist/esm/Notification/subcomponents/GenericNotification/GenericNotification.mjs +8 -5
  94. package/dist/esm/Notification/subcomponents/GenericNotification/GenericNotification.module.scss.mjs +5 -3
  95. package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.mjs +39 -5
  96. package/dist/esm/ProgressBar/ProgressBar.mjs +3 -2
  97. package/dist/esm/ProgressBar/ProgressBar.module.scss.mjs +8 -4
  98. package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.mjs +7 -5
  99. package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.module.scss.mjs +8 -6
  100. package/dist/esm/Well/Well.mjs +5 -4
  101. package/dist/esm/Well/Well.module.scss.mjs +9 -1
  102. package/dist/esm/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.mjs +6 -6
  103. package/dist/esm/__containers__/GuidanceBlock/v1/GuidanceBlock.module.scss.mjs +31 -0
  104. package/dist/esm/__containers__/GuidanceBlock/v2/GuidanceBlock.mjs +153 -0
  105. package/dist/esm/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss.mjs +26 -0
  106. package/dist/esm/containersV1.mjs +1 -0
  107. package/dist/esm/containersV2.mjs +1 -0
  108. package/dist/esm/index.mjs +1 -1
  109. package/dist/styles.css +13 -12
  110. package/dist/types/BrandMoment/BrandMoment.d.ts +19 -3
  111. package/dist/types/Card/Card.d.ts +20 -7
  112. package/dist/types/EmptyState/EmptyState.d.ts +14 -6
  113. package/dist/types/Modal/ConfirmationModal/ConfirmationModal.d.ts +25 -7
  114. package/dist/types/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.d.ts +3 -0
  115. package/dist/types/Modal/InputEditModal/InputEditModal.d.ts +4 -1
  116. package/dist/types/Notification/GlobalNotification/GlobalNotification.d.ts +3 -3
  117. package/dist/types/Notification/InlineNotification/InlineNotification.d.ts +3 -3
  118. package/dist/types/Notification/ToastNotification/ToastNotification/ToastNotification.d.ts +5 -4
  119. package/dist/types/Notification/ToastNotification/context/ToastNotificationContext.d.ts +4 -3
  120. package/dist/types/Notification/ToastNotification/types.d.ts +3 -3
  121. package/dist/types/Notification/subcomponents/GenericNotification/GenericNotification.d.ts +24 -4
  122. package/dist/types/Notification/subcomponents/NotificationIcon/NotificationIcon.d.ts +11 -4
  123. package/dist/types/Notification/types.d.ts +2 -1
  124. package/dist/types/ProgressBar/ProgressBar.d.ts +25 -6
  125. package/dist/types/Tile/subcomponents/GenericTile/GenericTile.d.ts +10 -3
  126. package/dist/types/Well/Well.d.ts +6 -2
  127. package/dist/types/Well/types.d.ts +4 -0
  128. package/dist/types/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.d.ts +4 -4
  129. package/dist/types/__containers__/GuidanceBlock/v2/GuidanceBlock.d.ts +59 -0
  130. package/dist/types/__containers__/GuidanceBlock/v2/index.d.ts +1 -0
  131. package/dist/types/__containers__/v1.d.ts +1 -0
  132. package/dist/types/__containers__/v2.d.ts +1 -0
  133. package/dist/types/index.d.ts +1 -1
  134. package/package.json +17 -3
  135. package/src/BrandMoment/BrandMoment.module.scss +20 -9
  136. package/src/BrandMoment/BrandMoment.tsx +26 -3
  137. package/src/BrandMoment/_docs/BrandMoment.mdx +13 -13
  138. package/src/BrandMoment/_docs/BrandMoment.stickersheet.stories.tsx +102 -0
  139. package/src/BrandMoment/_docs/BrandMoment.stories.tsx +17 -99
  140. package/src/Card/Card.module.scss +56 -7
  141. package/src/Card/Card.tsx +35 -11
  142. package/src/Card/_docs/Card.mdx +6 -3
  143. package/src/Card/_docs/Card.stickersheet.stories.tsx +44 -39
  144. package/src/Card/_docs/Card.stories.tsx +23 -23
  145. package/src/EmptyState/EmptyState.module.scss +32 -14
  146. package/src/EmptyState/EmptyState.tsx +32 -18
  147. package/src/EmptyState/_docs/EmptyState.stickersheet.stories.tsx +69 -121
  148. package/src/EmptyState/_docs/EmptyState.stories.tsx +6 -8
  149. package/src/ErrorPage/ErrorPage.tsx +1 -1
  150. package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +100 -78
  151. package/src/Modal/ConfirmationModal/ConfirmationModal.spec.tsx +5 -5
  152. package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +41 -10
  153. package/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx +3 -3
  154. package/src/Modal/ConfirmationModal/_docs/ConfirmationModal.stories.tsx +11 -4
  155. package/src/Modal/ContextModal/_docs/ContextModal.stories.tsx +3 -1
  156. package/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.tsx +3 -0
  157. package/src/Modal/InputEditModal/InputEditModal.tsx +4 -1
  158. package/src/Modal/InputEditModal/_docs/InputEditModal.mdx +0 -13
  159. package/src/Modal/InputEditModal/_docs/InputEditModal.stories.tsx +9 -10
  160. package/src/Notification/GlobalNotification/GlobalNotification.tsx +9 -4
  161. package/src/Notification/GlobalNotification/_docs/GlobalNotification.stickersheet.stories.tsx +68 -58
  162. package/src/Notification/GlobalNotification/_docs/GlobalNotification.stories.tsx +10 -13
  163. package/src/Notification/InlineNotification/InlineNotification.tsx +9 -4
  164. package/src/Notification/InlineNotification/_docs/InlineNotification.stickersheet.stories.tsx +79 -44
  165. package/src/Notification/InlineNotification/_docs/InlineNotification.stories.tsx +17 -17
  166. package/src/Notification/ToastNotification/ToastNotification/ToastNotification.tsx +7 -5
  167. package/src/Notification/ToastNotification/ToastNotificationsList/subcomponents/ToastNotificationsMap/ToastNotificationsMap.tsx +1 -2
  168. package/src/Notification/ToastNotification/_docs/ToastNotification.stickersheet.stories.tsx +12 -7
  169. package/src/Notification/ToastNotification/_docs/ToastNotification.stories.tsx +6 -1
  170. package/src/Notification/ToastNotification/context/ToastNotificationContext.tsx +7 -3
  171. package/src/Notification/ToastNotification/types.ts +8 -3
  172. package/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss +42 -5
  173. package/src/Notification/subcomponents/GenericNotification/GenericNotification.tsx +40 -6
  174. package/src/Notification/subcomponents/GenericNotification/_mixins.scss +2 -1
  175. package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.tsx +31 -5
  176. package/src/Notification/types.ts +9 -2
  177. package/src/ProgressBar/ProgressBar.module.scss +37 -25
  178. package/src/ProgressBar/ProgressBar.tsx +30 -5
  179. package/src/ProgressBar/_docs/ProgressBar.mdx +2 -3
  180. package/src/ProgressBar/_docs/ProgressBar.stickersheet.stories.tsx +95 -51
  181. package/src/ProgressBar/_docs/ProgressBar.stories.tsx +56 -25
  182. package/src/Tile/InformationTile/_docs/InformationTile.mdx +3 -2
  183. package/src/Tile/InformationTile/_docs/InformationTile.stickersheet.stories.tsx +57 -19
  184. package/src/Tile/InformationTile/_docs/InformationTile.stories.tsx +19 -7
  185. package/src/Tile/MultiActionTile/_docs/MultiActionTile.mdx +3 -2
  186. package/src/Tile/MultiActionTile/_docs/MultiActionTile.stickersheet.stories.tsx +62 -24
  187. package/src/Tile/MultiActionTile/_docs/MultiActionTile.stories.tsx +19 -7
  188. package/src/Tile/subcomponents/GenericTile/GenericTile.module.scss +34 -22
  189. package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +17 -8
  190. package/src/Tile/subcomponents/GenericTile/_docs/GenericTile.stickersheet.stories.tsx +57 -19
  191. package/src/Well/Well.module.scss +70 -33
  192. package/src/Well/Well.tsx +9 -3
  193. package/src/Well/_docs/Well.mdx +9 -2
  194. package/src/Well/_docs/Well.stickersheet.stories.tsx +10 -1
  195. package/src/Well/_docs/Well.stories.tsx +54 -29
  196. package/src/Well/types.ts +15 -0
  197. package/src/__actions__/Button/v3/_docs/ApiSpecification.mdx +1 -1
  198. package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.module.scss +2 -2
  199. package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/_docs/GuidanceBlock.mdx +2 -2
  200. package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/_docs/GuidanceBlock.stickersheet.stories.tsx +1 -1
  201. package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/_docs/GuidanceBlock.stories.tsx +1 -1
  202. package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss +356 -0
  203. package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.spec.tsx +82 -0
  204. package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.tsx +262 -0
  205. package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.mdx +38 -0
  206. package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.stickersheet.stories.tsx +118 -0
  207. package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.stories.tsx +152 -0
  208. package/src/__containers__/GuidanceBlock/v2/index.ts +1 -0
  209. package/src/__containers__/v1.ts +1 -0
  210. package/src/__containers__/v2.ts +1 -0
  211. package/src/index.ts +2 -1
  212. package/v1/containers/package.json +5 -0
  213. package/v2/containers/package.json +5 -0
  214. package/dist/cjs/GuidanceBlock/GuidanceBlock.module.scss.cjs +0 -33
  215. package/dist/esm/GuidanceBlock/GuidanceBlock.module.scss.mjs +0 -31
  216. package/dist/types/Tile/subcomponents/GenericTile/types.d.ts +0 -2
  217. package/src/EmptyState/_docs/EmptyState.stories.module.scss +0 -15
  218. package/src/Notification/ToastNotification/ToastNotification/ToastNotification.spec.tsx +0 -33
  219. package/src/Tile/subcomponents/GenericTile/types.ts +0 -10
  220. /package/dist/types/{GuidanceBlock → __containers__/GuidanceBlock/v1}/index.d.ts +0 -0
  221. /package/dist/types/{GuidanceBlock → __containers__/GuidanceBlock/v1}/types.d.ts +0 -0
  222. /package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.spec.tsx +0 -0
  223. /package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.tsx +0 -0
  224. /package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/index.ts +0 -0
  225. /package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/types.ts +0 -0
@@ -16,12 +16,13 @@ const ProgressBar = /*#__PURE__*/function () {
16
16
  max = _a.max,
17
17
  isAnimating = _a.isAnimating,
18
18
  mood = _a.mood,
19
+ color = _a.color,
19
20
  subtext = _a.subtext,
20
21
  label = _a.label,
21
22
  classNameOverride = _a.classNameOverride,
22
23
  _b = _a.isReversed,
23
24
  isReversed = _b === void 0 ? false : _b,
24
- restProps = __rest(_a, ["value", "max", "isAnimating", "mood", "subtext", "label", "classNameOverride", "isReversed"]);
25
+ restProps = __rest(_a, ["value", "max", "isAnimating", "mood", "color", "subtext", "label", "classNameOverride", "isReversed"]);
25
26
  var percentage = calculatePercentage({
26
27
  value: value,
27
28
  max: max
@@ -38,7 +39,7 @@ const ProgressBar = /*#__PURE__*/function () {
38
39
  }), /*#__PURE__*/React.createElement("div", {
39
40
  className: styles.progressBackground
40
41
  }, /*#__PURE__*/React.createElement("div", {
41
- className: classnames(styles[mood], isAnimating && styles.isAnimating),
42
+ className: classnames(styles.progress, color ? styles[color] : styles[mood], isAnimating && styles.isAnimating),
42
43
  style: {
43
44
  transform: "translateX(-".concat(100 - percentage, "%")
44
45
  }
@@ -2,10 +2,14 @@ var styles = {
2
2
  "subtext": "ProgressBar-module_subtext__eizyu",
3
3
  "progressBackground": "ProgressBar-module_progressBackground__5qzp5",
4
4
  "progress": "ProgressBar-module_progress__X1IHw",
5
- "positive": "ProgressBar-module_positive__12oA1 ProgressBar-module_progress__X1IHw",
6
- "informative": "ProgressBar-module_informative__lrVDM ProgressBar-module_progress__X1IHw",
7
- "cautionary": "ProgressBar-module_cautionary__f56gH ProgressBar-module_progress__X1IHw",
8
- "negative": "ProgressBar-module_negative__EVWBt ProgressBar-module_progress__X1IHw",
5
+ "positive": "ProgressBar-module_positive__12oA1",
6
+ "informative": "ProgressBar-module_informative__lrVDM",
7
+ "cautionary": "ProgressBar-module_cautionary__f56gH",
8
+ "negative": "ProgressBar-module_negative__EVWBt",
9
+ "blue": "ProgressBar-module_blue__WEID8",
10
+ "green": "ProgressBar-module_green__J1T96",
11
+ "red": "ProgressBar-module_red__Ssd61",
12
+ "yellow": "ProgressBar-module_yellow__bcHWO",
9
13
  "isAnimating": "ProgressBar-module_isAnimating__F6AxQ",
10
14
  "pulse": "ProgressBar-module_pulse__RGaQm"
11
15
  };
@@ -18,12 +18,14 @@ const GenericTile = /*#__PURE__*/function () {
18
18
  metadata = _a.metadata,
19
19
  information = _a.information,
20
20
  mood = _a.mood,
21
+ _c = _a.variant,
22
+ variant = _c === void 0 ? "default" : _c,
21
23
  footer = _a.footer,
22
24
  classNameOverride = _a.classNameOverride,
23
- restProps = __rest(_a, ["children", "title", "titleTag", "metadata", "information", "mood", "footer", "classNameOverride"]);
24
- var _c = useState(false),
25
- isFlipped = _c[0],
26
- setIsFlipped = _c[1];
25
+ restProps = __rest(_a, ["children", "title", "titleTag", "metadata", "information", "mood", "variant", "footer", "classNameOverride"]);
26
+ var _d = useState(false),
27
+ isFlipped = _d[0],
28
+ setIsFlipped = _d[1];
27
29
  var renderTitle = function () {
28
30
  return /*#__PURE__*/React.createElement("div", {
29
31
  className: styles.title
@@ -51,7 +53,7 @@ const GenericTile = /*#__PURE__*/function () {
51
53
  };
52
54
  var renderFront = function () {
53
55
  return /*#__PURE__*/React.createElement("div", {
54
- className: classnames(styles.face, styles.faceFront, mood === "positive" && styles.faceMoodPositive, mood === "informative" && styles.faceMoodInformative, mood === "cautionary" && styles.faceMoodCautionary, mood === "assertive" && styles.faceMoodAssertive, mood === "negative" && styles.faceMoodNegative, mood === "prominent" && styles.faceMoodProminent)
56
+ className: classnames(styles.face, styles.faceFront, mood ? styles[mood] : styles[variant])
55
57
  }, information && ( /*#__PURE__*/React.createElement("div", {
56
58
  className: styles.informationBtn
57
59
  }, /*#__PURE__*/React.createElement(IconButton, {
@@ -5,12 +5,14 @@ var styles = {
5
5
  "face": "GenericTile-module_face__-KLVi",
6
6
  "faceFront": "GenericTile-module_faceFront__HywHi",
7
7
  "faceBack": "GenericTile-module_faceBack__NDCQ8",
8
- "faceMoodPositive": "GenericTile-module_faceMoodPositive__3MEBl",
9
- "faceMoodInformative": "GenericTile-module_faceMoodInformative__D0QsW",
10
- "faceMoodCautionary": "GenericTile-module_faceMoodCautionary__oUZXT",
11
- "faceMoodNegative": "GenericTile-module_faceMoodNegative__DmcZH",
12
- "faceMoodAssertive": "GenericTile-module_faceMoodAssertive__PaUZ-",
13
- "faceMoodProminent": "GenericTile-module_faceMoodProminent__VmMmv",
8
+ "positive": "GenericTile-module_positive__lnpvE",
9
+ "informative": "GenericTile-module_informative__7ox46",
10
+ "cautionary": "GenericTile-module_cautionary__MIucD",
11
+ "negative": "GenericTile-module_negative__2GyVY",
12
+ "assertive": "GenericTile-module_assertive__h7Z5M",
13
+ "prominent": "GenericTile-module_prominent__bfA9P",
14
+ "default": "GenericTile-module_default__z-CEg",
15
+ "expert-advice": "GenericTile-module_expert-advice__qSnxo",
14
16
  "isFlipped": "GenericTile-module_isFlipped__K18mo",
15
17
  "title": "GenericTile-module_title__zC6Qv",
16
18
  "actions": "GenericTile-module_actions__l8vXl",
@@ -10,16 +10,17 @@ import styles from './Well.module.scss.mjs';
10
10
  const Well = /*#__PURE__*/function () {
11
11
  const Well = function (_a) {
12
12
  var children = _a.children,
13
- _b = _a.variant,
14
- variant = _b === void 0 ? "default" : _b,
13
+ variant = _a.variant,
14
+ _b = _a.color,
15
+ color = _b === void 0 ? "white" : _b,
15
16
  _c = _a.borderStyle,
16
17
  borderStyle = _c === void 0 ? "solid" : _c,
17
18
  _d = _a.noMargin,
18
19
  noMargin = _d === void 0 ? false : _d,
19
20
  classNameOverride = _a.classNameOverride,
20
- restProps = __rest(_a, ["children", "variant", "borderStyle", "noMargin", "classNameOverride"]);
21
+ restProps = __rest(_a, ["children", "variant", "color", "borderStyle", "noMargin", "classNameOverride"]);
21
22
  return /*#__PURE__*/React.createElement("div", __assign({
22
- className: classnames(styles.container, styles[borderStyle], styles[variant], noMargin && styles.noMargin, classNameOverride)
23
+ className: classnames(styles.container, styles[borderStyle], styles[color], variant && styles[variant], noMargin && styles.noMargin, classNameOverride)
23
24
  }, restProps), children);
24
25
  };
25
26
  Well.displayName = "Well";
@@ -1,8 +1,16 @@
1
1
  var styles = {
2
2
  "container": "Well-module_container__pi8-W",
3
3
  "noMargin": "Well-module_noMargin__xBvM9",
4
- "default": "Well-module_default__tSiHp",
4
+ "white": "Well-module_white__HEVrB",
5
+ "gray": "Well-module_gray__ur3Fv",
6
+ "blue": "Well-module_blue__H8M0Q",
7
+ "yellow": "Well-module_yellow__DJAMr",
8
+ "orange": "Well-module_orange__F0FkU",
9
+ "red": "Well-module_red__40n5z",
10
+ "green": "Well-module_green__R-zR1",
11
+ "purple": "Well-module_purple__iXxT8",
5
12
  "positive": "Well-module_positive__6ldUu",
13
+ "default": "Well-module_default__tSiHp",
6
14
  "negative": "Well-module_negative__mVczy",
7
15
  "informative": "Well-module_informative__81djJ",
8
16
  "cautionary": "Well-module_cautionary__MSYHT",
@@ -2,13 +2,13 @@ import { __rest, __assign } from 'tslib';
2
2
  import React, { useState, useEffect } from 'react';
3
3
  import classnames from 'classnames';
4
4
  import Media from 'react-media';
5
- import { Heading } from '../Heading/Heading.mjs';
6
- import '../Icon/subcomponents/SVG/SVG.mjs';
7
- import { ArrowForwardIcon } from '../Icon/ArrowForwardIcon.mjs';
8
- import { Text } from '../Text/Text.mjs';
9
- import { Tooltip } from '../__overlays__/Tooltip/v1/index.mjs';
5
+ import { Heading } from '../../../Heading/Heading.mjs';
6
+ import '../../../Icon/subcomponents/SVG/SVG.mjs';
7
+ import { ArrowForwardIcon } from '../../../Icon/ArrowForwardIcon.mjs';
8
+ import { Text } from '../../../Text/Text.mjs';
9
+ import { Tooltip } from '../../../__overlays__/Tooltip/v1/index.mjs';
10
10
  import styles from './GuidanceBlock.module.scss.mjs';
11
- import { Button } from '../__actions__/Button/v1/Button/Button.mjs';
11
+ import { Button } from '../../../__actions__/Button/v1/Button/Button.mjs';
12
12
  var WithTooltip = function (_a) {
13
13
  var tooltipProps = _a.tooltipProps,
14
14
  children = _a.children;
@@ -0,0 +1,31 @@
1
+ var styles = {
2
+ "rightMargin": "GuidanceBlock-module_rightMargin__SbVUD",
3
+ "noRightMargin": "GuidanceBlock-module_noRightMargin__CbCz9",
4
+ "banner": "GuidanceBlock-module_banner__NyOs1",
5
+ "noMaxWidth": "GuidanceBlock-module_noMaxWidth__Rh070",
6
+ "illustrationWrapper": "GuidanceBlock-module_illustrationWrapper__lIGaj",
7
+ "illustration": "GuidanceBlock-module_illustration__W7PwM",
8
+ "hasSceneIllustration": "GuidanceBlock-module_hasSceneIllustration__CX8GF",
9
+ "descriptionContainer": "GuidanceBlock-module_descriptionContainer__JyNJp",
10
+ "descriptionAndActions": "GuidanceBlock-module_descriptionAndActions__2KGZQ",
11
+ "buttonContainer": "GuidanceBlock-module_buttonContainer__6-Ty-",
12
+ "hidden": "GuidanceBlock-module_hidden__a6zCg",
13
+ "headingWrapper": "GuidanceBlock-module_headingWrapper__3zGY2",
14
+ "cancel": "GuidanceBlock-module_cancel__G-4ci",
15
+ "icon": "GuidanceBlock-module_icon__W0pEX",
16
+ "disabled": "GuidanceBlock-module_disabled__GL1dK",
17
+ "hover": "GuidanceBlock-module_hover__5PdJM",
18
+ "active": "GuidanceBlock-module_active__3ifEz",
19
+ "default": "GuidanceBlock-module_default__9rhEq",
20
+ "positive": "GuidanceBlock-module_positive__m6n-N",
21
+ "negative": "GuidanceBlock-module_negative__Z8tj-",
22
+ "assertive": "GuidanceBlock-module_assertive__76y6Y",
23
+ "informative": "GuidanceBlock-module_informative__QBzhx",
24
+ "cautionary": "GuidanceBlock-module_cautionary__iwOA-",
25
+ "prominent": "GuidanceBlock-module_prominent__LWMSm",
26
+ "inline": "GuidanceBlock-module_inline__Dq-OU",
27
+ "stacked": "GuidanceBlock-module_stacked__h3bUz",
28
+ "centerContent": "GuidanceBlock-module_centerContent__Cyd34",
29
+ "smallScreenTextAlignment": "GuidanceBlock-module_smallScreenTextAlignment__VI-fw"
30
+ };
31
+ export { styles as default };
@@ -0,0 +1,153 @@
1
+ import { __rest, __assign } from 'tslib';
2
+ import React, { useState, useEffect } from 'react';
3
+ import classnames from 'classnames';
4
+ import Media from 'react-media';
5
+ import { Heading } from '../../../Heading/Heading.mjs';
6
+ import '../../../Icon/subcomponents/SVG/SVG.mjs';
7
+ import { ArrowForwardIcon } from '../../../Icon/ArrowForwardIcon.mjs';
8
+ import { Text } from '../../../Text/Text.mjs';
9
+ import { Tooltip } from '../../../__overlays__/Tooltip/v1/index.mjs';
10
+ import styles from './GuidanceBlock.module.scss.mjs';
11
+ import { Button } from '../../../__actions__/Button/v1/Button/Button.mjs';
12
+ var WithTooltip = function (_a) {
13
+ var tooltipProps = _a.tooltipProps,
14
+ children = _a.children;
15
+ return !!tooltipProps ? ( /*#__PURE__*/React.createElement(Tooltip, __assign({}, tooltipProps), children)) : ( /*#__PURE__*/React.createElement(React.Fragment, null, children));
16
+ };
17
+ /**
18
+ * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082093807/Guidance+Block Guidance} |
19
+ * {@link https://cultureamp.design/?path=/docs/components-guidanceblock--docs Storybook}
20
+ */
21
+ const GuidanceBlock = /*#__PURE__*/function () {
22
+ const GuidanceBlock = function (_a) {
23
+ var _b, _c, _d, _e;
24
+ var _f = _a.layout,
25
+ layout = _f === void 0 ? "default" : _f,
26
+ _g = _a.variant,
27
+ variant = _g === void 0 ? "default" : _g,
28
+ _h = _a.withActionButtonArrow,
29
+ withActionButtonArrow = _h === void 0 ? true : _h,
30
+ _j = _a.noMaxWidth,
31
+ noMaxWidth = _j === void 0 ? false : _j,
32
+ _k = _a.illustrationType,
33
+ illustrationType = _k === void 0 ? "spot" : _k,
34
+ _l = _a.smallScreenTextAlignment,
35
+ smallScreenTextAlignment = _l === void 0 ? "center" : _l,
36
+ actions = _a.actions,
37
+ illustration = _a.illustration,
38
+ secondaryDismiss = _a.secondaryDismiss,
39
+ restProps = __rest(_a, ["layout", "variant", "withActionButtonArrow", "noMaxWidth", "illustrationType", "smallScreenTextAlignment", "actions", "illustration", "secondaryDismiss"]);
40
+ var _m = useState(false),
41
+ hidden = _m[0],
42
+ setHidden = _m[1];
43
+ var _o = useState(false),
44
+ removed = _o[0],
45
+ setRemoved = _o[1];
46
+ var _p = useState(""),
47
+ mediaQueryLayout = _p[0],
48
+ setMediaQueryLayout = _p[1];
49
+ var containerRef = /*#__PURE__*/React.createRef();
50
+ useEffect(function () {
51
+ if (layout === "inline" || layout === "stacked") {
52
+ containerQuery();
53
+ }
54
+ }, []);
55
+ var handleDismissBanner = function () {
56
+ var _a;
57
+ setHidden(true);
58
+ (_a = actions === null || actions === void 0 ? void 0 : actions.dismiss) === null || _a === void 0 ? void 0 : _a.onClick();
59
+ };
60
+ var onTransitionEnd = function (e) {
61
+ // Be careful: this assumes the final CSS property to be animated is "margin-top".
62
+ if (hidden && e.propertyName === "margin-top") {
63
+ setRemoved(true);
64
+ }
65
+ };
66
+ var containerQuery = function () {
67
+ var resizeObserver = new ResizeObserver(function (entries) {
68
+ if (entries.length === 1) {
69
+ handleMediaQueryLayout(entries[0].contentRect.width);
70
+ }
71
+ });
72
+ resizeObserver.observe(containerRef.current);
73
+ };
74
+ var handleMediaQueryLayout = function (width) {
75
+ if (width <= 320) {
76
+ setMediaQueryLayout("centerContent");
77
+ } else {
78
+ setMediaQueryLayout("");
79
+ }
80
+ };
81
+ var marginTop = function () {
82
+ if (hidden && containerRef.current) {
83
+ return -containerRef.current.clientHeight + "px";
84
+ }
85
+ return "0";
86
+ };
87
+ if (removed) {
88
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
89
+ }
90
+ var componentIsMobile = mediaQueryLayout.includes("centerContent");
91
+ return /*#__PURE__*/React.createElement("div", {
92
+ className: classnames(styles.banner, variant && styles[variant], layout && styles[layout], hidden && styles.hidden, mediaQueryLayout === "centerContent" && styles.centerContent, noMaxWidth && styles.noMaxWidth, illustrationType === "scene" && styles.hasSceneIllustration, smallScreenTextAlignment === "left" && styles.smallScreenTextAlignment),
93
+ style: {
94
+ marginTop: marginTop()
95
+ },
96
+ ref: containerRef,
97
+ onTransitionEnd: onTransitionEnd
98
+ }, /*#__PURE__*/React.createElement("div", {
99
+ className: styles.illustrationWrapper
100
+ }, /*#__PURE__*/React.createElement("div", {
101
+ className: styles.illustration
102
+ }, illustrationType === "scene" ? /*#__PURE__*/React.cloneElement(illustration, {
103
+ enableAspectRatio: true
104
+ }) : illustration)), /*#__PURE__*/React.createElement("div", {
105
+ className: styles.descriptionAndActions
106
+ }, /*#__PURE__*/React.createElement("div", {
107
+ className: styles.descriptionContainer
108
+ }, "content" in restProps && restProps.content, "text" in restProps && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
109
+ className: styles.headingWrapper
110
+ }, /*#__PURE__*/React.createElement(Heading, {
111
+ tag: (_c = (_b = restProps === null || restProps === void 0 ? void 0 : restProps.text) === null || _b === void 0 ? void 0 : _b.titleTag) !== null && _c !== void 0 ? _c : "h3",
112
+ variant: "heading-3"
113
+ }, (_d = restProps === null || restProps === void 0 ? void 0 : restProps.text) === null || _d === void 0 ? void 0 : _d.title)), /*#__PURE__*/React.createElement(Text, {
114
+ tag: "p",
115
+ variant: "body"
116
+ }, (_e = restProps === null || restProps === void 0 ? void 0 : restProps.text) === null || _e === void 0 ? void 0 : _e.description)))), (actions === null || actions === void 0 ? void 0 : actions.primary) && ( /*#__PURE__*/React.createElement(Media, {
117
+ query: "(max-width: 767px)"
118
+ }, function (isMobile) {
119
+ var _a;
120
+ return /*#__PURE__*/React.createElement("div", {
121
+ className: classnames({
122
+ noRightMargin: isMobile || componentIsMobile,
123
+ rightMargin: !(isMobile || componentIsMobile) && layout === "default"
124
+ })
125
+ }, /*#__PURE__*/React.createElement("div", {
126
+ className: classnames(styles.buttonContainer, (actions === null || actions === void 0 ? void 0 : actions.secondary) && styles.secondaryAction)
127
+ }, /*#__PURE__*/React.createElement(WithTooltip, {
128
+ tooltipProps: actions.primary.tooltip
129
+ }, /*#__PURE__*/React.createElement(Button, __assign({
130
+ icon: withActionButtonArrow ? ( /*#__PURE__*/React.createElement(ArrowForwardIcon, {
131
+ role: "presentation"
132
+ })) : undefined,
133
+ iconPosition: "end"
134
+ }, actions.primary, {
135
+ fullWidth: isMobile || componentIsMobile
136
+ }))), (actions === null || actions === void 0 ? void 0 : actions.secondary) && ( /*#__PURE__*/React.createElement(WithTooltip, {
137
+ tooltipProps: actions.secondary.tooltip
138
+ }, /*#__PURE__*/React.createElement("div", {
139
+ className: styles.secondaryAction
140
+ }, /*#__PURE__*/React.createElement(Button, __assign({
141
+ secondary: true
142
+ }, actions.secondary, {
143
+ onClick: secondaryDismiss ? function () {
144
+ return handleDismissBanner();
145
+ } : (_a = actions === null || actions === void 0 ? void 0 : actions.secondary) === null || _a === void 0 ? void 0 : _a.onClick,
146
+ fullWidth: isMobile || componentIsMobile
147
+ })))))));
148
+ }))));
149
+ };
150
+ GuidanceBlock.displayName = "GuidanceBlock";
151
+ return GuidanceBlock;
152
+ }();
153
+ export { GuidanceBlock };
@@ -0,0 +1,26 @@
1
+ var styles = {
2
+ "rightMargin": "GuidanceBlock-module_rightMargin__gIzig",
3
+ "noRightMargin": "GuidanceBlock-module_noRightMargin__xtPiX",
4
+ "banner": "GuidanceBlock-module_banner__ng6kh",
5
+ "noMaxWidth": "GuidanceBlock-module_noMaxWidth__V-DbD",
6
+ "illustrationWrapper": "GuidanceBlock-module_illustrationWrapper__-rRYc",
7
+ "illustration": "GuidanceBlock-module_illustration__LpEwu",
8
+ "hasSceneIllustration": "GuidanceBlock-module_hasSceneIllustration__HxwOA",
9
+ "descriptionContainer": "GuidanceBlock-module_descriptionContainer__N1EEi",
10
+ "descriptionAndActions": "GuidanceBlock-module_descriptionAndActions__D206m",
11
+ "buttonContainer": "GuidanceBlock-module_buttonContainer__w3vEh",
12
+ "hidden": "GuidanceBlock-module_hidden__hgakl",
13
+ "headingWrapper": "GuidanceBlock-module_headingWrapper__xqjf-",
14
+ "cancel": "GuidanceBlock-module_cancel__0lcBe",
15
+ "icon": "GuidanceBlock-module_icon__XVKkH",
16
+ "disabled": "GuidanceBlock-module_disabled__tbZPh",
17
+ "hover": "GuidanceBlock-module_hover__vs7Wu",
18
+ "active": "GuidanceBlock-module_active__eJu5N",
19
+ "default": "GuidanceBlock-module_default__W7fnR",
20
+ "expert-advice": "GuidanceBlock-module_expert-advice__uGg7D",
21
+ "inline": "GuidanceBlock-module_inline__DC0LQ",
22
+ "stacked": "GuidanceBlock-module_stacked__2SSuH",
23
+ "centerContent": "GuidanceBlock-module_centerContent__pS9uQ",
24
+ "smallScreenTextAlignment": "GuidanceBlock-module_smallScreenTextAlignment__iaw5d"
25
+ };
26
+ export { styles as default };
@@ -0,0 +1 @@
1
+ export { GuidanceBlock } from './__containers__/GuidanceBlock/v1/GuidanceBlock.mjs';
@@ -0,0 +1 @@
1
+ export { GuidanceBlock } from './__containers__/GuidanceBlock/v2/GuidanceBlock.mjs';
@@ -58,7 +58,6 @@ export { getTruncatedLabels } from './Filter/FilterMultiSelect/utils/getTruncate
58
58
  export { getSelectedOptionLabels } from './Filter/FilterMultiSelect/utils/getSelectedOptionLabels.mjs';
59
59
  export { getSelectedOptionKeys } from './Filter/FilterMultiSelect/utils/getSelectedOptionKeys.mjs';
60
60
  export { FilterSelect } from './Filter/FilterSelect/FilterSelect.mjs';
61
- export { GuidanceBlock } from './GuidanceBlock/GuidanceBlock.mjs';
62
61
  export { Heading } from './Heading/Heading.mjs';
63
62
  export { AcademyIcon } from './Icon/AcademyIcon.mjs';
64
63
  export { ActionOffIcon } from './Icon/ActionOffIcon.mjs';
@@ -415,3 +414,4 @@ export { Tooltip } from './__overlays__/Tooltip/v1/index.mjs';
415
414
  export { Menu, MenuHeading, MenuItem, MenuList, StatelessMenu } from './__actions__/Menu/v1/index.mjs';
416
415
  export { Button } from './__actions__/Button/v1/Button/Button.mjs';
417
416
  export { IconButton } from './__actions__/Button/v1/IconButton/IconButton.mjs';
417
+ export { GuidanceBlock } from './__containers__/GuidanceBlock/v1/GuidanceBlock.mjs';