-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
719 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,11 +55,11 @@ | |
} | ||
|
||
&--xs { | ||
height: 6rem; | ||
height: 7rem; | ||
} | ||
|
||
&--s { | ||
height: 10rem; | ||
height: 11rem; | ||
} | ||
|
||
&--m { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Checkboxes | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "nationalarchives/components/checkboxes/macro.njk" import tnaCheckboxes %} | ||
|
||
{{ tnaCheckboxes({ | ||
label: "Categories", | ||
headingLevel: 4, | ||
headingSize: "m", | ||
id: "categories", | ||
name: "categories", | ||
items: [ | ||
{ | ||
text: "Alpha", | ||
value: "alpha" | ||
}, | ||
{ | ||
text: "Beta", | ||
value: "beta" | ||
}, | ||
{ | ||
text: "Gamma", | ||
value: "gamma" | ||
} | ||
] | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: Checkboxes with an error | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "nationalarchives/components/checkboxes/macro.njk" import tnaCheckboxes %} | ||
|
||
{{ tnaCheckboxes({ | ||
label: "Categories", | ||
headingLevel: 4, | ||
headingSize: "m", | ||
id: "categories", | ||
name: "categories", | ||
error: { | ||
text: "You must select a category" | ||
}, | ||
items: [ | ||
{ | ||
text: "Alpha", | ||
value: "alpha" | ||
}, | ||
{ | ||
text: "Beta", | ||
value: "beta" | ||
}, | ||
{ | ||
text: "Gamma", | ||
value: "gamma" | ||
} | ||
] | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Checkboxes with a hint | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "nationalarchives/components/checkboxes/macro.njk" import tnaCheckboxes %} | ||
|
||
{{ tnaCheckboxes({ | ||
label: "Categories", | ||
headingLevel: 4, | ||
headingSize: "m", | ||
id: "categories", | ||
name: "categories", | ||
hint: "Select all that apply.", | ||
items: [ | ||
{ | ||
text: "Alpha", | ||
value: "alpha" | ||
}, | ||
{ | ||
text: "Beta", | ||
value: "beta" | ||
}, | ||
{ | ||
text: "Gamma", | ||
value: "gamma" | ||
} | ||
] | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
layout: collection-page.njk | ||
title: Checkboxes | ||
group: components | ||
--- | ||
|
||
The checkboxes component is for... | ||
|
||
{% from "_example.njk" import example %} | ||
|
||
{{ example({ group: "components", item: "checkboxes", example: "default", html: true, nunjucks: true, open: false, size: "s" }) }} | ||
|
||
## Small | ||
|
||
{{ example({ group: "components", item: "checkboxes", example: "small", html: true, nunjucks: false, open: false, size: "l" }) }} | ||
|
||
## Preselected | ||
|
||
{{ example({ group: "components", item: "checkboxes", example: "preselected", html: true, nunjucks: false, open: false, size: "s" }) }} | ||
|
||
## Hint | ||
|
||
{{ example({ group: "components", item: "checkboxes", example: "hint", html: true, nunjucks: false, open: false }) }} | ||
|
||
## Error | ||
|
||
{{ example({ group: "components", item: "checkboxes", example: "error", html: true, nunjucks: false, open: false }) }} | ||
|
||
## Inline | ||
|
||
{{ example({ group: "components", item: "checkboxes", example: "inline", html: true, nunjucks: false, open: false, size: "xxs" }) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Checkboxes - inline | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "nationalarchives/components/checkboxes/macro.njk" import tnaCheckboxes %} | ||
|
||
{{ tnaCheckboxes({ | ||
label: "Categories", | ||
headingLevel: 4, | ||
headingSize: "m", | ||
id: "categories", | ||
name: "categories", | ||
items: [ | ||
{ | ||
text: "Alpha", | ||
value: "alpha" | ||
}, | ||
{ | ||
text: "Beta", | ||
value: "beta" | ||
}, | ||
{ | ||
text: "Gamma", | ||
value: "gamma" | ||
} | ||
], | ||
inline: true | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Checkboxes with a preselected value | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "nationalarchives/components/checkboxes/macro.njk" import tnaCheckboxes %} | ||
|
||
{{ tnaCheckboxes({ | ||
label: "Categories", | ||
headingLevel: 4, | ||
headingSize: "m", | ||
id: "categories", | ||
name: "categories", | ||
items: [ | ||
{ | ||
text: "Alpha", | ||
value: "alpha" | ||
}, | ||
{ | ||
text: "Beta", | ||
value: "beta", | ||
checked: true | ||
}, | ||
{ | ||
text: "Gamma", | ||
value: "gamma" | ||
} | ||
] | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
title: Checkboxes - small | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "nationalarchives/components/checkboxes/macro.njk" import tnaCheckboxes %} | ||
|
||
{{ tnaCheckboxes({ | ||
label: "Categories", | ||
headingLevel: 4, | ||
headingSize: "m", | ||
id: "categories", | ||
name: "categories", | ||
items: [ | ||
{ | ||
text: "Admiralty, Navy, Royal Marines, and Coastguard", | ||
value: "ADM" | ||
}, | ||
{ | ||
text: "Air Ministry and Royal Air Force records", | ||
value: "AIR" | ||
}, | ||
{ | ||
text: "Board of Trade and successors", | ||
value: "BT" | ||
}, | ||
{ | ||
text: "Chancery, the Wardrobe, Royal Household, Exchequer and various commissions", | ||
value: "C" | ||
}, | ||
{ | ||
text: "Colonial Office, Commonwealth and Foreign and Commonwealth Offices", | ||
value: "CO" | ||
}, | ||
{ | ||
text: "Exchequer, Office of First Fruits and Tenths, and the Court of Augmentations", | ||
value: "E" | ||
}, | ||
{ | ||
text: "Foreign Office", | ||
value: "FO" | ||
}, | ||
{ | ||
text: "Home Office", | ||
value: "HO" | ||
}, | ||
{ | ||
text: "Prerogative Court of Canterbury", | ||
value: "PROB" | ||
}, | ||
{ | ||
text: "War Office, Armed Forces, Judge Advocate General, and related bodies", | ||
value: "WO" | ||
} | ||
], | ||
small: true | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: Cookie banner | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "nationalarchives/components/cookie-banner/macro.njk" import tnaCookieBanner %} | ||
|
||
{{ tnaCookieBanner({ | ||
cookiesUrl: "#/cookies", | ||
classes: "tna-cookie-banner--demo" | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
layout: collection-page.njk | ||
title: Cookie banner | ||
description: Also known as navigation path or cookie crumb | ||
group: components | ||
--- | ||
|
||
The cookie banner component is for... | ||
|
||
{% from "_example.njk" import example %} | ||
|
||
{{ example({ group: "components", item: "cookie-banner", example: "default", html: true, nunjucks: true, open: false }) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: Date input | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "nationalarchives/components/date-input/macro.njk" import tnaDateInput %} | ||
|
||
{{ tnaDateInput({ | ||
label: "Enter a start date", | ||
headingLevel: 4, | ||
headingSize: "m", | ||
id: "date", | ||
name: "date" | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: Date input with an error | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "nationalarchives/components/date-input/macro.njk" import tnaDateInput %} | ||
|
||
{{ tnaDateInput({ | ||
label: "Enter a start date", | ||
headingLevel: 4, | ||
headingSize: "m", | ||
id: "date", | ||
name: "date", | ||
error: { | ||
text: "Date is not valid" | ||
} | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Date input with a hint | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "nationalarchives/components/date-input/macro.njk" import tnaDateInput %} | ||
|
||
{{ tnaDateInput({ | ||
label: "Enter a start date", | ||
headingLevel: 4, | ||
headingSize: "m", | ||
id: "date", | ||
name: "date", | ||
hint: "The earliest date of the record" | ||
}) }} |
Oops, something went wrong.