@juspay/blend-design-system 0.0.37-beta.8 → 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 (240) hide show
  1. package/dist/components/Accordion/index.d.ts +2 -0
  2. package/dist/components/AccordionV2/accordionV2.animations.d.ts +1 -1
  3. package/dist/components/Alert/index.d.ts +1 -0
  4. package/dist/components/Avatar/index.d.ts +1 -0
  5. package/dist/components/Breadcrumb/index.d.ts +1 -0
  6. package/dist/components/Button/index.d.ts +1 -0
  7. package/dist/components/ButtonGroup/index.d.ts +1 -0
  8. package/dist/components/Card/index.d.ts +1 -0
  9. package/dist/components/CardV2/CardV2.d.ts +45 -0
  10. package/dist/components/CardV2/CardV2.utils.d.ts +14 -0
  11. package/dist/components/CardV2/CardV2Components.d.ts +8 -0
  12. package/dist/components/CardV2/CardV2Context.d.ts +14 -0
  13. package/dist/components/CardV2/CardV2Skeleton.d.ts +6 -0
  14. package/dist/components/CardV2/accessibility/CardV2AccessibilityReport.d.ts +2 -0
  15. package/dist/components/CardV2/accessibility/index.d.ts +1 -0
  16. package/dist/components/CardV2/cardV2.dark.tokens.d.ts +3 -0
  17. package/dist/components/CardV2/cardV2.light.tokens.d.ts +3 -0
  18. package/dist/components/CardV2/cardV2.tokens.d.ts +5 -0
  19. package/dist/components/CardV2/cardV2.tokens.types.d.ts +92 -0
  20. package/dist/components/CardV2/cardV2.types.d.ts +106 -0
  21. package/dist/components/CardV2/index.d.ts +5 -0
  22. package/dist/components/Charts/index.d.ts +10 -0
  23. package/dist/components/Charts/types.d.ts +2 -0
  24. package/dist/components/ChatInput/index.d.ts +1 -0
  25. package/dist/components/Checkbox/index.d.ts +1 -0
  26. package/dist/components/CodeEditor/index.d.ts +1 -0
  27. package/dist/components/DataTable/PivotTableModal/pivotModal.styled.d.ts +184 -0
  28. package/dist/components/DataTable/TableBody/types.d.ts +3 -1
  29. package/dist/components/DataTable/hooks/index.d.ts +2 -0
  30. package/dist/components/DataTable/hooks/useReducedMotion.d.ts +1 -0
  31. package/dist/components/DataTable/hooks/useRowFlip.d.ts +6 -0
  32. package/dist/components/DataTable/types.d.ts +26 -0
  33. package/dist/components/DateRangePicker/CalendarGrid.d.ts +5 -2
  34. package/dist/components/DateRangePicker/types.d.ts +3 -1
  35. package/dist/components/DateRangePicker/utils.d.ts +5 -5
  36. package/dist/components/Directory/Directory.d.ts +1 -1
  37. package/dist/components/Directory/NavItem.d.ts +1 -1
  38. package/dist/components/Directory/Section.d.ts +1 -1
  39. package/dist/components/Directory/VirtualizedDirectory.d.ts +3 -0
  40. package/dist/components/Directory/directory.tokens.d.ts +7 -0
  41. package/dist/components/Directory/types.d.ts +38 -1
  42. package/dist/components/Directory/utils.d.ts +3 -1
  43. package/dist/components/Drawer/index.d.ts +1 -0
  44. package/dist/components/Inputs/MultiValueInput/index.d.ts +1 -0
  45. package/dist/components/Inputs/NumberInput/index.d.ts +1 -0
  46. package/dist/components/Inputs/OTPInput/index.d.ts +1 -0
  47. package/dist/components/Inputs/SearchInput/index.d.ts +1 -0
  48. package/dist/components/Inputs/TextArea/index.d.ts +1 -0
  49. package/dist/components/Inputs/TextInput/index.d.ts +1 -0
  50. package/dist/components/InputsV2/TextAreaV2/utils.d.ts +2 -1
  51. package/dist/components/InputsV2/TextInputV2/utils.d.ts +2 -1
  52. package/dist/components/InputsV2/UploadV2/UploadContainerV2.d.ts +24 -0
  53. package/dist/components/InputsV2/UploadV2/UploadV2.d.ts +31 -0
  54. package/dist/components/InputsV2/UploadV2/UploadV2.dark.tokens.d.ts +3 -0
  55. package/dist/components/InputsV2/UploadV2/UploadV2.light.tokens.d.ts +3 -0
  56. package/dist/components/InputsV2/UploadV2/UploadV2.tokens.d.ts +5 -0
  57. package/dist/components/InputsV2/UploadV2/UploadV2.tokens.types.d.ts +115 -0
  58. package/dist/components/InputsV2/UploadV2/UploadV2.types.d.ts +56 -0
  59. package/dist/components/InputsV2/UploadV2/index.d.ts +3 -0
  60. package/dist/components/InputsV2/UploadV2/utils.d.ts +32 -0
  61. package/dist/components/KeyValuePair/index.d.ts +1 -0
  62. package/dist/components/Menu/Menu.d.ts +1 -1
  63. package/dist/components/Menu/index.d.ts +1 -0
  64. package/dist/components/Menu/types.d.ts +7 -0
  65. package/dist/components/Menu/utils.d.ts +10 -2
  66. package/dist/components/Modal/index.d.ts +1 -0
  67. package/dist/components/ModalV2/ModalV2.d.ts +22 -0
  68. package/dist/components/ModalV2/ModalV2Footer.d.ts +10 -0
  69. package/dist/components/ModalV2/ModalV2Header.d.ts +15 -0
  70. package/dist/components/ModalV2/ModalV2Skeleton.d.ts +4 -0
  71. package/dist/components/ModalV2/index.d.ts +4 -0
  72. package/dist/components/ModalV2/mobileModalV2.d.ts +23 -0
  73. package/dist/components/ModalV2/modalAnimationV2.d.ts +3 -0
  74. package/dist/components/ModalV2/modalV2.dark.tokens.d.ts +3 -0
  75. package/dist/components/ModalV2/modalV2.light.tokens.d.ts +3 -0
  76. package/dist/components/ModalV2/modalV2.tokens.d.ts +5 -0
  77. package/dist/components/ModalV2/modalV2.tokens.types.d.ts +91 -0
  78. package/dist/components/ModalV2/modalV2.types.d.ts +66 -0
  79. package/dist/components/MultiSelect/index.d.ts +2 -0
  80. package/dist/components/Popover/index.d.ts +1 -0
  81. package/dist/components/Primitives/Block/Block.d.ts +1 -1
  82. package/dist/components/ProgressBar/index.d.ts +1 -0
  83. package/dist/components/Radio/index.d.ts +2 -0
  84. package/dist/components/Sidebar/SidebarContent.d.ts +9 -1
  85. package/dist/components/Sidebar/index.d.ts +1 -0
  86. package/dist/components/Sidebar/types.d.ts +9 -1
  87. package/dist/components/SidebarV2/SidebarV2Panel.d.ts +10 -2
  88. package/dist/components/SidebarV2/types.d.ts +9 -1
  89. package/dist/components/SingleSelect/index.d.ts +1 -0
  90. package/dist/components/Skeleton/SkeletonCompound.d.ts +24 -33
  91. package/dist/components/Snackbar/index.d.ts +2 -0
  92. package/dist/components/StatCard/index.d.ts +1 -0
  93. package/dist/components/Stepper/index.d.ts +1 -0
  94. package/dist/components/Switch/index.d.ts +2 -0
  95. package/dist/components/Tabs/index.d.ts +1 -0
  96. package/dist/components/Tags/index.d.ts +1 -0
  97. package/dist/components/Timeline/Timeline.d.ts +13 -37
  98. package/dist/components/Tooltip/index.d.ts +1 -0
  99. package/dist/components/Topbar/index.d.ts +1 -0
  100. package/dist/components/Upload/index.d.ts +1 -0
  101. package/dist/context/ThemeContext.d.ts +6 -0
  102. package/dist/context/useComponentToken.d.ts +4 -1
  103. package/dist/main.d.ts +6 -0
  104. package/dist/main.js +45081 -41934
  105. package/dist/node-B3rrXW84.js +1023 -0
  106. package/dist/node.d.ts +2 -0
  107. package/dist/node.js +21 -18
  108. package/dist/token-engine.js +1 -1
  109. package/lib/components/Accordion/AccordionItem.tsx +2 -6
  110. package/lib/components/Accordion/index.ts +2 -0
  111. package/lib/components/AccordionV2/AccordionV2Item.tsx +1 -1
  112. package/lib/components/AccordionV2/accordionV2.animations.ts +1 -5
  113. package/lib/components/Alert/index.ts +1 -0
  114. package/lib/components/Avatar/index.ts +1 -0
  115. package/lib/components/Breadcrumb/index.ts +1 -0
  116. package/lib/components/Button/index.ts +1 -0
  117. package/lib/components/ButtonGroup/index.ts +1 -0
  118. package/lib/components/Card/index.ts +1 -0
  119. package/lib/components/CardV2/CardV2.tsx +327 -0
  120. package/lib/components/CardV2/CardV2.utils.tsx +77 -0
  121. package/lib/components/CardV2/CardV2Components.tsx +297 -0
  122. package/lib/components/CardV2/CardV2Context.tsx +18 -0
  123. package/lib/components/CardV2/CardV2Skeleton.tsx +40 -0
  124. package/lib/components/CardV2/accessibility/CardV2AccessibilityReport.ts +284 -0
  125. package/lib/components/CardV2/accessibility/index.ts +1 -0
  126. package/lib/components/CardV2/cardV2.dark.tokens.ts +177 -0
  127. package/lib/components/CardV2/cardV2.light.tokens.ts +177 -0
  128. package/lib/components/CardV2/cardV2.tokens.ts +21 -0
  129. package/lib/components/CardV2/cardV2.tokens.types.ts +94 -0
  130. package/lib/components/CardV2/cardV2.types.ts +131 -0
  131. package/lib/components/CardV2/index.ts +13 -0
  132. package/lib/components/Charts/ChartLegend.tsx +25 -5
  133. package/lib/components/Charts/Charts.tsx +10 -0
  134. package/lib/components/Charts/index.ts +10 -0
  135. package/lib/components/Charts/types.tsx +2 -0
  136. package/lib/components/ChatInput/index.tsx +1 -0
  137. package/lib/components/Checkbox/index.ts +1 -0
  138. package/lib/components/CodeEditor/index.ts +1 -0
  139. package/lib/components/DataTable/DataTable.tsx +8 -0
  140. package/lib/components/DataTable/TableBody/index.tsx +47 -11
  141. package/lib/components/DataTable/TableBody/types.ts +7 -1
  142. package/lib/components/DataTable/TableCell/index.tsx +1 -1
  143. package/lib/components/DataTable/hooks/index.ts +2 -0
  144. package/lib/components/DataTable/hooks/useReducedMotion.ts +19 -0
  145. package/lib/components/DataTable/hooks/useRowFlip.ts +170 -0
  146. package/lib/components/DataTable/types.ts +32 -0
  147. package/lib/components/DateRangePicker/CalendarGrid.tsx +36 -6
  148. package/lib/components/DateRangePicker/DateRangePicker.tsx +22 -3
  149. package/lib/components/DateRangePicker/types.ts +6 -1
  150. package/lib/components/DateRangePicker/utils.ts +123 -12
  151. package/lib/components/Directory/Directory.tsx +31 -0
  152. package/lib/components/Directory/NavItem.tsx +177 -86
  153. package/lib/components/Directory/Section.tsx +9 -0
  154. package/lib/components/Directory/VirtualizedDirectory.tsx +670 -0
  155. package/lib/components/Directory/directory.tokens.ts +21 -0
  156. package/lib/components/Directory/types.ts +43 -1
  157. package/lib/components/Directory/utils.ts +81 -1
  158. package/lib/components/Drawer/index.ts +1 -0
  159. package/lib/components/Inputs/DropdownInput/DropdownInput.tsx +6 -2
  160. package/lib/components/Inputs/MultiValueInput/index.ts +1 -0
  161. package/lib/components/Inputs/NumberInput/NumberInput.tsx +6 -2
  162. package/lib/components/Inputs/NumberInput/index.ts +1 -0
  163. package/lib/components/Inputs/OTPInput/index.ts +1 -0
  164. package/lib/components/Inputs/SearchInput/index.ts +1 -0
  165. package/lib/components/Inputs/TextArea/TextArea.tsx +4 -2
  166. package/lib/components/Inputs/TextArea/index.ts +1 -0
  167. package/lib/components/Inputs/TextInput/TextInput.tsx +6 -2
  168. package/lib/components/Inputs/TextInput/index.ts +1 -0
  169. package/lib/components/Inputs/UnitInput/UnitInput.tsx +6 -2
  170. package/lib/components/InputsV2/NumberInputV2/NumberInputV2.tsx +6 -2
  171. package/lib/components/InputsV2/TextAreaV2/TextAreaV2.tsx +2 -1
  172. package/lib/components/InputsV2/TextAreaV2/utils.ts +3 -1
  173. package/lib/components/InputsV2/TextInputV2/TextInputV2.tsx +1 -0
  174. package/lib/components/InputsV2/TextInputV2/utils.ts +6 -8
  175. package/lib/components/InputsV2/UploadV2/UploadContainerV2.tsx +470 -0
  176. package/lib/components/InputsV2/UploadV2/UploadV2.dark.tokens.ts +348 -0
  177. package/lib/components/InputsV2/UploadV2/UploadV2.light.tokens.ts +348 -0
  178. package/lib/components/InputsV2/UploadV2/UploadV2.tokens.ts +20 -0
  179. package/lib/components/InputsV2/UploadV2/UploadV2.tokens.types.ts +117 -0
  180. package/lib/components/InputsV2/UploadV2/UploadV2.tsx +336 -0
  181. package/lib/components/InputsV2/UploadV2/UploadV2.types.ts +67 -0
  182. package/lib/components/InputsV2/UploadV2/index.ts +3 -0
  183. package/lib/components/InputsV2/UploadV2/utils.ts +170 -0
  184. package/lib/components/KeyValuePair/index.ts +1 -0
  185. package/lib/components/Menu/Menu.tsx +18 -2
  186. package/lib/components/Menu/SubMenu.tsx +25 -3
  187. package/lib/components/Menu/index.ts +1 -0
  188. package/lib/components/Menu/types.tsx +14 -0
  189. package/lib/components/Menu/utils.ts +46 -3
  190. package/lib/components/Modal/index.ts +1 -0
  191. package/lib/components/ModalV2/ModalV2.tsx +269 -0
  192. package/lib/components/ModalV2/ModalV2Footer.tsx +76 -0
  193. package/lib/components/ModalV2/ModalV2Header.tsx +144 -0
  194. package/lib/components/ModalV2/ModalV2Skeleton.tsx +80 -0
  195. package/lib/components/ModalV2/index.ts +4 -0
  196. package/lib/components/ModalV2/mobileModalV2.tsx +411 -0
  197. package/lib/components/ModalV2/modalAnimationV2.tsx +19 -0
  198. package/lib/components/ModalV2/modalV2.dark.tokens.ts +183 -0
  199. package/lib/components/ModalV2/modalV2.light.tokens.ts +183 -0
  200. package/lib/components/ModalV2/modalV2.tokens.ts +21 -0
  201. package/lib/components/ModalV2/modalV2.tokens.types.ts +94 -0
  202. package/lib/components/ModalV2/modalV2.types.ts +80 -0
  203. package/lib/components/MultiSelect/MultiSelect.tsx +2 -1
  204. package/lib/components/MultiSelect/MultiSelectTrigger.tsx +2 -1
  205. package/lib/components/MultiSelect/index.ts +2 -0
  206. package/lib/components/MultiSelectV2/MultiSelectV2Trigger.tsx +4 -1
  207. package/lib/components/Popover/index.ts +1 -0
  208. package/lib/components/Primitives/Block/Block.tsx +1 -1
  209. package/lib/components/ProgressBar/index.ts +1 -0
  210. package/lib/components/Radio/index.ts +2 -0
  211. package/lib/components/Sidebar/Sidebar.tsx +38 -0
  212. package/lib/components/Sidebar/SidebarContent.tsx +25 -1
  213. package/lib/components/Sidebar/index.ts +1 -0
  214. package/lib/components/Sidebar/types.ts +13 -1
  215. package/lib/components/SidebarV2/SidebarV2.tsx +30 -0
  216. package/lib/components/SidebarV2/SidebarV2Panel.tsx +25 -1
  217. package/lib/components/SidebarV2/types.ts +9 -1
  218. package/lib/components/SingleSelect/SingleSelect.tsx +2 -1
  219. package/lib/components/SingleSelect/SingleSelectTrigger.tsx +3 -1
  220. package/lib/components/SingleSelect/index.ts +1 -0
  221. package/lib/components/SingleSelectV2/SingleSelectV2Trigger.tsx +3 -1
  222. package/lib/components/Skeleton/SkeletonCompound.tsx +45 -31
  223. package/lib/components/Snackbar/index.ts +2 -0
  224. package/lib/components/StatCard/index.ts +1 -0
  225. package/lib/components/Stepper/index.ts +1 -0
  226. package/lib/components/Switch/index.ts +2 -0
  227. package/lib/components/Tabs/index.ts +1 -0
  228. package/lib/components/Tags/index.ts +1 -0
  229. package/lib/components/Timeline/Timeline.tsx +9 -1
  230. package/lib/components/Tooltip/index.ts +1 -0
  231. package/lib/components/Topbar/index.ts +1 -0
  232. package/lib/components/Upload/index.ts +1 -0
  233. package/lib/context/ThemeContext.tsx +16 -0
  234. package/lib/context/initComponentTokens.ts +11 -0
  235. package/lib/context/useComponentToken.ts +15 -1
  236. package/lib/hooks/useResponsiveTokens.ts +63 -0
  237. package/lib/main.ts +16 -0
  238. package/lib/node.ts +2 -0
  239. package/package.json +1 -1
  240. /package/dist/{node-CovJEwot.js → breadcrumbV2.tokens-CovJEwot.js} +0 -0
