desy-html 7.1.2 → 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 (90) 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 +32 -54
  17. package/docs/ds/_ds.section.typography.njk +239 -236
  18. package/docs/index.html +8 -0
  19. package/package.json +1 -1
  20. package/src/js/aria/dataGrid.js +21 -6
  21. package/src/js/index.js +0 -7
  22. package/src/js/popper.min.js +6 -0
  23. package/src/js/prism/clipboard.min.js +7 -0
  24. package/src/js/prism/prism-copy-to-clipboard.min.js +1 -0
  25. package/src/js/prism/prism-normalize-whitespace.min.js +1 -0
  26. package/src/js/prism/prism-toolbar.min.js +1 -0
  27. package/src/js/prism/prism-twig.min.js +1 -0
  28. package/src/js/prism/prism-yaml.min.js +1 -0
  29. package/src/js/prism/prism.min.js +1 -0
  30. package/src/js/tippy-bundle.umd.min.js +2 -0
  31. package/src/templates/components/accordion/_template.accordion.njk +95 -84
  32. package/src/templates/components/accordion-history/_template.accordion-history.njk +134 -123
  33. package/src/templates/components/alert/_template.alert.njk +6 -6
  34. package/src/templates/components/breadcrumbs/_template.breadcrumbs.njk +15 -30
  35. package/src/templates/components/button/_template.button.njk +4 -0
  36. package/src/templates/components/button-loader/_template.button-loader.njk +11 -7
  37. package/src/templates/components/card/_examples.card.njk +76 -76
  38. package/src/templates/components/card/_template.card.njk +14 -14
  39. package/src/templates/components/character-count/_template.character-count.njk +3 -6
  40. package/src/templates/components/checkboxes/_examples.checkboxes.njk +49 -10
  41. package/src/templates/components/checkboxes/_template.checkboxes.njk +17 -11
  42. package/src/templates/components/collapsible/_template.collapsible.njk +4 -4
  43. package/src/templates/components/date-input/_template.date-input.njk +46 -40
  44. package/src/templates/components/dialog/_template.dialog.njk +2 -2
  45. package/src/templates/components/error-message/_template.error-message.njk +3 -3
  46. package/src/templates/components/error-summary/_template.error-summary.njk +18 -6
  47. package/src/templates/components/fieldset/_examples.fieldset.njk +32 -6
  48. package/src/templates/components/fieldset/_template.fieldset.njk +28 -16
  49. package/src/templates/components/footer/_examples.footer.njk +14 -9
  50. package/src/templates/components/footer/_template.footer.njk +62 -66
  51. package/src/templates/components/footer/params.footer.yaml +4 -26
  52. package/src/templates/components/header/_examples.header.njk +6 -4
  53. package/src/templates/components/header/_template.header.header__dropdown.njk +27 -22
  54. package/src/templates/components/header/_template.header.header__navigation.njk +4 -1
  55. package/src/templates/components/header/_template.header.header__offcanvas.njk +18 -16
  56. package/src/templates/components/header/_template.header.header__offcanvasButton.njk +2 -1
  57. package/src/templates/components/header/_template.header.header__subnav.njk +33 -29
  58. package/src/templates/components/header/_template.header.njk +70 -60
  59. package/src/templates/components/header-advanced/_examples.header-advanced.njk +46 -32
  60. package/src/templates/components/header-advanced/_template.header-advanced.njk +93 -90
  61. package/src/templates/components/header-mini/_examples.header-mini.njk +1 -1
  62. package/src/templates/components/hint/_examples.hint.njk +2 -2
  63. package/src/templates/components/hint/_template.hint.njk +1 -3
  64. package/src/templates/components/input-group/_template.input-group.njk +72 -68
  65. package/src/templates/components/item/_template.item.njk +23 -23
  66. package/src/templates/components/label/_template.label.njk +25 -14
  67. package/src/templates/components/links-list/_examples.links-list.njk +10 -12
  68. package/src/templates/components/links-list/_template.links-list.njk +35 -37
  69. package/src/templates/components/listbox/_template.listbox.njk +11 -11
  70. package/src/templates/components/menu-navigation/_template.menu-navigation.njk +62 -63
  71. package/src/templates/components/menu-vertical/_template.menu-vertical.njk +41 -41
  72. package/src/templates/components/menubar/_template.menubar.njk +91 -91
  73. package/src/templates/components/modal/_template.modal.njk +63 -53
  74. package/src/templates/components/nav/_template.nav.njk +13 -13
  75. package/src/templates/components/notification/_examples.notification.njk +0 -9
  76. package/src/templates/components/notification/_template.notification.njk +54 -44
  77. package/src/templates/components/pagination/_template.pagination.njk +37 -42
  78. package/src/templates/components/radios/_examples.radios.njk +49 -12
  79. package/src/templates/components/radios/_template.radios.njk +90 -84
  80. package/src/templates/components/searchbar/_template.searchbar.njk +6 -6
  81. package/src/templates/components/select/_template.select.njk +12 -12
  82. package/src/templates/components/status-item/_template.status-item.njk +23 -25
  83. package/src/templates/components/table/_template.table.njk +4 -4
  84. package/src/templates/components/table-advanced/_examples.table-advanced.njk +9 -9
  85. package/src/templates/components/table-advanced/_styles.table-advanced.css +3 -3
  86. package/src/templates/components/table-advanced/_template.table-advanced.njk +85 -83
  87. package/src/templates/components/tabs/_template.tabs.njk +39 -39
  88. package/src/templates/components/toggle/_template.toggle.njk +1 -2
  89. package/src/templates/components/tooltip/_template.tooltip.njk +19 -19
  90. package/src/templates/components/tree/_template.tree.njk +46 -42
