desy-html 7.1.2 → 7.3.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 (147) hide show
  1. package/docs/_global.foot.njk +9 -9
  2. package/docs/_global.head.njk +1 -1
  3. package/docs/_include.template-header.njk +8 -0
  4. package/docs/_macro.example-render.njk +177 -147
  5. package/docs/_macro.render-caller.njk +1 -1
  6. package/docs/ds/_ds.example.border.njk +1 -1
  7. package/docs/ds/_ds.example.color-de-interaccion.njk +5 -5
  8. package/docs/ds/_ds.example.colores-cabecera.njk +7 -7
  9. package/docs/ds/_ds.example.colores-de-soporte.njk +72 -5
  10. package/docs/ds/_ds.example.colores-neutros.njk +12 -12
  11. package/docs/ds/_ds.example.layout.njk +2 -2
  12. package/docs/ds/_ds.example.typography.njk +1 -1
  13. package/docs/ds/_ds.macro.code-snippet.njk +28 -9
  14. package/docs/ds/_ds.section.color.njk +7 -65
  15. package/docs/ds/_ds.section.espaciado.njk +4 -295
  16. package/docs/ds/_ds.section.layout.njk +5 -5
  17. package/docs/ds/_ds.section.textos.njk +32 -54
  18. package/docs/ds/_ds.section.typography.njk +239 -236
  19. package/docs/index.html +12 -0
  20. package/docs/pagina-accesibilidad.html +104 -0
  21. package/docs/pagina-mapa-web.html +131 -0
  22. package/docs/pagina-prueba.html +95 -0
  23. package/docs/plantilla-con-header-advanced.html +7 -0
  24. package/docs/plantilla-editar-con-cabecera-fija-y-sidebar-sticky.html +147 -0
  25. package/docs/plantilla-editar-con-cabecera-fija.html +10 -0
  26. package/docs/plantilla-logueado-con-cabecera-fija-headroom.html +8 -0
  27. package/docs/plantilla-logueado-con-cabecera-fija.html +8 -0
  28. package/docs/plantilla-logueado-con-selector-de-app-y-sidebar.html +157 -0
  29. package/docs/plantilla-logueado-con-selector-de-app-y-subheader.html +9 -0
  30. package/docs/plantilla-logueado-con-selector-de-app.html +7 -0
  31. package/docs/plantilla-logueado-con-titulo-de-app.html +7 -0
  32. package/docs/plantilla-sin-loguear.html +7 -0
  33. package/docs/plantillas.html +88 -0
  34. package/docs/spinner-plantilla-con-header-advanced.html +2 -0
  35. package/docs/spinner-plantilla-editar-con-cabecera-fija.html +5 -0
  36. package/docs/spinner-plantilla-logueado-con-cabecera-fija.html +2 -0
  37. package/docs/spinner-plantilla-logueado-con-selector-de-app-y-subheader.html +4 -0
  38. package/docs/spinner-plantilla-logueado-con-titulo-de-app.html +2 -0
  39. package/docs/spinner-plantilla-sin-loguear.html +18 -0
  40. package/package.json +1 -1
  41. package/src/css/component.headroom.css +31 -0
  42. package/src/css/styles.css +1 -0
  43. package/src/js/aria/dataGrid.js +21 -6
  44. package/src/js/headroom.min.js +7 -0
  45. package/src/js/index.js +0 -7
  46. package/src/js/popper.min.js +6 -0
  47. package/src/js/prism/clipboard.min.js +7 -0
  48. package/src/js/prism/prism-copy-to-clipboard.min.js +1 -0
  49. package/src/js/prism/prism-normalize-whitespace.min.js +1 -0
  50. package/src/js/prism/prism-toolbar.min.js +1 -0
  51. package/src/js/prism/prism-twig.min.js +1 -0
  52. package/src/js/prism/prism-yaml.min.js +1 -0
  53. package/src/js/prism/prism.min.js +1 -0
  54. package/src/js/tippy-bundle.umd.min.js +2 -0
  55. package/src/templates/components/accordion/_template.accordion.njk +95 -84
  56. package/src/templates/components/accordion-history/_template.accordion-history.njk +134 -123
  57. package/src/templates/components/alert/_template.alert.njk +6 -6
  58. package/src/templates/components/breadcrumbs/_template.breadcrumbs.njk +15 -30
  59. package/src/templates/components/button/_template.button.njk +4 -0
  60. package/src/templates/components/button-loader/_template.button-loader.njk +11 -7
  61. package/src/templates/components/card/_examples.card.njk +76 -76
  62. package/src/templates/components/card/_template.card.njk +14 -14
  63. package/src/templates/components/character-count/_template.character-count.njk +3 -6
  64. package/src/templates/components/checkboxes/_examples.checkboxes.njk +49 -10
  65. package/src/templates/components/checkboxes/_template.checkboxes.njk +17 -11
  66. package/src/templates/components/collapsible/_template.collapsible.njk +4 -4
  67. package/src/templates/components/date-input/_template.date-input.njk +46 -40
  68. package/src/templates/components/dialog/_template.dialog.njk +2 -2
  69. package/src/templates/components/error-message/_template.error-message.njk +3 -3
  70. package/src/templates/components/error-summary/_template.error-summary.njk +18 -6
  71. package/src/templates/components/fieldset/_examples.fieldset.njk +32 -6
  72. package/src/templates/components/fieldset/_template.fieldset.njk +28 -16
  73. package/src/templates/components/footer/_examples.footer.njk +14 -9
  74. package/src/templates/components/footer/_template.footer.njk +62 -66
  75. package/src/templates/components/footer/params.footer.yaml +4 -26
  76. package/src/templates/components/header/_examples.header.njk +6 -4
  77. package/src/templates/components/header/_template.header.header__dropdown.njk +27 -22
  78. package/src/templates/components/header/_template.header.header__navigation.njk +4 -1
  79. package/src/templates/components/header/_template.header.header__offcanvas.njk +18 -16
  80. package/src/templates/components/header/_template.header.header__offcanvasButton.njk +2 -1
  81. package/src/templates/components/header/_template.header.header__subnav.njk +33 -29
  82. package/src/templates/components/header/_template.header.njk +70 -60
  83. package/src/templates/components/header-advanced/_examples.header-advanced.njk +46 -32
  84. package/src/templates/components/header-advanced/_template.header-advanced.njk +93 -90
  85. package/src/templates/components/header-mini/_examples.header-mini.njk +1 -1
  86. package/src/templates/components/hint/_examples.hint.njk +2 -2
  87. package/src/templates/components/hint/_template.hint.njk +1 -3
  88. package/src/templates/components/input-group/_template.input-group.njk +72 -68
  89. package/src/templates/components/item/_template.item.njk +23 -23
  90. package/src/templates/components/label/_template.label.njk +25 -14
  91. package/src/templates/components/links-list/_examples.links-list.njk +10 -12
  92. package/src/templates/components/links-list/_template.links-list.njk +35 -37
  93. package/src/templates/components/listbox/_template.listbox.njk +11 -11
  94. package/src/templates/components/menu-navigation/_template.menu-navigation.njk +62 -63
  95. package/src/templates/components/menu-vertical/_template.menu-vertical.njk +41 -41
  96. package/src/templates/components/menubar/_template.menubar.njk +91 -91
  97. package/src/templates/components/modal/_template.modal.njk +63 -53
  98. package/src/templates/components/nav/_template.nav.njk +13 -13
  99. package/src/templates/components/notification/_examples.notification.njk +0 -9
  100. package/src/templates/components/notification/_template.notification.njk +54 -44
  101. package/src/templates/components/pagination/_template.pagination.njk +37 -42
  102. package/src/templates/components/radios/_examples.radios.njk +49 -12
  103. package/src/templates/components/radios/_template.radios.njk +90 -84
  104. package/src/templates/components/searchbar/_template.searchbar.njk +6 -6
  105. package/src/templates/components/select/_template.select.njk +12 -12
  106. package/src/templates/components/status-item/_template.status-item.njk +23 -25
  107. package/src/templates/components/table/_template.table.njk +4 -4
  108. package/src/templates/components/table-advanced/_examples.table-advanced.njk +9 -9
  109. package/src/templates/components/table-advanced/_styles.table-advanced.css +3 -3
  110. package/src/templates/components/table-advanced/_template.table-advanced.njk +85 -83
  111. package/src/templates/components/tabs/_template.tabs.njk +39 -39
  112. package/src/templates/components/toggle/_template.toggle.njk +1 -2
  113. package/src/templates/components/tooltip/_template.tooltip.njk +19 -19
  114. package/src/templates/components/tree/_template.tree.njk +46 -42
  115. package/src/templates/includes/_abrir-notificaciones.njk +3 -0
  116. package/src/templates/includes/_acciones-de-cabecera.njk +28 -0
  117. package/src/templates/includes/_ejemplo-titulo-h2-parrafo.njk +5 -0
  118. package/src/templates/includes/_ejemplo-titulo-parrafo.njk +5 -0
  119. package/src/templates/includes/_loremipsum-large.njk +1 -0
  120. package/src/templates/includes/_test-include.njk +14 -0
  121. package/src/templates/pages/_page.foot-headroom.njk +32 -0
  122. package/src/templates/pages/_page.foot.njk +7 -0
  123. package/src/templates/pages/_page.footer.njk +20 -0
  124. package/src/templates/pages/_page.head.njk +13 -0
  125. package/src/templates/pages/_page.notification-edit-inner-content.njk +31 -0
  126. package/src/templates/pages/_page.notification-edit.njk +31 -0
  127. package/src/templates/pages/_page.notification-footer.njk +33 -0
  128. package/src/templates/pages/_page.notification-header-fixed.njk +31 -0
  129. package/src/templates/pages/_page.notification-header.njk +31 -0
  130. package/src/templates/pages/_page.sidebar-content.njk +21 -0
  131. package/src/templates/pages/_page.spinner-block.njk +15 -0
  132. package/src/templates/pages/_page.spinner-show.njk +16 -0
  133. package/src/templates/pages/_page.spinner.njk +16 -0
  134. package/src/templates/pages/_template.edit-fixed-with-sticky-sidebar.njk +36 -0
  135. package/src/templates/pages/_template.edit-fixed.njk +74 -0
  136. package/src/templates/pages/_template.home.njk +109 -0
  137. package/src/templates/pages/_template.logged-out.njk +53 -0
  138. package/src/templates/pages/_template.logged-selector-fixed-headroom.njk +195 -0
  139. package/src/templates/pages/_template.logged-selector-fixed.njk +192 -0
  140. package/src/templates/pages/_template.logged-selector-subheader.njk +80 -0
  141. package/src/templates/pages/_template.logged-selector-with-sidebar.njk +29 -0
  142. package/src/templates/pages/_template.logged-selector.njk +195 -0
  143. package/src/templates/pages/_template.logged.njk +138 -0
  144. package/src/templates/pages/_template.mfe-iframe-content.njk +31 -0
  145. package/src/templates/pages/_template.mfe.njk +80 -0
  146. package/src/templates/pages/_template.test.njk +45 -0
  147. package/src/templates/pages/_template.with-header-advanced.njk +130 -0
