@nationalarchives/frontend 0.19.0 → 0.20.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/nationalarchives/components/checkboxes/macro-options.json +15 -15
- package/nationalarchives/components/compound-filters/macro-options.json +6 -6
- package/nationalarchives/components/cookie-banner/macro-options.json +11 -7
- package/nationalarchives/components/date-input/date-input-day.njk +1 -1
- package/nationalarchives/components/date-input/date-input-month.njk +1 -1
- package/nationalarchives/components/date-input/date-input-year.njk +1 -1
- package/nationalarchives/components/date-input/fixtures.json +5 -5
- package/nationalarchives/components/date-input/macro-options.json +10 -16
- package/nationalarchives/components/date-input/template.njk +11 -11
- package/nationalarchives/components/date-search/macro-options.json +11 -11
- package/nationalarchives/components/error-summary/macro-options.json +1 -1
- package/nationalarchives/components/files-list/macro-options.json +1 -1
- package/nationalarchives/components/footer/fixtures.json +3 -3
- package/nationalarchives/components/footer/macro-options.json +25 -18
- package/nationalarchives/components/footer/template.njk +3 -5
- package/nationalarchives/components/gallery/macro-options.json +1 -1
- package/nationalarchives/components/hero/macro-options.json +4 -3
- package/nationalarchives/components/index-grid/macro-options.json +1 -1
- package/nationalarchives/components/picture/macro-options.json +1 -1
- package/nationalarchives/components/radios/macro-options.json +11 -11
- package/nationalarchives/components/search-field/macro-options.json +7 -7
- package/nationalarchives/components/search-field/template.njk +1 -2
- package/nationalarchives/components/secondary-navigation/macro-options.json +3 -3
- package/nationalarchives/components/select/macro-options.json +10 -10
- package/nationalarchives/components/skip-link/macro-options.json +4 -2
- package/nationalarchives/components/tabs/macro-options.json +1 -1
- package/nationalarchives/components/text-input/fixtures.json +79 -12
- package/nationalarchives/components/text-input/macro-options.json +33 -12
- package/nationalarchives/components/text-input/text-input.njk +3 -2
- package/nationalarchives/components/textarea/fixtures.json +58 -10
- package/nationalarchives/components/textarea/macro-options.json +26 -10
- package/nationalarchives/components/textarea/template.njk +1 -1
- package/nationalarchives/components/warning/macro-options.json +4 -3
- package/nationalarchives/templates/fixtures.json +6 -6
- package/package.json +1 -1
@@ -3,55 +3,55 @@
|
|
3
3
|
"name": "label",
|
4
4
|
"type": "string",
|
5
5
|
"required": true,
|
6
|
-
"description": ""
|
6
|
+
"description": "The label for the textarea field."
|
7
7
|
},
|
8
8
|
{
|
9
9
|
"name": "headingLevel",
|
10
10
|
"type": "number",
|
11
11
|
"required": true,
|
12
|
-
"description": ""
|
12
|
+
"description": "The heading level which represents an element from `<h1>` through to `<h6>`."
|
13
13
|
},
|
14
14
|
{
|
15
15
|
"name": "headingSize",
|
16
16
|
"type": "string",
|
17
17
|
"required": false,
|
18
|
-
"description": ""
|
18
|
+
"description": "The physical size of the textarea title (`xl`, `l`, `m` or `s`)."
|
19
19
|
},
|
20
20
|
{
|
21
21
|
"name": "id",
|
22
22
|
"type": "string",
|
23
23
|
"required": true,
|
24
|
-
"description": ""
|
24
|
+
"description": "A unique ID for the textarea component."
|
25
25
|
},
|
26
26
|
{
|
27
27
|
"name": "name",
|
28
28
|
"type": "string",
|
29
29
|
"required": true,
|
30
|
-
"description": ""
|
30
|
+
"description": "The name of the form field."
|
31
31
|
},
|
32
32
|
{
|
33
33
|
"name": "hint",
|
34
34
|
"type": "string",
|
35
35
|
"required": false,
|
36
|
-
"description": ""
|
36
|
+
"description": "An optional hint to display above the form field."
|
37
37
|
},
|
38
38
|
{
|
39
39
|
"name": "value",
|
40
40
|
"type": "string",
|
41
41
|
"required": false,
|
42
|
-
"description": ""
|
42
|
+
"description": "The form field value."
|
43
43
|
},
|
44
44
|
{
|
45
45
|
"name": "error",
|
46
46
|
"type": "object",
|
47
47
|
"required": false,
|
48
|
-
"description": "",
|
48
|
+
"description": "If set, the details of any errors.",
|
49
49
|
"params": [
|
50
50
|
{
|
51
51
|
"name": "text",
|
52
52
|
"type": "string",
|
53
53
|
"required": true,
|
54
|
-
"description": ""
|
54
|
+
"description": "The error text to display."
|
55
55
|
}
|
56
56
|
]
|
57
57
|
},
|
@@ -59,6 +59,21 @@
|
|
59
59
|
"name": "spellcheck",
|
60
60
|
"type": "boolean",
|
61
61
|
"required": false,
|
62
|
+
"default": false,
|
63
|
+
"description": ""
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"name": "autocapitalize",
|
67
|
+
"type": "string",
|
68
|
+
"required": false,
|
69
|
+
"default": "off",
|
70
|
+
"description": ""
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"name": "autocorrect",
|
74
|
+
"type": "boolean",
|
75
|
+
"required": false,
|
76
|
+
"default": "off",
|
62
77
|
"description": ""
|
63
78
|
},
|
64
79
|
{
|
@@ -71,13 +86,14 @@
|
|
71
86
|
"name": "rows",
|
72
87
|
"type": "number",
|
73
88
|
"required": false,
|
89
|
+
"default": 5,
|
74
90
|
"description": ""
|
75
91
|
},
|
76
92
|
{
|
77
93
|
"name": "inline",
|
78
94
|
"type": "boolean",
|
79
95
|
"required": false,
|
80
|
-
"description": ""
|
96
|
+
"description": "If true, show the textarea inline rather than vertical."
|
81
97
|
},
|
82
98
|
{
|
83
99
|
"name": "formGroupClasses",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
</p>
|
23
23
|
{%- endif %}
|
24
24
|
</div>
|
25
|
-
<textarea id="{{ params.id }}" class="tna-textarea{% if params.size %} tna-textarea--{{ params.size }}{% endif %} {{ inputClasses | join(' ') }}" name="{{ params.name }}" spellcheck="{{ params.spellcheck if params.spellcheck else false }}" rows="{{ params.rows if params.rows else 5 }}"
|
25
|
+
<textarea id="{{ params.id }}" class="tna-textarea{% if params.size %} tna-textarea--{{ params.size }}{% endif %} {{ inputClasses | join(' ') }}" name="{{ params.name }}" spellcheck="{{ params.spellcheck if params.spellcheck else false }}" autocapitalize="{{ params.autocapitalize if params.autocapitalize else 'off' }}" autocorrect="{{ 'on' if params.autocorrect else 'off' }}" rows="{{ params.rows if params.rows else 5 }}"
|
26
26
|
{%- if params.hint or params.error %} aria-describedby="{%- if params.hint -%}{{ params.id }}-hint{%- endif %} {% if params.error -%}{{ params.id }}-error{%- endif -%}"{%- endif %}
|
27
27
|
{%- for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>{{ params.value }}</textarea>
|
28
28
|
</div>
|
@@ -3,19 +3,20 @@
|
|
3
3
|
"name": "heading",
|
4
4
|
"type": "string",
|
5
5
|
"required": false,
|
6
|
-
"
|
6
|
+
"default": "Important information",
|
7
|
+
"description": "If set, the visually hidden heading for the warning which will be suffixed with an exclamation mark."
|
7
8
|
},
|
8
9
|
{
|
9
10
|
"name": "headingLevel",
|
10
11
|
"type": "number",
|
11
12
|
"required": true,
|
12
|
-
"description": ""
|
13
|
+
"description": "The heading level which represents an element from `<h1>` through to `<h6>`."
|
13
14
|
},
|
14
15
|
{
|
15
16
|
"name": "body",
|
16
17
|
"type": "string",
|
17
18
|
"required": true,
|
18
|
-
"description": ""
|
19
|
+
"description": "The body text of the warning."
|
19
20
|
},
|
20
21
|
{
|
21
22
|
"name": "classes",
|