@juspay/blend-design-system 0.0.1

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 (256) hide show
  1. package/README.md +177 -0
  2. package/dist/assets/main.css +1 -0
  3. package/dist/breakpoints/breakPoints.d.ts +5 -0
  4. package/dist/components/Accordion/Accordion.d.ts +4 -0
  5. package/dist/components/Accordion/AccordionItem.d.ts +6 -0
  6. package/dist/components/Accordion/accordion.tokens.d.ts +49 -0
  7. package/dist/components/Accordion/index.d.ts +3 -0
  8. package/dist/components/Accordion/types.d.ts +29 -0
  9. package/dist/components/Alert/Alert.d.ts +4 -0
  10. package/dist/components/Alert/alert.tokens.d.ts +25 -0
  11. package/dist/components/Alert/index.d.ts +2 -0
  12. package/dist/components/Alert/types.d.ts +33 -0
  13. package/dist/components/Avatar/Avatar.d.ts +12 -0
  14. package/dist/components/Avatar/StyledAvatar.d.ts +8 -0
  15. package/dist/components/Avatar/avatarUtils.d.ts +7 -0
  16. package/dist/components/Avatar/index.d.ts +2 -0
  17. package/dist/components/Avatar/token.d.ts +71 -0
  18. package/dist/components/Avatar/types.d.ts +29 -0
  19. package/dist/components/AvatarGroup/AvatarGroup.d.ts +11 -0
  20. package/dist/components/AvatarGroup/StyledAvatarGroup.d.ts +6 -0
  21. package/dist/components/AvatarGroup/avatarGroupUtils.d.ts +24 -0
  22. package/dist/components/AvatarGroup/index.d.ts +2 -0
  23. package/dist/components/AvatarGroup/token.d.ts +89 -0
  24. package/dist/components/AvatarGroup/types.d.ts +29 -0
  25. package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
  26. package/dist/components/Breadcrumb/breadcrumb.tokens.d.ts +31 -0
  27. package/dist/components/Breadcrumb/index.d.ts +2 -0
  28. package/dist/components/Breadcrumb/types.d.ts +6 -0
  29. package/dist/components/Button/Button.d.ts +18 -0
  30. package/dist/components/Button/button.tokens.d.ts +61 -0
  31. package/dist/components/Button/index.d.ts +2 -0
  32. package/dist/components/Button/types.d.ts +34 -0
  33. package/dist/components/ButtonGroup/ButtonGroup.d.ts +4 -0
  34. package/dist/components/ButtonGroup/index.d.ts +2 -0
  35. package/dist/components/ButtonGroup/types.d.ts +6 -0
  36. package/dist/components/Charts/ChartHeader.d.ts +2 -0
  37. package/dist/components/Charts/ChartLegend.d.ts +3 -0
  38. package/dist/components/Charts/ChartUtils.d.ts +5 -0
  39. package/dist/components/Charts/Charts.d.ts +3 -0
  40. package/dist/components/Charts/CustomTooltip.d.ts +2 -0
  41. package/dist/components/Charts/index.d.ts +2 -0
  42. package/dist/components/Charts/renderChart.d.ts +2 -0
  43. package/dist/components/Charts/types.d.ts +83 -0
  44. package/dist/components/Charts/utils.d.ts +1 -0
  45. package/dist/components/Checkbox/Checkbox.d.ts +3 -0
  46. package/dist/components/Checkbox/StyledCheckbox.d.ts +11 -0
  47. package/dist/components/Checkbox/checkbox.token.d.ts +96 -0
  48. package/dist/components/Checkbox/checkboxUtils.d.ts +68 -0
  49. package/dist/components/Checkbox/index.d.ts +2 -0
  50. package/dist/components/Checkbox/types.d.ts +21 -0
  51. package/dist/components/DataTable/ColumnFilter/index.d.ts +9 -0
  52. package/dist/components/DataTable/ColumnManager.d.ts +5 -0
  53. package/dist/components/DataTable/DataTable.d.ts +3 -0
  54. package/dist/components/DataTable/DataTable.stories.d.ts +16 -0
  55. package/dist/components/DataTable/DataTableHeader/index.d.ts +3 -0
  56. package/dist/components/DataTable/DataTableHeader/types.d.ts +20 -0
  57. package/dist/components/DataTable/DataTablePagination.d.ts +11 -0
  58. package/dist/components/DataTable/TableBody/BulkActionBar.d.ts +8 -0
  59. package/dist/components/DataTable/TableBody/index.d.ts +4 -0
  60. package/dist/components/DataTable/TableBody/types.d.ts +32 -0
  61. package/dist/components/DataTable/TableCell/index.d.ts +3 -0
  62. package/dist/components/DataTable/TableCell/types.d.ts +12 -0
  63. package/dist/components/DataTable/TableFooter/index.d.ts +3 -0
  64. package/dist/components/DataTable/TableFooter/types.d.ts +10 -0
  65. package/dist/components/DataTable/TableHeader/FilterComponents.d.ts +59 -0
  66. package/dist/components/DataTable/TableHeader/handlers.d.ts +28 -0
  67. package/dist/components/DataTable/TableHeader/index.d.ts +3 -0
  68. package/dist/components/DataTable/TableHeader/types.d.ts +21 -0
  69. package/dist/components/DataTable/TableHeader/utils.d.ts +29 -0
  70. package/dist/components/DataTable/columnTypes.d.ts +87 -0
  71. package/dist/components/DataTable/dataTable.tokens.d.ts +174 -0
  72. package/dist/components/DataTable/index.d.ts +10 -0
  73. package/dist/components/DataTable/types.d.ts +230 -0
  74. package/dist/components/DataTable/utils.d.ts +52 -0
  75. package/dist/components/DateRangePicker/CalendarGrid.d.ts +11 -0
  76. package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
  77. package/dist/components/DateRangePicker/QuickRangeSelector.d.ts +13 -0
  78. package/dist/components/DateRangePicker/TimeSelector.d.ts +7 -0
  79. package/dist/components/DateRangePicker/dateRangePicker.tokens.d.ts +188 -0
  80. package/dist/components/DateRangePicker/index.d.ts +2 -0
  81. package/dist/components/DateRangePicker/types.d.ts +38 -0
  82. package/dist/components/DateRangePicker/utils.d.ts +470 -0
  83. package/dist/components/Directory/Directory.d.ts +6 -0
  84. package/dist/components/Directory/NavItem.d.ts +7 -0
  85. package/dist/components/Directory/Section.d.ts +3 -0
  86. package/dist/components/Directory/index.d.ts +2 -0
  87. package/dist/components/Directory/types.d.ts +29 -0
  88. package/dist/components/Directory/utils.d.ts +9 -0
  89. package/dist/components/Drawer/Drawer.d.ts +6 -0
  90. package/dist/components/Drawer/components/DrawerBase.d.ts +30 -0
  91. package/dist/components/Drawer/components/NestedSelectDrawer.d.ts +72 -0
  92. package/dist/components/Drawer/components/SelectDrawer.d.ts +9 -0
  93. package/dist/components/Drawer/components/StatusDrawer.d.ts +5 -0
  94. package/dist/components/Drawer/drawer.tokens.d.ts +60 -0
  95. package/dist/components/Drawer/index.d.ts +3 -0
  96. package/dist/components/Drawer/types.d.ts +384 -0
  97. package/dist/components/Dropdown/Dropdown.d.ts +9 -0
  98. package/dist/components/GradientBlur/GradientBlur.d.ts +2 -0
  99. package/dist/components/Inputs/DropdownInput/DropdownInput.d.ts +3 -0
  100. package/dist/components/Inputs/DropdownInput/dropdownInput.tokens.d.ts +33 -0
  101. package/dist/components/Inputs/DropdownInput/index.d.ts +2 -0
  102. package/dist/components/Inputs/DropdownInput/types.d.ts +31 -0
  103. package/dist/components/Inputs/MultiValueInput/MultiValueInput.d.ts +3 -0
  104. package/dist/components/Inputs/MultiValueInput/index.d.ts +2 -0
  105. package/dist/components/Inputs/MultiValueInput/multiValueInput.tokens.d.ts +33 -0
  106. package/dist/components/Inputs/MultiValueInput/types.d.ts +25 -0
  107. package/dist/components/Inputs/NumberInput/NumberInput.d.ts +3 -0
  108. package/dist/components/Inputs/NumberInput/index.d.ts +2 -0
  109. package/dist/components/Inputs/NumberInput/numberInput.tokens.d.ts +44 -0
  110. package/dist/components/Inputs/NumberInput/types.d.ts +16 -0
  111. package/dist/components/Inputs/OTPInput/OTPInput.d.ts +3 -0
  112. package/dist/components/Inputs/OTPInput/index.d.ts +2 -0
  113. package/dist/components/Inputs/OTPInput/otpInput.tokens.d.ts +34 -0
  114. package/dist/components/Inputs/OTPInput/types.d.ts +11 -0
  115. package/dist/components/Inputs/SearchInput/SearchInput.d.ts +3 -0
  116. package/dist/components/Inputs/SearchInput/index.d.ts +2 -0
  117. package/dist/components/Inputs/SearchInput/searchInput.tokens.d.ts +41 -0
  118. package/dist/components/Inputs/SearchInput/types.d.ts +7 -0
  119. package/dist/components/Inputs/TextArea/TextArea.d.ts +3 -0
  120. package/dist/components/Inputs/TextArea/index.d.ts +2 -0
  121. package/dist/components/Inputs/TextArea/textarea.token.d.ts +27 -0
  122. package/dist/components/Inputs/TextArea/types.d.ts +22 -0
  123. package/dist/components/Inputs/TextInput/TextInput.d.ts +3 -0
  124. package/dist/components/Inputs/TextInput/index.d.ts +2 -0
  125. package/dist/components/Inputs/TextInput/textInput.tokens.d.ts +33 -0
  126. package/dist/components/Inputs/TextInput/types.d.ts +24 -0
  127. package/dist/components/Inputs/UnitInput/UnitInput.d.ts +3 -0
  128. package/dist/components/Inputs/UnitInput/index.d.ts +2 -0
  129. package/dist/components/Inputs/UnitInput/types.d.ts +25 -0
  130. package/dist/components/Inputs/UnitInput/unitInput.tokens.d.ts +40 -0
  131. package/dist/components/Inputs/index.d.ts +8 -0
  132. package/dist/components/Inputs/utils/InputFooter/InputFooter.d.ts +8 -0
  133. package/dist/components/Inputs/utils/InputLabels/InputLabels.d.ts +18 -0
  134. package/dist/components/Menu/Menu.d.ts +8 -0
  135. package/dist/components/Menu/MenuGroupLabel.d.ts +3 -0
  136. package/dist/components/Menu/MenuItem.d.ts +9 -0
  137. package/dist/components/Menu/MenuPlayground.d.ts +3 -0
  138. package/dist/components/Menu/MenuPlaygroundComprehensive.d.ts +3 -0
  139. package/dist/components/Menu/SubMenu.d.ts +5 -0
  140. package/dist/components/Menu/index.d.ts +2 -0
  141. package/dist/components/Menu/menu.styles.d.ts +2 -0
  142. package/dist/components/Menu/menu.tokens.d.ts +100 -0
  143. package/dist/components/Menu/types.d.ts +55 -0
  144. package/dist/components/Menu/utils.d.ts +3 -0
  145. package/dist/components/Modal/Modal.d.ts +3 -0
  146. package/dist/components/Modal/index.d.ts +2 -0
  147. package/dist/components/Modal/modal.tokens.d.ts +48 -0
  148. package/dist/components/Modal/types.d.ts +22 -0
  149. package/dist/components/MultiSelect/MultiSelect.d.ts +3 -0
  150. package/dist/components/MultiSelect/MultiSelectMenu.d.ts +3 -0
  151. package/dist/components/MultiSelect/MultiSelectMenuItem.d.ts +10 -0
  152. package/dist/components/MultiSelect/MultiSelectSubMenu.d.ts +10 -0
  153. package/dist/components/MultiSelect/SelectAllItem.d.ts +8 -0
  154. package/dist/components/MultiSelect/index.d.ts +2 -0
  155. package/dist/components/MultiSelect/multiSelect.tokens.d.ts +77 -0
  156. package/dist/components/MultiSelect/types.d.ts +92 -0
  157. package/dist/components/MultiSelect/utils.d.ts +11 -0
  158. package/dist/components/Popover/Popover.d.ts +6 -0
  159. package/dist/components/Popover/PopoverFooter.d.ts +6 -0
  160. package/dist/components/Popover/PopoverHeader.d.ts +6 -0
  161. package/dist/components/Popover/index.d.ts +2 -0
  162. package/dist/components/Popover/popover.tokens.d.ts +40 -0
  163. package/dist/components/Popover/types.d.ts +31 -0
  164. package/dist/components/Primitives/Block/Block.d.ts +189 -0
  165. package/dist/components/Primitives/PrimitiveButton/PrimitiveButton.d.ts +131 -0
  166. package/dist/components/Primitives/PrimitiveInput/PrimitiveInput.d.ts +91 -0
  167. package/dist/components/Primitives/PrimitiveLink.d.ts +58 -0
  168. package/dist/components/Primitives/PrimitiveText/PrimitiveText.d.ts +39 -0
  169. package/dist/components/Primitives/PrimitiveTextArea.d.ts +88 -0
  170. package/dist/components/ProgressBar/ProgressBar.d.ts +4 -0
  171. package/dist/components/ProgressBar/index.d.ts +3 -0
  172. package/dist/components/ProgressBar/progressbar.tokens.d.ts +63 -0
  173. package/dist/components/ProgressBar/types.d.ts +22 -0
  174. package/dist/components/ProgressBar/utils.d.ts +7 -0
  175. package/dist/components/Radio/Radio.d.ts +6 -0
  176. package/dist/components/Radio/RadioGroup.d.ts +4 -0
  177. package/dist/components/Radio/StyledRadio.d.ts +7 -0
  178. package/dist/components/Radio/index.d.ts +4 -0
  179. package/dist/components/Radio/radio.token.d.ts +75 -0
  180. package/dist/components/Radio/types.d.ts +30 -0
  181. package/dist/components/Radio/utils.d.ts +47 -0
  182. package/dist/components/Select/Select.d.ts +25 -0
  183. package/dist/components/Select/SelectMenu.d.ts +3 -0
  184. package/dist/components/Select/index.d.ts +2 -0
  185. package/dist/components/Select/select.token.d.ts +40 -0
  186. package/dist/components/Select/types.d.ts +55 -0
  187. package/dist/components/Sidebar/Sidebar.d.ts +4 -0
  188. package/dist/components/Sidebar/index.d.ts +2 -0
  189. package/dist/components/Sidebar/types.d.ts +44 -0
  190. package/dist/components/SingleSelect/SingleSelect.d.ts +3 -0
  191. package/dist/components/SingleSelect/SingleSelectMenu.d.ts +21 -0
  192. package/dist/components/SingleSelect/index.d.ts +2 -0
  193. package/dist/components/SingleSelect/types.d.ts +26 -0
  194. package/dist/components/Slider/Slider.d.ts +5 -0
  195. package/dist/components/Slider/index.d.ts +3 -0
  196. package/dist/components/Slider/types.d.ts +30 -0
  197. package/dist/components/Slider/utils.d.ts +49 -0
  198. package/dist/components/Snackbar/Snackbar.d.ts +4 -0
  199. package/dist/components/Snackbar/index.d.ts +3 -0
  200. package/dist/components/Snackbar/snackbar.tokens.d.ts +52 -0
  201. package/dist/components/Snackbar/types.d.ts +26 -0
  202. package/dist/components/SplitTag/SplitTag.d.ts +6 -0
  203. package/dist/components/SplitTag/index.d.ts +2 -0
  204. package/dist/components/SplitTag/types.d.ts +16 -0
  205. package/dist/components/StatCard/StatCard.d.ts +6 -0
  206. package/dist/components/StatCard/index.d.ts +2 -0
  207. package/dist/components/StatCard/statcard.tokens.d.ts +145 -0
  208. package/dist/components/StatCard/types.d.ts +32 -0
  209. package/dist/components/Switch/StyledSwitch.d.ts +11 -0
  210. package/dist/components/Switch/Switch.d.ts +5 -0
  211. package/dist/components/Switch/SwitchGroup.d.ts +4 -0
  212. package/dist/components/Switch/index.d.ts +4 -0
  213. package/dist/components/Switch/switch.token.d.ts +112 -0
  214. package/dist/components/Switch/types.d.ts +30 -0
  215. package/dist/components/Switch/utils.d.ts +58 -0
  216. package/dist/components/Tabs/StyledTabs.d.ts +22 -0
  217. package/dist/components/Tabs/Tabs.d.ts +5 -0
  218. package/dist/components/Tabs/TabsContent.d.ts +2 -0
  219. package/dist/components/Tabs/TabsList.d.ts +8 -0
  220. package/dist/components/Tabs/TabsTrigger.d.ts +10 -0
  221. package/dist/components/Tabs/index.d.ts +6 -0
  222. package/dist/components/Tabs/tabs.token.d.ts +60 -0
  223. package/dist/components/Tabs/types.d.ts +34 -0
  224. package/dist/components/Tags/Tags.d.ts +3 -0
  225. package/dist/components/Tags/index.d.ts +2 -0
  226. package/dist/components/Tags/tag.tokens.d.ts +57 -0
  227. package/dist/components/Tags/types.d.ts +35 -0
  228. package/dist/components/Text/Text.d.ts +12 -0
  229. package/dist/components/Tooltip/Tooltip.d.ts +3 -0
  230. package/dist/components/Tooltip/index.d.ts +2 -0
  231. package/dist/components/Tooltip/tooltip.tokens.d.ts +31 -0
  232. package/dist/components/Tooltip/types.d.ts +33 -0
  233. package/dist/context/ThemeContext.d.ts +66 -0
  234. package/dist/context/ThemeProvider.d.ts +11 -0
  235. package/dist/context/index.d.ts +4 -0
  236. package/dist/context/initComponentTokens.d.ts +4 -0
  237. package/dist/context/useComponentToken.d.ts +29 -0
  238. package/dist/foundationToken.d.ts +214 -0
  239. package/dist/hooks/index.d.ts +2 -0
  240. package/dist/hooks/useBreakPoints.d.ts +4 -0
  241. package/dist/hooks/useClickOutside.d.ts +3 -0
  242. package/dist/hooks/useDebounce.d.ts +1 -0
  243. package/dist/hooks/useResizeObserver.d.ts +1 -0
  244. package/dist/hooks/useResponsiveTokens.d.ts +2 -0
  245. package/dist/hooks/useScrollLock.d.ts +2 -0
  246. package/dist/main.d.ts +34 -0
  247. package/dist/main.js +50499 -0
  248. package/dist/tokens/border.tokens.d.ts +29 -0
  249. package/dist/tokens/color.tokens.d.ts +16 -0
  250. package/dist/tokens/font.tokens.d.ts +72 -0
  251. package/dist/tokens/index.d.ts +2 -0
  252. package/dist/tokens/opacity.tokens.d.ts +18 -0
  253. package/dist/tokens/shadows.tokens.d.ts +15 -0
  254. package/dist/tokens/theme.token.d.ts +16 -0
  255. package/dist/tokens/unit.tokens.d.ts +34 -0
  256. package/package.json +99 -0
