@juspay/blend-design-system 0.0.37-beta.3 → 0.0.37-beta.4

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 (162) hide show
  1. package/dist/components/AccordionV2/index.d.ts +3 -0
  2. package/dist/components/AvatarV2/avatarV2.utils.d.ts +1 -1
  3. package/dist/components/AvatarV2/index.d.ts +1 -2
  4. package/dist/components/BreadcrumbV2/index.d.ts +10 -0
  5. package/dist/components/ButtonV2/ButtonGroupV2/index.d.ts +1 -0
  6. package/dist/components/ButtonV2/buttonV2.types.d.ts +0 -4
  7. package/dist/components/ButtonV2/index.d.ts +3 -0
  8. package/dist/components/ButtonV2/utils.d.ts +1 -1
  9. package/dist/components/ChartsV2/index.d.ts +5 -0
  10. package/dist/components/CodeEditorV2/CodeEditorV2.d.ts +1 -1
  11. package/dist/components/CodeEditorV2/codeEditorV2.tokens.d.ts +5 -5
  12. package/dist/components/CodeEditorV2/codeEditorV2.types.d.ts +5 -5
  13. package/dist/components/CodeEditorV2/index.d.ts +2 -0
  14. package/dist/components/CodeEditorV2/utils.d.ts +1 -1
  15. package/dist/components/DataTable/DataTable.d.ts +2 -1
  16. package/dist/components/DataTable/PivotTableModal/PivotPreviewPanel.d.ts +3 -0
  17. package/dist/components/DataTable/PivotTableModal/PivotTableIllustration.d.ts +7 -0
  18. package/dist/components/DataTable/PivotTableModal/index.d.ts +3 -0
  19. package/dist/components/DataTable/PivotTableModal/pivotModalStyleTokens.d.ts +123 -0
  20. package/dist/components/DataTable/PivotTableModal/types.d.ts +62 -0
  21. package/dist/components/DataTable/PivotTableModal/utils.d.ts +32 -0
  22. package/dist/components/DataTable/TableBody/types.d.ts +2 -0
  23. package/dist/components/DataTable/TableHeader/types.d.ts +1 -0
  24. package/dist/components/DataTable/index.d.ts +2 -0
  25. package/dist/components/DataTable/types.d.ts +56 -0
  26. package/dist/components/DataTable/utils.d.ts +19 -1
  27. package/dist/components/InputsV2/ChatInputV2/AttachmentDropdown.d.ts +3 -3
  28. package/dist/components/InputsV2/ChatInputV2/ChatInputTagV2.d.ts +2 -2
  29. package/dist/components/InputsV2/ChatInputV2/ChatInputV2.d.ts +4 -4
  30. package/dist/components/InputsV2/ChatInputV2/ChatInputV2.types.d.ts +8 -8
  31. package/dist/components/InputsV2/ChatInputV2/ChatInputV2AttachmentRow.d.ts +3 -3
  32. package/dist/components/InputsV2/ChatInputV2/MobileChatInputV2.d.ts +2 -2
  33. package/dist/components/InputsV2/ChatInputV2/utils.d.ts +4 -4
  34. package/dist/components/InputsV2/SearchInputV2/utils.d.ts +39 -0
  35. package/dist/components/InputsV2/TextInputV2/TextInputV2.types.d.ts +2 -2
  36. package/dist/components/InputsV2/TextInputV2/index.d.ts +2 -0
  37. package/dist/components/InputsV2/utils/utils.d.ts +1 -1
  38. package/dist/components/KeyValuePairV2/KeyValuePairV2.d.ts +1 -1
  39. package/dist/components/KeyValuePairV2/ResponsiveText.d.ts +2 -2
  40. package/dist/components/KeyValuePairV2/index.d.ts +3 -0
  41. package/dist/components/KeyValuePairV2/keyValuePairV2.types.d.ts +2 -2
  42. package/dist/components/KeyValuePairV2/responsiveTextStyles.d.ts +3 -3
  43. package/dist/components/KeyValuePairV2/utils.d.ts +2 -2
  44. package/dist/components/MenuV2/index.d.ts +1 -0
  45. package/dist/components/MenuV2/menuV2.utils.d.ts +2 -2
  46. package/dist/components/MultiSelectV2/index.d.ts +3 -0
  47. package/dist/components/MultiSelectV2/multiSelectV2.types.d.ts +1 -1
  48. package/dist/components/MultiSelectV2/utils.d.ts +2 -2
  49. package/dist/components/ProgressBarV2/index.d.ts +3 -0
  50. package/dist/components/ProgressBarV2/utils.d.ts +1 -1
  51. package/dist/components/SelectV2/index.d.ts +1 -0
  52. package/dist/components/SelectorV2/CheckboxV2/index.d.ts +4 -0
  53. package/dist/components/SelectorV2/CheckboxV2/utils.d.ts +1 -1
  54. package/dist/components/SelectorV2/RadioV2/index.d.ts +3 -0
  55. package/dist/components/SelectorV2/SwitchV2/index.d.ts +1 -0
  56. package/dist/components/SidebarV2/index.d.ts +5 -0
  57. package/dist/components/SingleSelectV2/SingleSelectV2VirtualList.d.ts +2 -2
  58. package/dist/components/SingleSelectV2/index.d.ts +3 -0
  59. package/dist/components/SingleSelectV2/singleSelectV2.types.d.ts +2 -2
  60. package/dist/components/SingleSelectV2/utils.d.ts +6 -6
  61. package/dist/components/StatCardV2/index.d.ts +10 -1
  62. package/dist/components/StepperV2/index.d.ts +3 -1
  63. package/dist/components/StepperV2/stepperV2.types.d.ts +2 -2
  64. package/dist/components/TabsV2/index.d.ts +3 -1
  65. package/dist/components/TagV2/index.d.ts +3 -0
  66. package/dist/components/TooltipV2/index.d.ts +1 -0
  67. package/dist/components/common/index.d.ts +1 -1
  68. package/dist/main.d.ts +30 -70
  69. package/dist/main.js +87817 -85412
  70. package/dist/{node-CRWdZOVN.js → node-C2uf3sNA.js} +1303 -1300
  71. package/dist/node.js +1 -1
  72. package/dist/tokens.js +1 -1
  73. package/lib/components/AccordionV2/index.ts +3 -0
  74. package/lib/components/AvatarV2/AvatarV2.tsx +2 -2
  75. package/lib/components/AvatarV2/avatarV2.utils.ts +1 -1
  76. package/lib/components/AvatarV2/index.ts +1 -12
  77. package/lib/components/BreadcrumbV2/index.ts +10 -0
  78. package/lib/components/ButtonV2/ButtonGroupV2/index.ts +1 -0
  79. package/lib/components/ButtonV2/ButtonV2.tsx +2 -2
  80. package/lib/components/ButtonV2/LinkButton.tsx +2 -2
  81. package/lib/components/ButtonV2/buttonV2.types.ts +0 -6
  82. package/lib/components/ButtonV2/index.ts +3 -0
  83. package/lib/components/ButtonV2/utils.ts +2 -2
  84. package/lib/components/Charts/BlendChart.tsx +1 -1
  85. package/lib/components/ChartsV2/ChartV2.tsx +3 -2
  86. package/lib/components/ChartsV2/index.ts +5 -0
  87. package/lib/components/CodeEditorV2/CodeEditorV2.tsx +2 -2
  88. package/lib/components/CodeEditorV2/codeEditorV2.dark.tokens.ts +37 -25
  89. package/lib/components/CodeEditorV2/codeEditorV2.light.token.ts +37 -25
  90. package/lib/components/CodeEditorV2/codeEditorV2.tokens.ts +5 -5
  91. package/lib/components/CodeEditorV2/codeEditorV2.types.ts +5 -5
  92. package/lib/components/CodeEditorV2/index.ts +2 -0
  93. package/lib/components/CodeEditorV2/utils.ts +1 -1
  94. package/lib/components/DataTable/DataTable.tsx +148 -4
  95. package/lib/components/DataTable/PivotTableModal/PivotPreviewPanel.tsx +174 -0
  96. package/lib/components/DataTable/PivotTableModal/PivotTableIllustration.tsx +28 -0
  97. package/lib/components/DataTable/PivotTableModal/index.tsx +859 -0
  98. package/lib/components/DataTable/PivotTableModal/pivot-table-illustration.png +0 -0
  99. package/lib/components/DataTable/PivotTableModal/pivotModal.styled.ts +13 -0
  100. package/lib/components/DataTable/PivotTableModal/pivotModalStyleTokens.ts +250 -0
  101. package/lib/components/DataTable/PivotTableModal/types.ts +69 -0
  102. package/lib/components/DataTable/PivotTableModal/utils.ts +360 -0
  103. package/lib/components/DataTable/TableBody/index.tsx +16 -5
  104. package/lib/components/DataTable/TableBody/types.ts +2 -0
  105. package/lib/components/DataTable/TableHeader/index.tsx +6 -3
  106. package/lib/components/DataTable/TableHeader/types.ts +1 -0
  107. package/lib/components/DataTable/index.ts +4 -0
  108. package/lib/components/DataTable/types.ts +57 -0
  109. package/lib/components/DataTable/utils.ts +197 -0
  110. package/lib/components/InputsV2/ChatInputV2/AttachmentDropdown.tsx +3 -3
  111. package/lib/components/InputsV2/ChatInputV2/ChatInputTagV2.tsx +3 -3
  112. package/lib/components/InputsV2/ChatInputV2/ChatInputV2.types.ts +8 -8
  113. package/lib/components/InputsV2/ChatInputV2/ChatInputV2AttachmentRow.tsx +7 -7
  114. package/lib/components/InputsV2/ChatInputV2/utils.ts +8 -8
  115. package/lib/components/InputsV2/SearchInputV2/utils.ts +14 -1
  116. package/lib/components/InputsV2/TextInputV2/TextInputV2.tsx +3 -3
  117. package/lib/components/InputsV2/TextInputV2/TextInputV2.types.ts +2 -2
  118. package/lib/components/InputsV2/TextInputV2/index.ts +2 -0
  119. package/lib/components/KeyValuePairV2/KeyValuePairV2.tsx +6 -2
  120. package/lib/components/KeyValuePairV2/ResponsiveText.tsx +2 -2
  121. package/lib/components/KeyValuePairV2/index.ts +3 -0
  122. package/lib/components/KeyValuePairV2/keyValuePairV2.types.ts +2 -2
  123. package/lib/components/KeyValuePairV2/responsiveTextStyles.ts +3 -3
  124. package/lib/components/KeyValuePairV2/utils.ts +3 -3
  125. package/lib/components/MenuV2/MenuV2.tsx +2 -2
  126. package/lib/components/MenuV2/MenuV2SubMenu.tsx +2 -2
  127. package/lib/components/MenuV2/index.ts +1 -0
  128. package/lib/components/MenuV2/menuV2.utils.ts +4 -4
  129. package/lib/components/MultiSelectV2/MultiSelectV2.tsx +2 -2
  130. package/lib/components/MultiSelectV2/MultiSelectV2Menu.tsx +5 -2
  131. package/lib/components/MultiSelectV2/index.ts +3 -0
  132. package/lib/components/MultiSelectV2/mobile/MobileMultiSelectV2.tsx +7 -4
  133. package/lib/components/MultiSelectV2/multiSelectV2.types.ts +1 -1
  134. package/lib/components/MultiSelectV2/utils.ts +2 -2
  135. package/lib/components/ProgressBarV2/ProgressBarV2.tsx +5 -2
  136. package/lib/components/ProgressBarV2/index.ts +3 -0
  137. package/lib/components/ProgressBarV2/utils.ts +1 -1
  138. package/lib/components/SelectV2/index.ts +1 -0
  139. package/lib/components/SelectorV2/CheckboxV2/CheckboxV2.tsx +2 -2
  140. package/lib/components/SelectorV2/CheckboxV2/index.ts +4 -0
  141. package/lib/components/SelectorV2/CheckboxV2/utils.ts +1 -1
  142. package/lib/components/SelectorV2/RadioV2/index.ts +3 -0
  143. package/lib/components/SelectorV2/SwitchV2/index.ts +1 -0
  144. package/lib/components/Sidebar/Sidebar.tsx +7 -2
  145. package/lib/components/SidebarV2/index.ts +5 -0
  146. package/lib/components/SingleSelectV2/MobileSingleSelectV2.tsx +2 -2
  147. package/lib/components/SingleSelectV2/SingleSelectV2.tsx +10 -3
  148. package/lib/components/SingleSelectV2/SingleSelectV2Menu.tsx +4 -2
  149. package/lib/components/SingleSelectV2/SingleSelectV2VirtualList.tsx +5 -2
  150. package/lib/components/SingleSelectV2/index.ts +7 -0
  151. package/lib/components/SingleSelectV2/singleSelectV2.types.ts +2 -2
  152. package/lib/components/SingleSelectV2/utils.ts +10 -10
  153. package/lib/components/StatCardV2/index.ts +13 -1
  154. package/lib/components/StepperV2/index.ts +3 -1
  155. package/lib/components/StepperV2/stepperV2.types.ts +2 -2
  156. package/lib/components/TabsV2/index.ts +13 -1
  157. package/lib/components/TagV2/index.ts +3 -0
  158. package/lib/components/TooltipV2/index.ts +1 -0
  159. package/lib/components/common/index.ts +1 -1
  160. package/lib/main.ts +34 -258
  161. package/lib/types/assets.d.ts +24 -0
  162. package/package.json +2 -1
