@kaizen/components 1.55.2 → 1.56.1

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 (299) hide show
  1. package/dist/cjs/BrandMoment/BrandMoment.cjs +1 -2
  2. package/dist/cjs/Collapsible/Collapsible/Collapsible.cjs +1 -2
  3. package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +4 -7
  4. package/dist/cjs/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.cjs +1 -2
  5. package/dist/cjs/Filter/FilterMultiSelect/subcomponents/ListBoxSection/ListBoxSection.cjs +1 -1
  6. package/dist/cjs/Filter/FilterMultiSelect/subcomponents/LoadMoreButton/LoadMoreButton.cjs +1 -2
  7. package/dist/cjs/GuidanceBlock/GuidanceBlock.cjs +1 -2
  8. package/dist/cjs/Icon/subcomponents/SVG/SVG.cjs +3 -2
  9. package/dist/cjs/Illustration/subcomponents/VideoPlayer/VideoPlayer.cjs +1 -2
  10. package/dist/cjs/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.cjs +1 -2
  11. package/dist/cjs/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.cjs +1 -2
  12. package/dist/cjs/Pagination/subcomponents/DirectionalLink/DirectionalLink.cjs +1 -1
  13. package/dist/cjs/Pagination/subcomponents/PaginationLink/PaginationLink.cjs +1 -1
  14. package/dist/cjs/RichTextEditor/utils/core/createRichTextEditor.cjs +2 -1
  15. package/dist/cjs/SplitButton/SplitButton.cjs +1 -5
  16. package/dist/cjs/Tile/subcomponents/GenericTile/Action.cjs +1 -2
  17. package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.cjs +1 -2
  18. package/dist/cjs/TitleBlockZen/TitleBlockZen.cjs +1 -2
  19. package/dist/cjs/TitleBlockZen/subcomponents/MainActions.cjs +4 -7
  20. package/dist/cjs/TitleBlockZen/subcomponents/MobileActions.cjs +3 -5
  21. package/dist/cjs/TitleBlockZen/subcomponents/SecondaryActions.cjs +4 -7
  22. package/dist/cjs/TitleBlockZen/subcomponents/TitleBlockMenuItem.cjs +1 -5
  23. package/dist/cjs/{Button → __actions__/Button/v1}/GenericButton/GenericButton.cjs +6 -6
  24. package/dist/cjs/__actions__/Button/v1/GenericButton/GenericButton.module.scss.cjs +28 -0
  25. package/dist/cjs/__actions__/Button/v3/Button.cjs +28 -0
  26. package/dist/cjs/__actions__/Button/v3/Button.module.scss.cjs +9 -0
  27. package/dist/cjs/__actions__/Menu/v1/index.cjs +20 -0
  28. package/dist/cjs/__actions__/Menu/v1/subcomponents/MenuDropdown/MenuDropdown.module.scss.cjs +7 -0
  29. package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.cjs +1 -1
  30. package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.module.scss.cjs +1 -1
  31. package/dist/cjs/__actions__/Menu/v1/subcomponents/MenuItem/MenuItem.module.scss.cjs +12 -0
  32. package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.module.scss.cjs +1 -1
  33. package/dist/cjs/__actions__/Menu/v1/subcomponents/StatelessMenu/StatelessMenu.module.scss.cjs +6 -0
  34. package/dist/cjs/__actions__/Menu/v3/Menu.cjs +26 -0
  35. package/dist/cjs/__actions__/Menu/v3/Menu.module.scss.cjs +6 -0
  36. package/dist/cjs/__actions__/Menu/v3/MenuItem.cjs +30 -0
  37. package/dist/cjs/__actions__/Menu/v3/MenuItem.module.scss.cjs +7 -0
  38. package/dist/cjs/__actions__/Menu/v3/MenuTrigger.cjs +19 -0
  39. package/dist/cjs/actionsV1.cjs +12 -0
  40. package/dist/cjs/actionsV2.cjs +18 -0
  41. package/dist/cjs/actionsV3.cjs +10 -0
  42. package/dist/cjs/index.cjs +10 -14
  43. package/dist/esm/BrandMoment/BrandMoment.mjs +1 -2
  44. package/dist/esm/Collapsible/Collapsible/Collapsible.mjs +1 -2
  45. package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +4 -7
  46. package/dist/esm/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.mjs +1 -2
  47. package/dist/esm/Filter/FilterMultiSelect/subcomponents/ListBoxSection/ListBoxSection.mjs +1 -1
  48. package/dist/esm/Filter/FilterMultiSelect/subcomponents/LoadMoreButton/LoadMoreButton.mjs +1 -2
  49. package/dist/esm/GuidanceBlock/GuidanceBlock.mjs +1 -2
  50. package/dist/esm/Icon/subcomponents/SVG/SVG.mjs +3 -2
  51. package/dist/esm/Illustration/subcomponents/VideoPlayer/VideoPlayer.mjs +1 -2
  52. package/dist/esm/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.mjs +1 -2
  53. package/dist/esm/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.mjs +1 -2
  54. package/dist/esm/Pagination/subcomponents/DirectionalLink/DirectionalLink.mjs +1 -1
  55. package/dist/esm/Pagination/subcomponents/PaginationLink/PaginationLink.mjs +1 -1
  56. package/dist/esm/RichTextEditor/utils/core/createRichTextEditor.mjs +2 -1
  57. package/dist/esm/SplitButton/SplitButton.mjs +1 -5
  58. package/dist/esm/Tile/subcomponents/GenericTile/Action.mjs +1 -2
  59. package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.mjs +1 -2
  60. package/dist/esm/TitleBlockZen/TitleBlockZen.mjs +1 -2
  61. package/dist/esm/TitleBlockZen/subcomponents/MainActions.mjs +4 -7
  62. package/dist/esm/TitleBlockZen/subcomponents/MobileActions.mjs +3 -5
  63. package/dist/esm/TitleBlockZen/subcomponents/SecondaryActions.mjs +4 -7
  64. package/dist/esm/TitleBlockZen/subcomponents/TitleBlockMenuItem.mjs +1 -5
  65. package/dist/esm/{Button → __actions__/Button/v1}/GenericButton/GenericButton.mjs +6 -6
  66. package/dist/esm/__actions__/Button/v1/GenericButton/GenericButton.module.scss.mjs +26 -0
  67. package/dist/esm/__actions__/Button/v3/Button.mjs +20 -0
  68. package/dist/esm/__actions__/Button/v3/Button.module.scss.mjs +7 -0
  69. package/dist/esm/__actions__/Menu/v1/index.mjs +14 -0
  70. package/dist/esm/__actions__/Menu/v1/subcomponents/MenuDropdown/MenuDropdown.module.scss.mjs +5 -0
  71. package/dist/esm/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.mjs +1 -1
  72. package/dist/esm/__actions__/Menu/v1/subcomponents/MenuHeading/MenuHeading.module.scss.mjs +4 -0
  73. package/dist/esm/__actions__/Menu/v1/subcomponents/MenuItem/MenuItem.module.scss.mjs +10 -0
  74. package/dist/esm/__actions__/Menu/v1/subcomponents/MenuList/MenuList.module.scss.mjs +4 -0
  75. package/dist/esm/__actions__/Menu/v1/subcomponents/StatelessMenu/StatelessMenu.module.scss.mjs +4 -0
  76. package/dist/esm/__actions__/Menu/v3/Menu.mjs +18 -0
  77. package/dist/esm/__actions__/Menu/v3/Menu.module.scss.mjs +4 -0
  78. package/dist/esm/__actions__/Menu/v3/MenuItem.mjs +22 -0
  79. package/dist/esm/__actions__/Menu/v3/MenuItem.module.scss.mjs +5 -0
  80. package/dist/esm/__actions__/Menu/v3/MenuTrigger.mjs +11 -0
  81. package/dist/esm/actionsV1.mjs +3 -0
  82. package/dist/esm/actionsV2.mjs +8 -0
  83. package/dist/esm/actionsV3.mjs +4 -0
  84. package/dist/esm/index.mjs +3 -7
  85. package/dist/styles.css +12 -9
  86. package/dist/types/BrandMoment/BrandMoment.d.ts +1 -1
  87. package/dist/types/Filter/FilterMultiSelect/subcomponents/LoadMoreButton/LoadMoreButton.d.ts +1 -1
  88. package/dist/types/GuidanceBlock/GuidanceBlock.d.ts +1 -1
  89. package/dist/types/Icon/subcomponents/SVG/SVG.d.ts +2 -1
  90. package/dist/types/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.d.ts +1 -1
  91. package/dist/types/Pagination/subcomponents/DirectionalLink/DirectionalLink.d.ts +1 -1
  92. package/dist/types/Pagination/subcomponents/PaginationLink/PaginationLink.d.ts +1 -1
  93. package/dist/types/Tile/subcomponents/GenericTile/GenericTile.d.ts +1 -1
  94. package/dist/types/TitleBlockZen/subcomponents/MobileActions.d.ts +1 -1
  95. package/dist/types/TitleBlockZen/subcomponents/Toolbar.d.ts +1 -2
  96. package/dist/types/TitleBlockZen/types.d.ts +1 -2
  97. package/dist/types/__actions__/Button/v2/Button/index.d.ts +1 -0
  98. package/dist/types/__actions__/Button/v2/GenericButton/index.d.ts +1 -0
  99. package/dist/types/__actions__/Button/v2/IconButton/index.d.ts +1 -0
  100. package/dist/types/__actions__/Button/v2/index.d.ts +3 -0
  101. package/dist/types/__actions__/Button/v3/Button.d.ts +11 -0
  102. package/dist/types/__actions__/Button/v3/index.d.ts +1 -0
  103. package/dist/types/{Menu → __actions__/Menu/v1}/Menu.d.ts +1 -1
  104. package/dist/types/__actions__/Menu/v1/index.d.ts +30 -0
  105. package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.d.ts +1 -1
  106. package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.d.ts +1 -1
  107. package/dist/types/__actions__/Menu/v2/index.d.ts +6 -0
  108. package/dist/types/__actions__/Menu/v3/Menu.d.ts +7 -0
  109. package/dist/types/__actions__/Menu/v3/MenuItem.d.ts +17 -0
  110. package/dist/types/__actions__/Menu/v3/MenuTrigger.d.ts +6 -0
  111. package/dist/types/__actions__/Menu/v3/SubmenuTrigger.d.ts +8 -0
  112. package/dist/types/__actions__/Menu/v3/index.d.ts +3 -0
  113. package/dist/types/__actions__/v1.d.ts +2 -0
  114. package/dist/types/__actions__/v2.d.ts +2 -0
  115. package/dist/types/__actions__/v3.d.ts +2 -0
  116. package/dist/types/index.d.ts +2 -2
  117. package/package.json +29 -29
  118. package/src/BrandMoment/BrandMoment.tsx +1 -1
  119. package/src/BrandMoment/_docs/ExampleHeaders.tsx +1 -1
  120. package/src/Collapsible/Collapsible/Collapsible.tsx +1 -1
  121. package/src/DatePicker/_docs/DatePicker.stories.tsx +1 -1
  122. package/src/EmptyState/_docs/EmptyState.stickersheet.stories.tsx +1 -1
  123. package/src/EmptyState/_docs/EmptyState.stories.tsx +1 -1
  124. package/src/ErrorPage/ErrorPage.spec.tsx +142 -0
  125. package/src/ErrorPage/_docs/ErrorPage.stickersheet.stories.tsx +8 -26
  126. package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +1 -2
  127. package/src/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.tsx +1 -1
  128. package/src/Filter/FilterMultiSelect/subcomponents/LoadMoreButton/LoadMoreButton.tsx +1 -1
  129. package/src/GuidanceBlock/GuidanceBlock.tsx +1 -1
  130. package/src/Icon/subcomponents/SVG/SVG.tsx +4 -1
  131. package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.tsx +1 -1
  132. package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +1 -1
  133. package/src/Modal/ContextModal/ContextModal.tsx +1 -1
  134. package/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.tsx +1 -1
  135. package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.tsx +1 -1
  136. package/src/Modal/InputEditModal/InputEditModal.tsx +1 -1
  137. package/src/Notification/ToastNotification/_docs/ToastNotification.stories.tsx +1 -1
  138. package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.module.scss +2 -2
  139. package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.tsx +4 -1
  140. package/src/Pagination/subcomponents/PaginationLink/PaginationLink.module.scss +2 -2
  141. package/src/Pagination/subcomponents/PaginationLink/PaginationLink.tsx +4 -1
  142. package/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.stories.tsx +1 -1
  143. package/src/RichTextEditor/utils/core/createRichTextEditor.ts +3 -1
  144. package/src/SplitButton/SplitButton.spec.tsx +1 -1
  145. package/src/SplitButton/SplitButton.tsx +1 -1
  146. package/src/SplitButton/_docs/SplitButton.stickersheet.stories.tsx +1 -1
  147. package/src/SplitButton/_docs/SplitButton.stories.tsx +1 -1
  148. package/src/Tabs/_docs/Tabs.stories.tsx +1 -1
  149. package/src/Tile/subcomponents/GenericTile/Action.tsx +1 -1
  150. package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +2 -2
  151. package/src/TitleBlockZen/TitleBlockZen.tsx +1 -1
  152. package/src/TitleBlockZen/subcomponents/MainActions.tsx +1 -2
  153. package/src/TitleBlockZen/subcomponents/MobileActions.tsx +6 -2
  154. package/src/TitleBlockZen/subcomponents/SecondaryActions.tsx +1 -2
  155. package/src/TitleBlockZen/subcomponents/TitleBlockMenuItem.tsx +1 -1
  156. package/src/TitleBlockZen/subcomponents/Toolbar.tsx +1 -2
  157. package/src/TitleBlockZen/types.ts +5 -2
  158. package/src/Workflow/_docs/Workflow.stories.tsx +1 -1
  159. package/src/Workflow/_docs/WorkflowFooter.stories.tsx +1 -1
  160. package/src/Workflow/_docs/WorkflowHeader.stories.tsx +1 -1
  161. package/src/Workflow/_docs/controls/controls.tsx +1 -1
  162. package/src/{Button → __actions__/Button/v1}/Button/Button.module.scss +1 -1
  163. package/src/{Button → __actions__/Button/v1}/Button/_docs/Button.mdx +2 -2
  164. package/src/{Button → __actions__/Button/v1}/Button/_docs/Button.stickersheet.stories.tsx +1 -1
  165. package/src/{Button → __actions__/Button/v1}/Button/_docs/Button.stories.tsx +1 -1
  166. package/src/{Button → __actions__/Button/v1}/GenericButton/GenericButton.module.scss +2 -2
  167. package/src/{Button → __actions__/Button/v1}/IconButton/_docs/IconButton.mdx +2 -2
  168. package/src/{Button → __actions__/Button/v1}/IconButton/_docs/IconButton.stickersheet.stories.tsx +2 -2
  169. package/src/{Button → __actions__/Button/v1}/IconButton/_docs/IconButton.stories.tsx +1 -1
  170. package/src/{Button → __actions__/Button/v1}/utils/_variables.scss +2 -2
  171. package/src/__actions__/Button/v2/Button/_docs/Button.mdx +98 -0
  172. package/src/__actions__/Button/v2/Button/_docs/Button.stories.tsx +170 -0
  173. package/src/__actions__/Button/v2/Button/index.ts +1 -0
  174. package/src/__actions__/Button/v2/GenericButton/index.ts +1 -0
  175. package/src/__actions__/Button/v2/IconButton/_docs/IconButton.mdx +24 -0
  176. package/src/__actions__/Button/v2/IconButton/_docs/IconButton.stories.tsx +37 -0
  177. package/src/__actions__/Button/v2/IconButton/index.ts +1 -0
  178. package/src/__actions__/Button/v2/index.ts +3 -0
  179. package/src/__actions__/Button/v3/Button.module.scss +104 -0
  180. package/src/__actions__/Button/v3/Button.tsx +44 -0
  181. package/src/__actions__/Button/v3/_docs/ApiSpecification.mdx +173 -0
  182. package/src/__actions__/Button/v3/_docs/Button.docs.stories.tsx +76 -0
  183. package/src/__actions__/Button/v3/_docs/Button.mdx +41 -0
  184. package/src/__actions__/Button/v3/_docs/Button.spec.stories.tsx +193 -0
  185. package/src/__actions__/Button/v3/_docs/Button.stickersheet.stories.tsx +135 -0
  186. package/src/__actions__/Button/v3/_docs/Button.stories.tsx +98 -0
  187. package/src/__actions__/Button/v3/index.ts +1 -0
  188. package/src/{Menu → __actions__/Menu/v1}/Menu.spec.tsx +1 -1
  189. package/src/{Menu → __actions__/Menu/v1}/Menu.tsx +1 -1
  190. package/src/__actions__/Menu/v1/_docs/Menu.mdx +29 -0
  191. package/src/{Menu → __actions__/Menu/v1}/_docs/Menu.stickersheet.stories.tsx +2 -2
  192. package/src/{Menu → __actions__/Menu/v1}/_docs/Menu.stories.tsx +2 -2
  193. package/src/{Menu → __actions__/Menu/v1}/_docs/examples.tsx +1 -1
  194. package/src/__actions__/Menu/v1/index.ts +35 -0
  195. package/src/{Menu → __actions__/Menu/v2}/_docs/Menu.mdx +2 -2
  196. package/src/__actions__/Menu/v2/_docs/Menu.stories.tsx +54 -0
  197. package/src/__actions__/Menu/v2/index.ts +6 -0
  198. package/src/__actions__/Menu/v3/Menu.module.scss +32 -0
  199. package/src/__actions__/Menu/v3/Menu.tsx +28 -0
  200. package/src/__actions__/Menu/v3/MenuItem.module.scss +34 -0
  201. package/src/__actions__/Menu/v3/MenuItem.tsx +32 -0
  202. package/src/__actions__/Menu/v3/MenuTrigger.tsx +14 -0
  203. package/src/__actions__/Menu/v3/SubmenuTrigger.tsx +18 -0
  204. package/src/__actions__/Menu/v3/_docs/ApiSpecification.mdx +98 -0
  205. package/src/__actions__/Menu/v3/_docs/Menu.docs.stories.tsx +280 -0
  206. package/src/__actions__/Menu/v3/_docs/Menu.mdx +202 -0
  207. package/src/__actions__/Menu/v3/_docs/Menu.spec.stories.tsx +269 -0
  208. package/src/__actions__/Menu/v3/_docs/Menu.stories.tsx +69 -0
  209. package/src/__actions__/Menu/v3/index.ts +3 -0
  210. package/src/__actions__/v1.ts +2 -0
  211. package/src/__actions__/v2.ts +2 -0
  212. package/src/__actions__/v3.ts +2 -0
  213. package/src/__future__/Workflow/_docs/Workflow.stories.tsx +1 -1
  214. package/src/__future__/Workflow/_docs/WorkflowFooter.stories.tsx +1 -1
  215. package/src/__future__/Workflow/_docs/WorkflowHeader.stories.tsx +1 -1
  216. package/src/__future__/Workflow/_docs/controls/controls.tsx +1 -1
  217. package/src/__overlays__/Tooltip/v1/Tooltip.spec.tsx +1 -1
  218. package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stickersheet.stories.tsx +1 -1
  219. package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stories.tsx +1 -1
  220. package/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx +1 -1
  221. package/src/__overlays__/Tooltip/v3/_docs/Tooltip.docs.stories.tsx +1 -1
  222. package/src/__overlays__/Tooltip/v3/_docs/Tooltip.spec.stories.tsx +1 -1
  223. package/src/__overlays__/Tooltip/v3/_docs/Tooltip.stories.tsx +1 -1
  224. package/src/index.ts +2 -2
  225. package/v1/actions/package.json +5 -0
  226. package/v2/actions/package.json +5 -0
  227. package/v3/actions/package.json +5 -0
  228. package/v3/utilities/package.json +5 -0
  229. package/dist/cjs/Button/GenericButton/GenericButton.module.scss.cjs +0 -28
  230. package/dist/cjs/Menu/subcomponents/MenuDropdown/MenuDropdown.module.scss.cjs +0 -7
  231. package/dist/cjs/Menu/subcomponents/MenuItem/MenuItem.module.scss.cjs +0 -12
  232. package/dist/cjs/Menu/subcomponents/StatelessMenu/StatelessMenu.module.scss.cjs +0 -6
  233. package/dist/esm/Button/GenericButton/GenericButton.module.scss.mjs +0 -26
  234. package/dist/esm/Menu/subcomponents/MenuDropdown/MenuDropdown.module.scss.mjs +0 -5
  235. package/dist/esm/Menu/subcomponents/MenuHeading/MenuHeading.module.scss.mjs +0 -4
  236. package/dist/esm/Menu/subcomponents/MenuItem/MenuItem.module.scss.mjs +0 -10
  237. package/dist/esm/Menu/subcomponents/MenuList/MenuList.module.scss.mjs +0 -4
  238. package/dist/esm/Menu/subcomponents/StatelessMenu/StatelessMenu.module.scss.mjs +0 -4
  239. package/dist/types/Menu/index.d.ts +0 -5
  240. package/src/Menu/index.ts +0 -5
  241. /package/dist/cjs/{Button → __actions__/Button/v1}/Button/Button.cjs +0 -0
  242. /package/dist/cjs/{Button → __actions__/Button/v1}/IconButton/IconButton.cjs +0 -0
  243. /package/dist/cjs/{Menu → __actions__/Menu/v1}/Menu.cjs +0 -0
  244. /package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/MenuDropdown.cjs +0 -0
  245. /package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/MenuItem.cjs +0 -0
  246. /package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.cjs +0 -0
  247. /package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/StatelessMenu.cjs +0 -0
  248. /package/dist/esm/{Button → __actions__/Button/v1}/Button/Button.mjs +0 -0
  249. /package/dist/esm/{Button → __actions__/Button/v1}/IconButton/IconButton.mjs +0 -0
  250. /package/dist/esm/{Menu → __actions__/Menu/v1}/Menu.mjs +0 -0
  251. /package/dist/esm/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/MenuDropdown.mjs +0 -0
  252. /package/dist/esm/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/MenuItem.mjs +0 -0
  253. /package/dist/esm/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.mjs +0 -0
  254. /package/dist/esm/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/StatelessMenu.mjs +0 -0
  255. /package/dist/types/{Button → __actions__/Button/v1}/Button/Button.d.ts +0 -0
  256. /package/dist/types/{Button → __actions__/Button/v1}/Button/index.d.ts +0 -0
  257. /package/dist/types/{Button → __actions__/Button/v1}/GenericButton/GenericButton.d.ts +0 -0
  258. /package/dist/types/{Button → __actions__/Button/v1}/GenericButton/index.d.ts +0 -0
  259. /package/dist/types/{Button → __actions__/Button/v1}/IconButton/IconButton.d.ts +0 -0
  260. /package/dist/types/{Button → __actions__/Button/v1}/IconButton/index.d.ts +0 -0
  261. /package/dist/types/{Button → __actions__/Button/v1}/index.d.ts +0 -0
  262. /package/dist/types/{Menu → __actions__/Menu/v1}/_docs/MenuContentExample.d.ts +0 -0
  263. /package/dist/types/{Menu → __actions__/Menu/v1}/_docs/examples.d.ts +0 -0
  264. /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/MenuDropdown.d.ts +0 -0
  265. /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/index.d.ts +0 -0
  266. /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/index.d.ts +0 -0
  267. /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/MenuItem.d.ts +0 -0
  268. /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/index.d.ts +0 -0
  269. /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/index.d.ts +0 -0
  270. /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/StatelessMenu.d.ts +0 -0
  271. /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/index.d.ts +0 -0
  272. /package/src/{Button → __actions__/Button/v1}/Button/Button.tsx +0 -0
  273. /package/src/{Button → __actions__/Button/v1}/Button/index.ts +0 -0
  274. /package/src/{Button → __actions__/Button/v1}/GenericButton/GenericButton.spec.tsx +0 -0
  275. /package/src/{Button → __actions__/Button/v1}/GenericButton/GenericButton.tsx +0 -0
  276. /package/src/{Button → __actions__/Button/v1}/GenericButton/index.ts +0 -0
  277. /package/src/{Button → __actions__/Button/v1}/IconButton/IconButton.module.scss +0 -0
  278. /package/src/{Button → __actions__/Button/v1}/IconButton/IconButton.spec.tsx +0 -0
  279. /package/src/{Button → __actions__/Button/v1}/IconButton/IconButton.tsx +0 -0
  280. /package/src/{Button → __actions__/Button/v1}/IconButton/index.ts +0 -0
  281. /package/src/{Button → __actions__/Button/v1}/index.ts +0 -0
  282. /package/src/{Button → __actions__/Button/v1}/utils/_mixins.scss +0 -0
  283. /package/src/{Menu → __actions__/Menu/v1}/_docs/MenuContentExample.tsx +0 -0
  284. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/MenuDropdown.module.scss +0 -0
  285. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/MenuDropdown.tsx +0 -0
  286. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/index.ts +0 -0
  287. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.module.scss +0 -0
  288. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.tsx +0 -0
  289. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/index.ts +0 -0
  290. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/MenuItem.module.scss +0 -0
  291. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/MenuItem.tsx +0 -0
  292. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/index.ts +0 -0
  293. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.module.scss +0 -0
  294. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.spec.tsx +0 -0
  295. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.tsx +0 -0
  296. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/index.ts +0 -0
  297. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/StatelessMenu.module.scss +0 -0
  298. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/StatelessMenu.tsx +0 -0
  299. /package/src/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/index.ts +0 -0
