desy-html 4.1.3 → 5.0.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 (26) hide show
  1. package/docs/_include.template-header.njk +47 -47
  2. package/docs/ds/_ds.example.header.njk +1 -1
  3. package/docs/ds/_ds.example.menubar-en-uso.njk +6 -18
  4. package/docs/ds/_ds.example.menubar-variaciones.njk +51 -121
  5. package/docs/index.html +25 -0
  6. package/package.json +1 -1
  7. package/src/js/desy-html.js +63 -4
  8. package/src/templates/components/alert/_template.alert.njk +2 -2
  9. package/src/templates/components/checkboxes/_examples.checkboxes.njk +22 -0
  10. package/src/templates/components/checkboxes/_template.checkboxes.njk +4 -3
  11. package/src/templates/components/checkboxes/params.checkboxes.yaml +8 -0
  12. package/src/templates/components/description-list/_examples.description-list.njk +63 -0
  13. package/src/templates/components/dropdown/_styles.dropdown.css +1 -0
  14. package/src/templates/components/dropdown/params.dropdown.yaml +6 -6
  15. package/src/templates/components/header/_examples.header.njk +35 -3
  16. package/src/templates/components/header/_template.header.header__dropdown.njk +17 -18
  17. package/src/templates/components/header/_template.header.header__offcanvas.njk +1 -1
  18. package/src/templates/components/header/_template.header.header__subnav.njk +16 -20
  19. package/src/templates/components/header/_template.header.njk +42 -30
  20. package/src/templates/components/header/params.header.yaml +45 -5
  21. package/src/templates/components/menu-horizontal/_examples.menu-horizontal.njk +2 -1
  22. package/src/templates/components/menu-horizontal/_template.menu-horizontal.njk +1 -1
  23. package/src/templates/components/menubar/_examples.menubar.njk +349 -143
  24. package/src/templates/components/menubar/_styles.menubar.css +1 -0
  25. package/src/templates/components/menubar/_template.menubar.njk +2 -2
  26. package/src/templates/components/menubar/params.menubar.yaml +8 -0
@@ -66,6 +66,7 @@
66
66
  @apply bg-white;
67
67
  @apply opacity-50;
68
68
  @apply cursor-not-allowed;
69
+ @apply pointer-events-none;
69
70
  }
70
71
  }
71
72
 
@@ -28,7 +28,7 @@
28
28
  {% set subId = "sub-" + id %}
29
29
  <li class="relative" role="none">
30
30
  {% if item.sub %}
31
- <a href="#" role="menuitem" aria-haspopup="true" aria-expanded="false" class="c-menubar__button {%- if item.classes %} {{ item.classes }}{% endif %}" id="{{ id }}"
31
+ <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--primary{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %} {% if item.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif %} " id="{{ id }}"
32
32
  {%- if item.sub.html %} data-aria-controls="{{ subId }}"{% endif %}
33
33
  {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
34
34
  <span class="inline-flex self-center max-w-xs align-middle truncate">{{ item.html | safe if item.html else item.text }}</span>
@@ -61,7 +61,7 @@
61
61
  {{ subitem.html | safe if subitem.html else subitem.text }}
62
62
  </li>
63
63
  {% elseif subitem.role == 'group' %}
64
- <li>
64
+ <li role="none">
65
65
  <ul role="group" id="{{ subId }}" data-option="{{ subId }}" {%- if subitem.ariaLabel %} aria-label="{{ subitem.ariaLabel }}"{% endif %}>
66
66
  {% for subsubitem in subitem.items %}
67
67
  {% if subsubitem %}
@@ -56,6 +56,14 @@ params:
56
56
  type: text
57
57
  required: true
58
58
  description: aria-label for parent items. Should be similar as item text or item html text content.
59
+ - name: disabled
60
+ type: boolean
61
+ required: false
62
+ description: If disabled, the item will be disabled
63
+ - name: active
64
+ type: boolean
65
+ required: false
66
+ description: If active, the item will be with primary color
59
67
  - name: sub
60
68
  type: boolean
61
69
  required: false