@loadsmart/loadsmart-ui 8.0.0 → 8.0.2

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 (300) hide show
  1. package/dist/DragDropFile.context-oKnUu6d3.js.map +1 -1
  2. package/dist/common/BackButton/BackButton.d.ts +2 -1
  3. package/dist/common/CloseButton/CloseButton.d.ts +3 -2
  4. package/dist/common/SelectionWrapper.d.ts +9 -9
  5. package/dist/components/Accordion/Accordion.context.d.ts +6 -6
  6. package/dist/components/Accordion/Accordion.d.ts +11 -11
  7. package/dist/components/Banner/Banner.d.ts +17 -17
  8. package/dist/components/Breadcrumbs/Breadcrumb.d.ts +5 -5
  9. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
  10. package/dist/components/Button/Button.d.ts +11 -10
  11. package/dist/components/Calendar/Calendar.d.ts +3 -2
  12. package/dist/components/Calendar/Calendar.helpers.d.ts +2 -1
  13. package/dist/components/Calendar/Calendar.types.d.ts +4 -4
  14. package/dist/components/Calendar/Date.helper.d.ts +27 -54
  15. package/dist/components/Calendar/DateFormat.helper.d.ts +1 -3
  16. package/dist/components/Calendar/Month.helper.d.ts +5 -5
  17. package/dist/components/Calendar/PickerModeToggle.d.ts +2 -1
  18. package/dist/components/Calendar/Pickers/DayPicker.d.ts +4 -2
  19. package/dist/components/Calendar/Pickers/MonthPicker.d.ts +2 -1
  20. package/dist/components/Calendar/Pickers/PickerButton.d.ts +2 -3
  21. package/dist/components/Calendar/Pickers/YearPicker.d.ts +2 -1
  22. package/dist/components/Calendar/useCalendar.d.ts +4 -9
  23. package/dist/components/Card/Card.d.ts +5 -5
  24. package/dist/components/Card/CardTitle.d.ts +5 -4
  25. package/dist/components/Checkbox/Checkbox.d.ts +7 -7
  26. package/dist/components/DatePicker/DatePicker.d.ts +6 -6
  27. package/dist/components/DatePicker/DateRangePicker.d.ts +3 -2
  28. package/dist/components/DatePicker/useDatePicker.d.ts +7 -586
  29. package/dist/components/DatePicker/useDateRangePicker.d.ts +5 -889
  30. package/dist/components/Dialog/Dialog.d.ts +14 -16
  31. package/dist/components/DragDropFile/DragDropFile.context.d.ts +1 -1
  32. package/dist/components/DragDropFile/DragDropFile.d.ts +4 -3
  33. package/dist/components/DragDropFile/components/DropZone.d.ts +2 -1
  34. package/dist/components/DragDropFile/components/FileItem.d.ts +2 -1
  35. package/dist/components/DragDropFile/components/FileList.d.ts +2 -1
  36. package/dist/components/DragDropFile/styles.d.ts +8 -9
  37. package/dist/components/DragDropFile/types.d.ts +4 -4
  38. package/dist/components/Drawer/Drawer.d.ts +7 -7
  39. package/dist/components/Dropdown/Dropdown.context.d.ts +2 -1
  40. package/dist/components/Dropdown/Dropdown.d.ts +2 -5
  41. package/dist/components/Dropdown/Dropdown.types.d.ts +1 -1
  42. package/dist/components/Dropdown/DropdownMenu.d.ts +4 -3
  43. package/dist/components/Dropdown/DropdownTrigger.d.ts +10 -10
  44. package/dist/components/EmptyState/EmptyState.d.ts +3 -3
  45. package/dist/components/EmptyState/EmptyState.types.d.ts +2 -2
  46. package/dist/components/EmptyState/index.d.ts +1 -1
  47. package/dist/components/HighlightMatch/HighlightMatch.d.ts +4 -4
  48. package/dist/components/Icon/Icon.d.ts +3 -2
  49. package/dist/components/IconFactory/IconFactory.d.ts +8 -8
  50. package/dist/components/IconFactory/IconFactory.fixtures.d.ts +6 -6
  51. package/dist/components/Label/Label.d.ts +10 -10
  52. package/dist/components/Layout/Box.d.ts +8 -9
  53. package/dist/components/Layout/Grid.d.ts +4 -5
  54. package/dist/components/Layout/Group.d.ts +5 -6
  55. package/dist/components/Layout/Sidebar.d.ts +6 -7
  56. package/dist/components/Layout/Stack.d.ts +7 -7
  57. package/dist/components/Layout/Switcher.d.ts +5 -6
  58. package/dist/components/Link/Link.d.ts +3 -3
  59. package/dist/components/Loaders/LoadingBar.d.ts +8 -7
  60. package/dist/components/Loaders/LoadingDots.d.ts +4 -3
  61. package/dist/components/Loaders/Spinner.d.ts +4 -3
  62. package/dist/components/Modal/Modal.d.ts +4 -7
  63. package/dist/components/Pagination/Pagination.d.ts +2 -1
  64. package/dist/components/Pagination/Pagination.types.d.ts +4 -4
  65. package/dist/components/Pagination/PaginationItem.d.ts +2 -1
  66. package/dist/components/Popover/Popover.d.ts +4 -3
  67. package/dist/components/ProgressBar/ProgressBar.d.ts +6 -6
  68. package/dist/components/Radio/Radio.d.ts +7 -7
  69. package/dist/components/Section/Section.d.ts +4 -4
  70. package/dist/components/Select/Select.context.d.ts +3 -2
  71. package/dist/components/Select/Select.d.ts +2 -2
  72. package/dist/components/Select/Select.fixtures.d.ts +4 -4
  73. package/dist/components/Select/Select.types.d.ts +14 -14
  74. package/dist/components/Select/SelectCreatableOption.d.ts +2 -1
  75. package/dist/components/Select/SelectEmpty.d.ts +2 -1
  76. package/dist/components/Select/SelectOption.d.ts +2 -1
  77. package/dist/components/Select/SelectTrigger.d.ts +1 -1
  78. package/dist/components/Select/useSelect.d.ts +0 -2
  79. package/dist/components/SideNavigation/Logo/Logo.d.ts +6 -5
  80. package/dist/components/SideNavigation/Menu/Menu.d.ts +3 -13
  81. package/dist/components/SideNavigation/Menu/MenuBaseItem.d.ts +7 -7
  82. package/dist/components/SideNavigation/Menu/MenuExpandable.d.ts +3 -3
  83. package/dist/components/SideNavigation/Menu/MenuLink.d.ts +7 -6
  84. package/dist/components/SideNavigation/Separator/Separator.d.ts +3 -2
  85. package/dist/components/SideNavigation/SideNavigation.d.ts +7 -22
  86. package/dist/components/Steps/ProgressSteps/ProgressStep.d.ts +5 -5
  87. package/dist/components/Steps/ProgressSteps/ProgressSteps.d.ts +4 -3
  88. package/dist/components/Steps/Steps.d.ts +8 -8
  89. package/dist/components/Steps/Steps.types.d.ts +2 -2
  90. package/dist/components/Steps/StepsStep.d.ts +6 -5
  91. package/dist/components/Steps/useSteps.d.ts +2 -2
  92. package/dist/components/Switch/Switch.d.ts +6 -6
  93. package/dist/components/Table/Selection.d.ts +6 -6
  94. package/dist/components/Table/Table.d.ts +14 -13
  95. package/dist/components/Table/Table.types.d.ts +5 -5
  96. package/dist/components/Table/TableSortHandle.d.ts +3 -2
  97. package/dist/components/Table/useSortBy.d.ts +3 -3
  98. package/dist/components/TablePagination/RowsPerPage.d.ts +2 -1
  99. package/dist/components/TablePagination/TablePagination.d.ts +2 -1
  100. package/dist/components/TablePagination/TablePagination.styles.d.ts +2 -4
  101. package/dist/components/TablePagination/TablePaginationActions.d.ts +3 -8
  102. package/dist/components/Tabs/Tabs.d.ts +10 -10
  103. package/dist/components/Tabs/TabsContext.d.ts +2 -1
  104. package/dist/components/Tag/Tag.d.ts +11 -11
  105. package/dist/components/Text/Text.d.ts +2 -1
  106. package/dist/components/TextField/TextField.d.ts +11 -10
  107. package/dist/components/Textarea/Textarea.d.ts +8 -8
  108. package/dist/components/Toast/Toast.d.ts +7 -7
  109. package/dist/components/ToggleGroup/Toggle.d.ts +4 -2
  110. package/dist/components/ToggleGroup/ToggleGroup.d.ts +3 -2
  111. package/dist/components/ToggleGroup/ToggleGroup.types.d.ts +1 -1
  112. package/dist/components/ToggleGroup/ToggleGroupContext.d.ts +2 -2
  113. package/dist/components/Tooltip/Tooltip.d.ts +7 -7
  114. package/dist/components/TopNavigation/Logo/Logo.d.ts +6 -5
  115. package/dist/components/TopNavigation/Menu/Menu.d.ts +7 -7
  116. package/dist/components/TopNavigation/Menu/MenuItemDropdown.d.ts +12 -12
  117. package/dist/components/TopNavigation/Menu/MenuItemIcon.d.ts +7 -7
  118. package/dist/components/TopNavigation/OpenSideNavButton/OpenSideNavButton.d.ts +8 -6
  119. package/dist/components/TopNavigation/TopNavigation.d.ts +5 -5
  120. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +2 -1
  121. package/dist/hooks/useDidMount/useDidMount.d.ts +1 -1
  122. package/dist/hooks/useFingerprint/useFingerprint.d.ts +0 -1
  123. package/dist/hooks/useFocusTrap/useFocusTrap.d.ts +7 -8
  124. package/dist/hooks/useFocusWithin/useFocusWithin.d.ts +1 -1
  125. package/dist/hooks/useHeightExpansionToggler/useHeightExpansionToggler.d.ts +3 -3
  126. package/dist/hooks/useSelectable/SelectableStrategy.d.ts +4 -4
  127. package/dist/hooks/useSelectable/useSelectable.types.d.ts +2 -2
  128. package/dist/index.js +316 -257
  129. package/dist/index.js.map +1 -1
  130. package/dist/{miranda-compatibility.theme-kYNEZ7mW.js → miranda-compatibility.theme-CIu9fa89.js} +2 -2
  131. package/dist/miranda-compatibility.theme-CIu9fa89.js.map +1 -0
  132. package/dist/{prop-K2Z3EsyG.js → prop-Fs2axl9W.js} +12 -18
  133. package/dist/prop-Fs2axl9W.js.map +1 -0
  134. package/dist/styles/activatable.d.ts +2 -3
  135. package/dist/styles/disableable.d.ts +3 -3
  136. package/dist/styles/ellipsizable.d.ts +1 -2
  137. package/dist/styles/focusable.d.ts +3 -3
  138. package/dist/styles/font.d.ts +0 -1
  139. package/dist/styles/hidden.d.ts +1 -2
  140. package/dist/styles/hoverable.d.ts +3 -3
  141. package/dist/styles/transition.d.ts +0 -1
  142. package/dist/styles/typography.d.ts +8 -8
  143. package/dist/testing/DatePickerEvent/DatePickerEvent.d.ts +7 -12
  144. package/dist/testing/DatePickerEvent/DateRangePickerEvent.d.ts +7 -12
  145. package/dist/testing/SelectEvent/SelectEvent.d.ts +11 -19
  146. package/dist/testing/getInterpolatedStyles/getInterpolatedStyles.d.ts +2 -2
  147. package/dist/testing/index.js +7 -9
  148. package/dist/testing/index.js.map +1 -1
  149. package/dist/tests/generator.d.ts +2 -2
  150. package/dist/tests/renderer.d.ts +6 -5
  151. package/dist/theming/index.d.ts +3 -3
  152. package/dist/theming/index.js +2 -2
  153. package/dist/theming/index.js.map +1 -1
  154. package/dist/theming/theming.helpers.d.ts +2 -2
  155. package/dist/toArray-BJJzFRD1.js +13 -0
  156. package/dist/toArray-BJJzFRD1.js.map +1 -0
  157. package/dist/tools/conditional.d.ts +3 -3
  158. package/dist/tools/index.js +1 -1
  159. package/dist/tools/prop.d.ts +1 -1
  160. package/dist/utils/toolset/getID.d.ts +0 -6
  161. package/dist/utils/toolset/highlightMatch.d.ts +5 -6
  162. package/dist/utils/toolset/keyboard.d.ts +3 -4
  163. package/dist/utils/toolset/toArray.d.ts +7 -1
  164. package/dist/utils/types/ColorScheme.d.ts +1 -2
  165. package/package.json +65 -66
  166. package/dist/components/Accordion/Accordion.stories.d.ts +0 -8
  167. package/dist/components/Accordion/Accordion.test.d.ts +0 -1
  168. package/dist/components/Banner/Banner.stories.d.ts +0 -107
  169. package/dist/components/Banner/Banner.test.d.ts +0 -1
  170. package/dist/components/Breadcrumbs/Breadbrumbs.test.d.ts +0 -1
  171. package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -5
  172. package/dist/components/Button/Button.stories.d.ts +0 -33
  173. package/dist/components/Button/Button.test.d.ts +0 -1
  174. package/dist/components/Calendar/Calendar.stories.d.ts +0 -21
  175. package/dist/components/Calendar/Calendar.test.d.ts +0 -1
  176. package/dist/components/Calendar/Date.helper.test.d.ts +0 -1
  177. package/dist/components/Calendar/DateFormat.helper.test.d.ts +0 -1
  178. package/dist/components/Calendar/Month.helper.test.d.ts +0 -1
  179. package/dist/components/Calendar/Pickers/DayPicker.test.d.ts +0 -1
  180. package/dist/components/Calendar/Pickers/MonthPicker.test.d.ts +0 -1
  181. package/dist/components/Calendar/Pickers/YearPicker.test.d.ts +0 -1
  182. package/dist/components/Card/Card.stories.d.ts +0 -8
  183. package/dist/components/Card/Card.test.d.ts +0 -1
  184. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -8
  185. package/dist/components/Checkbox/Checkbox.test.d.ts +0 -1
  186. package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -22
  187. package/dist/components/DatePicker/DatePicker.test.d.ts +0 -1
  188. package/dist/components/DatePicker/DateRangePicker.stories.d.ts +0 -21
  189. package/dist/components/DatePicker/DateRangePicker.test.d.ts +0 -1
  190. package/dist/components/Dialog/Dialog.stories.d.ts +0 -67
  191. package/dist/components/Dialog/Dialog.test.d.ts +0 -1
  192. package/dist/components/DragDropFile/DragDropFile.stories.d.ts +0 -33
  193. package/dist/components/DragDropFile/components/DropZone.test.d.ts +0 -1
  194. package/dist/components/DragDropFile/components/FileList.test.d.ts +0 -1
  195. package/dist/components/Drawer/Drawer.stories.d.ts +0 -6
  196. package/dist/components/Drawer/Drawer.test.d.ts +0 -1
  197. package/dist/components/Dropdown/Dropdown.stories.d.ts +0 -12
  198. package/dist/components/Dropdown/Dropdown.test.d.ts +0 -1
  199. package/dist/components/Dropdown/useDropdown.test.d.ts +0 -1
  200. package/dist/components/EmptyState/EmptyState.stories.d.ts +0 -32
  201. package/dist/components/EmptyState/EmptyState.test.d.ts +0 -1
  202. package/dist/components/ErrorMessage/ErrorMessage.stories.d.ts +0 -13
  203. package/dist/components/ErrorMessage/ErrorMessage.test.d.ts +0 -1
  204. package/dist/components/HighlightMatch/HighlightMatch.stories.d.ts +0 -5
  205. package/dist/components/HighlightMatch/HighlightMatch.test.d.ts +0 -1
  206. package/dist/components/IconFactory/IconFactory.stories.d.ts +0 -6
  207. package/dist/components/IconFactory/IconFactory.test.d.ts +0 -1
  208. package/dist/components/Label/Label.stories.d.ts +0 -14
  209. package/dist/components/Label/Label.test.d.ts +0 -1
  210. package/dist/components/Layout/Layout.stories.d.ts +0 -146
  211. package/dist/components/Link/Link.stories.d.ts +0 -5
  212. package/dist/components/Link/Link.test.d.ts +0 -1
  213. package/dist/components/Loaders/LoadingBar.stories.d.ts +0 -5
  214. package/dist/components/Loaders/LoadingBar.test.d.ts +0 -1
  215. package/dist/components/Loaders/LoadingDots.stories.d.ts +0 -6
  216. package/dist/components/Loaders/LoadingDots.test.d.ts +0 -1
  217. package/dist/components/Loaders/Spinner.stories.d.ts +0 -5
  218. package/dist/components/Loaders/Spinner.test.d.ts +0 -1
  219. package/dist/components/Modal/Modal.stories.d.ts +0 -30
  220. package/dist/components/Modal/Modal.test.d.ts +0 -1
  221. package/dist/components/Pagination/Pagination.stories.d.ts +0 -5
  222. package/dist/components/Pagination/Pagination.test.d.ts +0 -1
  223. package/dist/components/Pagination/usePagination.test.d.ts +0 -1
  224. package/dist/components/Popover/Popover.stories.d.ts +0 -5
  225. package/dist/components/Popover/Popover.test.d.ts +0 -1
  226. package/dist/components/ProgressBar/ProgressBar.stories.d.ts +0 -12
  227. package/dist/components/ProgressBar/ProgressBar.test.d.ts +0 -1
  228. package/dist/components/Radio/Radio.stories.d.ts +0 -8
  229. package/dist/components/Radio/Radio.test.d.ts +0 -1
  230. package/dist/components/Section/Section.test.d.ts +0 -1
  231. package/dist/components/Section/Sections.stories.d.ts +0 -5
  232. package/dist/components/Select/Select.stories.d.ts +0 -19
  233. package/dist/components/Select/Select.test.d.ts +0 -1
  234. package/dist/components/Select/SelectEmpty.test.d.ts +0 -1
  235. package/dist/components/Select/SelectOption.test.d.ts +0 -1
  236. package/dist/components/Select/useSelect.helpers.test.d.ts +0 -1
  237. package/dist/components/Select/useSelect.test.d.ts +0 -1
  238. package/dist/components/SideNavigation/Logo/Logo.test.d.ts +0 -1
  239. package/dist/components/SideNavigation/Menu/Menu.test.d.ts +0 -1
  240. package/dist/components/SideNavigation/Separator/Separator.test.d.ts +0 -1
  241. package/dist/components/SideNavigation/SideNavigation.stories.d.ts +0 -5
  242. package/dist/components/SideNavigation/SideNavigation.test.d.ts +0 -1
  243. package/dist/components/Steps/Steps.stories.d.ts +0 -5
  244. package/dist/components/Steps/Steps.test.d.ts +0 -1
  245. package/dist/components/Steps/useStep.test.d.ts +0 -1
  246. package/dist/components/Switch/Switch.stories.d.ts +0 -5
  247. package/dist/components/Switch/Switch.test.d.ts +0 -1
  248. package/dist/components/Table/Table.stories.d.ts +0 -61
  249. package/dist/components/Table/Table.test.d.ts +0 -1
  250. package/dist/components/Table/useSortBy.test.d.ts +0 -1
  251. package/dist/components/TablePagination/TablePagination.stories.d.ts +0 -5
  252. package/dist/components/TablePagination/TablePagination.test.d.ts +0 -1
  253. package/dist/components/Tabs/Tabs.stories.d.ts +0 -23
  254. package/dist/components/Tabs/Tabs.test.d.ts +0 -1
  255. package/dist/components/Tag/Tag.stories.d.ts +0 -63
  256. package/dist/components/Tag/Tag.test.d.ts +0 -1
  257. package/dist/components/Text/Text.stories.d.ts +0 -7
  258. package/dist/components/Text/Text.test.d.ts +0 -1
  259. package/dist/components/TextField/TextField.stories.d.ts +0 -11
  260. package/dist/components/TextField/TextField.test.d.ts +0 -1
  261. package/dist/components/Textarea/Textarea.stories.d.ts +0 -11
  262. package/dist/components/Textarea/Textarea.test.d.ts +0 -1
  263. package/dist/components/Toast/Toast.stories.d.ts +0 -12
  264. package/dist/components/Toast/Toast.test.d.ts +0 -1
  265. package/dist/components/ToggleGroup/Toggle.test.d.ts +0 -1
  266. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -6
  267. package/dist/components/ToggleGroup/ToggleGroup.test.d.ts +0 -1
  268. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -13
  269. package/dist/components/Tooltip/Tooltip.test.d.ts +0 -1
  270. package/dist/components/TopNavigation/Logo/Logo.test.d.ts +0 -1
  271. package/dist/components/TopNavigation/Menu/Menu.test.d.ts +0 -1
  272. package/dist/components/TopNavigation/TopNavigation.stories.d.ts +0 -5
  273. package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +0 -11
  274. package/dist/components/VisuallyHidden/VisuallyHidden.test.d.ts +0 -1
  275. package/dist/hooks/useClickOutside/useClickOutside.test.d.ts +0 -1
  276. package/dist/hooks/useDidMount/useDidMount.test.d.ts +0 -1
  277. package/dist/hooks/useFingerprint/useFingerprint.test.d.ts +0 -1
  278. package/dist/hooks/useFocusTrap/useFocusTrap.stories.d.ts +0 -7
  279. package/dist/hooks/useFocusTrap/useFocusTrap.test.d.ts +0 -1
  280. package/dist/hooks/useFocusWithin/useFocusWithin.test.d.ts +0 -1
  281. package/dist/hooks/useHeightExpansionToggler/useHeightExpansionToggler.test.d.ts +0 -1
  282. package/dist/hooks/useSelectable/SelectableStrategy.test.d.ts +0 -1
  283. package/dist/hooks/useSelectable/useSelectable.test.d.ts +0 -1
  284. package/dist/miranda-compatibility.theme-kYNEZ7mW.js.map +0 -1
  285. package/dist/prop-K2Z3EsyG.js.map +0 -1
  286. package/dist/styles/font.test.d.ts +0 -1
  287. package/dist/styles/typography.test.d.ts +0 -1
  288. package/dist/testing/SelectEvent/SelectEvent.test.d.ts +0 -1
  289. package/dist/toArray-Dxb1kUxx.js +0 -14
  290. package/dist/toArray-Dxb1kUxx.js.map +0 -1
  291. package/dist/tools/conditional.test.d.ts +0 -1
  292. package/dist/tools/prop.test.d.ts +0 -1
  293. package/dist/utils/toolset/flatten.d.ts +0 -2
  294. package/dist/utils/toolset/formatBytes.test.d.ts +0 -1
  295. package/dist/utils/toolset/getID.test.d.ts +0 -1
  296. package/dist/utils/toolset/getOrdinalSuffix.test.d.ts +0 -1
  297. package/dist/utils/toolset/highlightMatch.test.d.ts +0 -1
  298. package/dist/utils/toolset/interleave.test.d.ts +0 -1
  299. package/dist/utils/toolset/isThenable.d.ts +0 -5
  300. package/dist/utils/toolset/isThenable.test.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DragDropFile.context-oKnUu6d3.js","sources":["../src/components/DragDropFile/DragDropFile.context.tsx"],"sourcesContent":["import React, { createContext, useContext, useCallback, useMemo } from 'react'\n\nimport type { DragDropFileContextValue, DragDropFileProviderProps, FileWithStatus } from './types'\n\nexport const DragDropFileContext = createContext<DragDropFileContextValue | undefined>(undefined)\n\nexport const DragDropFileProvider = ({\n fileList,\n onFilesAdded,\n onFileRemoved,\n onRetryUpload,\n children,\n}: DragDropFileProviderProps): JSX.Element => {\n const onRemoveFile = useCallback(\n (removedItem: FileWithStatus, index: number) => {\n onFileRemoved([...fileList.slice(0, index), ...fileList.slice(index + 1)], removedItem, index)\n },\n [fileList]\n )\n\n const contextValue = useMemo(\n () => ({ fileList, onFilesAdded, onRemoveFile, onRetryUpload }),\n [fileList, onFilesAdded, onRemoveFile, onRetryUpload]\n )\n\n return (\n <DragDropFileContext.Provider value={contextValue}>{children}</DragDropFileContext.Provider>\n )\n}\n\nexport const useDragDropFileContext = (): DragDropFileContextValue => {\n const context = useContext(DragDropFileContext)\n\n if (!context) {\n throw new Error('useDragDropFileContext must be used within an DragDropFileProvider')\n }\n\n return context\n}\n"],"names":["DragDropFileContext","createContext","undefined","DragDropFileProvider","fileList","onFilesAdded","onFileRemoved","onRetryUpload","children","onRemoveFile","useCallback","removedItem","index","slice","contextValue","useMemo","useDragDropFileContext","context","useContext","Error"],"mappings":";AAIaA,MAAAA,sBAAsBC,cAAoDC,MAAS;AAEzF,MAAMC,uBAAuBA,CAAC;AAAA,EACnCC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AACyB,MAAmB;AAC5C,QAAMC,eAAeC,YACnB,CAACC,aAA6BC,UAAkB;AAC9CN,kBAAc,CAAC,GAAGF,SAASS,MAAM,GAAGD,KAAK,GAAG,GAAGR,SAASS,MAAMD,QAAQ,CAAC,CAAC,GAAGD,aAAaC,KAAK;AAAA,EAAA,GAE/F,CAACR,QAAQ,CACX;AAEMU,QAAAA,eAAeC,QACnB,OAAO;AAAA,IAAEX;AAAAA,IAAUC;AAAAA,IAAcI;AAAAA,IAAcF;AAAAA,MAC/C,CAACH,UAAUC,cAAcI,cAAcF,aAAa,CACtD;AAEA,sDACG,oBAAoB,UAApB,EAA6B,OAAOO,gBAAeN,QAAS;AAEjE;AAEO,MAAMQ,yBAAyBA,MAAgC;AAC9DC,QAAAA,UAAUC,WAAWlB,mBAAmB;AAE9C,MAAI,CAACiB,SAAS;AACN,UAAA,IAAIE,MAAM,oEAAoE;AAAA,EAAA;AAG/EF,SAAAA;AACT;"}