@@ -14,38 +14,23 @@
14
14
  {% set gridClass %}
15
15
  {% if not params.hasBackButton %}
16
16
  {% if params.items.length == 1 %}
17
- lg:grid-cols-max-content-1
18
- {% elseif params.items.length == 2 %}
19
- lg:grid-cols-max-content-2
20
- {% elseif params.items.length == 3 %}
21
- lg:grid-cols-max-content-3
22
- {% elseif params.items.length == 4 %}
23
- lg:grid-cols-max-content-4
24
- {% elseif params.items.length == 5 %}
25
- lg:grid-cols-max-content-5
26
- {% elseif params.items.length == 6 %}
27
- lg:grid-cols-max-content-6
28
- {% elseif params.items.length == 7 %}
29
- lg:grid-cols-max-content-7
30
- {% elseif params.items.length == 8 %}
31
- lg:grid-cols-max-content-8
32
- {% endif %}
17
+ lg:grid-cols-max-content-1{% elseif params.items.length == 2 %}
18
+ lg:grid-cols-max-content-2{% elseif params.items.length == 3 %}
19
+ lg:grid-cols-max-content-3{% elseif params.items.length == 4 %}
20
+ lg:grid-cols-max-content-4{% elseif params.items.length == 5 %}
21
+ lg:grid-cols-max-content-5{% elseif params.items.length == 6 %}
22
+ lg:grid-cols-max-content-6{% elseif params.items.length == 7 %}
23
+ lg:grid-cols-max-content-7{% elseif params.items.length == 8 %}
24
+ lg:grid-cols-max-content-8{% endif %}
33
25
  {% else %}