@@ -19,23 +19,23 @@
19
19
  <tbody>
20
20
  {% for row in params.rows %}
21
21
  {% if row %}
22
- <tr class="border-t border-b border-neutral-base">
22
+ <tr class="border-t border-b border-neutral-base">
23
23
  {% for cell in row %}
24
24
  {% set commonAttributes %}
25
25
  {%- if cell.colspan %} colspan="{{ cell.colspan }}"{% endif %}
26
26
  {%- if cell.rowspan %} rowspan="{{ cell.rowspan }}"{% endif %}{% for attribute, value in cell.attributes %} {{ attribute }}="{{ value }}"{% endfor %}
27
27
  {% endset %}
28
28
  {% if loop.first and params.firstCellIsHeader %}
29
- <th scope="row" class="align-top px-base py-sm text-left font-normal text-sm text-neutral-dark{%- if cell.classes %} {{ cell.classes }}{% endif %}"
29
+ <th scope="row" class="align-top px-base py-sm text-left font-normal text-sm text-neutral-dark{%- if cell.classes %} {{ cell.classes }}{% endif %}"
30
30
  {{- commonAttributes | safe -}}
31
31
  >{{ cell.html | safe if cell.html else cell.text }}</th>
32
32
  {% else %}
33
- <td class="px-base py-sm {%- if cell.classes %} {{ cell.classes }}{% endif %}"
33
+ <td class="px-base py-sm {%- if cell.classes %} {{ cell.classes }}{% endif %}"
34
34
  {{- commonAttributes | safe -}}
35
35
  >{{ cell.html | safe if cell.html else cell.text }}</td>
36
36
  {% endif %}
37
37
  {% endfor %}
38
- </tr>
38
+ </tr>
39
39
  {% endif %}
40
40
  {% endfor %}
41
41
  </tbody>
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  [
37
37
  {
38
- "text": "February"
38
+ "text": "August"
39
39
  },
40
40
  {
41
41
  "text": "75€",
@@ -100,7 +100,7 @@
100
100
  ],
101
101
  [
102
102
  {
103
- "text": "February"
103
+ "text": "August"
104
104
  },
105
105
  {
106
106
  "text": "75€",
@@ -165,7 +165,7 @@
165
165
  ],
166
166
  [
167
167
  {
168
- "text": "February"
168
+ "text": "August"
169
169
  },
170
170
  {
171
171
  "text": "75€",
@@ -230,7 +230,7 @@
230
230
  ],
231
231
  [
232
232
  {
233
- "text": "February"
233
+ "text": "August"
234
234
  },
235
235
  {
236
236
  "text": "75€",
@@ -361,7 +361,7 @@
361
361
  ],
362
362
  [
363
363
  {
364
- "text": "February"
364
+ "text": "August"
365
365
  },
366
366
  {
367
367
  "text": "75€",
@@ -423,7 +423,7 @@
423
423
  ],
424
424
  [
425
425
  {
426
- "text": "February"
426
+ "text": "August"
427
427
  },
428
428
  {
429
429
  "text": "75€",
@@ -547,7 +547,7 @@
547
547
  "text": "Second row"
548
548
  },
549
549
  {
550
- "text": "February"
550
+ "text": "August"
551
551
  },
552
552
  {
553
553
  "text": "75€",
@@ -683,7 +683,7 @@
683
683
  "classes": "sticky left-16 z-10 w-60 bg-white"
684
684
  },
685
685
  {
686
- "text": "February"
686
+ "text": "August"
687
687
  },
688
688
  {
689
689
  "text": "75€",
@@ -758,4 +758,4 @@
758
758
  "classes": "relative whitespace-nowrap min-w-full"
759
759
  }
760
760
  }
761
- ] %}
761
+ ] %}
@@ -13,7 +13,7 @@
13
13
  [aria-sort="descending"],
14
14
  [aria-sort="none"] {
15
15
  .c-table-advanced__order {
16
- @apply inline-block;
16
+ @apply inline-block pointer-events-none;
17
17
  }
18
18
  }
19
19
 
@@ -22,7 +22,7 @@
22
22
  @apply font-bold text-black;
23
23
 
24
24
  .c-table-advanced__ascending {
25
- @apply inline-block;
25
+ @apply inline-block pointer-events-none;
26
26
  }
27
27
  }
28
28
 
@@ -31,7 +31,7 @@
31
31
  @apply font-bold text-black;
