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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/dist/{node-C_DmV86X.js → breadcrumbV2.tokens-CovJEwot.js} +16 -0
  2. package/dist/components/Accordion/index.d.ts +2 -0
  3. package/dist/components/AccordionV2/accordionV2.animations.d.ts +1 -1
  4. package/dist/components/Alert/index.d.ts +1 -0
  5. package/dist/components/Avatar/index.d.ts +1 -0
  6. package/dist/components/Breadcrumb/index.d.ts +1 -0
  7. package/dist/components/Button/index.d.ts +1 -0
  8. package/dist/components/ButtonGroup/index.d.ts +1 -0
  9. package/dist/components/Card/index.d.ts +1 -0
  10. package/dist/components/CardV2/CardV2.d.ts +45 -0
  11. package/dist/components/CardV2/CardV2.utils.d.ts +14 -0
  12. package/dist/components/CardV2/CardV2Components.d.ts +8 -0
  13. package/dist/components/CardV2/CardV2Context.d.ts +14 -0
  14. package/dist/components/CardV2/CardV2Skeleton.d.ts +6 -0
  15. package/dist/components/CardV2/accessibility/CardV2AccessibilityReport.d.ts +2 -0
  16. package/dist/components/CardV2/accessibility/index.d.ts +1 -0
  17. package/dist/components/CardV2/cardV2.dark.tokens.d.ts +3 -0
  18. package/dist/components/CardV2/cardV2.light.tokens.d.ts +3 -0
  19. package/dist/components/CardV2/cardV2.tokens.d.ts +5 -0
  20. package/dist/components/CardV2/cardV2.tokens.types.d.ts +92 -0
  21. package/dist/components/CardV2/cardV2.types.d.ts +106 -0
  22. package/dist/components/CardV2/index.d.ts +5 -0
  23. package/dist/components/Charts/index.d.ts +10 -0
  24. package/dist/components/Charts/types.d.ts +2 -0
  25. package/dist/components/ChatInput/index.d.ts +1 -0
  26. package/dist/components/Checkbox/index.d.ts +1 -0
  27. package/dist/components/CodeEditor/index.d.ts +1 -0
  28. package/dist/components/CodeEditor/types.d.ts +22 -2
  29. package/dist/components/CodeEditorV2/CodeEditorV2.d.ts +1 -1
  30. package/dist/components/CodeEditorV2/codeEditorV2.types.d.ts +23 -2
  31. package/dist/components/DataTable/PivotTableModal/pivotModal.styled.d.ts +184 -0
  32. package/dist/components/DataTable/TableBody/types.d.ts +3 -1
  33. package/dist/components/DataTable/hooks/index.d.ts +2 -0
  34. package/dist/components/DataTable/hooks/useReducedMotion.d.ts +1 -0
  35. package/dist/components/DataTable/hooks/useRowFlip.d.ts +6 -0
  36. package/dist/components/DataTable/types.d.ts +26 -0
  37. package/dist/components/DateRangePicker/CalendarGrid.d.ts +5 -2
  38. package/dist/components/DateRangePicker/types.d.ts +3 -1
  39. package/dist/components/DateRangePicker/utils.d.ts +5 -5
  40. package/dist/components/Directory/Directory.d.ts +1 -1
  41. package/dist/components/Directory/NavItem.d.ts +1 -1
  42. package/dist/components/Directory/Section.d.ts +1 -1
  43. package/dist/components/Directory/VirtualizedDirectory.d.ts +3 -0
  44. package/dist/components/Directory/directory.tokens.d.ts +7 -0
  45. package/dist/components/Directory/types.d.ts +38 -1
  46. package/dist/components/Directory/utils.d.ts +3 -1
  47. package/dist/components/Drawer/index.d.ts +1 -0
  48. package/dist/components/Inputs/MultiValueInput/index.d.ts +1 -0
  49. package/dist/components/Inputs/NumberInput/index.d.ts +1 -0
  50. package/dist/components/Inputs/OTPInput/index.d.ts +1 -0
  51. package/dist/components/Inputs/SearchInput/index.d.ts +1 -0
  52. package/dist/components/Inputs/TextArea/index.d.ts +1 -0
  53. package/dist/components/Inputs/TextInput/index.d.ts +1 -0
  54. package/dist/components/InputsV2/TextAreaV2/utils.d.ts +2 -1
  55. package/dist/components/InputsV2/TextInputV2/utils.d.ts +2 -1
  56. package/dist/components/InputsV2/UploadV2/UploadContainerV2.d.ts +24 -0
  57. package/dist/components/InputsV2/UploadV2/UploadV2.d.ts +31 -0
  58. package/dist/components/InputsV2/UploadV2/UploadV2.dark.tokens.d.ts +3 -0
  59. package/dist/components/InputsV2/UploadV2/UploadV2.light.tokens.d.ts +3 -0
  60. package/dist/components/InputsV2/UploadV2/UploadV2.tokens.d.ts +5 -0
  61. package/dist/components/InputsV2/UploadV2/UploadV2.tokens.types.d.ts +115 -0
  62. package/dist/components/InputsV2/UploadV2/UploadV2.types.d.ts +56 -0
  63. package/dist/components/InputsV2/UploadV2/index.d.ts +3 -0
  64. package/dist/components/InputsV2/UploadV2/utils.d.ts +32 -0
  65. package/dist/components/KeyValuePair/index.d.ts +1 -0
  66. package/dist/components/Menu/Menu.d.ts +1 -1
  67. package/dist/components/Menu/index.d.ts +1 -0
  68. package/dist/components/Menu/types.d.ts +7 -0
  69. package/dist/components/Menu/utils.d.ts +10 -2
  70. package/dist/components/MenuV2/MenuV2Content.d.ts +1 -0
  71. package/dist/components/MenuV2/menuV2.types.d.ts +5 -0
  72. package/dist/components/MenuV2/menuV2.utils.d.ts +10 -2
  73. package/dist/components/Modal/index.d.ts +1 -0
  74. package/dist/components/ModalV2/ModalV2.d.ts +22 -0
  75. package/dist/components/ModalV2/ModalV2Footer.d.ts +10 -0
  76. package/dist/components/ModalV2/ModalV2Header.d.ts +15 -0
  77. package/dist/components/ModalV2/ModalV2Skeleton.d.ts +4 -0
  78. package/dist/components/ModalV2/index.d.ts +4 -0
  79. package/dist/components/ModalV2/mobileModalV2.d.ts +23 -0
  80. package/dist/components/ModalV2/modalAnimationV2.d.ts +3 -0
  81. package/dist/components/ModalV2/modalV2.dark.tokens.d.ts +3 -0
  82. package/dist/components/ModalV2/modalV2.light.tokens.d.ts +3 -0
  83. package/dist/components/ModalV2/modalV2.tokens.d.ts +5 -0
  84. package/dist/components/ModalV2/modalV2.tokens.types.d.ts +91 -0
  85. package/dist/components/ModalV2/modalV2.types.d.ts +66 -0
  86. package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
  87. package/dist/components/MultiSelect/MultiSelectMenu.d.ts +1 -1
  88. package/dist/components/MultiSelect/index.d.ts +2 -0
  89. package/dist/components/MultiSelect/types.d.ts +2 -0
  90. package/dist/components/MultiSelectV2/MultiSelectV2.d.ts +1 -1
  91. package/dist/components/MultiSelectV2/MultiSelectV2Menu.d.ts +1 -1
  92. package/dist/components/MultiSelectV2/multiSelectV2.types.d.ts +2 -0
  93. package/dist/components/Popover/index.d.ts +1 -0
  94. package/dist/components/Primitives/Block/Block.d.ts +1 -1
  95. package/dist/components/ProgressBar/index.d.ts +1 -0
  96. package/dist/components/Radio/index.d.ts +2 -0
  97. package/dist/components/Sidebar/SidebarContent.d.ts +9 -1
  98. package/dist/components/Sidebar/index.d.ts +1 -0
  99. package/dist/components/Sidebar/types.d.ts +9 -1
  100. package/dist/components/SidebarV2/SidebarV2Panel.d.ts +10 -2
  101. package/dist/components/SidebarV2/types.d.ts +9 -1
  102. package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
  103. package/dist/components/SingleSelect/SingleSelectMenu.d.ts +2 -1
  104. package/dist/components/SingleSelect/index.d.ts +1 -0
  105. package/dist/components/SingleSelect/types.d.ts +1 -0
  106. package/dist/components/SingleSelectV2/SingleSelectV2.d.ts +1 -1
  107. package/dist/components/SingleSelectV2/SingleSelectV2Menu.d.ts +1 -1
  108. package/dist/components/SingleSelectV2/singleSelectV2.tokens.types.d.ts +8 -0
  109. package/dist/components/SingleSelectV2/singleSelectV2.types.d.ts +2 -0
  110. package/dist/components/Skeleton/SkeletonCompound.d.ts +24 -33
  111. package/dist/components/Snackbar/Snackbar.d.ts +1 -1
  112. package/dist/components/Snackbar/index.d.ts +2 -0
  113. package/dist/components/Snackbar/snackbar.tokens.d.ts +1 -0
  114. package/dist/components/Snackbar/types.d.ts +2 -0
  115. package/dist/components/StatCard/index.d.ts +1 -0
  116. package/dist/components/Stepper/index.d.ts +1 -0
  117. package/dist/components/Switch/index.d.ts +2 -0
  118. package/dist/components/Tabs/index.d.ts +1 -0
  119. package/dist/components/Tags/index.d.ts +1 -0
  120. package/dist/components/Timeline/Timeline.d.ts +13 -37
  121. package/dist/components/Tooltip/index.d.ts +1 -0
  122. package/dist/components/Topbar/index.d.ts +1 -0
  123. package/dist/components/Upload/index.d.ts +1 -0
  124. package/dist/context/ThemeContext.d.ts +6 -0
  125. package/dist/context/useComponentToken.d.ts +4 -1
  126. package/dist/main.d.ts +6 -0
  127. package/dist/main.js +45436 -42186
  128. package/dist/node-B3rrXW84.js +1023 -0
  129. package/dist/node.d.ts +2 -0
  130. package/dist/node.js +21 -18
  131. package/dist/{tokens.js → token-engine.js} +1 -1
  132. package/lib/components/Accordion/AccordionItem.tsx +2 -6
  133. package/lib/components/Accordion/index.ts +2 -0
  134. package/lib/components/AccordionV2/AccordionV2Item.tsx +1 -1
  135. package/lib/components/AccordionV2/accordionV2.animations.ts +1 -5
  136. package/lib/components/Alert/index.ts +1 -0
  137. package/lib/components/Avatar/index.ts +1 -0
  138. package/lib/components/Breadcrumb/index.ts +1 -0
  139. package/lib/components/Button/index.ts +1 -0
  140. package/lib/components/ButtonGroup/index.ts +1 -0
  141. package/lib/components/Card/index.ts +1 -0
  142. package/lib/components/CardV2/CardV2.tsx +327 -0
  143. package/lib/components/CardV2/CardV2.utils.tsx +77 -0
  144. package/lib/components/CardV2/CardV2Components.tsx +297 -0
  145. package/lib/components/CardV2/CardV2Context.tsx +18 -0
  146. package/lib/components/CardV2/CardV2Skeleton.tsx +40 -0
  147. package/lib/components/CardV2/accessibility/CardV2AccessibilityReport.ts +284 -0
  148. package/lib/components/CardV2/accessibility/index.ts +1 -0
  149. package/lib/components/CardV2/cardV2.dark.tokens.ts +177 -0
  150. package/lib/components/CardV2/cardV2.light.tokens.ts +177 -0
  151. package/lib/components/CardV2/cardV2.tokens.ts +21 -0
  152. package/lib/components/CardV2/cardV2.tokens.types.ts +94 -0
  153. package/lib/components/CardV2/cardV2.types.ts +131 -0
  154. package/lib/components/CardV2/index.ts +13 -0
  155. package/lib/components/Charts/ChartLegend.tsx +25 -5
  156. package/lib/components/Charts/Charts.tsx +10 -0
  157. package/lib/components/Charts/index.ts +10 -0
  158. package/lib/components/Charts/types.tsx +2 -0
  159. package/lib/components/ChatInput/index.tsx +1 -0
  160. package/lib/components/Checkbox/index.ts +1 -0
  161. package/lib/components/CodeEditor/MonacoEditorWrapper.tsx +6 -2
  162. package/lib/components/CodeEditor/index.ts +1 -0
  163. package/lib/components/CodeEditor/types.ts +52 -2
  164. package/lib/components/CodeEditorV2/MonacoEditor/MonacoEditorWrapper.tsx +6 -2
  165. package/lib/components/CodeEditorV2/codeEditorV2.types.ts +44 -5
  166. package/lib/components/DataTable/DataTable.tsx +8 -0
  167. package/lib/components/DataTable/TableBody/index.tsx +47 -11
  168. package/lib/components/DataTable/TableBody/types.ts +7 -1
  169. package/lib/components/DataTable/TableCell/index.tsx +1 -1
  170. package/lib/components/DataTable/hooks/index.ts +2 -0
  171. package/lib/components/DataTable/hooks/useReducedMotion.ts +19 -0
  172. package/lib/components/DataTable/hooks/useRowFlip.ts +170 -0
  173. package/lib/components/DataTable/types.ts +32 -0
  174. package/lib/components/DateRangePicker/CalendarGrid.tsx +39 -6
  175. package/lib/components/DateRangePicker/DateRangePicker.tsx +27 -4
  176. package/lib/components/DateRangePicker/types.ts +6 -1
  177. package/lib/components/DateRangePicker/utils.ts +123 -12
  178. package/lib/components/Directory/Directory.tsx +31 -0
  179. package/lib/components/Directory/NavItem.tsx +177 -86
  180. package/lib/components/Directory/Section.tsx +9 -0
  181. package/lib/components/Directory/VirtualizedDirectory.tsx +670 -0
  182. package/lib/components/Directory/directory.tokens.ts +21 -0
  183. package/lib/components/Directory/types.ts +43 -1
  184. package/lib/components/Directory/utils.ts +81 -1
  185. package/lib/components/Drawer/index.ts +1 -0
  186. package/lib/components/Inputs/DropdownInput/DropdownInput.tsx +6 -2
  187. package/lib/components/Inputs/MultiValueInput/index.ts +1 -0
  188. package/lib/components/Inputs/NumberInput/NumberInput.tsx +6 -2
  189. package/lib/components/Inputs/NumberInput/index.ts +1 -0
  190. package/lib/components/Inputs/OTPInput/index.ts +1 -0
  191. package/lib/components/Inputs/SearchInput/index.ts +1 -0
  192. package/lib/components/Inputs/TextArea/TextArea.tsx +4 -2
  193. package/lib/components/Inputs/TextArea/index.ts +1 -0
  194. package/lib/components/Inputs/TextInput/TextInput.tsx +6 -2
  195. package/lib/components/Inputs/TextInput/index.ts +1 -0
  196. package/lib/components/Inputs/UnitInput/UnitInput.tsx +6 -2
  197. package/lib/components/InputsV2/NumberInputV2/NumberInputV2.tsx +6 -2
  198. package/lib/components/InputsV2/TextAreaV2/TextAreaV2.tsx +2 -1
  199. package/lib/components/InputsV2/TextAreaV2/utils.ts +3 -1
  200. package/lib/components/InputsV2/TextInputV2/TextInputV2.tsx +1 -0
  201. package/lib/components/InputsV2/TextInputV2/utils.ts +6 -8
  202. package/lib/components/InputsV2/UploadV2/UploadContainerV2.tsx +470 -0
  203. package/lib/components/InputsV2/UploadV2/UploadV2.dark.tokens.ts +348 -0
  204. package/lib/components/InputsV2/UploadV2/UploadV2.light.tokens.ts +348 -0
  205. package/lib/components/InputsV2/UploadV2/UploadV2.tokens.ts +20 -0
  206. package/lib/components/InputsV2/UploadV2/UploadV2.tokens.types.ts +117 -0
  207. package/lib/components/InputsV2/UploadV2/UploadV2.tsx +336 -0
  208. package/lib/components/InputsV2/UploadV2/UploadV2.types.ts +67 -0
  209. package/lib/components/InputsV2/UploadV2/index.ts +3 -0
  210. package/lib/components/InputsV2/UploadV2/utils.ts +170 -0
  211. package/lib/components/KeyValuePair/index.ts +1 -0
  212. package/lib/components/Menu/Menu.tsx +18 -2
  213. package/lib/components/Menu/SubMenu.tsx +25 -3
  214. package/lib/components/Menu/index.ts +1 -0
  215. package/lib/components/Menu/types.tsx +14 -0
  216. package/lib/components/Menu/utils.ts +46 -3
  217. package/lib/components/MenuV2/MenuV2.tsx +9 -2
  218. package/lib/components/MenuV2/MenuV2Content.tsx +6 -0
  219. package/lib/components/MenuV2/MenuV2SubMenu.tsx +16 -2
  220. package/lib/components/MenuV2/menuV2.types.ts +11 -0
  221. package/lib/components/MenuV2/menuV2.utils.ts +45 -3
  222. package/lib/components/Modal/index.ts +1 -0
  223. package/lib/components/ModalV2/ModalV2.tsx +269 -0
  224. package/lib/components/ModalV2/ModalV2Footer.tsx +76 -0
  225. package/lib/components/ModalV2/ModalV2Header.tsx +144 -0
  226. package/lib/components/ModalV2/ModalV2Skeleton.tsx +80 -0
  227. package/lib/components/ModalV2/index.ts +4 -0
  228. package/lib/components/ModalV2/mobileModalV2.tsx +411 -0
  229. package/lib/components/ModalV2/modalAnimationV2.tsx +19 -0
  230. package/lib/components/ModalV2/modalV2.dark.tokens.ts +183 -0
  231. package/lib/components/ModalV2/modalV2.light.tokens.ts +183 -0
  232. package/lib/components/ModalV2/modalV2.tokens.ts +21 -0
  233. package/lib/components/ModalV2/modalV2.tokens.types.ts +94 -0
  234. package/lib/components/ModalV2/modalV2.types.ts +80 -0
  235. package/lib/components/MultiSelect/MultiSelect.tsx +4 -1
  236. package/lib/components/MultiSelect/MultiSelectMenu.tsx +8 -0
  237. package/lib/components/MultiSelect/MultiSelectTrigger.tsx +2 -1
  238. package/lib/components/MultiSelect/index.ts +2 -0
  239. package/lib/components/MultiSelect/types.ts +2 -0
  240. package/lib/components/MultiSelectV2/MultiSelectV2.tsx +2 -0
  241. package/lib/components/MultiSelectV2/MultiSelectV2Menu.tsx +8 -0
  242. package/lib/components/MultiSelectV2/MultiSelectV2Trigger.tsx +4 -1
  243. package/lib/components/MultiSelectV2/multiSelectV2.types.ts +2 -0
  244. package/lib/components/Popover/index.ts +1 -0
  245. package/lib/components/Primitives/Block/Block.tsx +1 -1
  246. package/lib/components/ProgressBar/index.ts +1 -0
  247. package/lib/components/Radio/index.ts +2 -0
  248. package/lib/components/Sidebar/Sidebar.tsx +38 -0
  249. package/lib/components/Sidebar/SidebarContent.tsx +25 -1
  250. package/lib/components/Sidebar/index.ts +1 -0
  251. package/lib/components/Sidebar/types.ts +13 -1
  252. package/lib/components/SidebarV2/SidebarV2.tsx +30 -0
  253. package/lib/components/SidebarV2/SidebarV2Panel.tsx +25 -1
  254. package/lib/components/SidebarV2/types.ts +9 -1
  255. package/lib/components/SingleSelect/SingleSelect.tsx +4 -1
  256. package/lib/components/SingleSelect/SingleSelectMenu.tsx +171 -138
  257. package/lib/components/SingleSelect/SingleSelectTrigger.tsx +3 -1
  258. package/lib/components/SingleSelect/index.ts +1 -0
  259. package/lib/components/SingleSelect/types.ts +1 -0
  260. package/lib/components/SingleSelectV2/SingleSelectV2.tsx +2 -0
  261. package/lib/components/SingleSelectV2/SingleSelectV2Menu.tsx +84 -58
  262. package/lib/components/SingleSelectV2/SingleSelectV2Search.tsx +1 -0
  263. package/lib/components/SingleSelectV2/SingleSelectV2Trigger.tsx +3 -1
  264. package/lib/components/SingleSelectV2/singleSelectV2.dark.tokens.ts +8 -0
  265. package/lib/components/SingleSelectV2/singleSelectV2.light.tokens.ts +8 -0
  266. package/lib/components/SingleSelectV2/singleSelectV2.tokens.types.ts +8 -0
  267. package/lib/components/SingleSelectV2/singleSelectV2.types.ts +2 -0
  268. package/lib/components/Skeleton/SkeletonCompound.tsx +45 -31
  269. package/lib/components/Snackbar/Snackbar.tsx +18 -8
  270. package/lib/components/Snackbar/index.ts +2 -0
  271. package/lib/components/Snackbar/snackbar.tokens.ts +6 -0
  272. package/lib/components/Snackbar/types.ts +2 -0
  273. package/lib/components/StatCard/StatCard.tsx +29 -0
  274. package/lib/components/StatCard/index.ts +1 -0
  275. package/lib/components/Stepper/index.ts +1 -0
  276. package/lib/components/Switch/index.ts +2 -0
  277. package/lib/components/Tabs/index.ts +1 -0
  278. package/lib/components/Tags/index.ts +1 -0
  279. package/lib/components/Timeline/Timeline.tsx +9 -1
  280. package/lib/components/Tooltip/index.ts +1 -0
  281. package/lib/components/Topbar/index.ts +1 -0
  282. package/lib/components/Upload/index.ts +1 -0
  283. package/lib/context/ThemeContext.tsx +16 -0
  284. package/lib/context/initComponentTokens.ts +11 -0
  285. package/lib/context/useComponentToken.ts +15 -1
  286. package/lib/hooks/useResponsiveTokens.ts +63 -0
  287. package/lib/main.ts +16 -0
  288. package/lib/node.ts +2 -0
  289. package/package.json +5 -4
  290. package/dist/tokens.d.ts +0 -2
