@kaizen/components 0.0.0-canary-fix-select-focus-add-small-delay-20241013230007 → 0.0.0-canary-codemod-tsx-20241030002309

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 (360) hide show
  1. package/bin/codemod.sh +2 -2
  2. package/codemods/README.md +12 -4
  3. package/codemods/upgradeIconV1/getNewIconPropsFromOldIconName.ts +255 -0
  4. package/codemods/upgradeIconV1/index.ts +33 -0
  5. package/codemods/upgradeIconV1/transformCaMonogramIconToBrand.spec.ts +83 -0
  6. package/codemods/upgradeIconV1/transformCaMonogramIconToBrand.ts +53 -0
  7. package/codemods/upgradeIconV1/transformIcon.spec.ts +181 -0
  8. package/codemods/upgradeIconV1/transformIcon.ts +115 -0
  9. package/codemods/upgradeIconV1/transformSpinnerIconToLoadingSpinner.spec.ts +81 -0
  10. package/codemods/upgradeIconV1/transformSpinnerIconToLoadingSpinner.ts +41 -0
  11. package/codemods/upgradeIconV1/upgradeIconV1.spec.ts +306 -0
  12. package/codemods/upgradeIconV1/upgradeIconV1.ts +94 -0
  13. package/codemods/utils/createProp.spec.ts +83 -0
  14. package/codemods/utils/createProp.ts +51 -0
  15. package/codemods/utils/getKaioTagName.spec.ts +85 -0
  16. package/codemods/utils/getKaioTagName.ts +129 -0
  17. package/codemods/utils/index.ts +3 -1
  18. package/codemods/utils/transformComponentsInDir.ts +32 -16
  19. package/codemods/utils/transformSource.ts +10 -5
  20. package/codemods/utils/updateJsxElementWithNewProps.ts +4 -3
  21. package/codemods/utils/updateKaioImports.spec.ts +223 -0
  22. package/codemods/utils/updateKaioImports.ts +233 -0
  23. package/dist/cjs/Avatar/Avatar.cjs +16 -13
  24. package/dist/cjs/Calendar/CalendarRange/CalendarRange.cjs +9 -7
  25. package/dist/cjs/Calendar/CalendarSingle/CalendarSingle.cjs +9 -7
  26. package/dist/cjs/Calendar/LegacyCalendarRange/LegacyCalendarRange.cjs +9 -7
  27. package/dist/cjs/Checkbox/Checkbox/Checkbox.cjs +5 -11
  28. package/dist/cjs/ClearButton/ClearButton.cjs +5 -4
  29. package/dist/cjs/Collapsible/Collapsible/Collapsible.cjs +4 -7
  30. package/dist/cjs/DateInput/DateInputWithIconButton/DateInputWithIconButton.cjs +5 -4
  31. package/dist/cjs/DateRangePicker/DateRangePicker.cjs +5 -4
  32. package/dist/cjs/ErrorPage/ErrorPage.cjs +9 -7
  33. package/dist/cjs/FieldMessage/FieldMessage.cjs +5 -11
  34. package/dist/cjs/Filter/FilterBar/context/FilterBarContext.cjs +17 -2
  35. package/dist/cjs/Filter/FilterBar/context/reducer/filterBarStateReducer.cjs +4 -0
  36. package/dist/cjs/Filter/FilterBar/context/reducer/setupFilterBarState.cjs +2 -1
  37. package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +16 -6
  38. package/dist/cjs/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.cjs +12 -1
  39. package/dist/cjs/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.cjs +13 -2
  40. package/dist/cjs/Filter/FilterButton/FilterButton/FilterButton.cjs +4 -7
  41. package/dist/cjs/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.cjs +5 -5
  42. package/dist/cjs/Filter/FilterMultiSelect/FilterMultiSelect.cjs +4 -2
  43. package/dist/cjs/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.cjs +4 -2
  44. package/dist/cjs/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.cjs +4 -4
  45. package/dist/cjs/GuidanceBlock/GuidanceBlock.cjs +5 -4
  46. package/dist/cjs/Illustration/utils/usePausePlay.cjs +5 -8
  47. package/dist/cjs/Input/InputSearch/InputSearch.cjs +4 -3
  48. package/dist/cjs/LikertScaleLegacy/LikertScaleLegacy.cjs +5 -6
  49. package/dist/cjs/Loading/LoadingSpinner/LoadingSpinner.cjs +6 -42
  50. package/dist/cjs/Loading/LoadingSpinner/LoadingSpinner.module.css.cjs +10 -0
  51. package/dist/cjs/Loading/LoadingSpinner/subcomponents/SpinnerIcon.cjs +80 -0
  52. package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.cjs +31 -26
  53. package/dist/cjs/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.cjs +4 -5
  54. package/dist/cjs/MultiSelect/subcomponents/Checkbox/Checkbox.cjs +7 -17
  55. package/dist/cjs/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.cjs +4 -7
  56. package/dist/cjs/Notification/subcomponents/CancelButton/CancelButton.cjs +4 -3
  57. package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.cjs +33 -38
  58. package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css.cjs +6 -0
  59. package/dist/cjs/Pagination/subcomponents/DirectionalLink/DirectionalLink.cjs +11 -19
  60. package/dist/cjs/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.cjs +4 -5
  61. package/dist/cjs/Popover/Popover.cjs +5 -4
  62. package/dist/cjs/Popover/utils/classMappers.cjs +21 -16
  63. package/dist/cjs/RichTextEditor/RichTextEditor/utils/controlmap.cjs +29 -25
  64. package/dist/cjs/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.cjs +10 -12
  65. package/dist/cjs/Select/Select.cjs +8 -10
  66. package/dist/cjs/SplitButton/subcomponents/DropdownButton/DropdownButton.cjs +4 -4
  67. package/dist/cjs/Table/Table.cjs +11 -10
  68. package/dist/cjs/Tag/Tag.cjs +21 -17
  69. package/dist/cjs/TextArea/TextArea.cjs +20 -52
  70. package/dist/cjs/TextArea/TextArea.module.css.cjs +14 -0
  71. package/dist/cjs/TextField/TextField.cjs +7 -6
  72. package/dist/cjs/TextField/TextField.module.scss.cjs +4 -6
  73. package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.cjs +8 -7
  74. package/dist/cjs/TitleBlockZen/TitleBlockZen.cjs +9 -12
  75. package/dist/cjs/TitleBlockZen/subcomponents/MainActions.cjs +7 -7
  76. package/dist/cjs/TitleBlockZen/subcomponents/MobileActions.cjs +10 -15
  77. package/dist/cjs/TitleBlockZen/subcomponents/SecondaryActions.cjs +7 -7
  78. package/dist/cjs/ToggleSwitch/ToggleSwitch/ToggleSwitch.cjs +5 -5
  79. package/dist/cjs/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.cjs +13 -18
  80. package/dist/cjs/__future__/Icon/Icon.cjs +47 -0
  81. package/dist/cjs/__future__/Icon/Icon.module.css.cjs +10 -0
  82. package/dist/cjs/__future__/Icon/constants.cjs +8 -0
  83. package/dist/cjs/__future__/Select/subcomponents/ListBox/ListBox.cjs +7 -10
  84. package/dist/cjs/__future__/Select/subcomponents/Option/Option.cjs +4 -5
  85. package/dist/cjs/__future__/Select/subcomponents/SelectToggle/SelectToggle.cjs +5 -9
  86. package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveButton.cjs +4 -3
  87. package/dist/cjs/future.cjs +2 -0
  88. package/dist/esm/Avatar/Avatar.mjs +16 -13
  89. package/dist/esm/Calendar/CalendarRange/CalendarRange.mjs +9 -7
  90. package/dist/esm/Calendar/CalendarSingle/CalendarSingle.mjs +9 -7
  91. package/dist/esm/Calendar/LegacyCalendarRange/LegacyCalendarRange.mjs +9 -7
  92. package/dist/esm/Checkbox/Checkbox/Checkbox.mjs +5 -11
  93. package/dist/esm/ClearButton/ClearButton.mjs +5 -4
  94. package/dist/esm/Collapsible/Collapsible/Collapsible.mjs +5 -8
  95. package/dist/esm/DateInput/DateInputWithIconButton/DateInputWithIconButton.mjs +5 -4
  96. package/dist/esm/DateRangePicker/DateRangePicker.mjs +5 -4
  97. package/dist/esm/ErrorPage/ErrorPage.mjs +10 -8
  98. package/dist/esm/FieldMessage/FieldMessage.mjs +6 -12
  99. package/dist/esm/Filter/FilterBar/context/FilterBarContext.mjs +17 -2
  100. package/dist/esm/Filter/FilterBar/context/reducer/filterBarStateReducer.mjs +4 -0
  101. package/dist/esm/Filter/FilterBar/context/reducer/setupFilterBarState.mjs +2 -1
  102. package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +17 -7
  103. package/dist/esm/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.mjs +13 -2
  104. package/dist/esm/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.mjs +14 -3
  105. package/dist/esm/Filter/FilterButton/FilterButton/FilterButton.mjs +5 -8
  106. package/dist/esm/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.mjs +5 -5
  107. package/dist/esm/Filter/FilterMultiSelect/FilterMultiSelect.mjs +4 -2
  108. package/dist/esm/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.mjs +4 -2
  109. package/dist/esm/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.mjs +4 -4
  110. package/dist/esm/GuidanceBlock/GuidanceBlock.mjs +5 -4
  111. package/dist/esm/Illustration/utils/usePausePlay.mjs +5 -8
  112. package/dist/esm/Input/InputSearch/InputSearch.mjs +4 -3
  113. package/dist/esm/LikertScaleLegacy/LikertScaleLegacy.mjs +5 -6
  114. package/dist/esm/Loading/LoadingSpinner/LoadingSpinner.mjs +6 -42
  115. package/dist/esm/Loading/LoadingSpinner/LoadingSpinner.module.css.mjs +8 -0
  116. package/dist/esm/Loading/LoadingSpinner/subcomponents/SpinnerIcon.mjs +72 -0
  117. package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.mjs +31 -26
  118. package/dist/esm/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.mjs +4 -5
  119. package/dist/esm/MultiSelect/subcomponents/Checkbox/Checkbox.mjs +7 -17
  120. package/dist/esm/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.mjs +5 -8
  121. package/dist/esm/Notification/subcomponents/CancelButton/CancelButton.mjs +4 -3
  122. package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.mjs +33 -38
  123. package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css.mjs +4 -0
  124. package/dist/esm/Pagination/subcomponents/DirectionalLink/DirectionalLink.mjs +11 -19
  125. package/dist/esm/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.mjs +4 -5
  126. package/dist/esm/Popover/Popover.mjs +5 -4
  127. package/dist/esm/Popover/utils/classMappers.mjs +21 -16
  128. package/dist/esm/RichTextEditor/RichTextEditor/utils/controlmap.mjs +33 -29
  129. package/dist/esm/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.mjs +10 -12
  130. package/dist/esm/Select/Select.mjs +9 -11
  131. package/dist/esm/SplitButton/subcomponents/DropdownButton/DropdownButton.mjs +4 -4
  132. package/dist/esm/Table/Table.mjs +11 -10
  133. package/dist/esm/Tag/Tag.mjs +21 -17
  134. package/dist/esm/TextArea/TextArea.mjs +21 -53
  135. package/dist/esm/TextArea/TextArea.module.css.mjs +12 -0
  136. package/dist/esm/TextField/TextField.mjs +7 -6
  137. package/dist/esm/TextField/TextField.module.scss.mjs +4 -6
  138. package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.mjs +8 -7
  139. package/dist/esm/TitleBlockZen/TitleBlockZen.mjs +9 -12
  140. package/dist/esm/TitleBlockZen/subcomponents/MainActions.mjs +7 -7
  141. package/dist/esm/TitleBlockZen/subcomponents/MobileActions.mjs +13 -18
  142. package/dist/esm/TitleBlockZen/subcomponents/SecondaryActions.mjs +7 -7
  143. package/dist/esm/ToggleSwitch/ToggleSwitch/ToggleSwitch.mjs +5 -5
  144. package/dist/esm/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +16 -21
  145. package/dist/esm/__future__/Icon/Icon.mjs +38 -0
  146. package/dist/esm/__future__/Icon/Icon.module.css.mjs +8 -0
  147. package/dist/esm/__future__/Icon/constants.mjs +6 -0
  148. package/dist/esm/__future__/Select/subcomponents/ListBox/ListBox.mjs +7 -10
  149. package/dist/esm/__future__/Select/subcomponents/Option/Option.mjs +4 -5
  150. package/dist/esm/__future__/Select/subcomponents/SelectToggle/SelectToggle.mjs +6 -10
  151. package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveButton.mjs +4 -3
  152. package/dist/esm/future.mjs +1 -0
  153. package/dist/styles.css +1026 -1699
  154. package/dist/types/Filter/FilterBar/context/FilterBarContext.d.ts +2 -0
  155. package/dist/types/Filter/FilterBar/context/reducer/filterBarStateReducer.d.ts +3 -0
  156. package/dist/types/Filter/FilterBar/context/types.d.ts +1 -0
  157. package/dist/types/Filter/FilterMultiSelect/FilterMultiSelect.d.ts +2 -1
  158. package/dist/types/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.d.ts +2 -1
  159. package/dist/types/Loading/LoadingSpinner/LoadingSpinner.d.ts +2 -2
  160. package/dist/types/Loading/LoadingSpinner/subcomponents/SpinnerIcon.d.ts +5 -0
  161. package/dist/types/Loading/LoadingSpinner/subcomponents/index.d.ts +1 -0
  162. package/dist/types/TextArea/TextArea.d.ts +4 -0
  163. package/dist/types/__future__/Icon/Icon.d.ts +21 -0
  164. package/dist/types/__future__/Icon/constants.d.ts +5 -0
  165. package/dist/types/__future__/Icon/index.d.ts +1 -0
  166. package/dist/types/__future__/Icon/types.d.ts +4 -0
  167. package/dist/types/__future__/index.d.ts +1 -0
  168. package/package.json +34 -35
  169. package/src/Avatar/Avatar.module.scss +10 -12
  170. package/src/Avatar/Avatar.tsx +14 -5
  171. package/src/BrandMoment/_docs/BrandMoment.stories.tsx +6 -10
  172. package/src/BrandMoment/_docs/ExampleHeaders.tsx +2 -2
  173. package/src/Calendar/CalendarRange/CalendarRange.tsx +7 -3
  174. package/src/Calendar/CalendarSingle/CalendarSingle.tsx +7 -3
  175. package/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.tsx +7 -3
  176. package/src/Calendar/baseCalendarClassNames.module.scss +0 -4
  177. package/src/Checkbox/Checkbox/Checkbox.module.scss +2 -10
  178. package/src/Checkbox/Checkbox/Checkbox.tsx +6 -8
  179. package/src/ClearButton/ClearButton.tsx +2 -2
  180. package/src/Collapsible/Collapsible/Collapsible.tsx +5 -6
  181. package/src/Collapsible/Collapsible/_docs/Collapsible.stories.tsx +2 -2
  182. package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.module.scss +2 -7
  183. package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.tsx +2 -2
  184. package/src/DateRangePicker/DateRangePicker.tsx +2 -2
  185. package/src/EmptyState/_docs/EmptyState.stickersheet.stories.tsx +8 -2
  186. package/src/EmptyState/_docs/EmptyState.stories.tsx +4 -2
  187. package/src/ErrorPage/ErrorPage.tsx +5 -3
  188. package/src/FieldMessage/FieldMessage.tsx +6 -14
  189. package/src/Filter/FilterBar/FilterBar.spec.tsx +99 -12
  190. package/src/Filter/FilterBar/context/FilterBarContext.tsx +11 -2
  191. package/src/Filter/FilterBar/context/reducer/filterBarStateReducer.ts +7 -0
  192. package/src/Filter/FilterBar/context/reducer/setupFilterBarState.ts +1 -0
  193. package/src/Filter/FilterBar/context/types.ts +1 -0
  194. package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +14 -4
  195. package/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.tsx +10 -2
  196. package/src/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.tsx +18 -3
  197. package/src/Filter/FilterButton/FilterButton/FilterButton.module.scss +1 -1
  198. package/src/Filter/FilterButton/FilterButton/FilterButton.tsx +5 -6
  199. package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.tsx +2 -2
  200. package/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx +0 -1
  201. package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx +2 -1
  202. package/src/Filter/FilterMultiSelect/FilterMultiSelect.tsx +3 -1
  203. package/src/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.tsx +4 -1
  204. package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.tsx +2 -2
  205. package/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/SelectionControlButton.module.scss +9 -10
  206. package/src/Filter/FilterSelect/FilterSelect.spec.tsx +4 -5
  207. package/src/GuidanceBlock/GuidanceBlock.module.scss +4 -5
  208. package/src/GuidanceBlock/GuidanceBlock.tsx +6 -2
  209. package/src/Icon/_docs/{Icon.stories.tsx → Icon.docs.stories.tsx} +1 -1
  210. package/src/Icon/_docs/Icon.mdx +1 -2
  211. package/src/Icon/_docs/Icon.stickersheet.stories.tsx +1 -1
  212. package/src/Icon/bin/update-icons.sh +1 -1
  213. package/src/Illustration/utils/usePausePlay.tsx +7 -5
  214. package/src/Input/Input/_docs/Input.stickersheet.stories.tsx +7 -5
  215. package/src/Input/Input/_docs/Input.stories.tsx +5 -3
  216. package/src/Input/InputRange/InputRange.module.scss +4 -4
  217. package/src/Input/InputSearch/InputSearch.module.scss +21 -21
  218. package/src/Input/InputSearch/InputSearch.tsx +2 -2
  219. package/src/Label/Label.module.scss +4 -0
  220. package/src/LikertScaleLegacy/LikertScaleLegacy.module.scss +7 -8
  221. package/src/LikertScaleLegacy/LikertScaleLegacy.tsx +2 -2
  222. package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.stories.tsx +2 -2
  223. package/src/Loading/LoadingSpinner/LoadingSpinner.module.css +32 -0
  224. package/src/Loading/LoadingSpinner/LoadingSpinner.tsx +10 -54
  225. package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx +7 -2
  226. package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.stickersheet.stories.tsx +2 -1
  227. package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.stories.tsx +19 -0
  228. package/src/Loading/LoadingSpinner/subcomponents/SpinnerIcon.tsx +87 -0
  229. package/src/Loading/LoadingSpinner/subcomponents/index.ts +1 -0
  230. package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +2 -0
  231. package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +32 -35
  232. package/src/Modal/ContextModal/ContextModal.module.scss +4 -4
  233. package/src/Modal/GenericModal/GenericModal.module.scss +8 -8
  234. package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.module.scss +2 -2
  235. package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.tsx +2 -2
  236. package/src/Modal/InputEditModal/InputEditModal.module.scss +4 -4
  237. package/src/MultiSelect/MultiSelect.spec.tsx +7 -3
  238. package/src/MultiSelect/subcomponents/Checkbox/Checkbox.module.scss +0 -6
  239. package/src/MultiSelect/subcomponents/Checkbox/Checkbox.tsx +10 -9
  240. package/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.spec.tsx +11 -7
  241. package/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.tsx +5 -7
  242. package/src/Notification/subcomponents/CancelButton/CancelButton.tsx +2 -2
  243. package/src/Notification/subcomponents/GenericNotification/_mixins.scss +9 -8
  244. package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css +3 -0
  245. package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.tsx +22 -16
  246. package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.module.scss +0 -4
  247. package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.tsx +13 -12
  248. package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.module.scss +0 -1
  249. package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.tsx +2 -2
  250. package/src/Popover/Popover.module.scss +3 -3
  251. package/src/Popover/Popover.tsx +2 -2
  252. package/src/Popover/utils/classMappers.tsx +6 -11
  253. package/src/RichTextEditor/RichTextEditor/RichTextEditor.module.scss +2 -2
  254. package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.stickersheet.stories.tsx +7 -7
  255. package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.stories.tsx +2 -2
  256. package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.spec.tsx +7 -4
  257. package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.stories.tsx +18 -12
  258. package/src/RichTextEditor/RichTextEditor/utils/controlmap.tsx +25 -18
  259. package/src/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.tsx +4 -8
  260. package/src/Select/Select.module.scss +9 -7
  261. package/src/Select/Select.tsx +10 -7
  262. package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx +4 -5
  263. package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.tsx +2 -2
  264. package/src/Table/Table.module.scss +11 -7
  265. package/src/Table/Table.tsx +4 -8
  266. package/src/Table/_docs/Table.stickersheet.stories.tsx +4 -4
  267. package/src/Table/_docs/Table.stories.tsx +3 -3
  268. package/src/Tag/Tag.module.scss +2 -0
  269. package/src/Tag/Tag.tsx +7 -13
  270. package/src/Text/Text.module.scss +2 -0
  271. package/src/TextArea/TextArea.module.css +142 -0
  272. package/src/TextArea/TextArea.tsx +25 -53
  273. package/src/TextField/TextField.module.scss +10 -36
  274. package/src/TextField/TextField.spec.tsx +9 -4
  275. package/src/TextField/TextField.tsx +4 -6
  276. package/src/TextField/_docs/TextField.stickersheet.stories.tsx +9 -1
  277. package/src/TextField/_docs/TextField.stories.tsx +4 -3
  278. package/src/Tile/subcomponents/GenericTile/GenericTile.module.scss +7 -8
  279. package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +3 -3
  280. package/src/TitleBlockZen/TitleBlockZen.module.scss +15 -21
  281. package/src/TitleBlockZen/TitleBlockZen.spec.tsx +1 -1
  282. package/src/TitleBlockZen/TitleBlockZen.tsx +6 -9
  283. package/src/TitleBlockZen/_docs/TitleBlockZen.stories.tsx +5 -5
  284. package/src/TitleBlockZen/subcomponents/MainActions.tsx +5 -3
  285. package/src/TitleBlockZen/subcomponents/MobileActions.module.scss +2 -2
  286. package/src/TitleBlockZen/subcomponents/MobileActions.tsx +13 -16
  287. package/src/TitleBlockZen/subcomponents/SecondaryActions.tsx +3 -3
  288. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss +0 -3
  289. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.tsx +2 -2
  290. package/src/Workflow/_docs/Workflow.stories.tsx +4 -5
  291. package/src/Workflow/_docs/WorkflowHeader.stories.tsx +4 -5
  292. package/src/Workflow/_docs/controls/controls.tsx +4 -4
  293. package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.tsx +6 -31
  294. package/src/__actions__/Button/v1/Button/_docs/Button.mdx +1 -1
  295. package/src/__actions__/Button/v1/Button/_docs/Button.stickersheet.stories.tsx +6 -6
  296. package/src/__actions__/Button/v1/Button/_docs/Button.stories.tsx +7 -6
  297. package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stickersheet.stories.tsx +7 -7
  298. package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stories.tsx +5 -5
  299. package/src/__actions__/Button/v2/Button/_docs/Button.mdx +1 -1
  300. package/src/__actions__/Button/v2/Button/_docs/Button.stories.tsx +7 -6
  301. package/src/__actions__/Button/v2/IconButton/_docs/IconButton.stories.tsx +5 -5
  302. package/src/__actions__/Button/v3/_docs/ApiSpecification.mdx +1 -1
  303. package/src/__actions__/Button/v3/_docs/Button.docs.stories.tsx +1 -1
  304. package/src/__actions__/Button/v3/_docs/Button.mdx +1 -1
  305. package/src/__actions__/Button/v3/_docs/Button.spec.stories.tsx +1 -1
  306. package/src/__actions__/Button/v3/_docs/Button.stickersheet.stories.tsx +3 -3
  307. package/src/__actions__/Button/v3/_docs/Button.stories.tsx +1 -1
  308. package/src/__actions__/Menu/v1/_docs/Menu.stickersheet.stories.tsx +3 -3
  309. package/src/__actions__/Menu/v1/_docs/Menu.stories.tsx +3 -3
  310. package/src/__actions__/Menu/v1/_docs/MenuContentExample.tsx +6 -6
  311. package/src/__actions__/Menu/v1/_docs/examples.tsx +5 -5
  312. package/src/__actions__/Menu/v2/_docs/Menu.stories.tsx +3 -3
  313. package/src/__actions__/Menu/v3/_docs/ApiSpecification.mdx +1 -3
  314. package/src/__actions__/Menu/v3/_docs/Menu.docs.stories.tsx +46 -45
  315. package/src/__actions__/Menu/v3/_docs/Menu.mdx +1 -1
  316. package/src/__actions__/Menu/v3/_docs/Menu.spec.stories.tsx +21 -23
  317. package/src/__actions__/Menu/v3/_docs/Menu.stories.tsx +12 -15
  318. package/src/__future__/Icon/Icon.module.css +35 -0
  319. package/src/__future__/Icon/Icon.spec.tsx +36 -0
  320. package/src/__future__/Icon/Icon.tsx +85 -0
  321. package/src/__future__/Icon/_docs/Icon--api-specification.mdx +98 -0
  322. package/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx +145 -0
  323. package/src/__future__/Icon/_docs/Icon.docs.module.css +17 -0
  324. package/src/__future__/Icon/_docs/Icon.docs.stories.tsx +524 -0
  325. package/src/__future__/Icon/_docs/Icon.stickersheet.stories.tsx +126 -0
  326. package/src/__future__/Icon/_docs/assets/interface-dont.png +0 -0
  327. package/src/__future__/Icon/_docs/assets/tooltip-dont.png +0 -0
  328. package/src/__future__/Icon/constants.ts +149 -0
  329. package/src/__future__/Icon/index.ts +1 -0
  330. package/src/__future__/Icon/material-symbols-metadata.json +3370 -0
  331. package/src/__future__/Icon/types.ts +11 -0
  332. package/src/__future__/Select/subcomponents/ListBox/ListBox.tsx +4 -7
  333. package/src/__future__/Select/subcomponents/Option/Option.tsx +2 -2
  334. package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.module.scss +1 -1
  335. package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.tsx +6 -9
  336. package/src/__future__/Tag/RemovableTag/_docs/RemovableTag.stories.tsx +0 -77
  337. package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.module.scss +1 -58
  338. package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.tsx +2 -12
  339. package/src/__future__/Tag/Tag/Tag.module.scss +1 -1
  340. package/src/__future__/Tag/Tag/_docs/Tag-migration-guide.stories.tsx +6 -17
  341. package/src/__future__/Tag/Tag/_docs/Tag.stickersheet.stories.tsx +5 -2
  342. package/src/__future__/Tag/Tag/_docs/Tag.stories.tsx +13 -6
  343. package/src/__future__/index.ts +1 -0
  344. package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stickersheet.stories.tsx +10 -10
  345. package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stories.tsx +7 -4
  346. package/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx +4 -11
  347. package/src/__overlays__/Tooltip/v3/_docs/Tooltip.docs.stories.tsx +10 -10
  348. package/src/__overlays__/Tooltip/v3/_docs/Tooltip.spec.stories.tsx +3 -3
  349. package/codemods/utils/getTagName.spec.ts +0 -24
  350. package/codemods/utils/getTagName.ts +0 -32
  351. package/dist/cjs/Loading/LoadingSpinner/LoadingSpinner.module.scss.cjs +0 -7
  352. package/dist/cjs/TextArea/TextArea.module.scss.cjs +0 -13
  353. package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.cjs +0 -23
  354. package/dist/esm/Loading/LoadingSpinner/LoadingSpinner.module.scss.mjs +0 -5
  355. package/dist/esm/TextArea/TextArea.module.scss.mjs +0 -11
  356. package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.mjs +0 -15
  357. package/dist/types/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.d.ts +0 -2
  358. package/src/Loading/LoadingSpinner/LoadingSpinner.module.scss +0 -16
  359. package/src/TextArea/TextArea.module.scss +0 -137
  360. package/src/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.tsx +0 -21