34
26
  {% if params.items.length == 1 %}
35
- lg:grid-cols-max-content-2
36
- {% elseif params.items.length == 2 %}
37
- lg:grid-cols-max-content-3
38
- {% elseif params.items.length == 3 %}
39
- lg:grid-cols-max-content-4
40
- {% elseif params.items.length == 4 %}
41
- lg:grid-cols-max-content-5
42
- {% elseif params.items.length == 5 %}
43
- lg:grid-cols-max-content-6
44
- {% elseif params.items.length == 6 %}
45
- lg:grid-cols-max-content-7
46
- {% elseif params.items.length == 7 %}
47
- lg:grid-cols-max-content-8
48
- {% endif %}
27
+ lg:grid-cols-max-content-2{% elseif params.items.length == 2 %}
28
+ lg:grid-cols-max-content-3{% elseif params.items.length == 3 %}
29
+ lg:grid-cols-max-content-4{% elseif params.items.length == 4 %}
30
+ lg:grid-cols-max-content-5{% elseif params.items.length == 5 %}
31
+ lg:grid-cols-max-content-6{% elseif params.items.length == 6 %}
32
+ lg:grid-cols-max-content-7{% elseif params.items.length == 7 %}
33
+ lg:grid-cols-max-content-8{% endif %}
49
34
  {% endif %}
50
35
  {% endset %}
51
36
 
@@ -31,16 +31,20 @@
31
31
 
32
32
  <!-- button -->
33
33
  {%- if element == 'a' %}
34
+
34
35
  <a href="{{ params.href if params.href else '#' }}" role="button" draggable="false" {%- if params.disabled %} tabindex="-1"{% endif %}{% if params.target %} target="{{ params.target }}"{% endif %} {{- commonAttributes | safe }}>
35
36
  {{ params.html | safe if params.html else params.text }}
36
37
  </a>
37
38
 
38
39
  {%- elseif element == 'button' %}
40
+
39
41
  <button {%- if params.value %} value="{{ params.value }}"{% endif %}{%- if params.type %} type="{{ params.type }}"{% endif %} {{- buttonAttributes | safe }} {{- commonAttributes | safe }}>
40
42
  {{ params.html | safe if params.html else params.text }}
41
43
  </button>
42
44
 
43
45
  {%- elseif element == 'input' %}
46
+
44
47
  <input value="{{ params.text }}" type="{{ params.type if params.type else 'submit' }}" {{- buttonAttributes | safe }} {{- commonAttributes | safe }}>
45
48
  {%- endif %}
49
+
46
50
  <!-- /button -->
@@ -27,7 +27,7 @@
27
27
  {{ componentSpinner({
28
28
  text: params.loader.text if params.loader.text else 'Acción en curso',
29
29
  classes: params.loader.classes
30
- }) }}
30
+ }) | indent(4) }}
31
31
  </span>
32
32
  {% endset %}
33
33
 
@@ -52,30 +52,34 @@
52
52
 
53
53
  <!-- button-loader -->
54
54
  {%- if element == 'a' %}
55
+
55
56
  <a href="{{ params.href if params.href else '#' }}" role="button" draggable="false" {% if params.target %} target="{{ params.target }}"{% endif %}{{- commonAttributes | safe }}>
56
- {{ iconLoader | safe }}
57
- {{ iconSuccess | safe }}
57
+ {{ iconLoader | safe }}
58
+ {{ iconSuccess | safe }}
58
59
  <span class="c-button-loader__content inline-flex align-baseline">
59
60
  {{ params.html | safe if params.html else params.text }}
60
61
  </span>
61
62
  </a>
62
63
 
63
64
  {%- elseif element == 'button' %}
65
+
64
66
  <button {%- if params.value %} value="{{ params.value }}"{% endif %}{%- if params.type %} type="{{ params.type }}"{% endif %} {{- buttonAttributes | safe }} {{- commonAttributes | safe }}>
65
- {{ iconLoader | safe }}
66
- {{ iconSuccess | safe }}
67
+ {{ iconLoader | safe }}
68
+ {{ iconSuccess | safe }}
67
69
  <span class="c-button-loader__content inline-flex align-baseline">
68
70
  {{ params.html | safe if params.html else params.text }}
69
71
  </span>
70
72
  </button>
71
73
 
72
74
  {%- elseif element == 'input' %}
75
+
73
76
  <div {{- commonAttributes | safe }}>
74
77
  <span class="c-button-loader__content inline-flex align-baseline">
75
78
  <input {{- buttonAttributes | safe }} value="{{ params.text }}" type="{{ params.type if params.type else 'submit' }}" class="bg-transparent font-semibold">
76
79
  </span>
