@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.
- package/dist/nunjucks/moduk/components/footer/__examples__/with-customisation.njk +28 -0
- package/dist/nunjucks/moduk/components/phase-banner/__examples__/default.njk +0 -4
- package/dist/nunjucks/moduk/components/summary-list/__examples__/cards-with-single-action.njk +36 -0
- package/dist/nunjucks/moduk/components/summary-list/__examples__/with-multiple-actions.njk +28 -0
- package/nunjucks/moduk/components/footer/__examples__/with-customisation.njk +28 -0
- package/nunjucks/moduk/components/phase-banner/__examples__/default.njk +0 -4
- package/nunjucks/moduk/components/summary-list/__examples__/cards-with-single-action.njk +36 -0
- package/nunjucks/moduk/components/summary-list/__examples__/with-multiple-actions.njk +28 -0
- package/package.json +8 -7
- package/react/VisuallyHiddenText/VisuallyHiddenText.d.ts +10 -0
- package/react/VisuallyHiddenText/VisuallyHiddenText.d.ts.map +1 -0
- package/react/VisuallyHiddenText/index.d.ts +2 -0
- package/react/VisuallyHiddenText/index.d.ts.map +1 -0
- package/react/accordion/Accordion.d.ts +3 -4
- package/react/accordion/Accordion.d.ts.map +1 -1
- package/react/back-link/BackLink.d.ts +2 -3
- package/react/back-link/BackLink.d.ts.map +1 -1
- package/react/error-message/ErrorMessage.d.ts +13 -0
- package/react/error-message/ErrorMessage.d.ts.map +1 -0
- package/react/error-message/index.d.ts +2 -0
- package/react/error-message/index.d.ts.map +1 -0
- package/react/esm/VisuallyHiddenText/VisuallyHiddenText.js +10 -0
- package/react/esm/VisuallyHiddenText/index.js +1 -0
- package/react/esm/accordion/Accordion.js +8 -5
- package/react/esm/error-message/ErrorMessage.js +33 -0
- package/react/esm/error-message/index.js +1 -0
- package/react/esm/footer/Footer.js +84 -0
- package/react/esm/footer/FooterMeta.js +21 -0
- package/react/esm/footer/FooterMetaLink.js +32 -0
- package/react/esm/footer/FooterNavigation.js +14 -0
- package/react/esm/footer/FooterNavigationLink.js +28 -0
- package/react/esm/footer/FooterNavigationSection.js +20 -0
- package/react/esm/footer/index.js +6 -0
- package/react/esm/hint/Hint.js +28 -0
- package/react/esm/hint/index.js +1 -0
- package/react/esm/index.js +10 -1
- package/react/esm/input/Input.js +60 -0
- package/react/esm/input/InputPrefix.js +14 -0
- package/react/esm/input/InputSuffix.js +14 -0
- package/react/esm/input/index.js +3 -0
- package/react/esm/internal/FormGroup/FormGroup.js +21 -0
- package/react/esm/internal/FormGroup/FormGroupContext.js +4 -0
- package/react/esm/internal/FormGroup/index.js +2 -0
- package/react/esm/internal/PermissiveChild.js +1 -0
- package/react/esm/label/Label.js +38 -0
- package/react/esm/label/index.js +1 -0
- package/react/esm/phase-banner/PhaseBanner.js +32 -0
- package/react/esm/phase-banner/PhaseTag.js +24 -0
- package/react/esm/phase-banner/index.js +2 -0
- package/react/esm/summary-list/SummaryCardActions.js +24 -0
- package/react/esm/summary-list/SummaryCardTitle.js +12 -0
- package/react/esm/summary-list/SummaryList.js +76 -0
- package/react/esm/summary-list/SummaryListActionLink.js +25 -0
- package/react/esm/summary-list/SummaryListActions.js +22 -0
- package/react/esm/summary-list/SummaryListKey.js +10 -0
- package/react/esm/summary-list/SummaryListValue.js +10 -0
- package/react/esm/summary-list/index.js +7 -0
- package/react/esm/tag/Tag.js +27 -0
- package/react/esm/tag/index.js +1 -0
- package/react/footer/Footer.d.ts +44 -0
- package/react/footer/Footer.d.ts.map +1 -0
- package/react/footer/FooterMeta.d.ts +24 -0
- package/react/footer/FooterMeta.d.ts.map +1 -0
- package/react/footer/FooterMetaLink.d.ts +14 -0
- package/react/footer/FooterMetaLink.d.ts.map +1 -0
- package/react/footer/FooterNavigation.d.ts +15 -0
- package/react/footer/FooterNavigation.d.ts.map +1 -0
- package/react/footer/FooterNavigationLink.d.ts +14 -0
- package/react/footer/FooterNavigationLink.d.ts.map +1 -0
- package/react/footer/FooterNavigationSection.d.ts +30 -0
- package/react/footer/FooterNavigationSection.d.ts.map +1 -0
- package/react/footer/index.d.ts +7 -0
- package/react/footer/index.d.ts.map +1 -0
- package/react/hint/Hint.d.ts +11 -0
- package/react/hint/Hint.d.ts.map +1 -0
- package/react/hint/index.d.ts +2 -0
- package/react/hint/index.d.ts.map +1 -0
- package/react/index.d.ts +9 -0
- package/react/index.d.ts.map +1 -1
- package/react/index.js +1 -1
- package/react/index.js.map +1 -1
- package/react/input/Input.d.ts +50 -0
- package/react/input/Input.d.ts.map +1 -0
- package/react/input/InputPrefix.d.ts +9 -0
- package/react/input/InputPrefix.d.ts.map +1 -0
- package/react/input/InputSuffix.d.ts +9 -0
- package/react/input/InputSuffix.d.ts.map +1 -0
- package/react/input/index.d.ts +4 -0
- package/react/input/index.d.ts.map +1 -0
- package/react/internal/FormGroup/FormGroup.d.ts +9 -0
- package/react/internal/FormGroup/FormGroup.d.ts.map +1 -0
- package/react/internal/FormGroup/FormGroupContext.d.ts +5 -0
- package/react/internal/FormGroup/FormGroupContext.d.ts.map +1 -0
- package/react/internal/FormGroup/index.d.ts +3 -0
- package/react/internal/FormGroup/index.d.ts.map +1 -0
- package/react/internal/PermissiveChild.d.ts +3 -0
- package/react/internal/PermissiveChild.d.ts.map +1 -0
- package/react/label/Label.d.ts +15 -0
- package/react/label/Label.d.ts.map +1 -0
- package/react/label/index.d.ts +2 -0
- package/react/label/index.d.ts.map +1 -0
- package/react/phase-banner/PhaseBanner.d.ts +27 -0
- package/react/phase-banner/PhaseBanner.d.ts.map +1 -0
- package/react/phase-banner/PhaseTag.d.ts +10 -0
- package/react/phase-banner/PhaseTag.d.ts.map +1 -0
- package/react/phase-banner/index.d.ts +3 -0
- package/react/phase-banner/index.d.ts.map +1 -0
- package/react/summary-list/SummaryCardActions.d.ts +16 -0
- package/react/summary-list/SummaryCardActions.d.ts.map +1 -0
- package/react/summary-list/SummaryCardTitle.d.ts +22 -0
- package/react/summary-list/SummaryCardTitle.d.ts.map +1 -0
- package/react/summary-list/SummaryList.d.ts +89 -0
- package/react/summary-list/SummaryList.d.ts.map +1 -0
- package/react/summary-list/SummaryListActionLink.d.ts +11 -0
- package/react/summary-list/SummaryListActionLink.d.ts.map +1 -0
- package/react/summary-list/SummaryListActions.d.ts +16 -0
- package/react/summary-list/SummaryListActions.d.ts.map +1 -0
- package/react/summary-list/SummaryListKey.d.ts +12 -0
- package/react/summary-list/SummaryListKey.d.ts.map +1 -0
- package/react/summary-list/SummaryListValue.d.ts +12 -0
- package/react/summary-list/SummaryListValue.d.ts.map +1 -0
- package/react/summary-list/index.d.ts +8 -0
- package/react/summary-list/index.d.ts.map +1 -0
- package/react/tag/Tag.d.ts +17 -0
- package/react/tag/Tag.d.ts.map +1 -0
- package/react/tag/index.d.ts +2 -0
- package/react/tag/index.d.ts.map +1 -0
- package/src/react/error-message/__examples__/default.tsx +3 -0
- package/src/react/footer/__examples__/default.tsx +3 -0
- package/src/react/footer/__examples__/with-customisation.tsx +15 -0
- package/src/react/footer/__examples__/with-links.tsx +13 -0
- package/src/react/footer/__examples__/with-secondary-navigation-and-links.tsx +44 -0
- package/src/react/footer/__examples__/with-secondary-navigation.tsx +24 -0
- package/src/react/input/__examples__/default.tsx +12 -0
- package/src/react/input/__examples__/not-as-page-heading.tsx +8 -0
- package/src/react/input/__examples__/with-error.tsx +14 -0
- package/src/react/input/__examples__/with-fixed-width.tsx +36 -0
- package/src/react/input/__examples__/with-fluid-width.tsx +36 -0
- package/src/react/input/__examples__/with-hint.tsx +13 -0
- package/src/react/input/__examples__/with-numeric.tsx +16 -0
- package/src/react/input/__examples__/with-prefix-and-suffix-error.tsx +17 -0
- package/src/react/input/__examples__/with-prefix-and-suffix.tsx +16 -0
- package/src/react/input/__examples__/with-prefix.tsx +15 -0
- package/src/react/input/__examples__/with-suffix.tsx +15 -0
- package/src/react/phase-banner/__examples__/beta.tsx +7 -0
- package/src/react/phase-banner/__examples__/default.tsx +7 -0
- package/src/react/phase-banner/__examples__/with-tag-override.tsx +7 -0
- package/src/react/phase-banner/__examples__/with-text.tsx +7 -0
- package/src/react/summary-list/__examples__/cards-with-action.tsx +88 -0
- package/src/react/summary-list/__examples__/cards-with-single-action.tsx +46 -0
- package/src/react/summary-list/__examples__/cards.tsx +156 -0
- package/src/react/summary-list/__examples__/default.tsx +72 -0
- package/src/react/summary-list/__examples__/with-multiple-actions.tsx +29 -0
- package/src/react/summary-list/__examples__/with-no-actions.tsx +37 -0
- package/src/react/summary-list/__examples__/with-no-border.tsx +38 -0
- package/src/react/tag/__examples__/blue.tsx +3 -0
- package/src/react/tag/__examples__/default.tsx +3 -0
- package/src/react/tag/__examples__/green.tsx +3 -0
- package/src/react/tag/__examples__/grey.tsx +3 -0
- package/src/react/tag/__examples__/orange.tsx +3 -0
- package/src/react/tag/__examples__/pink.tsx +3 -0
- package/src/react/tag/__examples__/purple.tsx +3 -0
- package/src/react/tag/__examples__/red.tsx +3 -0
- package/src/react/tag/__examples__/turquoise.tsx +3 -0
- package/src/react/tag/__examples__/yellow.tsx +3 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{% from "moduk/components/footer/macro.njk" import modukFooter -%}
|
|
2
|
+
|
|
3
|
+
{{ modukFooter({
|
|
4
|
+
copyright: {
|
|
5
|
+
text: "Copyright text"
|
|
6
|
+
},
|
|
7
|
+
contentLicence: {
|
|
8
|
+
text: "Content licence text"
|
|
9
|
+
},
|
|
10
|
+
meta: {
|
|
11
|
+
text: "Meta content",
|
|
12
|
+
visuallyHiddenTitle: "Visually hidden title",
|
|
13
|
+
items: [
|
|
14
|
+
{
|
|
15
|
+
href: "#1",
|
|
16
|
+
text: "Item 1"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
href: "#2",
|
|
20
|
+
text: "Item 2"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
href: "#3",
|
|
24
|
+
text: "Item 3"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}) -}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{% from "moduk/components/summary-list/macro.njk" import modukSummaryList -%}
|
|
2
|
+
|
|
3
|
+
{{ modukSummaryList({
|
|
4
|
+
card: {
|
|
5
|
+
title: {
|
|
6
|
+
text: "University of Gloucestershire"
|
|
7
|
+
},
|
|
8
|
+
actions: {
|
|
9
|
+
items: [
|
|
10
|
+
{
|
|
11
|
+
href: "#",
|
|
12
|
+
text: "Withdraw",
|
|
13
|
+
visuallyHiddenText: "from University of Gloucestershire"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
rows: [
|
|
19
|
+
{
|
|
20
|
+
key: {
|
|
21
|
+
text: "Course"
|
|
22
|
+
},
|
|
23
|
+
value: {
|
|
24
|
+
html: "English (3DMD)<br>PGCE with QTS full time"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: {
|
|
29
|
+
text: "Location"
|
|
30
|
+
},
|
|
31
|
+
value: {
|
|
32
|
+
html: "School name<br>Road, City, SW1 1AA"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}) -}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{% from "moduk/components/summary-list/macro.njk" import modukSummaryList -%}
|
|
2
|
+
|
|
3
|
+
{{ modukSummaryList({
|
|
4
|
+
rows: [
|
|
5
|
+
{
|
|
6
|
+
key: {
|
|
7
|
+
text: "Name"
|
|
8
|
+
},
|
|
9
|
+
value: {
|
|
10
|
+
text: "Sarah Philips"
|
|
11
|
+
},
|
|
12
|
+
actions: {
|
|
13
|
+
items: [
|
|
14
|
+
{
|
|
15
|
+
href: "#",
|
|
16
|
+
text: "Change",
|
|
17
|
+
visuallyHiddenText: "name"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
href: "#",
|
|
21
|
+
text: "Remove",
|
|
22
|
+
visuallyHiddenText: "name"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}) -}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{% from "moduk/components/footer/macro.njk" import modukFooter -%}
|
|
2
|
+
|
|
3
|
+
{{ modukFooter({
|
|
4
|
+
copyright: {
|
|
5
|
+
text: "Copyright text"
|
|
6
|
+
},
|
|
7
|
+
contentLicence: {
|
|
8
|
+
text: "Content licence text"
|
|
9
|
+
},
|
|
10
|
+
meta: {
|
|
11
|
+
text: "Meta content",
|
|
12
|
+
visuallyHiddenTitle: "Visually hidden title",
|
|
13
|
+
items: [
|
|
14
|
+
{
|
|
15
|
+
href: "#1",
|
|
16
|
+
text: "Item 1"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
href: "#2",
|
|
20
|
+
text: "Item 2"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
href: "#3",
|
|
24
|
+
text: "Item 3"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}) -}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{% from "moduk/components/summary-list/macro.njk" import modukSummaryList -%}
|
|
2
|
+
|
|
3
|
+
{{ modukSummaryList({
|
|
4
|
+
card: {
|
|
5
|
+
title: {
|
|
6
|
+
text: "University of Gloucestershire"
|
|
7
|
+
},
|
|
8
|
+
actions: {
|
|
9
|
+
items: [
|
|
10
|
+
{
|
|
11
|
+
href: "#",
|
|
12
|
+
text: "Withdraw",
|
|
13
|
+
visuallyHiddenText: "from University of Gloucestershire"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
rows: [
|
|
19
|
+
{
|
|
20
|
+
key: {
|
|
21
|
+
text: "Course"
|
|
22
|
+
},
|
|
23
|
+
value: {
|
|
24
|
+
html: "English (3DMD)<br>PGCE with QTS full time"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: {
|
|
29
|
+
text: "Location"
|
|
30
|
+
},
|
|
31
|
+
value: {
|
|
32
|
+
html: "School name<br>Road, City, SW1 1AA"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}) -}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{% from "moduk/components/summary-list/macro.njk" import modukSummaryList -%}
|
|
2
|
+
|
|
3
|
+
{{ modukSummaryList({
|
|
4
|
+
rows: [
|
|
5
|
+
{
|
|
6
|
+
key: {
|
|
7
|
+
text: "Name"
|
|
8
|
+
},
|
|
9
|
+
value: {
|
|
10
|
+
text: "Sarah Philips"
|
|
11
|
+
},
|
|
12
|
+
actions: {
|
|
13
|
+
items: [
|
|
14
|
+
{
|
|
15
|
+
href: "#",
|
|
16
|
+
text: "Change",
|
|
17
|
+
visuallyHiddenText: "name"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
href: "#",
|
|
21
|
+
text: "Remove",
|
|
22
|
+
visuallyHiddenText: "name"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}) -}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moduk/frontend",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "The MOD.UK Frontend contains the code you need to start building a user interface for Ministry of Defence platforms and services.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"sass": "src/css/index.scss",
|
|
@@ -107,17 +107,18 @@
|
|
|
107
107
|
"@commitlint/cli": "^17.7.1",
|
|
108
108
|
"@commitlint/config-conventional": "^17.7.0",
|
|
109
109
|
"@playwright/test": "^1.37.0",
|
|
110
|
-
"@release-it/conventional-changelog": "^
|
|
110
|
+
"@release-it/conventional-changelog": "^7.0.0",
|
|
111
111
|
"@testing-library/dom": "^9.3.1",
|
|
112
|
-
"@testing-library/jest-dom": "^6.0.
|
|
112
|
+
"@testing-library/jest-dom": "^6.0.1",
|
|
113
113
|
"@testing-library/react": "^14.0.0",
|
|
114
|
+
"@testing-library/user-event": "^14.4.3",
|
|
114
115
|
"@types/lodash": "^4.14.195",
|
|
115
116
|
"@types/node": "^18.16.19",
|
|
116
117
|
"@types/nunjucks": "^3.2.3",
|
|
117
118
|
"@types/react": "^18.2.7",
|
|
118
119
|
"@types/react-dom": "^18.2.7",
|
|
119
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
120
|
-
"@typescript-eslint/parser": "^6.
|
|
120
|
+
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
121
|
+
"@typescript-eslint/parser": "^6.4.0",
|
|
121
122
|
"babel-loader": "^9.1.3",
|
|
122
123
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
123
124
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
@@ -139,7 +140,7 @@
|
|
|
139
140
|
"postcss-fail-on-warn": "^0.2.1",
|
|
140
141
|
"postcss-preset-env": "^8.4.1",
|
|
141
142
|
"react-merge-refs": "^2.0.2",
|
|
142
|
-
"release-it": "^
|
|
143
|
+
"release-it": "^16.1.5",
|
|
143
144
|
"sass": "^1.63.4",
|
|
144
145
|
"sass-true": "^7.0.0",
|
|
145
146
|
"shelljs": "^0.8.5",
|
|
@@ -148,7 +149,7 @@
|
|
|
148
149
|
"tsconfig-paths": "^4.2.0",
|
|
149
150
|
"typescript": "^5.0.4",
|
|
150
151
|
"vitest": "^0.34.1",
|
|
151
|
-
"webpack": "^5.88.
|
|
152
|
+
"webpack": "^5.88.2",
|
|
152
153
|
"webpack-cli": "^5.1.4"
|
|
153
154
|
},
|
|
154
155
|
"lint-staged": {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type VisuallyHiddenTextProps = ComponentPropsWithoutRef<'span'>;
|
|
3
|
+
/**
|
|
4
|
+
* A <span> containing visually hidden text
|
|
5
|
+
*
|
|
6
|
+
* @experimental React components are in alpha and subject to change.
|
|
7
|
+
*/
|
|
8
|
+
export declare const VisuallyHiddenText: ({ children, className }: VisuallyHiddenTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=VisuallyHiddenText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisuallyHiddenText.d.ts","sourceRoot":"","sources":["../../../src/react/VisuallyHiddenText/VisuallyHiddenText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAA;AAErD,KAAK,uBAAuB,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,4BAA6B,uBAAuB,4CAElF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/VisuallyHiddenText/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { type PermissiveChild } from '../internal/PermissiveChild';
|
|
2
3
|
import type { AccordionHeadingTag } from './AccordionHeadingTag';
|
|
3
4
|
import type { AccordionItemProps } from './AccordionItem';
|
|
4
|
-
type AccordionChild = ReactElement<AccordionItemProps> | boolean | null | Iterable<AccordionChild>;
|
|
5
5
|
export interface AccordionProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
|
-
children:
|
|
6
|
+
children: PermissiveChild<AccordionItemProps>;
|
|
7
7
|
headingTag?: AccordionHeadingTag;
|
|
8
8
|
hideAllSectionsText?: string;
|
|
9
9
|
hideSectionText?: string;
|
|
@@ -18,5 +18,4 @@ export interface AccordionProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
18
18
|
* @experimental React components are in alpha and subject to change.
|
|
19
19
|
*/
|
|
20
20
|
export declare const Accordion: import("react").ForwardRefExoticComponent<AccordionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export {};
|
|
22
21
|
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/react/accordion/Accordion.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/react/accordion/Accordion.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAA;AAOrD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAElE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAGzD,MAAM,WAAW,cAAe,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACrE,QAAQ,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAA;IAC7C,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAoBD;;GAEG;AACH,eAAO,MAAM,SAAS,2GA2DrB,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { ReactElement } from 'react';
|
|
2
1
|
import { type LinkComponent } from '../internal/Link/Link';
|
|
3
|
-
type
|
|
2
|
+
import type { PermissiveChild } from '../internal/PermissiveChild';
|
|
4
3
|
interface BackLinkProps {
|
|
5
|
-
children:
|
|
4
|
+
children: PermissiveChild;
|
|
6
5
|
className?: string;
|
|
7
6
|
}
|
|
8
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackLink.d.ts","sourceRoot":"","sources":["../../../src/react/back-link/BackLink.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BackLink.d.ts","sourceRoot":"","sources":["../../../src/react/back-link/BackLink.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAElE,UAAU,aAAa;IACrB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,aAAa,CAAC,aAAa,CAGgE,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
export interface ErrorMessageProps extends ComponentPropsWithoutRef<'p'> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* A visually hidden prefix used before the error message.
|
|
6
|
+
*/
|
|
7
|
+
visuallyHiddenText?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @experimental React components are in alpha and subject to change.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ErrorMessage: import("react").ForwardRefExoticComponent<ErrorMessageProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
13
|
+
//# sourceMappingURL=ErrorMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorMessage.d.ts","sourceRoot":"","sources":["../../../src/react/error-message/ErrorMessage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAc,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AAG7F,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB,CAAC,GAAG,CAAC;IACtE,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,oHAgBxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/error-message/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export var VisuallyHiddenText = function VisuallyHiddenText(_ref) {
|
|
4
|
+
var children = _ref.children,
|
|
5
|
+
className = _ref.className;
|
|
6
|
+
return _jsx("span", {
|
|
7
|
+
className: clsx('govuk-visually-hidden', className),
|
|
8
|
+
children: children
|
|
9
|
+
});
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VisuallyHiddenText';
|
|
@@ -11,7 +11,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import clsx from 'clsx';
|
|
13
13
|
import { isEqual, pick } from 'lodash';
|
|
14
|
-
import { Children, forwardRef, isValidElement, useRef } from 'react';
|
|
14
|
+
import { Children, forwardRef, isValidElement, useMemo, useRef } from 'react';
|
|
15
15
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
16
16
|
import { mergeRefs } from 'react-merge-refs';
|
|
17
17
|
import { useMODUKComponent } from '../internal/hooks/useMODUKComponent';
|
|
@@ -48,6 +48,12 @@ export var Accordion = forwardRef(function (props, forwardedRef) {
|
|
|
48
48
|
showSectionText = props.showSectionText,
|
|
49
49
|
showSectionAriaLabelText = props.showSectionAriaLabelText,
|
|
50
50
|
rest = _objectWithoutProperties(props, _excluded);
|
|
51
|
+
var contextValue = useMemo(function () {
|
|
52
|
+
return {
|
|
53
|
+
headingTag: headingTag,
|
|
54
|
+
id: id
|
|
55
|
+
};
|
|
56
|
+
}, [headingTag, id]);
|
|
51
57
|
var i18nAttributes = {
|
|
52
58
|
'data-i18n.hide-all-sections': hideAllSectionsText,
|
|
53
59
|
'data-i18n.hide-section': hideSectionText,
|
|
@@ -57,10 +63,7 @@ export var Accordion = forwardRef(function (props, forwardedRef) {
|
|
|
57
63
|
'data-i18n.show-section-aria-label': showSectionAriaLabelText
|
|
58
64
|
};
|
|
59
65
|
return _jsx(AccordionContext.Provider, {
|
|
60
|
-
value:
|
|
61
|
-
headingTag: headingTag,
|
|
62
|
-
id: id
|
|
63
|
-
},
|
|
66
|
+
value: contextValue,
|
|
64
67
|
children: _jsx("div", _objectSpread(_objectSpread(_objectSpread({
|
|
65
68
|
ref: mergeRefs([ref, forwardedRef])
|
|
66
69
|
}, rest), {}, {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["children", "className", "id", "visuallyHiddenText"];
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import clsx from 'clsx';
|
|
11
|
+
import { forwardRef, useContext } from 'react';
|
|
12
|
+
import { FormGroupContext } from '../internal/FormGroup';
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
export var ErrorMessage = forwardRef(function (_ref, ref) {
|
|
15
|
+
var children = _ref.children,
|
|
16
|
+
className = _ref.className,
|
|
17
|
+
id = _ref.id,
|
|
18
|
+
_ref$visuallyHiddenTe = _ref.visuallyHiddenText,
|
|
19
|
+
visuallyHiddenText = _ref$visuallyHiddenTe === void 0 ? 'Error' : _ref$visuallyHiddenTe,
|
|
20
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
var context = useContext(FormGroupContext);
|
|
22
|
+
return _jsxs("p", _objectSpread(_objectSpread({
|
|
23
|
+
ref: ref,
|
|
24
|
+
className: clsx('govuk-error-message', className)
|
|
25
|
+
}, rest), {}, {
|
|
26
|
+
id: context.id ? "".concat(context.id, "-error") : id,
|
|
27
|
+
children: [visuallyHiddenText && _jsxs("span", {
|
|
28
|
+
className: "govuk-visually-hidden",
|
|
29
|
+
children: [visuallyHiddenText, ":"]
|
|
30
|
+
}), children]
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
ErrorMessage.displayName = 'ErrorMessage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ErrorMessage';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["className", "containerClassName", "contentLicence", "copyright", "meta", "navigation"];
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import clsx from 'clsx';
|
|
11
|
+
import { forwardRef } from 'react';
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
function OpenGovernmentLicenceContent() {
|
|
16
|
+
return _jsxs(_Fragment, {
|
|
17
|
+
children: ['All content is available under the ', _jsx("a", {
|
|
18
|
+
className: "govuk-footer__link",
|
|
19
|
+
href: "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/",
|
|
20
|
+
rel: "license",
|
|
21
|
+
children: "Open Government Licence v3.0"
|
|
22
|
+
}), ", except where otherwise stated"]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function FooterMetaWrapper(_ref) {
|
|
26
|
+
var children = _ref.children,
|
|
27
|
+
contentLicence = _ref.contentLicence,
|
|
28
|
+
copyright = _ref.copyright;
|
|
29
|
+
return _jsxs("div", {
|
|
30
|
+
className: "govuk-footer__meta",
|
|
31
|
+
children: [_jsxs("div", {
|
|
32
|
+
className: "govuk-footer__meta-item govuk-footer__meta-item--grow",
|
|
33
|
+
children: [children, _jsx("svg", {
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
focusable: "false",
|
|
36
|
+
className: "govuk-footer__licence-logo",
|
|
37
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
38
|
+
viewBox: "0 0 483.2 195.7",
|
|
39
|
+
height: "17",
|
|
40
|
+
width: "41",
|
|
41
|
+
children: _jsx("path", {
|
|
42
|
+
fill: "currentColor",
|
|
43
|
+
d: "M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"
|
|
44
|
+
})
|
|
45
|
+
}), ' ', _jsx("span", {
|
|
46
|
+
className: "govuk-footer__licence-description",
|
|
47
|
+
children: contentLicence
|
|
48
|
+
})]
|
|
49
|
+
}), _jsx("div", {
|
|
50
|
+
className: "govuk-footer__meta-item",
|
|
51
|
+
children: _jsx("a", {
|
|
52
|
+
className: "govuk-footer__link govuk-footer__copyright-logo",
|
|
53
|
+
href: "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/",
|
|
54
|
+
children: copyright
|
|
55
|
+
})
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export var Footer = forwardRef(function (_ref2, ref) {
|
|
60
|
+
var className = _ref2.className,
|
|
61
|
+
containerClassName = _ref2.containerClassName,
|
|
62
|
+
_ref2$contentLicence = _ref2.contentLicence,
|
|
63
|
+
contentLicence = _ref2$contentLicence === void 0 ? OpenGovernmentLicenceContent() : _ref2$contentLicence,
|
|
64
|
+
_ref2$copyright = _ref2.copyright,
|
|
65
|
+
copyright = _ref2$copyright === void 0 ? '© Crown copyright' : _ref2$copyright,
|
|
66
|
+
meta = _ref2.meta,
|
|
67
|
+
navigation = _ref2.navigation,
|
|
68
|
+
rootProps = _objectWithoutProperties(_ref2, _excluded);
|
|
69
|
+
return _jsx("footer", _objectSpread(_objectSpread({
|
|
70
|
+
ref: ref,
|
|
71
|
+
className: clsx('govuk-footer', className),
|
|
72
|
+
role: "contentinfo"
|
|
73
|
+
}, rootProps), {}, {
|
|
74
|
+
children: _jsxs("div", {
|
|
75
|
+
className: clsx('govuk-width-container', containerClassName),
|
|
76
|
+
children: [navigation, _jsx(FooterMetaWrapper, {
|
|
77
|
+
contentLicence: contentLicence,
|
|
78
|
+
copyright: copyright,
|
|
79
|
+
children: meta
|
|
80
|
+
})]
|
|
81
|
+
})
|
|
82
|
+
}));
|
|
83
|
+
});
|
|
84
|
+
Footer.displayName = 'Footer';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
export function FooterMeta(_ref) {
|
|
5
|
+
var children = _ref.children,
|
|
6
|
+
content = _ref.content,
|
|
7
|
+
_ref$visuallyHiddenTi = _ref.visuallyHiddenTitle,
|
|
8
|
+
visuallyHiddenTitle = _ref$visuallyHiddenTi === void 0 ? 'Support links' : _ref$visuallyHiddenTi;
|
|
9
|
+
return _jsxs(_Fragment, {
|
|
10
|
+
children: [_jsx("h2", {
|
|
11
|
+
className: "govuk-visually-hidden",
|
|
12
|
+
children: visuallyHiddenTitle
|
|
13
|
+
}), children && _jsx("ul", {
|
|
14
|
+
className: "govuk-footer__inline-list",
|
|
15
|
+
children: children
|
|
16
|
+
}), content && _jsx("div", {
|
|
17
|
+
className: "govuk-footer__meta-custom",
|
|
18
|
+
children: content
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["children", "className"];
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import clsx from 'clsx';
|
|
11
|
+
import { forwardRef } from 'react';
|
|
12
|
+
import { LinkBase } from '../internal/Link/Link';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
export var FooterMetaLink = forwardRef(function (_ref, forwardedRef) {
|
|
17
|
+
var children = _ref.children,
|
|
18
|
+
className = _ref.className,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return _jsxs(_Fragment, {
|
|
21
|
+
children: [_jsx("li", {
|
|
22
|
+
className: "govuk-footer__inline-list-item",
|
|
23
|
+
children: _jsx(LinkBase, _objectSpread(_objectSpread({
|
|
24
|
+
ref: forwardedRef,
|
|
25
|
+
className: clsx('govuk-footer__link', className)
|
|
26
|
+
}, props), {}, {
|
|
27
|
+
children: children
|
|
28
|
+
}))
|
|
29
|
+
}), ' ']
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
FooterMetaLink.displayName = 'FooterLink';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
export function FooterNavigation(_ref) {
|
|
5
|
+
var children = _ref.children;
|
|
6
|
+
return _jsxs(_Fragment, {
|
|
7
|
+
children: [_jsx("div", {
|
|
8
|
+
className: "govuk-footer__navigation",
|
|
9
|
+
children: children
|
|
10
|
+
}), _jsx("hr", {
|
|
11
|
+
className: "govuk-footer__section-break"
|
|
12
|
+
})]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["children", "className"];
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import clsx from 'clsx';
|
|
11
|
+
import { forwardRef } from 'react';
|
|
12
|
+
import { LinkBase } from '../internal/Link/Link';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
export var FooterNavigationLink = forwardRef(function (_ref, forwardedRef) {
|
|
15
|
+
var children = _ref.children,
|
|
16
|
+
className = _ref.className,
|
|
17
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
return _jsx("li", {
|
|
19
|
+
className: "govuk-footer__list-item",
|
|
20
|
+
children: _jsx(LinkBase, _objectSpread(_objectSpread({
|
|
21
|
+
ref: forwardedRef,
|
|
22
|
+
className: clsx('govuk-footer__link', className)
|
|
23
|
+
}, props), {}, {
|
|
24
|
+
children: children
|
|
25
|
+
}))
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
FooterNavigationLink.displayName = 'FooterNavigationLink';
|