uikit-react-public 0.11.24 → 0.17.4

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 (301) hide show
  1. package/README.md +4 -2
  2. package/dist/components/Accordion/Accordion.Heading.d.ts +4 -4
  3. package/dist/components/Accordion/Accordion.Panel.d.ts +2 -2
  4. package/dist/components/Accordion/Accordion.d.ts +1 -1
  5. package/dist/components/Accordion/Accordion.stories.d.ts +57 -0
  6. package/dist/components/Accordion/index.d.ts +2 -0
  7. package/dist/components/Avatar/Avatar.stories.d.ts +107 -1
  8. package/dist/components/Badge/Badge.d.ts +6 -0
  9. package/dist/components/Badge/Badge.stories.d.ts +15 -0
  10. package/dist/components/Badge/index.d.ts +2 -0
  11. package/dist/components/Button/Button.d.ts +3 -1
  12. package/dist/components/Calendar/index.d.ts +1 -1
  13. package/dist/components/CookieNotice/CookieNotice.d.ts +16 -0
  14. package/dist/components/CookieNotice/index.d.ts +2 -0
  15. package/dist/components/Datepicker/Datepicker.d.ts +1 -1
  16. package/dist/components/Datepicker/Datepicker.stories.d.ts +4 -3
  17. package/dist/components/Datepicker/Datepicker.types.d.ts +4 -5
  18. package/dist/components/Datepicker/subcomponents/CustomDatepicker.d.ts +4 -1
  19. package/dist/components/Datepicker/subcomponents/DatepickerInput.d.ts +15 -2
  20. package/dist/components/Datepicker/subcomponents/Panel.d.ts +1 -1
  21. package/dist/components/Datepicker/subcomponents/VisibleField.d.ts +6 -1
  22. package/dist/components/Datepicker/subcomponents/index.d.ts +0 -1
  23. package/dist/components/Datepicker/utils/index.d.ts +0 -1
  24. package/dist/components/Dialog/BaseDialog.d.ts +8 -2
  25. package/dist/components/Dialog/Dialog.d.ts +2 -0
  26. package/dist/components/FileInput/FileInput.d.ts +8 -0
  27. package/dist/components/FileInput/FileInput.stories.d.ts +16 -0
  28. package/dist/components/FileInput/index.d.ts +2 -0
  29. package/dist/components/Header/Header.d.ts +7 -1
  30. package/dist/components/Header/Header.stories.d.ts +40 -0
  31. package/dist/components/Heading/Heading.d.ts +1 -1
  32. package/dist/components/Link/BaseLink.d.ts +10 -0
  33. package/dist/components/Link/Link.d.ts +5 -10
  34. package/dist/components/Link/Link.stories.d.ts +1 -1
  35. package/dist/components/Link/index.d.ts +1 -1
  36. package/dist/components/Main/Main.d.ts +21 -0
  37. package/dist/components/Main/Main.stories.d.ts +15 -0
  38. package/dist/components/Main/__tests__/Main.test.d.ts +1 -0
  39. package/dist/components/Main/index.d.ts +2 -0
  40. package/dist/components/Menu/MenuContent.d.ts +1 -1
  41. package/dist/components/Menu/MenuItem.d.ts +2 -0
  42. package/dist/components/Menu/MenuSection.d.ts +1 -1
  43. package/dist/components/NativeDatepicker/NativeDatepicker.d.ts +3 -0
  44. package/dist/components/NativeDatepicker/NativeDatepicker.stories.d.ts +36 -0
  45. package/dist/components/NativeDatepicker/NativeDatepicker.types.d.ts +10 -0
  46. package/dist/components/NativeDatepicker/index.d.ts +2 -0
  47. package/dist/components/{Datepicker → NativeDatepicker}/utils/dateToLocaleISOString/dateToLocaleISOString.d.ts +1 -1
  48. package/dist/components/NativeDatepicker/utils/dateToLocaleISOString/dateToLocaleISOString.test.d.ts +1 -0
  49. package/dist/components/NativeDatepicker/utils/index.d.ts +1 -0
  50. package/dist/components/Search/Search.d.ts +16 -0
  51. package/dist/components/Search/Search.stories.d.ts +34 -0
  52. package/dist/components/Search/__tests__/Search.test.d.ts +1 -0
  53. package/dist/components/Search/index.d.ts +2 -0
  54. package/dist/components/Select/Select.d.ts +1 -1
  55. package/dist/components/Select/Select.stories.d.ts +157 -9
  56. package/dist/components/Select/Select.types.d.ts +66 -32
  57. package/dist/components/Select/subcomponents/CustomOption.d.ts +1 -1
  58. package/dist/components/Select/subcomponents/CustomSelect.d.ts +3 -3
  59. package/dist/components/Select/subcomponents/FilterInput.d.ts +14 -0
  60. package/dist/components/Select/subcomponents/NativeSelect.d.ts +5 -1
  61. package/dist/components/Select/subcomponents/Panel.d.ts +1 -1
  62. package/dist/components/Select/subcomponents/VisibleField.d.ts +6 -4
  63. package/dist/components/Select/subcomponents/index.d.ts +1 -0
  64. package/dist/components/StandaloneLink/StandaloneLink.d.ts +12 -0
  65. package/dist/components/StandaloneLink/StandaloneLink.stories.d.ts +13 -0
  66. package/dist/components/StandaloneLink/__tests__/StandaloneLink.test.d.ts +1 -0
  67. package/dist/components/StandaloneLink/index.d.ts +2 -0
  68. package/dist/components/Table/Table.d.ts +10 -8
  69. package/dist/components/Table/Table.stories.d.ts +21 -0
  70. package/dist/components/Table/Table.types.d.ts +11 -0
  71. package/dist/components/Table/__tests__/Table.test.d.ts +1 -0
  72. package/dist/components/Table/index.d.ts +2 -1
  73. package/dist/components/Table/subcomponents/Body.d.ts +4 -0
  74. package/dist/components/Table/subcomponents/Cell/Cell.d.ts +12 -0
  75. package/dist/components/Table/subcomponents/Cell/Cell.stories.d.ts +313 -0
  76. package/dist/components/Table/subcomponents/Cell/CellContent.d.ts +10 -0
  77. package/dist/components/Table/subcomponents/Cell/__tests__/Cell.test.d.ts +1 -0
  78. package/dist/components/Table/subcomponents/Head.d.ts +4 -0
  79. package/dist/components/Table/subcomponents/HeadCell/HeadCell.d.ts +13 -0
  80. package/dist/components/Table/subcomponents/HeadCell/HeadCell.stories.d.ts +312 -0
  81. package/dist/components/Table/subcomponents/HeadCell/HeadCellContent.d.ts +10 -0
  82. package/dist/components/Table/subcomponents/HeadCell/__tests__/HeadCell.test.d.ts +1 -0
  83. package/dist/components/Table/subcomponents/Row.d.ts +5 -0
  84. package/dist/components/Table/subcomponents/SortIcon.d.ts +7 -0
  85. package/dist/components/Table/subcomponents/index.d.ts +10 -0
  86. package/dist/components/Tabs/Tab.d.ts +1 -1
  87. package/dist/components/Tabs/TabContext.d.ts +1 -0
  88. package/dist/components/Tabs/Tabs.d.ts +3 -1
  89. package/dist/components/Tabs/Tabs.stories.d.ts +3 -0
  90. package/dist/components/Timepicker/Timepicker.d.ts +10 -0
  91. package/dist/components/Timepicker/Timepicker.stories.d.ts +7 -0
  92. package/dist/components/Timepicker/__tests__/Timepicker.test.d.ts +1 -0
  93. package/dist/components/Timepicker/index.d.ts +2 -0
  94. package/dist/components/Timepicker/utils/convertDateToTimeString.d.ts +2 -0
  95. package/dist/components/Timepicker/utils/convertDateToTimeString.test.d.ts +1 -0
  96. package/dist/components/Timepicker/utils/index.d.ts +1 -0
  97. package/dist/components/WeekPicker/WeekPicker.d.ts +3 -0
  98. package/dist/components/WeekPicker/WeekPicker.stories.d.ts +41 -0
  99. package/dist/components/WeekPicker/WeekPicker.types.d.ts +16 -0
  100. package/dist/components/WeekPicker/index.d.ts +2 -0
  101. package/dist/components/WeekPicker/subcomponents/CustomDatepicker.d.ts +17 -0
  102. package/dist/components/WeekPicker/subcomponents/DatepickerInput.d.ts +13 -0
  103. package/dist/components/WeekPicker/subcomponents/VisibleField.d.ts +15 -0
  104. package/dist/components/WeekPicker/subcomponents/index.d.ts +3 -0
  105. package/dist/components/index.d.ts +19 -0
  106. package/dist/hooks/index.d.ts +2 -0
  107. package/dist/hooks/useFocusTrap.d.ts +10 -0
  108. package/dist/index.d.ts +2 -0
  109. package/dist/index.js +6460 -4607
  110. package/dist/theme/defaultTheme.d.ts +7 -0
  111. package/dist/theme/useTheme.d.ts +14 -0
  112. package/dist/utils/__tests__/announce.test.d.ts +1 -0
  113. package/dist/utils/__tests__/capitalise.test.d.ts +1 -0
  114. package/dist/utils/announce.d.ts +6 -0
  115. package/dist/utils/capitalise.d.ts +2 -0
  116. package/dist/utils/index.d.ts +1 -0
  117. package/lib/components/Accordion/Accordion.Heading.tsx +27 -8
  118. package/lib/components/Accordion/Accordion.Panel.tsx +11 -3
  119. package/lib/components/Accordion/Accordion.stories.tsx +139 -0
  120. package/lib/components/Accordion/Accordion.tsx +10 -8
  121. package/lib/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap +7 -7
  122. package/lib/components/Accordion/index.ts +2 -0
  123. package/lib/components/Alert/Alert.stories.tsx +1 -1
  124. package/lib/components/Alert/Alert.tsx +7 -1
  125. package/lib/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +4 -0
  126. package/lib/components/Avatar/Avatar.mdx +117 -0
  127. package/lib/components/Avatar/Avatar.stories.tsx +110 -2
  128. package/lib/components/Badge/Badge.stories.tsx +19 -0
  129. package/lib/components/Badge/Badge.tsx +48 -0
  130. package/lib/components/Badge/index.ts +2 -0
  131. package/lib/components/Blanket/Blanket.stories.tsx +1 -1
  132. package/lib/components/Breadcrumbs/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +4 -4
  133. package/lib/components/Button/Button.stories.tsx +1 -1
  134. package/lib/components/Button/Button.tsx +6 -2
  135. package/lib/components/Calendar/Calendar.stories.tsx +12 -32
  136. package/lib/components/Calendar/__tests__/Calendar.test.tsx +23 -15
  137. package/lib/components/Calendar/index.ts +1 -5
  138. package/lib/components/Calendar/subcomponents/AcademicWeeks.tsx +2 -1
  139. package/lib/components/Calendar/subcomponents/ColumnHeading.tsx +5 -1
  140. package/lib/components/Calendar/subcomponents/EventDot.tsx +2 -1
  141. package/lib/components/Calendar/subcomponents/Grid.tsx +0 -1
  142. package/lib/components/Calendar/subcomponents/index.ts +1 -1
  143. package/lib/components/Calendar/utils/getDatesForCalendarGrid/getDatesForCalendarGrid.ts +43 -11
  144. package/lib/components/Calendar/utils/normaliseMonth/normaliseMonth.test.ts +5 -5
  145. package/lib/components/CookieNotice/CookieNotice.tsx +114 -0
  146. package/lib/components/CookieNotice/index.ts +2 -0
  147. package/lib/components/Datepicker/Datepicker.lld.md +108 -0
  148. package/lib/components/Datepicker/Datepicker.stories.tsx +44 -5
  149. package/lib/components/Datepicker/Datepicker.tsx +14 -36
  150. package/lib/components/Datepicker/Datepicker.types.ts +5 -14
  151. package/lib/components/Datepicker/__tests__/Datepicker.test.tsx +150 -8
  152. package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +10 -4
  153. package/lib/components/Datepicker/subcomponents/CustomDatepicker.tsx +39 -5
  154. package/lib/components/Datepicker/subcomponents/DatepickerInput.tsx +30 -17
  155. package/lib/components/Datepicker/subcomponents/Panel.tsx +6 -2
  156. package/lib/components/Datepicker/subcomponents/VisibleField.tsx +40 -3
  157. package/lib/components/Datepicker/subcomponents/index.ts +0 -1
  158. package/lib/components/Datepicker/utils/index.ts +0 -1
  159. package/lib/components/Dialog/BaseDialog.tsx +55 -4
  160. package/lib/components/Dialog/Dialog.tsx +8 -1
  161. package/lib/components/Dialog/DialogBody.tsx +5 -1
  162. package/lib/components/Dialog/DialogHeader.tsx +2 -1
  163. package/lib/components/Divider/Divider.stories.tsx +1 -1
  164. package/lib/components/Field/ErrorText.tsx +1 -0
  165. package/lib/components/Field/Field.stories.tsx +1 -1
  166. package/lib/components/Field/__tests__/Field.test.tsx +161 -148
  167. package/lib/components/FileInput/FileInput.stories.tsx +70 -0
  168. package/lib/components/FileInput/FileInput.tsx +68 -0
  169. package/lib/components/FileInput/__tests__/FileInput.test.tsx +99 -0
  170. package/lib/components/FileInput/__tests__/__snapshots__/FileInput.test.tsx.snap +91 -0
  171. package/lib/components/FileInput/index.ts +2 -0
  172. package/lib/components/Footer/Footer.stories.tsx +1 -1
  173. package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +28 -28
  174. package/lib/components/Header/Header.mdx +52 -0
  175. package/lib/components/Header/Header.stories.tsx +98 -0
  176. package/lib/components/Header/Header.tsx +65 -3
  177. package/lib/components/Header/__tests__/Header.test.tsx +17 -1
  178. package/lib/components/Header/__tests__/__snapshots__/Header.test.tsx.snap +4 -4
  179. package/lib/components/Heading/Documentation.mdx +1 -1
  180. package/lib/components/Heading/Heading.stories.tsx +1 -1
  181. package/lib/components/Heading/Heading.tsx +1 -1
  182. package/lib/components/Heading/__tests__/Heading.test.tsx +7 -19
  183. package/lib/components/Heading/__tests__/__snapshots__/Heading.test.tsx.snap +7 -7
  184. package/lib/components/Icon/Icon.stories.tsx +1 -1
  185. package/lib/components/IconButton/IconButton.stories.tsx +1 -1
  186. package/lib/components/Input/Input.stories.tsx +1 -1
  187. package/lib/components/Label/Label.stories.tsx +1 -1
  188. package/lib/components/Label/Label.tsx +0 -2
  189. package/lib/components/Label/__tests__/__snapshots__/Label.test.tsx.snap +7 -7
  190. package/lib/components/Link/BaseLink.tsx +84 -0
  191. package/lib/components/Link/Link.tsx +72 -32
  192. package/lib/components/Link/__tests__/__snapshots__/link.test.tsx.snap +3 -3
  193. package/lib/components/Link/__tests__/link.test.tsx +6 -13
  194. package/lib/components/Link/index.ts +1 -1
  195. package/lib/components/Main/Main.stories.tsx +36 -0
  196. package/lib/components/Main/Main.tsx +46 -0
  197. package/lib/components/Main/__tests__/Main.test.tsx +80 -0
  198. package/lib/components/Main/__tests__/__snapshots__/Main.test.tsx.snap +33 -0
  199. package/lib/components/Main/index.ts +2 -0
  200. package/lib/components/Menu/Menu.context.tsx +3 -1
  201. package/lib/components/Menu/Menu.tsx +2 -2
  202. package/lib/components/Menu/MenuContent.tsx +5 -5
  203. package/lib/components/Menu/MenuItem.tsx +20 -3
  204. package/lib/components/Menu/MenuSection.tsx +4 -3
  205. package/lib/components/NativeDatepicker/NativeDatepicker.stories.tsx +100 -0
  206. package/lib/components/{Datepicker/subcomponents → NativeDatepicker}/NativeDatepicker.tsx +14 -15
  207. package/lib/components/NativeDatepicker/NativeDatepicker.types.ts +19 -0
  208. package/lib/components/NativeDatepicker/index.ts +2 -0
  209. package/lib/components/{Datepicker → NativeDatepicker}/utils/dateToLocaleISOString/dateToLocaleISOString.ts +1 -1
  210. package/lib/components/NativeDatepicker/utils/index.ts +1 -0
  211. package/lib/components/Pagination/PaginationControls.tsx +56 -15
  212. package/lib/components/Pagination/PaginationInfo.tsx +5 -1
  213. package/lib/components/Paragraph/Paragraph.stories.tsx +1 -1
  214. package/lib/components/Search/Search.stories.tsx +41 -0
  215. package/lib/components/Search/Search.tsx +170 -0
  216. package/lib/components/Search/__tests__/Search.test.tsx +112 -0
  217. package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +179 -0
  218. package/lib/components/Search/index.ts +2 -0
  219. package/lib/components/Select/Select.mdx +169 -0
  220. package/lib/components/Select/Select.stories.tsx +198 -77
  221. package/lib/components/Select/Select.tsx +37 -13
  222. package/lib/components/Select/Select.types.ts +77 -54
  223. package/lib/components/Select/__tests__/Select.test.tsx +448 -7
  224. package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +3 -3
  225. package/lib/components/Select/subcomponents/CustomOption.tsx +24 -10
  226. package/lib/components/Select/subcomponents/CustomSelect.tsx +333 -52
  227. package/lib/components/Select/subcomponents/FilterInput.tsx +80 -0
  228. package/lib/components/Select/subcomponents/NativeSelect.tsx +13 -1
  229. package/lib/components/Select/subcomponents/Panel.tsx +4 -5
  230. package/lib/components/Select/subcomponents/VisibleField.tsx +36 -24
  231. package/lib/components/Select/subcomponents/index.tsx +1 -0
  232. package/lib/components/Snackbar/Snackbar.stories.tsx +1 -1
  233. package/lib/components/Spinner/Spinner.stories.tsx +1 -1
  234. package/lib/components/StandaloneLink/StandaloneLink.stories.tsx +32 -0
  235. package/lib/components/StandaloneLink/StandaloneLink.tsx +183 -0
  236. package/lib/components/StandaloneLink/__tests__/StandaloneLink.test.tsx +57 -0
  237. package/lib/components/StandaloneLink/__tests__/__snapshots__/StandaloneLink.test.tsx.snap +19 -0
  238. package/lib/components/StandaloneLink/index.ts +2 -0
  239. package/lib/components/Table/Table.stories.tsx +337 -0
  240. package/lib/components/Table/Table.tsx +42 -67
  241. package/lib/components/Table/Table.types.ts +14 -0
  242. package/lib/components/Table/__tests__/Table.test.tsx +121 -0
  243. package/lib/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +210 -0
  244. package/lib/components/Table/index.ts +8 -1
  245. package/lib/components/Table/subcomponents/Body.tsx +18 -0
  246. package/lib/components/Table/subcomponents/Cell/Cell.stories.tsx +151 -0
  247. package/lib/components/Table/subcomponents/Cell/Cell.tsx +72 -0
  248. package/lib/components/Table/subcomponents/Cell/CellContent.tsx +91 -0
  249. package/lib/components/Table/subcomponents/Cell/__tests__/Cell.test.tsx +115 -0
  250. package/lib/components/Table/subcomponents/Cell/__tests__/__snapshots__/Cell.test.tsx.snap +107 -0
  251. package/lib/components/Table/subcomponents/Head.tsx +34 -0
  252. package/lib/components/Table/subcomponents/HeadCell/HeadCell.stories.tsx +85 -0
  253. package/lib/components/Table/subcomponents/HeadCell/HeadCell.tsx +99 -0
  254. package/lib/components/Table/subcomponents/HeadCell/HeadCellContent.tsx +61 -0
  255. package/lib/components/Table/subcomponents/HeadCell/__tests__/HeadCell.test.tsx +137 -0
  256. package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap +110 -0
  257. package/lib/components/Table/subcomponents/Row.tsx +49 -0
  258. package/lib/components/Table/subcomponents/SortIcon.tsx +63 -0
  259. package/lib/components/Table/subcomponents/index.ts +14 -0
  260. package/lib/components/Tabs/Tab.tsx +3 -3
  261. package/lib/components/Tabs/TabContext.tsx +1 -0
  262. package/lib/components/Tabs/Tabs.stories.tsx +9 -3
  263. package/lib/components/Tabs/Tabs.tsx +10 -32
  264. package/lib/components/Tabs/__tests__/Tabs.test.tsx +10 -4
  265. package/lib/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +32 -32
  266. package/lib/components/Textarea/Textarea.stories.tsx +1 -1
  267. package/lib/components/Timepicker/Timepicker.stories.tsx +43 -0
  268. package/lib/components/Timepicker/Timepicker.tsx +100 -0
  269. package/lib/components/Timepicker/__tests__/Timepicker.test.tsx +55 -0
  270. package/lib/components/Timepicker/__tests__/__snapshots__/Timepicker.test.tsx.snap +19 -0
  271. package/lib/components/Timepicker/index.tsx +2 -0
  272. package/lib/components/Timepicker/utils/convertDateToTimeString.test.ts +54 -0
  273. package/lib/components/Timepicker/utils/convertDateToTimeString.ts +10 -0
  274. package/lib/components/Timepicker/utils/index.ts +1 -0
  275. package/lib/components/Toggle/Toggle.stories.tsx +1 -1
  276. package/lib/components/Tooltip/Tooltip.stories.tsx +1 -1
  277. package/lib/components/WeekPicker/WeekPicker.stories.tsx +147 -0
  278. package/lib/components/WeekPicker/WeekPicker.tsx +26 -0
  279. package/lib/components/WeekPicker/WeekPicker.types.ts +21 -0
  280. package/lib/components/WeekPicker/index.ts +2 -0
  281. package/lib/components/WeekPicker/subcomponents/CustomDatepicker.tsx +298 -0
  282. package/lib/components/WeekPicker/subcomponents/DatepickerInput.tsx +111 -0
  283. package/lib/components/WeekPicker/subcomponents/VisibleField.tsx +126 -0
  284. package/lib/components/WeekPicker/subcomponents/index.ts +3 -0
  285. package/lib/components/common/Common.mdx +1 -1
  286. package/lib/components/index.ts +28 -2
  287. package/lib/hooks/index.ts +2 -0
  288. package/lib/hooks/useFocusTrap.ts +159 -0
  289. package/lib/index.ts +2 -0
  290. package/lib/theme/defaultTheme.ts +7 -0
  291. package/lib/utils/__tests__/announce.test.ts +121 -0
  292. package/lib/utils/__tests__/capitalise.test.ts +40 -0
  293. package/lib/utils/announce.ts +134 -0
  294. package/lib/utils/capitalise.ts +4 -0
  295. package/lib/utils/index.ts +1 -0
  296. package/package.json +3 -6
  297. package/dist/components/Datepicker/subcomponents/NativeDatepicker.d.ts +0 -6
  298. package/lib/components/Accordion/Accordion.stories.tsx.NOT_READY +0 -93
  299. package/lib/components/Field/__tests__/__snapshots__/Field.test.tsx.snap +0 -300
  300. /package/dist/components/{Datepicker/utils/dateToLocaleISOString/dateToLocaleISOString.test.d.ts → FileInput/__tests__/FileInput.test.d.ts} +0 -0
  301. /package/lib/components/{Datepicker → NativeDatepicker}/utils/dateToLocaleISOString/dateToLocaleISOString.test.ts +0 -0
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
- # UIKit - React - Public
1
+ # UIKit-React public
2
2
 