1
+ {"version":3,"file":"DragDropFile.context-oKnUu6d3.js","sources":["../src/components/DragDropFile/DragDropFile.context.tsx"],"sourcesContent":["import React, { createContext, useContext, useCallback, useMemo } from 'react'\n\nimport type { DragDropFileContextValue, DragDropFileProviderProps, FileWithStatus } from './types'\n\nexport const DragDropFileContext = createContext<DragDropFileContextValue | undefined>(undefined)\n\nexport const DragDropFileProvider = ({\n fileList,\n onFilesAdded,\n onFileRemoved,\n onRetryUpload,\n children,\n}: DragDropFileProviderProps) => {\n const onRemoveFile = useCallback(\n (removedItem: FileWithStatus, index: number) => {\n onFileRemoved([...fileList.slice(0, index), ...fileList.slice(index + 1)], removedItem, index)\n },\n [fileList]\n )\n\n const contextValue = useMemo(\n () => ({ fileList, onFilesAdded, onRemoveFile, onRetryUpload }),\n [fileList, onFilesAdded, onRemoveFile, onRetryUpload]\n )\n\n return (\n <DragDropFileContext.Provider value={contextValue}>{children}</DragDropFileContext.Provider>\n )\n}\n\nexport const useDragDropFileContext = (): DragDropFileContextValue => {\n const context = useContext(DragDropFileContext)\n\n if (!context) {\n throw new Error('useDragDropFileContext must be used within an DragDropFileProvider')\n }\n\n return context\n}\n"],"names":["DragDropFileContext","createContext","undefined","DragDropFileProvider","fileList","onFilesAdded","onFileRemoved","onRetryUpload","children","onRemoveFile","useCallback","removedItem","index","slice","contextValue","useMemo","useDragDropFileContext","context","useContext","Error"],"mappings":";AAIO,MAAMA,sBAAsBC,cAAoDC,MAAS;AAEzF,MAAMC,uBAAuBA,CAAC;AAAA,EACnCC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AACyB,MAAM;AAC/B,QAAMC,eAAeC,YACnB,CAACC,aAA6BC,UAAkB;AAC9CN,kBAAc,CAAC,GAAGF,SAASS,MAAM,GAAGD,KAAK,GAAG,GAAGR,SAASS,MAAMD,QAAQ,CAAC,CAAC,GAAGD,aAAaC,KAAK;AAAA,EAC/F,GACA,CAACR,QAAQ,CACX;AAEA,QAAMU,eAAeC,QACnB,OAAO;AAAA,IAAEX;AAAAA,IAAUC;AAAAA,IAAcI;AAAAA,IAAcF;AAAAA,EAAAA,IAC/C,CAACH,UAAUC,cAAcI,cAAcF,aAAa,CACtD;AAEA,sDACG,oBAAoB,UAApB,EAA6B,OAAOO,gBAAeN,QAAS;AAEjE;AAEO,MAAMQ,yBAAyBA,MAAgC;AACpE,QAAMC,UAAUC,WAAWlB,mBAAmB;AAE9C,MAAI,CAACiB,SAAS;AACZ,UAAM,IAAIE,MAAM,oEAAoE;AAAA,EACtF;AAEA,SAAOF;AACT;"}
@@ -1,4 +1,5 @@
1
+ import { default as React } from 'react';
1
2
  import { ButtonProps } from '../../components/Button';