@@ -0,0 +1,470 @@
1
+ import { DateRange, DateRangePreset } from './types';
2
+ import { CalendarTokenType } from './dateRangePicker.tokens';
3
+ /**
4
+ * Formats a date according to the specified format
5
+ * @param date The date to format
6
+ * @param format The format string (e.g., "dd/MM/yyyy")
7
+ * @returns The formatted date string or empty string if date is invalid
8
+ */
9
+ export declare const formatDate: (date: Date, format: string) => string;
10
+ /**
11
+ * Parses a date string according to the specified format
12
+ * @param dateString The date string to parse
13
+ * @param format The format string
14
+ * @returns The parsed date or null if invalid
15
+ */
16
+ export declare const parseDate: (dateString: string, format: string) => Date | null;
17
+ /**
18
+ * Checks if a date is valid
19
+ * @param date The date to check
20
+ * @returns True if the date is valid
21
+ */
22
+ export declare const isValidDate: (date: Date) => boolean;
23
+ /**
24
+ * Formats time in 12-hour format
25
+ * @param date The date to format
26
+ * @returns The formatted time string
27
+ */
28
+ export declare const formatTimeIn12Hour: (date: Date) => string;
29
+ /**
30
+ * Formats a date range for display
31
+ * @param range The date range to format
32
+ * @param showTime Whether to include time in the formatted string
33
+ * @returns The formatted date range string
34
+ */
35
+ export declare const formatDateRange: (range: DateRange, showTime?: boolean) => string;
36
+ /**
37
+ * Gets a date range based on a preset
38
+ * @param preset The preset to get the range for
39
+ * @returns The date range for the preset
40
+ */
41
+ export declare const getPresetDateRange: (preset: DateRangePreset) => DateRange;
42
+ /**
43
+ * Gets a label for a preset
44
+ * @param preset The preset to get the label for
45
+ * @returns The label for the preset
46
+ */
47
+ export declare const getPresetLabel: (preset: DateRangePreset) => string;
48
+ /**
49
+ * Formats time string to HH:MM format
50
+ * @param time The time string to format
51
+ * @returns The formatted time string
52
+ */
53
+ export declare const formatTime: (time: string) => string;
54
+ /**
55
+ * Validates a time string
56
+ * @param time The time string to validate
57
+ * @returns True if the time is valid
58
+ */
59
+ export declare const isValidTime: (time: string) => boolean;
60
+ /**
61
+ * Converts a date to string with optional time
62
+ * @param date The date to convert
63
+ * @param includeTime Whether to include time
64
+ * @param timeFormat The time format to use
65
+ * @returns The formatted date string
66
+ */
67
+ export declare const dateToString: (date: Date, includeTime?: boolean, timeFormat?: string) => string;
68
+ /**
69
+ * Checks if two dates are the same day
70
+ * @param date1 First date
71
+ * @param date2 Second date
72
+ * @returns True if dates are the same day
73
+ */
74
+ export declare const isSameDay: (date1: Date, date2: Date) => boolean;
75
+ /**
76
+ * Checks if a date is within a range
77
+ * @param date The date to check
78
+ * @param startDate Range start date
79
+ * @param endDate Range end date
80
+ * @returns True if date is in range
81
+ */
82
+ export declare const isDateInRange: (date: Date, startDate: Date, endDate: Date) => boolean;
83
+ /**
84
+ * Gets the number of days in a month
85
+ * @param year The year
86
+ * @param month The month (0-based)
87
+ * @returns The number of days in the month
88
+ */
89
+ export declare const getDaysInMonth: (year: number, month: number) => number;
90
+ /**
91
+ * Gets the first day of the month (0 = Sunday)
92
+ * @param year The year
93
+ * @param month The month (0-based)
94
+ * @returns The day of the week (0-6)
95
+ */
96
+ export declare const getFirstDayOfMonth: (year: number, month: number) => number;
97
+ /**
98
+ * Generates a calendar grid for a month
99
+ * @param year The year
100
+ * @param month The month (0-based)
101
+ * @returns Array of weeks, each containing day numbers or null for empty cells
102
+ */
103
+ export declare const generateCalendarGrid: (year: number, month: number) => (number | null)[][];
104
+ /**
105
+ * Checks if a date is the start date of a range
106
+ * @param date The date to check
107
+ * @param selectedRange The selected date range
108
+ * @returns True if the date is the start date
109
+ */
110
+ export declare const isStartDate: (date: Date, selectedRange: DateRange) => boolean;
111
+ /**
112
+ * Checks if a date is the end date of a range
113
+ * @param date The date to check
114
+ * @param selectedRange The selected date range
115
+ * @returns True if the date is the end date
116
+ */
117
+ export declare const isEndDate: (date: Date, selectedRange: DateRange) => boolean;
118
+ /**
119
+ * Checks if a date is within a selected range (not including start/end)
120
+ * @param date The date to check
121
+ * @param selectedRange The selected date range
122
+ * @returns True if the date is in the range
123
+ */
124
+ export declare const isInSelectedRange: (date: Date, selectedRange: DateRange) => boolean;
125
+ /**
126
+ * Checks if a date is today
127
+ * @param date The date to check
128
+ * @param today Today's date
129
+ * @returns True if the date is today
130
+ */
131
+ export declare const isDateToday: (date: Date, today: Date) => boolean;
132
+ /**
133
+ * Handles date click logic for calendar
134
+ * @param clickedDate The date that was clicked
135
+ * @param selectedRange Current selected range
136
+ * @param allowSingleDateSelection Whether single date selection is allowed
137
+ * @param today Today's date for validation
138
+ * @param disableFutureDates Whether future dates are disabled
139
+ * @param disablePastDates Whether past dates are disabled
140
+ * @param isDoubleClick Whether this is a double-click event
141
+ * @returns New date range or null if click should be ignored
142
+ */
143
+ export declare const handleCalendarDateClick: (clickedDate: Date, selectedRange: DateRange, allowSingleDateSelection: boolean | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, isDoubleClick?: boolean) => DateRange | null;
144
+ /**
145
+ * Generates calendar weeks for a specific month with consistent alignment
146
+ * @param year The year
147
+ * @param month The month (0-based)
148
+ * @returns Array of weeks with day numbers or null for empty cells
149
+ */
150
+ export declare const generateMonthWeeks: (year: number, month: number) => (number | null)[][];
151
+ /**
152
+ * Generates the list of months to display in calendar
153
+ * @param startYear Starting year
154
+ * @param startMonth Starting month (0-based)
155
+ * @param endYear Ending year
156
+ * @returns Array of month/year objects
157
+ */
158
+ export declare const generateCalendarMonths: (startYear?: number, startMonth?: number, endYear?: number) => {
159
+ month: number;
160
+ year: number;
161
+ }[];
162
+ /**
163
+ * Generates initial months around current date (4-5 months)
164
+ * @param today Current date
165
+ * @returns Array of initial months to display
166
+ */
167
+ export declare const generateInitialMonths: (today: Date) => {
168
+ month: number;
169
+ year: number;
170
+ }[];
171
+ /**
172
+ * Generates a chunk of months for progressive loading
173
+ * @param startYear Starting year
174
+ * @param startMonth Starting month (0-based)
175
+ * @param endYear Ending year for this chunk
176
+ * @param endMonth Ending month for this chunk (0-based)
177
+ * @returns Array of months for the chunk
178
+ */
179
+ export declare const generateMonthChunk: (startYear: number, startMonth: number, endYear: number, endMonth?: number) => {
180
+ month: number;
181
+ year: number;
182
+ }[];
183
+ /**
184
+ * Calculates the next chunk to load based on current data
185
+ * @param currentMonths Currently loaded months
186
+ * @param direction Direction to load ('past' or 'future')
187
+ * @returns Next chunk parameters or null if reached bounds
188
+ */
189
+ export declare const getNextChunkParams: (currentMonths: {
190
+ month: number;
191
+ year: number;
192
+ }[], direction: "past" | "future") => {
193
+ startYear: number;
194
+ startMonth: number;
195
+ } | null;
196
+ /**
197
+ * Gets month name from month index
198
+ * @param monthIndex Month index (0-based)
199
+ * @returns Month name
200
+ */
201
+ export declare const getMonthName: (monthIndex: number) => string;
202
+ /**
203
+ * Gets day names for calendar header
204
+ * @returns Array of day names
205
+ */
206
+ export declare const getDayNames: () => string[];
207
+ /**
208
+ * Calculates the height of a single month in the calendar
209
+ * @returns Height in pixels
210
+ */
211
+ export declare const getMonthHeight: () => number;
212
+ /**
213
+ * Calculates which months should be visible in the viewport
214
+ * @param scrollTop Current scroll position
215
+ * @param containerHeight Height of the scrollable container
216
+ * @param months Array of all months
217
+ * @param monthHeight Height of each month
218
+ * @param buffer Number of months to render outside viewport for smooth scrolling
219
+ * @returns Object with start/end indices and visible months
220
+ */
221
+ export declare const getVisibleMonths: (scrollTop: number, containerHeight: number, months: {
222
+ month: number;
223
+ year: number;
224
+ }[], monthHeight: number, buffer?: number) => {
225
+ startIndex: number;
226
+ endIndex: number;
227
+ visibleMonths: {
228
+ month: number;
229
+ year: number;
230
+ index: number;
231
+ }[];
232
+ totalHeight: number;
233
+ };
234
+ /**
235
+ * Throttle function to limit how often a function can be called
236
+ * @param func Function to throttle
237
+ * @param limit Time limit in milliseconds
238
+ * @returns Throttled function
239
+ */
240
+ export declare const throttle: <T extends (...args: unknown[]) => unknown>(func: T, limit: number) => ((...args: Parameters<T>) => void);
241
+ /**
242
+ * Calculates the top offset for a month at a given index
243
+ * @param index Month index
244
+ * @param monthHeight Height of each month
245
+ * @returns Top offset in pixels
246
+ */
247
+ export declare const getMonthOffset: (index: number, monthHeight: number) => number;
248
+ /**
249
+ * Finds the month that contains today's date
250
+ * @param months Array of months
251
+ * @param today Today's date
252
+ * @returns Index of the month containing today
253
+ */
254
+ export declare const findCurrentMonthIndex: (months: {
255
+ month: number;
256
+ year: number;
257
+ }[], today: Date) => number;
258
+ /**
259
+ * Scrolls to a specific month
260
+ * @param monthIndex Index of the month to scroll to
261
+ * @param monthHeight Height of each month
262
+ * @returns Scroll position
263
+ */
264
+ export declare const getScrollToMonth: (monthIndex: number, monthHeight: number) => number;
265
+ /**
266
+ * Gets all the states for a date cell
267
+ * @param date The date to check
268
+ * @param selectedRange Current selected range
269
+ * @param today Today's date
270
+ * @param disableFutureDates Whether future dates are disabled
271
+ * @param disablePastDates Whether past dates are disabled
272
+ * @returns Object with all date states
273
+ */
274
+ export declare const getDateCellStates: (date: Date, selectedRange: DateRange, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean) => {
275
+ isStart: boolean;
276
+ isEnd: boolean;
277
+ isRangeDay: boolean;
278
+ isTodayDay: boolean;
279
+ isSingleDate: boolean;
280
+ isDisabled: boolean;
281
+ };
282
+ /**
283
+ * Determines if a today indicator should be shown
284
+ * @param dateStates Object containing all date states
285
+ * @returns Boolean indicating if today indicator should be shown
286
+ */
287
+ export declare const shouldShowTodayIndicator: (dateStates: ReturnType<typeof getDateCellStates>) => boolean;
288
+ /**
289
+ * Validation result for date input
290
+ */
291
+ export type DateValidationResult = {
292
+ isValid: boolean;
293
+ error: 'none' | 'format' | 'invalid-date' | 'out-of-range';
294
+ message?: string;
295
+ };
296
+ /**
297
+ * Interface for date range picker tokens used in styling functions
298
+ */
299
+ export type DateRangePickerTokens = {
300
+ calendar: {
301
+ dayCell: Record<string, unknown>;
302
+ singleDate: Record<string, unknown>;
303
+ startDate: Record<string, unknown>;
304
+ endDate: Record<string, unknown>;
305
+ rangeDay: Record<string, unknown>;
306
+ todayDay: Record<string, unknown>;
307
+ };
308
+ states: {
309
+ disabledDay: Record<string, unknown>;
310
+ };
311
+ text: {
312
+ selectedDay: {
313
+ color?: string | unknown;
314
+ };
315
+ todayDay: {
316
+ color?: string | unknown;
317
+ };
318
+ dayNumber: {
319
+ color?: string | unknown;
320
+ };
321
+ };
322
+ };
323
+ /**
324
+ * Validates date format and date values
325
+ * @param value The input value to validate
326
+ * @param format The expected format (e.g., 'dd/MM/yyyy')
327
+ * @returns Validation result with specific error type
328
+ */
329
+ export declare const validateDateInput: (value: string, format: string) => DateValidationResult;
330
+ /**
331
+ * Formats date input as user types, adding slashes automatically
332
+ * @param value The input value to format
333
+ * @param format The target format (e.g., 'dd/MM/yyyy')
334
+ * @returns Formatted input value
335
+ */
336
+ export declare const formatDateInput: (value: string, format: string) => string;
337
+ /**
338
+ * Checks if date input is complete (full format length)
339
+ * @param value The input value to check
340
+ * @param format The expected format
341
+ * @returns True if input is complete
342
+ */
343
+ export declare const isDateInputComplete: (value: string, format: string) => boolean;
344
+ /**
345
+ * Formats date display for the trigger button
346
+ * @param selectedRange Current selected date range
347
+ * @param allowSingleDateSelection Whether single date selection is allowed
348
+ * @returns Formatted display string
349
+ */
350
+ export declare const formatDateDisplay: (selectedRange: DateRange, allowSingleDateSelection?: boolean) => string;
351
+ /**
352
+ * Handles date input change with formatting and validation
353
+ * @param value Input value
354
+ * @param dateFormat Date format string
355
+ * @param currentRange Current selected range
356
+ * @param timeValue Current time value (HH:mm)
357
+ * @returns Object with formatted value, validation result, and updated range
358
+ */
359
+ export declare const handleDateInputChange: (value: string, dateFormat: string, currentRange: DateRange, timeValue: string, isStartDate?: boolean) => {
360
+ formattedValue: string;
361
+ validation: DateValidationResult;
362
+ updatedRange?: DateRange;
363
+ };
364
+ /**
365
+ * Handles time change for date range
366
+ * @param time New time value (HH:mm)
367
+ * @param currentRange Current selected range
368
+ * @param isStartTime Whether this is start time or end time
369
+ * @returns Updated date range
370
+ */
371
+ export declare const handleTimeChange: (time: string, currentRange: DateRange, isStartTime?: boolean) => DateRange;
372
+ /**
373
+ * Handles date selection from calendar
374
+ * @param range Selected date range from calendar
375
+ * @param startTime Current start time
376
+ * @param endTime Current end time
377
+ * @param dateFormat Date format string
378
+ * @returns Object with updated range and formatted date strings
379
+ */
380
+ export declare const handleCalendarDateSelect: (range: DateRange, startTime: string, endTime: string, dateFormat: string) => {
381
+ updatedRange: DateRange;
382
+ formattedStartDate: string;
383
+ formattedEndDate: string;
384
+ };
385
+ /**
386
+ * Handles preset selection
387
+ * @param preset Selected preset
388
+ * @param dateFormat Date format string
389
+ * @returns Object with updated range, formatted dates, and times
390
+ */
391
+ export declare const handlePresetSelection: (preset: DateRangePreset, dateFormat: string) => {
392
+ updatedRange: DateRange;
393
+ formattedStartDate: string;
394
+ formattedEndDate: string;
395
+ formattedStartTime: string;
396
+ formattedEndTime: string;
397
+ };
398
+ /**
399
+ * Handles cancel action - resets to original values
400
+ * @param originalValue Original date range value
401
+ * @param dateFormat Date format string
402
+ * @returns Object with reset values
403
+ */
404
+ export declare const handleCancelAction: (originalValue: DateRange | undefined, dateFormat: string) => {
405
+ resetRange: DateRange;
406
+ formattedStartDate: string;
407
+ formattedEndDate: string;
408
+ formattedStartTime: string;
409
+ formattedEndTime: string;
410
+ } | null;
411
+ /**
412
+ * Handles loading more months in calendar
413
+ * @param months Current months array
414
+ * @param direction Direction to load ('past' or 'future')
415
+ * @param isLoadingPast Current loading state for past
416
+ * @param isLoadingFuture Current loading state for future
417
+ * @returns Promise that resolves when loading is complete
418
+ */
419
+ export declare const handleLoadMoreMonths: (months: {
420
+ month: number;
421
+ year: number;
422
+ }[], direction: "past" | "future", isLoadingPast: boolean, isLoadingFuture: boolean) => Promise<{
423
+ month: number;
424
+ year: number;
425
+ }[] | null>;
426
+ /**
427
+ * Handles scroll position updates for calendar
428
+ * @param scrollTop Current scroll position
429
+ * @param scrollHeight Total scroll height
430
+ * @param clientHeight Client height
431
+ * @param loadThreshold Threshold for triggering loads
432
+ * @returns Object indicating what should be loaded
433
+ */
434
+ export declare const handleCalendarScroll: (scrollTop: number, scrollHeight: number, clientHeight: number, loadThreshold?: number) => {
435
+ shouldLoadPast: boolean;
436
+ shouldLoadFuture: boolean;
437
+ };
438
+ /**
439
+ * Creates calendar month data structure for rendering
440
+ * @param year Year of the month
441
+ * @param month Month (0-based)
442
+ * @param monthIndex Index in the months array
443
+ * @param monthHeight Height of each month
444
+ * @returns Month data for rendering
445
+ */
446
+ export declare const createCalendarMonthData: (year: number, month: number, monthIndex: number, monthHeight: number) => {
447
+ key: string;
448
+ year: number;
449
+ month: number;
450
+ weeks: (number | null)[][];
451
+ topOffset: number;
452
+ monthHeight: number;
453
+ monthName: string;
454
+ };
455
+ /**
456
+ * Calculates day cell props for rendering
457
+ * @param date Date object
458
+ * @param selectedRange Current selected range
459
+ * @param today Today's date
460
+ * @param disableFutureDates Whether future dates are disabled
461
+ * @param disablePastDates Whether past dates are disabled
462
+ * @param calendarToken Calendar token for styling
463
+ * @returns Day cell props
464
+ */
465
+ export declare const calculateDayCellProps: (date: Date, selectedRange: DateRange, today: Date, disableFutureDates: boolean, disablePastDates: boolean, calendarToken: CalendarTokenType) => {
466
+ dateStates: ReturnType<typeof getDateCellStates>;
467
+ styles: Record<string, unknown>;
468
+ textColor: string | unknown;
469
+ showTodayIndicator: boolean;
470
+ };
@@ -0,0 +1,6 @@
1
+ import { DirectoryProps } from './types';
2
+ declare const Directory: {
3
+ ({ directoryData, className }: DirectoryProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default Directory;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { NavItemProps } from './types';
3
+ export declare const ActiveItemProvider: React.FC<{
4
+ children: React.ReactNode;
5
+ }>;
6
+ declare const NavItem: ({ item, index, onNavigate }: NavItemProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default NavItem;
@@ -0,0 +1,3 @@
1
+ import { SectionProps } from './types';
2
+ declare const Section: ({ section, sectionIndex, onNavigateBetweenSections, }: SectionProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Section;
@@ -0,0 +1,2 @@
1
+ export { default as Directory } from './Directory';
2
+ export * from './types';
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+ export type DirectoryProps = {
3
+ className?: string;
4
+ directoryData: DirectoryData[];
5
+ };
6
+ export type DirectoryData = {
7
+ label?: string;
8
+ items?: NavbarItem[];
9
+ isCollapsible?: boolean;
10
+ defaultOpen?: boolean;
11
+ };
12
+ export type NavbarItem = {
13
+ label: string;
14
+ items?: NavbarItem[];
15
+ leftSlot?: ReactNode;
16
+ rightSlot?: ReactNode;
17
+ onClick?: () => void;
18
+ href?: string;
19
+ };
20
+ export type SectionProps = {
21
+ section: DirectoryData;
22
+ sectionIndex: number;
23
+ onNavigateBetweenSections: (direction: 'up' | 'down', currentIndex: number) => void;
24
+ };
25
+ export type NavItemProps = {
26
+ item: NavbarItem;
27
+ index: number;
28
+ onNavigate: (direction: 'up' | 'down', currentIndex: number) => void;
29
+ };
@@ -0,0 +1,9 @@
1
+ export declare const handleSectionNavigation: (direction: "up" | "down", currentIndex: number, totalItems: number, selector?: string, childSelector?: string) => number;
2
+ export declare const handleKeyDown: (e: React.KeyboardEvent, options: {
3
+ hasChildren?: boolean;
4
+ isExpanded?: boolean;
5
+ setIsExpanded?: (value: boolean) => void;
6
+ handleClick?: () => void;
7
+ index?: number;
8
+ onNavigate?: (direction: "up" | "down", index: number) => void;
9
+ }) => void;
@@ -0,0 +1,6 @@
1
+ import { Drawer } from './components/DrawerBase';
2
+ export { Drawer, DrawerTrigger, DrawerPortal, DrawerOverlay, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerBody, DrawerFooter, DrawerClose, } from './components/DrawerBase';
3
+ export { StatusDrawer } from './components/StatusDrawer';
4
+ export { MultiSelectDrawer, SingleSelectDrawer, } from './components/SelectDrawer';
5
+ export { NestedMultiSelectDrawer, NestedSingleSelectDrawer, } from './components/NestedSelectDrawer';
6
+ export default Drawer;
@@ -0,0 +1,30 @@
1
+ import { default as React } from 'react';
2
+ import { DrawerProps, DrawerTriggerProps, DrawerContentProps, DrawerHeaderProps, DrawerTitleProps, DrawerDescriptionProps, DrawerFooterProps, DrawerCloseProps } from '../types';
3
+ export declare const Drawer: ({ open, onOpenChange, direction, modal, dismissible, nested, snapPoints, activeSnapPoint, onSnapPointChange, fadeFromIndex, snapToSequentialPoint, children, }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const DrawerTrigger: React.ForwardRefExoticComponent<DrawerTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ export declare const DrawerPortal: typeof import('vaul').Portal;
6
+ export declare const DrawerOverlay: React.ForwardRefExoticComponent<{
7
+ className?: string;
8
+ } & React.RefAttributes<HTMLDivElement>>;
9
+ export declare const DrawerContent: React.ForwardRefExoticComponent<DrawerContentProps & {
10
+ direction?: "top" | "bottom" | "left" | "right";
11
+ showHandle?: boolean;
12
+ handle?: React.ReactNode;
13
+ hasSnapPoints?: boolean;
14
+ mobileOffset?: {
15
+ top?: string;
16
+ bottom?: string;
17
+ left?: string;
18
+ right?: string;
19
+ };
20
+ } & React.RefAttributes<HTMLDivElement>>;
21
+ export declare const DrawerHeader: React.ForwardRefExoticComponent<DrawerHeaderProps & React.RefAttributes<HTMLDivElement>>;
22
+ export declare const DrawerTitle: React.ForwardRefExoticComponent<DrawerTitleProps & React.RefAttributes<HTMLHeadingElement>>;
23
+ export declare const DrawerDescription: React.ForwardRefExoticComponent<DrawerDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
24
+ export declare const DrawerBody: React.ForwardRefExoticComponent<{
25
+ children: React.ReactNode;
26
+ className?: string;
27
+ overflowY?: "auto" | "hidden" | "scroll" | "visible";
28
+ } & React.RefAttributes<HTMLDivElement>>;
29
+ export declare const DrawerFooter: React.ForwardRefExoticComponent<DrawerFooterProps & React.RefAttributes<HTMLDivElement>>;
30
+ export declare const DrawerClose: React.ForwardRefExoticComponent<DrawerCloseProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,72 @@
1
+ import { default as React } from 'react';
2
+ import { SelectDrawerItem, SelectDrawerGroup } from '../types';
3
+ export declare const NestedMultiSelectDrawer: {
4
+ ({ open, onOpenChange, heading, description, rightSlot, items, selectedValues, onSelectionChange, enableSearch, searchPlaceholder, cancelText, confirmText, onCancel, onConfirm, showCancelButton, direction, modal, dismissible, mobileOffset, className, style, }: {
5
+ open?: boolean;
6
+ onOpenChange?: (open: boolean) => void;
7
+ heading: string;
8
+ description?: string;
9
+ rightSlot?: React.ReactNode;
10
+ items: (SelectDrawerGroup & {
11
+ items: Array<SelectDrawerItem & {
12
+ nestedItems?: SelectDrawerGroup[];
13
+ }>;
14
+ })[];
15
+ selectedValues?: string[];
16
+ onSelectionChange?: (selectedValues: string[]) => void;
17
+ enableSearch?: boolean;
18
+ searchPlaceholder?: string;
19
+ cancelText?: string;
20
+ confirmText?: string;
21
+ onCancel?: () => void;
22
+ onConfirm?: () => void;
23
+ showCancelButton?: boolean;
24
+ direction?: "top" | "bottom" | "left" | "right";
25
+ modal?: boolean;
26
+ dismissible?: boolean;
27
+ mobileOffset?: {
28
+ top?: string;
29
+ bottom?: string;
30
+ left?: string;
31
+ right?: string;
32
+ };
33
+ className?: string;
34
+ style?: React.CSSProperties;
35
+ }): import("react/jsx-runtime").JSX.Element;
36
+ displayName: string;
37
+ };
38
+ export declare const NestedSingleSelectDrawer: {
39
+ ({ open, onOpenChange, heading, description, rightSlot, items, selectedValue, onValueChange, enableSearch, searchPlaceholder, cancelText, confirmText, onCancel, onConfirm, showCancelButton, direction, modal, dismissible, mobileOffset, className, style, }: {
40
+ open?: boolean;
41
+ onOpenChange?: (open: boolean) => void;
42
+ heading: string;
43
+ description?: string;
44
+ rightSlot?: React.ReactNode;
45
+ items: (SelectDrawerGroup & {
46
+ items: Array<SelectDrawerItem & {
47
+ nestedItems?: SelectDrawerGroup[];
48
+ }>;
49
+ })[];
50
+ selectedValue?: string;
51
+ onValueChange?: (value: string) => void;
52
+ enableSearch?: boolean;
53
+ searchPlaceholder?: string;
54
+ cancelText?: string;
55
+ confirmText?: string;
56
+ onCancel?: () => void;
57
+ onConfirm?: () => void;
58
+ showCancelButton?: boolean;
59
+ direction?: "top" | "bottom" | "left" | "right";
60
+ modal?: boolean;
61
+ dismissible?: boolean;
62
+ mobileOffset?: {
63
+ top?: string;
64
+ bottom?: string;
65
+ left?: string;
66
+ right?: string;
67
+ };
68
+ className?: string;
69
+ style?: React.CSSProperties;
70
+ }): import("react/jsx-runtime").JSX.Element;
71
+ displayName: string;
72
+ };
@@ -0,0 +1,9 @@
1
+ import { SelectDrawerProps } from '../types';
2
+ export declare const MultiSelectDrawer: {
3
+ ({ open, onOpenChange, heading, description, rightSlot, items, selectedValues, onSelectionChange, enableSearch, searchPlaceholder, cancelText, confirmText, onCancel, onConfirm, showCancelButton, direction, modal, dismissible, mobileOffset, className, style, }: Omit<SelectDrawerProps, "multiSelect" | "selectedValue" | "onValueChange">): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export declare const SingleSelectDrawer: {
7
+ ({ open, onOpenChange, heading, description, rightSlot, items, selectedValue, onValueChange, enableSearch, searchPlaceholder, cancelText, confirmText, onCancel, onConfirm, showCancelButton, direction, modal, dismissible, mobileOffset, className, style, }: Omit<SelectDrawerProps, "multiSelect" | "selectedValues" | "onSelectionChange">): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
@@ -0,0 +1,5 @@
1
+ import { StatusDrawerProps } from '../types';
2
+ export declare const StatusDrawer: {
3
+ ({ open, onOpenChange, heading, description, primaryButtonProps, secondaryButtonProps, slot, direction, modal, dismissible, mobileOffset, className, style, }: StatusDrawerProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };