desy-html 7.1.1 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/docs/_global.foot.njk +9 -9
  2. package/docs/_global.head.njk +1 -1
  3. package/docs/_macro.example-render.njk +177 -147
  4. package/docs/_macro.render-caller.njk +1 -1
  5. package/docs/ds/_ds.example.border.njk +1 -1
  6. package/docs/ds/_ds.example.color-de-interaccion.njk +5 -5
  7. package/docs/ds/_ds.example.colores-cabecera.njk +7 -7
  8. package/docs/ds/_ds.example.colores-de-soporte.njk +72 -5
  9. package/docs/ds/_ds.example.colores-neutros.njk +12 -12
  10. package/docs/ds/_ds.example.layout.njk +2 -2
  11. package/docs/ds/_ds.example.typography.njk +1 -1
  12. package/docs/ds/_ds.macro.code-snippet.njk +28 -9
  13. package/docs/ds/_ds.section.color.njk +7 -65
  14. package/docs/ds/_ds.section.espaciado.njk +4 -295
  15. package/docs/ds/_ds.section.layout.njk +5 -5
  16. package/docs/ds/_ds.section.textos.njk +40 -50
  17. package/docs/ds/_ds.section.typography.njk +239 -236
  18. package/docs/index.html +12 -0
  19. package/package.json +1 -1
  20. package/src/css/component.text.css +11 -0
  21. package/src/js/aria/dataGrid.js +21 -6
  22. package/src/js/index.js +0 -7
  23. package/src/js/popper.min.js +6 -0
  24. package/src/js/prism/clipboard.min.js +7 -0
  25. package/src/js/prism/prism-copy-to-clipboard.min.js +1 -0
  26. package/src/js/prism/prism-normalize-whitespace.min.js +1 -0
  27. package/src/js/prism/prism-toolbar.min.js +1 -0
  28. package/src/js/prism/prism-twig.min.js +1 -0
  29. package/src/js/prism/prism-yaml.min.js +1 -0
  30. package/src/js/prism/prism.min.js +1 -0
  31. package/src/js/tippy-bundle.umd.min.js +2 -0
  32. package/src/templates/components/accordion/_template.accordion.njk +95 -84
  33. package/src/templates/components/accordion-history/_template.accordion-history.njk +134 -123
  34. package/src/templates/components/alert/_template.alert.njk +6 -6
  35. package/src/templates/components/breadcrumbs/_template.breadcrumbs.njk +15 -30
  36. package/src/templates/components/button/_template.button.njk +4 -0
  37. package/src/templates/components/button-loader/_template.button-loader.njk +11 -7
  38. package/src/templates/components/card/_examples.card.njk +76 -76
  39. package/src/templates/components/card/_template.card.njk +14 -14
  40. package/src/templates/components/character-count/_template.character-count.njk +3 -6
  41. package/src/templates/components/checkboxes/_examples.checkboxes.njk +49 -10
  42. package/src/templates/components/checkboxes/_template.checkboxes.njk +17 -11
  43. package/src/templates/components/collapsible/_template.collapsible.njk +4 -4
  44. package/src/templates/components/date-input/_template.date-input.njk +46 -40
  45. package/src/templates/components/dialog/_template.dialog.njk +2 -2
  46. package/src/templates/components/error-message/_template.error-message.njk +3 -3
  47. package/src/templates/components/error-summary/_template.error-summary.njk +18 -6
  48. package/src/templates/components/fieldset/_examples.fieldset.njk +32 -6
  49. package/src/templates/components/fieldset/_template.fieldset.njk +28 -16
  50. package/src/templates/components/footer/_examples.footer.njk +14 -9
  51. package/src/templates/components/footer/_template.footer.njk +62 -66
  52. package/src/templates/components/footer/params.footer.yaml +4 -26
  53. package/src/templates/components/header/_examples.header.njk +6 -4
  54. package/src/templates/components/header/_template.header.header__dropdown.njk +27 -22
  55. package/src/templates/components/header/_template.header.header__navigation.njk +4 -1
  56. package/src/templates/components/header/_template.header.header__offcanvas.njk +18 -16
  57. package/src/templates/components/header/_template.header.header__offcanvasButton.njk +2 -1
  58. package/src/templates/components/header/_template.header.header__subnav.njk +33 -29
  59. package/src/templates/components/header/_template.header.njk +70 -60
  60. package/src/templates/components/header-advanced/_examples.header-advanced.njk +46 -32
  61. package/src/templates/components/header-advanced/_template.header-advanced.njk +93 -90
  62. package/src/templates/components/header-mini/_examples.header-mini.njk +1 -1
  63. package/src/templates/components/hint/_examples.hint.njk +2 -2
  64. package/src/templates/components/hint/_template.hint.njk +1 -3
  65. package/src/templates/components/input-group/_template.input-group.njk +72 -68
  66. package/src/templates/components/item/_template.item.njk +23 -23
  67. package/src/templates/components/label/_template.label.njk +25 -14
  68. package/src/templates/components/links-list/_examples.links-list.njk +10 -12
  69. package/src/templates/components/links-list/_template.links-list.njk +35 -37
  70. package/src/templates/components/listbox/_template.listbox.njk +11 -11
  71. package/src/templates/components/menu-navigation/_template.menu-navigation.njk +62 -63
  72. package/src/templates/components/menu-vertical/_template.menu-vertical.njk +41 -41
  73. package/src/templates/components/menubar/_template.menubar.njk +91 -91
  74. package/src/templates/components/modal/_template.modal.njk +63 -53
  75. package/src/templates/components/nav/_template.nav.njk +13 -13
  76. package/src/templates/components/notification/_examples.notification.njk +0 -9
  77. package/src/templates/components/notification/_template.notification.njk +54 -44
  78. package/src/templates/components/pagination/_template.pagination.njk +37 -42
  79. package/src/templates/components/radios/_examples.radios.njk +49 -12
  80. package/src/templates/components/radios/_template.radios.njk +90 -84
  81. package/src/templates/components/searchbar/_template.searchbar.njk +6 -6
  82. package/src/templates/components/select/_template.select.njk +12 -12
  83. package/src/templates/components/status-item/_template.status-item.njk +23 -25
  84. package/src/templates/components/table/_template.table.njk +4 -4
  85. package/src/templates/components/table-advanced/_examples.table-advanced.njk +9 -9
  86. package/src/templates/components/table-advanced/_styles.table-advanced.css +3 -3
  87. package/src/templates/components/table-advanced/_template.table-advanced.njk +85 -83
  88. package/src/templates/components/tabs/_template.tabs.njk +39 -39
  89. package/src/templates/components/toggle/_template.toggle.njk +1 -2
  90. package/src/templates/components/tooltip/_template.tooltip.njk +19 -19
  91. package/src/templates/components/tree/_template.tree.njk +46 -42