77
- {{ iconLoader | safe }}
78
- {{ iconSuccess | safe }}
80
+ {{ iconLoader | safe }}
81
+ {{ iconSuccess | safe }}
79
82
  </div>
80
83
  {%- endif %}
84
+
81
85
  <!-- /button-loader -->
@@ -3,92 +3,92 @@
3
3
  {% from "components/button/_macro.button.njk" import componentButton %}
4
4
 
5
5
  {% set defaultContent %}
6
- <h3 class="c-h3"><a href="#" class="c-link">Título card</a></h3>
7
- <div class="prose max-w-none">
8
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
9
- </div>
6
+ <h3 class="c-h3"><a href="#" class="c-link">Título card</a></h3>
7
+ <div class="prose max-w-none">
8
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
9
+ </div>
10
10
  {% endset %}
11
11
 
12
12
  {% set linksContent %}
13
- <h2 class="c-h1">Tus datos médicos e información personal</h2>
14
- <ul class="text-lg">
15
- <li class="mb-base"><a href="#" class="c-link">Cambiar tus datos de contacto</a></li>
16
- <li class="mb-base"><a href="#" class="c-link">Dónde y cómo solicitar tu PIN Salud</a></li>
17
- <li class="mb-base"><a href="#" class="c-link">Cómo solicitar un cambio de centro de salud</a></li>
18
- <li class="mb-base"><a href="#" class="c-link">Historia Clínica e informes médicos</a></li>
19
- <li class="mb-base"><a href="#" class="c-link">Derechos de protección de datos</a></li>
20
- </ul>
13
+ <h2 class="c-h1">Tus datos médicos e información personal</h2>
14
+ <ul class="text-lg">
15
+ <li class="mb-base"><a href="#" class="c-link">Cambiar tus datos de contacto</a></li>
16
+ <li class="mb-base"><a href="#" class="c-link">Dónde y cómo solicitar tu PIN Salud</a></li>
17
+ <li class="mb-base"><a href="#" class="c-link">Cómo solicitar un cambio de centro de salud</a></li>
18
+ <li class="mb-base"><a href="#" class="c-link">Historia Clínica e informes médicos</a></li>
19
+ <li class="mb-base"><a href="#" class="c-link">Derechos de protección de datos</a></li>
20
+ </ul>
21
21
  {% endset %}
22
22
 
23
23
  {% set verButton %}
24
- {{ componentButton({
25
- "html": "Más <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" class=\"self-center ml-2\" aria-hidden=\"true\" focusable=\"false\" width=\"1em\" height=\"1em\"><path d=\"M102.07 27.93l35 35a10 10 0 010 14.14l-35 35a10 10 0 01-14.14-14.14l13.66-13.66A2.5 2.5 0 0099.82 80H10a10 10 0 010-20h89.82a2.5 2.5 0 001.77-4.27L87.93 42.07a10 10 0 0114.14-14.14z\" fill=\"currentColor\"></path></svg>",
26
- "classes": "c-button--transparent",
27
- "href": "#",
28
- "attributes": {
29
- "id": "boton-card-1",
30
- "aria-labelledby": "boton-card-1 titulo-card-1"
31
- }
32
- }) }}
24
+ {{ componentButton({
25
+ "html": "Más <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" class=\"self-center ml-2\" aria-hidden=\"true\" focusable=\"false\" width=\"1em\" height=\"1em\"><path d=\"M102.07 27.93l35 35a10 10 0 010 14.14l-35 35a10 10 0 01-14.14-14.14l13.66-13.66A2.5 2.5 0 0099.82 80H10a10 10 0 010-20h89.82a2.5 2.5 0 001.77-4.27L87.93 42.07a10 10 0 0114.14-14.14z\" fill=\"currentColor\"></path></svg>",
26
+ "classes": "c-button--transparent",
27
+ "href": "#",
28
+ "attributes": {
29
+ "id": "boton-card-1",
30
+ "aria-labelledby": "boton-card-1 titulo-card-1"
31
+ }
32
+ }) }}
33
33
  {% endset %}
34
34
 
35
35
  {% set verDetalleButton %}
36
- {{ componentButton({
37
- "html": "Ver detalle <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" class=\"self-center ml-2\" aria-hidden=\"true\" focusable=\"false\" width=\"1em\" height=\"1em\"><path d=\"M102.07 27.93l35 35a10 10 0 010 14.14l-35 35a10 10 0 01-14.14-14.14l13.66-13.66A2.5 2.5 0 0099.82 80H10a10 10 0 010-20h89.82a2.5 2.5 0 001.77-4.27L87.93 42.07a10 10 0 0114.14-14.14z\" fill=\"currentColor\"></path></svg>",
38
- "classes": "c-button--transparent",
39
- "href": "#",
40
- "attributes": {
41
- "id": "boton-card-1",
42
- "aria-labelledby": "boton-card-1 titulo-card-1"
43
- }
44
- }) }}
36
+ {{ componentButton({
37
+ "html": "Ver detalle <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" class=\"self-center ml-2\" aria-hidden=\"true\" focusable=\"false\" width=\"1em\" height=\"1em\"><path d=\"M102.07 27.93l35 35a10 10 0 010 14.14l-35 35a10 10 0 01-14.14-14.14l13.66-13.66A2.5 2.5 0 0099.82 80H10a10 10 0 010-20h89.82a2.5 2.5 0 001.77-4.27L87.93 42.07a10 10 0 0114.14-14.14z\" fill=\"currentColor\"></path></svg>",
38
+ "classes": "c-button--transparent",
39
+ "href": "#",
40
+ "attributes": {
41
+ "id": "boton-card-1",
42
+ "aria-labelledby": "boton-card-1 titulo-card-1"
43
+ }
44
+ }) }}
45
45
  {% endset %}
46
46
 
47
47
  {% set withIconContent %}
