desy-html 6.5.0 → 7.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 (156) hide show
  1. package/config/tailwind.config.js +32 -2
  2. package/docs/_global.head.njk +2 -0
  3. package/docs/_include.template-header.njk +11 -0
  4. package/docs/_macro.example-render.njk +8 -0
  5. package/docs/catalogo.html +2 -0
  6. package/docs/componentes.html +6 -0
  7. package/docs/ds/_ds.example.card.njk +199 -0
  8. package/docs/ds/_ds.example.checkboxes.njk +4 -4
  9. package/docs/ds/_ds.example.header-advanced.njk +0 -75
  10. package/docs/ds/_ds.example.links-list.njk +171 -0
  11. package/docs/ds/_ds.example.pills.njk +1 -1
  12. package/docs/ds/_ds.example.textos.njk +3 -1
  13. package/docs/ds/_ds.example.typography.njk +1 -1
  14. package/docs/ds/_ds.section.informacion.njk +13 -0
  15. package/docs/ds/_ds.section.navigation.njk +4 -0
  16. package/docs/ds/_ds.section.textos.njk +44 -20
  17. package/docs/ds/_ds.section.typography.njk +1 -1
  18. package/docs/examples-card.html +5 -0
  19. package/docs/examples-links-list.html +5 -0
  20. package/docs/index.html +15 -17
  21. package/package.json +12 -13
  22. package/src/css/component.text.css +14 -0
  23. package/src/js/aria/tabs.js +3 -1
  24. package/src/js/aria/toggle.js +3 -0
  25. package/src/js/aria/treeitem.js +11 -4
  26. package/src/templates/components/button/_examples.button.njk +9 -0
  27. package/src/templates/components/button-loader/_template.button-loader.njk +3 -15
  28. package/src/templates/components/card/_examples.card.njk +277 -0
  29. package/src/templates/components/card/_macro.card.njk +3 -0
  30. package/src/templates/components/card/_template.card.njk +35 -0
  31. package/src/templates/components/card/params.card.yaml +113 -0
  32. package/src/templates/components/checkboxes/params.checkboxes.yaml +0 -10
  33. package/src/templates/components/collapsible/_template.collapsible.njk +1 -1
  34. package/src/templates/components/error-message/params.error-message.yaml +1 -15
  35. package/src/templates/components/header/_examples.header.njk +50 -14
  36. package/src/templates/components/header/_template.header.njk +1 -1
  37. package/src/templates/components/header/params.header.yaml +0 -20
  38. package/src/templates/components/header-advanced/_examples.header-advanced.njk +4 -4
  39. package/src/templates/components/header-advanced/_template.header-advanced.njk +1 -1
  40. package/src/templates/components/header-advanced/params.header-advanced.yaml +0 -20
  41. package/src/templates/components/links-list/_examples.links-list.njk +504 -0
  42. package/src/templates/components/links-list/_macro.links-list.njk +3 -0
  43. package/src/templates/components/links-list/_template.links-list.njk +92 -0
  44. package/src/templates/components/links-list/params.links-list.yaml +82 -0
  45. package/src/templates/components/menu-navigation/params.menu-navigation.yaml +0 -10
  46. package/src/templates/components/menu-vertical/_template.menu-vertical.njk +1 -5
  47. package/src/templates/components/menu-vertical/params.menu-vertical.yaml +0 -19
  48. package/src/templates/components/radios/params.radios.yaml +0 -10
  49. package/src/templates/components/table/_examples.table.njk +4 -48
  50. package/src/templates/components/table/params.table.yaml +1 -1
  51. package/src/templates/components/table-advanced/_examples.table-advanced.njk +6 -51
  52. package/src/templates/components/toggle/_examples.toggle.njk +36 -0
  53. package/src/templates/components/toggle/_template.toggle.njk +6 -1
  54. package/docs/examples-header-2.html +0 -5
  55. package/src/templates/components/header/_examples.header-2.njk +0 -555
  56. package/test/backstop_config/backstop.config.js +0 -35
  57. package/test/backstop_config/scenarios/components_a.js +0 -31
  58. package/test/backstop_config/scenarios/components_b.js +0 -31
  59. package/test/backstop_config/scenarios/components_c.js +0 -31
  60. package/test/backstop_config/scenarios/components_d.js +0 -49
  61. package/test/backstop_config/scenarios/components_e.js +0 -22
  62. package/test/backstop_config/scenarios/components_f.js +0 -31
  63. package/test/backstop_config/scenarios/components_h.js +0 -40
  64. package/test/backstop_config/scenarios/components_i.js +0 -40
  65. package/test/backstop_config/scenarios/components_l.js +0 -22
  66. package/test/backstop_config/scenarios/components_m.js +0 -58
  67. package/test/backstop_config/scenarios/components_n.js +0 -22
  68. package/test/backstop_config/scenarios/components_p.js +0 -22
  69. package/test/backstop_config/scenarios/components_r.js +0 -13
  70. package/test/backstop_config/scenarios/components_s.js +0 -58
  71. package/test/backstop_config/scenarios/components_t.js +0 -67
  72. package/test/backstop_config/scenarios/home.js +0 -12
  73. package/test/backstop_config/scenarios/styles.js +0 -13
  74. package/test/backstop_config/scenarios.js +0 -39
  75. package/test/backstop_data/bitmaps_reference/Desy_Accordion_0_document_0_desktop.png +0 -0
  76. package/test/backstop_data/bitmaps_reference/Desy_Accordion_history_0_document_0_desktop.png +0 -0
  77. package/test/backstop_data/bitmaps_reference/Desy_Alert_0_document_0_desktop.png +0 -0
  78. package/test/backstop_data/bitmaps_reference/Desy_Breadcrumbs_0_document_0_desktop.png +0 -0
  79. package/test/backstop_data/bitmaps_reference/Desy_Button_0_document_0_desktop.png +0 -0
  80. package/test/backstop_data/bitmaps_reference/Desy_Button_loader_0_document_0_desktop.png +0 -0
  81. package/test/backstop_data/bitmaps_reference/Desy_Character_count_0_document_0_desktop.png +0 -0
  82. package/test/backstop_data/bitmaps_reference/Desy_Checkboxes_0_document_0_desktop.png +0 -0
  83. package/test/backstop_data/bitmaps_reference/Desy_Collapsible_0_document_0_desktop.png +0 -0
  84. package/test/backstop_data/bitmaps_reference/Desy_Date_input_0_document_0_desktop.png +0 -0
  85. package/test/backstop_data/bitmaps_reference/Desy_Description_list_0_document_0_desktop.png +0 -0
  86. package/test/backstop_data/bitmaps_reference/Desy_Details_0_document_0_desktop.png +0 -0
  87. package/test/backstop_data/bitmaps_reference/Desy_Dialog_0_document_0_desktop.png +0 -0
  88. package/test/backstop_data/bitmaps_reference/Desy_Dropdown_0_document_0_desktop.png +0 -0
  89. package/test/backstop_data/bitmaps_reference/Desy_Error_message_0_document_0_desktop.png +0 -0
  90. package/test/backstop_data/bitmaps_reference/Desy_Error_summary_0_document_0_desktop.png +0 -0
  91. package/test/backstop_data/bitmaps_reference/Desy_Fieldset_0_document_0_desktop.png +0 -0
  92. package/test/backstop_data/bitmaps_reference/Desy_File_upload_0_document_0_desktop.png +0 -0
  93. package/test/backstop_data/bitmaps_reference/Desy_Footer_0_document_0_desktop.png +0 -0
  94. package/test/backstop_data/bitmaps_reference/Desy_Header_0_document_0_desktop.png +0 -0
  95. package/test/backstop_data/bitmaps_reference/Desy_Header_advanced_0_document_0_desktop.png +0 -0
  96. package/test/backstop_data/bitmaps_reference/Desy_Header_mini_0_document_0_desktop.png +0 -0
  97. package/test/backstop_data/bitmaps_reference/Desy_Hint_0_document_0_desktop.png +0 -0
  98. package/test/backstop_data/bitmaps_reference/Desy_Home_0_document_0_desktop.png +0 -0
  99. package/test/backstop_data/bitmaps_reference/Desy_Input_0_document_0_desktop.png +0 -0
  100. package/test/backstop_data/bitmaps_reference/Desy_Input_group_0_document_0_desktop.png +0 -0
  101. package/test/backstop_data/bitmaps_reference/Desy_Item_0_document_0_desktop.png +0 -0
  102. package/test/backstop_data/bitmaps_reference/Desy_Label_0_document_0_desktop.png +0 -0
  103. package/test/backstop_data/bitmaps_reference/Desy_Listbox_0_document_0_desktop.png +0 -0
  104. package/test/backstop_data/bitmaps_reference/Desy_Media_object_0_document_0_desktop.png +0 -0
  105. package/test/backstop_data/bitmaps_reference/Desy_Menu_horizontal_0_document_0_desktop.png +0 -0
  106. package/test/backstop_data/bitmaps_reference/Desy_Menu_navigation_0_document_0_desktop.png +0 -0
  107. package/test/backstop_data/bitmaps_reference/Desy_Menu_vertical_0_document_0_desktop.png +0 -0
  108. package/test/backstop_data/bitmaps_reference/Desy_Menubar_0_document_0_desktop.png +0 -0
  109. package/test/backstop_data/bitmaps_reference/Desy_Modal_0_document_0_desktop.png +0 -0
  110. package/test/backstop_data/bitmaps_reference/Desy_Nav_0_document_0_desktop.png +0 -0
  111. package/test/backstop_data/bitmaps_reference/Desy_Notification_0_document_0_desktop.png +0 -0
  112. package/test/backstop_data/bitmaps_reference/Desy_Pagination_0_document_0_desktop.png +0 -0
  113. package/test/backstop_data/bitmaps_reference/Desy_Pill_0_document_0_desktop.png +0 -0
  114. package/test/backstop_data/bitmaps_reference/Desy_Searchbar_0_document_0_desktop.png +0 -0
  115. package/test/backstop_data/bitmaps_reference/Desy_Select_0_document_0_desktop.png +0 -0
  116. package/test/backstop_data/bitmaps_reference/Desy_Skip_link_0_document_0_desktop.png +0 -0
  117. package/test/backstop_data/bitmaps_reference/Desy_Spinner_0_document_0_desktop.png +0 -0
  118. package/test/backstop_data/bitmaps_reference/Desy_Status_0_document_0_desktop.png +0 -0
  119. package/test/backstop_data/bitmaps_reference/Desy_Status_item_0_document_0_desktop.png +0 -0
  120. package/test/backstop_data/bitmaps_reference/Desy_Styles_0_document_0_desktop.png +0 -0
  121. package/test/backstop_data/bitmaps_reference/Desy_Table_0_document_0_desktop.png +0 -0
  122. package/test/backstop_data/bitmaps_reference/Desy_Table_advanced_0_document_0_desktop.png +0 -0
  123. package/test/backstop_data/bitmaps_reference/Desy_Tabs_0_document_0_desktop.png +0 -0
  124. package/test/backstop_data/bitmaps_reference/Desy_Textarea_0_document_0_desktop.png +0 -0
  125. package/test/backstop_data/bitmaps_reference/Desy_Toggle_0_document_0_desktop.png +0 -0
  126. package/test/backstop_data/bitmaps_reference/Desy_Tooltip_0_document_0_desktop.png +0 -0
  127. package/test/backstop_data/bitmaps_reference/Desy_Tree_0_document_0_desktop.png +0 -0
  128. package/test/backstop_data/engine_scripts/cookies.json +0 -14
  129. package/test/backstop_data/engine_scripts/imageStub.jpg +0 -0
  130. package/test/backstop_data/engine_scripts/playwright/clickAndHoverHelper.js +0 -43
  131. package/test/backstop_data/engine_scripts/playwright/interceptImages.js +0 -31
  132. package/test/backstop_data/engine_scripts/playwright/loadCookies.js +0 -16
  133. package/test/backstop_data/engine_scripts/playwright/onBefore.js +0 -5
  134. package/test/backstop_data/engine_scripts/playwright/onReady.js +0 -6
  135. package/test/backstop_data/engine_scripts/playwright/overrideCSS.js +0 -27
  136. package/test/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js +0 -39
  137. package/test/backstop_data/engine_scripts/puppet/ignoreCSP.js +0 -65
  138. package/test/backstop_data/engine_scripts/puppet/interceptImages.js +0 -37
  139. package/test/backstop_data/engine_scripts/puppet/loadCookies.js +0 -33
  140. package/test/backstop_data/engine_scripts/puppet/onBefore.js +0 -3
  141. package/test/backstop_data/engine_scripts/puppet/onReady.js +0 -6
  142. package/test/backstop_data/engine_scripts/puppet/overrideCSS.js +0 -15
  143. package/test/backstop_data/html_report/a96f14595379b7c348d66e115ec65a93.png +0 -0
  144. package/test/backstop_data/html_report/assets/fonts/Lato-Bold.ttf +0 -0
  145. package/test/backstop_data/html_report/assets/fonts/Lato-Regular.ttf +0 -0
  146. package/test/backstop_data/html_report/assets/fonts/lato-bold-webfont.woff +0 -0
  147. package/test/backstop_data/html_report/assets/fonts/lato-bold-webfont.woff2 +0 -0
  148. package/test/backstop_data/html_report/assets/fonts/lato-regular-webfont.woff +0 -0
  149. package/test/backstop_data/html_report/assets/fonts/lato-regular-webfont.woff2 +0 -0
  150. package/test/backstop_data/html_report/b815e28b1e230cff6e9d7b749edcd562.png +0 -0
  151. package/test/backstop_data/html_report/config.js +0 -1335
  152. package/test/backstop_data/html_report/diff.js +0 -1843
  153. package/test/backstop_data/html_report/diverged.js +0 -340
  154. package/test/backstop_data/html_report/divergedWorker.js +0 -6
  155. package/test/backstop_data/html_report/index.html +0 -49
  156. package/test/backstop_data/html_report/index_bundle.js +0 -2