@@ -0,0 +1,183 @@
1
+ import { type FoundationTokenType } from '../../tokens/theme.token'
2
+ import type { ResponsiveModalV2Tokens } from './modalV2.tokens.types'
3
+
4
+ export const getModalV2LightToken = (
5
+ foundationToken: FoundationTokenType
6
+ ): ResponsiveModalV2Tokens => {
7
+ return {
8
+ sm: {
9
+ paddingTop: foundationToken.unit[16],
10
+ paddingRight: foundationToken.unit[16],
11
+ paddingBottom: foundationToken.unit[16],
12
+ paddingLeft: foundationToken.unit[16],
13
+ boxShadow: foundationToken.shadows.xs,
14
+ borderRadius: foundationToken.border.radius[16],
15
+ backgroundColor: foundationToken.colors.gray[0],
16
+ overlay: {
17
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
18
+ offset: foundationToken.unit[16],
19
+ },
20
+ skeleton: {
21
+ header: {
22
+ gap: foundationToken.unit[16],
23
+ paddingTop: foundationToken.unit[20],
24
+ paddingRight: foundationToken.unit[20],
25
+ paddingBottom: foundationToken.unit[20],
26
+ paddingLeft: foundationToken.unit[20],
27
+ borderBottom: `1px solid ${foundationToken.colors.gray[200]}`,
28
+ width: '60%',
29
+ height: 24,
30
+ borderRadius: foundationToken.border.radius[4],
31
+ },
32
+ body: {
33
+ gap: foundationToken.unit[12],
34
+ width: '100%',
35
+ height: 300,
36
+ borderRadius: foundationToken.border.radius[4],
37
+ },
38
+ },
39
+ divider: {
40
+ borderColor: foundationToken.colors.gray[200],
41
+ },
42
+ header: {
43
+ gap: foundationToken.unit[16],
44
+ paddingTop: foundationToken.unit[16],
45
+ paddingRight: foundationToken.unit[16],
46
+ paddingBottom: foundationToken.unit[16],
47
+ paddingLeft: foundationToken.unit[16],
48
+ maxHeight: '20vh',
49
+ borderBottom: `1px solid ${foundationToken.colors.gray[200]}`,
50
+ backgroundColor: foundationToken.colors.gray[0],
51
+ borderTopLeftRadius: foundationToken.border.radius[16],
52
+ borderTopRightRadius: foundationToken.border.radius[16],
53
+ slot: {
54
+ gap: foundationToken.unit[8],
55
+ },
56
+ text: {
57
+ title: {
58
+ color: foundationToken.colors.gray[700],
59
+ fontSize: foundationToken.font.size.body.md.fontSize,
60
+ fontWeight: foundationToken.font.weight[600],
61
+ lineHeight: foundationToken.font.lineHeight[20],
62
+ },
63
+ subtitle: {
64
+ color: foundationToken.colors.gray[600],
65
+ fontSize: foundationToken.font.size.body.sm.fontSize,
66
+ fontWeight: foundationToken.font.weight[400],
67
+ lineHeight: foundationToken.font.lineHeight[20],
68
+ },
69
+ },
70
+ },
71
+
72
+ body: {
73
+ paddingTop: foundationToken.unit[16],
74
+ paddingRight: foundationToken.unit[16],
75
+ paddingBottom: foundationToken.unit[16],
76
+ paddingLeft: foundationToken.unit[16],
77
+ backgroundColor: foundationToken.colors.gray[0],
78
+ },
79
+
80
+ footer: {
81
+ paddingTop: foundationToken.unit[16],
82
+ paddingRight: foundationToken.unit[16],
83
+ paddingBottom: foundationToken.unit[16],
84
+ paddingLeft: foundationToken.unit[16],
85
+ borderTop: `1px solid ${foundationToken.colors.gray[200]}`,
86
+ backgroundColor: foundationToken.colors.gray[0],
87
+ gap: foundationToken.unit[12],
88
+ },
89
+ closeButton: {
90
+ color: foundationToken.colors.gray[500],
91
+ width: foundationToken.unit[16],
92
+ height: foundationToken.unit[16],
93
+ },
94
+ },
95
+ lg: {
96
+ backgroundColor: foundationToken.colors.gray[0],
97
+ paddingTop: foundationToken.unit[16],
98
+ paddingRight: foundationToken.unit[16],
99
+ paddingBottom: foundationToken.unit[16],
100
+ paddingLeft: foundationToken.unit[16],
101
+ boxShadow: foundationToken.shadows.lg,
102
+ borderRadius: foundationToken.border.radius[16],
103
+ overlay: {
104
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
105
+ offset: foundationToken.unit[16],
106
+ },
107
+ divider: {
108
+ borderColor: foundationToken.colors.gray[200],
109
+ },
110
+ header: {
111
+ gap: foundationToken.unit[16],
112
+ paddingTop: foundationToken.unit[20],
113
+ paddingRight: foundationToken.unit[20],
114
+ paddingBottom: foundationToken.unit[20],
115
+ paddingLeft: foundationToken.unit[20],
116
+ maxHeight: '20vh',
117
+ borderBottom: `1px solid ${foundationToken.colors.gray[200]}`,
118
+ backgroundColor: foundationToken.colors.gray[0],
119
+ borderTopLeftRadius: foundationToken.border.radius[16],
120
+ borderTopRightRadius: foundationToken.border.radius[16],
121
+ slot: {
122
+ gap: foundationToken.unit[8],
123
+ },
124
+ text: {
125
+ title: {
126
+ color: foundationToken.colors.gray[700],
127
+ fontSize: foundationToken.font.size.body.lg.fontSize,
128
+ fontWeight: foundationToken.font.weight[600],
129
+ lineHeight: foundationToken.font.lineHeight[20],
130
+ },
131
+ subtitle: {
132
+ color: foundationToken.colors.gray[600],
133
+ fontSize: foundationToken.font.size.body.md.fontSize,
134
+ fontWeight: foundationToken.font.weight[400],
135
+ lineHeight: foundationToken.font.lineHeight[20],
136
+ },
137
+ },
138
+ },
139
+ skeleton: {
140
+ header: {
141
+ gap: foundationToken.unit[16],
142
+ paddingTop: foundationToken.unit[20],
143
+ paddingRight: foundationToken.unit[20],
144
+ paddingBottom: foundationToken.unit[20],
145
+ paddingLeft: foundationToken.unit[20],
146
+ borderBottom: `1px solid ${foundationToken.colors.gray[200]}`,
147
+ width: '60%',
148
+ height: 24,
149
+ borderRadius: foundationToken.border.radius[4],
150
+ },
151
+ body: {
152
+ gap: foundationToken.unit[12],
153
+ width: '100%',
154
+ height: 300,
155
+ borderRadius: foundationToken.border.radius[4],
156
+ },
157
+ },
158
+
159
+ body: {
160
+ paddingTop: foundationToken.unit[20],
161
+ paddingRight: foundationToken.unit[20],
162
+ paddingBottom: foundationToken.unit[20],
163
+ paddingLeft: foundationToken.unit[20],
164
+ backgroundColor: foundationToken.colors.gray[0],
165
+ },
166
+
167
+ footer: {
168
+ paddingTop: foundationToken.unit[20],
169
+ paddingRight: foundationToken.unit[20],
170
+ paddingBottom: foundationToken.unit[20],
171
+ paddingLeft: foundationToken.unit[20],
172
+ borderTop: `1px solid ${foundationToken.colors.gray[200]}`,
173
+ backgroundColor: foundationToken.colors.gray[0],
174
+ gap: foundationToken.unit[16],
175
+ },
176
+ closeButton: {
177
+ color: foundationToken.colors.gray[500],
178
+ width: foundationToken.unit[16],
179
+ height: foundationToken.unit[16],
180
+ },
181
+ },
182
+ }
183
+ }
@@ -0,0 +1,21 @@
1
+ import { type FoundationTokenType } from '../../tokens/theme.token'
2
+ import { Theme } from '../../context/theme.enum'
3
+ import { getModalV2LightToken } from './modalV2.light.tokens'
4
+ import { getModalV2DarkToken } from './modalV2.dark.tokens'
5
+ import type { ResponsiveModalV2Tokens } from './modalV2.tokens.types'
6
+
7
+ export type {
8
+ ModalV2State,
9
+ ModalV2TokensType,
10
+ ResponsiveModalV2Tokens,
11
+ } from './modalV2.tokens.types'
12
+
13
+ export const getModalV2Tokens = (
14
+ foundationToken: FoundationTokenType,
15
+ theme: Theme | string = Theme.LIGHT
16
+ ): ResponsiveModalV2Tokens => {
17
+ if (theme === Theme.DARK || theme === 'dark') {
18
+ return getModalV2DarkToken(foundationToken)
19
+ }
20
+ return getModalV2LightToken(foundationToken)
21
+ }
@@ -0,0 +1,94 @@
1
+ import type { CSSObject } from 'styled-components'
2
+ import type { BreakpointType } from '../../breakpoints/breakPoints'
3
+
4
+ export type ModalV2State = 'default'
5
+
6
+ export type ModalV2TokensType = {
7
+ boxShadow: CSSObject['boxShadow']
8
+ borderRadius: CSSObject['borderRadius']
9
+ overlay: {
10
+ backgroundColor: CSSObject['backgroundColor']
11
+ offset: CSSObject['offset']
12
+ }
13
+ paddingTop: CSSObject['paddingTop']
14
+ paddingRight: CSSObject['paddingRight']
15
+ paddingBottom: CSSObject['paddingBottom']
16
+ paddingLeft: CSSObject['paddingLeft']
17
+ backgroundColor: CSSObject['backgroundColor']
18
+ header: {
19
+ gap: CSSObject['gap']
20
+ paddingTop: CSSObject['paddingTop']
21
+ paddingRight: CSSObject['paddingRight']
22
+ paddingBottom: CSSObject['paddingBottom']
23
+ paddingLeft: CSSObject['paddingLeft']
24
+ maxHeight: CSSObject['maxHeight']
25
+ borderBottom: CSSObject['border']
26
+ backgroundColor: CSSObject['backgroundColor']
27
+ borderTopLeftRadius: CSSObject['borderTopLeftRadius']
28
+ borderTopRightRadius: CSSObject['borderTopRightRadius']
29
+ slot: {
30
+ gap: CSSObject['gap']
31
+ }
32
+ text: {
33
+ title: {
34
+ color: CSSObject['color']
35
+ fontSize: CSSObject['fontSize']
36
+ fontWeight: CSSObject['fontWeight']
37
+ lineHeight: CSSObject['lineHeight']
38
+ }
39
+ subtitle: {
40
+ color: CSSObject['color']
41
+ fontSize: CSSObject['fontSize']
42
+ fontWeight: CSSObject['fontWeight']
43
+ lineHeight: CSSObject['lineHeight']
44
+ }
45
+ }
46
+ }
47
+ divider: {
48
+ borderColor: CSSObject['borderColor']
49
+ }
50
+ skeleton: {
51
+ header: {
52
+ gap: CSSObject['gap']
53
+ paddingTop: CSSObject['paddingTop']
54
+ paddingRight: CSSObject['paddingRight']
55
+ paddingBottom: CSSObject['paddingBottom']
56
+ paddingLeft: CSSObject['paddingLeft']
57
+ borderBottom: CSSObject['border']
58
+ width: CSSObject['width']
59
+ height: CSSObject['height']
60
+ borderRadius: CSSObject['borderRadius']
61
+ }
62
+ body: {
63
+ gap: CSSObject['gap']
64
+ width: CSSObject['width']
65
+ height: CSSObject['height']
66
+ borderRadius: CSSObject['borderRadius']
67
+ }
68
+ }
69
+ body: {
70
+ paddingTop: CSSObject['paddingTop']
71
+ paddingRight: CSSObject['paddingRight']
72
+ paddingBottom: CSSObject['paddingBottom']
73
+ paddingLeft: CSSObject['paddingLeft']
74
+ backgroundColor: CSSObject['backgroundColor']
75
+ }
76
+ footer: {
77
+ paddingTop: CSSObject['paddingTop']
78
+ paddingRight: CSSObject['paddingRight']
79
+ paddingBottom: CSSObject['paddingBottom']
80
+ paddingLeft: CSSObject['paddingLeft']
81
+ borderTop: CSSObject['border']
82
+ backgroundColor: CSSObject['backgroundColor']
83
+ gap: CSSObject['gap']
84
+ }
85
+ closeButton: {
86
+ color: CSSObject['color']
87
+ width: CSSObject['width']
88
+ height: CSSObject['height']
89
+ }
90
+ }
91
+
92
+ export type ResponsiveModalV2Tokens = {
93
+ [key in keyof BreakpointType]: ModalV2TokensType
94
+ }
@@ -0,0 +1,80 @@
1
+ // Skeleton types
2
+ import { SkeletonVariant } from '../Skeleton'
3
+ import type { ModalV2TokensType } from './modalV2.tokens.types'
4
+ import type { HTMLAttributes, ReactNode } from 'react'
5
+ import type { ButtonV2Props } from '../ButtonV2'
6
+ import type { CSSObject } from 'styled-components'
7
+
8
+ export type HeaderSkeletonConfig = {
9
+ show: boolean
10
+ showDivider: boolean
11
+ showCloseButton: boolean
12
+ }
13
+
14
+ export type BodySkeletonConfig = {
15
+ show: boolean
16
+ width: string
17
+ height: string | number
18
+ }
19
+
20
+ export type FooterSkeletonConfig = {
21
+ show: boolean
22
+ showDivider: boolean
23
+ }
24
+
25
+ export type ModalV2SkeletonProps = {
26
+ modalTokens: ModalV2TokensType
27
+ headerSkeleton?: HeaderSkeletonConfig
28
+ bodySkeleton?: BodySkeletonConfig
29
+ footerSkeleton?: FooterSkeletonConfig
30
+ skeletonVariant: SkeletonVariant
31
+ }
32
+
33
+ // Modal types - using ButtonV2 props
34
+ export type ModalV2ButtonAction = Omit<ButtonV2Props, 'buttonGroupPosition'>
35
+
36
+ export type BodySkeletonProps = {
37
+ show?: boolean
38
+ width?: string
39
+ height?: string | number
40
+ }
41
+
42
+ export type ModalV2BodySkeletonProps = {
43
+ show?: boolean
44
+ variant?: SkeletonVariant
45
+ bodySkeletonProps?: BodySkeletonProps
46
+ }
47
+
48
+ export type ModalV2Dimensions = {
49
+ width?: CSSObject['width']
50
+ height?: CSSObject['height']
51
+ minWidth?: CSSObject['minWidth']
52
+ maxWidth?: CSSObject['maxWidth']
53
+ minHeight?: CSSObject['minHeight']
54
+ maxHeight?: CSSObject['maxHeight']
55
+ }
56
+
57
+ export type ModalV2Props = {
58
+ isOpen: boolean
59
+ isCustom?: boolean
60
+ onClose: () => void
61
+ title?: string
62
+ subtitle?: string
63
+ children: ReactNode
64
+ primaryAction?: ModalV2ButtonAction
65
+ secondaryAction?: ModalV2ButtonAction
66
+ showCloseButton?: boolean
67
+ showHeader?: boolean
68
+ showFooter?: boolean
69
+ closeOnBackdropClick?: boolean
70
+ customHeader?: ReactNode
71
+ customFooter?: ReactNode
72
+ headerSlot?: ReactNode
73
+ showDivider?: boolean
74
+ dimensions?: ModalV2Dimensions
75
+ useDrawerOnMobile?: boolean
76
+ skeleton?: ModalV2BodySkeletonProps
77
+ } & Omit<
78
+ HTMLAttributes<HTMLDivElement>,
79
+ 'children' | 'title' | 'className' | 'style'
80
+ >
@@ -492,7 +492,8 @@ const MultiSelect = ({
492
492
  variant ===
493
493
  MultiSelectVariant.CONTAINER &&
494
494
  isSmallScreenWithLargeSize &&
495
- isItemSelected
495
+ isItemSelected &&
496
+ label
496
497
  ? paddingY * 1.5
497
498
  : 0
498
499
  }
@@ -170,7 +170,8 @@ const MultiSelectTrigger = ({
170
170
  paddingTop={
171
171
  variant === MultiSelectVariant.CONTAINER &&
172
172
  isSmallScreenWithLargeSize &&
173
- isItemSelected
173
+ isItemSelected &&
174
+ label
174
175
  ? paddingY * 1.5
175
176
  : 0
176
177
  }
@@ -1,4 +1,6 @@
1
+ /** @deprecated Will be deprecated soon. Use MultiSelectV2 instead. */
1
2
  export { default as MultiSelect } from './MultiSelect'
3
+ /** @deprecated Will be deprecated soon. Use MultiSelectV2 instead. */
2
4
  export { default as MultiSelectTrigger } from './MultiSelectTrigger'
3
5
  export * from './multiSelect.tokens'
4
6
  export * from './types'
@@ -188,7 +188,10 @@ const MultiSelectV2Trigger = ({
188
188
  as="span"
189
189
  textAlign="left"
190
190
  paddingTop={
191
- isContainer && isSmallScreenWithLargeSize && isItemSelected
191
+ isContainer &&
192
+ isSmallScreenWithLargeSize &&
193
+ isItemSelected &&
194
+ label
192
195
  ? floatingLabelPaddingTop
193
196
  : 0
194
197
  }
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use PopoverV2 instead. */
1
2
  export { default as Popover } from './Popover'
2
3
  export * from './popover.tokens'
3
4
  export * from './types'
@@ -3,7 +3,7 @@ import styled, { css, type CSSObject } from 'styled-components'
3
3
 
4
4
  type SpacingValue = string | number
5
5
 
6
- type StateStyles = {
6
+ export type StateStyles = {
7
7
  _hover?: StyledBlockProps
8
8
  _focus?: StyledBlockProps
9
9
  _active?: StyledBlockProps
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use ProgressBarV2 instead. */
1
2
  export { default as ProgressBar } from './ProgressBar'
2
3
  export * from './progressbar.tokens'
3
4
  export * from './types'
@@ -1,4 +1,6 @@
1
+ /** @deprecated Will be deprecated soon. Use RadioV2 instead. */
1
2
  export { default as Radio } from './Radio'
3
+ /** @deprecated Will be deprecated soon. Use RadioV2 instead. */
2
4
  export { default as RadioGroup } from './RadioGroup'
3
5
  export { RadioSize } from './types'
4
6
  export type { RadioProps, RadioGroupProps } from './types'
@@ -100,6 +100,14 @@ const Sidebar = forwardRef<HTMLDivElement, SidebarProps>(
100
100
  defaultActiveItem,
101
101
  showLeftPanel = true,
102
102
  onSidebarStateChange,
103
+ showHierarchyLines = false,
104
+ hierarchyLineBorderRadius = 0,
105
+ expandedItems,
106
+ defaultExpandedItems,
107
+ onExpandedItemsChange,
108
+ onItemExpand,
109
+ enableVirtualization = false,
110
+ virtualization,
103
111
  },
104
112
  ref
105
113
  ) => {
@@ -402,6 +410,18 @@ const Sidebar = forwardRef<HTMLDivElement, SidebarProps>(
402
410
  iconOnlyMode={iconOnlyMode}
403
411
  footer={footer}
404
412
  setIsHovering={setIsHovering}
413
+ showHierarchyLines={showHierarchyLines}
414
+ hierarchyLineBorderRadius={
415
+ hierarchyLineBorderRadius
416
+ }
417
+ expandedItems={expandedItems}
418
+ defaultExpandedItems={defaultExpandedItems}
419
+ onExpandedItemsChange={
420
+ onExpandedItemsChange
421
+ }
422
+ onItemExpand={onItemExpand}
423
+ enableVirtualization={enableVirtualization}
424
+ virtualization={virtualization}
405
425
  />
406
426
 
407
427
  {/* Intermediate Sidebar */}
@@ -491,6 +511,24 @@ const Sidebar = forwardRef<HTMLDivElement, SidebarProps>(
491
511
  }
492
512
  iconOnlyMode={false}
493
513
  footer={footer}
514
+ showHierarchyLines={
515
+ showHierarchyLines
516
+ }
517
+ hierarchyLineBorderRadius={
518
+ hierarchyLineBorderRadius
519
+ }
520
+ expandedItems={expandedItems}
521
+ defaultExpandedItems={
522
+ defaultExpandedItems
523
+ }
524
+ onExpandedItemsChange={
525
+ onExpandedItemsChange
526
+ }
527
+ onItemExpand={onItemExpand}
528
+ enableVirtualization={
529
+ enableVirtualization
530
+ }
531
+ virtualization={virtualization}
494
532
  />
495
533
  </Block>
496
534
  )}
@@ -5,7 +5,7 @@ import Directory from '../Directory/Directory'
5
5
  import { normalizeDirectoryData } from '../Directory/utils'
6
6
  import SidebarHeader from './SidebarHeader'
7
7
  import SidebarFooter from './SidebarFooter'
8
- import type { DirectoryData } from '../Directory/types'
8
+ import type { DirectoryData, DirectoryProps } from '../Directory/types'
9
9
  import type { SidebarMerchantInfo, SidebarStateChangeType } from './types'
10
10
 
11
11
  const DirectoryContainer = styled(Block)<{
@@ -45,6 +45,14 @@ export type SidebarContentProps = {
45
45
  footer?: React.ReactNode
46
46
  setIsHovering?: (isHovering: boolean) => void
47
47
  sidebarState?: SidebarStateChangeType
48
+ showHierarchyLines?: DirectoryProps['showHierarchyLines']
49
+ hierarchyLineBorderRadius?: DirectoryProps['hierarchyLineBorderRadius']
50
+ expandedItems?: DirectoryProps['expandedItems']
51
+ defaultExpandedItems?: DirectoryProps['defaultExpandedItems']
52
+ onExpandedItemsChange?: DirectoryProps['onExpandedItemsChange']
53
+ onItemExpand?: DirectoryProps['onItemExpand']
54
+ enableVirtualization?: DirectoryProps['enableVirtualization']
55
+ virtualization?: DirectoryProps['virtualization']
48
56
  }
49
57
 
50
58
  const SidebarContent: React.FC<SidebarContentProps> = ({
@@ -66,6 +74,14 @@ const SidebarContent: React.FC<SidebarContentProps> = ({
66
74
  footer,
67
75
  setIsHovering,
68
76
  sidebarState = 'expanded',
77
+ showHierarchyLines = false,
78
+ hierarchyLineBorderRadius = 0,
79
+ expandedItems,
80
+ defaultExpandedItems,
81
+ onExpandedItemsChange,
82
+ onItemExpand,
83
+ enableVirtualization = false,
84
+ virtualization,
69
85
  }) => {
70
86
  const directoryData = normalizeDirectoryData(data)
71
87
 
@@ -114,6 +130,14 @@ const SidebarContent: React.FC<SidebarContentProps> = ({
114
130
  onActiveItemChange={onActiveItemChange}
115
131
  defaultActiveItem={defaultActiveItem}
116
132
  iconOnlyMode={iconOnlyMode}
133
+ showHierarchyLines={showHierarchyLines}
134
+ hierarchyLineBorderRadius={hierarchyLineBorderRadius}
135
+ expandedItems={expandedItems}
136
+ defaultExpandedItems={defaultExpandedItems}
137
+ onExpandedItemsChange={onExpandedItemsChange}
138
+ onItemExpand={onItemExpand}
139
+ enableVirtualization={enableVirtualization}
140
+ virtualization={virtualization}
117
141
  />
118
142
  </DirectoryContainer>
119
143
 
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use SidebarV2 instead. */
1
2
  export { default as Sidebar } from './Sidebar'
2
3
  export * from './sidebar.tokens'
3
4
  export * from './types'
@@ -1,5 +1,9 @@
1
1
  import { type ReactNode } from 'react'
2
- import type { DirectoryData, NavbarItem } from '../Directory/types'
2
+ import type {
3
+ DirectoryData,
4
+ DirectoryProps,
5
+ NavbarItem,
6
+ } from '../Directory/types'
3
7
  import type {
4
8
  MerchantInfo,
5
9
  LeftPanelInfo,
@@ -65,6 +69,14 @@ export type SidebarProps = {
65
69
  onActiveItemChange?: (item: string | null) => void
66
70
  defaultActiveItem?: string | null
67
71
  onHoveringChange?: (isHovering: boolean) => void
72
+ showHierarchyLines?: DirectoryProps['showHierarchyLines']
73
+ hierarchyLineBorderRadius?: DirectoryProps['hierarchyLineBorderRadius']
74
+ expandedItems?: DirectoryProps['expandedItems']
75
+ defaultExpandedItems?: DirectoryProps['defaultExpandedItems']
76
+ onExpandedItemsChange?: DirectoryProps['onExpandedItemsChange']
77
+ onItemExpand?: DirectoryProps['onItemExpand']
78
+ enableVirtualization?: DirectoryProps['enableVirtualization']
79
+ virtualization?: DirectoryProps['virtualization']
68
80
  }
69
81
 
70
82
  export type MobileNavigationItem = NavbarItem & {
@@ -71,6 +71,14 @@ const SidebarV2 = forwardRef<HTMLDivElement, SidebarV2Props>(
71
71
  onActiveItemChange,
72
72
  defaultActiveItem,
73
73
  onSidebarStateChange,
74
+ showHierarchyLines = false,
75
+ hierarchyLineBorderRadius = 0,
76
+ expandedItems,
77
+ defaultExpandedItems,
78
+ onExpandedItemsChange,
79
+ onItemExpand,
80
+ enableVirtualization = false,
81
+ virtualization,
74
82
  },
75
83
  ref
76
84
  ) => {
@@ -323,6 +331,16 @@ const SidebarV2 = forwardRef<HTMLDivElement, SidebarV2Props>(
323
331
  setIsHovering={setIsHovering}
324
332
  sidebarState={sidebarStatus}
325
333
  tokens={tokens}
334
+ showHierarchyLines={showHierarchyLines}
335
+ hierarchyLineBorderRadius={
336
+ hierarchyLineBorderRadius
337
+ }
338
+ expandedItems={expandedItems}
339
+ defaultExpandedItems={defaultExpandedItems}
340
+ onExpandedItemsChange={onExpandedItemsChange}
341
+ onItemExpand={onItemExpand}
342
+ enableVirtualization={enableVirtualization}
343
+ virtualization={virtualization}
326
344
  />
327
345
  )}
328
346
 
@@ -386,6 +404,18 @@ const SidebarV2 = forwardRef<HTMLDivElement, SidebarV2Props>(
386
404
  footer={footer}
387
405
  sidebarState={sidebarStatus}
388
406
  tokens={tokens}
407
+ showHierarchyLines={showHierarchyLines}
408
+ hierarchyLineBorderRadius={
409
+ hierarchyLineBorderRadius
410
+ }
411
+ expandedItems={expandedItems}
412
+ defaultExpandedItems={defaultExpandedItems}
413
+ onExpandedItemsChange={
414
+ onExpandedItemsChange
415
+ }
416
+ onItemExpand={onItemExpand}
417
+ enableVirtualization={enableVirtualization}
418
+ virtualization={virtualization}
389
419
  />
390
420
  </Block>
391
421
  )}