@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,6 @@
1
+ import { RowAnimationConfig } from '../types';
2
+ interface UseRowFlipReturn {
3
+ register: (id: string, el: HTMLTableRowElement | null) => void;
4
+ }
5
+ export declare function useRowFlip(orderedIds: string[], animationConfig?: RowAnimationConfig): UseRowFlipReturn;
6
+ export {};
@@ -285,6 +285,29 @@ export type RowSelectionConfig<T extends Record<string, unknown>> = {
285
285
  isDisabled?: (row: T, index: number) => boolean;
286
286
  disabledText?: (row: T, index: number) => string;
287
287
  };
288
+ type BaseRowAnimationConfig = {
289
+ /** Enter animation duration in seconds. */
290
+ enterDuration: number;
291
+ /** Enter animation Y offset in pixels. */
292
+ enterOffset: number;
293
+ };
294
+ export type RowAnimationConfig = BaseRowAnimationConfig & ({
295
+ /** Transition type for layout animations. */
296
+ transitionType: 'bezier';
297
+ /** Bezier duration in seconds. */
298
+ duration: number;
299
+ /** Bezier easing curve as [x1, y1, x2, y2] cubic-bezier control points. */
300
+ bezier: [number, number, number, number];
301
+ } | {
302
+ /** Transition type for layout animations. */
303
+ transitionType: 'spring';
304
+ /** Spring stiffness. */
305
+ stiffness: number;
306
+ /** Spring damping. */
307
+ damping: number;
308
+ /** Spring mass. */
309
+ mass: number;
310
+ });
288
311
  export type DataTableProps<T extends Record<string, unknown>> = {
289
312
  data: T[];
290
313
  columns: ColumnDefinition<T>[];
@@ -376,6 +399,8 @@ export type DataTableProps<T extends Record<string, unknown>> = {
376
399
  onInsertRight?: (field: keyof T) => void;
377
400
  onDeleteColumn?: (field: keyof T) => void;
378
401
  getRowStyle?: (row: T, index: number) => React.CSSProperties;
402
+ enableRowAnimation?: boolean;
403
+ rowAnimationConfig?: RowAnimationConfig;
379
404
  tableBodyHeight?: string | number;
380
405
  mobileColumnsToShow?: number;
381
406
  /**
@@ -429,3 +454,4 @@ export type DataTableProps<T extends Record<string, unknown>> = {
429
454
  }) => void;
430
455
  };
431
456
  };
457
+ export {};
@@ -1,4 +1,4 @@
1
- import { DateRange, CustomRangeConfig } from './types';
1
+ import { DateRange, CustomRangeConfig, CustomDateDisableFunction } from './types';
2
2
  type CalendarGridProps = {
3
3
  selectedRange: DateRange | undefined;
4
4
  onDateSelect: (range: DateRange) => void;
@@ -8,13 +8,16 @@ type CalendarGridProps = {
8
8
  disablePastDates?: boolean;
9
9
  hideFutureDates?: boolean;
10
10
  hidePastDates?: boolean;
11
- customDisableDates?: (date: Date) => boolean;
11
+ customDisableDates?: CustomDateDisableFunction;
12
12
  customRangeConfig?: CustomRangeConfig;
13
13
  showDateTimePicker?: boolean;
14
14
  resetScrollPosition?: number;
15
15
  timezone?: string;
16
16
  isSingleDatePicker?: boolean;
17
17
  maxYearOffset?: number;
18
+ minDate?: Date;
19
+ maxDate?: Date;
20
+ maxRangeDays?: number;
18
21
  };
19
22
  declare const CalendarGrid: import('react').ForwardRefExoticComponent<CalendarGridProps & import('react').RefAttributes<HTMLDivElement>>;
20
23
  export default CalendarGrid;
@@ -169,9 +169,10 @@ export type PresetsConfig = (DateRangePreset | CustomPresetConfig | CustomPreset
169
169
  /**
170
170
  * Function type for custom date disabling logic
171
171
  * @param date The date to check
172
+ * @param currentRange The current in-progress selected range (if any)
172
173
  * @returns true if the date should be disabled, false otherwise
173
174
  */
174
- export type CustomDateDisableFunction = (date: Date) => boolean;
175
+ export type CustomDateDisableFunction = (date: Date, currentRange?: DateRange) => boolean;
175
176
  /**
176
177
  * Function type for custom range calculation
177
178
  * @param selectedDate The date that was selected
@@ -261,6 +262,7 @@ export type DateRangePickerProps = {
261
262
  icon?: ReactNode;
262
263
  minDate?: Date;
263
264
  maxDate?: Date;
265
+ maxRangeDays?: number;
264
266
  dateFormat?: string;
265
267
  allowSingleDateSelection?: boolean;
266
268
  isSingleDatePicker?: boolean;
@@ -207,7 +207,7 @@ export declare const createSingleDateRange: (date: Date, timezone?: string, disa
207
207
  * @param isDoubleClick Whether this is a double-click event
208
208
  * @returns New date range or null if click should be ignored
209
209
  */
210
- export declare const handleCalendarDateClick: (clickedDate: Date, allowSingleDateSelection: boolean | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, isDoubleClick?: boolean, timezone?: string, selectedRange?: DateRange, isSingleDatePicker?: boolean) => DateRange | null;
210
+ export declare const handleCalendarDateClick: (clickedDate: Date, allowSingleDateSelection: boolean | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, isDoubleClick?: boolean, timezone?: string, selectedRange?: DateRange, isSingleDatePicker?: boolean, minDate?: Date, maxDate?: Date, customDisableDates?: (date: Date, currentRange?: DateRange) => boolean, maxRangeDays?: number) => DateRange | null;
211
211
  /**
212
212
  * Generates calendar weeks for a specific month with consistent alignment
213
213
  * @param year The year
@@ -341,7 +341,7 @@ export declare const getScrollToMonth: (monthIndex: number, monthHeight: number)
341
341
  * @param customDisableDates Custom function to disable specific dates
342
342
  * @returns Object with all date states
343
343
  */
344
- export declare const getDateCellStates: (date: Date, selectedRange: DateRange | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, customDisableDates?: (date: Date) => boolean, timezone?: string, isSingleDatePicker?: boolean) => {
344
+ export declare const getDateCellStates: (date: Date, selectedRange: DateRange | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, customDisableDates?: (date: Date, currentRange?: DateRange) => boolean, timezone?: string, isSingleDatePicker?: boolean, minDate?: Date, maxDate?: Date, maxRangeDays?: number) => {
345
345
  isStart: boolean;
346
346
  isEnd: boolean;
347
347
  isRangeDay: boolean;
@@ -525,7 +525,7 @@ export declare const createCalendarMonthData: (year: number, month: number, mont
525
525
  * @param customDisableDates Custom function to disable specific dates
526
526
  * @returns Day cell props
527
527
  */
528
- export declare const calculateDayCellProps: (date: Date, selectedRange: DateRange | undefined, today: Date, disableFutureDates: boolean, disablePastDates: boolean, calendarToken: CalendarTokenType, customDisableDates?: (date: Date) => boolean, timezone?: string, isSingleDatePicker?: boolean) => {
528
+ export declare const calculateDayCellProps: (date: Date, selectedRange: DateRange | undefined, today: Date, disableFutureDates: boolean, disablePastDates: boolean, calendarToken: CalendarTokenType, customDisableDates?: (date: Date, currentRange?: DateRange) => boolean, timezone?: string, isSingleDatePicker?: boolean, minDate?: Date, maxDate?: Date, maxRangeDays?: number) => {
529
529
  dateStates: ReturnType<typeof getDateCellStates>;
530
530
  styles: Record<string, unknown>;
531
531
  textColor: string | unknown;
@@ -771,7 +771,7 @@ export declare const validateCustomRangeConfig: (config: CustomRangeConfig) => {
771
771
  * @param isDoubleClick Whether this is a double-click event
772
772
  * @returns New date range or null if click should be ignored
773
773
  */
774
- export declare const handleCustomRangeCalendarDateClick: (clickedDate: Date, allowSingleDateSelection: boolean | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, customRangeConfig?: CustomRangeConfig, isDoubleClick?: boolean, timezone?: string, selectedRange?: DateRange, isSingleDatePicker?: boolean) => DateRange | null;
774
+ export declare const handleCustomRangeCalendarDateClick: (clickedDate: Date, allowSingleDateSelection: boolean | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, customRangeConfig?: CustomRangeConfig, isDoubleClick?: boolean, timezone?: string, selectedRange?: DateRange, isSingleDatePicker?: boolean, minDate?: Date, maxDate?: Date, customDisableDates?: (date: Date, currentRange?: DateRange) => boolean, maxRangeDays?: number) => DateRange | null;
775
775
  /**
776
776
  * Checks if two dates represent the same calendar day (ignoring time and timezone)
777
777
  */
@@ -804,7 +804,7 @@ export declare const matchesLastMonthPreset: (range: DateRange) => boolean;
804
804
  /**
805
805
  * Robust preset detection that works with both UTC and local timezone dates
806
806
  */
807
- export declare const detectPresetFromRange: (range: DateRange, timezone?: string) => DateRangePreset;
807
+ export declare const detectPresetFromRange: (range: DateRange, timezone?: string, presetConfigs?: CustomPresetConfig[]) => DateRangePreset;
808
808
  /**
809
809
  * Default preset configuration for the DateRangePicker
810
810
  */
@@ -1,6 +1,6 @@
1
1
  import { DirectoryProps } from './types';
2
2
  declare const Directory: {
3
- ({ directoryData: directoryDataProp, idPrefix, activeItem, onActiveItemChange, defaultActiveItem, iconOnlyMode, }: DirectoryProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ directoryData: directoryDataProp, idPrefix, activeItem, onActiveItemChange, defaultActiveItem, iconOnlyMode, showHierarchyLines, hierarchyLineBorderRadius, expandedItems, defaultExpandedItems, onExpandedItemsChange, onItemExpand, enableVirtualization, virtualization, }: DirectoryProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export default Directory;
@@ -17,5 +17,5 @@ type ActiveItemProviderProps = {
17
17
  defaultActiveItem?: string | null;
18
18
  };
19
19
  export declare const ActiveItemProvider: React.FC<ActiveItemProviderProps>;
20
- declare const NavItem: ({ item, index, onNavigate, itemPath, iconOnlyMode, }: NavItemProps) => import("react/jsx-runtime").JSX.Element;
20
+ declare const NavItem: ({ item, index, onNavigate, itemPath, iconOnlyMode, showHierarchyLines, hierarchyLineBorderRadius, isLast, isNested, }: NavItemProps) => import("react/jsx-runtime").JSX.Element;
21
21
  export default NavItem;
@@ -6,5 +6,5 @@ type SectionStateContextValue = {
6
6
  };
7
7
  declare const SectionStateContext: React.Context<SectionStateContextValue | null>;
8
8
  export { SectionStateContext };
9
- declare const Section: ({ section, sectionIndex, onNavigateBetweenSections, idPrefix, iconOnlyMode, }: SectionProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const Section: ({ section, sectionIndex, onNavigateBetweenSections, idPrefix, iconOnlyMode, showHierarchyLines, hierarchyLineBorderRadius, }: SectionProps) => import("react/jsx-runtime").JSX.Element;
10
10
  export default Section;
@@ -0,0 +1,3 @@
1
+ import { DirectoryProps } from './types';
2
+ declare const VirtualizedDirectory: ({ directoryData: directoryDataProp, activeItem: controlledActiveItem, onActiveItemChange, defaultActiveItem, showHierarchyLines, hierarchyLineBorderRadius, expandedItems, defaultExpandedItems, onExpandedItemsChange, onItemExpand, virtualization, }: DirectoryProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default VirtualizedDirectory;
@@ -82,6 +82,13 @@ export type DirectoryTokenType = {
82
82
  color: CSSObject['color'];
83
83
  leftOffset: CSSObject['left'];
84
84
  };
85
+ connector: {
86
+ itemInset: CSSObject['marginLeft'];
87
+ itemPaddingLeft: CSSObject['paddingLeft'];
88
+ elbowTop: CSSObject['top'];
89
+ elbowHeight: CSSObject['height'];
90
+ elbowWidthOffset: CSSObject['width'];
91
+ };
85
92
  };
86
93
  };
87
94
  };
@@ -1,4 +1,14 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, RefObject } from 'react';
2
+ import { CSSObject } from 'styled-components';
3
+ export type DirectoryExpandedItems = Set<string> | string[];
4
+ export type DirectoryVirtualizationConfig = {
5
+ viewportRef?: RefObject<HTMLElement | null>;
6
+ rowHeight?: number;
7
+ sectionHeight?: number;
8
+ viewportHeight?: number;
9
+ overscan?: number;
10
+ threshold?: number;
11
+ };
2
12
  export type DirectoryProps = {
3
13
  directoryData: DirectoryData[] | null;
4
14
  idPrefix?: string;
@@ -6,6 +16,14 @@ export type DirectoryProps = {
6
16
  onActiveItemChange?: (item: string | null) => void;
7
17
  defaultActiveItem?: string | null;
8
18
  iconOnlyMode?: boolean;
19
+ showHierarchyLines?: boolean;
20
+ hierarchyLineBorderRadius?: CSSObject['borderRadius'];
21
+ expandedItems?: DirectoryExpandedItems;
22
+ defaultExpandedItems?: DirectoryExpandedItems;
23
+ onExpandedItemsChange?: (items: string[]) => void;
24
+ onItemExpand?: (item: NavbarItem, itemPath: string) => void | Promise<void>;
25
+ enableVirtualization?: boolean;
26
+ virtualization?: DirectoryVirtualizationConfig;
9
27
  };
10
28
  export type DirectoryData = {
11
29
  label?: string;
@@ -33,6 +51,8 @@ export type SectionProps = {
33
51
  onNavigateBetweenSections: (direction: 'up' | 'down', currentIndex: number) => void;
34
52
  idPrefix?: string;
35
53
  iconOnlyMode?: boolean;
54
+ showHierarchyLines?: boolean;
55
+ hierarchyLineBorderRadius?: CSSObject['borderRadius'];
36
56
  };
37
57
  export type NavItemProps = {
38
58
  item: NavbarItem;
@@ -40,4 +60,21 @@ export type NavItemProps = {
40
60
  onNavigate: (direction: 'up' | 'down', currentIndex: number) => void;
41
61
  itemPath?: string;
42
62
  iconOnlyMode?: boolean;
63
+ showHierarchyLines?: boolean;
64
+ hierarchyLineBorderRadius?: CSSObject['borderRadius'];
65
+ isLast?: boolean;
66
+ isNested?: boolean;
67
+ };
68
+ export type DirectoryFlatRow = {
69
+ type: 'section';
70
+ section: DirectoryData;
71
+ sectionIndex: number;
72
+ } | {
73
+ type: 'item';
74
+ item: NavbarItem;
75
+ sectionIndex: number;
76
+ itemPath: string;
77
+ depth: number;
78
+ isLast: boolean;
79
+ ancestorIsLast: boolean[];
43
80
  };
@@ -1,5 +1,7 @@
1
- import { DirectoryData } from './types';
1
+ import { DirectoryData, DirectoryExpandedItems, DirectoryFlatRow } from './types';
2
2
  export declare const normalizeDirectoryData: (directoryData: DirectoryData[] | null) => DirectoryData[];
3
+ export declare const normalizeExpandedItems: (expandedItems?: DirectoryExpandedItems) => Set<string>;
4
+ export declare const flattenDirectoryData: (directoryData: DirectoryData[], expandedItems: Set<string>, openSections: Set<number>) => DirectoryFlatRow[];
3
5
  export declare const handleSectionNavigation: (direction: "up" | "down", currentIndex: number, totalItems: number, selector?: string, childSelector?: string) => number;
4
6
  export declare const handleKeyDown: (e: React.KeyboardEvent, options: {
5
7
  hasChildren?: boolean;
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use DrawerV2 instead. */
1
2
  export { Drawer, DrawerTrigger, DrawerPortal, DrawerOverlay, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerBody, DrawerFooter, DrawerClose, StatusDrawer, MultiSelectDrawer, SingleSelectDrawer, NestedMultiSelectDrawer, NestedSingleSelectDrawer, } from './Drawer';
2
3
  export * from './types';
3
4
  export type { DrawerTokensType } from './drawer.tokens';
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use MultiValueInputV2 instead. */
1
2
  export { default as MultiValueInput } from './MultiValueInput';
2
3
  export * from './multiValueInput.tokens';
3
4
  export * from './types';
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use NumberInputV2 instead. */
1
2
  export { default as NumberInput } from './NumberInput';
2
3
  export * from './numberInput.tokens';
3
4
  export * from './types';
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use OTPInputV2 instead. */
1
2
  export { default as OTPInput } from './OTPInput';
2
3
  export * from './otpInput.tokens';
3
4
  export * from './types';
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use SearchInputV2 instead. */
1
2
  export { default as SearchInput } from './SearchInput';
2
3
  export * from './searchInput.tokens';
3
4
  export * from './types';
@@ -1,2 +1,3 @@
1
+ /** @deprecated Will be deprecated soon. Use TextAreaV2 instead. */
1
2
  export { default as TextArea } from './TextArea';
2
3
  export * from './types';
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use TextInputV2 instead. */
1
2
  export { default as TextInput } from './TextInput';
2
3
  export * from './textInput.tokens';
3
4
  export * from './types';
@@ -19,11 +19,12 @@ export type TextAreaInputPadding = {
19
19
  * Computes textarea padding from tokens. On small screens when the field has focus or
20
20
  * value, top padding increases and bottom goes to 0 to make room for the floating label.
21
21
  */
22
- export declare function getTextAreaInputPadding({ inputContainer, size, isSmallScreen, inputFocusedOrWithValue, }: {
22
+ export declare function getTextAreaInputPadding({ inputContainer, size, isSmallScreen, inputFocusedOrWithValue, hasLabel, }: {
23
23
  inputContainer: TextAreaV2TokensType['inputContainer'];
24
24
  size: InputSizeV2;
25
25
  isSmallScreen: boolean;
26
26
  inputFocusedOrWithValue: boolean;
27
+ hasLabel: boolean;
27
28
  }): TextAreaInputPadding;
28
29
  /**
29
30
  * Minimum textarea height so the visible area matches `rows` lines of text at the
@@ -9,9 +9,10 @@ export declare const TRANSITION = "border 200ms ease-in-out, box-shadow 200ms ea
9
9
  export declare const getInputState: (error?: {
10
10
  show: boolean;
11
11
  } | null, disabled?: boolean) => InputStateV2;
12
- export declare const getVerticalInputPadding: ({ isSmallScreenWithLargeSize, inputFocusedOrWithValue, paddingTop, paddingBottom, }: {
12
+ export declare const getVerticalInputPadding: ({ isSmallScreenWithLargeSize, inputFocusedOrWithValue, hasLabel, paddingTop, paddingBottom, }: {
13
13
  isSmallScreenWithLargeSize: boolean;
14
14
  inputFocusedOrWithValue: boolean;
15
+ hasLabel: boolean;
15
16
  paddingTop: number;
16
17
  paddingBottom: number;
17
18
  }) => {
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ import { UploadV2TokensType } from './UploadV2.tokens.types';
3
+ import { UploadDragState, UploadFileV2, UploadState } from './UploadV2.types';
4
+ declare const UploadContainerV2: ({ description, descriptionId, slot, disabled, onClick, tokens, files, onFileRemove, multiple, state, errorText, errorId, progressBarValue, progressBarMaxWidth, uploadHeaderText, dragState, maxSize, maxFiles, }: {
5
+ description: string;
6
+ descriptionId?: string;
7
+ slot: React.ReactNode;
8
+ disabled: boolean;
9
+ onClick: () => void;
10
+ tokens: UploadV2TokensType;
11
+ files: UploadFileV2[];
12
+ onFileRemove: (fileId: string) => void;
13
+ multiple: boolean;
14
+ state: UploadState;
15
+ errorText: string;
16
+ errorId?: string;
17
+ progressBarValue: number;
18
+ progressBarMaxWidth: string;
19
+ uploadHeaderText: string;
20
+ dragState: UploadDragState;
21
+ maxSize?: number;
22
+ maxFiles?: number;
23
+ }) => import("react/jsx-runtime").JSX.Element;
24
+ export default UploadContainerV2;
@@ -0,0 +1,31 @@
1
+ import { UploadFileV2, UploadState } from './UploadV2.types';
2
+ import { InputSizeV2 } from '../inputV2.types';
3
+ declare const UploadV2: import('react').ForwardRefExoticComponent<{
4
+ id?: string;
5
+ name?: string;
6
+ label?: string;
7
+ subLabel?: string;
8
+ description?: string;
9
+ size?: InputSizeV2;
10
+ helpIconText?: string;
11
+ required?: boolean;
12
+ multiple?: boolean;
13
+ acceptedFileTypes?: string[];
14
+ disabled?: boolean;
15
+ slot?: React.ReactNode;
16
+ files?: UploadFileV2[];
17
+ onChange?: (files: UploadFileV2[]) => void;
18
+ state?: UploadState;
19
+ error?: {
20
+ show: boolean;
21
+ message?: string;
22
+ };
23
+ errorText?: string;
24
+ hintText?: string;
25
+ maxSize?: number;
26
+ maxFiles?: number;
27
+ progressBarValue?: number;
28
+ progressBarMaxWidth?: string;
29
+ uploadHeaderText?: string;
30
+ } & Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "size" | "style" | "multiple" | "className" | "slot" | "onChange"> & import('react').RefAttributes<HTMLInputElement>>;
31
+ export default UploadV2;
@@ -0,0 +1,3 @@
1
+ import { FoundationTokenType } from '../../../tokens/theme.token';
2
+ import { ResponsiveUploadV2Tokens } from './UploadV2.tokens.types';
3
+ export declare const getUploadV2DarkTokens: (foundationTokens: FoundationTokenType) => ResponsiveUploadV2Tokens;
@@ -0,0 +1,3 @@
1
+ import { FoundationTokenType } from '../../../tokens/theme.token';
2
+ import { ResponsiveUploadV2Tokens } from './UploadV2.tokens.types';
3
+ export declare const getUploadV2LightTokens: (foundationTokens: FoundationTokenType) => ResponsiveUploadV2Tokens;
@@ -0,0 +1,5 @@
1
+ import { FoundationTokenType } from '../../../tokens/theme.token';
2
+ import { Theme } from '../../../context/theme.enum';
3
+ import { ResponsiveUploadV2Tokens } from './UploadV2.tokens.types';
4
+ export type { UploadV2TokensType, ResponsiveUploadV2Tokens, } from './UploadV2.tokens.types';
5
+ export declare const getUploadV2Tokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveUploadV2Tokens;
@@ -0,0 +1,115 @@
1
+ import { CSSObject } from 'styled-components';
2
+ import { InputSizeV2, InputStateV2 } from '../inputV2.types';
3
+ import { BreakpointType } from '../../../breakpoints/breakPoints';
4
+ import { UploadDragState, UploadState } from './UploadV2.types';
5
+ export type UploadV2TokensType = {
6
+ gap: CSSObject['gap'];
7
+ topContainer: {
8
+ label: {
9
+ fontSize: {
10
+ [key in InputSizeV2]: CSSObject['fontSize'];
11
+ };
12
+ fontWeight: {
13
+ [key in InputSizeV2]: CSSObject['fontWeight'];
14
+ };
15
+ lineHeight: {
16
+ [key in InputSizeV2]: CSSObject['lineHeight'];
17
+ };
18
+ color: {
19
+ [key in InputStateV2]: CSSObject['color'];
20
+ };
21
+ };
22
+ subLabel: {
23
+ fontSize: {
24
+ [key in InputSizeV2]: CSSObject['fontSize'];
25
+ };
26
+ fontWeight: {
27
+ [key in InputSizeV2]: CSSObject['fontWeight'];
28
+ };
29
+ lineHeight: {
30
+ [key in InputSizeV2]: CSSObject['lineHeight'];
31
+ };
32
+ color: {
33
+ [key in InputStateV2]: CSSObject['color'];
34
+ };
35
+ };
36
+ required: {
37
+ color: CSSObject['color'];
38
+ };
39
+ helpIcon: {
40
+ width: {
41
+ [key in InputSizeV2]: CSSObject['width'];
42
+ };
43
+ color: {
44
+ [key in InputStateV2]: CSSObject['color'];
45
+ };
46
+ };
47
+ };
48
+ uploadContainer: {
49
+ gap: CSSObject['gap'];
50
+ paddingTop: CSSObject['paddingTop'];
51
+ paddingBottom: CSSObject['paddingBottom'];
52
+ paddingLeft: CSSObject['paddingLeft'];
53
+ paddingRight: CSSObject['paddingRight'];
54
+ borderRadius: CSSObject['borderRadius'];
55
+ border: {
56
+ [key in UploadState | UploadDragState]: CSSObject['border'];
57
+ };
58
+ backgroundColor: {
59
+ [key in UploadState | UploadDragState]: CSSObject['backgroundColor'];
60
+ };
61
+ header: {
62
+ gap: CSSObject['gap'];
63
+ title: {
64
+ fontSize: CSSObject['fontSize'];
65
+ fontWeight: CSSObject['fontWeight'];
66
+ color: CSSObject['color'];
67
+ };
68
+ description: {
69
+ fontSize: CSSObject['fontSize'];
70
+ fontWeight: CSSObject['fontWeight'];
71
+ color: CSSObject['color'];
72
+ };
73
+ errorText: {
74
+ fontSize: CSSObject['fontSize'];
75
+ fontWeight: CSSObject['fontWeight'];
76
+ color: CSSObject['color'];
77
+ };
78
+ };
79
+ fileTag: {
80
+ maxWidth: CSSObject['maxWidth'];
81
+ gap: CSSObject['gap'];
82
+ };
83
+ };
84
+ bottomContainer: {
85
+ hintText: {
86
+ fontSize: {
87
+ [key in InputSizeV2]: CSSObject['fontSize'];
88
+ };
89
+ fontWeight: {
90
+ [key in InputSizeV2]: CSSObject['fontWeight'];
91
+ };
92
+ lineHeight: {
93
+ [key in InputSizeV2]: CSSObject['lineHeight'];
94
+ };
95
+ color: {
96
+ [key in InputStateV2]: CSSObject['color'];
97
+ };
98
+ };
99
+ errorMessage: {
100
+ fontSize: {
101
+ [key in InputSizeV2]: CSSObject['fontSize'];
102
+ };
103
+ fontWeight: {
104
+ [key in InputSizeV2]: CSSObject['fontWeight'];
105
+ };
106
+ lineHeight: {
107
+ [key in InputSizeV2]: CSSObject['lineHeight'];
108
+ };
109
+ color: CSSObject['color'];
110
+ };
111
+ };
112
+ };
113
+ export type ResponsiveUploadV2Tokens = {
114
+ [key in keyof BreakpointType]: UploadV2TokensType;
115
+ };
@@ -0,0 +1,56 @@
1
+ import { InputSizeV2 } from '../inputV2.types';
2
+ export declare enum UploadState {
3
+ IDLE = "idle",
4
+ UPLOADING = "uploading",
5
+ SUCCESS = "success",
6
+ ERROR = "error",
7
+ DISABLED = "disabled"
8
+ }
9
+ export declare enum UploadDragState {
10
+ DRAG_ENTER = "drag_enter",
11
+ DRAG_LEAVE = "drag_leave",
12
+ DRAG_OVER = "drag_over",
13
+ DROP = "drop"
14
+ }
15
+ export declare const UploadErrorReason: {
16
+ readonly OVERSIZED: "oversized";
17
+ readonly MAX_FILES: "maxFiles";
18
+ readonly INVALID_TYPE: "invalidType";
19
+ };
20
+ export type UploadErrorReasonValue = (typeof UploadErrorReason)[keyof typeof UploadErrorReason];
21
+ export type UploadFileV2 = {
22
+ id?: string;
23
+ file: File;
24
+ isValid: boolean;
25
+ errorReason?: UploadErrorReasonValue;
26
+ };
27
+ export type UploadV2Props = {
28
+ id?: string;
29
+ name?: string;
30
+ label?: string;
31
+ subLabel?: string;
32
+ description?: string;
33
+ size?: InputSizeV2;
34
+ helpIconText?: string;
35
+ required?: boolean;
36
+ multiple?: boolean;
37
+ /** File types to accept (e.g., ['.jpg', '.png', 'image/*', '.pdf']) */
38
+ acceptedFileTypes?: string[];
39
+ disabled?: boolean;
40
+ slot?: React.ReactNode;
41
+ files?: UploadFileV2[];
42
+ /** Callback when files are selected or changed */
43
+ onChange?: (files: UploadFileV2[]) => void;
44
+ state?: UploadState;
45
+ error?: {
46
+ show: boolean;
47
+ message?: string;
48
+ };
49
+ errorText?: string;
50
+ hintText?: string;
51
+ maxSize?: number;
52
+ maxFiles?: number;
53
+ progressBarValue?: number;
54
+ progressBarMaxWidth?: string;
55
+ uploadHeaderText?: string;
56
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'style' | 'className' | 'multiple' | 'slot' | 'onChange'>;
@@ -0,0 +1,3 @@
1
+ export { default as UploadV2 } from './UploadV2';
2
+ export * from './UploadV2.types';
3
+ export * from './UploadV2.tokens';
@@ -0,0 +1,32 @@
1
+ import { UploadFileV2 } from './UploadV2.types';
2
+ export declare const FILE_NAME_TAG_MAX_LEN = 24;
3
+ export declare const createClickHandler: (disabled: boolean, fileInputRef: React.RefObject<HTMLInputElement>) => () => void;
4
+ export declare const useUploadState: () => {
5
+ internalDragState: {
6
+ isDragActive: boolean;
7
+ isDragAccept: boolean;
8
+ isDragReject: boolean;
9
+ };
10
+ setInternalDragState: import('react').Dispatch<import('react').SetStateAction<{
11
+ isDragActive: boolean;
12
+ isDragAccept: boolean;
13
+ isDragReject: boolean;
14
+ }>>;
15
+ setDragCounter: import('react').Dispatch<import('react').SetStateAction<number>>;
16
+ };
17
+ export declare const createDragHandlers: (disabled: boolean, setDragCounter: (fn: (prev: number) => number) => void, updateDragStateFn: (isDragActive: boolean, files?: File[]) => void, processFilesFn: (files: FileList) => void) => {
18
+ handleDragEnter: (e: React.DragEvent) => void;
19
+ handleDragLeave: (e: React.DragEvent) => void;
20
+ handleDragOver: (e: React.DragEvent) => void;
21
+ handleDrop: (e: React.DragEvent) => void;
22
+ };
23
+ export declare const truncateFileNameForTag: (name: string) => string;
24
+ export declare const getFileId: (uploadFile: UploadFileV2, index: number) => string;
25
+ export declare const isFileTypeAccepted: (file: File, acceptedFileTypes: string[]) => boolean;
26
+ declare const KNOWN_UPLOAD_ERROR_REASONS: readonly ["oversized", "maxFiles", "invalidType"];
27
+ type KnownUploadErrorReason = (typeof KNOWN_UPLOAD_ERROR_REASONS)[number];
28
+ export declare const formatFileSize: (sizeInBytes: number) => string;
29
+ export declare const isKnownUploadErrorReason: (reason: unknown) => reason is KnownUploadErrorReason;
30
+ export declare const normalizeUploadErrorReason: (reason: unknown) => "oversized" | "maxFiles" | "invalidType" | undefined;
31
+ export declare const getValidationMessage: (reason?: unknown, maxSize?: number, maxFiles?: number) => string;
32
+ export {};
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use KeyValuePairV2 instead. */
1
2
  export { default as KeyValuePair } from './KeyValuePair';
2
3
  export * from './KeyValuePair.tokens';
3
4
  export * from './types';
@@ -2,7 +2,7 @@ import { CSSObject } from 'styled-components';
2
2
  import { MenuProps } from './types';
3
3
  export declare const contentBaseStyle: CSSObject;
4
4
  declare const Menu: {
5
- ({ trigger, items, asModal, alignment, side, sideOffset, alignOffset, collisonBoundaryRef, maxHeight, enableSearch, searchPlaceholder, minWidth, maxWidth, open, onOpenChange, enableVirtualScrolling, virtualItemHeight, virtualOverscan, virtualScrollThreshold, skeleton, }: MenuProps): import("react/jsx-runtime").JSX.Element;
5
+ ({ trigger, items, asModal, alignment, side, sideOffset, alignOffset, collisonBoundaryRef, maxHeight, enableSearch, searchPlaceholder, searchSortFn, onEnter, minWidth, maxWidth, open, onOpenChange, enableVirtualScrolling, virtualItemHeight, virtualOverscan, virtualScrollThreshold, skeleton, }: MenuProps): import("react/jsx-runtime").JSX.Element;
6
6
  displayName: string;
7
7
  };
8
8
  export default Menu;
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be deprecated soon. Use MenuV2 instead. */
1
2
  export { default as Menu } from './Menu';
2
3
  export * from './menu.tokens';
3
4
  export * from './types';