@@ -25,33 +25,32 @@
25
25
  <!-- accordion-history -->
26
26
  <div class="c-accordion {%- if params.classes %} {{ params.classes }} {% endif %}"
27
27
  {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %} {%- if params.allowToggle == true %} data-allow-toggle{% endif %} {%- if params.allowMultiple == true %} data-allow-multiple{% endif %}>
28
- <div class="flex justify-between">
29
- {% if params.heading.html or params.heading.text %}
30
- {% set headingAttributes %}class="{% if params.heading.classes %}{{ params.heading.classes }}{% else %}c-h2 mb-base{% endif %}"{% endset %}
31
- {% set headingContent %}{{ params.heading.html | safe if params.heading.html else params.heading.text }}{% endset %}
32
- {% if params.headingLevel == "1" %}
33
- <h1 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h1>
34
- {% elseif params.headingLevel == "2" %}
35
- <h2 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h2>
36
- {% elseif params.headingLevel == "3" %}
37
- <h3 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h3>
38
- {% elseif params.headingLevel == "4" %}
39
- <h4 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h4>
40
- {% elseif params.headingLevel == "5" %}
41
- <h5 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h5>
42
- {% else %}
43
- <h2 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h2>
28
+ <div class="flex justify-between">
29
+ {% if params.heading.html or params.heading.text %}
30
+ {% set headingAttributes %}class="{% if params.heading.classes %}{{ params.heading.classes }}{% else %}c-h2 mb-base{% endif %}"{% endset %}
31
+ {% set headingContent %}{{ params.heading.html | safe if params.heading.html else params.heading.text }}{% endset %}
32
+ {% if params.headingLevel == "1" %}
33
+ <h1 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h1>
34
+ {% elseif params.headingLevel == "2" %}
35
+ <h2 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h2>
36
+ {% elseif params.headingLevel == "3" %}
37
+ <h3 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h3>
38
+ {% elseif params.headingLevel == "4" %}
39
+ <h4 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h4>
40
+ {% elseif params.headingLevel == "5" %}
41
+ <h5 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h5>
42
+ {% else %}
43
+ <h2 {{ headingAttributes | safe }}>{{ headingContent | safe }}</h2>
44
+ {% endif %}
44
45
  {% endif %}