48
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-6 h-6 lg:w-9 lg:h-9 mt-base mb-lg" aria-hidden="true" focusable="false"><g transform="scale(2)"><path d="M21.71 5.71 16.29.29a1 1 0 0 0-.7-.29H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.41a1 1 0 0 0-.29-.7ZM20 21.5a.5.5 0 0 1-.5.5h-15a.5.5 0 0 1-.5-.5v-19a.5.5 0 0 1 .5-.5h10.25a.25.25 0 0 1 .25.25V5a2 2 0 0 0 2 2h2.75a.25.25 0 0 1 .25.25Z" fill="currentColor"></path><rect x="6.5" y="10.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="14" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="17.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="10.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="14" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="17.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect></g></svg>
49
- <h3 id="titulo-card-1" class="c-h3">Título card</h3>
50
- <div class="prose max-w-none mb-base">
51
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
52
- </div>
53
- {{ verButton | safe }}
48
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-6 h-6 lg:w-9 lg:h-9 mt-base mb-lg" aria-hidden="true" focusable="false"><g transform="scale(2)"><path d="M21.71 5.71 16.29.29a1 1 0 0 0-.7-.29H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.41a1 1 0 0 0-.29-.7ZM20 21.5a.5.5 0 0 1-.5.5h-15a.5.5 0 0 1-.5-.5v-19a.5.5 0 0 1 .5-.5h10.25a.25.25 0 0 1 .25.25V5a2 2 0 0 0 2 2h2.75a.25.25 0 0 1 .25.25Z" fill="currentColor"></path><rect x="6.5" y="10.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="14" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="17.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="10.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="14" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="17.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect></g></svg>
49
+ <h3 id="titulo-card-1" class="c-h3">Título card</h3>
50
+ <div class="prose max-w-none mb-base">
51
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
52
+ </div>
53
+ {{ verButton | safe }}
54
54
  {% endset %}
55
55
 
56
56
  {% set withButton %}
57
- <h3 id="titulo-card-1" class="c-h3">Título card</h3>
58
- <div class="prose max-w-none mb-base">
59
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
60
- </div>
61
- {{ verButton | safe }}
57
+ <h3 id="titulo-card-1" class="c-h3">Título card</h3>
58
+ <div class="prose max-w-none mb-base">
59
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
60
+ </div>
61
+ {{ verButton | safe }}
62
62
  {% endset %}
63
63
 
64
64
  {% set areaPersonalContent %}
65
- <h2 class="c-h1"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="inline-block align-middle lg:w-9 lg:h-9 mr-base" aria-hidden="true" focusable="false"><g transform="scale(2)"><path d="M21.71 5.71 16.29.29a1 1 0 0 0-.7-.29H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.41a1 1 0 0 0-.29-.7ZM20 21.5a.5.5 0 0 1-.5.5h-15a.5.5 0 0 1-.5-.5v-19a.5.5 0 0 1 .5-.5h10.25a.25.25 0 0 1 .25.25V5a2 2 0 0 0 2 2h2.75a.25.25 0 0 1 .25.25Z" fill="currentColor"></path><rect x="6.5" y="10.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="14" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="17.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="10.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="14" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="17.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect></g></svg>Tu área personal</h2>
66
- <p class="c-paragraph-base mb-lg">En tu área personal puedes pedir cita con tu médico/a, consultar tu historia clínica y encontrar una selección de contenidos y servicios de salud para ti. Accede de forma segura desde cualquier lugar y en cualquier momento, desde tu móvil u ordenador.</p>
67
- <ul class="flex flex-wrap gap-base">
68
- <li>
69
- {{ componentButton({
70
- "text": "Acceder a Tu área personal",
71
- "classes": "c-button--primary"
72
- }) }}
73
- </li>
74
- <li>
75
- {{ componentButton({
76
- "text": "Descargar la app"
77
- }) }}
78
- </li>
79
- </ul>
65
+ <h2 class="c-h1"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="inline-block align-middle lg:w-9 lg:h-9 mr-base" aria-hidden="true" focusable="false"><g transform="scale(2)"><path d="M21.71 5.71 16.29.29a1 1 0 0 0-.7-.29H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.41a1 1 0 0 0-.29-.7ZM20 21.5a.5.5 0 0 1-.5.5h-15a.5.5 0 0 1-.5-.5v-19a.5.5 0 0 1 .5-.5h10.25a.25.25 0 0 1 .25.25V5a2 2 0 0 0 2 2h2.75a.25.25 0 0 1 .25.25Z" fill="currentColor"></path><rect x="6.5" y="10.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="14" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="17.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="10.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="14" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="17.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect></g></svg>Tu área personal</h2>
66
+ <p class="c-paragraph-base mb-lg">En tu área personal puedes pedir cita con tu médico/a, consultar tu historia clínica y encontrar una selección de contenidos y servicios de salud para ti. Accede de forma segura desde cualquier lugar y en cualquier momento, desde tu móvil u ordenador.</p>
67
+ <ul class="flex flex-wrap gap-base">
68
+ <li>
69
+ {{ componentButton({
70
+ "text": "Acceder a Tu área personal",
71
+ "classes": "c-button--primary"
72
+ }) }}
73
+ </li>
74
+ <li>
75
+ {{ componentButton({
76
+ "text": "Descargar la app"
77
+ }) }}
78
+ </li>
79
+ </ul>
80
80
  {% endset %}
81
81
 
82
82
  {% set postContent %}