32
32
 
33
33
  .c-table-advanced__descending {
34
- @apply inline-block;
34
+ @apply inline-block pointer-events-none;
35
35
  }
36
36
  }
37
37
 
@@ -32,8 +32,8 @@
32
32
  </th>
33
33
  {% endif %}
34
34
  {% for item in params.head %}
35
- {%- set idHeader = idPrefix + "-header-" + loop.index0 -%}
36
- {%- set idHeaderCheckbox = idPrefix + "-header-checkbox-" + loop.index0 -%}
35
+ {%-set idHeader = idPrefix + "-header-" + loop.index0 %}
36
+ {% set idHeaderCheckbox = idPrefix + "-header-checkbox-" + loop.index0 %}
37
37
  <th {%- if item.orderBy %} aria-sort="{% if item.orderBy == 'asc' %}ascending{% elseif item.orderBy == 'desc' %}descending{% elseif item.orderBy == 'none' %}none{% endif %}"{% endif %} scope="col" id="{{ idHeader }}" class="align-top px-base py-sm border-neutral-base border-b-0 text-left text-sm font-normal text-neutral-dark {%- if item.classes %} {{ item.classes }}{% endif %}"
38
38
  {%- if item.colspan %} colspan="{{ item.colspan }}"{% endif %}
39
39
  {%- if item.rowspan %} rowspan="{{ item.rowspan }}"{% endif %}{% for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
@@ -61,93 +61,95 @@
61
61
  {% endif %}
62
62
  <tbody>
63
63
  {% if hasFilters or hasSelects %}
64
- <tr class="divide-x divide-neutral-base">
65
- {% if params.hasCheckboxes %}
66
- <td {%- if params.checkboxesClasses %} class="{{ params.checkboxesClasses }}"{% endif %}></td>
64
+ <tr class="divide-x divide-neutral-base">
65
+ {% if params.hasCheckboxes %}
66
+ <td {%- if params.checkboxesClasses %} class="{{ params.checkboxesClasses }}"{% endif %}></td>
67
+ {% endif %}
68
+ {% for item in params.head %}
69
+ {% set idHeader = idPrefix + "-header-" + loop.index0 %}
70
+ {% set idFilter = idPrefix + "-header-filter-" + loop.index0 %}
71
+ {% set idSelect = idPrefix + "-header-select-" + loop.index0 %}
72
+ <td tabindex="-1" class="align-top px-base pb-sm border-neutral-base border-b-0 text-left text-sm font-normal text-neutral-dark {%- if item.classes %} {{ item.classes }}{% endif %}">
73
+ {% if item.select %}
74
+ {{ componentSelect({
75
+ "formGroup": {
76
+ "classes": "mb-0"
77
+ },
78
+ "label": {
79
+ "text": "Filtrar por esta columna",
80
+ "classes": "sr-only"
81
+ },
82
+ "id": item.select.id if item.select.id else idSelect,
83
+ "name": item.select.name if item.select.name else idSelect,
84
+ "items": item.select.items,
85
+ "describedBy": idHeader,
86
+ "disabled": item.select.disabled,
87
+ "classes": item.select.classes if item.select.classes else "c-select--sm w-full mt-0",
88
+ "attributes": item.select.attributes
89
+ }) | indent(10) }}
90
+ {% endif %}
91
+ {% if item.select and item.hasFilter %}
92
+ <div class="pb-sm"></div>
93
+ {% endif %}
94
+ {% if item.hasFilter %}
95
+ {{ componentSearchbar({
96
+ "formGroup": {
97
+ "classes": "mb-0"
98
+ },
99
+ "label": {
100
+ "text": "Buscar en esta columna",
101
+ "classes": "sr-only"
102
+ },
103
+ "id": idFilter,
104
+ "name": idFilter,
105
+ "placeholder": "Buscar",
106
+ "classes": "c-input--sm " + item.filterClasses if item.filterClasses else "c-input--sm",
107
+ "buttonClasses": "m-xs p-0.5 text-xs",
108
+ "attributes": {
109
+ "aria-describedby": idHeader
110
+ }
111
+ }) | indent(10) }}
67
112
  {% endif %}
68
- {% for item in params.head %}
69
- {%- set idHeader = idPrefix + "-header-" + loop.index0 -%}
70
- {%- set idFilter = idPrefix + "-header-filter-" + loop.index0 -%}
71
- {%- set idSelect = idPrefix + "-header-select-" + loop.index0 -%}
72
- <td tabindex="-1" class="align-top px-base pb-sm border-neutral-base border-b-0 text-left text-sm font-normal text-neutral-dark {%- if item.classes %} {{ item.classes }}{% endif %}">
73
- {% if item.select %}
74
- {{ componentSelect({
75
- "formGroup": {
76
- "classes": "mb-0"
77
- },
78
- "label": {
79
- "text": "Filtrar por esta columna",
80
- "classes": "sr-only"
81
- },
82
- "id": item.select.id if item.select.id else idSelect,
83
- "name": item.select.name if item.select.name else idSelect,
84
- "items": item.select.items,
85
- "describedBy": idHeader,
86
- "disabled": item.select.disabled,
87
- "classes": item.select.classes if item.select.classes else "c-select--sm w-full mt-0",
88
- "attributes": item.select.attributes
89
- }) }}
90
- {% endif %}
91
- {% if item.select and item.hasFilter %}<div class="pb-sm"></div>{% endif %}
92
- {% if item.hasFilter %}
93
- {{ componentSearchbar({
94
- "formGroup": {
95
- "classes": "mb-0"
96
- },
97
- "label": {
98
- "text": "Buscar en esta columna",
99
- "classes": "sr-only"
100
- },
101
- "id": idFilter,
102
- "name": idFilter,
103
- "placeholder": "Buscar",
104
- "classes": "c-input--sm " + item.filterClasses if item.filterClasses else "c-input--sm",
105
- "buttonClasses": "m-xs p-0.5 text-xs",
106
- "attributes": {
107
- "aria-describedby": idHeader
108
- }
109
- }) }}
110
- {% endif %}
111
- </td>
112
- {% endfor %}
113
- </tr>
113
+ </td>
114
+ {% endfor %}
115
+ </tr>
114
116
  {% endif %}
115
117
  {% for row in params.rows %}
116
118
  {%- set idCheckbox = idPrefix + "-checkbox-" + loop.index0 -%}
117
119
  {% if row %}
118
- <tr class="border-t border-b border-neutral-base hover:bg-neutral-lighter">
119
- {% if params.hasCheckboxes %}
120
- <td class="px-base py-sm {%- if params.checkboxesClasses %} {{ params.checkboxesClasses }}{% endif %}" tabindex="-1">
121
- <div class="c-checkboxes c-checkboxes--sm">
122
- <div>
123
- <div class="relative flex items-start">
124
- <div class="flex items-center mx-sm">
125
- <input class="w-6 h-6 transition duration-150 ease-in-out border-black focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-offset-0 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base text-primary-base" id="{{ idCheckbox }}" name="{{ idCheckbox }}" type="checkbox" value="table-checkbox">
126
- </div>
127
- <div class="pt-0.5 leading-5">
128
- <label class="sr-only block text-sm -mt-1" for="{{ idCheckbox }}">Selecciona fila {{ loop.index + 1 }}</label>
129
- </div>
130
- </div>
131
- </div>
120
+ <tr class="border-t border-b border-neutral-base hover:bg-neutral-lighter">
121
+ {% if params.hasCheckboxes %}
122
+ <td class="px-base py-sm {%- if params.checkboxesClasses %} {{ params.checkboxesClasses }}{% endif %}" tabindex="-1">
123
+ <div class="c-checkboxes c-checkboxes--sm">
124
+ <div>
125
+ <div class="relative flex items-start">
126
+ <div class="flex items-center mx-sm">
127
+ <input class="w-6 h-6 transition duration-150 ease-in-out border-black focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-offset-0 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base text-primary-base" id="{{ idCheckbox }}" name="{{ idCheckbox }}" type="checkbox" value="table-checkbox">
132
128
  </div>
133
- </td>
134
- {% endif %}
135
- {% for cell in row %}
136
- {% set commonAttributes %}
137
- {%- if cell.colspan %} colspan="{{ cell.colspan }}"{% endif %}
138
- {%- if cell.rowspan %} rowspan="{{ cell.rowspan }}"{% endif %}{% for attribute, value in cell.attributes %} {{ attribute }}="{{ value }}"{% endfor %}
139
- {% endset %}
140
- {% if loop.first and params.firstCellIsHeader %}
141
- <th scope="row" class="px-base py-xs border-neutral-base border-b-0 border-r text-left font-normal text-sm text-neutral-dark{%- if cell.classes %} {{ cell.classes }}{% endif %}"
142
- {{- commonAttributes | safe -}}
143
- >{{ cell.html | safe if cell.html else cell.text }}</th>
144
- {% else %}
145
- <td tabindex="-1" class="px-base py-sm {%- if cell.classes %} {{ cell.classes }}{% endif %}"
146
- {{- commonAttributes | safe -}}
147
- >{{ cell.html | safe if cell.html else cell.text }}</td>
148
- {% endif %}
149
- {% endfor %}
150
- </tr>
129
+ <div class="pt-0.5 leading-5">
130
+ <label class="sr-only block text-sm -mt-1" for="{{ idCheckbox }}">Selecciona fila {{ loop.index + 1 }}</label>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </div>
135
+ </td>
136
+ {% endif %}
137
+ {% for cell in row %}
138
+ {% set commonAttributes %}
139
+ {%- if cell.colspan %} colspan="{{ cell.colspan }}"{% endif %}
140
+ {%- if cell.rowspan %} rowspan="{{ cell.rowspan }}"{% endif %}{% for attribute, value in cell.attributes %} {{ attribute }}="{{ value }}"{% endfor %}
141
+ {% endset %}
142
+ {% if loop.first and params.firstCellIsHeader %}
143
+ <th scope="row" class="px-base py-xs border-neutral-base border-b-0 border-r text-left font-normal text-sm text-neutral-dark{%- if cell.classes %} {{ cell.classes }}{% endif %}"
144
+ {{- commonAttributes | safe -}}
145
+ >{{ cell.html | safe if cell.html else cell.text }}</th>
146
+ {% else %}
147
+ <td tabindex="-1" class="px-base py-sm {%- if cell.classes %} {{ cell.classes }}{% endif %}"
148
+ {{- commonAttributes | safe -}}
149
+ >{{ cell.html | safe if cell.html else cell.text }}</td>
150
+ {% endif %}
151
+ {% endfor %}
152
+ </tr>
151
153
  {% endif %}
152
154
  {% endfor %}
153
155
  </tbody>
@@ -6,17 +6,17 @@
6
6
  <div {%- if params.id %} id="{{params.id}}"{% endif %} class="c-tabs {%- if params.classes %} {{ params.classes }}{% endif %}" {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %} data-module="c-tabs">
7
7
  <div class="c-tabs__heading">
8
8
  {% if params.headingLevel == "1" %}
9
- <h1>{{ params.title | default ("Contenido") }}</h1>
9
+ <h1>{{ params.title | default ("Contenido") }}</h1>
10
10
  {% elseif params.headingLevel == "2" %}
11
- <h2>{{ params.title | default ("Contenido") }}</h2>
11
+ <h2>{{ params.title | default ("Contenido") }}</h2>
12
12
  {% elseif params.headingLevel == "3" %}
13
- <h3>{{ params.title | default ("Contenido") }}</h3>
13
+ <h3>{{ params.title | default ("Contenido") }}</h3>
14
14
  {% elseif params.headingLevel == "4" %}
15
- <h4>{{ params.title | default ("Contenido") }}</h4>
15
+ <h4>{{ params.title | default ("Contenido") }}</h4>
16
16
  {% elseif params.headingLevel == "5" %}
17
- <h5>{{ params.title | default ("Contenido") }}</h5>
17
+ <h5>{{ params.title | default ("Contenido") }}</h5>
18
18
  {% else %}
19
- <h2>{{ params.title | default ("Contenido") }}</h2>
19
+ <h2>{{ params.title | default ("Contenido") }}</h2>
20
20
  {% endif %}
21
21
  </div>
22
22
  {% if(params.items | length) %}
@@ -25,14 +25,14 @@
25
25
  {% if item %}
26
26
  {% set id = item.id if item.id else idPrefix + "-" + loop.index %}
27
27
  {% set tabPanelId = "tab-" + id %}
28
- <button class="c-tabs__link group {%- if item.disabled %} opacity-50 pointer-events-none{% endif -%} {%- if item.active %} c-tabs__link--is-active{% endif %}"
29
- role="tab" aria-selected="{% if loop.index == 1 %}true{% else %}false{% endif %}" aria-controls="{{ tabPanelId }}" id="{{ id }}" {%- if loop.index > 1 or item.disabled %} tabindex="-1"{% endif %}
30
- {%- if item.disabled %} disabled="disabled" aria-disabled="true"{% endif -%}
31
- {%- for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
32
- <span class="flex items-center pointer-events-none group-focus:bg-warning-base group-focus:shadow-outline-focus group-focus:outline-none">
33
- {{ item.html | safe if item.html else item.text }}
34
- </span>
35
- </button>
28
+ <button class="c-tabs__link group {%- if item.disabled %} opacity-50 pointer-events-none{% endif -%} {%- if item.active %} c-tabs__link--is-active{% endif %}"
29
+ role="tab" aria-selected="{% if loop.index == 1 %}true{% else %}false{% endif %}" aria-controls="{{ tabPanelId }}" id="{{ id }}" {%- if loop.index > 1 or item.disabled %} tabindex="-1"{% endif %}
30
+ {%- if item.disabled %} disabled="disabled" aria-disabled="true"{% endif -%}
31
+ {%- for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
32
+ <span class="flex items-center pointer-events-none group-focus:bg-warning-base group-focus:shadow-outline-focus group-focus:outline-none">
33
+ {{ item.html | trim | safe if item.html else item.text }}
34
+ </span>
35
+ </button>
36
36
  {% endif %}
37
37
  {% endfor %}
38
38
  </div>
@@ -41,31 +41,31 @@
41
41
  {% if item %}
42
42
  {% set id = item.id if item.id else idPrefix + "-" + loop.index %}
43
43
  {% set tabPanelId = "tab-" + id %}
44
- <div class="c-tabs__panel {%- if item.panel.classes %} {{ item.panel.classes }}{% endif %}" id="{{ tabPanelId }}" tabindex="0" role="tabpanel" aria-labelledby="{{ id }}"
45
- {%- if loop.index > 1 %} hidden=""{% endif %}
46
- {% for attribute, value in item.panel.attributes %} {{attribute}}="{{value}}"{% endfor %}>
47
- <div class="c-tabs__panel-heading">
48
- {% if params.headingLevel == "1" %}
49
- <h2 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h2>
50
- {% elseif params.headingLevel == "2" %}
51
- <h3 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h3>
52
- {% elseif params.headingLevel == "3" %}
53
- <h4 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h4>
54
- {% elseif params.headingLevel == "4" %}
55
- <h5 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h5>
56
- {% elseif params.headingLevel == "5" %}
57
- <h6 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h6>
58
- {% else %}
59
- <h3 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h3>
60
- {% endif %}
61
- </div>
62
- {% if item.panel.html %}
63
- {{ item.panel.html | safe }}
64
- {% else %}
65
- <p>{{ item.panel.text }}</p>
66
- {% endif %}
67
- </div>
44
+ <div class="c-tabs__panel {%- if item.panel.classes %} {{ item.panel.classes }}{% endif %}" id="{{ tabPanelId }}" tabindex="0" role="tabpanel" aria-labelledby="{{ id }}"
45
+ {%- if loop.index > 1 %} hidden=""{% endif %}
46
+ {% for attribute, value in item.panel.attributes %} {{attribute}}="{{value}}"{% endfor %}>
47
+ <div class="c-tabs__panel-heading">
48
+ {% if params.headingLevel == "1" %}
49
+ <h2 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h2>
50
+ {% elseif params.headingLevel == "2" %}
51
+ <h3 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h3>
52
+ {% elseif params.headingLevel == "3" %}
53
+ <h4 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h4>
54
+ {% elseif params.headingLevel == "4" %}
55
+ <h5 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h5>
56
+ {% elseif params.headingLevel == "5" %}
57
+ <h6 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h6>
58
+ {% else %}
59
+ <h3 class="inline-flex items-center mb-base lg:mb-0 font-semibold">{{ item.html | safe if item.html else item.text }}</h3>
60
+ {% endif %}
61
+ </div>
62
+ {% if item.panel.html %}
63
+ {{ item.panel.html | safe }}
64
+ {% else %}
65
+ <p>{{ item.panel.text }}</p>
66
+ {% endif %}
67
+ </div>
68
68
  {% endif %}
69
69
  {% endfor %}
70
70
  </div>
71
- <!-- /tabs -->
71
+ <!-- /tabs -->
@@ -1,6 +1,5 @@
1
1
  <!-- toggle -->
2
- <div data-module="c-toggle" class="relative c-toggle"
3
- >
2
+ <div data-module="c-toggle" class="relative c-toggle">
4
3
  <!-- Button -->
5
4
  <button
6
5
  {% if params.isSwitch and params.pressed == null %}
@@ -4,29 +4,29 @@
4
4
  <div id="{{ params.id }}" data-module="c-tooltip" {% if params.classes %}class="{{ params.classes }}"{% endif %} {%- if params.attributes %}{% for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}{% endif %}>
5
5
  <div id="{{ idButton }}" data-module="c-tooltip-button" {%- if params.complex %} data-type="c-tooltip-button-complex"{% endif %} class="inline-flex items-center focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black" tabindex="0" role="button" aria-labelledby="{{ idButton }} {{ idTooltip }}">
6
6
  {% if params.text or params.html %}
7
- {% if params.html %}
8
- {{ params.html | safe }}
9
- {% else %}
10
- <p>
11
- {{ params.text }}
12
- </p>
13
- {% endif %}
7
+ {% if params.html %}
8
+ {{ params.html | safe }}
9
+ {% else %}
10
+ <p>
11
+ {{ params.text }}
12
+ </p>
13
+ {% endif %}
14
14
  {% endif %}
15
15
  {% if params.icon and params.text %}
16
- <span class="inline-block w-1.5"></span>
16
+ <span class="inline-block w-1.5"></span>
17
17
  {% endif %}
18
18
  {% if params.icon %}
19
- <span class="inline-block">
20
- {% if params.icon.html %}
21
- {{ params.icon.html | safe }}
22
- {% elseif params.icon.type == 'info' %}
23
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="w-4 h-4 text-primary-base" role="img" aria-label="Información"><path d="M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zm7.5 105a7.5 7.5 0 01-15 0V70a7.5 7.5 0 0115 0zM70 50a10 10 0 1110-10 10 10 0 01-10 10z" fill="currentColor"/></svg>
24
- {% elseif params.icon.type == 'alert' %}
25
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="w-4 h-4 text-alert-base" role="img" aria-label="Alerta"><path d="M138.42 118.29l-55-110a15 15 0 00-26.84 0l-55 110A15 15 0 0015 140h110a15 15 0 0013.42-21.71zM62.5 50a7.5 7.5 0 0115 0v30a7.5 7.5 0 01-15 0zm7.5 70a10 10 0 1110-10 10 10 0 01-10 10z" fill="currentColor"/></svg>
26
- {% else %}
27
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="w-4 h-4 text-primary-base" role="img" aria-label="Ayuda"><path d="M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zm0 117.51a10 10 0 1110-10 10 10 0 01-10 10zm9.17-39.08a2.5 2.5 0 00-1.67 2.36v1.71a7.5 7.5 0 01-15 0v-10A7.5 7.5 0 0170 65a12.5 12.5 0 10-12.5-12.5 7.5 7.5 0 01-15 0 27.5 27.5 0 1136.67 25.93z" fill="currentColor"/></svg>
28
- {% endif %}
29
- </span>
19
+ <span class="inline-block">
20
+ {% if params.icon.html %}
21
+ {{ params.icon.html | safe }}
22
+ {% elseif params.icon.type == 'info' %}
23
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="w-4 h-4 text-primary-base" role="img" aria-label="Información"><path d="M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zm7.5 105a7.5 7.5 0 01-15 0V70a7.5 7.5 0 0115 0zM70 50a10 10 0 1110-10 10 10 0 01-10 10z" fill="currentColor"/></svg>
24
+ {% elseif params.icon.type == 'alert' %}
25
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="w-4 h-4 text-alert-base" role="img" aria-label="Alerta"><path d="M138.42 118.29l-55-110a15 15 0 00-26.84 0l-55 110A15 15 0 0015 140h110a15 15 0 0013.42-21.71zM62.5 50a7.5 7.5 0 0115 0v30a7.5 7.5 0 01-15 0zm7.5 70a10 10 0 1110-10 10 10 0 01-10 10z" fill="currentColor"/></svg>
26
+ {% else %}
27
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="w-4 h-4 text-primary-base" role="img" aria-label="Ayuda"><path d="M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zm0 117.51a10 10 0 1110-10 10 10 0 01-10 10zm9.17-39.08a2.5 2.5 0 00-1.67 2.36v1.71a7.5 7.5 0 01-15 0v-10A7.5 7.5 0 0170 65a12.5 12.5 0 10-12.5-12.5 7.5 7.5 0 01-15 0 27.5 27.5 0 1136.67 25.93z" fill="currentColor"/></svg>
28
+ {% endif %}
29
+ </span>
30
30
  {% endif %}
31
31
  </div>
32
32
  <div id="{{ idTooltip }}" class="-my-xs p-sm shadow-md bg-black rounded text-white {%- if params.classesTooltip %} {{ params.classesTooltip }}{% endif %}" data-module="c-tooltip-tooltip" >
@@ -44,15 +44,15 @@
44
44
  classes: item.label.classes if item.label.classes else 'block relative -top-xs -left-8 pl-8 py-xs',
45
45
  attributes: item.label.attributes,
46
46
  for: id + '-input'
47
- }) | indent(6) | trim }}
47
+ }) | indent(8) | trim }}
48
48
  {% if hasHint %}
