desy-html 12.0.1 → 13.0.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/_include.template-header.njk +320 -326
- package/docs/_macro.example-render.njk +8 -8
- package/docs/ds/_ds.example.textos.njk +1 -1
- package/docs/ds/_ds.section.espaciado.njk +2 -2
- package/docs/ds/_ds.section.textos.njk +1 -1
- package/docs/ds/_ds.section.typography.njk +1 -1
- package/docs/index.html +14 -0
- package/docs/pagina-accesibilidad.html +1 -1
- package/docs/pagina-mapa-web.html +1 -1
- package/docs/plantilla-con-header-advanced.html +1 -1
- package/docs/plantilla-editar-con-cabecera-fija-y-sidebar-sticky.html +1 -1
- package/docs/plantilla-editar-con-cabecera-fija.html +1 -1
- package/docs/plantilla-logueado-con-cabecera-fija-headroom.html +1 -1
- package/docs/plantilla-logueado-con-cabecera-fija.html +1 -1
- package/docs/plantilla-logueado-con-selector-de-app-y-sidebar.html +1 -1
- package/docs/plantilla-logueado-con-selector-de-app-y-subheader.html +1 -1
- package/docs/plantilla-logueado-con-selector-de-app.html +1 -1
- package/docs/plantilla-logueado-con-titulo-de-app.html +1 -1
- package/docs/plantilla-sin-loguear.html +1 -1
- package/package.json +1 -1
- package/src/js/aria/MenuNavigation.js +4 -1
- package/src/js/aria/MenubarAction.js +100 -25
- package/src/js/aria/listbox.js +1 -1
- package/src/js/aria/tabs.js +0 -2
- package/src/js/desy-html.js +3 -11
- package/src/js/index.js +0 -2
- package/src/templates/components/accordion/_template.accordion.njk +7 -7
- package/src/templates/components/accordion-history/_template.accordion-history.njk +17 -17
- package/src/templates/components/alert/_examples.alert.njk +3 -3
- package/src/templates/components/breadcrumbs/_examples.breadcrumbs.njk +27 -27
- package/src/templates/components/breadcrumbs/_styles.breadcrumbs.css +7 -4
- package/src/templates/components/breadcrumbs/_template.breadcrumbs.njk +1 -1
- package/src/templates/components/button/_examples.button.njk +12 -13
- package/src/templates/components/button-loader/_examples.button-loader.njk +5 -5
- package/src/templates/components/button-loader/_template.button-loader.njk +1 -1
- package/src/templates/components/card/_examples.card.njk +25 -22
- package/src/templates/components/card/_template.card.njk +10 -10
- package/src/templates/components/character-count/_examples.character-count.njk +1 -1
- package/src/templates/components/checkboxes/_template.checkboxes.njk +2 -3
- package/src/templates/components/date-input/_template.date-input.njk +0 -1
- package/src/templates/components/datepicker/_template.datepicker.njk +1 -2
- package/src/templates/components/dropdown/_template.dropdown.njk +1 -1
- package/src/templates/components/error-summary/_template.error-summary.njk +1 -1
- package/src/templates/components/file-upload/_examples.file-upload.njk +6 -6
- package/src/templates/components/file-upload/_template.file-upload.njk +0 -1
- package/src/templates/components/footer/_template.footer.njk +2 -1
- package/src/templates/components/header/_examples.header.njk +5 -4
- package/src/templates/components/header/_template.header.header__navigation.njk +24 -26
- package/src/templates/components/header/_template.header.njk +1 -0
- package/src/templates/components/header-advanced/_examples.header-advanced.njk +63 -52
- package/src/templates/components/header-mini/_examples.header-mini.njk +1 -1
- package/src/templates/components/input/_template.input.njk +1 -2
- package/src/templates/components/input-group/_examples.input-group.njk +2 -2
- package/src/templates/components/input-group/_template.input-group.njk +1 -2
- package/src/templates/components/item/_examples.item.njk +13 -2
- package/src/templates/components/item/_template.item.njk +3 -3
- package/src/templates/components/links-list/_examples.links-list.njk +32 -0
- package/src/templates/components/listbox/_template.listbox.njk +3 -3
- package/src/templates/components/menu-horizontal/_examples.menu-horizontal.njk +34 -19
- package/src/templates/components/menu-horizontal/_styles.menu-horizontal.css +2 -1
- package/src/templates/components/menu-horizontal/_template.menu-horizontal.njk +4 -4
- package/src/templates/components/menu-navigation/_examples.menu-navigation.njk +0 -23
- package/src/templates/components/menu-navigation/_template.menu-navigation.njk +3 -5
- package/src/templates/components/menu-vertical/_template.menu-vertical.njk +2 -2
- package/src/templates/components/menubar/_styles.menubar.css +10 -0
- package/src/templates/components/menubar/_template.menubar.njk +2 -1
- package/src/templates/components/nav/_template.nav.njk +1 -1
- package/src/templates/components/notification/_template.notification.njk +2 -2
- package/src/templates/components/pagination/_template.pagination.njk +6 -6
- package/src/templates/components/pill/_examples.pill.njk +6 -6
- package/src/templates/components/radios/_template.radios.njk +1 -2
- package/src/templates/components/searchbar/_template.searchbar.njk +0 -1
- package/src/templates/components/select/_template.select.njk +0 -3
- package/src/templates/components/spinner/_template.spinner.njk +4 -0
- package/src/templates/components/status-item/_examples.status-item.njk +1 -1
- package/src/templates/components/table/_examples.table.njk +21 -298
- package/src/templates/components/table/_template.table.njk +2 -2
- package/src/templates/components/table/params.table.yaml +4 -0
- package/src/templates/components/table-advanced/_examples.table-advanced.njk +4 -184
- package/src/templates/components/table-advanced/_template.table-advanced.njk +5 -2
- package/src/templates/components/textarea/_template.textarea.njk +0 -1
- package/src/templates/components/toggle/_examples.toggle.njk +12 -12
- package/src/templates/components/tooltip/_template.tooltip.njk +1 -1
- package/src/js/aria/HeaderNavigation.js +0 -55
|
@@ -75,7 +75,8 @@
|
|
|
75
75
|
<li>
|
|
76
76
|
{{ componentButton({
|
|
77
77
|
"text": "Acceder a Tu área personal",
|
|
78
|
-
"classes": "c-button--primary"
|
|
78
|
+
"classes": "c-button--primary",
|
|
79
|
+
"href": "#"
|
|
79
80
|
}) }}
|
|
80
81
|
</li>
|
|
81
82
|
<li>
|
|
@@ -87,13 +88,15 @@
|
|
|
87
88
|
{% endset %}
|
|
88
89
|
|
|
89
90
|
{% macro postContent(id='id') %}
|
|
90
|
-
<
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
<
|
|
91
|
+
<div class="flex flex-col">
|
|
92
|
+
<h3 id="titulo-card-{{ id }}" class="c-h3">Título de noticia</h3>
|
|
93
|
+
<p class="order-first c-paragraph-sm mb-base">
|
|
94
|
+
<svg viewBox="0 0 16 16" height="1em" width="1em" class="inline-block align-middle w-6 h-6 mr-xs" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Fecha de publicación: "><path fill-rule="evenodd" clip-rule="evenodd" d="M11.4286 0C11.9019 0 12.2857 0.383755 12.2857 0.857143V1.71429H14C15.1046 1.71429 16 2.60971 16 3.71429V6.71526V8.14383V14C16 15.1046 15.1046 16 14 16H2C0.89543 16 0 15.1046 0 14V8.14383V6.71526V3.71429C0 2.60971 0.895431 1.71429 2 1.71429H3.71429V0.857143C3.71429 0.383755 4.09805 0 4.57143 0C5.04481 0 5.42857 0.383755 5.42857 0.857143V1.71429H10.5714V0.857143C10.5714 0.383755 10.9552 0 11.4286 0ZM3.71429 3.42857V4.28571C3.71429 4.7591 4.09805 5.14286 4.57143 5.14286C5.04481 5.14286 5.42857 4.7591 5.42857 4.28571V3.42857H10.5714V4.28571C10.5714 4.7591 10.9552 5.14286 11.4286 5.14286C11.9019 5.14286 12.2857 4.7591 12.2857 4.28571V3.42857H14C14.1578 3.42857 14.2857 3.55649 14.2857 3.71429V6.32171C14.1944 6.29822 14.0986 6.28571 14 6.28571H2C1.90134 6.28571 1.8056 6.29822 1.71429 6.32171V3.71429C1.71429 3.55649 1.84221 3.42857 2 3.42857H3.71429Z" fill="#1F2331"></path></svg>
|
|
95
|
+
<strong>18 octubre 2022</strong>
|
|
96
|
+
</p>
|
|
97
|
+
<div class="prose max-w-none mb-base">
|
|
98
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
|
|
99
|
+
</div>
|
|
97
100
|
</div>
|
|
98
101
|
{{ verDetalleButton(id) | safe }}
|
|
99
102
|
{% endmacro %}
|
|
@@ -138,7 +141,7 @@
|
|
|
138
141
|
"name": "barra lateral simple",
|
|
139
142
|
"data": {
|
|
140
143
|
"classes": "lg:w-1/3",
|
|
141
|
-
"containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
144
|
+
"containerClasses": "flex flex-col p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
142
145
|
"caller": withButton("2").val | indent(4)
|
|
143
146
|
}
|
|
144
147
|
},
|
|
@@ -146,12 +149,12 @@
|
|
|
146
149
|
"name": "con super",
|
|
147
150
|
"data": {
|
|
148
151
|
"classes": "lg:w-1/3",
|
|
149
|
-
"containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
152
|
+
"containerClasses": "flex flex-col p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
150
153
|
"caller": withButton("3").val | indent(4),
|
|
151
154
|
"super": {
|
|
152
155
|
"backgroundFullColor": "transparent",
|
|
153
156
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
154
|
-
"classes": "h-60 -m-base mb-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
157
|
+
"classes": "order-first h-60 -m-base mb-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
155
158
|
"attributes": {
|
|
156
159
|
"role": "img",
|
|
157
160
|
"aria-label": "Alt de la imagen"
|
|
@@ -163,7 +166,7 @@
|
|
|
163
166
|
"name": "con sub",
|
|
164
167
|
"data": {
|
|
165
168
|
"classes": "lg:w-1/3",
|
|
166
|
-
"containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
169
|
+
"containerClasses": "flex flex-col p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
167
170
|
"caller": withButton("4").val | indent(4),
|
|
168
171
|
"sub": {
|
|
169
172
|
"backgroundFullColor": "transparent",
|
|
@@ -181,12 +184,12 @@
|
|
|
181
184
|
"description": "En móvil la imagen aparece en el área super.",
|
|
182
185
|
"data": {
|
|
183
186
|
"classes": "lg:w-2/3",
|
|
184
|
-
"containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
187
|
+
"containerClasses": "flex flex-col p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
185
188
|
"caller": withButton("5").val | indent(4),
|
|
186
189
|
"super": {
|
|
187
190
|
"backgroundFullColor": "transparent",
|
|
188
191
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
189
|
-
"classes": "lg:hidden h-60 -m-base mb-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
192
|
+
"classes": "lg:hidden order-first h-60 -m-base mb-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
190
193
|
"attributes": {
|
|
191
194
|
"role": "img",
|
|
192
195
|
"aria-label": "Alt de la imagen"
|
|
@@ -195,7 +198,7 @@
|
|
|
195
198
|
"left": {
|
|
196
199
|
"backgroundFullColor": "transparent",
|
|
197
200
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
198
|
-
"classes": "hidden lg:block w-1/2 -m-base mr-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
201
|
+
"classes": "hidden order-first lg:block w-1/2 -m-base mr-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
199
202
|
"attributes": {
|
|
200
203
|
"role": "img",
|
|
201
204
|
"aria-label": "Alt de la imagen"
|
|
@@ -208,12 +211,12 @@
|
|
|
208
211
|
"description": "En móvil la imagen aparece en el área super.",
|
|
209
212
|
"data": {
|
|
210
213
|
"classes": "lg:w-2/3",
|
|
211
|
-
"containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
214
|
+
"containerClasses": "flex flex-col p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
212
215
|
"caller": withButton("6").val | indent(4),
|
|
213
216
|
"super": {
|
|
214
217
|
"backgroundFullColor": "transparent",
|
|
215
218
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
216
|
-
"classes": "lg:hidden h-60 -m-base mb-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
219
|
+
"classes": "lg:hidden order-first h-60 -m-base mb-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
217
220
|
"attributes": {
|
|
218
221
|
"role": "img",
|
|
219
222
|
"aria-label": "Alt de la imagen"
|
|
@@ -241,12 +244,12 @@
|
|
|
241
244
|
{
|
|
242
245
|
"name": "Bloque de página de inicio con botones",
|
|
243
246
|
"data": {
|
|
244
|
-
"containerClasses": "p-lg bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
247
|
+
"containerClasses": "flex flex-col p-lg bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
245
248
|
"caller": areaPersonalContent | indent(4),
|
|
246
249
|
"super": {
|
|
247
250
|
"backgroundFullColor": "transparent",
|
|
248
251
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.png&text=Imagen",
|
|
249
|
-
"classes": "lg:hidden h-72 -m-lg mb-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
252
|
+
"classes": "lg:hidden order-first h-72 -m-lg mb-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
250
253
|
"attributes": {
|
|
251
254
|
"role": "img",
|
|
252
255
|
"aria-label": "Alt de la imagen"
|
|
@@ -268,12 +271,12 @@
|
|
|
268
271
|
"description": "Image with fixed dimensions in desktop, text flexible.",
|
|
269
272
|
"data": {
|
|
270
273
|
"classes": "lg:w-3/4",
|
|
271
|
-
"containerClasses": "p-lg bg-neutral-lighter",
|
|
274
|
+
"containerClasses": "flex flex-col p-lg bg-neutral-lighter",
|
|
272
275
|
"caller": postContent("7").val | indent(4),
|
|
273
276
|
"super": {
|
|
274
277
|
"backgroundFullColor": "transparent",
|
|
275
278
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
276
|
-
"classes": "lg:hidden h-56 -m-lg mb-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
279
|
+
"classes": "lg:hidden order-first h-56 -m-lg mb-base bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
277
280
|
"attributes": {
|
|
278
281
|
"role": "img",
|
|
279
282
|
"aria-label": "Alt de la imagen"
|
|
@@ -282,7 +285,7 @@
|
|
|
282
285
|
"left": {
|
|
283
286
|
"backgroundFullColor": "transparent",
|
|
284
287
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
285
|
-
"classes": "hidden lg:block w-72 -m-lg mr-lg bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
288
|
+
"classes": "hidden order-first lg:block w-72 -m-lg mr-lg bg-cover bg-center bg-no-repeat overflow-hidden",
|
|
286
289
|
"attributes": {
|
|
287
290
|
"role": "img",
|
|
288
291
|
"aria-label": "Alt de la imagen"
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
<!-- card -->
|
|
2
2
|
<div {%- if params.classes %} class="{{ params.classes }}"{% endif %} {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
3
3
|
<div {%- if params.containerClasses %} class="{{ params.containerClasses }}"{% endif %}>
|
|
4
|
-
{% if params.super %}
|
|
5
|
-
<div class="{% if params.super.classes %}{{ params.super.classes }}{% else-%} h-32 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.super.backgroundFullColor }}; {% if params.super.backgroundFullUrl %} background-image: url('{{ params.super.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.super.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
6
|
-
{{ params.super.html | filterquotes | safe if params.super.html}}
|
|
7
|
-
</div>
|
|
8
|
-
{% endif %}
|
|
9
4
|
<div class="flex">
|
|
10
|
-
{% if params.left %}
|
|
11
|
-
<div class="{% if params.left.classes %}{{ params.left.classes }}{% else-%} w-1/2 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.left.backgroundFullColor }}; {% if params.left.backgroundFullUrl %} background-image: url('{{ params.left.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.left.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
12
|
-
{{ params.left.html | filterquotes | safe if params.left.html}}
|
|
13
|
-
</div>
|
|
14
|
-
{% endif %}
|
|
15
5
|
<div {%- if params.left or params.right %} class="flex-1"{% endif %}>
|
|
16
6
|
{% if caller %}
|
|
17
7
|
{{ caller() | indent(4) }} {#- if statement allows usage of `call` to be optional -#}
|
|
@@ -19,12 +9,22 @@
|
|
|
19
9
|
{{ params.caller | safe | indent(4) }}
|
|
20
10
|
{% endif %}
|
|
21
11
|
</div>
|
|
12
|
+
{% if params.left %}
|
|
13
|
+
<div class="{% if params.left.classes %}{{ params.left.classes }}{% else-%} lg:order-first w-1/2 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.left.backgroundFullColor }}; {% if params.left.backgroundFullUrl %} background-image: url('{{ params.left.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.left.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
14
|
+
{{ params.left.html | filterquotes | safe if params.left.html}}
|
|
15
|
+
</div>
|
|
16
|
+
{% endif %}
|
|
22
17
|
{% if params.right %}
|
|
23
18
|
<div class="{% if params.right.classes %}{{ params.right.classes }}{% else-%} w-1/2 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.right.backgroundFullColor }}; {% if params.right.backgroundFullUrl %} background-image: url('{{ params.right.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.right.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
24
19
|
{{ params.right.html | filterquotes | safe if params.right.html}}
|
|
25
20
|
</div>
|
|
26
21
|
{% endif %}
|
|
27
22
|
</div>
|
|
23
|
+
{% if params.super %}
|
|
24
|
+
<div class="{% if params.super.classes %}{{ params.super.classes }}{% else-%} order-first h-32 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.super.backgroundFullColor }}; {% if params.super.backgroundFullUrl %} background-image: url('{{ params.super.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.super.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
25
|
+
{{ params.super.html | filterquotes | safe if params.super.html}}
|
|
26
|
+
</div>
|
|
27
|
+
{% endif %}
|
|
28
28
|
{% if params.sub %}
|
|
29
29
|
<div class="{% if params.sub.classes %}{{ params.sub.classes }}{% else-%} h-32 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.sub.backgroundFullColor }}; {% if params.sub.backgroundFullUrl %} background-image: url('{{ params.sub.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.sub.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
30
30
|
{{ params.sub.html | filterquotes | safe if params.sub.html}}
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
|
|
42
42
|
{% if params.errorMessage %}
|
|
43
43
|
{% set errorId = idPrefix + '-error' %}
|
|
44
|
-
{% set describedBy = describedBy + ' ' + errorId if describedBy else errorId %}
|
|
45
44
|
{{ componentErrorMessage({
|
|
46
45
|
id: errorId,
|
|
47
46
|
classes: params.errorMessage.classes,
|
|
@@ -75,11 +74,11 @@
|
|
|
75
74
|
<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-checkboxes__conditional{% endif %} {%- if item.checked %} c-checkboxes__conditional-active {%- elif item.isIndeterminate and not item.indeterminateChecked %} c-checkboxes__indeterminate {%- elif item.isIndeterminate and item.indeterminateChecked %} c-checkboxes__indeterminate c-checkboxes__indeterminate-active {% else %} c-checkboxes__conditional-hidden{% endif %}">
|
|
76
75
|
<div class="relative flex items-start py-base">
|
|
77
76
|
<div class="flex items-center mx-sm">
|
|
78
|
-
<input class="w-6 h-6 transition duration-150 ease-in-out border-black focus:border-black focus:
|
|
77
|
+
<input class="w-6 h-6 transition duration-150 ease-in-out border-black focus:border-black focus:outline-black focus:outline-1 focus:outline-offset-2 focus:ring-3 focus:ring-offset-0 focus:ring-warning-base disabled:bg-neutral-base disabled:border-neutral-base text-primary-base" id="{{ id }}" name="{{ name }}" type="checkbox" value="{{ item.value }}"
|
|
79
78
|
{{-" checked" if item.checked }}
|
|
80
79
|
{{-" disabled" if item.disabled }}
|
|
81
80
|
{%- if item.conditional.html %} aria-controls="{{ conditionalId }}"{% endif -%}
|
|
82
|
-
{%- if itemDescribedBy != " " %} aria-describedby="{{ itemDescribedBy }}"{% endif -%}
|
|
81
|
+
{%- if itemDescribedBy != " " %} aria-describedby="{{ itemDescribedBy | trim }}"{% endif -%}
|
|
83
82
|
{%- if params.errorMessage %} aria-invalid="true"{% endif -%}
|
|
84
83
|
{%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}
|
|
85
84
|
{%- if item.isIndeterminate or item.indeterminateChecked %} onclick="if (this.readOnly) this.checked=this.readOnly=false; else if (!this.checked) this.readOnly=this.indeterminate=true;"{% endif %}>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
{% set describedBy = params.describedBy if params.describedBy else "" %}
|
|
9
9
|
{% if params.errorMessage %}
|
|
10
10
|
{% set errorId = params.id + '-error' %}
|
|
11
|
-
{% set describedBy = describedBy + " " + errorId if describedBy else errorId %}
|
|
12
11
|
{% endif %}
|
|
13
12
|
{% set datepickerContent %}
|
|
14
13
|
{% if caller %}
|
|
@@ -68,7 +67,7 @@
|
|
|
68
67
|
<input class="c-input block mt-sm 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.dropdown %} pr-16 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.name }}" type="{{ params.type | default('text') }}"
|
|
69
68
|
{%- if params.value %} value="{{ params.value}}"{% endif %}
|
|
70
69
|
{%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %}
|
|
71
|
-
{%- if params.errorMessage or params.errorId %} aria-errormessage="{{ errorId }}" aria-invalid="true"
|
|
70
|
+
{%- if params.errorMessage or params.errorId %} aria-errormessage="{{ errorId }}" aria-invalid="true"{% endif %}
|
|
72
71
|
{%- if params.autocomplete %} autocomplete="{{ params.autocomplete}}"{% endif %}
|
|
73
72
|
{%- if params.pattern %} pattern="{{ params.pattern }}"{% endif %}
|
|
74
73
|
{%- if params.inputmode %} inputmode="{{ params.inputmode }}"{% endif %}
|
|
@@ -17,7 +17,7 @@ treat it as an interactive element - without this it will be
|
|
|
17
17
|
<!-- dropdown -->
|
|
18
18
|
<div data-module="c-dropdown" class="{% if params.classesContainer %}{{ params.classesContainer }}{% else %} relative{% endif %}">
|
|
19
19
|
<button {{- commonAttributes | safe }}>
|
|
20
|
-
<span class="inline-flex self-center
|
|
20
|
+
<span class="inline-flex self-center align-middle">{{ params.html | filterquotes | safe if params.html else params.text }}</span>
|
|
21
21
|
{# Indentation is intentional to output HTML nicely #}
|
|
22
22
|
{{- iconHtml | safe | trim | indent(2, true) if iconHtml -}}
|
|
23
23
|
</button>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
{% for item in params.errorList %}
|
|
38
38
|
<li>
|
|
39
39
|
{% if item.href %}
|
|
40
|
-
<a href="{{ item.href }}" class="c-link c-link--alert"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ item.html | filterquotes | safe if item.html else item.text }}</a>
|
|
40
|
+
<a href="{{ item.href }}" class="c-link c-link--alert inline-block pb-sm"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ item.html | filterquotes | safe if item.html else item.text }}</a>
|
|
41
41
|
{% else %}
|
|
42
42
|
{{ item.html | filterquotes | safe if item.html else item.text }}
|
|
43
43
|
{% endif %}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"label": {
|
|
9
9
|
"text": "Sube un archivo"
|
|
10
10
|
},
|
|
11
|
-
"classes": "overflow-x-auto max-w-64 lg:max-w-none"
|
|
11
|
+
"classes": "overflow-x-auto max-w-64 lg:w-full lg:max-w-none"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
{
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"hint": {
|
|
23
23
|
"text": "Tu foto puede estar en tus Imágenes, Fotos, Descargas o el Escritorio. O en una aplicación como Fotos."
|
|
24
24
|
},
|
|
25
|
-
"classes": "overflow-x-auto max-w-64 lg:max-w-none"
|
|
25
|
+
"classes": "overflow-x-auto max-w-64 lg:w-full lg:max-w-none"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
{
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"errorMessage": {
|
|
40
40
|
"text": "Error: esto es un mensaje de error"
|
|
41
41
|
},
|
|
42
|
-
"classes": "overflow-x-auto max-w-64 lg:max-w-none"
|
|
42
|
+
"classes": "overflow-x-auto max-w-64 lg:w-full lg:max-w-none"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
{
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"attributes": {
|
|
54
54
|
"accept": ".jpg, .jpeg, .png"
|
|
55
55
|
},
|
|
56
|
-
"classes": "overflow-x-auto max-w-64 lg:max-w-none"
|
|
56
|
+
"classes": "overflow-x-auto max-w-64 lg:w-full lg:max-w-none"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
{
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"text": "Sube un archivo",
|
|
66
66
|
"isPageHeading": true
|
|
67
67
|
},
|
|
68
|
-
"classes": "overflow-x-auto max-w-64 lg:max-w-none"
|
|
68
|
+
"classes": "overflow-x-auto max-w-64 lg:w-full lg:max-w-none"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
{
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"label": {
|
|
77
77
|
"text": "Sube un archivo"
|
|
78
78
|
},
|
|
79
|
-
"classes": "overflow-x-auto max-w-64 lg:max-w-none",
|
|
79
|
+
"classes": "overflow-x-auto max-w-64 lg:w-full lg:max-w-none",
|
|
80
80
|
"formGroup": {
|
|
81
81
|
"classes": "p-base bg-warning-light"
|
|
82
82
|
}
|
|
@@ -4,6 +4,7 @@ text-neutral-dark {{ params.classes if params.classes }}"
|
|
|
4
4
|
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
5
5
|
<div class="container mx-auto px-base {{ params.containerClasses if params.containerClasses }}">
|
|
6
6
|
{% if params.navigation | length %}
|
|
7
|
+
<h2 class="sr-only">{{ "Menú de pie de página" }}</h2>
|
|
7
8
|
<div class="flex flex-col lg:flex-row flex-wrap gap-base">
|
|
8
9
|
{% for nav in params.navigation %}
|
|
9
10
|
<div class="{%- if nav.classes %} {{ nav.classes }}{% else -%} flex-1{% endif %}">
|
|
@@ -70,7 +71,7 @@ text-neutral-dark {{ params.classes if params.classes }}"
|
|
|
70
71
|
<a
|
|
71
72
|
class="c-link c-link--neutral"
|
|
72
73
|
href="https://www.aragon.es/"
|
|
73
|
-
>Gobierno de Aragón</a>. Edificio Pignatelli.
|
|
74
|
+
>Gobierno de Aragón</a>. Edificio Pignatelli. Paseo María Agustín, 36. 50004 - Zaragoza - Teléfono: <a href="tel:+34976714000" class="c-link c-link--neutral">976 714 000</a>
|
|
74
75
|
</p>
|
|
75
76
|
</div>
|
|
76
77
|
{% endif %}
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
],
|
|
110
110
|
"attributes": {
|
|
111
|
-
"aria-label": "
|
|
111
|
+
"aria-label": "Menú principal"
|
|
112
112
|
}
|
|
113
113
|
}) | indent(12) }}
|
|
114
114
|
{% endset %}
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
{% set examples = [
|
|
201
201
|
{
|
|
202
202
|
"name": "por defecto",
|
|
203
|
-
"description": "El menú por defecto de las aplicaciones de la administración digital tiene un logo que enlaza a la página de inicio y un menu principal de navegación. El menu de navegación se oculta en mobile si no se añaden clases a navigation. El logotipo es simple, sin letras, si la app está diseñada para funcionarios. Junto al logo hay un texto que da nombre a la app en la que estamos. Puedes usar con javascript la función global <code>
|
|
203
|
+
"description": "El menú por defecto de las aplicaciones de la administración digital tiene un logo que enlaza a la página de inicio y un menu principal de navegación. El menu de navegación se oculta en mobile si no se añaden clases a navigation. El logotipo es simple, sin letras, si la app está diseñada para funcionarios. Junto al logo hay un texto que da nombre a la app en la que estamos. Puedes usar con javascript la función global <code>activateItemMenuNavigation(elementMenu, idItemSeleccionado)</code> para seleccionar un item de un menú, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateItemMenuNavigation('header-nav-item', 'page-catalogo')</code> para desactivar el item actual y activar el tercer item del header de la página.",
|
|
204
204
|
"data": {
|
|
205
205
|
"homepageUrl": "/",
|
|
206
206
|
"idPrefix": "mi-menu",
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
"subnav": {
|
|
259
259
|
"text": "Gestor de expedientes"
|
|
260
260
|
},
|
|
261
|
-
"customNavigationHtml": "<div class='relative flex justify-end items-center flex-1 gap-base'><div class='absolute -top-3 right-0 text-black'><a href='#'><svg class='w-5 h-5' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' aria-label='Notificaciones'><path d='M7.25 12.5h-1.5a.75.75 0 0 0 0 1.5h1.5a.75.75 0 0 0 0-1.5Z' fill='currentColor' transform='scale(3.42857)'/><g transform='scale(3.42857)'><circle cx='10.5' cy='2.5' r='2.5' fill='currentColor'/><path d='M11.5 10a1 1 0 0 1-1-1V6.74a.25.25 0 0 0-.24-.25 4 4 0 0 1-3.76-4 3.43 3.43 0 0 1 .11-.86.12.12 0 0 0 0-.1.15.15 0 0 0-.09 0 4 4 0 0 0-4 4V9a1 1 0 0 1-1 1 .5.5 0 0 0 0 1h10a.5.5 0 0 0 0-1Z' fill='currentColor'/></g></svg></a></div></div>"
|
|
261
|
+
"customNavigationHtml": "<div class='relative flex justify-end items-center flex-1 gap-base'><div class='absolute -top-3 right-0 text-black'><a href='#'><svg class='w-5 h-5' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' aria-label='Notificaciones' role='img'><path d='M7.25 12.5h-1.5a.75.75 0 0 0 0 1.5h1.5a.75.75 0 0 0 0-1.5Z' fill='currentColor' transform='scale(3.42857)'/><g transform='scale(3.42857)'><circle cx='10.5' cy='2.5' r='2.5' fill='currentColor'/><path d='M11.5 10a1 1 0 0 1-1-1V6.74a.25.25 0 0 0-.24-.25 4 4 0 0 1-3.76-4 3.43 3.43 0 0 1 .11-.86.12.12 0 0 0 0-.1.15.15 0 0 0-.09 0 4 4 0 0 0-4 4V9a1 1 0 0 1-1 1 .5.5 0 0 0 0 1h10a.5.5 0 0 0 0-1Z' fill='currentColor'/></g></svg></a></div></div>"
|
|
262
262
|
}
|
|
263
263
|
},
|
|
264
264
|
{
|
|
@@ -270,6 +270,7 @@
|
|
|
270
270
|
"href": "#content-center",
|
|
271
271
|
"classes": "ds-focus",
|
|
272
272
|
"attributes": {
|
|
273
|
+
"id": "skip-link",
|
|
273
274
|
"attr-example": "custom-data"
|
|
274
275
|
}
|
|
275
276
|
},
|
|
@@ -429,7 +430,7 @@
|
|
|
429
430
|
"text": "Gestor de expedientes"
|
|
430
431
|
},
|
|
431
432
|
"dropdown": {
|
|
432
|
-
"html": "<span class='block text-right'>Marta Pérez <
|
|
433
|
+
"html": "<span class='block text-right'><span class='block'>Marta Pérez</span> <span class='block'>(Administración)</span></span>",
|
|
433
434
|
"items": [
|
|
434
435
|
{
|
|
435
436
|
"text": "Perfil",
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
{
|
|
2
|
-
instead -#}
|
|
3
|
-
{% set idPrefix = params.idPrefix if params.idPrefix else "header-nav-item" %}
|
|
4
|
-
<!-- header__navigation -->
|
|
5
|
-
<nav id="{{ idPrefix }}" data-module="c-header-navigation" class="{{ params.classes if params.classes else 'hidden lg:block' }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
|
6
|
-
<ul class="ml-sm flex flex-wrap items-baseline">
|
|
7
|
-
{% for item in params.items %}
|
|
8
|
-
{% if item %}
|
|
9
|
-
<li>
|
|
10
|
-
{#- If the user explicitly sets an id, use this instead of the regular idPrefix -#}
|
|
11
|
-
{% if item.id %}
|
|
12
|
-
{% set id = item.id %}
|
|
13
|
-
{% else %}
|
|
14
|
-
{% set id = idPrefix + "-" + loop.index %}
|
|
15
|
-
{% endif %}
|
|
16
|
-
{% if item.active %}
|
|
1
|
+
{%- from "components/menu-navigation/_macro.menu-navigation.njk" import componentMenuNavigation -%}
|
|
17
2
|
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
{%- set navigationConfig = {
|
|
4
|
+
"classes": params.classes if params.classes else "hidden lg:block",
|
|
5
|
+
"idPrefix": params.idPrefix if params.idPrefix else "header-nav-item",
|
|
6
|
+
"items": [],
|
|
7
|
+
"attributes": params.attributes if params.attributes
|
|
8
|
+
} -%}
|
|
20
9
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
10
|
+
{%- for item in params.items -%}
|
|
11
|
+
{%- if item -%}
|
|
12
|
+
{%- set itemConfig = {
|
|
13
|
+
"text": item.text,
|
|
14
|
+
"html": item.html,
|
|
15
|
+
"href": item.href,
|
|
16
|
+
"target": item.target,
|
|
17
|
+
"active": item.active,
|
|
18
|
+
"attributes": item.attributes,
|
|
19
|
+
"id": item.id if item.id else (navigationConfig.idPrefix + "-" + loop.index),
|
|
20
|
+
"classes": "c-menu-navigation__button--header -mr-base"
|
|
21
|
+
} -%}
|
|
22
|
+
{%- set _ = navigationConfig.items.push(itemConfig) -%}
|
|
23
|
+
{%- endif -%}
|
|
24
|
+
{%- endfor -%}
|
|
25
|
+
|
|
26
|
+
{{ componentMenuNavigation(navigationConfig) }}
|