3
- React component library.
3
+ ```bash
4
+ npm install uikit-react-public
5
+ ```
@@ -1,7 +1,7 @@
1
- import { default as React, HTMLAttributes, JSX } from 'react';
2
- export declare const NAME = "ucl-accordion__heading";
3
- interface AccordionHeadingProps extends HTMLAttributes<HTMLElement> {
4
- as?: keyof JSX.IntrinsicElements;
1
+ import { default as React, HTMLAttributes } from 'react';
2
+ export declare const NAME = "ucl-uikit-accordion__heading";
3
+ export interface AccordionHeadingProps extends HTMLAttributes<HTMLElement> {
4
+ as?: keyof HTMLElementTagNameMap;
5
5
  testId?: string;
6
6
  }
7
7
  declare const AccordionHeading: React.FC<AccordionHeadingProps>;
@@ -1,6 +1,6 @@
1
1
  import { default as React, HTMLAttributes } from 'react';
2
- export declare const NAME = "ucl-accordion__panel";
3
- interface AccordionPanelProps extends HTMLAttributes<HTMLDivElement> {
2
+ export declare const NAME = "ucl-uikit-accordion__panel";
3
+ export interface AccordionPanelProps extends HTMLAttributes<HTMLDivElement> {
4
4
  testId?: string;
5
5
  }
6
6
  declare const AccordionPanel: React.FC<AccordionPanelProps>;
@@ -1,7 +1,7 @@
1
1
  import { default as React, HTMLAttributes } from 'react';
2
2
  import { default as AccordionHeading } from './Accordion.Heading';
3
3
  import { default as AccordionPanel } from './Accordion.Panel';
4
- export declare const NAME = "ucl-accordion";
4
+ export declare const NAME = "ucl-uikit-accordion";
5
5
  interface AccordionContextProps {
6
6
  isOpen: boolean;
7
7
  toggleAccordion: () => void;
@@ -0,0 +1,57 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').FC<import('./Accordion').AccordionProps> & {
5
+ Heading: import('react').FC<import('./Accordion.Heading').AccordionHeadingProps>;
6
+ Panel: import('react').FC<import('./Accordion.Panel').AccordionPanelProps>;
7
+ };
8
+ parameters: {
9
+ layout: string;
10
+ };
11
+ argTypes: {
12
+ size: {
13
+ options: string[];
14
+ control: {
15
+ type: "select";
16
+ };
17
+ type: "string";
18
+ };
19
+ disabled: {
20
+ control: {
21
+ type: "boolean";
22
+ };
23
+ type: "boolean";
24
+ };
25
+ isOpen: {
26
+ control: {
27
+ type: "boolean";
28
+ };
29
+ type: "boolean";
30
+ };
31
+ testId: {
32
+ control: {
33
+ type: "text";
34
+ };
35
+ type: "string";
36
+ };
37
+ className: {
38
+ control: {
39
+ type: "text";
40
+ };
41
+ type: "string";
42
+ };
43
+ };
44
+ args: {
45
+ isOpen: false;
46
+ disabled: false;
47
+ size: "medium";
48
+ };
49
+ tags: string[];
50
+ };
51
+ export default meta;
52
+ type Story = StoryObj<typeof meta>;
53
+ export declare const Default: Story;
54
+ export declare const Disabled: Story;
55
+ export declare const SmallSize: Story;
56
+ export declare const CustomHeadingElement: Story;
57
+ export declare const MultipleAccordions: Story;
@@ -1,2 +1,4 @@
1
1
  export { default } from './Accordion';
2
2
  export type { AccordionProps } from './Accordion';
3
+ export type { AccordionHeadingProps } from './Accordion.Heading';
4
+ export type { AccordionPanelProps } from './Accordion.Panel';
@@ -1,7 +1,110 @@
1
1
  import { StoryObj } from '@storybook/react';
2
+ import { AvatarProps } from './Avatar';
3
+ type AvatarSize = NonNullable<AvatarProps['size']>;
2
4
  declare const meta: {
3
5
  title: string;
4
- component: import('react').NamedExoticComponent<import('./Avatar').AvatarProps & import('react').RefAttributes<HTMLButtonElement>>;
6
+ component: import('react').NamedExoticComponent<AvatarProps & import('react').RefAttributes<HTMLButtonElement>>;
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ argTypes: {
11
+ variant: {
12
+ description: string;
13
+ options: string[];
14
+ control: {
15
+ type: "select";
16
+ };
17
+ table: {
18
+ type: {
19
+ summary: string;
20
+ };
21
+ };
22
+ };
23
+ imageUrl: {
24
+ description: string;
25
+ control: {
26
+ type: "text";
27
+ };
28
+ table: {
29
+ type: {
30
+ summary: string;
31
+ };
32
+ };
33
+ };
34
+ name: {
35
+ description: string;
36
+ control: {
37
+ type: "text";
38
+ };
39
+ table: {
40
+ type: {
41
+ summary: string;
42
+ };
43
+ };
44
+ };
45
+ size: {
46
+ description: string;
47
+ options: AvatarSize[];
48
+ control: {
49
+ type: "inline-radio";
50
+ };
51
+ table: {
52
+ type: {
53
+ summary: string;
54
+ };
55
+ };
56
+ };
57
+ disabled: {
58
+ description: string;
59
+ control: {
60
+ type: "boolean";
61
+ };
62
+ table: {
63
+ type: {
64
+ summary: string;
65
+ };
66
+ };
67
+ };
68
+ testId: {
69
+ description: string;
70
+ control: {
71
+ type: "text";
72
+ };
73
+ table: {
74
+ type: {
75
+ summary: string;
76
+ };
77
+ };
78
+ };
79
+ className: {
80
+ description: string;
81
+ control: {
82
+ type: "text";
83
+ };
84
+ table: {
85
+ type: {
86
+ summary: string;
87
+ };
88
+ };
89
+ };
90
+ onClick: {
91
+ description: string;
92
+ action: string;
93
+ table: {
94
+ type: {
95
+ summary: string;
96
+ };
97
+ };
98
+ };
99
+ };
100
+ args: {
101
+ variant: "image";
102
+ imageUrl: string;
103
+ name: string;
104
+ size: 56;
105
+ disabled: false;
106
+ };
107
+ tags: string[];
5
108
  };
6
109
  export default meta;
7
110
  type Story = StoryObj<typeof meta>;
@@ -9,3 +112,6 @@ export declare const Default: Story;
9
112
  export declare const Image: Story;
10
113
  export declare const Initials: Story;
11
114
  export declare const Icon: Story;
115
+ export declare const Sizes: Story;
116
+ export declare const Disabled: Story;
117
+ export declare const BrokenImageFallback: Story;
@@ -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,8 @@ 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
+ className?: string;
21
+ } & ButtonBaseProps & MarginProps & Omit<ComponentPropsWithRef<C>, keyof ButtonBaseProps | 'as'>;
20
22
  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
