desy-html 4.2.1 → 5.1.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 +51 -47
- package/docs/_macro.example-render.njk +4 -0
- package/docs/componentes.html +3 -0
- package/docs/ds/_ds.example.header.njk +1 -1
- package/docs/ds/_ds.example.menu-vertical.njk +3 -3
- package/docs/ds/_ds.example.menubar-en-uso.njk +6 -18
- package/docs/ds/_ds.example.menubar-variaciones.njk +51 -121
- package/docs/examples-tree.html +5 -0
- package/docs/index.html +18 -0
- package/package.json +1 -1
- package/src/css/styles.css +1 -0
- package/src/js/aria/tree.js +245 -0
- package/src/js/aria/treeitem.js +260 -0
- package/src/js/desy-html.js +28 -0
- package/src/js/index.js +3 -1
- package/src/templates/components/description-list/_examples.description-list.njk +63 -0
- package/src/templates/components/dropdown/params.dropdown.yaml +6 -6
- package/src/templates/components/header/_examples.header.njk +35 -3
- package/src/templates/components/header/_template.header.header__dropdown.njk +7 -2
- package/src/templates/components/header/_template.header.header__offcanvas.njk +1 -1
- package/src/templates/components/header/_template.header.header__subnav.njk +17 -13
- package/src/templates/components/header/_template.header.njk +42 -30
- package/src/templates/components/header/params.header.yaml +45 -5
- package/src/templates/components/menu-horizontal/_examples.menu-horizontal.njk +2 -1
- package/src/templates/components/menu-horizontal/_template.menu-horizontal.njk +1 -1
- package/src/templates/components/menubar/_examples.menubar.njk +349 -143
- package/src/templates/components/menubar/_styles.menubar.css +1 -0
- package/src/templates/components/menubar/_template.menubar.njk +2 -2
- package/src/templates/components/menubar/params.menubar.yaml +4 -0
- package/src/templates/components/tree/_examples.tree.njk +987 -0
- package/src/templates/components/tree/_macro.tree.njk +3 -0
- package/src/templates/components/tree/_styles.tree.css +45 -0
- package/src/templates/components/tree/_template.tree.njk +175 -0
- package/src/templates/components/tree/params.tree.yaml +159 -0
|
@@ -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 %}
|
|
@@ -60,6 +60,10 @@ params:
|
|
|
60
60
|
type: boolean
|
|
61
61
|
required: false
|
|
62
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
|
|
63
67
|
- name: sub
|
|
64
68
|
type: boolean
|
|
65
69
|
required: false
|