desy-html 5.2.2 → 6.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.
Files changed (91) hide show
  1. package/config/tailwind.config.js +11 -21
  2. package/docs/_include.template-header.njk +16 -0
  3. package/docs/_macro.example-render.njk +16 -0
  4. package/docs/componentes.html +12 -0
  5. package/docs/ds/_ds.example.accordion.njk +61 -0
  6. package/docs/ds/_ds.example.footer.njk +7 -128
  7. package/docs/ds/_ds.example.header.njk +118 -0
  8. package/docs/ds/_ds.example.layout.njk +16 -6
  9. package/docs/ds/_ds.example.menu-navigation.njk +494 -0
  10. package/docs/ds/_ds.example.searchbar.njk +39 -0
  11. package/docs/ds/_ds.example.table.njk +432 -0
  12. package/docs/ds/_ds.example.toggle.njk +55 -35
  13. package/docs/ds/_ds.section.layout.njk +12 -12
  14. package/docs/ds/_ds.section.navigation.njk +5 -0
  15. package/docs/ds/_ds.section.textos.njk +27 -0
  16. package/docs/examples-accordion-history.html +5 -0
  17. package/docs/examples-header-advanced.html +5 -0
  18. package/docs/examples-header-mini.html +5 -0
  19. package/docs/examples-menu-navigation.html +5 -0
  20. package/docs/index.html +51 -0
  21. package/gulpfile.js +7 -6
  22. package/package.json +6 -7
  23. package/src/css/base.css +4 -0
  24. package/src/css/styles.css +1 -0
  25. package/src/js/aria/accordion.js +16 -5
  26. package/src/js/aria/disclosureMenu.js +153 -0
  27. package/src/js/desy-html.js +15 -0
  28. package/src/js/index.js +2 -0
  29. package/src/templates/components/accordion/_examples.accordion.njk +70 -2
  30. package/src/templates/components/accordion/_template.accordion.njk +18 -8
  31. package/src/templates/components/accordion/params.accordion.yaml +38 -0
  32. package/src/templates/components/accordion-history/_examples.accordion-history.njk +356 -0
  33. package/src/templates/components/accordion-history/_macro.accordion-history.njk +3 -0
  34. package/src/templates/components/accordion-history/_template.accordion-history.njk +209 -0
  35. package/src/templates/components/accordion-history/params.accordion-history.yaml +125 -0
  36. package/src/templates/components/button/_examples.button.njk +7 -0
  37. package/src/templates/components/button/_styles.button.css +27 -0
  38. package/src/templates/components/button/_template.button.njk +1 -1
  39. package/src/templates/components/button-loader/_template.button-loader.njk +6 -6
  40. package/src/templates/components/dropdown/_styles.dropdown.css +5 -4
  41. package/src/templates/components/file-upload/_examples.file-upload.njk +11 -5
  42. package/src/templates/components/file-upload/_template.file-upload.njk +1 -1
  43. package/src/templates/components/footer/_examples.footer.njk +46 -136
  44. package/src/templates/components/footer/_template.footer.njk +35 -28
  45. package/src/templates/components/footer/params.footer.yaml +18 -0
  46. package/src/templates/components/header/_examples.header.njk +167 -1
  47. package/src/templates/components/header/_template.header.header__navigation.njk +3 -3
  48. package/src/templates/components/header/_template.header.header__offcanvasButton.njk +1 -1
  49. package/src/templates/components/header/_template.header.header__subnav.njk +2 -2
  50. package/src/templates/components/header/_template.header.njk +8 -9
  51. package/src/templates/components/header/params.header.yaml +24 -0
  52. package/src/templates/components/header-advanced/_examples.header-advanced.njk +851 -0
  53. package/src/templates/components/header-advanced/_macro.header-advanced.njk +3 -0
  54. package/src/templates/components/header-advanced/_template.header-advanced.njk +146 -0
  55. package/src/templates/components/header-advanced/params.header-advanced.yaml +298 -0
  56. package/src/templates/components/header-mini/_examples.header-mini.njk +30 -0
  57. package/src/templates/components/header-mini/_macro.header-mini.njk +3 -0
  58. package/src/templates/components/header-mini/_template.header-mini.njk +14 -0
  59. package/src/templates/components/header-mini/params.header-mini.yaml +25 -0
  60. package/src/templates/components/input-group/_template.input-group.njk +2 -0
  61. package/src/templates/components/input-group/params.input-group.yaml +13 -5
  62. package/src/templates/components/item/_examples.item.njk +1 -1
  63. package/src/templates/components/item/_template.item.njk +3 -3
  64. package/src/templates/components/listbox/_styles.listbox.css +7 -4
  65. package/src/templates/components/menu-horizontal/_examples.menu-horizontal.njk +25 -0
  66. package/src/templates/components/menu-horizontal/_styles.menu-horizontal.css +26 -0
  67. package/src/templates/components/menu-horizontal/_template.menu-horizontal.njk +1 -1
  68. package/src/templates/components/menu-navigation/_examples.menu-navigation.njk +1080 -0
  69. package/src/templates/components/menu-navigation/_macro.menu-navigation.njk +3 -0
  70. package/src/templates/components/menu-navigation/_styles.menu-navigation.css +217 -0
  71. package/src/templates/components/menu-navigation/_template.menu-navigation.njk +116 -0
  72. package/src/templates/components/menu-navigation/params.menu-navigation.yaml +93 -0
  73. package/src/templates/components/menubar/_examples.menubar.njk +1 -170
  74. package/src/templates/components/menubar/_styles.menubar.css +26 -5
  75. package/src/templates/components/menubar/_template.menubar.njk +1 -1
  76. package/src/templates/components/modal/_examples.modal.njk +62 -0
  77. package/src/templates/components/modal/_template.modal.njk +21 -4
  78. package/src/templates/components/modal/params.modal.yaml +2 -2
  79. package/src/templates/components/searchbar/_examples.searchbar.njk +12 -1
  80. package/src/templates/components/searchbar/_template.searchbar.njk +9 -9
  81. package/src/templates/components/spinner/_styles.spinner.css +1 -0
  82. package/src/templates/components/spinner/_template.spinner.njk +4 -4
  83. package/src/templates/components/table-advanced/_examples.table-advanced.njk +182 -5
  84. package/src/templates/components/table-advanced/_template.table-advanced.njk +26 -2
  85. package/src/templates/components/table-advanced/params.table-advanced.yaml +5 -0
  86. package/src/templates/components/toggle/_examples.toggle.njk +33 -11
  87. package/src/templates/components/toggle/_template.toggle.njk +3 -1
  88. package/src/templates/components/toggle/params.toggle.yaml +4 -0
  89. package/src/templates/components/tree/_examples.tree.njk +580 -32
  90. package/src/templates/components/tree/_template.tree.njk +1 -1
  91. package/config/clean-css.js +0 -25
