@ons/design-system 65.1.0 → 65.2.1
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/README.md +1 -0
- package/components/access-code/access-code.scss +3 -3
- package/components/access-code/example-access-code-error.njk +1 -1
- package/components/access-code/example-access-code.njk +1 -1
- package/components/accordion/example-accordion-open.njk +10 -10
- package/components/accordion/example-accordion.njk +1 -1
- package/components/address-input/example-address-input-editable.njk +2 -2
- package/components/address-input/example-address-input-manual.njk +3 -3
- package/components/address-input/example-address-input.njk +2 -2
- package/components/autosuggest/_autosuggest.scss +3 -8
- package/components/autosuggest/_macro.njk +2 -3
- package/components/autosuggest/autosuggest.js +2 -1
- package/components/autosuggest/autosuggest.spec.js +89 -55
- package/components/autosuggest/autosuggest.ui.js +8 -12
- package/components/autosuggest/example-autosuggest-country-multiple.njk +4 -3
- package/components/autosuggest/example-autosuggest-country.njk +1 -1
- package/components/back-link/example-back-link.njk +1 -1
- package/components/button/_button.scss +11 -14
- package/components/card/example-card-set-with-images.njk +3 -3
- package/components/card/example-card-set-with-lists.njk +3 -3
- package/components/card/example-card-set.njk +3 -3
- package/components/card/example-card.njk +1 -1
- package/components/checkboxes/_checkbox.scss +1 -4
- package/components/checkboxes/example-checkboxes-disabled.njk +3 -3
- package/components/checkboxes/example-checkboxes-error.njk +7 -7
- package/components/checkboxes/example-checkboxes-with-descriptions.njk +7 -7
- package/components/checkboxes/example-checkboxes-with-hidden-label.njk +9 -9
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +8 -8
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +8 -8
- package/components/checkboxes/example-checkboxes-with-revealed-radios-expanded.njk +8 -8
- package/components/checkboxes/example-checkboxes-with-revealed-radios.njk +8 -8
- package/components/checkboxes/example-checkboxes-with-revealed-select-expanded.njk +4 -4
- package/components/checkboxes/example-checkboxes-with-revealed-select.njk +4 -4
- package/components/checkboxes/example-checkboxes-with-revealed-text-input-expanded.njk +6 -6
- package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +6 -6
- package/components/checkboxes/example-checkboxes-with-select-all-button.njk +4 -4
- package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +6 -6
- package/components/checkboxes/example-checkboxes-without-border.njk +3 -3
- package/components/checkboxes/example-checkboxes.njk +4 -4
- package/components/date-input/example-date-input-error.njk +2 -2
- package/components/date-input/example-date-input.njk +1 -1
- package/components/details/example-details-with-warning.njk +1 -1
- package/components/details/example-details.njk +1 -1
- package/components/download-resources/_download-resources.scss +3 -5
- package/components/duration/example-duration-error.njk +6 -6
- package/components/duration/example-duration.njk +5 -5
- package/components/external-link/example-external-link.njk +1 -1
- package/components/header/example-header-external-with-service-links.njk +1 -1
- package/components/header/example-header-internal.njk +1 -1
- package/components/helpers/_grid.scss +6 -0
- package/components/helpers/grid.njk +19 -0
- package/components/input/_input-type.scss +2 -8
- package/components/input/_input.scss +4 -3
- package/components/input/example-input-email.njk +1 -1
- package/components/input/example-input-number.njk +1 -1
- package/components/input/example-input-numeric-values.njk +7 -7
- package/components/input/example-input-text-with-character-limit-checker.njk +1 -1
- package/components/input/example-input-text-with-description.njk +1 -1
- package/components/input/example-input-text.njk +1 -1
- package/components/modal/_modal.scss +3 -6
- package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +6 -6
- package/components/mutually-exclusive/example-mutually-exclusive-date-with-error.njk +2 -2
- package/components/mutually-exclusive/example-mutually-exclusive-email.njk +2 -2
- package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +5 -5
- package/components/navigation/navigation.js +6 -2
- package/components/phase-banner/example-phase-banner-alpha.njk +13 -2
- package/components/phase-banner/example-phase-banner-beta.njk +13 -2
- package/components/radios/example-radios-with-clear-button-expanded.njk +9 -9
- package/components/radios/example-radios-with-clear-button.njk +9 -9
- package/components/radios/example-radios-with-descriptions.njk +5 -5
- package/components/radios/example-radios-with-error.njk +4 -4
- package/components/radios/example-radios-with-revealed-checkboxes-expanded.njk +8 -8
- package/components/radios/example-radios-with-revealed-checkboxes.njk +8 -8
- package/components/radios/example-radios-with-revealed-radios-expanded.njk +9 -9
- package/components/radios/example-radios-with-revealed-radios.njk +8 -8
- package/components/radios/example-radios-with-revealed-select-expanded.njk +5 -5
- package/components/radios/example-radios-with-revealed-select.njk +4 -4
- package/components/radios/example-radios-with-revealed-text-input-expanded.njk +9 -9
- package/components/radios/example-radios-with-revealed-text-input.njk +9 -9
- package/components/radios/example-radios-with-visible-text-input.njk +3 -3
- package/components/relationships/example-relationships-error.njk +13 -13
- package/components/relationships/example-relationships-you.njk +13 -13
- package/components/relationships/example-relationships.njk +13 -13
- package/components/select/example-select-with-error.njk +1 -1
- package/components/select/example-select-with-inline-label.njk +1 -1
- package/components/select/example-select.njk +1 -1
- package/components/table/_table.scss +7 -3
- package/components/textarea/example-textarea-error.njk +1 -1
- package/components/upload/example-upload-error.njk +1 -1
- package/components/upload/example-upload.njk +1 -1
- package/css/main.css +3 -3
- package/package.json +8 -10
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
- package/scss/base/_global.scss +3 -2
- package/scss/main.scss +1 -0
- package/scss/overrides/hcm.scss +10 -10
|
@@ -13,28 +13,28 @@
|
|
|
13
13
|
"name": "contact",
|
|
14
14
|
"checkboxes": [
|
|
15
15
|
{
|
|
16
|
-
"id": "post",
|
|
16
|
+
"id": "post-example-checkbox-with-revealed-select",
|
|
17
17
|
"label": {
|
|
18
18
|
"text": "By post"
|
|
19
19
|
},
|
|
20
20
|
"value": "post"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"id": "email",
|
|
23
|
+
"id": "email-example-checkbox-with-revealed-select",
|
|
24
24
|
"label": {
|
|
25
25
|
"text": "By email"
|
|
26
26
|
},
|
|
27
27
|
"value": "email"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"id": "phone",
|
|
30
|
+
"id": "phone-example-checkbox-with-revealed-select",
|
|
31
31
|
"label": {
|
|
32
32
|
"text": "By phone"
|
|
33
33
|
},
|
|
34
34
|
"value": "phone",
|
|
35
35
|
"other": {
|
|
36
36
|
"otherType": "select",
|
|
37
|
-
"id": "phone-time",
|
|
37
|
+
"id": "phone-time-example-checkbox-with-revealed-select",
|
|
38
38
|
"name": "phone-time",
|
|
39
39
|
"label": {
|
|
40
40
|
"text": "Choose preferred time of day"
|
|
@@ -12,42 +12,42 @@
|
|
|
12
12
|
"dontWrap": true,
|
|
13
13
|
"checkboxes": [
|
|
14
14
|
{
|
|
15
|
-
"id": "gluten-free",
|
|
15
|
+
"id": "gluten-free-example-checkbox-with-revealed-text-input-expanded",
|
|
16
16
|
"label": {
|
|
17
17
|
"text": "Gluten free"
|
|
18
18
|
},
|
|
19
19
|
"value": "gluten-free"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
"id": "lactose-intolerant",
|
|
22
|
+
"id": "lactose-intolerant-example-checkbox-with-revealed-text-input-expanded",
|
|
23
23
|
"label": {
|
|
24
24
|
"text": "Lactose intolerant"
|
|
25
25
|
},
|
|
26
26
|
"value": "lactose-intolerant"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
"id": "vegan",
|
|
29
|
+
"id": "vegan-example-checkbox-with-revealed-text-input-expanded",
|
|
30
30
|
"label": {
|
|
31
31
|
"text": "Vegan"
|
|
32
32
|
},
|
|
33
33
|
"value": "vegan"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
"id": "vegetarian",
|
|
36
|
+
"id": "vegetarian-example-checkbox-with-revealed-text-input-expanded",
|
|
37
37
|
"label": {
|
|
38
38
|
"text": "Vegetarian"
|
|
39
39
|
},
|
|
40
40
|
"value": "vegetarian"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
"id": "other-checkbox",
|
|
43
|
+
"id": "other-checkbox-with-revealed-text-input-expanded",
|
|
44
44
|
"label": {
|
|
45
45
|
"text": "Other"
|
|
46
46
|
},
|
|
47
47
|
"value": "other",
|
|
48
48
|
"checked": true,
|
|
49
49
|
"other": {
|
|
50
|
-
"id": "other-textbox",
|
|
50
|
+
"id": "other-textbox-example-checkbox-with-revealed-text-input-expanded",
|
|
51
51
|
"name": "other-answer",
|
|
52
52
|
"label": {
|
|
53
53
|
"text": "Enter dietary requirements"
|
|
@@ -12,41 +12,41 @@
|
|
|
12
12
|
"dontWrap": true,
|
|
13
13
|
"checkboxes": [
|
|
14
14
|
{
|
|
15
|
-
"id": "gluten-free",
|
|
15
|
+
"id": "gluten-free-example-checkbox-with-revealed-text-input",
|
|
16
16
|
"label": {
|
|
17
17
|
"text": "Gluten free"
|
|
18
18
|
},
|
|
19
19
|
"value": "gluten-free"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
"id": "lactose-intolerant",
|
|
22
|
+
"id": "lactose-intolerant-example-checkbox-with-revealed-text-input",
|
|
23
23
|
"label": {
|
|
24
24
|
"text": "Lactose intolerant"
|
|
25
25
|
},
|
|
26
26
|
"value": "lactose-intolerant"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
"id": "vegan",
|
|
29
|
+
"id": "vegan-example-checkbox-with-revealed-text-input",
|
|
30
30
|
"label": {
|
|
31
31
|
"text": "Vegan"
|
|
32
32
|
},
|
|
33
33
|
"value": "vegan"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
"id": "vegetarian",
|
|
36
|
+
"id": "vegetarian-example-checkbox-with-revealed-text-input",
|
|
37
37
|
"label": {
|
|
38
38
|
"text": "Vegetarian"
|
|
39
39
|
},
|
|
40
40
|
"value": "vegetarian"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
"id": "other-checkbox",
|
|
43
|
+
"id": "other-checkbox-with-revealed-text-input",
|
|
44
44
|
"label": {
|
|
45
45
|
"text": "Other"
|
|
46
46
|
},
|
|
47
47
|
"value": "other",
|
|
48
48
|
"other": {
|
|
49
|
-
"id": "other-textbox",
|
|
49
|
+
"id": "other-textbox-example-checkbox-with-revealed-text-input",
|
|
50
50
|
"name": "other-answer",
|
|
51
51
|
"label": {
|
|
52
52
|
"text": "Enter dietary requirements"
|
|
@@ -18,28 +18,28 @@
|
|
|
18
18
|
},
|
|
19
19
|
"checkboxes": [
|
|
20
20
|
{
|
|
21
|
-
"id": "mobile-phone",
|
|
21
|
+
"id": "mobile-phone-example-checkbox-with-select-all-button",
|
|
22
22
|
"label": {
|
|
23
23
|
"text": "Mobile phone"
|
|
24
24
|
},
|
|
25
25
|
"value": "mobile-phone"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
"id": "tablet",
|
|
28
|
+
"id": "tablet-example-checkbox-with-select-all-button",
|
|
29
29
|
"label": {
|
|
30
30
|
"text": "Tablet"
|
|
31
31
|
},
|
|
32
32
|
"value": "tablet"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
"id": "laptop",
|
|
35
|
+
"id": "laptop-example-checkbox-with-select-all-button",
|
|
36
36
|
"label": {
|
|
37
37
|
"text": "Laptop"
|
|
38
38
|
},
|
|
39
39
|
"value": "laptop"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
"id": "desktop",
|
|
42
|
+
"id": "desktop-example-checkbox-with-select-all-button",
|
|
43
43
|
"label": {
|
|
44
44
|
"text": "Desktop computer"
|
|
45
45
|
},
|
|
@@ -13,42 +13,42 @@
|
|
|
13
13
|
"name": "dietary",
|
|
14
14
|
"checkboxes": [
|
|
15
15
|
{
|
|
16
|
-
"id": "gluten-free",
|
|
16
|
+
"id": "gluten-free-example-checkbox-with-visible-text-input",
|
|
17
17
|
"label": {
|
|
18
18
|
"text": "Gluten free"
|
|
19
19
|
},
|
|
20
20
|
"value": "gluten-free"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"id": "lactose-intolerant",
|
|
23
|
+
"id": "lactose-intolerant-example-checkbox-with-visible-text-input",
|
|
24
24
|
"label": {
|
|
25
25
|
"text": "Lactose intolerant"
|
|
26
26
|
},
|
|
27
27
|
"value": "lactose-intolerant"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"id": "vegan",
|
|
30
|
+
"id": "vegan-example-checkbox-with-visible-text-input",
|
|
31
31
|
"label": {
|
|
32
32
|
"text": "Vegan"
|
|
33
33
|
},
|
|
34
34
|
"value": "vegan"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
"id": "vegetarian",
|
|
37
|
+
"id": "vegetarian-example-checkbox-with-visible-text-input",
|
|
38
38
|
"label": {
|
|
39
39
|
"text": "Vegetarian"
|
|
40
40
|
},
|
|
41
41
|
"value": "vegetarian"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
|
-
"id": "other-checkbox",
|
|
44
|
+
"id": "other-checkbox-with-visible-text-input",
|
|
45
45
|
"label": {
|
|
46
46
|
"text": "Other"
|
|
47
47
|
},
|
|
48
48
|
"value": "other",
|
|
49
49
|
"other": {
|
|
50
50
|
"open": true,
|
|
51
|
-
"id": "other-textbox",
|
|
51
|
+
"id": "other-textbox-example-checkbox-with-visible-text-input",
|
|
52
52
|
"name": "other-answer",
|
|
53
53
|
"label": {
|
|
54
54
|
"text": "Enter dietary requirements"
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
"borderless": true,
|
|
9
9
|
"checkboxes": [
|
|
10
10
|
{
|
|
11
|
-
"id": "booklet",
|
|
11
|
+
"id": "booklet-example-checkbox-without-border",
|
|
12
12
|
"label": {
|
|
13
13
|
"text": "Booklet"
|
|
14
14
|
},
|
|
15
15
|
"value": "booklet"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"id": "logo",
|
|
18
|
+
"id": "logo-example-checkbox-without-border",
|
|
19
19
|
"label": {
|
|
20
20
|
"text": "Logo"
|
|
21
21
|
},
|
|
22
22
|
"value": "logo"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"id": "poster",
|
|
25
|
+
"id": "poster-example-checkbox-without-border",
|
|
26
26
|
"label": {
|
|
27
27
|
"text": "Poster"
|
|
28
28
|
},
|
|
@@ -13,28 +13,28 @@
|
|
|
13
13
|
"name": "devices",
|
|
14
14
|
"checkboxes": [
|
|
15
15
|
{
|
|
16
|
-
"id": "mobile-phone",
|
|
16
|
+
"id": "mobile-phone-example",
|
|
17
17
|
"label": {
|
|
18
18
|
"text": "Mobile phone"
|
|
19
19
|
},
|
|
20
20
|
"value": "mobile-phone"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"id": "tablet",
|
|
23
|
+
"id": "tablet-example",
|
|
24
24
|
"label": {
|
|
25
25
|
"text": "Tablet"
|
|
26
26
|
},
|
|
27
27
|
"value": "tablet"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"id": "laptop",
|
|
30
|
+
"id": "laptop-example",
|
|
31
31
|
"label": {
|
|
32
32
|
"text": "Laptop"
|
|
33
33
|
},
|
|
34
34
|
"value": "laptop"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
"id": "desktop",
|
|
37
|
+
"id": "desktop-example",
|
|
38
38
|
"label": {
|
|
39
39
|
"text": "Desktop computer"
|
|
40
40
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{% from "components/date-input/_macro.njk" import onsDateInput %}
|
|
3
3
|
{{
|
|
4
4
|
onsDateInput({
|
|
5
|
-
"id": "period-from-date",
|
|
5
|
+
"id": "period-from-date-input-error-example",
|
|
6
6
|
"legendOrLabel": "Period from:",
|
|
7
7
|
"description": "For example, 31 3 2019",
|
|
8
8
|
"day": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
{{
|
|
33
33
|
onsDateInput({
|
|
34
|
-
"id": "period-to-date",
|
|
34
|
+
"id": "period-to-date-input-error-example",
|
|
35
35
|
"legendOrLabel": "Period to:",
|
|
36
36
|
"description": "For example, 31 3 2020",
|
|
37
37
|
"day": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
{{
|
|
4
4
|
onsDetails({
|
|
5
|
-
"id": "details",
|
|
5
|
+
"id": "details-example",
|
|
6
6
|
"title": "What is a photovoltaic system?",
|
|
7
7
|
"content": "<p>A typical photovoltaic system employs solar panels, each comprising a number of solar cells, which generate electrical power. PV installations may be ground-mounted, rooftop mounted or wall mounted. The mount may be fixed, or use a solar tracker to follow the sun across the sky.</p>"
|
|
8
8
|
})
|
|
@@ -49,22 +49,20 @@
|
|
|
49
49
|
|
|
50
50
|
&__panel--is-visible {
|
|
51
51
|
background-color: var(--ons-color-white);
|
|
52
|
-
|
|
52
|
+
inset: 0;
|
|
53
53
|
display: block;
|
|
54
54
|
height: calc(100% - 76px); // Height of action buttons
|
|
55
|
-
left: 0;
|
|
56
55
|
overflow-y: scroll;
|
|
57
56
|
padding: 1rem;
|
|
58
57
|
position: fixed;
|
|
59
|
-
right: 0;
|
|
60
|
-
top: 0;
|
|
61
58
|
z-index: 10;
|
|
62
59
|
}
|
|
63
60
|
|
|
64
61
|
&__actions {
|
|
65
62
|
background-color: var(--ons-color-white);
|
|
66
63
|
bottom: 0;
|
|
67
|
-
box-shadow: 0 0 5px 0
|
|
64
|
+
box-shadow: 0 0 5px 0 rgb(34 34 34 / 50%),
|
|
65
|
+
0 -1px 0 0 rgb(65 64 66 / 50%);
|
|
68
66
|
display: flex;
|
|
69
67
|
left: 0;
|
|
70
68
|
padding: 1rem;
|
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
|
|
4
4
|
{{
|
|
5
5
|
onsDuration({
|
|
6
|
-
"id": "address-duration",
|
|
6
|
+
"id": "address-duration-error-example",
|
|
7
7
|
"legendOrLabel": 'How long have you lived at this address?',
|
|
8
8
|
"legendClasses": 'ons-u-vh',
|
|
9
9
|
"field1": {
|
|
10
|
-
"id": "address-duration-years",
|
|
10
|
+
"id": "address-duration-years-error-example",
|
|
11
11
|
"name": "address-duration-years",
|
|
12
12
|
"suffix": {
|
|
13
13
|
"text": "Years",
|
|
14
|
-
"id": "address-duration-years-suffix"
|
|
14
|
+
"id": "address-duration-years-suffix-error-example"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"field2": {
|
|
18
|
-
"id": "address-duration-months",
|
|
18
|
+
"id": "address-duration-months-error-example",
|
|
19
19
|
"name": "address-duration-months",
|
|
20
20
|
"suffix": {
|
|
21
21
|
"text": "Months",
|
|
22
|
-
"id": "address-duration-months-suffix"
|
|
22
|
+
"id": "address-duration-months-suffix-error-example"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"error": {
|
|
26
|
-
"id": "address-duration-error",
|
|
26
|
+
"id": "address-duration-error-example",
|
|
27
27
|
"text": "Enter how long you have lived at this address"
|
|
28
28
|
}
|
|
29
29
|
})
|
|
@@ -7,25 +7,25 @@
|
|
|
7
7
|
"legendIsQuestionTitle": true
|
|
8
8
|
}) %}
|
|
9
9
|
{{ onsDuration({
|
|
10
|
-
"id": "address-duration",
|
|
10
|
+
"id": "address-duration-example",
|
|
11
11
|
"dontWrap": true,
|
|
12
12
|
"field1": {
|
|
13
|
-
"id": "address-duration-years",
|
|
13
|
+
"id": "address-duration-years-example",
|
|
14
14
|
"name": "address-duration-years",
|
|
15
15
|
"suffix": {
|
|
16
16
|
"text": "Years",
|
|
17
|
-
"id": "address-duration-years-suffix"
|
|
17
|
+
"id": "address-duration-years-suffix-example"
|
|
18
18
|
},
|
|
19
19
|
"attributes": {
|
|
20
20
|
"autocomplete": "off"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"field2": {
|
|
24
|
-
"id": "address-duration-months",
|
|
24
|
+
"id": "address-duration-months-example",
|
|
25
25
|
"name": "address-duration-months",
|
|
26
26
|
"suffix": {
|
|
27
27
|
"text": "Months",
|
|
28
|
-
"id": "address-duration-months-suffix"
|
|
28
|
+
"id": "address-duration-months-suffix-example"
|
|
29
29
|
},
|
|
30
30
|
"attributes": {
|
|
31
31
|
"autocomplete": "off"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{% macro patternLibExampleGrid(params) %}
|
|
2
|
+
{% if params.container -%}
|
|
3
|
+
<div class="ons-container">
|
|
4
|
+
{% endif -%}
|
|
5
|
+
|
|
6
|
+
<div class="ons-grid">
|
|
7
|
+
{% for item in (params.itemsList if params.itemsList is iterable else params.itemsList.items()) -%}
|
|
8
|
+
{% for i in range(0, item.repeat | default(1) ) -%}
|
|
9
|
+
<div class="ons-grid__col ons-col-{{ item.col }}@m {{ item.classes }}">
|
|
10
|
+
<div class="ons-pl-grid-col">{{ item.col }} col</div>
|
|
11
|
+
</div>
|
|
12
|
+
{%- endfor %}
|
|
13
|
+
{%- endfor %}
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
{% if params.container -%}
|
|
17
|
+
</div>
|
|
18
|
+
{% endif -%}
|
|
19
|
+
{% endmacro %}
|
|
@@ -57,13 +57,10 @@
|
|
|
57
57
|
@extend %ons-input-focus;
|
|
58
58
|
|
|
59
59
|
border-radius: $input-radius;
|
|
60
|
-
|
|
60
|
+
inset: 0;
|
|
61
61
|
content: '';
|
|
62
62
|
display: block;
|
|
63
|
-
left: 0;
|
|
64
63
|
position: absolute;
|
|
65
|
-
right: 0;
|
|
66
|
-
top: 0;
|
|
67
64
|
}
|
|
68
65
|
|
|
69
66
|
&:not(&--prefix) & {
|
|
@@ -100,16 +97,13 @@
|
|
|
100
97
|
|
|
101
98
|
& + .ons-input-type__type::after {
|
|
102
99
|
border-radius: $input-radius;
|
|
103
|
-
|
|
100
|
+
inset: 0;
|
|
104
101
|
|
|
105
102
|
// Style input + prefix/suffix for errors
|
|
106
103
|
box-shadow: 0 0 0 1px var(--ons-color-errors);
|
|
107
104
|
content: '';
|
|
108
105
|
display: block;
|
|
109
|
-
left: 0;
|
|
110
106
|
outline: 1px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show box-shadows
|
|
111
107
|
position: absolute;
|
|
112
|
-
right: 0;
|
|
113
|
-
top: 0;
|
|
114
108
|
}
|
|
115
109
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
%ons-input-focus {
|
|
2
|
-
box-shadow: 0 0 0 $input-border-width var(--ons-color-input-border),
|
|
2
|
+
box-shadow: 0 0 0 $input-border-width var(--ons-color-input-border),
|
|
3
|
+
0 0 0 4px var(--ons-color-focus);
|
|
3
4
|
|
|
4
5
|
// Add transparent outline because Windows High Contrast Mode doesn't show box-shadows
|
|
5
6
|
outline: 3px solid transparent;
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
@include mq(s) {
|
|
32
33
|
&--text,
|
|
33
34
|
&--select {
|
|
34
|
-
&:not(.ons-input--block
|
|
35
|
+
&:not(.ons-input--block, [class*='input--w-']) {
|
|
35
36
|
width: $input-width;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
@@ -131,7 +132,7 @@
|
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
.ons-input--ghost {
|
|
134
|
-
border: 2px solid
|
|
135
|
+
border: 2px solid rgb(255 255 255 / 60%);
|
|
135
136
|
&:focus {
|
|
136
137
|
border: 2px solid var(--ons-color-input-border);
|
|
137
138
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% from "components/input/_macro.njk" import onsInput %}
|
|
2
2
|
{{
|
|
3
3
|
onsInput({
|
|
4
|
-
"id": "number",
|
|
4
|
+
"id": "number-example-input-numeric-values",
|
|
5
5
|
"type": "number",
|
|
6
6
|
"width": "2",
|
|
7
7
|
"autocomplete": "off",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}}
|
|
16
16
|
{{
|
|
17
17
|
onsInput({
|
|
18
|
-
"id": "prefixed",
|
|
18
|
+
"id": "prefixed-example-input-numeric-values",
|
|
19
19
|
"type": "number",
|
|
20
20
|
"width": "6",
|
|
21
21
|
"autocomplete": "off",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"prefix": {
|
|
26
26
|
"text": "£",
|
|
27
27
|
"title": "British pounds (GBP)",
|
|
28
|
-
"id": "annual-salary-gpb-prefix"
|
|
28
|
+
"id": "annual-salary-gpb-prefix-example-input-numeric-values"
|
|
29
29
|
}
|
|
30
30
|
})
|
|
31
31
|
}}
|
|
32
32
|
{{
|
|
33
33
|
onsInput({
|
|
34
|
-
"id": "suffixed-percent",
|
|
34
|
+
"id": "suffixed-percent-example-input-numeric-values",
|
|
35
35
|
"type": "number",
|
|
36
36
|
"width": "3",
|
|
37
37
|
"autocomplete": "off",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"suffix": {
|
|
42
42
|
"title": "per cent",
|
|
43
43
|
"text": "%",
|
|
44
|
-
"id": "internet-access-per-cent-suffix"
|
|
44
|
+
"id": "internet-access-per-cent-suffix-example-input-numeric-values"
|
|
45
45
|
}
|
|
46
46
|
})
|
|
47
47
|
}}
|
|
48
48
|
{{
|
|
49
49
|
onsInput({
|
|
50
|
-
"id": "suffixed-centimetres",
|
|
50
|
+
"id": "suffixed-centimetres-example-input-numeric-values",
|
|
51
51
|
"type": "number",
|
|
52
52
|
"width": "4",
|
|
53
53
|
"autocomplete": "off",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"suffix": {
|
|
59
59
|
"title": "centimetres",
|
|
60
60
|
"text": "cm",
|
|
61
|
-
"id": "length-cm-suffix"
|
|
61
|
+
"id": "length-cm-suffix-example-input-numeric-values"
|
|
62
62
|
}
|
|
63
63
|
})
|
|
64
64
|
}}
|