@kaizen/components 1.66.1 → 1.67.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 (282) hide show
  1. package/codemods/README.md +5 -0
  2. package/codemods/upgradeIconV1/getNewIconPropsFromOldIconName.ts +255 -0
  3. package/codemods/upgradeIconV1/index.ts +33 -0
  4. package/codemods/upgradeIconV1/transformCaMonogramIconToBrand.spec.ts +83 -0
  5. package/codemods/upgradeIconV1/transformCaMonogramIconToBrand.ts +53 -0
  6. package/codemods/upgradeIconV1/transformIcon.spec.ts +181 -0
  7. package/codemods/upgradeIconV1/transformIcon.ts +115 -0
  8. package/codemods/upgradeIconV1/transformSpinnerIconToLoadingSpinner.spec.ts +81 -0
  9. package/codemods/upgradeIconV1/transformSpinnerIconToLoadingSpinner.ts +41 -0
  10. package/codemods/upgradeIconV1/upgradeIconV1.spec.ts +306 -0
  11. package/codemods/upgradeIconV1/upgradeIconV1.ts +94 -0
  12. package/codemods/utils/createProp.spec.ts +83 -0
  13. package/codemods/utils/createProp.ts +51 -0
  14. package/codemods/utils/getKaioTagName.spec.ts +85 -0
  15. package/codemods/utils/getKaioTagName.ts +129 -0
  16. package/codemods/utils/index.ts +3 -1
  17. package/codemods/utils/transformComponentsInDir.ts +32 -16
  18. package/codemods/utils/transformSource.ts +10 -5
  19. package/codemods/utils/updateJsxElementWithNewProps.ts +4 -3
  20. package/codemods/utils/updateKaioImports.spec.ts +223 -0
  21. package/codemods/utils/updateKaioImports.ts +233 -0
  22. package/dist/cjs/Avatar/Avatar.cjs +16 -13
  23. package/dist/cjs/Calendar/CalendarRange/CalendarRange.cjs +9 -7
  24. package/dist/cjs/Calendar/CalendarSingle/CalendarSingle.cjs +9 -7
  25. package/dist/cjs/Calendar/LegacyCalendarRange/LegacyCalendarRange.cjs +9 -7
  26. package/dist/cjs/Checkbox/Checkbox/Checkbox.cjs +5 -11
  27. package/dist/cjs/ClearButton/ClearButton.cjs +5 -4
  28. package/dist/cjs/Collapsible/Collapsible/Collapsible.cjs +4 -7
  29. package/dist/cjs/DateInput/DateInputWithIconButton/DateInputWithIconButton.cjs +5 -4
  30. package/dist/cjs/DateRangePicker/DateRangePicker.cjs +5 -4
  31. package/dist/cjs/ErrorPage/ErrorPage.cjs +9 -7
  32. package/dist/cjs/FieldMessage/FieldMessage.cjs +5 -11
  33. package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +4 -5
  34. package/dist/cjs/Filter/FilterButton/FilterButton/FilterButton.cjs +4 -7
  35. package/dist/cjs/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.cjs +5 -5
  36. package/dist/cjs/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.cjs +4 -4
  37. package/dist/cjs/GuidanceBlock/GuidanceBlock.cjs +5 -4
  38. package/dist/cjs/Illustration/utils/usePausePlay.cjs +5 -8
  39. package/dist/cjs/Input/InputSearch/InputSearch.cjs +4 -3
  40. package/dist/cjs/LikertScaleLegacy/LikertScaleLegacy.cjs +5 -6
  41. package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.cjs +31 -26
  42. package/dist/cjs/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.cjs +4 -5
  43. package/dist/cjs/MultiSelect/subcomponents/Checkbox/Checkbox.cjs +7 -17
  44. package/dist/cjs/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.cjs +4 -7
  45. package/dist/cjs/Notification/subcomponents/CancelButton/CancelButton.cjs +4 -3
  46. package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.cjs +33 -38
  47. package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css.cjs +6 -0
  48. package/dist/cjs/Pagination/subcomponents/DirectionalLink/DirectionalLink.cjs +11 -19
  49. package/dist/cjs/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.cjs +4 -5
  50. package/dist/cjs/Popover/Popover.cjs +5 -4
  51. package/dist/cjs/Popover/utils/classMappers.cjs +21 -16
  52. package/dist/cjs/RichTextEditor/RichTextEditor/utils/controlmap.cjs +29 -25
  53. package/dist/cjs/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.cjs +10 -12
  54. package/dist/cjs/Select/Select.cjs +8 -10
  55. package/dist/cjs/SplitButton/subcomponents/DropdownButton/DropdownButton.cjs +4 -4
  56. package/dist/cjs/Table/Table.cjs +11 -10
  57. package/dist/cjs/Tag/Tag.cjs +21 -17
  58. package/dist/cjs/TextField/TextField.cjs +5 -4
  59. package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.cjs +8 -7
  60. package/dist/cjs/TitleBlockZen/TitleBlockZen.cjs +9 -12
  61. package/dist/cjs/TitleBlockZen/subcomponents/MainActions.cjs +7 -7
  62. package/dist/cjs/TitleBlockZen/subcomponents/MobileActions.cjs +10 -15
  63. package/dist/cjs/TitleBlockZen/subcomponents/SecondaryActions.cjs +7 -7
  64. package/dist/cjs/ToggleSwitch/ToggleSwitch/ToggleSwitch.cjs +5 -5
  65. package/dist/cjs/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.cjs +13 -18
  66. package/dist/cjs/__future__/Icon/Icon.cjs +47 -0
  67. package/dist/cjs/__future__/Icon/Icon.module.css.cjs +10 -0
  68. package/dist/cjs/__future__/Icon/constants.cjs +8 -0
  69. package/dist/cjs/__future__/Select/subcomponents/Option/Option.cjs +4 -5
  70. package/dist/cjs/__future__/Select/subcomponents/SelectToggle/SelectToggle.cjs +5 -9
  71. package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveButton.cjs +4 -3
  72. package/dist/cjs/future.cjs +2 -0
  73. package/dist/esm/Avatar/Avatar.mjs +16 -13
  74. package/dist/esm/Calendar/CalendarRange/CalendarRange.mjs +9 -7
  75. package/dist/esm/Calendar/CalendarSingle/CalendarSingle.mjs +9 -7
  76. package/dist/esm/Calendar/LegacyCalendarRange/LegacyCalendarRange.mjs +9 -7
  77. package/dist/esm/Checkbox/Checkbox/Checkbox.mjs +5 -11
  78. package/dist/esm/ClearButton/ClearButton.mjs +5 -4
  79. package/dist/esm/Collapsible/Collapsible/Collapsible.mjs +5 -8
  80. package/dist/esm/DateInput/DateInputWithIconButton/DateInputWithIconButton.mjs +5 -4
  81. package/dist/esm/DateRangePicker/DateRangePicker.mjs +5 -4
  82. package/dist/esm/ErrorPage/ErrorPage.mjs +10 -8
  83. package/dist/esm/FieldMessage/FieldMessage.mjs +6 -12
  84. package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +4 -5
  85. package/dist/esm/Filter/FilterButton/FilterButton/FilterButton.mjs +5 -8
  86. package/dist/esm/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.mjs +5 -5
  87. package/dist/esm/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.mjs +4 -4
  88. package/dist/esm/GuidanceBlock/GuidanceBlock.mjs +5 -4
  89. package/dist/esm/Illustration/utils/usePausePlay.mjs +5 -8
  90. package/dist/esm/Input/InputSearch/InputSearch.mjs +4 -3
  91. package/dist/esm/LikertScaleLegacy/LikertScaleLegacy.mjs +5 -6
  92. package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.mjs +31 -26
  93. package/dist/esm/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.mjs +4 -5
  94. package/dist/esm/MultiSelect/subcomponents/Checkbox/Checkbox.mjs +7 -17
  95. package/dist/esm/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.mjs +5 -8
  96. package/dist/esm/Notification/subcomponents/CancelButton/CancelButton.mjs +4 -3
  97. package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.mjs +33 -38
  98. package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css.mjs +4 -0
  99. package/dist/esm/Pagination/subcomponents/DirectionalLink/DirectionalLink.mjs +11 -19
  100. package/dist/esm/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.mjs +4 -5
  101. package/dist/esm/Popover/Popover.mjs +5 -4
  102. package/dist/esm/Popover/utils/classMappers.mjs +21 -16
  103. package/dist/esm/RichTextEditor/RichTextEditor/utils/controlmap.mjs +33 -29
  104. package/dist/esm/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.mjs +10 -12
  105. package/dist/esm/Select/Select.mjs +9 -11
  106. package/dist/esm/SplitButton/subcomponents/DropdownButton/DropdownButton.mjs +4 -4
  107. package/dist/esm/Table/Table.mjs +11 -10
  108. package/dist/esm/Tag/Tag.mjs +21 -17
  109. package/dist/esm/TextField/TextField.mjs +5 -4
  110. package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.mjs +8 -7
  111. package/dist/esm/TitleBlockZen/TitleBlockZen.mjs +9 -12
  112. package/dist/esm/TitleBlockZen/subcomponents/MainActions.mjs +7 -7
  113. package/dist/esm/TitleBlockZen/subcomponents/MobileActions.mjs +13 -18
  114. package/dist/esm/TitleBlockZen/subcomponents/SecondaryActions.mjs +7 -7
  115. package/dist/esm/ToggleSwitch/ToggleSwitch/ToggleSwitch.mjs +5 -5
  116. package/dist/esm/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +16 -21
  117. package/dist/esm/__future__/Icon/Icon.mjs +38 -0
  118. package/dist/esm/__future__/Icon/Icon.module.css.mjs +8 -0
  119. package/dist/esm/__future__/Icon/constants.mjs +6 -0
  120. package/dist/esm/__future__/Select/subcomponents/Option/Option.mjs +4 -5
  121. package/dist/esm/__future__/Select/subcomponents/SelectToggle/SelectToggle.mjs +6 -10
  122. package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveButton.mjs +4 -3
  123. package/dist/esm/future.mjs +1 -0
  124. package/dist/styles.css +555 -531
  125. package/dist/types/__future__/Icon/Icon.d.ts +21 -0
  126. package/dist/types/__future__/Icon/constants.d.ts +5 -0
  127. package/dist/types/__future__/Icon/index.d.ts +1 -0
  128. package/dist/types/__future__/Icon/types.d.ts +4 -0
  129. package/dist/types/__future__/index.d.ts +1 -0
  130. package/package.json +21 -21
  131. package/src/Avatar/Avatar.module.scss +6 -8
  132. package/src/Avatar/Avatar.tsx +14 -5
  133. package/src/BrandMoment/_docs/BrandMoment.stories.tsx +6 -10
  134. package/src/BrandMoment/_docs/ExampleHeaders.tsx +2 -2
  135. package/src/Calendar/CalendarRange/CalendarRange.tsx +7 -3
  136. package/src/Calendar/CalendarSingle/CalendarSingle.tsx +7 -3
  137. package/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.tsx +7 -3
  138. package/src/Calendar/baseCalendarClassNames.module.scss +0 -4
  139. package/src/Checkbox/Checkbox/Checkbox.module.scss +0 -8
  140. package/src/Checkbox/Checkbox/Checkbox.tsx +6 -8
  141. package/src/ClearButton/ClearButton.tsx +2 -2
  142. package/src/Collapsible/Collapsible/Collapsible.tsx +5 -6
  143. package/src/Collapsible/Collapsible/_docs/Collapsible.stories.tsx +2 -2
  144. package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.module.scss +2 -7
  145. package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.tsx +2 -2
  146. package/src/DateRangePicker/DateRangePicker.tsx +2 -2
  147. package/src/EmptyState/_docs/EmptyState.stickersheet.stories.tsx +8 -2
  148. package/src/EmptyState/_docs/EmptyState.stories.tsx +4 -2
  149. package/src/ErrorPage/ErrorPage.tsx +5 -3
  150. package/src/FieldMessage/FieldMessage.tsx +6 -14
  151. package/src/Filter/FilterBar/FilterBar.spec.tsx +12 -12
  152. package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +2 -2
  153. package/src/Filter/FilterButton/FilterButton/FilterButton.module.scss +1 -1
  154. package/src/Filter/FilterButton/FilterButton/FilterButton.tsx +5 -6
  155. package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.tsx +2 -2
  156. package/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx +0 -1
  157. package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx +2 -1
  158. package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.tsx +2 -2
  159. package/src/Filter/FilterSelect/FilterSelect.spec.tsx +4 -5
  160. package/src/GuidanceBlock/GuidanceBlock.tsx +6 -2
  161. package/src/Icon/_docs/{Icon.stories.tsx → Icon.docs.stories.tsx} +1 -1
  162. package/src/Icon/_docs/Icon.mdx +1 -2
  163. package/src/Icon/_docs/Icon.stickersheet.stories.tsx +1 -1
  164. package/src/Illustration/utils/usePausePlay.tsx +7 -5
  165. package/src/Input/Input/_docs/Input.stickersheet.stories.tsx +7 -5
  166. package/src/Input/Input/_docs/Input.stories.tsx +5 -3
  167. package/src/Input/InputSearch/InputSearch.tsx +2 -2
  168. package/src/Label/Label.module.scss +4 -0
  169. package/src/LikertScaleLegacy/LikertScaleLegacy.tsx +2 -2
  170. package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.stories.tsx +2 -2
  171. package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +2 -0
  172. package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +32 -35
  173. package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.tsx +2 -2
  174. package/src/MultiSelect/MultiSelect.spec.tsx +7 -3
  175. package/src/MultiSelect/subcomponents/Checkbox/Checkbox.module.scss +0 -6
  176. package/src/MultiSelect/subcomponents/Checkbox/Checkbox.tsx +10 -9
  177. package/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.spec.tsx +11 -7
  178. package/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.tsx +5 -7
  179. package/src/Notification/subcomponents/CancelButton/CancelButton.tsx +2 -2
  180. package/src/Notification/subcomponents/GenericNotification/_mixins.scss +2 -0
  181. package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css +3 -0
  182. package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.tsx +22 -16
  183. package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.module.scss +0 -4
  184. package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.tsx +13 -12
  185. package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.module.scss +0 -1
  186. package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.tsx +2 -2
  187. package/src/Popover/Popover.module.scss +3 -3
  188. package/src/Popover/Popover.tsx +2 -2
  189. package/src/Popover/utils/classMappers.tsx +6 -11
  190. package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.stickersheet.stories.tsx +7 -7
  191. package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.stories.tsx +2 -2
  192. package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.spec.tsx +7 -4
  193. package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.stories.tsx +18 -12
  194. package/src/RichTextEditor/RichTextEditor/utils/controlmap.tsx +25 -18
  195. package/src/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.tsx +4 -8
  196. package/src/Select/Select.module.scss +2 -0
  197. package/src/Select/Select.tsx +10 -7
  198. package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx +4 -5
  199. package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.tsx +2 -2
  200. package/src/Table/Table.tsx +4 -8
  201. package/src/Table/_docs/Table.stickersheet.stories.tsx +4 -4
  202. package/src/Table/_docs/Table.stories.tsx +3 -3
  203. package/src/Tag/Tag.module.scss +2 -0
  204. package/src/Tag/Tag.tsx +7 -13
  205. package/src/Text/Text.module.scss +2 -0
  206. package/src/TextField/TextField.spec.tsx +9 -4
  207. package/src/TextField/TextField.tsx +2 -2
  208. package/src/TextField/_docs/TextField.stories.tsx +4 -3
  209. package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +3 -3
  210. package/src/TitleBlockZen/TitleBlockZen.module.scss +1 -0
  211. package/src/TitleBlockZen/TitleBlockZen.spec.tsx +1 -1
  212. package/src/TitleBlockZen/TitleBlockZen.tsx +6 -9
  213. package/src/TitleBlockZen/_docs/TitleBlockZen.stories.tsx +5 -5
  214. package/src/TitleBlockZen/subcomponents/MainActions.tsx +5 -3
  215. package/src/TitleBlockZen/subcomponents/MobileActions.tsx +13 -16
  216. package/src/TitleBlockZen/subcomponents/SecondaryActions.tsx +3 -3
  217. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss +0 -3
  218. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.tsx +2 -2
  219. package/src/Workflow/_docs/Workflow.stories.tsx +4 -5
  220. package/src/Workflow/_docs/WorkflowHeader.stories.tsx +4 -5
  221. package/src/Workflow/_docs/controls/controls.tsx +4 -4
  222. package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.tsx +6 -31
  223. package/src/__actions__/Button/v1/Button/_docs/Button.mdx +1 -1
  224. package/src/__actions__/Button/v1/Button/_docs/Button.stickersheet.stories.tsx +6 -6
  225. package/src/__actions__/Button/v1/Button/_docs/Button.stories.tsx +7 -6
  226. package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stickersheet.stories.tsx +7 -7
  227. package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stories.tsx +5 -5
  228. package/src/__actions__/Button/v2/Button/_docs/Button.mdx +1 -1
  229. package/src/__actions__/Button/v2/Button/_docs/Button.stories.tsx +7 -6
  230. package/src/__actions__/Button/v2/IconButton/_docs/IconButton.stories.tsx +5 -5
  231. package/src/__actions__/Button/v3/_docs/ApiSpecification.mdx +1 -1
  232. package/src/__actions__/Button/v3/_docs/Button.docs.stories.tsx +1 -1
  233. package/src/__actions__/Button/v3/_docs/Button.mdx +1 -1
  234. package/src/__actions__/Button/v3/_docs/Button.spec.stories.tsx +1 -1
  235. package/src/__actions__/Button/v3/_docs/Button.stickersheet.stories.tsx +1 -1
  236. package/src/__actions__/Button/v3/_docs/Button.stories.tsx +1 -1
  237. package/src/__actions__/Menu/v1/_docs/Menu.stickersheet.stories.tsx +3 -3
  238. package/src/__actions__/Menu/v1/_docs/Menu.stories.tsx +3 -3
  239. package/src/__actions__/Menu/v1/_docs/MenuContentExample.tsx +6 -6
  240. package/src/__actions__/Menu/v1/_docs/examples.tsx +5 -5
  241. package/src/__actions__/Menu/v2/_docs/Menu.stories.tsx +3 -3
  242. package/src/__actions__/Menu/v3/_docs/ApiSpecification.mdx +1 -3
  243. package/src/__actions__/Menu/v3/_docs/Menu.docs.stories.tsx +46 -45
  244. package/src/__actions__/Menu/v3/_docs/Menu.mdx +1 -1
  245. package/src/__actions__/Menu/v3/_docs/Menu.spec.stories.tsx +21 -23
  246. package/src/__actions__/Menu/v3/_docs/Menu.stories.tsx +12 -15
  247. package/src/__future__/Icon/Icon.module.css +35 -0
  248. package/src/__future__/Icon/Icon.spec.tsx +36 -0
  249. package/src/__future__/Icon/Icon.tsx +85 -0
  250. package/src/__future__/Icon/_docs/Icon--api-specification.mdx +98 -0
  251. package/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx +145 -0
  252. package/src/__future__/Icon/_docs/Icon.docs.module.css +17 -0
  253. package/src/__future__/Icon/_docs/Icon.docs.stories.tsx +524 -0
  254. package/src/__future__/Icon/_docs/Icon.stickersheet.stories.tsx +126 -0
  255. package/src/__future__/Icon/_docs/assets/interface-dont.png +0 -0
  256. package/src/__future__/Icon/_docs/assets/tooltip-dont.png +0 -0
  257. package/src/__future__/Icon/constants.ts +149 -0
  258. package/src/__future__/Icon/index.ts +1 -0
  259. package/src/__future__/Icon/material-symbols-metadata.json +3370 -0
  260. package/src/__future__/Icon/types.ts +11 -0
  261. package/src/__future__/Select/subcomponents/Option/Option.tsx +2 -2
  262. package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.module.scss +1 -1
  263. package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.tsx +6 -9
  264. package/src/__future__/Tag/RemovableTag/_docs/RemovableTag.stories.tsx +0 -77
  265. package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.module.scss +0 -56
  266. package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.tsx +2 -12
  267. package/src/__future__/Tag/Tag/Tag.module.scss +1 -1
  268. package/src/__future__/Tag/Tag/_docs/Tag-migration-guide.stories.tsx +6 -17
  269. package/src/__future__/Tag/Tag/_docs/Tag.stickersheet.stories.tsx +5 -2
  270. package/src/__future__/Tag/Tag/_docs/Tag.stories.tsx +13 -6
  271. package/src/__future__/index.ts +1 -0
  272. package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stickersheet.stories.tsx +10 -10
  273. package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stories.tsx +7 -4
  274. package/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx +4 -11
  275. package/src/__overlays__/Tooltip/v3/_docs/Tooltip.docs.stories.tsx +10 -10
  276. package/src/__overlays__/Tooltip/v3/_docs/Tooltip.spec.stories.tsx +3 -3
  277. package/codemods/utils/getTagName.spec.ts +0 -24
  278. package/codemods/utils/getTagName.ts +0 -32
  279. package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.cjs +0 -23
  280. package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.mjs +0 -15
  281. package/dist/types/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.d.ts +0 -2
  282. package/src/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.tsx +0 -21
