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

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 (423) hide show
  1. package/dist/components/AccordionV2/accordionV2.dark.tokens.d.ts +1 -1
  2. package/dist/components/AccordionV2/accordionV2.light.tokens.d.ts +1 -1
  3. package/dist/components/AccordionV2/accordionV2.tokens.d.ts +2 -67
  4. package/dist/components/AccordionV2/accordionV2.tokens.types.d.ts +67 -0
  5. package/dist/components/AlertV2/alertV2.dark.tokens.d.ts +1 -1
  6. package/dist/components/AlertV2/alertV2.light.tokens.d.ts +1 -1
  7. package/dist/components/AlertV2/alertV2.tokens.d.ts +2 -84
  8. package/dist/components/AlertV2/alertV2.tokens.types.d.ts +84 -0
  9. package/dist/components/Avatar/types.d.ts +1 -1
  10. package/dist/components/AvatarGroup/types.d.ts +1 -1
  11. package/dist/components/AvatarV2/avatarV2.dark.tokens.d.ts +1 -1
  12. package/dist/components/AvatarV2/avatarV2.light.tokens.d.ts +1 -1
  13. package/dist/components/AvatarV2/avatarV2.tokens.d.ts +2 -67
  14. package/dist/components/AvatarV2/avatarV2.tokens.types.d.ts +67 -0
  15. package/dist/components/Badge/badge.dark.tokens.d.ts +1 -1
  16. package/dist/components/Badge/badge.light.tokens.d.ts +1 -1
  17. package/dist/components/Badge/badge.tokens.d.ts +2 -52
  18. package/dist/components/Badge/badge.tokens.types.d.ts +52 -0
  19. package/dist/components/Breadcrumb/types.d.ts +1 -1
  20. package/dist/components/BreadcrumbV2/BreadcrumbV2.d.ts +13 -1
  21. package/dist/components/BreadcrumbV2/breadcrumbV2.dark.tokens.d.ts +1 -1
  22. package/dist/components/BreadcrumbV2/breadcrumbV2.light.tokens.d.ts +1 -1
  23. package/dist/components/BreadcrumbV2/breadcrumbV2.tokens.d.ts +2 -28
  24. package/dist/components/BreadcrumbV2/breadcrumbV2.tokens.types.d.ts +28 -0
  25. package/dist/components/BreadcrumbV2/breadcrumbV2.types.d.ts +0 -11
  26. package/dist/components/ButtonGroup/types.d.ts +1 -1
  27. package/dist/components/ButtonV2/buttonV2.dark.tokens.d.ts +1 -1
  28. package/dist/components/ButtonV2/buttonV2.light.tokens.d.ts +1 -1
  29. package/dist/components/ButtonV2/buttonV2.tokens.d.ts +2 -64
  30. package/dist/components/ButtonV2/buttonV2.tokens.types.d.ts +64 -0
  31. package/dist/components/Card/types.d.ts +1 -1
  32. package/dist/components/Charts/types.d.ts +2 -2
  33. package/dist/components/ChartsV2/chartV2.dark.tokens.d.ts +1 -1
  34. package/dist/components/ChartsV2/chartV2.light.tokens.d.ts +1 -1
  35. package/dist/components/ChartsV2/chartV2.tokens.d.ts +2 -99
  36. package/dist/components/ChartsV2/chartV2.tokens.types.d.ts +99 -0
  37. package/dist/components/ChartsV2/chartV2.types.d.ts +2 -2
  38. package/dist/components/ChatInput/AttachmentFile.d.ts +2 -1
  39. package/dist/components/ChatInput/ChatInput.d.ts +5 -5
  40. package/dist/components/ChatInput/MobileChatInput.d.ts +2 -1
  41. package/dist/components/ChatInput/getDocIcon.d.ts +3 -0
  42. package/dist/components/CodeEditorV2/codeEditorV2.dark.tokens.d.ts +1 -1
  43. package/dist/components/CodeEditorV2/codeEditorV2.light.token.d.ts +1 -1
  44. package/dist/components/CodeEditorV2/codeEditorV2.tokens.d.ts +2 -91
  45. package/dist/components/CodeEditorV2/codeEditorV2.tokens.types.d.ts +95 -0
  46. package/dist/components/CodeEditorV2/codeEditorV2.types.d.ts +2 -6
  47. package/dist/components/DataTable/TableBody/types.d.ts +1 -0
  48. package/dist/components/DataTable/TableCell/types.d.ts +1 -0
  49. package/dist/components/DataTable/columnTypes.d.ts +5 -3
  50. package/dist/components/DataTable/dataTable.tokens.d.ts +4 -0
  51. package/dist/components/DataTable/types.d.ts +20 -2
  52. package/dist/components/DataTable/utils.d.ts +4 -3
  53. package/dist/components/InputsV2/ChatInputV2/ChatInputV2.dark.tokens.d.ts +1 -1
  54. package/dist/components/InputsV2/ChatInputV2/ChatInputV2.light.tokens.d.ts +1 -1
  55. package/dist/components/InputsV2/ChatInputV2/ChatInputV2.tokens.d.ts +2 -121
  56. package/dist/components/InputsV2/ChatInputV2/ChatInputV2.tokens.types.d.ts +121 -0
  57. package/dist/components/InputsV2/ChatInputV2/ChatInputV2Mobile.dark.tokens.d.ts +1 -1
  58. package/dist/components/InputsV2/ChatInputV2/ChatInputV2Mobile.light.tokens.d.ts +1 -1
  59. package/dist/components/InputsV2/ChatInputV2/ChatInputV2Mobile.tokens.d.ts +2 -56
  60. package/dist/components/InputsV2/ChatInputV2/ChatInputV2Mobile.tokens.types.d.ts +56 -0
  61. package/dist/components/InputsV2/ChatInputV2/MobileChatInputV2.d.ts +1 -1
  62. package/dist/components/InputsV2/MultiValueInputV2/MultiValueInputV2.dark.tokens.d.ts +1 -1
  63. package/dist/components/InputsV2/MultiValueInputV2/MultiValueInputV2.light.tokens.d.ts +1 -1
  64. package/dist/components/InputsV2/MultiValueInputV2/MultiValueInputV2.tokens.d.ts +2 -71
  65. package/dist/components/InputsV2/MultiValueInputV2/MultiValueInputV2.tokens.types.d.ts +71 -0
  66. package/dist/components/InputsV2/NumberInputV2/NumberInputV2.d.ts +1 -1
  67. package/dist/components/InputsV2/NumberInputV2/NumberInputV2.dark.tokens.d.ts +1 -1
  68. package/dist/components/InputsV2/NumberInputV2/NumberInputV2.light.tokens.d.ts +1 -1
  69. package/dist/components/InputsV2/NumberInputV2/numberInputV2.tokens.d.ts +2 -132
  70. package/dist/components/InputsV2/NumberInputV2/numberInputV2.tokens.types.d.ts +132 -0
  71. package/dist/components/InputsV2/OTPInputV2/OTPInputV2.dark.tokens.d.ts +1 -1
  72. package/dist/components/InputsV2/OTPInputV2/OTPInputV2.light.tokens.d.ts +1 -1
  73. package/dist/components/InputsV2/OTPInputV2/OTPInputV2.tokens.d.ts +2 -31
  74. package/dist/components/InputsV2/OTPInputV2/OTPInputV2.tokens.types.d.ts +31 -0
  75. package/dist/components/InputsV2/SearchInputV2/SearchInputV2.dark.tokens.d.ts +1 -1
  76. package/dist/components/InputsV2/SearchInputV2/SearchInputV2.light.tokens.d.ts +1 -1
  77. package/dist/components/InputsV2/SearchInputV2/SearchInputV2.tokens.d.ts +2 -89
  78. package/dist/components/InputsV2/SearchInputV2/SearchInputV2.tokens.types.d.ts +89 -0
  79. package/dist/components/InputsV2/TextAreaV2/TextAreaV2.dark.tokens.d.ts +1 -1
  80. package/dist/components/InputsV2/TextAreaV2/TextAreaV2.light.tokens.d.ts +1 -1
  81. package/dist/components/InputsV2/TextAreaV2/TextAreaV2.tokens.d.ts +2 -60
  82. package/dist/components/InputsV2/TextAreaV2/TextAreaV2.tokens.types.d.ts +60 -0
  83. package/dist/components/InputsV2/TextInputV2/TextInputV2.dark.tokens.d.ts +1 -1
  84. package/dist/components/InputsV2/TextInputV2/TextInputV2.light.tokens.d.ts +1 -1
  85. package/dist/components/InputsV2/TextInputV2/TextInputV2.tokens.d.ts +2 -133
  86. package/dist/components/InputsV2/TextInputV2/TextInputV2.tokens.types.d.ts +133 -0
  87. package/dist/components/KeyValuePairV2/keyValuePairV2.dark.tokens.d.ts +1 -1
  88. package/dist/components/KeyValuePairV2/keyValuePairV2.light.tokens.d.ts +1 -1
  89. package/dist/components/KeyValuePairV2/keyValuePairV2.tokens.d.ts +2 -25
  90. package/dist/components/KeyValuePairV2/keyValuePairV2.tokens.types.d.ts +25 -0
  91. package/dist/components/Menu/types.d.ts +1 -1
  92. package/dist/components/MenuV2/menuV2.dark.tokens.d.ts +1 -1
  93. package/dist/components/MenuV2/menuV2.light.tokens.d.ts +1 -1
  94. package/dist/components/MenuV2/menuV2.tokens.d.ts +2 -88
  95. package/dist/components/MenuV2/menuV2.tokens.types.d.ts +89 -0
  96. package/dist/components/Modal/types.d.ts +2 -2
  97. package/dist/components/MultiSelect/types.d.ts +1 -1
  98. package/dist/components/MultiSelectV2/multiSelectV2.dark.tokens.d.ts +1 -1
  99. package/dist/components/MultiSelectV2/multiSelectV2.light.tokens.d.ts +1 -1
  100. package/dist/components/MultiSelectV2/multiSelectV2.tokens.d.ts +2 -213
  101. package/dist/components/MultiSelectV2/multiSelectV2.tokens.types.d.ts +213 -0
  102. package/dist/components/Popover/types.d.ts +2 -2
  103. package/dist/components/PopoverV2/popoverV2.dark.tokens.d.ts +1 -1
  104. package/dist/components/PopoverV2/popoverV2.light.tokens.d.ts +1 -1
  105. package/dist/components/PopoverV2/popoverV2.token.d.ts +2 -69
  106. package/dist/components/PopoverV2/popoverV2.tokens.types.d.ts +70 -0
  107. package/dist/components/PopoverV2/popoverV2.types.d.ts +2 -2
  108. package/dist/components/ProgressBarV2/progressBarV2.dark.tokens.d.ts +1 -1
  109. package/dist/components/ProgressBarV2/progressBarV2.light.tokens.d.ts +1 -1
  110. package/dist/components/ProgressBarV2/progressBarV2.tokens.d.ts +2 -60
  111. package/dist/components/ProgressBarV2/progressBarV2.tokens.types.d.ts +76 -0
  112. package/dist/components/ProgressBarV2/progressBarV2.types.d.ts +2 -18
  113. package/dist/components/SelectV2/selectV2.shared.types.d.ts +1 -1
  114. package/dist/components/SelectorV2/CheckboxV2/checkboxV2.dark.tokens.d.ts +1 -1
  115. package/dist/components/SelectorV2/CheckboxV2/checkboxV2.light.tokens.d.ts +1 -1
  116. package/dist/components/SelectorV2/CheckboxV2/checkboxV2.tokens.d.ts +2 -91
  117. package/dist/components/SelectorV2/CheckboxV2/checkboxV2.tokens.types.d.ts +95 -0
  118. package/dist/components/SelectorV2/CheckboxV2/checkboxV2.types.d.ts +2 -6
  119. package/dist/components/SelectorV2/RadioV2/radioV2.dark.tokens.d.ts +1 -1
  120. package/dist/components/SelectorV2/RadioV2/radioV2.light.tokens.d.ts +1 -1
  121. package/dist/components/SelectorV2/RadioV2/radioV2.tokens.d.ts +2 -80
  122. package/dist/components/SelectorV2/RadioV2/radioV2.tokens.types.d.ts +80 -0
  123. package/dist/components/SelectorV2/RadioV2/radioV2.types.d.ts +2 -2
  124. package/dist/components/SelectorV2/SwitchV2/switchV2.dark.tokens.d.ts +1 -1
  125. package/dist/components/SelectorV2/SwitchV2/switchV2.light.tokens.d.ts +1 -1
  126. package/dist/components/SelectorV2/SwitchV2/switchV2.tokens.d.ts +2 -74
  127. package/dist/components/SelectorV2/SwitchV2/switchV2.tokens.types.d.ts +74 -0
  128. package/dist/components/SelectorV2/SwitchV2/switchV2.types.d.ts +2 -2
  129. package/dist/components/Sidebar/types.d.ts +2 -23
  130. package/dist/components/SidebarV2/SidebarV2MobileNavigation/mobile.dark.tokens.d.ts +1 -1
  131. package/dist/components/SidebarV2/SidebarV2MobileNavigation/mobile.light.tokens.d.ts +1 -1
  132. package/dist/components/SidebarV2/SidebarV2MobileNavigation/mobile.tokens.d.ts +2 -84
  133. package/dist/components/SidebarV2/SidebarV2MobileNavigation/mobile.tokens.types.d.ts +84 -0
  134. package/dist/components/SidebarV2/SidebarV2MobileNavigation/types.d.ts +1 -1
  135. package/dist/components/SidebarV2/sidebarV2.dark.tokens.d.ts +1 -1
  136. package/dist/components/SidebarV2/sidebarV2.light.tokens.d.ts +1 -1
  137. package/dist/components/SidebarV2/sidebarV2.tokens.d.ts +2 -103
  138. package/dist/components/SidebarV2/sidebarV2.tokens.types.d.ts +103 -0
  139. package/dist/components/SingleSelect/types.d.ts +1 -1
  140. package/dist/components/SingleSelectV2/singleSelectV2.dark.tokens.d.ts +1 -1
  141. package/dist/components/SingleSelectV2/singleSelectV2.light.tokens.d.ts +1 -1
  142. package/dist/components/SingleSelectV2/singleSelectV2.tokens.d.ts +2 -159
  143. package/dist/components/SingleSelectV2/singleSelectV2.tokens.types.d.ts +159 -0
  144. package/dist/components/SingleSelectV2/singleSelectV2.types.d.ts +1 -1
  145. package/dist/components/Skeleton/hooks/useSkeletonBase.d.ts +7 -11
  146. package/dist/components/SnackbarV2/snackbarV2.dark.tokens.d.ts +1 -1
  147. package/dist/components/SnackbarV2/snackbarV2.light.tokens.d.ts +1 -1
  148. package/dist/components/SnackbarV2/snackbarV2.tokens.d.ts +2 -64
  149. package/dist/components/SnackbarV2/snackbarV2.tokens.types.d.ts +64 -0
  150. package/dist/components/SplitTag/types.d.ts +1 -1
  151. package/dist/components/StatCard/types.d.ts +2 -2
  152. package/dist/components/StatCardV2/StatCardV2.d.ts +2 -0
  153. package/dist/components/StatCardV2/StatCardV2Change.d.ts +1 -1
  154. package/dist/components/StatCardV2/StatCardV2NoData.d.ts +2 -2
  155. package/dist/components/StatCardV2/StatCardV2Title.d.ts +1 -1
  156. package/dist/components/StatCardV2/StatCardV2Value.d.ts +4 -1
  157. package/dist/components/StatCardV2/statcardV2.dark.tokens.d.ts +1 -1
  158. package/dist/components/StatCardV2/statcardV2.light.tokens.d.ts +1 -1
  159. package/dist/components/StatCardV2/statcardV2.tokens.d.ts +2 -78
  160. package/dist/components/StatCardV2/statcardV2.tokens.types.d.ts +86 -0
  161. package/dist/components/StatCardV2/statcardV2.types.d.ts +9 -13
  162. package/dist/components/StepperV2/stepperV2.dark.tokens.d.ts +1 -1
  163. package/dist/components/StepperV2/stepperV2.light.tokens.d.ts +1 -1
  164. package/dist/components/StepperV2/stepperV2.tokens.d.ts +2 -96
  165. package/dist/components/StepperV2/stepperV2.tokens.types.d.ts +96 -0
  166. package/dist/components/TabsV2/tabsV2.dark.tokens.d.ts +1 -1
  167. package/dist/components/TabsV2/tabsV2.light.tokens.d.ts +1 -1
  168. package/dist/components/TabsV2/tabsV2.tokens.d.ts +2 -94
  169. package/dist/components/TabsV2/tabsV2.tokens.types.d.ts +97 -0
  170. package/dist/components/TagV2/tagV2.dark.tokens.d.ts +1 -1
  171. package/dist/components/TagV2/tagV2.light.tokens.d.ts +1 -1
  172. package/dist/components/TagV2/tagV2.tokens.d.ts +2 -58
  173. package/dist/components/TagV2/tagV2.tokens.types.d.ts +58 -0
  174. package/dist/components/Tags/tag.dark.tokens.d.ts +1 -1
  175. package/dist/components/Tags/tag.light.tokens.d.ts +1 -1
  176. package/dist/components/Tags/tag.tokens.d.ts +2 -56
  177. package/dist/components/Tags/tag.tokens.types.d.ts +56 -0
  178. package/dist/components/Timeline/timeline.dark.token.d.ts +1 -6
  179. package/dist/components/Timeline/timeline.light.token.d.ts +1 -6
  180. package/dist/components/Timeline/timeline.token.d.ts +2 -129
  181. package/dist/components/Timeline/timeline.tokens.types.d.ts +129 -0
  182. package/dist/components/TooltipV2/tooltipV2.dark.tokens.d.ts +1 -1
  183. package/dist/components/TooltipV2/tooltipV2.light.tokens.d.ts +1 -1
  184. package/dist/components/TooltipV2/tooltipV2.tokens.d.ts +2 -34
  185. package/dist/components/TooltipV2/tooltipV2.tokens.types.d.ts +34 -0
  186. package/dist/components/Topbar/types.d.ts +2 -10
  187. package/dist/components/TopbarV2/topbarV2.dark.tokens.d.ts +1 -1
  188. package/dist/components/TopbarV2/topbarV2.light.tokens.d.ts +1 -1
  189. package/dist/components/TopbarV2/topbarV2.tokens.d.ts +2 -80
  190. package/dist/components/TopbarV2/topbarV2.tokens.types.d.ts +80 -0
  191. package/dist/components/shared/layoutTypes.d.ts +39 -0
  192. package/dist/context/useComponentToken.d.ts +3 -3
  193. package/dist/global-utils/GlobalUtils.d.ts +2 -1
  194. package/dist/main.js +29284 -29020
  195. package/dist/{node-C2uf3sNA.js → node-C_DmV86X.js} +121 -99
  196. package/dist/node.js +1 -1
  197. package/dist/tokens.js +1 -1
  198. package/lib/components/AccordionV2/accordionV2.dark.tokens.ts +1 -1
  199. package/lib/components/AccordionV2/accordionV2.light.tokens.ts +1 -1
  200. package/lib/components/AccordionV2/accordionV2.tokens.ts +6 -73
  201. package/lib/components/AccordionV2/accordionV2.tokens.types.ts +74 -0
  202. package/lib/components/AlertV2/alertV2.dark.tokens.ts +1 -1
  203. package/lib/components/AlertV2/alertV2.light.tokens.ts +1 -1
  204. package/lib/components/AlertV2/alertV2.tokens.ts +5 -78
  205. package/lib/components/AlertV2/alertV2.tokens.types.ts +79 -0
  206. package/lib/components/Avatar/types.ts +1 -1
  207. package/lib/components/AvatarGroup/types.ts +1 -1
  208. package/lib/components/AvatarV2/avatarV2.dark.tokens.ts +1 -1
  209. package/lib/components/AvatarV2/avatarV2.light.tokens.ts +1 -1
  210. package/lib/components/AvatarV2/avatarV2.tokens.ts +5 -70
  211. package/lib/components/AvatarV2/avatarV2.tokens.types.ts +71 -0
  212. package/lib/components/Badge/badge.dark.tokens.ts +1 -1
  213. package/lib/components/Badge/badge.light.tokens.ts +1 -1
  214. package/lib/components/Badge/badge.tokens.ts +5 -55
  215. package/lib/components/Badge/badge.tokens.types.ts +56 -0
  216. package/lib/components/Breadcrumb/types.ts +1 -1
  217. package/lib/components/BreadcrumbV2/BreadcrumbV2.tsx +13 -1
  218. package/lib/components/BreadcrumbV2/breadcrumbV2.dark.tokens.ts +1 -1
  219. package/lib/components/BreadcrumbV2/breadcrumbV2.light.tokens.ts +1 -1
  220. package/lib/components/BreadcrumbV2/breadcrumbV2.tokens.ts +6 -31
  221. package/lib/components/BreadcrumbV2/breadcrumbV2.tokens.types.ts +32 -0
  222. package/lib/components/BreadcrumbV2/breadcrumbV2.types.ts +0 -14
  223. package/lib/components/ButtonGroup/types.ts +1 -1
  224. package/lib/components/ButtonV2/buttonV2.dark.tokens.ts +1 -1
  225. package/lib/components/ButtonV2/buttonV2.light.tokens.ts +1 -1
  226. package/lib/components/ButtonV2/buttonV2.tokens.ts +5 -71
  227. package/lib/components/ButtonV2/buttonV2.tokens.types.ts +72 -0
  228. package/lib/components/Card/Card.tsx +1 -0
  229. package/lib/components/Card/types.ts +1 -1
  230. package/lib/components/Charts/ChartHeader.tsx +4 -1
  231. package/lib/components/Charts/renderChart.tsx +6 -2
  232. package/lib/components/Charts/types.tsx +2 -2
  233. package/lib/components/ChartsV2/chartV2.dark.tokens.ts +1 -1
  234. package/lib/components/ChartsV2/chartV2.light.tokens.ts +1 -1
  235. package/lib/components/ChartsV2/chartV2.tokens.ts +5 -101
  236. package/lib/components/ChartsV2/chartV2.tokens.types.ts +102 -0
  237. package/lib/components/ChartsV2/chartV2.types.ts +2 -2
  238. package/lib/components/ChatInput/AttachmentFile.tsx +6 -15
  239. package/lib/components/ChatInput/ChatInput.tsx +3 -34
  240. package/lib/components/ChatInput/MobileChatInput.tsx +2 -1
  241. package/lib/components/ChatInput/getDocIcon.tsx +36 -0
  242. package/lib/components/ChatInput/utils.ts +1 -1
  243. package/lib/components/CodeBlock/CodeBlock.tsx +8 -4
  244. package/lib/components/CodeEditorV2/codeEditorV2.dark.tokens.ts +3 -2
  245. package/lib/components/CodeEditorV2/codeEditorV2.light.token.ts +3 -2
  246. package/lib/components/CodeEditorV2/codeEditorV2.tokens.ts +5 -83
  247. package/lib/components/CodeEditorV2/codeEditorV2.tokens.types.ts +89 -0
  248. package/lib/components/CodeEditorV2/codeEditorV2.types.ts +5 -6
  249. package/lib/components/DataTable/DataTable.tsx +3 -0
  250. package/lib/components/DataTable/DataTableHeader/index.tsx +2 -1
  251. package/lib/components/DataTable/PivotTableModal/PivotPreviewPanel.tsx +1 -0
  252. package/lib/components/DataTable/PivotTableModal/index.tsx +1 -0
  253. package/lib/components/DataTable/TableBody/BulkActionBar.tsx +1 -1
  254. package/lib/components/DataTable/TableBody/index.tsx +6 -10
  255. package/lib/components/DataTable/TableBody/types.ts +1 -0
  256. package/lib/components/DataTable/TableCell/index.tsx +45 -20
  257. package/lib/components/DataTable/TableCell/types.ts +1 -0
  258. package/lib/components/DataTable/columnTypes.ts +5 -3
  259. package/lib/components/DataTable/dataTable.tokens.ts +15 -0
  260. package/lib/components/DataTable/types.ts +33 -2
  261. package/lib/components/DataTable/utils.ts +91 -5
  262. package/lib/components/DateRangePicker/DateRangePicker.tsx +2 -1
  263. package/lib/components/DateRangePicker/components/ActionButtons.tsx +2 -1
  264. package/lib/components/Directory/NavItem.tsx +1 -0
  265. package/lib/components/Directory/Section.tsx +1 -0
  266. package/lib/components/InputsV2/ChatInputV2/ChatInputV2.dark.tokens.ts +1 -1
  267. package/lib/components/InputsV2/ChatInputV2/ChatInputV2.light.tokens.ts +1 -1
  268. package/lib/components/InputsV2/ChatInputV2/ChatInputV2.tokens.ts +5 -116
  269. package/lib/components/InputsV2/ChatInputV2/ChatInputV2.tokens.types.ts +117 -0
  270. package/lib/components/InputsV2/ChatInputV2/ChatInputV2Mobile.dark.tokens.ts +1 -1
  271. package/lib/components/InputsV2/ChatInputV2/ChatInputV2Mobile.light.tokens.ts +1 -1
  272. package/lib/components/InputsV2/ChatInputV2/ChatInputV2Mobile.tokens.ts +5 -46
  273. package/lib/components/InputsV2/ChatInputV2/ChatInputV2Mobile.tokens.types.ts +47 -0
  274. package/lib/components/InputsV2/MultiValueInputV2/MultiValueInputV2.dark.tokens.ts +1 -1
  275. package/lib/components/InputsV2/MultiValueInputV2/MultiValueInputV2.light.tokens.ts +1 -1
  276. package/lib/components/InputsV2/MultiValueInputV2/MultiValueInputV2.tokens.ts +5 -67
  277. package/lib/components/InputsV2/MultiValueInputV2/MultiValueInputV2.tokens.types.ts +68 -0
  278. package/lib/components/InputsV2/NumberInputV2/NumberInputV2.dark.tokens.ts +1 -1
  279. package/lib/components/InputsV2/NumberInputV2/NumberInputV2.light.tokens.ts +1 -1
  280. package/lib/components/InputsV2/NumberInputV2/NumberInputV2.tsx +1 -1
  281. package/lib/components/InputsV2/NumberInputV2/numberInputV2.tokens.ts +7 -118
  282. package/lib/components/InputsV2/NumberInputV2/numberInputV2.tokens.types.ts +120 -0
  283. package/lib/components/InputsV2/OTPInputV2/OTPInputV2.dark.tokens.ts +1 -1
  284. package/lib/components/InputsV2/OTPInputV2/OTPInputV2.light.tokens.ts +1 -1
  285. package/lib/components/InputsV2/OTPInputV2/OTPInputV2.tokens.ts +5 -32
  286. package/lib/components/InputsV2/OTPInputV2/OTPInputV2.tokens.types.ts +36 -0
  287. package/lib/components/InputsV2/SearchInputV2/SearchInputV2.dark.tokens.ts +1 -1
  288. package/lib/components/InputsV2/SearchInputV2/SearchInputV2.light.tokens.ts +1 -1
  289. package/lib/components/InputsV2/SearchInputV2/SearchInputV2.tokens.ts +5 -90
  290. package/lib/components/InputsV2/SearchInputV2/SearchInputV2.tokens.types.ts +92 -0
  291. package/lib/components/InputsV2/TextAreaV2/TextAreaV2.dark.tokens.ts +1 -1
  292. package/lib/components/InputsV2/TextAreaV2/TextAreaV2.light.tokens.ts +1 -1
  293. package/lib/components/InputsV2/TextAreaV2/TextAreaV2.tokens.ts +5 -61
  294. package/lib/components/InputsV2/TextAreaV2/TextAreaV2.tokens.types.ts +62 -0
  295. package/lib/components/InputsV2/TextInputV2/TextInputV2.dark.tokens.ts +1 -1
  296. package/lib/components/InputsV2/TextInputV2/TextInputV2.light.tokens.ts +1 -1
  297. package/lib/components/InputsV2/TextInputV2/TextInputV2.tokens.ts +5 -134
  298. package/lib/components/InputsV2/TextInputV2/TextInputV2.tokens.types.ts +135 -0
  299. package/lib/components/KeyValuePairV2/keyValuePairV2.dark.tokens.ts +1 -1
  300. package/lib/components/KeyValuePairV2/keyValuePairV2.light.tokens.ts +1 -1
  301. package/lib/components/KeyValuePairV2/keyValuePairV2.tokens.ts +5 -26
  302. package/lib/components/KeyValuePairV2/keyValuePairV2.tokens.types.ts +27 -0
  303. package/lib/components/Menu/MenuItem.tsx +1 -0
  304. package/lib/components/Menu/SubMenu.tsx +1 -0
  305. package/lib/components/Menu/types.tsx +1 -1
  306. package/lib/components/MenuV2/menuV2.dark.tokens.ts +1 -1
  307. package/lib/components/MenuV2/menuV2.light.tokens.ts +1 -1
  308. package/lib/components/MenuV2/menuV2.tokens.ts +5 -109
  309. package/lib/components/MenuV2/menuV2.tokens.types.ts +110 -0
  310. package/lib/components/Modal/types.ts +2 -2
  311. package/lib/components/MultiSelect/MobileMultiSelect.tsx +2 -1
  312. package/lib/components/MultiSelect/MultiSelectMenuItem.tsx +1 -0
  313. package/lib/components/MultiSelect/MultiSelectSubMenu.tsx +1 -0
  314. package/lib/components/MultiSelect/types.ts +1 -1
  315. package/lib/components/MultiSelectV2/MultiSelectV2MenuItem.tsx +1 -0
  316. package/lib/components/MultiSelectV2/MultiSelectV2Skeleton.tsx +2 -1
  317. package/lib/components/MultiSelectV2/MultiSelectV2SubMenu.tsx +1 -0
  318. package/lib/components/MultiSelectV2/multiSelectV2.dark.tokens.ts +1 -1
  319. package/lib/components/MultiSelectV2/multiSelectV2.light.tokens.ts +1 -1
  320. package/lib/components/MultiSelectV2/multiSelectV2.tokens.ts +8 -237
  321. package/lib/components/MultiSelectV2/multiSelectV2.tokens.types.ts +237 -0
  322. package/lib/components/Popover/types.ts +2 -2
  323. package/lib/components/PopoverV2/popoverV2.dark.tokens.tsx +1 -1
  324. package/lib/components/PopoverV2/popoverV2.light.tokens.tsx +1 -1
  325. package/lib/components/PopoverV2/popoverV2.token.ts +5 -69
  326. package/lib/components/PopoverV2/popoverV2.tokens.types.ts +72 -0
  327. package/lib/components/PopoverV2/popoverV2.types.ts +2 -2
  328. package/lib/components/ProgressBarV2/progressBarV2.dark.tokens.ts +1 -1
  329. package/lib/components/ProgressBarV2/progressBarV2.light.tokens.ts +1 -1
  330. package/lib/components/ProgressBarV2/progressBarV2.tokens.ts +5 -64
  331. package/lib/components/ProgressBarV2/progressBarV2.tokens.types.ts +81 -0
  332. package/lib/components/ProgressBarV2/progressBarV2.types.ts +13 -20
  333. package/lib/components/SelectV2/selectV2.shared.types.ts +1 -1
  334. package/lib/components/SelectorV2/CheckboxV2/checkboxV2.dark.tokens.ts +1 -1
  335. package/lib/components/SelectorV2/CheckboxV2/checkboxV2.light.tokens.ts +1 -1
  336. package/lib/components/SelectorV2/CheckboxV2/checkboxV2.tokens.ts +5 -81
  337. package/lib/components/SelectorV2/CheckboxV2/checkboxV2.tokens.types.ts +87 -0
  338. package/lib/components/SelectorV2/CheckboxV2/checkboxV2.types.ts +3 -6
  339. package/lib/components/SelectorV2/RadioV2/radioV2.dark.tokens.ts +1 -1
  340. package/lib/components/SelectorV2/RadioV2/radioV2.light.tokens.ts +1 -1
  341. package/lib/components/SelectorV2/RadioV2/radioV2.tokens.ts +5 -73
  342. package/lib/components/SelectorV2/RadioV2/radioV2.tokens.types.ts +78 -0
  343. package/lib/components/SelectorV2/RadioV2/radioV2.types.ts +2 -2
  344. package/lib/components/SelectorV2/SwitchV2/switchV2.dark.tokens.ts +1 -1
  345. package/lib/components/SelectorV2/SwitchV2/switchV2.light.tokens.ts +1 -1
  346. package/lib/components/SelectorV2/SwitchV2/switchV2.tokens.ts +5 -63
  347. package/lib/components/SelectorV2/SwitchV2/switchV2.tokens.types.ts +68 -0
  348. package/lib/components/SelectorV2/SwitchV2/switchV2.types.ts +5 -2
  349. package/lib/components/Sidebar/Sidebar.tsx +1 -1
  350. package/lib/components/Sidebar/SidebarContent.tsx +1 -0
  351. package/lib/components/Sidebar/SidebarHeader.tsx +2 -12
  352. package/lib/components/Sidebar/types.ts +12 -25
  353. package/lib/components/SidebarV2/SidebarV2MobileNavigation/mobile.dark.tokens.ts +2 -2
  354. package/lib/components/SidebarV2/SidebarV2MobileNavigation/mobile.light.tokens.ts +2 -2
  355. package/lib/components/SidebarV2/SidebarV2MobileNavigation/mobile.tokens.ts +6 -84
  356. package/lib/components/SidebarV2/SidebarV2MobileNavigation/mobile.tokens.types.ts +85 -0
  357. package/lib/components/SidebarV2/SidebarV2MobileNavigation/types.ts +1 -1
  358. package/lib/components/SidebarV2/sidebarV2.dark.tokens.ts +1 -1
  359. package/lib/components/SidebarV2/sidebarV2.light.tokens.ts +1 -1
  360. package/lib/components/SidebarV2/sidebarV2.tokens.ts +6 -105
  361. package/lib/components/SidebarV2/sidebarV2.tokens.types.ts +106 -0
  362. package/lib/components/SingleSelect/SingleSelectMenu.tsx +1 -1
  363. package/lib/components/SingleSelect/types.ts +1 -1
  364. package/lib/components/SingleSelectV2/singleSelectV2.dark.tokens.ts +1 -1
  365. package/lib/components/SingleSelectV2/singleSelectV2.light.tokens.ts +1 -1
  366. package/lib/components/SingleSelectV2/singleSelectV2.tokens.ts +9 -188
  367. package/lib/components/SingleSelectV2/singleSelectV2.tokens.types.ts +188 -0
  368. package/lib/components/SingleSelectV2/singleSelectV2.types.ts +1 -1
  369. package/lib/components/Skeleton/hooks/useSkeletonBase.ts +11 -1
  370. package/lib/components/SnackbarV2/snackbarV2.dark.tokens.ts +1 -1
  371. package/lib/components/SnackbarV2/snackbarV2.light.tokens.ts +1 -1
  372. package/lib/components/SnackbarV2/snackbarV2.tokens.ts +6 -66
  373. package/lib/components/SnackbarV2/snackbarV2.tokens.types.ts +66 -0
  374. package/lib/components/SplitTag/types.ts +1 -1
  375. package/lib/components/StatCard/StatCard.tsx +284 -205
  376. package/lib/components/StatCard/types.ts +2 -2
  377. package/lib/components/StatCardV2/StatCardV2.tsx +13 -6
  378. package/lib/components/StatCardV2/StatCardV2Change.tsx +10 -1
  379. package/lib/components/StatCardV2/StatCardV2NoData.tsx +9 -6
  380. package/lib/components/StatCardV2/StatCardV2Skeleton.tsx +2 -1
  381. package/lib/components/StatCardV2/StatCardV2Title.tsx +185 -55
  382. package/lib/components/StatCardV2/StatCardV2Value.tsx +77 -9
  383. package/lib/components/StatCardV2/statcardV2.dark.tokens.ts +1 -1
  384. package/lib/components/StatCardV2/statcardV2.light.tokens.ts +1 -1
  385. package/lib/components/StatCardV2/statcardV2.tokens.ts +5 -79
  386. package/lib/components/StatCardV2/statcardV2.tokens.types.ts +90 -0
  387. package/lib/components/StatCardV2/statcardV2.types.ts +14 -15
  388. package/lib/components/StepperV2/stepperV2.dark.tokens.ts +1 -1
  389. package/lib/components/StepperV2/stepperV2.light.tokens.ts +1 -1
  390. package/lib/components/StepperV2/stepperV2.tokens.ts +5 -100
  391. package/lib/components/StepperV2/stepperV2.tokens.types.ts +101 -0
  392. package/lib/components/TabsV2/TabsV2List.tsx +5 -1
  393. package/lib/components/TabsV2/tabsV2.dark.tokens.ts +13 -1
  394. package/lib/components/TabsV2/tabsV2.light.tokens.ts +13 -1
  395. package/lib/components/TabsV2/tabsV2.tokens.ts +5 -95
  396. package/lib/components/TabsV2/tabsV2.tokens.types.ts +99 -0
  397. package/lib/components/TagV2/tagV2.dark.tokens.ts +1 -1
  398. package/lib/components/TagV2/tagV2.light.tokens.ts +1 -1
  399. package/lib/components/TagV2/tagV2.tokens.ts +5 -69
  400. package/lib/components/TagV2/tagV2.tokens.types.ts +70 -0
  401. package/lib/components/Tags/tag.dark.tokens.ts +1 -1
  402. package/lib/components/Tags/tag.light.tokens.ts +1 -1
  403. package/lib/components/Tags/tag.tokens.ts +2 -69
  404. package/lib/components/Tags/tag.tokens.types.ts +70 -0
  405. package/lib/components/Timeline/timeline.dark.token.ts +4 -6
  406. package/lib/components/Timeline/timeline.light.token.ts +4 -6
  407. package/lib/components/Timeline/timeline.token.ts +6 -137
  408. package/lib/components/Timeline/timeline.tokens.types.ts +138 -0
  409. package/lib/components/TooltipV2/tooltipV2.dark.tokens.ts +1 -1
  410. package/lib/components/TooltipV2/tooltipV2.light.tokens.ts +1 -1
  411. package/lib/components/TooltipV2/tooltipV2.tokens.ts +5 -46
  412. package/lib/components/TooltipV2/tooltipV2.tokens.types.ts +47 -0
  413. package/lib/components/Topbar/types.ts +5 -11
  414. package/lib/components/TopbarV2/topbarV2.dark.tokens.ts +1 -1
  415. package/lib/components/TopbarV2/topbarV2.light.tokens.ts +1 -1
  416. package/lib/components/TopbarV2/topbarV2.tokens.ts +6 -69
  417. package/lib/components/TopbarV2/topbarV2.tokens.types.ts +70 -0
  418. package/lib/components/Upload/components/FileListDisplay.tsx +3 -1
  419. package/lib/components/shared/layoutTypes.ts +44 -0
  420. package/lib/context/useComponentToken.ts +3 -3
  421. package/lib/global-utils/GlobalUtils.ts +10 -1
  422. package/lib/hooks/useTruncationDetection.ts +33 -8
  423. package/package.json +5 -1
