desy-html 8.2.1 → 8.3.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 +8 -1
- package/docs/catalogo.html +1 -0
- package/docs/componentes.html +1 -0
- package/docs/estilos.html +1 -0
- package/docs/examples-accordion-history.html +1 -0
- package/docs/examples-accordion.html +1 -0
- package/docs/examples-alert.html +1 -0
- package/docs/examples-breadcrumbs.html +1 -0
- package/docs/examples-button-loader.html +1 -0
- package/docs/examples-button.html +1 -0
- package/docs/examples-card.html +1 -0
- package/docs/examples-character-count.html +1 -0
- package/docs/examples-checkboxes.html +1 -0
- package/docs/examples-collapsible.html +1 -0
- package/docs/examples-date-input.html +1 -0
- package/docs/examples-description-list.html +1 -0
- package/docs/examples-details.html +1 -0
- package/docs/examples-dialog.html +1 -0
- package/docs/examples-dropdown.html +1 -0
- package/docs/examples-error-message.html +1 -0
- package/docs/examples-error-summary.html +1 -0
- package/docs/examples-fieldset.html +1 -0
- package/docs/examples-file-upload.html +1 -0
- package/docs/examples-footer.html +1 -0
- package/docs/examples-header-advanced.html +1 -0
- package/docs/examples-header-mini.html +1 -0
- package/docs/examples-header.html +1 -0
- package/docs/examples-hint.html +1 -0
- package/docs/examples-input-group.html +1 -0
- package/docs/examples-input.html +1 -0
- package/docs/examples-item.html +1 -0
- package/docs/examples-label.html +1 -0
- package/docs/examples-links-list.html +1 -0
- package/docs/examples-listbox.html +1 -0
- package/docs/examples-media-object.html +1 -0
- package/docs/examples-menu-horizontal.html +1 -0
- package/docs/examples-menu-navigation.html +1 -0
- package/docs/examples-menu-vertical.html +1 -0
- package/docs/examples-menubar.html +1 -0
- package/docs/examples-modal.html +1 -0
- package/docs/examples-nav.html +1 -0
- package/docs/examples-notification.html +1 -0
- package/docs/examples-pagination.html +1 -0
- package/docs/examples-pill.html +1 -0
- package/docs/examples-radios.html +1 -0
- package/docs/examples-searchbar.html +1 -0
- package/docs/examples-select.html +1 -0
- package/docs/examples-skip-link.html +1 -0
- package/docs/examples-spinner.html +1 -0
- package/docs/examples-status-item.html +1 -0
- package/docs/examples-status.html +1 -0
- package/docs/examples-table-advanced.html +1 -0
- package/docs/examples-table.html +1 -0
- package/docs/examples-tabs.html +1 -0
- package/docs/examples-textarea.html +1 -0
- package/docs/examples-toggle.html +1 -0
- package/docs/examples-tooltip.html +1 -0
- package/docs/examples-tree.html +1 -0
- package/docs/index.html +12 -0
- package/docs/plantillas.html +1 -0
- package/package.json +1 -1
- package/src/js/aria/HeaderNavigation.js +55 -0
- package/src/js/aria/MenuVertical.js +27 -43
- package/src/js/desy-html.js +14 -0
- package/src/js/index.js +3 -1
- package/src/templates/components/accordion/_template.accordion.njk +2 -12
- package/src/templates/components/accordion-history/_template.accordion-history.njk +2 -12
- package/src/templates/components/header/_template.header.header__navigation.njk +10 -15
- package/src/templates/components/links-list/_template.links-list.njk +1 -6
- package/src/templates/components/menu-horizontal/_template.menu-horizontal.njk +0 -5
- package/src/templates/components/menu-navigation/_template.menu-navigation.njk +2 -12
- package/src/templates/components/menu-vertical/_examples.menu-vertical.njk +1 -1
- package/src/templates/components/menu-vertical/_template.menu-vertical.njk +2 -12
- package/src/templates/components/menubar/_template.menubar.njk +3 -18
- package/src/templates/components/nav/_template.nav.njk +0 -5
- package/src/templates/components/pagination/_template.pagination.njk +0 -5
|
@@ -299,4 +299,11 @@
|
|
|
299
299
|
}) }}
|
|
300
300
|
</li>
|
|
301
301
|
</ul>
|
|
302
|
-
{% endcall %}
|
|
302
|
+
{% endcall %}
|
|
303
|
+
{% if activeSection != undefined %}
|
|
304
|
+
<script>
|
|
305
|
+
window.addEventListener("load", function(event) {
|
|
306
|
+
activateItemHeaderNavigation("header-navigation-header-nav-item", "{{ activeSection }}");
|
|
307
|
+
});
|
|
308
|
+
</script>
|
|
309
|
+
{% endif %}
|
package/docs/catalogo.html
CHANGED
package/docs/componentes.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Lista de componentes. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.default.njk" %}
|
|
3
4
|
|
|
4
5
|
{% from "components/menu-vertical/_macro.menu-vertical.njk" import componentMenuVertical %}
|
package/docs/estilos.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Accordion history. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/accordion-history/_examples.accordion-history.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Accordion. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/accordion/_examples.accordion.njk" as exampleData %}
|
package/docs/examples-alert.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Alert. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/alert/_examples.alert.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Breadcrumbs. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/breadcrumbs/_examples.breadcrumbs.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Button loader. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/button-loader/_examples.button-loader.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Button. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/button/_examples.button.njk" as exampleData %}
|
package/docs/examples-card.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Card. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/card/_examples.card.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Character count. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/character-count/_examples.character-count.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Checkboxes. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/checkboxes/_examples.checkboxes.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Collapsible. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/collapsible/_examples.collapsible.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Date input. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/date-input/_examples.date-input.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Description list. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/description-list/_examples.description-list.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Details. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/details/_examples.details.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Dialog. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/dialog/_examples.dialog.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Dropdown. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/dropdown/_examples.dropdown.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Error message. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/error-message/_examples.error-message.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Error summary. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/error-summary/_examples.error-summary.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Fieldset. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/fieldset/_examples.fieldset.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "File upload. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/file-upload/_examples.file-upload.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Footer. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/footer/_examples.footer.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Header advanced. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/header-advanced/_examples.header-advanced.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Header mini. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/header-mini/_examples.header-mini.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Header. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/header/_examples.header.njk" as exampleData %}
|
package/docs/examples-hint.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Hint. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/hint/_examples.hint.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Input group. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/input-group/_examples.input-group.njk" as exampleData %}
|
package/docs/examples-input.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Input. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/input/_examples.input.njk" as exampleData %}
|
package/docs/examples-item.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Item. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/item/_examples.item.njk" as exampleData %}
|
package/docs/examples-label.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Label. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/label/_examples.label.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Links list. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/links-list/_examples.links-list.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Listbox. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/listbox/_examples.listbox.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Media object. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/media-object/_examples.media-object.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Menu horizontal. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/menu-horizontal/_examples.menu-horizontal.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Menu navigation. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/menu-navigation/_examples.menu-navigation.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Menu vertical. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/menu-vertical/_examples.menu-vertical.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Menubar. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/menubar/_examples.menubar.njk" as exampleData %}
|
package/docs/examples-modal.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Modal. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/modal/_examples.modal.njk" as exampleData %}
|
package/docs/examples-nav.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Nav. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/nav/_examples.nav.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Notification. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/notification/_examples.notification.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Pagination. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/pagination/_examples.pagination.njk" as exampleData %}
|
package/docs/examples-pill.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Pill. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/pill/_examples.pill.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Radios. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/radios/_examples.radios.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Searchbar. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/searchbar/_examples.searchbar.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Select. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/select/_examples.select.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Skip link. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/skip-link/_examples.skip-link.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Spinner. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/spinner/_examples.spinner.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Status item. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/status-item/_examples.status-item.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Status. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/status/_examples.status.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Table advanced. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/table-advanced/_examples.table-advanced.njk" as exampleData %}
|
package/docs/examples-table.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Table. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/table/_examples.table.njk" as exampleData %}
|
package/docs/examples-tabs.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Tabs. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/tabs/_examples.tabs.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Textarea. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/textarea/_examples.textarea.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Toggle. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/toggle/_examples.toggle.njk" as exampleData %}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Tooltip. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/tooltip/_examples.tooltip.njk" as exampleData %}
|
package/docs/examples-tree.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set title = "Tree. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% set activeSection = "header-nav-item-4" %}
|
|
2
3
|
{% extends "_template.examples.njk" %}
|
|
3
4
|
{% block contentBlock %}
|
|
4
5
|
{% import "components/tree/_examples.tree.njk" as exampleData %}
|
package/docs/index.html
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{% set title = "Desy. Sistema de diseño para aplicaciones web. Gobierno de Aragón" %}
|
|
2
2
|
{% set description = "Documentación y librería desy-html para implementarlo en HTML, CSS y Javascript con un paquete NPM." %}
|
|
3
|
+
{% set activeSection = "header-nav-item-1" %}
|
|
3
4
|
{% extends "_template.default.njk" %}
|
|
4
5
|
{% block contentBlock %}
|
|
5
6
|
|
|
@@ -37,6 +38,17 @@
|
|
|
37
38
|
|
|
38
39
|
<h2>Changelog (English)</h2>
|
|
39
40
|
<p>What's new in the latest version of desy-html</p>
|
|
41
|
+
<h3>v.8.3.0</h3>
|
|
42
|
+
<ul class="text-sm">
|
|
43
|
+
<li>Added global function to select an item in Header navigation in Header and Header advanced components.</li>
|
|
44
|
+
<li>Docs now show the active section in header menu.</li>
|
|
45
|
+
<li>Minor fixes.</li>
|
|
46
|
+
</ul>
|
|
47
|
+
<h3>v.8.2.2</h3>
|
|
48
|
+
<ul class="text-sm">
|
|
49
|
+
<li>Fixed duplicate ids in subitems in components with subitems.</li>
|
|
50
|
+
<li>Minor fixes.</li>
|
|
51
|
+
</ul>
|
|
40
52
|
<h3>v.8.2.1</h3>
|
|
41
53
|
<ul class="text-sm">
|
|
42
54
|
<li>Minor fixes.</li>
|
package/docs/plantillas.html
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "desy-html",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
4
4
|
"description": "desy-html contains the code you need to start building a user interface for Gobierno de Aragón government webapps.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Desy (SDA Servicios Digitales de Aragón)",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export function HeaderNavigation(aria) {
|
|
2
|
+
(function () {
|
|
3
|
+
aria.HeaderNavigation = function (domNode) {
|
|
4
|
+
this.domNode = domNode;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
aria.HeaderNavigation.prototype.init = function () {
|
|
8
|
+
this.valueActive = this.domNode.dataset.menuActive;
|
|
9
|
+
if (this.valueActive) {
|
|
10
|
+
this.activateElement(this.valueActive);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
aria.HeaderNavigation.prototype.activateElement = function (elementActive) {
|
|
15
|
+
this.domNode.querySelectorAll('li').forEach((element) => {
|
|
16
|
+
const getLink = element.querySelector('a') || element.querySelector('span');
|
|
17
|
+
if (getLink) {
|
|
18
|
+
if (getLink.id === elementActive) {
|
|
19
|
+
this.wrapActiveElement(getLink);
|
|
20
|
+
} else {
|
|
21
|
+
this.deactivateElement(getLink);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
aria.HeaderNavigation.prototype.wrapActiveElement = function (elementActive) {
|
|
28
|
+
elementActive.setAttribute('aria-current', 'true');
|
|
29
|
+
elementActive.innerHTML = `<strong class="font-bold">${elementActive.textContent}</strong>`;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
aria.HeaderNavigation.prototype.deactivateElement = function (elementDeactivated) {
|
|
33
|
+
elementDeactivated.removeAttribute('aria-current');
|
|
34
|
+
elementDeactivated.innerHTML = elementDeactivated.textContent;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
window.activateItemHeaderNavigation = function (menuId, activeItemId) {
|
|
38
|
+
const menu = document.getElementById(menuId);
|
|
39
|
+
if (menu) {
|
|
40
|
+
const activeItem = document.querySelector(`#${menuId} #${activeItemId}`);
|
|
41
|
+
if (activeItem) {
|
|
42
|
+
const menuInstance = new aria.HeaderNavigation(menu);
|
|
43
|
+
menuInstance.activateElement(activeItemId);
|
|
44
|
+
return [menu, activeItem];
|
|
45
|
+
} else {
|
|
46
|
+
console.log('There is no element with this id in the menu.');
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
console.log('There is no menu with this id in the document.');
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}());
|
|
55
|
+
}
|
|
@@ -6,66 +6,50 @@ export function MenuVertical(aria) {
|
|
|
6
6
|
|
|
7
7
|
aria.MenuVertical.prototype.init = function () {
|
|
8
8
|
this.valueActive = this.domNode.dataset.menuActive;
|
|
9
|
-
if(this.valueActive) {
|
|
9
|
+
if (this.valueActive) {
|
|
10
10
|
this.activateElement(this.valueActive);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
aria.MenuVertical.prototype.activateElement = function (elementActive) {
|
|
15
|
-
this.domNode.querySelectorAll('li').forEach((element
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
if(
|
|
19
|
-
|
|
15
|
+
this.domNode.querySelectorAll('li').forEach((element) => {
|
|
16
|
+
const getLink = element.querySelector('a') || element.querySelector('span');
|
|
17
|
+
if (getLink) {
|
|
18
|
+
if (getLink.id === elementActive) {
|
|
19
|
+
this.wrapActiveElement(getLink);
|
|
20
20
|
} else {
|
|
21
|
-
|
|
21
|
+
this.deactivateElement(getLink);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
const getLink = element.querySelector('a');
|
|
26
|
-
processElement(getLink, this);
|
|
27
|
-
} else if (element.querySelector('span')) {
|
|
28
|
-
const getLink = element.querySelector('span');
|
|
29
|
-
processElement(getLink, this);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
})
|
|
24
|
+
});
|
|
33
25
|
};
|
|
34
26
|
|
|
35
27
|
aria.MenuVertical.prototype.wrapActiveElement = function (elementActive) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
elementActive.innerHTML = strongElement;
|
|
28
|
+
elementActive.setAttribute('aria-current', 'true');
|
|
29
|
+
elementActive.innerHTML = `<strong>${elementActive.textContent}</strong>`;
|
|
39
30
|
};
|
|
40
31
|
|
|
41
32
|
aria.MenuVertical.prototype.deactivateElement = function (elementDeactivated) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
elementDeactivated.innerHTML = strongElement;
|
|
33
|
+
elementDeactivated.removeAttribute('aria-current');
|
|
34
|
+
elementDeactivated.innerHTML = elementDeactivated.textContent;
|
|
45
35
|
};
|
|
46
36
|
|
|
47
|
-
window.activateItemMenuVertical = function (
|
|
48
|
-
menu.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
elem.innerHTML = strongElement;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (element.querySelector('a')) {
|
|
62
|
-
let getLink = element.querySelector('a');
|
|
63
|
-
processElement(getLink);
|
|
64
|
-
} else if (element.querySelector('span')) {
|
|
65
|
-
let getLink = element.querySelector('span');
|
|
66
|
-
processElement(getLink);
|
|
37
|
+
window.activateItemMenuVertical = function (menuId, activeItemId) {
|
|
38
|
+
const menu = document.getElementById(menuId);
|
|
39
|
+
if (menu) {
|
|
40
|
+
const activeItem = document.querySelector(`#${menuId} #${activeItemId}`);
|
|
41
|
+
if (activeItem) {
|
|
42
|
+
const menuInstance = new aria.MenuVertical(menu);
|
|
43
|
+
menuInstance.activateElement(activeItemId);
|
|
44
|
+
return [menu, activeItem];
|
|
45
|
+
} else {
|
|
46
|
+
console.log('There is no element with this id in the menu.');
|
|
47
|
+
return null;
|
|
67
48
|
}
|
|
68
|
-
}
|
|
49
|
+
} else {
|
|
50
|
+
console.log('There is no menu with this id in the document.');
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
69
53
|
};
|
|
70
54
|
}());
|
|
71
55
|
}
|
package/src/js/desy-html.js
CHANGED
|
@@ -18,6 +18,7 @@ import { notification } from './aria/notification.js';
|
|
|
18
18
|
import { RadioButton } from './aria/radioButton.js';
|
|
19
19
|
import { CheckBox } from './aria/checkBoxes.js';
|
|
20
20
|
import { MenuVertical } from './aria/MenuVertical.js';
|
|
21
|
+
import { HeaderNavigation } from './aria/HeaderNavigation.js';
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
export function accordionComponent(aria) {
|
|
@@ -391,3 +392,16 @@ export function MenuVerticalComponent(aria) {
|
|
|
391
392
|
}
|
|
392
393
|
}
|
|
393
394
|
}
|
|
395
|
+
|
|
396
|
+
export function HeaderNavigationComponent(aria) {
|
|
397
|
+
HeaderNavigation(aria);
|
|
398
|
+
const modules = document.querySelectorAll('[data-module]');
|
|
399
|
+
for (const item in modules) if (modules.hasOwnProperty(item)) {
|
|
400
|
+
const moduleValue = modules[item].getAttribute('data-module');
|
|
401
|
+
|
|
402
|
+
if (moduleValue == 'c-header-navigation'){
|
|
403
|
+
const headerNavigation = new aria.HeaderNavigation(modules[item]);
|
|
404
|
+
headerNavigation.init(null);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
package/src/js/index.js
CHANGED
|
@@ -20,7 +20,8 @@ import {
|
|
|
20
20
|
notificationComponent,
|
|
21
21
|
radioButtonComponent,
|
|
22
22
|
checkBoxComponent,
|
|
23
|
-
MenuVerticalComponent
|
|
23
|
+
MenuVerticalComponent,
|
|
24
|
+
HeaderNavigationComponent
|
|
24
25
|
} from './desy-html.js';
|
|
25
26
|
|
|
26
27
|
var aria = aria || {};
|
|
@@ -42,6 +43,7 @@ notificationComponent(aria);
|
|
|
42
43
|
radioButtonComponent(aria);
|
|
43
44
|
checkBoxComponent(aria);
|
|
44
45
|
MenuVerticalComponent(aria);
|
|
46
|
+
HeaderNavigationComponent(aria);
|
|
45
47
|
|
|
46
48
|
//Using the browser API to copy code to the clipboard
|
|
47
49
|
const copyButtons = document.querySelectorAll('[data-module = "c-button-copy"]');
|
|
@@ -5,12 +5,7 @@
|
|
|
5
5
|
{%- if item.id -%}
|
|
6
6
|
{%- set id = item.id -%}
|
|
7
7
|
{%- else -%}
|
|
8
|
-
{
|
|
9
|
-
{%- if loop.first -%}
|
|
10
|
-
{%- set id = idPrefix %}
|
|
11
|
-
{%- else -%}
|
|
12
|
-
{%- set id = idPrefix + "-" + loop.index0 -%}
|
|
13
|
-
{%- endif -%}
|
|
8
|
+
{%- set id = idPrefix + "-" + loop.index -%}
|
|
14
9
|
{%- endif -%}
|
|
15
10
|
{%- if item.open -%}
|
|
16
11
|
{%- set conditionalValue = id -%}
|
|
@@ -54,12 +49,7 @@
|
|
|
54
49
|
{%- if item.id -%}
|
|
55
50
|
{%- set id = item.id -%}
|
|
56
51
|
{%- else -%}
|
|
57
|
-
{
|
|
58
|
-
{%- if loop.first -%}
|
|
59
|
-
{%- set id = idPrefix %}
|
|
60
|
-
{%- else -%}
|
|
61
|
-
{%- set id = idPrefix + "-" + loop.index0 -%}
|
|
62
|
-
{%- endif -%}
|
|
52
|
+
{%- set id = idPrefix + "-" + loop.index -%}
|
|
63
53
|
{%- endif %}
|
|
64
54
|
|
|
65
55
|
<div class="-my-px px-xs py-sm border-t border-b border-neutral-base">
|
|
@@ -5,12 +5,7 @@
|
|
|
5
5
|
{%- if item.id -%}
|
|
6
6
|
{%- set id = item.id -%}
|
|
7
7
|
{%- else -%}
|
|
8
|
-
{
|
|
9
|
-
{%- if loop.first -%}
|
|
10
|
-
{%- set id = idPrefix %}
|
|
11
|
-
{%- else -%}
|
|
12
|
-
{%- set id = idPrefix + "-" + loop.index0 -%}
|
|
13
|
-
{%- endif -%}
|
|
8
|
+
{%- set id = idPrefix + "-" + loop.index -%}
|
|
14
9
|
{%- endif -%}
|
|
15
10
|
{%- if item.open -%}
|
|
16
11
|
{%- set conditionalValue = id -%}
|
|
@@ -55,12 +50,7 @@
|
|
|
55
50
|
{%- if item.id -%}
|
|
56
51
|
{%- set id = item.id -%}
|
|
57
52
|
{%- else -%}
|
|
58
|
-
{
|
|
59
|
-
{%- if loop.first -%}
|
|
60
|
-
{%- set id = idPrefix %}
|
|
61
|
-
{%- else -%}
|
|
62
|
-
{%- set id = idPrefix + "-" + loop.index0 -%}
|
|
63
|
-
{%- endif -%}
|
|
53
|
+
{%- set id = idPrefix + "-" + loop.index -%}
|
|
64
54
|
{%- endif %}
|
|
65
55
|
|
|
66
56
|
<div class="relative -my-px px-xs py-sm border-t border-b border-neutral-base">
|
|
@@ -2,28 +2,23 @@
|
|
|
2
2
|
instead -#}
|
|
3
3
|
{% set idPrefix = params.idPrefix if params.idPrefix else "header-nav-item" %}
|
|
4
4
|
<!-- header__navigation -->
|
|
5
|
-
<nav class="{{ params.classes if params.classes else 'hidden lg:block' }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
|
5
|
+
<nav id="header-navigation-{{ 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
6
|
<ul class="ml-sm flex flex-wrap items-baseline">
|
|
7
7
|
{% for item in params.items %}
|
|
8
|
-
|
|
8
|
+
{% if item %}
|
|
9
9
|
<li>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{% set id = idPrefix %}
|
|
17
|
-
{% else %}
|
|
18
|
-
{% set id = idPrefix + "-" + loop.index %}
|
|
19
|
-
{% endif %}
|
|
20
|
-
{% endif %}
|
|
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 %}
|
|
21
16
|
{% if item.active %}
|
|
22
17
|
|
|
23
|
-
<a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="max-w-40 lg:max-w-xs px-3 py-4
|
|
18
|
+
<a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="max-w-40 lg:max-w-xs px-3 py-4 text-sm text-black hover:underline truncate focus:outline-none focus:ring-4 focus:ring-inset focus:ring-black focus:bg-warning-base" aria-current="page" {%- if item.target %} target="{{ item.target }}"{% endif %}><strong class="font-bold">{{ item.html | safe if item.html else item.text }}</strong></a>
|
|
24
19
|
{% else %}
|
|
25
20
|
|
|
26
|
-
<a href="{{ item.href }}" class="max-w-40 lg:max-w-xs px-3 py-4 text-sm text-black hover:underline truncate focus:outline-none focus:ring-4 focus:ring-inset focus:ring-black focus:bg-warning-base {%- if item.disabled %} opacity-50 pointer-events-none{% endif -%}" {%- if item.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %}>{{ item.html | safe if item.html else item.text }}</a>
|
|
21
|
+
<a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="max-w-40 lg:max-w-xs px-3 py-4 text-sm text-black hover:underline truncate focus:outline-none focus:ring-4 focus:ring-inset focus:ring-black focus:bg-warning-base {%- if item.disabled %} opacity-50 pointer-events-none{% endif -%}" {%- if item.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %}>{{ item.html | safe if item.html else item.text }}</a>
|
|
27
22
|
{% endif %}
|
|
28
23
|
</li>
|
|
29
24
|
{% endif %}
|
|
@@ -15,12 +15,7 @@
|
|
|
15
15
|
{%- if item.id -%}
|
|
16
16
|
{%- set id = item.id -%}
|
|
17
17
|
{%- else -%}
|
|
18
|
-
{
|
|
19
|
-
{%- if loop.first -%}
|
|
20
|
-
{%- set id = idPrefix %}
|
|
21
|
-
{% else %}
|
|
22
|
-
{%- set id = idPrefix + "-" + loop.index -%}
|
|
23
|
-
{%- endif -%}
|
|
18
|
+
{%- set id = idPrefix + "-" + loop.index -%}
|
|
24
19
|
{%- endif -%}
|
|
25
20
|
{% set subId = "sub-" + id %}
|
|
26
21
|
<li class="{% if item.containerClasses %}{{ item.containerClasses }}{% else %}px-base border-y border-neutral-base -my-px{% endif %}">
|
|
@@ -12,13 +12,8 @@
|
|
|
12
12
|
{% if item.id %}
|
|
13
13
|
{% set id = item.id %}
|
|
14
14
|
{% else %}
|
|
15
|
-
{#- The first id should not have a number suffix so it's easy to link to from the error summary component -#}
|
|
16
|
-
{% if loop.first %}
|
|
17
|
-
{% set id = idPrefix %}
|
|
18
|
-
{% else %}
|
|
19
15
|
{% set id = idPrefix + "-" + loop.index %}
|
|
20
16
|
{% endif %}
|
|
21
|
-
{% endif %}
|
|
22
17
|
<li>
|
|
23
18
|
{% if item.active %}
|
|
24
19
|
<span {%- if id %} id="{{ id }}"{% endif %} class="c-menu-horizontal__active flex items-center relative py-sm lg:px-lg lg:py-base border border-transparent truncate font-semibold {%- if item.classes %} {{ item.classes }}{% endif -%}" {%- if item.title %} title="{{ item.title }}"{% endif %} aria-current="page" {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
@@ -21,12 +21,7 @@
|
|
|
21
21
|
{%- if item.id -%}
|
|
22
22
|
{%- set id = item.id -%}
|
|
23
23
|
{%- else -%}
|
|
24
|
-
{
|
|
25
|
-
{%- if loop.first -%}
|
|
26
|
-
{%- set id = idPrefix %}
|
|
27
|
-
{% else %}
|
|
28
|
-
{%- set id = idPrefix + "-" + loop.index -%}
|
|
29
|
-
{%- endif -%}
|
|
24
|
+
{%- set id = idPrefix + "-" + loop.index -%}
|
|
30
25
|
{%- endif -%}
|
|
31
26
|
{% set subId = "sub-" + id %}
|
|
32
27
|
<li class="relative">
|
|
@@ -50,12 +45,7 @@
|
|
|
50
45
|
{%- if subitem.id -%}
|
|
51
46
|
{%- set subId = subitem.id -%}
|
|
52
47
|
{%- else -%}
|
|
53
|
-
{
|
|
54
|
-
{%- if loop.first -%}
|
|
55
|
-
{%- set subId = "sub-" + id %}
|
|
56
|
-
{% else %}
|
|
57
|
-
{%- set subId = "sub-" + id + "-" + loop.index -%}
|
|
58
|
-
{%- endif -%}
|
|
48
|
+
{%- set subId = "sub-" + id + "-" + loop.index -%}
|
|
59
49
|
{%- endif %}
|
|
60
50
|
{% set commonSubItemAttributes %}{% if subId %} id="{{ subId }}"{% endif %} {%- if subitem.title %} title="{{ subitem.title }}"{% endif %} {%- for attribute, value in subitem.attributes %} {{ attribute }}="{{ value }}"{% endfor %}{% endset %}
|
|
61
51
|
<li>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"name": "con item activo",
|
|
51
|
-
"description": 'Añade <code>active: true</code> a un item para mostrarlo activo inicialmente. También puedes usar con javascript la función global <code>activateItemMenuVertical(elementMenu, idItemSeleccionado)</code> para seleccionar un item de un menú, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateItemMenuVertical(
|
|
51
|
+
"description": 'Añade <code>active: true</code> a un item para mostrarlo activo inicialmente. También puedes usar con javascript la función global <code>activateItemMenuVertical(elementMenu, idItemSeleccionado)</code> para seleccionar un item de un menú, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateItemMenuVertical("mi-menu", "active-item-3")</code> para desactivar el item actual y activar el tercer item de este ejemplo.',
|
|
52
52
|
"data": {
|
|
53
53
|
"idPrefix": "active-item",
|
|
54
54
|
"items": [
|
|
@@ -10,12 +10,7 @@
|
|
|
10
10
|
{%- if item.id -%}
|
|
11
11
|
{%- set id = item.id -%}
|
|
12
12
|
{%- else -%}
|
|
13
|
-
{
|
|
14
|
-
{%- if loop.first -%}
|
|
15
|
-
{%- set id = idPrefix %}
|
|
16
|
-
{% else %}
|
|
17
|
-
{%- set id = idPrefix + "-" + loop.index -%}
|
|
18
|
-
{%- endif -%}
|
|
13
|
+
{%- set id = idPrefix + "-" + loop.index -%}
|
|
19
14
|
{%- endif -%}
|
|
20
15
|
{% set subId = "sub-" + id %}
|
|
21
16
|
<li class="m-base">
|
|
@@ -44,12 +39,7 @@
|
|
|
44
39
|
{%- if subitem.id -%}
|
|
45
40
|
{%- set subId = subitem.id -%}
|
|
46
41
|
{%- else -%}
|
|
47
|
-
{
|
|
48
|
-
{%- if loop.first -%}
|
|
49
|
-
{%- set subId = "sub-" + id %}
|
|
50
|
-
{% else %}
|
|
51
|
-
{%- set subId = "sub-" + id + "-" + loop.index -%}
|
|
52
|
-
{%- endif -%}
|
|
42
|
+
{%- set subId = "sub-" + id + "-" + loop.index -%}
|
|
53
43
|
{%- endif %}
|
|
54
44
|
<li class="m-base origin-top-left text-sm">
|
|
55
45
|
{% if subitem.href %}
|
|
@@ -18,12 +18,7 @@
|
|
|
18
18
|
{%- if item.id -%}
|
|
19
19
|
{%- set id = item.id -%}
|
|
20
20
|
{%- else -%}
|
|
21
|
-
{
|
|
22
|
-
{%- if loop.first -%}
|
|
23
|
-
{%- set id = idPrefix %}
|
|
24
|
-
{% else %}
|
|
25
|
-
{%- set id = idPrefix + "-" + loop.index -%}
|
|
26
|
-
{%- endif -%}
|
|
21
|
+
{%- set id = idPrefix + "-" + loop.index -%}
|
|
27
22
|
{%- endif -%}
|
|
28
23
|
{% set subId = "sub-" + id %}
|
|
29
24
|
<li class="relative" role="none">
|
|
@@ -49,12 +44,7 @@
|
|
|
49
44
|
{%- if subitem.id -%}
|
|
50
45
|
{%- set subId = subitem.id -%}
|
|
51
46
|
{%- else -%}
|
|
52
|
-
{
|
|
53
|
-
{%- if loop.first -%}
|
|
54
|
-
{%- set subId = "sub-" + id %}
|
|
55
|
-
{% else %}
|
|
56
|
-
{%- set subId = "sub-" + id + "-" + loop.index -%}
|
|
57
|
-
{%- endif -%}
|
|
47
|
+
{%- set subId = "sub-" + id + "-" + loop.index -%}
|
|
58
48
|
{%- endif %}
|
|
59
49
|
{% if subitem.role == 'none' %}
|
|
60
50
|
<li role="none" id="{{ subId }}" data-option="{{ subId }}">
|
|
@@ -69,12 +59,7 @@
|
|
|
69
59
|
{%- if subsubitem.id -%}
|
|
70
60
|
{%- set subsubId = subsubitem.id -%}
|
|
71
61
|
{%- else -%}
|
|
72
|
-
{
|
|
73
|
-
{%- if loop.first -%}
|
|
74
|
-
{%- set subsubId = "sub-" + subId %}
|
|
75
|
-
{% else %}
|
|
76
|
-
{%- set subsubId = "sub-" + subId + "-" + loop.index -%}
|
|
77
|
-
{%- endif -%}
|
|
62
|
+
{%- set subsubId = "sub-" + subId + "-" + loop.index -%}
|
|
78
63
|
{%- endif %}
|
|
79
64
|
<li {%- if subsubitem.role %} role="{{ subsubitem.role}}"{% endif %}{% if subsubitem.role == 'menuitemcheckbox' or subsubitem.role == 'menuitemradio' %} aria-checked="{% if subsubitem.checked %}{{ subsubitem.checked }}{% else %}false{% endif %}"{% endif %} class="flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white" id="{{ subsubId }}" data-option="{{ subsubId }}">
|
|
80
65
|
{{ subsubitem.html | safe if subsubitem.html else subsubitem.text }}
|
|
@@ -15,13 +15,8 @@
|
|
|
15
15
|
{% if item.id %}
|
|
16
16
|
{% set id = item.id %}
|
|
17
17
|
{% else %}
|
|
18
|
-
{#- The first id should not have a number suffix so it's easy to link to from the error summary component -#}
|
|
19
|
-
{% if loop.first %}
|
|
20
|
-
{% set id = idPrefix %}
|
|
21
|
-
{% else %}
|
|
22
18
|
{% set id = idPrefix + "-" + loop.index %}
|
|
23
19
|
{% endif %}
|
|
24
|
-
{% endif %}
|
|
25
20
|
{% set commonItemAttributes %}{% if id %} id="{{ id }}"{% endif %} {%- if item.title %} title="{{ item.title }}"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}{% endset %}
|
|
26
21
|
<li>
|
|
27
22
|
{% if item.active %}
|
|
@@ -27,12 +27,7 @@
|
|
|
27
27
|
{% set innerHtml %}
|
|
28
28
|
{% for item in params.items %}
|
|
29
29
|
{% if item %}
|
|
30
|
-
{#- The first id should not have a number suffix so it's easy to link to from the error summary component -#}
|
|
31
|
-
{% if loop.first %}
|
|
32
|
-
{% set id = idPrefix %}
|
|
33
|
-
{% else %}
|
|
34
30
|
{% set id = idPrefix + "-" + loop.index %}
|
|
35
|
-
{% endif %}
|
|
36
31
|
<li>
|
|
37
32
|
{% set prefix %}<span class="sr-only">Página </span>{% endset %}
|
|
38
33
|
{% 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 %}
|