83
- <p class="c-paragraph-sm mb-base">
84
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="1em" width="1em" class="inline-block align-middle w-6 h-6 mr-xs"><g><path d="M7.5,10.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M12.5,10.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M17.5,10.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M7.5,14.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M12.5,14.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M17.5,14.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M7.5,18.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M12.5,18.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M17.5,18.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M21.5,3H18.75a.25.25,0,0,1-.25-.25V1a1,1,0,0,0-2,0V5.75a.75.75,0,0,1-1.5,0V3.5a.5.5,0,0,0-.5-.5H8.25A.25.25,0,0,1,8,2.75V1A1,1,0,0,0,6,1V5.75a.75.75,0,0,1-1.5,0V3.5A.5.5,0,0,0,4,3H2.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h19a2,2,0,0,0,2-2V5A2,2,0,0,0,21.5,3Zm0,18.5a.5.5,0,0,1-.5.5H3a.5.5,0,0,1-.5-.5V9.5A.5.5,0,0,1,3,9H21a.5.5,0,0,1,.5.5Z" fill="currentColor"></path></g></svg>
85
- <strong>18 octubre 2022</strong>
86
- </p>
87
- <h3 id="titulo-card-1" class="c-h3">Título de noticia</h3>
88
- <div class="prose max-w-none mb-base">
89
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
90
- </div>
91
- {{ verDetalleButton | safe }}
83
+ <p class="c-paragraph-sm mb-base">
84
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="1em" width="1em" class="inline-block align-middle w-6 h-6 mr-xs"><g><path d="M7.5,10.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M12.5,10.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M17.5,10.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M7.5,14.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M12.5,14.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M17.5,14.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M7.5,18.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M12.5,18.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M17.5,18.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M21.5,3H18.75a.25.25,0,0,1-.25-.25V1a1,1,0,0,0-2,0V5.75a.75.75,0,0,1-1.5,0V3.5a.5.5,0,0,0-.5-.5H8.25A.25.25,0,0,1,8,2.75V1A1,1,0,0,0,6,1V5.75a.75.75,0,0,1-1.5,0V3.5A.5.5,0,0,0,4,3H2.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h19a2,2,0,0,0,2-2V5A2,2,0,0,0,21.5,3Zm0,18.5a.5.5,0,0,1-.5.5H3a.5.5,0,0,1-.5-.5V9.5A.5.5,0,0,1,3,9H21a.5.5,0,0,1,.5.5Z" fill="currentColor"></path></g></svg>
85
+ <strong>18 octubre 2022</strong>
86
+ </p>
87
+ <h3 id="titulo-card-1" class="c-h3">Título de noticia</h3>
88
+ <div class="prose max-w-none mb-base">
89
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
90
+ </div>
91
+ {{ verDetalleButton | safe }}
92
92
  {% endset %}
93
93
 
94
94
 
@@ -99,7 +99,7 @@
99
99
  "data": {
100
100
  "classes": "lg:w-1/3",
101
101
  "containerClasses": "p-base border border-neutral-base rounded",
102
- "caller": defaultContent
102
+ "caller": defaultContent | indent(4)
103
103
  }
104
104
  },
105
105
  {
@@ -107,7 +107,7 @@
107
107
  "data": {
108
108
  "classes": "lg:w-1/3",
109
109
  "containerClasses": "p-base border border-neutral-base rounded",
110
- "caller": withIconContent
110
+ "caller": withIconContent | indent(4)
111
111
  }
112
112
  },
113
113
  {
@@ -115,7 +115,7 @@
115
115
  "data": {
116
116
  "classes": "lg:w-1/3",
117
117
  "containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
118
- "caller": withButton
118
+ "caller": withButton | indent(4)
119
119
  }
120
120
  },
