@nationalarchives/frontend 0.1.33 → 0.1.34
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/nationalarchives/all.css +2 -2
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/components/_index.scss +1 -0
- package/nationalarchives/components/checkboxes/macro-options.json +14 -2
- package/nationalarchives/components/checkboxes/template.njk +2 -2
- package/nationalarchives/components/compound-filters/_index.scss +1 -0
- package/nationalarchives/components/compound-filters/compound-filters.css +1 -0
- package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -0
- package/nationalarchives/components/compound-filters/compound-filters.scss +78 -0
- package/nationalarchives/components/compound-filters/compound-filters.stories.js +61 -0
- package/nationalarchives/components/compound-filters/fixtures.json +46 -0
- package/nationalarchives/components/compound-filters/macro-options.json +52 -0
- package/nationalarchives/components/compound-filters/macro.njk +3 -0
- package/nationalarchives/components/compound-filters/template.njk +16 -0
- package/nationalarchives/components/pagination/fixtures.json +8 -8
- package/nationalarchives/components/pagination/template.njk +2 -2
- package/nationalarchives/components/radios/macro-options.json +14 -2
- package/nationalarchives/components/radios/template.njk +2 -2
- package/nationalarchives/prototype-kit.css +2 -2
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/templates/layouts/_generic.njk +1 -1
- package/package.json +1 -1
@@ -87,16 +87,28 @@
|
|
87
87
|
"required": false,
|
88
88
|
"description": ""
|
89
89
|
},
|
90
|
+
{
|
91
|
+
"name": "formGroupClasses",
|
92
|
+
"type": "string",
|
93
|
+
"required": false,
|
94
|
+
"description": "Classes to add to the radios form group."
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"name": "formGroupAttributes",
|
98
|
+
"type": "string",
|
99
|
+
"required": false,
|
100
|
+
"description": "HTML attributes (for example data attributes) to add to the radios form group."
|
101
|
+
},
|
90
102
|
{
|
91
103
|
"name": "classes",
|
92
104
|
"type": "string",
|
93
105
|
"required": false,
|
94
|
-
"description": "Classes to add to the
|
106
|
+
"description": "Classes to add to the radio elements."
|
95
107
|
},
|
96
108
|
{
|
97
109
|
"name": "attributes",
|
98
110
|
"type": "object",
|
99
111
|
"required": false,
|
100
|
-
"description": "HTML attributes (for example data attributes) to add to the
|
112
|
+
"description": "HTML attributes (for example data attributes) to add to the radio elements."
|
101
113
|
}
|
102
114
|
]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
{%- if params.inline -%}
|
3
3
|
{%- set containerClasses = containerClasses.concat('tna-form__group--inline') -%}
|
4
4
|
{%- endif -%}
|
5
|
-
<div class="tna-form__group{% if params.error %} tna-form__group--error{% endif %} {{ containerClasses | join(' ') }}"{% for attribute, value in params.
|
5
|
+
<div class="tna-form__group{% if params.error %} tna-form__group--error{% endif %} {{ containerClasses | join(' ') }}"{% for attribute, value in params.formGroupAttributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
6
6
|
<fieldset class="tna-form__fieldset"{%- if params.hint or params.error %} aria-describedby="{%- if params.hint -%}tna-form__{{ params.id }}-hint{%- endif %} {% if params.error -%}tna-form__{{ params.id }}-error{%- endif -%}"{%- endif %}>
|
7
7
|
<legend class="tna-form__legend">
|
8
8
|
<h{{ params.headingLevel }} class="tna-form__heading tna-form__heading--{{ params.headingSize or 'm' }}">
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<div class="tna-radios{% if params.small or params.inline %} tna-radios--small{% endif %}{% if params.inline %} tna-radios--inline{% endif %}">
|
23
23
|
{%- for item in params.items %}
|
24
24
|
<div class="tna-radios__item">
|
25
|
-
<input type="radio" id="tna-form__{{ params.id }}-{{ item.value }}" value="{{ item.value }}" name="{{ params.name }}"{% if params.selected and item.value === params.selected %} checked{% endif %}>
|
25
|
+
<input type="radio" id="tna-form__{{ params.id }}-{{ item.value }}" value="{{ item.value }}" name="{{ params.name }}"{% for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}{% if params.selected and item.value === params.selected %} checked{% endif %}>
|
26
26
|
<label for="tna-form__{{ params.id }}-{{ item.value }}" class="tna-radios__item-label">
|
27
27
|
{{ item.text }}
|
28
28
|
</label>
|