49
- {{ componentHint({
50
- id: itemHintId,
51
- classes: (item.hint.classes if item.hint.classes),
52
- attributes: item.hint.attributes,
53
- html: item.hint.html,
54
- text: item.hint.text
55
- }) | indent(6) | trim }}
49
+ {{ componentHint({
50
+ id: itemHintId,
51
+ classes: (item.hint.classes if item.hint.classes),
52
+ attributes: item.hint.attributes,
53
+ html: item.hint.html,
54
+ text: item.hint.text
55
+ }) | indent(8) | trim }}
56
56
  {% endif %}
57
57
  </div>
58
58
  </div>
@@ -69,11 +69,11 @@
69
69
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" width="10" height="10" aria-hidden="true" class="c-tree__minus"><path fill="currentColor" d="M9.286 5.714H.714a.714.714 0 010-1.428h8.572a.714.714 0 010 1.428z"/></svg>
70
70
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" width="10" height="10" aria-hidden="true" class="c-tree__plus"><path fill="currentColor" d="M9.286 4.286H5.893a.179.179 0 01-.179-.179V.714a.714.714 0 00-1.428 0v3.393a.179.179 0 01-.179.179H.714a.714.714 0 000 1.428h3.393a.179.179 0 01.179.179v3.393a.714.714 0 001.428 0V5.893a.179.179 0 01.179-.179h3.393a.714.714 0 000-1.428z"/></svg>
71
71
  </span>