@@ -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
@@ -129,6 +136,7 @@ const CalendarSkeleton = ({
129
136
  <Block
130
137
  style={{
131
138
  maxHeight: CONTAINER_HEIGHT,
139
+ height: '100%',
132
140
  padding: FOUNDATION_THEME.unit[16],
133
141
  }}
134
142
  >
@@ -238,6 +246,9 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
238
246
  timezone,
239
247
  isSingleDatePicker,
240
248
  maxYearOffset,
249
+ minDate,
250
+ maxDate,
251
+ maxRangeDays,
241
252
  },
242
253
  ref
243
254
  ) => {
@@ -378,7 +389,11 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
378
389
  isDoubleClick,
379
390
  timezone,
380
391
  selectedRange,
381
- isSingleDatePicker
392
+ isSingleDatePicker,
393
+ minDate,
394
+ maxDate,
395
+ customDisableDates,
396
+ maxRangeDays
382
397
  )
383
398
 
384
399
  if (newRange) {
@@ -394,6 +409,10 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
394
409
  customRangeConfig,
395
410
  onDateSelect,
396
411
  timezone,
412
+ minDate,
413
+ maxDate,
414
+ customDisableDates,
415
+ maxRangeDays,
397
416
  ]
398
417
  )
399
418
 
@@ -473,8 +492,14 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
473
492
  e: React.KeyboardEvent<HTMLElement>,