@@ -0,0 +1,193 @@
1
+ import React from "react"
2
+ import { Meta, StoryObj } from "@storybook/react"
3
+ import { userEvent, waitFor, within, expect, fn } from "@storybook/test"
4
+ import { VisuallyHidden } from "react-aria"
5
+ import {
6
+ AddIcon,
7
+ TrashIcon,
8
+ ThumbsUpOffIcon,
9
+ ThumbsUpOnIcon,
10
+ } from "~components/Icon"
11
+ import { Tooltip, TooltipTrigger } from "~components/__overlays__/v3"
12
+ import { Button } from "../index"
13
+
14
+ const onPressEvent = fn()
15
+
16
+ const meta = {
17
+ title: "Actions/Button/v3/Tests",
18
+ component: Button,
19
+ args: {
20
+ children: "Label",
21
+ onPress: onPressEvent,
22
+ },
23
+ } satisfies Meta<typeof Button>
24
+
25
+ export default meta
26
+
27
+ type Story = StoryObj<typeof meta>
28
+
29
+ export const ButtonDefault: Story = {
30
+ render: ({ children, ...otherArgs }) => (
31
+ <Button {...otherArgs}>
32
+ <>
33
+ {children}
34
+ <AddIcon role="presentation" />
35
+ </>
36
+ </Button>
37
+ ),
38
+ }
39
+
40
+ export const IsHovered: Story = {
41
+ ...ButtonDefault,
42
+ play: async ({ canvasElement, step }) => {
43
+ const canvas = within(canvasElement.parentElement!)
44
+ const button = canvas.getByRole("button")
45
+
46
+ await step("Hover shows", async () => {
47
+ await userEvent.hover(button)
48
+ await expect(button).toHaveAttribute("data-hovered", "true")
49
+ })
50
+ },
51
+ }
52
+ export const IsHoveredReversed: Story = {
53
+ ...IsHovered,
54
+ parameters: {
55
+ reverseColors: true,
56
+ },
57
+ }
58
+
59
+ export const IsFocused: Story = {
60
+ ...ButtonDefault,
61
+ play: async ({ canvasElement, step }) => {
62
+ const canvas = within(canvasElement.parentElement!)
63
+ const button = canvas.getByRole("button")
64
+
65
+ await step("Focus shows", async () => {
66
+ await userEvent.tab()
67
+
68
+ await waitFor(() => expect(document.activeElement).toBe(button))
69
+ await expect(button).toHaveAttribute("data-focused", "true")
70
+ })
71
+ },
72
+ }
73
+
74
+ export const IsFocusedReversed: Story = {
75
+ ...IsFocused,
76
+ parameters: {
77
+ reverseColors: true,
78
+ },
79
+ }
80
+
81
+ export const IsPressed: Story = {
82
+ ...ButtonDefault,
83
+ play: async ({ canvasElement, step }) => {
84
+ const canvas = within(canvasElement.parentElement!)
85
+ const button = canvas.getByRole("button")
86
+
87
+ await step("onPress is called", async () => {
88
+ await userEvent.click(button)
89
+
90
+ await expect(onPressEvent).toHaveBeenCalledTimes(1)
91
+ })
92
+ },
93
+ }
94
+
95
+ export const IconButtonWithAccessibleLabel: Story = {
96
+ render: ({ children: _, ...otherArgs }) => (
97
+ <Button {...otherArgs}>
98
+ <>
99
+ <TrashIcon role="img" aria-label="Remove" />
100
+ <VisuallyHidden> Highlight: 18, June, 2024</VisuallyHidden>
101
+ </>
102
+ </Button>
103
+ ),
104
+ play: async ({ canvasElement, step }) => {
105
+ const canvas = within(canvasElement.parentElement!)
106
+ const button = canvas.getByRole("button")
107
+
108
+ await step("has accessible labels", async () => {
109
+ await userEvent.tab()
110
+
111
+ await expect(button).toHaveAccessibleName(
112
+ "Remove Highlight: 18, June, 2024"
113
+ )
114
+ })
115
+ },
116
+ }
117
+
118
+ export const ButtonWithRACRenderPropsAsChildren: Story = {
119
+ render: ({ children: _, ...otherArgs }) => (
120
+ <Button {...otherArgs}>
121
+ {({ isFocused }) => (
122
+ <>
123
+ Label
124
+ {isFocused ? (
125
+ <ThumbsUpOnIcon role="img" aria-label=" is focused" />
126
+ ) : (
127
+ <ThumbsUpOffIcon role="img" aria-label=" is unfocused" />
128
+ )}
129
+ </>
130
+ )}
131
+ </Button>
132
+ ),
133
+ play: async ({ canvasElement, step }) => {
134
+ const canvas = within(canvasElement.parentElement!)
135
+ const button = canvas.getByRole("button")
136
+
137
+ await step("button icon reflects unfocused state", async () => {
138
+ await waitFor(() =>
139
+ expect(button).toHaveAccessibleName("Label is unfocused")
140
+ )
141
+ })
142
+
143
+ await step("focus on button and update icon", async () => {
144
+ await userEvent.tab()
145
+ await waitFor(() =>
146
+ expect(button).toHaveAccessibleName("Label is focused")
147
+ )
148
+ })
149
+ },
150
+ }
151
+
152
+ // While this is a less likely use case, but as it is possible to use render props to apply a class name to the button so we should test that it works with our Button implementation
153
+ export const ButtonWithRACRenderPropsAsClassname: Story = {
154
+ render: ({ children: _, ...otherArgs }) => (
155
+ <Button
156
+ className={({ isFocused }) =>
157
+ isFocused ? "!bg-blue-500 !text-white !border-transparent" : ""
158
+ }
159
+ {...otherArgs}
160
+ >
161
+ Label
162
+ </Button>
163
+ ),
164
+ play: async ({ canvasElement }) => {
165
+ const canvas = within(canvasElement.parentElement!)
166
+ const button = canvas.getByRole("button")
167
+ await button.focus()
168
+ },
169
+ }
170
+
171
+ // A compatibility check since when we develop tooltip the v1 button was an issue
172
+ export const ButtonWithTooltip: Story = {
173
+ render: ({ children: _, ...otherArgs }) => (
174
+ <TooltipTrigger>
175
+ <Button {...otherArgs}>Label</Button>
176
+ <Tooltip>Tooltip content</Tooltip>
177
+ </TooltipTrigger>
178
+ ),
179
+ play: async ({ canvasElement, step }) => {
180
+ const canvas = within(canvasElement.parentElement!)
181
+ const button = canvas.getByRole("button")
182
+
183
+ await step("Focus shows", async () => {
184
+ await userEvent.tab()
185
+
186
+ await waitFor(() => expect(document.activeElement).toBe(button))
187
+ })
188
+
189
+ await step("Tooltip content show", async () => {
190
+ await waitFor(() => expect(canvas.getByRole("tooltip")).toBeVisible())
191
+ })
192
+ },
193
+ }
@@ -0,0 +1,135 @@
1
+ import React from "react"
2
+ import { Meta } from "@storybook/react"
3
+ import { ArrowForwardIcon, AddIcon, TrashIcon } from "~components/Icon"
4
+ import { LoadingSpinner } from "~components/Loading"
5
+ import {
6
+ StickerSheet,
7
+ StickerSheetStory,
8
+ } from "~storybook/components/StickerSheet"
9
+ import { Button } from "../index"
10
+
11
+ export default {
12
+ title: "Actions/Button/v3/Tests",
13
+ parameters: {
14
+ chromatic: { disable: false },
15
+ controls: { disable: true },
16
+ },
17
+ } satisfies Meta
18
+
19
+ const StickerSheetTemplate: StickerSheetStory = {
20
+ render: ({ isReversed }) => (
21
+ <>
22
+ <StickerSheet heading="Button" isReversed={isReversed}>
23
+ <StickerSheet.Header
24
+ headings={["Base", "Disabled", "working"]}
25
+ headingsWidth="10rem"
26
+ hasVerticalHeadings
27
+ verticalHeadingsWidth="12rem"
28
+ />
29
+ <StickerSheet.Body>
30
+ <StickerSheet.Row rowTitle="Default">
31
+ <Button>Label</Button>
32
+
33
+ <Button isDisabled>Label</Button>
34
+ <Button isDisabled>
35
+ <LoadingSpinner size="sm" accessibilityLabel="submitting label" />
36
+ </Button>
37
+ </StickerSheet.Row>
38
+ <StickerSheet.Row rowTitle="Icon start">
39
+ <Button>
40
+ <AddIcon role="presentation" />
41
+ Label
42
+ </Button>
43
+ <Button isDisabled>
44
+ <AddIcon role="presentation" />
45
+ Label
46
+ </Button>
47
+ <Button isDisabled>
48
+ <LoadingSpinner size="sm" accessibilityLabel="submitting label" />
49
+ </Button>
50
+ </StickerSheet.Row>
51
+ <StickerSheet.Row rowTitle="Icon end">
52
+ <Button>
53
+ Label
54
+ <ArrowForwardIcon role="presentation" />
55
+ </Button>
56
+ <Button isDisabled>
57
+ Label
58
+ <ArrowForwardIcon role="presentation" />
59
+ </Button>
60
+ <Button isDisabled>
61
+ <LoadingSpinner size="sm" accessibilityLabel="submitting label" />
62
+ </Button>
63
+ </StickerSheet.Row>
64
+ <StickerSheet.Row rowTitle="Icon only">
65
+ <Button aria-label="Label">
66
+ <TrashIcon role="presentation" />
67
+ </Button>
68
+ <Button aria-label="Label" isDisabled>
69
+ <TrashIcon role="presentation" />
70
+ </Button>
71
+ <Button aria-label="Label" isDisabled>
72
+ <LoadingSpinner size="sm" accessibilityLabel="submitting label" />
73
+ </Button>
74
+ </StickerSheet.Row>
75
+ <StickerSheet.Row rowTitle="Small">
76
+ <Button size="small">
77
+ Label
78
+ <ArrowForwardIcon role="presentation" />
79
+ </Button>
80
+ <Button size="small" isDisabled>
81
+ Label
82
+ <ArrowForwardIcon role="presentation" />
83
+ </Button>
84
+ <Button size="small" isDisabled>
85
+ <LoadingSpinner size="sm" accessibilityLabel="submitting label" />
86
+ </Button>
87
+ </StickerSheet.Row>
88
+ <StickerSheet.Row rowTitle="Icon only small">
89
+ <Button size="small">
90
+ <TrashIcon role="img" aria-label="Remove label" />
91
+ </Button>
92
+ <Button size="small" isDisabled>
93
+ <TrashIcon role="img" aria-label="Remove label" />
94
+ </Button>
95
+ <Button size="small" isDisabled>
96
+ <LoadingSpinner size="sm" accessibilityLabel="Removing label" />
97
+ </Button>
98
+ </StickerSheet.Row>
99
+ </StickerSheet.Body>
100
+ </StickerSheet>
101
+ </>
102
+ ),
103
+ parameters: {
104
+ pseudo: {
105
+ hover: '[data-hovered="true"]',
106
+ active: '[data-pressed="true"]',
107
+ focus: '[data-focused="true"]',
108
+ focusVisible: '[data-focus-visible="true"]',
109
+ },
110
+ },
111
+ }
112
+
113
+ export const StickerSheetDefault: StickerSheetStory = {
114
+ ...StickerSheetTemplate,
115
+ name: "Sticker Sheet (Default)",
116
+ }
117
+
118
+ export const StickerSheetRTL: StickerSheetStory = {
119
+ ...StickerSheetTemplate,
120
+ name: "Sticker Sheet (RTL)",
121
+ parameters: {
122
+ textDirection: "rtl",
123
+ },
124
+ }
125
+
126
+ export const StickerSheetReversed: StickerSheetStory = {
127
+ ...StickerSheetTemplate,
128
+ name: "Sticker Sheet (Reversed)",
129
+ parameters: {
130
+ reverseColors: true,
131
+ },
132
+ args: {
133
+ isReversed: true,
134
+ },
135
+ }
@@ -0,0 +1,98 @@
1
+ import React from "react"
2
+ import { action } from "@storybook/addon-actions"
3
+ import { Meta, StoryObj } from "@storybook/react"
4
+ import { AddIcon, TrashIcon, ChevronUpIcon } from "~components/Icon"
5
+ import { VisuallyHidden } from "~components/VisuallyHidden"
6
+ import { Button } from "../index"
7
+
8
+ const meta = {
9
+ title: "Actions/Button/v3",
10
+ component: Button,
11
+ args: {
12
+ children: "Label",
13
+ onPress: action("Button onPress event"),
14
+ },
15
+ } satisfies Meta<typeof Button>
16
+
17
+ export default meta
18
+
19
+ type Story = StoryObj<typeof meta>
20
+
21
+ export const Playground: Story = {
22
+ render: ({ children, ...otherArgs }) => (
23
+ <Button {...otherArgs}>{children}</Button>
24
+ ),
25
+ }
26
+
27
+ export const ButtonWithIcon: Story = {
28
+ render: ({ children, ...otherArgs }) => (
29
+ <Button {...otherArgs}>{children}</Button>
30
+ ),
31
+ args: {
32
+ children: (
33
+ <>
34
+ Label
35
+ <AddIcon role="presentation" />
36
+ </>
37
+ ),
38
+ },
39
+ }
40
+
41
+ export const ButtonWithIconStart: Story = {
42
+ render: ({ children, ...otherArgs }) => (
43
+ <Button {...otherArgs}>{children}</Button>
44
+ ),
45
+ args: {
46
+ children: (
47
+ <>
48
+ <TrashIcon role="presentation" />
49
+ Label
50
+ </>
51
+ ),
52
+ },
53
+ }
54
+
55
+ export const IconButton: Story = {
56
+ render: ({ children, ...otherArgs }) => (
57
+ <Button {...otherArgs}>{children}</Button>
58
+ ),
59
+ args: {
60
+ children: (
61
+ <>
62
+ <TrashIcon role="img" aria-label="Remove" />
63
+ <VisuallyHidden> Highlights: May 8, 2024</VisuallyHidden>
64
+ </>
65
+ ),
66
+ },
67
+ }
68
+
69
+ export const OnReversed: Story = {
70
+ render: ({ children, ...otherArgs }) => (
71
+ <Button {...otherArgs}>{children}</Button>
72
+ ),
73
+ args: {
74
+ children: (
75
+ <>
76
+ Label
77
+ <ChevronUpIcon role="presentation" />
78
+ </>
79
+ ),
80
+ },
81
+ parameters: {
82
+ reverseColors: true,
83
+ docs: {
84
+ source: {
85
+ code: `
86
+ <ReversedColors isReversed={true}>
87
+ <Button {...otherArgs}>
88
+ <>
89
+ Label
90
+ <ChevronUpIcon role="presentation" />
91
+ </>
92
+ </Button>
93
+ </ReversedColors>
94
+ `,
95
+ },
96
+ },
97
+ },
98
+ }
@@ -0,0 +1 @@
1
+ export * from "./Button"
@@ -1,7 +1,7 @@
1
1
  import React from "react"
