@digigov/ui 0.10.2 → 0.12.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/CHANGELOG.md +32 -1
- package/app/Confirmation/index.d.ts +3 -0
- package/app/Confirmation/index.js +44 -0
- package/app/Footer/index.d.ts +15 -0
- package/app/Footer/index.js +200 -0
- package/app/Header/HeaderLogo.d.ts +1 -1
- package/app/Header/HeaderTitle.d.ts +1 -1
- package/app/Header/__snapshots__/index.spec.tsx.snap +63 -1231
- package/app/Header/index.d.ts +3 -1
- package/app/Header/index.js +40 -12
- package/core/Accordion/__snapshots__/index.spec.tsx.snap +61 -711
- package/core/Blockquote/__snapshots__/index.spec.tsx.snap +9 -9
- package/core/Breadcrumbs/index.d.ts +3 -0
- package/core/Breadcrumbs/index.js +44 -0
- package/core/Button/BackButton.d.ts +1 -1
- package/core/Button/ButtonLink.d.ts +1 -1
- package/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
- package/core/Button/index.d.ts +1 -0
- package/core/Button/index.js +14 -0
- package/core/Card/index.d.ts +4 -0
- package/core/Card/index.js +57 -0
- package/core/Details/__snapshots__/index.spec.tsx.snap +20 -28
- package/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +3 -3
- package/core/Hidden/index.d.ts +1 -0
- package/core/Hidden/index.js +18 -0
- package/core/Link/__snapshots__/index.spec.tsx.snap +0 -3
- package/core/Link/index.d.ts +3 -8
- package/core/Link/index.js +3 -26
- package/core/List/__snapshots__/index.spec.tsx.snap +3 -3
- package/core/NavList/__snapshots__/index.spec.tsx.snap +2 -2
- package/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +417 -29
- package/core/NotificationBanner/index.d.ts +9 -8
- package/core/NotificationBanner/index.js +13 -2
- package/core/NotificationBanner/index.spec.js +9 -0
- package/core/ServiceBadge/index.d.ts +1 -0
- package/core/ServiceBadge/index.js +5 -2
- package/core/SummaryList/__snapshots__/index.spec.tsx.snap +47 -1293
- package/core/Table/index.d.ts +7 -0
- package/core/Table/index.js +96 -0
- package/core/VisuallyHidden/index.d.ts +1 -0
- package/core/VisuallyHidden/index.js +18 -0
- package/core/WarningText/__snapshots__/index.spec.tsx.snap +15 -43
- package/es/app/Confirmation/index.js +3 -0
- package/es/app/Footer/index.js +15 -0
- package/es/app/Header/__snapshots__/index.spec.tsx.snap +63 -1231
- package/es/app/Header/index.js +3 -1
- package/es/core/Accordion/__snapshots__/index.spec.tsx.snap +61 -711
- package/es/core/Blockquote/__snapshots__/index.spec.tsx.snap +9 -9
- package/es/core/Breadcrumbs/index.js +3 -0
- package/es/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
- package/es/core/Button/index.js +2 -1
- package/es/core/Card/index.js +4 -0
- package/es/core/Details/__snapshots__/index.spec.tsx.snap +20 -28
- package/es/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +3 -3
- package/es/core/Hidden/index.js +1 -0
- package/es/core/Link/__snapshots__/index.spec.tsx.snap +0 -3
- package/es/core/Link/index.js +3 -26
- package/es/core/List/__snapshots__/index.spec.tsx.snap +3 -3
- package/es/core/NavList/__snapshots__/index.spec.tsx.snap +2 -2
- package/es/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +417 -29
- package/es/core/NotificationBanner/index.js +7 -3
- package/es/core/NotificationBanner/index.spec.js +11 -2
- package/es/core/ServiceBadge/index.js +4 -2
- package/es/core/SummaryList/__snapshots__/index.spec.tsx.snap +47 -1293
- package/es/core/Table/index.js +7 -0
- package/es/core/VisuallyHidden/index.js +1 -0
- package/es/core/WarningText/__snapshots__/index.spec.tsx.snap +15 -43
- package/es/govgr/Footer/Copyright.js +3 -2
- package/es/govgr/Footer/LicenseCCSA.js +2 -1
- package/es/layouts/Basic/__snapshots__/index.spec.tsx.snap +39 -687
- package/es/layouts/Grid/index.js +1 -0
- package/es/locales/el.js +11 -1
- package/es/locales/en.js +11 -1
- package/esm/app/Confirmation/index.js +3 -0
- package/esm/app/Footer/index.js +15 -0
- package/esm/app/Header/__snapshots__/index.spec.tsx.snap +63 -1231
- package/esm/app/Header/index.js +3 -1
- package/esm/core/Accordion/__snapshots__/index.spec.tsx.snap +61 -711
- package/esm/core/Blockquote/__snapshots__/index.spec.tsx.snap +9 -9
- package/esm/core/Breadcrumbs/index.js +3 -0
- package/esm/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
- package/esm/core/Button/index.js +2 -1
- package/esm/core/Card/index.js +4 -0
- package/esm/core/Details/__snapshots__/index.spec.tsx.snap +20 -28
- package/esm/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +3 -3
- package/esm/core/Hidden/index.js +1 -0
- package/esm/core/Link/__snapshots__/index.spec.tsx.snap +0 -3
- package/esm/core/Link/index.js +3 -26
- package/esm/core/List/__snapshots__/index.spec.tsx.snap +3 -3
- package/esm/core/NavList/__snapshots__/index.spec.tsx.snap +2 -2
- package/esm/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +417 -29
- package/esm/core/NotificationBanner/index.js +7 -3
- package/esm/core/NotificationBanner/index.spec.js +11 -2
- package/esm/core/ServiceBadge/index.js +4 -2
- package/esm/core/SummaryList/__snapshots__/index.spec.tsx.snap +47 -1293
- package/esm/core/Table/index.js +7 -0
- package/esm/core/VisuallyHidden/index.js +1 -0
- package/esm/core/WarningText/__snapshots__/index.spec.tsx.snap +15 -43
- package/esm/govgr/Footer/Copyright.js +3 -2
- package/esm/govgr/Footer/LicenseCCSA.js +2 -1
- package/esm/index.js +1 -1
- package/esm/layouts/Basic/__snapshots__/index.spec.tsx.snap +39 -687
- package/esm/layouts/Grid/index.js +1 -0
- package/esm/locales/el.js +11 -1
- package/esm/locales/en.js +11 -1
- package/govgr/Footer/Copyright.js +4 -2
- package/govgr/Footer/LicenseCCSA.js +3 -1
- package/layouts/Basic/__snapshots__/index.spec.tsx.snap +39 -687
- package/layouts/Grid/index.d.ts +1 -0
- package/layouts/Grid/index.js +18 -0
- package/locales/el.d.ts +10 -0
- package/locales/el.js +11 -1
- package/locales/en.d.ts +10 -0
- package/locales/en.js +11 -1
- package/package.json +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`renders the Blockquote with sample data 1`] = `
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</
|
|
12
|
-
</
|
|
4
|
+
<withDeprecationComponent>
|
|
5
|
+
<ForwardRef(Blockquote)>
|
|
6
|
+
<blockquote
|
|
7
|
+
className="govgr-blockquote"
|
|
8
|
+
>
|
|
9
|
+
this is some random data
|
|
10
|
+
</blockquote>
|
|
11
|
+
</ForwardRef(Blockquote)>
|
|
12
|
+
</withDeprecationComponent>
|
|
13
13
|
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the button 1`] = `
|
|
4
|
+
<withDeprecationComponent>
|
|
5
|
+
<ForwardRef(Button)>
|
|
6
|
+
<button
|
|
7
|
+
className="govgr-btn-primary govgr-btn"
|
|
8
|
+
>
|
|
9
|
+
hello
|
|
10
|
+
</button>
|
|
11
|
+
</ForwardRef(Button)>
|
|
12
|
+
</withDeprecationComponent>
|
|
13
|
+
`;
|
package/esm/core/Button/index.js
CHANGED
|
@@ -32,4 +32,5 @@ export var ContinueButton = function ContinueButton(_ref) {
|
|
|
32
32
|
export * from '@digigov/ui/core/Button/BackButton';
|
|
33
33
|
export * from '@digigov/ui/core/Button/CallToAction';
|
|
34
34
|
export * from '@digigov/ui/core/Button/ButtonLink';
|
|
35
|
-
export * from '@digigov/ui/core/Button/Icon';
|
|
35
|
+
export * from '@digigov/ui/core/Button/Icon';
|
|
36
|
+
export * from '@digigov/react-core/ButtonGroup';
|
|
@@ -1,58 +1,50 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`renders the closed Details component 1`] = `
|
|
4
|
-
<Details>
|
|
4
|
+
<ForwardRef(Details)>
|
|
5
5
|
<details
|
|
6
|
-
className="
|
|
6
|
+
className="govgr-details"
|
|
7
7
|
>
|
|
8
|
-
<DetailsSummary>
|
|
8
|
+
<ForwardRef(DetailsSummary)>
|
|
9
9
|
<summary
|
|
10
|
-
className="
|
|
10
|
+
className="govgr-details__summary"
|
|
11
11
|
>
|
|
12
|
-
|
|
13
|
-
className="MuiDetailsSummary-text"
|
|
14
|
-
>
|
|
15
|
-
Help with nationality
|
|
16
|
-
</span>
|
|
12
|
+
Help with nationality
|
|
17
13
|
</summary>
|
|
18
|
-
</DetailsSummary>
|
|
19
|
-
<DetailsContent>
|
|
14
|
+
</ForwardRef(DetailsSummary)>
|
|
15
|
+
<ForwardRef(DetailsContent)>
|
|
20
16
|
<div
|
|
21
|
-
className="
|
|
17
|
+
className="govgr-details__summary-text"
|
|
22
18
|
>
|
|
23
19
|
We need to know your nationality so we can work out which elections you’re entitled to vote in. If you cannot provide your nationality, you’ll have to send copies of identity documents through the post.
|
|
24
20
|
</div>
|
|
25
|
-
</DetailsContent>
|
|
21
|
+
</ForwardRef(DetailsContent)>
|
|
26
22
|
</details>
|
|
27
|
-
</Details>
|
|
23
|
+
</ForwardRef(Details)>
|
|
28
24
|
`;
|
|
29
25
|
|
|
30
26
|
exports[`renders the open Details component 1`] = `
|
|
31
|
-
<Details
|
|
27
|
+
<ForwardRef(Details)
|
|
32
28
|
open={true}
|
|
33
29
|
>
|
|
34
30
|
<details
|
|
35
|
-
className="
|
|
31
|
+
className="govgr-details"
|
|
36
32
|
open={true}
|
|
37
33
|
>
|
|
38
|
-
<DetailsSummary>
|
|
34
|
+
<ForwardRef(DetailsSummary)>
|
|
39
35
|
<summary
|
|
40
|
-
className="
|
|
36
|
+
className="govgr-details__summary"
|
|
41
37
|
>
|
|
42
|
-
|
|
43
|
-
className="MuiDetailsSummary-text"
|
|
44
|
-
>
|
|
45
|
-
Help with nationality
|
|
46
|
-
</span>
|
|
38
|
+
Help with nationality
|
|
47
39
|
</summary>
|
|
48
|
-
</DetailsSummary>
|
|
49
|
-
<DetailsContent>
|
|
40
|
+
</ForwardRef(DetailsSummary)>
|
|
41
|
+
<ForwardRef(DetailsContent)>
|
|
50
42
|
<div
|
|
51
|
-
className="
|
|
43
|
+
className="govgr-details__summary-text"
|
|
52
44
|
>
|
|
53
45
|
We need to know your nationality so we can work out which elections you’re entitled to vote in. If you cannot provide your nationality, you’ll have to send copies of identity documents through the post.
|
|
54
46
|
</div>
|
|
55
|
-
</DetailsContent>
|
|
47
|
+
</ForwardRef(DetailsContent)>
|
|
56
48
|
</details>
|
|
57
|
-
</Details>
|
|
49
|
+
</ForwardRef(Details)>
|
|
58
50
|
`;
|
|
@@ -311,12 +311,12 @@ exports[`renders the ErrorSummary with sample data 1`] = `
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
>
|
|
314
|
-
<ErrorSummary>
|
|
314
|
+
<ForwardRef(ErrorSummary)>
|
|
315
315
|
<div
|
|
316
|
-
className="
|
|
316
|
+
className="govgr-error-summary"
|
|
317
317
|
>
|
|
318
318
|
this is some random warning text
|
|
319
319
|
</div>
|
|
320
|
-
</ErrorSummary>
|
|
320
|
+
</ForwardRef(ErrorSummary)>
|
|
321
321
|
</ThemeProvider>
|
|
322
322
|
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@digigov/react-core/Hidden';
|
|
@@ -6,7 +6,6 @@ exports[`Provider 1`] = `
|
|
|
6
6
|
>
|
|
7
7
|
<ForwardRef(WrappedLink)>
|
|
8
8
|
<CustomLink
|
|
9
|
-
className="MuiBaseLink-root"
|
|
10
9
|
href=""
|
|
11
10
|
>
|
|
12
11
|
<div>
|
|
@@ -20,11 +19,9 @@ exports[`Provider 1`] = `
|
|
|
20
19
|
exports[`renders the Link 1`] = `
|
|
21
20
|
<ForwardRef(WrappedLink)>
|
|
22
21
|
<CommonLink
|
|
23
|
-
className="MuiBaseLink-root"
|
|
24
22
|
href=""
|
|
25
23
|
>
|
|
26
24
|
<a
|
|
27
|
-
className="MuiBaseLink-root"
|
|
28
25
|
href=""
|
|
29
26
|
>
|
|
30
27
|
hello
|
package/esm/core/Link/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "href"]
|
|
4
|
-
_excluded2 = ["className"];
|
|
3
|
+
var _excluded = ["children", "href"];
|
|
5
4
|
import * as React from 'react';
|
|
6
|
-
import { makeStyles } from '@material-ui/core';
|
|
7
|
-
import clsx from 'clsx';
|
|
8
5
|
export var CommonLink = function CommonLink(props) {
|
|
9
6
|
return /*#__PURE__*/React.createElement("a", props, props.children);
|
|
10
7
|
};
|
|
@@ -14,36 +11,16 @@ export var LinkProvider = function LinkProvider(props) {
|
|
|
14
11
|
value: props.component
|
|
15
12
|
}, props.children);
|
|
16
13
|
};
|
|
17
|
-
var useLinkStyles = makeStyles(function (theme) {
|
|
18
|
-
return {
|
|
19
|
-
root: {
|
|
20
|
-
color: theme.palette.primary.main,
|
|
21
|
-
'&:visited': {
|
|
22
|
-
color: theme.palette.primary.dark
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
nostyles: {}
|
|
26
|
-
};
|
|
27
|
-
}, {
|
|
28
|
-
name: 'MuiBaseLink'
|
|
29
|
-
});
|
|
30
14
|
var Link = /*#__PURE__*/React.forwardRef(function WrappedLink(_ref, ref) {
|
|
31
15
|
var children = _ref.children,
|
|
32
16
|
_ref$href = _ref.href,
|
|
33
17
|
href = _ref$href === void 0 ? '' : _ref$href,
|
|
34
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
35
19
|
|
|
36
|
-
var styles = useLinkStyles(props);
|
|
37
|
-
|
|
38
|
-
var className = props.className,
|
|
39
|
-
rest = _objectWithoutProperties(props, _excluded2);
|
|
40
|
-
|
|
41
|
-
var cls = clsx(className, !props.unstyled && styles.root, props.unstyled && styles.nostyles);
|
|
42
20
|
var LinkComponent = React.useContext(LinkComponentContext);
|
|
43
21
|
return /*#__PURE__*/React.createElement(LinkComponent, _extends({
|
|
44
22
|
ref: ref,
|
|
45
|
-
href: href
|
|
46
|
-
|
|
47
|
-
}, rest), children);
|
|
23
|
+
href: href
|
|
24
|
+
}, props), children);
|
|
48
25
|
});
|
|
49
26
|
export default Link;
|
|
@@ -311,12 +311,12 @@ exports[`renders the ErrorSummary with sample data 1`] = `
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
>
|
|
314
|
-
<List>
|
|
314
|
+
<ForwardRef(List)>
|
|
315
315
|
<ul
|
|
316
|
-
className="
|
|
316
|
+
className="govgr-list"
|
|
317
317
|
>
|
|
318
318
|
this is some random warning text
|
|
319
319
|
</ul>
|
|
320
|
-
</List>
|
|
320
|
+
</ForwardRef(List)>
|
|
321
321
|
</ThemeProvider>
|
|
322
322
|
`;
|
|
@@ -319,12 +319,12 @@ exports[`renders the ErrorSummary with sample data 1`] = `
|
|
|
319
319
|
<NavListBase>
|
|
320
320
|
<nav>
|
|
321
321
|
<ul
|
|
322
|
-
className="
|
|
322
|
+
className="MuiNavList-root MuiNavList-vertical"
|
|
323
323
|
>
|
|
324
324
|
this is some random warning text
|
|
325
325
|
</ul>
|
|
326
326
|
<div
|
|
327
|
-
className="
|
|
327
|
+
className="MuiNavList-floatClear"
|
|
328
328
|
/>
|
|
329
329
|
</nav>
|
|
330
330
|
</NavListBase>
|