desy-html 8.4.0 → 8.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/docs/_include.template-header.njk +3 -1
  2. package/docs/examples-accordion-history.html +1 -0
  3. package/docs/examples-accordion.html +1 -0
  4. package/docs/examples-alert.html +1 -0
  5. package/docs/examples-breadcrumbs.html +1 -0
  6. package/docs/examples-button-loader.html +1 -0
  7. package/docs/examples-button.html +1 -0
  8. package/docs/examples-card.html +1 -0
  9. package/docs/examples-character-count.html +1 -0
  10. package/docs/examples-checkboxes.html +1 -0
  11. package/docs/examples-collapsible.html +1 -0
  12. package/docs/examples-date-input.html +1 -0
  13. package/docs/examples-description-list.html +1 -0
  14. package/docs/examples-details.html +1 -0
  15. package/docs/examples-dialog.html +1 -0
  16. package/docs/examples-dropdown.html +1 -0
  17. package/docs/examples-error-message.html +1 -0
  18. package/docs/examples-error-summary.html +1 -0
  19. package/docs/examples-fieldset.html +1 -0
  20. package/docs/examples-file-upload.html +1 -0
  21. package/docs/examples-footer.html +1 -0
  22. package/docs/examples-header-advanced.html +1 -0
  23. package/docs/examples-header-mini.html +1 -0
  24. package/docs/examples-header.html +1 -0
  25. package/docs/examples-hint.html +1 -0
  26. package/docs/examples-input-group.html +1 -0
  27. package/docs/examples-input.html +1 -0
  28. package/docs/examples-item.html +1 -0
  29. package/docs/examples-label.html +1 -0
  30. package/docs/examples-links-list.html +1 -0
  31. package/docs/examples-listbox.html +1 -0
  32. package/docs/examples-media-object.html +1 -0
  33. package/docs/examples-menu-horizontal.html +1 -0
  34. package/docs/examples-menu-navigation.html +1 -0
  35. package/docs/examples-menu-vertical.html +1 -0
  36. package/docs/examples-menubar.html +1 -0
  37. package/docs/examples-modal.html +1 -0
  38. package/docs/examples-nav.html +1 -0
  39. package/docs/examples-notification.html +1 -0
  40. package/docs/examples-pagination.html +1 -0
  41. package/docs/examples-pill.html +1 -0
  42. package/docs/examples-radios.html +1 -0
  43. package/docs/examples-searchbar.html +1 -0
  44. package/docs/examples-select.html +1 -0
  45. package/docs/examples-skip-link.html +1 -0
  46. package/docs/examples-spinner.html +1 -0
  47. package/docs/examples-status-item.html +1 -0
  48. package/docs/examples-status.html +1 -0
  49. package/docs/examples-table-advanced.html +1 -0
  50. package/docs/examples-table.html +1 -0
  51. package/docs/examples-tabs.html +1 -0
  52. package/docs/examples-textarea.html +1 -0
  53. package/docs/examples-toggle.html +1 -0
  54. package/docs/examples-tooltip.html +1 -0
  55. package/docs/examples-tree.html +1 -0
  56. package/docs/index.html +5 -0
  57. package/package.json +1 -1
  58. package/src/js/aria/MenuVertical.js +2 -2
  59. package/src/js/aria/Nav.js +2 -2
  60. package/src/js/desy-html.js +33 -61
  61. package/src/templates/components/header/_examples.header.njk +1 -1
  62. package/src/templates/components/header-advanced/_examples.header-advanced.njk +1 -1
  63. package/src/templates/components/links-list/_template.links-list.njk +2 -2
  64. package/src/templates/components/menu-horizontal/_styles.menu-horizontal.css +15 -0
  65. package/src/templates/components/menu-horizontal/_template.menu-horizontal.njk +4 -3
  66. package/src/templates/components/menu-navigation/_template.menu-navigation.njk +3 -3
  67. package/src/templates/components/menu-vertical/_template.menu-vertical.njk +4 -4
  68. package/src/templates/components/nav/_template.nav.njk +2 -2
