desy-html 5.3.0 → 6.0.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 (74) hide show
  1. package/config/tailwind.config.js +10 -10
  2. package/docs/_include.template-header.njk +8 -0
  3. package/docs/_macro.example-render.njk +8 -0
  4. package/docs/componentes.html +6 -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-menu-navigation.html +5 -0
  18. package/docs/index.html +39 -0
  19. package/gulpfile.js +7 -6
  20. package/package.json +6 -7
  21. package/src/css/base.css +4 -0
  22. package/src/css/styles.css +1 -0
  23. package/src/js/aria/accordion.js +16 -5
  24. package/src/js/aria/disclosureMenu.js +153 -0
  25. package/src/js/desy-html.js +15 -0
  26. package/src/js/index.js +2 -0
  27. package/src/templates/components/accordion/_examples.accordion.njk +70 -2
  28. package/src/templates/components/accordion/_template.accordion.njk +18 -8
  29. package/src/templates/components/accordion/params.accordion.yaml +38 -0
  30. package/src/templates/components/accordion-history/_examples.accordion-history.njk +356 -0
  31. package/src/templates/components/accordion-history/_macro.accordion-history.njk +3 -0
  32. package/src/templates/components/accordion-history/_template.accordion-history.njk +209 -0
  33. package/src/templates/components/accordion-history/params.accordion-history.yaml +125 -0
  34. package/src/templates/components/button/_examples.button.njk +7 -0
  35. package/src/templates/components/button/_styles.button.css +27 -0
  36. package/src/templates/components/button/_template.button.njk +1 -1
  37. package/src/templates/components/button-loader/_template.button-loader.njk +6 -6
  38. package/src/templates/components/file-upload/_template.file-upload.njk +1 -1
  39. package/src/templates/components/footer/_examples.footer.njk +46 -136
  40. package/src/templates/components/footer/_template.footer.njk +35 -28
  41. package/src/templates/components/footer/params.footer.yaml +18 -0
  42. package/src/templates/components/header/_examples.header.njk +166 -0
  43. package/src/templates/components/header/_template.header.header__navigation.njk +2 -2
  44. package/src/templates/components/header/_template.header.njk +7 -3
  45. package/src/templates/components/header/params.header.yaml +24 -0
  46. package/src/templates/components/item/_examples.item.njk +1 -1
  47. package/src/templates/components/item/_template.item.njk +3 -3
  48. package/src/templates/components/listbox/_styles.listbox.css +7 -4
  49. package/src/templates/components/menu-horizontal/_examples.menu-horizontal.njk +25 -0
  50. package/src/templates/components/menu-horizontal/_styles.menu-horizontal.css +26 -0
  51. package/src/templates/components/menu-horizontal/_template.menu-horizontal.njk +1 -1
  52. package/src/templates/components/menu-navigation/_examples.menu-navigation.njk +1080 -0
  53. package/src/templates/components/menu-navigation/_macro.menu-navigation.njk +3 -0
  54. package/src/templates/components/menu-navigation/_styles.menu-navigation.css +216 -0
  55. package/src/templates/components/menu-navigation/_template.menu-navigation.njk +116 -0
  56. package/src/templates/components/menu-navigation/params.menu-navigation.yaml +93 -0
  57. package/src/templates/components/menubar/_examples.menubar.njk +1 -1
  58. package/src/templates/components/menubar/_styles.menubar.css +26 -5
  59. package/src/templates/components/modal/_examples.modal.njk +62 -0
  60. package/src/templates/components/modal/_template.modal.njk +21 -4
  61. package/src/templates/components/modal/params.modal.yaml +2 -2
  62. package/src/templates/components/searchbar/_examples.searchbar.njk +12 -1
  63. package/src/templates/components/searchbar/_template.searchbar.njk +8 -8
  64. package/src/templates/components/spinner/_styles.spinner.css +1 -0
  65. package/src/templates/components/spinner/_template.spinner.njk +4 -4
  66. package/src/templates/components/table-advanced/_examples.table-advanced.njk +182 -5
  67. package/src/templates/components/table-advanced/_template.table-advanced.njk +26 -2
  68. package/src/templates/components/table-advanced/params.table-advanced.yaml +5 -0
  69. package/src/templates/components/toggle/_examples.toggle.njk +33 -11
  70. package/src/templates/components/toggle/_template.toggle.njk +3 -1
  71. package/src/templates/components/toggle/params.toggle.yaml +4 -0
  72. package/src/templates/components/tree/_examples.tree.njk +580 -32
  73. package/src/templates/components/tree/_template.tree.njk +1 -1
  74. package/config/clean-css.js +0 -25