@@ -0,0 +1,1080 @@
1
+ {% set exampleComponent = "menu-navigation" %}
2
+ {% set examples = [
3
+ {
4
+ "name": "default",
5
+ "data": {
6
+ "idPrefix": "default-example",
7
+ "items": [
8
+ {
9
+ "text": "Item 1",
10
+ "id": "default-example-item-1",
11
+ "sub": {
12
+ "items": [
13
+ {
14
+ "href": "#",
15
+ "text": "Subitem 1"
16
+ },
17
+ {
18
+ "href": "#",
19
+ "text": "Subitem 2"
20
+ },
21
+ {
22
+ "href": "#",
23
+ "text": "Subitem 3"
24
+ }
25
+ ],
26
+ "attributes": {
27
+ "aria-labelledby": "default-example-item-1"
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "text": "Item 2",
33
+ "id": "default-example-item-2",
34
+ "sub": {
35
+ "items": [
36
+ {
37
+ "href": "#",
38
+ "text": "Subitem 1"
39
+ },
40
+ {
41
+ "href": "#",
42
+ "text": "Subitem 2"
43
+ },
44
+ {
45
+ "href": "#",
46
+ "text": "Subitem 3"
47
+ }
48
+ ],
49
+ "attributes": {
50
+ "aria-labelledby": "default-example-item-2"
51
+ }
52
+ }
53
+ },
54
+ {
55
+ "text": "Item 3",
56
+ "id": "default-example-item-3",
57
+ "sub": {
58
+ "items": [
59
+ {
60
+ "href": "#",
61
+ "text": "Subitem 1"
62
+ },
63
+ {
64
+ "href": "#",
65
+ "text": "Subitem 2"
66
+ },
67
+ {
68
+ "href": "#",
69
+ "text": "Subitem 3"
70
+ }
71
+ ],
72
+ "attributes": {
73
+ "aria-labelledby": "default-example-item-3"
74
+ }
75
+ }
76
+ }
77
+ ],
78
+ "attributes": {
79
+ "aria-label": "Menu navigation"
80
+ }
81
+ }
82
+ },
83
+ {
84
+ "name": "with disabled item",
85
+ "data": {
86
+ "idPrefix": "with-disabled-item-example",
87
+ "items": [
88
+ {
89
+ "href": "#",
90
+ "text": "Item 1"
91
+ },
92
+ {
93
+ "href": "#",
94
+ "text": "Item 2"
95
+ },
96
+ {
97
+ "href": "#",
98
+ "text": "Item 3",
99
+ "disabled": true
100
+ }
101
+ ],
102
+ "attributes": {
103
+ "aria-label": "Menu navigation"
104
+ }
105
+ }
106
+ },
107
+ {
108
+ "name": "with active item",
109
+ "data": {
110
+ "idPrefix": "with-active-item-example",
111
+ "items": [
112
+ {
113
+ "href": "#",
114
+ "text": "Item 1"
115
+ },
116
+ {
117
+ "href": "#",
118
+ "text": "Item 2",
119
+ "active": true
120
+ },
121
+ {
122
+ "href": "#",
123
+ "text": "Item 3"
124
+ }
125
+ ],
126
+ "attributes": {
127
+ "aria-label": "Menu navigation"
128
+ }
129
+ }
130
+ },
131
+ {
132
+ "name": "with target in links",
133
+ "data": {
134
+ "idPrefix": "with-targets-in-links-example",
135
+ "items": [
136
+ {
137
+ "href": "#",
138
+ "text": "Item 1",
139
+ "target": "_blank",
140
+ "attributes": {
141
+ "title": "Se abre en ventana nueva"
142
+ }
143
+ },
144
+ {
145
+ "href": "#",
146
+ "text": "Item 2",
147
+ "target": "_blank",
148
+ "attributes": {
149
+ "title": "Se abre en ventana nueva"
150
+ }
151
+ },
152
+ {
153
+ "href": "#",
154
+ "text": "Item 3",
155
+ "target": "_blank",
156
+ "attributes": {
157
+ "title": "Se abre en ventana nueva"
158
+ }
159
+ }
160
+ ],
161
+ "attributes": {
162
+ "aria-label": "Menu navigation"
163
+ }
164
+ }
165
+ },
166
+ {
167
+ "name": "with dividers",
168
+ "data": {
169
+ "idPrefix": "with-dividers-example",
170
+ "items": [
171
+ {
172
+ "href": "#",
173
+ "text": "Item 1"
174
+ },
175
+ {
176
+ "href": "#",
177
+ "text": "Item 2",
178
+ "divider": {
179
+ "html": '<div class="absolute h-11 border-l border-neutral-base"></div>'
180
+ }
181
+ },
182
+ {
183
+ "text": "Item 3",
184
+ "id": "with-dividers-example-parent",
185
+ "sub": {
186
+ "items": [
187
+ {
188
+ "href": "#",
189
+ "text": "Subitem 1"
190
+ },
191
+ {
192
+ "href": "#",
193
+ "text": "Subitem 2",
194
+ "divider": true
195
+ },
196
+ {
197
+ "href": "#",
198
+ "text": "Subitem 3"
199
+ }
200
+ ],
201
+ "attributes": {
202
+ "aria-labelledby": "with-dividers-example-parent"
203
+ }
204
+ }
205
+ },
206
+ {
207
+ "href": "#",
208
+ "text": "Item 4"
209
+ }
210
+ ],
211
+ "attributes": {
212
+ "aria-label": "Menu navigation"
213
+ }
214
+ }
215
+ },
216
+ {
217
+ "name": "small",
218
+ "description": "Using classes to display small items",
219
+ "data": {
220
+ "idPrefix": "small-example",
221
+ "items": [
222
+ {
223
+ "text": "Item 1",
224
+ "id": "small-example-item-1",
225
+ "classes": "c-menu-navigation__button--sm -mr-sm",
226
+ "sub": {
227
+ "items": [
228
+ {
229
+ "href": "#",
230
+ "text": "Subitem 1"
231
+ },
232
+ {
233
+ "href": "#",
234
+ "text": "Subitem 2"
235
+ },
236
+ {
237
+ "href": "#",
238
+ "text": "Subitem 3"
239
+ }
240
+ ],
241
+ "attributes": {
242
+ "aria-labelledby": "small-example-item-1"
243
+ }
244
+ }
245
+ },
246
+ {
247
+ "text": "Item 2",
248
+ "id": "small-example-item-2",
249
+ "classes": "c-menu-navigation__button--sm -mr-sm",
250
+ "sub": {
251
+ "items": [
252
+ {
253
+ "href": "#",
254
+ "text": "Subitem 1"
255
+ },
256
+ {
257
+ "href": "#",
258
+ "text": "Subitem 2"
259
+ },
260
+ {
261
+ "href": "#",
262
+ "text": "Subitem 3"
263
+ }
264
+ ],
265
+ "attributes": {
266
+ "aria-labelledby": "small-example-item-2"
267
+ }
268
+ }
269
+ },
270
+ {
271
+ "text": "Item 3",
272
+ "id": "small-example-item-3",
273
+ "classes": "c-menu-navigation__button--sm -mr-sm",
274
+ "sub": {
275
+ "items": [
276
+ {
277
+ "href": "#",
278
+ "text": "Subitem 1"
279
+ },
280
+ {
281
+ "href": "#",
282
+ "text": "Subitem 2"
283
+ },
284
+ {
285
+ "href": "#",
286
+ "text": "Subitem 3"
287
+ }
288
+ ],
289
+ "attributes": {
290
+ "aria-labelledby": "small-example-item-3"
291
+ }
292
+ }
293
+ }
294
+ ],
295
+ "attributes": {
296
+ "aria-label": "Menu navigation"
297
+ }
298
+ }
299
+ },
300
+ {
301
+ "name": "primary",
302
+ "description": "Using classes to display primary items",
303
+ "data": {
304
+ "idPrefix": "primary-example",
305
+ "items": [
306
+ {
307
+ "text": "Item 1",
308
+ "id": "primary-example-item-1",
309
+ "classes": "c-menu-navigation__button--primary",
310
+ "sub": {
311
+ "items": [
312
+ {
313
+ "href": "#",
314
+ "text": "Subitem 1"
315
+ },
316
+ {
317
+ "href": "#",
318
+ "text": "Subitem 2"
319
+ },
320
+ {
321
+ "href": "#",
322
+ "text": "Subitem 3"
323
+ }
324
+ ],
325
+ "attributes": {
326
+ "aria-labelledby": "primary-example-item-1"
327
+ }
328
+ }
329
+ },
330
+ {
331
+ "text": "Active Item 2",
332
+ "id": "primary-example-item-2",
333
+ "classes": "c-menu-navigation__button--primary",
334
+ "active": true,
335
+ "sub": {
336
+ "items": [
337
+ {
338
+ "href": "#",
339
+ "text": "Subitem 1"
340
+ },
341
+ {
342
+ "href": "#",
343
+ "text": "Subitem 2",
344
+ "active": true
345
+ },
346
+ {
347
+ "href": "#",
348
+ "text": "Subitem 3"
349
+ }
350
+ ],
351
+ "attributes": {
352
+ "aria-labelledby": "primary-example-item-2"
353
+ }
354
+ }
355
+ },
356
+ {
357
+ "text": "Disabled Item 3",
358
+ "id": "primary-example-item-3",
359
+ "classes": "c-menu-navigation__button--primary",
360
+ "disabled": true,
361
+ "sub": {
362
+ "items": [
363
+ {
364
+ "href": "#",
365
+ "text": "Subitem 1"
366
+ },
367
+ {
368
+ "href": "#",
369
+ "text": "Subitem 2"
370
+ },
371
+ {
372
+ "href": "#",
373
+ "text": "Subitem 3"
374
+ }
375
+ ],
376
+ "attributes": {
377
+ "aria-labelledby": "primary-example-item-3"
378
+ }
379
+ }
380
+ }
381
+ ],
382
+ "attributes": {
383
+ "aria-label": "Menu navigation"
384
+ }
385
+ }
386
+ },
387
+ {
388
+ "name": "transparent",
389
+ "description": "Using classes to display transparent items",
390
+ "data": {
391
+ "idPrefix": "transparent-example",
392
+ "items": [
393
+ {
394
+ "text": "Item 1",
395
+ "id": "transparent-example-item-1",
396
+ "classes": "c-menu-navigation__button--transparent",
397
+ "sub": {
398
+ "items": [
399
+ {
400
+ "href": "#",
401
+ "text": "Subitem 1"
402
+ },
403
+ {
404
+ "href": "#",
405
+ "text": "Subitem 2"
406
+ },
407
+ {
408
+ "href": "#",
409
+ "text": "Subitem 3"
410
+ }
411
+ ],
412
+ "attributes": {
413
+ "aria-labelledby": "transparent-example-item-1"
414
+ }
415
+ }
416
+ },
417
+ {
418
+ "text": "Active Item 2",
419
+ "id": "transparent-example-item-2",
420
+ "classes": "c-menu-navigation__button--transparent",
421
+ "active": true,
422
+ "sub": {
423
+ "items": [
424
+ {
425
+ "href": "#",
426
+ "text": "Subitem 1"
427
+ },
428
+ {
429
+ "href": "#",
430
+ "text": "Subitem 2",
431
+ "active": true
432
+ },
433
+ {
434
+ "href": "#",
435
+ "text": "Subitem 3"
436
+ }
437
+ ],
438
+ "attributes": {
439
+ "aria-labelledby": "transparent-example-item-2"
440
+ }
441
+ }
442
+ },
443
+ {
444
+ "text": "Disabled Item 3",
445
+ "id": "transparent-example-item-3",
446
+ "classes": "c-menu-navigation__button--transparent",
447
+ "disabled": true,
448
+ "sub": {
449
+ "items": [
450
+ {
451
+ "href": "#",
452
+ "text": "Subitem 1"
453
+ },
454
+ {
455
+ "href": "#",
456
+ "text": "Subitem 2"
457
+ },
458
+ {
459
+ "href": "#",
460
+ "text": "Subitem 3"
461
+ }
462
+ ],
463
+ "attributes": {
464
+ "aria-labelledby": "transparent-example-item-3"
465
+ }
466
+ }
467
+ }
468
+ ],
469
+ "attributes": {
470
+ "aria-label": "Menu navigation"
471
+ }
472
+ }
473
+ },
474
+ {
475
+ "name": "with last item in right side",
476
+ "data": {
477
+ "idPrefix": "right-example",
478
+ "classes": "c-menu-navigation--last-right",
479
+ "items": [
480
+ {
481
+ "text": "Item 1",
482
+ "id": "right-example-item-1",
483
+ "sub": {
484
+ "items": [
485
+ {
486
+ "href": "#",
487
+ "text": "Subitem 1"
488
+ },
489
+ {
490
+ "href": "#",
491
+ "text": "Subitem 2"
492
+ },
493
+ {
494
+ "href": "#",
495
+ "text": "Subitem 3"
496
+ }
497
+ ],
498
+ "attributes": {
499
+ "aria-labelledby": "right-example-item-1"
500
+ }
501
+ }
502
+ },
503
+ {
504
+ "text": "Item 2",
505
+ "id": "right-example-item-2",
506
+ "sub": {
507
+ "items": [
508
+ {
509
+ "href": "#",
510
+ "text": "Subitem 1"
511
+ },
512
+ {
513
+ "href": "#",
514
+ "text": "Subitem 2"
515
+ },
516
+ {
517
+ "href": "#",
518
+ "text": "Subitem 3"
519
+ }
520
+ ],
521
+ "attributes": {
522
+ "aria-labelledby": "right-example-item-2"
523
+ }
524
+ }
525
+ },
526
+ {
527
+ "text": "Item 3",
528
+ "id": "right-example-item-3",
529
+ "sub": {
530
+ "items": [
531
+ {
532
+ "href": "#",
533
+ "text": "Subitem 1"
534
+ },
535
+ {
536
+ "href": "#",
537
+ "text": "Subitem 2"
538
+ },
539
+ {
540
+ "href": "#",
541
+ "text": "Subitem 3"
542
+ }
543
+ ],
544
+ "attributes": {
545
+ "aria-labelledby": "right-example-item-3"
546
+ }
547
+ }
548
+ },
549
+ {
550
+ "text": "Item 4",
551
+ "id": "right-example-item-4",
552
+ "sub": {
553
+ "items": [
554
+ {
555
+ "href": "#",
556
+ "text": "Subitem 1"
557
+ },
558
+ {
559
+ "href": "#",
560
+ "text": "Subitem 2"
561
+ },
562
+ {
563
+ "href": "#",
564
+ "text": "Subitem 3"
565
+ }
566
+ ],
567
+ "attributes": {
568
+ "aria-labelledby": "right-example-item-4"
569
+ }
570
+ }
571
+ }
572
+ ],
573
+ "attributes": {
574
+ "aria-label": "Menu navigation"
575
+ }
576
+ }
577
+ },
578
+ {
579
+ "name": "with very long option text",
580
+ "data": {
581
+ "idPrefix": "with-very-ling-text-example",
582
+ "items": [
583
+ {
584
+ "href": "#",
585
+ "text": "No debe haber enlaces de más de 250 caracteres, que es el máximo admitido en accesibilidad, con excepción de nombres de leyes. Nullam id dolor id nibh ultricies vehicula ut id elit. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Maecenas faucibus mollis interdum. Donec id elit non mi porta gravida at eget metus."
586
+ },
587
+ {
588
+ "href": "#",
589
+ "text": "No debe haber enlaces de más de 250 caracteres, que es el máximo admitido en accesibilidad, con excepción de nombres de leyes. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Donec sed odio dui. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Cras mattis consectetur purus sit amet fermentum."
590
+ },
591
+ {
592
+ "href": "#",
593
+ "text": "No debe haber enlaces de más de 250 caracteres, que es el máximo admitido en accesibilidad, con excepción de nombres de leyes. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Etiam porta sem malesuada magna mollis euismod. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. Sed posuere consectetur est at lobortis."
594
+ }
595
+ ],
596
+ "attributes": {
597
+ "aria-label": "Menu navigation"
598
+ }
599
+ }
600
+ },
601
+ {
602
+ "name": "with a children item active",
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
+ {
661
+ "name": "with disabled or without href in a parent and child",
662
+ "description": "Use hasUnderline true when you will have mixed, disabled or without href items and normal items.",
663
+ "data": {
664
+ "idPrefix": "nav-item-without-href",
665
+ "items": [
666
+ {
667
+ "text": "Item 1 disabled",
668
+ "id": "nav-item-item-1-b",
669
+ "disabled": true,
670
+ "sub": {
671
+ "items": [
672
+ {
673
+ "href": "#",
674
+ "text": "Subitem 1"
675
+ },
676
+ {
677
+ "href": "#",
678
+ "text": "Subitem 2 disabled",
679
+ "disabled": true
680
+ },
681
+ {
682
+ "href": "#",
683
+ "text": "Subitem 3"
684
+ }
685
+ ],
686
+ "attributes": {
687
+ "aria-labelledby": "nav-item-item-1-b"
688
+ }
689
+ }
690
+ },
691
+ {
692
+ "text": "Item 2",
693
+ "id": "nav-item-item-2-b",
694
+ "sub": {
695
+ "items": [
696
+ {
697
+ "href": "#",
698
+ "text": "Subitem 1"
699
+ },
700
+ {
701
+ "text": "Subitem 2 without href with href asdfasf adf asdf asdf asdf asdf"
702
+ },
703
+ {
704
+ "href": "#",
705
+ "text": "Subitem 3"
706
+ }
707
+ ],
708
+ "attributes": {
709
+ "aria-labelledby": "nav-item-item-2-b"
710
+ }
711
+ }
712
+ }
713
+ ],
714
+ "attributes": {
715
+ "aria-label": "Menu navigation"
716
+ }
717
+ }
718
+ },
719
+ {
720
+ "name": "header",
721
+ "description": "A menu navigation can be nested in customNavigationHtml in Header component.",
722
+ "data": {
723
+ "idPrefix": "header-custom-nav",
724
+ "classes": "bg-neutral-lighter c-menu-navigation--last-right w-full",
725
+ "items": [
726
+ {
727
+ "text": "Item 1",
728
+ "id": "header-custom-nav-item-1",
729
+ "classes": "c-menu-navigation__button--header -mr-base uppercase",
730
+ "sub": {
731
+ "items": [
732
+ {
733
+ "href": "#",
734
+ "text": "Subitem 1"
735
+ },
736
+ {
737
+ "href": "#",
738
+ "text": "Subitem 2"
739
+ },
740
+ {
741
+ "href": "#",
742
+ "text": "Subitem 3"
743
+ }
744
+ ],
745
+ "attributes": {
746
+ "aria-labelledby": "header-custom-nav-item-1"
747
+ }
748
+ }
749
+ },
750
+ {
751
+ "text": "Active Item 2",
752
+ "id": "header-custom-nav-item-2",
753
+ "classes": "c-menu-navigation__button--header -mr-base uppercase",
754
+ "active": true,
755
+ "sub": {
756
+ "items": [
757
+ {
758
+ "href": "#",
759
+ "text": "Subitem 1"
760
+ },
761
+ {
762
+ "href": "#",
763
+ "text": "Subitem 2",
764
+ "active": true
765
+ },
766
+ {
767
+ "href": "#",
768
+ "text": "Subitem 3"
769
+ }
770
+ ],
771
+ "attributes": {
772
+ "aria-labelledby": "header-custom-nav-item-2"
773
+ }
774
+ }
775
+ },
776
+ {
777
+ "text": "Disabled Item 3",
778
+ "id": "header-custom-nav-item-3",
779
+ "classes": "c-menu-navigation__button--header -mr-base uppercase",
780
+ "disabled": true,
781
+ "sub": {
782
+ "items": [
783
+ {
784
+ "href": "#",
785
+ "text": "Subitem 1"
786
+ },
787
+ {
788
+ "href": "#",
789
+ "text": "Subitem 2"
790
+ },
791
+ {
792
+ "href": "#",
793
+ "text": "Subitem 3"
794
+ }
795
+ ],
796
+ "attributes": {
797
+ "aria-labelledby": "header-custom-nav-item-3"
798
+ }
799
+ }
800
+ },
801
+ {
802
+ "text": "Item 4 right",
803
+ "id": "header-custom-nav-item-4",
804
+ "classes": "c-menu-navigation__button--header uppercase",
805
+ "sub": {
806
+ "items": [
807
+ {
808
+ "href": "#",
809
+ "text": "Subitem 1"
810
+ },
811
+ {
812
+ "href": "#",
813
+ "text": "Subitem 2"
814
+ },
815
+ {
816
+ "href": "#",
817
+ "text": "Subitem 3"
818
+ }
819
+ ],
820
+ "attributes": {
821
+ "aria-labelledby": "header-custom-nav-item-4"
822
+ }
823
+ }
824
+ }
825
+ ],
826
+ "attributes": {
827
+ "aria-label": "Menu navigation"
828
+ }
829
+ }
830
+ },
831
+ {
832
+ "name": "with idPrefix",
833
+ "description": "See code to display the idPrefix applied",
834
+ "data": {
835
+ "idPrefix": "with-id-prefix-example",
836
+ "items": [
837
+ {
838
+ "href": "#",
839
+ "text": "Option 1"
840
+ },
841
+ {
842
+ "href": "#",
843
+ "text": "Option 2"
844
+ },
845
+ {
846
+ "href": "#",
847
+ "text": "Option 3"
848
+ },
849
+ {
850
+ "href": "#",
851
+ "text": "Option 4"
852
+ },
853
+ {
854
+ "href": "#",
855
+ "text": "Option 5"
856
+ }
857
+ ],
858
+ "attributes": {
859
+ "aria-label": "Menu navigation"
860
+ }
861
+ }
862
+ },
863
+ {
864
+ "name": "with individual ids",
865
+ "description": "See code to display the ids applied",
866
+ "data": {
867
+ "idPrefix": "with-individual-ids-example",
868
+ "items": [
869
+ {
870
+ "href": "#",
871
+ "text": "Option 1",
872
+ "id": "option-A"
873
+ },
874
+ {
875
+ "href": "#",
876
+ "text": "Option 2",
877
+ "id": "option-B"
878
+ },
879
+ {
880
+ "href": "#",
881
+ "text": "Option 3",
882
+ "id": "option-C"
883
+ },
884
+ {
885
+ "href": "#",
886
+ "text": "Option 4",
887
+ "id": "option-D"
888
+ },
889
+ {
890
+ "href": "#",
891
+ "text": "Option 5",
892
+ "id": "option-E"
893
+ }
894
+ ],
895
+ "attributes": {
896
+ "aria-label": "Menu navigation"
897
+ }
898
+ }
899
+ },
900
+ {
901
+ "name": "with attributes",
902
+ "description": "See code to display the attributes applied",
903
+ "data": {
904
+ "idPrefix": "with-attributes-example",
905
+ "attributes": {
906
+ "id": "nav-id-example"
907
+ },
908
+ "items": [
909
+ {
910
+ "href": "#",
911
+ "text": "Option 1",
912
+ "attributes": {
913
+ "data-attribute-1": "value-A",
914
+ "data-attribute-2": "value-B",
915
+ "data-attribute-3": "value-C"
916
+ }
917
+ },
918
+ {
919
+ "href": "#",
920
+ "text": "Option 2",
921
+ "attributes": {
922
+ "data-attribute-1": "value-A",
923
+ "data-attribute-2": "value-B",
924
+ "data-attribute-3": "value-C"
925
+ }
926
+ },
927
+ {
928
+ "text": "Option 3",
929
+ "attributes": {
930
+ "data-attribute-1": "value-A",
931
+ "data-attribute-2": "value-B",
932
+ "data-attribute-3": "value-C"
933
+ },
934
+ "sub": {
935
+ "attributes": {
936
+ "data-attribute-1": "value-A",
937
+ "data-attribute-2": "value-B",
938
+ "data-attribute-3": "value-C"
939
+ },
940
+ "items": [
941
+ {
942
+ "href": "#",
943
+ "text": "Simple link",
944
+ "attributes": {
945
+ "data-attribute-1": "value-A",
946
+ "data-attribute-2": "value-B",
947
+ "data-attribute-3": "value-C"
948
+ }
949
+ },
950
+ {
951
+ "href": "#",
952
+ "text": "Simple link"
953
+ },
954
+ {
955
+ "href": "#",
956
+ "text": "Simple link"
957
+ }
958
+ ]
959
+ }
960
+ },
961
+ {
962
+ "href": "#",
963
+ "text": "Option 4",
964
+ "attributes": {
965
+ "data-attribute-1": "value-A",
966
+ "data-attribute-2": "value-B",
967
+ "data-attribute-3": "value-C"
968
+ }
969
+ },
970
+ {
971
+ "href": "#",
972
+ "text": "Option 5",
973
+ "attributes": {
974
+ "data-attribute-1": "value-A",
975
+ "data-attribute-2": "value-B",
976
+ "data-attribute-3": "value-C"
977
+ }
978
+ }
979
+ ],
980
+ "attributes": {
981
+ "aria-label": "Menu navigation"
982
+ }
983
+ }
984
+ },
985
+ {
986
+ "name": "with mixed items",
987
+ "data": {
988
+ "name": "with-sub-items",
989
+ "idPrefix": "with-mixed-items-example",
990
+ "items": [
991
+ {
992
+ "href": "#",
993
+ "text": "Simple link"
994
+ },
995
+ {
996
+ "text": "Item without href and disabled",
997
+ "disabled": true
998
+ },
999
+ {
1000
+ "href": "#",
1001
+ "text": "Simple link"
1002
+ },
1003
+ {
1004
+ "text": "Parent with divider",
1005
+ "divider": {
1006
+ "html": '<div class="absolute h-11 border-l border-neutral-base"></div>'
1007
+ },
1008
+ "id": "with-sub-items-1",
1009
+ "sub": {
1010
+ "items": [
1011
+ {
1012
+ "href": "#",
1013
+ "text": "Simple link"
1014
+ },
1015
+ {
1016
+ "href": "#",
1017
+ "text": "Simple link",
1018
+ "target": "_blank",
1019
+ "attributes": {
1020
+ "title": "Se abre en ventana nueva"
1021
+ }
1022
+ },
1023
+ {
1024
+ "href": "#",
1025
+ "text": "Simple link"
1026
+ },
1027
+ {
1028
+ "href": "#",
1029
+ "text": "Simple link",
1030
+ "divider": true
1031
+ },
1032
+ {
1033
+ "href": "#",
1034
+ "text": "Simple link"
1035
+ }
1036
+ ],
1037
+ "attributes": {
1038
+ "aria-labelledby": "with-sub-items-1"
1039
+ }
1040
+ }
1041
+ },
1042
+ {
1043
+ "href": "#",
1044
+ "text": "Simple link"
1045
+ },
1046
+ {
1047
+ "href": "#",
1048
+ "text": "Simple link"
1049
+ },
1050
+ {
1051
+ "text": "Parent",
1052
+ "id": "with-sub-items-2",
1053
+ "sub": {
1054
+ "items": [
1055
+ {
1056
+ "href": "#",
1057
+ "text": "Subitem"
1058
+ },
1059
+ {
1060
+ "href": "#",
1061
+ "text": "Active subitem",
1062
+ "active" : true
1063
+ },
1064
+ {
1065
+ "text": "Subitem without href and disabled",
1066
+ "disabled": true
1067
+ }
1068
+ ],
1069
+ "attributes": {
1070
+ "aria-labelledby": "with-sub-items-2"
1071
+ }
1072
+ }
1073
+ }
1074
+ ],
1075
+ "attributes": {
1076
+ "aria-label": "Menu navigation"
1077
+ }
1078
+ }
1079
+ }
1080
+ ] %}