@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
@@ -29,6 +29,7 @@ const Charts: React.FC<ChartsProps> = ({
29
29
  chartHeaderSlot,
30
30
  stackedLegends = false,
31
31
  stackedLegendsData,
32
+ showAllLegends = false,
32
33
  barsize,
33
34
  xAxis,
34
35
  yAxis,
@@ -404,6 +405,7 @@ const Charts: React.FC<ChartsProps> = ({
404
405
  hoveredKey={hoveredKey}
405
406
  activeKeys={selectedKeys}
406
407
  stacked={false}
408
+ showAllLegends={showAllLegends}
407
409
  />
408
410
  }
409
411
  <Block
@@ -566,6 +568,7 @@ const Charts: React.FC<ChartsProps> = ({
566
568
  stackedLegendsData={
567
569
  stackedLegendsData
568
570
  }
571
+ showAllLegends={showAllLegends}
569
572
  />
570
573
  </Block>
571
574
  </Block>
@@ -714,6 +717,9 @@ const Charts: React.FC<ChartsProps> = ({
714
717
  hoveredKey={hoveredKey}
715
718
  activeKeys={selectedKeys}
716
719
  stacked={false}
720
+ showAllLegends={
721
+ showAllLegends
722
+ }
717
723
  />
718
724
  </Block>
719
725
  )}
@@ -827,6 +833,9 @@ const Charts: React.FC<ChartsProps> = ({
827
833
  stackedLegendsData={
828
834
  stackedLegendsData
829
835
  }
836
+ showAllLegends={
837
+ showAllLegends
838
+ }
830
839
  />
831
840
  )}
832
841
  {stackedLegends && (
@@ -987,6 +996,7 @@ const Charts: React.FC<ChartsProps> = ({
987
996
  stackedLegendsData={
988
997
  stackedLegendsData
989
998
  }
999
+ showAllLegends={showAllLegends}
990
1000
  />
991
1001
  </Block>
992
1002
  </Block>
@@ -1,14 +1,24 @@
1
+ /** @deprecated Will be deprecated soon. Use ChartV2 instead. */
1
2
  export { default as Charts } from './Charts'
2
3
 
4
+ /** @deprecated Will be deprecated soon. Use ChartV2 instead. */
3
5
  export { default as CoreChart } from './CoreChart'
6
+ /** @deprecated Will be deprecated soon. Use ChartV2 instead. */
4
7
  export { default as ChartContainer } from './ChartContainer'
8
+ /** @deprecated Will be deprecated soon. Use ChartV2 instead. */
5
9
  export { default as ChartHeader } from './ChartHeader'
10
+ /** @deprecated Will be deprecated soon. Use ChartV2 instead. */
6
11
  export { default as ChartLegends } from './ChartLegend'
12
+ /** @deprecated Will be deprecated soon. Use ChartV2 instead. */
7
13
  export { default as SankeyNode } from './SankeyNode'
14
+ /** @deprecated Will be deprecated soon. Use ChartV2 instead. */
8
15
  export { default as SankeyLink } from './SankeyLink'
9
16
 
17
+ /** @deprecated Will be deprecated soon. Use ChartV2 instead. */
10
18
  export { default as BlendChart } from './BlendChart'
19
+ /** @deprecated Will be deprecated soon. Use ChartV2 instead. */
11
20
  export { default as BlendChartContainer } from './BlendChartContainer'
21
+ /** @deprecated Will be deprecated soon. Use ChartV2 instead. */
12
22
  export { default as BlendChartHeader } from './BlendChartHeader'
13
23
  export * from './chart.tokens'
14
24
  export * from './types'
@@ -184,6 +184,7 @@ export type ChartsProps = {
184
184
  chartHeaderSlot: ReactNode
185
185
  stackedLegends?: boolean
186
186
  stackedLegendsData?: StackedLegendsDataPoint[]
187
+ showAllLegends?: boolean
187
188
  barsize?: number
188
189
  xAxis?: XAxisConfig
189
190
  yAxis?: YAxisConfig
@@ -236,6 +237,7 @@ export type ChartLegendsProps = {
236
237
  isSmallScreen?: boolean
237
238
  stackedLegendsData?: StackedLegendsDataPoint[]
238
239
  legends?: { title: string; total?: string }[]
240
+ showAllLegends?: boolean
239
241
  }
240
242
 
241
243
  export type CustomTooltipProps = TooltipProps<ValueType, NameType> & {
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use ChatInputV2 instead. */
1
2
  export { default as ChatInput } from './ChatInput'
2
3
  export * from './chatInput.tokens'
3
4
  export * from './types'
@@ -1,2 +1,3 @@
1
+ /** @deprecated Will be deprecated soon. Use CheckboxV2 instead. */
1
2
  export { Checkbox } from './Checkbox'
2
3
  export * from './types'
@@ -1,2 +1,3 @@
1
+ /** @deprecated Will be deprecated soon. Use CodeEditorV2 instead. */
1
2
  export { default as CodeEditor } from './CodeEditor'
2
3
  export * from './types'
@@ -155,6 +155,8 @@ const DataTable = forwardRef(
155
155
  onInsertRight,
156
156
  onDeleteColumn,
157
157
  getRowStyle,
158
+ enableRowAnimation,
159
+ rowAnimationConfig,
158
160
  tableBodyHeight,
159
161
  mobileColumnsToShow,
160
162
  enablePivotTable = false,
@@ -1997,6 +1999,12 @@ const DataTable = forwardRef(
1997
1999
  ) => boolean)
1998
2000
  | undefined
1999
2001
  }
2002
+ enableRowAnimation={
2003
+ enableRowAnimation
2004
+ }
2005
+ rowAnimationConfig={
2006
+ rowAnimationConfig
2007
+ }
2000
2008
  />
2001
2009
  )}
2002
2010
  </table>
@@ -1,4 +1,11 @@
1
- import React, { forwardRef, useMemo, useRef, useEffect, useState } from 'react'
1
+ import React, {
2
+ forwardRef,
3
+ useMemo,
4
+ useRef,
5
+ useEffect,
6
+ useState,
7
+ useCallback,
8
+ } from 'react'
2
9
  import {
3
10
  Edit,
4
11
  Save,
@@ -18,6 +25,7 @@ import Menu from '../../Menu/Menu'
18
25
  import { MenuAlignment, MenuSide } from '../../Menu/types'
19
26
  import Skeleton from '../../Skeleton/Skeleton'
20
27
  import { getSkeletonState } from '../../Skeleton/utils'
28
+ import { useRowFlip } from '../hooks/useRowFlip'
21
29
 
22
30
  import { Button, ButtonType, ButtonSize, ButtonSubType } from '../../Button'
23
31
  import { Checkbox, CheckboxSize } from '../../Checkbox'
@@ -571,6 +579,8 @@ const TableBody = forwardRef<
571
579
  isRowLoading,
572
580
  focusedCell,
573
581
  onCellFocus,
582
+ enableRowAnimation = false,
583
+ rowAnimationConfig,
574
584
  },
575
585
  ref
576
586
  ) => {
@@ -650,13 +660,33 @@ const TableBody = forwardRef<
650
660
  return `tbody-${len}-${firstId}-${lastId}`
651
661
  }, [currentData, dataVersion, idField])
652
662
 
663
+ const orderedRowIds = useMemo(
664
+ () => currentData.map((row) => String(row[idField])),
665
+ [currentData, idField]
666
+ )
667
+
668
+ const { register } = useRowFlip(
669
+ enableRowAnimation ? orderedRowIds : [],
670
+ rowAnimationConfig
671
+ )
672
+
673
+ const getFlipRefCallback = useCallback(
674
+ (rowId: string) => (el: HTMLTableRowElement | null) => {
675
+ if (!enableRowAnimation) return
676
+ register(rowId, el)
677
+ },
678
+ [enableRowAnimation, register]
679
+ )
680
+
681
+ const isPageTransition = !enableRowAnimation
682
+
653
683
  return (
654
684
  <motion.tbody
655
- key={tbodyKey}
685
+ key={isPageTransition ? tbodyKey : undefined}
656
686
  ref={ref}
657
- initial={{ opacity: 0 }}
658
- animate={{ opacity: 1 }}
659
- transition={{ duration: 0.3 }}
687
+ initial={isPageTransition ? { opacity: 0 } : undefined}
688
+ animate={isPageTransition ? { opacity: 1 } : undefined}
689
+ transition={isPageTransition ? { duration: 0.3 } : undefined}
660
690
  style={{
661
691
  backgroundColor: FOUNDATION_THEME.colors.gray[0],
662
692
  }}
@@ -685,7 +715,6 @@ const TableBody = forwardRef<
685
715
  const isSelected = selectedRows[rowId] || false
686
716
  const rowAriaLabel = `Row ${index + 1}${isSelected ? ', selected' : ''}${isExpanded ? ', expanded' : ''}`
687
717
 
688
- // Helper to calculate absolute column index
689
718
  const getAbsoluteColIndex = (
690
719
  relativeColIndex: number
691
720
  ) => {
@@ -695,11 +724,18 @@ const TableBody = forwardRef<
695
724
  return colIndex
696
725
  }
697
726
 
698
- const rowKey = `${rowId}-${index}`
727
+ const rowKey = enableRowAnimation
728
+ ? rowId
729
+ : `${rowId}-${index}`
699
730
 
700
731
  return (
701
732
  <React.Fragment key={rowKey}>
702
733
  <TableRow
734
+ ref={
735
+ enableRowAnimation
736
+ ? getFlipRefCallback(rowId)
737
+ : undefined
738
+ }
703
739
  $isClickable={!!onRowClick}
704
740
  $customBackgroundColor={
705
741
  rowStyling.backgroundColor
@@ -1156,6 +1192,9 @@ const TableBody = forwardRef<
1156
1192
  $hasCustomBackground={
1157
1193
  hasCustomBackground
1158
1194
  }
1195
+ $isFirstRow={
1196
+ index === 0
1197
+ }
1159
1198
  data-row-index={index}
1160
1199
  data-col-index={
1161
1200
  absoluteColIndex
@@ -1188,9 +1227,6 @@ const TableBody = forwardRef<
1188
1227
  getFrozenBodyStyles()),
1189
1228
  outline: 'none',
1190
1229
  }}
1191
- $isFirstRow={
1192
- index === 0
1193
- }
1194
1230
  >
1195
1231
  <Skeleton
1196
1232
  variant={
@@ -1537,6 +1573,7 @@ const TableBody = forwardRef<
1537
1573
  $hasCustomBackground={
1538
1574
  hasCustomBackground
1539
1575
  }
1576
+ $isFirstRow={index === 0}
1540
1577
  data-row-index={index}
1541
1578
  data-col-index={
1542
1579
  columnManagerColIndex
@@ -1562,7 +1599,6 @@ const TableBody = forwardRef<
1562
1599
  )
1563
1600
  }
1564
1601
  role="gridcell"
1565
- $isFirstRow={index === 0}
1566
1602
  style={{
1567
1603
  minWidth:
1568
1604
  FOUNDATION_THEME
@@ -1,4 +1,8 @@
1
- import { ColumnDefinition, RowActionsConfig } from '../types'
1
+ import {
2
+ ColumnDefinition,
3
+ RowActionsConfig,
4
+ RowAnimationConfig,
5
+ } from '../types'
2
6
  import { MobileDataTableConfig } from '../hooks/useMobileDataTable'
3
7
  import type { SkeletonVariant } from '../../Skeleton/skeleton.tokens'
4
8
 
@@ -57,4 +61,6 @@ export type TableBodyProps<T extends Record<string, unknown>> = {
57
61
  isRowLoading?: (row: T, index: number) => boolean
58
62
  focusedCell?: { rowIndex: number; colIndex: number } | null
59
63
  onCellFocus?: (rowIndex: number, colIndex: number) => void
64
+ enableRowAnimation?: boolean
65
+ rowAnimationConfig?: RowAnimationConfig
60
66
  }
@@ -576,8 +576,8 @@ const TableCell = forwardRef<
576
576
  column.type === ColumnType.REACT_ELEMENT ||
577
577
  (isEditing && column.isEditable)
578
578
  }
579
- $isFirstRow={isFirstRow}
580
579
  $customBackgroundColor={customBackgroundColor}
580
+ $isFirstRow={isFirstRow}
581
581
  $hasCustomBackground={hasCustomBackground}
582
582
  data-row-index={dataRowIndex}
583
583
  data-col-index={dataColIndex}
@@ -1,2 +1,4 @@
1
1
  export { useMobileDataTable } from './useMobileDataTable'
2
2
  export type { MobileDataTableConfig } from './useMobileDataTable'
3
+ export { useReducedMotion } from './useReducedMotion'
4
+ export { useRowFlip } from './useRowFlip'
@@ -0,0 +1,19 @@
1
+ import { useState, useEffect } from 'react'
2
+
3
+ export function useReducedMotion(): boolean {
4
+ const [prefersReducedMotion, setPrefersReducedMotion] = useState(() => {
5
+ if (typeof window === 'undefined') return false
6
+ return window.matchMedia('(prefers-reduced-motion: reduce)').matches
7
+ })
8
+
9
+ useEffect(() => {
10
+ const mql = window.matchMedia('(prefers-reduced-motion: reduce)')
11
+ const handler = (e: MediaQueryListEvent) => {
12
+ setPrefersReducedMotion(e.matches)
13
+ }
14
+ mql.addEventListener('change', handler)
15
+ return () => mql.removeEventListener('change', handler)
16
+ }, [])
17
+
18
+ return prefersReducedMotion
19
+ }
@@ -0,0 +1,170 @@
1
+ import { useRef, useLayoutEffect, useCallback, useMemo } from 'react'
2
+ import { useReducedMotion } from './useReducedMotion'
3
+ import type { RowAnimationConfig } from '../types'
4
+
5
+ function toCssTransition(config: RowAnimationConfig): {
6
+ transition: string
7
+ duration: number
8
+ } {
9
+ if (config.transitionType === 'bezier') {
10
+ const [p0, p1, p2, p3] = config.bezier
11
+ const cssBezier = `cubic-bezier(${p0}, ${p1}, ${p2}, ${p3})`
12
+ return {
13
+ duration: config.duration,
14
+ transition: `transform ${config.duration}s ${cssBezier}, opacity ${config.duration}s ${cssBezier}`,
15
+ }
16
+ }
17
+
18
+ const cssBezier = `cubic-bezier(0.32, 0.72, 0, 1)`
19
+ const transition = `transform 0.35s ${cssBezier}, opacity 0.35s ${cssBezier}`
20
+ return {
21
+ duration: 0.35,
22
+ transition,
23
+ }
24
+ }
25
+
26
+ interface UseRowFlipReturn {
27
+ register: (id: string, el: HTMLTableRowElement | null) => void
28
+ }
29
+
30
+ export function useRowFlip(
31
+ orderedIds: string[],
32
+ animationConfig?: RowAnimationConfig
33
+ ): UseRowFlipReturn {
34
+ const elementsRef = useRef<Map<string, HTMLTableRowElement>>(new Map())
35
+ const prevTopsRef = useRef<Map<string, number>>(new Map())
36
+ const prevIdsRef = useRef<Set<string>>(new Set())
37
+ const configRef = useRef<RowAnimationConfig | undefined>(animationConfig)
38
+ const orderedIdsRef = useRef(orderedIds)
39
+ const prefersReducedMotion = useReducedMotion()
40
+ const cleanupTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)
41
+ const serializedOrderedIds = useMemo(
42
+ () => JSON.stringify(orderedIds),
43
+ [orderedIds]
44
+ )
45
+
46
+ configRef.current = animationConfig
47
+ orderedIdsRef.current = orderedIds
48
+
49
+ const register = useCallback(
50
+ (id: string, el: HTMLTableRowElement | null) => {
51
+ if (el === null) {
52
+ elementsRef.current.delete(id)
53
+ } else {
54
+ elementsRef.current.set(id, el)
55
+ }
56
+ },
57
+ []
58
+ )
59
+
60
+ useLayoutEffect(() => {
61
+ const currentOrderedIds = orderedIdsRef.current
62
+ const currentConfig = configRef.current
63
+
64
+ if (prefersReducedMotion) {
65
+ const newTops = new Map<string, number>()
66
+ for (const id of currentOrderedIds) {
67
+ const el = elementsRef.current.get(id)
68
+ if (el) {
69
+ newTops.set(id, el.getBoundingClientRect().top)
70
+ }
71
+ }
72
+ prevTopsRef.current = newTops
73
+ prevIdsRef.current = new Set(currentOrderedIds)
74
+ return
75
+ }
76
+
77
+ const currentTops = new Map<string, number>()
78
+ for (const id of currentOrderedIds) {
79
+ const el = elementsRef.current.get(id)
80
+ if (el) {
81
+ currentTops.set(id, el.getBoundingClientRect().top)
82
+ }
83
+ }
84
+
85
+ if (!currentConfig) {
86
+ prevTopsRef.current = currentTops
87
+ prevIdsRef.current = new Set(currentOrderedIds)
88
+ return
89
+ }
90
+
91
+ const { transition: cssTransition, duration } =
92
+ toCssTransition(currentConfig)
93
+ const enterDuration = currentConfig.enterDuration
94
+ const enterOffset = currentConfig.enterOffset
95
+
96
+ const prevIds = prevIdsRef.current
97
+ const newRowIdSet = new Set(
98
+ currentOrderedIds.filter((id) => !prevIds.has(id))
99
+ )
100
+
101
+ for (const [id, newTop] of currentTops) {
102
+ if (newRowIdSet.has(id)) continue
103
+
104
+ const prevTop = prevTopsRef.current.get(id)
105
+ if (prevTop === undefined) continue
106
+
107
+ const delta = prevTop - newTop
108
+ if (Math.abs(delta) < 1) continue
109
+
110
+ const el = elementsRef.current.get(id)
111
+ if (!el) continue
112
+
113
+ el.style.transition = 'none'
114
+ el.style.transform = `translateY(${delta}px)`
115
+
116
+ requestAnimationFrame(() => {
117
+ requestAnimationFrame(() => {
118
+ el.style.transition = cssTransition
119
+ el.style.transform = ''
120
+ })
121
+ })
122
+ }
123
+
124
+ for (const id of newRowIdSet) {
125
+ const el = elementsRef.current.get(id)
126
+ if (!el) continue
127
+
128
+ el.style.transition = 'none'
129
+ el.style.transform = `translateY(${enterOffset}px)`
130
+ el.style.opacity = '0'
131
+
132
+ requestAnimationFrame(() => {
133
+ requestAnimationFrame(() => {
134
+ el.style.transition = `transform ${enterDuration}s cubic-bezier(0.32, 0.72, 0, 1), opacity ${enterDuration}s cubic-bezier(0.32, 0.72, 0, 1)`
135
+ el.style.transform = ''
136
+ el.style.opacity = '1'
137
+ })
138
+ })
139
+ }
140
+
141
+ const cleanupTimeout = Math.max(duration, enterDuration) * 1000 + 50
142
+
143
+ if (cleanupTimeoutRef.current) {
144
+ clearTimeout(cleanupTimeoutRef.current)
145
+ }
146
+
147
+ cleanupTimeoutRef.current = setTimeout(() => {
148
+ for (const id of currentOrderedIds) {
149
+ const el = elementsRef.current.get(id)
150
+ if (el) {
151
+ el.style.transition = ''
152
+ el.style.transform = ''
153
+ el.style.opacity = ''
154
+ }
155
+ }
156
+ }, cleanupTimeout)
157
+
158
+ prevTopsRef.current = currentTops
159
+ prevIdsRef.current = new Set(currentOrderedIds)
160
+
161
+ return () => {
162
+ if (cleanupTimeoutRef.current) {
163
+ clearTimeout(cleanupTimeoutRef.current)
164
+ cleanupTimeoutRef.current = null
165
+ }
166
+ }
167
+ }, [serializedOrderedIds, prefersReducedMotion])
168
+
169
+ return { register }
170
+ }
@@ -368,6 +368,35 @@ export type RowSelectionConfig<T extends Record<string, unknown>> = {
368
368
  disabledText?: (row: T, index: number) => string
369
369
  }
370
370
 
371
+ type BaseRowAnimationConfig = {
372
+ /** Enter animation duration in seconds. */
373
+ enterDuration: number
374
+ /** Enter animation Y offset in pixels. */
375
+ enterOffset: number
376
+ }
377
+
378
+ export type RowAnimationConfig = BaseRowAnimationConfig &
379
+ (
380
+ | {
381
+ /** Transition type for layout animations. */
382
+ transitionType: 'bezier'
383
+ /** Bezier duration in seconds. */
384
+ duration: number
385
+ /** Bezier easing curve as [x1, y1, x2, y2] cubic-bezier control points. */
386
+ bezier: [number, number, number, number]
387
+ }
388
+ | {
389
+ /** Transition type for layout animations. */
390
+ transitionType: 'spring'
391
+ /** Spring stiffness. */
392
+ stiffness: number
393
+ /** Spring damping. */
394
+ damping: number
395
+ /** Spring mass. */
396
+ mass: number
397
+ }
398
+ )
399
+
371
400
  export type DataTableProps<T extends Record<string, unknown>> = {
372
401
  data: T[]
373
402
  columns: ColumnDefinition<T>[]
@@ -477,6 +506,9 @@ export type DataTableProps<T extends Record<string, unknown>> = {
477
506
 
478
507
  getRowStyle?: (row: T, index: number) => React.CSSProperties
479
508
 
509
+ enableRowAnimation?: boolean
510
+ rowAnimationConfig?: RowAnimationConfig
511
+
480
512
  tableBodyHeight?: string | number
481
513
 
482
514
  // Mobile configuration
@@ -9,7 +9,11 @@ import {
9
9
  } from 'react'
10
10
  import styled, { CSSObject } from 'styled-components'
11
11
  import { motion } from 'framer-motion'
12
- import { DateRange, CustomRangeConfig } from './types'
12
+ import {
13
+ DateRange,
14
+ CustomRangeConfig,
15
+ CustomDateDisableFunction,
16
+ } from './types'
13
17
  import { CalendarTokenType } from './dateRangePicker.tokens'
14
18
  import Block from '../Primitives/Block/Block'
15
19
  import Skeleton from '../Skeleton/Skeleton'
@@ -36,13 +40,16 @@ type CalendarGridProps = {
36
40
  disablePastDates?: boolean
37
41
  hideFutureDates?: boolean
38
42
  hidePastDates?: boolean
39
- customDisableDates?: (date: Date) => boolean
43
+ customDisableDates?: CustomDateDisableFunction
40
44
  customRangeConfig?: CustomRangeConfig
41
45
  showDateTimePicker?: boolean
42
46
  resetScrollPosition?: number // Used to trigger scroll reset when popover reopens
43
47
  timezone?: string
44
48
  isSingleDatePicker?: boolean
45
49
  maxYearOffset?: number
50
+ minDate?: Date
51
+ maxDate?: Date
52
+ maxRangeDays?: number
46
53
  }
47
54
 
48
55
  const CONTAINER_HEIGHT = 340
@@ -239,6 +246,9 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
239
246
  timezone,
240
247
  isSingleDatePicker,
241
248
  maxYearOffset,
249
+ minDate,
250
+ maxDate,
251
+ maxRangeDays,
242
252
  },
243
253
  ref
244
254
  ) => {
@@ -379,7 +389,11 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
379
389
  isDoubleClick,
380
390
  timezone,
381
391
  selectedRange,
382
- isSingleDatePicker
392
+ isSingleDatePicker,
393
+ minDate,
394
+ maxDate,
395
+ customDisableDates,
396
+ maxRangeDays
383
397
  )
384
398
 
385
399
  if (newRange) {
@@ -395,6 +409,10 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
395
409
  customRangeConfig,
396
410
  onDateSelect,
397
411
  timezone,
412
+ minDate,
413
+ maxDate,
414
+ customDisableDates,
415
+ maxRangeDays,
398
416
  ]
399
417
  )
400
418
 
@@ -474,8 +492,14 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
474
492
  e: React.KeyboardEvent<HTMLElement>,
475
493
  year: number,
476
494
  month: number,
477
- day: number
495
+ day: number,
496
+ isDisabled: boolean = false
478
497
  ) => {
498
+ if (isDisabled && (e.key === 'Enter' || e.key === ' ')) {
499
+ e.preventDefault()
500
+ return
501
+ }
502
+
479
503
  if (e.key === 'Enter' || e.key === ' ') {
480
504
  e.preventDefault()
481
505
  handleDateClick(year, month, day, false)
@@ -657,7 +681,10 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
657
681
  calendarToken,
658
682
  customDisableDates,
659
683
  timezone,
660
- isSingleDatePicker
684
+ isSingleDatePicker,
685
+ minDate,
686
+ maxDate,
687
+ maxRangeDays
661
688
  )
662
689
 
663
690
  const isSelected =
@@ -800,6 +827,7 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
800
827
  isDisabled
801
828
  }
802
829
  onClick={() =>
830
+ !isDisabled &&
803
831
  handleDateClick(
804
832
  year,
805
833
  month,
@@ -808,6 +836,7 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
808
836
  )
809
837
  }
810
838
  onDoubleClick={() =>
839
+ !isDisabled &&
811
840
  handleDateClick(
812
841
  year,
813
842
  month,
@@ -820,7 +849,8 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
820
849
  e,
821
850
  year,
822
851
  month,
823
- day
852
+ day,
853
+ isDisabled
824
854
  )
825
855
  }
826
856
  data-element="days"