121
121
  {
@@ -123,7 +123,7 @@
123
123
  "data": {
124
124
  "classes": "lg:w-1/3",
125
125
  "containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
126
- "caller": withButton,
126
+ "caller": withButton | indent(4),
127
127
  "super": {
128
128
  "backgroundFullColor": "transparent",
129
129
  "backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
@@ -140,7 +140,7 @@
140
140
  "data": {
141
141
  "classes": "lg:w-1/3",
142
142
  "containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
143
- "caller": withButton,
143
+ "caller": withButton | indent(4),
144
144
  "sub": {
145
145
  "backgroundFullColor": "transparent",
146
146
  "backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
@@ -158,7 +158,7 @@
158
158
  "data": {
159
159
  "classes": "lg:w-2/3",
160
160
  "containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
161
- "caller": withButton,
161
+ "caller": withButton | indent(4),
162
162
  "super": {
163
163
  "backgroundFullColor": "transparent",
164
164
  "backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
@@ -185,7 +185,7 @@
185
185
  "data": {
186
186
  "classes": "lg:w-2/3",
187
187
  "containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
188
- "caller": withButton,
188
+ "caller": withButton | indent(4),
189
189
  "super": {
190
190
  "backgroundFullColor": "transparent",
191
191
  "backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
@@ -211,14 +211,14 @@
211
211
  "data": {
212
212
  "classes": "lg:w-1/2",
213
213
  "containerClasses": "py-lg border-t-8 border-neutral-dark",
214
- "caller": linksContent
214
+ "caller": linksContent | indent(4)
215
215
  }
216
216
  },
217
217
  {
218
218
  "name": "home block with buttons",
219
219
  "data": {
220
220
  "containerClasses": "p-lg bg-neutral-lighter border-t-8 border-neutral-dark",
221
- "caller": areaPersonalContent,
221
+ "caller": areaPersonalContent | indent(4),
222
222
  "super": {
223
223
  "backgroundFullColor": "transparent",
224
224
  "backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.png&text=Imagen",
@@ -245,7 +245,7 @@
245
245
  "data": {
246
246
  "classes": "lg:w-3/4",
247
247
  "containerClasses": "p-lg bg-neutral-lighter",
248
- "caller": postContent,
248
+ "caller": postContent | indent(4),
249
249
  "super": {
250
250
  "backgroundFullColor": "transparent",
251
251
  "backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
@@ -271,7 +271,7 @@
271
271
  "data": {
272
272
  "classes": "lg:w-1/4",
273
273
  "containerClasses": "p-base bg-neutral-lighter",
274
- "caller": withIconContent
274
+ "caller": withIconContent | indent(4)
275
275
  }
276
276
  }
277
277
  ] %}
@@ -2,33 +2,33 @@
2
2
  <div {%- if params.classes %} class="{{ params.classes }}"{% endif %} {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
3
3
  <div {%- if params.containerClasses %} class="{{ params.containerClasses }}"{% endif %}>
4
4
  {% if params.super %}
5
- <div class="{% if params.super.classes %}{{ params.super.classes }}{% else-%} h-32 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.super.backgroundFullColor }}; {% if params.super.backgroundFullUrl %} background-image: url('{{ params.super.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.super.attributes %} {{attribute}}="{{value}}"{% endfor %}>
6
- {{ params.super.html | safe if params.super.html}}
7
- </div>
5
+ <div class="{% if params.super.classes %}{{ params.super.classes }}{% else-%} h-32 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.super.backgroundFullColor }}; {% if params.super.backgroundFullUrl %} background-image: url('{{ params.super.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.super.attributes %} {{attribute}}="{{value}}"{% endfor %}>
6
+ {{ params.super.html | safe if params.super.html}}
7
+ </div>
8
8
  {% endif %}
9
9
  <div class="flex">
10
10
  {% if params.left %}
11
- <div class="{% if params.left.classes %}{{ params.left.classes }}{% else-%} w-1/2 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.left.backgroundFullColor }}; {% if params.left.backgroundFullUrl %} background-image: url('{{ params.left.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.left.attributes %} {{attribute}}="{{value}}"{% endfor %}>
12
- {{ params.left.html | safe if params.left.html}}
13
- </div>
11
+ <div class="{% if params.left.classes %}{{ params.left.classes }}{% else-%} w-1/2 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.left.backgroundFullColor }}; {% if params.left.backgroundFullUrl %} background-image: url('{{ params.left.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.left.attributes %} {{attribute}}="{{value}}"{% endfor %}>
12
+ {{ params.left.html | safe if params.left.html}}
13
+ </div>
14
14
  {% endif %}
15
15
  <div {%- if params.left or params.right %} class="flex-1"{% endif %}>
16
16
  {% if caller %}
17
- {{ caller() }} {#- if statement allows usage of `call` to be optional -#}
17
+ {{ caller() | indent(4) }} {#- if statement allows usage of `call` to be optional -#}
18
18
  {% elseif params.caller %}
19
- {{ params.caller | safe }}
19
+ {{ params.caller | safe | indent(4) }}
20
20
  {% endif %}
21
21
  </div>
22
22
  {% if params.right %}
23
- <div class="{% if params.right.classes %}{{ params.right.classes }}{% else-%} w-1/2 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.right.backgroundFullColor }}; {% if params.right.backgroundFullUrl %} background-image: url('{{ params.right.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.right.attributes %} {{attribute}}="{{value}}"{% endfor %}>
24
- {{ params.right.html | safe if params.right.html}}
25
- </div>
23
+ <div class="{% if params.right.classes %}{{ params.right.classes }}{% else-%} w-1/2 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.right.backgroundFullColor }}; {% if params.right.backgroundFullUrl %} background-image: url('{{ params.right.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.right.attributes %} {{attribute}}="{{value}}"{% endfor %}>
24
+ {{ params.right.html | safe if params.right.html}}
25
+ </div>
26
26
  {% endif %}
27
27
  </div>
28
28
  {% if params.sub %}
29
- <div class="{% if params.sub.classes %}{{ params.sub.classes }}{% else-%} h-32 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.sub.backgroundFullColor }}; {% if params.sub.backgroundFullUrl %} background-image: url('{{ params.sub.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.sub.attributes %} {{attribute}}="{{value}}"{% endfor %}>
30
- {{ params.sub.html | safe if params.sub.html}}
31
- </div>
29
+ <div class="{% if params.sub.classes %}{{ params.sub.classes }}{% else-%} h-32 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.sub.backgroundFullColor }}; {% if params.sub.backgroundFullUrl %} background-image: url('{{ params.sub.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.sub.attributes %} {{attribute}}="{{value}}"{% endfor %}>
30
+ {{ params.sub.html | safe if params.sub.html}}
31
+ </div>
32
32
  {% endif %}
33
33
  </div>
34
34
  </div>
@@ -2,10 +2,7 @@
2
2
  {% from "../hint/_macro.hint.njk" import componentHint %}
3
3
 
4
4
  <!-- character-count -->
5
- <div
6
- {%- if params.maxlength %} data-maxlength="{{ params.maxlength }}"{% endif %}
7
- {%- if params.threshold %} data-threshold="{{ params.threshold }}"{% endif %}
8
- {%- if params.maxwords %} data-maxwords="{{ params.maxwords }}"{% endif %}>
5
+ <div {%- if params.maxlength %} data-maxlength="{{ params.maxlength }}"{% endif %} {%- if params.threshold %} data-threshold="{{ params.threshold }}"{% endif %} {%- if params.maxwords %} data-maxwords="{{ params.maxwords }}"{% endif %}>
9
6
  {{ componentTextarea({
10
7
  id: params.id,
11
8
  name: params.name,
@@ -29,7 +26,7 @@
29
26
  disabled: params.disabled,
30
27
  errorMessage: params.errorMessage,
31
28
  attributes: params.attributes
32
- }) }}
29
+ }) | indent(2) }}
33
30
  {{ componentHint({
34
31
  text: 'Puedes escribir hasta ' + (params.maxlength or params.maxwords) + (' palabras' if params.maxwords else ' caracteres'),
35
32
  id: params.id + '-info',
@@ -37,6 +34,6 @@
37
34
  attributes: {
38
35
  'aria-live': 'polite'
39
36
  }
40
- }) }}
37
+ }) | indent(2) }}
41
38
  </div>
42
39
  <!-- /character-count -->
@@ -1,3 +1,42 @@
1
+ {% from "components/input/_macro.input.njk" import componentInput %}
2
+
3
+ {% set telefonoContent %}
4
+ {{ componentInput({
5
+ "label": {
6
+ "text": "Número de teléfono"
7
+ },
8
+ "id": "telefono-a",
9
+ "name": "telefono-name"
10
+ }) }}
11
+ {% endset %}
12
+
13
+ {% set mobileContent %}
14
+ {{ componentInput({
15
+ "label": {
16
+ "text": "Número de teléfono móvil"
17
+ },
18
+ "id": "mobile-a",
19
+ "name": "mobile-name"
20
+ }) }}
21
+ {% endset %}
22
+
23
+ {% set mobileErrorContent %}
24
+ {{ componentInput({
25
+ "label": {
26
+ "text": "Número de teléfono móvil"
27
+ },
28
+ "id": "input-with-error-message-a",
29
+ "name": "test-name",
30
+ "errorMessage": {
31
+ "text": "Error: Este campo no puede estar vacío"
32
+ }
33
+ }) }}
34
+ {% endset %}
35
+
36
+
37
+
38
+
39
+
1
40
  {% set exampleComponent = "checkboxes" %}
2
41
  {% set examples = [{
3
42
  "name": "default",
@@ -125,7 +164,7 @@
125
164
  "text": "Verify with Phone",
126
165
  "checked": true,
127
166
  "conditional": {
128
- "html": "<label class=\" block font-semibold \" for=\"contact-phone\">Phone number</label>\n<input class=\" mt-sm px-base py-sm border-black rounded font-semibold leading-normal placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base \" name=\"contact-phone\" type=\"text\" id=\"contact-phone\">\n"
167
+ "html": telefonoContent
129
168
  }
130
169
  },
131
170
  {
@@ -461,21 +500,21 @@
461
500
  "value": "email",
462
501
  "text": "Email",
463
502
  "conditional": {
464
- "html": "<label class=\" block font-semibold \" for=\"context-email\">Mobile phone number</label>\n<input class=\" mt-sm px-base py-sm border-black rounded font-semibold leading-normal placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base \" name=\"context-email\" type=\"text\" id=\"context-email\">\n"
503
+ "html": mobileContent
465
504
  }
466
505
  },
467
506
  {
468
507
  "value": "phone",
469
508
  "text": "Phone",
470
509
  "conditional": {
471
- "html": "<label class=\" block font-semibold \" for=\"contact-phone\">Phone number</label>\n<input class=\" mt-sm px-base py-sm border-black rounded font-semibold leading-normal placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base \" name=\"contact-phone\" type=\"text\" id=\"contact-phone\">\n"
510
+ "html": telefonoContent
472
511
  }
473
512
  },
474
513
  {
475
514
  "value": "text",
476
515
  "text": "Text message",
477
516
  "conditional": {
478
- "html": "<label class=\" block font-semibold \" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\" mt-sm px-base py-sm border-black rounded font-semibold leading-normal placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base \" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n"
517
+ "html": mobileContent
479
518
  }
480
519
  }
481
520
  ]
@@ -496,7 +535,7 @@
496
535
  "value": "email",
497
536
  "text": "Email",
498
537
  "conditional": {
499
- "html": "<label class=\" block font-semibold \" for=\"context-email\">Mobile phone number</label>\n<input class=\" mt-sm px-base py-sm border-black rounded font-semibold leading-normal placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base \" name=\"context-email\" type=\"text\" id=\"context-email\">\n"
538
+ "html": mobileContent
500
539
  }
501
540
  },
502
541
  {
@@ -504,14 +543,14 @@
504
543
  "text": "Phone",
505
544
  "checked": true,
506
545
  "conditional": {
507
- "html": "<label class=\" block font-semibold \" for=\"contact-phone\">Phone number</label>\n<input class=\" mt-sm px-base py-sm border-black rounded font-semibold leading-normal placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base \" name=\"contact-phone\" type=\"text\" id=\"contact-phone\">\n"
546
+ "html": telefonoContent
508
547
  }
509
548
  },
510
549
  {
511
550
  "value": "text",
512
551
  "text": "Text message",
513
552
  "conditional": {
514
- "html": "<label class=\" block font-semibold \" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\" mt-sm px-base py-sm border-black rounded font-semibold leading-normal placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base \" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n"
553
+ "html": mobileContent
515
554
  }
516
555
  }
517
556
  ]
@@ -535,7 +574,7 @@
535
574
  "value": "email",
536
575
  "text": "Email",
537
576
  "conditional": {
538
- "html": "<label class=\" block font-semibold \" for=\"context-email\">Mobile phone number</label>\n<input class=\" mt-sm px-base py-sm border-black rounded font-semibold leading-normal placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base \" name=\"context-email\" type=\"text\" id=\"context-email\">\n"
577
+ "html": mobileContent
539
578
  }
540
579
  },
541
580
  {
@@ -543,14 +582,14 @@
543
582
  "text": "Phone",
544
583
  "checked": true,
545
584
  "conditional": {
546
- "html": "<label class=\" block font-semibold \" for=\"contact-phone\">Phone number</label>\n<span id=\"contact-phone-error\" class=\" block font-semibold text-alert-base \">Error: Problem with input</span>\n<input class=\" mt-sm px-base py-sm border-black rounded font-semibold leading-normal placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base border-alert-base ring-2 ring-alert-base \" name=\"contact-phone\" type=\"text\" id=\"contact-phone\" aria-describedby=\"contact-phone-error\">\n"
585
+ "html": mobileErrorContent
547
586
  }
548
587
  },
549
588
  {
550
589
  "value": "text",
551
590
  "text": "Text message",
552
591
  "conditional": {
553
- "html": "<label class=\" block font-semibold \" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\" mt-sm px-base py-sm border-black rounded font-semibold leading-normal placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base \" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n"
592
+ "html": mobileContent
554
593
  }
555
594
  }
556
595
  ]