uikit-react-public 0.43.2 → 0.44.0

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 (78) hide show
  1. package/dist/components/Header/Header.d.ts +2 -1
  2. package/dist/components/Header/Header.stories.d.ts +5 -1
  3. package/dist/components/HeaderNew/Header.d.ts +2 -1
  4. package/dist/components/NavigationBar/NavigationBar.d.ts +12 -0
  5. package/dist/components/NavigationBar/NavigationBar.stories.d.ts +14 -0
  6. package/dist/components/NavigationBar/NavigationBarItem.d.ts +19 -0
  7. package/dist/components/NavigationBar/__tests__/NavigationBar.test.d.ts +1 -0
  8. package/dist/components/NavigationBar/index.d.ts +2 -0
  9. package/dist/components/Paragraph/Paragraph.d.ts +1 -1
  10. package/dist/components/index.d.ts +2 -0
  11. package/dist/index.js +5591 -5247
  12. package/lib/components/Accordion/Accordion.Heading.tsx +0 -2
  13. package/lib/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap +2 -2
  14. package/lib/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +4 -4
  15. package/lib/components/Avatar/Avatar.tsx +7 -1
  16. package/lib/components/Avatar/__tests__/__snapshots__/Avatar.test.tsx.snap +12 -12
  17. package/lib/components/Badge/Badge.tsx +6 -11
  18. package/lib/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap +9 -9
  19. package/lib/components/Button/Button.tsx +11 -7
  20. package/lib/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +9 -9
  21. package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +18 -18
  22. package/lib/components/Calendar/subcomponents/AcademicWeek.tsx +7 -5
  23. package/lib/components/Calendar/subcomponents/ColumnHeading.tsx +12 -7
  24. package/lib/components/Calendar/subcomponents/ControlsSelect.tsx +11 -6
  25. package/lib/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +2 -2
  26. package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +2 -2
  27. package/lib/components/DrawerMenu/DrawerMenu.tsx +4 -3
  28. package/lib/components/DropdownMenu/DropdownMenu.tsx +4 -3
  29. package/lib/components/DropdownUserMenu/DropdownUserMenu.tsx +8 -5
  30. package/lib/components/Field/CharacterCount.tsx +7 -6
  31. package/lib/components/Field/ErrorText.tsx +7 -6
  32. package/lib/components/FileInput/FileInput.tsx +11 -3
  33. package/lib/components/FileInput/__tests__/__snapshots__/FileInput.test.tsx.snap +4 -4
  34. package/lib/components/Footer/Footer.tsx +16 -3
  35. package/lib/components/Footer/FooterColumn.tsx +9 -4
  36. package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +13 -11
  37. package/lib/components/FooterNew/BackToTop.tsx +12 -4
  38. package/lib/components/FooterNew/FooterColumn.tsx +4 -0
  39. package/lib/components/FooterNew/FooterNavLink.tsx +12 -6
  40. package/lib/components/FooterNew/LegalAndCopyright.tsx +11 -6
  41. package/lib/components/FooterNew/LogoAddressAndSocial.tsx +27 -15
  42. package/lib/components/FooterNew/__tests__/__snapshots__/Footer.test.tsx.snap +32 -26
  43. package/lib/components/Header/Header.mdx +8 -1
  44. package/lib/components/Header/Header.stories.tsx +13 -0
  45. package/lib/components/Header/Header.tsx +3 -0
  46. package/lib/components/Header/__tests__/Header.test.tsx +22 -0
  47. package/lib/components/HeaderDraft/HeaderBottomBreadcrumbs.tsx +6 -1
  48. package/lib/components/HeaderDraft/HeaderBottomHeadingAndAvatar.tsx +19 -8
  49. package/lib/components/HeaderDraft/HeaderBreadcrumb.tsx +11 -2
  50. package/lib/components/HeaderDraft/HeaderDraft.tsx +16 -5
  51. package/lib/components/HeaderDraft/__tests__/__snapshots__/Header.test.tsx.snap +7 -7
  52. package/lib/components/HeaderNew/Header.tsx +7 -1
  53. package/lib/components/HeaderNew/HeaderItem.tsx +6 -0
  54. package/lib/components/HeaderNew/__tests__/Header.test.tsx +41 -0
  55. package/lib/components/Input/__tests__/__snapshots__/Input.test.tsx.snap +4 -4
  56. package/lib/components/Menu/MenuContent.tsx +9 -1
  57. package/lib/components/NativeDatepicker/NativeDatepicker.tsx +6 -2
  58. package/lib/components/NavigationBar/NavigationBar.stories.tsx +99 -0
  59. package/lib/components/NavigationBar/NavigationBar.tsx +76 -0
  60. package/lib/components/NavigationBar/NavigationBarItem.tsx +236 -0
  61. package/lib/components/NavigationBar/__tests__/NavigationBar.test.tsx +90 -0
  62. package/lib/components/NavigationBar/index.ts +5 -0
  63. package/lib/components/Pagination/PaginationInfo.tsx +8 -6
  64. package/lib/components/Pagination/subcomponents/PaginationCompactControls.tsx +8 -2
  65. package/lib/components/Pagination/subcomponents/PaginationStandardControls.tsx +2 -1
  66. package/lib/components/Paragraph/Paragraph.tsx +6 -4
  67. package/lib/components/Paragraph/__tests__/Paragraph.test.tsx +1 -1
  68. package/lib/components/Paragraph/__tests__/__snapshots__/Paragraph.test.tsx.snap +9 -9
  69. package/lib/components/Radio/__tests__/__snapshots__/Radio.test.tsx.snap +2 -2
  70. package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +2 -2
  71. package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +1 -1
  72. package/lib/components/Table/subcomponents/Cell/__tests__/__snapshots__/Cell.test.tsx.snap +2 -2
  73. package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap +1 -1
  74. package/lib/components/Textarea/__tests__/__snapshots__/Textarea.test.tsx.snap +4 -4
  75. package/lib/components/Tooltip/Tooltip.tsx +5 -8
  76. package/lib/components/Tooltip/__tests__/__snapshots__/tooltip.test.tsx.snap +2 -2
  77. package/lib/components/index.ts +6 -0
  78. package/package.json +2 -2
