desy-html 8.4.1 → 8.6.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/_macro.example-render.njk +1 -1
- package/docs/_macro.show-code-from-file.njk +1 -1
- package/docs/_macro.show-html-from-file.njk +1 -1
- package/docs/ds/_ds.macro.code-snippet.njk +1 -1
- package/docs/ds/_ds.section.textos.njk +6 -6
- package/docs/index.html +13 -0
- package/package.json +1 -1
- package/src/js/aria/MenuNavigation.js +115 -0
- package/src/js/aria/tabs.js +41 -4
- package/src/js/desy-html.js +10 -0
- package/src/js/index.js +2 -0
- package/src/templates/components/breadcrumbs/_examples.breadcrumbs.njk +33 -0
- package/src/templates/components/breadcrumbs/_styles.breadcrumbs.css +10 -0
- package/src/templates/components/breadcrumbs/_template.breadcrumbs.njk +4 -0
- package/src/templates/components/breadcrumbs/params.breadcrumbs.yaml +4 -0
- package/src/templates/components/footer/_examples.footer.njk +1 -1
- package/src/templates/components/menu-navigation/_examples.menu-navigation.njk +90 -63
- package/src/templates/components/menu-navigation/_styles.menu-navigation.css +4 -0
- package/src/templates/components/menu-navigation/_template.menu-navigation.njk +5 -21
- package/src/templates/components/menu-navigation/params.menu-navigation.yaml +4 -0
- package/src/templates/components/tabs/_examples.tabs.njk +9 -2
- package/src/templates/components/tree/_examples.tree.njk +94 -0
|
@@ -301,7 +301,7 @@ import componentTree %}
|
|
|
301
301
|
}
|
|
302
302
|
}) %}
|
|
303
303
|
{{ componentTabs({
|
|
304
|
-
"tablistAriaLabel": "
|
|
304
|
+
"tablistAriaLabel": "Ejemplos de código de: " + example.name | capitalize,
|
|
305
305
|
"idPrefix": "tab-" + loop.index,
|
|
306
306
|
"classes": "c-tabs--scroll",
|
|
307
307
|
"items": [
|
|
@@ -35,7 +35,7 @@ import componentTabs %}
|
|
|
35
35
|
}
|
|
36
36
|
}) %}
|
|
37
37
|
{{ componentTabs({
|
|
38
|
-
"tablistAriaLabel": "
|
|
38
|
+
"tablistAriaLabel": "Ejemplo de código de: " + filePath,
|
|
39
39
|
"idPrefix": "tab-" + filePath | replace("/", "-") | replace("_", "") | replace(".", "-"),
|
|
40
40
|
"classes": "c-tabs--scroll",
|
|
41
41
|
"items": [
|
|
@@ -25,7 +25,7 @@ import componentTabs %}
|
|
|
25
25
|
}
|
|
26
26
|
}) %}
|
|
27
27
|
{{ componentTabs({
|
|
28
|
-
"tablistAriaLabel": "
|
|
28
|
+
"tablistAriaLabel": "Ejemplo de código de: " + filePath,
|
|
29
29
|
"idPrefix": "tab-" + filePath | replace("/", "-") | replace("_", "") | replace(".", "-"),
|
|
30
30
|
"classes": "c-tabs--scroll",
|
|
31
31
|
"items": [
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
<h1 class="c-h0">Encabezado 0 (h1)</h1>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="lg:flex-1">
|
|
50
|
-
<p class="text-neutral-dark text-sm"><code>.c-h0</code> - <code>bold</code> - <code>black</code> - font-size: <code>2.5rem</code> - <code>40px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>
|
|
50
|
+
<p class="text-neutral-dark text-sm"><code>.c-h0</code> - <code>bold</code> - <code>black</code> - font-size: <code>2.5rem</code> - <code>40px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>50px</code> - margin-bottom: <code>.mb-8</code> - <code>2rem</code> - <code>32px</code></p>
|
|
51
51
|
</div>
|
|
52
52
|
</div>
|
|
53
53
|
<div class="flex flex-wrap items-center mb-8">
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<h1 class="c-h1">Encabezado 1 (h1)</h1>
|
|
56
56
|
</div>
|
|
57
57
|
<div class="lg:flex-1">
|
|
58
|
-
<p class="text-neutral-dark text-sm"><code>.c-h1</code> - <code>bold</code> - <code>black</code> - font-size: <code>.text-3xl</code> - <code>1.875rem</code> - <code>30px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>
|
|
58
|
+
<p class="text-neutral-dark text-sm"><code>.c-h1</code> - <code>bold</code> - <code>black</code> - font-size: <code>.text-3xl</code> - <code>1.875rem</code> - <code>30px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>37.5px</code> - margin-bottom: <code>.mb-lg</code> - <code>1.75rem</code> - <code>28px</code></p>
|
|
59
59
|
</div>
|
|
60
60
|
</div>
|
|
61
61
|
<div class="flex flex-wrap items-center mb-8">
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
<h2 class="c-h2">Encabezado 2 (h2)</h2>
|
|
64
64
|
</div>
|
|
65
65
|
<div class="lg:flex-1">
|
|
66
|
-
<p class="text-neutral-dark text-sm"><code>.c-h2</code> - <code>bold</code> - <code>black</code> - font-size: <code>.text-2xl</code> - <code>1.5rem</code> - <code>24px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>
|
|
66
|
+
<p class="text-neutral-dark text-sm"><code>.c-h2</code> - <code>bold</code> - <code>black</code> - font-size: <code>.text-2xl</code> - <code>1.5rem</code> - <code>24px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>30px</code> - margin-bottom: <code>.mb-base</code> - <code>1</code> - <code>16px</code></p>
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|
|
69
69
|
<div class="flex flex-wrap items-center mb-8">
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<h3 class="c-h3">Encabezado 3 (h3)</h3>
|
|
72
72
|
</div>
|
|
73
73
|
<div class="lg:flex-1">
|
|
74
|
-
<p class="text-neutral-dark text-sm"><code>.c-h3</code> - <code>bold</code> - <code>black</code> - font-size: <code>.text-lg</code> - <code>1.125rem</code> - <code>18px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>
|
|
74
|
+
<p class="text-neutral-dark text-sm"><code>.c-h3</code> - <code>bold</code> - <code>black</code> - font-size: <code>.text-lg</code> - <code>1.125rem</code> - <code>18px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>22.5px</code> - margin-bottom: <code>.mb-sm</code> - <code>0.5rem</code> - <code>8px</code></p>
|
|
75
75
|
</div>
|
|
76
76
|
</div>
|
|
77
77
|
<div class="flex flex-wrap items-center mb-8">
|
|
@@ -132,13 +132,13 @@
|
|
|
132
132
|
<p class="c-paragraph-sm">Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. </p>
|
|
133
133
|
</div>
|
|
134
134
|
<div class="col-span-2 lg:col-span-2 mb-lg">
|
|
135
|
-
<p class="text-neutral-dark text-sm">Párrafo pequeño. <br><code>.c-paragraph-sm</code><br><code>normal</code> - <code>black</code><br>font-size: <code>.text-sm</code> - <code>.875rem</code> - <code>14px</code> <br>line-height: <code>1.25rem</code> - <code>20px</code> <br> margin-bottom: <code>.mb-sm</code> - <code>.
|
|
135
|
+
<p class="text-neutral-dark text-sm">Párrafo pequeño. <br><code>.c-paragraph-sm</code><br><code>normal</code> - <code>black</code><br>font-size: <code>.text-sm</code> - <code>.875rem</code> - <code>14px</code> <br>line-height: <code>1.25rem</code> - <code>20px</code> <br> margin-bottom: <code>.mb-sm</code> - <code>.5rem</code> - <code>8px</code></p>
|
|
136
136
|
</div>
|
|
137
137
|
<div class="col-span-2 lg:col-span-2">
|
|
138
138
|
<p class="c-paragraph-sm text-neutral-dark">Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. </p>
|
|
139
139
|
</div>
|
|
140
140
|
<div class="col-span-2 lg:col-span-2 mb-lg">
|
|
141
|
-
<p class="text-neutral-dark text-sm">Párrafo pequeño secundario. <br><code>.c-paragraph-sm.text-neutral-dark</code><br><code>normal</code> - <code>neutral-dark</code><br>font-size: <code>.text-sm</code> - <code>.875rem</code> - <code>14px</code> <br>line-height: <code>1.25rem</code> - <code>20px</code> <br> margin-bottom: <code>.mb-sm</code> - <code>.
|
|
141
|
+
<p class="text-neutral-dark text-sm">Párrafo pequeño secundario. <br><code>.c-paragraph-sm.text-neutral-dark</code><br><code>normal</code> - <code>neutral-dark</code><br>font-size: <code>.text-sm</code> - <code>.875rem</code> - <code>14px</code> <br>line-height: <code>1.25rem</code> - <code>20px</code> <br> margin-bottom: <code>.mb-sm</code> - <code>.5rem</code> - <code>8px</code></p>
|
|
142
142
|
</div>
|
|
143
143
|
<div class="col-span-2 lg:col-span-2">
|
|
144
144
|
<ul class="c-ul">
|
package/docs/index.html
CHANGED
|
@@ -38,6 +38,19 @@
|
|
|
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.6.0</h3>
|
|
42
|
+
<ul class="text-sm">
|
|
43
|
+
<li>Added global function to select items and subitems in Menu navigation.</li>
|
|
44
|
+
<li>Bug fixes.</li>
|
|
45
|
+
<li>Improvements in docs.</li>
|
|
46
|
+
</ul>
|
|
47
|
+
<h3>v.8.5.0</h3>
|
|
48
|
+
<ul class="text-sm">
|
|
49
|
+
<li>Added global function to select an item in Tabs.</li>
|
|
50
|
+
<li>Added new param in Breadcrumbs to show the items inline on mobile.</li>
|
|
51
|
+
<li>Docs fixed bad units in text styles.</li>
|
|
52
|
+
<li>Improvements in docs.</li>
|
|
53
|
+
</ul>
|
|
41
54
|
<h3>v.8.4.1</h3>
|
|
42
55
|
<ul class="text-sm">
|
|
43
56
|
<li>Active items are font-bold now in all components.</li>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "desy-html",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.6.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,115 @@
|
|
|
1
|
+
export function MenuNavigation(aria) {
|
|
2
|
+
(function () {
|
|
3
|
+
aria.MenuNavigation = function (domNode) {
|
|
4
|
+
this.domNode = domNode;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
aria.MenuNavigation.prototype.init = function () {
|
|
8
|
+
const menuItems = this.domNode.querySelectorAll('a');
|
|
9
|
+
const getItemsFromMenu = Array.from(menuItems);
|
|
10
|
+
|
|
11
|
+
if(getItemsFromMenu.some(item => item.classList.contains('c-menu-navigation__button--has-selection'))) {
|
|
12
|
+
getItemsFromMenu.forEach((button) => {
|
|
13
|
+
if(button.classList.contains('c-menu-navigation__button--has-selection')) {
|
|
14
|
+
this.activateElement(button.id);
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if(this.domNode.querySelectorAll('.c-menu-navigation__sub--list')) {
|
|
20
|
+
const subItems = this.domNode.querySelectorAll('.c-menu-navigation__sub--list li a');
|
|
21
|
+
[...subItems].forEach((element) => {
|
|
22
|
+
if(element.getAttribute("aria-current") === "true"){
|
|
23
|
+
const getElement = element.parentElement.parentElement.parentElement.parentElement.querySelector('button');
|
|
24
|
+
getElement.classList.add('c-menu-navigation__button--primary', 'c-menu-navigation__button--has-selection');
|
|
25
|
+
getElement.firstChild.innerHTML = `<strong class="font-bold">${getElement.textContent}</strong>`;
|
|
26
|
+
element.innerHTML = `<strong class="font-bold">${element.textContent}</strong>`;
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
aria.MenuNavigation.prototype.activateElement = function (elementActive) {
|
|
33
|
+
const getAllLiElements = this.domNode.querySelectorAll('li');
|
|
34
|
+
[...getAllLiElements].forEach((element) => {
|
|
35
|
+
const getElement = element.querySelector('a');
|
|
36
|
+
if (getElement.id === elementActive) {
|
|
37
|
+
this.wrapActiveElement(getElement);
|
|
38
|
+
} else {
|
|
39
|
+
this.deactivateElement(getElement);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
aria.MenuNavigation.prototype.activateSubElement = function (menuId, elementActive) {
|
|
45
|
+
const getAllLinks = this.domNode.querySelectorAll(`#${menuId} ul li li a`);
|
|
46
|
+
[...getAllLinks].forEach((link) => {
|
|
47
|
+
if(link.id === elementActive) {
|
|
48
|
+
link.setAttribute('aria-current', 'true');
|
|
49
|
+
link.innerHTML = `<strong class="font-bold">${link.textContent}</strong>`;
|
|
50
|
+
} else {
|
|
51
|
+
const getElementParent = link.parentElement.parentElement.parentElement.parentElement.querySelector('button');
|
|
52
|
+
getElementParent.classList.remove('c-menu-navigation__button--primary', 'c-menu-navigation__button--has-selection');
|
|
53
|
+
getElementParent.firstChild.innerHTML = `${getElementParent.textContent}`;
|
|
54
|
+
link.setAttribute('aria-current', 'false');
|
|
55
|
+
link.innerHTML = `${link.textContent}`;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
[...getAllLinks].forEach((link) => {
|
|
59
|
+
if(link.getAttribute("aria-current") === "true"){
|
|
60
|
+
const getElementParent = link.parentElement.parentElement.parentElement.parentElement.querySelector('button');
|
|
61
|
+
getElementParent.classList.add('c-menu-navigation__button--primary', 'c-menu-navigation__button--has-selection');
|
|
62
|
+
getElementParent.firstChild.innerHTML = `<strong class="font-bold">${getElementParent.textContent}</strong>`;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
aria.MenuNavigation.prototype.wrapActiveElement = function (elementActive) {
|
|
68
|
+
elementActive.setAttribute('aria-current', 'true');
|
|
69
|
+
elementActive.classList.add('c-menu-navigation__button--primary', 'c-menu-navigation__button--has-selection');
|
|
70
|
+
elementActive.innerHTML = `<strong class="font-bold">${elementActive.textContent}</strong>`;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
aria.MenuNavigation.prototype.deactivateElement = function (elementDeactivated) {
|
|
74
|
+
elementDeactivated.setAttribute('aria-current', 'false');
|
|
75
|
+
elementDeactivated.classList.remove('c-menu-navigation__button--primary', 'c-menu-navigation__button--has-selection');
|
|
76
|
+
elementDeactivated.innerHTML = elementDeactivated.textContent;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
window.activateItemMenuNavigation = function (menuId, activeItemId) {
|
|
80
|
+
const menu = document.getElementById(menuId);
|
|
81
|
+
if (menu) {
|
|
82
|
+
const activeItem = document.querySelector(`#${menuId} #${activeItemId}`);
|
|
83
|
+
if (activeItem) {
|
|
84
|
+
const menuInstance = new aria.MenuNavigation(menu);
|
|
85
|
+
menuInstance.activateElement(activeItemId);
|
|
86
|
+
return [menu, activeItem];
|
|
87
|
+
} else {
|
|
88
|
+
console.log('There is no element with this id in the menu.');
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
} else {
|
|
92
|
+
console.log('There is no menu with this id in the document.');
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
window.activateSubItemMenuNavigation = function (menuId, activeSubItemId) {
|
|
98
|
+
const menu = document.getElementById(menuId);
|
|
99
|
+
if (menu) {
|
|
100
|
+
const activeSubItem = document.querySelector(`#${menuId} #${activeSubItemId}`);
|
|
101
|
+
if (activeSubItem) {
|
|
102
|
+
const menuInstance = new aria.MenuNavigation(menu);
|
|
103
|
+
menuInstance.activateSubElement(menuId, activeSubItemId);
|
|
104
|
+
return [menu, activeSubItem];
|
|
105
|
+
} else {
|
|
106
|
+
console.log('There is no element with this id in the menu.');
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
console.log('There is no menu with this id in the document.');
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}());
|
|
115
|
+
}
|
package/src/js/aria/tabs.js
CHANGED
|
@@ -80,8 +80,9 @@ export function tabs(aria) {
|
|
|
80
80
|
|
|
81
81
|
// When a tab is clicked, activateTab is fired to activate it
|
|
82
82
|
function clickEventListener (event) {
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
if(!event.target.matches('.c-tabs__link--is-active, .c-tabs__link--is-active strong')) {
|
|
84
|
+
activateTab(event.target, false);
|
|
85
|
+
}
|
|
85
86
|
};
|
|
86
87
|
|
|
87
88
|
// Handle keydown on tabs
|
|
@@ -279,12 +280,48 @@ export function tabs(aria) {
|
|
|
279
280
|
function addActiveClass(element) {
|
|
280
281
|
//Add active class to current tab
|
|
281
282
|
element.classList.add("c-tabs__link--is-active");
|
|
282
|
-
element.
|
|
283
|
+
element.setAttribute('role', 'tab');
|
|
284
|
+
element.innerHTML = `<strong class="font-bold">${element.textContent}</strong>`;
|
|
283
285
|
}
|
|
284
286
|
|
|
285
287
|
function removeActiveClass(element) {
|
|
286
288
|
element.classList.remove("c-tabs__link--is-active");
|
|
287
|
-
element.
|
|
289
|
+
element.removeAttribute('role');
|
|
290
|
+
element.innerHTML = element.textContent;
|
|
288
291
|
}
|
|
292
|
+
|
|
293
|
+
window.activateItemTabs = function (menuId, tabItemId) {
|
|
294
|
+
const menu = document.getElementById(menuId);
|
|
295
|
+
if (menu) {
|
|
296
|
+
const activeItemTab = document.querySelector(`#${menuId} #${tabItemId}`);
|
|
297
|
+
const activeItemPanel = document.querySelector(`[aria-labelledby="${tabItemId}"]`);
|
|
298
|
+
if (activeItemTab) {
|
|
299
|
+
document.querySelectorAll('.c-tabs__link').forEach((tab) => {
|
|
300
|
+
tab.classList.remove("c-tabs__link--is-active");
|
|
301
|
+
tab.innerHTML = tab.textContent;
|
|
302
|
+
})
|
|
303
|
+
|
|
304
|
+
activeItemTab.classList.add("c-tabs__link--is-active");
|
|
305
|
+
activeItemTab.setAttribute('role', 'tab');
|
|
306
|
+
activeItemTab.innerHTML = `<strong class="font-bold">${activeItemTab.textContent}</strong>`;
|
|
307
|
+
|
|
308
|
+
document.querySelectorAll('.c-tabs__panel').forEach((panel) => {
|
|
309
|
+
panel.setAttribute('hidden', 'hidden')
|
|
310
|
+
})
|
|
311
|
+
|
|
312
|
+
activeItemPanel.removeAttribute('hidden');
|
|
313
|
+
|
|
314
|
+
return [menu, activeItemTab, activeItemPanel];
|
|
315
|
+
|
|
316
|
+
} else {
|
|
317
|
+
console.log('There is no element with this id in the menu.');
|
|
318
|
+
return null;
|
|
319
|
+
}
|
|
320
|
+
} else {
|
|
321
|
+
console.log('There is no menu with this id in the document.');
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
};
|
|
289
325
|
}
|
|
326
|
+
|
|
290
327
|
}
|
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 { MenuNavigation } from './aria/MenuNavigation.js';
|
|
21
22
|
import { HeaderNavigation } from './aria/HeaderNavigation.js';
|
|
22
23
|
import { Nav } from './aria/Nav.js';
|
|
23
24
|
|
|
@@ -374,6 +375,15 @@ export function MenuVerticalComponent(aria) {
|
|
|
374
375
|
});
|
|
375
376
|
}
|
|
376
377
|
|
|
378
|
+
export function MenuNavigationComponent(aria) {
|
|
379
|
+
MenuNavigation(aria);
|
|
380
|
+
const modules = document.querySelectorAll('[data-module="c-menu-navigation"]');
|
|
381
|
+
[...modules].forEach((module) => {
|
|
382
|
+
const menuNavigation = new aria.MenuNavigation(module);
|
|
383
|
+
menuNavigation.init();
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
|
|
377
387
|
export function HeaderNavigationComponent(aria) {
|
|
378
388
|
HeaderNavigation(aria);
|
|
379
389
|
const modules = document.querySelectorAll('[data-module="c-header-navigation"]');
|
package/src/js/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
radioButtonComponent,
|
|
22
22
|
checkBoxComponent,
|
|
23
23
|
MenuVerticalComponent,
|
|
24
|
+
MenuNavigationComponent,
|
|
24
25
|
HeaderNavigationComponent,
|
|
25
26
|
NavComponent
|
|
26
27
|
} from './desy-html.js';
|
|
@@ -44,6 +45,7 @@ notificationComponent(aria);
|
|
|
44
45
|
radioButtonComponent(aria);
|
|
45
46
|
checkBoxComponent(aria);
|
|
46
47
|
MenuVerticalComponent(aria);
|
|
48
|
+
MenuNavigationComponent(aria);
|
|
47
49
|
HeaderNavigationComponent(aria);
|
|
48
50
|
NavComponent(aria);
|
|
49
51
|
|
|
@@ -152,6 +152,39 @@
|
|
|
152
152
|
]
|
|
153
153
|
}
|
|
154
154
|
},
|
|
155
|
+
{
|
|
156
|
+
"name": "con inline en móvil",
|
|
157
|
+
"description": "Mirar en anchuras pequeñas para ver cómo se genera un salto de línea si el texto no cabe.",
|
|
158
|
+
"data": {
|
|
159
|
+
"inlineOnMobile": true,
|
|
160
|
+
"items": [
|
|
161
|
+
{
|
|
162
|
+
"text": "Inicio",
|
|
163
|
+
"href": "/"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"text": "Trámites",
|
|
167
|
+
"href": "/tramites/"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"text": "Trámites por tema",
|
|
171
|
+
"href": "/tramites/tema/"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"text": "Actividades industriales y energía",
|
|
175
|
+
"href": "/tramites/tema/actividades-industriales-y-energia/"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"text": "Actividades industriales",
|
|
179
|
+
"href": "/tramites/tema/actividades-industriales/"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"text": "Comunicaciones de servicios",
|
|
183
|
+
"href": "/tramites/tema/actividades-industriales/comunicaciones-de-servicios/"
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
},
|
|
155
188
|
{
|
|
156
189
|
"name": "con botón atrás",
|
|
157
190
|
"data": {
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
{% set classNames = classNames + " c-breadcrumbs--collapse-on-mobile" %}
|
|
10
10
|
{% endif -%}
|
|
11
11
|
|
|
12
|
+
{% if params.inlineOnMobile %}
|
|
13
|
+
{% set classNames = classNames + " c-breadcrumbs--inline-on-mobile" %}
|
|
14
|
+
{% endif -%}
|
|
15
|
+
|
|
12
16
|
{# This verbose statement is for Purgecss to match the classnames needed. Purgecss needs explicit entire classnames appear in code, a string concatenation will fail. Eg. lg:grid-cols-max-content-{{ params.items.length if not params.hasBackButton else (params.items.length + 1)}} doesn't compile lg:grid-cols-max-content-1,2,3... #}
|
|
13
17
|
|
|
14
18
|
{% set gridClass %}
|
|
@@ -27,6 +27,10 @@ params:
|
|
|
27
27
|
type: boolean
|
|
28
28
|
required: false
|
|
29
29
|
description: When true, the breadcrumbs will collapse to the first and last item only on tablet breakpoint and below.
|
|
30
|
+
- name: inlineOnMobile
|
|
31
|
+
type: boolean
|
|
32
|
+
required: false
|
|
33
|
+
description: When true, the breadcrumbs will linebreak if there is needed only on tablet breakpoint and below.
|
|
30
34
|
- name: hasBackButton
|
|
31
35
|
type: boolean
|
|
32
36
|
required: false
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"meta": {
|
|
88
88
|
"html": 'Creado por <a href="https://sda.aragon.es/" class="c-link c-link--neutral">SDA Servicios Digitales de Aragón</a>'
|
|
89
89
|
},
|
|
90
|
-
"urlFeder": "https://www.aragon.es/-/
|
|
90
|
+
"urlFeder": "https://www.aragon.es/-/fondos-europeos-aragon",
|
|
91
91
|
"classes": "lg:mt-48"
|
|
92
92
|
}
|
|
93
93
|
},
|
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"name": "con item activo",
|
|
109
|
+
"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>activateItemMenuNavigation(elementMenu, idItemSeleccionado)</code> para seleccionar un item de un menú, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateItemMenuNavigation("mi-menu", "with-active-item-example-3")</code> para desactivar el item actual y activar el tercer item de este ejemplo.',
|
|
109
110
|
"data": {
|
|
110
111
|
"idPrefix": "with-active-item-example",
|
|
111
112
|
"items": [
|
|
@@ -124,7 +125,91 @@
|
|
|
124
125
|
}
|
|
125
126
|
],
|
|
126
127
|
"attributes": {
|
|
127
|
-
"aria-label": "Menu navigation"
|
|
128
|
+
"aria-label": "Menu navigation",
|
|
129
|
+
"id": "mi-menu"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "con sub-item activo",
|
|
135
|
+
"description": 'Añade <code>active: true</code> a un sub-item para mostrarlo activo inicialmente. También puedes usar con javascript la función global <code>activateSubItemMenuNavigation(elementMenu, idItemSeleccionado)</code> para seleccionar un sub-item de un menú, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateSubItemMenuNavigation("mi-sub-menu", "sub-active-sub-item-example-2-2")</code> para desactivar el sub-item actual y activar el tercer sub-item de este ejemplo.',
|
|
136
|
+
"data": {
|
|
137
|
+
"idPrefix": "with-active-sub-item-example",
|
|
138
|
+
"items": [
|
|
139
|
+
{
|
|
140
|
+
"text": "Item 1",
|
|
141
|
+
"id": "active-sub-item-example-1",
|
|
142
|
+
"sub": {
|
|
143
|
+
"items": [
|
|
144
|
+
{
|
|
145
|
+
"href": "#",
|
|
146
|
+
"text": "Subitem 1"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"href": "#",
|
|
150
|
+
"text": "Subitem 2",
|
|
151
|
+
"active": true
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"href": "#",
|
|
155
|
+
"text": "Subitem 3"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"attributes": {
|
|
159
|
+
"aria-labelledby": "active-sub-item-example-item-1"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"text": "Item 2",
|
|
165
|
+
"id": "active-sub-item-example-2",
|
|
166
|
+
"sub": {
|
|
167
|
+
"items": [
|
|
168
|
+
{
|
|
169
|
+
"href": "#",
|
|
170
|
+
"text": "Subitem 1"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"href": "#",
|
|
174
|
+
"text": "Subitem 2"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"href": "#",
|
|
178
|
+
"text": "Subitem 3"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"attributes": {
|
|
182
|
+
"aria-labelledby": "active-sub-item-example-item-2"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"text": "Item 3",
|
|
188
|
+
"id": "active-sub-item-example-3",
|
|
189
|
+
"sub": {
|
|
190
|
+
"items": [
|
|
191
|
+
{
|
|
192
|
+
"href": "#",
|
|
193
|
+
"text": "Subitem 1"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"href": "#",
|
|
197
|
+
"text": "Subitem 2"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"href": "#",
|
|
201
|
+
"text": "Subitem 3"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"attributes": {
|
|
205
|
+
"aria-labelledby": "active-sub-item-example-item-2"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"attributes": {
|
|
211
|
+
"aria-label": "Menu navigation",
|
|
212
|
+
"id": "mi-sub-menu"
|
|
128
213
|
}
|
|
129
214
|
}
|
|
130
215
|
},
|
|
@@ -598,65 +683,6 @@
|
|
|
598
683
|
}
|
|
599
684
|
}
|
|
600
685
|
},
|
|
601
|
-
{
|
|
602
|
-
"name": "con un item hijo activo",
|
|
603
|
-
"data": {
|
|
604
|
-
"idPrefix": "nav-item-with-children-active",
|
|
605
|
-
"items": [
|
|
606
|
-
{
|
|
607
|
-
"text": "Item 1",
|
|
608
|
-
"id": "nav-item-item-1-a",
|
|
609
|
-
"sub": {
|
|
610
|
-
"items": [
|
|
611
|
-
{
|
|
612
|
-
"href": "#",
|
|
613
|
-
"text": "Subitem 1"
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
"href": "#",
|
|
617
|
-
"text": "Subitem 2",
|
|
618
|
-
"active": true
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
"href": "#",
|
|
622
|
-
"text": "Subitem 3"
|
|
623
|
-
}
|
|
624
|
-
],
|
|
625
|
-
"attributes": {
|
|
626
|
-
"aria-labelledby": "nav-item-item-1-a"
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
},
|
|
630
|
-
{
|
|
631
|
-
"text": "Item 2",
|
|
632
|
-
"id": "nav-item-item-2-a",
|
|
633
|
-
"sub": {
|
|
634
|
-
"items": [
|
|
635
|
-
{
|
|
636
|
-
"href": "#",
|
|
637
|
-
"text": "Subitem 1"
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
"href": "#",
|
|
641
|
-
"text": "Subitem 2",
|
|
642
|
-
"active": true
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
"href": "#",
|
|
646
|
-
"text": "Subitem 3"
|
|
647
|
-
}
|
|
648
|
-
],
|
|
649
|
-
"attributes": {
|
|
650
|
-
"aria-labelledby": "nav-item-item-2-a"
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
],
|
|
655
|
-
"attributes": {
|
|
656
|
-
"aria-label": "Menu navigation"
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
},
|
|
660
686
|
{
|
|
661
687
|
"name": "con deshabilitado o sin href en un padre e hijo",
|
|
662
688
|
"data": {
|
|
@@ -717,7 +743,7 @@
|
|
|
717
743
|
},
|
|
718
744
|
{
|
|
719
745
|
"name": "con estilos de cabecera",
|
|
720
|
-
"description": 'Un Menu navigation puede estar anidado en <code>customNavigationHtml</code> en el componente Header.',
|
|
746
|
+
"description": 'Un Menu navigation puede estar anidado en <code>customNavigationHtml</code> en el componente Header. Añade <code>active: true</code> a un sub-item para mostrarlo activo inicialmente. También puedes usar con javascript la función global <code>activateSubItemMenuNavigation(elementMenu, idItemSeleccionado)</code> para seleccionar un sub-item de un menú, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateSubItemMenuNavigation("mi-menu-header", "sub-header-custom-nav-item-1-1")</code> para desactivar el sub-item actual y activar el primer sub-item del primer item de este ejemplo.',
|
|
721
747
|
"data": {
|
|
722
748
|
"idPrefix": "header-custom-nav",
|
|
723
749
|
"classes": "bg-neutral-lighter c-menu-navigation--last-right w-full",
|
|
@@ -823,7 +849,8 @@
|
|
|
823
849
|
}
|
|
824
850
|
],
|
|
825
851
|
"attributes": {
|
|
826
|
-
"aria-label": "Menu navigation"
|
|
852
|
+
"aria-label": "Menu navigation",
|
|
853
|
+
"id": "mi-menu-header"
|
|
827
854
|
}
|
|
828
855
|
}
|
|
829
856
|
},
|
|
@@ -1076,4 +1103,4 @@
|
|
|
1076
1103
|
}
|
|
1077
1104
|
}
|
|
1078
1105
|
}
|
|
1079
|
-
] %}
|
|
1106
|
+
] %}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
{#- Capture the HTML so we can optionally nest it in a fieldset -#}
|
|
16
16
|
{% set innerHtml %}
|
|
17
|
-
<ul
|
|
17
|
+
<ul class="flex flex-wrap gap-base c-menu-navigation__list">
|
|
18
18
|
{% for item in params.items %}
|
|
19
19
|
{% if item %}
|
|
20
20
|
{#- If the user explicitly sets an id, use this instead of the regular idPrefix -#}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
{% endif %}
|
|
39
39
|
{% if item.sub.items %}
|
|
40
40
|
<div class="c-menu-navigation__sub absolute bottom-0 left-0">
|
|
41
|
-
<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 -%}>
|
|
41
|
+
<ul id="{{ id }}-sub-list" class="c-menu-navigation__sub--list {% 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 -%}>
|
|
42
42
|
{% for subitem in item.sub.items %}
|
|
43
43
|
{% if subitem %}
|
|
44
44
|
{#- If the user explicitly sets an id, use this instead of the regular idPrefix -#}
|
|
@@ -49,28 +49,12 @@
|
|
|
49
49
|
{%- endif %}
|
|
50
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 %}
|
|
51
51
|
<li>
|
|
52
|
-
{% if subitem.href %}
|
|
53
|
-
{% if subitem.active %}
|
|
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
|
-
</span>
|
|
57
|
-
{% else %}
|
|
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 }}>
|
|
52
|
+
<a aria-current="{%- if subitem.active %}true{% else %}false{% endif -%}" {%- 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 }}>
|
|
59
53
|
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
60
54
|
{% if subitem.disabled %}
|
|
61
55
|
<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>
|
|
62
56
|
{% endif %}
|
|
63
57
|
</a>
|
|
64
|
-
{% endif %}
|
|
65
|
-
{% else %}
|
|
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
|
-
{% if subitem.active %}
|
|
68
|
-
<strong class="font-bold">{{ subitem.html | safe if subitem.html else subitem.text }}</strong>
|
|
69
|
-
{% else %}
|
|
70
|
-
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
71
|
-
{% endif %}
|
|
72
|
-
</span>
|
|
73
|
-
{% endif %}
|
|
74
58
|
</li>
|
|
75
59
|
{% if subitem.divider %}
|
|
76
60
|
<li class="my-sm border-b border-neutral-base">
|
|
@@ -98,8 +82,8 @@
|
|
|
98
82
|
{% endset -%}
|
|
99
83
|
|
|
100
84
|
<!-- menu-navigation -->
|
|
101
|
-
<nav {%- if params.classes %} class="{{ params.classes }}"{% endif %}
|
|
85
|
+
<nav data-module="c-menu-navigation" {%- if params.classes %} class="{{ params.classes }}"{% endif %}
|
|
102
86
|
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
103
87
|
{{ innerHtml | trim | safe }}
|
|
104
88
|
</nav>
|
|
105
|
-
<!-- /menu-navigation -->
|
|
89
|
+
<!-- /menu-navigation -->
|
|
@@ -30,7 +30,10 @@
|
|
|
30
30
|
"html": "<p><strong>Panel 4</strong>. Reiciendis eius in, nostrum porro? Quaerat, temporibus, optio? Lorem ipsum dolor sit, amet, consectetur adipisicing elit. Est quis exercitationem, nesciunt nulla quisquam temporibus. Provident animi dolor veniam, et quas consequuntur.</p>"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
]
|
|
33
|
+
],
|
|
34
|
+
"attributes": {
|
|
35
|
+
"id": "tabs-default"
|
|
36
|
+
}
|
|
34
37
|
}
|
|
35
38
|
},
|
|
36
39
|
{
|
|
@@ -138,6 +141,7 @@
|
|
|
138
141
|
},
|
|
139
142
|
{
|
|
140
143
|
"name": "con item activo",
|
|
144
|
+
"description": 'Añade <code>active: true</code> a una tab para mostrarla activa inicialmente. También puedes usar con javascript la función global <code>activateItemTabs(elementMenu, idItemSeleccionado)</code> para seleccionar una tab y su panel, usando sus ids. Ej: Abre la consola del navegador y escribe <code>activateItemTabs("tabs-active", "tab-example-active-3")</code> para desactivar la tab actual y activar la tercera tab de este ejemplo.',
|
|
141
145
|
"data": {
|
|
142
146
|
"tablistAriaLabel": "Ejemplo de tab",
|
|
143
147
|
"idPrefix": "tab-example-active",
|
|
@@ -167,7 +171,10 @@
|
|
|
167
171
|
"html": "<p><strong>Panel 4</strong>. Reiciendis eius in, nostrum porro? Quaerat, temporibus, optio? Lorem ipsum dolor sit, amet, consectetur adipisicing elit. Est quis exercitationem, nesciunt nulla quisquam temporibus. Provident animi dolor veniam, et quas consequuntur.</p>"
|
|
168
172
|
}
|
|
169
173
|
}
|
|
170
|
-
]
|
|
174
|
+
],
|
|
175
|
+
"attributes": {
|
|
176
|
+
"id": "tabs-active"
|
|
177
|
+
}
|
|
171
178
|
}
|
|
172
179
|
},
|
|
173
180
|
{
|
|
@@ -1450,6 +1450,100 @@
|
|
|
1450
1450
|
]
|
|
1451
1451
|
}
|
|
1452
1452
|
},
|
|
1453
|
+
{
|
|
1454
|
+
"name": "con searchbar y scroll en el contenedor de árbol",
|
|
1455
|
+
"description": 'Puedes usar las clases de CSS: <code>max-h-64</code> o <code>max-h-40</code> junto a <code>overflow-y-auto</code>, para poner barras de scroll al árbol en caso de que su altura sea muy grande o bien cuando la altura crezca debido a que los items sean expandidos por el usuario.',
|
|
1456
|
+
"data": {
|
|
1457
|
+
"name": "with-searchbar-scroll",
|
|
1458
|
+
"classes": "mt-base max-h-64 overflow-y-auto",
|
|
1459
|
+
"fieldset": {
|
|
1460
|
+
"legend": {
|
|
1461
|
+
"text": "Selecciona organismo"
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
"searchbar": {
|
|
1465
|
+
"id": "with-searchbar-scroll-searchbar",
|
|
1466
|
+
"label": {
|
|
1467
|
+
"text": "Buscar"
|
|
1468
|
+
},
|
|
1469
|
+
"placeholder": "Buscar organismo"
|
|
1470
|
+
},
|
|
1471
|
+
"items": [
|
|
1472
|
+
{
|
|
1473
|
+
"text": "Item 1",
|
|
1474
|
+
"id": "with-searchbar-scroll-item-1",
|
|
1475
|
+
"expanded": true,
|
|
1476
|
+
"sub": {
|
|
1477
|
+
"items": [
|
|
1478
|
+
{
|
|
1479
|
+
"text": "Subitem 1",
|
|
1480
|
+
"value": "subitem-1"
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
"text": "Subitem 2",
|
|
1484
|
+
"value": "subitem-2"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"text": "Subitem 3",
|
|
1488
|
+
"value": "subitem-3"
|
|
1489
|
+
}
|
|
1490
|
+
],
|
|
1491
|
+
"attributes": {
|
|
1492
|
+
"aria-labelledby": "with-searchbar-scroll-item-1"
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"text": "Item 2",
|
|
1498
|
+
"id": "with-searchbar-scroll-item-2",
|
|
1499
|
+
"expanded": true,
|
|
1500
|
+
"sub": {
|
|
1501
|
+
"items": [
|
|
1502
|
+
{
|
|
1503
|
+
"text": "Subitem 1",
|
|
1504
|
+
"value": "subitem-1"
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
"text": "Subitem 2",
|
|
1508
|
+
"value": "subitem-2"
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"text": "Subitem 3",
|
|
1512
|
+
"value": "subitem-3"
|
|
1513
|
+
}
|
|
1514
|
+
],
|
|
1515
|
+
"attributes": {
|
|
1516
|
+
"aria-labelledby": "with-searchbar-scroll-item-2"
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
},
|
|
1520
|
+
{
|
|
1521
|
+
"text": "Item 3",
|
|
1522
|
+
"id": "with-searchbar-scroll-item-3",
|
|
1523
|
+
"expanded": true,
|
|
1524
|
+
"sub": {
|
|
1525
|
+
"items": [
|
|
1526
|
+
{
|
|
1527
|
+
"text": "Subitem 1",
|
|
1528
|
+
"value": "subitem-1"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"text": "Subitem 2",
|
|
1532
|
+
"value": "subitem-2"
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
"text": "Subitem 3",
|
|
1536
|
+
"value": "subitem-3"
|
|
1537
|
+
}
|
|
1538
|
+
],
|
|
1539
|
+
"attributes": {
|
|
1540
|
+
"aria-labelledby": "with-searchbar-scroll-item-3"
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
]
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1453
1547
|
{
|
|
1454
1548
|
"name": "peque",
|
|
1455
1549
|
"description": "Con clases aplicadas.",
|