uikit-react-public 0.37.0 → 0.38.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.
- package/dist/components/Alert/Alert.d.ts +1 -1
- package/dist/components/Alert/Alert.stories.d.ts +1 -1
- package/dist/components/Alert/AlertTitle.d.ts +1 -1
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -0
- package/dist/components/Pagination/PaginationControls.d.ts +2 -1
- package/dist/components/Pagination/__tests__/PaginationControls.test.d.ts +1 -0
- package/dist/components/Pagination/subcomponents/PaginationCompactControls.d.ts +7 -0
- package/dist/components/Pagination/subcomponents/PaginationStandardControls.d.ts +8 -0
- package/dist/components/Pagination/subcomponents/index.d.ts +2 -0
- package/dist/components/Toggle/ToggleHandle.d.ts +1 -1
- package/dist/components/UclLogoNew/UclLogo.d.ts +2 -1
- package/dist/components/UclLogoNew/__tests__/UclLogo.test.d.ts +1 -0
- package/dist/components/WeekPicker/__tests__/WeekPicker.test.d.ts +1 -0
- package/dist/index.js +5383 -5149
- package/dist/theme/dark/darkColour.d.ts +1 -0
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/light/lightColour.d.ts +1 -0
- package/dist/theme/original/defaultTheme.d.ts +7 -0
- package/dist/theme/original/originalColourNewStructure.d.ts +1 -0
- package/dist/theme/useTheme.d.ts +12 -0
- package/lib/components/Alert/AlertMessage.tsx +5 -4
- package/lib/components/Alert/AlertTitle.tsx +6 -8
- package/lib/components/AppHeader/AppHeader.stories.tsx +3 -3
- package/lib/components/AppHeader/AppHeader.tsx +2 -2
- package/lib/components/AppHeader/AppHeaderBottom.tsx +2 -3
- package/lib/components/AppHeader/AppHeaderTop.tsx +1 -1
- package/lib/components/AppHeader/__tests__/__snapshots__/AppHeader.test.tsx.snap +1 -1
- package/lib/components/AppMenu/AppMenuContent.tsx +4 -5
- package/lib/components/AppMenu/AppMenuDivider.tsx +5 -6
- package/lib/components/AppMenu/AppMenuItem.tsx +6 -6
- package/lib/components/AppMenu/__tests__/__snapshots__/AppMenu.test.tsx.snap +1 -1
- package/lib/components/Avatar/Avatar.tsx +7 -5
- package/lib/components/Avatar/__tests__/__snapshots__/Avatar.test.tsx.snap +18 -18
- package/lib/components/Badge/Badge.tsx +12 -12
- package/lib/components/Badge/__tests__/Badge.test.tsx +84 -1
- package/lib/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap +2 -2
- package/lib/components/Blanket/Blanket.tsx +1 -1
- package/lib/components/Blanket/__tests__/__snapshots__/Blanket.test.tsx.snap +1 -1
- package/lib/components/Button/__tests__/Button.test.tsx +46 -1
- package/lib/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +2 -2
- package/lib/components/Button/style/buttonAccentStyle.ts +1 -1
- package/lib/components/Button/style/buttonPrimaryDestructiveStyle.ts +1 -1
- package/lib/components/Button/style/buttonPrimaryWarningStyle.ts +1 -1
- package/lib/components/Button/style/buttonSecondarySubtleStyle.ts +1 -1
- package/lib/components/Calendar/Calendar.tsx +1 -0
- package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +17 -17
- package/lib/components/Calendar/subcomponents/AcademicWeek.tsx +0 -1
- package/lib/components/Calendar/subcomponents/Day.tsx +2 -2
- package/lib/components/Chip/Chip.tsx +7 -8
- package/lib/components/Chip/__tests__/__snapshots__/Chip.test.tsx.snap +5 -5
- package/lib/components/CookieNotice/CookieNotice.tsx +3 -3
- package/lib/components/Datepicker/__tests__/Datepicker.test.tsx +34 -1
- package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +6 -6
- package/lib/components/Datepicker/subcomponents/DatepickerInput.tsx +7 -6
- package/lib/components/Datepicker/subcomponents/VisibleField.tsx +6 -8
- package/lib/components/Dialog/BaseDialog.tsx +3 -3
- package/lib/components/Divider/Divider.tsx +5 -3
- package/lib/components/FileInput/FileInput.tsx +1 -1
- package/lib/components/FileInput/__tests__/__snapshots__/FileInput.test.tsx.snap +2 -2
- package/lib/components/Footer/Footer.tsx +17 -17
- package/lib/components/Footer/FooterNavLink.tsx +3 -3
- package/lib/components/Footer/SocialLink.tsx +3 -3
- package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +55 -55
- package/lib/components/FooterNew/BackToTop.tsx +1 -1
- package/lib/components/FooterNew/FooterColumn.tsx +1 -2
- package/lib/components/FooterNew/FooterNavLink.tsx +6 -5
- package/lib/components/FooterNew/LegalAndCopyright.tsx +15 -15
- package/lib/components/FooterNew/LogoAddressAndSocial.tsx +8 -6
- package/lib/components/FooterNew/SocialLink.tsx +4 -4
- package/lib/components/FooterNew/__tests__/__snapshots__/Footer.test.tsx.snap +44 -44
- package/lib/components/Header/Header.tsx +3 -3
- package/lib/components/Header/__tests__/__snapshots__/Header.test.tsx.snap +2 -2
- package/lib/components/HeaderDraft/HeaderBottomBreadcrumbs.tsx +3 -4
- package/lib/components/HeaderDraft/HeaderBottomHeadingAndAvatar.tsx +7 -7
- package/lib/components/HeaderDraft/HeaderBreadcrumb.tsx +4 -4
- package/lib/components/HeaderDraft/HeaderDraft.tsx +7 -7
- package/lib/components/HeaderDraft/__tests__/__snapshots__/Header.test.tsx.snap +5 -5
- package/lib/components/HeaderNew/Header.tsx +2 -2
- package/lib/components/HeaderNew/__tests__/__snapshots__/Header.test.tsx.snap +2 -2
- package/lib/components/Input/Input.tsx +6 -6
- package/lib/components/Input/__tests__/__snapshots__/Input.test.tsx.snap +4 -4
- package/lib/components/Label/Label.tsx +2 -2
- package/lib/components/Label/__tests__/__snapshots__/Label.test.tsx.snap +1 -1
- package/lib/components/Layout/Layout.stories.tsx +12 -12
- package/lib/components/Link/Link.tsx +4 -4
- package/lib/components/Menu/MenuContent.tsx +3 -3
- package/lib/components/Menu/MenuItem.tsx +10 -8
- package/lib/components/Menu/MenuSection.tsx +1 -1
- package/lib/components/Modal/Modal.tsx +5 -15
- package/lib/components/Modal/__tests__/__snapshots__/Modal.test.tsx.snap +2 -2
- package/lib/components/NativeDatepicker/NativeDatepicker.tsx +9 -7
- package/lib/components/Pagination/Pagination.stories.tsx +9 -0
- package/lib/components/Pagination/PaginationControls.tsx +17 -245
- package/lib/components/Pagination/__tests__/PaginationControls.test.tsx +213 -0
- package/lib/components/Pagination/subcomponents/PaginationCompactControls.tsx +266 -0
- package/lib/components/Pagination/subcomponents/PaginationStandardControls.tsx +246 -0
- package/lib/components/Pagination/subcomponents/index.ts +2 -0
- package/lib/components/Radio/Radio.tsx +13 -4
- package/lib/components/Radio/__tests__/__snapshots__/Radio.test.tsx.snap +3 -3
- package/lib/components/Search/Search.tsx +2 -2
- package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +2 -2
- package/lib/components/Select/subcomponents/CustomSelect.tsx +4 -4
- package/lib/components/Spinner/Spinner.stories.tsx +3 -3
- package/lib/components/Spinner/Spinner.tsx +1 -1
- package/lib/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +3 -3
- package/lib/components/Table/subcomponents/Head.tsx +2 -2
- package/lib/components/Table/subcomponents/Row.tsx +1 -1
- package/lib/components/Textarea/Textarea.tsx +7 -8
- package/lib/components/Textarea/__tests__/__snapshots__/Textarea.test.tsx.snap +4 -4
- package/lib/components/Timepicker/Timepicker.tsx +6 -4
- package/lib/components/Toggle/Toggle.tsx +3 -1
- package/lib/components/Toggle/ToggleHandle.tsx +4 -2
- package/lib/components/Tooltip/Tooltip.tsx +8 -5
- package/lib/components/Tooltip/__tests__/__snapshots__/tooltip.test.tsx.snap +2 -2
- package/lib/components/UclLogo/UclLogoNegativeSpace.tsx +7 -3
- package/lib/components/UclLogoNew/UclLogo.tsx +8 -9
- package/lib/components/UclLogoNew/__tests__/UclLogo.test.tsx +41 -0
- package/lib/components/WeekPicker/__tests__/WeekPicker.test.tsx +36 -0
- package/lib/components/WeekPicker/subcomponents/DatepickerInput.tsx +6 -6
- package/lib/components/WeekPicker/subcomponents/VisibleField.tsx +9 -9
- package/lib/theme/dark/darkColour.ts +2 -1
- package/lib/theme/dark/darkTheme.ts +8 -1
- package/lib/theme/index.ts +1 -0
- package/lib/theme/light/lightColour.ts +2 -1
- package/lib/theme/light/lightTheme.ts +7 -0
- package/lib/theme/original/defaultTheme.ts +10 -0
- package/lib/theme/original/originalColourNewStructure.ts +2 -1
- package/package.json +6 -6
|
@@ -19,7 +19,7 @@ const HeaderBreadcrumb = ({
|
|
|
19
19
|
const [theme] = useTheme();
|
|
20
20
|
|
|
21
21
|
const baseStyle = css`
|
|
22
|
-
color: ${theme.
|
|
22
|
+
color: ${theme.colour.text.default};
|
|
23
23
|
font-size: ${theme.font.size.f14};
|
|
24
24
|
`;
|
|
25
25
|
|
|
@@ -32,14 +32,14 @@ const HeaderBreadcrumb = ({
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
&:hover {
|
|
35
|
-
color: ${theme.
|
|
35
|
+
color: ${theme.colour.text.default};
|
|
36
36
|
text-decoration: underline;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
`;
|
|
40
40
|
|
|
41
41
|
const nonLinkStyle = css`
|
|
42
|
-
color: ${theme.
|
|
42
|
+
color: ${theme.colour.text.secondary};
|
|
43
43
|
font-weight: 700;
|
|
44
44
|
`;
|
|
45
45
|
|
|
@@ -48,7 +48,7 @@ const HeaderBreadcrumb = ({
|
|
|
48
48
|
const chevronIconStyle = css`
|
|
49
49
|
margin-left: ${theme.margin.m8};
|
|
50
50
|
vertical-align: middle;
|
|
51
|
-
color: ${theme.
|
|
51
|
+
color: ${theme.colour.text.secondary};
|
|
52
52
|
`;
|
|
53
53
|
|
|
54
54
|
const style = cx(NAME, baseStyle, className);
|
|
@@ -56,7 +56,7 @@ const HeaderDraft = ({
|
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
const baseStyle = css`
|
|
59
|
-
background-color: ${theme.
|
|
59
|
+
background-color: ${theme.colour.surface.default};
|
|
60
60
|
font-family: ${theme.font.family.primary};
|
|
61
61
|
font-synthesis: none;
|
|
62
62
|
text-rendering: optimizeLegibility;
|
|
@@ -88,8 +88,8 @@ const HeaderDraft = ({
|
|
|
88
88
|
const topStyle = css`
|
|
89
89
|
position: relative;
|
|
90
90
|
height: ${HEADER_TOP_HEIGHT}px;
|
|
91
|
-
background-color: ${theme.
|
|
92
|
-
color: ${theme.
|
|
91
|
+
background-color: ${theme.colour.surface.inverseBrandPrimary};
|
|
92
|
+
color: ${theme.colour.text.brandInverse};
|
|
93
93
|
display: flex;
|
|
94
94
|
justify-content: center;
|
|
95
95
|
align-items: center;
|
|
@@ -115,8 +115,8 @@ const HeaderDraft = ({
|
|
|
115
115
|
right: 60px;
|
|
116
116
|
height: 40px;
|
|
117
117
|
padding: 0 ${theme.padding.p16};
|
|
118
|
-
background-color: ${theme.
|
|
119
|
-
color: ${theme.
|
|
118
|
+
background-color: ${theme.colour.surface.default};
|
|
119
|
+
color: ${theme.colour.text.default};
|
|
120
120
|
font-size: ${theme.font.size.f16};
|
|
121
121
|
font-weight: 700;
|
|
122
122
|
border: none;
|
|
@@ -128,8 +128,8 @@ const HeaderDraft = ({
|
|
|
128
128
|
color 0.15s ease-out;
|
|
129
129
|
|
|
130
130
|
&:hover {
|
|
131
|
-
color: ${theme.
|
|
132
|
-
background-color: ${theme.
|
|
131
|
+
color: ${theme.colour.text.default};
|
|
132
|
+
background-color: ${theme.colour.fill.brandSubtleHover};
|
|
133
133
|
}
|
|
134
134
|
`;
|
|
135
135
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Header > snapshot: variant=avatar 1`] = `
|
|
4
4
|
<header
|
|
5
|
-
class="ucl-uikit-header css-
|
|
5
|
+
class="ucl-uikit-header css-16ajjjr"
|
|
6
6
|
data-testid="ucl-uikit-header"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
|
-
class="css-
|
|
9
|
+
class="css-1w82olg"
|
|
10
10
|
>
|
|
11
11
|
<svg
|
|
12
12
|
class="css-y3m4z0"
|
|
@@ -43,7 +43,7 @@ exports[`Header > snapshot: variant=avatar 1`] = `
|
|
|
43
43
|
</h2>
|
|
44
44
|
</div>
|
|
45
45
|
<div
|
|
46
|
-
class="css-
|
|
46
|
+
class="css-1ptdzcv"
|
|
47
47
|
>
|
|
48
48
|
<div
|
|
49
49
|
class="css-se18zh"
|
|
@@ -93,11 +93,11 @@ exports[`Header > snapshot: variant=avatar 1`] = `
|
|
|
93
93
|
|
|
94
94
|
exports[`Header > snapshot: variant=breadcrumbs 1`] = `
|
|
95
95
|
<header
|
|
96
|
-
class="ucl-uikit-header css-
|
|
96
|
+
class="ucl-uikit-header css-16ajjjr"
|
|
97
97
|
data-testid="ucl-uikit-header"
|
|
98
98
|
>
|
|
99
99
|
<div
|
|
100
|
-
class="css-
|
|
100
|
+
class="css-1w82olg"
|
|
101
101
|
>
|
|
102
102
|
<svg
|
|
103
103
|
class="css-y3m4z0"
|
|
@@ -42,7 +42,7 @@ const Header = ({
|
|
|
42
42
|
text-rendering: optimizeLegibility;
|
|
43
43
|
-webkit-font-smoothing: antialiased;
|
|
44
44
|
-moz-osx-font-smoothing: grayscale;
|
|
45
|
-
color: ${theme.
|
|
45
|
+
color: ${theme.colour.text.brandPrimary};
|
|
46
46
|
display: flex;
|
|
47
47
|
align-items: center;
|
|
48
48
|
height: ${HEADER_MOBILE_HEIGHT_PX}px;
|
|
@@ -52,7 +52,7 @@ const Header = ({
|
|
|
52
52
|
@media (min-width: ${theme.breakpoints.desktop}px) {
|
|
53
53
|
height: ${HEADER_TABLET_HEIGHT_PX}px;
|
|
54
54
|
padding: 0 ${theme.padding.p48} 0 ${theme.padding.p64};
|
|
55
|
-
border-bottom: 1px solid ${theme.colour.border.
|
|
55
|
+
border-bottom: 1px solid ${theme.colour.border.subtle};
|
|
56
56
|
}
|
|
57
57
|
`;
|
|
58
58
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Header > snapshot: variant=avatar 1`] = `
|
|
4
4
|
<header
|
|
5
|
-
class="ucl-uikit-header css-
|
|
5
|
+
class="ucl-uikit-header css-1nmwv3y"
|
|
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-
|
|
44
|
+
class="ucl-uikit-header css-1nmwv3y"
|
|
45
45
|
data-testid="ucl-uikit-header"
|
|
46
46
|
>
|
|
47
47
|
<div
|
|
@@ -54,13 +54,13 @@ const Input = forwardRef<Ref, InputProps>(
|
|
|
54
54
|
box-sizing: border-box;
|
|
55
55
|
font-family: ${theme.font.family.primary};
|
|
56
56
|
font-size: ${theme.font.size.f16};
|
|
57
|
-
color: ${theme.
|
|
58
|
-
background-color: ${theme.
|
|
59
|
-
border: ${theme.border.b1} solid ${theme.
|
|
57
|
+
color: ${theme.colour.text.default};
|
|
58
|
+
background-color: ${theme.colour.fill.inverse};
|
|
59
|
+
border: ${theme.border.b1} solid ${theme.colour.speciality.inputDefault};
|
|
60
60
|
outline: none;
|
|
61
61
|
|
|
62
62
|
&::placeholder {
|
|
63
|
-
color: ${theme.
|
|
63
|
+
color: ${theme.colour.text.tertiary};
|
|
64
64
|
}
|
|
65
65
|
`;
|
|
66
66
|
|
|
@@ -71,8 +71,8 @@ const Input = forwardRef<Ref, InputProps>(
|
|
|
71
71
|
`;
|
|
72
72
|
|
|
73
73
|
const disabledStyle = css`
|
|
74
|
-
color: ${theme.
|
|
75
|
-
border-color: ${theme.
|
|
74
|
+
color: ${theme.colour.text.disabled};
|
|
75
|
+
border-color: ${theme.colour.border.disabled};
|
|
76
76
|
cursor: not-allowed;
|
|
77
77
|
`;
|
|
78
78
|
|
|
@@ -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-
|
|
8
|
+
class="ucl-uikit-input__input css-1i2w3yn"
|
|
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-
|
|
20
|
+
class="ucl-uikit-input__input css-1i2w3yn"
|
|
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-
|
|
33
|
+
class="ucl-uikit-input__input css-1i2w3yn"
|
|
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-
|
|
45
|
+
class="ucl-uikit-input__input css-1i2w3yn"
|
|
46
46
|
data-testid="ucl-uikit-input"
|
|
47
47
|
id=""
|
|
48
48
|
value="abc"
|
|
@@ -43,7 +43,7 @@ const Label = forwardRef<Ref, LabelProps>(
|
|
|
43
43
|
|
|
44
44
|
const baseStyle = css`
|
|
45
45
|
width: 100%;
|
|
46
|
-
color: ${theme.
|
|
46
|
+
color: ${theme.colour.text.default};
|
|
47
47
|
font-family: ${theme.font.family.primary};
|
|
48
48
|
font-size: ${theme.font.size.f16};
|
|
49
49
|
`;
|
|
@@ -61,7 +61,7 @@ const Label = forwardRef<Ref, LabelProps>(
|
|
|
61
61
|
`;
|
|
62
62
|
|
|
63
63
|
const disabledStyle = css`
|
|
64
|
-
color: ${theme.
|
|
64
|
+
color: ${theme.colour.text.disabled};
|
|
65
65
|
`;
|
|
66
66
|
|
|
67
67
|
const style = cx(
|
|
@@ -26,7 +26,7 @@ export const ThreeColumns: Story = {
|
|
|
26
26
|
const sectionStyle = css`
|
|
27
27
|
grid-column: span 4;
|
|
28
28
|
height: 100%;
|
|
29
|
-
background-color: ${theme.
|
|
29
|
+
background-color: ${theme.primitiveColour.blue['06'].$value.hex};
|
|
30
30
|
`;
|
|
31
31
|
|
|
32
32
|
const numberMarkerStyle = css`
|
|
@@ -36,7 +36,7 @@ export const ThreeColumns: Story = {
|
|
|
36
36
|
height: 8rem;
|
|
37
37
|
font-size: ${theme.font.size.f20};
|
|
38
38
|
font-weight: ${theme.font.weight.semiBold};
|
|
39
|
-
color: ${theme.
|
|
39
|
+
color: ${theme.colour.text.default};
|
|
40
40
|
font-family: ${theme.font.family.fixed};
|
|
41
41
|
font-size: ${theme.font.size.f20};
|
|
42
42
|
`;
|
|
@@ -65,7 +65,7 @@ export const FourColumns: Story = {
|
|
|
65
65
|
const sectionStyle = css`
|
|
66
66
|
grid-column: span 4;
|
|
67
67
|
height: 100%;
|
|
68
|
-
background-color: ${theme.
|
|
68
|
+
background-color: ${theme.primitiveColour.red['03'].$value.hex};
|
|
69
69
|
|
|
70
70
|
${theme.mq.mobile} {
|
|
71
71
|
grid-column: span 2;
|
|
@@ -83,7 +83,7 @@ export const FourColumns: Story = {
|
|
|
83
83
|
height: 8rem;
|
|
84
84
|
font-size: ${theme.font.size.f20};
|
|
85
85
|
font-weight: ${theme.font.weight.semiBold};
|
|
86
|
-
color: ${theme.
|
|
86
|
+
color: ${theme.colour.text.default};
|
|
87
87
|
font-family: ${theme.font.family.fixed};
|
|
88
88
|
font-size: ${theme.font.size.f20};
|
|
89
89
|
`;
|
|
@@ -155,7 +155,7 @@ export const GenericScreen: Story = {
|
|
|
155
155
|
`;
|
|
156
156
|
|
|
157
157
|
const colourBlockStyle = css`
|
|
158
|
-
background-color: ${theme.
|
|
158
|
+
background-color: ${theme.primitiveColour.yellow['08'].$value.hex};
|
|
159
159
|
height: 250px;
|
|
160
160
|
`;
|
|
161
161
|
|
|
@@ -236,7 +236,7 @@ export const CreativeGrid: Story = {
|
|
|
236
236
|
|
|
237
237
|
const block1Style = css`
|
|
238
238
|
${gridItemBaseStyle}
|
|
239
|
-
background-color: ${theme.
|
|
239
|
+
background-color: ${theme.primitiveColour.brandPurple['10'].$value.hex};
|
|
240
240
|
|
|
241
241
|
${theme.mq.mobile} {
|
|
242
242
|
grid-column: 1 / 8;
|
|
@@ -264,7 +264,7 @@ export const CreativeGrid: Story = {
|
|
|
264
264
|
|
|
265
265
|
const block2Style = css`
|
|
266
266
|
${gridItemBaseStyle}
|
|
267
|
-
background-color: ${theme.
|
|
267
|
+
background-color: ${theme.primitiveColour.blue['09'].$value.hex};
|
|
268
268
|
|
|
269
269
|
${theme.mq.mobile} {
|
|
270
270
|
grid-column: 8 / 13;
|
|
@@ -291,7 +291,7 @@ export const CreativeGrid: Story = {
|
|
|
291
291
|
|
|
292
292
|
const block3Style = css`
|
|
293
293
|
${gridItemBaseStyle}
|
|
294
|
-
background-color: ${theme.
|
|
294
|
+
background-color: ${theme.primitiveColour.green['07'].$value.hex};
|
|
295
295
|
|
|
296
296
|
${theme.mq.mobile} {
|
|
297
297
|
grid-column: 8 / 13;
|
|
@@ -319,7 +319,7 @@ export const CreativeGrid: Story = {
|
|
|
319
319
|
|
|
320
320
|
const block4Style = css`
|
|
321
321
|
${gridItemBaseStyle}
|
|
322
|
-
background-color: ${theme.
|
|
322
|
+
background-color: ${theme.primitiveColour.blue['06'].$value.hex};
|
|
323
323
|
|
|
324
324
|
${theme.mq.mobile} {
|
|
325
325
|
grid-column: 1 / 8;
|
|
@@ -346,7 +346,7 @@ export const CreativeGrid: Story = {
|
|
|
346
346
|
|
|
347
347
|
const block5Style = css`
|
|
348
348
|
${gridItemBaseStyle}
|
|
349
|
-
background-color: ${theme.
|
|
349
|
+
background-color: ${theme.primitiveColour.yellow['08'].$value.hex};
|
|
350
350
|
|
|
351
351
|
${theme.mq.mobile} {
|
|
352
352
|
grid-column: 1 / 8;
|
|
@@ -373,7 +373,7 @@ export const CreativeGrid: Story = {
|
|
|
373
373
|
|
|
374
374
|
const block6Style = css`
|
|
375
375
|
${gridItemBaseStyle}
|
|
376
|
-
background-color: ${theme.
|
|
376
|
+
background-color: ${theme.primitiveColour.red['11'].$value.hex};
|
|
377
377
|
|
|
378
378
|
${theme.mq.mobile} {
|
|
379
379
|
grid-column: 8 / 13;
|
|
@@ -400,7 +400,7 @@ export const CreativeGrid: Story = {
|
|
|
400
400
|
|
|
401
401
|
const block7Style = css`
|
|
402
402
|
${gridItemBaseStyle}
|
|
403
|
-
background-color: ${theme.
|
|
403
|
+
background-color: ${theme.primitiveColour.blue['09'].$value.hex};
|
|
404
404
|
|
|
405
405
|
${theme.mq.mobile} {
|
|
406
406
|
grid-column: 1 / 13;
|
|
@@ -51,10 +51,10 @@ const Link = forwardRef(function LinkInner(
|
|
|
51
51
|
|
|
52
52
|
// todo: deprecate secondary
|
|
53
53
|
const secondaryStyle = css`
|
|
54
|
-
color: ${theme.
|
|
54
|
+
color: ${theme.colour.link.default};
|
|
55
55
|
|
|
56
56
|
&:active {
|
|
57
|
-
color: ${theme.
|
|
57
|
+
color: ${theme.colour.link.brandHover};
|
|
58
58
|
}
|
|
59
59
|
`;
|
|
60
60
|
|
|
@@ -72,7 +72,7 @@ const Link = forwardRef(function LinkInner(
|
|
|
72
72
|
|
|
73
73
|
const secondaryNoVisitedStyle = css`
|
|
74
74
|
&:visited {
|
|
75
|
-
color: ${theme.
|
|
75
|
+
color: ${theme.colour.link.default};
|
|
76
76
|
}
|
|
77
77
|
`;
|
|
78
78
|
|
|
@@ -84,7 +84,7 @@ const Link = forwardRef(function LinkInner(
|
|
|
84
84
|
|
|
85
85
|
const secondaryHoverStyle = css`
|
|
86
86
|
&:hover {
|
|
87
|
-
color: ${theme.
|
|
87
|
+
color: ${theme.colour.link.brandHover};
|
|
88
88
|
}
|
|
89
89
|
`;
|
|
90
90
|
|
|
@@ -38,8 +38,8 @@ const MenuContent: React.FC<MenuContentProps> = ({
|
|
|
38
38
|
z-index: 100;
|
|
39
39
|
${position === 'left' ? 'left: 0;' : 'right: 0;'}
|
|
40
40
|
white-space: nowrap;
|
|
41
|
-
background-color: ${theme.
|
|
42
|
-
color: ${theme.
|
|
41
|
+
background-color: ${theme.colour.surface.default};
|
|
42
|
+
color: ${theme.colour.text.default};
|
|
43
43
|
|
|
44
44
|
position: fixed;
|
|
45
45
|
height: 100vh;
|
|
@@ -58,7 +58,7 @@ const MenuContent: React.FC<MenuContentProps> = ({
|
|
|
58
58
|
position: absolute;
|
|
59
59
|
height: auto;
|
|
60
60
|
min-width: 600px;
|
|
61
|
-
border: ${theme.border.b1} solid ${theme.
|
|
61
|
+
border: ${theme.border.b1} solid ${theme.colour.border.default};
|
|
62
62
|
box-shadow: ${theme.boxShadow.y1};
|
|
63
63
|
}
|
|
64
64
|
`;
|
|
@@ -32,19 +32,21 @@ const MenuItem: React.FC<MenuItemProps> = ({
|
|
|
32
32
|
align-items: center;
|
|
33
33
|
font-family: ${theme.font.family.primary};
|
|
34
34
|
font-size: ${theme.font.size.f16};
|
|
35
|
-
font-weight: ${
|
|
36
|
-
? `${theme.font.weight.medium}`
|
|
37
|
-
|
|
38
|
-
color: ${theme.
|
|
35
|
+
font-weight: ${
|
|
36
|
+
secondary ? `${theme.font.weight.medium}` : `${theme.font.weight.bold}`
|
|
37
|
+
};
|
|
38
|
+
color: ${theme.colour.text.secondary};
|
|
39
39
|
`;
|
|
40
40
|
|
|
41
41
|
const clickableMenuItemStyle = css`
|
|
42
|
-
color: ${
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
color: ${
|
|
43
|
+
secondary
|
|
44
|
+
? `${theme.colour.text.secondary}`
|
|
45
|
+
: `${theme.colour.text.default}`
|
|
46
|
+
};
|
|
45
47
|
cursor: pointer;
|
|
46
48
|
&:hover {
|
|
47
|
-
background-color: ${theme.
|
|
49
|
+
background-color: ${theme.colour.fill.brandSubtleHover};
|
|
48
50
|
}
|
|
49
51
|
&:focus-visible {
|
|
50
52
|
outline: none;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HTMLAttributes,
|
|
3
|
-
forwardRef,
|
|
4
|
-
memo,
|
|
5
|
-
useCallback,
|
|
6
|
-
} from 'react';
|
|
1
|
+
import { HTMLAttributes, forwardRef, memo, useCallback } from 'react';
|
|
7
2
|
import { css, cx } from '@emotion/css';
|
|
8
3
|
import useTheme from '../../theme/useTheme';
|
|
9
4
|
import Blanket from '../Blanket';
|
|
10
5
|
|
|
11
6
|
export const NAME = 'ucl-modal';
|
|
12
7
|
|
|
13
|
-
export interface ModalProps
|
|
14
|
-
extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
export interface ModalProps extends HTMLAttributes<HTMLDivElement> {
|
|
15
9
|
centered?: boolean;
|
|
16
10
|
closeOnClickOutside?: boolean;
|
|
17
11
|
onClose?: () => void;
|
|
@@ -40,7 +34,7 @@ const Modal = forwardRef<Ref, ModalProps>(
|
|
|
40
34
|
max-width: 600px;
|
|
41
35
|
font-family: ${theme.font.family.primary};
|
|
42
36
|
font-size: ${theme.font.size.f16};
|
|
43
|
-
color: ${theme.
|
|
37
|
+
color: ${theme.colour.text.default};
|
|
44
38
|
pointer-events: none;
|
|
45
39
|
`;
|
|
46
40
|
|
|
@@ -61,7 +55,7 @@ const Modal = forwardRef<Ref, ModalProps>(
|
|
|
61
55
|
const dialogStyle = css`
|
|
62
56
|
position: relative;
|
|
63
57
|
background-clip: padding-box;
|
|
64
|
-
background-color: ${theme.
|
|
58
|
+
background-color: ${theme.colour.surface.default};
|
|
65
59
|
box-shadow: ${theme.boxShadow.x2y4};
|
|
66
60
|
outline: 0;
|
|
67
61
|
pointer-events: auto;
|
|
@@ -79,11 +73,7 @@ const Modal = forwardRef<Ref, ModalProps>(
|
|
|
79
73
|
return (
|
|
80
74
|
<Blanket
|
|
81
75
|
className={className}
|
|
82
|
-
onClick={
|
|
83
|
-
closeOnClickOutside
|
|
84
|
-
? handleOutsideDialogClick
|
|
85
|
-
: undefined
|
|
86
|
-
}
|
|
76
|
+
onClick={closeOnClickOutside ? handleOutsideDialogClick : undefined}
|
|
87
77
|
>
|
|
88
78
|
<div
|
|
89
79
|
className={positioningStyle}
|
|
@@ -4,7 +4,7 @@ exports[`Modal > snapshot: default 1`] = `
|
|
|
4
4
|
<div
|
|
5
5
|
aria-hidden="true"
|
|
6
6
|
aria-label="Backdrop overlay, click to close modal"
|
|
7
|
-
class="ucl-blanket css-
|
|
7
|
+
class="ucl-blanket css-1kp3xax"
|
|
8
8
|
data-testid="ucl-blanket"
|
|
9
9
|
>
|
|
10
10
|
<div
|
|
@@ -12,7 +12,7 @@ exports[`Modal > snapshot: default 1`] = `
|
|
|
12
12
|
>
|
|
13
13
|
<div
|
|
14
14
|
aira-modal="true"
|
|
15
|
-
class="css-
|
|
15
|
+
class="css-1py9lz2"
|
|
16
16
|
data-testid="ucl-modal"
|
|
17
17
|
role="dialog"
|
|
18
18
|
/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css, cx } from '@emotion/css';
|
|
2
|
-
import {
|
|
2
|
+
import { useTheme } from '../../theme';
|
|
3
3
|
import { dateToLocaleISOString } from './utils';
|
|
4
4
|
import type { NativeDatepickerProps } from './NativeDatepicker.types';
|
|
5
5
|
|
|
@@ -16,13 +16,15 @@ const NativeDatepicker = ({
|
|
|
16
16
|
ref,
|
|
17
17
|
...props
|
|
18
18
|
}: NativeDatepickerProps) => {
|
|
19
|
+
const [theme] = useTheme();
|
|
20
|
+
|
|
19
21
|
const baseStyle = css`
|
|
20
22
|
width: 196px;
|
|
21
23
|
height: 48px;
|
|
22
24
|
box-sizing: border-box;
|
|
23
25
|
padding: 0 16px;
|
|
24
|
-
border: 1px solid ${theme.
|
|
25
|
-
color:
|
|
26
|
+
border: 1px solid ${theme.colour.speciality.inputDefault};
|
|
27
|
+
color: ${theme.colour.text.default};
|
|
26
28
|
font-size: 16px;
|
|
27
29
|
font-family: sans-serif;
|
|
28
30
|
text-transform: uppercase;
|
|
@@ -34,14 +36,14 @@ const NativeDatepicker = ({
|
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
&::placeholder {
|
|
37
|
-
color:
|
|
39
|
+
color: ${theme.colour.text.tertiary};
|
|
38
40
|
}
|
|
39
41
|
`;
|
|
40
42
|
|
|
41
43
|
const disabledStyle = css`
|
|
42
|
-
color: ${theme.
|
|
43
|
-
background-color: ${theme.
|
|
44
|
-
border-color: ${theme.
|
|
44
|
+
color: ${theme.colour.text.disabled};
|
|
45
|
+
background-color: ${theme.colour.fill.inverse};
|
|
46
|
+
border-color: ${theme.colour.border.disabled};
|
|
45
47
|
cursor: not-allowed;
|
|
46
48
|
`;
|
|
47
49
|
|
|
@@ -44,6 +44,15 @@ export const FewPages: Story = {
|
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
+
export const Compact: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
offset: 0,
|
|
50
|
+
limit: 20,
|
|
51
|
+
total: 60,
|
|
52
|
+
children: <Pagination.Controls variant='compact' />,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
47
56
|
export const ItemsInfo: Story = {
|
|
48
57
|
args: {
|
|
49
58
|
offset: 60,
|