@@ -37,6 +37,7 @@ const StatCardV2 = forwardRef<HTMLDivElement, StatCardV2Props>(
37
37
  variant = StatCardV2Variant.NUMBER,
38
38
  actionIcon,
39
39
  value,
40
+ valueTooltip,
40
41
  progressValue,
41
42
  change,
42
43
  subtitle,
@@ -47,6 +48,7 @@ const StatCardV2 = forwardRef<HTMLDivElement, StatCardV2Props>(
47
48
  height,
48
49
  options,
49
50
  skeleton,
51
+ showBorder = true,
50
52
  ...props
51
53
  },
52
54
  ref
@@ -130,6 +132,7 @@ const StatCardV2 = forwardRef<HTMLDivElement, StatCardV2Props>(
130
132
  tokens={tokens}
131
133
  isSmallScreen={isSmallScreen}
132
134
  filteredProps={filteredProps}
135
+ showBorder={showBorder}
133
136
  />
134
137
  )
135
138
  }
@@ -140,14 +143,14 @@ const StatCardV2 = forwardRef<HTMLDivElement, StatCardV2Props>(
140
143
  display="flex"
141
144
  flexDirection="column"
142
145
  justifyContent="space-between"
143
- paddingTop={tokens.paddingTop}
144
- paddingBottom={tokens.paddingBottom}
145
- paddingLeft={tokens.paddingLeft}
146
- paddingRight={tokens.paddingRight}
147
- border={tokens.border}
146
+ paddingTop={showBorder ? tokens.paddingTop : undefined}
147
+ paddingBottom={showBorder ? tokens.paddingBottom : undefined}
148
+ paddingLeft={showBorder ? tokens.paddingLeft : undefined}
149
+ paddingRight={showBorder ? tokens.paddingRight : undefined}
150
+ border={showBorder ? tokens.border : undefined}
148
151
  borderRadius={tokens.borderRadius}
149
152
  backgroundColor={tokens.backgroundColor}
150
- boxShadow={tokens.boxShadow}
153
+ boxShadow={showBorder ? tokens.boxShadow : undefined}
151
154
  maxWidth={maxWidth ?? tokens.maxWidth}
152
155
  minWidth={minWidth ?? tokens.minWidth}
153
156
  width={width ?? tokens.width}
@@ -198,6 +201,7 @@ const StatCardV2 = forwardRef<HTMLDivElement, StatCardV2Props>(
198
201
  title={title}
199
202
  helpIconText={helpIconText}
200
203
  tokens={tokens}
204
+ isSmallScreen={isSmallScreen}
201
205
  />
202
206
  <Block
203
207
  display="flex"
@@ -215,8 +219,10 @@ const StatCardV2 = forwardRef<HTMLDivElement, StatCardV2Props>(
215
219
  <StatCardV2Value
216
220
  id={valueId}
217
221
  value={value}
222
+ valueTooltip={valueTooltip}
218
223
  tokens={tokens}
219
224
  variant={variant}
225
+ isSmallScreen={isSmallScreen}
220
226
  />
221
227
  <StatCardV2Change
222
228
  id={changeId}
@@ -227,6 +233,7 @@ const StatCardV2 = forwardRef<HTMLDivElement, StatCardV2Props>(
227
233
  effectiveArrowDirection
228
234
  }
229
235
  changeType={effectiveChangeType}
236
+ tooltip={change?.tooltip}
230
237
  tokens={tokens}
231
238
  />
232
239
  </Block>
@@ -2,6 +2,7 @@ import { ArrowDown, ArrowUp } from 'lucide-react'
2
2
  import { addPxToValue } from '../../global-utils/GlobalUtils'
3
3
  import Block from '../Primitives/Block/Block'
4
4
  import Text from '../Text/Text'
5
+ import { Tooltip } from '../Tooltip'
5
6
  import {
6
7
  StatCardV2ArrowDirection,
7
8
  type StatCardV2ChangeProps,
@@ -13,6 +14,7 @@ const StatCardV2Change = ({
13
14
  rightSymbol,
14
15
  arrowDirection,
15
16
  changeType,
17
+ tooltip,
16
18
  tokens,
17
19
  id,
18
20
  }: StatCardV2ChangeProps) => {
@@ -24,7 +26,7 @@ const StatCardV2Change = ({
24
26
 
25
27
  if (changeValueText === undefined || changeValueText === null) return null
26
28
 
27
- return (
29
+ const changeContent = (
28
30
  <Block
29
31
  display="flex"
30
32
  alignItems="center"
@@ -33,6 +35,7 @@ const StatCardV2Change = ({
33
35
  .gap
34
36
  }
35
37
  data-element="statcard-delta"
38
+ cursor={tooltip ? 'pointer' : undefined}
36
39
  >
37
40
  <Block
38
41
  data-element="change-arrow"
@@ -84,6 +87,12 @@ const StatCardV2Change = ({
84
87
  </Block>
85
88
  </Block>
86
89
  )
90
+
91
+ if (!tooltip) {
92
+ return changeContent
93
+ }
94
+
95
+ return <Tooltip content={tooltip}>{changeContent}</Tooltip>
87
96
  }
88
97
 
89
98
  export default StatCardV2Change
@@ -19,6 +19,7 @@ type StatCardV2NoDataProps = Pick<
19
19
  | 'minWidth'
20
20
  | 'width'
21
21
  | 'height'
22
+ | 'showBorder'
22
23
  > & {
23
24
  tokens: StatCardV2TokensType
24
25
  isSmallScreen: boolean
@@ -35,6 +36,7 @@ const StatCardV2NoData = ({
35
36
  minWidth,
36
37
  width,
37
38
  height,
39
+ showBorder = true,
38
40
  tokens,
39
41
  isSmallScreen,
40
42
  filteredProps,
@@ -47,14 +49,14 @@ const StatCardV2NoData = ({
47
49
  display="flex"
48
50
  flexDirection="column"
49
51
  justifyContent="space-between"
50
- paddingTop={tokens.paddingTop}
51
- paddingBottom={tokens.paddingBottom}
52
- paddingLeft={tokens.paddingLeft}
53
- paddingRight={tokens.paddingRight}
54
- border={tokens.border}
52
+ paddingTop={showBorder ? tokens.paddingTop : undefined}
53
+ paddingBottom={showBorder ? tokens.paddingBottom : undefined}
54
+ paddingLeft={showBorder ? tokens.paddingLeft : undefined}
55
+ paddingRight={showBorder ? tokens.paddingRight : undefined}
56
+ border={showBorder ? tokens.border : undefined}
55
57
  borderRadius={tokens.borderRadius}
56
58
  backgroundColor={tokens.backgroundColor}
57
- boxShadow={tokens.boxShadow}
59
+ boxShadow={showBorder ? tokens.boxShadow : undefined}
58
60
  maxWidth={maxWidth ?? tokens.maxWidth}
59
61
  minWidth={minWidth ?? tokens.minWidth}
60
62
  width={width ?? tokens.width}
@@ -102,6 +104,7 @@ const StatCardV2NoData = ({
102
104
  title={title}
103
105
  helpIconText={helpIconText}
104
106
  tokens={tokens}
107
+ isSmallScreen={isSmallScreen}
105
108
  />
106
109
  </Block>
107
110
  </Block>
@@ -1,4 +1,5 @@
1
- import { Skeleton, SkeletonVariant } from '../Skeleton'
1
+ import { Skeleton } from '../Skeleton'
2
+ import type { SkeletonVariant } from '../Skeleton/types'
2
3
  import type { StatCardV2SkeletonProps } from './statcardV2.types'
3
4
 
4
5
  const StatCardV2Skeleton = ({
@@ -1,80 +1,210 @@
1
+ import { useEffect, useRef, useState } from 'react'
1
2
  import { CircleHelp } from 'lucide-react'
2
3
  import { addPxToValue } from '../../global-utils/GlobalUtils'
3
4
  import Block from '../Primitives/Block/Block'
4
5
  import Text from '../Text/Text'
5
6
  import { Tooltip } from '../Tooltip'
6
7
  import type { StatCardV2TitleProps } from './statcardV2.types'
8
+ import type { StatCardV2TokensType } from './statcardV2.tokens'
9
+
10
+ type StatCardV2TitleTextProps = {
11
+ title: string
12
+ id?: string
13
+ tokens: StatCardV2TokensType
14
+ isSmallScreen: boolean
15
+ }
16
+
17
+ const StatCardV2TitleText = ({
18
+ title,
19
+ id,
20
+ tokens,
21
+ isSmallScreen,
22
+ }: StatCardV2TitleTextProps) => {
23
+ const [forceTooltipOpen, setForceTooltipOpen] = useState(false)
24
+ const titleRef = useRef<HTMLDivElement>(null)
25
+
26
+ useEffect(() => {
27
+ if (!isSmallScreen || !forceTooltipOpen) return
28
+
29
+ const handlePointerDown = (event: PointerEvent) => {
30
+ if (titleRef.current?.contains(event.target as Node)) return
31
+ setForceTooltipOpen(false)
32
+ }
33
+
34
+ document.addEventListener('pointerdown', handlePointerDown)
35
+ return () =>
36
+ document.removeEventListener('pointerdown', handlePointerDown)
37
+ }, [isSmallScreen, forceTooltipOpen])
38
+
39
+ const titleText = (
40
+ <Text
41
+ id={id}
42
+ fontSize={
43
+ tokens.topContainer.dataContainer.titleContainer.title.fontSize
44
+ }
45
+ fontWeight={
46
+ tokens.topContainer.dataContainer.titleContainer.title
47
+ .fontWeight
48
+ }
49
+ lineHeight={addPxToValue(
50
+ tokens.topContainer.dataContainer.titleContainer.title
51
+ .lineHeight
52
+ )}
53
+ color={tokens.topContainer.dataContainer.titleContainer.title.color}
54
+ style={{
55
+ display: '-webkit-box',
56
+ WebkitLineClamp: 1,
57
+ WebkitBoxOrient: 'vertical',
58
+ overflow: 'hidden',
59
+ textOverflow: 'ellipsis',
60
+ wordBreak: 'break-word',
61
+ }}
62
+ data-element="statcard-header"
63
+ data-id={title || 'statcard-header'}
64
+ >
65
+ {title}
66
+ </Text>
67
+ )
68
+
69
+ if (!isSmallScreen) {
70
+ return <Tooltip content={title}>{titleText}</Tooltip>
71
+ }
72
+
73
+ return (
74
+ <Block
75
+ ref={titleRef}
76
+ minWidth={0}
77
+ flexGrow={1}
78
+ onClick={() => {
79
+ setForceTooltipOpen(!forceTooltipOpen)
80
+ }}
81
+ style={{ cursor: 'pointer' }}
82
+ >
83
+ <Tooltip open={forceTooltipOpen} content={title}>
84
+ {titleText}
85
+ </Tooltip>
86
+ </Block>
87
+ )
88
+ }
89
+
90
+ type StatCardV2HelpIconProps = {
91
+ helpIconText: string
92
+ title: string
93
+ tokens: StatCardV2TokensType
94
+ isSmallScreen: boolean
95
+ }
96
+
97
+ const StatCardV2HelpIcon = ({
98
+ helpIconText,
99
+ title,
100
+ tokens,
101
+ isSmallScreen,
102
+ }: StatCardV2HelpIconProps) => {
103
+ const [forceTooltipOpen, setForceTooltipOpen] = useState(false)
104
+ const helpIconRef = useRef<HTMLDivElement>(null)
105
+
106
+ useEffect(() => {
107
+ if (!isSmallScreen || !forceTooltipOpen) return
108
+
109
+ const handlePointerDown = (event: PointerEvent) => {
110
+ if (helpIconRef.current?.contains(event.target as Node)) return
111
+ setForceTooltipOpen(false)
112
+ }
113
+
114
+ document.addEventListener('pointerdown', handlePointerDown)
115
+ return () =>
116
+ document.removeEventListener('pointerdown', handlePointerDown)
117
+ }, [isSmallScreen, forceTooltipOpen])
118
+
119
+ const helpIconTrigger = (
120
+ <Block
121
+ as="span"
122
+ display="inline-flex"
123
+ alignItems="center"
124
+ justifyContent="center"
125
+ role="button"
126
+ tabIndex={0}
127
+ aria-label={helpIconText || `Help for ${title}`}
128
+ >
129
+ <CircleHelp
130
+ width={
131
+ tokens.topContainer.dataContainer.titleContainer.helpIcon
132
+ .width
133
+ }
134
+ height={
135
+ tokens.topContainer.dataContainer.titleContainer.helpIcon
136
+ .height
137
+ }
138
+ color={
139
+ tokens.topContainer.dataContainer.titleContainer.helpIcon
140
+ .color.default
141
+ }
142
+ aria-hidden="true"
143
+ />
144
+ </Block>
145
+ )
146
+
147
+ if (!isSmallScreen) {
148
+ return (
149
+ <Block
150
+ data-element="help-icon"
151
+ display="flex"
152
+ alignItems="center"
153
+ justifyContent="center"
154
+ flexShrink={0}
155
+ >
156
+ <Tooltip content={helpIconText}>{helpIconTrigger}</Tooltip>
157
+ </Block>
158
+ )
159
+ }
160
+
161
+ return (
162
+ <Block
163
+ ref={helpIconRef}
164
+ data-element="help-icon"
165
+ display="flex"
166
+ alignItems="center"
167
+ justifyContent="center"
168
+ flexShrink={0}
169
+ onClick={() => {
170
+ setForceTooltipOpen(!forceTooltipOpen)
171
+ }}
172
+ >
173
+ <Tooltip open={forceTooltipOpen} content={helpIconText}>
174
+ {helpIconTrigger}
175
+ </Tooltip>
176
+ </Block>
177
+ )
178
+ }
7
179
 
8
180
  const StatCardV2Title = ({
9
181
  title,
10
182
  helpIconText,
11
183
  tokens,
12
184
  id,
185
+ isSmallScreen = false,
13
186
  }: StatCardV2TitleProps) => {
14
187
  if (!title) return null
188
+
15
189
  return (
16
190
  <Block
17
191
  display="flex"
18
192
  alignItems="center"
19
193
  gap={tokens.topContainer.dataContainer.titleContainer.gap}
20
194
  >
21
- <Text
195
+ <StatCardV2TitleText
196
+ title={title}
22
197
  id={id}
23
- fontSize={
24
- tokens.topContainer.dataContainer.titleContainer.title
25
- .fontSize
26
- }
27
- fontWeight={
28
- tokens.topContainer.dataContainer.titleContainer.title
29
- .fontWeight
30
- }
31
- lineHeight={addPxToValue(
32
- tokens.topContainer.dataContainer.titleContainer.title
33
- .lineHeight
34
- )}
35
- color={
36
- tokens.topContainer.dataContainer.titleContainer.title.color
37
- }
38
- data-element="statcard-header"
39
- data-id={title || 'statcard-header'}
40
- >
41
- {title}
42
- </Text>
198
+ tokens={tokens}
199
+ isSmallScreen={isSmallScreen}
200
+ />
43
201
  {helpIconText && (
44
- <Block
45
- data-element="help-icon"
46
- display="flex"
47
- alignItems="center"
48
- justifyContent="center"
49
- >
50
- <Tooltip content={helpIconText}>
51
- <Block
52
- as="span"
53
- display="inline-flex"
54
- alignItems="center"
55
- justifyContent="center"
56
- role="button"
57
- tabIndex={0}
58
- aria-label={helpIconText || `Help for ${title}`}
59
- >
60
- <CircleHelp
61
- width={
62
- tokens.topContainer.dataContainer
63
- .titleContainer.helpIcon.width
64
- }
65
- height={
66
- tokens.topContainer.dataContainer
67
- .titleContainer.helpIcon.height
68
- }
69
- color={
70
- tokens.topContainer.dataContainer
71
- .titleContainer.helpIcon.color.default
72
- }
73
- aria-hidden="true"
74
- />
75
- </Block>
76
- </Tooltip>
77
- </Block>
202
+ <StatCardV2HelpIcon
203
+ helpIconText={helpIconText}
204
+ title={title}
205
+ tokens={tokens}
206
+ isSmallScreen={isSmallScreen}
207
+ />
78
208
  )}
79
209
  </Block>
80
210
  )
@@ -1,6 +1,8 @@
1
+ import { useEffect, useRef, useState, type ReactNode } from 'react'
1
2
  import { addPxToValue } from '../../global-utils/GlobalUtils'
2
3
  import Block from '../Primitives/Block/Block'
3
4
  import Text from '../Text/Text'
5
+ import { Tooltip } from '../Tooltip'
4
6
  import type { StatCardV2Props, StatCardV2Variant } from './statcardV2.types'
5
7
  import type { StatCardV2TokensType } from './statcardV2.tokens'
6
8
 
@@ -32,16 +34,76 @@ export const renderVariantFallbackValue = (
32
34
  )
33
35
  }
34
36
 
37
+ type StatCardV2ValueTooltipProps = {
38
+ content: ReactNode
39
+ isSmallScreen: boolean
40
+ children: ReactNode
41
+ }
42
+
43
+ const StatCardV2ValueTooltip = ({
44
+ content,
45
+ isSmallScreen,
46
+ children,
47
+ }: StatCardV2ValueTooltipProps) => {
48
+ const [open, setOpen] = useState(false)
49
+ const triggerRef = useRef<HTMLSpanElement>(null)
50
+
51
+ useEffect(() => {
52
+ if (!isSmallScreen || !open || !content) return
53
+
54
+ const handlePointerDown = (event: PointerEvent) => {
55
+ const target = event.target as Node
56
+ if (triggerRef.current?.contains(target)) return
57
+
58
+ const tooltipEl = document.querySelector('[data-tooltip="tooltip"]')
59
+ if (tooltipEl?.contains(target)) return
60
+
61
+ setOpen(false)
62
+ }
63
+
64
+ document.addEventListener('pointerdown', handlePointerDown)
65
+ return () =>
66
+ document.removeEventListener('pointerdown', handlePointerDown)
67
+ }, [isSmallScreen, open, content])
68
+
69
+ if (content === undefined || content === null || content === '') {
70
+ return <>{children}</>
71
+ }
72
+
73
+ if (!isSmallScreen) {
74
+ return <Tooltip content={content}>{children}</Tooltip>
75
+ }
76
+
77
+ return (
78
+ <Tooltip content={content} open={open}>
79
+ <span
80
+ ref={triggerRef}
81
+ style={{ display: 'inline-flex', cursor: 'pointer' }}
82
+ onClick={(event) => {
83
+ event.stopPropagation()
84
+ setOpen(true)
85
+ }}
86
+ >
87
+ {children}
88
+ </span>
89
+ </Tooltip>
90
+ )
91
+ }
92
+
35
93
  const StatCardV2Value = ({
36
94
  value,
95
+ valueTooltip,
37
96
  tokens,
38
97
  variant,
39
98
  id,
99
+ isSmallScreen = false,
40
100
  }: {
41
101
  value: StatCardV2Props['value']
102
+ valueTooltip?: ReactNode
42
103
  tokens: StatCardV2TokensType
43
104
  variant: StatCardV2Variant
44
105
  id?: string
106
+ isSmallScreen?: boolean
45
107
  }) => {
46
108
  const valueTokens = tokens.topContainer.dataContainer.statsContainer.value
47
109
 
@@ -51,16 +113,22 @@ const StatCardV2Value = ({
51
113
  : STATCARD_FALLBACK_DISPLAY
52
114
 
53
115
  return (
54
- <Text
55
- id={id}
56
- fontSize={valueTokens[variant].fontSize}
57
- fontWeight={valueTokens[variant].fontWeight}
58
- lineHeight={addPxToValue(valueTokens[variant].lineHeight)}
59
- color={valueTokens[variant].color}
60
- data-element="statcard-data"
116
+ <StatCardV2ValueTooltip
117
+ content={valueTooltip}
118
+ isSmallScreen={isSmallScreen}
61
119
  >
62
- {displayValue}
63
- </Text>
120
+ <Text
121
+ id={id}
122
+ fontSize={valueTokens[variant].fontSize}
123
+ fontWeight={valueTokens[variant].fontWeight}
124
+ lineHeight={addPxToValue(valueTokens[variant].lineHeight)}
125
+ color={valueTokens[variant].color}
126
+ style={valueTooltip ? { cursor: 'pointer' } : undefined}
127
+ data-element="statcard-data"
128
+ >
129
+ {displayValue}
130
+ </Text>
131
+ </StatCardV2ValueTooltip>
64
132
  )
65
133
  }
66
134
 
@@ -1,5 +1,5 @@
1
1
  import { FoundationTokenType } from '../../tokens/theme.token'
2
- import { ResponsiveStatCardV2Tokens } from './statcardV2.tokens'
2
+ import type { ResponsiveStatCardV2Tokens } from './statcardV2.tokens.types'
3
3
  import { StatCardV2Variant } from './statcardV2.types'
4
4
 
5
5
  export const getStatCardV2DarkTokens = (
@@ -1,5 +1,5 @@
1
1
  import { FoundationTokenType } from '../../tokens/theme.token'
2
- import { ResponsiveStatCardV2Tokens } from './statcardV2.tokens'
2
+ import type { ResponsiveStatCardV2Tokens } from './statcardV2.tokens.types'
3
3
  import { StatCardV2Variant } from './statcardV2.types'
4
4
 
5
5
  export const getStatCardV2LightTokens = (
@@ -1,87 +1,13 @@
1
- import { CSSObject } from 'styled-components'
2
- import { BreakpointType } from '../../breakpoints/breakPoints'
3
1
  import { FoundationTokenType } from '../../tokens/theme.token'
4
2
  import { Theme } from '../../context/theme.enum'
5
3
  import { getStatCardV2LightTokens } from './statcardV2.light.tokens'
6
4
  import { getStatCardV2DarkTokens } from './statcardV2.dark.tokens'
7
- import { StatCardV2ChangeType, StatCardV2Variant } from './statcardV2.types'
5
+ import type { ResponsiveStatCardV2Tokens } from './statcardV2.tokens.types'
8
6
 
9
- export type StatCardV2TokensType = {
10
- height: CSSObject['height']
11
- width: CSSObject['width']
12
- maxWidth: CSSObject['maxWidth']
13
- minWidth: CSSObject['minWidth']
14
- paddingTop: CSSObject['paddingTop']
15
- paddingBottom: CSSObject['paddingBottom']
16
- paddingLeft: CSSObject['paddingLeft']
17
- paddingRight: CSSObject['paddingRight']
18
- border: CSSObject['border']
19
- borderRadius: CSSObject['borderRadius']
20
- backgroundColor: CSSObject['backgroundColor']
21
- boxShadow: CSSObject['boxShadow']
22
- topContainer: {
23
- gap: CSSObject['gap']
24
- dataContainer: {
25
- gap: CSSObject['gap']
26
- titleContainer: {
27
- gap: CSSObject['gap']
28
- title: {
29
- fontSize: CSSObject['fontSize']
30
- fontWeight: CSSObject['fontWeight']
31
- color: CSSObject['color']
32
- lineHeight: CSSObject['lineHeight']
33
- }
34
- helpIcon: {
35
- width: CSSObject['width']
36
- height: CSSObject['height']
37
- color: {
38
- default: CSSObject['color']
39
- hover: CSSObject['color']
40
- }
41
- }
42
- }
43
- statsContainer: {
44
- gap: CSSObject['gap']
45
- value: {
46
- [key in StatCardV2Variant]: {
47
- fontSize: CSSObject['fontSize']
48
- fontWeight: CSSObject['fontWeight']
49
- color: CSSObject['color']
50
- lineHeight: CSSObject['lineHeight']
51
- }
52
- }
53
- changeContainer: {
54
- gap: CSSObject['gap']
55
- change: {
56
- fontSize: CSSObject['fontSize']
57
- fontWeight: CSSObject['fontWeight']
58
- color: {
59
- [key in StatCardV2ChangeType]: CSSObject['color']
60
- }
61
- lineHeight: CSSObject['lineHeight']
62
- }
63
- arrow: {
64
- width: CSSObject['width']
65
- height: CSSObject['height']
66
- color: {
67
- [key in StatCardV2ChangeType]: CSSObject['color']
68
- }
69
- }
70
- }
71
- }
72
- subtitle: {
73
- fontSize: CSSObject['fontSize']
74
- fontWeight: CSSObject['fontWeight']
75
- color: CSSObject['color']
76
- lineHeight: CSSObject['lineHeight']
77
- }
78
- }
79
- }
80
- }
81
-
82
- export type ResponsiveStatCardV2Tokens = {
83
- [key in keyof BreakpointType]: StatCardV2TokensType
84
- }
7
+ export type {
8
+ ResponsiveStatCardV2Tokens,
9
+ StatCardV2TokensType,
10
+ } from './statcardV2.tokens.types'
85
11
 
86
12
  export const getStatCardV2Tokens = (
87
13
  foundationToken: FoundationTokenType,