23
  declare const MemoizedButton: typeof Button;
22
24
  export default MemoizedButton;
@@ -1,2 +1,2 @@
1
1
  export { default } from './Calendar';
2
- export type { CalendarProps, CalendarEvent, AcademicWeek, } from './Calendar.types';
2
+ export type { CalendarProps, CalendarEvent, AcademicWeek } from './Calendar.types';
@@ -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,3 +1,3 @@
1
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;
2
+ declare const Datepicker: ({ value, onValueChange, minDate, maxDate, disabled, className, clearable, ...props }: DatepickerProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Datepicker;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ value, onValueChange, minDate, maxDate, disabled, className, native, nativeRef, nativeHTMLAttributes, ...props }: import('./Datepicker.types').DatepickerProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: ({ value, onValueChange, minDate, maxDate, disabled, className, clearable, ...props }: import('./Datepicker.types').DatepickerProps) => import("react/jsx-runtime").JSX.Element;
5
5
  parameters: {
6
6
  layout: string;
7
7
  };
@@ -26,7 +26,7 @@ declare const meta: {
26
26
  type: "boolean";
27
27
  };
28
28
  };
29
- native: {
29
+ clearable: {
30
30
  control: {
31
31
  type: "boolean";
32
32
  };
@@ -42,7 +42,8 @@ declare const meta: {
42
42
  export default meta;
43
43
  type Story = StoryObj<typeof meta>;
44
44
  export declare const Default: Story;
45
+ export declare const InAField: Story;
45
46
  export declare const WithEvents: Story;
46
47
  export declare const WithAcademicWeeks: Story;
47
48
  export declare const MinMaxDates: Story;
48
- export declare const Native: Story;
49
+ export declare const Clearable: Story;
@@ -1,5 +1,6 @@
1
- import { InputHTMLAttributes, HTMLAttributes, RefObject } from 'react';
1
+ import { HTMLAttributes, RefObject } from 'react';
2
2
  import { CalendarEvent, AcademicWeek } from '../Calendar';
3
+ import { InputProps } from './subcomponents/DatepickerInput';
3
4
  export type DatepickerValue = Date | null;
4
5
  interface BaseDatepickerProps {
5
6
  value?: DatepickerValue;
@@ -11,13 +12,11 @@ interface BaseDatepickerProps {
11
12
  academicWeeks?: AcademicWeek[];
12
13
  testId?: string;
13
14
  disabled?: boolean;
15
+ clearable?: boolean;
14
16
  ref?: RefObject<HTMLDivElement>;
15
17
  inputRef?: RefObject<HTMLInputElement>;
18
+ inputProps?: InputProps;
16
19
  }
17
- type NativeDatepickerAttributeProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'min' | 'max' | 'className' | 'disabled'>;
18
20
  export interface DatepickerProps extends BaseDatepickerProps, HTMLAttributes<HTMLDivElement> {
19
- native?: boolean;
20
- nativeHTMLAttributes?: NativeDatepickerAttributeProps;
21
- nativeRef?: RefObject<HTMLInputElement>;
22
21
  }
23
22
  export {};
@@ -1,17 +1,20 @@
1
1
  import { DatepickerValue } from '../Datepicker.types';
2
2
  import { CalendarEvent, AcademicWeek } from '../../Calendar';
3
+ import { InputProps } from './DatepickerInput';
3
4
  interface CustomDatepickerProps extends React.HTMLAttributes<HTMLDivElement> {
4
5
  value?: DatepickerValue;
5
6
  onValueChange?: (value: DatepickerValue, event?: React.SyntheticEvent) => void;
6
7
  minDate?: string | null;
7
8
  maxDate?: string | null;
8
9
  disabled?: boolean;
10
+ clearable?: boolean;
9
11
  events?: CalendarEvent[];
10
12
  showAcademicWeeks?: boolean;
11
13
  academicWeeks?: AcademicWeek[];
12
14
  testId?: string;
13
15
  ref?: React.RefObject<HTMLDivElement>;
14
16
  inputRef?: React.RefObject<HTMLInputElement>;
17
+ inputProps?: InputProps;
15
18
  }
16
- declare const CustomDatepicker: ({ value, onValueChange, minDate, maxDate, disabled, events, showAcademicWeeks, academicWeeks, testId, className, ref, inputRef, ...props }: CustomDatepickerProps) => import("react/jsx-runtime").JSX.Element;
19
+ declare const CustomDatepicker: ({ value, onValueChange, minDate, maxDate, disabled, clearable, events, showAcademicWeeks, academicWeeks, testId, className, ref, inputRef, inputProps, ...props }: CustomDatepickerProps) => import("react/jsx-runtime").JSX.Element;
17
20
  export default CustomDatepicker;
@@ -1,4 +1,17 @@
1
- interface DatepickerInputProps {
1
+ /**
2
+ * HTML attributes that consumers can pass to the underlying `<input>` via the
3
+ * `inputProps` prop on `<Datepicker>`.
4
+ *
5
+ * Controlled and internally-managed attributes are omitted to prevent conflicts.
6
+ */
7
+ export type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'onKeyDown' | 'onFocus' | 'disabled' | 'type'> & {
8
+ testId?: string;
9
+ };
10
+ /**
11
+ * Internal props for `<DatepickerInput>`, combining consumer-facing
12
+ * input attributes with controlled props managed by `<VisibleField>`.
13
+ */
14
+ interface DatepickerInputProps extends InputProps {
2
15
  value: string;
3
16
  onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
4
17
  onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
@@ -6,5 +19,5 @@ interface DatepickerInputProps {
6
19
  disabled: boolean;
7
20
  ref: React.RefObject<HTMLInputElement | null>;
8
21
  }
9
- declare const DatepickerInput: ({ value, onChange, onKeyDown, onFocus, disabled, ref, }: DatepickerInputProps) => import("react/jsx-runtime").JSX.Element;
22
+ declare const DatepickerInput: ({ disabled, placeholder, inputMode, testId, className, ...props }: DatepickerInputProps) => import("react/jsx-runtime").JSX.Element;
10
23
  export default DatepickerInput;
@@ -2,5 +2,5 @@ interface PanelProps {
2
2
  zIndex?: number;
3
3
  children: React.ReactNode;
4
4
  }
5
- declare const Panel: ({ zIndex, children }: PanelProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const Panel: ({ zIndex, children, }: PanelProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export default Panel;
@@ -1,12 +1,17 @@
1
1
  import { default as React } from 'react';
2
+ import { InputProps } from './DatepickerInput';
2
3
  interface VisibleFieldProps {
3
4
  inputValue: string;
4
5
  onInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
5
6
  onInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
6
7
  onInputFocus: () => void;
7
8
  onButtonClick: () => void;
9
+ onClear: (event: React.SyntheticEvent) => void;
8
10
  disabled: boolean;
11
+ clearable?: boolean;
12
+ hasValue?: boolean;
9
13
  inputRef: React.RefObject<HTMLInputElement | null>;
14
+ inputProps: InputProps;
10
15
  }
11
- declare const VisibleField: ({ inputValue, onInputChange, onInputKeyDown, onInputFocus, onButtonClick, disabled, inputRef, }: VisibleFieldProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const VisibleField: ({ inputValue, onInputChange, onInputKeyDown, onInputFocus, onButtonClick, onClear, disabled, clearable, hasValue, inputRef, inputProps, }: VisibleFieldProps) => import("react/jsx-runtime").JSX.Element;
12
17
  export default VisibleField;
@@ -1,5 +1,4 @@
1
1
  export { default as CustomDatepicker } from './CustomDatepicker';
2
- export { default as NativeDatepicker } from './NativeDatepicker';
3
2
  export { default as VisibleField } from './VisibleField';
4
3
  export { default as DatepickerInput } from './DatepickerInput';
5
4
  export { default as Panel } from './Panel';
@@ -1,2 +1 @@
1
- export { default as dateToLocaleISOString } from './dateToLocaleISOString/dateToLocaleISOString';
2
1
  export { default as parseInputValue } from './parseInputValue/parseInputValue';
@@ -9,8 +9,14 @@ 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;
18
+ skipCloseOnInitialFocus?: boolean;
13
19
  testId?: string;
14
20
  }
15
- declare const _default: React.MemoExoticComponent<({ open, size, modal, closeOnClickOutside, closeOnClickOutsideStopPropagation, onClose, testId, className, children, ...props }: BaseDialogProps) => import("react/jsx-runtime").JSX.Element | null>;
21
+ declare const _default: React.MemoExoticComponent<({ open, size, modal, closeOnClickOutside, closeOnClickOutsideStopPropagation, nonModalCloseOnEscape, onClose, className, children, initialFocusRef, finalFocusRef, disableFocusTrap, restoreFocus, skipCloseOnInitialFocus, testId, ...props }: BaseDialogProps) => import("react/jsx-runtime").JSX.Element | null>;
16
22
  export default _default;
@@ -4,6 +4,8 @@ import { default as DialogBody } from './DialogBody';
4
4
  import { default as DialogFooter } from './DialogFooter';
5
5
  export declare const NAME = "ucl-uikit-dialog";
6
6
  interface DialogContextValue {
7
+ dialogHeaderId?: string;
8
+ dialogBodyId?: string;
7
9
  onClose?: (ev: React.MouseEvent) => void;
8
10
  onSecondaryAction?: () => void;
9
11
  onAction?: () => void;
@@ -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';
@@ -7,9 +7,15 @@ 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>;
13
+ homeLinkHref?: string;
14
+ homeLinkProps?: Record<string, unknown>;
15
+ homeLinkAriaLabel?: string;
10
16
  testId?: string;
11
17
  }
12
- declare const MemoAppHeader: import('react').MemoExoticComponent<({ title, fixed, testId, className, children, ...props }: HeaderProps) => import("react/jsx-runtime").JSX.Element>;
18
+ declare const MemoAppHeader: import('react').MemoExoticComponent<({ title, fixed, titleAs, titleClassName, titleProps, homeLinkHref, homeLinkProps, homeLinkAriaLabel, testId, className, children, ...props }: HeaderProps) => import("react/jsx-runtime").JSX.Element>;
13
19
  export interface IHeaderSubComponents {
14
20
  Menu: typeof HeaderMenu;
15
21
  }
@@ -0,0 +1,40 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').NamedExoticComponent<import('./Header').HeaderProps> & {
5
+ readonly type: ({ title, fixed, titleAs, titleClassName, titleProps, homeLinkHref, homeLinkProps, homeLinkAriaLabel, testId, className, children, ...props }: import('./Header').HeaderProps) => import("react/jsx-runtime").JSX.Element;
6
+ } & import('./Header').IHeaderSubComponents;
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ argTypes: {
11
+ title: {
12
+ control: "text";
13
+ };
14
+ fixed: {
15
+ control: "boolean";
16
+ };
17
+ homeLinkHref: {
18
+ control: "text";
19
+ };
20
+ homeLinkAriaLabel: {
21
+ control: "text";
22
+ };
23
+ className: {
24
+ control: "text";
25
+ };
26
+ children: {
27
+ control: false;
28
+ };
29
+ };
30
+ args: {
31
+ title: string;
32
+ };
33
+ tags: string[];
34
+ };
35
+ export default meta;
36
+ type Story = StoryObj<typeof meta>;
37
+ export declare const Default: Story;
38
+ export declare const Fixed: Story;
39
+ export declare const WithHomeLink: Story;
40
+ export declare const WithMenu: Story;
@@ -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';
@@ -0,0 +1,21 @@
1
+ export interface MainProps extends React.HTMLAttributes<HTMLElement> {
2
+ /**
3
+ * Determines whether to wrap children in a `<Layout>` component,
4
+ * to apply the grid layout from the UCL Design System.
5
+ */
6
+ layout?: boolean;
7
+ /**
8
+ * ID for testing purposes.
9
+ * Added to the `data-testid` attribute of top-level `<main>` element.
10
+ * Default is `'ucl-uikit-main'`.
11
+ */
12
+ testId?: string;
13
+ }
14
+ export declare const NAME = "ucl-uikit-main";
15
+ /**
16
+ * Semantic wrapper around HTML `<main>` element
17
+ *
18
+ * Optionally wraps children in the UCL Design System `Layout` grid when `layout` is true
19
+ */
20
+ declare const Main: ({ layout, testId, className, children, ...props }: MainProps) => import("react/jsx-runtime").JSX.Element;
21
+ export default Main;