72
- {{ checkboxItem(itemNode, id, name, type) }}
72
+ {{ checkboxItem(itemNode, id, name, type) | trim | indent(8) }}
73
73
  </div>
74
74
  </div>
75
75
  {% else %}
76
- {{ checkboxItem(itemNode, id, name, type) }}
76
+ {{ checkboxItem(itemNode, id, name, type) | trim | indent(4)}}
77
77
  {% endif %}
78
78
  {% if itemNode.sub.items %}
79
79
  {% set subLevel = subLevel + "sub-" %}
@@ -86,22 +86,22 @@
86
86
  {%- else -%}
87
87
  {%- set subId = subLevel + id + "-" + loop.index0 -%}
88
88
  {%- endif %}
89
- <li class="c-tree__item ml-8 origin-top-left focus:outline-none" id="{{ subId }}" role="treeitem" data-module="c-tree__item" {%- if subitem.sub%}{% if subitem.expanded %} aria-expanded="true"{% else %} aria-expanded="false"{% endif %}{% endif %}>
90
- {% if subitem.sub %}
91
- {{ childrenTree(subitem, subId, name, type) }}
92
- {% else %}
93
- <div {%- if subitem.id %} id="{{ id }}"{% endif %} class="block {%- if subitem.classes %} {{ subitem.classes }}{% endif %} {%- if subitem.active %} font-bold{% endif %}" {%- if subitem.title %} title="{{ subitem.title }}"{% endif %} {%- if subitem.active %} aria-current="page"{% endif %} {%- for attribute, value in subitem.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
94
- {% if subitem.active %}
95
- <div class="font-bold">
96
- {{ checkboxItem(subitem, subId, name, type) }}
97
- </div>
98
- {% else %}
99
- {{ checkboxItem(subitem, subId, name, type) }}
100
- {% endif %}
101
- </div>
102
- {% endif %}
103
- </li>
89
+ <li class="c-tree__item ml-8 origin-top-left focus:outline-none" id="{{ subId }}" role="treeitem" data-module="c-tree__item" {%- if subitem.sub%}{% if subitem.expanded %} aria-expanded="true"{% else %} aria-expanded="false"{% endif %}{% endif %}>
90
+ {% if subitem.sub %}
91
+ {{ childrenTree(subitem, subId, name, type) | trim | indent(12) }}
92
+ {% else %}
93
+ <div {%- if subitem.id %} id="{{ id }}"{% endif %} class="block {%- if subitem.classes %} {{ subitem.classes }}{% endif %} {%- if subitem.active %} font-bold{% endif %}" {%- if subitem.title %} title="{{ subitem.title }}"{% endif %} {%- if subitem.active %} aria-current="page"{% endif %} {%- for attribute, value in subitem.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
94
+ {% if subitem.active %}
95
+ <div class="font-bold">
96
+ {{ checkboxItem(subitem, subId, name, type) | trim | indent(10) }}
97
+ </div>
98
+ {% else %}
99
+ {{ checkboxItem(subitem, subId, name, type) | trim | indent(10) }}
104
100
  {% endif %}
101
+ </div>
102
+ {% endif %}
103
+ </li>
104
+ {% endif %}
105
105
  {% endfor %}
106
106
  </ul>
107
107
  {% endif %}
@@ -150,29 +150,33 @@
150
150
  {% set itemHintId = id + "-item-hint" if hasHint else "" %}
151
151
  {% set itemDescribedBy = describedBy if not hasFieldset else "" %}
152
152
  {% set itemDescribedBy = (itemDescribedBy + " " + itemHintId) | trim %}
153
- <li id="{{ id }}" class="c-tree__item ml-4 focus:outline-none {%- if item.active %} font-bold{% endif %}" role="treeitem" data-module="c-tree__item" {%- if item.sub%}{% if item.expanded %} aria-expanded="true"{% else %} aria-expanded="false"{% endif %}{% endif %}{%- if item.active %} aria-current="page"{% endif %} {%- if item.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif %}>
154
- {{ childrenTree(item, id, name, params.type) }}
155
- </li>
153
+ <li id="{{ id }}" class="c-tree__item ml-4 focus:outline-none {%- if item.active %} font-bold{% endif %}" role="treeitem" data-module="c-tree__item" {%- if item.sub%}{% if item.expanded %} aria-expanded="true"{% else %} aria-expanded="false"{% endif %}{% endif %}{%- if item.active %} aria-current="page"{% endif %} {%- if item.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif %}>
154
+ {{ childrenTree(item, id, name, params.type) | trim }}
155
+ </li>
156
156
  {% endif %}
157
157
  {% endfor %}
158
158
  </ul>
159
159
  {% endset -%}
160
160
 
161
+ {% set treeContent %}
162
+ {% if params.fieldset %}
163
+ {% call componentFieldset({
164
+ describedBy: describedBy,
165
+ errorId: errorId,
166
+ classes: params.fieldset.classes,
167
+ attributes: params.fieldset.attributes,
168
+ legend: params.fieldset.legend,
169
+ headingLevel: params.fieldset.headingLevel
170
+ }) %}
171
+ {{ innerHtml | safe }}
172
+ {% endcall %}
173
+ {% else %}
174
+ {{ innerHtml | safe }}
175
+ {% endif %}
176
+ {% endset %}
177
+
161
178
  <!-- tree -->
162
179
  <div class="c-form-group {%- if params.errorMessage %} c-form-group--error{% endif %} {%- if params.formGroup.classes %} {{ params.formGroup.classes }}{% endif %}">
163
- {% if params.fieldset %}
164
- {% call componentFieldset({
165
- describedBy: describedBy,
166
- errorId: errorId,
167
- classes: params.fieldset.classes,
168
- attributes: params.fieldset.attributes,
169
- legend: params.fieldset.legend,
170
- headingLevel: params.fieldset.headingLevel
171
- }) %}
172
- {{ innerHtml | trim | safe }}
173
- {% endcall %}
174
- {% else %}
175
- {{ innerHtml | trim | safe }}
176
- {% endif %}
180
+ {{ treeContent | indent(2) | safe }}
177
181
  </div>
178
182
  <!-- /tree -->