@juspay/blend-design-system 0.0.37-beta.7 → 0.0.37

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 (290) hide show
  1. package/dist/{node-C_DmV86X.js → breadcrumbV2.tokens-CovJEwot.js} +16 -0
  2. package/dist/components/Accordion/index.d.ts +2 -0
  3. package/dist/components/AccordionV2/accordionV2.animations.d.ts +1 -1
  4. package/dist/components/Alert/index.d.ts +1 -0
  5. package/dist/components/Avatar/index.d.ts +1 -0
  6. package/dist/components/Breadcrumb/index.d.ts +1 -0
  7. package/dist/components/Button/index.d.ts +1 -0
  8. package/dist/components/ButtonGroup/index.d.ts +1 -0
  9. package/dist/components/Card/index.d.ts +1 -0
  10. package/dist/components/CardV2/CardV2.d.ts +45 -0
  11. package/dist/components/CardV2/CardV2.utils.d.ts +14 -0
  12. package/dist/components/CardV2/CardV2Components.d.ts +8 -0
  13. package/dist/components/CardV2/CardV2Context.d.ts +14 -0
  14. package/dist/components/CardV2/CardV2Skeleton.d.ts +6 -0
  15. package/dist/components/CardV2/accessibility/CardV2AccessibilityReport.d.ts +2 -0
  16. package/dist/components/CardV2/accessibility/index.d.ts +1 -0
  17. package/dist/components/CardV2/cardV2.dark.tokens.d.ts +3 -0
  18. package/dist/components/CardV2/cardV2.light.tokens.d.ts +3 -0
  19. package/dist/components/CardV2/cardV2.tokens.d.ts +5 -0
  20. package/dist/components/CardV2/cardV2.tokens.types.d.ts +92 -0
  21. package/dist/components/CardV2/cardV2.types.d.ts +106 -0
  22. package/dist/components/CardV2/index.d.ts +5 -0
  23. package/dist/components/Charts/index.d.ts +10 -0
  24. package/dist/components/Charts/types.d.ts +2 -0
  25. package/dist/components/ChatInput/index.d.ts +1 -0
  26. package/dist/components/Checkbox/index.d.ts +1 -0
  27. package/dist/components/CodeEditor/index.d.ts +1 -0
  28. package/dist/components/CodeEditor/types.d.ts +22 -2
  29. package/dist/components/CodeEditorV2/CodeEditorV2.d.ts +1 -1
  30. package/dist/components/CodeEditorV2/codeEditorV2.types.d.ts +23 -2
  31. package/dist/components/DataTable/PivotTableModal/pivotModal.styled.d.ts +184 -0
  32. package/dist/components/DataTable/TableBody/types.d.ts +3 -1
  33. package/dist/components/DataTable/hooks/index.d.ts +2 -0
  34. package/dist/components/DataTable/hooks/useReducedMotion.d.ts +1 -0
  35. package/dist/components/DataTable/hooks/useRowFlip.d.ts +6 -0
  36. package/dist/components/DataTable/types.d.ts +26 -0
  37. package/dist/components/DateRangePicker/CalendarGrid.d.ts +5 -2
  38. package/dist/components/DateRangePicker/types.d.ts +3 -1
  39. package/dist/components/DateRangePicker/utils.d.ts +5 -5
  40. package/dist/components/Directory/Directory.d.ts +1 -1
  41. package/dist/components/Directory/NavItem.d.ts +1 -1
  42. package/dist/components/Directory/Section.d.ts +1 -1
  43. package/dist/components/Directory/VirtualizedDirectory.d.ts +3 -0
  44. package/dist/components/Directory/directory.tokens.d.ts +7 -0
  45. package/dist/components/Directory/types.d.ts +38 -1
  46. package/dist/components/Directory/utils.d.ts +3 -1
  47. package/dist/components/Drawer/index.d.ts +1 -0
  48. package/dist/components/Inputs/MultiValueInput/index.d.ts +1 -0
  49. package/dist/components/Inputs/NumberInput/index.d.ts +1 -0
  50. package/dist/components/Inputs/OTPInput/index.d.ts +1 -0
  51. package/dist/components/Inputs/SearchInput/index.d.ts +1 -0
  52. package/dist/components/Inputs/TextArea/index.d.ts +1 -0
  53. package/dist/components/Inputs/TextInput/index.d.ts +1 -0
  54. package/dist/components/InputsV2/TextAreaV2/utils.d.ts +2 -1
  55. package/dist/components/InputsV2/TextInputV2/utils.d.ts +2 -1
  56. package/dist/components/InputsV2/UploadV2/UploadContainerV2.d.ts +24 -0
  57. package/dist/components/InputsV2/UploadV2/UploadV2.d.ts +31 -0
  58. package/dist/components/InputsV2/UploadV2/UploadV2.dark.tokens.d.ts +3 -0
  59. package/dist/components/InputsV2/UploadV2/UploadV2.light.tokens.d.ts +3 -0
  60. package/dist/components/InputsV2/UploadV2/UploadV2.tokens.d.ts +5 -0
  61. package/dist/components/InputsV2/UploadV2/UploadV2.tokens.types.d.ts +115 -0
  62. package/dist/components/InputsV2/UploadV2/UploadV2.types.d.ts +56 -0
  63. package/dist/components/InputsV2/UploadV2/index.d.ts +3 -0
  64. package/dist/components/InputsV2/UploadV2/utils.d.ts +32 -0
  65. package/dist/components/KeyValuePair/index.d.ts +1 -0
  66. package/dist/components/Menu/Menu.d.ts +1 -1
  67. package/dist/components/Menu/index.d.ts +1 -0
  68. package/dist/components/Menu/types.d.ts +7 -0
  69. package/dist/components/Menu/utils.d.ts +10 -2
  70. package/dist/components/MenuV2/MenuV2Content.d.ts +1 -0
  71. package/dist/components/MenuV2/menuV2.types.d.ts +5 -0
  72. package/dist/components/MenuV2/menuV2.utils.d.ts +10 -2
  73. package/dist/components/Modal/index.d.ts +1 -0
  74. package/dist/components/ModalV2/ModalV2.d.ts +22 -0
  75. package/dist/components/ModalV2/ModalV2Footer.d.ts +10 -0
  76. package/dist/components/ModalV2/ModalV2Header.d.ts +15 -0
  77. package/dist/components/ModalV2/ModalV2Skeleton.d.ts +4 -0
  78. package/dist/components/ModalV2/index.d.ts +4 -0
  79. package/dist/components/ModalV2/mobileModalV2.d.ts +23 -0
  80. package/dist/components/ModalV2/modalAnimationV2.d.ts +3 -0
  81. package/dist/components/ModalV2/modalV2.dark.tokens.d.ts +3 -0
  82. package/dist/components/ModalV2/modalV2.light.tokens.d.ts +3 -0
  83. package/dist/components/ModalV2/modalV2.tokens.d.ts +5 -0
  84. package/dist/components/ModalV2/modalV2.tokens.types.d.ts +91 -0
  85. package/dist/components/ModalV2/modalV2.types.d.ts +66 -0
  86. package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
  87. package/dist/components/MultiSelect/MultiSelectMenu.d.ts +1 -1
  88. package/dist/components/MultiSelect/index.d.ts +2 -0
  89. package/dist/components/MultiSelect/types.d.ts +2 -0
  90. package/dist/components/MultiSelectV2/MultiSelectV2.d.ts +1 -1
  91. package/dist/components/MultiSelectV2/MultiSelectV2Menu.d.ts +1 -1
  92. package/dist/components/MultiSelectV2/multiSelectV2.types.d.ts +2 -0
  93. package/dist/components/Popover/index.d.ts +1 -0
  94. package/dist/components/Primitives/Block/Block.d.ts +1 -1
  95. package/dist/components/ProgressBar/index.d.ts +1 -0
  96. package/dist/components/Radio/index.d.ts +2 -0
  97. package/dist/components/Sidebar/SidebarContent.d.ts +9 -1
  98. package/dist/components/Sidebar/index.d.ts +1 -0
  99. package/dist/components/Sidebar/types.d.ts +9 -1
  100. package/dist/components/SidebarV2/SidebarV2Panel.d.ts +10 -2
  101. package/dist/components/SidebarV2/types.d.ts +9 -1
  102. package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
  103. package/dist/components/SingleSelect/SingleSelectMenu.d.ts +2 -1
  104. package/dist/components/SingleSelect/index.d.ts +1 -0
  105. package/dist/components/SingleSelect/types.d.ts +1 -0
  106. package/dist/components/SingleSelectV2/SingleSelectV2.d.ts +1 -1
  107. package/dist/components/SingleSelectV2/SingleSelectV2Menu.d.ts +1 -1
  108. package/dist/components/SingleSelectV2/singleSelectV2.tokens.types.d.ts +8 -0
  109. package/dist/components/SingleSelectV2/singleSelectV2.types.d.ts +2 -0
  110. package/dist/components/Skeleton/SkeletonCompound.d.ts +24 -33
  111. package/dist/components/Snackbar/Snackbar.d.ts +1 -1
  112. package/dist/components/Snackbar/index.d.ts +2 -0
  113. package/dist/components/Snackbar/snackbar.tokens.d.ts +1 -0
  114. package/dist/components/Snackbar/types.d.ts +2 -0
  115. package/dist/components/StatCard/index.d.ts +1 -0
  116. package/dist/components/Stepper/index.d.ts +1 -0
  117. package/dist/components/Switch/index.d.ts +2 -0
  118. package/dist/components/Tabs/index.d.ts +1 -0
  119. package/dist/components/Tags/index.d.ts +1 -0
  120. package/dist/components/Timeline/Timeline.d.ts +13 -37
  121. package/dist/components/Tooltip/index.d.ts +1 -0
  122. package/dist/components/Topbar/index.d.ts +1 -0
  123. package/dist/components/Upload/index.d.ts +1 -0
  124. package/dist/context/ThemeContext.d.ts +6 -0
  125. package/dist/context/useComponentToken.d.ts +4 -1
  126. package/dist/main.d.ts +6 -0
  127. package/dist/main.js +45436 -42186
  128. package/dist/node-B3rrXW84.js +1023 -0
  129. package/dist/node.d.ts +2 -0
  130. package/dist/node.js +21 -18
  131. package/dist/{tokens.js → token-engine.js} +1 -1
  132. package/lib/components/Accordion/AccordionItem.tsx +2 -6
  133. package/lib/components/Accordion/index.ts +2 -0
  134. package/lib/components/AccordionV2/AccordionV2Item.tsx +1 -1
  135. package/lib/components/AccordionV2/accordionV2.animations.ts +1 -5
  136. package/lib/components/Alert/index.ts +1 -0
  137. package/lib/components/Avatar/index.ts +1 -0
  138. package/lib/components/Breadcrumb/index.ts +1 -0
  139. package/lib/components/Button/index.ts +1 -0
  140. package/lib/components/ButtonGroup/index.ts +1 -0
  141. package/lib/components/Card/index.ts +1 -0
  142. package/lib/components/CardV2/CardV2.tsx +327 -0
  143. package/lib/components/CardV2/CardV2.utils.tsx +77 -0
  144. package/lib/components/CardV2/CardV2Components.tsx +297 -0
  145. package/lib/components/CardV2/CardV2Context.tsx +18 -0
  146. package/lib/components/CardV2/CardV2Skeleton.tsx +40 -0
  147. package/lib/components/CardV2/accessibility/CardV2AccessibilityReport.ts +284 -0
  148. package/lib/components/CardV2/accessibility/index.ts +1 -0
  149. package/lib/components/CardV2/cardV2.dark.tokens.ts +177 -0
  150. package/lib/components/CardV2/cardV2.light.tokens.ts +177 -0
  151. package/lib/components/CardV2/cardV2.tokens.ts +21 -0
  152. package/lib/components/CardV2/cardV2.tokens.types.ts +94 -0
  153. package/lib/components/CardV2/cardV2.types.ts +131 -0
  154. package/lib/components/CardV2/index.ts +13 -0
  155. package/lib/components/Charts/ChartLegend.tsx +25 -5
  156. package/lib/components/Charts/Charts.tsx +10 -0
  157. package/lib/components/Charts/index.ts +10 -0
  158. package/lib/components/Charts/types.tsx +2 -0
  159. package/lib/components/ChatInput/index.tsx +1 -0
  160. package/lib/components/Checkbox/index.ts +1 -0
  161. package/lib/components/CodeEditor/MonacoEditorWrapper.tsx +6 -2
  162. package/lib/components/CodeEditor/index.ts +1 -0
  163. package/lib/components/CodeEditor/types.ts +52 -2
  164. package/lib/components/CodeEditorV2/MonacoEditor/MonacoEditorWrapper.tsx +6 -2
  165. package/lib/components/CodeEditorV2/codeEditorV2.types.ts +44 -5
  166. package/lib/components/DataTable/DataTable.tsx +8 -0
  167. package/lib/components/DataTable/TableBody/index.tsx +47 -11
  168. package/lib/components/DataTable/TableBody/types.ts +7 -1
  169. package/lib/components/DataTable/TableCell/index.tsx +1 -1
  170. package/lib/components/DataTable/hooks/index.ts +2 -0
  171. package/lib/components/DataTable/hooks/useReducedMotion.ts +19 -0
  172. package/lib/components/DataTable/hooks/useRowFlip.ts +170 -0
  173. package/lib/components/DataTable/types.ts +32 -0
  174. package/lib/components/DateRangePicker/CalendarGrid.tsx +39 -6
  175. package/lib/components/DateRangePicker/DateRangePicker.tsx +27 -4
  176. package/lib/components/DateRangePicker/types.ts +6 -1
  177. package/lib/components/DateRangePicker/utils.ts +123 -12
  178. package/lib/components/Directory/Directory.tsx +31 -0
  179. package/lib/components/Directory/NavItem.tsx +177 -86
  180. package/lib/components/Directory/Section.tsx +9 -0
  181. package/lib/components/Directory/VirtualizedDirectory.tsx +670 -0
  182. package/lib/components/Directory/directory.tokens.ts +21 -0
  183. package/lib/components/Directory/types.ts +43 -1
  184. package/lib/components/Directory/utils.ts +81 -1
  185. package/lib/components/Drawer/index.ts +1 -0
  186. package/lib/components/Inputs/DropdownInput/DropdownInput.tsx +6 -2
  187. package/lib/components/Inputs/MultiValueInput/index.ts +1 -0
  188. package/lib/components/Inputs/NumberInput/NumberInput.tsx +6 -2
  189. package/lib/components/Inputs/NumberInput/index.ts +1 -0
  190. package/lib/components/Inputs/OTPInput/index.ts +1 -0
  191. package/lib/components/Inputs/SearchInput/index.ts +1 -0
  192. package/lib/components/Inputs/TextArea/TextArea.tsx +4 -2
  193. package/lib/components/Inputs/TextArea/index.ts +1 -0
  194. package/lib/components/Inputs/TextInput/TextInput.tsx +6 -2
  195. package/lib/components/Inputs/TextInput/index.ts +1 -0
  196. package/lib/components/Inputs/UnitInput/UnitInput.tsx +6 -2
  197. package/lib/components/InputsV2/NumberInputV2/NumberInputV2.tsx +6 -2
  198. package/lib/components/InputsV2/TextAreaV2/TextAreaV2.tsx +2 -1
  199. package/lib/components/InputsV2/TextAreaV2/utils.ts +3 -1
  200. package/lib/components/InputsV2/TextInputV2/TextInputV2.tsx +1 -0
  201. package/lib/components/InputsV2/TextInputV2/utils.ts +6 -8
  202. package/lib/components/InputsV2/UploadV2/UploadContainerV2.tsx +470 -0
  203. package/lib/components/InputsV2/UploadV2/UploadV2.dark.tokens.ts +348 -0
  204. package/lib/components/InputsV2/UploadV2/UploadV2.light.tokens.ts +348 -0
  205. package/lib/components/InputsV2/UploadV2/UploadV2.tokens.ts +20 -0
  206. package/lib/components/InputsV2/UploadV2/UploadV2.tokens.types.ts +117 -0
  207. package/lib/components/InputsV2/UploadV2/UploadV2.tsx +336 -0
  208. package/lib/components/InputsV2/UploadV2/UploadV2.types.ts +67 -0
  209. package/lib/components/InputsV2/UploadV2/index.ts +3 -0
  210. package/lib/components/InputsV2/UploadV2/utils.ts +170 -0
  211. package/lib/components/KeyValuePair/index.ts +1 -0
  212. package/lib/components/Menu/Menu.tsx +18 -2
  213. package/lib/components/Menu/SubMenu.tsx +25 -3
  214. package/lib/components/Menu/index.ts +1 -0
  215. package/lib/components/Menu/types.tsx +14 -0
  216. package/lib/components/Menu/utils.ts +46 -3
  217. package/lib/components/MenuV2/MenuV2.tsx +9 -2
  218. package/lib/components/MenuV2/MenuV2Content.tsx +6 -0
  219. package/lib/components/MenuV2/MenuV2SubMenu.tsx +16 -2
  220. package/lib/components/MenuV2/menuV2.types.ts +11 -0
  221. package/lib/components/MenuV2/menuV2.utils.ts +45 -3
  222. package/lib/components/Modal/index.ts +1 -0
  223. package/lib/components/ModalV2/ModalV2.tsx +269 -0
  224. package/lib/components/ModalV2/ModalV2Footer.tsx +76 -0
  225. package/lib/components/ModalV2/ModalV2Header.tsx +144 -0
  226. package/lib/components/ModalV2/ModalV2Skeleton.tsx +80 -0
  227. package/lib/components/ModalV2/index.ts +4 -0
  228. package/lib/components/ModalV2/mobileModalV2.tsx +411 -0
  229. package/lib/components/ModalV2/modalAnimationV2.tsx +19 -0
  230. package/lib/components/ModalV2/modalV2.dark.tokens.ts +183 -0
  231. package/lib/components/ModalV2/modalV2.light.tokens.ts +183 -0
  232. package/lib/components/ModalV2/modalV2.tokens.ts +21 -0
  233. package/lib/components/ModalV2/modalV2.tokens.types.ts +94 -0
  234. package/lib/components/ModalV2/modalV2.types.ts +80 -0
  235. package/lib/components/MultiSelect/MultiSelect.tsx +4 -1
  236. package/lib/components/MultiSelect/MultiSelectMenu.tsx +8 -0
  237. package/lib/components/MultiSelect/MultiSelectTrigger.tsx +2 -1
  238. package/lib/components/MultiSelect/index.ts +2 -0
  239. package/lib/components/MultiSelect/types.ts +2 -0
  240. package/lib/components/MultiSelectV2/MultiSelectV2.tsx +2 -0
  241. package/lib/components/MultiSelectV2/MultiSelectV2Menu.tsx +8 -0
  242. package/lib/components/MultiSelectV2/MultiSelectV2Trigger.tsx +4 -1
  243. package/lib/components/MultiSelectV2/multiSelectV2.types.ts +2 -0
  244. package/lib/components/Popover/index.ts +1 -0
  245. package/lib/components/Primitives/Block/Block.tsx +1 -1
  246. package/lib/components/ProgressBar/index.ts +1 -0
  247. package/lib/components/Radio/index.ts +2 -0
  248. package/lib/components/Sidebar/Sidebar.tsx +38 -0
  249. package/lib/components/Sidebar/SidebarContent.tsx +25 -1
  250. package/lib/components/Sidebar/index.ts +1 -0
  251. package/lib/components/Sidebar/types.ts +13 -1
  252. package/lib/components/SidebarV2/SidebarV2.tsx +30 -0
  253. package/lib/components/SidebarV2/SidebarV2Panel.tsx +25 -1
  254. package/lib/components/SidebarV2/types.ts +9 -1
  255. package/lib/components/SingleSelect/SingleSelect.tsx +4 -1
  256. package/lib/components/SingleSelect/SingleSelectMenu.tsx +171 -138
  257. package/lib/components/SingleSelect/SingleSelectTrigger.tsx +3 -1
  258. package/lib/components/SingleSelect/index.ts +1 -0
  259. package/lib/components/SingleSelect/types.ts +1 -0
  260. package/lib/components/SingleSelectV2/SingleSelectV2.tsx +2 -0
  261. package/lib/components/SingleSelectV2/SingleSelectV2Menu.tsx +84 -58
  262. package/lib/components/SingleSelectV2/SingleSelectV2Search.tsx +1 -0
  263. package/lib/components/SingleSelectV2/SingleSelectV2Trigger.tsx +3 -1
  264. package/lib/components/SingleSelectV2/singleSelectV2.dark.tokens.ts +8 -0
  265. package/lib/components/SingleSelectV2/singleSelectV2.light.tokens.ts +8 -0
  266. package/lib/components/SingleSelectV2/singleSelectV2.tokens.types.ts +8 -0
  267. package/lib/components/SingleSelectV2/singleSelectV2.types.ts +2 -0
  268. package/lib/components/Skeleton/SkeletonCompound.tsx +45 -31
  269. package/lib/components/Snackbar/Snackbar.tsx +18 -8
  270. package/lib/components/Snackbar/index.ts +2 -0
  271. package/lib/components/Snackbar/snackbar.tokens.ts +6 -0
  272. package/lib/components/Snackbar/types.ts +2 -0
  273. package/lib/components/StatCard/StatCard.tsx +29 -0
  274. package/lib/components/StatCard/index.ts +1 -0
  275. package/lib/components/Stepper/index.ts +1 -0
  276. package/lib/components/Switch/index.ts +2 -0
  277. package/lib/components/Tabs/index.ts +1 -0
  278. package/lib/components/Tags/index.ts +1 -0
  279. package/lib/components/Timeline/Timeline.tsx +9 -1
  280. package/lib/components/Tooltip/index.ts +1 -0
  281. package/lib/components/Topbar/index.ts +1 -0
  282. package/lib/components/Upload/index.ts +1 -0
  283. package/lib/context/ThemeContext.tsx +16 -0
  284. package/lib/context/initComponentTokens.ts +11 -0
  285. package/lib/context/useComponentToken.ts +15 -1
  286. package/lib/hooks/useResponsiveTokens.ts +63 -0
  287. package/lib/main.ts +16 -0
  288. package/lib/node.ts +2 -0
  289. package/package.json +5 -4
  290. package/dist/tokens.d.ts +0 -2