package/dist/node.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as a, T as o, y as t, x as T, w as n, v as g, z as k, u as V, t as r, s as i, r as l, q as c, g as b, p as d, o as u, n as S, m as p, a as h, l as m, j as v, i as x, k as A, h as C, f as M, e as B, d as E, c as N, b as P } from "./node-CRWdZOVN.js";
1
+ import { F as a, T as o, y as t, x as T, w as n, v as g, z as k, u as V, t as r, s as i, r as l, q as c, g as b, p as d, o as u, n as S, m as p, a as h, l as m, j as v, i as x, k as A, h as C, f as M, e as B, d as E, c as N, b as P } from "./node-C2uf3sNA.js";
2
2
  export {
3
3
  a as FOUNDATION_THEME,
4
4
  o as Theme,
package/dist/tokens.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as u, T as d, g as k, a as E, b as V, c as g, d as v, e as S, f as p, h, i as R, j as A, k as y, l as C, m as N, n as I, o as P, p as _, q as m, r as B, s as L, t as M, u as w, v as j, w as U, x as D, y as G, z as H } from "./node-CRWdZOVN.js";
1
+ import { F as u, T as d, g as k, a as E, b as V, c as g, d as v, e as S, f as p, h, i as R, j as A, k as y, l as C, m as N, n as I, o as P, p as _, q as m, r as B, s as L, t as M, u as w, v as j, w as U, x as D, y as G, z as H } from "./node-C2uf3sNA.js";
2
2
  import { BRANCH_COLLECTION as ie, BRANCH_ID_PATTERN as ae, PRESETS as ce, PRESET_BLEND_DEFAULT as fe, PRESET_GREEN as le, PRESET_JUSPAY as Te, PRESET_ORANGE as ue, PRESET_PURPLE as de, RADIUS_PRESETS as Oe, SNAPSHOT_SUBCOLLECTION as ke, STORAGE_KEYS as Ee, TEAM_ROLE_PERMISSIONS as Ve, VERSION_PATTERN as ge, VERSION_SUBCOLLECTION as ve, analyzeContrast as Se, canUserPerformAction as pe, diffBrandConfigs as he, extractOverridePaths as Re, generateBranchId as Ae, generateColorScale as ye, getContrastRatio as Ce, getContrastRatioHex as Ne, getDefaultOnboardingState as Ie, getDefaultPreferences as Pe, getPreset as _e, hexToRgb as me, incrementVersion as Be, isValidHexColor as Le, listPresets as Me, meetsWCAG as we, parseBranchId as je, relativeLuminance as Ue, resolveWithInheritance as De, snapshotsPath as Ge, suggestForeground as He, validateAgainstLocks as xe, validateBranchId as Ke, validateBrandConfig as Fe, validatePaletteContrast as Je, validateVersion as $e, versionsPath as Ye } from "./tokens-server.js";