2
3
  export type BackButtonProps = Omit<ButtonProps, 'children'>;
3
- declare function BackButton({ scale, ...others }: BackButtonProps): JSX.Element;
4
+ declare function BackButton({ scale, ...others }: BackButtonProps): React.JSX.Element;
4
5
  export default BackButton;
@@ -1,6 +1,7 @@
1
+ import { default as React } from 'react';
1
2
  import { ButtonProps } from '../../components/Button';
2
3
  export interface CloseButtonProps extends ButtonProps {
3
- size?: string | number;
4
+ readonly size?: string | number;
4
5
  }
5
- declare function CloseButton({ scale, size, ...others }: CloseButtonProps): JSX.Element;
6
+ declare function CloseButton({ scale, size, ...others }: CloseButtonProps): React.JSX.Element;
6
7
  export default CloseButton;
@@ -1,14 +1,14 @@
1
- import { LabelHTMLAttributes, ReactNode } from 'react';
2
- import { default as ColorScheme } from '../utils/types/ColorScheme';
1
+ import { LabelHTMLAttributes, ReactNode, default as React } from 'react';
2
+ import { ColorScheme } from '../utils/types/ColorScheme';
3
3
  export interface SelectionStyleProps {
4
- scale?: 'small' | 'default';
5
- scheme?: ColorScheme;
6
- disabled?: boolean;
4
+ readonly scale?: 'small' | 'default';
5
+ readonly scheme?: ColorScheme;
6
+ readonly disabled?: boolean;
7
7
  }
