desy-html 7.1.1 → 7.2.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/docs/_global.foot.njk +9 -9
- package/docs/_global.head.njk +1 -1
- package/docs/_macro.example-render.njk +177 -147
- package/docs/_macro.render-caller.njk +1 -1
- package/docs/ds/_ds.example.border.njk +1 -1
- package/docs/ds/_ds.example.color-de-interaccion.njk +5 -5
- package/docs/ds/_ds.example.colores-cabecera.njk +7 -7
- package/docs/ds/_ds.example.colores-de-soporte.njk +72 -5
- package/docs/ds/_ds.example.colores-neutros.njk +12 -12
- package/docs/ds/_ds.example.layout.njk +2 -2
- package/docs/ds/_ds.example.typography.njk +1 -1
- package/docs/ds/_ds.macro.code-snippet.njk +28 -9
- package/docs/ds/_ds.section.color.njk +7 -65
- package/docs/ds/_ds.section.espaciado.njk +4 -295
- package/docs/ds/_ds.section.layout.njk +5 -5
- package/docs/ds/_ds.section.textos.njk +40 -50
- package/docs/ds/_ds.section.typography.njk +239 -236
- package/docs/index.html +12 -0
- package/package.json +1 -1
- package/src/css/component.text.css +11 -0
- package/src/js/aria/dataGrid.js +21 -6
- package/src/js/index.js +0 -7
- package/src/js/popper.min.js +6 -0
- package/src/js/prism/clipboard.min.js +7 -0
- package/src/js/prism/prism-copy-to-clipboard.min.js +1 -0
- package/src/js/prism/prism-normalize-whitespace.min.js +1 -0
- package/src/js/prism/prism-toolbar.min.js +1 -0
- package/src/js/prism/prism-twig.min.js +1 -0
- package/src/js/prism/prism-yaml.min.js +1 -0
- package/src/js/prism/prism.min.js +1 -0
- package/src/js/tippy-bundle.umd.min.js +2 -0
- package/src/templates/components/accordion/_template.accordion.njk +95 -84
- package/src/templates/components/accordion-history/_template.accordion-history.njk +134 -123
- package/src/templates/components/alert/_template.alert.njk +6 -6
- package/src/templates/components/breadcrumbs/_template.breadcrumbs.njk +15 -30
- package/src/templates/components/button/_template.button.njk +4 -0
- package/src/templates/components/button-loader/_template.button-loader.njk +11 -7
- package/src/templates/components/card/_examples.card.njk +76 -76
- package/src/templates/components/card/_template.card.njk +14 -14
- package/src/templates/components/character-count/_template.character-count.njk +3 -6
- package/src/templates/components/checkboxes/_examples.checkboxes.njk +49 -10
- package/src/templates/components/checkboxes/_template.checkboxes.njk +17 -11
- package/src/templates/components/collapsible/_template.collapsible.njk +4 -4
- package/src/templates/components/date-input/_template.date-input.njk +46 -40
- package/src/templates/components/dialog/_template.dialog.njk +2 -2
- package/src/templates/components/error-message/_template.error-message.njk +3 -3
- package/src/templates/components/error-summary/_template.error-summary.njk +18 -6
- package/src/templates/components/fieldset/_examples.fieldset.njk +32 -6
- package/src/templates/components/fieldset/_template.fieldset.njk +28 -16
- package/src/templates/components/footer/_examples.footer.njk +14 -9
- package/src/templates/components/footer/_template.footer.njk +62 -66
- package/src/templates/components/footer/params.footer.yaml +4 -26
- package/src/templates/components/header/_examples.header.njk +6 -4
- package/src/templates/components/header/_template.header.header__dropdown.njk +27 -22
- package/src/templates/components/header/_template.header.header__navigation.njk +4 -1
- package/src/templates/components/header/_template.header.header__offcanvas.njk +18 -16
- package/src/templates/components/header/_template.header.header__offcanvasButton.njk +2 -1
- package/src/templates/components/header/_template.header.header__subnav.njk +33 -29
- package/src/templates/components/header/_template.header.njk +70 -60
- package/src/templates/components/header-advanced/_examples.header-advanced.njk +46 -32
- package/src/templates/components/header-advanced/_template.header-advanced.njk +93 -90
- package/src/templates/components/header-mini/_examples.header-mini.njk +1 -1
- package/src/templates/components/hint/_examples.hint.njk +2 -2
- package/src/templates/components/hint/_template.hint.njk +1 -3
- package/src/templates/components/input-group/_template.input-group.njk +72 -68
- package/src/templates/components/item/_template.item.njk +23 -23
- package/src/templates/components/label/_template.label.njk +25 -14
- package/src/templates/components/links-list/_examples.links-list.njk +10 -12
- package/src/templates/components/links-list/_template.links-list.njk +35 -37
- package/src/templates/components/listbox/_template.listbox.njk +11 -11
- package/src/templates/components/menu-navigation/_template.menu-navigation.njk +62 -63
- package/src/templates/components/menu-vertical/_template.menu-vertical.njk +41 -41
- package/src/templates/components/menubar/_template.menubar.njk +91 -91
- package/src/templates/components/modal/_template.modal.njk +63 -53
- package/src/templates/components/nav/_template.nav.njk +13 -13
- package/src/templates/components/notification/_examples.notification.njk +0 -9
- package/src/templates/components/notification/_template.notification.njk +54 -44
- package/src/templates/components/pagination/_template.pagination.njk +37 -42
- package/src/templates/components/radios/_examples.radios.njk +49 -12
- package/src/templates/components/radios/_template.radios.njk +90 -84
- package/src/templates/components/searchbar/_template.searchbar.njk +6 -6
- package/src/templates/components/select/_template.select.njk +12 -12
- package/src/templates/components/status-item/_template.status-item.njk +23 -25
- package/src/templates/components/table/_template.table.njk +4 -4
- package/src/templates/components/table-advanced/_examples.table-advanced.njk +9 -9
- package/src/templates/components/table-advanced/_styles.table-advanced.css +3 -3
- package/src/templates/components/table-advanced/_template.table-advanced.njk +85 -83
- package/src/templates/components/tabs/_template.tabs.njk +39 -39
- package/src/templates/components/toggle/_template.toggle.njk +1 -2
- package/src/templates/components/tooltip/_template.tooltip.njk +19 -19
- package/src/templates/components/tree/_template.tree.njk +46 -42
|
@@ -32,34 +32,29 @@
|
|
|
32
32
|
{% set id = idPrefix + "-" + loop.index %}
|
|
33
33
|
{% endif %}
|
|
34
34
|
<li>
|
|
35
|
-
{% set prefix %}
|
|
36
|
-
|
|
37
|
-
{% endset %}
|
|
38
|
-
{% set suffix %}
|
|
39
|
-
<span class="sr-only"> (resultados del {{ loop.index | int * params.itemsPerPage | int }} al {% if ((loop.index | int + 1) * params.itemsPerPage | int) > ( params.totalItems | int ) %}{{ params.totalItems }}{% else %}{{ (loop.index | int + 1) * params.itemsPerPage | int }}{% endif %})</span>
|
|
40
|
-
{% endset %}
|
|
41
|
-
|
|
35
|
+
{% set prefix %}<span class="sr-only">Página </span>{% endset %}
|
|
36
|
+
{% set suffix %}<span class="sr-only"> (resultados del {{ loop.index | int * params.itemsPerPage | int }} al {% if ((loop.index | int + 1) * params.itemsPerPage | int) > ( params.totalItems | int ) %}{{ params.totalItems }}{% else %}{{ (loop.index | int + 1) * params.itemsPerPage | int }}{% endif %})</span>{% endset %}
|
|
42
37
|
{% if item.active %}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
{{ componentButton({
|
|
39
|
+
"html": '<strong>' + prefix | trim + loop.index + suffix | trim + '</strong>',
|
|
40
|
+
"href": "#",
|
|
41
|
+
"classes": "c-button--primary c-button--disabled mb-sm mr-sm",
|
|
42
|
+
"disabled": true,
|
|
43
|
+
"attributes": {
|
|
44
|
+
"id": id,
|
|
45
|
+
"aria-current": "page",
|
|
46
|
+
"tabindex": "-1"
|
|
47
|
+
}
|
|
48
|
+
}) | trim | indent(4) }}
|
|
54
49
|
{% else %}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
50
|
+
{{ componentButton({
|
|
51
|
+
"html": prefix + loop.index + suffix,
|
|
52
|
+
"href": "#",
|
|
53
|
+
"classes": "mb-sm mr-sm",
|
|
54
|
+
"attributes": {
|
|
55
|
+
"id": id
|
|
56
|
+
}
|
|
57
|
+
}) | trim | indent(4) }}
|
|
63
58
|
{% endif %}
|
|
64
59
|
</li>
|
|
65
60
|
{% endif %}
|
|
@@ -90,7 +85,7 @@
|
|
|
90
85
|
"attributes": {
|
|
91
86
|
"id": params.idPrefix + "-previous"
|
|
92
87
|
}
|
|
93
|
-
}) }}
|
|
88
|
+
}) | trim | indent(4) }}
|
|
94
89
|
{{ componentListbox({
|
|
95
90
|
"id": params.id + "-listbox",
|
|
96
91
|
"idPrefix": params.idPrefix,
|
|
@@ -103,7 +98,7 @@
|
|
|
103
98
|
"classes": "sr-only"
|
|
104
99
|
},
|
|
105
100
|
"items": params.items
|
|
106
|
-
}) }}
|
|
101
|
+
}) | trim | indent(4) }}
|
|
107
102
|
{{ componentButton({
|
|
108
103
|
"html": prefix + params.nextText + nextSuffix + '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="self-center h-2.5 w-2.5 ml-2" aria-hidden="true" focusable="false"><path d="M34 137.07a10 10 0 010-14.14l51.13-51.16a2.5 2.5 0 000-3.54L34 17.07A10 10 0 0148.11 2.93l56.46 56.46a15 15 0 010 21.22l-56.46 56.46a10 10 0 01-14.11 0z" fill="currentColor" /></svg>',
|
|
109
104
|
"href": "#",
|
|
@@ -112,30 +107,30 @@
|
|
|
112
107
|
"attributes": {
|
|
113
108
|
"id": params.idPrefix + "-next"
|
|
114
109
|
}
|
|
115
|
-
}) }}
|
|
110
|
+
}) | trim | indent(4) }}
|
|
116
111
|
</nav>
|
|
117
112
|
{% else %}
|
|
118
113
|
<nav {{- commonAttributes | safe }}>
|
|
119
114
|
<ul class="flex flex-wrap">
|
|
120
|
-
{{ innerHtml | trim | safe }}
|
|
115
|
+
{{ innerHtml | trim | safe | indent(4) }}
|
|
121
116
|
</ul>
|
|
122
117
|
</nav>
|
|
123
118
|
{% endif %}
|
|
124
119
|
{% if params.itemsListbox %}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
120
|
+
<div class="block relative -top-xs lg:ml-auto text-sm text-neutral-dark">
|
|
121
|
+
{{ componentListbox({
|
|
122
|
+
"id": "items-listbox-" + idPrefix,
|
|
123
|
+
"text": params.itemsPerPage,
|
|
124
|
+
"label": params.itemsListbox.label if params.itemsListbox.label else { "text": "Items por página: ", "classes": "inline-block align-middle mb-0" },
|
|
125
|
+
"doesChangeButtonText": true,
|
|
126
|
+
"classesContainer": "flex flex-wrap items-center gap-xs",
|
|
127
|
+
"classes": "c-listbox--sm c-listbox--transparent",
|
|
128
|
+
"items": params.itemsListbox.items
|
|
129
|
+
}) | indent(4) }}
|
|
130
|
+
</div>
|
|
136
131
|
{% endif %}
|
|
137
132
|
<p class="block relative -top-xs lg:ml-auto text-sm text-neutral-dark">
|
|
138
|
-
|
|
133
|
+
<span class="sr-only">Posición de paginación: </span>{{ activePosition | int * params.itemsPerPage | int }} - {{ (activePosition | int + 1) * params.itemsPerPage | int }} de {{ params.totalItems }}
|
|
139
134
|
</p>
|
|
140
135
|
</div>
|
|
141
136
|
<!-- /pagination -->
|
|
@@ -1,4 +1,41 @@
|
|
|
1
|
+
{% from "components/input/_macro.input.njk" import componentInput %}
|
|
2
|
+
|
|
1
3
|
{% set exampleComponent = "radios" %}
|
|
4
|
+
|
|
5
|
+
{% set telefonoContent %}
|
|
6
|
+
{{ componentInput({
|
|
7
|
+
"label": {
|
|
8
|
+
"text": "Número de teléfono"
|
|
9
|
+
},
|
|
10
|
+
"id": "telefono-a",
|
|
11
|
+
"name": "telefono-name"
|
|
12
|
+
}) }}
|
|
13
|
+
{% endset %}
|
|
14
|
+
|
|
15
|
+
{% set mobileContent %}
|
|
16
|
+
{{ componentInput({
|
|
17
|
+
"label": {
|
|
18
|
+
"text": "Número de teléfono móvil"
|
|
19
|
+
},
|
|
20
|
+
"id": "mobile-a",
|
|
21
|
+
"name": "mobile-name"
|
|
22
|
+
}) }}
|
|
23
|
+
{% endset %}
|
|
24
|
+
|
|
25
|
+
{% set mobileErrorContent %}
|
|
26
|
+
{{ componentInput({
|
|
27
|
+
"label": {
|
|
28
|
+
"text": "Número de teléfono móvil"
|
|
29
|
+
},
|
|
30
|
+
"id": "input-with-error-message-a",
|
|
31
|
+
"name": "test-name",
|
|
32
|
+
"errorMessage": {
|
|
33
|
+
"text": "Error: Este campo no puede estar vacío"
|
|
34
|
+
}
|
|
35
|
+
}) }}
|
|
36
|
+
{% endset %}
|
|
37
|
+
|
|
38
|
+
|
|
2
39
|
{% set examples = [
|
|
3
40
|
{
|
|
4
41
|
"name": "default",
|
|
@@ -355,21 +392,21 @@
|
|
|
355
392
|
"text": "Email",
|
|
356
393
|
"checked": true,
|
|
357
394
|
"conditional": {
|
|
358
|
-
"html":
|
|
395
|
+
"html": telefonoContent | trim | safe
|
|
359
396
|
}
|
|
360
397
|
},
|
|
361
398
|
{
|
|
362
399
|
"value": "phone",
|
|
363
400
|
"text": "Phone",
|
|
364
401
|
"conditional": {
|
|
365
|
-
"html":
|
|
402
|
+
"html": mobileContent | trim | safe
|
|
366
403
|
}
|
|
367
404
|
},
|
|
368
405
|
{
|
|
369
406
|
"value": "text",
|
|
370
407
|
"text": "Text message",
|
|
371
408
|
"conditional": {
|
|
372
|
-
"html":
|
|
409
|
+
"html": mobileContent | trim | safe
|
|
373
410
|
}
|
|
374
411
|
}
|
|
375
412
|
]
|
|
@@ -393,7 +430,7 @@
|
|
|
393
430
|
"checked": true,
|
|
394
431
|
"classes": "mr-sm",
|
|
395
432
|
"conditional": {
|
|
396
|
-
"html":
|
|
433
|
+
"html": telefonoContent | trim | safe
|
|
397
434
|
}
|
|
398
435
|
},
|
|
399
436
|
{
|
|
@@ -401,7 +438,7 @@
|
|
|
401
438
|
"text": "Phone",
|
|
402
439
|
"classes": "mr-sm",
|
|
403
440
|
"conditional": {
|
|
404
|
-
"html":
|
|
441
|
+
"html": mobileContent | trim | safe
|
|
405
442
|
}
|
|
406
443
|
},
|
|
407
444
|
{
|
|
@@ -409,7 +446,7 @@
|
|
|
409
446
|
"text": "Text message",
|
|
410
447
|
"classes": "mr-sm",
|
|
411
448
|
"conditional": {
|
|
412
|
-
"html":
|
|
449
|
+
"html": mobileContent | trim | safe
|
|
413
450
|
}
|
|
414
451
|
}
|
|
415
452
|
]
|
|
@@ -430,14 +467,14 @@
|
|
|
430
467
|
"value": "email",
|
|
431
468
|
"text": "Email",
|
|
432
469
|
"conditional": {
|
|
433
|
-
"html":
|
|
470
|
+
"html": telefonoContent | trim | safe
|
|
434
471
|
}
|
|
435
472
|
},
|
|
436
473
|
{
|
|
437
474
|
"value": "phone",
|
|
438
475
|
"text": "Phone",
|
|
439
476
|
"conditional": {
|
|
440
|
-
"html":
|
|
477
|
+
"html": mobileContent | trim | safe
|
|
441
478
|
}
|
|
442
479
|
},
|
|
443
480
|
{
|
|
@@ -445,7 +482,7 @@
|
|
|
445
482
|
"text": "Text message",
|
|
446
483
|
"checked": true,
|
|
447
484
|
"conditional": {
|
|
448
|
-
"html":
|
|
485
|
+
"html": mobileContent | trim | safe
|
|
449
486
|
}
|
|
450
487
|
}
|
|
451
488
|
]
|
|
@@ -469,7 +506,7 @@
|
|
|
469
506
|
"value": "email",
|
|
470
507
|
"text": "Email",
|
|
471
508
|
"conditional": {
|
|
472
|
-
"html":
|
|
509
|
+
"html": telefonoContent | trim | safe
|
|
473
510
|
}
|
|
474
511
|
},
|
|
475
512
|
{
|
|
@@ -477,14 +514,14 @@
|
|
|
477
514
|
"text": "Phone",
|
|
478
515
|
"checked": true,
|
|
479
516
|
"conditional": {
|
|
480
|
-
"html":
|
|
517
|
+
"html": mobileErrorContent | trim | safe
|
|
481
518
|
}
|
|
482
519
|
},
|
|
483
520
|
{
|
|
484
521
|
"value": "text",
|
|
485
522
|
"text": "Text message",
|
|
486
523
|
"conditional": {
|
|
487
|
-
"html":
|
|
524
|
+
"html": mobileContent | trim | safe
|
|
488
525
|
}
|
|
489
526
|
}
|
|
490
527
|
]
|
|
@@ -21,96 +21,97 @@
|
|
|
21
21
|
{#- Capture the HTML so we can optionally nest it in a fieldset -#}
|
|
22
22
|
{% set innerHtml %}
|
|
23
23
|
{% if params.hint %}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
{% set hintId = idPrefix + '-hint' %}
|
|
25
|
+
{% set describedBy = describedBy + ' ' + hintId if describedBy else hintId %}
|
|
26
|
+
{{ componentHint({
|
|
27
|
+
id: hintId,
|
|
28
|
+
classes: params.hint.classes,
|
|
29
|
+
attributes: params.hint.attributes,
|
|
30
|
+
html: params.hint.html,
|
|
31
|
+
text: params.hint.text
|
|
32
|
+
}) | trim | indent(2) }}
|
|
33
33
|
{% endif %}
|
|
34
34
|
{% if params.errorMessage %}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
{% set errorId = idPrefix + '-error' %}
|
|
36
|
+
{% set describedBy = describedBy + ' ' + errorId if describedBy else errorId %}
|
|
37
|
+
{{ componentErrorMessage({
|
|
38
|
+
id: errorId,
|
|
39
|
+
classes: params.errorMessage.classes,
|
|
40
|
+
attributes: params.errorMessage.attributes,
|
|
41
|
+
html: params.errorMessage.html,
|
|
42
|
+
text: params.errorMessage.text,
|
|
43
|
+
visuallyHiddenText: params.errorMessage.visuallyHiddenText
|
|
44
|
+
}) | trim | indent(2) }}
|
|
45
45
|
{% endif %}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
{% if item.conditional.html %}
|
|
100
|
-
<div class="mb-lg ml-5 pt-sm pb-base pl-6 origin-top-left border-l-2 border-primary-base c-radios__conditional-item" id="{{ conditionalId }}">
|
|
101
|
-
{{ item.conditional.html | safe }}
|
|
102
|
-
</div>
|
|
103
|
-
{% endif %}
|
|
46
|
+
<div class="c-radios {%- if params.classes %} {{ params.classes }}{% endif %}" data-module="c-radios"
|
|
47
|
+
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
|
48
|
+
{% for item in params.items %}
|
|
49
|
+
{% if item %}
|
|
50
|
+
<div class="{%- if params.hasDividers %} border-t border-b border-neutral-base -mb-px{% endif %} {%- if item.classes %} {{ item.classes }}{% endif %}{%- if item.conditional.html %} c-radios__conditional{% endif %} {%- if item.checked %} c-radios__conditional-active {% else %} c-radios__conditional-hidden {% endif %}">
|
|
51
|
+
|
|
52
|
+
{#- If the user explicitly sets an id, use this instead of the regular idPrefix -#}
|
|
53
|
+
{% if item.id %}
|
|
54
|
+
{% set id = item.id %}
|
|
55
|
+
{% else %}
|
|
56
|
+
{#- The first id should not have a number suffix so it's easy to link to from the error summary component -#}
|
|
57
|
+
{% if loop.first %}
|
|
58
|
+
{% set id = idPrefix %}
|
|
59
|
+
{% else %}
|
|
60
|
+
{% set id = idPrefix + "-" + loop.index %}
|
|
61
|
+
{% endif %}
|
|
62
|
+
{% endif %}
|
|
63
|
+
{% set conditionalId = "conditional-" + id %}
|
|
64
|
+
{% if item.divider %}
|
|
65
|
+
<div><p>{{ item.divider }}</p></div>
|
|
66
|
+
{% else %}
|
|
67
|
+
{% set hasHint = true if item.hint.text or item.hint.html %}
|
|
68
|
+
{% set itemHintId = id + '-item-hint' %}
|
|
69
|
+
|
|
70
|
+
<div>
|
|
71
|
+
<div class="relative flex items-start py-base">
|
|
72
|
+
<div class="flex items-center mx-sm">
|
|
73
|
+
<input class="w-6 h-6 text-primary-base transition duration-150 ease-in-out border-black focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-offset-0 focus:ring-warning-base disabled:bg-neutral-base disabled:border-neutral-base text-primary-base" id="{{ id }}" name="{{ params.name }}" type="radio" value="{{ item.value }}"
|
|
74
|
+
{{-" checked" if item.checked }}
|
|
75
|
+
{{-" disabled" if item.disabled }}
|
|
76
|
+
{%- if item.conditional.html %} data-aria-controls="{{ conditionalId }}"{% endif -%}
|
|
77
|
+
{%- if hasHint %} aria-describedby="{{ itemHintId }}"{% endif -%}
|
|
78
|
+
{%- if params.errorMessage %} aria-invalid="true"{% endif -%}
|
|
79
|
+
{%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="pt-0.5 leading-5">
|
|
82
|
+
{{ componentLabel({
|
|
83
|
+
html: item.html,
|
|
84
|
+
text: item.text,
|
|
85
|
+
classes: (item.label.classes if item.label.classes),
|
|
86
|
+
attributes: item.label.attributes,
|
|
87
|
+
for: id
|
|
88
|
+
}) | indent(10) | trim }}
|
|
89
|
+
{% if hasHint %}
|
|
90
|
+
{{ componentHint({
|
|
91
|
+
id: itemHintId,
|
|
92
|
+
classes: (item.hint.classes if item.hint.classes),
|
|
93
|
+
attributes: item.hint.attributes,
|
|
94
|
+
html: item.hint.html,
|
|
95
|
+
text: item.hint.text
|
|
96
|
+
}) | indent(10) | trim }}
|
|
104
97
|
{% endif %}
|
|
105
98
|
</div>
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
{% if item.conditional.html %}
|
|
102
|
+
<div class="mb-lg ml-5 pt-sm pb-base pl-6 origin-top-left border-l-2 border-primary-base c-radios__conditional-item" id="{{ conditionalId }}">
|
|
103
|
+
{{ item.conditional.html | safe | indent(6) }}
|
|
104
|
+
</div>
|
|
105
|
+
{% endif %}
|
|
106
|
+
{% endif %}
|
|
108
107
|
</div>
|
|
108
|
+
{% endif %}
|
|
109
|
+
{% endfor %}
|
|
110
|
+
</div>
|
|
109
111
|
{% endset -%}
|
|
110
112
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{% if params.fieldset %}
|
|
113
|
+
{% set radiosContent %}
|
|
114
|
+
{% if params.fieldset %}
|
|
114
115
|
{% call componentFieldset({
|
|
115
116
|
describedBy: describedBy,
|
|
116
117
|
errorId: errorId,
|
|
@@ -121,8 +122,13 @@
|
|
|
121
122
|
}) %}
|
|
122
123
|
{{ innerHtml | trim | safe }}
|
|
123
124
|
{% endcall %}
|
|
124
|
-
{% else %}
|
|
125
|
+
{% else %}
|
|
125
126
|
{{ innerHtml | trim | safe }}
|
|
126
|
-
{% endif %}
|
|
127
|
+
{% endif %}
|
|
128
|
+
{% endset %}
|
|
129
|
+
|
|
130
|
+
<!-- radios -->
|
|
131
|
+
<div class="c-form-group {%- if params.errorMessage %} c-form-group--error{% endif %} {%- if params.formGroup.classes %} {{ params.formGroup.classes }}{% endif %}">
|
|
132
|
+
{{ radiosContent | safe | indent(2) }}
|
|
127
133
|
</div>
|
|
128
134
|
<!-- /radios -->
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
isPageHeading: false,
|
|
17
17
|
attributes: params.label.attributes,
|
|
18
18
|
for: params.id
|
|
19
|
-
})
|
|
19
|
+
}) }}
|
|
20
20
|
<div class="relative {%- if params.button %} flex flex-wrap items-end{% endif %}">
|
|
21
21
|
<input class="c-input block pr-12 border-black rounded font-semibold placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base {%- if not params.button %} w-full{% endif %} {%- if params.classes %} {{ params.classes }}{% endif %} {%- if params.errorMessage %} border-alert-base ring-2 ring-alert-base {% endif %}" id="{{ params.id }}" name="{{ params.id }}" type="search"
|
|
22
22
|
{%- if params.value %} value="{{ params.value}}"{% endif %}
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
{{-" disabled" if params.disabled }}
|
|
27
27
|
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
28
28
|
{% if params.button %}
|
|
29
|
-
{{ componentButton(params.button)
|
|
29
|
+
{{ componentButton(params.button) | indent(2) }}
|
|
30
30
|
{% else %}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
<button type="submit" class="absolute top-0 right-0 m-sm p-0.5 text-primary-base hover:text-primary-dark focus:bg-warning-base focus:outline-none focus:shadow-outline-focus {%- if params.buttonClasses %} {{ params.buttonClasses }}{% endif %}" {%- if params.disabled %} disabled="disabled" aria-disabled="true"{% endif %}>
|
|
32
|
+
<span class="sr-only">Buscar</span>
|
|
33
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1.375em" height="1.375em" aria-hidden="true"><path d="M23.498 23.487a1.713 1.713 0 000-2.421l-4.572-4.575a.43.43 0 01-.062-.539 10.283 10.283 0 10-2.911 2.911.43.43 0 01.539.055l4.574 4.574a1.712 1.712 0 002.433-.005zM3.451 10.289a6.85 6.85 0 116.85 6.85 6.85 6.85 0 01-6.85-6.85z" fill="currentColor"/></svg>
|
|
34
|
+
</button>
|
|
35
35
|
{% endif %}
|
|
36
36
|
{% if params.errorMessage %}
|
|
37
37
|
{{ componentErrorMessage({
|
|
@@ -44,25 +44,25 @@
|
|
|
44
44
|
{% for item in params.items %}
|
|
45
45
|
{% if item %}
|
|
46
46
|
{% if item.optgroup %}
|
|
47
|
-
|
|
47
|
+
<optgroup {%- if item.optgroup.label %} label="{{ item.optgroup.label }}"{% endif %} {%- if item.optgroup.disabled %} disabled{% endif %}>
|
|
48
48
|
{% if item.optgroup.items %}
|
|
49
49
|
{% for sub in item.optgroup.items %}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
<option value="{{ sub.value }}"
|
|
51
|
+
{{-" selected" if sub.selected }}
|
|
52
|
+
{{-" disabled" if sub.disabled }}
|
|
53
|
+
{{-" hidden" if sub.hidden }}
|
|
54
|
+
{%- for attribute, value in sub.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>{{ sub.text }}</option>
|
|
55
55
|
{% endfor %}
|
|
56
56
|
{% endif %}
|
|
57
|
-
|
|
57
|
+
</optgroup>
|
|
58
58
|
{% for sub in item.optgroup.items %}
|
|
59
59
|
{% endfor %}
|
|
60
60
|
{% else %}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
<option value="{{ item.value }}"
|
|
62
|
+
{{-" selected" if item.selected }}
|
|
63
|
+
{{-" disabled" if item.disabled }}
|
|
64
|
+
{{-" hidden" if item.hidden }}
|
|
65
|
+
{%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>{{ item.text }}</option>
|
|
66
66
|
{% endif %}
|
|
67
67
|
{% endif %}
|
|
68
68
|
{% endfor %}
|
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
{%- set commonHtml %}
|
|
11
11
|
{% if params.title %}
|
|
12
|
-
|
|
13
|
-
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
14
|
-
</p>
|
|
12
|
+
<p class="{% if params.title.classes %}{{ params.title.classes }}{% else %}my-sm{% endif %}">{{ params.title.html | safe if params.title.html else params.title.text }}</p>
|
|
15
13
|
{% endif %}
|
|
16
14
|
{% if params.hint %}
|
|
17
15
|
{% set hintId = params.id + '-hint' %}
|
|
@@ -22,7 +20,7 @@
|
|
|
22
20
|
attributes: params.hint.attributes,
|
|
23
21
|
html: params.hint.html,
|
|
24
22
|
text: params.hint.text
|
|
25
|
-
}) | indent(
|
|
23
|
+
}) | trim | indent(6) }}
|
|
26
24
|
{% endif %}
|
|
27
25
|
{% if params.errorMessage %}
|
|
28
26
|
{% if not params.errorId %}
|
|
@@ -36,13 +34,13 @@
|
|
|
36
34
|
html: params.errorMessage.html,
|
|
37
35
|
text: params.errorMessage.text,
|
|
38
36
|
visuallyHiddenText: params.errorMessage.visuallyHiddenText
|
|
39
|
-
}) | indent(
|
|
37
|
+
}) | trim | indent(6) }}
|
|
40
38
|
{% endif %}
|
|
41
39
|
{% endset %}
|
|
42
40
|
|
|
43
41
|
|
|
44
42
|
{%- set innerItems %}
|
|
45
|
-
{
|
|
43
|
+
{%- for item in params.items %}
|
|
46
44
|
<div class="flex lg-flex-wrap {%- if item.classes %} {{ item.classes }}{% endif %}"
|
|
47
45
|
{%- for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
48
46
|
<dt class="{% if item.term.classes %}{{ item.term.classes }}{% else %}w-1/2 my-sm{% endif %}"
|
|
@@ -55,40 +53,40 @@
|
|
|
55
53
|
</dd>
|
|
56
54
|
</div>
|
|
57
55
|
{% endfor %}
|
|
58
|
-
{% endset
|
|
56
|
+
{% endset -%}
|
|
59
57
|
|
|
60
58
|
|
|
61
59
|
{%- set innerHtml %}
|
|
62
60
|
<div class="lg:flex lg:justify-between lg:items-start -my-px px-base py-sm border-t border-b border-neutral-base">
|
|
63
61
|
{% if params.items %}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
<div class="lg:w-2/3">
|
|
63
|
+
{{ commonHtml | safe | trim }}
|
|
64
|
+
<dl>
|
|
65
|
+
{{ innerItems | trim | safe | indent(6) }}
|
|
66
|
+
</dl>
|
|
67
|
+
</div>
|
|
70
68
|
{% else %}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
<div class="lg:w-2/3">
|
|
70
|
+
{{ commonHtml | safe | trim }}
|
|
71
|
+
</div>
|
|
74
72
|
{% endif %}
|
|
75
73
|
<div class="lg:flex lg:flex-wrap lg:items-center lg:1/3">
|
|
76
74
|
{% if caller %}
|
|
77
75
|
{% set myCaller = caller() %}
|
|
78
76
|
{% if myCaller | string != '' %}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
<div class="w-full lg:w-auto lg:text-right mt-base lg:mt-0 mb-base lg:mb-0">
|
|
78
|
+
{{ myCaller }}
|
|
79
|
+
</div>
|
|
82
80
|
{% endif %}
|
|
83
81
|
{% elseif params.caller %}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
<div class="w-full lg:w-auto lg:text-right mt-base lg:mt-0 mb-base lg:mb-0">
|
|
83
|
+
{{ params.caller | safe }}
|
|
84
|
+
</div>
|
|
87
85
|
{% endif %}
|
|
88
86
|
{% if params.status %}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
<div class="mb-base lg:mb-0 ml-base py-sm">
|
|
88
|
+
{{ componentStatus(params.status) | trim | indent(8) }}
|
|
89
|
+
</div>
|
|
92
90
|
{% endif %}
|
|
93
91
|
</div>
|
|
94
92
|
</div>
|