uikit-react-public 0.39.0 → 0.40.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 (70) hide show
  1. package/dist/components/Accordion/Accordion.Heading.d.ts +2 -1
  2. package/dist/components/Accordion/Accordion.d.ts +8 -2
  3. package/dist/components/Accordion/Accordion.stories.d.ts +2 -2
  4. package/dist/components/Alert/Alert.d.ts +2 -2
  5. package/dist/components/Alert/Alert.stories.d.ts +2 -2
  6. package/dist/components/Alert/AlertMessage.d.ts +1 -1
  7. package/dist/components/Alert/AlertTitle.d.ts +1 -1
  8. package/dist/components/ErrorDialog/ErrorDialog.d.ts +26 -0
  9. package/dist/components/ErrorDialog/ErrorDialog.stories.d.ts +14 -0
  10. package/dist/components/ErrorDialog/__tests__/ErrorDialog.test.d.ts +1 -0
  11. package/dist/components/ErrorDialog/index.d.ts +2 -0
  12. package/dist/components/Field/HelperText.d.ts +1 -1
  13. package/dist/components/index.d.ts +2 -0
  14. package/dist/index.js +6648 -6322
  15. package/lib/components/Accordion/Accordion.Heading.tsx +24 -8
  16. package/lib/components/Accordion/Accordion.Panel.tsx +7 -4
  17. package/lib/components/Accordion/Accordion.stories.tsx +8 -8
  18. package/lib/components/Accordion/Accordion.tsx +17 -23
  19. package/lib/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap +14 -14
  20. package/lib/components/Alert/Alert.tsx +0 -1
  21. package/lib/components/Alert/AlertMessage.tsx +10 -14
  22. package/lib/components/Alert/AlertTitle.tsx +11 -8
  23. package/lib/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +29 -14
  24. package/lib/components/AppHeader/AppHeader.tsx +0 -1
  25. package/lib/components/AppHeader/__tests__/__snapshots__/AppHeader.test.tsx.snap +1 -1
  26. package/lib/components/AppMenu/AppMenu.tsx +2 -9
  27. package/lib/components/AppMenu/AppMenuItem.tsx +6 -2
  28. package/lib/components/AppMenu/__tests__/__snapshots__/AppMenu.test.tsx.snap +6 -6
  29. package/lib/components/Breadcrumbs/Breadcrumbs.tsx +0 -4
  30. package/lib/components/Breadcrumbs/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +10 -10
  31. package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +85 -85
  32. package/lib/components/Calendar/subcomponents/Day.tsx +7 -3
  33. package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +2 -2
  34. package/lib/components/Datepicker/subcomponents/DatepickerInput.tsx +6 -3
  35. package/lib/components/Dialog/BaseDialog.tsx +6 -2
  36. package/lib/components/ErrorDialog/ErrorDialog.stories.tsx +85 -0
  37. package/lib/components/ErrorDialog/ErrorDialog.tsx +433 -0
  38. package/lib/components/ErrorDialog/__tests__/ErrorDialog.test.tsx +145 -0
  39. package/lib/components/ErrorDialog/index.tsx +2 -0
  40. package/lib/components/Field/HelperText.tsx +9 -10
  41. package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +25 -25
  42. package/lib/components/FooterNew/__tests__/__snapshots__/Footer.test.tsx.snap +28 -28
  43. package/lib/components/Header/Header.tsx +6 -3
  44. package/lib/components/Header/__tests__/__snapshots__/Header.test.tsx.snap +4 -4
  45. package/lib/components/HeaderNew/Header.tsx +0 -1
  46. package/lib/components/HeaderNew/__tests__/__snapshots__/Header.test.tsx.snap +2 -2
  47. package/lib/components/Input/Input.tsx +6 -3
  48. package/lib/components/Input/__tests__/__snapshots__/Input.test.tsx.snap +4 -4
  49. package/lib/components/Label/Label.tsx +7 -7
  50. package/lib/components/Label/__tests__/__snapshots__/Label.test.tsx.snap +7 -7
  51. package/lib/components/Link/BaseLink.tsx +8 -16
  52. package/lib/components/Link/__tests__/__snapshots__/link.test.tsx.snap +2 -2
  53. package/lib/components/Menu/Menu.tsx +0 -4
  54. package/lib/components/Menu/MenuItem.tsx +7 -5
  55. package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +2 -2
  56. package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +2 -2
  57. package/lib/components/Select/subcomponents/CustomOption.tsx +6 -3
  58. package/lib/components/Select/subcomponents/CustomSelect.tsx +6 -2
  59. package/lib/components/Select/subcomponents/NativeSelect.tsx +6 -3
  60. package/lib/components/Select/subcomponents/VisibleField.tsx +6 -1
  61. package/lib/components/Sidebar/Sidebar.tsx +0 -1
  62. package/lib/components/Sidebar/__tests__/__snapshots__/Sidebar.test.tsx.snap +2 -2
  63. package/lib/components/StandaloneLink/__tests__/__snapshots__/StandaloneLink.test.tsx.snap +2 -2
  64. package/lib/components/Textarea/Textarea.tsx +6 -3
  65. package/lib/components/Textarea/__tests__/__snapshots__/Textarea.test.tsx.snap +4 -4
  66. package/lib/components/Timepicker/Timepicker.tsx +6 -2
  67. package/lib/components/Timepicker/__tests__/__snapshots__/Timepicker.test.tsx.snap +2 -2
  68. package/lib/components/WeekPicker/subcomponents/DatepickerInput.tsx +6 -3
  69. package/lib/components/index.ts +3 -0
  70. package/package.json +1 -1
