desy-html 7.1.2 → 7.2.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/_global.foot.njk +9 -9
- package/docs/_global.head.njk +1 -1
- package/docs/_macro.example-render.njk +177 -147
- package/docs/_macro.render-caller.njk +1 -1
- package/docs/ds/_ds.example.border.njk +1 -1
- package/docs/ds/_ds.example.color-de-interaccion.njk +5 -5
- package/docs/ds/_ds.example.colores-cabecera.njk +7 -7
- package/docs/ds/_ds.example.colores-de-soporte.njk +72 -5
- package/docs/ds/_ds.example.colores-neutros.njk +12 -12
- package/docs/ds/_ds.example.layout.njk +2 -2
- package/docs/ds/_ds.example.typography.njk +1 -1
- package/docs/ds/_ds.macro.code-snippet.njk +28 -9
- package/docs/ds/_ds.section.color.njk +7 -65
- package/docs/ds/_ds.section.espaciado.njk +4 -295
- package/docs/ds/_ds.section.layout.njk +5 -5
- package/docs/ds/_ds.section.textos.njk +32 -54
- package/docs/ds/_ds.section.typography.njk +239 -236
- package/docs/index.html +8 -0
- package/package.json +1 -1
- package/src/js/aria/dataGrid.js +21 -6
- package/src/js/index.js +0 -7
- package/src/js/popper.min.js +6 -0
- package/src/js/prism/clipboard.min.js +7 -0
- package/src/js/prism/prism-copy-to-clipboard.min.js +1 -0
- package/src/js/prism/prism-normalize-whitespace.min.js +1 -0
- package/src/js/prism/prism-toolbar.min.js +1 -0
- package/src/js/prism/prism-twig.min.js +1 -0
- package/src/js/prism/prism-yaml.min.js +1 -0
- package/src/js/prism/prism.min.js +1 -0
- package/src/js/tippy-bundle.umd.min.js +2 -0
- package/src/templates/components/accordion/_template.accordion.njk +95 -84
- package/src/templates/components/accordion-history/_template.accordion-history.njk +134 -123
- package/src/templates/components/alert/_template.alert.njk +6 -6
- package/src/templates/components/breadcrumbs/_template.breadcrumbs.njk +15 -30
- package/src/templates/components/button/_template.button.njk +4 -0
- package/src/templates/components/button-loader/_template.button-loader.njk +11 -7
- package/src/templates/components/card/_examples.card.njk +76 -76
- package/src/templates/components/card/_template.card.njk +14 -14
- package/src/templates/components/character-count/_template.character-count.njk +3 -6
- package/src/templates/components/checkboxes/_examples.checkboxes.njk +49 -10
- package/src/templates/components/checkboxes/_template.checkboxes.njk +17 -11
- package/src/templates/components/collapsible/_template.collapsible.njk +4 -4
- package/src/templates/components/date-input/_template.date-input.njk +46 -40
- package/src/templates/components/dialog/_template.dialog.njk +2 -2
- package/src/templates/components/error-message/_template.error-message.njk +3 -3
- package/src/templates/components/error-summary/_template.error-summary.njk +18 -6
- package/src/templates/components/fieldset/_examples.fieldset.njk +32 -6
- package/src/templates/components/fieldset/_template.fieldset.njk +28 -16
- package/src/templates/components/footer/_examples.footer.njk +14 -9
- package/src/templates/components/footer/_template.footer.njk +62 -66
- package/src/templates/components/footer/params.footer.yaml +4 -26
- package/src/templates/components/header/_examples.header.njk +6 -4
- package/src/templates/components/header/_template.header.header__dropdown.njk +27 -22
- package/src/templates/components/header/_template.header.header__navigation.njk +4 -1
- package/src/templates/components/header/_template.header.header__offcanvas.njk +18 -16
- package/src/templates/components/header/_template.header.header__offcanvasButton.njk +2 -1
- package/src/templates/components/header/_template.header.header__subnav.njk +33 -29
- package/src/templates/components/header/_template.header.njk +70 -60
- package/src/templates/components/header-advanced/_examples.header-advanced.njk +46 -32
- package/src/templates/components/header-advanced/_template.header-advanced.njk +93 -90
- package/src/templates/components/header-mini/_examples.header-mini.njk +1 -1
- package/src/templates/components/hint/_examples.hint.njk +2 -2
- package/src/templates/components/hint/_template.hint.njk +1 -3
- package/src/templates/components/input-group/_template.input-group.njk +72 -68
- package/src/templates/components/item/_template.item.njk +23 -23
- package/src/templates/components/label/_template.label.njk +25 -14
- package/src/templates/components/links-list/_examples.links-list.njk +10 -12
- package/src/templates/components/links-list/_template.links-list.njk +35 -37
- package/src/templates/components/listbox/_template.listbox.njk +11 -11
- package/src/templates/components/menu-navigation/_template.menu-navigation.njk +62 -63
- package/src/templates/components/menu-vertical/_template.menu-vertical.njk +41 -41
- package/src/templates/components/menubar/_template.menubar.njk +91 -91
- package/src/templates/components/modal/_template.modal.njk +63 -53
- package/src/templates/components/nav/_template.nav.njk +13 -13
- package/src/templates/components/notification/_examples.notification.njk +0 -9
- package/src/templates/components/notification/_template.notification.njk +54 -44
- package/src/templates/components/pagination/_template.pagination.njk +37 -42
- package/src/templates/components/radios/_examples.radios.njk +49 -12
- package/src/templates/components/radios/_template.radios.njk +90 -84
- package/src/templates/components/searchbar/_template.searchbar.njk +6 -6
- package/src/templates/components/select/_template.select.njk +12 -12
- package/src/templates/components/status-item/_template.status-item.njk +23 -25
- package/src/templates/components/table/_template.table.njk +4 -4
- package/src/templates/components/table-advanced/_examples.table-advanced.njk +9 -9
- package/src/templates/components/table-advanced/_styles.table-advanced.css +3 -3
- package/src/templates/components/table-advanced/_template.table-advanced.njk +85 -83
- package/src/templates/components/tabs/_template.tabs.njk +39 -39
- package/src/templates/components/toggle/_template.toggle.njk +1 -2
- package/src/templates/components/tooltip/_template.tooltip.njk +19 -19
- package/src/templates/components/tree/_template.tree.njk +46 -42
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
{% endset %}
|
|
6
6
|
|
|
7
7
|
{% set iconComplex %}
|
|
8
|
-
<div class="flex items-center justify-center p-sm -ml-sm bg-neutral-lighter rounded-full text-4xl">
|
|
9
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="1em" width="1em" class="inline-block align-middle"><path d="M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z" fill="currentColor"></path></svg>
|
|
10
|
-
</div>
|
|
8
|
+
<div class="flex items-center justify-center p-sm -ml-sm bg-neutral-lighter rounded-full text-4xl"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="1em" width="1em" class="inline-block align-middle"><path d="M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z" fill="currentColor"></path></svg></div>
|
|
11
9
|
{% endset %}
|
|
12
10
|
|
|
13
11
|
{% set examples = [
|
|
@@ -43,21 +41,21 @@
|
|
|
43
41
|
"href": "#",
|
|
44
42
|
"text": "Item 1",
|
|
45
43
|
"icon": {
|
|
46
|
-
"html": iconSimple
|
|
44
|
+
"html": iconSimple | trim
|
|
47
45
|
}
|
|
48
46
|
},
|
|
49
47
|
{
|
|
50
48
|
"href": "#",
|
|
51
49
|
"text": "Item 2",
|
|
52
50
|
"icon": {
|
|
53
|
-
"html": iconSimple
|
|
51
|
+
"html": iconSimple | trim
|
|
54
52
|
}
|
|
55
53
|
},
|
|
56
54
|
{
|
|
57
55
|
"href": "#",
|
|
58
56
|
"text": "Item 3",
|
|
59
57
|
"icon": {
|
|
60
|
-
"html": iconSimple
|
|
58
|
+
"html": iconSimple | trim
|
|
61
59
|
}
|
|
62
60
|
}
|
|
63
61
|
],
|
|
@@ -76,7 +74,7 @@
|
|
|
76
74
|
"text": "Item grande con icono",
|
|
77
75
|
"classes": "flex justify-between items-center py-base text-2xl",
|
|
78
76
|
"icon": {
|
|
79
|
-
"html": iconComplex
|
|
77
|
+
"html": iconComplex | trim
|
|
80
78
|
}
|
|
81
79
|
},
|
|
82
80
|
{
|
|
@@ -84,7 +82,7 @@
|
|
|
84
82
|
"text": "Item grande con icono",
|
|
85
83
|
"classes": "flex justify-between items-center py-base text-2xl",
|
|
86
84
|
"icon": {
|
|
87
|
-
"html": iconComplex
|
|
85
|
+
"html": iconComplex | trim
|
|
88
86
|
}
|
|
89
87
|
},
|
|
90
88
|
{
|
|
@@ -92,7 +90,7 @@
|
|
|
92
90
|
"text": "Item grande con icono",
|
|
93
91
|
"classes": "flex justify-between items-center py-base text-2xl",
|
|
94
92
|
"icon": {
|
|
95
|
-
"html": iconComplex
|
|
93
|
+
"html": iconComplex | trim
|
|
96
94
|
}
|
|
97
95
|
}
|
|
98
96
|
],
|
|
@@ -111,7 +109,7 @@
|
|
|
111
109
|
"text": "Item 1",
|
|
112
110
|
"containerClasses": "px-base border border-neutral-base my-sm",
|
|
113
111
|
"icon": {
|
|
114
|
-
"html": iconSimple
|
|
112
|
+
"html": iconSimple | trim
|
|
115
113
|
}
|
|
116
114
|
},
|
|
117
115
|
{
|
|
@@ -119,7 +117,7 @@
|
|
|
119
117
|
"text": "Item 2",
|
|
120
118
|
"containerClasses": "my-base px-base border border-neutral-base rounded",
|
|
121
119
|
"icon": {
|
|
122
|
-
"html": iconSimple
|
|
120
|
+
"html": iconSimple | trim
|
|
123
121
|
}
|
|
124
122
|
},
|
|
125
123
|
{
|
|
@@ -127,7 +125,7 @@
|
|
|
127
125
|
"text": "Item 3",
|
|
128
126
|
"containerClasses": "px-base border border-neutral-base my-sm",
|
|
129
127
|
"icon": {
|
|
130
|
-
"html": iconSimple
|
|
128
|
+
"html": iconSimple | trim
|
|
131
129
|
}
|
|
132
130
|
}
|
|
133
131
|
],
|
|
@@ -25,49 +25,49 @@
|
|
|
25
25
|
{% set subId = "sub-" + id %}
|
|
26
26
|
<li class="{% if item.containerClasses %}{{ item.containerClasses }}{% else %}px-base border-y border-neutral-base -my-px{% endif %}">
|
|
27
27
|
{% if item.href %}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{% endif %}
|
|
35
|
-
</div>
|
|
28
|
+
<a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="c-link {%- if item.classes %} {{ item.classes }}{% else %} flex justify-between items-center gap-base flex-1 py-base{% endif %} {%- if item.disabled %} text-neutral-base no-underline pointer-events-none{% endif %} {%- if item.active %} font-bold{% 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 -%}>
|
|
29
|
+
<div class="flex gap-base justify-between items-center flex-1">
|
|
30
|
+
{% if item.icon %}
|
|
31
|
+
<div class="{% if item.icon.containerClasses %}{{ item.icon.containerClasses }}{% else %}self-center h-full{% endif %}">
|
|
32
|
+
{% if item.icon.html %}
|
|
33
|
+
{{ item.icon.html | safe }}
|
|
36
34
|
{% endif %}
|
|
37
|
-
<div class="flex-1">
|
|
38
|
-
{% if item.active %}
|
|
39
|
-
<strong>{{ item.html | safe if item.html else item.text }}</strong>
|
|
40
|
-
{% else %}
|
|
41
|
-
{{ item.html | safe if item.html else item.text }}
|
|
42
|
-
{% endif %}
|
|
43
|
-
</div>
|
|
44
35
|
</div>
|
|
45
|
-
{
|
|
46
|
-
|
|
36
|
+
{% endif %}
|
|
37
|
+
<div class="flex-1">
|
|
38
|
+
{% if item.active %}
|
|
39
|
+
<strong>{{ item.html | safe if item.html else item.text }}</strong>
|
|
40
|
+
{% else %}
|
|
41
|
+
{{ item.html | safe if item.html else item.text }}
|
|
42
|
+
{% endif %}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
{{ arrow | safe | trim }}
|
|
46
|
+
</a>
|
|
47
47
|
{% else %}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
<div {%- if id %} id="{{ id }}"{% endif %} class="{%- if item.classes %} {{ item.classes }}{% else %} flex justify-between items-center gap-base flex-1 py-base{% endif %} {%- if item.disabled %} text-neutral-base no-underline pointer-events-none{% endif %} {%- if item.active %} font-bold{% 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 -%}>
|
|
49
|
+
<div class="flex gap-base justify-between items-center flex-1">
|
|
50
|
+
{% if item.icon %}
|
|
51
|
+
<div class="{% if item.icon.containerClasses %}{{ item.icon.containerClasses }}{% else %}self-center h-full{% endif %}">
|
|
52
|
+
{% if item.icon.html %}
|
|
53
|
+
{{ item.icon.html | safe }}
|
|
54
|
+
{% endif %}
|
|
55
|
+
</div>
|
|
56
|
+
{% endif %}
|
|
57
|
+
<div class="flex-1">
|
|
58
|
+
{% if item.active %}
|
|
59
|
+
<strong>{{ item.html | safe if item.html else item.text }}</strong>
|
|
60
|
+
{% else %}
|
|
61
|
+
{{ item.html | safe if item.html else item.text }}
|
|
56
62
|
{% endif %}
|
|
57
|
-
<div class="flex-1">
|
|
58
|
-
{% if item.active %}
|
|
59
|
-
<strong>{{ item.html | safe if item.html else item.text }}</strong>
|
|
60
|
-
{% else %}
|
|
61
|
-
{{ item.html | safe if item.html else item.text }}
|
|
62
|
-
{% endif %}
|
|
63
|
-
</div>
|
|
64
63
|
</div>
|
|
65
64
|
</div>
|
|
65
|
+
</div>
|
|
66
66
|
{% endif %}
|
|
67
67
|
{% if item.sub.html %}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
<div class="{%- if item.sub.classes %} {{ item.sub.classes }}{% else %} c-paragraph-base text-neutral-dark -mt-base mr-lg{% endif %}" id="{{ subId }}">
|
|
69
|
+
{{ item.sub.html | safe }}
|
|
70
|
+
</div>
|
|
71
71
|
{% endif %}
|
|
72
72
|
</li>
|
|
73
73
|
{% endif %}
|
|
@@ -76,8 +76,6 @@
|
|
|
76
76
|
{% endset -%}
|
|
77
77
|
|
|
78
78
|
<!-- links-list -->
|
|
79
|
-
|
|
80
|
-
|
|
81
79
|
{% if params.hasNav == false %}
|
|
82
80
|
<div {%- if params.classes %} class="{{ params.classes }}"{% endif %}
|
|
83
81
|
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
@@ -58,9 +58,9 @@ treat it as an interactive element - without this it will be
|
|
|
58
58
|
{% endif %}
|
|
59
59
|
{% endif %}
|
|
60
60
|
{% set commonItemAttributes %}{% if id %} id="{{ id }}"{% endif %} {%- if item.title %} title="{{ item.title }}"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}{% endset %}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
<li role="option" class="flex items-center pr-base pl-lg py-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black {%- if item.classes %} {{ item.classes }}{% endif -%}" {%- if item.active %} aria-selected="true"{% endif -%} {{- commonItemAttributes | safe }}>
|
|
62
|
+
{{ item.html | safe if item.html else item.text }}
|
|
63
|
+
</li>
|
|
64
64
|
{% endif %}
|
|
65
65
|
{% endfor %}
|
|
66
66
|
{% endset -%}
|
|
@@ -68,13 +68,13 @@ treat it as an interactive element - without this it will be
|
|
|
68
68
|
<!-- listbox -->
|
|
69
69
|
<div data-module="c-listbox" class="{% if params.classesContainer %}{{ params.classesContainer }}{% else %} relative{% endif %}">
|
|
70
70
|
{% if params.label %}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
<div id="{{ params.id }}-label" class="mb-sm {%- if params.label.classes %} {{ params.label.classes }}{% endif %}">
|
|
72
|
+
{% if params.label.html %}
|
|
73
|
+
{{ params.label.html | safe}}
|
|
74
|
+
{% else %}
|
|
75
|
+
<p>{{ params.label.text }}</p>
|
|
76
|
+
{% endif %}
|
|
77
|
+
</div>
|
|
78
78
|
{% endif %}
|
|
79
79
|
<button {{- commonAttributes | safe }} >
|
|
80
80
|
<span class="inline-flex self-center max-w-xs align-middle truncate">{%- if conditionalValue %} {{ conditionalValue }}{% else %}{{ params.html | safe if params.html else params.text }}{% endif %}</span>
|
|
@@ -83,7 +83,7 @@ treat it as an interactive element - without this it will be
|
|
|
83
83
|
</button>
|
|
84
84
|
<div class="c-listbox__tooltip -ml-sm mt-2 border border-neutral-base shadow-md bg-white {%- if params.classesTooltip %} {{ params.classesTooltip }}{% endif %}" data-module="c-listbox-tooltip" >
|
|
85
85
|
<ul id="{{ params.id }}" {{- commonTooltipAttributes | safe }} {%- if conditionalId %} aria-activedescendant="{{ conditionalId }}"{% endif %}>
|
|
86
|
-
{{ innerHtml |
|
|
86
|
+
{{ innerHtml | safe | trim }}
|
|
87
87
|
</ul>
|
|
88
88
|
</div>
|
|
89
89
|
</div>
|
|
@@ -31,77 +31,76 @@
|
|
|
31
31
|
{% set subId = "sub-" + id %}
|
|
32
32
|
<li class="relative">
|
|
33
33
|
{% if item.href %}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
<a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="c-menu-navigation__button {%- if item.disabled %} c-menu-navigation__button--disabled{% endif %} {%- if item.active %} c-menu-navigation__button--primary{% endif %} {%- if item.active %} c-menu-navigation__button--has-selection{% endif %} {%- if item.classes %} {{ item.classes }}{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %}{%- if item.active %} aria-current="page"{% endif %} {% if item.disabled %} role="link" aria-disabled="true" tabindex="-1"{% endif %} {% if item.target %} target="{{ item.target }}"{% endif %}{%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
35
|
+
<span class="inline-flex self-center max-w-xs align-middle truncate pointer-events-none">{{ item.html | safe if item.html else item.text }}</span>
|
|
36
|
+
</a>
|
|
37
37
|
{% else %}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</button>
|
|
38
|
+
<button {%- if item.sub %} aria-expanded="true" aria-controls="{{ id }}-sub-list"{% endif %}
|
|
39
|
+
{%- if id %} id="{{ id }}"{% endif %} class="c-menu-navigation__button {%- if item.disabled %} c-menu-navigation__button--disabled{% endif %} {%- if item.active %} c-menu-navigation__button--primary{% endif %} {%- if item.active %} c-menu-navigation__button--has-selection{% endif %} {%- if item.classes %} {{ item.classes }}{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %} {% if item.disabled %} aria-disabled="true" tabindex="-1"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>{% if item.active %}<span class="sr-only">Item activo: </span>{% endif %}<span class="inline-flex self-center max-w-xs align-middle truncate pointer-events-none">{{ item.html | safe if item.html else item.text }}</span>
|
|
40
|
+
{# Indentation is intentional to output HTML nicely #}
|
|
41
|
+
{{- iconHtml | safe | trim if iconHtml -}}
|
|
42
|
+
</button>
|
|
44
43
|
{% endif %}
|
|
45
44
|
{% if item.sub.items %}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{% endif %}
|
|
74
|
-
</a>
|
|
75
|
-
{% endif %}
|
|
76
|
-
{% else %}
|
|
77
|
-
<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 -%}>
|
|
78
|
-
{% if subitem.active %}
|
|
79
|
-
<strong>{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
|
|
80
|
-
{% else %}
|
|
81
|
-
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
82
|
-
{% endif %}
|
|
83
|
-
</span>
|
|
84
|
-
{% endif %}
|
|
85
|
-
</li>
|
|
86
|
-
{% if subitem.divider %}
|
|
87
|
-
<li class="my-sm border-b border-neutral-base">
|
|
88
|
-
<div class="sr-only">Separador</div>
|
|
89
|
-
</li>
|
|
45
|
+
<div class="c-menu-navigation__sub absolute bottom-0 left-0">
|
|
46
|
+
<ul id="{{ id }}-sub-list" class="{% if item.sub.classes %}{{ item.sub.classes }}{% else-%} c-menu-navigation__tooltip w-max max-w-64 border border-neutral-base shadow-md bg-white text-sm{% endif %}" {%- for attribute, value in item.sub.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
47
|
+
{% for subitem in item.sub.items %}
|
|
48
|
+
{% if subitem %}
|
|
49
|
+
{#- If the user explicitly sets an id, use this instead of the regular idPrefix -#}
|
|
50
|
+
{%- if subitem.id -%}
|
|
51
|
+
{%- set subId = subitem.id -%}
|
|
52
|
+
{%- else -%}
|
|
53
|
+
{#- The first id should not have a number suffix so it's easy to link to from the error summary component -#}
|
|
54
|
+
{%- if loop.first -%}
|
|
55
|
+
{%- set subId = "sub-" + id %}
|
|
56
|
+
{% else %}
|
|
57
|
+
{%- set subId = "sub-" + id + "-" + loop.index -%}
|
|
58
|
+
{%- endif -%}
|
|
59
|
+
{%- endif %}
|
|
60
|
+
{% 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
|
+
<li>
|
|
62
|
+
{% if subitem.href %}
|
|
63
|
+
{% if subitem.active %}
|
|
64
|
+
<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 }}>
|
|
65
|
+
<strong>{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
|
|
66
|
+
</span>
|
|
67
|
+
{% else %}
|
|
68
|
+
<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 }}>
|
|
69
|
+
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
70
|
+
{% if subitem.disabled %}
|
|
71
|
+
<svg viewBox="0 0 140 140" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="inline-block align-middle ml-sm text-neutral-base fill-current" aria-hidden="true" focusable="false" ><path d="M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zM20 70a50 50 0 0174.8-43.4 2.51 2.51 0 011.23 1.84 2.48 2.48 0 01-.71 2.1L30.54 95.32a2.51 2.51 0 01-3.94-.52A49.63 49.63 0 0120 70zm100 0a50 50 0 01-74.8 43.4 2.51 2.51 0 01-1.23-1.84 2.48 2.48 0 01.71-2.1l64.78-64.78a2.51 2.51 0 013.94.52A49.63 49.63 0 01120 70z"/></svg>
|
|
90
72
|
{% endif %}
|
|
73
|
+
</a>
|
|
91
74
|
{% endif %}
|
|
92
|
-
{%
|
|
93
|
-
|
|
94
|
-
|
|
75
|
+
{% else %}
|
|
76
|
+
<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 -%}>
|
|
77
|
+
{% if subitem.active %}
|
|
78
|
+
<strong>{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
|
|
79
|
+
{% else %}
|
|
80
|
+
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
81
|
+
{% endif %}
|
|
82
|
+
</span>
|
|
83
|
+
{% endif %}
|
|
84
|
+
</li>
|
|
85
|
+
{% if subitem.divider %}
|
|
86
|
+
<li class="my-sm border-b border-neutral-base">
|
|
87
|
+
<div class="sr-only">Separador</div>
|
|
88
|
+
</li>
|
|
89
|
+
{% endif %}
|
|
90
|
+
{% endif %}
|
|
91
|
+
{% endfor %}
|
|
92
|
+
</ul>
|
|
93
|
+
</div>
|
|
95
94
|
{% endif %}
|
|
96
95
|
</li>
|
|
97
96
|
{% if item.divider %}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
<li {%- if item.divider.classes %} class="{{ item.divider.classes }}"{% endif %} role="presentation" aria-hidden="true">
|
|
98
|
+
{% if item.divider.html %}
|
|
99
|
+
{{ item.divider.html | safe }}
|
|
100
|
+
{% else %}
|
|
101
|
+
{{ item.divider.text }}
|
|
102
|
+
{% endif %}
|
|
103
|
+
</li>
|
|
105
104
|
{% endif %}
|
|
106
105
|
{% endif %}
|
|
107
106
|
{% endfor %}
|
|
@@ -37,47 +37,47 @@
|
|
|
37
37
|
</span>
|
|
38
38
|
{% endif %}
|
|
39
39
|
{% if item.sub.items %}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
40
|
+
<ul {%- if item.sub.classes %} class="{{ item.sub.classes }}"{% endif %} {%- for attribute, value in item.sub.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
41
|
+
{% for subitem in item.sub.items %}
|
|
42
|
+
{% if subitem %}
|
|
43
|
+
{#- If the user explicitly sets an id, use this instead of the regular idPrefix -#}
|
|
44
|
+
{%- if subitem.id -%}
|
|
45
|
+
{%- set subId = subitem.id -%}
|
|
46
|
+
{%- else -%}
|
|
47
|
+
{#- The first id should not have a number suffix so it's easy to link to from the error summary component -#}
|
|
48
|
+
{%- if loop.first -%}
|
|
49
|
+
{%- set subId = "sub-" + id %}
|
|
50
|
+
{% else %}
|
|
51
|
+
{%- set subId = "sub-" + id + "-" + loop.index -%}
|
|
52
|
+
{%- endif -%}
|
|
53
|
+
{%- endif %}
|
|
54
|
+
<li class="m-base origin-top-left text-sm">
|
|
55
|
+
{% if subitem.href %}
|
|
56
|
+
<a {%- if subitem.id %} 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.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 %} {% if subitem.target %} target="{{ subitem.target }}"{% endif %}{%- for attribute, value in subitem.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
57
|
+
{% if subitem.active %}
|
|
58
|
+
<strong>{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
|
|
59
|
+
{% else %}
|
|
60
|
+
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
61
|
+
{% endif %}
|
|
62
|
+
</a>
|
|
63
|
+
{% else %}
|
|
64
|
+
<span {%- if subitem.id %} id="{{ subId }}"{% endif %} class="block px-xs {%- 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 -%}>
|
|
65
|
+
{% if subitem.active %}
|
|
66
|
+
<strong>{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
|
|
67
|
+
{% else %}
|
|
68
|
+
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
69
|
+
{% endif %}
|
|
70
|
+
</span>
|
|
71
|
+
{% endif %}
|
|
72
|
+
</li>
|
|
73
|
+
{% if subitem.divider %}
|
|
74
|
+
<li class="my-sm border-b border-neutral-base" aria-hidden="true">
|
|
75
|
+
<div class="sr-only">Separador</div>
|
|
76
|
+
</li>
|
|
77
|
+
{% endif %}
|
|
78
|
+
{% endif %}
|
|
79
|
+
{% endfor %}
|
|
80
|
+
</ul>
|
|
81
81
|
{% elseif item.sub.html %}
|
|
82
82
|
<div class="mb-base px-xs origin-top-left text-sm text-neutral-dark {%- if item.sub.classes %} {{ item.sub.classes }}{% endif %}" id="{{ subId }}">
|
|
83
83
|
{{ item.sub.html | safe }}
|