8
8
  export interface SelectionWrapperProps extends LabelHTMLAttributes<HTMLLabelElement>, SelectionStyleProps {
9
- selector: ReactNode;
10
- leading?: ReactNode;
11
- trailing?: ReactNode;
9
+ readonly selector: ReactNode;
10
+ readonly leading?: ReactNode;
11
+ readonly trailing?: ReactNode;
12
12
  }
13
- declare function SelectionWrapper({ selector, children, leading, trailing, className, disabled, ...others }: SelectionWrapperProps): JSX.Element;
13
+ declare function SelectionWrapper({ selector, children, leading, trailing, className, disabled, ...others }: SelectionWrapperProps): React.JSX.Element;
14
14
  export default SelectionWrapper;
@@ -1,10 +1,10 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, default as React } from 'react';
2
2
  type AccordionContextType = [boolean, () => void];
3
3
  declare function AccordionProvider({ expanded, children, onExpandedChange, initialExpanded, }: {
4
- children: ReactNode;
5
- initialExpanded?: boolean;
6
- expanded?: boolean;
7
- onExpandedChange?: (expanded: boolean) => void;
8
- }): JSX.Element;
4
+ readonly children: ReactNode;
5
+ readonly initialExpanded?: boolean;
6
+ readonly expanded?: boolean;
7
+ readonly onExpandedChange?: (expanded: boolean) => void;
8
+ }): React.JSX.Element;
9
9
  declare function useAccordionContext(): AccordionContextType;