45
- {% endif %}
46
- {% if params.showControl %}
47
- <button
48
- class="c-accordion__toggle-all ml-auto py-base text-sm text-neutral-dark underline focus:text-black focus:bg-warning-base focus:outline-none focus:shadow-outline-focus text-right">
46
+ {% if params.showControl %}
47
+ <button class="c-accordion__toggle-all ml-auto py-base text-sm text-neutral-dark underline focus:text-black focus:bg-warning-base focus:outline-none focus:shadow-outline-focus text-right">
49
48
  Mostrar todo
50
49
  </button>
51
- {% endif %}
50
+ {% endif %}
52
51
  </div>
53
52
  <div class="pl-lg">
54
- {% for item in params.items %}
53
+ {%- for item in params.items %}
55
54
  {% if item %}
56
55
  {%- if item.id -%}
57
56
  {%- set id = item.id -%}
@@ -62,128 +61,140 @@
62
61
  {%- else -%}
63
62
  {%- set id = idPrefix + "-" + loop.index0 -%}
64
63
  {%- endif -%}
65
- {%- endif -%}
64
+ {%- endif %}
66
65
 
67
- <div class="relative -my-px px-xs py-sm border-t border-b border-neutral-base">
66
+ <div class="relative -my-px px-xs py-sm border-t border-b border-neutral-base">
68
67
  {% set insideContent %}
69
- <button
70
- id="{{ id }}-title"
71
- class="c-accordion__trigger group relative w-full py-sm font-semibold text-left cursor-pointer focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black {%- if item.disabled %} cursor-not-allowed{% endif %}"
72
- aria-controls="{{ id }}"
73
- {% if item.open %}
74
- aria-expanded = "true"
75
- {% else %}
76
- aria-expanded = "false"
77
- {% endif %}
78
- {% if item.disabled %} disabled{% endif %}
79
- >
80
- {{ item.headerHtml | safe if item.headerHtml else item.headerText }}
81
- {% if item.status == 'current' %}
82
- <span class="sr-only">(Estado: actual) </span>
83
- {% elseif item.status == 'pending' %}
84
- <span class="sr-only">(Estado: pendiente) </span>
85
- {% elseif item.status == 'muted' %}
86
- <span class="sr-only">(Estado: pasado) </span>
87
- {% elseif item.status == 'currentmuted' %}
88
- <span class="sr-only">(Estado: actual) </span>
89
- {% else %}
90
- <span class="sr-only">(Estado: pasado) </span>
91
- {% endif %}
92
- <span
93
- class="absolute inset-y-0 right-0 py-sm font-normal text-sm text-neutral-dark underline group-focus:text-black pointer-events-none {%- if item.disabled %} hidden{% endif %}" aria-hidden="true">
94
- <span class="c-accordion__show {%- if item.open %} hidden{%else%}{%endif%} {%- if item.show.classes %} {{ item.show.classes }}{%endif%}">
95
- {% if item.show %}
96
- {{ item.show.html | safe if item.show.html else item.show.text }}
97
- {% else %}
98
- Mostrar
99
- {% endif %}
100
- </span>
101
- <span class="c-accordion__hide {%- if item.open %}{%else%} hidden{%endif%} {%- if item.hide.classes %} {{ item.hide.classes }}{%endif%}">
102
- {% if item.hide %}
103
- {{ item.hide.html | safe if item.hide.html else item.hide.text }}
104
- {% else %}
105
- Ocultar
106
- {% endif %}
107
- </span>
108
- </span>
109
- </button>
110
- {% endset %}
111
- {% if params.headingLevel == "1" %}
112
- <h2>{{ insideContent | safe }}</h2>
113
- {% elseif params.headingLevel == "2" %}
114
- <h3>{{ insideContent | safe }}</h3>
115
- {% elseif params.headingLevel == "3" %}
116
- <h4>{{ insideContent | safe }}</h4>
117
- {% elseif params.headingLevel == "4" %}
118
- <h5>{{ insideContent | safe }}</h5>
119
- {% elseif params.headingLevel == "5" %}
120
- <h6>{{ insideContent | safe }}</h6>
68
+
69
+ <button
70
+ id="{{ id }}-title"
71
+ class="c-accordion__trigger group relative w-full py-sm font-semibold text-left cursor-pointer focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black {%- if item.disabled %} cursor-not-allowed{% endif %}"
72
+ aria-controls="{{ id }}"
73
+ {% if item.open %}
74
+ aria-expanded = "true"
121
75
  {% else %}