@@ -371,7 +371,9 @@
371
371
  window.addEventListener("load", function(event) {
372
372
  {% if activePage %}
373
373
  activateItemHeaderNavigation("header-nav-item", "{{ activePage }}");
374
- activateItemNav("navegacion-principal-offcanvas", "mobile-{{ activePage }}");
374
+ {% if activeComponent == undefined %}
375
+ activateItemNav("navegacion-principal-offcanvas", "mobile-{{ activePage }}");
376
+ {% endif %}
375
377
  {% endif %}
376
378
  {% if activeComponent %}
377
379
  activateItemNav("navegacion-ejemplos-offcanvas", "page-examples-{{ activeComponent | filterslugify }}");
@@ -1,5 +1,6 @@
1
1
  {% set title = "Accordion history. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Accordion history" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Accordion. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Accordion" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Alert. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Alert" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Breadcrumbs. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Breadcrumbs" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Button loader. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Button loader" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Button. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Button" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Card. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Card" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Character count. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Character count" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Checkboxes. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Checkboxes" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Collapsible. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Collapsible" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Date input. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Date input" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Description list. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Description list" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Details. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Details" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Dialog. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Dialog" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Dropdown. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Dropdown" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Error message. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Error message" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Error summary. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Error summary" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Fieldset. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Fieldset" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "File upload. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "File upload" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Footer. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Footer" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Header advanced. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Header advanced" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Header mini. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Header mini" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Header. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Header" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Hint. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Hint" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Input group. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Input group" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Input. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Input" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Item. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Item" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Label. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Label" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Links list. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Links list" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Listbox. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Listbox" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Media object. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Media object" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Menu horizontal. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Menu horizontal" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Menu navigation. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Menu navigation" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Menu vertical. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Menu vertical" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Menubar. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Menubar" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Modal. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Modal" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Nav. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Nav" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Notification. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Notification" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Pagination. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Pagination" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Pill. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Pill" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Radios. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Radios" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Searchbar. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Searchbar" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Select. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Select" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Skip link. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Skip link" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Spinner. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Spinner" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Status item. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Status item" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Status. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Status" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Table advanced. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Table advanced" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Table. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Table" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Tabs. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Tabs" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Textarea. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Textarea" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Toggle. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Toggle" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Tooltip. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Tooltip" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
@@ -1,5 +1,6 @@
1
1
  {% set title = "Tree. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
2
2
 
3
+ {% set activePage = "page-componentes" %}
3
4
  {% set activeComponent = "Tree" %}
4
5
  {% extends "_template.examples.njk" %}
5
6
  {% block contentBlock %}
package/docs/index.html CHANGED
@@ -38,6 +38,11 @@
38
38
 
39
39
  <h2>Changelog (English)</h2>
40
40
  <p>What's new in the latest version of desy-html</p>
41
+ <h3>v.8.4.1</h3>
42
+ <ul class="text-sm">
43
+ <li>Active items are font-bold now in all components.</li>
44
+ <li>Minor improvements.</li>
45
+ </ul>
41
46
  <h3>v.8.4.0</h3>
42
47
  <ul class="text-sm">
43
48
  <li>Added global function to select an item in Nav.</li>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "desy-html",
3
- "version": "8.4.0",
3
+ "version": "8.4.1",
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)",
@@ -25,8 +25,8 @@ export function MenuVertical(aria) {
25
25
  };
26
26
 
27
27
  aria.MenuVertical.prototype.wrapActiveElement = function (elementActive) {
28
- elementActive.setAttribute('aria-current', 'true');
29
- elementActive.innerHTML = `<strong>${elementActive.textContent}</strong>`;
28
+ elementActive.setAttribute('aria-current', 'page');
29
+ elementActive.innerHTML = `<strong class="font-bold">${elementActive.textContent}</strong>`;
30
30
  };
31
31
 
32
32
  aria.MenuVertical.prototype.deactivateElement = function (elementDeactivated) {
@@ -25,8 +25,8 @@ export function Nav(aria) {
25
25
  };
26
26
 
27
27
  aria.Nav.prototype.wrapActiveElement = function (elementActive) {
28
- elementActive.setAttribute('aria-current', 'true');
29
- elementActive.innerHTML = `<strong>${elementActive.textContent}</strong>`;
28
+ elementActive.setAttribute('aria-current', 'page');
29
+ elementActive.innerHTML = `<strong class="font-bold">${elementActive.textContent}</strong>`;
30
30
  };
31
31
 
32
32
  aria.Nav.prototype.deactivateElement = function (elementDeactivated) {
@@ -221,53 +221,37 @@ export function menubarComponent(aria) {
221
221
  PopupMenuAction(aria);
222
222
  MenubarItemAction(aria);
223
223
  MenubarAction(aria);
224
- const modules = document.querySelectorAll('[data-module]');
225
- for (const item in modules) if (modules.hasOwnProperty(item)) {
226
- const moduleValue = modules[item].getAttribute('data-module');
227
-
228
- if (moduleValue == 'c-menubar'){
229
- const menubar = new aria.MenubarAction(modules[item]);
230
- menubar.init(null);
231
- }
232
- }
224
+ const modules = document.querySelectorAll('[data-module="c-menubar"]');
225
+ [...modules].forEach((module) => {
226
+ const menubar = new aria.MenubarAction(module);
227
+ menubar.init(null);
228
+ });
233
229
  }
234
230
 
235
231
  export function menuNavigationComponent(aria) {
236
232
  DisclosureNav(aria);
237
- const modules = document.querySelectorAll('[data-module]');
238
- for (const item in modules) if (modules.hasOwnProperty(item)) {
239
- const moduleValue = modules[item].getAttribute('data-module');
240
-
241
- if (moduleValue == 'c-menu-navigation'){
242
- const menuNavigation = new aria.DisclosureNav(modules[item]);
243
- menuNavigation.init();
244
- }
245
- }
233
+ const modules = document.querySelectorAll('[data-module="c-menu-navigation"]');
234
+ [...modules].forEach((module) => {
235
+ const menuNavigation = new aria.DisclosureNav(module);
236
+ menuNavigation.init();
237
+ });
246
238
  }
247
239
 
248
240
  export function tableAdvancedComponent(aria) {
249
241
  utils(aria);
250
242
  dataGrid(aria);
251
- const modules = document.querySelectorAll('[data-module]');
252
- for (const item in modules) if (modules.hasOwnProperty(item)) {
253
- const moduleValue = modules[item].getAttribute('data-module');
254
-
255
- if (moduleValue == 'c-table-advanced'){
256
- const grid = new aria.Grid(modules[item]);
257
- }
258
- }
243
+ const modules = document.querySelectorAll('[data-module="c-table-advanced"]');
244
+ [...modules].forEach((module) => {
245
+ const grid = new aria.Grid(module);
246
+ });
259
247
  }
260
248
 
261
249
  export function tabsComponent(aria) {
262
250
  tabs(aria);
263
- const modules = document.querySelectorAll('[data-module]');
264
- for (const item in modules) if (modules.hasOwnProperty(item)) {
265
- const moduleValue = modules[item].getAttribute('data-module');
266
-
267
- if (moduleValue == 'c-tabs'){
268
- aria.tabsInit(modules[item]);
269
- }
270
- }
251
+ const modules = document.querySelectorAll('[data-module="c-tabs"]');
252
+ [...modules].forEach((module) => {
253
+ aria.tabsInit(module);
254
+ });
271
255
  }
272
256
 
273
257
  export function tooltipComponent(aria) {
@@ -383,39 +367,27 @@ export function checkBoxComponent(aria) {
383
367
 
384
368
  export function MenuVerticalComponent(aria) {
385
369
  MenuVertical(aria);
386
- const modules = document.querySelectorAll('[data-module]');
387
- for (const item in modules) if (modules.hasOwnProperty(item)) {
388
- const moduleValue = modules[item].getAttribute('data-module');
389
-
390
- if (moduleValue == 'c-menu-vertical'){
391
- const menuVertical = new aria.MenuVertical(modules[item]);
392
- menuVertical.init(null);
393
- }
394
- }
370
+ const modules = document.querySelectorAll('[data-module="c-menu-vertical"]');
371
+ [...modules].forEach((module) => {
372
+ const menuVertical = new aria.MenuVertical(module);
373
+ menuVertical.init(null);
374
+ });
395
375
  }
396
376
 
397
377
  export function HeaderNavigationComponent(aria) {
398
378
  HeaderNavigation(aria);
399
- const modules = document.querySelectorAll('[data-module]');
400
- for (const item in modules) if (modules.hasOwnProperty(item)) {
401
- const moduleValue = modules[item].getAttribute('data-module');
402
-
403
- if (moduleValue == 'c-header-navigation'){
404
- const headerNavigation = new aria.HeaderNavigation(modules[item]);
405
- headerNavigation.init(null);
406
- }
407
- }
379
+ const modules = document.querySelectorAll('[data-module="c-header-navigation"]');
380
+ [...modules].forEach((module) => {
381
+ const headerNavigation = new aria.HeaderNavigation(module);
382
+ headerNavigation.init(null);
383
+ });
408
384
  }
409
385
 
410
386
  export function NavComponent(aria) {
411
387
  Nav(aria);
412
- const modules = document.querySelectorAll('[data-module]');
413
- for (const item in modules) if (modules.hasOwnProperty(item)) {
414
- const moduleValue = modules[item].getAttribute('data-module');
415
-
416
- if (moduleValue == 'c-nav'){
417
- const nav = new aria.Nav(modules[item]);
418
- nav.init(null);
419
- }
420
- }
388
+ const modules = document.querySelectorAll('[data-module="c-nav"]');
389
+ [...modules].forEach((module) => {
390
+ const nav = new aria.Nav(module);
391
+ nav.init(null);
392
+ });
421
393
  }
@@ -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>activateItemHeaderNavigation(elementMenu, idItemSeleccionado)</code> para seleccionar un item de un menú, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateItemHeaderNavigation("header-nav-item", "header-nav-item-3")</code> para desactivar el item actual y activar el tercer item del header de la página.',
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>activateItemHeaderNavigation(elementMenu, idItemSeleccionado)</code> para seleccionar un item de un menú, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateItemHeaderNavigation("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",
@@ -627,7 +627,7 @@
627
627
  {% set examples = [
628
628
  {
629
629
  "name": "por defecto",
630
- "description": 'Esta es la cabecera por defecto para sitios web de submarcas del Gobierno de Aragón. Tiene un título que enlaza a la página de inicio. Puedes usar con javascript la función global <code>activateItemHeaderNavigation(elementMenu, idItemSeleccionado)</code> para seleccionar un item de un menú, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateItemHeaderNavigation("header-nav-item", "header-nav-item-3")</code> para desactivar el item actual y activar el tercer item del header de la página.',
630
+ "description": 'Esta es la cabecera por defecto para sitios web de submarcas del Gobierno de Aragón. Tiene un título que enlaza a la página de inicio. Puedes usar con javascript la función global <code>activateItemHeaderNavigation(elementMenu, idItemSeleccionado)</code> para seleccionar un item de un menú, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateItemHeaderNavigation("header-nav-item", "page-catalogo")</code> para desactivar el item actual y activar el tercer item del header de la página.',
631
631
  "data": {
632
632
  "title": {
633
633
  "homepageUrl": "/",
@@ -31,7 +31,7 @@
31
31
  {% endif %}
32
32
  <div class="flex-1">
33
33
  {% if item.active %}
34
- <strong>{{ item.html | safe if item.html else item.text }}</strong>
34
+ <strong class="font-bold">{{ item.html | safe if item.html else item.text }}</strong>
35
35
  {% else %}
36
36
  {{ item.html | safe if item.html else item.text }}
37
37
  {% endif %}
@@ -51,7 +51,7 @@
51
51
  {% endif %}
52
52
  <div class="flex-1">
53
53
  {% if item.active %}
54
- <strong>{{ item.html | safe if item.html else item.text }}</strong>
54
+ <strong class="font-bold">{{ item.html | safe if item.html else item.text }}</strong>
55
55
  {% else %}
56
56
  {{ item.html | safe if item.html else item.text }}
57
57
  {% endif %}
@@ -17,6 +17,10 @@
17
17
  @apply lg:border-b-0;
18
18
  @apply lg:rounded-t;
19
19
  @apply no-underline;
20
+
21
+ strong {
22
+ @apply font-normal;
23
+ }
20
24
  }
21
25
  }
22
26
 
@@ -38,6 +42,10 @@
38
42
  @apply border-b-0;
39
43
  @apply rounded-t;
40
44
  @apply no-underline;
45
+
46
+ strong {
47
+ @apply font-normal;
48
+ }
41
49
  }
42
50
 
43
51
  .c-menu-horizontal__link {
@@ -53,6 +61,13 @@
53
61
  @apply text-black;
54
62
  @apply outline-none;
55
63
  }
64
+
65
+ &.c-menu-horizontal__active {
66
+ @apply no-underline;
67
+ &:hover {
68
+ @apply underline;
69
+ }
70
+ }
56
71
  }
57
72
 
58
73
  .c-menu-horizontal--scroll {
@@ -16,9 +16,10 @@
16
16
  {% endif %}
17
17
  <li>
18
18
  {% if item.active %}
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 -%}>
20
- <strong>{{ item.html | safe if item.html else item.text }}</strong>
21
- </span>
19
+ <a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="c-menu-horizontal__link c-menu-horizontal__active relative flex items-center py-sm lg:px-lg 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.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %} aria-current="page" {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
21
+ <strong class="font-bold">{{ item.html | safe if item.html else item.text }}</strong>
22
+ </a>
22
23
  {% else %}
23
24
  <a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="c-menu-horizontal__link relative flex items-center py-sm lg:px-lg lg:py-base border border-transparent text-black hover:text-primary-base underline truncate focus:outline-none
24
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.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
@@ -51,8 +51,8 @@
51
51
  <li>
52
52
  {% if subitem.href %}
53
53
  {% if subitem.active %}
54
- <span {%- if subitem.id %} id="{{ subId }}"{% endif %} class="flex items-center px-base py-sm text-sm font-semibold {%- if subitem.classes %} {{ subitem.classes }}{% endif -%}" aria-current="page" {{- commonSubItemAttributes | safe }}>
55
- <strong>{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
54
+ <span {%- if subitem.id %} id="{{ subId }}"{% endif %} class="flex items-center px-base py-sm text-sm {%- if subitem.classes %} {{ subitem.classes }}{% endif -%}" aria-current="page" {{- commonSubItemAttributes | safe }}>
55
+ <strong class="font-bold">{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
56
56
  </span>
57
57
  {% else %}
58
58
  <a {%- if subitem.id %} id="{{ subId }}"{% endif %} href="{{ subitem.href }}" class="flex items-center px-base py-sm text-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black{%- if subitem.classes %} {{ subitem.classes }}{% endif -%} {%- if subitem.disabled %} pointer-events-none{% endif -%}" {%- if subitem.disabled %} tabindex="-1"{% endif -%} {%- if subitem.target %} target="{{ subitem.target }}"{% endif %} {{- commonSubItemAttributes | safe }}>
@@ -65,7 +65,7 @@
65
65
  {% else %}
66
66
  <span {%- if subitem.id %} id="{{ subId }}"{% endif %} class="flex items-center px-base py-sm text-sm {%- if subitem.classes %} {{ subitem.classes }}{% endif %} {%- if subitem.active %} font-bold{% endif %} {%- if subitem.active %} font-bold{% endif %}" {%- if subitem.title %} title="{{ subitem.title }}"{% endif %} {%- if subitem.active %} aria-current="page"{% endif %} {%- if subitem.disabled %} aria-disabled="true" tabindex="-1"{% endif %} {%- for attribute, value in subitem.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
67
67
  {% if subitem.active %}
68
- <strong>{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
68
+ <strong class="font-bold">{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
69
69
  {% else %}
70
70
  {{ subitem.html | safe if subitem.html else subitem.text }}
71
71
  {% endif %}
@@ -17,7 +17,7 @@
17
17
  {% if item.href %}
18
18
  <a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="block px-xs focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black {%- if params.hasUnderline %} underline{% endif %} {%- if item.classes %} {{ item.classes }}{% endif %} {%- if not item.disabled %} hover:text-primary-base hover:underline{% endif %} {%- if item.disabled %} no-underline pointer-events-none{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %}{%- if item.active %} aria-current="page"{% endif %} {% if item.disabled %} aria-disabled="true" tabindex="-1"{% endif %} {% if item.target %} target="{{ item.target }}"{% endif %}{%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
19
19
  {% if item.active %}
20
- <strong>{{ item.html | safe if item.html else item.text }}</strong>
20
+ <strong class="font-bold">{{ item.html | safe if item.html else item.text }}</strong>
21
21
  {% else %}
22
22
  {{ item.html | safe if item.html else item.text }}
23
23
  {% endif %}
@@ -25,7 +25,7 @@
25
25
  {% else %}
26
26
  <span {%- if id %} id="{{ id }}"{% endif %} class="block px-xs {%- if item.classes %} {{ item.classes }}{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %}{%- if item.active %} aria-current="page"{% endif %} {% if item.disabled %} aria-disabled="true" tabindex="-1"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
27
27
  {% if item.active %}
28
- <strong>{{ item.html | safe if item.html else item.text }}</strong>
28
+ <strong class="font-bold">{{ item.html | safe if item.html else item.text }}</strong>
29
29
  {% else %}
30
30
  {{ item.html | safe if item.html else item.text }}
31
31
  {% endif %}
@@ -45,7 +45,7 @@
45
45
  {% if subitem.href %}
46
46
  <a {%- if subId %} id="{{ subId }}"{% endif %} href="{{ subitem.href }}" class="block px-xs hover:text-primary-base hover:underline focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black {%- if params.hasUnderline %} underline{% endif %} {%- if subitem.classes %} {{ subitem.classes }}{% endif %} {%- if subitem.disabled %} no-underline pointer-events-none{% endif %}" {%- if subitem.title %} title="{{ subitem.title }}"{% endif %}{%- if subitem.active %} aria-current="page"{% endif %} {% if subitem.disabled %} aria-disabled="true" tabindex="-1"{% endif %} {% if subitem.target %} target="{{ subitem.target }}"{% endif %}{%- for attribute, value in subitem.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
47
47
  {% if subitem.active %}
48
- <strong>{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
48
+ <strong class="font-bold">{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
49
49
  {% else %}
50
50
  {{ subitem.html | safe if subitem.html else subitem.text }}
51
51
  {% endif %}
@@ -53,7 +53,7 @@
53
53
  {% else %}
54
54
  <span {%- if subId %} id="{{ subId }}"{% endif %} class="block px-xs {%- if subitem.classes %} {{ subitem.classes }}{% endif %}" {%- if subitem.title %} title="{{ subitem.title }}"{% endif %} {%- if subitem.active %} aria-current="page"{% endif %} {%- if subitem.disabled %} aria-disabled="true" tabindex="-1"{% endif %} {%- for attribute, value in subitem.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
55
55
  {% if subitem.active %}
56
- <strong>{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
56
+ <strong class="font-bold">{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
57
57
  {% else %}
58
58
  {{ subitem.html | safe if subitem.html else subitem.text }}
59
59
  {% endif %}
@@ -19,9 +19,9 @@
19
19
  {% endif %}
20
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 %}
21
21
  <li>
22
- <a href="{{ item.href }}" class="flex items-center px-base 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.disabled %} pointer-events-none{% endif -%}" {%- if item.disabled %} aria-disabled="true" tabindex="-1"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %} {{- commonItemAttributes | safe }}>
22
+ <a href="{{ item.href }}" class="flex items-center px-base 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.disabled %} pointer-events-none{% endif -%}" {%- if item.disabled %} aria-disabled="true" tabindex="-1"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %} {% if item.active %} aria-current="page"{% endif %}{{- commonItemAttributes | safe }}>
23
23
  {% if item.active %}
24
- <strong>{{ item.html | safe if item.html else item.text }}</strong>
24
+ <strong class="font-bold">{{ item.html | safe if item.html else item.text }}</strong>
25
25
  {% else %}
26
26
  {{ item.html | safe if item.html else item.text }}
27
27
  {% endif %}