10
10
  export { AccordionProvider, useAccordionContext };
@@ -1,17 +1,17 @@
1
- import { PropsWithChildren, HTMLAttributes, ReactNode } from 'react';
2
- export type AccordionToggleProps = {
3
- leading?: ReactNode | ((expanded: boolean) => ReactNode);
4
- trailing?: ReactNode | ((expanded: boolean) => ReactNode);
5
- };
6
- declare function AccordionToggle({ leading, trailing: propsTrailing, children, }: PropsWithChildren<AccordionToggleProps>): JSX.Element;
1
+ import { default as React, PropsWithChildren, HTMLAttributes, ReactNode } from 'react';
2
+ export interface AccordionToggleProps {
3
+ readonly leading?: ReactNode | ((expanded: boolean) => ReactNode);
4
+ readonly trailing?: ReactNode | ((expanded: boolean) => ReactNode);
5
+ }
6
+ declare function AccordionToggle({ leading, trailing: propsTrailing, children, }: PropsWithChildren<AccordionToggleProps>): React.JSX.Element;
7
7
  export type AccordionBodyProps = HTMLAttributes<HTMLElement>;
8
- declare function AccordionBody({ children, ...props }: PropsWithChildren<AccordionBodyProps>): JSX.Element;
8
+ declare function AccordionBody({ children, ...props }: PropsWithChildren<AccordionBodyProps>): React.JSX.Element;
9
9
  export interface AccordionProps extends HTMLAttributes<HTMLElement> {
10
- expanded?: boolean;
11
- initialExpanded?: boolean;
12
- onExpandedChange?: (expanded: boolean) => void;
10
+ readonly expanded?: boolean;
11
+ readonly initialExpanded?: boolean;
12
+ readonly onExpandedChange?: (expanded: boolean) => void;
13
13
  }
14
- declare function Accordion({ children, expanded, initialExpanded, onExpandedChange, ...others }: AccordionProps): JSX.Element;
14
+ declare function Accordion({ children, expanded, initialExpanded, onExpandedChange, ...others }: AccordionProps): React.JSX.Element;
15
15
  declare namespace Accordion {
16
16
  var Toggle: typeof AccordionToggle;
17
17
  var Body: typeof AccordionBody;
@@ -1,25 +1,25 @@
1
- import { default as React, ReactElement } from 'react';
2
- import { default as DefaultCloseButton } from '../../common/CloseButton';
1
+ import { ReactNode, default as React } from 'react';
2
+ import { StyledComponent } from 'styled-components';
3
3
  export interface BannerProps {
4
- className?: string;
5
- variant?: 'success' | 'danger' | 'warning' | 'neutral';
6
- icon?: JSX.Element;
7
- scale?: 'default' | 'large';
8
- title?: string | ReactElement;
9
- description?: string | ReactElement;
10
- onClose?: () => void;
11
- dismissible?: boolean;
4
+ readonly className?: string;
5
+ readonly variant?: 'success' | 'danger' | 'warning' | 'neutral';
6
+ readonly icon?: ReactNode;
7
+ readonly scale?: 'default' | 'large';
8
+ readonly title?: string | ReactNode;
9
+ readonly description?: string | ReactNode;
10
+ readonly onClose?: () => void;
11
+ readonly dismissible?: boolean;
12
12
  }
13
13
  export interface BannerActionProps extends BannerProps {
14
- action?: string;
15
- secondaryAction?: string;
16
- onActionButtonClick?: () => void;
17
- onSecondaryActionButtonClick?: () => void;
14
+ readonly action?: string;
15
+ readonly secondaryAction?: string;
16
+ readonly onActionButtonClick?: () => void;
17
+ readonly onSecondaryActionButtonClick?: () => void;
18
18
  }
19
- export declare const CloseButton: import('styled-components').StyledComponent<typeof DefaultCloseButton, any, {}, never>;
20
- export declare const Icon: import('styled-components').StyledComponent<React.ComponentType<import('../IconFactory').IconProps<import('../IconFactory').IconMapping>>, any, {}, never>;
19
+ export declare const CloseButton: StyledComponent<any, any, any, any>;
20
+ export declare const Icon: StyledComponent<any, any, any, any>;
21
21
  declare function Banner({ scale, variant, icon, title, description, onClose, dismissible, ...others }: BannerProps): React.JSX.Element | null;
22
22
  export declare function BannerLarge({ scale, variant, icon, title, description, onClose, dismissible, ...others }: BannerProps): React.JSX.Element | null;
23
- export declare function BannerAction({ scale, variant, icon, title, action, secondaryAction, onActionButtonClick, onSecondaryActionButtonClick, ...others }: BannerActionProps): JSX.Element;
23
+ export declare function BannerAction({ scale, variant, icon, title, action, secondaryAction, onActionButtonClick, onSecondaryActionButtonClick, ...others }: BannerActionProps): React.JSX.Element;
24
24
  export declare function BannerActionLarge({ scale, variant, icon, title, description, action, secondaryAction, onActionButtonClick, onSecondaryActionButtonClick, onClose, dismissible, ...others }: BannerActionProps): React.JSX.Element | null;
25
25
  export default Banner;
@@ -1,8 +1,8 @@
1
- import { HTMLAttributes } from 'react';
1
+ import { HTMLAttributes, default as React } from 'react';
2
2
  export interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
3
- active?: boolean;
4
- label: string;
5
- url?: string;
3
+ readonly active?: boolean;
4
+ readonly label: string;
5
+ readonly url?: string;
6
6
  }
