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
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
</li>
|
|
220
220
|
<li class="mb-xs">
|
|
221
221
|
<a class="c-link font-semibold" href="#6">
|
|
222
|
-
Accede a MiA, tu espacio digital<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="0.8em" width="0.8em" class="inline-block mx-xs no-underline align-baseline" aria-hidden="true" focusable="false" role="
|
|
222
|
+
Accede a MiA, tu espacio digital<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="0.8em" width="0.8em" class="inline-block mx-xs no-underline align-baseline" aria-hidden="true" focusable="false" role="presentation"><g><path fill="currentcolor" fill-rule="evenodd" d="M7.428571428571428 0.5714285714285714c-0.6311885714285713 0 -1.1428571428571428 0.5116742857142856 -1.1428571428571428 1.1428571428571428 0 0.6311771428571428 0.5116685714285714 1.1428571428571428 1.1428571428571428 1.1428571428571428h4.098057142857143L0.9061634285714285 13.477599999999999c-0.4463131428571428 0.4462857142857143 -0.4463131428571428 1.1699428571428572 0 1.6162285714285711 0.4463165714285714 0.4462857142857143 1.1699279999999999 0.4462857142857143 1.616248 0L13.142857142857142 4.473382857142857V8.571428571428571c0 0.6311771428571428 0.5116571428571428 1.1428571428571428 1.1428571428571428 1.1428571428571428s1.1428571428571428 -0.51168 1.1428571428571428 -1.1428571428571428v-6.857142857142857c0 -0.6311828571428572 -0.5116571428571428 -1.1428571428571428 -1.1428571428571428 -1.1428571428571428h-6.857142857142857Z" clip-rule="evenodd" stroke-width="1"></path></g></svg>
|
|
223
223
|
</a>
|
|
224
224
|
</li>
|
|
225
225
|
<li class="mb-xs">
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
{% if params.errorMessage %}
|
|
31
31
|
{% if not params.errorId %}
|
|
32
32
|
{% set errorId = params.id + '-error' %}
|
|
33
|
-
{% set describedBy = describedBy + ' ' + errorId if describedBy else errorId %}
|
|
34
33
|
{% endif %}
|
|
35
34
|
{{ componentErrorMessage({
|
|
36
35
|
id: errorId,
|
|
@@ -44,7 +43,7 @@
|
|
|
44
43
|
<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 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') }}"
|
|
45
44
|
{%- if params.value %} value="{{ params.value}}"{% endif %}
|
|
46
45
|
{%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %}
|
|
47
|
-
{%- if params.errorMessage or params.errorId %} aria-errormessage="{{ errorId }}" aria-invalid="true"
|
|
46
|
+
{%- if params.errorMessage or params.errorId %} aria-errormessage="{{ errorId }}" aria-invalid="true"{% endif %}
|
|
48
47
|
{%- if params.autocomplete %} autocomplete="{{ params.autocomplete}}"{% endif %}
|
|
49
48
|
{%- if params.pattern %} pattern="{{ params.pattern }}"{% endif %}
|
|
50
49
|
{%- if params.inputmode %} inputmode="{{ params.inputmode }}"{% endif %}
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"name": "num-doc-A",
|
|
113
113
|
"classes": "w-full lg:w-64",
|
|
114
114
|
"label": {
|
|
115
|
-
"text": "
|
|
115
|
+
"text": "Desde:",
|
|
116
116
|
"classes": "sr-only"
|
|
117
117
|
},
|
|
118
118
|
"placeholder": "Ej: 0"
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"name": "num-doc-B",
|
|
128
128
|
"classes": "w-full lg:w-64",
|
|
129
129
|
"label": {
|
|
130
|
-
"text": "
|
|
130
|
+
"text": "hasta:",
|
|
131
131
|
"classes": "sr-only"
|
|
132
132
|
},
|
|
133
133
|
"placeholder": "Ej: 600"
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
{% endif %}
|
|
24
24
|
{% if params.errorMessage %}
|
|
25
25
|
{% set errorId = params.id + "-error" %}
|
|
26
|
-
{% set describedBy = describedBy + " " + errorId if describedBy else errorId %}
|
|
27
26
|
{{ componentErrorMessage({
|
|
28
27
|
id: errorId,
|
|
29
28
|
classes: params.errorMessage.classes,
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
}) | indent(2) }}
|
|
52
51
|
{% endif %}
|
|
53
52
|
{% elseif item.divider %}
|
|
54
|
-
<div {%- if item.divider.classes %} class="{{ item.divider.classes }}{% endif %}" role="
|
|
53
|
+
<div {%- if item.divider.classes %} class="{{ item.divider.classes }}{% endif %}" role="presentation" aria-hidden="true">
|
|
55
54
|
{% if item.divider.html %}
|
|
56
55
|
{{ item.divider.html | filterquotes | safe }}
|
|
57
56
|
{% else %}
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
{
|
|
30
30
|
"name": "con descripción",
|
|
31
31
|
"data": {
|
|
32
|
+
"headingLevel": 4,
|
|
32
33
|
"title":{
|
|
33
34
|
"html": "Registro de alta de la asociación"
|
|
34
35
|
},
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
{
|
|
41
42
|
"name": "con items",
|
|
42
43
|
"data": {
|
|
44
|
+
"headingLevel": 4,
|
|
43
45
|
"title":{
|
|
44
46
|
"text": "Entidades locales de la Comunidad Autónoma de Aragón"
|
|
45
47
|
},
|
|
@@ -59,6 +61,7 @@
|
|
|
59
61
|
{
|
|
60
62
|
"name": "con contenido",
|
|
61
63
|
"data": {
|
|
64
|
+
"headingLevel": 4,
|
|
62
65
|
"title":{
|
|
63
66
|
"text": "Registro de alta de la asociación"
|
|
64
67
|
},
|
|
@@ -72,6 +75,7 @@
|
|
|
72
75
|
"name": "con acciones",
|
|
73
76
|
"description": "Utiliza el componente como un caller para anidar contenido. En este ejemplo el contenido es una lista de 2 botones de acciones. Para que sea accesible, cada botón debe tener un <code>aria-labelledby</code> que apunte al <code>id</code> de si mismo y al <code>id</code> del título. Muestra el código para verlo.",
|
|
74
77
|
"data": {
|
|
78
|
+
"headingLevel": 4,
|
|
75
79
|
"title":{
|
|
76
80
|
"text": "Registro de alta de la asociación",
|
|
77
81
|
"attributes": {
|
|
@@ -108,6 +112,7 @@
|
|
|
108
112
|
{
|
|
109
113
|
"name": "con icono tipo: documento",
|
|
110
114
|
"data": {
|
|
115
|
+
"headingLevel": 4,
|
|
111
116
|
"title": {
|
|
112
117
|
"text": "Resolución de años anteriores",
|
|
113
118
|
"attributes": {
|
|
@@ -126,6 +131,7 @@
|
|
|
126
131
|
{
|
|
127
132
|
"name": "con icono tipo: enlace",
|
|
128
133
|
"data": {
|
|
134
|
+
"headingLevel": 4,
|
|
129
135
|
"title": {
|
|
130
136
|
"text": "Lista de admitidos y excluidos de la convocatoria publicado en el BOA",
|
|
131
137
|
"attributes": {
|
|
@@ -133,7 +139,7 @@
|
|
|
133
139
|
}
|
|
134
140
|
},
|
|
135
141
|
"content":{
|
|
136
|
-
"html": "<a class=' c-link break-all ' href=' # '>
|
|
142
|
+
"html": "<a class=' c-link break-all ' href=' # '>Lista completa de admitidos (PDF, 20Kb)</a> "
|
|
137
143
|
},
|
|
138
144
|
"icon": {
|
|
139
145
|
"type": "link"
|
|
@@ -144,6 +150,7 @@
|
|
|
144
150
|
{
|
|
145
151
|
"name": "con icono tipo: portapapeles",
|
|
146
152
|
"data": {
|
|
153
|
+
"headingLevel": 4,
|
|
147
154
|
"title": {
|
|
148
155
|
"text": "Datos de la empresa",
|
|
149
156
|
"attributes": {
|
|
@@ -170,6 +177,7 @@
|
|
|
170
177
|
{
|
|
171
178
|
"name": "con icono personalizado",
|
|
172
179
|
"data": {
|
|
180
|
+
"headingLevel": 4,
|
|
173
181
|
"title": {
|
|
174
182
|
"text": "Lista de admitidos y excluidos de la convocatoria publicado en el BOA",
|
|
175
183
|
"attributes": {
|
|
@@ -177,7 +185,7 @@
|
|
|
177
185
|
}
|
|
178
186
|
},
|
|
179
187
|
"content":{
|
|
180
|
-
"html": "<a class=' c-link break-all ' href=' # '>
|
|
188
|
+
"html": "<a class=' c-link break-all ' href=' # '>Lista completa de admitidos (PDF, 20Kb)</a> "
|
|
181
189
|
},
|
|
182
190
|
"icon": {
|
|
183
191
|
"html": "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' width='1em' height='1em' class='w-8 h-8 text-neutral-dark' aria-label='Icono de papelera' focusable='false' role='img'><path d='M19.5 7.5h-15A.5.5 0 0 0 4 8v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a.5.5 0 0 0-.5-.5Zm-9.25 13a.75.75 0 0 1-1.5 0v-9a.75.75 0 0 1 1.5 0Zm5 0a.75.75 0 0 1-1.5 0v-9a.75.75 0 0 1 1.5 0ZM22 4h-4.75a.25.25 0 0 1-.25-.25V2.5A2.5 2.5 0 0 0 14.5 0h-5A2.5 2.5 0 0 0 7 2.5v1.25a.25.25 0 0 1-.25.25H2a1 1 0 0 0 0 2h20a1 1 0 0 0 0-2ZM9 3.75V2.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v1.25a.25.25 0 0 1-.25.25h-5.5A.25.25 0 0 1 9 3.75Z' fill='currentColor' transform='scale(2)'/></svg>"
|
|
@@ -189,6 +197,7 @@
|
|
|
189
197
|
"name": "con icono tipo: documento, alineado verticalmente arriba",
|
|
190
198
|
"description": "Usa el parámetro <code>containerClasses</code> del parámetro <code>icon</code> para añadir clases al contenedor del icono. Esto permite posicionarlo o cambiar de color. En este ejemplo el icono aparece alineado verticalmente arriba en vez de centrado.",
|
|
191
199
|
"data": {
|
|
200
|
+
"headingLevel": 4,
|
|
192
201
|
"title": {
|
|
193
202
|
"text": "Resolución de años anteriores",
|
|
194
203
|
"attributes": {
|
|
@@ -213,6 +222,7 @@
|
|
|
213
222
|
{
|
|
214
223
|
"name": "arrastrable con icono tipo: documento",
|
|
215
224
|
"data": {
|
|
225
|
+
"headingLevel": 4,
|
|
216
226
|
"title": {
|
|
217
227
|
"text": "Resolución de años anteriores",
|
|
218
228
|
"attributes": {
|
|
@@ -232,6 +242,7 @@
|
|
|
232
242
|
{
|
|
233
243
|
"name": "con clases, descripción, items, contenido y acciones",
|
|
234
244
|
"data": {
|
|
245
|
+
"headingLevel": 4,
|
|
235
246
|
"title":{
|
|
236
247
|
"text": "Registro de alta de la asociación",
|
|
237
248
|
"classes": "font-bold",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
{% if params.icon.html %}
|
|
17
17
|
{{ params.icon.html | filterquotes | safe }}
|
|
18
18
|
{% elseif params.icon.type == 'document' %}
|
|
19
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-8 h-8 text-neutral-dark" aria-label="
|
|
19
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-8 h-8 text-neutral-dark" aria-label="Documento" focusable="false" role="img"><path d="m15.32 2.15 4.53 4.53A.49.49 0 0 1 20 7v14.5a.5.5 0 0 1-.5.5h-15a.5.5 0 0 1-.5-.5v-19a.5.5 0 0 1 .5-.5H15a.49.49 0 0 1 .32.15ZM15.59 0H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.41a1 1 0 0 0-.29-.7L16.29.29a1 1 0 0 0-.7-.29Z" fill="currentColor" transform="scale(2)"/><path d="M16 11H7a1 1 0 0 1 0-2h9a1 1 0 0 1 0 2ZM16 15H7a1 1 0 0 1 0-2h9a1 1 0 0 1 0 2ZM11.5 19H7a1 1 0 0 1 0-2h4.5a1 1 0 0 1 0 2Z" fill="currentColor" transform="scale(2)"/></svg>
|
|
20
20
|
{% elseif params.icon.type == 'link' %}
|
|
21
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-8 h-8 text-neutral-dark" aria-label="
|
|
21
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-8 h-8 text-neutral-dark" aria-label="Enlace" focusable="false" role="img"><path d="M12.41 14.91a1 1 0 0 0-.55 1.3 1 1 0 0 1-.21 1.09l-2.83 2.83a2 2 0 0 1-2.83 0L3.87 18a2 2 0 0 1 0-2.83l2.83-2.82a1 1 0 0 1 1.09-.21 1 1 0 0 0 .76-1.85 3 3 0 0 0-3.27.65l-2.83 2.83a4 4 0 0 0 0 5.65l2.13 2.13a4 4 0 0 0 5.65 0l2.83-2.83a3 3 0 0 0 .65-3.27 1 1 0 0 0-1.3-.54Z" fill="currentColor" transform="scale(2)"/><path d="M7.76 16.24a1 1 0 0 0 1.41 0L17 8.46a1 1 0 0 0-1.41-1.41l-7.83 7.78a1 1 0 0 0 0 1.41Z" fill="currentColor" transform="scale(2)"/><path d="m21.55 4.57-2.13-2.12a4 4 0 0 0-5.65 0l-2.83 2.83a3 3 0 0 0-.88 2.12 3 3 0 0 0 .23 1.15 1 1 0 0 0 1.85-.76 1 1 0 0 1-.08-.39 1 1 0 0 1 .29-.7l2.83-2.83a2 2 0 0 1 2.83 0L20.13 6a2 2 0 0 1 0 2.83l-2.83 2.81a1 1 0 0 1-1.09.22 1 1 0 0 0-1.3.54 1 1 0 0 0 .54 1.31 3 3 0 0 0 3.27-.65l2.83-2.83a4 4 0 0 0 0-5.66Z" fill="currentColor" transform="scale(2)"/></svg>
|
|
22
22
|
{% elseif params.icon.type == 'clipboard' %}
|
|
23
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-8 h-8 text-neutral-dark" aria-label="
|
|
23
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-8 h-8 text-neutral-dark" aria-label="Datos" focusable="false" role="img"><path d="M16.5 9h-9a.75.75 0 0 0 0 1.5h9a.75.75 0 0 0 0-1.5ZM17.25 13.25a.76.76 0 0 0-.75-.75h-9a.75.75 0 0 0 0 1.5h9a.76.76 0 0 0 .75-.75ZM10 6.5h4a1 1 0 0 0 1-1V3A3 3 0 0 0 13.82.62 3 3 0 0 0 9 3.09V5.5a1 1 0 0 0 1 1Zm1.25-3.75a.75.75 0 1 1 .75.75.76.76 0 0 1-.75-.75Z" fill="currentColor" transform="scale(2)"/><path d="M19.5 3h-2.75a.25.25 0 0 0-.25.25v1.5a.25.25 0 0 0 .25.25H19a.5.5 0 0 1 .5.5v12.79a.51.51 0 0 1-.15.36l-3.2 3.2a.49.49 0 0 1-.36.15H5a.5.5 0 0 1-.5-.5v-16A.5.5 0 0 1 5 5h2.25a.25.25 0 0 0 .25-.25v-1.5A.25.25 0 0 0 7.25 3H4.5a2 2 0 0 0-2 2v17a2 2 0 0 0 2 2h15a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2Z" fill="currentColor" transform="scale(2)"/><path d="M7.5 16a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5Z" fill="currentColor" transform="scale(2)"/></svg>
|
|
24
24
|
{% endif %}
|
|
25
25
|
</div>
|
|
26
26
|
{% endif %}
|
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
<div class="flex items-center justify-center p-sm -ml-sm bg-neutral-lighter rounded-full text-4xl"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="1em" width="1em" class="inline-block align-middle" aria-label="Carpeta de documentos"><path d="M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z" fill="currentColor"></path></svg></div>
|
|
9
9
|
{% endset %}
|
|
10
10
|
|
|
11
|
+
{% set subitems %}
|
|
12
|
+
<ul class="-mr-lg -mb-base bg-white">
|
|
13
|
+
<li class="relative p-base border-t border-neutral-base hover:bg-neutral-light"><a href="#" class="c-link c-link--full c-link--no-underline flex items-center"><span class="flex-1">Subitem 1</span><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14" class="self-center inline-block" aria-hidden="true" focusable="false" width="1em" height="1em"><g><path fill="currentColor" fill-rule="evenodd" d="M3.4685 0.427C3.8512 0.0443 4.4717 0.0443 4.8545 0.427L10.388 5.9606C10.962 6.5346 10.962 7.4654 10.388 8.0395L4.8545 13.573C4.4717 13.9557 3.8512 13.9557 3.4685 13.573C3.0858 13.1903 3.0858 12.5698 3.4685 12.1871L8.6556 7L3.4685 1.813C3.0858 1.4303 3.0858 0.8098 3.4685 0.427Z" clip-rule="evenodd" stroke-width="1"></path></g></svg></a></li>
|
|
14
|
+
<li class="relative p-base border-t border-neutral-base hover:bg-neutral-light"><a href="#" class="c-link c-link--full c-link--no-underline flex items-center"><span class="flex-1">Subitem 2</span><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14" class="self-center inline-block" aria-hidden="true" focusable="false" width="1em" height="1em"><g><path fill="currentColor" fill-rule="evenodd" d="M3.4685 0.427C3.8512 0.0443 4.4717 0.0443 4.8545 0.427L10.388 5.9606C10.962 6.5346 10.962 7.4654 10.388 8.0395L4.8545 13.573C4.4717 13.9557 3.8512 13.9557 3.4685 13.573C3.0858 13.1903 3.0858 12.5698 3.4685 12.1871L8.6556 7L3.4685 1.813C3.0858 1.4303 3.0858 0.8098 3.4685 0.427Z" clip-rule="evenodd" stroke-width="1"></path></g></svg></a></li>
|
|
15
|
+
<li class="relative p-base border-t border-neutral-base hover:bg-neutral-light"><a href="#" class="c-link c-link--full c-link--no-underline flex items-center"><span class="flex-1">Subitem 3</span><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14" class="self-center inline-block" aria-hidden="true" focusable="false" width="1em" height="1em"><g><path fill="currentColor" fill-rule="evenodd" d="M3.4685 0.427C3.8512 0.0443 4.4717 0.0443 4.8545 0.427L10.388 5.9606C10.962 6.5346 10.962 7.4654 10.388 8.0395L4.8545 13.573C4.4717 13.9557 3.8512 13.9557 3.4685 13.573C3.0858 13.1903 3.0858 12.5698 3.4685 12.1871L8.6556 7L3.4685 1.813C3.0858 1.4303 3.0858 0.8098 3.4685 0.427Z" clip-rule="evenodd" stroke-width="1"></path></g></svg></a></li>
|
|
16
|
+
</ul>
|
|
17
|
+
{% endset %}
|
|
18
|
+
|
|
19
|
+
|
|
11
20
|
{% set examples = [
|
|
12
21
|
{
|
|
13
22
|
"name": "por defecto",
|
|
@@ -227,6 +236,29 @@
|
|
|
227
236
|
}
|
|
228
237
|
}
|
|
229
238
|
},
|
|
239
|
+
{
|
|
240
|
+
"name": "con containerClasses aplicado: con aspecto de cards y subitems",
|
|
241
|
+
"data": {
|
|
242
|
+
"idPrefix": "with-containerclasses",
|
|
243
|
+
"listClasses": "border border-transparent",
|
|
244
|
+
"items": [
|
|
245
|
+
{
|
|
246
|
+
"html": '<div class="relative hover:bg-neutral-light c-link c-link--no-underline -mt-base pt-base"><div class="px-base pb-base w-full flex items-center"><div class="flex items-center justify-center p-sm -ml-sm bg-neutral-lighter rounded-full text-4xl"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="1em" width="1em" class="inline-block align-middle" aria-label="Carpeta de documentos"><path d="M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z" fill="currentColor"></path></svg></div><a href="#" class="mx-base w-full align-middle font-semibold c-link c-link--full c-link--no-underline text-lg">Item 1</a><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14" class="self-center inline-block flex-none" aria-hidden="true" focusable="false" width="1em" height="1em"><g><path fill="currentColor" fill-rule="evenodd" d="M3.4685 0.427C3.8512 0.0443 4.4717 0.0443 4.8545 0.427L10.388 5.9606C10.962 6.5346 10.962 7.4654 10.388 8.0395L4.8545 13.573C4.4717 13.9557 3.8512 13.9557 3.4685 13.573C3.0858 13.1903 3.0858 12.5698 3.4685 12.1871L8.6556 7L3.4685 1.813C3.0858 1.4303 3.0858 0.8098 3.4685 0.427Z" clip-rule="evenodd" stroke-width="1"></path></g></svg></div>
|
|
247
|
+
</div>',
|
|
248
|
+
"containerClasses": "border border-neutral-base rounded",
|
|
249
|
+
"iconRight": {
|
|
250
|
+
"type": "none"
|
|
251
|
+
},
|
|
252
|
+
"sub": {
|
|
253
|
+
"html": subitems | safe
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"attributes": {
|
|
258
|
+
"aria-label": "Menú destacado"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
230
262
|
{
|
|
231
263
|
"name": "con item deshabilitado",
|
|
232
264
|
"data": {
|
|
@@ -58,7 +58,7 @@ treat it as an interactive element - without this it will be
|
|
|
58
58
|
{% endif %}
|
|
59
59
|
{% endif %}
|
|
60
60
|
{% set commonItemAttributes %}{% if id %} id="{{ id }}"{% endif %} {%- if item.title %} title="{{ item.title }}"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}{% endset %}
|
|
61
|
-
<li role="option" class="flex items-center pr-base pl-lg py-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black {%- if item.classes %} {{ item.classes }}{% endif -%}" {%- if item.active %} aria-selected="true"{% endif -%} {{- commonItemAttributes | safe }}>
|
|
61
|
+
<li role="option" class="flex items-center pr-base pl-lg py-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black {%- if item.classes %} {{ item.classes }}{% endif -%}" {%- if item.active %} aria-selected="true"{% else %} aria-selected="false"{% endif -%} {{- commonItemAttributes | safe }}>
|
|
62
62
|
{{ item.html | filterquotes | safe if item.html else item.text }}
|
|
63
63
|
</li>
|
|
64
64
|
{% endif %}
|
|
@@ -66,7 +66,7 @@ treat it as an interactive element - without this it will be
|
|
|
66
66
|
{% endset -%}
|
|
67
67
|
|
|
68
68
|
<!-- listbox -->
|
|
69
|
-
<div data-module="c-listbox" class="{
|
|
69
|
+
<div data-module="c-listbox" class="relative {%- if params.classesContainer %} {{ params.classesContainer }}{% endif %}" {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
70
70
|
{% if params.label %}
|
|
71
71
|
<div id="{{ params.id }}-label" class="mb-sm {%- if params.label.classes %} {{ params.label.classes }}{% endif %}">
|
|
72
72
|
{% if params.label.html %}
|
|
@@ -77,7 +77,7 @@ treat it as an interactive element - without this it will be
|
|
|
77
77
|
</div>
|
|
78
78
|
{% endif %}
|
|
79
79
|
<button {{- commonAttributes | safe }} >
|
|
80
|
-
<span class="inline-flex self-center
|
|
80
|
+
<span class="inline-flex self-center align-middle">{%- if conditionalValue %} {{ conditionalValue }}{% else %}{{ params.html | filterquotes | safe if params.html else params.text }}{% endif %}</span>
|
|
81
81
|
{# Indentation is intentional to output HTML nicely #}
|
|
82
82
|
{{- iconHtml | safe | trim | indent(2, true) if iconHtml -}}
|
|
83
83
|
</button>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
28
|
"attributes": {
|
|
29
|
-
"aria-label": "
|
|
29
|
+
"aria-label": "Menú horizontal"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
},
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
],
|
|
59
59
|
"attributes": {
|
|
60
|
-
"aria-label": "
|
|
60
|
+
"aria-label": "Menú horizontal"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
},
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
}
|
|
90
90
|
],
|
|
91
91
|
"attributes": {
|
|
92
|
-
"aria-label": "
|
|
92
|
+
"aria-label": "Menú horizontal",
|
|
93
93
|
"id": "mi-menu-horizontal"
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -101,31 +101,46 @@
|
|
|
101
101
|
{
|
|
102
102
|
"href": "http://www.google.com",
|
|
103
103
|
"text": "Opción 1",
|
|
104
|
-
"target": "_blank"
|
|
104
|
+
"target": "_blank",
|
|
105
|
+
"attributes": {
|
|
106
|
+
"title": "Se abre en ventana nueva"
|
|
107
|
+
}
|
|
105
108
|
},
|
|
106
109
|
{
|
|
107
110
|
"href": "http://www.google.com",
|
|
108
111
|
"text": "Opción 2",
|
|
109
|
-
"target": "_blank"
|
|
112
|
+
"target": "_blank",
|
|
113
|
+
"attributes": {
|
|
114
|
+
"title": "Se abre en ventana nueva"
|
|
115
|
+
}
|
|
110
116
|
},
|
|
111
117
|
{
|
|
112
118
|
"href": "http://www.google.com",
|
|
113
119
|
"text": "Opción 3",
|
|
114
|
-
"target": "_blank"
|
|
120
|
+
"target": "_blank",
|
|
121
|
+
"attributes": {
|
|
122
|
+
"title": "Se abre en ventana nueva"
|
|
123
|
+
}
|
|
115
124
|
},
|
|
116
125
|
{
|
|
117
126
|
"href": "http://www.google.com",
|
|
118
127
|
"text": "Opción 4",
|
|
119
|
-
"target": "_blank"
|
|
128
|
+
"target": "_blank",
|
|
129
|
+
"attributes": {
|
|
130
|
+
"title": "Se abre en ventana nueva"
|
|
131
|
+
}
|
|
120
132
|
},
|
|
121
133
|
{
|
|
122
134
|
"href": "http://www.google.com",
|
|
123
135
|
"text": "Opción 5",
|
|
124
|
-
"target": "_blank"
|
|
136
|
+
"target": "_blank",
|
|
137
|
+
"attributes": {
|
|
138
|
+
"title": "Se abre en ventana nueva"
|
|
139
|
+
}
|
|
125
140
|
}
|
|
126
141
|
],
|
|
127
142
|
"attributes": {
|
|
128
|
-
"aria-label": "
|
|
143
|
+
"aria-label": "Menú horizontal"
|
|
129
144
|
}
|
|
130
145
|
}
|
|
131
146
|
},
|
|
@@ -148,7 +163,7 @@
|
|
|
148
163
|
],
|
|
149
164
|
"attributes": {
|
|
150
165
|
"id": "mi-menu-icons",
|
|
151
|
-
"aria-label": "
|
|
166
|
+
"aria-label": "Menú horizontal"
|
|
152
167
|
}
|
|
153
168
|
}
|
|
154
169
|
},
|
|
@@ -183,7 +198,7 @@
|
|
|
183
198
|
],
|
|
184
199
|
"attributes": {
|
|
185
200
|
"id": "mi-menu-links",
|
|
186
|
-
"aria-label": "
|
|
201
|
+
"aria-label": "Menú horizontal"
|
|
187
202
|
}
|
|
188
203
|
}
|
|
189
204
|
},
|
|
@@ -223,7 +238,7 @@
|
|
|
223
238
|
],
|
|
224
239
|
"attributes": {
|
|
225
240
|
"id": "mi-menu-links-divider",
|
|
226
|
-
"aria-label": "
|
|
241
|
+
"aria-label": "Menú horizontal"
|
|
227
242
|
}
|
|
228
243
|
}
|
|
229
244
|
},
|
|
@@ -258,7 +273,7 @@
|
|
|
258
273
|
],
|
|
259
274
|
"attributes": {
|
|
260
275
|
"id": "mi-menu-navigation-bar",
|
|
261
|
-
"aria-label": "
|
|
276
|
+
"aria-label": "Menú horizontal"
|
|
262
277
|
}
|
|
263
278
|
}
|
|
264
279
|
},
|
|
@@ -321,7 +336,7 @@
|
|
|
321
336
|
],
|
|
322
337
|
"attributes": {
|
|
323
338
|
"id": "mi-menu-navigation-bar",
|
|
324
|
-
"aria-label": "
|
|
339
|
+
"aria-label": "Menú horizontal"
|
|
325
340
|
}
|
|
326
341
|
}
|
|
327
342
|
},
|
|
@@ -356,7 +371,7 @@
|
|
|
356
371
|
],
|
|
357
372
|
"attributes": {
|
|
358
373
|
"id": "mi-menu-tabs-en-escritorio",
|
|
359
|
-
"aria-label": "
|
|
374
|
+
"aria-label": "Menú horizontal"
|
|
360
375
|
}
|
|
361
376
|
}
|
|
362
377
|
},
|
|
@@ -382,7 +397,7 @@
|
|
|
382
397
|
],
|
|
383
398
|
"attributes": {
|
|
384
399
|
"id": "mi-menu-tabs-en-movil",
|
|
385
|
-
"aria-label": "
|
|
400
|
+
"aria-label": "Menú horizontal"
|
|
386
401
|
}
|
|
387
402
|
}
|
|
388
403
|
},
|
|
@@ -414,7 +429,7 @@
|
|
|
414
429
|
}
|
|
415
430
|
],
|
|
416
431
|
"attributes": {
|
|
417
|
-
"aria-label": "
|
|
432
|
+
"aria-label": "Menú horizontal"
|
|
418
433
|
}
|
|
419
434
|
}
|
|
420
435
|
},
|
|
@@ -450,7 +465,7 @@
|
|
|
450
465
|
}
|
|
451
466
|
],
|
|
452
467
|
"attributes": {
|
|
453
|
-
"aria-label": "
|
|
468
|
+
"aria-label": "Menú horizontal"
|
|
454
469
|
}
|
|
455
470
|
}
|
|
456
471
|
},
|
|
@@ -460,7 +475,7 @@
|
|
|
460
475
|
"data": {
|
|
461
476
|
"attributes": {
|
|
462
477
|
"id": "nav-id-example",
|
|
463
|
-
"aria-label": "
|
|
478
|
+
"aria-label": "Menú horizontal"
|
|
464
479
|
},
|
|
465
480
|
"items": [
|
|
466
481
|
{
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
{% endif %}
|
|
17
17
|
<li>
|
|
18
18
|
{% if item.active %}
|
|
19
|
-
<a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="c-menu-horizontal__link c-menu-horizontal__active relative flex items-center px-base py-sm lg:py-base border border-transparent text-black hover:text-primary-base underline truncate focus:outline-none
|
|
20
|
-
{%- if item.disabled %} no-underline pointer-events-none{% endif -%} {%- if item.classes %} {{ item.classes }}{% endif -%}" {%- if item.title %} title="{{ item.title }}"{% endif -%} {%- if item.
|
|
19
|
+
<a {%- if id %} id="{{ id }}"{% endif %} {%- if not item.disabled %} href="{{ item.href }}"{% endif %} class="c-menu-horizontal__link c-menu-horizontal__active relative flex items-center px-base py-sm lg:py-base border border-transparent text-black hover:text-primary-base underline truncate focus:outline-none
|
|
20
|
+
{%- if item.disabled %} no-underline pointer-events-none{% endif -%} {%- if item.classes %} {{ item.classes }}{% endif -%}" {%- if item.title %} title="{{ item.title }}"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %} aria-current="page" {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
21
21
|
<strong class="flex items-center pointer-events-none font-bold">{{ item.html | filterquotes | safe if item.html else item.text }}</strong>
|
|
22
22
|
</a>
|
|
23
23
|
{% else %}
|
|
24
|
-
<a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="c-menu-horizontal__link relative flex items-center px-base py-sm lg:py-base border border-transparent text-black hover:text-primary-base underline truncate focus:outline-none
|
|
25
|
-
{%- if item.disabled %} no-underline pointer-events-none{% endif -%} {%- if item.classes %} {{ item.classes }}{% endif -%}" {%- if item.title %} title="{{ item.title }}"{% endif -%} {%- if item.
|
|
24
|
+
<a {%- if id %} id="{{ id }}"{% endif %} {%- if not item.disabled %} href="{{ item.href }}"{% endif %} class="c-menu-horizontal__link relative flex items-center px-base py-sm lg:py-base border border-transparent text-black hover:text-primary-base underline truncate focus:outline-none
|
|
25
|
+
{%- if item.disabled %} no-underline pointer-events-none{% endif -%} {%- if item.classes %} {{ item.classes }}{% endif -%}" {%- if item.title %} title="{{ item.title }}"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
26
26
|
<span class="flex items-center pointer-events-none">
|
|
27
27
|
{{ item.html | filterquotes | safe if item.html else item.text }}
|
|
28
28
|
</span>
|
|
@@ -744,29 +744,6 @@
|
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
},
|
|
747
|
-
{
|
|
748
|
-
"name": "con un texto de item muy largo",
|
|
749
|
-
"data": {
|
|
750
|
-
"idPrefix": "with-very-ling-text-example",
|
|
751
|
-
"items": [
|
|
752
|
-
{
|
|
753
|
-
"href": "#",
|
|
754
|
-
"text": "No debe haber enlaces de más de 250 caracteres, que es el máximo admitido en accesibilidad, con excepción de nombres de leyes. Nullam id dolor id nibh ultricies vehicula ut id elit. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Maecenas faucibus mollis interdum. Donec id elit non mi porta gravida at eget metus."
|
|
755
|
-
},
|
|
756
|
-
{
|
|
757
|
-
"href": "#",
|
|
758
|
-
"text": "No debe haber enlaces de más de 250 caracteres, que es el máximo admitido en accesibilidad, con excepción de nombres de leyes. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Donec sed odio dui. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Cras mattis consectetur purus sit amet fermentum."
|
|
759
|
-
},
|
|
760
|
-
{
|
|
761
|
-
"href": "#",
|
|
762
|
-
"text": "No debe haber enlaces de más de 250 caracteres, que es el máximo admitido en accesibilidad, con excepción de nombres de leyes. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Etiam porta sem malesuada magna mollis euismod. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. Sed posuere consectetur est at lobortis."
|
|
763
|
-
}
|
|
764
|
-
],
|
|
765
|
-
"attributes": {
|
|
766
|
-
"aria-label": "Menu navigation"
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
},
|
|
770
747
|
{
|
|
771
748
|
"name": "con deshabilitado o sin href en un padre e hijo",
|
|
772
749
|
"data": {
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
<li class="relative">
|
|
28
28
|
{% if item.href %}
|
|
29
29
|
<a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="c-menu-navigation__button {%- if item.disabled %} c-menu-navigation__button--disabled{% endif %} {%- if item.active %} c-menu-navigation__button--primary{% endif %} {%- if item.active %} c-menu-navigation__button--has-selection{% endif %} {%- if item.classes %} {{ item.classes }}{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %}{%- if item.active %} aria-current="page"{% endif %} {% if item.disabled %} role="link" aria-disabled="true" tabindex="-1"{% endif %} {% if item.target %} target="{{ item.target }}"{% endif %}{%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
30
|
-
<span class="inline-flex self-center
|
|
30
|
+
<span class="inline-flex self-center align-middle pointer-events-none">{{ item.html | filterquotes | safe if item.html else item.text }}</span>
|
|
31
31
|
</a>
|
|
32
32
|
{% else %}
|
|
33
33
|
<button {%- if item.sub %} aria-expanded="true" aria-haspopup="true" aria-controls="{{ id }}-sub-list"{% endif %}
|
|
34
|
-
{%- if id %} id="{{ id }}"{% endif %} class="c-menu-navigation__button {%- if item.disabled %} c-menu-navigation__button--disabled{% endif %} {%- if item.active %} c-menu-navigation__button--primary{% endif %} {%- if item.active %} c-menu-navigation__button--has-selection{% endif %} {%- if item.classes %} {{ item.classes }}{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %} {% if item.disabled %} aria-disabled="true" tabindex="-1"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>{% if item.active %}<span class="sr-only">Item activo: </span>{% endif %}<span class="inline-flex self-center
|
|
34
|
+
{%- if id %} id="{{ id }}"{% endif %} class="c-menu-navigation__button {%- if item.disabled %} c-menu-navigation__button--disabled{% endif %} {%- if item.active %} c-menu-navigation__button--primary{% endif %} {%- if item.active %} c-menu-navigation__button--has-selection{% endif %} {%- if item.classes %} {{ item.classes }}{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %} {% if item.disabled %} aria-disabled="true" tabindex="-1"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>{% if item.active %}<span class="sr-only">Item activo: </span>{% endif %}<span class="inline-flex self-center align-middle pointer-events-none">{{ item.html | filterquotes | safe if item.html else item.text }}</span>
|
|
35
35
|
{# Indentation is intentional to output HTML nicely #}
|
|
36
36
|
{{- iconHtml | safe | trim if iconHtml -}}
|
|
37
37
|
</button>
|
|
@@ -57,9 +57,7 @@
|
|
|
57
57
|
</a>
|
|
58
58
|
</li>
|
|
59
59
|
{% if subitem.divider %}
|
|
60
|
-
<li class="my-sm border-b border-neutral-base">
|
|
61
|
-
<div class="sr-only">Separador</div>
|
|
62
|
-
</li>
|
|
60
|
+
<li role="presentation" aria-hidden="true" class="my-sm border-b border-neutral-base"></li>
|
|
63
61
|
{% endif %}
|
|
64
62
|
{% endif %}
|
|
65
63
|
{% endfor %}
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
{% endif %}
|
|
62
62
|
</li>
|
|
63
63
|
{% if subitem.divider %}
|
|
64
|
-
<li class="my-sm border-b border-neutral-base" aria-hidden="true">
|
|
64
|
+
<li class="my-sm border-b border-neutral-base" role="none" aria-hidden="true">
|
|
65
65
|
<div class="sr-only">Separador</div>
|
|
66
66
|
</li>
|
|
67
67
|
{% endif %}
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
{% endif %}
|
|
76
76
|
</li>
|
|
77
77
|
{% if item.divider %}
|
|
78
|
-
<li class="my-sm border-b border-neutral-base" aria-hidden="true">
|
|
78
|
+
<li class="my-sm border-b border-neutral-base" role="none" aria-hidden="true">
|
|
79
79
|
<div class="sr-only">Separador</div>
|
|
80
80
|
</li>
|
|
81
81
|
{% endif %}
|
|
@@ -71,6 +71,11 @@
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
|
|
74
|
+
.c-menubar__msg {
|
|
75
|
+
@apply hidden;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
74
79
|
.c-menubar__tooltip {
|
|
75
80
|
@apply hidden;
|
|
76
81
|
|
|
@@ -204,6 +209,11 @@
|
|
|
204
209
|
&.c-menubar__button--disabled:focus {
|
|
205
210
|
@apply bg-primary-light;
|
|
206
211
|
}
|
|
212
|
+
|
|
213
|
+
.c-menubar__msg {
|
|
214
|
+
@apply inline;
|
|
215
|
+
@apply sr-only;
|
|
216
|
+
}
|
|
207
217
|
}
|
|
208
218
|
|
|
209
219
|
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
<a href="#" role="menuitem" aria-haspopup="true" aria-expanded="false" class="c-menubar__button {%- if item.classes %} {{ item.classes }}{% endif %} {%- if item.disabled %} c-menubar__button--disabled{% endif %} {%- if item.active %} c-menubar__button--has-selection{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %} {% if item.disabled %} aria-disabled="true" tabindex="-1"{% endif %} id="{{ id }}"
|
|
27
27
|
{%- if item.sub.html %} data-aria-controls="{{ subId }}"{% endif %}
|
|
28
28
|
{%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
29
|
-
<span class="inline-flex self-center
|
|
29
|
+
<span class="inline-flex self-center align-middle">{{ item.html | filterquotes | safe if item.html else item.text }}</span>
|
|
30
|
+
<span class="c-menubar__msg">Con ítems seleccionados</span>
|
|
30
31
|
{# Indentation is intentional to output HTML nicely #}
|
|
31
32
|
{{- iconHtml | safe | trim if iconHtml -}}
|
|
32
33
|
</a>
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
</p>
|
|
53
53
|
{% endif %}
|
|
54
54
|
{% if params.items %}
|
|
55
|
-
<ul>
|
|
55
|
+
<ul class="mt-base">
|
|
56
56
|
{% for item in params.items %}
|
|
57
57
|
<li>
|
|
58
58
|
{% if item.href %}
|
|
59
|
-
<a href="{{ item.href }}" class="c-link {% if params.type == "alert" %} c-link--alert{% endif %}" {%- for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ item.html | filterquotes | safe if item.html else item.text }}</a>
|
|
59
|
+
<a href="{{ item.href }}" class="inline-block pb-sm c-link {% if params.type == "alert" %} c-link--alert{% endif %}" {%- for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ item.html | filterquotes | safe if item.html else item.text }}</a>
|
|
60
60
|
{% else %}
|
|
61
61
|
{{ item.html | filterquotes | safe if item.html else item.text }}
|
|
62
62
|
{% endif %}
|