@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.
Files changed (115) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/app/Confirmation/index.d.ts +3 -0
  3. package/app/Confirmation/index.js +44 -0
  4. package/app/Footer/index.d.ts +15 -0
  5. package/app/Footer/index.js +200 -0
  6. package/app/Header/HeaderLogo.d.ts +1 -1
  7. package/app/Header/HeaderTitle.d.ts +1 -1
  8. package/app/Header/__snapshots__/index.spec.tsx.snap +63 -1231
  9. package/app/Header/index.d.ts +3 -1
  10. package/app/Header/index.js +40 -12
  11. package/core/Accordion/__snapshots__/index.spec.tsx.snap +61 -711
  12. package/core/Blockquote/__snapshots__/index.spec.tsx.snap +9 -9
  13. package/core/Breadcrumbs/index.d.ts +3 -0
  14. package/core/Breadcrumbs/index.js +44 -0
  15. package/core/Button/BackButton.d.ts +1 -1
  16. package/core/Button/ButtonLink.d.ts +1 -1
  17. package/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
  18. package/core/Button/index.d.ts +1 -0
  19. package/core/Button/index.js +14 -0
  20. package/core/Card/index.d.ts +4 -0
  21. package/core/Card/index.js +57 -0
  22. package/core/Details/__snapshots__/index.spec.tsx.snap +20 -28
  23. package/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +3 -3
  24. package/core/Hidden/index.d.ts +1 -0
  25. package/core/Hidden/index.js +18 -0
  26. package/core/Link/__snapshots__/index.spec.tsx.snap +0 -3
  27. package/core/Link/index.d.ts +3 -8
  28. package/core/Link/index.js +3 -26
  29. package/core/List/__snapshots__/index.spec.tsx.snap +3 -3
  30. package/core/NavList/__snapshots__/index.spec.tsx.snap +2 -2
  31. package/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +417 -29
  32. package/core/NotificationBanner/index.d.ts +9 -8
  33. package/core/NotificationBanner/index.js +13 -2
  34. package/core/NotificationBanner/index.spec.js +9 -0
  35. package/core/ServiceBadge/index.d.ts +1 -0
  36. package/core/ServiceBadge/index.js +5 -2
  37. package/core/SummaryList/__snapshots__/index.spec.tsx.snap +47 -1293
  38. package/core/Table/index.d.ts +7 -0
  39. package/core/Table/index.js +96 -0
  40. package/core/VisuallyHidden/index.d.ts +1 -0
  41. package/core/VisuallyHidden/index.js +18 -0
  42. package/core/WarningText/__snapshots__/index.spec.tsx.snap +15 -43
  43. package/es/app/Confirmation/index.js +3 -0
  44. package/es/app/Footer/index.js +15 -0
  45. package/es/app/Header/__snapshots__/index.spec.tsx.snap +63 -1231
  46. package/es/app/Header/index.js +3 -1
  47. package/es/core/Accordion/__snapshots__/index.spec.tsx.snap +61 -711
  48. package/es/core/Blockquote/__snapshots__/index.spec.tsx.snap +9 -9
  49. package/es/core/Breadcrumbs/index.js +3 -0
  50. package/es/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
  51. package/es/core/Button/index.js +2 -1
  52. package/es/core/Card/index.js +4 -0
  53. package/es/core/Details/__snapshots__/index.spec.tsx.snap +20 -28
  54. package/es/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +3 -3
  55. package/es/core/Hidden/index.js +1 -0
  56. package/es/core/Link/__snapshots__/index.spec.tsx.snap +0 -3
  57. package/es/core/Link/index.js +3 -26
  58. package/es/core/List/__snapshots__/index.spec.tsx.snap +3 -3
  59. package/es/core/NavList/__snapshots__/index.spec.tsx.snap +2 -2
  60. package/es/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +417 -29
  61. package/es/core/NotificationBanner/index.js +7 -3
  62. package/es/core/NotificationBanner/index.spec.js +11 -2
  63. package/es/core/ServiceBadge/index.js +4 -2
  64. package/es/core/SummaryList/__snapshots__/index.spec.tsx.snap +47 -1293
  65. package/es/core/Table/index.js +7 -0
  66. package/es/core/VisuallyHidden/index.js +1 -0
  67. package/es/core/WarningText/__snapshots__/index.spec.tsx.snap +15 -43
  68. package/es/govgr/Footer/Copyright.js +3 -2
  69. package/es/govgr/Footer/LicenseCCSA.js +2 -1
  70. package/es/layouts/Basic/__snapshots__/index.spec.tsx.snap +39 -687
  71. package/es/layouts/Grid/index.js +1 -0
  72. package/es/locales/el.js +11 -1
  73. package/es/locales/en.js +11 -1
  74. package/esm/app/Confirmation/index.js +3 -0
  75. package/esm/app/Footer/index.js +15 -0
  76. package/esm/app/Header/__snapshots__/index.spec.tsx.snap +63 -1231
  77. package/esm/app/Header/index.js +3 -1
  78. package/esm/core/Accordion/__snapshots__/index.spec.tsx.snap +61 -711
  79. package/esm/core/Blockquote/__snapshots__/index.spec.tsx.snap +9 -9
  80. package/esm/core/Breadcrumbs/index.js +3 -0
  81. package/esm/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
  82. package/esm/core/Button/index.js +2 -1
  83. package/esm/core/Card/index.js +4 -0
  84. package/esm/core/Details/__snapshots__/index.spec.tsx.snap +20 -28
  85. package/esm/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +3 -3
  86. package/esm/core/Hidden/index.js +1 -0
  87. package/esm/core/Link/__snapshots__/index.spec.tsx.snap +0 -3
  88. package/esm/core/Link/index.js +3 -26
  89. package/esm/core/List/__snapshots__/index.spec.tsx.snap +3 -3
  90. package/esm/core/NavList/__snapshots__/index.spec.tsx.snap +2 -2
  91. package/esm/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +417 -29
  92. package/esm/core/NotificationBanner/index.js +7 -3
  93. package/esm/core/NotificationBanner/index.spec.js +11 -2
  94. package/esm/core/ServiceBadge/index.js +4 -2
  95. package/esm/core/SummaryList/__snapshots__/index.spec.tsx.snap +47 -1293
  96. package/esm/core/Table/index.js +7 -0
  97. package/esm/core/VisuallyHidden/index.js +1 -0
  98. package/esm/core/WarningText/__snapshots__/index.spec.tsx.snap +15 -43
  99. package/esm/govgr/Footer/Copyright.js +3 -2
  100. package/esm/govgr/Footer/LicenseCCSA.js +2 -1
  101. package/esm/index.js +1 -1
  102. package/esm/layouts/Basic/__snapshots__/index.spec.tsx.snap +39 -687
  103. package/esm/layouts/Grid/index.js +1 -0
  104. package/esm/locales/el.js +11 -1
  105. package/esm/locales/en.js +11 -1
  106. package/govgr/Footer/Copyright.js +4 -2
  107. package/govgr/Footer/LicenseCCSA.js +3 -1
  108. package/layouts/Basic/__snapshots__/index.spec.tsx.snap +39 -687
  109. package/layouts/Grid/index.d.ts +1 -0
  110. package/layouts/Grid/index.js +18 -0
  111. package/locales/el.d.ts +10 -0
  112. package/locales/el.js +11 -1
  113. package/locales/en.d.ts +10 -0
  114. package/locales/en.js +11 -1
  115. 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
