@moduk/frontend 1.3.0 → 1.4.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 (165) hide show
  1. package/dist/nunjucks/moduk/components/footer/__examples__/with-customisation.njk +28 -0
  2. package/dist/nunjucks/moduk/components/phase-banner/__examples__/default.njk +0 -4
  3. package/dist/nunjucks/moduk/components/summary-list/__examples__/cards-with-single-action.njk +36 -0
  4. package/dist/nunjucks/moduk/components/summary-list/__examples__/with-multiple-actions.njk +28 -0
  5. package/nunjucks/moduk/components/footer/__examples__/with-customisation.njk +28 -0
  6. package/nunjucks/moduk/components/phase-banner/__examples__/default.njk +0 -4
  7. package/nunjucks/moduk/components/summary-list/__examples__/cards-with-single-action.njk +36 -0
  8. package/nunjucks/moduk/components/summary-list/__examples__/with-multiple-actions.njk +28 -0
  9. package/package.json +8 -7
  10. package/react/VisuallyHiddenText/VisuallyHiddenText.d.ts +10 -0
  11. package/react/VisuallyHiddenText/VisuallyHiddenText.d.ts.map +1 -0
  12. package/react/VisuallyHiddenText/index.d.ts +2 -0
  13. package/react/VisuallyHiddenText/index.d.ts.map +1 -0
  14. package/react/accordion/Accordion.d.ts +3 -4
  15. package/react/accordion/Accordion.d.ts.map +1 -1
  16. package/react/back-link/BackLink.d.ts +2 -3
  17. package/react/back-link/BackLink.d.ts.map +1 -1
  18. package/react/error-message/ErrorMessage.d.ts +13 -0
  19. package/react/error-message/ErrorMessage.d.ts.map +1 -0
  20. package/react/error-message/index.d.ts +2 -0
  21. package/react/error-message/index.d.ts.map +1 -0
  22. package/react/esm/VisuallyHiddenText/VisuallyHiddenText.js +10 -0
  23. package/react/esm/VisuallyHiddenText/index.js +1 -0
  24. package/react/esm/accordion/Accordion.js +8 -5
  25. package/react/esm/error-message/ErrorMessage.js +33 -0
  26. package/react/esm/error-message/index.js +1 -0
  27. package/react/esm/footer/Footer.js +84 -0
  28. package/react/esm/footer/FooterMeta.js +21 -0
  29. package/react/esm/footer/FooterMetaLink.js +32 -0
  30. package/react/esm/footer/FooterNavigation.js +14 -0
  31. package/react/esm/footer/FooterNavigationLink.js +28 -0
  32. package/react/esm/footer/FooterNavigationSection.js +20 -0
  33. package/react/esm/footer/index.js +6 -0
  34. package/react/esm/hint/Hint.js +28 -0
  35. package/react/esm/hint/index.js +1 -0
  36. package/react/esm/index.js +10 -1
  37. package/react/esm/input/Input.js +60 -0
  38. package/react/esm/input/InputPrefix.js +14 -0
  39. package/react/esm/input/InputSuffix.js +14 -0
  40. package/react/esm/input/index.js +3 -0
  41. package/react/esm/internal/FormGroup/FormGroup.js +21 -0
  42. package/react/esm/internal/FormGroup/FormGroupContext.js +4 -0
  43. package/react/esm/internal/FormGroup/index.js +2 -0
  44. package/react/esm/internal/PermissiveChild.js +1 -0
  45. package/react/esm/label/Label.js +38 -0
  46. package/react/esm/label/index.js +1 -0
  47. package/react/esm/phase-banner/PhaseBanner.js +32 -0
  48. package/react/esm/phase-banner/PhaseTag.js +24 -0
  49. package/react/esm/phase-banner/index.js +2 -0
  50. package/react/esm/summary-list/SummaryCardActions.js +24 -0
  51. package/react/esm/summary-list/SummaryCardTitle.js +12 -0
  52. package/react/esm/summary-list/SummaryList.js +76 -0
  53. package/react/esm/summary-list/SummaryListActionLink.js +25 -0
  54. package/react/esm/summary-list/SummaryListActions.js +22 -0
  55. package/react/esm/summary-list/SummaryListKey.js +10 -0
  56. package/react/esm/summary-list/SummaryListValue.js +10 -0
  57. package/react/esm/summary-list/index.js +7 -0
  58. package/react/esm/tag/Tag.js +27 -0
  59. package/react/esm/tag/index.js +1 -0
  60. package/react/footer/Footer.d.ts +44 -0
  61. package/react/footer/Footer.d.ts.map +1 -0
  62. package/react/footer/FooterMeta.d.ts +24 -0
  63. package/react/footer/FooterMeta.d.ts.map +1 -0
  64. package/react/footer/FooterMetaLink.d.ts +14 -0
  65. package/react/footer/FooterMetaLink.d.ts.map +1 -0
  66. package/react/footer/FooterNavigation.d.ts +15 -0
  67. package/react/footer/FooterNavigation.d.ts.map +1 -0
  68. package/react/footer/FooterNavigationLink.d.ts +14 -0
  69. package/react/footer/FooterNavigationLink.d.ts.map +1 -0
  70. package/react/footer/FooterNavigationSection.d.ts +30 -0
  71. package/react/footer/FooterNavigationSection.d.ts.map +1 -0
  72. package/react/footer/index.d.ts +7 -0
  73. package/react/footer/index.d.ts.map +1 -0
  74. package/react/hint/Hint.d.ts +11 -0
  75. package/react/hint/Hint.d.ts.map +1 -0
  76. package/react/hint/index.d.ts +2 -0
  77. package/react/hint/index.d.ts.map +1 -0
  78. package/react/index.d.ts +9 -0
  79. package/react/index.d.ts.map +1 -1
  80. package/react/index.js +1 -1
  81. package/react/index.js.map +1 -1
  82. package/react/input/Input.d.ts +50 -0
  83. package/react/input/Input.d.ts.map +1 -0
  84. package/react/input/InputPrefix.d.ts +9 -0
  85. package/react/input/InputPrefix.d.ts.map +1 -0
  86. package/react/input/InputSuffix.d.ts +9 -0
  87. package/react/input/InputSuffix.d.ts.map +1 -0
  88. package/react/input/index.d.ts +4 -0
  89. package/react/input/index.d.ts.map +1 -0
  90. package/react/internal/FormGroup/FormGroup.d.ts +9 -0
  91. package/react/internal/FormGroup/FormGroup.d.ts.map +1 -0
  92. package/react/internal/FormGroup/FormGroupContext.d.ts +5 -0
  93. package/react/internal/FormGroup/FormGroupContext.d.ts.map +1 -0
  94. package/react/internal/FormGroup/index.d.ts +3 -0
  95. package/react/internal/FormGroup/index.d.ts.map +1 -0
  96. package/react/internal/PermissiveChild.d.ts +3 -0
  97. package/react/internal/PermissiveChild.d.ts.map +1 -0
  98. package/react/label/Label.d.ts +15 -0
  99. package/react/label/Label.d.ts.map +1 -0
  100. package/react/label/index.d.ts +2 -0
  101. package/react/label/index.d.ts.map +1 -0
  102. package/react/phase-banner/PhaseBanner.d.ts +27 -0
  103. package/react/phase-banner/PhaseBanner.d.ts.map +1 -0
  104. package/react/phase-banner/PhaseTag.d.ts +10 -0
  105. package/react/phase-banner/PhaseTag.d.ts.map +1 -0
  106. package/react/phase-banner/index.d.ts +3 -0
  107. package/react/phase-banner/index.d.ts.map +1 -0
  108. package/react/summary-list/SummaryCardActions.d.ts +16 -0
  109. package/react/summary-list/SummaryCardActions.d.ts.map +1 -0
  110. package/react/summary-list/SummaryCardTitle.d.ts +22 -0
  111. package/react/summary-list/SummaryCardTitle.d.ts.map +1 -0
  112. package/react/summary-list/SummaryList.d.ts +89 -0
  113. package/react/summary-list/SummaryList.d.ts.map +1 -0
  114. package/react/summary-list/SummaryListActionLink.d.ts +11 -0
  115. package/react/summary-list/SummaryListActionLink.d.ts.map +1 -0
  116. package/react/summary-list/SummaryListActions.d.ts +16 -0
  117. package/react/summary-list/SummaryListActions.d.ts.map +1 -0
  118. package/react/summary-list/SummaryListKey.d.ts +12 -0
  119. package/react/summary-list/SummaryListKey.d.ts.map +1 -0
  120. package/react/summary-list/SummaryListValue.d.ts +12 -0
  121. package/react/summary-list/SummaryListValue.d.ts.map +1 -0
  122. package/react/summary-list/index.d.ts +8 -0
  123. package/react/summary-list/index.d.ts.map +1 -0
  124. package/react/tag/Tag.d.ts +17 -0
  125. package/react/tag/Tag.d.ts.map +1 -0
  126. package/react/tag/index.d.ts +2 -0
  127. package/react/tag/index.d.ts.map +1 -0
  128. package/src/react/error-message/__examples__/default.tsx +3 -0
  129. package/src/react/footer/__examples__/default.tsx +3 -0
  130. package/src/react/footer/__examples__/with-customisation.tsx +15 -0
  131. package/src/react/footer/__examples__/with-links.tsx +13 -0
  132. package/src/react/footer/__examples__/with-secondary-navigation-and-links.tsx +44 -0
  133. package/src/react/footer/__examples__/with-secondary-navigation.tsx +24 -0
  134. package/src/react/input/__examples__/default.tsx +12 -0
  135. package/src/react/input/__examples__/not-as-page-heading.tsx +8 -0
  136. package/src/react/input/__examples__/with-error.tsx +14 -0
  137. package/src/react/input/__examples__/with-fixed-width.tsx +36 -0
  138. package/src/react/input/__examples__/with-fluid-width.tsx +36 -0
  139. package/src/react/input/__examples__/with-hint.tsx +13 -0
  140. package/src/react/input/__examples__/with-numeric.tsx +16 -0
  141. package/src/react/input/__examples__/with-prefix-and-suffix-error.tsx +17 -0
  142. package/src/react/input/__examples__/with-prefix-and-suffix.tsx +16 -0
  143. package/src/react/input/__examples__/with-prefix.tsx +15 -0
  144. package/src/react/input/__examples__/with-suffix.tsx +15 -0
  145. package/src/react/phase-banner/__examples__/beta.tsx +7 -0
  146. package/src/react/phase-banner/__examples__/default.tsx +7 -0
  147. package/src/react/phase-banner/__examples__/with-tag-override.tsx +7 -0
  148. package/src/react/phase-banner/__examples__/with-text.tsx +7 -0
  149. package/src/react/summary-list/__examples__/cards-with-action.tsx +88 -0
  150. package/src/react/summary-list/__examples__/cards-with-single-action.tsx +46 -0
  151. package/src/react/summary-list/__examples__/cards.tsx +156 -0
  152. package/src/react/summary-list/__examples__/default.tsx +72 -0
  153. package/src/react/summary-list/__examples__/with-multiple-actions.tsx +29 -0
  154. package/src/react/summary-list/__examples__/with-no-actions.tsx +37 -0
  155. package/src/react/summary-list/__examples__/with-no-border.tsx +38 -0
  156. package/src/react/tag/__examples__/blue.tsx +3 -0
  157. package/src/react/tag/__examples__/default.tsx +3 -0
  158. package/src/react/tag/__examples__/green.tsx +3 -0
  159. package/src/react/tag/__examples__/grey.tsx +3 -0
  160. package/src/react/tag/__examples__/orange.tsx +3 -0
  161. package/src/react/tag/__examples__/pink.tsx +3 -0
  162. package/src/react/tag/__examples__/purple.tsx +3 -0
  163. package/src/react/tag/__examples__/red.tsx +3 -0
  164. package/src/react/tag/__examples__/turquoise.tsx +3 -0
  165. package/src/react/tag/__examples__/yellow.tsx +3 -0
