uikit-react-public 0.17.4 → 0.21.9

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 (282) hide show
  1. package/README.md +2 -4
  2. package/dist/components/Accordion/Accordion.Heading.d.ts +1 -0
  3. package/dist/components/AppHeader/AppHeader.d.ts +1 -1
  4. package/dist/components/AppHeader/AppHeaderBottom.d.ts +1 -1
  5. package/dist/components/AppHeader/AppHeaderNav.d.ts +1 -1
  6. package/dist/components/AppHeader/AppHeaderTop.d.ts +1 -1
  7. package/dist/components/Breadcrumbs/Breadcrumb.d.ts +3 -4
  8. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  9. package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
  10. package/dist/components/Button/Button.d.ts +7 -3
  11. package/dist/components/Button/Button.stories.d.ts +17 -7
  12. package/dist/components/Button/style/buttonAccentStyle.d.ts +4 -0
  13. package/dist/components/Button/style/buttonPrimaryDestructiveStyle.d.ts +4 -0
  14. package/dist/components/Button/style/buttonPrimaryStyle.d.ts +4 -0
  15. package/dist/components/Button/style/buttonPrimarySubtleStyle.d.ts +4 -0
  16. package/dist/components/Button/style/buttonPrimaryWarningStyle.d.ts +4 -0
  17. package/dist/components/Button/style/buttonSecondaryDestructiveStyle.d.ts +4 -0
  18. package/dist/components/Button/style/buttonSecondaryStyle.d.ts +4 -0
  19. package/dist/components/Button/style/buttonSecondarySubtleStyle.d.ts +4 -0
  20. package/dist/components/Button/style/buttonTertiaryDestructiveStyle.d.ts +4 -0
  21. package/dist/components/Button/style/buttonTertiaryNoPaddingStyle.d.ts +4 -0
  22. package/dist/components/Button/style/buttonTertiaryStyle.d.ts +4 -0
  23. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  24. package/dist/components/FooterNew/BackToTop.d.ts +8 -0
  25. package/dist/components/FooterNew/Footer.d.ts +23 -0
  26. package/dist/components/FooterNew/FooterColumn.d.ts +8 -0
  27. package/dist/components/FooterNew/FooterLinks.d.ts +7 -0
  28. package/dist/components/FooterNew/FooterNavLink.d.ts +8 -0
  29. package/dist/components/FooterNew/LegalAndCopyright.d.ts +14 -0
  30. package/dist/components/FooterNew/LogoAddressAndSocial.d.ts +10 -0
  31. package/dist/components/FooterNew/SocialLink.d.ts +8 -0
  32. package/dist/components/FooterNew/__tests__/Footer.test.d.ts +1 -0
  33. package/dist/components/FooterNew/index.d.ts +2 -0
  34. package/dist/components/HeaderNew/Header.d.ts +18 -0
  35. package/dist/components/HeaderNew/HeaderBorder.d.ts +7 -0
  36. package/dist/components/HeaderNew/HeaderLogo.d.ts +9 -0
  37. package/dist/components/HeaderNew/HeaderMenuContainer.d.ts +7 -0
  38. package/dist/components/HeaderNew/HeaderTitle.d.ts +9 -0
  39. package/dist/components/HeaderNew/__tests__/Header.test.d.ts +1 -0
  40. package/dist/components/HeaderNew/constants.d.ts +3 -0
  41. package/dist/components/HeaderNew/index.d.ts +3 -0
  42. package/dist/components/Heading/Heading.d.ts +6 -4
  43. package/dist/components/Heading/Heading.stories.d.ts +8 -6
  44. package/dist/components/Icon/svgImports.d.ts +7 -881
  45. package/dist/components/Link/BaseLink.d.ts +14 -5
  46. package/dist/components/Link/Link.d.ts +8 -3
  47. package/dist/components/Link/Link.stories.d.ts +3 -1
  48. package/dist/components/MenuNew/Menu.context.d.ts +14 -0
  49. package/dist/components/MenuNew/Menu.d.ts +20 -0
  50. package/dist/components/MenuNew/MenuContent.d.ts +9 -0
  51. package/dist/components/MenuNew/MenuItem.d.ts +10 -0
  52. package/dist/components/MenuNew/MenuSection.d.ts +7 -0
  53. package/dist/components/MenuNew/index.d.ts +6 -0
  54. package/dist/components/MenuNew/trigger/ButtonMenuTrigger.d.ts +8 -0
  55. package/dist/components/MenuNew/trigger/IconMenuTrigger.d.ts +8 -0
  56. package/dist/components/Overlay/Overlay.stories.d.ts +12 -12
  57. package/dist/components/Paragraph/Paragraph.d.ts +5 -2
  58. package/dist/components/Paragraph/Paragraph.stories.d.ts +6 -3
  59. package/dist/components/Select/Select.d.ts +2 -1
  60. package/dist/components/Select/Select.stories.d.ts +13 -1
  61. package/dist/components/Select/Select.types.d.ts +40 -13
  62. package/dist/components/Select/subcomponents/CustomSelect.d.ts +3 -3
  63. package/dist/components/Select/subcomponents/FilterInput.d.ts +3 -1
  64. package/dist/components/Select/subcomponents/NativeSelect.d.ts +2 -2
  65. package/dist/components/Select/subcomponents/VisibleField.d.ts +4 -1
  66. package/dist/components/Spinner/Spinner.d.ts +2 -0
  67. package/dist/components/StandaloneLink/StandaloneLink.d.ts +8 -5
  68. package/dist/components/StandaloneLink/StandaloneLink.stories.d.ts +3 -1
  69. package/dist/components/Table/Table.d.ts +3 -3
  70. package/dist/components/Table/Table.stories.d.ts +3 -3
  71. package/dist/components/Table/Table.types.d.ts +1 -0
  72. package/dist/components/Table/subcomponents/Cell/Cell.d.ts +5 -1
  73. package/dist/components/Table/subcomponents/Cell/Cell.stories.d.ts +15 -13
  74. package/dist/components/Table/subcomponents/Cell/CellContent.d.ts +5 -1
  75. package/dist/components/Table/subcomponents/HeadCell/HeadCell.d.ts +2 -1
  76. package/dist/components/Table/subcomponents/HeadCell/HeadCell.stories.d.ts +14 -13
  77. package/dist/components/Table/subcomponents/HeadCell/HeadCellContent.d.ts +2 -1
  78. package/dist/components/Table/subcomponents/__tests__/Row.test.d.ts +1 -0
  79. package/dist/components/UclLogoNew/UclLogo.d.ts +8 -0
  80. package/dist/components/UclLogoNew/index.d.ts +2 -0
  81. package/dist/components/index.d.ts +12 -0
  82. package/dist/index.js +20104 -15317
  83. package/dist/theme/__tests__/fonts.test.d.ts +1 -0
  84. package/dist/theme/common/themeCommon.d.ts +904 -0
  85. package/dist/theme/fonts.d.ts +18 -0
  86. package/dist/theme/index.d.ts +6 -3
  87. package/dist/theme/light/lightColour.d.ts +126 -0
  88. package/dist/theme/light/lightTheme.d.ts +3 -0
  89. package/dist/theme/original/color.d.ts +166 -0
  90. package/dist/theme/original/defaultTheme.d.ts +1340 -0
  91. package/dist/theme/original/originalColourNewStructure.d.ts +126 -0
  92. package/dist/theme/useTheme.d.ts +2174 -0
  93. package/dist/utils/addAlphaToHex.d.ts +5 -0
  94. package/dist/utils/scrollToTop.d.ts +2 -0
  95. package/lib/components/Accordion/Accordion.Heading.tsx +51 -39
  96. package/lib/components/Accordion/Accordion.Panel.tsx +0 -4
  97. package/lib/components/Accordion/Accordion.tsx +34 -28
  98. package/lib/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap +12 -10
  99. package/lib/components/Alert/Alert.tsx +12 -12
  100. package/lib/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +13 -39
  101. package/lib/components/AppHeader/AppHeader.tsx +6 -11
  102. package/lib/components/AppHeader/AppHeaderBottom.tsx +2 -3
  103. package/lib/components/AppHeader/AppHeaderNav.tsx +2 -3
  104. package/lib/components/AppHeader/AppHeaderTop.tsx +1 -1
  105. package/lib/components/AppHeader/__tests__/__snapshots__/AppHeader.test.tsx.snap +2 -2
  106. package/lib/components/AppMenu/__tests__/__snapshots__/AppMenu.test.tsx.snap +6 -19
  107. package/lib/components/Badge/Badge.stories.tsx +1 -1
  108. package/lib/components/Breadcrumbs/Breadcrumb.tsx +26 -12
  109. package/lib/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  110. package/lib/components/Breadcrumbs/__tests__/Breadcrumbs.test.tsx +9 -27
  111. package/lib/components/Breadcrumbs/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +24 -20
  112. package/lib/components/Button/Button.mdx +32 -279
  113. package/lib/components/Button/Button.stories.tsx +43 -50
  114. package/lib/components/Button/Button.tsx +165 -25
  115. package/lib/components/Button/__tests__/Button.test.tsx +49 -15
  116. package/lib/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +80 -73
  117. package/lib/components/Button/style/buttonAccentStyle.ts +53 -0
  118. package/lib/components/Button/style/buttonPrimaryDestructiveStyle.ts +55 -0
  119. package/lib/components/Button/style/buttonPrimaryStyle.ts +53 -0
  120. package/lib/components/Button/style/buttonPrimarySubtleStyle.ts +64 -0
  121. package/lib/components/Button/style/buttonPrimaryWarningStyle.ts +56 -0
  122. package/lib/components/Button/style/buttonSecondaryDestructiveStyle.ts +63 -0
  123. package/lib/components/Button/style/buttonSecondaryStyle.ts +62 -0
  124. package/lib/components/Button/style/buttonSecondarySubtleStyle.ts +72 -0
  125. package/lib/components/Button/style/buttonTertiaryDestructiveStyle.ts +65 -0
  126. package/lib/components/Button/style/buttonTertiaryNoPaddingStyle.ts +52 -0
  127. package/lib/components/Button/style/buttonTertiaryStyle.ts +62 -0
  128. package/lib/components/Calendar/Calendar.stories.tsx +33 -13
  129. package/lib/components/Calendar/Calendar.tsx +2 -2
  130. package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +99 -95
  131. package/lib/components/Calendar/subcomponents/AcademicWeek.tsx +2 -1
  132. package/lib/components/Calendar/subcomponents/AcademicWeeks.tsx +2 -3
  133. package/lib/components/Calendar/subcomponents/ColumnHeading.tsx +3 -7
  134. package/lib/components/Calendar/subcomponents/Controls.tsx +1 -1
  135. package/lib/components/Calendar/subcomponents/Day.stories.tsx +1 -1
  136. package/lib/components/Calendar/subcomponents/Day.tsx +7 -9
  137. package/lib/components/Calendar/subcomponents/EventDot.tsx +4 -8
  138. package/lib/components/Checkbox/Checkbox.stories.tsx +1 -1
  139. package/lib/components/Checkbox/Checkbox.tsx +12 -10
  140. package/lib/components/Checkbox/__tests__/Checkbox.test.tsx +29 -0
  141. package/lib/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +4 -4
  142. package/lib/components/Datepicker/__tests__/Datepicker.test.tsx +117 -0
  143. package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +16 -44
  144. package/lib/components/Datepicker/subcomponents/CustomDatepicker.tsx +10 -1
  145. package/lib/components/Datepicker/subcomponents/VisibleField.tsx +24 -23
  146. package/lib/components/Dialog/BaseDialog.tsx +2 -2
  147. package/lib/components/Dialog/Dialog.stories.tsx +1 -1
  148. package/lib/components/Divider/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +12 -12
  149. package/lib/components/FeedbackDialog/FeedbackDialog.stories.tsx +1 -1
  150. package/lib/components/FeedbackDialog/FeedbackDialog.tsx +4 -6
  151. package/lib/components/Field/CharacterCount.tsx +2 -2
  152. package/lib/components/Field/ErrorText.tsx +1 -1
  153. package/lib/components/Field/Field.tsx +1 -1
  154. package/lib/components/Field/HelperText.tsx +3 -1
  155. package/lib/components/FileInput/FileInput.stories.tsx +1 -1
  156. package/lib/components/FileInput/__tests__/__snapshots__/FileInput.test.tsx.snap +4 -20
  157. package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +70 -79
  158. package/lib/components/FooterNew/BackToTop.tsx +83 -0
  159. package/lib/components/FooterNew/Footer.tsx +110 -0
  160. package/lib/components/FooterNew/FooterColumn.tsx +79 -0
  161. package/lib/components/FooterNew/FooterLinks.tsx +44 -0
  162. package/lib/components/FooterNew/FooterNavLink.tsx +63 -0
  163. package/lib/components/FooterNew/LegalAndCopyright.tsx +150 -0
  164. package/lib/components/FooterNew/LogoAddressAndSocial.tsx +154 -0
  165. package/lib/components/FooterNew/SocialLink.tsx +108 -0
  166. package/lib/components/FooterNew/__tests__/Footer.test.tsx +51 -0
  167. package/lib/components/FooterNew/__tests__/__snapshots__/Footer.test.tsx.snap +1107 -0
  168. package/lib/components/FooterNew/index.ts +2 -0
  169. package/lib/components/HeaderDraft/__tests__/__snapshots__/Header.test.tsx.snap +3 -2
  170. package/lib/components/HeaderNew/Header.tsx +93 -0
  171. package/lib/components/HeaderNew/HeaderBorder.tsx +55 -0
  172. package/lib/components/HeaderNew/HeaderLogo.tsx +70 -0
  173. package/lib/components/HeaderNew/HeaderMenuContainer.tsx +35 -0
  174. package/lib/components/HeaderNew/HeaderTitle.tsx +53 -0
  175. package/lib/components/HeaderNew/__tests__/Header.test.tsx +42 -0
  176. package/lib/components/HeaderNew/__tests__/__snapshots__/Header.test.tsx.snap +79 -0
  177. package/lib/components/HeaderNew/constants.ts +3 -0
  178. package/lib/components/HeaderNew/index.ts +7 -0
  179. package/lib/components/Heading/Heading.stories.tsx +34 -41
  180. package/lib/components/Heading/Heading.tsx +180 -49
  181. package/lib/components/Heading/__tests__/__snapshots__/Heading.test.tsx.snap +4 -4
  182. package/lib/components/Icon/__tests__/__snapshots__/Icon.test.tsx.snap +16 -12
  183. package/lib/components/Icon/svgImports.ts +318 -296
  184. package/lib/components/IconButton/IconButton.tsx +3 -4
  185. package/lib/components/IconButton/__tests__/__snapshots__/IconButton.test.tsx.snap +12 -9
  186. package/lib/components/Link/BaseLink.tsx +114 -71
  187. package/lib/components/Link/Link.stories.tsx +1 -1
  188. package/lib/components/Link/Link.tsx +120 -109
  189. package/lib/components/Link/__tests__/__snapshots__/link.test.tsx.snap +2 -2
  190. package/lib/components/MenuNew/Menu.context.tsx +149 -0
  191. package/lib/components/MenuNew/Menu.tsx +75 -0
  192. package/lib/components/MenuNew/MenuContent.tsx +140 -0
  193. package/lib/components/MenuNew/MenuItem.tsx +101 -0
  194. package/lib/components/MenuNew/MenuSection.tsx +47 -0
  195. package/lib/components/MenuNew/index.ts +8 -0
  196. package/lib/components/MenuNew/trigger/ButtonMenuTrigger.tsx +42 -0
  197. package/lib/components/MenuNew/trigger/IconMenuTrigger.tsx +40 -0
  198. package/lib/components/Pagination/Pagination.stories.tsx +1 -1
  199. package/lib/components/Pagination/PaginationControls.tsx +4 -5
  200. package/lib/components/Pagination/PaginationInfo.tsx +2 -3
  201. package/lib/components/Paragraph/Paragraph.stories.tsx +29 -27
  202. package/lib/components/Paragraph/Paragraph.tsx +212 -81
  203. package/lib/components/Paragraph/__tests__/__snapshots__/Paragraph.test.tsx.snap +5 -5
  204. package/lib/components/Radio/Radio.stories.tsx +1 -1
  205. package/lib/components/Radio/Radio.tsx +8 -8
  206. package/lib/components/Radio/__tests__/__snapshots__/Radio.test.tsx.snap +4 -4
  207. package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +12 -32
  208. package/lib/components/Select/Select.mdx +23 -0
  209. package/lib/components/Select/Select.stories.tsx +43 -10
  210. package/lib/components/Select/Select.tsx +14 -3
  211. package/lib/components/Select/Select.types.ts +53 -16
  212. package/lib/components/Select/__tests__/Select.test.tsx +250 -1
  213. package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +5 -4
  214. package/lib/components/Select/subcomponents/CustomOption.tsx +10 -3
  215. package/lib/components/Select/subcomponents/CustomSelect.tsx +110 -10
  216. package/lib/components/Select/subcomponents/FilterInput.tsx +13 -3
  217. package/lib/components/Select/subcomponents/NativeSelect.tsx +10 -18
  218. package/lib/components/Select/subcomponents/Panel.tsx +2 -2
  219. package/lib/components/Select/subcomponents/VisibleField.tsx +48 -3
  220. package/lib/components/Snackbar/__tests__/__snapshots__/Snackbar.test.tsx.snap +9 -15
  221. package/lib/components/Spinner/Spinner.tsx +24 -5
  222. package/lib/components/Spinner/__tests__/Spinner.test.tsx +35 -5
  223. package/lib/components/Spinner/__tests__/__snapshots__/Spinner.test.tsx.snap +40 -16
  224. package/lib/components/StandaloneLink/StandaloneLink.stories.tsx +1 -1
  225. package/lib/components/StandaloneLink/StandaloneLink.tsx +180 -163
  226. package/lib/components/StandaloneLink/__tests__/__snapshots__/StandaloneLink.test.tsx.snap +2 -2
  227. package/lib/components/Table/Table.stories.tsx +1 -1
  228. package/lib/components/Table/Table.tsx +2 -0
  229. package/lib/components/Table/Table.types.ts +1 -0
  230. package/lib/components/Table/__tests__/Table.test.tsx +19 -0
  231. package/lib/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +7 -3
  232. package/lib/components/Table/subcomponents/Cell/Cell.stories.tsx +1 -1
  233. package/lib/components/Table/subcomponents/Cell/Cell.tsx +23 -2
  234. package/lib/components/Table/subcomponents/Cell/CellContent.tsx +12 -1
  235. package/lib/components/Table/subcomponents/Cell/__tests__/Cell.test.tsx +106 -0
  236. package/lib/components/Table/subcomponents/Cell/__tests__/__snapshots__/Cell.test.tsx.snap +4 -3
  237. package/lib/components/Table/subcomponents/HeadCell/HeadCell.stories.tsx +1 -1
  238. package/lib/components/Table/subcomponents/HeadCell/HeadCell.tsx +28 -6
  239. package/lib/components/Table/subcomponents/HeadCell/HeadCellContent.tsx +3 -0
  240. package/lib/components/Table/subcomponents/HeadCell/__tests__/HeadCell.test.tsx +221 -2
  241. package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap +6 -4
  242. package/lib/components/Table/subcomponents/Row.tsx +2 -2
  243. package/lib/components/Table/subcomponents/SortIcon.tsx +1 -0
  244. package/lib/components/Table/subcomponents/__tests__/Row.test.tsx +59 -0
  245. package/lib/components/Tabs/Tab.tsx +3 -3
  246. package/lib/components/Tabs/Tabs.stories.tsx +1 -1
  247. package/lib/components/Tabs/Tabs.tsx +5 -3
  248. package/lib/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +4 -4
  249. package/lib/components/Timepicker/Timepicker.stories.tsx +1 -1
  250. package/lib/components/Toggle/Toggle.tsx +5 -5
  251. package/lib/components/Toggle/ToggleHandle.tsx +2 -3
  252. package/lib/components/Tooltip/Tooltip.tsx +2 -2
  253. package/lib/components/Tooltip/__tests__/__snapshots__/tooltip.test.tsx.snap +2 -2
  254. package/lib/components/UclLogoNew/UclLogo.tsx +42 -0
  255. package/lib/components/UclLogoNew/index.ts +2 -0
  256. package/lib/components/WeekPicker/WeekPicker.stories.tsx +3 -5
  257. package/lib/components/common/Common.mdx +0 -1
  258. package/lib/components/index.ts +19 -1
  259. package/lib/theme/Colours.mdx +1 -1
  260. package/lib/theme/Theme.mdx +1 -1
  261. package/lib/theme/Typography.mdx +1 -1
  262. package/lib/theme/__tests__/fonts.test.ts +37 -0
  263. package/lib/theme/common/themeCommon.ts +515 -0
  264. package/lib/theme/fonts.ts +110 -0
  265. package/lib/theme/index.ts +6 -6
  266. package/lib/theme/light/lightColour.ts +232 -0
  267. package/lib/theme/light/lightTheme.ts +37 -0
  268. package/lib/theme/{defaultTheme.ts → original/color.ts} +17 -199
  269. package/lib/theme/original/defaultTheme.ts +207 -0
  270. package/lib/theme/original/originalColourNewStructure.ts +185 -0
  271. package/lib/theme/useTheme.tsx +72 -15
  272. package/lib/types/assets.d.ts +10 -0
  273. package/lib/utils/addAlphaToHex.ts +29 -0
  274. package/lib/utils/scrollToTop.ts +5 -0
  275. package/package.json +11 -6
  276. package/dist/components/Button/buttonPrimaryStyle.d.ts +0 -4
  277. package/dist/components/Button/buttonSecondaryStyle.d.ts +0 -4
  278. package/dist/components/Button/buttonTertiaryStyle.d.ts +0 -4
  279. package/dist/theme/defaultTheme.d.ts +0 -274
  280. package/lib/components/Button/buttonPrimaryStyle.ts +0 -62
  281. package/lib/components/Button/buttonSecondaryStyle.ts +0 -65
  282. package/lib/components/Button/buttonTertiaryStyle.ts +0 -54