122
- <h3>{{ insideContent | safe }}</h3>
76
+ aria-expanded = "false"
123
77
  {% endif %}
124
- <p class="sr-only" aria-hidden="true">Haz click en el botón anterior para mostrar u ocultar</p>
125
- {% if not loop.first %}
78
+ {% if item.disabled %} disabled{% endif %}
79
+ >
80
+ {{ item.headerHtml | safe if item.headerHtml else item.headerText }}
126
81
  {% if item.status == 'current' %}
127
- <div class="absolute -top-px -left-5 h-6 border-2 border-primary-base"></div>
82
+ <span class="sr-only">(Estado: actual) </span>
128
83
  {% elseif item.status == 'pending' %}
129
- <div class="absolute -top-px -left-5 h-6 border-2 border-neutral-light"></div>
84
+ <span class="sr-only">(Estado: pendiente) </span>
130
85
  {% elseif item.status == 'muted' %}
131
- <div class="absolute -top-px -left-5 h-6 border-2 border-neutral-base"></div>
132
- {% elseif item.status == 'currentmuted' %}
133
- <div class="absolute -top-px -left-5 h-6 border-2 border-neutral-base"></div>
134
- {% else %}
135
- <div class="absolute -top-px -left-5 h-6 border-2 border-primary-base"></div>
136
- {% endif %}
137
- {% endif %}
138
- {% if not loop.last %}
139
- {% if item.status == 'current' %}
140
- <div class="absolute top-6 bottom-0 -left-5 border-2 border-neutral-light"></div>
141
- {% elseif item.status == 'pending' %}
142
- <div class="absolute top-6 bottom-0 -left-5 border-2 border-neutral-light"></div>
143
- {% elseif item.status == 'muted' %}
144
- <div class="absolute top-6 bottom-0 -left-5 border-2 border-neutral-base"></div>
86
+ <span class="sr-only">(Estado: pasado) </span>
145
87
  {% elseif item.status == 'currentmuted' %}
146
- <div class="absolute top-6 bottom-0 -left-5 border-2 border-neutral-light"></div>
88
+ <span class="sr-only">(Estado: actual) </span>
147
89
  {% else %}
148
- <div class="absolute top-6 bottom-0 -left-5 border-2 border-primary-base"></div>
90
+ <span class="sr-only">(Estado: pasado) </span>
149
91
  {% endif %}
