uikit-react-public 0.11.20 → 0.14.21

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 (295) hide show
  1. package/dist/components/Badge/Badge.d.ts +6 -0
  2. package/dist/components/Badge/Badge.stories.d.ts +15 -0
  3. package/dist/components/Badge/index.d.ts +2 -0
  4. package/dist/components/Button/Button.d.ts +2 -1
  5. package/dist/components/Calendar/Calendar.d.ts +3 -0
  6. package/dist/components/Calendar/Calendar.stories.d.ts +42 -0
  7. package/dist/components/Calendar/Calendar.types.d.ts +18 -0
  8. package/dist/components/Calendar/index.d.ts +2 -0
  9. package/dist/components/Calendar/subcomponents/AcademicWeeks.d.ts +7 -0
  10. package/dist/components/Calendar/subcomponents/ColumnHeading.d.ts +7 -0
  11. package/dist/components/Calendar/subcomponents/Controls.d.ts +6 -0
  12. package/dist/components/{Datepicker/subcomponents/Day → Calendar/subcomponents}/Day.d.ts +3 -3
  13. package/dist/components/{Datepicker → Calendar}/subcomponents/EventDot.d.ts +2 -2
  14. package/dist/components/Calendar/subcomponents/Grid.d.ts +11 -0
  15. package/dist/components/Calendar/subcomponents/index.d.ts +7 -0
  16. package/dist/components/{Datepicker → Calendar}/utils/getAcademicWeekNumbers/getAcademicWeekNumbers.d.ts +1 -1
  17. package/dist/components/Calendar/utils/index.d.ts +4 -0
  18. package/dist/components/Calendar/utils/normaliseMonth/normaliseMonth.d.ts +9 -0
  19. package/dist/components/Calendar/utils/parseDateFromString/parseDateFromString.d.ts +9 -0
  20. package/dist/components/Calendar/utils/parseDateFromString/parseDateFromString.test.d.ts +1 -0
  21. package/dist/components/CookieNotice/CookieNotice.d.ts +16 -0
  22. package/dist/components/CookieNotice/index.d.ts +2 -0
  23. package/dist/components/Datepicker/Datepicker.d.ts +3 -16
  24. package/dist/components/Datepicker/Datepicker.stories.d.ts +9 -3
  25. package/dist/components/Datepicker/Datepicker.types.d.ts +23 -7
  26. package/dist/components/Datepicker/index.d.ts +1 -2
  27. package/dist/components/Datepicker/subcomponents/CustomDatepicker.d.ts +17 -0
  28. package/dist/components/Datepicker/subcomponents/DatepickerInput.d.ts +10 -0
  29. package/dist/components/Datepicker/subcomponents/NativeDatepicker.d.ts +6 -0
  30. package/dist/components/Datepicker/subcomponents/Panel.d.ts +6 -0
  31. package/dist/components/Datepicker/subcomponents/VisibleField.d.ts +12 -0
  32. package/dist/components/Datepicker/subcomponents/index.d.ts +5 -7
  33. package/dist/components/Datepicker/utils/dateToLocaleISOString/dateToLocaleISOString.d.ts +17 -0
  34. package/dist/components/Datepicker/utils/dateToLocaleISOString/dateToLocaleISOString.test.d.ts +1 -0
  35. package/dist/components/Datepicker/utils/index.d.ts +2 -3
  36. package/dist/components/Datepicker/utils/parseInputValue/parseInputValue.d.ts +11 -0
  37. package/dist/components/Datepicker/utils/parseInputValue/parseInputValue.test.d.ts +1 -0
  38. package/dist/components/Dialog/BaseDialog.d.ts +7 -2
  39. package/dist/components/FileInput/FileInput.d.ts +8 -0
  40. package/dist/components/FileInput/FileInput.stories.d.ts +16 -0
  41. package/dist/components/FileInput/__tests__/FileInput.test.d.ts +1 -0
  42. package/dist/components/FileInput/index.d.ts +2 -0
  43. package/dist/components/Footer/Footer.d.ts +1 -1
  44. package/dist/components/Header/Header.d.ts +4 -1
  45. package/dist/components/Heading/Heading.d.ts +1 -1
  46. package/dist/components/Link/BaseLink.d.ts +10 -0
  47. package/dist/components/Link/Link.d.ts +5 -10
  48. package/dist/components/Link/Link.stories.d.ts +1 -1
  49. package/dist/components/Link/index.d.ts +1 -1
  50. package/dist/components/Menu/Menu.d.ts +2 -1
  51. package/dist/components/Menu/MenuContent.d.ts +2 -1
  52. package/dist/components/Menu/MenuItem.d.ts +2 -0
  53. package/dist/components/Menu/MenuSection.d.ts +1 -1
  54. package/dist/components/Search/Search.d.ts +16 -0
  55. package/dist/components/Search/Search.stories.d.ts +34 -0
  56. package/dist/components/Search/__tests__/Search.test.d.ts +1 -0
  57. package/dist/components/Search/index.d.ts +2 -0
  58. package/dist/components/Select/Select.d.ts +1 -1
  59. package/dist/components/Select/Select.stories.d.ts +3 -7
  60. package/dist/components/Select/Select.types.d.ts +19 -14
  61. package/dist/components/Select/subcomponents/CustomOption.d.ts +1 -1
  62. package/dist/components/Select/subcomponents/CustomSelect.d.ts +1 -2
  63. package/dist/components/Select/subcomponents/Panel.d.ts +1 -1
  64. package/dist/components/Select/subcomponents/VisibleField.d.ts +4 -4
  65. package/dist/components/StandaloneLink/StandaloneLink.d.ts +12 -0
  66. package/dist/components/StandaloneLink/StandaloneLink.stories.d.ts +13 -0
  67. package/dist/components/StandaloneLink/__tests__/StandaloneLink.test.d.ts +1 -0
  68. package/dist/components/StandaloneLink/index.d.ts +2 -0
  69. package/dist/components/Table/Table.d.ts +10 -8
  70. package/dist/components/Table/Table.stories.d.ts +21 -0
  71. package/dist/components/Table/Table.types.d.ts +11 -0
  72. package/dist/components/Table/__tests__/Table.test.d.ts +1 -0
  73. package/dist/components/Table/index.d.ts +2 -1
  74. package/dist/components/Table/subcomponents/Body.d.ts +4 -0
  75. package/dist/components/Table/subcomponents/Cell/Cell.d.ts +12 -0
  76. package/dist/components/Table/subcomponents/Cell/Cell.stories.d.ts +313 -0
  77. package/dist/components/Table/subcomponents/Cell/CellContent.d.ts +10 -0
  78. package/dist/components/Table/subcomponents/Cell/__tests__/Cell.test.d.ts +1 -0
  79. package/dist/components/Table/subcomponents/Head.d.ts +4 -0
  80. package/dist/components/Table/subcomponents/HeadCell/HeadCell.d.ts +13 -0
  81. package/dist/components/Table/subcomponents/HeadCell/HeadCell.stories.d.ts +312 -0
  82. package/dist/components/Table/subcomponents/HeadCell/HeadCellContent.d.ts +10 -0
  83. package/dist/components/Table/subcomponents/HeadCell/__tests__/HeadCell.test.d.ts +1 -0
  84. package/dist/components/Table/subcomponents/Row.d.ts +5 -0
  85. package/dist/components/Table/subcomponents/SortIcon.d.ts +7 -0
  86. package/dist/components/Table/subcomponents/index.d.ts +10 -0
  87. package/dist/components/Tabs/Tab.d.ts +1 -1
  88. package/dist/components/Tabs/TabContext.d.ts +1 -0
  89. package/dist/components/Tabs/Tabs.d.ts +3 -1
  90. package/dist/components/Tabs/Tabs.stories.d.ts +3 -0
  91. package/dist/components/Timepicker/Timepicker.d.ts +10 -0
  92. package/dist/components/Timepicker/Timepicker.stories.d.ts +7 -0
  93. package/dist/components/Timepicker/__tests__/Timepicker.test.d.ts +1 -0
  94. package/dist/components/Timepicker/index.d.ts +2 -0
  95. package/dist/components/Timepicker/utils/convertDateToTimeString.d.ts +2 -0
  96. package/dist/components/Timepicker/utils/convertDateToTimeString.test.d.ts +1 -0
  97. package/dist/components/Timepicker/utils/index.d.ts +1 -0
  98. package/dist/components/WeekPicker/WeekPicker.d.ts +3 -0
  99. package/dist/components/WeekPicker/index.d.ts +1 -0
  100. package/dist/components/WeekPicker/subcomponents/CustomDatepicker.d.ts +17 -0
  101. package/dist/components/WeekPicker/subcomponents/DatepickerInput.d.ts +13 -0
  102. package/dist/components/WeekPicker/subcomponents/VisibleField.d.ts +15 -0
  103. package/dist/components/WeekPicker/subcomponents/index.d.ts +3 -0
  104. package/dist/components/index.d.ts +13 -0
  105. package/dist/hooks/index.d.ts +2 -0
  106. package/dist/hooks/useFocusTrap.d.ts +9 -0
  107. package/dist/index.d.ts +1 -0
  108. package/dist/index.js +6006 -4599
  109. package/dist/theme/defaultTheme.d.ts +7 -0
  110. package/dist/theme/useTheme.d.ts +14 -0
  111. package/dist/utils/__tests__/capitalise.test.d.ts +1 -0
  112. package/dist/utils/capitalise.d.ts +2 -0
  113. package/lib/components/Alert/Alert.tsx +7 -1
  114. package/lib/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +4 -0
  115. package/lib/components/Badge/Badge.stories.tsx +19 -0
  116. package/lib/components/Badge/Badge.tsx +48 -0
  117. package/lib/components/Badge/index.ts +2 -0
  118. package/lib/components/Breadcrumbs/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +4 -4
  119. package/lib/components/Button/Button.tsx +5 -2
  120. package/lib/components/Calendar/Calendar.stories.tsx +209 -0
  121. package/lib/components/Calendar/Calendar.tsx +121 -0
  122. package/lib/components/Calendar/Calendar.types.ts +21 -0
  123. package/lib/components/Calendar/__tests__/Calendar.test.tsx +71 -0
  124. package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +1218 -0
  125. package/lib/components/Calendar/index.ts +6 -0
  126. package/lib/components/{Datepicker → Calendar}/subcomponents/AcademicWeek.tsx +1 -1
  127. package/lib/components/{Datepicker → Calendar}/subcomponents/AcademicWeeks.tsx +9 -7
  128. package/lib/components/Calendar/subcomponents/ColumnHeading.tsx +40 -0
  129. package/lib/components/{Datepicker/subcomponents/MonthSelector/MonthSelector.tsx → Calendar/subcomponents/Controls.tsx} +17 -17
  130. package/lib/components/{Datepicker/subcomponents/Day → Calendar/subcomponents}/Day.stories.tsx +8 -8
  131. package/lib/components/{Datepicker/subcomponents/Day → Calendar/subcomponents}/Day.tsx +28 -16
  132. package/lib/components/{Datepicker → Calendar}/subcomponents/EventDot.tsx +3 -3
  133. package/lib/components/Calendar/subcomponents/Grid.tsx +116 -0
  134. package/lib/components/Calendar/subcomponents/index.ts +7 -0
  135. package/lib/components/{Datepicker → Calendar}/utils/getAcademicWeekNumbers/getAcademicWeekNumbers.test.ts +1 -1
  136. package/lib/components/{Datepicker → Calendar}/utils/getAcademicWeekNumbers/getAcademicWeekNumbers.ts +1 -1
  137. package/lib/components/{Datepicker → Calendar}/utils/getDatesForCalendarGrid/getDatesForCalendarGrid.test.ts +29 -65
  138. package/lib/components/{Datepicker → Calendar}/utils/getDatesForCalendarGrid/getDatesForCalendarGrid.ts +11 -43
  139. package/lib/components/Calendar/utils/index.ts +4 -0
  140. package/lib/components/Calendar/utils/normaliseMonth/normaliseMonth.test.ts +40 -0
  141. package/lib/components/Calendar/utils/normaliseMonth/normaliseMonth.ts +16 -0
  142. package/lib/components/Calendar/utils/parseDateFromString/parseDateFromString.test.ts +15 -0
  143. package/lib/components/Calendar/utils/parseDateFromString/parseDateFromString.ts +19 -0
  144. package/lib/components/CookieNotice/CookieNotice.tsx +114 -0
  145. package/lib/components/CookieNotice/index.ts +2 -0
  146. package/lib/components/Datepicker/Datepicker.stories.tsx +128 -64
  147. package/lib/components/Datepicker/Datepicker.tsx +34 -114
  148. package/lib/components/Datepicker/Datepicker.types.ts +38 -9
  149. package/lib/components/Datepicker/__tests__/Datepicker.test.tsx +53 -112
  150. package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +92 -747
  151. package/lib/components/Datepicker/index.ts +1 -2
  152. package/lib/components/Datepicker/subcomponents/CustomDatepicker.tsx +209 -0
  153. package/lib/components/Datepicker/subcomponents/DatepickerInput.tsx +74 -0
  154. package/lib/components/Datepicker/subcomponents/NativeDatepicker.tsx +70 -0
  155. package/lib/components/Datepicker/subcomponents/Panel.tsx +32 -0
  156. package/lib/components/Datepicker/subcomponents/VisibleField.tsx +104 -0
  157. package/lib/components/Datepicker/subcomponents/index.ts +5 -7
  158. package/lib/components/Datepicker/utils/dateToLocaleISOString/dateToLocaleISOString.test.ts +32 -0
  159. package/lib/components/Datepicker/utils/dateToLocaleISOString/dateToLocaleISOString.ts +23 -0
  160. package/lib/components/Datepicker/utils/index.ts +2 -3
  161. package/lib/components/Datepicker/utils/parseInputValue/parseInputValue.test.ts +110 -0
  162. package/lib/components/Datepicker/utils/parseInputValue/parseInputValue.ts +57 -0
  163. package/lib/components/Dialog/BaseDialog.tsx +44 -4
  164. package/lib/components/Field/__tests__/Field.test.tsx +148 -148
  165. package/lib/components/FileInput/FileInput.stories.tsx +70 -0
  166. package/lib/components/FileInput/FileInput.tsx +68 -0
  167. package/lib/components/FileInput/__tests__/FileInput.test.tsx +99 -0
  168. package/lib/components/FileInput/__tests__/__snapshots__/FileInput.test.tsx.snap +91 -0
  169. package/lib/components/FileInput/index.ts +2 -0
  170. package/lib/components/Footer/Footer.tsx +3 -3
  171. package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +31 -31
  172. package/lib/components/Header/Header.tsx +19 -2
  173. package/lib/components/Header/__tests__/__snapshots__/Header.test.tsx.snap +4 -4
  174. package/lib/components/Heading/Documentation.mdx +1 -1
  175. package/lib/components/Heading/Heading.tsx +1 -1
  176. package/lib/components/Heading/__tests__/Heading.test.tsx +7 -19
  177. package/lib/components/Heading/__tests__/__snapshots__/Heading.test.tsx.snap +7 -7
  178. package/lib/components/Label/Label.tsx +0 -2
  179. package/lib/components/Label/__tests__/__snapshots__/Label.test.tsx.snap +7 -7
  180. package/lib/components/Link/BaseLink.tsx +84 -0
  181. package/lib/components/Link/Link.tsx +72 -32
  182. package/lib/components/Link/__tests__/__snapshots__/link.test.tsx.snap +3 -3
  183. package/lib/components/Link/__tests__/link.test.tsx +6 -13
  184. package/lib/components/Link/index.ts +1 -1
  185. package/lib/components/Menu/Menu.context.tsx +3 -1
  186. package/lib/components/Menu/Menu.tsx +5 -2
  187. package/lib/components/Menu/MenuContent.tsx +9 -6
  188. package/lib/components/Menu/MenuItem.tsx +20 -3
  189. package/lib/components/Menu/MenuSection.tsx +4 -3
  190. package/lib/components/Pagination/PaginationControls.tsx +1 -3
  191. package/lib/components/Search/Search.stories.tsx +41 -0
  192. package/lib/components/Search/Search.tsx +167 -0
  193. package/lib/components/Search/__tests__/Search.test.tsx +94 -0
  194. package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +179 -0
  195. package/lib/components/Search/index.ts +2 -0
  196. package/lib/components/Select/Select.stories.tsx +8 -35
  197. package/lib/components/Select/Select.tsx +2 -2
  198. package/lib/components/Select/Select.types.ts +20 -15
  199. package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +3 -3
  200. package/lib/components/Select/subcomponents/CustomOption.tsx +22 -9
  201. package/lib/components/Select/subcomponents/CustomSelect.tsx +31 -20
  202. package/lib/components/Select/subcomponents/Panel.tsx +4 -5
  203. package/lib/components/Select/subcomponents/VisibleField.tsx +26 -22
  204. package/lib/components/StandaloneLink/StandaloneLink.stories.tsx +32 -0
  205. package/lib/components/StandaloneLink/StandaloneLink.tsx +183 -0
  206. package/lib/components/StandaloneLink/__tests__/StandaloneLink.test.tsx +57 -0
  207. package/lib/components/StandaloneLink/__tests__/__snapshots__/StandaloneLink.test.tsx.snap +19 -0
  208. package/lib/components/StandaloneLink/index.ts +2 -0
  209. package/lib/components/Table/Table.stories.tsx +337 -0
  210. package/lib/components/Table/Table.tsx +42 -67
  211. package/lib/components/Table/Table.types.ts +14 -0
  212. package/lib/components/Table/__tests__/Table.test.tsx +121 -0
  213. package/lib/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +210 -0
  214. package/lib/components/Table/index.ts +8 -1
  215. package/lib/components/Table/subcomponents/Body.tsx +18 -0
  216. package/lib/components/Table/subcomponents/Cell/Cell.stories.tsx +151 -0
  217. package/lib/components/Table/subcomponents/Cell/Cell.tsx +72 -0
  218. package/lib/components/Table/subcomponents/Cell/CellContent.tsx +91 -0
  219. package/lib/components/Table/subcomponents/Cell/__tests__/Cell.test.tsx +115 -0
  220. package/lib/components/Table/subcomponents/Cell/__tests__/__snapshots__/Cell.test.tsx.snap +107 -0
  221. package/lib/components/Table/subcomponents/Head.tsx +34 -0
  222. package/lib/components/Table/subcomponents/HeadCell/HeadCell.stories.tsx +85 -0
  223. package/lib/components/Table/subcomponents/HeadCell/HeadCell.tsx +99 -0
  224. package/lib/components/Table/subcomponents/HeadCell/HeadCellContent.tsx +61 -0
  225. package/lib/components/Table/subcomponents/HeadCell/__tests__/HeadCell.test.tsx +137 -0
  226. package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap +110 -0
  227. package/lib/components/Table/subcomponents/Row.tsx +49 -0
  228. package/lib/components/Table/subcomponents/SortIcon.tsx +63 -0
  229. package/lib/components/Table/subcomponents/index.ts +14 -0
  230. package/lib/components/Tabs/Tab.tsx +3 -3
  231. package/lib/components/Tabs/TabContext.tsx +1 -0
  232. package/lib/components/Tabs/Tabs.stories.tsx +9 -3
  233. package/lib/components/Tabs/Tabs.tsx +10 -32
  234. package/lib/components/Tabs/__tests__/Tabs.test.tsx +10 -4
  235. package/lib/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +32 -32
  236. package/lib/components/Timepicker/Timepicker.stories.tsx +43 -0
  237. package/lib/components/Timepicker/Timepicker.tsx +96 -0
  238. package/lib/components/Timepicker/__tests__/Timepicker.test.tsx +55 -0
  239. package/lib/components/Timepicker/__tests__/__snapshots__/Timepicker.test.tsx.snap +19 -0
  240. package/lib/components/Timepicker/index.tsx +2 -0
  241. package/lib/components/Timepicker/utils/convertDateToTimeString.test.ts +54 -0
  242. package/lib/components/Timepicker/utils/convertDateToTimeString.ts +10 -0
  243. package/lib/components/Timepicker/utils/index.ts +1 -0
  244. package/lib/components/WeekPicker/WeekPicker.tsx +26 -0
  245. package/lib/components/WeekPicker/index.ts +1 -0
  246. package/lib/components/WeekPicker/subcomponents/CustomDatepicker.tsx +298 -0
  247. package/lib/components/WeekPicker/subcomponents/DatepickerInput.tsx +111 -0
  248. package/lib/components/WeekPicker/subcomponents/VisibleField.tsx +126 -0
  249. package/lib/components/WeekPicker/subcomponents/index.ts +3 -0
  250. package/lib/components/index.ts +20 -0
  251. package/lib/hooks/index.ts +2 -0
  252. package/lib/hooks/useFocusTrap.ts +123 -0
  253. package/lib/index.ts +1 -0
  254. package/lib/theme/defaultTheme.ts +7 -0
  255. package/lib/utils/__tests__/capitalise.test.ts +40 -0
  256. package/lib/utils/capitalise.ts +4 -0
  257. package/package.json +2 -2
  258. package/dist/components/Datepicker/subcomponents/AcademicWeeks.d.ts +0 -7
  259. package/dist/components/Datepicker/subcomponents/CalendarGrid/CalendarGrid.d.ts +0 -8
  260. package/dist/components/Datepicker/subcomponents/CalendarGrid/index.d.ts +0 -1
  261. package/dist/components/Datepicker/subcomponents/CalendarMenu/CalendarMenu.d.ts +0 -12
  262. package/dist/components/Datepicker/subcomponents/CalendarMenu/index.d.ts +0 -1
  263. package/dist/components/Datepicker/subcomponents/ColumnHeadings/ColumnHeadings.d.ts +0 -2
  264. package/dist/components/Datepicker/subcomponents/ColumnHeadings/index.d.ts +0 -1
  265. package/dist/components/Datepicker/subcomponents/DateField/DateField.d.ts +0 -7
  266. package/dist/components/Datepicker/subcomponents/DateField/index.d.ts +0 -1
  267. package/dist/components/Datepicker/subcomponents/Day/index.d.ts +0 -1
  268. package/dist/components/Datepicker/subcomponents/MonthSelector/MonthSelector.d.ts +0 -6
  269. package/dist/components/Datepicker/subcomponents/MonthSelector/index.d.ts +0 -1
  270. package/dist/components/Datepicker/subcomponents/Native/Native.d.ts +0 -9
  271. package/dist/components/Datepicker/subcomponents/Native/index.d.ts +0 -1
  272. package/dist/components/Datepicker/utils/parseDateForDateField/parseDateForDateField.d.ts +0 -20
  273. package/lib/components/Datepicker/subcomponents/CalendarGrid/CalendarGrid.tsx +0 -54
  274. package/lib/components/Datepicker/subcomponents/CalendarGrid/index.ts +0 -1
  275. package/lib/components/Datepicker/subcomponents/CalendarMenu/CalendarMenu.tsx +0 -90
  276. package/lib/components/Datepicker/subcomponents/CalendarMenu/index.ts +0 -1
  277. package/lib/components/Datepicker/subcomponents/ColumnHeadings/ColumnHeadings.tsx +0 -35
  278. package/lib/components/Datepicker/subcomponents/ColumnHeadings/index.ts +0 -1
  279. package/lib/components/Datepicker/subcomponents/DateField/DateField.tsx +0 -155
  280. package/lib/components/Datepicker/subcomponents/DateField/__tests__/DateField.test.tsx +0 -191
  281. package/lib/components/Datepicker/subcomponents/DateField/index.ts +0 -1
  282. package/lib/components/Datepicker/subcomponents/Day/index.ts +0 -1
  283. package/lib/components/Datepicker/subcomponents/MonthSelector/index.ts +0 -1
  284. package/lib/components/Datepicker/subcomponents/Native/Native.tsx +0 -59
  285. package/lib/components/Datepicker/subcomponents/Native/index.ts +0 -1
  286. package/lib/components/Datepicker/utils/parseDateForDateField/parseDateForDateField.test.ts +0 -41
  287. package/lib/components/Datepicker/utils/parseDateForDateField/parseDateForDateField.ts +0 -48
  288. package/lib/components/Field/__tests__/__snapshots__/Field.test.tsx.snap +0 -300
  289. /package/dist/components/{Datepicker/subcomponents/DateField/__tests__/DateField.test.d.ts → Calendar/__tests__/Calendar.test.d.ts} +0 -0
  290. /package/dist/components/{Datepicker → Calendar}/subcomponents/AcademicWeek.d.ts +0 -0
  291. /package/dist/components/{Datepicker/subcomponents/Day → Calendar/subcomponents}/Day.stories.d.ts +0 -0
  292. /package/dist/components/{Datepicker → Calendar}/utils/getAcademicWeekNumbers/getAcademicWeekNumbers.test.d.ts +0 -0
  293. /package/dist/components/{Datepicker → Calendar}/utils/getDatesForCalendarGrid/getDatesForCalendarGrid.d.ts +0 -0
  294. /package/dist/components/{Datepicker → Calendar}/utils/getDatesForCalendarGrid/getDatesForCalendarGrid.test.d.ts +0 -0
  295. /package/dist/components/{Datepicker/utils/parseDateForDateField/parseDateForDateField.test.d.ts → Calendar/utils/normaliseMonth/normaliseMonth.test.d.ts} +0 -0