@@ -0,0 +1,145 @@
1
+ import { Canvas, Meta, Controls, Story } from "@storybook/blocks"
2
+ import { ResourceLinks, KAIOInstallation, DosAndDonts, DoOrDont } from "~storybook/components"
3
+ import * as IconStories from "./Icon.docs.stories"
4
+
5
+ <Meta title="Illustrations/Icon/Icon (Future)/Usage Guidelines" />
6
+
7
+ # Icon (Future)
8
+
9
+ Updated September 13, 2024
10
+
11
+ <ResourceLinks
12
+ sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/__illustrations__/Icon/v3"
13
+ apiSpecification="/?path=/docs/illustrations-icon-v3-api-specification--docs"
14
+ figma="https://www.figma.com/design/eZKEE5kXbEMY3lx84oz8iN/%F0%9F%92%9C-Heart-UI-Kit?node-id=1929-3974"
15
+ />
16
+
17
+ <KAIOInstallation exportNames="Icon" isFuture />
18
+
19
+ ## Overview
20
+
21
+ Icons are simplified visual symbols that represent ideas, objects, or actions. They improve comprehension, guide interactivity, and draw attention to important information.
22
+
23
+ <Canvas of={IconStories.Playground} />
24
+ <Controls of={IconStories.Playground} include={["name", "isFilled"]} />
25
+
26
+ ### When to use
27
+
28
+ - To support comprehension of an idea, object, or action.
29
+ - To provide visual cues and improving navigation.
30
+
31
+ ### When not to use
32
+
33
+ - When the meaning of the icon is not immediately clear or could be misinterpreted.
34
+ - When text is necessary to convey specific or detailed information.
35
+ - When using too many icons could clutter the interface and overwhelm the user.
36
+ - When accessibility is a concern and the icon does not have appropriate alternative text or support.
37
+ - When the icon does not align with the overall design language or style of the application.
38
+
39
+ ### Specs
40
+
41
+ When you need a new icon, use [Google's Material Symbols set](https://fonts.google.com/icons) via the [Figma plugin](https://www.figma.com/community/plugin/1088610476491668236/material-symbols) to add the relevant icons in:
42
+ - **Outlined**
43
+ - **Weight**: 400
44
+ - **Grade**: Normal (0)
45
+ - **Fill**: On or Off
46
+
47
+ #### Do use icons consistently
48
+
49
+ Consistent use of icons helps users quickly recognize and understand their function, improving overall usability.
50
+ Refer to the [default set](#default-icon-set) for icons commonly used across the platform.
51
+
52
+ <DosAndDonts>
53
+ <DoOrDont story={IconStories.ConsistentDo} />
54
+ </DosAndDonts>
55
+
56
+ #### Do use the appropriate fill for the icon context and state
57
+
58
+ Filled icons can indicate an active state or selection. Unfilled icons often represent a default or inactive state. Not all icons change appearance when toggled between filled and unfilled, so use this distinction thoughtfully.
59
+
60
+ <DosAndDonts>
61
+ <DoOrDont story={IconStories.FilledUnfilledDo} />
62
+ </DosAndDonts>
63
+
64
+ #### Do use the correct optical size
65
+
66
+ Scale the optical size to match the size of the icon - do not mix icon sizes with a different optical size.
67
+
68
+ <DosAndDonts>
69
+ <DoOrDont story={IconStories.OpticalSizeDo} />
70
+ <DoOrDont story={IconStories.OpticalSizeDont} isDont />
71
+ </DosAndDonts>
72
+
73
+ #### Do align the icon vertically
74
+
75
+ Vertically center the icon by shifting down the baseline of symbols to approximately 11.5% of the type size.
76
+
77
+ <DosAndDonts>
78
+ <DoOrDont story={IconStories.AlignmentDo} />
79
+ <DoOrDont story={IconStories.AlignmentDont} isDont />
80
+ </DosAndDonts>
81
+
82
+ #### Do use icon colors that meet 3:1 contrast ratios with their background
83
+
84
+ Icons should be easily distinguishable and clearly visible against their background to ensure they are accessible to all users, including those with visual impairments.
85
+
86
+ <DosAndDonts>
87
+ <DoOrDont story={IconStories.ContrastDo} />
88
+ <DoOrDont story={IconStories.ContrastDont} isDont />
89
+ </DosAndDonts>
90
+
91
+ #### Do use color purposefully
92
+
93
+ Where suitable, color can be used to highlight an icon or reinforce its meaning, such as using green for success or red for errors.
94
+
95
+ <DosAndDonts>
96
+ <DoOrDont story={IconStories.ColorPurposefulDo} />
97
+ </DosAndDonts>
98
+
99
+ #### Don't rely on color alone
100
+
101
+ Ensure that icons are distinguishable by varying the icon, fill, or labels. Relying only on color can make the interface less accessible to colorblind users.
102
+
103
+ <DosAndDonts>
104
+ <DoOrDont story={IconStories.DistinguishDo} />
105
+ <DoOrDont story={IconStories.DistinguishDont} isDont />
106
+ </DosAndDonts>
107
+
108
+ #### Don't overload your interface with too many icons
109
+
110
+ Overusing icons can create visual clutter and overwhelm users. Use them sparingly to highlight important actions or information.
111
+
112
+ <DosAndDonts>
113
+ <DoOrDont story={IconStories.InterfaceDont} isDont />
114
+ </DosAndDonts>
115
+
116
+ #### Don't rely on icons alone for conveying important information
117
+
118
+ Icons should support, not replace, text labels, especially for accessibility. Screen readers and other assistive technologies may not always interpret icons correctly.
119
+
120
+ <DosAndDonts>
121
+ <DoOrDont story={IconStories.ImportantInformationDo} />
122
+ <DoOrDont story={IconStories.ImportantInformationDont} isDont />
123
+ </DosAndDonts>
124
+
125
+ #### Do use appropriate states on interactive icons
126
+
127
+ If the icon is interactive, it should have a base, hover, and focus state.
128
+
129
+ <DosAndDonts>
130
+ <DoOrDont story={IconStories.InteractiveStatesDo} />
131
+ </DosAndDonts>
132
+
133
+ #### Don't rely on tooltips to covey icon meaning
134
+
135
+ Important information can be hidden if it's only explained in tooltips, leading to poor user experience. Whenever possible, include a text label or other contextual information alongside the icon to clearly convey its meaning.
136
+
137
+ <DosAndDonts>
138
+ <DoOrDont story={IconStories.TooltipDont} isDont />
139
+ </DosAndDonts>
140
+
141
+ ## Default icon set
142
+
143
+ Whilst you have access to all Material Symbols, the following icons match the default set we have in Figma.
144
+
145
+ <Story of={IconStories.DefaultIconSet} />
@@ -0,0 +1,17 @@
1
+ .interactiveIcon {
2
+ position: relative;
3
+ background: none;
4
+ padding: 0;
5
+ color: var(--color-blue-500);
6
+
7
+ &:hover {
8
+ color: var(--color-blue-400);
9
+ }
10
+ }
11
+
12
+ .interactiveIcon:focus::after {
13
+ position: absolute;
14
+ content: "";
15
+ border: var(--border-focus-ring-border-width) solid var(--color-blue-500);
16
+ inset: -2px;
17
+ }
@@ -0,0 +1,524 @@
1
+ import React, { useState } from "react"
2
+ import { Meta, StoryObj } from "@storybook/react"
3
+ import classnames from "classnames"
4
+ import { InlineNotification } from "~components/Notification"
5
+ import {
6
+ TableCard,
7
+ TableContainer,
8
+ TableHeader,
9
+ TableHeaderRowCell,
10
+ TableRow,
11
+ TableRowCell,
12
+ } from "~components/Table"
13
+ import { Text } from "~components/Text"
14
+ import { ToggleSwitchField } from "~components/ToggleSwitch"
15
+ import { Button } from "~components/__actions__/v3"
16
+ import { Tag } from "~components/__future__/Tag"
17
+ import { StickerSheet } from "~storybook/components/StickerSheet"
18
+ import { iconDefaultSet } from "../constants"
19
+ import { Icon } from "../index"
20
+ import imgInterfaceDont from "./assets/interface-dont.png"
21
+ import imgTooltipDont from "./assets/tooltip-dont.png"
22
+ import styles from "./Icon.docs.module.css"
23
+
24
+ const meta = {
25
+ title: "Illustrations/Icon/Icon (Future)",
26
+ component: Icon,
27
+ args: {
28
+ name: "star",
29
+ isPresentational: true,
30
+ },
31
+ argTypes: {
32
+ name: { type: "string" },
33
+ alt: {
34
+ description: "Set this value when `isPresentational={false}`",
35
+ },
36
+ },
37
+ } satisfies Meta<typeof Icon>
38
+
39
+ export default meta
40
+
41
+ type Story = StoryObj<typeof meta>
42
+
43
+ export const Playground: Story = {
44
+ render: args => {
45
+ if (args.isPresentational) return <Icon {...args} alt={undefined} />
46
+ return <Icon {...args} alt={args.alt ?? "Fallback string"} />
47
+ },
48
+ }
49
+
50
+ export const Filled: Story = {
51
+ args: { isFilled: true },
52
+ }
53
+
54
+ export const MirrorInRTL: Story = {
55
+ render: args => (
56
+ <StickerSheet>
57
+ <StickerSheet.Header
58
+ headings={['dir=["ltr"]', 'dir=["rtl"]']}
59
+ hasVerticalHeadings
60
+ />
61
+ <StickerSheet.Body>
62
+ <StickerSheet.Row rowTitle="arrow_forward">
63
+ <div dir="ltr" className="text-center">
64
+ <Icon {...args} name="arrow_forward" shouldMirrorInRTL />
65
+ </div>
66
+ <div dir="rtl" className="text-center">
67
+ <Icon {...args} name="arrow_forward" shouldMirrorInRTL />
68
+ </div>
69
+ </StickerSheet.Row>
70
+ <StickerSheet.Row rowTitle="format_list_numbered">
71
+ <div dir="ltr" className="text-center">
72
+ <Icon {...args} name="format_list_numbered" shouldMirrorInRTL />
73
+ </div>
74
+ <div dir="rtl" className="text-center">
75
+ <Icon {...args} name="format_list_numbered" shouldMirrorInRTL />
76
+ </div>
77
+ </StickerSheet.Row>
78
+ </StickerSheet.Body>
79
+ </StickerSheet>
80
+ ),
81
+ parameters: {
82
+ docs: {
83
+ source: {
84
+ code: `
85
+ <div dir="ltr" className="text-center">
86
+ <Icon {...props} name="arrow_forward" shouldMirrorInRTL />
87
+ </div>
88
+ <div dir="rtl" className="text-center">
89
+ <Icon {...props} name="arrow_forward" shouldMirrorInRTL />
90
+ </div>
91
+ <div dir="ltr" className="text-center">
92
+ <Icon {...props} name="format_list_numbered" shouldMirrorInRTL />
93
+ </div>
94
+ <div dir="rtl" className="text-center">
95
+ <Icon {...props} name="format_list_numbered" shouldMirrorInRTL />
96
+ </div>
97
+ `,
98
+ },
99
+ },
100
+ },
101
+ }
102
+
103
+ export const Color: Story = {
104
+ render: args => (
105
+ <div className="flex gap-16">
106
+ <div className="text-green-500">
107
+ <Icon {...args} />
108
+ </div>
109
+ <Icon {...args} className="text-blue-500" />
110
+ </div>
111
+ ),
112
+ }
113
+
114
+ export const Size: Story = {
115
+ render: args => (
116
+ <div className="flex gap-16">
117
+ <Icon {...args} className="[--icon-size:48]" />
118
+ <div className="text-[48px]">
119
+ <Icon {...args} className="text-[1em] [--icon-optical-size:48]" />
120
+ </div>
121
+ </div>
122
+ ),
123
+ }
124
+
125
+ export const MeaningfulIcon: Story = {
126
+ render: args => (
127
+ <Button>
128
+ <Icon {...args} />
129
+ </Button>
130
+ ),
131
+ args: { isPresentational: false, alt: "Favourite" },
132
+ }
133
+
134
+ export const PresentationalIcon: Story = {
135
+ render: args => (
136
+ <Button>
137
+ <Icon {...args} /> Favourite
138
+ </Button>
139
+ ),
140
+ args: { isPresentational: true },
141
+ }
142
+
143
+ const IconSetButton = ({
144
+ iconName,
145
+ isFilled,
146
+ }: {
147
+ iconName: string
148
+ isFilled: boolean
149
+ }): JSX.Element => {
150
+ const [copied, setCopied] = useState(false)
151
+
152
+ const handleCopy = (): void => {
153
+ const snippet = isFilled
154
+ ? `<Icon name="${iconName}" isPresentational isFilled />`
155
+ : `<Icon name="${iconName}" isPresentational />`
156
+ navigator.clipboard.writeText(snippet)
157
+
158
+ setCopied(true)
159
+ setTimeout(() => setCopied(false), 1000)
160
+ }
161
+
162
+ return (
163
+ <li>
164
+ <button
165
+ type="button"
166
+ onClick={handleCopy}
167
+ className={classnames(
168
+ "flex flex-col justify-center items-center gap-16",
169
+ "cursor-pointer h-full w-full p-16 rounded",
170
+ "bg-gray-100 hover:bg-gray-200"
171
+ )}
172
+ >
173
+ {copied ? (
174
+ <Tag color="green" classNameOverride="border-1 border-green-500">
175
+ Copied!
176
+ </Tag>
177
+ ) : (
178
+ <>
179
+ <Icon name={iconName} isPresentational isFilled={isFilled} />
180
+ <Text variant="small" tag="span">
181
+ {iconName}
182
+ </Text>
183
+ </>
184
+ )}
185
+ </button>
186
+ </li>
187
+ )
188
+ }
189
+
190
+ export const DefaultIconSet: Story = {
191
+ render: () => {
192
+ const [isFilled, setIsFilled] = useState(false)
193
+
194
+ return (
195
+ <div className="flex flex-col gap-8">
196
+ <ToggleSwitchField
197
+ labelText="Filled"
198
+ toggledStatus={isFilled ? "on" : "off"}
199
+ onToggle={() => setIsFilled(!isFilled)}
200
+ />
201
+ <ul
202
+ className="grid list-none gap-16 m-0 p-0"
203
+ style={{ gridTemplateColumns: "repeat(auto-fit, minmax(11em, 1fr))" }}
204
+ >
205
+ {iconDefaultSet.map(iconName => (
206
+ <IconSetButton
207
+ key={iconName}
208
+ iconName={iconName}
209
+ isFilled={isFilled}
210
+ />
211
+ ))}
212
+ </ul>
213
+ </div>
214
+ )
215
+ },
216
+ }
217
+
218
+ export const ConsistentDo: Story = {
219
+ render: () => (
220
+ <Text variant="body">
221
+ Edit <Icon name="edit" isPresentational />
222
+ </Text>
223
+ ),
224
+ }
225
+
226
+ export const FilledUnfilledDo: Story = {
227
+ render: () => (
228
+ <div className="flex gap-16">
229
+ <div className="flex items-center gap-4">
230
+ <Text variant="body">Default state</Text>
231
+ <Icon name="thumb_up" isPresentational />
232
+ </div>
233
+ <div className="flex items-center gap-4">
234
+ <Text variant="body">Selected</Text>
235
+ <Icon name="thumb_up" isPresentational isFilled />
236
+ </div>
237
+ </div>
238
+ ),
239
+ }
240
+
241
+ export const OpticalSizeDo: Story = {
242
+ render: () => (
243
+ <div className="flex gap-16">
244
+ <div className="flex items-center gap-4">
245
+ <Text variant="body">20/20</Text>
246
+ <Icon
247
+ name="star"
248
+ isPresentational
249
+ className="text-[20px] [--icon-optical-size:20]"
250
+ />
251
+ </div>
252
+ <div className="flex items-center gap-4">
253
+ <Text variant="body">24/24</Text>
254
+ <Icon
255
+ name="star"
256
+ isPresentational
257
+ className="text-[24px] [--icon-optical-size:24]"
258
+ />
259
+ </div>
260
+ <div className="flex items-center gap-4">
261
+ <Text variant="body">40/40</Text>
262
+ <Icon
263
+ name="star"
264
+ isPresentational
265
+ className="text-[40px] [--icon-optical-size:40]"
266
+ />
267
+ </div>
268
+ <div className="flex items-center gap-4">
269
+ <Text variant="body">48/48</Text>
270
+ <Icon
271
+ name="star"
272
+ isPresentational
273
+ className="text-[48px] [--icon-optical-size:48]"
274
+ />
275
+ </div>
276
+ </div>
277
+ ),
278
+ }
279
+
280
+ export const OpticalSizeDont: Story = {
281
+ render: () => (
282
+ <div className="flex gap-16">
283
+ <div className="flex items-center gap-4">
284
+ <Text variant="body">20/48</Text>
285
+ <Icon
286
+ name="star"
287
+ isPresentational
288
+ className="text-[20px] [--icon-optical-size:48]"
289
+ />
290
+ </div>
291
+ <div className="flex items-center gap-4">
292
+ <Text variant="body">24/40</Text>
293
+ <Icon
294
+ name="star"
295
+ isPresentational
296
+ className="text-[24px] [--icon-optical-size:40]"
297
+ />
298
+ </div>
299
+ <div className="flex items-center gap-4">
300
+ <Text variant="body">40/24</Text>
301
+ <Icon
302
+ name="star"
303
+ isPresentational
304
+ className="text-[40px] [--icon-optical-size:24]"
305
+ />
306
+ </div>
307
+ <div className="flex items-center gap-4">
308
+ <Text variant="body">48/20</Text>
309
+ <Icon
310
+ name="star"
311
+ isPresentational
312
+ className="text-[48px] [--icon-optical-size:20]"
313
+ />
314
+ </div>
315
+ </div>
316
+ ),
317
+ }
318
+
319
+ export const AlignmentDo: Story = {
320
+ render: () => (
321
+ <img
322
+ src="https://lh3.googleusercontent.com/twRAsK6vahc7l_yuhhlBzVp1yR_8tsspDL16Xry73IrhYE3ItxmKSqHC6MznHq9EZKfrOgP_a3RDNGLK28JmhHeFiDmiwYrbhBtpxjodrsw=s0"
323
+ alt="Symbol baseline set lower in relation to symbol."
324
+ className="w-full"
325
+ />
326
+ ),
327
+ }
328
+
329
+ export const AlignmentDont: Story = {
330
+ render: () => (
331
+ <img
332
+ src="https://lh3.googleusercontent.com/MePU5NYnrFy96fiDdULne6XwFlboyznBeVWD5CTrFwzNdzsMjrvg_ySLfXJVdUNxSkeUT4UH28_Orz916LRN78bhneYBA0dL8YpCQswiERo=s0"
333
+ alt="Both symbol and text set on same baseline."
334
+ className="w-full"
335
+ />
336
+ ),
337
+ }
338
+
339
+ export const ContrastDo: Story = {
340
+ render: () => (
341
+ <div className="bg-yellow-100 p-16">
342
+ <Icon name="star" isPresentational className="text-yellow-700" />
343
+ </div>
344
+ ),
345
+ }
346
+
347
+ export const ContrastDont: Story = {
348
+ render: () => (
349
+ <div className="bg-yellow-100 p-16">
350
+ <Icon name="star" isPresentational className="text-yellow-500" />
351
+ </div>
352
+ ),
353
+ }
354
+
355
+ export const ColorPurposefulDo: Story = {
356
+ render: () => (
357
+ <>
358
+ <InlineNotification variant="success">Success</InlineNotification>
359
+ <InlineNotification variant="warning" noBottomMargin>
360
+ Error
361
+ </InlineNotification>
362
+ </>
363
+ ),
364
+ }
365
+
366
+ export const DistinguishDo: Story = {
367
+ render: () => (
368
+ <div className="flex gap-16">
369
+ <div className="flex items-center gap-4">
370
+ <Text variant="body">Default state</Text>
371
+ <Icon name="thumb_up" isPresentational />
372
+ </div>
373
+ <div className="flex items-center gap-4">
374
+ <Text variant="body">Selected</Text>
375
+ <Icon name="thumb_up" isPresentational isFilled />
376
+ </div>
377
+ </div>
378
+ ),
379
+ }
380
+
381
+ export const DistinguishDont: Story = {
382
+ render: () => (
383
+ <div className="flex gap-16">
384
+ <div className="flex items-center gap-4">
385
+ <Text variant="body">Default state</Text>
386
+ <Icon name="thumb_up" isPresentational />
387
+ </div>
388
+ <div className="flex items-center gap-4">
389
+ <Text variant="body">Selected</Text>
390
+ <Icon name="thumb_up" isPresentational className="text-blue-500" />
391
+ </div>
392
+ </div>
393
+ ),
394
+ }
395
+
396
+ export const InterfaceDont: Story = {
397
+ render: () => (
398
+ <img
399
+ src={imgInterfaceDont}
400
+ alt="Example of a bad interface"
401
+ className="block m-auto max-w-[600px]"
402
+ />
403
+ ),
404
+ }
405
+
406
+ export const ImportantInformationDo: Story = {
407
+ render: () => (
408
+ <TableContainer>
409
+ <TableHeader>
410
+ <TableRow>
411
+ <TableHeaderRowCell
412
+ labelText="Flag for review"
413
+ sorting="ascending"
414
+ width={4 / 12}
415
+ />
416
+ <TableHeaderRowCell labelText="Employee" sorting="ascending" />
417
+ </TableRow>
418
+ </TableHeader>
419
+ <TableCard>
420
+ <TableRow>
421
+ <TableRowCell width={4 / 12}>
422
+ <Icon name="flag" alt="Flag" />
423
+ </TableRowCell>
424
+ <TableRowCell>
425
+ <Text tag="div" variant="body">
426
+ John Johnson
427
+ </Text>
428
+ </TableRowCell>
429
+ </TableRow>
430
+ </TableCard>
431
+ <TableCard>
432
+ <TableRow>
433
+ <TableRowCell width={4 / 12}>
434
+ <Icon name="flag" alt="Flag" />
435
+ </TableRowCell>
436
+ <TableRowCell>
437
+ <Text tag="div" variant="body">
438
+ Michelle Summer
439
+ </Text>
440
+ </TableRowCell>
441
+ </TableRow>
442
+ </TableCard>
443
+ </TableContainer>
444
+ ),
445
+ }
446
+
447
+ export const ImportantInformationDont: Story = {
448
+ render: () => (
449
+ <TableContainer>
450
+ <TableHeader>
451
+ <TableRow>
452
+ <TableHeaderRowCell labelText="" sorting="ascending" />
453
+ <TableHeaderRowCell labelText="Employee" sorting="ascending" />
454
+ </TableRow>
455
+ </TableHeader>
456
+ <TableCard>
457
+ <TableRow>
458
+ <TableRowCell>
459
+ <Icon name="flag" alt="Flag" />
460
+ </TableRowCell>
461
+ <TableRowCell>
462
+ <Text tag="div" variant="body">
463
+ John Johnson
464
+ </Text>
465
+ </TableRowCell>
466
+ </TableRow>
467
+ </TableCard>
468
+ <TableCard>
469
+ <TableRow>
470
+ <TableRowCell>
471
+ <Icon name="flag" alt="Flag" />
472
+ </TableRowCell>
473
+ <TableRowCell>
474
+ <Text tag="div" variant="body">
475
+ Michelle Summer
476
+ </Text>
477
+ </TableRowCell>
478
+ </TableRow>
479
+ </TableCard>
480
+ </TableContainer>
481
+ ),
482
+ parameters: {
483
+ a11y: { disable: true }, // accessible label fix to be addressed in a separate PR
484
+ },
485
+ }
486
+
487
+ const InteractiveIcon = (props: Record<string, any>): JSX.Element => (
488
+ <button type="button" className={styles.interactiveIcon} {...props}>
489
+ <Icon name="info" isPresentational isFilled />
490
+ </button>
491
+ )
492
+
493
+ export const InteractiveStatesDo: Story = {
494
+ render: () => (
495
+ <div className="flex gap-16">
496
+ <Text variant="body">
497
+ Base <InteractiveIcon />
498
+ </Text>
499
+ <Text variant="body">
500
+ Hover <InteractiveIcon data-sb-pseudo-styles="hover" />
501
+ </Text>
502
+ <Text variant="body">
503
+ Focus <InteractiveIcon data-sb-pseudo-styles="focus" />
504
+ </Text>
505
+ </div>
506
+ ),
507
+ parameters: {
508
+ pseudo: {
509
+ hover: '[data-sb-pseudo-styles="hover"]',
510
+ focus: '[data-sb-pseudo-styles="focus"]',
511
+ focusVisible: '[data-sb-pseudo-styles="focus"]',
512
+ },
513
+ },
514
+ }
515
+
516
+ export const TooltipDont: Story = {
517
+ render: () => (
518
+ <img
519
+ src={imgTooltipDont}
520
+ alt="Example of a bad use of a tooltip on an icon"
521
+ className="block m-auto max-w-[600px]"
522
+ />
523
+ ),
524
+ }