@@ -48,8 +48,6 @@ const AccordionHeading: React.FC<AccordionHeadingProps> = ({
48
48
  text-decoration: none;
49
49
  box-sizing: border-box;
50
50
  width: 100%;
51
- font-size: inherit;
52
- line-height: inherit;
53
51
 
54
52
  &:hover {
55
53
  background-color: ${theme.colour.surface.brandHover};
@@ -8,7 +8,7 @@ exports[`Accordion > snapshot: no props 1`] = `
8
8
  >
9
9
  <h6
10
10
  aria-expanded="false"
11
- class="ucl-uikit-heading ucl-uikit-accordion__heading css-db8j7j"
11
+ class="ucl-uikit-heading ucl-uikit-accordion__heading css-spdtpe"
12
12
  data-testid="ucl-uikit-accordion__heading"
13
13
  role="button"
14
14
  tabindex="0"
@@ -44,7 +44,7 @@ exports[`Accordion > snapshot: testId prop 1`] = `
44
44
  >
45
45
  <h6
46
46
  aria-expanded="false"
47
- class="ucl-uikit-heading ucl-uikit-accordion__heading css-db8j7j"
47
+ class="ucl-uikit-heading ucl-uikit-accordion__heading css-spdtpe"
48
48
  data-testid="ucl-uikit-accordion__heading"
49
49
  role="button"
50
50
  tabindex="0"
@@ -43,7 +43,7 @@ exports[`Alert > snapshot: type=error 1`] = `
43
43
  </span>
44
44
  </h3>
45
45
  <p
46
- class="ucl-uikit-paragrah ucl-uikit-alert__message css-1dosm7d"
46
+ class="ucl-uikit-paragraph ucl-uikit-alert__message css-1dosm7d"
47
47
  data-testid="ucl-uikit-alert__message"
48
48
  >
49
49
  The operation failed.
@@ -84,7 +84,7 @@ exports[`Alert > snapshot: type=info, no title 1`] = `
84
84
  </svg>
85
85
  <div>
86
86
  <p
87
- class="ucl-uikit-paragrah ucl-uikit-alert__message css-1dosm7d"
87
+ class="ucl-uikit-paragraph ucl-uikit-alert__message css-1dosm7d"
88
88
  data-testid="ucl-uikit-alert__message"
89
89
  >
90
90
  This is an informational alert.
@@ -134,7 +134,7 @@ exports[`Alert > snapshot: type=success 1`] = `
134
134
  </span>
135
135
  </h3>
136
136
  <p
137
- class="ucl-uikit-paragrah ucl-uikit-alert__message css-1dosm7d"
137
+ class="ucl-uikit-paragraph ucl-uikit-alert__message css-1dosm7d"
138
138
  data-testid="ucl-uikit-alert__message"
139
139
  >
140
140
  Your operation completed successfully.
@@ -181,7 +181,7 @@ exports[`Alert > snapshot: type=warning 1`] = `
181
181
  </span>
182
182
  </h3>
183
183
  <p
184
- class="ucl-uikit-paragrah ucl-uikit-alert__message css-1dosm7d"
184
+ class="ucl-uikit-paragraph ucl-uikit-alert__message css-1dosm7d"
185
185
  data-testid="ucl-uikit-alert__message"
186
186
  >
187
187
  This operation may have unintended consequences.
@@ -60,6 +60,9 @@ const Avatar = forwardRef<Ref, AvatarProps>(
60
60
  console.error('Avatar image failed to load', event);
61
61
  setImageError(true);
62
62
  };
63
+ const { smMedium, mdMedium, lgMedium } = theme.typography.body;
64
+ const initialsTypography =
65
+ size <= 32 ? smMedium : size <= 48 ? mdMedium : lgMedium;
63
66
 
64
67
  const baseStyle = css`
65
68
  display: flex;
@@ -74,8 +77,11 @@ const Avatar = forwardRef<Ref, AvatarProps>(
74
77
  height: ${size}px;
75
78
  color: ${theme.colour.text.brandPrimary};
76
79
  background-color: ${theme.colour.fill.brandSubtle};
77
- font-family: ${theme.font.family.primary};
80
+ font-family: ${initialsTypography.fontFamily};
81
+ font-feature-settings: ${initialsTypography.fontSettings};
78
82
  font-size: ${fontSize}px;
83
+ font-weight: ${initialsTypography.fontWeight};
84
+ line-height: ${initialsTypography.lineHeight}%;
79
85
  cursor: pointer;
80
86
  `;
81
87
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Avatar > Snapshot: Default 1`] = `
4
4
  <button
5
- class="ucl-uikit-avatar css-8z8m41"
5
+ class="ucl-uikit-avatar css-16zcktc"
6
6
  data-testid="ucl-uikit-avatar"
7
7
  >
8
8
  <svg
@@ -31,7 +31,7 @@ exports[`Avatar > Snapshot: Default 1`] = `
31
31
 
32
32
  exports[`Avatar > Snapshot: Default with disabled prop 1`] = `
33
33
  <button
34
- class="ucl-uikit-avatar css-ucbqvu"
34
+ class="ucl-uikit-avatar css-evms17"
35
35
  data-testid="ucl-uikit-avatar"
36
36
  disabled=""
37
37
  >
@@ -61,7 +61,7 @@ exports[`Avatar > Snapshot: Default with disabled prop 1`] = `
61
61
 
62
62
  exports[`Avatar > Snapshot: icon variant with disabled prop 1`] = `
63
63
  <button
64
- class="ucl-uikit-avatar css-ucbqvu"
64
+ class="ucl-uikit-avatar css-evms17"
65
65
  data-testid="ucl-uikit-avatar"
66
66
  disabled=""
67
67
  >
@@ -91,7 +91,7 @@ exports[`Avatar > Snapshot: icon variant with disabled prop 1`] = `
91
91
 
92
92
  exports[`Avatar > Snapshot: icon variant with no props 1`] = `
93
93
  <button
94
- class="ucl-uikit-avatar css-8z8m41"
94
+ class="ucl-uikit-avatar css-16zcktc"
95
95
  data-testid="ucl-uikit-avatar"
96
96
  >
97
97
  <svg
@@ -120,7 +120,7 @@ exports[`Avatar > Snapshot: icon variant with no props 1`] = `
120
120
 
121
121
  exports[`Avatar > Snapshot: image variant with imageUrl and name props 1`] = `
122
122
  <button
123
- class="ucl-uikit-avatar css-8z8m41"
123
+ class="ucl-uikit-avatar css-16zcktc"
124
124
  data-testid="ucl-uikit-avatar"
125
125
  >
126
126
  <img
@@ -134,7 +134,7 @@ exports[`Avatar > Snapshot: image variant with imageUrl and name props 1`] = `
134
134
 
135
135
  exports[`Avatar > Snapshot: image variant with imageUrl prop only 1`] = `
136
136
  <button
137
- class="ucl-uikit-avatar css-8z8m41"
137
+ class="ucl-uikit-avatar css-16zcktc"
138
138
  data-testid="ucl-uikit-avatar"
139
139
  >
140
140
  <img
@@ -148,7 +148,7 @@ exports[`Avatar > Snapshot: image variant with imageUrl prop only 1`] = `
148
148
 
149
149
  exports[`Avatar > Snapshot: image variant with imageUrl, name and disabled props 1`] = `
150
150
  <button
151
- class="ucl-uikit-avatar css-ucbqvu"
151
+ class="ucl-uikit-avatar css-evms17"
152
152
  data-testid="ucl-uikit-avatar"
153
153
  disabled=""
154
154
  >
@@ -163,7 +163,7 @@ exports[`Avatar > Snapshot: image variant with imageUrl, name and disabled props
163
163
 
164
164
  exports[`Avatar > Snapshot: image variant with name prop only 1`] = `
165
165
  <button
166
- class="ucl-uikit-avatar css-8z8m41"
166
+ class="ucl-uikit-avatar css-16zcktc"
167
167
  data-testid="ucl-uikit-avatar"
168
168
  >
169
169
  <span
@@ -176,7 +176,7 @@ exports[`Avatar > Snapshot: image variant with name prop only 1`] = `
176
176
 
177
177
  exports[`Avatar > Snapshot: image variant with no props 1`] = `
178
178
  <button
179
- class="ucl-uikit-avatar css-8z8m41"
179
+ class="ucl-uikit-avatar css-16zcktc"
180
180
  data-testid="ucl-uikit-avatar"
181
181
  >
182
182
  <svg
@@ -205,7 +205,7 @@ exports[`Avatar > Snapshot: image variant with no props 1`] = `
205
205
 
206
206
  exports[`Avatar > Snapshot: initials variant with name prop 1`] = `
207
207
  <button
208
- class="ucl-uikit-avatar css-8z8m41"
208
+ class="ucl-uikit-avatar css-16zcktc"
209
209
  data-testid="ucl-uikit-avatar"
210
210
  >
211
211
  <span
@@ -218,7 +218,7 @@ exports[`Avatar > Snapshot: initials variant with name prop 1`] = `
218
218
 
219
219
  exports[`Avatar > Snapshot: initials variant with name prop and disabled prop 1`] = `
220
220
  <button
221
- class="ucl-uikit-avatar css-ucbqvu"
221
+ class="ucl-uikit-avatar css-evms17"
222
222
  data-testid="ucl-uikit-avatar"
223
223
  disabled=""
224
224
  >
@@ -232,7 +232,7 @@ exports[`Avatar > Snapshot: initials variant with name prop and disabled prop 1`
232
232
 
233
233
  exports[`Avatar > Snapshot: initials variant with no props 1`] = `
234
234
  <button
235
- class="ucl-uikit-avatar css-8z8m41"
235
+ class="ucl-uikit-avatar css-16zcktc"
236
236
  data-testid="ucl-uikit-avatar"
237
237
  >
238
238
  <svg
@@ -2,6 +2,7 @@ import { css, cx } from '@emotion/css';
2
2
  import { useTheme } from '../../theme';
3
3
 
4
4
  import { Icon } from '../';
5
+ import Text from '../Text';
5
6
  import type { SpecificIconProps } from '../Icon/Icon';
6
7
  import type { ThemeType } from '../../theme';
7
8
 
@@ -127,8 +128,7 @@ const Badge = ({
127
128
  }: BadgeProps) => {
128
129
  const [theme] = useTheme();
129
130
 
130
- const badgeTypography =
131
- size === 'large' ? theme.typography.body.sm : theme.typography.body.xs;
131
+ const textLevel = size === 'large' ? 'sm' : 'xs';
132
132
 
133
133
  const iconSize = size === 'large' ? 16 : 14;
134
134
 
@@ -148,12 +148,6 @@ const Badge = ({
148
148
  background-color: ${backgroundColor};
149
149
  border: ${border ?? 'none'};
150
150
 
151
- font-family: ${badgeTypography.fontFamily};
152
- font-feature-settings: ${badgeTypography.fontSettings};
153
- font-size: ${badgeTypography.fontSize}px;
154
- font-weight: ${badgeTypography.fontWeight};
155
- line-height: ${badgeTypography.lineHeight}%;
156
-
157
151
  border-radius: 100px;
158
152
  white-space: nowrap;
159
153
  gap: 4px;
@@ -193,8 +187,9 @@ const Badge = ({
193
187
  const VariantIcon = VARIANT_ICON_MAP[variant];
194
188
 
195
189
  return (
196
- <span
197
- data-testid={testId}
190
+ <Text
191
+ level={textLevel}
192
+ testId={testId}
198
193
  className={style}
199
194
  {...props}
200
195
  >
@@ -212,7 +207,7 @@ const Badge = ({
212
207
  />
213
208
  )}
214
209
  {children}
215
- </span>
210
+ </Text>
216
211
  );
217
212
  };
218
213
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Badge > snapshot: default 1`] = `
4
4
  <span
5
- class="ucl-uikit-badge css-b76pju"
5
+ class="ucl-uikit-text ucl-uikit-badge css-1qd9y8u"
6
6
  data-testid="ucl-uikit-badge"
7
7
  >
8
8
  Default
@@ -11,7 +11,7 @@ exports[`Badge > snapshot: default 1`] = `
11
11
 
12
12
  exports[`Badge > snapshot: size=large 1`] = `
13
13
  <span
14
- class="ucl-uikit-badge css-6n39yj"
14
+ class="ucl-uikit-text ucl-uikit-badge css-1j13tem"
15
15
  data-testid="ucl-uikit-badge"
16
16
  >
17
17
  Large
@@ -20,7 +20,7 @@ exports[`Badge > snapshot: size=large 1`] = `
20
20
 
21
21
  exports[`Badge > snapshot: statusIndicator 1`] = `
22
22
  <span
23
- class="ucl-uikit-badge css-b76pju"
23
+ class="ucl-uikit-text ucl-uikit-badge css-1qd9y8u"
24
24
  data-testid="ucl-uikit-badge"
25
25
  >
26
26
  <span
@@ -33,7 +33,7 @@ exports[`Badge > snapshot: statusIndicator 1`] = `
33
33
 
34
34
  exports[`Badge > snapshot: variant=critical with icon 1`] = `
35
35
  <span
36
- class="ucl-uikit-badge css-1oxz1ke"
36
+ class="ucl-uikit-text ucl-uikit-badge css-rkw7bu"
37
37
  data-testid="ucl-uikit-badge"
38
38
  >
39
39
  <svg
@@ -66,7 +66,7 @@ exports[`Badge > snapshot: variant=critical with icon 1`] = `
66
66
 
67
67
  exports[`Badge > snapshot: variant=disabled 1`] = `
68
68
  <span
69
- class="ucl-uikit-badge css-psg0dk"
69
+ class="ucl-uikit-text ucl-uikit-badge css-a4ty56"
70
70
  data-testid="ucl-uikit-badge"
71
71
  >
72
72
  Disabled
@@ -75,7 +75,7 @@ exports[`Badge > snapshot: variant=disabled 1`] = `
75
75
 
76
76
  exports[`Badge > snapshot: variant=info with icon 1`] = `
77
77
  <span
78
- class="ucl-uikit-badge css-37ncyr"
78
+ class="ucl-uikit-text ucl-uikit-badge css-9ddki6"
79
79
  data-testid="ucl-uikit-badge"
80
80
  >
81
81
  <svg
@@ -108,7 +108,7 @@ exports[`Badge > snapshot: variant=info with icon 1`] = `
108
108
 
109
109
  exports[`Badge > snapshot: variant=info-subtle 1`] = `
110
110
  <span
111
- class="ucl-uikit-badge css-1x6sfca"
111
+ class="ucl-uikit-text ucl-uikit-badge css-1mmhjpi"
112
112
  data-testid="ucl-uikit-badge"
113
113
  >
114
114
  Info subtle
@@ -117,7 +117,7 @@ exports[`Badge > snapshot: variant=info-subtle 1`] = `
117
117
 
118
118
  exports[`Badge > snapshot: variant=success with icon 1`] = `
119
119
  <span
120
- class="ucl-uikit-badge css-16a4ap6"
120
+ class="ucl-uikit-text ucl-uikit-badge css-1k9d7cn"
121
121
  data-testid="ucl-uikit-badge"
122
122
  >
123
123
  <svg
@@ -148,7 +148,7 @@ exports[`Badge > snapshot: variant=success with icon 1`] = `
148
148
 
149
149
  exports[`Badge > snapshot: variant=warning with icon 1`] = `
150
150
  <span
151
- class="ucl-uikit-badge css-1o21lbi"
151
+ class="ucl-uikit-text ucl-uikit-badge css-1vsenfu"
152
152
  data-testid="ucl-uikit-badge"
153
153
  >
154
154
  <svg
@@ -127,6 +127,12 @@ const Button = <C extends ElementType = 'button'>({
127
127
 
128
128
  const resolvedVariant = normalizeVariantProp(variant, destructive);
129
129
  const resolvedSize = normalizeSizeprop(size);
130
+ const buttonTypography = {
131
+ xsmall: theme.typography.body.smMedium,
132
+ small: theme.typography.body.mdMedium,
133
+ medium: theme.typography.body.mdMedium,
134
+ large: theme.typography.body.lgMedium,
135
+ }[resolvedSize];
130
136
 
131
137
  const baseStyle = css`
132
138
  all: unset;
@@ -138,9 +144,11 @@ const Button = <C extends ElementType = 'button'>({
138
144
  position: relative;
139
145
  box-sizing: border-box;
140
146
  border-radius: ${theme.radius.r4};
141
- font-family: ${theme.typography.body.md.fontFamily};
142
- font-feature-settings: ${theme.typography.body.md.fontSettings};
143
- font-weight: 500;
147
+ font-family: ${buttonTypography.fontFamily};
148
+ font-feature-settings: ${buttonTypography.fontSettings};
149
+ font-size: ${buttonTypography.fontSize}px;
150
+ font-weight: ${buttonTypography.fontWeight};
151
+ line-height: ${buttonTypography.lineHeight}%;
144
152
  -webkit-font-smoothing: antialiased;
145
153
  -moz-osx-font-smoothing: grayscale;
146
154
  outline: none;
@@ -164,25 +172,21 @@ const Button = <C extends ElementType = 'button'>({
164
172
  const sizeExtraSmallStyle = css`
165
173
  height: 32px;
166
174
  padding: 0 ${paddingPx}px;
167
- font-size: 14px;
168
175
  `;
169
176
 
170
177
  const sizeSmallStyle = css`
171
178
  height: 40px;
172
179
  padding: 0 ${paddingPx}px;
173
- font-size: 16px;
174
180
  `;
175
181
 
176
182
  const sizeMediumStyle = css`
177
183
  height: 48px;
178
184
  padding: 0 ${paddingPx}px;
179
- font-size: 16px;
180
185
  `;
181
186
 
182
187
  const sizeLargeStyle = css`
183
188
  height: 56px;
184
189
  padding: 0 ${paddingPx}px;
185
- font-size: 18px;
186
190
  `;
187
191
 
188
192
  const fullWidthStyle = css`
@@ -3,7 +3,7 @@
3
3
  exports[`Button > maps legacy destructive prop to destructive variants 1`] = `
4
4
  <button
5
5
  aria-disabled="false"
6
- class="ucl-uikit-button css-rl1hmu"
6
+ class="ucl-uikit-button css-thupyi"
7
7
  data-testid="ucl-uikit-button"
8
8
  >
9
9
  Delete
@@ -13,7 +13,7 @@ exports[`Button > maps legacy destructive prop to destructive variants 1`] = `
13
13
  exports[`Button > maps legacy size default to medium 1`] = `
14
14
  <button
15
15
  aria-disabled="false"
16
- class="ucl-uikit-button css-19pu3x7"
16
+ class="ucl-uikit-button css-5txlzw"
17
17
  data-testid="ucl-uikit-button"
18
18
  >
19
19
  Legacy default size
@@ -23,7 +23,7 @@ exports[`Button > maps legacy size default to medium 1`] = `
23
23
  exports[`Button > snapshot: 'as' prop with 'a' 1`] = `
24
24
  <a
25
25
  aria-disabled="false"
26
- class="ucl-uikit-button css-19pu3x7"
26
+ class="ucl-uikit-button css-5txlzw"
27
27
  data-testid="ucl-uikit-button"
28
28
  href="https://ucl.ac.uk"
29
29
  >
@@ -34,7 +34,7 @@ exports[`Button > snapshot: 'as' prop with 'a' 1`] = `
34
34
  exports[`Button > snapshot: loading 1`] = `
35
35
  <button
36
36
  aria-disabled="false"
37
- class="ucl-uikit-button css-16925p4"
37
+ class="ucl-uikit-button css-736ss2"
38
38
  data-testid="ucl-uikit-button"
39
39
  disabled=""
40
40
  >
@@ -67,7 +67,7 @@ exports[`Button > snapshot: loading 1`] = `
67
67
  exports[`Button > snapshot: no props 1`] = `
68
68
  <button
69
69
  aria-disabled="false"
70
- class="ucl-uikit-button css-12mlzyd"
70
+ class="ucl-uikit-button css-5vh71f"
71
71
  data-testid="ucl-uikit-button"
72
72
  />
73
73
  `;
@@ -75,7 +75,7 @@ exports[`Button > snapshot: no props 1`] = `
75
75
  exports[`Button > snapshot: testId prop 1`] = `
76
76
  <button
77
77
  aria-disabled="false"
78
- class="ucl-uikit-button css-12mlzyd"
78
+ class="ucl-uikit-button css-5vh71f"
79
79
  data-testid="test123"
80
80
  />
81
81
  `;
@@ -83,7 +83,7 @@ exports[`Button > snapshot: testId prop 1`] = `
83
83
  exports[`Button > snapshot: variant prop 1`] = `
84
84
  <button
85
85
  aria-disabled="false"
86
- class="ucl-uikit-button css-ub9awk"
86
+ class="ucl-uikit-button css-25bhrl"
87
87
  data-testid="ucl-uikit-button"
88
88
  />
89
89
  `;
@@ -91,7 +91,7 @@ exports[`Button > snapshot: variant prop 1`] = `
91
91
  exports[`Button > snapshot: with icon 1`] = `
92
92
  <button
93
93
  aria-disabled="false"
94
- class="ucl-uikit-button css-19pu3x7"
94
+ class="ucl-uikit-button css-5txlzw"
95
95
  data-testid="ucl-uikit-button"
96
96
  >
97
97
  <svg
@@ -119,7 +119,7 @@ exports[`Button > snapshot: with icon 1`] = `
119
119
  exports[`Button > snapshot: with icon and iconPosition right 1`] = `
120
120
  <button
121
121
  aria-disabled="false"
122
- class="ucl-uikit-button css-19pu3x7"
122
+ class="ucl-uikit-button css-5txlzw"
123
123
  data-testid="ucl-uikit-button"
124
124
  >
125
125
  Download
@@ -41,7 +41,7 @@ exports[`Calendar > Snapshot: no date provided 1`] = `
41
41
  aria-expanded="false"
42
42
  aria-haspopup="listbox"
43
43
  aria-label="Month"
44
- class="ucl-uikit-select css-10nht8r"
44
+ class="ucl-uikit-select css-njh36g"
45
45
  data-testid="ucl-uikit-select"
46
46
  role="combobox"
47
47
  tabindex="0"
@@ -88,7 +88,7 @@ exports[`Calendar > Snapshot: no date provided 1`] = `
88
88
  aria-expanded="false"
89
89
  aria-haspopup="listbox"
90
90
  aria-label="Year"
91
- class="ucl-uikit-select css-10nht8r"
91
+ class="ucl-uikit-select css-njh36g"
92
92
  data-testid="ucl-uikit-select"
93
93
  role="combobox"
94
94
  tabindex="0"
@@ -162,43 +162,43 @@ exports[`Calendar > Snapshot: no date provided 1`] = `
162
162
  data-testid="ucl-uikit-calendar__grid"
163
163
  >
164
164
  <div
165
- class="ucl-uikit-calendar__column-heading css-76sg87"
165
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-9cfwur"
166
166
  data-testid="ucl-uikit-calendar__column-heading"
167
167
  >
168
168
  M
169
169
  </div>
170
170
  <div
171
- class="ucl-uikit-calendar__column-heading css-76sg87"
171
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-9cfwur"
172
172
  data-testid="ucl-uikit-calendar__column-heading"
173
173
  >
174
174
  T
175
175
  </div>
176
176
  <div
177
- class="ucl-uikit-calendar__column-heading css-76sg87"
177
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-9cfwur"
178
178
  data-testid="ucl-uikit-calendar__column-heading"
179
179
  >
180
180
  W
181
181
  </div>
182
182
  <div
183
- class="ucl-uikit-calendar__column-heading css-76sg87"
183
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-9cfwur"
184
184
  data-testid="ucl-uikit-calendar__column-heading"
185
185
  >
186
186
  T
187
187
  </div>
188
188
  <div
189
- class="ucl-uikit-calendar__column-heading css-76sg87"
189
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-9cfwur"
190
190
  data-testid="ucl-uikit-calendar__column-heading"
191
191
  >
192
192
  F
193
193
  </div>
194
194
  <div
195
- class="ucl-uikit-calendar__column-heading css-11w8me4"
195
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-1yk7pei"
196
196
  data-testid="ucl-uikit-calendar__column-heading"
197
197
  >
198
198
  S
199
199
  </div>
200
200
  <div
201
- class="ucl-uikit-calendar__column-heading css-11w8me4"
201
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-1yk7pei"
202
202
  data-testid="ucl-uikit-calendar__column-heading"
203
203
  >
204
204
  S
@@ -795,7 +795,7 @@ exports[`Calendar > Snapshot: with date provided 1`] = `
795
795
  aria-expanded="false"
796
796
  aria-haspopup="listbox"
797
797
  aria-label="Month"
798
- class="ucl-uikit-select css-10nht8r"
798
+ class="ucl-uikit-select css-njh36g"
799
799
  data-testid="ucl-uikit-select"
800
800
  role="combobox"
801
801
  tabindex="0"
@@ -842,7 +842,7 @@ exports[`Calendar > Snapshot: with date provided 1`] = `
842
842
  aria-expanded="false"
843
843
  aria-haspopup="listbox"
844
844
  aria-label="Year"
845
- class="ucl-uikit-select css-10nht8r"
845
+ class="ucl-uikit-select css-njh36g"
846
846
  data-testid="ucl-uikit-select"
847
847
  role="combobox"
848
848
  tabindex="0"
@@ -916,43 +916,43 @@ exports[`Calendar > Snapshot: with date provided 1`] = `
916
916
  data-testid="ucl-uikit-calendar__grid"
917
917
  >
918
918
  <div
919
- class="ucl-uikit-calendar__column-heading css-76sg87"
919
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-9cfwur"
920
920
  data-testid="ucl-uikit-calendar__column-heading"
921
921
  >
922
922
  M
923
923
  </div>
924
924
  <div
925
- class="ucl-uikit-calendar__column-heading css-76sg87"
925
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-9cfwur"
926
926
  data-testid="ucl-uikit-calendar__column-heading"
927
927
  >
928
928
  T
929
929
  </div>
930
930
  <div
931
- class="ucl-uikit-calendar__column-heading css-76sg87"
931
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-9cfwur"
932
932
  data-testid="ucl-uikit-calendar__column-heading"
933
933
  >
934
934
  W
935
935
  </div>
936
936
  <div
937
- class="ucl-uikit-calendar__column-heading css-76sg87"
937
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-9cfwur"
938
938
  data-testid="ucl-uikit-calendar__column-heading"
939
939
  >
940
940
  T
941
941
  </div>
942
942
  <div
943
- class="ucl-uikit-calendar__column-heading css-76sg87"
943
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-9cfwur"
944
944
  data-testid="ucl-uikit-calendar__column-heading"
945
945
  >
946
946
  F
947
947
  </div>
948
948
  <div
949
- class="ucl-uikit-calendar__column-heading css-11w8me4"
949
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-1yk7pei"
950
950
  data-testid="ucl-uikit-calendar__column-heading"
951
951
  >
952
952
  S
953
953
  </div>
954
954
  <div
955
- class="ucl-uikit-calendar__column-heading css-11w8me4"
955
+ class="ucl-uikit-paragraph ucl-uikit-calendar__column-heading css-1yk7pei"
956
956
  data-testid="ucl-uikit-calendar__column-heading"
957
957
  >
958
958
  S
@@ -1,5 +1,6 @@
1
1
  import { css, cx } from '@emotion/css';
2
2
  import { useTheme } from '../../../theme';
3
+ import Paragraph from '../../Paragraph';
3
4
 
4
5
  const NAME = 'ucl-uikit-calendar__academic-week';
5
6
 
@@ -16,20 +17,21 @@ const AcademicWeek = ({ weekNumber }: AcademicWeekProps) => {
16
17
  justify-content: center;
17
18
  width: 100%;
18
19
  height: 40px;
19
- font-family: ${theme.font.family.primary};
20
- font-size: ${theme.font.size.f14};
21
20
  color: ${theme.colour.text.brandPrimary};
22
21
  `;
23
22
 
24
23
  const style = cx(NAME, baseStyle);
25
24
 
26
25
  return (
27
- <div
28
- data-testid={NAME}
26
+ <Paragraph
27
+ as='div'
28
+ level='sm'
29
+ noMargins
30
+ testId={NAME}
29
31
  className={style}
30
32
  >
31
33
  {weekNumber && 'W ' + weekNumber.toString().padStart(2, '0')}
32
- </div>
34
+ </Paragraph>
33
35
  );
34
36
  };
35
37
 
@@ -1,5 +1,6 @@
1
1
  import { css, cx } from '@emotion/css';
2
2
  import { useTheme } from '../../../theme';
3
+ import Paragraph from '../../Paragraph';
3
4
 
4
5
  interface ColumnHeadingProps {
5
6
  index: number;
@@ -18,22 +19,26 @@ const ColumnHeading = ({ index, day, isWeekend }: ColumnHeadingProps) => {
18
19
  justify-content: center;
19
20
  width: 40px;
20
21
  height: 32px;
21
- color: ${isWeekend
22
- ? theme.colour.text.warningOnBgFill
23
- : theme.colour.text.secondary};
24
- font-weight: 700;
22
+ color: ${
23
+ isWeekend
24
+ ? theme.colour.text.warningOnBgFill
25
+ : theme.colour.text.secondary
26
+ };
25
27
  `;
26
28
 
27
29
  const style = cx(NAME, baseStyle);
28
30
 
29
31
  return (
30
- <div
32
+ <Paragraph
33
+ as='div'
34
+ level='md-semibold'
35
+ noMargins
31
36
  className={style}
32
- data-testid={NAME}
37
+ testId={NAME}
33
38
  key={index}
34
39
  >
35
40
  {day}
36
- </div>
41
+ </Paragraph>
37
42
  );
38
43
  };
39
44