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.
- package/dist/components/Header/Header.d.ts +2 -1
- package/dist/components/Header/Header.stories.d.ts +5 -1
- package/dist/components/HeaderNew/Header.d.ts +2 -1
- package/dist/components/NavigationBar/NavigationBar.d.ts +12 -0
- package/dist/components/NavigationBar/NavigationBar.stories.d.ts +14 -0
- package/dist/components/NavigationBar/NavigationBarItem.d.ts +19 -0
- package/dist/components/NavigationBar/__tests__/NavigationBar.test.d.ts +1 -0
- package/dist/components/NavigationBar/index.d.ts +2 -0
- package/dist/components/Paragraph/Paragraph.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +5591 -5247
- package/lib/components/Accordion/Accordion.Heading.tsx +0 -2
- package/lib/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap +2 -2
- package/lib/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +4 -4
- package/lib/components/Avatar/Avatar.tsx +7 -1
- package/lib/components/Avatar/__tests__/__snapshots__/Avatar.test.tsx.snap +12 -12
- package/lib/components/Badge/Badge.tsx +6 -11
- package/lib/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap +9 -9
- package/lib/components/Button/Button.tsx +11 -7
- package/lib/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +9 -9
- package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +18 -18
- package/lib/components/Calendar/subcomponents/AcademicWeek.tsx +7 -5
- package/lib/components/Calendar/subcomponents/ColumnHeading.tsx +12 -7
- package/lib/components/Calendar/subcomponents/ControlsSelect.tsx +11 -6
- package/lib/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +2 -2
- package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +2 -2
- package/lib/components/DrawerMenu/DrawerMenu.tsx +4 -3
- package/lib/components/DropdownMenu/DropdownMenu.tsx +4 -3
- package/lib/components/DropdownUserMenu/DropdownUserMenu.tsx +8 -5
- package/lib/components/Field/CharacterCount.tsx +7 -6
- package/lib/components/Field/ErrorText.tsx +7 -6
- package/lib/components/FileInput/FileInput.tsx +11 -3
- package/lib/components/FileInput/__tests__/__snapshots__/FileInput.test.tsx.snap +4 -4
- package/lib/components/Footer/Footer.tsx +16 -3
- package/lib/components/Footer/FooterColumn.tsx +9 -4
- package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +13 -11
- package/lib/components/FooterNew/BackToTop.tsx +12 -4
- package/lib/components/FooterNew/FooterColumn.tsx +4 -0
- package/lib/components/FooterNew/FooterNavLink.tsx +12 -6
- package/lib/components/FooterNew/LegalAndCopyright.tsx +11 -6
- package/lib/components/FooterNew/LogoAddressAndSocial.tsx +27 -15
- package/lib/components/FooterNew/__tests__/__snapshots__/Footer.test.tsx.snap +32 -26
- package/lib/components/Header/Header.mdx +8 -1
- package/lib/components/Header/Header.stories.tsx +13 -0
- package/lib/components/Header/Header.tsx +3 -0
- package/lib/components/Header/__tests__/Header.test.tsx +22 -0
- package/lib/components/HeaderDraft/HeaderBottomBreadcrumbs.tsx +6 -1
- package/lib/components/HeaderDraft/HeaderBottomHeadingAndAvatar.tsx +19 -8
- package/lib/components/HeaderDraft/HeaderBreadcrumb.tsx +11 -2
- package/lib/components/HeaderDraft/HeaderDraft.tsx +16 -5
- package/lib/components/HeaderDraft/__tests__/__snapshots__/Header.test.tsx.snap +7 -7
- package/lib/components/HeaderNew/Header.tsx +7 -1
- package/lib/components/HeaderNew/HeaderItem.tsx +6 -0
- package/lib/components/HeaderNew/__tests__/Header.test.tsx +41 -0
- package/lib/components/Input/__tests__/__snapshots__/Input.test.tsx.snap +4 -4
- package/lib/components/Menu/MenuContent.tsx +9 -1
- package/lib/components/NativeDatepicker/NativeDatepicker.tsx +6 -2
- package/lib/components/NavigationBar/NavigationBar.stories.tsx +99 -0
- package/lib/components/NavigationBar/NavigationBar.tsx +76 -0
- package/lib/components/NavigationBar/NavigationBarItem.tsx +236 -0
- package/lib/components/NavigationBar/__tests__/NavigationBar.test.tsx +90 -0
- package/lib/components/NavigationBar/index.ts +5 -0
- package/lib/components/Pagination/PaginationInfo.tsx +8 -6
- package/lib/components/Pagination/subcomponents/PaginationCompactControls.tsx +8 -2
- package/lib/components/Pagination/subcomponents/PaginationStandardControls.tsx +2 -1
- package/lib/components/Paragraph/Paragraph.tsx +6 -4
- package/lib/components/Paragraph/__tests__/Paragraph.test.tsx +1 -1
- package/lib/components/Paragraph/__tests__/__snapshots__/Paragraph.test.tsx.snap +9 -9
- package/lib/components/Radio/__tests__/__snapshots__/Radio.test.tsx.snap +2 -2
- package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +2 -2
- package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +1 -1
- package/lib/components/Table/subcomponents/Cell/__tests__/__snapshots__/Cell.test.tsx.snap +2 -2
- package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap +1 -1
- package/lib/components/Textarea/__tests__/__snapshots__/Textarea.test.tsx.snap +4 -4
- package/lib/components/Tooltip/Tooltip.tsx +5 -8
- package/lib/components/Tooltip/__tests__/__snapshots__/tooltip.test.tsx.snap +2 -2
- package/lib/components/index.ts +6 -0
- package/package.json +2 -2
|
@@ -149,6 +149,14 @@ const PaginationCompactControls = ({
|
|
|
149
149
|
`;
|
|
150
150
|
|
|
151
151
|
const pageInputStyle = css`
|
|
152
|
+
&& {
|
|
153
|
+
font-family: ${theme.typography.body.md.fontFamily};
|
|
154
|
+
font-feature-settings: ${theme.typography.body.md.fontSettings};
|
|
155
|
+
font-size: ${theme.typography.body.md.fontSize}px;
|
|
156
|
+
font-weight: ${theme.typography.body.md.fontWeight};
|
|
157
|
+
line-height: ${theme.typography.body.md.lineHeight}%;
|
|
158
|
+
}
|
|
159
|
+
|
|
152
160
|
height: 48px;
|
|
153
161
|
width: 48px;
|
|
154
162
|
box-sizing: border-box;
|
|
@@ -157,8 +165,6 @@ const PaginationCompactControls = ({
|
|
|
157
165
|
padding: 0;
|
|
158
166
|
text-align: center;
|
|
159
167
|
color: ${theme.colour.text.default};
|
|
160
|
-
font-family: ${theme.typography.body.md.fontFamily};
|
|
161
|
-
font-size: ${theme.typography.body.md.fontSize};
|
|
162
168
|
|
|
163
169
|
&[aria-invalid='true'] {
|
|
164
170
|
border-color: ${theme.colour.border.critical};
|
|
@@ -3,6 +3,7 @@ import { css, cx } from '@emotion/css';
|
|
|
3
3
|
import useTheme from '../../../theme/useTheme';
|
|
4
4
|
import { PaginationContext } from '../Pagination';
|
|
5
5
|
import Button from '../../Button';
|
|
6
|
+
import Text from '../../Text';
|
|
6
7
|
import getPaginationButtons from '../getPaginationButtons';
|
|
7
8
|
import { useMediaQuery } from '../../../hooks';
|
|
8
9
|
|
|
@@ -187,7 +188,7 @@ const PaginationStandardControls = ({
|
|
|
187
188
|
{paginationButtons.map((page) => (
|
|
188
189
|
<li key={page}>
|
|
189
190
|
{page === '...1' || page === '...2' ? (
|
|
190
|
-
<
|
|
191
|
+
<Text aria-hidden>...</Text>
|
|
191
192
|
) : (
|
|
192
193
|
<>
|
|
193
194
|
{page !== currentPage && (
|
|
@@ -3,7 +3,7 @@ import { css, cx } from '@emotion/css';
|
|
|
3
3
|
import useTheme from '../../theme/useTheme';
|
|
4
4
|
import marginsStyle, { MarginProps } from '../common/marginsStyle';
|
|
5
5
|
|
|
6
|
-
export const NAME = 'ucl-uikit-
|
|
6
|
+
export const NAME = 'ucl-uikit-paragraph';
|
|
7
7
|
|
|
8
8
|
export type ParagraphLevel =
|
|
9
9
|
| 'lg'
|
|
@@ -84,9 +84,11 @@ const Paragraph = ({
|
|
|
84
84
|
const baseStyle = css`
|
|
85
85
|
font-family: ${md.fontFamily};
|
|
86
86
|
font-feature-settings: ${md.fontSettings};
|
|
87
|
-
color: ${
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
color: ${
|
|
88
|
+
emphasis === 'medium'
|
|
89
|
+
? theme.colour.text.secondary
|
|
90
|
+
: theme.colour.text.default
|
|
91
|
+
};
|
|
90
92
|
margin: 0;
|
|
91
93
|
`;
|
|
92
94
|
|
|
@@ -60,7 +60,7 @@ describe('Paragraph', () => {
|
|
|
60
60
|
<Paragraph>This is a test</Paragraph>
|
|
61
61
|
</ThemeContextProvider>
|
|
62
62
|
);
|
|
63
|
-
const paragraph = screen.getByTestId('ucl-uikit-
|
|
63
|
+
const paragraph = screen.getByTestId('ucl-uikit-paragraph');
|
|
64
64
|
expect(paragraph).toBeDefined();
|
|
65
65
|
});
|
|
66
66
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Paragraph > snapshot: custom test id 1`] = `
|
|
4
4
|
<p
|
|
5
|
-
class="ucl-uikit-
|
|
5
|
+
class="ucl-uikit-paragraph css-h12wmf"
|
|
6
6
|
data-testid="custom-test-id"
|
|
7
7
|
>
|
|
8
8
|
This is a test
|
|
@@ -11,8 +11,8 @@ exports[`Paragraph > snapshot: custom test id 1`] = `
|
|
|
11
11
|
|
|
12
12
|
exports[`Paragraph > snapshot: emphasis 1`] = `
|
|
13
13
|
<p
|
|
14
|
-
class="ucl-uikit-
|
|
15
|
-
data-testid="ucl-uikit-
|
|
14
|
+
class="ucl-uikit-paragraph css-h12wmf"
|
|
15
|
+
data-testid="ucl-uikit-paragraph"
|
|
16
16
|
>
|
|
17
17
|
high emphasis
|
|
18
18
|
</p>
|
|
@@ -20,8 +20,8 @@ exports[`Paragraph > snapshot: emphasis 1`] = `
|
|
|
20
20
|
|
|
21
21
|
exports[`Paragraph > snapshot: minimal props 1`] = `
|
|
22
22
|
<p
|
|
23
|
-
class="ucl-uikit-
|
|
24
|
-
data-testid="ucl-uikit-
|
|
23
|
+
class="ucl-uikit-paragraph css-h12wmf"
|
|
24
|
+
data-testid="ucl-uikit-paragraph"
|
|
25
25
|
>
|
|
26
26
|
This is a test
|
|
27
27
|
</p>
|
|
@@ -29,8 +29,8 @@ exports[`Paragraph > snapshot: minimal props 1`] = `
|
|
|
29
29
|
|
|
30
30
|
exports[`Paragraph > snapshot: no margins 1`] = `
|
|
31
31
|
<p
|
|
32
|
-
class="ucl-uikit-
|
|
33
|
-
data-testid="ucl-uikit-
|
|
32
|
+
class="ucl-uikit-paragraph css-1dosm7d"
|
|
33
|
+
data-testid="ucl-uikit-paragraph"
|
|
34
34
|
>
|
|
35
35
|
no margins
|
|
36
36
|
</p>
|
|
@@ -38,8 +38,8 @@ exports[`Paragraph > snapshot: no margins 1`] = `
|
|
|
38
38
|
|
|
39
39
|
exports[`Paragraph > snapshot: size 1`] = `
|
|
40
40
|
<p
|
|
41
|
-
class="ucl-uikit-
|
|
42
|
-
data-testid="ucl-uikit-
|
|
41
|
+
class="ucl-uikit-paragraph css-h12wmf"
|
|
42
|
+
data-testid="ucl-uikit-paragraph"
|
|
43
43
|
>
|
|
44
44
|
standfirst
|
|
45
45
|
</p>
|
|
@@ -18,7 +18,7 @@ exports[`Radio > snapshot: checked prop 1`] = `
|
|
|
18
18
|
|
|
19
19
|
exports[`Radio > snapshot: no props 1`] = `
|
|
20
20
|
<span
|
|
21
|
-
class="ucl-uikit-radio css-
|
|
21
|
+
class="ucl-uikit-radio css-v556ou"
|
|
22
22
|
>
|
|
23
23
|
<input
|
|
24
24
|
class="css-19qtec1"
|
|
@@ -30,7 +30,7 @@ exports[`Radio > snapshot: no props 1`] = `
|
|
|
30
30
|
|
|
31
31
|
exports[`Radio > snapshot: testId prop 1`] = `
|
|
32
32
|
<span
|
|
33
|
-
class="ucl-uikit-radio css-
|
|
33
|
+
class="ucl-uikit-radio css-v556ou"
|
|
34
34
|
>
|
|
35
35
|
<input
|
|
36
36
|
class="css-19qtec1"
|
|
@@ -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-
|
|
11
|
+
class="ucl-uikit-input__input css-r12x3w"
|
|
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-
|
|
90
|
+
class="ucl-uikit-input__input css-r12x3w"
|
|
91
91
|
data-testid="test123"
|
|
92
92
|
id=""
|
|
93
93
|
placeholder=""
|
|
@@ -47,7 +47,7 @@ exports[`Cell > Snapshot: variants 1`] = `
|
|
|
47
47
|
data-testid="ucl-uikit-table__cell-content"
|
|
48
48
|
>
|
|
49
49
|
<span
|
|
50
|
-
class="ucl-uikit-base-checkbox ucl-uikit-checkbox css-
|
|
50
|
+
class="ucl-uikit-base-checkbox ucl-uikit-checkbox css-qoivhx"
|
|
51
51
|
data-testid="ucl-uikit-checkbox__root"
|
|
52
52
|
>
|
|
53
53
|
<input
|
|
@@ -105,7 +105,7 @@ exports[`Cell > Snapshot: variants 1`] = `
|
|
|
105
105
|
>
|
|
106
106
|
<button
|
|
107
107
|
aria-disabled="false"
|
|
108
|
-
class="ucl-uikit-button css-
|
|
108
|
+
class="ucl-uikit-button css-1o7ytg2"
|
|
109
109
|
data-testid="ucl-uikit-button"
|
|
110
110
|
>
|
|
111
111
|
Button
|
package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap
CHANGED
|
@@ -14,7 +14,7 @@ exports[`HeadCell > Snapshot: checkbox variant 1`] = `
|
|
|
14
14
|
data-testid="ucl-uikit-table__head-cell-content"
|
|
15
15
|
>
|
|
16
16
|
<span
|
|
17
|
-
class="ucl-uikit-base-checkbox ucl-uikit-checkbox css-
|
|
17
|
+
class="ucl-uikit-base-checkbox ucl-uikit-checkbox css-qoivhx"
|
|
18
18
|
data-testid="ucl-uikit-checkbox__root"
|
|
19
19
|
>
|
|
20
20
|
<input
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Textarea > snapshot: Disabled 1`] = `
|
|
4
4
|
<textarea
|
|
5
|
-
class="ucl-uikit-textarea css-
|
|
5
|
+
class="ucl-uikit-textarea css-yfw4f5"
|
|
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-
|
|
14
|
+
class="ucl-uikit-textarea css-1eai1zv"
|
|
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-
|
|
23
|
+
class="ucl-uikit-textarea css-1eai1zv"
|
|
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-
|
|
31
|
+
class="ucl-uikit-textarea css-1eai1zv"
|
|
32
32
|
data-testid="ucl-uikit-textarea"
|
|
33
33
|
id=""
|
|
34
34
|
/>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { memo, forwardRef, HTMLAttributes } from 'react';
|
|
2
2
|
import { css, cx } from '@emotion/css';
|
|
3
3
|
import { useTheme } from '../../theme';
|
|
4
|
+
import Text from '../Text';
|
|
4
5
|
|
|
5
6
|
export const NAME = 'ucl-uikit-tooltip';
|
|
6
7
|
|
|
@@ -17,14 +18,9 @@ const Tooltip = forwardRef<Ref, TooltipProps>(
|
|
|
17
18
|
const baseStyle = css`
|
|
18
19
|
background-color: ${theme.colour.fill.brandPrimary};
|
|
19
20
|
color: ${theme.colour.text.brandInverse};
|
|
20
|
-
font-family: ${theme.typography.body.md.fontFamily};
|
|
21
|
-
font-feature-settings: ${theme.typography.body.md.fontSettings};
|
|
22
21
|
height: 32px;
|
|
23
22
|
padding: 4px 8px 4px 8px;
|
|
24
23
|
border-radius: ${theme.radius.r4};
|
|
25
|
-
font-size: ${theme.typography.body.md.fontSize}px;
|
|
26
|
-
font-weight: ${theme.typography.body.md.fontWeight};
|
|
27
|
-
line-height: ${theme.typography.body.md.lineHeight}%;
|
|
28
24
|
display: inline;
|
|
29
25
|
white-space: nowrap;
|
|
30
26
|
`;
|
|
@@ -32,14 +28,15 @@ const Tooltip = forwardRef<Ref, TooltipProps>(
|
|
|
32
28
|
const style = cx(NAME, baseStyle, className);
|
|
33
29
|
|
|
34
30
|
return (
|
|
35
|
-
<
|
|
31
|
+
<Text
|
|
36
32
|
ref={ref}
|
|
33
|
+
level='md'
|
|
37
34
|
className={style}
|
|
38
|
-
|
|
35
|
+
testId={testId}
|
|
39
36
|
{...props}
|
|
40
37
|
>
|
|
41
38
|
{children}
|
|
42
|
-
</
|
|
39
|
+
</Text>
|
|
43
40
|
);
|
|
44
41
|
}
|
|
45
42
|
);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Tooltip > snapshot: no props 1`] = `
|
|
4
4
|
<span
|
|
5
|
-
class="ucl-uikit-tooltip css-
|
|
5
|
+
class="ucl-uikit-text ucl-uikit-tooltip css-1s62y9x"
|
|
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-
|
|
14
|
+
class="ucl-uikit-text ucl-uikit-tooltip css-1s62y9x"
|
|
15
15
|
data-testid="test123"
|
|
16
16
|
>
|
|
17
17
|
Info Tooltip
|
package/lib/components/index.ts
CHANGED
|
@@ -148,6 +148,12 @@ export type { HeaderProps } from './Header';
|
|
|
148
148
|
export { default as HeaderNew } from './HeaderNew';
|
|
149
149
|
export type { HeaderProps as HeaderNewProps } from './HeaderNew';
|
|
150
150
|
|
|
151
|
+
export { default as NavigationBar } from './NavigationBar';
|
|
152
|
+
export type {
|
|
153
|
+
NavigationBarItemProps,
|
|
154
|
+
NavigationBarProps,
|
|
155
|
+
} from './NavigationBar';
|
|
156
|
+
|
|
151
157
|
export { default as HeaderDraft } from './HeaderDraft';
|
|
152
158
|
export type { HeaderDraftProps } from './HeaderDraft';
|
|
153
159
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "uikit-react-public",
|
|
3
3
|
"private": false,
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.44.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@emotion/css": "^11.13.5",
|
|
44
44
|
"@emotion/react": "^11.14.0",
|
|
45
45
|
"@floating-ui/react-dom": "^2.1.2",
|
|
46
|
-
"design-system-foundations-public": "0.1.
|
|
46
|
+
"design-system-foundations-public": "0.1.7"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": "^19.0.0",
|