92
+ <span class="absolute inset-y-0 right-0 py-sm font-normal text-sm text-neutral-dark underline group-focus:text-black pointer-events-none {%- if item.disabled %} hidden{% endif %}" aria-hidden="true">
93
+ <span class="c-accordion__show {%- if item.open %} hidden{%else%}{%endif%} {%- if item.show.classes %} {{ item.show.classes }}{%endif%}">
94
+ {% if item.show %}
95
+ {{ item.show.html | safe if item.show.html else item.show.text }}
96
+ {% else %}
97
+ Mostrar
98
+ {% endif %}
99
+ </span>
100
+ <span class="c-accordion__hide {%- if item.open %}{%else%} hidden{%endif%} {%- if item.hide.classes %} {{ item.hide.classes }}{%endif%}">
101
+ {% if item.hide %}
102
+ {{ item.hide.html | safe if item.hide.html else item.hide.text }}
103
+ {% else %}
104
+ Ocultar
105
+ {% endif %}
106
+ </span>
107
+ </span>
108
+ </button>
109
+ {% endset %}
110
+ {% if params.headingLevel == "1" %}
111
+ <h2>
112
+ {{ insideContent | safe }}
113
+ </h2>
114
+ {% elseif params.headingLevel == "2" %}
115
+ <h3>
116
+ {{ insideContent | safe }}
117
+ </h3>
118
+ {% elseif params.headingLevel == "3" %}
119
+ <h4>
120
+ {{ insideContent | safe }}
121
+ </h4>
122
+ {% elseif params.headingLevel == "4" %}
123
+ <h5>
124
+ {{ insideContent | safe }}
125
+ </h5>
126
+ {% elseif params.headingLevel == "5" %}
127
+ <h6>
128
+ {{ insideContent | safe }}
129
+ </h6>
130
+ {% else %}
131
+ <h3>
132
+ {{ insideContent | safe }}
133
+ </h3>
134
+ {% endif %}
135
+ <p class="sr-only" aria-hidden="true">Haz click en el botón anterior para mostrar u ocultar</p>
136
+ {% if not loop.first %}
137
+ {% if item.status == 'current' %}
138
+ <div class="absolute -top-px -left-5 h-6 border-2 border-primary-base"></div>
139
+ {% elseif item.status == 'pending' %}
140
+ <div class="absolute -top-px -left-5 h-6 border-2 border-neutral-light"></div>
141
+ {% elseif item.status == 'muted' %}
142
+ <div class="absolute -top-px -left-5 h-6 border-2 border-neutral-base"></div>
143
+ {% elseif item.status == 'currentmuted' %}
144
+ <div class="absolute -top-px -left-5 h-6 border-2 border-neutral-base"></div>
145
+ {% else %}
146
+ <div class="absolute -top-px -left-5 h-6 border-2 border-primary-base"></div>
150
147
  {% endif %}
148
+ {% endif %}
149
+ {% if not loop.last %}
151
150
  {% if item.status == 'current' %}
152
- <div class="absolute top-5 -left-6 w-3 h-3 bg-white ring-2 ring-primary-base rounded-full" role="img"><p class="sr-only">Estado: actual</p></div>
151
+ <div class="absolute top-6 bottom-0 -left-5 border-2 border-neutral-light"></div>
153
152
  {% elseif item.status == 'pending' %}
154
- <div class="absolute top-5 -left-6 w-3 h-3 bg-white border-2 border-neutral-base rounded-full" role="img"><p class="sr-only">Estado: pendiente</p></div>
153
+ <div class="absolute top-6 bottom-0 -left-5 border-2 border-neutral-light"></div>
155
154
  {% elseif item.status == 'muted' %}
156
- <div class="absolute top-5 -left-6 w-3 h-3 bg-neutral-base border-2 border-neutral-base rounded-full" role="img"><p class="sr-only">Estado: pasado</p></div>
155
+ <div class="absolute top-6 bottom-0 -left-5 border-2 border-neutral-base"></div>
157
156
  {% elseif item.status == 'currentmuted' %}
158
- <div class="absolute top-5 -left-6 w-3 h-3 bg-neutral-base ring-2 ring-neutral-base rounded-full" role="img"><p class="sr-only">Estado: actual</p></div>
157
+ <div class="absolute top-6 bottom-0 -left-5 border-2 border-neutral-light"></div>
159
158
  {% else %}
160
- <div class="absolute top-5 -left-6 w-3 h-3 bg-primary-base border-2 border-primary-base rounded-full" role="img"><p class="sr-only">Estado: pasado</p></div>
161
- {% endif %}
162
- <div
163
- {% if not item.open %}
164
- hidden = ""
165
- {% endif %}
166
- {%- if id %}
167
- id="{{ id }}"
159
+ <div class="absolute top-6 bottom-0 -left-5 border-2 border-primary-base"></div>
168
160
  {% endif %}