@@ -12,7 +12,7 @@
12
12
  href: params.skipLink.href if params.skipLink.href else "#content"
13
13
  }) }}
14
14
  </nav>
15
- <div class="bg-neutral-lighter border-b border-neutral-base" x-data="{ isOn: false }" >
15
+ <div class="bg-neutral-lighter border-b border-neutral-base">
16
16
  <div class="container mx-auto px-base">
17
17
  <div class="flex items-center justify-between min-h-14">
18
18
  <div class="flex flex-wrap items-center">
@@ -278,23 +278,3 @@ params:
278
278
  type: nunjucks-block
279
279
  required: false
280
280
  description: Content inside the offcanvas. Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire header component in a `call` block.
281
-
282
- previewLayout: full-width
283
- accessibilityCriteria: |
284
- Text and links in the Header must:
285
- - have a text contrast ratio higher than 4.5:1 against the background colour to meet [WCAG AA](https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast)
286
-
287
- Links in the Header must:
288
- - accept focus
289
- - be focusable with a keyboard
290
- - be usable with a keyboard
291
- - indicate when they have focus
292
- - change in appearance when touched (in the touch-down state)
293
- - change in appearance when hovered
294
- - have visible text
295
-
296
- Images in the Header must:
297
- - be presentational when linked to from accompanying text (crown icon).
298
-
299
- Landmarks and Roles in the Header should:
300
- - have a role of `banner` at the root of the component (<header>) (https://www.w3.org/TR/wai-aria-1.1/#banner)
@@ -271,7 +271,7 @@
271
271
 
272
272
  {% set exampleOffcanvas %}
273
273
  <nav class="w-full p-2" aria-label="Menú móvil">
274
- <h3 class="p-base text-base font-bold">Carpeta del gestor</h3>
274
+ <h3 class="p-base text-base font-bold">Gestor de expedientes</h3>
275
275
  {{ componentNav({
276
276
  "idPrefix": "nav-mobile-pages",
277
277
  "hasNav": false,
@@ -327,7 +327,7 @@
327
327
  "items": [
328
328
  {
329
329
  "href": "#",
330
- "text": "Carpeta del gestor",
330
+ "text": "Gestor de expedientes",
331
331
  "active": true
332
332
  },
333
333
  {
@@ -549,8 +549,8 @@
549
549
  {% set customNavigationHtmlItainnovaHero %}
550
550
  <div class="py-xl lg:py-3xl text-white lg:text-center">
551
551
  <div class="lg:w-2/3 lg:mx-auto">
552
- <h1 class="c-h3 lg:c-h1 lg:text-4xl lg:mb-sm">Centro tecnológico referencia en investigación e innovación tecnológica</h1>
553
- <div class="c-paragraph-sm lg:c-paragraph-lg lg:mb-0">Damos soporte a las empresas a través de servicios, formación y aumentando su competitividad a través de la innovación.</div>
552
+ <h1 class="font-bold text-lg leading-tight lg:text-4xl mb-sm">Centro tecnológico referencia en investigación e innovación tecnológica</h1>
553
+ <div class="text-base lg:text-lg mb-0">Damos soporte a las empresas a través de servicios, formación y aumentando su competitividad a través de la innovación.</div>
554
554
  </div>
555
555
  </div>
556
556
  {% endset %}
@@ -78,7 +78,7 @@
78
78
  </div>
79
79
  </div>
80
80
  {% endif %}
81
- <div class="bg-neutral-lighter border-b border-neutral-base" x-data="{ isOn: false }" >
81
+ <div class="bg-neutral-lighter border-b border-neutral-base">
82
82
  <div class="container mx-auto px-base">
83
83
  <div class="flex items-center justify-between min-h-14">
84
84
  <div class="flex flex-wrap items-center">
@@ -336,23 +336,3 @@ params:
336
336
  type: nunjucks-block
337
337
  required: false
338
338
  description: Content inside the offcanvas. Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire header component in a `call` block.
339
-
340
- previewLayout: full-width
341
- accessibilityCriteria: |
342
- Text and links in the Header must:
343
- - have a text contrast ratio higher than 4.5:1 against the background colour to meet [WCAG AA](https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast)
344
-
345
- Links in the Header must:
346
- - accept focus
347
- - be focusable with a keyboard
348
- - be usable with a keyboard
349
- - indicate when they have focus
350
- - change in appearance when touched (in the touch-down state)
351
- - change in appearance when hovered
352
- - have visible text
353
-
354
- Images in the Header must:
355
- - be presentational when linked to from accompanying text (crown icon).
356
-
357
- Landmarks and Roles in the Header should:
358
- - have a role of `banner` at the root of the component (<header>) (https://www.w3.org/TR/wai-aria-1.1/#banner)
@@ -0,0 +1,504 @@
1
+ {% set exampleComponent = "links-list" %}
2
+
3
+ {% set iconSimple %}
4
+ <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>
5
+ {% endset %}
6
+
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>
11
+ {% endset %}
12
+
13
+ {% set examples = [
14
+ {
15
+ "name": "default",
16
+ "data": {
17
+ "idPrefix": "default",
18
+ "items": [
19
+ {
20
+ "href": "#",
21
+ "text": "Item 1"
22
+ },
23
+ {
24
+ "href": "#",
25
+ "text": "Item 2"
26
+ },
27
+ {
28
+ "href": "#",
29
+ "text": "Item 3"
30
+ }
31
+ ],
32
+ "attributes": {
33
+ "aria-label": "Menu destacado"
34
+ }
35
+ }
36
+ },
37
+ {
38
+ "name": "with icon",
39
+ "data": {
40
+ "idPrefix": "with-icon",
41
+ "items": [
42
+ {
43
+ "href": "#",
44
+ "text": "Item 1",
45
+ "icon": {
46
+ "html": iconSimple
47
+ }
48
+ },
49
+ {
50
+ "href": "#",
51
+ "text": "Item 2",
52
+ "icon": {
53
+ "html": iconSimple
54
+ }
55
+ },
56
+ {
57
+ "href": "#",
58
+ "text": "Item 3",
59
+ "icon": {
60
+ "html": iconSimple
61
+ }
62
+ }
63
+ ],
64
+ "attributes": {
65
+ "aria-label": "Menu destacado"
66
+ }
67
+ }
68
+ },
69
+ {
70
+ "name": "with classes applied",
71
+ "data": {
72
+ "idPrefix": "with-classes-applied",
73
+ "items": [
74
+ {
75
+ "href": "#",
76
+ "text": "Item grande con icono",
77
+ "classes": "flex justify-between items-center py-base text-2xl",
78
+ "icon": {
79
+ "html": iconComplex
80
+ }
81
+ },
82
+ {
83
+ "href": "#",
84
+ "text": "Item grande con icono",
85
+ "classes": "flex justify-between items-center py-base text-2xl",
86
+ "icon": {
87
+ "html": iconComplex
88
+ }
89
+ },
90
+ {
91
+ "href": "#",
92
+ "text": "Item grande con icono",
93
+ "classes": "flex justify-between items-center py-base text-2xl",
94
+ "icon": {
95
+ "html": iconComplex
96
+ }
97
+ }
98
+ ],
99
+ "attributes": {
100
+ "aria-label": "Menu destacado"
101
+ }
102
+ }
103
+ },
104
+ {
105
+ "name": "with containerClasses applied",
106
+ "data": {
107
+ "idPrefix": "with-containerclasses",
108
+ "items": [
109
+ {
110
+ "href": "#",
111
+ "text": "Item 1",
112
+ "containerClasses": "px-base border border-neutral-base my-sm",
113
+ "icon": {
114
+ "html": iconSimple
115
+ }
116
+ },
117
+ {
118
+ "href": "#",
119
+ "text": "Item 2",
120
+ "containerClasses": "my-base px-base border border-neutral-base rounded",
121
+ "icon": {
122
+ "html": iconSimple
123
+ }
124
+ },
125
+ {
126
+ "href": "#",
127
+ "text": "Item 3",
128
+ "containerClasses": "px-base border border-neutral-base my-sm",
129
+ "icon": {
130
+ "html": iconSimple
131
+ }
132
+ }
133
+ ],
134
+ "attributes": {
135
+ "aria-label": "Menu destacado"
136
+ }
137
+ }
138
+ },
139
+ {
140
+ "name": "with disabled item",
141
+ "data": {
142
+ "idPrefix": "with-disabled-item",
143
+ "items": [
144
+ {
145
+ "href": "#",
146
+ "text": "Item 1"
147
+ },
148
+ {
149
+ "href": "#",
150
+ "text": "Item 2"
151
+ },
152
+ {
153
+ "href": "#",
154
+ "text": "Item 3",
155
+ "disabled": true
156
+ }
157
+ ],
158
+ "attributes": {
159
+ "aria-label": "Menu destacado"
160
+ }
161
+ }
162
+ },
163
+ {
164
+ "name": "without href",
165
+ "data": {
166
+ "idPrefix": "without-href",
167
+ "items": [
168
+ {
169
+ "href": "#",
170
+ "text": "Item 1"
171
+ },
172
+ {
173
+ "text": "Item 2"
174
+ },
175
+ {
176
+ "href": "#",
177
+ "text": "Item 3"
178
+ }
179
+ ],
180
+ "attributes": {
181
+ "aria-label": "Menu destacado"
182
+ }
183
+ }
184
+ },
185
+ {
186
+ "name": "with active item",
187
+ "data": {
188
+ "idPrefix": "with-active-item",
189
+ "items": [
190
+ {
191
+ "href": "#",
192
+ "text": "Item 1"
193
+ },
194
+ {
195
+ "href": "#",
196
+ "text": "Item 2",
197
+ "active": true
198
+ },
199
+ {
200
+ "href": "#",
201
+ "text": "Item 3"
202
+ }
203
+ ],
204
+ "attributes": {
205
+ "aria-label": "Menu destacado"
206
+ }
207
+ }
208
+ },
209
+ {
210
+ "name": "with target in links",
211
+ "data": {
212
+ "idPrefix": "with-target-in-links",
213
+ "items": [
214
+ {
215
+ "href": "#",
216
+ "text": "Item 1",
217
+ "target": "_blank",
218
+ "attributes": {
219
+ "title": "Se abre en ventana nueva"
220
+ }
221
+ },
222
+ {
223
+ "href": "#",
224
+ "text": "Item 2",
225
+ "target": "_blank",
226
+ "attributes": {
227
+ "title": "Se abre en ventana nueva"
228
+ }
229
+ },
230
+ {
231
+ "href": "#",
232
+ "text": "Item 3",
233
+ "target": "_blank",
234
+ "attributes": {
235
+ "title": "Se abre en ventana nueva"
236
+ }
237
+ }
238
+ ],
239
+ "attributes": {
240
+ "aria-label": "Menu destacado"
241
+ }
242
+ }
243
+ },
244
+ {
245
+ "name": "with very long option text",
246
+ "data": {
247
+ "idPrefix": "with-very-long-option-text",
248
+ "items": [
249
+ {
250
+ "href": "#",
251
+ "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."
252
+ },
253
+ {
254
+ "href": "#",
255
+ "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."
256
+ },
257
+ {
258
+ "href": "#",
259
+ "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."
260
+ }
261
+ ],
262
+ "attributes": {
263
+ "aria-label": "Menu destacado"
264
+ }
265
+ }
266
+ },
267
+ {
268
+ "name": "with descriptive content",
269
+ "data": {
270
+ "idPrefix": "descriptive-example",
271
+ "items": [
272
+ {
273
+ "href": "#",
274
+ "text": "Item 1",
275
+ "sub": {
276
+ "html": "<p>Este es un párrafo explicativo metido con un sub.html dentro del Item</p>"
277
+ }
278
+ },
279
+ {
280
+ "href": "#",
281
+ "text": "Item 2",
282
+ "sub": {
283
+ "html": "<p>Este es un párrafo explicativo metido con un sub.html dentro del Item</p>"
284
+ }
285
+ },
286
+ {
287
+ "href": "#",
288
+ "text": "Item 3",
289
+ "sub": {
290
+ "html": "<p>Este es un párrafo explicativo metido con un sub.html dentro del Item</p>"
291
+ }
292
+ }
293
+ ],
294
+ "attributes": {
295
+ "aria-label": "Menu destacado"
296
+ }
297
+ }
298
+ },
299
+ {
300
+ "name": "with idPrefix",
301
+ "description": "See code to display the idPrefix applied",
302
+ "data": {
303
+ "idPrefix": "site-menu-item",
304
+ "items": [
305
+ {
306
+ "href": "#",
307
+ "text": "Option 1"
308
+ },
309
+ {
310
+ "href": "#",
311
+ "text": "Option 2"
312
+ },
313
+ {
314
+ "href": "#",
315
+ "text": "Option 3"
316
+ },
317
+ {
318
+ "href": "#",
319
+ "text": "Option 4"
320
+ },
321
+ {
322
+ "href": "#",
323
+ "text": "Option 5"
324
+ }
325
+ ],
326
+ "attributes": {
327
+ "aria-label": "Menu destacado"
328
+ }
329
+ }
330
+ },
331
+ {
332
+ "name": "with individual ids",
333
+ "description": "See code to display the ids applied",
334
+ "data": {
335
+ "items": [
336
+ {
337
+ "href": "#",
338
+ "text": "Option 1",
339
+ "id": "option-A"
340
+ },
341
+ {
342
+ "href": "#",
343
+ "text": "Option 2",
344
+ "id": "option-B"
345
+ },
346
+ {
347
+ "href": "#",
348
+ "text": "Option 3",
349
+ "id": "option-C"
350
+ },
351
+ {
352
+ "href": "#",
353
+ "text": "Option 4",
354
+ "id": "option-D"
355
+ },
356
+ {
357
+ "href": "#",
358
+ "text": "Option 5",
359
+ "id": "option-E"
360
+ }
361
+ ],
362
+ "attributes": {
363
+ "aria-label": "Menu destacado"
364
+ }
365
+ }
366
+ },
367
+ {
368
+ "name": "with attributes",
369
+ "description": "See code to display the attributes applied",
370
+ "data": {
371
+ "attributes": {
372
+ "id": "nav-id-example"
373
+ },
374
+ "items": [
375
+ {
376
+ "href": "#",
377
+ "text": "Option 1",
378
+ "attributes": {
379
+ "data-attribute-1": "value-A",
380
+ "data-attribute-2": "value-B",
381
+ "data-attribute-3": "value-C"
382
+ }
383
+ },
384
+ {
385
+ "href": "#",
386
+ "text": "Option 2",
387
+ "attributes": {
388
+ "data-attribute-1": "value-A",
389
+ "data-attribute-2": "value-B",
390
+ "data-attribute-3": "value-C"
391
+ }
392
+ },
393
+ {
394
+ "href": "#",
395
+ "text": "Option 3",
396
+ "attributes": {
397
+ "data-attribute-1": "value-A",
398
+ "data-attribute-2": "value-B",
399
+ "data-attribute-3": "value-C"
400
+ },
401
+ "sub": {
402
+ "attributes": {
403
+ "data-attribute-1": "value-A",
404
+ "data-attribute-2": "value-B",
405
+ "data-attribute-3": "value-C"
406
+ },
407
+ "html": '<p>Este es un párrafo explicativo metido con un sub.html dentro del Item</p><p>Este es otro párrafo.</p>'
408
+ }
409
+ },
410
+ {
411
+ "href": "#",
412
+ "text": "Option 4",
413
+ "attributes": {
414
+ "data-attribute-1": "value-A",
415
+ "data-attribute-2": "value-B",
416
+ "data-attribute-3": "value-C"
417
+ }
418
+ },
419
+ {
420
+ "href": "#",
421
+ "text": "Option 5",
422
+ "attributes": {
423
+ "data-attribute-1": "value-A",
424
+ "data-attribute-2": "value-B",
425
+ "data-attribute-3": "value-C"
426
+ }
427
+ }
428
+ ],
429
+ "attributes": {
430
+ "aria-label": "Menu destacado"
431
+ }
432
+ }
433
+ },
434
+ {
435
+ "name": "hasNav false",
436
+ "description": "Use this to not wrap the component in a nav tag, assuming the component will be wrapped with a custom nav with it's own aria-label if it's needed.",
437
+ "data": {
438
+ "idPrefix": "hasnav-false",
439
+ "hasNav": false,
440
+ "items": [
441
+ {
442
+ "href": "#",
443
+ "text": "Item 1"
444
+ },
445
+ {
446
+ "href": "#",
447
+ "text": "Item 2"
448
+ },
449
+ {
450
+ "href": "#",
451
+ "text": "Item 3"
452
+ }
453
+ ],
454
+ "attributes": {
455
+ "aria-label": "Menu destacado"
456
+ }
457
+ }
458
+ },
459
+ {
460
+ "name": "mixed example",
461
+ "data": {
462
+ "idPrefix": "mixed-example",
463
+ "items": [
464
+ {
465
+ "href": "#",
466
+ "html": "<strong>Deudas</strong>",
467
+ "classes": "flex justify-between items-center py-base text-lg",
468
+ "sub": {
469
+ "html": '<p class="c-paragraph-base mb-0">Tienes <span class="text-alert-base">deudas fuera de plazo</span></p>'
470
+ }
471
+ },
472
+ {
473
+ "href": "#",
474
+ "html": "<strong>Historial de pagos</strong>",
475
+ "classes": "flex justify-between items-center py-base text-lg"
476
+ },
477
+ {
478
+ "href": "#",
479
+ "html": "<strong>Certificado de corriente de pago</strong>",
480
+ "classes": "flex justify-between items-center py-base text-lg",
481
+ "sub": {
482
+ "html": '<p class="c-paragraph-base mb-0">Tienes <strong>1 certificado disponible</strong>.</p>'
483
+ }
484
+ },
485
+ {
486
+ "href": "#",
487
+ "html": "<strong>Valoraciones de inmuebles</strong>",
488
+ "classes": "flex justify-between items-center py-base text-lg"
489
+ },
490
+ {
491
+ "href": "#",
492
+ "html": "<strong>Aplazamiento y fraccionamiento</strong>",
493
+ "classes": "flex justify-between items-center py-base text-lg",
494
+ "sub": {
495
+ "html": '<p class="c-paragraph-base mb-0">Tienes 1 deuda fraccionada, has pagado <strong>2 fracciones</strong> de 5.</p>'
496
+ }
497
+ }
498
+ ],
499
+ "attributes": {
500
+ "aria-label": "Menu destacado"
501
+ }
502
+ }
503
+ }
504
+ ] %}
@@ -0,0 +1,3 @@
1
+ {% macro componentLinksList(params) %}
2
+ {% include "./_template.links-list.njk" %}
3
+ {% endmacro %}