3
3
  function O(e) {
4
4
  const o = typeof structuredClone == "function" ? structuredClone(u) : JSON.parse(JSON.stringify(u));
@@ -1,4 +1,7 @@
1
1
  export { default as AccordionV2 } from './AccordionV2'
2
2
  export { AccordionV2Item } from './AccordionV2Item'
3
+ export { AccordionV2Chevron } from './AccordionV2Chevron'
4
+ export { AccordionV2TriggerContent } from './AccordionV2TriggerContent'
5
+ export * from './accordionV2.animations'
3
6
  export * from './accordionV2.tokens'
4
7
  export * from './accordionV2.types'
@@ -21,7 +21,7 @@ import {
21
21
  getAriaLiveValue,
22
22
  getStatusPositionStyles,
23
23
  renderFallbackContent,
24
- createKeyboardHandler,
24
+ createAvatarKeyboardHandler,
25
25
  isInteractive,
26
26
  } from './avatarV2.utils'
27
27
 
@@ -209,7 +209,7 @@ const AvatarV2 = forwardRef<HTMLDivElement, AvatarV2Props>(
209
209
  onImageLoad?.()
210
210
  }
211
211
 
212
- const keyboardHandler = createKeyboardHandler(rest.onClick)
212
+ const keyboardHandler = createAvatarKeyboardHandler(rest.onClick)
213
213
  const filteredProps = filterBlockedProps(rest)
214
214
 
215
215
  const renderAvatarContent = () => {
@@ -174,7 +174,7 @@ export function getStatusPositionStyles(
174
174
  return { top, right }
175
175
  }
176
176
  }
177
- export function createKeyboardHandler(
177
+ export function createAvatarKeyboardHandler(
178
178
  onClick: ((event: React.MouseEvent<HTMLDivElement>) => void) | undefined
179
179
  ) {
180
180
  if (!onClick) {
@@ -1,15 +1,4 @@
1
1
  export { default as AvatarV2 } from './AvatarV2'
2
- export type {
3
- AvatarV2Props,
4
- AvatarV2SkeletonConfig,
5
- AvatarV2StatusConfig,
6
- } from './avatarV2.types'
7
- export {
8
- AvatarV2Size,
9
- AvatarV2Shape,
10
- AvatarV2Status,
11
- AvatarV2StatusPosition,
12
- AvatarV2Variant,
13
- } from './avatarV2.types'
2
+ export * from './avatarV2.types'
14
3
  export * from './avatarV2.tokens'
15
4
  export * from './avatarV2.utils'
@@ -1,3 +1,13 @@
1
1
  export { default as BreadcrumbV2 } from './BreadcrumbV2'
2
+ export { default as BreadcrumbV2Icon } from './BreadcrumbV2Icon'
3
+ export { default as BreadcrumbV2Item } from './BreadcrumbV2Item'
4
+ export { default as BreadcrumbV2List } from './BreadcrumbV2List'
5
+ export type { BreadcrumbV2ListProps } from './BreadcrumbV2List'
6
+ export { default as BreadcrumbV2OverflowMenu } from './BreadcrumbV2OverflowMenu'
7
+ export type { BreadcrumbV2OverflowMenuProps } from './BreadcrumbV2OverflowMenu'
8
+ export { default as BreadcrumbV2Page } from './BreadcrumbV2Page'
9
+ export type { BreadcrumbV2PageProps } from './BreadcrumbV2Page'
10
+ export { default as BreadcrumbV2Separator } from './BreadcrumbV2Separator'
2
11
  export * from './breadcrumbV2.tokens'
3
12
  export * from './breadcrumbV2.types'
13
+ export * from './utils'
@@ -4,3 +4,4 @@ export type {
4
4
  ButtonGroupPosition,
5
5
  } from './buttonGroupV2.types'
6
6
  export * from './buttonGroupV2.types'
7
+ export * from './utils'
@@ -15,7 +15,7 @@ import Skeleton from '../Skeleton/Skeleton'
15
15
  import PrimitiveButton from '../Primitives/PrimitiveButton/PrimitiveButton'
16
16
  import { VisuallyHidden } from './VisuallyHidden'
17
17
  import {
18
- getBorderRadius,
18
+ getButtonV2BorderRadius,
19
19
  getButtonHeight,
20
20
  getButtonStatus,
21
21
  getButtonTabIndex,
@@ -208,7 +208,7 @@ const ButtonV2 = forwardRef<HTMLButtonElement, ButtonV2Props>(
208
208
  onClick?.(event)
209
209
  }
210
210
 
211
- const borderRadius = getBorderRadius(
211
+ const borderRadius = getButtonV2BorderRadius(
212
212
  size,
213
213
  buttonType,
214
214
  subType,
@@ -12,7 +12,7 @@ import { useResponsiveTokens } from '../../hooks/useResponsiveTokens'
12
12
  import Skeleton from '../Skeleton/Skeleton'
13
13
  import { renderButtonContent } from './ButtonV2'
14
14
  import {
15
- getBorderRadius,
15
+ getButtonV2BorderRadius,
16
16
  getButtonHeight,
17
17
  getButtonStatus,
18
18
  getSkeletonBorderRadius,
@@ -60,7 +60,7 @@ const LinkButton = forwardRef<HTMLAnchorElement, LinkButtonProps>(
60
60
  )
61
61
  const buttonStatus = getButtonStatus(isLoading, isDisabled)
62
62
 
63
- const borderRadius = getBorderRadius(
63
+ const borderRadius = getButtonV2BorderRadius(
64
64
  size,
65
65
  buttonType,
66
66
  subType,
@@ -34,12 +34,6 @@ export enum PaddingDirection {
34
34
  LEFT = 'left',
35
35
  }
36
36
 
37
- // Legacy exports for backward compatibility
38
- export const ButtonType = ButtonV2Type
39
- export const ButtonSize = ButtonV2Size
40
- export const ButtonSubType = ButtonV2SubType
41
- export const ButtonState = ButtonV2State
42
-
43
37
  export type ButtonSlot = {
44
38
  slot: React.ReactNode
45
39
  maxHeight?: string | number
@@ -1,4 +1,5 @@
1
1
  export { default as ButtonV2 } from './ButtonV2'
2
+ export { renderButtonContent } from './ButtonV2'
2
3
  export { default as IconButton } from './IconButton'
3
4
  export { default as LinkButton } from './LinkButton'
4
5
  export { ButtonGroupV2 } from './ButtonGroupV2'
@@ -6,3 +7,5 @@ export type { ButtonV2Props, LinkButtonProps } from './buttonV2.types'
6
7
  export type { IconButtonProps } from './IconButton'
7
8
  export type { ButtonGroupV2Props, ButtonGroupPosition } from './ButtonGroupV2'
8
9
  export * from './buttonV2.types'
10
+ export * from './buttonV2.tokens'
11
+ export * from './utils'
@@ -10,7 +10,7 @@ import {
10
10
  import type { ButtonV2TokensType } from './buttonV2.tokens'
11
11
  import { FOUNDATION_THEME } from '../../tokens'
12
12
 
13
- export function getBorderRadius(
13
+ export function getButtonV2BorderRadius(
14
14
  size: ButtonV2Size,
15
15
  buttonType: ButtonV2Type,
16
16
  subType: ButtonV2SubType,
@@ -101,7 +101,7 @@ export function getSkeletonBorderRadius(
101
101
  buttonGroupPosition: 'center' | 'left' | 'right' | undefined,
102
102
  tokens: ButtonV2TokensType
103
103
  ): string {
104
- return getBorderRadius(
104
+ return getButtonV2BorderRadius(
105
105
  size,
106
106
  buttonType,
107
107
  subType,
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
 
3
- import HighchartsReact from 'highcharts-react-official'
3
+ import { HighchartsReact } from 'highcharts-react-official'
4
4
  import Highcharts from 'highcharts'
5
5
  import 'highcharts/modules/xrange'
6
6
  import { forwardRef, useRef } from 'react'
@@ -5,8 +5,9 @@ import {
5
5
  ChartV2SeriesOptionsType,
6
6
  } from './chartV2.types'
7
7
  import Highcharts from 'highcharts'
8
- import HighchartsReact, {
9
- HighchartsReactProps,
8
+ import {
9
+ HighchartsReact,
10
+ type HighchartsReactProps,
10
11
  } from 'highcharts-react-official'
11
12
  import { useResponsiveTokens } from '../../hooks/useResponsiveTokens'
12
13
  import { ChartV2TokensType } from './chartV2.tokens'
@@ -7,3 +7,8 @@ export { default as ChartV2Skeleton } from './ChartV2Skeleton'
7
7
  export { default as ChartV2NoData } from './ChartV2NoData'
8
8
  export * from './chartV2.tokens'
9
9
  export * from './chartV2.types'
10
+ export { useChartLegend } from './useChartLegend'
11
+ export { useChartLegendHover } from './useChartLegendHover'
12
+ export { default as useChartRefs } from './useChartRefs'
13
+ export { getLegendItems, applyHoverState } from './utils'
14
+ export { mergeChartOptions } from './chartV2Options'
@@ -8,7 +8,7 @@ import {
8
8
  copyToClipboardWithTemporaryFeedback,
9
9
  isDiffEditorMode,
10
10
  shouldShowLineNumbers,
11
- getContainerStyles,
11
+ getCodeEditorV2ContainerStyles,
12
12
  toCssValue,
13
13
  } from './utils'
14
14
  import { CodeEditorV2Header } from './CodeEditorV2Header'
@@ -91,7 +91,7 @@ const CodeEditorV2 = forwardRef<HTMLDivElement, CodeEditorV2Props>(
91
91
  const resolvedEditorHeight = toCssValue(height)
92
92
  const hasFixedEditorHeight = Boolean(resolvedEditorHeight)
93
93
  const editorMinHeight = hasFixedEditorHeight ? height! : minHeight
94
- const containerStyles = getContainerStyles(
94
+ const containerStyles = getCodeEditorV2ContainerStyles(
95
95
  hasFixedEditorHeight ? undefined : minHeight,
96
96
  maxHeight
97
97
  )
@@ -1,6 +1,6 @@
1
1
  import { FoundationTokenType } from '../../tokens/theme.token'
2
2
  import { ResponsiveCodeEditorV2Tokens } from './codeEditorV2.tokens'
3
- import { DiffLineType, MonacoTheme } from './codeEditorV2.types'
3
+ import { CodeEditorV2DiffLineType, MonacoTheme } from './codeEditorV2.types'
4
4
 
5
5
  export const darkCodeEditorV2Tokens = (
6
6
  foundationToken: FoundationTokenType
@@ -41,20 +41,24 @@ export const darkCodeEditorV2Tokens = (
41
41
  width: '40px',
42
42
  color: foundationToken.colors.gray[0],
43
43
  backgroundColor: {
44
- [DiffLineType.UNCHANGED]:
44
+ [CodeEditorV2DiffLineType.UNCHANGED]:
45
45
  foundationToken.colors.gray[200],
46
- [DiffLineType.REMOVED]: foundationToken.colors.red[500],
47
- [DiffLineType.ADDED]: foundationToken.colors.green[500],
46
+ [CodeEditorV2DiffLineType.REMOVED]:
47
+ foundationToken.colors.red[500],
48
+ [CodeEditorV2DiffLineType.ADDED]:
49
+ foundationToken.colors.green[500],
48
50
  },
49
51
  borderLeft: {
50
- [DiffLineType.UNCHANGED]: 'none',
51
- [DiffLineType.REMOVED]: `2px solid ${foundationToken.colors.red[600]}`,
52
- [DiffLineType.ADDED]: `2px solid ${foundationToken.colors.green[600]}`,
52
+ [CodeEditorV2DiffLineType.UNCHANGED]: 'none',
53
+ [CodeEditorV2DiffLineType.REMOVED]: `2px solid ${foundationToken.colors.red[600]}`,
54
+ [CodeEditorV2DiffLineType.ADDED]: `2px solid ${foundationToken.colors.green[600]}`,
53
55
  },
54
56
  borderColor: {
55
- [DiffLineType.UNCHANGED]: 'transparent',
56
- [DiffLineType.REMOVED]: foundationToken.colors.red[600],
57
- [DiffLineType.ADDED]: foundationToken.colors.green[600],
57
+ [CodeEditorV2DiffLineType.UNCHANGED]: 'transparent',
58
+ [CodeEditorV2DiffLineType.REMOVED]:
59
+ foundationToken.colors.red[600],
60
+ [CodeEditorV2DiffLineType.ADDED]:
61
+ foundationToken.colors.green[600],
58
62
  },
59
63
  },
60
64
  code: {
@@ -68,9 +72,11 @@ export const darkCodeEditorV2Tokens = (
68
72
  },
69
73
  highlightedLine: {
70
74
  backgroundColor: {
71
- [DiffLineType.UNCHANGED]: 'transparent',
72
- [DiffLineType.REMOVED]: foundationToken.colors.red[700],
73
- [DiffLineType.ADDED]: foundationToken.colors.green[700],
75
+ [CodeEditorV2DiffLineType.UNCHANGED]: 'transparent',
76
+ [CodeEditorV2DiffLineType.REMOVED]:
77
+ foundationToken.colors.red[700],
78
+ [CodeEditorV2DiffLineType.ADDED]:
79
+ foundationToken.colors.green[700],
74
80
  },
75
81
  },
76
82
  syntax: {
@@ -120,20 +126,24 @@ export const darkCodeEditorV2Tokens = (
120
126
  width: '44px',
121
127
  color: foundationToken.colors.gray[0],
122
128
  backgroundColor: {
123
- [DiffLineType.UNCHANGED]:
129
+ [CodeEditorV2DiffLineType.UNCHANGED]:
124
130
  foundationToken.colors.gray[200],
125
- [DiffLineType.REMOVED]: foundationToken.colors.red[500],
126
- [DiffLineType.ADDED]: foundationToken.colors.green[500],
131
+ [CodeEditorV2DiffLineType.REMOVED]:
132
+ foundationToken.colors.red[500],
133
+ [CodeEditorV2DiffLineType.ADDED]:
134
+ foundationToken.colors.green[500],
127
135
  },
128
136
  borderLeft: {
129
- [DiffLineType.UNCHANGED]: 'none',
130
- [DiffLineType.REMOVED]: `2px solid ${foundationToken.colors.red[600]}`,
131
- [DiffLineType.ADDED]: `2px solid ${foundationToken.colors.green[600]}`,
137
+ [CodeEditorV2DiffLineType.UNCHANGED]: 'none',
138
+ [CodeEditorV2DiffLineType.REMOVED]: `2px solid ${foundationToken.colors.red[600]}`,
139
+ [CodeEditorV2DiffLineType.ADDED]: `2px solid ${foundationToken.colors.green[600]}`,
132
140
  },
133
141
  borderColor: {
134
- [DiffLineType.UNCHANGED]: 'transparent',
135
- [DiffLineType.REMOVED]: foundationToken.colors.red[600],
136
- [DiffLineType.ADDED]: foundationToken.colors.green[600],
142
+ [CodeEditorV2DiffLineType.UNCHANGED]: 'transparent',
143
+ [CodeEditorV2DiffLineType.REMOVED]:
144
+ foundationToken.colors.red[600],
145
+ [CodeEditorV2DiffLineType.ADDED]:
146
+ foundationToken.colors.green[600],
137
147
  },
138
148
  },
139
149
  code: {
@@ -147,9 +157,11 @@ export const darkCodeEditorV2Tokens = (
147
157
  },
148
158
  highlightedLine: {
149
159
  backgroundColor: {
150
- [DiffLineType.UNCHANGED]: 'transparent',
151
- [DiffLineType.REMOVED]: foundationToken.colors.red[700],
152
- [DiffLineType.ADDED]: foundationToken.colors.green[700],
160
+ [CodeEditorV2DiffLineType.UNCHANGED]: 'transparent',
161
+ [CodeEditorV2DiffLineType.REMOVED]:
162
+ foundationToken.colors.red[700],
163
+ [CodeEditorV2DiffLineType.ADDED]:
164
+ foundationToken.colors.green[700],
153
165
  },
154
166
  },
155
167
  syntax: {
@@ -1,6 +1,6 @@
1
1
  import { FoundationTokenType } from '../../tokens/theme.token'
2
2
  import { ResponsiveCodeEditorV2Tokens } from './codeEditorV2.tokens'
3
- import { DiffLineType, MonacoTheme } from './codeEditorV2.types'
3
+ import { CodeEditorV2DiffLineType, MonacoTheme } from './codeEditorV2.types'
4
4
 
5
5
  export const lightCodeEditorV2Tokens = (
6
6
  foundationToken: FoundationTokenType
@@ -41,21 +41,25 @@ export const lightCodeEditorV2Tokens = (
41
41
  width: '40px',
42
42
  color: foundationToken.colors.gray[400],
43
43
  backgroundColor: {
44
- [DiffLineType.UNCHANGED]:
44
+ [CodeEditorV2DiffLineType.UNCHANGED]:
45
45
  foundationToken.colors.gray[200],
46
- [DiffLineType.REMOVED]: foundationToken.colors.red[200],
47
- [DiffLineType.ADDED]: foundationToken.colors.green[200],
46
+ [CodeEditorV2DiffLineType.REMOVED]:
47
+ foundationToken.colors.red[200],
48
+ [CodeEditorV2DiffLineType.ADDED]:
49
+ foundationToken.colors.green[200],
48
50
  },
49
51
  borderLeft: {
50
- [DiffLineType.UNCHANGED]: 'none',
51
- [DiffLineType.REMOVED]: `2px solid ${foundationToken.colors.red[600]}`,
52
- [DiffLineType.ADDED]: `2px solid ${foundationToken.colors.green[600]}`,
52
+ [CodeEditorV2DiffLineType.UNCHANGED]: 'none',
53
+ [CodeEditorV2DiffLineType.REMOVED]: `2px solid ${foundationToken.colors.red[600]}`,
54
+ [CodeEditorV2DiffLineType.ADDED]: `2px solid ${foundationToken.colors.green[600]}`,
53
55
  },
54
56
  borderColor: {
55
- [DiffLineType.UNCHANGED]:
57
+ [CodeEditorV2DiffLineType.UNCHANGED]:
56
58
  foundationToken.colors.gray[0],
57
- [DiffLineType.REMOVED]: foundationToken.colors.red[600],
58
- [DiffLineType.ADDED]: foundationToken.colors.green[600],
59
+ [CodeEditorV2DiffLineType.REMOVED]:
60
+ foundationToken.colors.red[600],
61
+ [CodeEditorV2DiffLineType.ADDED]:
62
+ foundationToken.colors.green[600],
59
63
  },
60
64
  },
61
65
  code: {
@@ -69,9 +73,11 @@ export const lightCodeEditorV2Tokens = (
69
73
  },
70
74
  highlightedLine: {
71
75
  backgroundColor: {
72
- [DiffLineType.UNCHANGED]: 'transparent',
73
- [DiffLineType.REMOVED]: foundationToken.colors.red[100],
74
- [DiffLineType.ADDED]: foundationToken.colors.green[100],
76
+ [CodeEditorV2DiffLineType.UNCHANGED]: 'transparent',
77
+ [CodeEditorV2DiffLineType.REMOVED]:
78
+ foundationToken.colors.red[100],
79
+ [CodeEditorV2DiffLineType.ADDED]:
80
+ foundationToken.colors.green[100],
75
81
  },
76
82
  },
77
83
  syntax: {
@@ -121,21 +127,25 @@ export const lightCodeEditorV2Tokens = (
121
127
  width: '44px',
122
128
  color: foundationToken.colors.gray[400],
123
129
  backgroundColor: {
124
- [DiffLineType.UNCHANGED]:
130
+ [CodeEditorV2DiffLineType.UNCHANGED]:
125
131
  foundationToken.colors.gray[200],
126
- [DiffLineType.REMOVED]: foundationToken.colors.red[200],
127
- [DiffLineType.ADDED]: foundationToken.colors.green[200],
132
+ [CodeEditorV2DiffLineType.REMOVED]:
133
+ foundationToken.colors.red[200],
134
+ [CodeEditorV2DiffLineType.ADDED]:
135
+ foundationToken.colors.green[200],
128
136
  },
129
137
  borderLeft: {
130
- [DiffLineType.UNCHANGED]: 'none',
131
- [DiffLineType.REMOVED]: `2px solid ${foundationToken.colors.red[600]}`,
132
- [DiffLineType.ADDED]: `2px solid ${foundationToken.colors.green[600]}`,
138
+ [CodeEditorV2DiffLineType.UNCHANGED]: 'none',
139
+ [CodeEditorV2DiffLineType.REMOVED]: `2px solid ${foundationToken.colors.red[600]}`,
140
+ [CodeEditorV2DiffLineType.ADDED]: `2px solid ${foundationToken.colors.green[600]}`,
133
141
  },
134
142
  borderColor: {
135
- [DiffLineType.UNCHANGED]:
143
+ [CodeEditorV2DiffLineType.UNCHANGED]:
136
144
  foundationToken.colors.gray[0],
137
- [DiffLineType.REMOVED]: foundationToken.colors.red[600],
138
- [DiffLineType.ADDED]: foundationToken.colors.green[600],
145
+ [CodeEditorV2DiffLineType.REMOVED]:
146
+ foundationToken.colors.red[600],
147
+ [CodeEditorV2DiffLineType.ADDED]:
148
+ foundationToken.colors.green[600],
139
149
  },
140
150
  },
141
151
  code: {
@@ -149,9 +159,11 @@ export const lightCodeEditorV2Tokens = (
149
159
  },
150
160
  highlightedLine: {
151
161
  backgroundColor: {
152
- [DiffLineType.UNCHANGED]: 'transparent',
153
- [DiffLineType.REMOVED]: foundationToken.colors.red[100],
154
- [DiffLineType.ADDED]: foundationToken.colors.green[100],
162
+ [CodeEditorV2DiffLineType.UNCHANGED]: 'transparent',
163
+ [CodeEditorV2DiffLineType.REMOVED]:
164
+ foundationToken.colors.red[100],
165
+ [CodeEditorV2DiffLineType.ADDED]:
166
+ foundationToken.colors.green[100],
155
167
  },
156
168
  },
157
169
  syntax: {
@@ -1,10 +1,10 @@
1
1
  import type { CSSObject } from 'styled-components'
2
- import { DiffLineType } from './codeEditorV2.types'
3
2
  import { BreakpointType } from '../../breakpoints/breakPoints'
4
3
  import { FoundationTokenType } from '../../tokens/theme.token'
5
4
  import { darkCodeEditorV2Tokens } from './codeEditorV2.dark.tokens'
6
5
  import { lightCodeEditorV2Tokens } from './codeEditorV2.light.token'
7
6
  import { Theme } from '../../context/theme.enum'
7
+ import { CodeEditorV2DiffLineType } from './codeEditorV2.types'
8
8
 
9
9
  export type CodeEditorV2Tokens = {
10
10
  backgroundColor: CSSObject['backgroundColor']
@@ -44,13 +44,13 @@ export type CodeEditorV2Tokens = {
44
44
  width: CSSObject['width']
45
45
  color: CSSObject['color']
46
46
  backgroundColor: {
47
- [key in DiffLineType]: CSSObject['backgroundColor']
47
+ [key in CodeEditorV2DiffLineType]: CSSObject['backgroundColor']
48
48
  }
49
49
  borderLeft: {
50
- [key in DiffLineType]: CSSObject['borderLeft']
50
+ [key in CodeEditorV2DiffLineType]: CSSObject['borderLeft']
51
51
  }
52
52
  borderColor: {
53
- [key in DiffLineType]: CSSObject['color']
53
+ [key in CodeEditorV2DiffLineType]: CSSObject['color']
54
54
  }
55
55
  }
56
56
  // Code tokens
@@ -66,7 +66,7 @@ export type CodeEditorV2Tokens = {
66
66
  // Highlighted line tokens (for diff mode and code highlighting)
67
67
  highlightedLine: {
68
68
  backgroundColor: {
69
- [key in DiffLineType]: CSSObject['backgroundColor']
69
+ [key in CodeEditorV2DiffLineType]: CSSObject['backgroundColor']
70
70
  }
71
71
  }
72
72
  // Syntax highlighting tokens
@@ -11,18 +11,18 @@ export enum MonacoTheme {
11
11
  LIGHT = 'light',
12
12
  DARK = 'dark',
13
13
  }
14
- export enum DiffLineType {
14
+ export enum CodeEditorV2DiffLineType {
15
15
  ADDED = 'added',
16
16
  REMOVED = 'removed',
17
17
  UNCHANGED = 'unchanged',
18
18
  }
19
19
 
20
- export type DiffLine = {
20
+ export type CodeEditorV2DiffLine = {
21
21
  content: string
22
- type: DiffLineType
22
+ type: CodeEditorV2DiffLineType
23
23
  }
24
24
 
25
- export type SupportedLanguage =
25
+ export type CodeEditorV2SupportedLanguage =
26
26
  | 'javascript'
27
27
  | 'typescript'
28
28
  | 'jsx'
@@ -57,7 +57,7 @@ export type CodeEditorV2Props = {
57
57
  rightSlot?: ReactNode
58
58
  showCopyButton?: boolean
59
59
  }
60
- language?: SupportedLanguage
60
+ language?: CodeEditorV2SupportedLanguage
61
61
  placeholder?: string
62
62
  readOnly?: boolean
63
63
  disabled?: boolean
@@ -1,3 +1,5 @@
1
1
  export { default as CodeEditorV2 } from './CodeEditorV2'
2
+ export { CodeEditorV2Header } from './CodeEditorV2Header'
2
3
  export * from './codeEditorV2.types'
3
4
  export * from './codeEditorV2.tokens'
5
+ export * from './utils'
@@ -98,7 +98,7 @@ export const isDiffEditorMode = (
98
98
  /**
99
99
  * Calculates container styles with min/max height
100
100
  */
101
- export const getContainerStyles = (
101
+ export const getCodeEditorV2ContainerStyles = (
102
102
  minHeight?: string | number,
103
103
  maxHeight?: string | number
104
104
  ): React.CSSProperties => {