@@ -28,9 +28,28 @@ export const ClassNameOverride: Story = {
28
28
  args: { classNameOverride: "text-green-400" },
29
29
  }
30
30
 
31
+ export const Colors: Story = {
32
+ render: args => (
33
+ <>
34
+ <LoadingSpinner {...args} classNameOverride="text-green-400" />
35
+ <LoadingSpinner {...args} classNameOverride="text-purple-800" />
36
+ <LoadingSpinner {...args} classNameOverride="text-blue-500" />
37
+ <LoadingSpinner {...args} classNameOverride="text-red-500" />
38
+ </>
39
+ ),
40
+ decorators: [
41
+ Story => (
42
+ <div className="flex gap-24">
43
+ <Story />
44
+ </div>
45
+ ),
46
+ ],
47
+ }
48
+
31
49
  export const Size: Story = {
32
50
  render: args => (
33
51
  <>
52
+ <LoadingSpinner {...args} size="xs" />
34
53
  <LoadingSpinner {...args} size="sm" />
35
54
  <LoadingSpinner {...args} size="md" />
36
55
  </>
@@ -0,0 +1,87 @@
1
+ import React from "react"
2
+ import styles from "../LoadingSpinner.module.css"
3
+
4
+ const SmallSpinnerIcon = (): JSX.Element => (
5
+ <svg
6
+ className={styles.spinner}
7
+ aria-hidden="true"
8
+ viewBox="0 0 24 24"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ >
12
+ <circle
13
+ cx="12"
14
+ cy="12"
15
+ r="9"
16
+ stroke="currentColor"
17
+ strokeWidth="2"
18
+ strokeOpacity="0.3"
19
+ />
20
+ <path
21
+ fillRule="evenodd"
22
+ clipRule="evenodd"
23
+ fill="currentColor"
24
+ d="M21.0564 13c.5076 0 .9377-.3851.9431-.8926.0004-.0358.0005-.0716.0005-.1074 0-5.52285-4.4771-10-10-10-.0359 0-.0718.00019-.1076.00057-.5076.00535-.8926.43552-.8926.94308v.11543C10.9998 3.59163 11.4675 4 12 4c4.4183 0 8 3.58172 8 8 0 .5324.4083 1 .9407 1h.1157z"
25
+ />
26
+ </svg>
27
+ )
28
+
29
+ const MediumSpinnerIcon = (): JSX.Element => (
30
+ <svg
31
+ className={styles.spinner}
32
+ aria-hidden="true"
33
+ viewBox="0 0 48 48"
34
+ fill="none"
35
+ xmlns="http://www.w3.org/2000/svg"
36
+ >
37
+ <circle
38
+ cx="24"
39
+ cy="24"
40
+ r="22.5"
41
+ stroke="currentColor"
42
+ strokeWidth="3"
43
+ strokeOpacity="0.3"
44
+ />
45
+ <path
46
+ fillRule="evenodd"
47
+ clipRule="evenodd"
48
+ fill="currentColor"
49
+ d="M46.5 24c.8284 0 1.5049-.6734 1.4539-1.5002C47.21 10.44 37.5601.789989 25.5003.0461639 24.6734-.004835 24 .671607 24 1.50003c0 .82843.6738 1.49444 1.5002 1.55277 10.4023.73424 18.7128 9.0447 19.447 19.447C45.0056 23.3262 45.6716 24 46.5 24z"
50
+ />
51
+ </svg>
52
+ )
53
+
54
+ const ExtraSmallSpinnerIcon = (): JSX.Element => (
55
+ <svg
56
+ className={styles.spinner}
57
+ viewBox="0 0 16 16"
58
+ fill="none"
59
+ xmlns="http://www.w3.org/2000/svg"
60
+ >
61
+ <circle
62
+ opacity="0.3"
63
+ cx="8"
64
+ cy="8"
65
+ r="6"
66
+ stroke="currentColor"
67
+ strokeWidth="2"
68
+ />
69
+ <path
70
+ d="M14 8C14 4.68629 11.3137 2 8 2"
71
+ stroke="currentColor"
72
+ strokeWidth="2"
73
+ strokeLinecap="round"
74
+ strokeLinejoin="round"
75
+ />
76
+ </svg>
77
+ )
78
+
79
+ type SpinnerIconProps = {
80
+ size: "xs" | "sm" | "md"
81
+ }
82
+
83
+ export const SpinnerIcon = ({ size }: SpinnerIconProps): JSX.Element => {
84
+ if (size === "xs") return <ExtraSmallSpinnerIcon />
85
+ if (size === "sm") return <SmallSpinnerIcon />
86
+ return <MediumSpinnerIcon />
87
+ }
@@ -0,0 +1 @@
1
+ export * from "./SpinnerIcon"
@@ -47,6 +47,8 @@
47
47
  }
48
48
 
49
49
  .spotIcon {
50
+ --icon-size: 30;
51
+
50
52
  width: 30px;
51
53
  height: 30px;
52
54
 
@@ -1,12 +1,6 @@
1
1
  import React, { HTMLAttributes } from "react"
2
2
  import classnames from "classnames"
3
3
  import { Heading } from "~components/Heading"
4
- import {
5
- CautionWhiteIcon,
6
- ExclamationWhiteIcon,
7
- InformationWhiteIcon,
8
- SuccessWhiteIcon,
9
- } from "~components/Icon"
10
4
  import {
11
5
  Assertive,
12
6
  Cautionary,
@@ -23,6 +17,7 @@ import {
23
17
  ModalBody,
24
18
  } from "~components/Modal/GenericModal"
25
19
  import { ButtonProps } from "~components/__actions__/v2"
20
+ import { Icon } from "~components/__future__/Icon"
26
21
  import styles from "./ConfirmationModal.module.scss"
27
22
 
28
23
  type Mood = "positive" | "informative" | "negative" | "cautionary" | "assertive"
@@ -77,46 +72,48 @@ type ConfirmationModalVariants = {
77
72
  export type ConfirmationModalProps = BaseConfirmationModalProps &
78
73
  (ConfirmationModalMoods | ConfirmationModalVariants)
79
74
 
80
- const getIcon = (
81
- variantName: Mood | Variant,
82
- isProminent: boolean
83
- ): JSX.Element => {
75
+ const getIconName = (variantName: Mood | Variant): string => {
84
76
  switch (variantName) {
85
77
  case "cautionary":
86
- return isProminent ? (
87
- <Cautionary />
88
- ) : (
89
- <CautionWhiteIcon inheritSize role="presentation" />
90
- )
78
+ return "warning"
91
79
  case "informative":
92
- return isProminent ? (
93
- <Informative />
94
- ) : (
95
- <InformationWhiteIcon inheritSize role="presentation" />
96
- )
80
+ return "info"
97
81
  case "negative":
98
82
  case "warning":
99
- return isProminent ? (
100
- <Negative />
101
- ) : (
102
- <ExclamationWhiteIcon inheritSize role="presentation" />
103
- )
83
+ return "error"
104
84
  case "positive":
105
85
  case "success":
106
- return isProminent ? (
107
- <Positive />
108
- ) : (
109
- <SuccessWhiteIcon inheritSize role="presentation" />
110
- )
86
+ return "check_circle"
111
87
  case "assertive":
112
- return isProminent ? (
113
- <Assertive />
114
- ) : (
115
- <ExclamationWhiteIcon inheritSize role="presentation" />
116
- )
88
+ return "error"
117
89
  }
118
90
  }
119
91
 
92
+ const getIcon = (
93
+ variantName: Mood | Variant,
94
+ isProminent: boolean
95
+ ): JSX.Element => {
96
+ if (isProminent) {
97
+ switch (variantName) {
98
+ case "cautionary":
99
+ return <Cautionary />
100
+ case "informative":
101
+ return <Informative />
102
+ case "negative":
103
+ case "warning":
104
+ return <Negative />
105
+ case "positive":
106
+ case "success":
107
+ return <Positive />
108
+ case "assertive":
109
+ return <Assertive />
110
+ }
111
+ }
112
+
113
+ const iconName = getIconName(variantName)
114
+ return <Icon name={iconName} isPresentational isFilled />
115
+ }
116
+
120
117
  /**
121
118
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082093114/Modal Guidance} |
122
119
  * {@link https://cultureamp.design/?path=/docs/components-modals-confirmationmodal--docs Storybook}
@@ -14,19 +14,19 @@
14
14
  }
15
15
 
16
16
  .animatingEnter & {
17
- @include ca-animation(fade($from: 0, $to: 1), zoom($from: 0.5, $to: 1));
18
-
19
17
  animation-duration: $ca-duration-fast;
20
18
  animation-fill-mode: forwards;
21
19
  animation-timing-function: $ca-bounce-in;
20
+
21
+ @include ca-animation(fade($from: 0, $to: 1), zoom($from: 0.5, $to: 1));
22
22
  }
23
23
 
24
24
  .animatingLeave & {
25
- @include ca-animation(fade($from: 1, $to: 0), zoom($from: 1, $to: 0.5));
26
-
27
25
  animation-duration: $ca-duration-rapid;
28
26
  animation-fill-mode: forwards;
29
27
  animation-timing-function: $ca-bounce-out;
28
+
29
+ @include ca-animation(fade($from: 1, $to: 0), zoom($from: 1, $to: 0.5));
30
30
  }
31
31
  }
32
32
 
@@ -14,22 +14,22 @@
14
14
  }
15
15
 
16
16
  .backdropLayer {
17
- @include ca-position($start: 0, $end: 0, $top: 0, $bottom: 0);
18
-
19
17
  position: fixed;
20
18
  background-color: #000;
21
19
  opacity: 50%;
22
20
  z-index: $ca-z-index-modal-backdrop;
23
- }
24
21
 
25
- .scrollLayer {
26
22
  @include ca-position($start: 0, $end: 0, $top: 0, $bottom: 0);
23
+ }
27
24
 
25
+ .scrollLayer {
28
26
  position: fixed;
29
27
  display: flex;
30
28
  align-items: center;
31
29
  z-index: $ca-z-index-modal;
32
30
  overflow-y: auto;
31
+
32
+ @include ca-position($start: 0, $end: 0, $top: 0, $bottom: 0);
33
33
  }
34
34
 
35
35
  .modalLayer {
@@ -84,11 +84,11 @@
84
84
  }
85
85
 
86
86
  [data-modal] {
87
- @include ca-animation(fade($from: 0, $to: 1), zoom($from: 0.5, $to: 1));
88
-
89
87
  animation-duration: $ca-duration-fast;
90
88
  animation-fill-mode: forwards;
91
89
  animation-timing-function: $ca-bounce-in;
90
+
91
+ @include ca-animation(fade($from: 0, $to: 1), zoom($from: 0.5, $to: 1));
92
92
  }
93
93
  }
94
94
 
@@ -104,11 +104,11 @@
104
104
  }
105
105
 
106
106
  [data-modal] {
107
- @include ca-animation(fade($from: 1, $to: 0), zoom($from: 1, $to: 0.5));
108
-
109
107
  animation-duration: $ca-duration-rapid;
110
108
  animation-fill-mode: forwards;
111
109
  animation-timing-function: $ca-bounce-out;
110
+
111
+ @include ca-animation(fade($from: 1, $to: 0), zoom($from: 1, $to: 0.5));
112
112
  }
113
113
  }
114
114
 
@@ -3,10 +3,10 @@
3
3
  @import "../../../../../styles/utils/layers";
4
4
 
5
5
  .dismissButton {
6
- @include ca-position($end: 0, $top: 0);
7
-
8
6
  position: absolute;
9
7
  z-index: $ca-z-index-popover;
8
+
9
+ @include ca-position($end: 0, $top: 0);
10
10
  }
11
11
 
12
12
  .layout {
@@ -1,6 +1,6 @@
1
1
  import React from "react"
2
- import { CloseIcon } from "~components/Icon"
3
2
  import { IconButton } from "~components/__actions__/v2"
3
+ import { Icon } from "~components/__future__/Icon"
4
4
  import { ModalBody } from "../ModalBody"
5
5
  import styles from "./ModalHeader.module.scss"
6
6
 
@@ -20,7 +20,7 @@ export const ModalHeader = ({
20
20
  <div className={styles.dismissButton}>
21
21
  <IconButton
22
22
  label="Dismiss"
23
- icon={<CloseIcon role="presentation" />}
23
+ icon={<Icon name="close" isPresentational />}
24
24
  reversed={reversed}
25
25
  onClick={onDismiss}
26
26
  disabled={onDismiss == undefined}
@@ -10,19 +10,19 @@
10
10
  max-width: 600px;
11
11
 
12
12
  .animatingEnter & {
13
- @include ca-animation(fade($from: 0, $to: 1), zoom($from: 0.5, $to: 1));
14
-
15
13
  animation-duration: $ca-duration-fast;
16
14
  animation-fill-mode: forwards;
17
15
  animation-timing-function: $ca-bounce-in;
16
+
17
+ @include ca-animation(fade($from: 0, $to: 1), zoom($from: 0.5, $to: 1));
18
18
  }
19
19
 
20
20
  .animatingLeave & {
21
- @include ca-animation(fade($from: 1, $to: 0), zoom($from: 1, $to: 0.5));
22
-
23
21
  animation-duration: $ca-duration-rapid;
24
22
  animation-fill-mode: forwards;
25
23
  animation-timing-function: $ca-bounce-out;
24
+
25
+ @include ca-animation(fade($from: 1, $to: 0), zoom($from: 1, $to: 0.5));
26
26
  }
27
27
  }
28
28
 
@@ -350,6 +350,7 @@ describe("Has validation status", () => {
350
350
  )
351
351
  expect(screen.getByText("No waffles are available")).toBeInTheDocument()
352
352
  })
353
+
353
354
  it("describes the Toggle", () => {
354
355
  render(
355
356
  <MultiSelectWrapper
@@ -364,13 +365,16 @@ describe("Has validation status", () => {
364
365
  expect(
365
366
  screen.getByRole("button", {
366
367
  name: "Breakfast menu",
367
- description: "Only four waffles remain",
368
+ // React Testing Library bug: Icon should be showing aria-label "caution message" instead
369
+ description: "warning Only four waffles remain",
368
370
  })
369
371
  ).toBeInTheDocument()
370
372
  })
373
+
371
374
  it("announces the validation message before the Toggle's description", () => {
372
- const description = "Choose you breakfast."
373
- const validationMessage = "Only four waffles remain."
375
+ const description = "Choose your breakfast."
376
+ // React Testing Library bug: Icon should be showing aria-label "caution message" instead
377
+ const validationMessage = "warning Only four waffles remain."
374
378
 
375
379
  render(
376
380
  <MultiSelectWrapper
@@ -68,11 +68,5 @@ $focus-ring-size: calc(#{$checkbox-size} + #{$focus-ring-offset});
68
68
  }
69
69
 
70
70
  .icon {
71
- height: $checkbox-size;
72
- width: $checkbox-size;
73
- position: absolute;
74
- top: 50%;
75
- left: 50%;
76
- transform: translate(-50%, -50%);
77
71
  color: $color-white;
78
72
  }
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef, InputHTMLAttributes } from "react"
2
2
  import classnames from "classnames"
3
- import { CheckIcon, MinusIcon } from "~components/Icon"
3
+ import { Icon } from "~components/__future__/Icon"
4
4
  import { OverrideClassName } from "~components/types/OverrideClassName"
5
5
  import styles from "./Checkbox.module.scss"
6
6
 
@@ -25,14 +25,15 @@ export type CheckboxProps = {
25
25
  >
26
26
 
27
27
  const renderIcon = (status: CheckedStatus): JSX.Element | null => {
28
- switch (status) {
29
- case "indeterminate":
30
- return <MinusIcon role="presentation" classNameOverride={styles.icon} />
31
- case "checked":
32
- return <CheckIcon role="presentation" classNameOverride={styles.icon} />
33
- default:
34
- return null
35
- }
28
+ if (status === "unchecked") return null
29
+
30
+ return (
31
+ <Icon
32
+ name={status === "checked" ? "check" : "remove"}
33
+ isPresentational
34
+ className={styles.icon}
35
+ />
36
+ )
36
37
  }
37
38
 
38
39
  export const Checkbox = ({
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from "react"
2
- import { render, waitFor } from "@testing-library/react"
2
+ import { render, waitFor, screen } from "@testing-library/react"
3
3
  import userEvent from "@testing-library/user-event"
4
4
  import { vi } from "vitest"
5
5
  import {
@@ -83,10 +83,10 @@ describe("<MultiSelectOptions />", () => {
83
83
  })
84
84
 
85
85
  it("returns updated selected values when selecting an option", async () => {
86
- const { getByRole, queryAllByRole } = render(
86
+ const { getByRole } = render(
87
87
  <MultiSelectOptionsWrapper selectedValues={new Set(["pancakes"])} />
88
88
  )
89
- expect(queryAllByRole("presentation", { hidden: true }).length).toBe(1)
89
+ expect(screen.getAllByRole("checkbox", { checked: true }).length).toBe(1)
90
90
 
91
91
  const waffleOption = getByRole("checkbox", { name: "Waffle" })
92
92
  expect(waffleOption).not.toBeChecked()
@@ -96,17 +96,19 @@ describe("<MultiSelectOptions />", () => {
96
96
  await waitFor(() => {
97
97
  expect(onChange).toBeCalledWith(new Set(["pancakes", "waffle"]))
98
98
  expect(waffleOption).toBeChecked()
99
- expect(queryAllByRole("presentation", { hidden: true }).length).toBe(2)
99
+ expect(screen.getAllByRole("checkbox", { checked: true }).length).toBe(
100
+ 2
101
+ )
100
102
  })
101
103
  })
102
104
 
103
105
  it("returns updated selected values when unselecting an option", async () => {
104
- const { getByRole, queryAllByRole } = render(
106
+ const { getByRole } = render(
105
107
  <MultiSelectOptionsWrapper
106
108
  selectedValues={new Set(["pancakes", "waffle"])}
107
109
  />
108
110
  )
109
- expect(queryAllByRole("presentation", { hidden: true }).length).toBe(2)
111
+ expect(screen.getAllByRole("checkbox", { checked: true }).length).toBe(2)
110
112
 
111
113
  const waffleOption = getByRole("checkbox", { name: "Waffle" })
112
114
  expect(waffleOption).toBeChecked()
@@ -116,7 +118,9 @@ describe("<MultiSelectOptions />", () => {
116
118
  await waitFor(() => {
117
119
  expect(onChange).toBeCalledWith(new Set(["pancakes"]))
118
120
  expect(waffleOption).not.toBeChecked()
119
- expect(queryAllByRole("presentation", { hidden: true }).length).toBe(1)
121
+ expect(screen.getAllByRole("checkbox", { checked: true }).length).toBe(
122
+ 1
123
+ )
120
124
  })
121
125
  })
122
126
  })
@@ -2,8 +2,7 @@ import React, { HTMLAttributes, forwardRef, useId } from "react"
2
2
  import classnames from "classnames"
3
3
  import { ClearButton } from "~components/ClearButton"
4
4
  import { FieldMessageProps } from "~components/FieldMessage"
5
- import { ChevronDownIcon, ChevronUpIcon } from "~components/Icon"
6
- import { RemovableTag } from "~components/__future__"
5
+ import { Icon, RemovableTag } from "~components/__future__"
7
6
  import { OverrideClassName } from "~components/types/OverrideClassName"
8
7
  import { MultiSelectOption } from "../../types"
9
8
  import styles from "./MultiSelectToggle.module.scss"
@@ -70,11 +69,10 @@ export const MultiSelectToggle = forwardRef<
70
69
  onClick(e)
71
70
  }}
72
71
  >
73
- {isOpen ? (
74
- <ChevronUpIcon role="presentation" />
75
- ) : (
76
- <ChevronDownIcon role="presentation" />
77
- )}
72
+ <Icon
73
+ name={isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down"}
74
+ isPresentational
75
+ />
78
76
  </button>
79
77
 
80
78
  <div
@@ -1,5 +1,5 @@
1
1
  import React from "react"
2
- import { CloseIcon } from "~components/Icon/CloseIcon"
2
+ import { Icon } from "~components/__future__/Icon"
3
3
  import styles from "../GenericNotification/GenericNotification.module.scss"
4
4
 
5
5
  type CancelButtonProps = {
@@ -14,7 +14,7 @@ export const CancelButton = ({ onClick }: CancelButtonProps): JSX.Element => (
14
14
  data-testid="close-button"
15
15
  aria-label="Close notification"
16
16
  >
17
- <CloseIcon role="presentation" />
17
+ <Icon name="close" isPresentational />
18
18
  </button>
19
19
  )
20
20
 
@@ -165,12 +165,14 @@ $notification-slide-right: transform 300ms ease-out;
165
165
  %ca-notification---toast & {
166
166
  width: 22px;
167
167
  height: 22px;
168
+ font-size: 22px;
168
169
  margin-top: $spacing-6;
169
170
  }
170
171
 
171
172
  %ca-notification---global & {
172
173
  width: 24px;
173
174
  height: 24px;
175
+ font-size: 24px;
174
176
  }
175
177
  }
176
178
 
@@ -280,13 +282,16 @@ $notification-slide-right: transform 300ms ease-out;
280
282
  }
281
283
 
282
284
  %ca-notification__cancel {
285
+ cursor: pointer;
283
286
  appearance: none;
284
- background: transparent;
285
- border: none;
286
- font: inherit;
287
+ transition: none;
288
+ transform: none;
287
289
  margin: 0;
288
290
  padding: 0;
289
- transition: none;
291
+ border: none;
292
+ background: transparent;
293
+ font: inherit;
294
+ color: $color-purple-800;
290
295
 
291
296
  .icon {
292
297
  opacity: 70%;
@@ -317,10 +322,6 @@ $notification-slide-right: transform 300ms ease-out;
317
322
  }
318
323
  }
319
324
 
320
- cursor: pointer;
321
- color: $color-purple-800;
322
- transform: none;
323
-
324
325
  &:active {
325
326
  transform: translateY(1px);
326
327
  }
@@ -0,0 +1,3 @@
1
+ .notificationIcon {
2
+ font-size: inherit;
3
+ }
@@ -1,13 +1,19 @@
1
1
  import React from "react"
2
- import { CautionIcon } from "~components/Icon/CautionIcon"
3
- import { ExclamationIcon } from "~components/Icon/ExclamationIcon"
4
- import { InformationIcon } from "~components/Icon/InformationIcon"
5
- import { SecurityTipIcon } from "~components/Icon/SecurityTipIcon"
6
- import { SuccessIcon } from "~components/Icon/SuccessIcon"
7
2
  import {
8
3
  NotificationType,
9
4
  NotificationVariant,
10
5
  } from "~components/Notification/types"
6
+ import { Icon } from "~components/__future__"
7
+ import styles from "./NotificationIcon.module.css"
8
+
9
+ const NotificationIcon = ({ name }: { name: string }): JSX.Element => (
10
+ <Icon
11
+ name={name}
12
+ isFilled
13
+ isPresentational
14
+ className={styles.notificationIcon}
15
+ />
16
+ )
11
17
 
12
18
  export type NotificationIconTypeProps = {
13
19
  type: NotificationType
@@ -18,17 +24,17 @@ export const NotificationIconType = ({
18
24
  }: NotificationIconTypeProps): JSX.Element => {
19
25
  switch (type) {
20
26
  case "positive":
21
- return <SuccessIcon role="presentation" inheritSize />
27
+ return <NotificationIcon name="check_circle" />
22
28
  case "negative":
23
- return <ExclamationIcon role="presentation" inheritSize />
29
+ return <NotificationIcon name="error" />
24
30
  case "cautionary":
25
- return <CautionIcon role="presentation" inheritSize />
31
+ return <NotificationIcon name="warning" />
26
32
  case "informative":
27
- return <InformationIcon role="presentation" inheritSize />
33
+ return <NotificationIcon name="info" />
28
34
  case "security":
29
- return <SecurityTipIcon role="presentation" inheritSize />
35
+ return <NotificationIcon name="privacy_tip" />
30
36
  default:
31
- return <InformationIcon role="presentation" inheritSize />
37
+ return <NotificationIcon name="info" />
32
38
  }
33
39
  }
34
40
 
@@ -43,15 +49,15 @@ export const NotificationIconVariant = ({
43
49
  }: NotificationIconVariantProps): JSX.Element => {
44
50
  switch (variant) {
45
51
  case "success":
46
- return <SuccessIcon role="presentation" inheritSize />
52
+ return <NotificationIcon name="check_circle" />
47
53
  case "warning":
48
- return <ExclamationIcon role="presentation" inheritSize />
54
+ return <NotificationIcon name="error" />
49
55
  case "cautionary":
50
- return <CautionIcon role="presentation" inheritSize />
56
+ return <NotificationIcon name="warning" />
51
57
  case "informative":
52
- return <InformationIcon role="presentation" inheritSize />
58
+ return <NotificationIcon name="info" />
53
59
  case "security":
54
- return <SecurityTipIcon role="presentation" inheritSize />
60
+ return <NotificationIcon name="privacy_tip" />
55
61
  }
56
62
  }
57
63
 
@@ -4,10 +4,6 @@
4
4
  @import "../../../__actions__/Button/v1/utils/variables";
5
5
 
6
6
  %directional-link {
7
- [dir="rtl"] & {
8
- transform: rotate(180deg);
9
- }
10
-
11
7
  border: $border-solid-border-width solid $color-blue-300;
12
8
 
13
9
  @include enabled-pseudo-states-variant($color-blue-100, $color-blue-400);