161
+ {% endif %}
162
+ {% if item.status == 'current' %}
163
+ <div class="absolute top-5 -left-6 w-3 h-3 bg-white ring-2 ring-primary-base rounded-full" role="img"><p class="sr-only">Estado: actual</p></div>
164
+ {% elseif item.status == 'pending' %}
165
+ <div class="absolute top-5 -left-6 w-3 h-3 bg-white border-2 border-neutral-base rounded-full" role="img"><p class="sr-only">Estado: pendiente</p></div>
166
+ {% elseif item.status == 'muted' %}
167
+ <div class="absolute top-5 -left-6 w-3 h-3 bg-neutral-base border-2 border-neutral-base rounded-full" role="img"><p class="sr-only">Estado: pasado</p></div>
168
+ {% elseif item.status == 'currentmuted' %}
169
+ <div class="absolute top-5 -left-6 w-3 h-3 bg-neutral-base ring-2 ring-neutral-base rounded-full" role="img"><p class="sr-only">Estado: actual</p></div>
170
+ {% else %}
171
+ <div class="absolute top-5 -left-6 w-3 h-3 bg-primary-base border-2 border-primary-base rounded-full" role="img"><p class="sr-only">Estado: pasado</p></div>
172
+ {% endif %}
173
+ <div
174
+ {% if not item.open %}
175
+ hidden=""
176
+ {% endif %}
177
+ {%- if id %}
178
+ id="{{ id }}"
179
+ {% endif %}
169
180
  class="c-accordion__panel relative {%- if item.classes %} {{ item.classes }}{% endif %}"
170
181
  {%- for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
171
- {% if not loop.last %}
172
- {% if item.status == 'current' %}
173
- <div class="absolute top-4 bottom-0 -left-6 -my-sm border-2 border-neutral-light"></div>
174
- {% elseif item.status == 'pending' %}
175
- <div class="absolute top-4 bottom-0 -left-6 -my-sm border-2 border-neutral-light"></div>
176
- {% elseif item.status == 'muted' %}
177
- <div class="absolute top-4 bottom-0 -left-6 -my-sm border-2 border-neutral-base"></div>
178
- {% elseif item.status == 'currentmuted' %}
179
- <div class="absolute top-4 bottom-0 -left-6 -my-sm border-2 border-neutral-light"></div>
180
- {% else %}
181
- <div class="absolute top-4 bottom-0 -left-6 -my-sm border-2 border-primary-base"></div>
182
- {% endif %}
182
+ {% if not loop.last %}
183
+ {% if item.status == 'current' %}
184
+ <div class="absolute top-4 bottom-0 -left-6 -my-sm border-2 border-neutral-light"></div>
185
+ {% elseif item.status == 'pending' %}
186
+ <div class="absolute top-4 bottom-0 -left-6 -my-sm border-2 border-neutral-light"></div>
187
+ {% elseif item.status == 'muted' %}
188
+ <div class="absolute top-4 bottom-0 -left-6 -my-sm border-2 border-neutral-base"></div>
189
+ {% elseif item.status == 'currentmuted' %}
190
+ <div class="absolute top-4 bottom-0 -left-6 -my-sm border-2 border-neutral-light"></div>
191
+ {% else %}
192
+ <div class="absolute top-4 bottom-0 -left-6 -my-sm border-2 border-primary-base"></div>
183
193
  {% endif %}
184
- {{ item.html | safe if item.html else item.text }}
185
- </div>
194
+ {% endif %}
195
+ {{ item.html | safe if item.html else item.text }}
186
196
  </div>
197
+ </div>
187
198
  {% endif %}
188
199
  {% endfor %}
189
200
  </div>
@@ -2,15 +2,15 @@
2
2
 
3
3
  <!-- alert -->
4
4
  <div>
5
- {{ componentButton(params.button) }}
5
+ {{ componentButton(params.button) | indent(2) }}
6
6
  <div id="{{ params.id }}" {%- if params.classes %} class="{{ params.classes }}"{% endif %} {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
7
7
  </div>
8
8
  <div class="hidden" id="{{ 'template-' + params.id }}">
9
- {% if caller %}
10
- {{ caller() }} {#- if statement allows usage of `call` to be optional -#}
11
- {% elseif params.caller %}
12
- {{ params.caller | safe }}
13
- {% endif %}
9
+ {% if caller %}
10
+ {{ caller() | indent(6) }} {#- if statement allows usage of `call` to be optional -#}
11
+ {% elseif params.caller %}
12
+ {{ params.caller | safe | indent(6) }}
13
+ {% endif %}
14
14
  </div>
15
15
  </div>
16
16
  <!-- /alert -->
@@ -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 -->