7
- declare function Breadcrumb({ active, label, url, ...rest }: BreadcrumbProps): JSX.Element;
7
+ declare function Breadcrumb({ active, label, url, ...rest }: BreadcrumbProps): React.JSX.Element;
8
8
  export default Breadcrumb;
@@ -1,10 +1,10 @@
1
- import { MouseEvent } from 'react';
1
+ import { MouseEvent, default as React } from 'react';
2
2
  import { BreadcrumbProps } from './Breadcrumb';
3
3
  export interface BreadcrumbsProps {
4
- className?: string;
5
- disabled?: boolean;
6
- entries: BreadcrumbProps[];
7
- onBack?: (e: MouseEvent<HTMLButtonElement>) => void;
4
+ readonly className?: string;
5
+ readonly disabled?: boolean;
6
+ readonly entries: BreadcrumbProps[];
7
+ readonly onBack?: (e: MouseEvent<HTMLButtonElement>) => void;
8
8
  }
9
- declare function Breadcrumbs({ entries, onBack, disabled, ...others }: BreadcrumbsProps): JSX.Element;
9
+ declare function Breadcrumbs({ entries, onBack, disabled, ...others }: BreadcrumbsProps): React.JSX.Element;
10
10
  export default Breadcrumbs;
@@ -1,20 +1,21 @@
1
1
  import { default as React, ButtonHTMLAttributes, ReactNode } from 'react';
2
2
  import { IconProps } from '../Icon';
3
- import { default as ColorScheme } from '../../utils/types/ColorScheme';
3
+ import { ColorScheme } from '../../utils/types/ColorScheme';
4
+ import { StyledComponent } from 'styled-components';
4
5
  export type ButtonVariants = 'primary' | 'secondary' | 'warning' | 'icon' | 'tertiary';
5
6
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
6
- className?: string;
7
- leading?: ReactNode;
8
- scheme?: ColorScheme;
9
- trailing?: ReactNode;
10
- variant?: ButtonVariants;
11
- scale?: 'small' | 'default' | 'large';
12
- loading?: boolean;
7
+ readonly className?: string;
8
+ readonly leading?: ReactNode;
9
+ readonly scheme?: ColorScheme;
10
+ readonly trailing?: ReactNode;
11
+ readonly variant?: ButtonVariants;
12
+ readonly scale?: 'small' | 'default' | 'large';
13
+ readonly loading?: boolean;
13
14
  }
14
- export declare const Children: import('styled-components').StyledComponent<"span", any, ButtonProps, never>;
15
+ export declare const Children: StyledComponent<"span", any, ButtonProps, never>;
15
16
  export declare const BaseButton: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
16
17
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
17
- export declare function Caret(props: Omit<IconProps, 'name'>): JSX.Element;
18
+ export declare function Caret(props: Omit<IconProps, 'name'>): React.JSX.Element;
18
19
  export declare const SelectorButton: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
19
20
  export type IconButtonProps = Omit<ButtonProps, 'leading' | 'trailing' | 'variant' | 'loading'>;
20
21
  export declare const IconButton: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,9 +1,10 @@
1
+ import { default as React } from 'react';
1
2
  import { CalendarProps, GenericCalendarProps } from './Calendar.types';
2
3
  /**
3
4
  * Implementation based on
4
5
  * * https://medium.com/swlh/build-a-date-picker-in-15mins-using-javascript-react-from-scratch-f6932c77db09
5
6
  * * https://codepen.io/zellwk/pen/xNpKwp
6
7
  */
7
- export declare function GenericCalendar(props: GenericCalendarProps): JSX.Element;
8
- declare function Calendar(props: CalendarProps): JSX.Element;
8
+ export declare function GenericCalendar(props: GenericCalendarProps): React.JSX.Element;
9
+ declare function Calendar(props: CalendarProps): React.JSX.Element;
9
10
  export default Calendar;
@@ -1,2 +1,3 @@
1
- export declare const formatter: import('./DateFormat.helper').DateFormat;
1
+ import { DateFormat } from './DateFormat.helper';
2
+ export declare const formatter: DateFormat;
2
3
  export declare function getSelection(selection?: number | string | null | [number | string | null, number | string | null]): [null | number, null | number];
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  import { CalendarDate, CalendarConstraint } from './Date.helper';
3
- export type RenderableMonth = {
3
+ export interface RenderableMonth {
4
4
  month: number;
5
5
  year: number;
6
6
  days: CalendarDate[];
7
- };
7
+ }
8
8
  export type CalendarMode = 'single' | 'range';