2
2
  import { render, screen, waitFor } from "@testing-library/react"
3
3
  import userEvent from "@testing-library/user-event"
4
- import { Button } from "~components/Button"
4
+ import { Button } from "~components/__actions__/v2"
5
5
  import { Menu } from "./Menu"
6
6
 
7
7
  const user = userEvent.setup()
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from "react"
2
- import { ButtonProps } from "~components/Button"
2
+ import { ButtonProps } from "~components/__actions__/v2"
3
3
  import {
4
4
  StatelessMenu,
5
5
  StatelessMenuProps,
@@ -0,0 +1,29 @@
1
+ import { Canvas, Controls, Meta } from "@storybook/blocks"
2
+ import { ResourceLinks, Installation } from "~storybook/components"
3
+ import * as MenuStories from "./Menu.stories"
4
+
5
+ <Meta of={MenuStories} />
6
+
7
+ # Menu (v1)
8
+
9
+ <ResourceLinks
10
+ sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Menu"
11
+ figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%EF%B8%8F%F0%9F%96%BC%EF%B8%8F-Component-Gallery?node-id=9%3A39909&t=P1w10jr2cpPuaayw-1"
12
+ designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082059782/Menu"
13
+ className="!mb-8"
14
+ />
15
+
16
+ <Installation
17
+ installCommand="pnpm add @kaizen/components"
18
+ importStatement='import { Menu, MenuDropdown, MenuList, MenuItem } from "@kaizen/components/v1/actions"'
19
+ />
20
+
21
+ It is recommended that you import from the `v2` entry point.
22
+
23
+ ## Overview
24
+
25
+ A menu contains links to places or button actions. It does NOT show a selected item at all and the menu button text never changes.
26
+
27
+ <Canvas of={MenuStories.Playground} />
28
+ <Controls of={MenuStories.Playground} />
29
+
@@ -1,7 +1,7 @@
1
1
  import React from "react"
2
2
  import { Meta } from "@storybook/react"
3
- import { Button } from "~components/Button"
4
3
  import { ChevronDownIcon } from "~components/Icon"
4
+ import { Button } from "~components/__actions__/v2"
5
5
  import {
6
6
  StickerSheet,
7
7
  StickerSheetStory,
@@ -10,7 +10,7 @@ import { Menu } from "../index"
10
10
  import { MenuContentExample } from "./MenuContentExample"
11
11
 
12
12
  export default {
13
- title: "Components/Menu",
13
+ title: "Actions/Menu/v1",
14
14
  parameters: {
15
15
  chromatic: { disable: false },
16
16
  controls: { disable: true },
@@ -1,14 +1,14 @@
1
1
  import React from "react"
2
2
  import { Meta, StoryObj } from "@storybook/react"
3
- import { Button } from "~components/Button"
4
3
  import { ChevronDownIcon, DuplicateIcon } from "~components/Icon"
4
+ import { Button } from "~components/__actions__/v2"
5
5
  import { Menu } from "../index"
6
6
  import { MenuHeading } from "../subcomponents/MenuHeading"
7
7
  import { MenuItem } from "../subcomponents/MenuItem"
8
8
  import { MenuList } from "../subcomponents/MenuList"
9
9
 
10
10
  const meta = {
11
- title: "Components/Menu",
11
+ title: "Actions/Menu/v1",
12
12
  component: Menu,
13
13
  args: {
14
14
  button: (
@@ -1,7 +1,7 @@
1
1
  import React from "react"
2
2
  import { action } from "@storybook/addon-actions"
3
3
  import { DuplicateIcon, EditIcon } from "~components/Icon"
4
- import { MenuItem, MenuList } from "~components/Menu"
4
+ import { MenuItem, MenuList } from "../"
5
5
 
6
6
  export const exampleActionButtonPropsButton = {
7
7
  label: "Edit Survey",
@@ -0,0 +1,35 @@
1
+ // Since we can't add a deprecation flag on a * export
2
+ import { Menu as MenuV1, MenuProps as MenuPropsV1 } from "./Menu"
3
+ import {
4
+ MenuHeading as MenuHeadingV1,
5
+ MenuHeadingProps as MenuHeadingPropsV1,
6
+ } from "./subcomponents/MenuHeading"
7
+ import {
8
+ MenuItem as MenuItemV1,
9
+ MenuItemProps as MenuItemPropsV1,
10
+ } from "./subcomponents/MenuItem"
11
+ import {
12
+ MenuList as MenuListV1,
13
+ MenuListProps as MenuListPropsV1,
14
+ } from "./subcomponents/MenuList"
15
+ import {
16
+ StatelessMenu as StatelessMenuV1,
17
+ StatelessMenuProps as StatelessMenuPropsV1,
18
+ } from "./subcomponents/StatelessMenu"
19
+
20
+ // Note: deprecate all of these once we have Button v3
21
+
22
+ export const Menu = MenuV1
23
+ export type MenuProps = MenuPropsV1
24
+
25
+ export const MenuHeading = MenuHeadingV1
26
+ export type MenuHeadingProps = MenuHeadingPropsV1
27
+
28
+ export const MenuItem = MenuItemV1
29
+ export type MenuItemProps = MenuItemPropsV1
30
+
31
+ export const MenuList = MenuListV1
32
+ export type MenuListProps = MenuListPropsV1
33
+
34
+ export const StatelessMenu = StatelessMenuV1
35
+ export type StatelessMenuProps = StatelessMenuPropsV1
@@ -4,7 +4,7 @@ import * as MenuStories from "./Menu.stories"
4
4
 
5
5
  <Meta of={MenuStories} />
6
6
 
7
- # Menu
7
+ # Menu (v2)
8
8
 
9
9
  <ResourceLinks
10
10
  sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Menu"
@@ -13,7 +13,7 @@ import * as MenuStories from "./Menu.stories"
13
13
 
14
14
  />
15
15
 
16
- <KAIOInstallation exportNames="Menu" />
16
+ <KAIOInstallation exportNames={["Menu", "MenuDropdown", "MenuList", "MenuItem"]} family="actions" version="2" />
17
17
 
18
18
  ## Overview
19
19
 
@@ -0,0 +1,54 @@
1
+ import React from "react"
2
+ import { Meta, StoryObj } from "@storybook/react"
3
+ import { ChevronDownIcon, DuplicateIcon } from "~components/Icon"
4
+ import { Button } from "~components/__actions__/v2"
5
+ import * as MenuV1Stories from "../../v1/_docs/Menu.stories"
6
+ import { Menu, MenuList, MenuItem, MenuHeading } from "../index"
7
+
8
+ const meta = {
9
+ title: "Actions/Menu/v2",
10
+ component: Menu,
11
+ args: {
12
+ button: (
13
+ <Button
14
+ label="Actions"
15
+ icon={<ChevronDownIcon role="presentation" />}
16
+ iconPosition="end"
17
+ />
18
+ ),
19
+ children: (
20
+ <MenuList>
21
+ <MenuItem
22
+ onClick={() => {
23
+ alert("Duplicated!")
24
+ }}
25
+ icon={<DuplicateIcon role="presentation" />}
26
+ label="Duplicate item"
27
+ />
28
+ <MenuList heading={<MenuHeading>Extra links</MenuHeading>}>
29
+ <MenuItem
30
+ href="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082059782/Menu"
31
+ label="Learn more about Menu"
32
+ destructive
33
+ />
34
+ </MenuList>
35
+ </MenuList>
36
+ ),
37
+ },
38
+ decorators: [
39
+ Story => (
40
+ <div className="flex mt-[60px] gap-12">
41
+ <Story />
42
+ </div>
43
+ ),
44
+ ],
45
+ parameters: {
46
+ layout: "centered",
47
+ },
48
+ } satisfies Meta<typeof Menu>
49
+
50
+ export default meta
51
+
52
+ type Story = StoryObj<typeof meta>
53
+
54
+ export const Playground: Story = MenuV1Stories.Playground
@@ -0,0 +1,6 @@
1
+ export * from "../v1/Menu"
2
+ export * from "../v1/subcomponents/MenuList"
3
+ export * from "../v1/subcomponents/MenuDropdown"
4
+ export * from "../v1/subcomponents/MenuItem"
5
+ export * from "../v1/subcomponents/MenuHeading"
6
+ export * from "../v1/subcomponents/StatelessMenu"
@@ -0,0 +1,32 @@
1
+ .menu {
2
+ background-color: var(--color-white);
3
+ color: var(--color-purple-800);
4
+ width: 248px;
5
+ max-height: 22rem;
6
+ overflow: auto;
7
+ padding-block: var(--spacing-6);
8
+ outline: none;
9
+ border-radius: var(--border-solid-border-radius);
10
+ box-shadow: var(--shadow-large-box-shadow);
11
+ }
12
+
13
+ .menu :global(.react-aria-Header) {
14
+ font-family: var(--typography-heading-6-font-family);
15
+ font-size: var(--typography-heading-6-font-size);
16
+ letter-spacing: var(--typography-heading-6-letter-spacing);
17
+ font-weight: var(--typography-heading-6-font-weight);
18
+ line-height: var(--typography-heading-6-line-height);
19
+ padding: var(--spacing-6) 10px;
20
+ margin-inline: var(--spacing-6);
21
+ }
22
+
23
+ .menu section:not(:last-of-type) {
24
+ &::after {
25
+ width: 100%;
26
+ height: 1px;
27
+ background-color: var(--border-solid-border-color);
28
+ content: "";
29
+ display: block;
30
+ margin-block: var(--spacing-6);
31
+ }
32
+ }