- <Blockquote
5
- variant="info"
6
- >
7
- <blockquote
8
- className="MuiBlockquote-info MuiBlockquote-root"
9
- >
10
- this is some random data
11
- </blockquote>
12
- </Blockquote>
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,3 @@
1
+ export * from '@digigov/react-core/Breadcrumbs';
2
+ export * from '@digigov/react-core/BreadcrumbsList';
3
+ export * from '@digigov/react-core/BreadcrumbsListItem';
@@ -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
+ `;
@@ -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';
@@ -0,0 +1,4 @@
1
+ export * from '@digigov/react-core/Card';
2
+ export * from '@digigov/react-core/CardAction';
3
+ export * from '@digigov/react-core/CardHeading';
4
+ export * from '@digigov/react-core/CardText';
@@ -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="MuiDetails-root"
6
+ className="govgr-details"
7
7
  >
8
- <DetailsSummary>
8
+ <ForwardRef(DetailsSummary)>
9
9
  <summary
10
- className="MuiDetailsSummary-root"
10
+ className="govgr-details__summary"
11
11
  >
12
- <span
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="MuiDetailsContent-root"
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="MuiDetails-root"
31
+ className="govgr-details"
36
32
  open={true}
37
33
  >
38
- <DetailsSummary>
34
+ <ForwardRef(DetailsSummary)>
39
35
  <summary
40
- className="MuiDetailsSummary-root"
36
+ className="govgr-details__summary"
41
37
  >
42
- <span
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="MuiDetailsContent-root"
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="ErrorSummary-root-1"
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
@@ -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
- className: cls
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="List-root-1"
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="NavList-root-1 NavList-vertical-4"
322
+ className="MuiNavList-root MuiNavList-vertical"
323
323
  >
324
324
  this is some random warning text
325
325
  </ul>
326
326
  <div
327
- className="NavList-floatClear-5"
327
+ className="MuiNavList-floatClear"
328
328
  />
329
329
  </nav>
330
330
  </NavListBase>