@@ -31,7 +31,7 @@ const Tab = ({
31
31
  border: none;
32
32
  cursor: pointer;
33
33
  font-family: ${theme.font.family.primary};
34
- color: ${theme.color.text.secondary};
34
+ color: ${theme.colour.text.secondary};
35
35
  border-bottom: 4px solid transparent;
36
36
  text-align: center;
37
37
  font-style: normal;
@@ -53,8 +53,8 @@ const Tab = ({
53
53
  `;
54
54
 
55
55
  const activeStyle = css`
56
- border-bottom: 4px solid ${color || theme.color.interaction.blue70};
57
- color: ${theme.color.text.primary};
56
+ border-bottom: 4px solid ${color || theme.colour.border.brand};
57
+ color: ${theme.colour.text.default};
58
58
  margin-bottom: -1px;
59
59
  font-weight: 700;
60
60
 
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import Tabs from './Tabs';
3
3
 
4
4
  const meta = {
5
- title: 'Components/Work in progress/Tabs',
5
+ title: 'Components/Tabs',
6
6
  component: Tabs,
7
7
  parameters: {
8
8
  layout: 'padded',
@@ -7,8 +7,10 @@ import marginsStyle, { MarginProps } from '../common/marginsStyle';
7
7
 
8
8
  export const NAME = 'ucl-uikit-tabs';
9
9
 
10
- export interface TabsBaseProps
11
- extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
10
+ export interface TabsBaseProps extends Omit<
11
+ HTMLAttributes<HTMLDivElement>,
12
+ 'onChange'
13
+ > {
12
14
  activeTab: string;
13
15
  onChange?: (value: string) => void;
14
16
  fullWidth?: boolean;
@@ -42,7 +44,7 @@ const TabsBase = ({
42
44
 
43
45
  const baseStyle = css`
44
46
  display: flex;
45
- border-bottom: 1px solid ${theme.color.neutral.grey20};
47
+ border-bottom: 1px solid ${theme.colour.border.subtle};
46
48
  `;
47
49
 
48
50
  const style = cx(NAME, baseStyle, marginsStyle(props, theme), className);
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Tabs > snapshot: Auto width 1`] = `
4
4
  <div
5
- class="ucl-uikit-tabs css-kfvqex"
5
+ class="ucl-uikit-tabs css-1hchved"
6
6
  data-testid="ucl-uikit-tabs"
7
7
  role="tablist"
8
8
  >
@@ -47,7 +47,7 @@ exports[`Tabs > snapshot: Auto width 1`] = `
47
47
 
48
48
  exports[`Tabs > snapshot: Counter 1`] = `
49
49
  <div
50
- class="ucl-uikit-tabs css-kfvqex"
50
+ class="ucl-uikit-tabs css-1hchved"
51
51
  data-testid="ucl-uikit-tabs"
52
52
  role="tablist"
53
53
  >
@@ -96,7 +96,7 @@ exports[`Tabs > snapshot: Counter 1`] = `
96
96
 
97
97
  exports[`Tabs > snapshot: Custom test id 1`] = `
98
98
  <div
99
- class="ucl-uikit-tabs css-kfvqex"
99
+ class="ucl-uikit-tabs css-1hchved"
100
100
  data-testid="custom-test-id"
101
101
  role="tablist"
102
102
  >
@@ -141,7 +141,7 @@ exports[`Tabs > snapshot: Custom test id 1`] = `
141
141
 
142
142
  exports[`Tabs > snapshot: Minimal props 1`] = `
143
143
  <div
144
- class="ucl-uikit-tabs css-kfvqex"
144
+ class="ucl-uikit-tabs css-1hchved"
145
145
  data-testid="ucl-uikit-tabs"
146
146
  role="tablist"
147
147
  >
@@ -3,7 +3,7 @@ import { useState } from 'react';
3
3
  import Timepicker from './Timepicker';
4
4
 
5
5
  const meta: Meta<typeof Timepicker> = {
6
- title: 'Components/Work in progress/TimePicker',
6
+ title: 'Components/TimePicker',
7
7
  component: Timepicker,
8
8
  decorators: [(Story) => <Story />],
9
9
  };
@@ -33,7 +33,7 @@ const Toggle = forwardRef<Ref, ToggleProps>(
33
33
  width: 48px;
34
34
  height: 24px;
35
35
  border-radius: 12px;
36
- background-color: ${theme.color.neutral.grey40};
36
+ background-color: ${theme.colour.icon.tertiary};
37
37
  cursor: pointer;
38
38
  transition: background-color 0.2s ease-in-out;
39
39
  &:focus-visible {
@@ -43,11 +43,11 @@ const Toggle = forwardRef<Ref, ToggleProps>(
43
43
  `;
44
44
 
45
45
  const checkedStyle = css`
46
- background-color: ${theme.color.interaction.blue70};
46
+ background-color: ${theme.colour.fill.brand};
47
47
  `;
48
48
 
49
49
  const disabledStyle = css`
50
- background-color: ${theme.color.neutral.grey20};
50
+ background-color: ${theme.colour.surface.disabled};
51
51
  cursor: not-allowed;
52
52
  `;
53
53
 
@@ -56,8 +56,8 @@ const Toggle = forwardRef<Ref, ToggleProps>(
56
56
  css`
57
57
  &:hover {
58
58
  background-color: ${checked
59
- ? theme.color.interaction.blue80
60
- : theme.color.neutral.grey60};
59
+ ? theme.colour.fill.brandHover
60
+ : theme.colour.icon.secondary};
61
61
  }
62
62
  `;
63
63
 
@@ -4,8 +4,7 @@ import { useTheme } from '../../theme';
4
4
 
5
5
  export const NAME = 'ucl-uikit-toggle__handle';
6
6
 
7
- export interface ToggleHandleProps
8
- extends React.HTMLAttributes<HTMLDivElement> {
7
+ export interface ToggleHandleProps extends React.HTMLAttributes<HTMLDivElement> {
9
8
  checked: boolean;
10
9
  disabled: boolean;
11
10
  }
@@ -18,7 +17,7 @@ const ToggleHandle = ({ checked, className }: ToggleHandleProps) => {
18
17
  width: 20px;
19
18
  height: 20px;
20
19
  border-radius: 50%;
21
- background-color: ${theme.color.neutral.white};
20
+ background-color: ${theme.colour.fill.inverse};
22
21
  position: absolute;
23
22
  top: 2px;
24
23
  left: 2px;
@@ -15,8 +15,8 @@ const Tooltip = forwardRef<Ref, TooltipProps>(
15
15
  const [theme] = useTheme();
16
16
 
17
17
  const baseStyle = css`
18
- background-color: ${theme.color.neutral.grey90};
19
- color: ${theme.color.text.inverted};
18
+ background-color: ${theme.colour.surface.inverseBrandPrimary};
19
+ color: ${theme.colour.text.inverse};
20
20
  font-family: ${theme.font.family.primary};
21
21
  height: 32px;
22
22
  padding: 4px 8px 4px 8px;
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Tooltip > snapshot: no props 1`] = `
4
4
  <span
5
- class="ucl-uikit-tooltip css-h4sax9"
5
+ class="ucl-uikit-tooltip css-x1asgy"
6
6
  data-testid="ucl-uikit-tooltip"
7
7
  >
8
8
  test
@@ -11,7 +11,7 @@ exports[`Tooltip > snapshot: no props 1`] = `
11
11
 
12
12
  exports[`Tooltip > snapshot: testId prop 1`] = `
13
13
  <span
14
- class="ucl-uikit-tooltip css-h4sax9"
14
+ class="ucl-uikit-tooltip css-x1asgy"
15
15
  data-testid="test123"
16
16
  >
17
17
  Info Tooltip
@@ -0,0 +1,42 @@
1
+ import { SVGAttributes, memo } from 'react';
2
+ import { ts } from 'design-system-foundations-public';
3
+
4
+ const {
5
+ logos: {
6
+ ucl: { Primary: PrimaryUclLogoSvg },
7
+ ucl: { Secondary: SecondaryUclLogoSvg },
8
+ ucl: { PrimaryInverse: PrimaryInverseyUclLogoSvg },
9
+ ucl: { SecondaryInverse: SecondaryInverseyUclLogoSvg },
10
+ },
11
+ } = ts;
12
+
13
+ export const NAME = 'ucl-uikit-logo';
14
+
15
+ export interface UclLogoProps extends SVGAttributes<SVGElement> {
16
+ variant?: 'primary' | 'secondary' | 'primary-inverse' | 'secondary-inverse';
17
+ testId?: string;
18
+ }
19
+
20
+ const UclLogo = ({
21
+ variant = 'primary',
22
+ testId,
23
+ ...props
24
+ }: UclLogoProps) => {
25
+
26
+ const LogoSvg = {
27
+ primary: PrimaryUclLogoSvg,
28
+ secondary: SecondaryUclLogoSvg,
29
+ 'primary-inverse': PrimaryInverseyUclLogoSvg,
30
+ 'secondary-inverse': SecondaryInverseyUclLogoSvg,
31
+ }[variant];
32
+
33
+ return (
34
+ <LogoSvg
35
+ data-testid={testId}
36
+ {...props}
37
+ />
38
+ );
39
+
40
+ };
41
+
42
+ export default memo(UclLogo);
@@ -0,0 +1,2 @@
1
+ export { default as UclLogoNew } from './UclLogo';
2
+ export type { UclLogoProps } from './UclLogo';
@@ -3,7 +3,7 @@ import { useArgs } from '@storybook/preview-api';
3
3
  import WeekPicker from './WeekPicker';
4
4
 
5
5
  const meta = {
6
- title: 'Components/Work in progress/WeekPicker',
6
+ title: 'Components/WeekPicker',
7
7
  component: WeekPicker,
8
8
  parameters: { layout: 'padded' },
9
9
  argTypes: {
@@ -33,8 +33,7 @@ export const Default: Story = {
33
33
  ? new Date(args.maxDate).toLocaleDateString('sv-SE')
34
34
  : null;
35
35
 
36
- const onValueChange = (value: Date | null) =>
37
- updateArgs({ value: value });
36
+ const onValueChange = (value: Date | null) => updateArgs({ value: value });
38
37
  return (
39
38
  <WeekPicker
40
39
  {...args}
@@ -120,8 +119,7 @@ export const WithAcademicWeeks: Story = {
120
119
  ? new Date(args.maxDate).toLocaleDateString('sv-SE')
121
120
  : null;
122
121
 
123
- const onValueChange = (value: Date | null) =>
124
- updateArgs({ value: value });
122
+ const onValueChange = (value: Date | null) => updateArgs({ value: value });
125
123
  return (
126
124
  <WeekPicker
127
125
  {...args}
@@ -79,4 +79,3 @@ The available margin props are:
79
79
  [A live example of common margin props can be found in this `<Button>` story.](?path=/story/components-button--common-margins)
80
80
 
81
81
  Implementation details can be found in <a href='https://github.com/ucl-isd/uikit-react/blob/main/lib/components/common/marginsStyle.ts' target='_blank'>uikit-react/components/common/MarginsStyle.tsx</a>
82
-
@@ -40,8 +40,15 @@ export type { TextareaProps } from './Textarea';
40
40
  export { default as Heading } from './Heading';
41
41
  export type { HeadingProps } from './Heading';
42
42
 
43
+ export { default as HeadingNew } from './Heading';
44
+ export type { HeadingProps as HeadingNewProps } from './Heading';
45
+
43
46
  export { default as Paragraph } from './Paragraph';
44
47
  export type { ParagraphProps } from './Paragraph';
48
+
49
+ export { default as ParagraphNew } from './Paragraph';
50
+ export type { ParagraphProps as ParagraphNewProps } from './Paragraph';
51
+
45
52
  // TODO: Remove aliased export in future breaking release
46
53
  // <Paragraph> will be used in place of <Text> in the future
47
54
  export { default as Text } from './Paragraph';
@@ -53,6 +60,9 @@ export type { ModalProps } from './Modal';
53
60
  export { UclLogo } from './UclLogo';
54
61
  export type { UclLogoProps } from './UclLogo';
55
62
 
63
+ export { UclLogoNew } from './UclLogoNew';
64
+ export type { UclLogoProps as UclLogoNewProps } from './UclLogoNew';
65
+
56
66
  export { UclLogoNegativeSpace } from './UclLogo';
57
67
  export type { UclLogoNegativeSpaceProps } from './UclLogo';
58
68
 
@@ -77,18 +87,27 @@ export type { AppMenuProps } from './AppMenu';
77
87
  export { default as Menu } from './Menu';
78
88
  export type { MenuProps } from './Menu';
79
89
 
90
+ export { default as MenuNew } from './MenuNew';
91
+ export type { MenuProps as MenuNewProps } from './MenuNew';
92
+
80
93
  export { default as Select } from './Select';
81
94
  export type { SelectProps } from './Select';
82
95
 
83
96
  export { default as Footer } from './Footer';
84
97
  export type { FooterProps } from './Footer';
85
98
 
99
+ export { default as FooterNew } from './FooterNew';
100
+ export type { FooterProps as FooterNewProps } from './FooterNew';
101
+
86
102
  export { default as Divider } from './Divider';
87
103
  export type { DividerProps } from './Divider';
88
104
 
89
105
  export { default as Header } from './Header';
90
106
  export type { HeaderProps } from './Header';
91
107
 
108
+ export { default as HeaderNew } from './HeaderNew';
109
+ export type { HeaderProps as HeaderNewProps } from './HeaderNew';
110
+
92
111
  export { default as HeaderDraft } from './HeaderDraft';
93
112
  export type { HeaderDraftProps } from './HeaderDraft';
94
113
 
@@ -102,7 +121,6 @@ export { default as Tabs } from './Tabs';
102
121
  export type { TabsProps } from './Tabs';
103
122
  export type { TabProps } from './Tabs/Tab';
104
123
 
105
- // todo:
106
124
  export { default as Accordion } from './Accordion';
107
125
  export type { AccordionProps } from './Accordion';
108
126
 
@@ -1,5 +1,5 @@
1
1
  import { Meta, Title, Subtitle, ColorPalette, ColorItem } from '@storybook/addon-docs/blocks';
2
- import theme from './defaultTheme';
2
+ import theme from './original/defaultTheme';
3
3
 
4
4
  <Meta title="Theme/Colours" />
5
5
  <Title>Colours explorer</Title>
@@ -1,5 +1,5 @@
1
1
  import { Meta, Title, Subtitle, Source } from '@storybook/addon-docs/blocks';
2
- import theme from './defaultTheme';
2
+ import theme from './original/defaultTheme';
3
3
 
4
4
  { console.log('theme:', theme) }
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Meta, Title, Subtitle, Typeset } from '@storybook/blocks';
2
- import theme from './defaultTheme';
2
+ import theme from './original/defaultTheme';
3
3
 
4
4
  { console.log(theme.font) }
5
5
 
@@ -0,0 +1,37 @@
1
+ import { describe, expect, test } from 'vitest';
2
+ import { uikitFontUrls, uikitFonts } from '../fonts';
3
+
4
+ describe('theme/fonts exports', () => {
5
+ test('exports font URL map with expected keys', () => {
6
+ expect(uikitFontUrls).toMatchObject({
7
+ dmSansNormal: expect.any(String),
8
+ dmSansItalic: expect.any(String),
9
+ dmMonoItalic: expect.any(String),
10
+ dmMonoLight: expect.any(String),
11
+ dmMonoLightItalic: expect.any(String),
12
+ dmMonoMedium: expect.any(String),
13
+ dmMonoMediumItalic: expect.any(String),
14
+ dmMonoRegular: expect.any(String),
15
+ });
16
+ });
17
+
18
+ test('exports font source map with required shape', () => {
19
+ expect(uikitFonts['DM Sans']).toBeDefined();
20
+ expect(uikitFonts['DM Mono']).toBeDefined();
21
+
22
+ Object.values(uikitFonts).forEach((fontSources) => {
23
+ expect(Array.isArray(fontSources)).toBe(true);
24
+ expect(fontSources.length).toBeGreaterThan(0);
25
+
26
+ fontSources.forEach((source) => {
27
+ expect(typeof source.src).toBe('string');
28
+ expect(source.src.length).toBeGreaterThan(0);
29
+ expect(
30
+ source.fontStyle === 'normal' || source.fontStyle === 'italic'
31
+ ).toBe(true);
32
+ expect(typeof source.fontWeight).toBe('number');
33
+ expect(typeof source.fontFeatureSettings).toBe('string');
34
+ });
35
+ });
36
+ });
37
+ });