474
493
  year: number,
475
494
  month: number,
476
- day: number
495
+ day: number,
496
+ isDisabled: boolean = false
477
497
  ) => {
498
+ if (isDisabled && (e.key === 'Enter' || e.key === ' ')) {
499
+ e.preventDefault()
500
+ return
501
+ }
502
+
478
503
  if (e.key === 'Enter' || e.key === ' ') {
479
504
  e.preventDefault()
480
505
  handleDateClick(year, month, day, false)
@@ -656,7 +681,10 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
656
681
  calendarToken,
657
682
  customDisableDates,
658
683
  timezone,
659
- isSingleDatePicker
684
+ isSingleDatePicker,
685
+ minDate,
686
+ maxDate,
687
+ maxRangeDays
660
688
  )
661
689
 
662
690
  const isSelected =
@@ -799,6 +827,7 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
799
827
  isDisabled
800
828
  }
801
829
  onClick={() =>
830
+ !isDisabled &&
802
831
  handleDateClick(
803
832
  year,
804
833
  month,
@@ -807,6 +836,7 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
807
836
  )
808
837
  }
809
838
  onDoubleClick={() =>
839
+ !isDisabled &&
810
840
  handleDateClick(
811
841
  year,
812
842
  month,
@@ -819,7 +849,8 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
819
849
  e,
820
850
  year,
821
851
  month,
822
- day
852
+ day,
853
+ isDisabled
823
854
  )
824
855
  }