@@ -0,0 +1,494 @@
1
+ {% from "components/menu-navigation/_macro.menu-navigation.njk" import componentMenuNavigation %}
2
+
3
+ <div class="grid lg:grid-cols-1 gap-xl mb-lg">
4
+ <div>
5
+ {{ componentMenuNavigation({
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
+ </div>
83
+ <div>
84
+ {{ componentMenuNavigation({
85
+ "idPrefix": "with-dividers-example",
86
+ "items": [
87
+ {
88
+ "href": "#",
89
+ "text": "Item 1"
90
+ },
91
+ {
92
+ "href": "#",
93
+ "text": "Item 2",
94
+ "divider": {
95
+ "html": "<div class=\"absolute h-11 border-l border-neutral-base\"></div>"
96
+ }
97
+ },
98
+ {
99
+ "text": "Item 3",
100
+ "id": "with-dividers-example-parent",
101
+ "sub": {
102
+ "items": [
103
+ {
104
+ "href": "#",
105
+ "text": "Subitem 1"
106
+ },
107
+ {
108
+ "href": "#",
109
+ "text": "Subitem 2",
110
+ "divider": true
111
+ },
112
+ {
113
+ "href": "#",
114
+ "text": "Subitem 3"
115
+ }
116
+ ],
117
+ "attributes": {
118
+ "aria-labelledby": "with-dividers-example-parent"
119
+ }
120
+ }
121
+ },
122
+ {
123
+ "href": "#",
124
+ "text": "Item 4"
125
+ }
126
+ ],
127
+ "attributes": {
128
+ "aria-label": "Menu navigation"
129
+ }
130
+ }) }}
131
+ </div>
132
+ <div>
133
+ {{ componentMenuNavigation({
134
+ "idPrefix": "small-example",
135
+ "items": [
136
+ {
137
+ "text": "Item 1",
138
+ "id": "small-example-item-1",
139
+ "classes": "c-menu-navigation__button--sm -mr-sm",
140
+ "sub": {
141
+ "items": [
142
+ {
143
+ "href": "#",
144
+ "text": "Subitem 1"
145
+ },
146
+ {
147
+ "href": "#",
148
+ "text": "Subitem 2"
149
+ },
150
+ {
151
+ "href": "#",
152
+ "text": "Subitem 3"
153
+ }
154
+ ],
155
+ "attributes": {
156
+ "aria-labelledby": "small-example-item-1"
157
+ }
158
+ }
159
+ },
160
+ {
161
+ "text": "Item 2",
162
+ "id": "small-example-item-2",
163
+ "classes": "c-menu-navigation__button--sm -mr-sm",
164
+ "sub": {
165
+ "items": [
166
+ {
167
+ "href": "#",
168
+ "text": "Subitem 1"
169
+ },
170
+ {
171
+ "href": "#",
172
+ "text": "Subitem 2"
173
+ },
174
+ {
175
+ "href": "#",
176
+ "text": "Subitem 3"
177
+ }
178
+ ],
179
+ "attributes": {
180
+ "aria-labelledby": "small-example-item-2"
181
+ }
182
+ }
183
+ },
184
+ {
185
+ "text": "Item 3",
186
+ "id": "small-example-item-3",
187
+ "classes": "c-menu-navigation__button--sm -mr-sm",
188
+ "sub": {
189
+ "items": [
190
+ {
191
+ "href": "#",
192
+ "text": "Subitem 1"
193
+ },
194
+ {
195
+ "href": "#",
196
+ "text": "Subitem 2"
197
+ },
198
+ {
199
+ "href": "#",
200
+ "text": "Subitem 3"
201
+ }
202
+ ],
203
+ "attributes": {
204
+ "aria-labelledby": "small-example-item-3"
205
+ }
206
+ }
207
+ }
208
+ ],
209
+ "attributes": {
210
+ "aria-label": "Menu navigation"
211
+ }
212
+ }) }}
213
+ </div>
214
+ <div>
215
+ {{ componentMenuNavigation({
216
+ "idPrefix": "primary-example",
217
+ "items": [
218
+ {
219
+ "text": "Item 1",
220
+ "id": "primary-example-item-1",
221
+ "classes": "c-menu-navigation__button--primary",
222
+ "sub": {
223
+ "items": [
224
+ {
225
+ "href": "#",
226
+ "text": "Subitem 1"
227
+ },
228
+ {
229
+ "href": "#",
230
+ "text": "Subitem 2"
231
+ },
232
+ {
233
+ "href": "#",
234
+ "text": "Subitem 3"
235
+ }
236
+ ],
237
+ "attributes": {
238
+ "aria-labelledby": "primary-example-item-1"
239
+ }
240
+ }
241
+ },
242
+ {
243
+ "text": "Active Item 2",
244
+ "id": "primary-example-item-2",
245
+ "classes": "c-menu-navigation__button--primary",
246
+ "active": true,
247
+ "sub": {
248
+ "items": [
249
+ {
250
+ "href": "#",
251
+ "text": "Subitem 1"
252
+ },
253
+ {
254
+ "href": "#",
255
+ "text": "Subitem 2",
256
+ "active": true
257
+ },
258
+ {
259
+ "href": "#",
260
+ "text": "Subitem 3"
261
+ }
262
+ ],
263
+ "attributes": {
264
+ "aria-labelledby": "primary-example-item-2"
265
+ }
266
+ }
267
+ },
268
+ {
269
+ "text": "Disabled Item 3",
270
+ "id": "primary-example-item-3",
271
+ "classes": "c-menu-navigation__button--primary",
272
+ "disabled": true,
273
+ "sub": {
274
+ "items": [
275
+ {
276
+ "href": "#",
277
+ "text": "Subitem 1"
278
+ },
279
+ {
280
+ "href": "#",
281
+ "text": "Subitem 2"
282
+ },
283
+ {
284
+ "href": "#",
285
+ "text": "Subitem 3"
286
+ }
287
+ ],
288
+ "attributes": {
289
+ "aria-labelledby": "primary-example-item-3"
290
+ }
291
+ }
292
+ }
293
+ ],
294
+ "attributes": {
295
+ "aria-label": "Menu navigation"
296
+ }
297
+ }) }}
298
+ </div>
299
+ <div>
300
+ {{ componentMenuNavigation({
301
+ "idPrefix": "transparent-example",
302
+ "items": [
303
+ {
304
+ "text": "Item 1",
305
+ "id": "transparent-example-item-1",
306
+ "classes": "c-menu-navigation__button--transparent",
307
+ "sub": {
308
+ "items": [
309
+ {
310
+ "href": "#",
311
+ "text": "Subitem 1"
312
+ },
313
+ {
314
+ "href": "#",
315
+ "text": "Subitem 2"
316
+ },
317
+ {
318
+ "href": "#",
319
+ "text": "Subitem 3"
320
+ }
321
+ ],
322
+ "attributes": {
323
+ "aria-labelledby": "transparent-example-item-1"
324
+ }
325
+ }
326
+ },
327
+ {
328
+ "text": "Active Item 2",
329
+ "id": "transparent-example-item-2",
330
+ "classes": "c-menu-navigation__button--transparent",
331
+ "active": true,
332
+ "sub": {
333
+ "items": [
334
+ {
335
+ "href": "#",
336
+ "text": "Subitem 1"
337
+ },
338
+ {
339
+ "href": "#",
340
+ "text": "Subitem 2",
341
+ "active": true
342
+ },
343
+ {
344
+ "href": "#",
345
+ "text": "Subitem 3"
346
+ }
347
+ ],
348
+ "attributes": {
349
+ "aria-labelledby": "transparent-example-item-2"
350
+ }
351
+ }
352
+ },
353
+ {
354
+ "text": "Disabled Item 3",
355
+ "id": "transparent-example-item-3",
356
+ "classes": "c-menu-navigation__button--transparent",
357
+ "disabled": true,
358
+ "sub": {
359
+ "items": [
360
+ {
361
+ "href": "#",
362
+ "text": "Subitem 1"
363
+ },
364
+ {
365
+ "href": "#",
366
+ "text": "Subitem 2"
367
+ },
368
+ {
369
+ "href": "#",
370
+ "text": "Subitem 3"
371
+ }
372
+ ],
373
+ "attributes": {
374
+ "aria-labelledby": "transparent-example-item-3"
375
+ }
376
+ }
377
+ }
378
+ ],
379
+ "attributes": {
380
+ "aria-label": "Menu navigation"
381
+ }
382
+ }) }}
383
+ </div>
384
+ <div>
385
+ {{ componentMenuNavigation({
386
+ "idPrefix": "header-custom-nav",
387
+ "classes": "bg-black c-menu-navigation--last-right w-full",
388
+ "items": [
389
+ {
390
+ "text": "Item 1",
391
+ "id": "header-custom-nav-item-1",
392
+ "classes": "c-menu-navigation__button--header -mr-base uppercase",
393
+ "sub": {
394
+ "items": [
395
+ {
396
+ "href": "#",
397
+ "text": "Subitem 1"
398
+ },
399
+ {
400
+ "href": "#",
401
+ "text": "Subitem 2"
402
+ },
403
+ {
404
+ "href": "#",
405
+ "text": "Subitem 3"
406
+ }
407
+ ],
408
+ "attributes": {
409
+ "aria-labelledby": "header-custom-nav-item-1"
410
+ }
411
+ }
412
+ },
413
+ {
414
+ "text": "Active Item 2",
415
+ "id": "header-custom-nav-item-2",
416
+ "classes": "c-menu-navigation__button--header -mr-base uppercase",
417
+ "active": true,
418
+ "sub": {
419
+ "items": [
420
+ {
421
+ "href": "#",
422
+ "text": "Subitem 1"
423
+ },
424
+ {
425
+ "href": "#",
426
+ "text": "Subitem 2",
427
+ "active": true
428
+ },
429
+ {
430
+ "href": "#",
431
+ "text": "Subitem 3"
432
+ }
433
+ ],
434
+ "attributes": {
435
+ "aria-labelledby": "header-custom-nav-item-2"
436
+ }
437
+ }
438
+ },
439
+ {
440
+ "text": "Disabled Item 3",
441
+ "id": "header-custom-nav-item-3",
442
+ "classes": "c-menu-navigation__button--header -mr-base uppercase",
443
+ "disabled": true,
444
+ "sub": {
445
+ "items": [
446
+ {
447
+ "href": "#",
448
+ "text": "Subitem 1"
449
+ },
450
+ {
451
+ "href": "#",
452
+ "text": "Subitem 2"
453
+ },
454
+ {
455
+ "href": "#",
456
+ "text": "Subitem 3"
457
+ }
458
+ ],
459
+ "attributes": {
460
+ "aria-labelledby": "header-custom-nav-item-3"
461
+ }
462
+ }
463
+ },
464
+ {
465
+ "text": "Item 4 right",
466
+ "id": "header-custom-nav-item-4",
467
+ "classes": "c-menu-navigation__button--header uppercase",
468
+ "sub": {
469
+ "items": [
470
+ {
471
+ "href": "#",
472
+ "text": "Subitem 1"
473
+ },
474
+ {
475
+ "href": "#",
476
+ "text": "Subitem 2"
477
+ },
478
+ {
479
+ "href": "#",
480
+ "text": "Subitem 3"
481
+ }
482
+ ],
483
+ "attributes": {
484
+ "aria-labelledby": "header-custom-nav-item-4"
485
+ }
486
+ }
487
+ }
488
+ ],
489
+ "attributes": {
490
+ "aria-label": "Menu navigation"
491
+ }
492
+ }) }}
493
+ </div>
494
+ </div>
@@ -1,6 +1,15 @@
1
1
  {% from "components/searchbar/_macro.searchbar.njk" import componentSearchbar %}
2
2
 
3
3
  <div class="grid lg:grid-cols-4 gap-xl mb-lg items-start">
4
+ <div>
5
+ {{ componentSearchbar({
6
+ "id": "searchbar-1",
7
+ "label": {
8
+ "text": "Buscar",
9
+ "classes": "not-sr-only"
10
+ }
11
+ }) }}
12
+ </div>
4
13
  <div>
5
14
  {{ componentSearchbar({
6
15
  "id": "searchbar-2",
@@ -35,6 +44,8 @@
35
44
  "classes": "w-full"
36
45
  }) }}
37
46
  </div>
47
+ </div>
48
+ <div class="grid lg:grid-cols-3 gap-xl mb-lg items-start">
38
49
  <div>
39
50
  {{ componentSearchbar({
40
51
  "id": "searchbar-5",
@@ -45,4 +56,32 @@
45
56
  "buttonClasses": "m-xs p-0.5 text-xs"
46
57
  }) }}
47
58
  </div>
59
+ <div>
60
+ {{ componentSearchbar({
61
+ "id": "searchbar-6",
62
+ "label": {
63
+ "text": "Buscar en esta página"
64
+ },
65
+ "button": {
66
+ "text": "Buscar",
67
+ "type": "submit",
68
+ "classes": "c-button--primary ml-sm"
69
+ },
70
+ "classes": "flex-1"
71
+ }) }}
72
+ </div>
73
+ <div>
74
+ {{ componentSearchbar({
75
+ "id": "searchbar-7",
76
+ "label": {
77
+ "text": "Buscar en esta página"
78
+ },
79
+ "button": {
80
+ "text": "Buscar",
81
+ "type": "submit",
82
+ "classes": "c-button--sm ml-sm"
83
+ },
84
+ "classes": "flex-1 c-input--sm"
85
+ }) }}
86
+ </div>
48
87
  </div>