-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-details-open
- Loading branch information
Showing
409 changed files
with
10,653 additions
and
13,256 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Enforce LF line endings | ||
* text=auto |
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,7 @@ | ||
node_modules/* | ||
dist/* | ||
tests/backstop/* | ||
.github/* | ||
coverage/* | ||
package-lock.json | ||
package.json |
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,20 @@ | ||
module.exports = { | ||
semi: false, | ||
singleQuote: true, | ||
trailingComma: 'none', | ||
overrides: [ | ||
{ | ||
files: '*.md', | ||
options: { | ||
embeddedLanguageFormatting: 'off', | ||
singleQuote: false | ||
} | ||
}, | ||
{ | ||
files: '*.scss', | ||
options: { | ||
singleQuote: false | ||
} | ||
} | ||
] | ||
} |
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,12 @@ If you have any questions please [email us](mailto:[email protected]) or ge | |
## Contributing contents | ||
|
||
### General | ||
|
||
- [Code of Conduct](./CODE_OF_CONDUCT.md) | ||
- [Report a bug or issue](https://github.com/nhsuk/nhsuk-frontend/issues/new?template=BUG_REPORT.md) | ||
|
||
### Contributors | ||
|
||
- [Running the application locally](docs/contributing/running-locally.md) | ||
- [Application architecture](docs/contributing/application-architecture.md) | ||
- [Coding standards and style guide](docs/contributing/coding-standards.md) | ||
|
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,30 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Character Count - max characters' %} | ||
{% from 'components/character-count/macro.njk' import characterCount %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
{{ characterCount({ | ||
"name": "more-detail", | ||
"id": "more-detail", | ||
"maxlength": 10, | ||
"label": { | ||
"text": "Can you provide more detail?" | ||
}, | ||
"hint": { | ||
"text": "Don't include personal or financial information, eg your National Insurance number or credit card details." | ||
} | ||
}) }} | ||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% endblock %} |
31 changes: 31 additions & 0 deletions
31
app/components/character-count/with-default-value-exceeding-limit.njk
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 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Character Count - with default value exceeding limit' %} | ||
{% from 'components/character-count/macro.njk' import characterCount %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
{{ characterCount({ | ||
"name": "more-detail", | ||
"id": "more-detail", | ||
"maxlength": 10, | ||
"value": "012345678901234567890123456789123", | ||
"label": { | ||
"text": "Can you provide more detail?" | ||
}, | ||
"hint": { | ||
"text": "Don't include personal or financial information, eg your National Insurance number or credit card details." | ||
} | ||
}) }} | ||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% endblock %} |
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 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Character Count - with default value exceeding limit' %} | ||
{% from 'components/character-count/macro.njk' import characterCount %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
{{ characterCount({ | ||
"name": "more-detail", | ||
"id": "more-detail", | ||
"maxlength": 70, | ||
"value": "123", | ||
"label": { | ||
"text": "Can you provide more detail?" | ||
}, | ||
"hint": { | ||
"text": "Don't include personal or financial information, eg your National Insurance number or credit card details." | ||
} | ||
}) }} | ||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% endblock %} |
33 changes: 33 additions & 0 deletions
33
app/components/character-count/with-textarea-maxlength-attribute.njk
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,33 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Character Count - with maxlength attribute' %} | ||
{% from 'components/character-count/macro.njk' import characterCount %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
{{ characterCount({ | ||
"name": "more-detail", | ||
"id": "more-detail", | ||
"maxlength": 11, | ||
"attributes": { | ||
"maxlength": 11 | ||
}, | ||
"label": { | ||
"text": "Can you provide more detail?" | ||
}, | ||
"hint": { | ||
"text": "Don't include personal or financial information, eg your National Insurance number or credit card details." | ||
} | ||
}) }} | ||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% endblock %} |
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 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Character Count - with threshold' %} | ||
{% from 'components/character-count/macro.njk' import characterCount %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
{{ characterCount({ | ||
"name": "more-detail", | ||
"id": "more-detail", | ||
"maxlength": 10, | ||
"threshold": 8, | ||
"label": { | ||
"text": "Can you provide more detail?" | ||
}, | ||
"hint": { | ||
"text": "Don't include personal or financial information, eg your National Insurance number or credit card details." | ||
} | ||
}) }} | ||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% endblock %} |
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,30 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Character Count - max words' %} | ||
{% from 'components/character-count/macro.njk' import characterCount %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
{{ characterCount({ | ||
"name": "more-detail", | ||
"id": "more-detail", | ||
"maxwords": 10, | ||
"label": { | ||
"text": "Can you provide more detail?" | ||
}, | ||
"hint": { | ||
"text": "Don't include personal or financial information, eg your National Insurance number or credit card details." | ||
} | ||
}) }} | ||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% endblock %} |
Oops, something went wrong.