@@ -0,0 +1,6 @@
1
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ testId?: string;
3
+ className?: string;
4
+ }
5
+ declare const Badge: ({ testId, className, children, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default Badge;
@@ -0,0 +1,15 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ testId, className, children, ...props }: import('./Badge').BadgeProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ args: {
9
+ children: string;
10
+ };
11
+ tags: string[];
12
+ };
13
+ export default meta;
14
+ type Story = StoryObj<typeof meta>;
15
+ export declare const Default: Story;
@@ -0,0 +1,2 @@
1
+ export { default } from './Badge';
2
+ export type { BadgeProps } from './Badge';
@@ -1,4 +1,5 @@
1
1
  import { ReactElement, ElementType, ComponentPropsWithRef } from 'react';
2
+ import { MarginProps } from '../common/marginsStyle';
2
3
  export declare const NAME = "ucl-uikit-button";
3
4
  type PolymorphicRef<C extends ElementType> = ComponentPropsWithRef<C>['ref'];
4
5
  export interface ButtonBaseProps {
@@ -16,7 +17,7 @@ export interface ButtonBaseProps {
16
17
  export type ButtonProps<C extends ElementType = 'button'> = {
17
18
  as?: C;
18
19
  ref?: PolymorphicRef<C>;
19
- } & ButtonBaseProps & Omit<ComponentPropsWithRef<C>, keyof ButtonBaseProps | 'as'>;
20
+ } & ButtonBaseProps & MarginProps & Omit<ComponentPropsWithRef<C>, keyof ButtonBaseProps | 'as'>;
20
21
  declare const Button: <C extends ElementType = "button">({ as, variant, destructive, size, disabled, icon, iconPosition, tooltip, loading, fullWidth, testId, ref, children, className, ...props }: ButtonProps<C>) => import("react/jsx-runtime").JSX.Element;
21
22
  declare const MemoizedButton: typeof Button;
22
23
  export default MemoizedButton;
@@ -0,0 +1,3 @@
1
+ import { CalendarProps } from './Calendar.types';
2
+ declare const Calendar: ({ pickedDate, onDatePick, minDate, maxDate, events, showAcademicWeeks, academicWeeks, testId, className, }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Calendar;
@@ -0,0 +1,42 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ pickedDate, onDatePick, minDate, maxDate, events, showAcademicWeeks, academicWeeks, testId, className, }: import('./Calendar.types').CalendarProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ argTypes: {
9
+ pickedDate: {
10
+ control: {
11
+ type: "date";
12
+ };
13
+ };
14
+ minDate: {
15
+ control: {
16
+ type: "date";
17
+ };
18
+ };
19
+ maxDate: {
20
+ control: {
21
+ type: "date";
22
+ };
23
+ };
24
+ showAcademicWeeks: {
25
+ control: {
26
+ type: "boolean";
27
+ };
28
+ };
29
+ testId: {
30
+ control: {
31
+ type: "text";
32
+ };
33
+ };
34
+ };
35
+ tags: string[];
36
+ };
37
+ export default meta;
38
+ type Story = StoryObj<typeof meta>;
39
+ export declare const Default: Story;
40
+ export declare const WithEvents: Story;
41
+ export declare const WithAcademicWeeks: Story;
42
+ export declare const MinMaxDates: Story;
@@ -0,0 +1,18 @@
1
+ export type CalendarEvent = {
2
+ date: string;
3
+ };
4
+ export type AcademicWeek = {
5
+ start: string;
6
+ number: number;
7
+ };
8
+ export interface CalendarProps {
9
+ pickedDate?: Date | null;
10
+ onDatePick?: (date: Date | null, event?: React.SyntheticEvent) => void;
11
+ minDate?: string | null;
12
+ maxDate?: string | null;
13
+ events?: CalendarEvent[];
14
+ showAcademicWeeks?: boolean;
15
+ academicWeeks?: AcademicWeek[];
16
+ testId?: string;
17
+ className?: string;
18
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './Calendar';
2
+ export type { CalendarProps, CalendarEvent, AcademicWeek, } from './Calendar.types';
@@ -0,0 +1,7 @@
1
+ import { AcademicWeek as AcademicWeekType } from '../Calendar.types';
2
+ interface AcademicWeeksProps {
3
+ date: Date;
4
+ weeks: AcademicWeekType[];
5
+ }
6
+ declare const AcademicWeeks: ({ date, weeks }: AcademicWeeksProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default AcademicWeeks;
@@ -0,0 +1,7 @@
1
+ interface ColumnHeadingProps {
2
+ index: number;
3
+ day: string;
4
+ isWeekend: boolean;
5
+ }
6
+ declare const ColumnHeading: ({ index, day, isWeekend }: ColumnHeadingProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default ColumnHeading;
@@ -0,0 +1,6 @@
1
+ interface ControlsProps {
2
+ month: Date;
3
+ changeMonth: (change: number) => void;
4
+ }
5
+ declare const Controls: ({ month, changeMonth }: ControlsProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default Controls;
@@ -1,7 +1,7 @@
1
- import { CalendarEvent } from '../../Datepicker.types';
1
+ import { CalendarEvent } from '../Calendar.types';
2
2
  export interface DayProps {
3
- date: Date | null | undefined;
4
- onPick?: (date: Date) => void;
3
+ date: Date;
4
+ onPick?: (date: Date, event: React.SyntheticEvent) => void;
5
5
  isSelected?: boolean;
6
6
  isToday?: boolean;
7
7
  isInCurrentMonth?: boolean;
@@ -1,6 +1,6 @@
1
- type EventDotProps = {
1
+ interface EventDotProps {
2
2
  inverted: boolean;
3
3
  inCurrentMonth: boolean;
4
- };
4
+ }
5
5
  declare const EventDot: ({ inverted, inCurrentMonth }: EventDotProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export default EventDot;
@@ -0,0 +1,11 @@
1
+ import { CalendarEvent } from '../Calendar.types';
2
+ interface GridProps {
3
+ month: Date;
4
+ pickedDate: Date | null;
5
+ onDatePick?: (date: Date, event: React.SyntheticEvent) => void;
6
+ minDate: Date | null;
7
+ maxDate: Date | null;
8
+ events: CalendarEvent[];
9
+ }
10
+ declare const Grid: ({ month, pickedDate, onDatePick, minDate, maxDate, events, }: GridProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default Grid;
@@ -0,0 +1,7 @@
1
+ export { default as Controls } from './Controls';
2
+ export { default as AcademicWeeks } from './AcademicWeeks';
3
+ export { default as AcademicWeek } from './AcademicWeek';
4
+ export { default as Grid } from './Grid';
5
+ export { default as ColumnHeading } from './ColumnHeading';
6
+ export { default as Day } from './Day';
7
+ export { default as EventDot } from './EventDot';
@@ -1,4 +1,4 @@
1
- import { AcademicWeek } from '../../Datepicker.types';
1
+ import { AcademicWeek } from '../../';
2
2
  /**
3
3
  * Returns the Monday for the week of the given date.
4
4
  * For example:
@@ -0,0 +1,4 @@
1
+ export { default as normaliseMonth } from './normaliseMonth/normaliseMonth';
2
+ export { default as parseDateFromString } from './parseDateFromString/parseDateFromString';
3
+ export { default as getAcademicWeekNumbers } from './getAcademicWeekNumbers/getAcademicWeekNumbers';
4
+ export { default as getDatesForCalendarGrid } from './getDatesForCalendarGrid/getDatesForCalendarGrid';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Normalises a given date to the first day of its month (with the time set to midnight).
3
+ * If the input date is undefined, it returns null.
4
+ * Used in <Calendar> to track the displayed month.
5
+ * @param date The date to normalise.
6
+ * @returns A new Date object set to the first day of the month with the time at midnight, or null if the input was null or undefined.
7
+ */
8
+ declare const normaliseMonth: (date: Date | null | undefined) => Date | null;
9
+ export default normaliseMonth;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Parses a date string into a Date object.
3
+ * Returns null if the input is invalid.
4
+ *
5
+ * @param dateString - The date string to parse (can be in ISO format or UNIX timestamp).
6
+ * @returns A Date object, or null if invalid.
7
+ */
8
+ declare const parseDateFromString: (dateString: string) => Date | null;
9
+ export default parseDateFromString;
@@ -0,0 +1,16 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { MarginProps } from '../common/marginsStyle';
3
+ export declare const NAME = "ucl-uikit-cookie-notice";
4
+ export declare const DEFAULT_POLICY_HREF = "https://www.ucl.ac.uk/legal-services/privacy/cookie-policy";
5
+ export declare const DEFAULT_TEXT = "We use necessary cookies to manage your session and essential site functions. We also use Google Analytics cookies to understand how our site is used. You can accept or reject non-essential cookies.";
6
+ export interface CookieNoticeBaseProps extends HTMLAttributes<HTMLDivElement> {
7
+ policyHref?: string;
8
+ text?: string;
9
+ onAccept?: () => void;
10
+ onReject?: () => void;
11
+ trapFocus?: boolean;
12
+ testId?: string;
13
+ }
14
+ export type CookieNoticeProps = CookieNoticeBaseProps & MarginProps;
15
+ declare const CookieNotice: ({ policyHref, text, onAccept, onReject, trapFocus, testId, className, ...props }: CookieNoticeProps) => import("react/jsx-runtime").JSX.Element;
16
+ export default CookieNotice;
@@ -0,0 +1,2 @@
1
+ export { default } from './CookieNotice';
2
+ export type { CookieNoticeProps } from './CookieNotice';
@@ -1,16 +1,3 @@
1
- import { InputHTMLAttributes } from 'react';
2
- import { CalendarEvent, AcademicWeek } from './Datepicker.types';
3
- export declare const NAME = "ucl-datepicker";
4
- export interface DatepickerProps extends InputHTMLAttributes<HTMLInputElement> {
5
- date: Date | null | undefined;
6
- minDate?: Date | null | undefined;
7
- maxDate?: Date | null | undefined;
8
- onDateChange: (date: Date | null | undefined) => void;
9
- native?: boolean;
10
- events?: CalendarEvent[];
11
- showAcademicWeeks?: boolean;
12
- academicWeeks?: AcademicWeek[];
13
- testId?: string;
14
- }
15
- declare const _default: import('react').MemoExoticComponent<({ date, minDate, maxDate, onDateChange, native, events, showAcademicWeeks, academicWeeks, testId, className, ...props }: DatepickerProps) => import("react/jsx-runtime").JSX.Element>;
16
- export default _default;
1
+ import { DatepickerProps } from './Datepicker.types';
2
+ declare const Datepicker: ({ value, onValueChange, minDate, maxDate, disabled, className, native, nativeRef, nativeHTMLAttributes, ...props }: DatepickerProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Datepicker;
@@ -1,12 +1,12 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: import('react').MemoExoticComponent<({ date, minDate, maxDate, onDateChange, native, events, showAcademicWeeks, academicWeeks, testId, className, ...props }: import('./Datepicker').DatepickerProps) => import("react/jsx-runtime").JSX.Element>;
4
+ component: ({ value, onValueChange, minDate, maxDate, disabled, className, native, nativeRef, nativeHTMLAttributes, ...props }: import('./Datepicker.types').DatepickerProps) => import("react/jsx-runtime").JSX.Element;
5
5
  parameters: {
6
6
  layout: string;
7
7
  };
8
8
  argTypes: {
9
- date: {
9
+ value: {
10
10
  control: {
11
11
  type: "date";
12
12
  };
@@ -21,6 +21,11 @@ declare const meta: {
21
21
  type: "date";
22
22
  };
23
23
  };
24
+ disabled: {
25
+ control: {
26
+ type: "boolean";
27
+ };
28
+ };
24
29
  native: {
25
30
  control: {
26
31
  type: "boolean";
@@ -37,6 +42,7 @@ declare const meta: {
37
42
  export default meta;
38
43
  type Story = StoryObj<typeof meta>;
39
44
  export declare const Default: Story;
40
- export declare const AsNative: Story;
41
45
  export declare const WithEvents: Story;
42
46
  export declare const WithAcademicWeeks: Story;
47
+ export declare const MinMaxDates: Story;
48
+ export declare const Native: Story;
@@ -1,7 +1,23 @@
1
- export type CalendarEvent = {
2
- date: string;
3
- };
4
- export type AcademicWeek = {
5
- start: string;
6
- number: number;
7
- };
1
+ import { InputHTMLAttributes, HTMLAttributes, RefObject } from 'react';
2
+ import { CalendarEvent, AcademicWeek } from '../Calendar';
3
+ export type DatepickerValue = Date | null;
4
+ interface BaseDatepickerProps {
5
+ value?: DatepickerValue;
6
+ onValueChange?: (value: DatepickerValue, event?: React.SyntheticEvent) => void;
7
+ minDate?: string | null;
8
+ maxDate?: string | null;
9
+ events?: CalendarEvent[];
10
+ showAcademicWeeks?: boolean;
11
+ academicWeeks?: AcademicWeek[];
12
+ testId?: string;
13
+ disabled?: boolean;
14
+ ref?: RefObject<HTMLDivElement>;
15
+ inputRef?: RefObject<HTMLInputElement>;
16
+ }
17
+ type NativeDatepickerAttributeProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'min' | 'max' | 'className' | 'disabled'>;
18
+ export interface DatepickerProps extends BaseDatepickerProps, HTMLAttributes<HTMLDivElement> {
19
+ native?: boolean;
20
+ nativeHTMLAttributes?: NativeDatepickerAttributeProps;
21
+ nativeRef?: RefObject<HTMLInputElement>;
22
+ }
23
+ export {};
@@ -1,3 +1,2 @@
1
1
  export { default } from './Datepicker';
2
- export type { DatepickerProps } from './Datepicker';
3
- export type { CalendarEvent, AcademicWeek } from './Datepicker.types';
2
+ export type { DatepickerProps } from './Datepicker.types';
@@ -0,0 +1,17 @@
1
+ import { DatepickerValue } from '../Datepicker.types';
2
+ import { CalendarEvent, AcademicWeek } from '../../Calendar';
3
+ interface CustomDatepickerProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ value?: DatepickerValue;
5
+ onValueChange?: (value: DatepickerValue, event?: React.SyntheticEvent) => void;
6
+ minDate?: string | null;
7
+ maxDate?: string | null;
8
+ disabled?: boolean;
9
+ events?: CalendarEvent[];
10
+ showAcademicWeeks?: boolean;
11
+ academicWeeks?: AcademicWeek[];
12
+ testId?: string;
13
+ ref?: React.RefObject<HTMLDivElement>;
14
+ inputRef?: React.RefObject<HTMLInputElement>;
15
+ }
16
+ declare const CustomDatepicker: ({ value, onValueChange, minDate, maxDate, disabled, events, showAcademicWeeks, academicWeeks, testId, className, ref, inputRef, ...props }: CustomDatepickerProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default CustomDatepicker;
@@ -0,0 +1,10 @@
1
+ interface DatepickerInputProps {
2
+ value: string;
3
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
4
+ onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
5
+ onFocus: () => void;
6
+ disabled: boolean;
7
+ ref: React.RefObject<HTMLInputElement | null>;
8
+ }
9
+ declare const DatepickerInput: ({ value, onChange, onKeyDown, onFocus, disabled, ref, }: DatepickerInputProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default DatepickerInput;
@@ -0,0 +1,6 @@
1
+ interface NativeDatepickerProps extends React.InputHTMLAttributes<HTMLInputElement> {
2
+ testId?: string;
3
+ ref?: React.RefObject<HTMLInputElement>;
4
+ }
5
+ declare const NativeDatepicker: ({ value, onChange, min, max, className, disabled, testId, ref, ...props }: NativeDatepickerProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default NativeDatepicker;
@@ -0,0 +1,6 @@
1
+ interface PanelProps {
2
+ zIndex?: number;
3
+ children: React.ReactNode;
4
+ }
5
+ declare const Panel: ({ zIndex, children }: PanelProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default Panel;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ interface VisibleFieldProps {
3
+ inputValue: string;
4
+ onInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
5
+ onInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
6
+ onInputFocus: () => void;
7
+ onButtonClick: () => void;
8
+ disabled: boolean;
9
+ inputRef: React.RefObject<HTMLInputElement | null>;
10
+ }
11
+ declare const VisibleField: ({ inputValue, onInputChange, onInputKeyDown, onInputFocus, onButtonClick, disabled, inputRef, }: VisibleFieldProps) => import("react/jsx-runtime").JSX.Element;
12
+ export default VisibleField;
@@ -1,7 +1,5 @@
1
- export { default as CalendarGrid } from './CalendarGrid';
2
- export { default as CalendarMenu } from './CalendarMenu';
3
- export { default as ColumnHeadings } from './ColumnHeadings';
4
- export { default as DateField } from './DateField';
5
- export { default as Day } from './Day';
6
- export { default as Native } from './Native';
7
- export { default as MonthSelector } from './MonthSelector';
1
+ export { default as CustomDatepicker } from './CustomDatepicker';
2
+ export { default as NativeDatepicker } from './NativeDatepicker';
3
+ export { default as VisibleField } from './VisibleField';
4
+ export { default as DatepickerInput } from './DatepickerInput';
5
+ export { default as Panel } from './Panel';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Converts a Date object to a `YYYY-MM-DD` string based on the user's local timezone.
3
+ *
4
+ * Used for passing dates to <NativeDatepicker> in `Datepicker.tsx`
5
+ *
6
+ * This function uses the Swedish (`sv-SE`) locale with `toLocaleDateString`
7
+ * as it conveniently defaults to the ISO 8601 `YYYY-MM-DD` format, while respecting
8
+ * the local date. This avoids timezone conversion issues that can arise from
9
+ * using `toISOString()`.
10
+ *
11
+ * This implementation should handle daylight saving time, etc, correctly.
12
+ *
13
+ * @param date The date to convert.
14
+ * @returns A string in `YYYY-MM-DD` format, or `null` if the input is `null`.
15
+ */
16
+ declare const dateToLocaleISOString: (date: Date | null | undefined) => string | null;
17
+ export default dateToLocaleISOString;
@@ -1,3 +1,2 @@
1
- export { default as getDatesForCalendarGrid } from './getDatesForCalendarGrid/getDatesForCalendarGrid';
2
- export { default as parseDate } from './parseDateForDateField/parseDateForDateField';
3
- export { default as getAcademicWeekNumbers } from './getAcademicWeekNumbers/getAcademicWeekNumbers';
1
+ export { default as dateToLocaleISOString } from './dateToLocaleISOString/dateToLocaleISOString';
2
+ export { default as parseInputValue } from './parseInputValue/parseInputValue';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Parses a date string into a Date object.
3
+ * Used in <VisibleField> to parse user input into the controlled <input> field.
4
+ *
5
+ * @param {string} value The date string to parse. Expected format is DD/MM/YYYY, DD-MM-YYYY, or DD MM YYYY.
6
+ * @param {string} [minDate] Optional minimum date string in YYYY-MM-DD format. If the parsed date is before this date, the function returns null.
7
+ * @param {string} [maxDate] Optional maximum date string in YYYY-MM-DD format. If the parsed date is after this date, the function returns null.
8
+ * @returns {Date | null} A Date object representing the parsed date, or null if the input is invalid or out of range.
9
+ */
10
+ declare const parseInputValue: (value: string, minDate?: string | null, maxDate?: string | null) => Date | null;
11
+ export default parseInputValue;
@@ -9,8 +9,13 @@ export interface BaseDialogProps extends HTMLAttributes<HTMLDialogElement> {
9
9
  modal?: boolean;
10
10
  closeOnClickOutside?: boolean;
11
11
  closeOnClickOutsideStopPropagation?: boolean;
12
- onClose?: (ev: React.MouseEvent) => void;
12
+ nonModalCloseOnEscape?: boolean;
13
+ onClose?: (ev: React.MouseEvent | KeyboardEvent) => void;
14
+ initialFocusRef?: React.RefObject<HTMLElement>;
15
+ finalFocusRef?: React.RefObject<HTMLElement>;
16
+ disableFocusTrap?: boolean;
17
+ restoreFocus?: boolean;
13
18
  testId?: string;
14
19
  }
15
- declare const _default: React.MemoExoticComponent<({ open, size, modal, closeOnClickOutside, closeOnClickOutsideStopPropagation, onClose, testId, className, children, ...props }: BaseDialogProps) => import("react/jsx-runtime").JSX.Element | null>;
20
+ declare const _default: React.MemoExoticComponent<({ open, size, modal, closeOnClickOutside, closeOnClickOutsideStopPropagation, nonModalCloseOnEscape, onClose, className, children, initialFocusRef, finalFocusRef, disableFocusTrap, restoreFocus, testId, ...props }: BaseDialogProps) => import("react/jsx-runtime").JSX.Element | null>;
16
21
  export default _default;
@@ -0,0 +1,8 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ export declare const NAME = "ucl-uikit-fileinput";
3
+ export interface FileInputProps extends InputHTMLAttributes<HTMLInputElement> {
4
+ testId?: string;
5
+ labelId?: string;
6
+ }
7
+ declare const FileInput: ({ testId, children, labelId, ...props }: FileInputProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default FileInput;
@@ -0,0 +1,16 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ testId, children, labelId, ...props }: import('./FileInput').FileInputProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Default: Story;
13
+ export declare const WithCustomClass: Story;
14
+ export declare const MultipleFiles: Story;
15
+ export declare const NoChildren: Story;
16
+ export declare const WithDecorator: Story;
@@ -0,0 +1,2 @@
1
+ export { default } from './FileInput';
2
+ export type { FileInputProps } from './FileInput';
@@ -2,7 +2,7 @@ import { HTMLAttributes } from 'react';
2
2
  import { default as FooterColumn } from './FooterColumn';
3
3
  import { default as FooterNavLink } from './FooterNavLink';
4
4
  export declare const NAME = "ucl-uikit-footer";
5
- export interface FooterProps extends HTMLAttributes<HTMLDivElement> {
5
+ export interface FooterProps extends HTMLAttributes<HTMLElement> {
6
6
  testId?: string;
7
7
  disclaimer?: string;
8
8
  freedomOfInformation?: string;
@@ -7,9 +7,12 @@ export declare const DEFAULT_Z_INDEX = 3;
7
7
  export interface HeaderProps extends HTMLAttributes<HTMLElement> {
8
8
  title?: string;
9
9
  fixed?: boolean;
10
+ titleAs?: React.ElementType<React.HTMLAttributes<HTMLElement>>;
11
+ titleClassName?: string;
12
+ titleProps?: Record<string, unknown>;
10
13
  testId?: string;
11
14
  }
12
- declare const MemoAppHeader: import('react').MemoExoticComponent<({ title, fixed, testId, className, children, ...props }: HeaderProps) => import("react/jsx-runtime").JSX.Element>;
15
+ declare const MemoAppHeader: import('react').MemoExoticComponent<({ title, fixed, titleAs, titleClassName, titleProps, testId, className, children, ...props }: HeaderProps) => import("react/jsx-runtime").JSX.Element>;
13
16
  export interface IHeaderSubComponents {
14
17
  Menu: typeof HeaderMenu;
15
18
  }
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  import { MarginProps } from '../common/marginsStyle';
3
- export declare const NAME = "ucl-heading";
3
+ export declare const NAME = "ucl-uikit-heading";
4
4
  export interface HeadingBaseProps extends HTMLAttributes<HTMLHeadingElement> {
5
5
  level?: 1 | 2 | 3 | 4;
6
6
  margins?: boolean;
@@ -0,0 +1,10 @@
1
+ import { default as React, AnchorHTMLAttributes, ElementType } from 'react';
2
+ export interface BaseLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
3
+ component?: ElementType;
4
+ size?: 'small' | 'default';
5
+ noVisited?: boolean;
6
+ disabled?: boolean;
7
+ testId?: string;
8
+ }
9
+ declare const BaseLink: React.ForwardRefExoticComponent<BaseLinkProps & React.RefAttributes<HTMLAnchorElement>>;
10
+ export default BaseLink;
@@ -1,11 +1,6 @@
1
- import { AnchorHTMLAttributes, ElementType, ComponentPropsWithRef } from 'react';
2
- export declare const NAME = "ucl-link";
3
- export interface LinkBaseProps {
4
- noVisited?: boolean;
5
- testId?: string;
6
- component?: ElementType;
1
+ import { BaseLinkProps } from './BaseLink';
2
+ export interface LinkProps extends BaseLinkProps {
3
+ variant?: 'primary' | 'secondary';
7
4
  }
8
- export type LinkProps<C extends ElementType = 'a'> = LinkBaseProps & (C extends 'a' ? AnchorHTMLAttributes<HTMLAnchorElement> : Omit<ComponentPropsWithRef<C>, keyof LinkBaseProps>);
9
- export type Ref = HTMLAnchorElement;
10
- declare const _default: import('react').NamedExoticComponent<LinkBaseProps & AnchorHTMLAttributes<HTMLAnchorElement> & import('react').RefAttributes<HTMLAnchorElement>>;
11
- export default _default;
5
+ declare const Link: import('react').ForwardRefExoticComponent<LinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
6
+ export default Link;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: import('react').NamedExoticComponent<import('./Link').LinkBaseProps & import('react').AnchorHTMLAttributes<HTMLAnchorElement> & import('react').RefAttributes<HTMLAnchorElement>>;
4
+ component: import('react').ForwardRefExoticComponent<import('./Link').LinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
5
5
  args: {
6
6
  children: string;
7
7
  href: string;
@@ -1,2 +1,2 @@
1
1
  export { default } from './Link';
2
- export type { LinkProps, LinkBaseProps } from './Link';
2
+ export type { LinkProps } from './Link';
@@ -7,11 +7,12 @@ export interface MenuProps extends HTMLAttributes<HTMLDivElement> {
7
7
  title?: string;
8
8
  menuId?: string;
9
9
  testId?: string;
10
+ position?: 'left' | 'right';
10
11
  }
11
12
  export interface IMenuSubComponents {
12
13
  Section: typeof MenuSection;
13
14
  Item: typeof MenuItem;
14
15
  }
15
- declare const MemoMenu: import('react').MemoExoticComponent<({ defaultOpen, title, menuId, testId, children, className, ...props }: MenuProps) => import("react/jsx-runtime").JSX.Element>;
16
+ declare const MemoMenu: import('react').MemoExoticComponent<({ defaultOpen, title, position, menuId, testId, children, className, ...props }: MenuProps) => import("react/jsx-runtime").JSX.Element>;
16
17
  declare const MenuWithSubComponents: typeof MemoMenu & IMenuSubComponents;
17
18
  export default MenuWithSubComponents;
@@ -1,8 +1,9 @@
1
1
  import { default as React, HTMLAttributes } from 'react';
2
2
  export declare const NAME = "ucl-uikit-menu__content";
3
- export interface MenuContentProps extends HTMLAttributes<HTMLDivElement> {
3
+ export interface MenuContentProps extends HTMLAttributes<HTMLUListElement> {
4
4
  title?: string;
5
5
  testId?: string;
6
+ position?: 'left' | 'right';
6
7
  }
7
8
  declare const _default: React.NamedExoticComponent<MenuContentProps>;
8
9
  export default _default;