9
9
  export interface useCalendarProps {
10
10
  year?: number;
@@ -45,8 +45,8 @@ export interface CalendarPickerProps {
45
45
  onYearClick?: (year: number) => void;
46
46
  }
47
47
  export interface usePickerModeReturn {
48
- get(): PickerMode;
49
- is(other: PickerMode): boolean;
48
+ get: () => PickerMode;
49
+ is: (other: PickerMode) => boolean;
50
50
  dispatch: React.Dispatch<PickerModeAction>;
51
51
  Picker: (props: CalendarPickerProps) => JSX.Element;
52
52
  }
@@ -1,9 +1,9 @@
1
- export type DateHelperOptions = {
1
+ export interface DateHelperOptions {
2
2
  normalize?: boolean;
3
- };
3
+ }
4
4
  export declare const DEFAULT_OPTIONS: DateHelperOptions;
5
5
  export type InputDate = string | number | Date;
6
- type Unit = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond';
6
+ export type Unit = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond';
7
7
  type Operator = '>=' | '>' | '=' | '<' | '<=';
8
8
  export type DateConstraint = InputDate | [InputDate, InputDate] | [null, InputDate] | [InputDate, null];
9
9
  export type FunctionConstraint = (day: CalendarDate) => boolean;
@@ -11,126 +11,104 @@ export type CalendarConstraint = DateConstraint | FunctionConstraint;
11
11
  export interface CalendarDate {
12
12
  /**
13
13
  * Get `Date` object representing this date.
14
- * @returns {Date}
15
14
  */
16
- get(): Date;
15
+ get: () => Date;
17
16
  /**
18
17
  * Get the year using Universal Coordinated Time (UTC).
19
- * @returns {number}
20
18
  */
21
- getYear(): number;
19
+ getYear: () => number;
22
20
  /**
23
21
  * Gets the month using Universal Coordinated Time (UTC).
24
- * @returns {number}
25
22
  */
26
- getMonth(): number;
23
+ getMonth: () => number;
27
24
  /**
28
25
  * Get the day-of-the-month, using Universal Coordinated Time (UTC).
29
- * @returns {number}
30
26
  */
31
- getDate(): number;
27
+ getDate: () => number;
32
28
  /**
33
29
  * Get the time value in milliseconds.
34
30
  *
35
31
  * [!] Be aware that it might be normalized to 12:00:00 (UTC), if you did not call the helper with
36
32
  * `options.normalize: false`.
37
33
  *
38
- * @returns {number}
39
34
  */
40
- getTime(): number;
35
+ getTime: () => number;
41
36
  /**
42
37
  * Get the day of the week.
43
38
  *
44
39
  * [!] Be aware that it might be normalized to 12:00:00 (UTC), if you did not call the helper with
45
40
  * `options.normalize: false`.
46
41
  *
47
- * @returns {number}
48
42
  */
49
- getWeekday(): number;
43
+ getWeekday: () => number;
50
44
  /**
51
45
  * Get the hours value.
52
46
  *
53
47
  * [!] Be aware that it might be normalized to 12:00:00 (UTC), if you did not call the helper with
54
48
  * `options.normalize: false`.
55
49
  *
56
- * @returns {number}
57
50
  */
58
- getHours(): number;
51
+ getHours: () => number;
59
52
  /**
60
53
  * Get the minutes value.
61
54
  *
62
55
  * [!] Be aware that it might be normalized to 12:00:00 (UTC), if you did not call the helper with
63
56
  * `options.normalize: false`.
64
57
  *
65
- * @returns {number}
66
58
  */
67
- getMinutes(): number;
59
+ getMinutes: () => number;
68
60
  /**
69
61
  * Get the seconds value.
70
62
  *
71
63
  * [!] Be aware that it might be normalized to 12:00:00 (UTC), if you did not call the helper with
72
64
  * `options.normalize: false`.
73
65
  *
74
- * @returns {number}
75
66
  */
76
- getSeconds(): number;
67
+ getSeconds: () => number;
77
68
  /**
78
69
  * Get the milliseconds value.
79
70
  *
80
71
  * [!] Be aware that it might be normalized to 12:00:00 (UTC), if you did not call the helper with
81
72
  * `options.normalize: false`.
82
73
  *
83
- * @returns {number}
84
74
  */
85
- getMilliseconds(): number;
75
+ getMilliseconds: () => number;
86
76
  /**
87
77
  * Check if the current date matches **at least one** of the provided constraints.
88
78
  *
89
79
  * [!] Be aware that all dates in this comparison will be normalized to 12:00:00 (UTC).
90
80
  *
91
- * @param {...CalendarConstraint[]} constraintsArg
92
- * @returns {boolean}
93
81
  */
94
- matches(...constraints: CalendarConstraint[]): boolean;
82
+ matches: (...constraints: CalendarConstraint[]) => boolean;
95
83
  /**
96
84
  * Set the given `value` to the `unit` property of this instance.
97
85
  * This function mutates the internal date instance.
98
- * @param {Unit} unit
99
- * @param {number} value
100
- * @returns {CalendarDate}
101
86
  */
102
- set(unit: Unit, value: number): CalendarDate;
87
+ set: (unit: Unit, value: number) => CalendarDate;
103
88
  /**
104
89
  * Return a copy of this instance, adding the given `value` to the `unit` property.
105
- * @param {Unit} unit
106
- * @param {number} value
107
- * @returns {CalendarDate}
108
90
  */
109
- add(unit: Unit, value: number): CalendarDate;
91
+ add: (unit: Unit, value: number) => CalendarDate;
110
92
  /**
111
93
  * Return a copy of this instance, subtracting the given `value` from the `unit` property.
112
- * @param {Unit} unit
113
- * @param {number} value
114
- * @returns {CalendarDate}
115
94
  */
116
- subtract(unit: Unit, value: number): CalendarDate;
95
+ subtract: (unit: Unit, value: number) => CalendarDate;
117
96
  /**
118
97
  * Compare this date with the given `other`.
119
98
  *
120
99
  * [!] Be aware that it might be normalized to 12:00:00 (UTC), if you did not call the helper with
121
100
  * `options.normalize: false`.
122
101
  *
123
- * @param {Operator} operator - type of comparison to be performed.
124
- * @param {CalendarDate} other - Other `CalendarDate` to compare with.
125
- * @param {Unit} [precision] - notice that the precision increases with the evaluated period, so year < month < day < hour < minute < second < millisecond. Default is 'day'.
126
- * @return {boolean} comparison result
102
+ * @param operator - type of comparison to be performed.
103
+ * @param other - Other `CalendarDate` to compare with.
104
+ * @param precision - notice that the precision increases with the evaluated period, so year < month < day < hour < minute < second < millisecond. Default is 'day'.
105
+ * @return comparison result
127
106
  */
128
- is(operator: Operator, other: CalendarDate, precision?: string): boolean;
107
+ is: (operator: Operator, other: CalendarDate, precision?: Unit) => boolean;
129
108
  /**
130
109
  * Return this date as a string value in ISO format.
131
- * @returns {string}
132
110
  */
133
- toString(): string;
111
+ toString: () => string;
134
112
  }
135
113
  export type CalendarDateRange = [CalendarDate | null, CalendarDate | null];
136
114
  /**
@@ -145,8 +123,7 @@ export type CalendarDateRange = [CalendarDate | null, CalendarDate | null];
145
123
  * of this when using this helper for time relate logic.
146
124
  * You can disable this behavior by passing `options.normalize: false`.
147
125
  *
148
- * @param {InputDate} [dateArg]
149
- * @return {CalendarDate}
126
+ * @param dateArg - The input date.
150
127
  */
151
128
  declare function DateHelper(dateArg?: InputDate, optionsArg?: DateHelperOptions): CalendarDate;
152
129
  /**
@@ -161,9 +138,9 @@ declare function DateHelper(dateArg?: InputDate, optionsArg?: DateHelperOptions)
161
138
  * // 1665680400000 is equal to: new Date('2022-10-13T17:00:00.000Z').getTime()
162
139
  * ```
163
140
  *
164
- * @param {Date} date
165
- * @param {Unit} precision
166
- * @returns {number}
141
+ * @param date - The input date.
142
+ * @param precision - The unit of precision for normalization.
143
+ * @returns The timestamp of the normalized date.
167
144
  */
168
145
  export declare function getComparableDate(date: Date, precision?: Unit): number;
169
146
  /**
@@ -190,14 +167,10 @@ export declare function getComparableDate(date: Date, precision?: Unit): number;
190
167
  * getConstraintRange([null, 1643371200000]) // returns [0, 1643371200000]
191
168
  * getConstraintRange([null, '2022-01-28T12:00:00.000Z']) // returns [0, 1643371200000]
192
169
  * ```
193
- * @param rangeArg
194
- * @returns
195
170
  */
196
171
  export declare function getConstraintRange(rangeArg: DateConstraint): [number, number];
197
172
  /**
198
173
  * Wrap range constraint into a function and return a function constraint untouched.
199
- * @param {CalendarConstraint} constraint
200
- * @returns {(day: CalendarDate) => boolean}
201
174
  */
202
175
  export declare function getConstraintEvaluator(constraint: CalendarConstraint): (day: CalendarDate) => boolean;
203
176
  export declare function padded(value: number | string, maxLength?: number): string;
@@ -1,6 +1,6 @@
1
1
  import { CalendarDate } from './Date.helper';
2
2
  export interface DateFormat {
3
- format(date: CalendarDate): string;
3
+ format: (date: CalendarDate) => string;
4
4
  }
5
5
  /**
6
6
  * This helpers provides a convenient layer on top of `Intl.DateTimeFormat`,
@@ -29,7 +29,5 @@ export default function DateFormatHelper(format: string): DateFormat;
29
29
  *| Ordinal numbers | o | 1st, 2nd, 3rd, ..., 10th |
30
30
  *| Scaped sequence | [] | |
31
31
  *
32
- * @param format
33
- * @returns
34
32
  */
35
33
  export declare function tokenizer(format: string): string[];
@@ -37,20 +37,20 @@ export declare const MONTH_BY_ALIAS: {
37
37
  december: string;
38
38
  };
39
39
  export type CalendarMonthAlias = keyof typeof MONTH_BY_ALIAS;
40
- export type CalendarMonth = {
40
+ export interface CalendarMonth {
41
41
  name: string;
42
42
  /**
43
43
  * Integer value representing the month, beginning with 0 for January to 11 for December.
44
44
  * Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date
45
45
  */
46
46
  index: number;
47
- };
47
+ }
48
48
  export declare const MONTH_BY_NAME: Record<string, CalendarMonth>;
49
49
  declare function getAllMonths(): CalendarMonth[];
50
50
  declare function MonthHelper(alias: CalendarMonthAlias): {
51
- get(): CalendarMonth;
52
- format(representation?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow'): string;
53
- is(other: CalendarMonthAlias): boolean;
51
+ get: () => CalendarMonth;
52
+ format: (representation?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow') => string;
53
+ is: (other: CalendarMonthAlias) => boolean;
54
54
  };
55
55
  declare namespace MonthHelper {
56
56
  var getAll: typeof getAllMonths;
@@ -1,5 +1,6 @@
1
+ import { default as React } from 'react';
1
2
  import { ButtonProps } from '../Button';
2
3
  declare function PickerModeToggle(props: Omit<ButtonProps & {
3
4
  expanded: boolean;
4
- }, 'trailing'>): JSX.Element;
5
+ }, 'trailing'>): React.JSX.Element;
5
6
  export default PickerModeToggle;
@@ -1,9 +1,11 @@
1
+ import { default as React } from 'react';
1
2
  import { CalendarPickerProps } from '../Calendar.types';
3
+ import { DateFormat } from '..';
2
4
  export declare const WEEKDAYS: string[];
3
- export declare const formatter: import('..').DateFormat;
5
+ export declare const formatter: DateFormat;
4
6
  /**
5
7
  * filling days of previous month
6
8
  * TODO: supress this for range selection
7
9
  */
8
- declare function CalendarDayPicker({ calendar, onDayClick }: CalendarPickerProps): JSX.Element;
10
+ declare function CalendarDayPicker({ calendar, onDayClick }: CalendarPickerProps): React.JSX.Element;
9
11
  export default CalendarDayPicker;
@@ -1,3 +1,4 @@
1
+ import { default as React } from 'react';
1
2
  import { CalendarPickerProps } from '../Calendar.types';
2
- declare function CalendarMonthPicker({ calendar, mode }: CalendarPickerProps): JSX.Element;
3
+ declare function CalendarMonthPicker({ calendar, mode }: CalendarPickerProps): React.JSX.Element;
3
4
  export default CalendarMonthPicker;
@@ -1,4 +1,3 @@
1
- declare const _default: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<import('../../Button').ButtonProps & import('react').RefAttributes<HTMLButtonElement>>, any, {
2
- $status: "default" | "current-day" | "faded" | "selection-start" | "selection-end" | "selection" | "next-month-day";
3
- }, never>;
1
+ import { StyledComponent } from 'styled-components';
2
+ declare const _default: StyledComponent<any, any, any, any>;
4
3
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { default as React } from 'react';
1
2
  import { CalendarPickerProps } from '../Calendar.types';
2
- declare function CalendarYearPicker({ calendar, mode }: CalendarPickerProps): JSX.Element;
3
+ declare function CalendarYearPicker({ calendar, mode }: CalendarPickerProps): React.JSX.Element;
3
4
  export default CalendarYearPicker;
@@ -1,18 +1,13 @@
1
1
  import { useCalendarProps, useCalendarReturn, RenderableMonth } from './Calendar.types';
2
2
  declare function useCalendar(props: useCalendarProps): useCalendarReturn;
3
3
  /**
4
- * Generate the whole grid of days,
5
- * @param {number} year
6
- * @param {number }month
7
- * @returns {RenderableMonth}
4
+ * Generate the whole grid of days
8
5
  */
9
6
  export declare function getRenderableMonth(year: number, month: number): RenderableMonth;
10
7
  /**
11
- *
12
- * @param {number} year
13
- * @param {number} month
14
- * @param {number?} amount - number of months to be generated. Default value is 1.
15
- * @returns
8
+ * @param year - year number, e.g., 2022
9
+ * @param month - month index, where 0 is January and 11 is December
10
+ * @param amount - number of months to be generated. Default value is 1.
16
11
  */
17
12
  export declare function getRenderableMonths(year: number, month: number, amount?: number): ReturnType<typeof getRenderableMonth>[];
18
13
  export declare function getSelectionPair(selected?: null | [string | number | null, string | number | null]): [number | null, number | null];
@@ -1,12 +1,12 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
1
+ import { HTMLAttributes, ReactNode, default as React } from 'react';
2
2
  import { default as CardTitle } from './CardTitle';
3
3
  import { default as Status } from '../../utils/types/Status';
4
4
  export interface CardProps extends HTMLAttributes<HTMLElement> {
5
- children: ReactNode;
6
- status?: Status;
7
- flagged?: boolean;
5
+ readonly children: ReactNode;
6
+ readonly status?: Status;
7
+ readonly flagged?: boolean;
8
8
  }
9
- declare function Card({ flagged, status, children, ...others }: CardProps): JSX.Element;
9
+ declare function Card({ flagged, status, children, ...others }: CardProps): React.JSX.Element;
10
10
  declare namespace Card {
11
11
  var Title: typeof CardTitle;
12
12
  var Subtitle: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,8 +1,9 @@
1
- import { ReactNode, HTMLAttributes } from 'react';
1
+ import { ReactNode, HTMLAttributes, default as React } from 'react';
2
+ import { StyledComponent } from 'styled-components';
2
3
  export interface CardTitleProps extends HTMLAttributes<HTMLElement> {
3
- leading?: ReactNode;
4
+ readonly leading?: ReactNode;
4
5
  }
5
- declare const Wrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
6
- declare function CardTitle({ children, leading, ...others }: CardTitleProps): JSX.Element;
6
+ declare const Wrapper: StyledComponent<"div", any, {}, never>;
7
+ declare function CardTitle({ children, leading, ...others }: CardTitleProps): React.JSX.Element;
7
8
  export { Wrapper as CardTitleWrapper };
8
9
  export default CardTitle;
@@ -1,10 +1,10 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
2
- import { default as ColorScheme } from '../../utils/types/ColorScheme';
1
+ import { InputHTMLAttributes, ReactNode, default as React } from 'react';
2
+ import { ColorScheme } from '../../utils/types/ColorScheme';
3
3
  import { SelectionStyleProps } from '../../common/SelectionWrapper';
4
- export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement>, SelectionStyleProps {
5
- leading?: ReactNode;
6
- scheme?: ColorScheme;
7
- trailing?: ReactNode;
4
+ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'disabled'>, SelectionStyleProps {
5
+ readonly leading?: ReactNode;
6
+ readonly scheme?: ColorScheme;
7
+ readonly trailing?: ReactNode;
8
8
  }
9
- declare function Checkbox({ className, disabled, children, leading, trailing, scheme, scale, ...others }: CheckboxProps): JSX.Element;
9
+ declare function Checkbox({ className, disabled, children, leading, trailing, scheme, scale, ...others }: CheckboxProps): React.JSX.Element;
10
10
  export default Checkbox;