@@ -37,10 +37,10 @@ const Header = ({
37
37
  ...props
38
38
  }: HeaderProps) => {
39
39
  const [theme] = useTheme();
40
+ const headerTitle = theme.typography.heading.lg.md;
40
41
 
41
42
  const baseStyle = css`
42
43
  background-color: ${theme.colour.surface.default};
43
- font-family: ${theme.font.family.primary};
44
44
  font-synthesis: none;
45
45
  text-rendering: optimizeLegibility;
46
46
  -webkit-font-smoothing: antialiased;
@@ -84,8 +84,11 @@ const Header = ({
84
84
  const titleBaseStyle = css`
85
85
  display: none;
86
86
  margin: 0;
87
- font-size: ${theme.font.size.f18};
88
- font-weight: 700;
87
+ font-family: ${headerTitle.fontFamily};
88
+ font-feature-settings: ${headerTitle.fontSettings};
89
+ font-size: ${headerTitle.fontSize}px;
90
+ font-weight: ${headerTitle.fontWeight};
91
+ line-height: ${headerTitle.lineHeight}%;
89
92
  text-align: center;
90
93
 
91
94
  @media (min-width: ${theme.breakpoints.desktop}px) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Header > snapshot: variant=avatar 1`] = `
4
4
  <header
5
- class="ucl-uikit-header css-u33frp"
5
+ class="ucl-uikit-header css-ijdzc5"
6
6
  data-testid="ucl-uikit-header"
7
7
  >
8
8
  <svg
@@ -21,7 +21,7 @@ exports[`Header > snapshot: variant=avatar 1`] = `
21
21
  />
22
22
  </svg>
23
23
  <div
24
- class="css-bwc2r5"
24
+ class="css-2877v"
25
25
  >
26
26
  LIDS
27
27
  </div>
@@ -30,7 +30,7 @@ exports[`Header > snapshot: variant=avatar 1`] = `
30
30
 
31
31
  exports[`Header > snapshot: variant=breadcrumbs 1`] = `
32
32
  <header
33
- class="ucl-uikit-header css-u33frp"
33
+ class="ucl-uikit-header css-ijdzc5"
34
34
  data-testid="ucl-uikit-header"
35
35
  >
36
36
  <svg
@@ -49,7 +49,7 @@ exports[`Header > snapshot: variant=breadcrumbs 1`] = `
49
49
  />
50
50
  </svg>
51
51
  <div
52
- class="css-bwc2r5"
52
+ class="css-2877v"
53
53
  >
54
54
  LIDS
55
55
  </div>
@@ -37,7 +37,6 @@ const Header = ({
37
37
  const baseStyle = css`
38
38
  position: relative;
39
39
  background-color: ${theme.colour.surface.primary};
40
- font-family: ${theme.font.family.primary};
41
40
  font-synthesis: none;
42
41
  text-rendering: optimizeLegibility;
43
42
  -webkit-font-smoothing: antialiased;
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Header > snapshot: variant=avatar 1`] = `
4
4
  <header
5
- class="ucl-uikit-header css-1nmwv3y"
5
+ class="ucl-uikit-header css-bf9n73"
6
6
  data-testid="ucl-uikit-header"
7
7
  >
8
8
  <div
@@ -41,7 +41,7 @@ exports[`Header > snapshot: variant=avatar 1`] = `
41
41
 
42
42
  exports[`Header > snapshot: variant=breadcrumbs 1`] = `
43
43
  <header
44
- class="ucl-uikit-header css-1nmwv3y"
44
+ class="ucl-uikit-header css-bf9n73"
45
45
  data-testid="ucl-uikit-header"
46
46
  >
47
47
  <div
@@ -41,6 +41,7 @@ const Input = forwardRef<Ref, InputProps>(
41
41
  ref
42
42
  ) => {
43
43
  const [theme] = useTheme();
44
+ const { md } = theme.typography.body;
44
45
 
45
46
  const { disabled: contextDisabled, id: contextId } = use(FieldContext);
46
47
  const disabled = props.disabled ?? contextDisabled;
@@ -50,10 +51,12 @@ const Input = forwardRef<Ref, InputProps>(
50
51
  height: 48px;
51
52
  width: 100%;
52
53
  padding: 0 ${theme.padding.p16};
53
- line-height: ${theme.padding.p48};
54
+ line-height: ${md.lineHeight}%;
54
55
  box-sizing: border-box;
55
- font-family: ${theme.font.family.primary};
56
- font-size: ${theme.font.size.f16};
56
+ font-family: ${md.fontFamily};
57
+ font-feature-settings: ${md.fontSettings};
58
+ font-size: ${md.fontSize}px;
59
+ font-weight: ${md.fontWeight};
57
60
  color: ${theme.colour.text.default};
58
61
  background-color: ${theme.colour.fill.inverse};
59
62
  border: ${theme.border.b1} solid ${theme.colour.speciality.inputDefault};
@@ -5,7 +5,7 @@ exports[`Input > snapshot: no props 1`] = `
5
5
  class="ucl-uikit-input css-1bpb1dw"
6
6
  >
7
7
  <input
8
- class="ucl-uikit-input__input css-1i2w3yn"
8
+ class="ucl-uikit-input__input css-10ijqev"
9
9
  data-testid="ucl-uikit-input"
10
10
  id=""
11
11
  />
@@ -17,7 +17,7 @@ exports[`Input > snapshot: placeholder prop 1`] = `
17
17
  class="ucl-uikit-input css-1bpb1dw"
18
18
  >
19
19
  <input
20
- class="ucl-uikit-input__input css-1i2w3yn"
20
+ class="ucl-uikit-input__input css-10ijqev"
21
21
  data-testid="ucl-uikit-input"
22
22
  id=""
23
23
  placeholder="Type your value..."
@@ -30,7 +30,7 @@ exports[`Input > snapshot: testId prop 1`] = `
30
30
  class="ucl-uikit-input css-1bpb1dw"
31
31
  >
32
32
  <input
33
- class="ucl-uikit-input__input css-1i2w3yn"
33
+ class="ucl-uikit-input__input css-10ijqev"
34
34
  data-testid="test123"
35
35
  id=""
36
36
  />
@@ -42,7 +42,7 @@ exports[`Input > snapshot: value prop 1`] = `
42
42
  class="ucl-uikit-input css-1bpb1dw"
43
43
  >
44
44
  <input
45
- class="ucl-uikit-input__input css-1i2w3yn"
45
+ class="ucl-uikit-input__input css-10ijqev"
46
46
  data-testid="ucl-uikit-input"
47
47
  id=""
48
48
  value="abc"
@@ -40,24 +40,24 @@ const Label = forwardRef<Ref, LabelProps>(
40
40
  disabled = disabled ?? contextDisabled;
41
41
  optional = optional ?? contextOptional;
42
42
  const htmlFor = props.htmlFor ?? contextId;
43
+ const { md, mdSemibold } = theme.typography.body;
43
44
 
44
45
  const baseStyle = css`
45
46
  width: 100%;
46
47
  color: ${theme.colour.text.default};
47
- font-family: ${theme.font.family.primary};
48
- font-size: ${theme.font.size.f16};
48
+ font-family: ${mdSemibold.fontFamily};
49
+ font-feature-settings: ${mdSemibold.fontSettings};
50
+ font-size: ${mdSemibold.fontSize}px;
51
+ font-weight: ${mdSemibold.fontWeight};
52
+ line-height: ${mdSemibold.lineHeight}%;
49
53
  `;
50
54
 
51
55
  const blockStyle = css`
52
56
  display: block;
53
- font-weight: ${theme.font.weight.bold};
54
- line-height: ${theme.font.lineHeight.h140};
55
57
  `;
56
58
 
57
59
  const inlineStyle = css`
58
60
  display: inline;
59
- font-weight: ${theme.font.weight.regular};
60
- line-height: ${theme.font.lineHeight.h150};
61
61
  `;
62
62
 
63
63
  const disabledStyle = css`
@@ -75,7 +75,7 @@ const Label = forwardRef<Ref, LabelProps>(
75
75
  );
76
76
 
77
77
  const optionalStyle = css`
78
- font-weight: ${theme.font.weight.regular};
78
+ font-weight: ${md.fontWeight};
79
79
  font-style: italic;
80
80
  `;
81
81
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Label > snapshot: Only required prop (text) 1`] = `
4
4
  <label
5
- class="ucl-uikit-label css-116lyj5"
5
+ class="ucl-uikit-label css-1dwdez8"
6
6
  data-testid="ucl-uikit-label"
7
7
  for=""
8
8
  >
@@ -12,7 +12,7 @@ exports[`Label > snapshot: Only required prop (text) 1`] = `
12
12
 
13
13
  exports[`Label > snapshot: className prop 1`] = `
14
14
  <label
15
- class="ucl-uikit-label test-class-name css-116lyj5"
15
+ class="ucl-uikit-label test-class-name css-1dwdez8"
16
16
  data-testid="ucl-uikit-label"
17
17
  for=""
18
18
  >
@@ -22,7 +22,7 @@ exports[`Label > snapshot: className prop 1`] = `
22
22
 
23
23
  exports[`Label > snapshot: testId prop 1`] = `
24
24
  <label
25
- class="ucl-uikit-label css-116lyj5"
25
+ class="ucl-uikit-label css-1dwdez8"
26
26
  data-testid="test123"
27
27
  for=""
28
28
  >
@@ -32,7 +32,7 @@ exports[`Label > snapshot: testId prop 1`] = `
32
32
 
33
33
  exports[`Label > snapshot: type prop with explicit block value 1`] = `
34
34
  <label
35
- class="ucl-uikit-label css-116lyj5"
35
+ class="ucl-uikit-label css-1dwdez8"
36
36
  data-testid="ucl-uikit-label"
37
37
  for=""
38
38
  >
@@ -42,7 +42,7 @@ exports[`Label > snapshot: type prop with explicit block value 1`] = `
42
42
 
43
43
  exports[`Label > snapshot: type prop with inline value 1`] = `
44
44
  <label
45
- class="ucl-uikit-label css-11raiub"
45
+ class="ucl-uikit-label css-6919uo"
46
46
  data-testid="ucl-uikit-label"
47
47
  for=""
48
48
  >
@@ -52,7 +52,7 @@ exports[`Label > snapshot: type prop with inline value 1`] = `
52
52
 
53
53
  exports[`Label > snapshot: with disabled prop 1`] = `
54
54
  <label
55
- class="ucl-uikit-label css-h3b4e6"
55
+ class="ucl-uikit-label css-w430a2"
56
56
  data-testid="ucl-uikit-label"
57
57
  for=""
58
58
  >
@@ -62,7 +62,7 @@ exports[`Label > snapshot: with disabled prop 1`] = `
62
62
 
63
63
  exports[`Label > snapshot: with optional prop 1`] = `
64
64
  <label
65
- class="ucl-uikit-label css-116lyj5"
65
+ class="ucl-uikit-label css-1dwdez8"
66
66
  data-testid="ucl-uikit-label"
67
67
  for=""
68
68
  >
@@ -9,11 +9,8 @@ import React, {
9
9
  useCallback,
10
10
  } from 'react';
11
11
  import { css, cx } from '@emotion/css';
12
- import { tokens } from 'design-system-foundations-public';
13
12
  import useTheme from '../../theme/useTheme';
14
13
 
15
- const { sans } = tokens.primitives.font.family;
16
-
17
14
  type AnchorishProps = {
18
15
  href?: string;
19
16
  onClick?: React.MouseEventHandler;
@@ -71,6 +68,8 @@ const BaseLink = forwardRef(function BaseLinkInner(
71
68
  ref: React.Ref<Element>
72
69
  ) {
73
70
  const [theme] = useTheme();
71
+ const { md, sm } = theme.typography.body;
72
+ const typography = size === 'small' ? sm : md;
74
73
  const Component = (component || 'a') as ElementType;
75
74
  const anchorProps = isAnchorProps(props) ? props : {};
76
75
  const { href, onClick, ...rest } = anchorProps;
@@ -87,8 +86,11 @@ const BaseLink = forwardRef(function BaseLinkInner(
87
86
  );
88
87
 
89
88
  const baseStyle = css`
90
- font-family: ${sans.$value.family};
91
- font-size: ${theme.font.size.f16};
89
+ font-family: ${typography.fontFamily};
90
+ font-feature-settings: ${typography.fontSettings};
91
+ font-size: ${typography.fontSize}px;
92
+ font-weight: ${typography.fontWeight};
93
+ line-height: ${typography.lineHeight}%;
92
94
 
93
95
  &:focus-visible {
94
96
  outline: none;
@@ -96,10 +98,6 @@ const BaseLink = forwardRef(function BaseLinkInner(
96
98
  }
97
99
  `;
98
100
 
99
- const smallStyle = css`
100
- font-size: ${theme.font.size.f14};
101
- `;
102
-
103
101
  const disabledStyle = css`
104
102
  cursor: not-allowed;
105
103
  color: ${theme.colour.link.disabled};
@@ -110,13 +108,7 @@ const BaseLink = forwardRef(function BaseLinkInner(
110
108
  }
111
109
  `;
112
110
 
113
- const style = cx(
114
- NAME,
115
- baseStyle,
116
- size === 'small' && smallStyle,
117
- disabled && disabledStyle,
118
- className
119
- );
111
+ const style = cx(NAME, baseStyle, disabled && disabledStyle, className);
120
112
 
121
113
  if (asChild) {
122
114
  const child = Children.only(children) as ReactElement<
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Link > snapshot: no props 1`] = `
4
4
  <a
5
- class="ucl-uikit-base-link ucl-uikit-link css-3wlbgk"
5
+ class="ucl-uikit-base-link ucl-uikit-link css-1s4qhyd"
6
6
  data-testid="ucl-uikit-link"
7
7
  >
8
8
  test
@@ -11,7 +11,7 @@ exports[`Link > snapshot: no props 1`] = `
11
11
 
12
12
  exports[`Link > snapshot: testId prop 1`] = `
13
13
  <a
14
- class="ucl-uikit-base-link ucl-uikit-link css-3wlbgk"
14
+ class="ucl-uikit-base-link ucl-uikit-link css-1s4qhyd"
15
15
  data-testid="test123"
16
16
  >
17
17
  testidlink
@@ -1,6 +1,5 @@
1
1
  import { HTMLAttributes, memo } from 'react';
2
2
  import { css, cx } from '@emotion/css';
3
- import { useTheme } from '../../theme';
4
3
  import MenuProvider from './Menu.context';
5
4
  import MenuContent from './MenuContent';
6
5
  import MenuItem from './MenuItem';
@@ -27,11 +26,8 @@ const Menu = ({
27
26
  className,
28
27
  ...props
29
28
  }: MenuProps) => {
30
- const [theme] = useTheme();
31
-
32
29
  const baseStyle = css`
33
30
  position: relative;
34
- font-family: ${theme.font.family.primary};
35
31
  `;
36
32
 
37
33
  const style = cx(NAME, baseStyle, className);
@@ -24,17 +24,19 @@ const MenuItem: React.FC<MenuItemProps> = ({
24
24
  }) => {
25
25
  const isClickable = !!onClick;
26
26
  const [theme] = useTheme();
27
+ const { mdSemibold, sm } = theme.typography.body;
28
+ const typography = secondary ? sm : mdSemibold;
27
29
 
28
30
  const baseStyle = css`
29
31
  height: 40px;
30
32
  margin-bottom: ${theme.margin.m16};
31
33
  display: flex;
32
34
  align-items: center;
33
- font-family: ${theme.font.family.primary};
34
- font-size: ${theme.font.size.f16};
35
- font-weight: ${
36
- secondary ? `${theme.font.weight.medium}` : `${theme.font.weight.bold}`
37
- };
35
+ font-family: ${typography.fontFamily};
36
+ font-feature-settings: ${typography.fontSettings};
37
+ font-size: ${typography.fontSize}px;
38
+ font-weight: ${typography.fontWeight};
39
+ line-height: ${typography.lineHeight}%;
38
40
  color: ${theme.colour.text.secondary};
39
41
  `;
40
42
 
@@ -8,7 +8,7 @@ exports[`Search > snapshot: no props 1`] = `
8
8
  class="ucl-uikit-input css-1bpb1dw"
9
9
  >
10
10
  <input
11
- class="ucl-uikit-input__input css-1g04erc"
11
+ class="ucl-uikit-input__input css-1jgqttg"
12
12
  data-testid="ucl-uikit-search"
13
13
  id=""
14
14
  placeholder=""
@@ -87,7 +87,7 @@ exports[`Search > snapshot: testId prop 1`] = `
87
87
  class="ucl-uikit-input css-1bpb1dw"
88
88
  >
89
89
  <input
90
- class="ucl-uikit-input__input css-1g04erc"
90
+ class="ucl-uikit-input__input css-1jgqttg"
91
91
  data-testid="test123"
92
92
  id=""
93
93
  placeholder=""
@@ -4,13 +4,13 @@ exports[`Select > Snapshot: default 1`] = `
4
4
  <div
5
5
  aria-expanded="false"
6
6
  aria-haspopup="listbox"
7
- class="ucl-uikit-select css-a6n340"
7
+ class="ucl-uikit-select css-1kou9w2"
8
8
  data-testid="ucl-uikit-select"
9
9
  role="combobox"
10
10
  tabindex="0"
11
11
  >
12
12
  <div
13
- class="ucl-uikit-select__visible-field css-4o4quu"
13
+ class="ucl-uikit-select__visible-field css-1xmh36a"
14
14
  data-testid="ucl-uikit-select__visible-field"
15
15
  >
16
16
  <span
@@ -28,6 +28,7 @@ const CustomOption = <T extends string | number>({
28
28
  });
29
29
  }
30
30
  }, [isSelected]);
31
+ const { md } = theme.typography.body;
31
32
 
32
33
  const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {
33
34
  onSelect(event, value, optionIndex);
@@ -45,9 +46,11 @@ const CustomOption = <T extends string | number>({
45
46
  min-height: 40px;
46
47
  box-sizing: border-box;
47
48
  padding: ${theme.padding.p8} ${theme.padding.p16};
48
- font-family: ${theme.font.family.primary};
49
- font-size: ${theme.font.size.f16};
50
- line-height: ${theme.font.lineHeight.h140};
49
+ font-family: ${md.fontFamily};
50
+ font-feature-settings: ${md.fontSettings};
51
+ font-size: ${md.fontSize}px;
52
+ font-weight: ${md.fontWeight};
53
+ line-height: ${md.lineHeight}%;
51
54
  background-color: ${theme.colour.fill.inverse};
52
55
  overflow: hidden;
53
56
 
@@ -585,6 +585,7 @@ const CustomSelect = <T extends string | number>({
585
585
  if (filterInputRef.current) filterInputRef.current.focus();
586
586
  }
587
587
  };
588
+ const { md } = theme.typography.body;
588
589
 
589
590
  const baseStyle = css`
590
591
  display: inline-flex;
@@ -599,8 +600,11 @@ const CustomSelect = <T extends string | number>({
599
600
  padding: 0 16px;
600
601
  background-color: ${theme.colour.fill.inverse};
601
602
  color: ${theme.colour.text.default};
602
- font-family: ${theme.font.family.primary};
603
- font-size: ${theme.font.size.f16};
603
+ font-family: ${md.fontFamily};
604
+ font-feature-settings: ${md.fontSettings};
605
+ font-size: ${md.fontSize}px;
606
+ font-weight: ${md.fontWeight};
607
+ line-height: ${md.lineHeight}%;
604
608
  border: ${theme.border.b1} solid ${theme.colour.speciality.inputDefault};
605
609
  cursor: pointer;
606
610
  user-select: none;
@@ -32,13 +32,16 @@ const NativeSelect = ({
32
32
  ? theme.colour.icon.disabled
33
33
  : theme.colour.icon.default;
34
34
  const chevronDownSvg = chevronDownSvgDataUri(chevronColour);
35
+ const { md } = theme.typography.body;
35
36
 
36
37
  const baseStyle = css`
37
38
  padding: 0 ${theme.padding.p40} 0 ${theme.padding.p16};
38
39
  height: ${theme.padding.p48};
39
- line-height: ${theme.font.lineHeight.h150};
40
- font-family: ${theme.font.family.primary};
41
- font-size: ${theme.font.size.f16};
40
+ font-family: ${md.fontFamily};
41
+ font-feature-settings: ${md.fontSettings};
42
+ font-size: ${md.fontSize}px;
43
+ font-weight: ${md.fontWeight};
44
+ line-height: ${md.lineHeight}%;
42
45
  background-color: ${theme.colour.fill.inverse};
43
46
  border: ${theme.border.b1} solid ${theme.colour.border.secondary};
44
47
  color: ${theme.colour.text.default};
@@ -33,6 +33,7 @@ const VisibleField = <T extends string | number>({
33
33
  children,
34
34
  }: VisibleFieldProps<T>) => {
35
35
  const [theme] = useTheme();
36
+ const { md } = theme.typography.body;
36
37
 
37
38
  const baseStyle = css`
38
39
  display: flex;
@@ -40,7 +41,11 @@ const VisibleField = <T extends string | number>({
40
41
  justify-content: space-between;
41
42
  gap: 8px;
42
43
  width: 100%;
43
- line-height: ${theme.font.lineHeight.h150};
44
+ font-family: ${md.fontFamily};
45
+ font-feature-settings: ${md.fontSettings};
46
+ font-size: ${md.fontSize}px;
47
+ font-weight: ${md.fontWeight};
48
+ line-height: ${md.lineHeight}%;
44
49
  `;
45
50
 
46
51
  const style = cx(NAME, baseStyle, className);
@@ -67,7 +67,6 @@ const Sidebar = ({
67
67
  background-color: ${theme.colour.surface.primary};
68
68
  border-right: ${theme.border.b1} solid ${theme.colour.border.subtle};
69
69
  color: ${theme.colour.text.default};
70
- font-family: ${theme.font.family.primary};
71
70
  transition:
72
71
  width 160ms ease,
73
72
  padding 160ms ease;
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Sidebar > snapshot: defaultCollapsed prop true 1`] = `
4
4
  <aside
5
- class="ucl-uikit-sidebar css-1r5qfp0"
5
+ class="ucl-uikit-sidebar css-1ewqq9w"
6
6
  data-collapsed="true"
7
7
  data-testid="ucl-uikit-sidebar"
8
8
  >
@@ -132,7 +132,7 @@ exports[`Sidebar > snapshot: defaultCollapsed prop true 1`] = `
132
132
 
133
133
  exports[`Sidebar > snapshot: no props 1`] = `
134
134
  <aside
135
- class="ucl-uikit-sidebar css-syj6vq"
135
+ class="ucl-uikit-sidebar css-w7wkqi"
136
136
  data-collapsed="false"
137
137
  data-testid="ucl-uikit-sidebar"
138
138
  >
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Link > snapshot: no props 1`] = `
4
4
  <a
5
- class="ucl-uikit-base-link ucl-uikit-standalone-link css-1x772n"
5
+ class="ucl-uikit-base-link ucl-uikit-standalone-link css-p4lxcl"
6
6
  data-testid="ucl-uikit-standalone-link"
7
7
  >
8
8
  test
@@ -11,7 +11,7 @@ exports[`Link > snapshot: no props 1`] = `
11
11
 
12
12
  exports[`Link > snapshot: testId prop 1`] = `
13
13
  <a
14
- class="ucl-uikit-base-link ucl-uikit-standalone-link css-1x772n"
14
+ class="ucl-uikit-base-link ucl-uikit-standalone-link css-p4lxcl"
15
15
  data-testid="test123"
16
16
  >
17
17
  testidlink
@@ -24,6 +24,7 @@ export type Ref = HTMLTextAreaElement;
24
24
  const Textarea = forwardRef<Ref, TextareaProps>(
25
25
  ({ value, resize = 'vertical', testId = NAME, className, ...props }, ref) => {
26
26
  const [theme] = useTheme();
27
+ const { md } = theme.typography.body;
27
28
 
28
29
  const {
29
30
  disabled: contextDisabled,
@@ -40,11 +41,13 @@ const Textarea = forwardRef<Ref, TextareaProps>(
40
41
  }, [value, setCharCount]);
41
42
 
42
43
  const baseStyle = css`
43
- line-height: ${theme.font.lineHeight.h150};
44
+ line-height: 150%;
44
45
  box-sizing: border-box;
45
46
  padding: ${theme.padding.p16};
46
- font-family: ${theme.font.family.primary};
47
- font-size: ${theme.font.size.f16};
47
+ font-family: ${md.fontFamily};
48
+ font-feature-settings: ${md.fontSettings};
49
+ font-size: ${md.fontSize}px;
50
+ font-weight: ${md.fontWeight};
48
51
  color: ${theme.colour.text.default};
49
52
  background-color: ${theme.colour.fill.inverse};
50
53
  border: ${theme.border.b1} solid ${theme.colour.speciality.inputDefault};
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Textarea > snapshot: Disabled 1`] = `
4
4
  <textarea
5
- class="ucl-uikit-textarea css-5yxu02"
5
+ class="ucl-uikit-textarea css-oemvy2"
6
6
  data-testid="ucl-uikit-textarea"
7
7
  disabled=""
8
8
  id=""
@@ -11,7 +11,7 @@ exports[`Textarea > snapshot: Disabled 1`] = `
11
11
 
12
12
  exports[`Textarea > snapshot: Placeholder 1`] = `
13
13
  <textarea
14
- class="ucl-uikit-textarea css-10cs6nh"
14
+ class="ucl-uikit-textarea css-1eo4yl8"
15
15
  data-testid="ucl-uikit-textarea"
16
16
  id=""
17
17
  placeholder="test"
@@ -20,7 +20,7 @@ exports[`Textarea > snapshot: Placeholder 1`] = `
20
20
 
21
21
  exports[`Textarea > snapshot: custom test id 1`] = `
22
22
  <textarea
23
- class="ucl-uikit-textarea css-10cs6nh"
23
+ class="ucl-uikit-textarea css-1eo4yl8"
24
24
  data-testid="custom-test-id"
25
25
  id=""
26
26
  />
@@ -28,7 +28,7 @@ exports[`Textarea > snapshot: custom test id 1`] = `
28
28
 
29
29
  exports[`Textarea > snapshot: minimal props 1`] = `
30
30
  <textarea
31
- class="ucl-uikit-textarea css-10cs6nh"
31
+ class="ucl-uikit-textarea css-1eo4yl8"
32
32
  data-testid="ucl-uikit-textarea"
33
33
  id=""
34
34
  />
@@ -27,13 +27,17 @@ const Timepicker = ({
27
27
  ...props
28
28
  }: TimepickerProps) => {
29
29
  const [theme] = useTheme();
30
+ const { md } = theme.typography.body;
30
31
 
31
32
  const baseStyle = css`
32
33
  color: ${theme.colour.text.default};
33
34
  border-radius: ${theme.radius.r4};
34
- font-size: ${theme.font.size.f24};
35
+ font-family: ${md.fontFamily};
36
+ font-feature-settings: ${md.fontSettings};
37
+ font-size: ${md.fontSize}px;
38
+ font-weight: ${md.fontWeight};
39
+ line-height: ${md.lineHeight}%;
35
40
  border-color: ${theme.colour.border.primary};
36
- font-family: ${theme.font.family.primary};
37
41
  padding: ${theme.padding.p4};
38
42
 
39
43
  &:focus-within {
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Timepicker > snapshot 1`] = `
4
4
  <input
5
- class="ucl-uikit-timepicker css-4iq7dt"
5
+ class="ucl-uikit-timepicker css-74plpz"
6
6
  data-testid="ucl-uikit-timepicker"
7
7
  type="time"
8
8
  value=""
@@ -11,7 +11,7 @@ exports[`Timepicker > snapshot 1`] = `
11
11
 
12
12
  exports[`Timepicker > snapshot: testID prop 1`] = `
13
13
  <input
14
- class="ucl-uikit-timepicker css-4iq7dt"
14
+ class="ucl-uikit-timepicker css-74plpz"
15
15
  data-testid="testId"
16
16
  type="time"
17
17
  value=""