@@ -0,0 +1,177 @@
1
+ import type { FoundationTokenType } from '../../tokens/theme.token'
2
+ import { CardV2Orientation, CardV2Padding, CardV2Variant } from './cardV2.types'
3
+ import type { ResponsiveCardV2Tokens } from './cardV2.tokens.types'
4
+
5
+ export const getCardV2DarkTokens = (
6
+ foundationToken: FoundationTokenType
7
+ ): ResponsiveCardV2Tokens => {
8
+ const lgTokens = {
9
+ width: '100%',
10
+ minWidth: '0',
11
+ maxWidth: '100%',
12
+ borderRadius: foundationToken.border.radius[12],
13
+ border: {
14
+ [CardV2Variant.OUTLINED]: `1px solid ${foundationToken.colors.gray[700]}`,
15
+ [CardV2Variant.ELEVATED]: `1px solid ${foundationToken.colors.gray[700]}`,
16
+ [CardV2Variant.GHOST]: '1px solid transparent',
17
+ },
18
+ backgroundColor: {
19
+ [CardV2Variant.OUTLINED]: foundationToken.colors.gray[900],
20
+ [CardV2Variant.ELEVATED]: foundationToken.colors.gray[900],
21
+ [CardV2Variant.GHOST]: 'transparent',
22
+ },
23
+ boxShadow: {
24
+ [CardV2Variant.OUTLINED]: 'none',
25
+ [CardV2Variant.ELEVATED]: foundationToken.shadows.sm,
26
+ [CardV2Variant.GHOST]: 'none',
27
+ },
28
+ state: {
29
+ hover: {
30
+ border: `1px solid ${foundationToken.colors.gray[600]}`,
31
+ boxShadow: foundationToken.shadows.sm,
32
+ },
33
+ selected: {
34
+ border: `1px solid ${foundationToken.colors.primary[400]}`,
35
+ boxShadow: `0 0 0 3px ${foundationToken.colors.primary[900]}`,
36
+ },
37
+ focus: {
38
+ outline: `2px solid ${foundationToken.colors.primary[400]}`,
39
+ outlineOffset: foundationToken.unit[2],
40
+ },
41
+ },
42
+ padding: {
43
+ [CardV2Padding.NONE]: {
44
+ x: '0',
45
+ y: '0',
46
+ },
47
+ [CardV2Padding.COMPACT]: {
48
+ x: foundationToken.unit[10],
49
+ y: foundationToken.unit[10],
50
+ },
51
+ [CardV2Padding.COMFORTABLE]: {
52
+ x: foundationToken.unit[12],
53
+ y: foundationToken.unit[12],
54
+ },
55
+ },
56
+ layout: {
57
+ gap: foundationToken.unit[10],
58
+ mediaGap: {
59
+ [CardV2Orientation.VERTICAL]: foundationToken.unit[10],
60
+ [CardV2Orientation.HORIZONTAL]: foundationToken.unit[12],
61
+ },
62
+ },
63
+ media: {
64
+ width: foundationToken.unit[64],
65
+ height: foundationToken.unit[64],
66
+ minHeight: '96px',
67
+ borderRadius: foundationToken.border.radius[8],
68
+ backgroundColor: foundationToken.colors.gray[800],
69
+ },
70
+ header: {
71
+ gap: foundationToken.unit[6],
72
+ eyebrow: {
73
+ fontSize: foundationToken.font.fontSize[12],
74
+ fontWeight: foundationToken.font.weight[600],
75
+ lineHeight: foundationToken.font.lineHeight[18],
76
+ color: foundationToken.colors.gray[300],
77
+ },
78
+ title: {
79
+ fontSize: foundationToken.font.fontSize[16],
80
+ fontWeight: foundationToken.font.weight[600],
81
+ lineHeight: foundationToken.font.lineHeight[24],
82
+ color: foundationToken.colors.gray[50],
83
+ },
84
+ subtitle: {
85
+ fontSize: foundationToken.font.fontSize[14],
86
+ fontWeight: foundationToken.font.weight[500],
87
+ lineHeight: foundationToken.font.lineHeight[20],
88
+ color: foundationToken.colors.gray[300],
89
+ },
90
+ },
91
+ body: {
92
+ gap: foundationToken.unit[10],
93
+ description: {
94
+ fontSize: foundationToken.font.fontSize[14],
95
+ fontWeight: foundationToken.font.weight[400],
96
+ lineHeight: foundationToken.font.lineHeight[20],
97
+ color: foundationToken.colors.gray[200],
98
+ },
99
+ },
100
+ footer: {
101
+ gap: foundationToken.unit[8],
102
+ paddingTop: foundationToken.unit[10],
103
+ borderTop: `1px solid ${foundationToken.colors.gray[700]}`,
104
+ },
105
+ actions: {
106
+ gap: foundationToken.unit[8],
107
+ },
108
+ }
109
+
110
+ const smTokens = {
111
+ ...lgTokens,
112
+ borderRadius: foundationToken.border.radius[8],
113
+ padding: {
114
+ [CardV2Padding.NONE]: {
115
+ x: '0',
116
+ y: '0',
117
+ },
118
+ [CardV2Padding.COMPACT]: {
119
+ x: foundationToken.unit[8],
120
+ y: foundationToken.unit[8],
121
+ },
122
+ [CardV2Padding.COMFORTABLE]: {
123
+ x: foundationToken.unit[10],
124
+ y: foundationToken.unit[10],
125
+ },
126
+ },
127
+ layout: {
128
+ gap: foundationToken.unit[8],
129
+ mediaGap: {
130
+ [CardV2Orientation.VERTICAL]: foundationToken.unit[8],
131
+ [CardV2Orientation.HORIZONTAL]: foundationToken.unit[10],
132
+ },
133
+ },
134
+ media: {
135
+ ...lgTokens.media,
136
+ width: foundationToken.unit[56],
137
+ height: foundationToken.unit[56],
138
+ minHeight: '80px',
139
+ },
140
+ header: {
141
+ ...lgTokens.header,
142
+ gap: foundationToken.unit[4],
143
+ title: {
144
+ ...lgTokens.header.title,
145
+ fontSize: foundationToken.font.fontSize[14],
146
+ lineHeight: foundationToken.font.lineHeight[20],
147
+ },
148
+ subtitle: {
149
+ ...lgTokens.header.subtitle,
150
+ fontSize: foundationToken.font.fontSize[12],
151
+ lineHeight: foundationToken.font.lineHeight[18],
152
+ },
153
+ },
154
+ body: {
155
+ ...lgTokens.body,
156
+ gap: foundationToken.unit[8],
157
+ description: {
158
+ ...lgTokens.body.description,
159
+ fontSize: foundationToken.font.fontSize[12],
160
+ lineHeight: foundationToken.font.lineHeight[18],
161
+ },
162
+ },
163
+ footer: {
164
+ ...lgTokens.footer,
165
+ gap: foundationToken.unit[6],
166
+ paddingTop: foundationToken.unit[8],
167
+ },
168
+ actions: {
169
+ gap: foundationToken.unit[6],
170
+ },
171
+ }
172
+
173
+ return {
174
+ sm: smTokens,
175
+ lg: lgTokens,
176
+ }
177
+ }
@@ -0,0 +1,177 @@
1
+ import type { FoundationTokenType } from '../../tokens/theme.token'
2
+ import { CardV2Orientation, CardV2Padding, CardV2Variant } from './cardV2.types'
3
+ import type { ResponsiveCardV2Tokens } from './cardV2.tokens.types'
4
+
5
+ export const getCardV2LightTokens = (
6
+ foundationToken: FoundationTokenType
7
+ ): ResponsiveCardV2Tokens => {
8
+ const lgTokens = {
9
+ width: '100%',
10
+ minWidth: '0',
11
+ maxWidth: '100%',
12
+ borderRadius: foundationToken.border.radius[12],
13
+ border: {
14
+ [CardV2Variant.OUTLINED]: `1px solid ${foundationToken.colors.gray[200]}`,
15
+ [CardV2Variant.ELEVATED]: `1px solid ${foundationToken.colors.gray[100]}`,
16
+ [CardV2Variant.GHOST]: '1px solid transparent',
17
+ },
18
+ backgroundColor: {
19
+ [CardV2Variant.OUTLINED]: foundationToken.colors.gray[0],
20
+ [CardV2Variant.ELEVATED]: foundationToken.colors.gray[0],
21
+ [CardV2Variant.GHOST]: 'transparent',
22
+ },
23
+ boxShadow: {
24
+ [CardV2Variant.OUTLINED]: 'none',
25
+ [CardV2Variant.ELEVATED]: foundationToken.shadows.sm,
26
+ [CardV2Variant.GHOST]: 'none',
27
+ },
28
+ state: {
29
+ hover: {
30
+ border: `1px solid ${foundationToken.colors.gray[300]}`,
31
+ boxShadow: foundationToken.shadows.sm,
32
+ },
33
+ selected: {
34
+ border: `1px solid ${foundationToken.colors.primary[500]}`,
35
+ boxShadow: `0 0 0 3px ${foundationToken.colors.primary[50]}`,
36
+ },
37
+ focus: {
38
+ outline: `2px solid ${foundationToken.colors.primary[500]}`,
39
+ outlineOffset: foundationToken.unit[2],
40
+ },
41
+ },
42
+ padding: {
43
+ [CardV2Padding.NONE]: {
44
+ x: '0',
45
+ y: '0',
46
+ },
47
+ [CardV2Padding.COMPACT]: {
48
+ x: foundationToken.unit[10],
49
+ y: foundationToken.unit[10],
50
+ },
51
+ [CardV2Padding.COMFORTABLE]: {
52
+ x: foundationToken.unit[12],
53
+ y: foundationToken.unit[12],
54
+ },
55
+ },
56
+ layout: {
57
+ gap: foundationToken.unit[10],
58
+ mediaGap: {
59
+ [CardV2Orientation.VERTICAL]: foundationToken.unit[10],
60
+ [CardV2Orientation.HORIZONTAL]: foundationToken.unit[12],
61
+ },
62
+ },
63
+ media: {
64
+ width: foundationToken.unit[64],
65
+ height: foundationToken.unit[64],
66
+ minHeight: '96px',
67
+ borderRadius: foundationToken.border.radius[8],
68
+ backgroundColor: foundationToken.colors.gray[50],
69
+ },
70
+ header: {
71
+ gap: foundationToken.unit[6],
72
+ eyebrow: {
73
+ fontSize: foundationToken.font.fontSize[12],
74
+ fontWeight: foundationToken.font.weight[600],
75
+ lineHeight: foundationToken.font.lineHeight[18],
76
+ color: foundationToken.colors.gray[500],
77
+ },
78
+ title: {
79
+ fontSize: foundationToken.font.fontSize[16],
80
+ fontWeight: foundationToken.font.weight[600],
81
+ lineHeight: foundationToken.font.lineHeight[24],
82
+ color: foundationToken.colors.gray[800],
83
+ },
84
+ subtitle: {
85
+ fontSize: foundationToken.font.fontSize[14],
86
+ fontWeight: foundationToken.font.weight[500],
87
+ lineHeight: foundationToken.font.lineHeight[20],
88
+ color: foundationToken.colors.gray[500],
89
+ },
90
+ },
91
+ body: {
92
+ gap: foundationToken.unit[10],
93
+ description: {
94
+ fontSize: foundationToken.font.fontSize[14],
95
+ fontWeight: foundationToken.font.weight[400],
96
+ lineHeight: foundationToken.font.lineHeight[20],
97
+ color: foundationToken.colors.gray[600],
98
+ },
99
+ },
100
+ footer: {
101
+ gap: foundationToken.unit[8],
102
+ paddingTop: foundationToken.unit[10],
103
+ borderTop: `1px solid ${foundationToken.colors.gray[100]}`,
104
+ },
105
+ actions: {
106
+ gap: foundationToken.unit[8],
107
+ },
108
+ }
109
+
110
+ const smTokens = {
111
+ ...lgTokens,
112
+ borderRadius: foundationToken.border.radius[8],
113
+ padding: {
114
+ [CardV2Padding.NONE]: {
115
+ x: '0',
116
+ y: '0',
117
+ },
118
+ [CardV2Padding.COMPACT]: {
119
+ x: foundationToken.unit[8],
120
+ y: foundationToken.unit[8],
121
+ },
122
+ [CardV2Padding.COMFORTABLE]: {
123
+ x: foundationToken.unit[10],
124
+ y: foundationToken.unit[10],
125
+ },
126
+ },
127
+ layout: {
128
+ gap: foundationToken.unit[8],
129
+ mediaGap: {
130
+ [CardV2Orientation.VERTICAL]: foundationToken.unit[8],
131
+ [CardV2Orientation.HORIZONTAL]: foundationToken.unit[10],
132
+ },
133
+ },
134
+ media: {
135
+ ...lgTokens.media,
136
+ width: foundationToken.unit[56],
137
+ height: foundationToken.unit[56],
138
+ minHeight: '80px',
139
+ },
140
+ header: {
141
+ ...lgTokens.header,
142
+ gap: foundationToken.unit[4],
143
+ title: {
144
+ ...lgTokens.header.title,
145
+ fontSize: foundationToken.font.fontSize[14],
146
+ lineHeight: foundationToken.font.lineHeight[20],
147
+ },
148
+ subtitle: {
149
+ ...lgTokens.header.subtitle,
150
+ fontSize: foundationToken.font.fontSize[12],
151
+ lineHeight: foundationToken.font.lineHeight[18],
152
+ },
153
+ },
154
+ body: {
155
+ ...lgTokens.body,
156
+ gap: foundationToken.unit[8],
157
+ description: {
158
+ ...lgTokens.body.description,
159
+ fontSize: foundationToken.font.fontSize[12],
160
+ lineHeight: foundationToken.font.lineHeight[18],
161
+ },
162
+ },
163
+ footer: {
164
+ ...lgTokens.footer,
165
+ gap: foundationToken.unit[6],
166
+ paddingTop: foundationToken.unit[8],
167
+ },
168
+ actions: {
169
+ gap: foundationToken.unit[6],
170
+ },
171
+ }
172
+
173
+ return {
174
+ sm: smTokens,
175
+ lg: lgTokens,
176
+ }
177
+ }
@@ -0,0 +1,21 @@
1
+ import type { FoundationTokenType } from '../../tokens/theme.token'
2
+ import { Theme } from '../../context/theme.enum'
3
+ import { getCardV2DarkTokens } from './cardV2.dark.tokens'
4
+ import { getCardV2LightTokens } from './cardV2.light.tokens'
5
+ import type { ResponsiveCardV2Tokens } from './cardV2.tokens.types'
6
+
7
+ export type {
8
+ CardV2TokensType,
9
+ ResponsiveCardV2Tokens,
10
+ } from './cardV2.tokens.types'
11
+
12
+ export const getCardV2Tokens = (
13
+ foundationToken: FoundationTokenType,
14
+ theme: Theme | string = Theme.LIGHT
15
+ ): ResponsiveCardV2Tokens => {
16
+ if (theme === Theme.DARK || theme === 'dark') {
17
+ return getCardV2DarkTokens(foundationToken)
18
+ }
19
+
20
+ return getCardV2LightTokens(foundationToken)
21
+ }
@@ -0,0 +1,94 @@
1
+ import type { CSSObject } from 'styled-components'
2
+ import type { BreakpointType } from '../../breakpoints/breakPoints'
3
+ import { CardV2Orientation, CardV2Padding, CardV2Variant } from './cardV2.types'
4
+
5
+ export type CardV2TokensType = {
6
+ width: CSSObject['width']
7
+ minWidth: CSSObject['minWidth']
8
+ maxWidth: CSSObject['maxWidth']
9
+ borderRadius: CSSObject['borderRadius']
10
+ border: {
11
+ [key in CardV2Variant]: CSSObject['border']
12
+ }
13
+ backgroundColor: {
14
+ [key in CardV2Variant]: CSSObject['backgroundColor']
15
+ }
16
+ boxShadow: {
17
+ [key in CardV2Variant]: CSSObject['boxShadow']
18
+ }
19
+ state: {
20
+ hover: {
21
+ border: CSSObject['border']
22
+ boxShadow: CSSObject['boxShadow']
23
+ }
24
+ selected: {
25
+ border: CSSObject['border']
26
+ boxShadow: CSSObject['boxShadow']
27
+ }
28
+ focus: {
29
+ outline: CSSObject['outline']
30
+ outlineOffset: CSSObject['outlineOffset']
31
+ }
32
+ }
33
+ padding: {
34
+ [key in CardV2Padding]: {
35
+ x: CSSObject['padding']
36
+ y: CSSObject['padding']
37
+ }
38
+ }
39
+ layout: {
40
+ gap: CSSObject['gap']
41
+ mediaGap: {
42
+ [key in CardV2Orientation]: CSSObject['gap']
43
+ }
44
+ }
45
+ media: {
46
+ width: CSSObject['width']
47
+ height: CSSObject['height']
48
+ minHeight: CSSObject['minHeight']
49
+ borderRadius: CSSObject['borderRadius']
50
+ backgroundColor: CSSObject['backgroundColor']
51
+ }
52
+ header: {
53
+ gap: CSSObject['gap']
54
+ eyebrow: {
55
+ fontSize: CSSObject['fontSize']
56
+ fontWeight: CSSObject['fontWeight']
57
+ lineHeight: CSSObject['lineHeight']
58
+ color: CSSObject['color']
59
+ }
60
+ title: {
61
+ fontSize: CSSObject['fontSize']
62
+ fontWeight: CSSObject['fontWeight']
63
+ lineHeight: CSSObject['lineHeight']
64
+ color: CSSObject['color']
65
+ }
66
+ subtitle: {
67
+ fontSize: CSSObject['fontSize']
68
+ fontWeight: CSSObject['fontWeight']
69
+ lineHeight: CSSObject['lineHeight']
70
+ color: CSSObject['color']
71
+ }
72
+ }
73
+ body: {
74
+ gap: CSSObject['gap']
75
+ description: {
76
+ fontSize: CSSObject['fontSize']
77
+ fontWeight: CSSObject['fontWeight']
78
+ lineHeight: CSSObject['lineHeight']
79
+ color: CSSObject['color']
80
+ }
81
+ }
82
+ footer: {
83
+ gap: CSSObject['gap']
84
+ paddingTop: CSSObject['paddingTop']
85
+ borderTop: CSSObject['borderTop']
86
+ }
87
+ actions: {
88
+ gap: CSSObject['gap']
89
+ }
90
+ }
91
+
92
+ export type ResponsiveCardV2Tokens = {
93
+ [key in keyof BreakpointType]: CardV2TokensType
94
+ }
@@ -0,0 +1,131 @@
1
+ import type {
2
+ FC,
3
+ ForwardRefExoticComponent,
4
+ ReactNode,
5
+ RefAttributes,
6
+ } from 'react'
7
+ import type { CSSObject } from 'styled-components'
8
+ import type { ButtonV2Props } from '../ButtonV2/buttonV2.types'
9
+ import type { SkeletonVariant } from '../Skeleton/types'
10
+
11
+ export enum CardV2Variant {
12
+ OUTLINED = 'outlined',
13
+ ELEVATED = 'elevated',
14
+ GHOST = 'ghost',
15
+ }
16
+
17
+ export enum CardV2Orientation {
18
+ VERTICAL = 'vertical',
19
+ HORIZONTAL = 'horizontal',
20
+ }
21
+
22
+ export enum CardV2Padding {
23
+ NONE = 'none',
24
+ COMPACT = 'compact',
25
+ COMFORTABLE = 'comfortable',
26
+ }
27
+
28
+ export enum CardV2ActionPlacement {
29
+ BODY = 'body',
30
+ FOOTER = 'footer',
31
+ }
32
+
33
+ export type CardV2SkeletonProps = {
34
+ show?: boolean
35
+ variant?: SkeletonVariant
36
+ height?: CSSObject['height']
37
+ width?: CSSObject['width']
38
+ }
39
+
40
+ export type CardV2Action = ButtonV2Props
41
+
42
+ export type CardV2SectionProps = {
43
+ children?: ReactNode
44
+ }
45
+
46
+ export type CardV2HeaderProps = {
47
+ title?: ReactNode
48
+ truncateTitle?: boolean
49
+ subtitle?: ReactNode
50
+ eyebrow?: ReactNode
51
+ leadingSlot?: ReactNode
52
+ trailingSlot?: ReactNode
53
+ centered?: boolean
54
+ }
55
+
56
+ export type CardV2MetaProps = Pick<
57
+ CardV2HeaderProps,
58
+ 'title' | 'truncateTitle' | 'subtitle' | 'eyebrow' | 'centered'
59
+ >
60
+
61
+ export type CardV2MediaProps = CardV2SectionProps & {
62
+ orientation?: CardV2Orientation
63
+ width?: CSSObject['width']
64
+ height?: CSSObject['height']
65
+ minHeight?: CSSObject['minHeight']
66
+ }
67
+
68
+ export type CardV2BodyProps = CardV2SectionProps & {
69
+ description?: ReactNode
70
+ actions?: CardV2Action | CardV2Action[]
71
+ centered?: boolean
72
+ scrollable?: boolean
73
+ }
74
+
75
+ export type CardV2ActionsProps = {
76
+ actions?: CardV2Action | CardV2Action[]
77
+ centered?: boolean
78
+ }
79
+
80
+ export type CardV2FooterProps = CardV2SectionProps & {
81
+ actions?: CardV2Action | CardV2Action[]
82
+ centered?: boolean
83
+ divider?: boolean
84
+ }
85
+
86
+ export type CardV2Props = {
87
+ variant?: CardV2Variant
88
+ orientation?: CardV2Orientation
89
+ padding?: CardV2Padding
90
+ title?: ReactNode
91
+ truncateTitle?: boolean
92
+ subtitle?: ReactNode
93
+ description?: ReactNode
94
+ eyebrow?: ReactNode
95
+ media?: ReactNode
96
+ mediaWidth?: CSSObject['width']
97
+ mediaHeight?: CSSObject['height']
98
+ mediaMinHeight?: CSSObject['minHeight']
99
+ leadingSlot?: ReactNode
100
+ trailingSlot?: ReactNode
101
+ footer?: ReactNode
102
+ actions?: CardV2Action | CardV2Action[]
103
+ actionPlacement?: CardV2ActionPlacement
104
+ centered?: boolean
105
+ interactive?: boolean
106
+ selected?: boolean
107
+ skeleton?: CardV2SkeletonProps
108
+ width?: CSSObject['width']
109
+ minWidth?: CSSObject['minWidth']
110
+ maxWidth?: CSSObject['maxWidth']
111
+ height?: CSSObject['height']
112
+ minHeight?: CSSObject['minHeight']
113
+ maxHeight?: CSSObject['maxHeight']
114
+ scrollable?: boolean
115
+ children?: ReactNode
116
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'children'>
117
+
118
+ export type CardV2Component = ForwardRefExoticComponent<
119
+ CardV2Props & RefAttributes<HTMLDivElement>
120
+ > & {
121
+ Header: FC<CardV2HeaderProps>
122
+ Meta: FC<CardV2MetaProps>
123
+ Media: FC<CardV2MediaProps>
124
+ Body: FC<CardV2BodyProps>
125
+ Content: FC<CardV2SectionProps>
126
+ Actions: FC<CardV2ActionsProps>
127
+ Footer: FC<CardV2FooterProps>
128
+ Skeleton: FC<{
129
+ skeleton?: CardV2SkeletonProps
130
+ }>
131
+ }
@@ -0,0 +1,13 @@
1
+ export { default as CardV2 } from './CardV2'
2
+ export {
3
+ CardV2Actions,
4
+ CardV2Body,
5
+ CardV2Content,
6
+ CardV2Footer,
7
+ CardV2Header,
8
+ CardV2Media,
9
+ CardV2Meta,
10
+ } from './CardV2Components'
11
+ export { default as CardV2Skeleton } from './CardV2Skeleton'
12
+ export * from './cardV2.types'
13
+ export * from './cardV2.tokens'
@@ -196,6 +196,7 @@ const ChartLegendsComponent: React.FC<ChartLegendsProps> = ({
196
196
  stacked = false,
197
197
  isSmallScreen = false,
198
198
  stackedLegendsData,
199
+ showAllLegends = false,
199
200
  }) => {
200
201
  const chartTokens = useResponsiveTokens<ChartTokensType>('CHARTS')
201
202
  const legendTokens = chartTokens.content.legend
@@ -211,6 +212,12 @@ const ChartLegendsComponent: React.FC<ChartLegendsProps> = ({
211
212
  const isExpanding = useRef<boolean>(false)
212
213
  // Have to revisit from optimizaion POV.
213
214
  const handleResize = useCallback(() => {
215
+ if (showAllLegends) {
216
+ setCuttOffIndex(displayLegends.length)
217
+ setIsLoading(false)
218
+ return
219
+ }
220
+
214
221
  if (!legendItemsContainerRef.current) {
215
222
  setIsLoading(false)
216
223
  return
@@ -270,11 +277,16 @@ const ChartLegendsComponent: React.FC<ChartLegendsProps> = ({
270
277
  const newCutoff = Math.max(1, Math.min(optimalCutoff, totalLegends))
271
278
  setCuttOffIndex(newCutoff)
272
279
  setIsLoading(false)
273
- }, [displayLegends, legendTokens.gap])
280
+ }, [displayLegends, legendTokens.gap, showAllLegends])
274
281
 
275
282
  const debouncedResize = useDebounce(handleResize, 150)
276
283
 
277
284
  useResizeObserver(chartContainerRef, ({ width }) => {
285
+ if (showAllLegends) {
286
+ lastWidth.current = width
287
+ return
288
+ }
289
+
278
290
  if (width && Math.abs(width - lastWidth.current) > 10) {
279
291
  setIsLoading(true)
280
292
  if (width > lastWidth.current + 20) {
@@ -287,6 +299,13 @@ const ChartLegendsComponent: React.FC<ChartLegendsProps> = ({
287
299
  })
288
300
 
289
301
  useEffect(() => {
302
+ if (showAllLegends) {
303
+ setIsLoading(false)
304
+ setCuttOffIndex(displayLegends.length)
305
+ isExpanding.current = false
306
+ return
307
+ }
308
+
290
309
  setIsLoading(true)
291
310
  setCuttOffIndex(displayLegends.length)
292
311
  isExpanding.current = false
@@ -296,7 +315,7 @@ const ChartLegendsComponent: React.FC<ChartLegendsProps> = ({
296
315
  }, 150)
297
316
 
298
317
  return () => clearTimeout(timeoutId)
299
- }, [displayLegends, handleResize])
318
+ }, [displayLegends, handleResize, showAllLegends])
300
319
 
301
320
  const getItemOpacity = (dataKey: string) => {
302
321
  if (hoveredKey) {
@@ -367,11 +386,12 @@ const ChartLegendsComponent: React.FC<ChartLegendsProps> = ({
367
386
  <Block
368
387
  ref={legendItemsContainerRef}
369
388
  display="flex"
370
- height={FOUNDATION_THEME.unit[28]}
389
+ height={showAllLegends ? 'auto' : FOUNDATION_THEME.unit[28]}
371
390
  alignItems="center"
372
- overflowX="hidden"
391
+ flexWrap={showAllLegends ? 'wrap' : 'nowrap'}
392
+ overflowX={showAllLegends ? 'visible' : 'hidden'}
373
393
  overflowY="visible"
374
- whiteSpace="nowrap"
394
+ whiteSpace={showAllLegends ? 'normal' : 'nowrap'}
375
395
  style={{ flex: 1, opacity: isLoading ? 0 : 1 }}
376
396
  justifyContent={isSmallScreen ? 'center' : 'start'}
377
397
  gap={legendTokens.gap}