825
856
  data-element="days"
@@ -918,6 +949,7 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
918
949
  <MotionBlock
919
950
  style={{
920
951
  maxHeight: CONTAINER_HEIGHT,
952
+ height: '100%',
921
953
  overflowY: 'auto',
922
954
  overflow: 'auto',
923
955
  position: 'relative',
@@ -985,6 +1017,7 @@ const CalendarGrid = forwardRef<HTMLDivElement, CalendarGridProps>(
985
1017
  }}
986
1018
  style={{
987
1019
  maxHeight: CONTAINER_HEIGHT,
1020
+ height: '100%',
988
1021
  overflowY: 'auto',
989
1022
  overflow: 'auto',
990
1023
  position: 'relative',
@@ -264,13 +264,16 @@ type CalendarSectionProps = {
264
264
  disablePastDates: boolean
265
265
  hideFutureDates: boolean
266
266
  hidePastDates: boolean
267
- customDisableDates?: (date: Date) => boolean
267
+ customDisableDates?: (date: Date, currentRange?: DateRange) => boolean
268
268
  customRangeConfig?: import('./types').CustomRangeConfig
269
269
  onDateSelect: (range: DateRange) => void
270
270
  showDateTimePicker: boolean
271
271
  timezone?: string
272
272
  isSingleDatePicker?: boolean
273
273
  maxYearOffset?: number
274
+ minDate?: Date
275
+ maxDate?: Date
276
+ maxRangeDays?: number
274
277
  }
275
278
 
276
279
  const CalendarSection: React.FC<
@@ -291,8 +294,11 @@ const CalendarSection: React.FC<
291
294
  timezone,
292
295
  isSingleDatePicker,
293
296
  maxYearOffset,
297
+ minDate,
298
+ maxDate,
299
+ maxRangeDays,
294
300
  }) => (
295
- <Block>
301
+ <Block flexGrow={1} minHeight={0} overflow="auto">
296
302
  <CalendarGrid
297
303
  selectedRange={selectedRange}
298
304
  onDateSelect={onDateSelect}
@@ -309,6 +315,9 @@ const CalendarSection: React.FC<
309
315
  timezone={timezone}
310
316
  isSingleDatePicker={isSingleDatePicker}
311
317
  maxYearOffset={maxYearOffset}
318
+ minDate={minDate}
319
+ maxDate={maxDate}
320
+ maxRangeDays={maxRangeDays}
312
321
  />
313
322
  </Block>
314
323
  )
@@ -386,6 +395,9 @@ const DateRangePicker = forwardRef<HTMLDivElement, DateRangePickerProps>(
386
395
  hidePastDates = false,
387
396
  customDisableDates,
388
397
  customRangeConfig,
398
+ minDate,
399
+ maxDate,
400
+ maxRangeDays,
389
401
  triggerElement = null,
390
402
  useDrawerOnMobile = true,
391
403
  skipQuickFiltersOnMobile = false,
@@ -534,7 +546,11 @@ const DateRangePicker = forwardRef<HTMLDivElement, DateRangePickerProps>(
534
546
  setSelectedRange(normalizedRange)
535
547
  setActivePreset(
536
548
  normalizedRange
537
- ? detectPresetFromRange(normalizedRange, timezone)
549
+ ? detectPresetFromRange(
550
+ normalizedRange,
551
+ timezone,
552
+ presetConfigs
553
+ )
538
554
  : DateRangePreset.CUSTOM
539
555
  )
540
556
  setStartDate(
@@ -573,7 +589,7 @@ const DateRangePicker = forwardRef<HTMLDivElement, DateRangePickerProps>(
573
589
  error: 'none',
574
590
  })
575
591
  },
576
- [timezone, dateFormat]
592
+ [timezone, dateFormat, presetConfigs]
577
593
  )
578
594
 
579
595
  useEffect(() => {
@@ -1228,6 +1244,10 @@ const DateRangePicker = forwardRef<HTMLDivElement, DateRangePickerProps>(
1228
1244
  style={{
1229
1245
  ...calendarToken.calendar,
1230
1246
  }}
1247
+ maxHeight="var(--radix-popper-available-height)"
1248
+ display="flex"
1249
+ flexDirection="column"
1250
+ overflow="hidden"
1231
1251
  >
1232
1252
  {showDateInput && (
1233
1253
  <DateInputsSection
@@ -1275,6 +1295,9 @@ const DateRangePicker = forwardRef<HTMLDivElement, DateRangePickerProps>(
1275
1295
  timezone={timezone}
1276
1296
  isSingleDatePicker={isSingleDatePicker}
1277
1297
  maxYearOffset={maxYearOffset}
1298
+ minDate={minDate}
1299
+ maxDate={maxDate}
1300
+ maxRangeDays={maxRangeDays}
1278
1301
  />
1279
1302
 
1280
1303
  <FooterControls
@@ -207,9 +207,13 @@ export type PresetsConfig = (
207
207
  /**
208
208
  * Function type for custom date disabling logic
209
209
  * @param date The date to check
210
+ * @param currentRange The current in-progress selected range (if any)
210
211
  * @returns true if the date should be disabled, false otherwise
211
212
  */
212
- export type CustomDateDisableFunction = (date: Date) => boolean
213
+ export type CustomDateDisableFunction = (
214
+ date: Date,
215
+ currentRange?: DateRange
216
+ ) => boolean
213
217
 
214
218
  /**
215
219
  * Function type for custom range calculation
@@ -317,6 +321,7 @@ export type DateRangePickerProps = {
317
321
  icon?: ReactNode
318
322
  minDate?: Date
319
323
  maxDate?: Date
324
+ maxRangeDays?: number
320
325
  dateFormat?: string
321
326
  allowSingleDateSelection?: boolean
322
327
  isSingleDatePicker?: boolean
@@ -1040,6 +1040,10 @@ export const createSingleDateRange = (
1040
1040
  return { startDate, endDate }
1041
1041
  }
1042
1042
 
1043
+ /** Normalizes a date to midnight so comparisons only consider the calendar day. */
1044
+ const startOfDay = (date: Date): Date =>
1045
+ new Date(date.getFullYear(), date.getMonth(), date.getDate())
1046
+
1043
1047
  /**
1044
1048
  * Creates a date at start of day (00:00:00)
1045
1049
  */
@@ -1115,7 +1119,11 @@ export const handleCalendarDateClick = (
1115
1119
  isDoubleClick: boolean = false,
1116
1120
  timezone?: string,
1117
1121
  selectedRange?: DateRange,
1118
- isSingleDatePicker?: boolean
1122
+ isSingleDatePicker?: boolean,
1123
+ minDate?: Date,
1124
+ maxDate?: Date,
1125
+ customDisableDates?: (date: Date, currentRange?: DateRange) => boolean,
1126
+ maxRangeDays?: number
1119
1127
  ): DateRange | null => {
1120
1128
  // Validate date is not disabled
1121
1129
  if (
@@ -1125,6 +1133,24 @@ export const handleCalendarDateClick = (
1125
1133
  return null
1126
1134
  }
1127
1135
 
1136
+ // minDate / maxDate hard bounds (day-level comparison)
1137
+ if (minDate && startOfDay(clickedDate) < startOfDay(minDate)) return null
1138
+ if (maxDate && startOfDay(clickedDate) > startOfDay(maxDate)) return null
1139
+ // customDisableDates honoured in the click path
1140
+ if (customDisableDates && customDisableDates(clickedDate, selectedRange))
1141
+ return null
1142
+ // maxRangeDays: block clicks on days beyond start + maxRangeDays
1143
+ if (maxRangeDays && selectedRange?.startDate && !selectedRange.endDate) {
1144
+ const diffDays = Math.abs(
1145
+ Math.floor(
1146
+ (startOfDay(clickedDate).getTime() -
1147
+ startOfDay(selectedRange.startDate).getTime()) /
1148
+ (1000 * 60 * 60 * 24)
1149
+ )
1150
+ )
1151
+ if (diffDays > maxRangeDays) return null
1152
+ }
1153
+
1128
1154
  // Create clean date without time components for comparison
1129
1155
  const clickedDateOnly = new Date(
1130
1156
  clickedDate.getFullYear(),
@@ -1504,15 +1530,33 @@ export const getDateCellStates = (
1504
1530
  today: Date,
1505
1531
  disableFutureDates: boolean = false,
1506
1532
  disablePastDates: boolean = false,
1507
- customDisableDates?: (date: Date) => boolean,
1533
+ customDisableDates?: (date: Date, currentRange?: DateRange) => boolean,
1508
1534
  timezone?: string,
1509
- isSingleDatePicker?: boolean
1535
+ isSingleDatePicker?: boolean,
1536
+ minDate?: Date,
1537
+ maxDate?: Date,
1538
+ maxRangeDays?: number
1510
1539
  ) => {
1511
1540
  const isTodayDay = isDateToday(date, today)
1541
+
1542
+ // maxRangeDays: only active while a range is half-selected (start picked,
1543
+ // end not yet chosen). Once both start and end are set, a new click resets
1544
+ // to a fresh start, so capping is not needed there.
1545
+ let isBeyondMaxRange = false
1546
+ if (maxRangeDays && selectedRange?.startDate && !selectedRange.endDate) {
1547
+ const start = selectedRange.startDate
1548
+ const diffMs = startOfDay(date).getTime() - startOfDay(start).getTime()
1549
+ const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24))
1550
+ isBeyondMaxRange = Math.abs(diffDays) > maxRangeDays
1551
+ }
1552
+
1512
1553
  const isDisabled = Boolean(
1513
1554
  (disableFutureDates && date > today) ||
1514
1555
  (disablePastDates && date < today) ||
1515
- (customDisableDates && customDisableDates(date))
1556
+ (minDate && startOfDay(date) < startOfDay(minDate)) ||
1557
+ (maxDate && startOfDay(date) > startOfDay(maxDate)) ||
1558
+ (customDisableDates && customDisableDates(date, selectedRange)) ||
1559
+ isBeyondMaxRange
1516
1560
  )
1517
1561
 
1518
1562
  if (!selectedRange) {
@@ -2249,9 +2293,12 @@ export const calculateDayCellProps = (
2249
2293
  disableFutureDates: boolean,
2250
2294
  disablePastDates: boolean,
2251
2295
  calendarToken: CalendarTokenType,
2252
- customDisableDates?: (date: Date) => boolean,
2296
+ customDisableDates?: (date: Date, currentRange?: DateRange) => boolean,
2253
2297
  timezone?: string,
2254
- isSingleDatePicker?: boolean
2298
+ isSingleDatePicker?: boolean,
2299
+ minDate?: Date,
2300
+ maxDate?: Date,
2301
+ maxRangeDays?: number
2255
2302
  ): {
2256
2303
  dateStates: ReturnType<typeof getDateCellStates>
2257
2304
  styles: Record<string, unknown>
@@ -2266,7 +2313,10 @@ export const calculateDayCellProps = (
2266
2313
  disablePastDates,
2267
2314
  customDisableDates,
2268
2315
  timezone,
2269
- isSingleDatePicker
2316
+ isSingleDatePicker,
2317
+ minDate,
2318
+ maxDate,
2319
+ maxRangeDays
2270
2320
  )
2271
2321
 
2272
2322
  const getCellStyles = () => {
@@ -3597,7 +3647,11 @@ export const handleCustomRangeCalendarDateClick = (
3597
3647
  isDoubleClick: boolean = false,
3598
3648
  timezone?: string,
3599
3649
  selectedRange?: DateRange,
3600
- isSingleDatePicker?: boolean
3650
+ isSingleDatePicker?: boolean,
3651
+ minDate?: Date,
3652
+ maxDate?: Date,
3653
+ customDisableDates?: (date: Date, currentRange?: DateRange) => boolean,
3654
+ maxRangeDays?: number
3601
3655
  ): DateRange | null => {
3602
3656
  // Validate date is not disabled
3603
3657
  if (
@@ -3607,6 +3661,24 @@ export const handleCustomRangeCalendarDateClick = (
3607
3661
  return null
3608
3662
  }
3609
3663
 
3664
+ // minDate / maxDate hard bounds (day-level comparison)
3665
+ if (minDate && startOfDay(clickedDate) < startOfDay(minDate)) return null
3666
+ if (maxDate && startOfDay(clickedDate) > startOfDay(maxDate)) return null
3667
+ // customDisableDates honoured in the click path
3668
+ if (customDisableDates && customDisableDates(clickedDate, selectedRange))
3669
+ return null
3670
+ // maxRangeDays: block clicks on days beyond start + maxRangeDays
3671
+ if (maxRangeDays && selectedRange?.startDate && !selectedRange.endDate) {
3672
+ const diffDays = Math.abs(
3673
+ Math.floor(
3674
+ (startOfDay(clickedDate).getTime() -
3675
+ startOfDay(selectedRange.startDate).getTime()) /
3676
+ (1000 * 60 * 60 * 24)
3677
+ )
3678
+ )
3679
+ if (diffDays > maxRangeDays) return null
3680
+ }
3681
+
3610
3682
  // If no custom range config, use standard logic
3611
3683
  if (!customRangeConfig) {
3612
3684
  return handleCalendarDateClick(
@@ -3618,7 +3690,11 @@ export const handleCustomRangeCalendarDateClick = (
3618
3690
  isDoubleClick,
3619
3691
  timezone,
3620
3692
  selectedRange,
3621
- isSingleDatePicker
3693
+ isSingleDatePicker,
3694
+ minDate,
3695
+ maxDate,
3696
+ customDisableDates,
3697
+ maxRangeDays
3622
3698
  )
3623
3699
  }
3624
3700
 
@@ -3666,7 +3742,11 @@ export const handleCustomRangeCalendarDateClick = (
3666
3742
  isDoubleClick,
3667
3743
  timezone,
3668
3744
  selectedRange,
3669
- isSingleDatePicker
3745
+ isSingleDatePicker,
3746
+ minDate,
3747
+ maxDate,
3748
+ customDisableDates,
3749
+ maxRangeDays
3670
3750
  )
3671
3751
  }
3672
3752
  endDate = calculatedDate
@@ -3681,7 +3761,11 @@ export const handleCustomRangeCalendarDateClick = (
3681
3761
  isDoubleClick,
3682
3762
  timezone,
3683
3763
  selectedRange,
3684
- isSingleDatePicker
3764
+ isSingleDatePicker,
3765
+ minDate,
3766
+ maxDate,
3767
+ customDisableDates,
3768
+ maxRangeDays
3685
3769
  )
3686
3770
  }
3687
3771
 
@@ -3974,7 +4058,8 @@ export const matchesLastMonthPreset = (range: DateRange): boolean => {
3974
4058
  */
3975
4059
  export const detectPresetFromRange = (
3976
4060
  range: DateRange,
3977
- timezone?: string
4061
+ timezone?: string,
4062
+ presetConfigs?: CustomPresetConfig[]
3978
4063
  ): DateRangePreset => {
3979
4064
  if (!range.startDate || !range.endDate) {
3980
4065
  return DateRangePreset.CUSTOM
@@ -4119,6 +4204,32 @@ export const detectPresetFromRange = (
4119
4204
  return DateRangePreset.NEXT_12_MONTHS
4120
4205
  }
4121
4206
 
4207
+ // Check custom preset definitions (from customPresets prop) before giving up.
4208
+ if (presetConfigs && presetConfigs.length > 0) {
4209
+ const toleranceMs =
4210
+ DATE_RANGE_PICKER_CONSTANTS.PRESET_DETECTION_TOLERANCE_MS
4211
+ for (const config of presetConfigs) {
4212
+ const definition = getCustomPresetDefinition(
4213
+ config.preset as string
4214
+ )
4215
+ if (!definition) continue
4216
+
4217
+ const presetRange = definition.getDateRange()
4218
+ if (
4219
+ presetRange.startDate &&
4220
+ presetRange.endDate &&
4221
+ Math.abs(
4222
+ range.startDate.getTime() - presetRange.startDate.getTime()
4223
+ ) <= toleranceMs &&
4224
+ Math.abs(
4225
+ range.endDate.getTime() - presetRange.endDate.getTime()
4226
+ ) <= toleranceMs
4227
+ ) {
4228
+ return config.preset
4229
+ }
4230
+ }
4231
+ }
4232
+
4122
4233
  return DateRangePreset.CUSTOM
4123
4234
  }
4124
4235
 
@@ -4,6 +4,7 @@ import React from 'react'
4
4
  import { createRef, useEffect, useRef } from 'react'
5
5
  import type { DirectoryProps } from './types'
6
6
  import Section from './Section'
7
+ import VirtualizedDirectory from './VirtualizedDirectory'
7
8
  import Block from '../Primitives/Block/Block'
8
9
  import { handleSectionNavigation, normalizeDirectoryData } from './utils'
9
10
  import { ActiveItemProvider } from './NavItem'
@@ -17,6 +18,14 @@ const Directory = ({
17
18
  onActiveItemChange,
18
19
  defaultActiveItem,
19
20
  iconOnlyMode = false,
21
+ showHierarchyLines = false,
22
+ hierarchyLineBorderRadius = 0,
23
+ expandedItems,
24
+ defaultExpandedItems,
25
+ onExpandedItemsChange,
26
+ onItemExpand,
27
+ enableVirtualization = false,
28
+ virtualization,
20
29
  }: DirectoryProps) => {
21
30
  const directoryData = normalizeDirectoryData(directoryDataProp)
22
31
  const sectionRefs = useRef<Array<React.RefObject<HTMLDivElement | null>>>(
@@ -30,6 +39,26 @@ const Directory = ({
30
39
  )
31
40
  }, [directoryData])
32
41
 
42
+ if (enableVirtualization && !iconOnlyMode) {
43
+ return (
44
+ <VirtualizedDirectory
45
+ directoryData={directoryData}
46
+ idPrefix={idPrefix}
47
+ activeItem={activeItem}
48
+ onActiveItemChange={onActiveItemChange}
49
+ defaultActiveItem={defaultActiveItem}
50
+ showHierarchyLines={showHierarchyLines}
51
+ hierarchyLineBorderRadius={hierarchyLineBorderRadius}
52
+ expandedItems={expandedItems}
53
+ defaultExpandedItems={defaultExpandedItems}
54
+ onExpandedItemsChange={onExpandedItemsChange}
55
+ onItemExpand={onItemExpand}
56
+ enableVirtualization={enableVirtualization}
57
+ virtualization={virtualization}
58
+ />
59
+ )
60
+ }
61
+
33
62
  return (
34
63
  <ActiveItemProvider
35
64
  activeItem={activeItem}
@@ -57,6 +86,8 @@ const Directory = ({
57
86
  sectionIndex={sectionIndex}
58
87
  idPrefix={idPrefix}
59
88
  iconOnlyMode={iconOnlyMode}
89
+ showHierarchyLines={showHierarchyLines}
90
+ hierarchyLineBorderRadius={hierarchyLineBorderRadius}
60
91
  onNavigateBetweenSections={(direction, currentIndex) =>
61
92
  handleSectionNavigation(
62
93
  direction,