@@ -0,0 +1,14 @@
1
+ import { ErrorMessage, Hint, Input, Label } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <Input
5
+ errorMessage={<ErrorMessage>Enter an event name</ErrorMessage>}
6
+ hint={<Hint>The name you’ll use on promotional material</Hint>}
7
+ label={
8
+ <Label className='govuk-label--l' isPageHeading>
9
+ What is the name of the event?
10
+ </Label>
11
+ }
12
+ name='event-name-with-error'
13
+ />
14
+ )
@@ -0,0 +1,36 @@
1
+ import { Input, Label } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <div>
5
+ <Input
6
+ className='govuk-input--width-20'
7
+ label={<Label>20 character width</Label>}
8
+ name='width-20'
9
+ />
10
+ <Input
11
+ className='govuk-input--width-10'
12
+ label={<Label>10 character width</Label>}
13
+ name='width-10'
14
+ />
15
+ <Input
16
+ className='govuk-input--width-5'
17
+ label={<Label>5 character width</Label>}
18
+ name='width-5'
19
+ />
20
+ <Input
21
+ className='govuk-input--width-4'
22
+ label={<Label>4 character width</Label>}
23
+ name='width-4'
24
+ />
25
+ <Input
26
+ className='govuk-input--width-3'
27
+ label={<Label>3 character width</Label>}
28
+ name='width-3'
29
+ />
30
+ <Input
31
+ className='govuk-input--width-2'
32
+ label={<Label>2 character width</Label>}
33
+ name='width-2'
34
+ />
35
+ </div>
36
+ )
@@ -0,0 +1,36 @@
1
+ import { Input, Label } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <div>
5
+ <Input
6
+ className='govuk-!-width-full'
7
+ label={<Label>Full width</Label>}
8
+ name='full'
9
+ />
10
+ <Input
11
+ className='govuk-!-width-three-quarters'
12
+ label={<Label>Three-quarters width</Label>}
13
+ name='three-quarters'
14
+ />
15
+ <Input
16
+ className='govuk-!-width-two-thirds'
17
+ label={<Label>Two-thirds width</Label>}
18
+ name='two-thirds'
19
+ />
20
+ <Input
21
+ className='govuk-!-width-one-half'
22
+ label={<Label>One-half width</Label>}
23
+ name='one-half'
24
+ />
25
+ <Input
26
+ className='govuk-!-width-one-third'
27
+ label={<Label>One-third width</Label>}
28
+ name='one-third'
29
+ />
30
+ <Input
31
+ className='govuk-!-width-one-quarter'
32
+ label={<Label>One-quarter width</Label>}
33
+ name='one-quarter'
34
+ />
35
+ </div>
36
+ )
@@ -0,0 +1,13 @@
1
+ import { Hint, Input, Label } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <Input
5
+ hint={<Hint>The name you’ll use on promotional material</Hint>}
6
+ label={
7
+ <Label className='govuk-label--l' isPageHeading>
8
+ What is the name of the event?
9
+ </Label>
10
+ }
11
+ name='event-name-with-hint'
12
+ />
13
+ )
@@ -0,0 +1,16 @@
1
+ import { Hint, Input, Label } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <Input
5
+ className='govuk-input--width-10'
6
+ hint={<Hint>Must be between 6 and 8 digits long</Hint>}
7
+ inputMode='numeric'
8
+ label={
9
+ <Label className='govuk-label--l' isPageHeading>
10
+ What is your account number?
11
+ </Label>
12
+ }
13
+ name='account-number-with-numeric'
14
+ spellCheck={false}
15
+ />
16
+ )
@@ -0,0 +1,17 @@
1
+ import { ErrorMessage, Input, InputPrefix, InputSuffix, Label } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <Input
5
+ className='govuk-input--width-5'
6
+ errorMessage={<ErrorMessage>Enter a cost per item, in pounds</ErrorMessage>}
7
+ label={
8
+ <Label className='govuk-label--l' isPageHeading>
9
+ What is the cost per item, in pounds?
10
+ </Label>
11
+ }
12
+ name='cost-per-item-with-prefix-and-suffix-error'
13
+ prefix={<InputPrefix>£</InputPrefix>}
14
+ suffix={<InputSuffix>per item</InputSuffix>}
15
+ spellCheck={false}
16
+ />
17
+ )
@@ -0,0 +1,16 @@
1
+ import { Input, InputPrefix, InputSuffix, Label } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <Input
5
+ className='govuk-input--width-5'
6
+ label={
7
+ <Label className='govuk-label--l' isPageHeading>
8
+ What is the cost per item, in pounds?
9
+ </Label>
10
+ }
11
+ name='cost-per-item-with-prefix-and-suffix'
12
+ prefix={<InputPrefix>£</InputPrefix>}
13
+ suffix={<InputSuffix>per item</InputSuffix>}
14
+ spellCheck={false}
15
+ />
16
+ )
@@ -0,0 +1,15 @@
1
+ import { Input, InputPrefix, Label } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <Input
5
+ className='govuk-input--width-5'
6
+ label={
7
+ <Label className='govuk-label--l' isPageHeading>
8
+ What is the cost in pounds?
9
+ </Label>
10
+ }
11
+ name='cost-with-prefix'
12
+ prefix={<InputPrefix>£</InputPrefix>}
13
+ spellCheck={false}
14
+ />
15
+ )
@@ -0,0 +1,15 @@
1
+ import { Input, InputSuffix, Label } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <Input
5
+ className='govuk-input--width-5'
6
+ label={
7
+ <Label className='govuk-label--l' isPageHeading>
8
+ What is the weight in kilograms?
9
+ </Label>
10
+ }
11
+ name='weight-with-suffix'
12
+ suffix={<InputSuffix>kg</InputSuffix>}
13
+ spellCheck={false}
14
+ />
15
+ )
@@ -0,0 +1,7 @@
1
+ import { PhaseBanner, PhaseTag } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <PhaseBanner phaseTag={<PhaseTag>beta</PhaseTag>}>
5
+ This is a new service – your <a className='govuk-link' href='#'>feedback</a> will help us to improve it.
6
+ </PhaseBanner>
7
+ )
@@ -0,0 +1,7 @@
1
+ import { PhaseBanner, PhaseTag } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <PhaseBanner phaseTag={<PhaseTag>alpha</PhaseTag>}>
5
+ This is a new service – your <a className='govuk-link' href='#'>feedback</a> will help us to improve it.
6
+ </PhaseBanner>
7
+ )
@@ -0,0 +1,7 @@
1
+ import { PhaseBanner, PhaseTag } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <PhaseBanner phaseTag={<PhaseTag className='govuk-tag--grey'>beta</PhaseTag>}>
5
+ This is a new service – your <a className='govuk-link' href='#'>feedback</a> will help us to improve it.
6
+ </PhaseBanner>
7
+ )
@@ -0,0 +1,7 @@
1
+ import { PhaseBanner, PhaseTag } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <PhaseBanner phaseTag={<PhaseTag>beta</PhaseTag>}>
5
+ This is a new service
6
+ </PhaseBanner>
7
+ )
@@ -0,0 +1,88 @@
1
+ import {
2
+ SummaryCardActions,
3
+ SummaryCardTitle,
4
+ SummaryList,
5
+ SummaryListActionLink,
6
+ SummaryListKey,
7
+ SummaryListValue,
8
+ VisuallyHiddenText,
9
+ } from '@moduk/frontend/react'
10
+
11
+ export const Example = () => (
12
+ <div>
13
+ <SummaryList
14
+ card={{
15
+ title: <SummaryCardTitle>University of Gloucestershire</SummaryCardTitle>,
16
+ actions: (
17
+ <SummaryCardActions>
18
+ <SummaryListActionLink href='#'>
19
+ Delete choice <VisuallyHiddenText>of University of Gloucestershire</VisuallyHiddenText>
20
+ </SummaryListActionLink>
21
+ <SummaryListActionLink href='#'>
22
+ Withdraw <VisuallyHiddenText>from University of Gloucestershire</VisuallyHiddenText>
23
+ </SummaryListActionLink>
24
+ </SummaryCardActions>
25
+ ),
26
+ }}
27
+ rows={[
28
+ {
29
+ key: <SummaryListKey>Course</SummaryListKey>,
30
+ value: (
31
+ <SummaryListValue>
32
+ English (3DMD)
33
+ <br />
34
+ PGCE with QTS full time
35
+ </SummaryListValue>
36
+ ),
37
+ },
38
+ {
39
+ key: <SummaryListKey>Location</SummaryListKey>,
40
+ value: (
41
+ <SummaryListValue>
42
+ School name
43
+ <br />
44
+ Road, City, SW1 1AA
45
+ </SummaryListValue>
46
+ ),
47
+ },
48
+ ]}
49
+ />
50
+ <SummaryList
51
+ card={{
52
+ title: <SummaryCardTitle>University of Bristol</SummaryCardTitle>,
53
+ actions: (
54
+ <SummaryCardActions>
55
+ <SummaryListActionLink href='#'>
56
+ Delete choice <VisuallyHiddenText>of University of Bristol</VisuallyHiddenText>
57
+ </SummaryListActionLink>
58
+ <SummaryListActionLink href='#'>
59
+ Withdraw <VisuallyHiddenText>from University of Bristol</VisuallyHiddenText>
60
+ </SummaryListActionLink>
61
+ </SummaryCardActions>
62
+ ),
63
+ }}
64
+ rows={[
65
+ {
66
+ key: <SummaryListKey>Course</SummaryListKey>,
67
+ value: (
68
+ <SummaryListValue>
69
+ English (Q3X1)
70
+ <br />
71
+ PGCE with QTS full time
72
+ </SummaryListValue>
73
+ ),
74
+ },
75
+ {
76
+ key: <SummaryListKey>Location</SummaryListKey>,
77
+ value: (
78
+ <SummaryListValue>
79
+ School name
80
+ <br />
81
+ Road, City, SW2 1AA
82
+ </SummaryListValue>
83
+ ),
84
+ },
85
+ ]}
86
+ />
87
+ </div>
88
+ )
@@ -0,0 +1,46 @@
1
+ import {
2
+ SummaryCardActions,
3
+ SummaryCardTitle,
4
+ SummaryList,
5
+ SummaryListActionLink,
6
+ SummaryListKey,
7
+ SummaryListValue,
8
+ VisuallyHiddenText,
9
+ } from '@moduk/frontend/react'
10
+
11
+ export const Example = () => (
12
+ <SummaryList
13
+ card={{
14
+ title: <SummaryCardTitle>University of Gloucestershire</SummaryCardTitle>,
15
+ actions: (
16
+ <SummaryCardActions>
17
+ <SummaryListActionLink href='#'>
18
+ Withdraw <VisuallyHiddenText>from University of Gloucestershire</VisuallyHiddenText>
19
+ </SummaryListActionLink>
20
+ </SummaryCardActions>
21
+ ),
22
+ }}
23
+ rows={[
24
+ {
25
+ key: <SummaryListKey>Course</SummaryListKey>,
26
+ value: (
27
+ <SummaryListValue>
28
+ English (3DMD)
29
+ <br />
30
+ PGCE with QTS full time
31
+ </SummaryListValue>
32
+ ),
33
+ },
34
+ {
35
+ key: <SummaryListKey>Location</SummaryListKey>,
36
+ value: (
37
+ <SummaryListValue>
38
+ School name
39
+ <br />
40
+ Road, City, SW1 1AA
41
+ </SummaryListValue>
42
+ ),
43
+ },
44
+ ]}
45
+ />
46
+ )
@@ -0,0 +1,156 @@
1
+ import {
2
+ SummaryCardTitle,
3
+ SummaryList,
4
+ SummaryListActionLink,
5
+ SummaryListActions,
6
+ SummaryListKey,
7
+ SummaryListValue,
8
+ VisuallyHiddenText,
9
+ } from '@moduk/frontend/react'
10
+
11
+ export const Example = () => (
12
+ <div>
13
+ <SummaryList
14
+ card={{
15
+ title: <SummaryCardTitle>Lead tenant</SummaryCardTitle>,
16
+ }}
17
+ rows={[
18
+ {
19
+ key: <SummaryListKey>Age</SummaryListKey>,
20
+ value: <SummaryListValue>38</SummaryListValue>,
21
+ actions: (
22
+ <SummaryListActions>
23
+ <SummaryListActionLink href='#'>
24
+ Change <VisuallyHiddenText>age</VisuallyHiddenText>
25
+ </SummaryListActionLink>
26
+ </SummaryListActions>
27
+ ),
28
+ },
29
+ {
30
+ key: <SummaryListKey>Nationality</SummaryListKey>,
31
+ value: <SummaryListValue>UK national resident in UK</SummaryListValue>,
32
+ actions: (
33
+ <SummaryListActions>
34
+ <SummaryListActionLink href='#'>
35
+ Change <VisuallyHiddenText>nationality</VisuallyHiddenText>
36
+ </SummaryListActionLink>,
37
+ </SummaryListActions>
38
+ ),
39
+ },
40
+ {
41
+ key: <SummaryListKey>Working situation</SummaryListKey>,
42
+ value: <SummaryListValue>Part time – less than 30 hours a week</SummaryListValue>,
43
+ actions: (
44
+ <SummaryListActions>
45
+ <SummaryListActionLink href='#'>
46
+ Change <VisuallyHiddenText>working situation</VisuallyHiddenText>
47
+ </SummaryListActionLink>
48
+ </SummaryListActions>
49
+ ),
50
+ },
51
+ ]}
52
+ />
53
+ <SummaryList
54
+ card={{
55
+ title: <SummaryCardTitle>Person 2</SummaryCardTitle>,
56
+ }}
57
+ rows={[
58
+ {
59
+ key: <SummaryListKey>Details known</SummaryListKey>,
60
+ value: <SummaryListValue>Yes</SummaryListValue>,
61
+ actions: (
62
+ <SummaryListActions>
63
+ <SummaryListActionLink href='#'>
64
+ Change <VisuallyHiddenText>whether details are known</VisuallyHiddenText>
65
+ </SummaryListActionLink>
66
+ </SummaryListActions>
67
+ ),
68
+ },
69
+ {
70
+ key: <SummaryListKey>Relationship to lead tenant</SummaryListKey>,
71
+ value: <SummaryListValue>Partner</SummaryListValue>,
72
+ actions: (
73
+ <SummaryListActions>
74
+ <SummaryListActionLink href='#'>
75
+ Change <VisuallyHiddenText>relationship to lead tenant</VisuallyHiddenText>
76
+ </SummaryListActionLink>,
77
+ </SummaryListActions>
78
+ ),
79
+ },
80
+ {
81
+ key: <SummaryListKey>Age</SummaryListKey>,
82
+ value: <SummaryListValue>42</SummaryListValue>,
83
+ actions: (
84
+ <SummaryListActions>
85
+ <SummaryListActionLink href='#'>
86
+ Change <VisuallyHiddenText>age</VisuallyHiddenText>
87
+ </SummaryListActionLink>
88
+ </SummaryListActions>
89
+ ),
90
+ },
91
+ {
92
+ key: <SummaryListKey>Working situation</SummaryListKey>,
93
+ value: <SummaryListValue>Unable to work because of long-term sickness or disability</SummaryListValue>,
94
+ actions: (
95
+ <SummaryListActions>
96
+ <SummaryListActionLink href='#'>
97
+ Change <VisuallyHiddenText>working situation</VisuallyHiddenText>
98
+ </SummaryListActionLink>
99
+ </SummaryListActions>
100
+ ),
101
+ },
102
+ ]}
103
+ />
104
+ <SummaryList
105
+ card={{
106
+ title: <SummaryCardTitle>Person 3</SummaryCardTitle>,
107
+ }}
108
+ rows={[
109
+ {
110
+ key: <SummaryListKey>Details known</SummaryListKey>,
111
+ value: <SummaryListValue>Yes</SummaryListValue>,
112
+ actions: (
113
+ <SummaryListActions>
114
+ <SummaryListActionLink href='#'>
115
+ Change <VisuallyHiddenText>whether details are known</VisuallyHiddenText>
116
+ </SummaryListActionLink>
117
+ </SummaryListActions>
118
+ ),
119
+ },
120
+ {
121
+ key: <SummaryListKey>Relationship to lead tenant</SummaryListKey>,
122
+ value: <SummaryListValue>Child</SummaryListValue>,
123
+ actions: (
124
+ <SummaryListActions>
125
+ <SummaryListActionLink href='#'>
126
+ Change <VisuallyHiddenText>relationship to lead tenant</VisuallyHiddenText>
127
+ </SummaryListActionLink>,
128
+ </SummaryListActions>
129
+ ),
130
+ },
131
+ {
132
+ key: <SummaryListKey>Age</SummaryListKey>,
133
+ value: <SummaryListValue>7</SummaryListValue>,
134
+ actions: (
135
+ <SummaryListActions>
136
+ <SummaryListActionLink href='#'>
137
+ Change <VisuallyHiddenText>age</VisuallyHiddenText>
138
+ </SummaryListActionLink>
139
+ </SummaryListActions>
140
+ ),
141
+ },
142
+ {
143
+ key: <SummaryListKey>Working situation</SummaryListKey>,
144
+ value: <SummaryListValue>Child under 16</SummaryListValue>,
145
+ actions: (
146
+ <SummaryListActions>
147
+ <SummaryListActionLink href='#'>
148
+ Change <VisuallyHiddenText>working situation</VisuallyHiddenText>
149
+ </SummaryListActionLink>
150
+ </SummaryListActions>
151
+ ),
152
+ },
153
+ ]}
154
+ />
155
+ </div>
156
+ )
@@ -0,0 +1,72 @@
1
+ import {
2
+ SummaryList,
3
+ SummaryListActionLink,
4
+ SummaryListActions,
5
+ SummaryListKey,
6
+ SummaryListValue,
7
+ VisuallyHiddenText,
8
+ } from '@moduk/frontend/react'
9
+
10
+ export const Example = () => (
11
+ <SummaryList
12
+ rows={[
13
+ {
14
+ key: <SummaryListKey>Name</SummaryListKey>,
15
+ value: <SummaryListValue>Sarah Philips</SummaryListValue>,
16
+ actions: (
17
+ <SummaryListActions>
18
+ <SummaryListActionLink href='#'>
19
+ Change <VisuallyHiddenText>name</VisuallyHiddenText>
20
+ </SummaryListActionLink>
21
+ </SummaryListActions>
22
+ ),
23
+ },
24
+ {
25
+ key: <SummaryListKey>Date of birth</SummaryListKey>,
26
+ value: <SummaryListValue>5 January 1978</SummaryListValue>,
27
+ actions: (
28
+ <SummaryListActions>
29
+ <SummaryListActionLink href='#'>
30
+ Change <VisuallyHiddenText>date of birth</VisuallyHiddenText>
31
+ </SummaryListActionLink>,
32
+ </SummaryListActions>
33
+ ),
34
+ },
35
+ {
36
+ key: <SummaryListKey>Address</SummaryListKey>,
37
+ value: (
38
+ <SummaryListValue>
39
+ 72 Guild Street
40
+ <br />
41
+ London
42
+ <br />
43
+ SE23 6FH
44
+ </SummaryListValue>
45
+ ),
46
+ actions: (
47
+ <SummaryListActions>
48
+ <SummaryListActionLink href='#'>
49
+ Change <VisuallyHiddenText>address</VisuallyHiddenText>
50
+ </SummaryListActionLink>
51
+ </SummaryListActions>
52
+ ),
53
+ },
54
+ {
55
+ key: <SummaryListKey>Contact details</SummaryListKey>,
56
+ value: (
57
+ <SummaryListValue>
58
+ <p className='govuk-body'>07700 900457</p>
59
+ <p className='govuk-body'>sarah.phillips@example.com</p>
60
+ </SummaryListValue>
61
+ ),
62
+ actions: (
63
+ <SummaryListActions>
64
+ <SummaryListActionLink href='#'>
65
+ Change <VisuallyHiddenText>contact details</VisuallyHiddenText>
66
+ </SummaryListActionLink>
67
+ </SummaryListActions>
68
+ ),
69
+ },
70
+ ]}
71
+ />
72
+ )
@@ -0,0 +1,29 @@
1
+ import {
2
+ SummaryList,
3
+ SummaryListActionLink,
4
+ SummaryListActions,
5
+ SummaryListKey,
6
+ SummaryListValue,
7
+ VisuallyHiddenText,
8
+ } from '@moduk/frontend/react'
9
+
10
+ export const Example = () => (
11
+ <SummaryList
12
+ rows={[
13
+ {
14
+ key: <SummaryListKey>Name</SummaryListKey>,
15
+ value: <SummaryListValue>Sarah Philips</SummaryListValue>,
16
+ actions: (
17
+ <SummaryListActions>
18
+ <SummaryListActionLink href='#'>
19
+ Change <VisuallyHiddenText>name</VisuallyHiddenText>
20
+ </SummaryListActionLink>
21
+ <SummaryListActionLink href='#'>
22
+ Remove <VisuallyHiddenText>name</VisuallyHiddenText>
23
+ </SummaryListActionLink>
24
+ </SummaryListActions>
25
+ ),
26
+ },
27
+ ]}
28
+ />
29
+ )
@@ -0,0 +1,37 @@
1
+ import { SummaryList, SummaryListKey, SummaryListValue } from '@moduk/frontend/react'
2
+
3
+ export const Example = () => (
4
+ <SummaryList
5
+ rows={[
6
+ {
7
+ key: <SummaryListKey>Name</SummaryListKey>,
8
+ value: <SummaryListValue>Sarah Philips</SummaryListValue>,
9
+ },
10
+ {
11
+ key: <SummaryListKey>Date of birth</SummaryListKey>,
12
+ value: <SummaryListValue>5 January 1978</SummaryListValue>,
13
+ },
14
+ {
15
+ key: <SummaryListKey>Address</SummaryListKey>,
16
+ value: (
17
+ <SummaryListValue>
18
+ 72 Guild Street
19
+ <br />
20
+ London
21
+ <br />
22
+ SE23 6FH
23
+ </SummaryListValue>
24
+ ),
25
+ },
26
+ {
27
+ key: <SummaryListKey>Contact details</SummaryListKey>,
28
+ value: (
29
+ <SummaryListValue>
30
+ <p className='govuk-body'>07700 900457</p>
31
+ <p className='govuk-body'>sarah.phillips@example.com</p>
32
+ </SummaryListValue>
33
+ ),
34
+ },
35
+ ]}
36
+ />
37
+ )