desy-html 8.1.7 → 8.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.
- package/config/tailwind.config.js +0 -1
- package/docs/index.html +8 -0
- package/package.json +4 -5
- package/src/js/aria/MenuVertical.js +71 -0
- package/src/js/aria/dataGrid.js +1 -1
- package/src/js/desy-html.js +14 -0
- package/src/js/index.js +3 -2
- package/src/templates/components/button/_examples.button.njk +9 -2
- package/src/templates/components/button/_template.button.njk +1 -1
- package/src/templates/components/listbox/_examples.listbox.njk +3 -3
- package/src/templates/components/menu-vertical/_examples.menu-vertical.njk +8 -4
- package/src/templates/components/menu-vertical/_template.menu-vertical.njk +7 -7
- package/src/templates/components/menu-vertical/params.menu-vertical.yaml +4 -0
- package/src/templates/components/pagination/_examples.pagination.njk +177 -8
- package/src/templates/components/pagination/_template.pagination.njk +48 -15
- package/src/templates/components/pagination/params.pagination.yaml +36 -4
- package/src/templates/components/status-item/_examples.status-item.njk +13 -13
- package/src/templates/components/table/_examples.table.njk +75 -0
- package/src/templates/components/table/_template.table.njk +11 -0
- package/src/templates/components/table/params.table.yaml +29 -0
- package/src/templates/components/table-advanced/_examples.table-advanced.njk +115 -1
- package/src/templates/components/table-advanced/_template.table-advanced.njk +42 -2
- package/src/templates/components/table-advanced/params.table-advanced.yaml +33 -0
- package/src/templates/pages/_template.home.njk +4 -1
- package/src/templates/pages/_template.logged-out.njk +4 -1
- package/src/templates/pages/_template.logged-selector-fixed-headroom.njk +3 -0
- package/src/templates/pages/_template.logged-selector-fixed.njk +3 -0
- package/src/templates/pages/_template.logged.njk +3 -0
- package/src/templates/pages/_template.mfe.njk +3 -0
- package/src/templates/pages/_template.test.njk +3 -0
- package/src/templates/pages/_template.with-header-advanced.njk +4 -1
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
{% set activePosition = loop.index0 %}
|
|
13
13
|
{% endif %}
|
|
14
14
|
{% endfor %}
|
|
15
|
-
{% set disabledPrevious = not params.hasPrevious %}
|
|
16
|
-
{% set disabledNext = not params.hasNext %}
|
|
15
|
+
{% set disabledPrevious = not params.hasPrevious if params.hasPrevious != undefined else false %}
|
|
16
|
+
{% set disabledNext = not params.hasNext if params.hasNext != undefined else false %}
|
|
17
|
+
{% set disabledFirst = not params.hasFirst if params.hasFirst != undefined else false %}
|
|
18
|
+
{% set disabledLast = not params.hasLast if params.hasLast != undefined else false %}
|
|
17
19
|
|
|
18
20
|
{% set commonAttributes %} class="flex flex-wrap items-center flex-1 mb-base lg:mb-0 text-sm{%- if params.classes %} {{ params.classes }}{% endif %}"
|
|
19
21
|
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}{% endset %}
|
|
@@ -77,6 +79,18 @@
|
|
|
77
79
|
Selecciona una página para cargar datos
|
|
78
80
|
</p>
|
|
79
81
|
<nav {{- commonAttributes | safe }}>
|
|
82
|
+
{% if params.showFirst %}
|
|
83
|
+
{{ componentButton({
|
|
84
|
+
"html": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" class="self-center h-2.5 w-2.5 mr-2" aria-hidden="true" focusable="false"><g><path d="M10.42,12a2.64,2.64,0,0,1,.77-1.88L20.73.58a1.77,1.77,0,0,1,2.5,2.5l-8.74,8.74a.27.27,0,0,0,0,.36l8.74,8.74a1.77,1.77,0,0,1-2.5,2.5l-9.54-9.54A2.64,2.64,0,0,1,10.42,12Z" fill="currentColor"></path><path d="M.25,12A2.65,2.65,0,0,1,1,10.12L10.57.58a1.77,1.77,0,0,1,2.5,2.5L4.33,11.82a.25.25,0,0,0,0,.36l8.74,8.74a1.77,1.77,0,0,1-2.5,2.5L1,13.88A2.65,2.65,0,0,1,.25,12Z" fill="currentColor"></path></g></svg>' + prefix + params.firstText + previousSuffix,
|
|
85
|
+
"href": "#",
|
|
86
|
+
"disabled": disabledFirst,
|
|
87
|
+
"classes": "c-button--sm c-button--transparent mr-xs",
|
|
88
|
+
"attributes": {
|
|
89
|
+
"id": params.idPrefix + "-first"
|
|
90
|
+
}
|
|
91
|
+
}) | trim | indent(4) }}
|
|
92
|
+
{% endif %}
|
|
93
|
+
{% if params.showPrevious != false %}
|
|
80
94
|
{{ componentButton({
|
|
81
95
|
"html": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="self-center h-2.5 w-2.5 mr-2" aria-hidden="true" focusable="false"><path d="M54.87 71.77a2.5 2.5 0 010-3.54L106 17.07A10 10 0 1091.89 2.93L35.43 59.39a15 15 0 000 21.22l56.46 56.46A10 10 0 10106 122.93z" fill="currentColor" /></svg>' + prefix + params.previousText + previousSuffix,
|
|
82
96
|
"href": "#",
|
|
@@ -86,19 +100,26 @@
|
|
|
86
100
|
"id": params.idPrefix + "-previous"
|
|
87
101
|
}
|
|
88
102
|
}) | trim | indent(4) }}
|
|
89
|
-
{
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"text": "
|
|
98
|
-
"classes": "
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
{% endif %}
|
|
104
|
+
<div class="flex flex-wrap items-center {%- if params.showFirst or params.showLast %} w-full lg:w-auto{% endif %} pl-sm">
|
|
105
|
+
{% if params.showFirst or params.showLast %}
|
|
106
|
+
<p class="lg:hidden mr-xs text-sm text-neutral-dark">Página actual:</p>
|
|
107
|
+
{% endif %}
|
|
108
|
+
{{ componentListbox({
|
|
109
|
+
"id": params.id + "-listbox",
|
|
110
|
+
"idPrefix": params.idPrefix,
|
|
111
|
+
"text": "Página " + params.items[activePosition].text,
|
|
112
|
+
"classes": "c-listbox--sm c-listbox--transparent mr-xs",
|
|
113
|
+
"classesTooltip": "max-h-52 overflow-y-auto",
|
|
114
|
+
"doesChangeButtonText": true,
|
|
115
|
+
"label": {
|
|
116
|
+
"text": "Selecciona una página para cargar datos",
|
|
117
|
+
"classes": "sr-only"
|
|
118
|
+
},
|
|
119
|
+
"items": params.items
|
|
120
|
+
}) | trim | indent(4) }}
|
|
121
|
+
</div>
|
|
122
|
+
{% if params.showNext != false %}
|
|
102
123
|
{{ componentButton({
|
|
103
124
|
"html": prefix + params.nextText + nextSuffix + '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="self-center h-2.5 w-2.5 ml-2" aria-hidden="true" focusable="false"><path d="M34 137.07a10 10 0 010-14.14l51.13-51.16a2.5 2.5 0 000-3.54L34 17.07A10 10 0 0148.11 2.93l56.46 56.46a15 15 0 010 21.22l-56.46 56.46a10 10 0 01-14.11 0z" fill="currentColor" /></svg>',
|
|
104
125
|
"href": "#",
|
|
@@ -108,6 +129,18 @@
|
|
|
108
129
|
"id": params.idPrefix + "-next"
|
|
109
130
|
}
|
|
110
131
|
}) | trim | indent(4) }}
|
|
132
|
+
{% endif %}
|
|
133
|
+
{% if params.showLast %}
|
|
134
|
+
{{ componentButton({
|
|
135
|
+
"html": prefix + params.lastText + nextSuffix + '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" class="self-center h-2.5 w-2.5 ml-2" aria-hidden="true" focusable="false"><g><path d="M13.58,12a2.64,2.64,0,0,1-.77,1.88L3.27,23.42a1.77,1.77,0,0,1-2.5-2.5l8.74-8.74a.27.27,0,0,0,0-.36L.77,3.08A1.77,1.77,0,0,1,3.27.58l9.54,9.54A2.64,2.64,0,0,1,13.58,12Z" fill="currentColor"></path><path d="M23.75,12A2.65,2.65,0,0,1,23,13.88l-9.54,9.54a1.77,1.77,0,0,1-2.5-2.5l8.74-8.74a.25.25,0,0,0,0-.36L10.93,3.08a1.77,1.77,0,0,1,2.5-2.5L23,10.12A2.65,2.65,0,0,1,23.75,12Z" fill="currentColor"></path></g></svg>',
|
|
136
|
+
"href": "#",
|
|
137
|
+
"disabled": disabledLast,
|
|
138
|
+
"classes": "c-button--sm c-button--transparent mr-xs",
|
|
139
|
+
"attributes": {
|
|
140
|
+
"id": params.idPrefix + "-last"
|
|
141
|
+
}
|
|
142
|
+
}) | trim | indent(4) }}
|
|
143
|
+
{% endif %}
|
|
111
144
|
</nav>
|
|
112
145
|
{% else %}
|
|
113
146
|
<nav {{- commonAttributes | safe }}>
|
|
@@ -23,22 +23,54 @@ params:
|
|
|
23
23
|
type: string
|
|
24
24
|
required: true
|
|
25
25
|
description: Number of items per each page.
|
|
26
|
-
- name:
|
|
26
|
+
- name: showPrevious
|
|
27
27
|
type: boolean
|
|
28
28
|
required: false
|
|
29
|
-
description: If true, shows the
|
|
30
|
-
- name:
|
|
29
|
+
description: If true, shows the Previous button if hasSelect is true. Defaults to true.
|
|
30
|
+
- name: hasPrevious
|
|
31
31
|
type: boolean
|
|
32
32
|
required: false
|
|
33
|
-
description: If
|
|
33
|
+
description: If false, the Previous button is disabled. Defaults to true.
|
|
34
34
|
- name: previousText
|
|
35
35
|
type: string
|
|
36
36
|
required: false
|
|
37
37
|
description: Text for the previous button. Defaults to "Anterior".
|
|
38
|
+
- name: showNext
|
|
39
|
+
type: boolean
|
|
40
|
+
required: false
|
|
41
|
+
description: If true, shows the Next button if hasSelect is true. Defaults to true.
|
|
42
|
+
- name: hasNext
|
|
43
|
+
type: boolean
|
|
44
|
+
required: false
|
|
45
|
+
description: If false, the Next button is disabled. Defaults to true.
|
|
38
46
|
- name: nextText
|
|
39
47
|
type: string
|
|
40
48
|
required: false
|
|
41
49
|
description: Text for the previous button. Defaults to "Siguiente".
|
|
50
|
+
- name: showFirst
|
|
51
|
+
type: boolean
|
|
52
|
+
required: false
|
|
53
|
+
description: If true, shows the First button if hasSelect is true. Defaults to false.
|
|
54
|
+
- name: hasFirst
|
|
55
|
+
type: boolean
|
|
56
|
+
required: false
|
|
57
|
+
description: If false, the First button is disabled. Defaults to true.
|
|
58
|
+
- name: firstText
|
|
59
|
+
type: string
|
|
60
|
+
required: false
|
|
61
|
+
description: Text for the first button. Defaults to "Anterior".
|
|
62
|
+
- name: showLast
|
|
63
|
+
type: boolean
|
|
64
|
+
required: false
|
|
65
|
+
description: If true, shows the Last button if hasSelect is true. Defaults to false.
|
|
66
|
+
- name: hasLast
|
|
67
|
+
type: boolean
|
|
68
|
+
required: false
|
|
69
|
+
description: If false, the Last button is disabled. Defaults to true.
|
|
70
|
+
- name: lastText
|
|
71
|
+
type: string
|
|
72
|
+
required: false
|
|
73
|
+
description: Text for the last button. Defaults to "Siguiente".
|
|
42
74
|
- name: itemsListbox
|
|
43
75
|
type: object
|
|
44
76
|
required: false
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"title": {
|
|
8
8
|
"text": "Título"
|
|
9
9
|
},
|
|
10
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
10
|
+
"caller": '<button class="c-button c-button--transparent">Modificar<span class="sr-only"> item del Título</span></button>'
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
{
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"type": "success"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
49
|
+
"caller": '<button class="c-button c-button--transparent">Modificar<span class="sr-only"> los datos de término y definición y el resto</span></button>'
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"title": {
|
|
57
57
|
"html": 'Autorización para la consulta de datos de las personas de la unidad familiar. <span class="text-neutral-dark">(Documento condicionado)</span>'
|
|
58
58
|
},
|
|
59
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
59
|
+
"caller": '<button class="c-button c-button--transparent">Aportar<span class="sr-only"> Autorización para la consulta de datos de las personas de la unidad familiar</span></button>'
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
{
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"type": "success"
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
78
|
+
"caller": '<button class="c-button c-button--transparent">Modificar<span class="sr-only"> personas de la unidad familiar</span></button>'
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
{
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"hint": {
|
|
89
89
|
"html": '<a href="#" class="c-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="inline-block self-center w-4 h-4 mr-sm no-underline" role="img" aria-hidden="true"><path d="M100.3 52.2a7.49 7.49 0 00-10.6 0L77.5 64.39V7.5a7.5 7.5 0 00-15 0v56.89L50.3 52.2a7.5 7.5 0 10-10.6 10.6l25 25a7.49 7.49 0 0010.6 0l25-25a7.49 7.49 0 000-10.6zM130 95a10 10 0 00-10 10v12.5a2.5 2.5 0 01-2.5 2.5h-95a2.5 2.5 0 01-2.5-2.5V105a10 10 0 00-20 0v15a20 20 0 0020 20h100a20 20 0 0020-20v-15a10 10 0 00-10-10z" fill="currentColor"/></svg>Descargar modelo</a>'
|
|
90
90
|
},
|
|
91
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
91
|
+
"caller": '<button class="c-button c-button--transparent">Aportar<span class="sr-only"> Autorización para la consulta de datos de las personas de la unidad familiar</span></button>'
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
{
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"status": {
|
|
102
102
|
"text": "Iniciado"
|
|
103
103
|
},
|
|
104
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
104
|
+
"caller": '<button class="c-button c-button--transparent">Rellenar<span class="sr-only"> datos adicionales del solicitante</span></button>'
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
{
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"type": "success"
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
120
|
+
"caller": '<button class="c-button c-button--transparent">Modificar<span class="sr-only"> datos adicionales del solicitante</span></button>'
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
{
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
"classes": "text-alert-base"
|
|
140
140
|
},
|
|
141
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
141
|
+
"caller": '<button class="c-button c-button--transparent">Modificar<span class="sr-only"> datos adicionales del solicitante</span></button>',
|
|
142
142
|
"classes": "border-l-4 border-alert-base"
|
|
143
143
|
}
|
|
144
144
|
},
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"type": "loading"
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
158
|
+
"caller": '<button class="c-button c-button--transparent">Modificar<span class="sr-only"> datos adicionales del solicitante</span></button>'
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
{
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
},
|
|
177
177
|
"classes": "text-alert-base"
|
|
178
178
|
},
|
|
179
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
179
|
+
"caller": '<button class="c-button c-button--transparent">Ver<span class="sr-only"> datos adicionales del solicitante</span></button>',
|
|
180
180
|
"classes": "border-l-4 border-alert-base"
|
|
181
181
|
}
|
|
182
182
|
},
|
|
@@ -200,13 +200,13 @@
|
|
|
200
200
|
"type": "success"
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
203
|
+
"caller": '<button class="c-button c-button--transparent">Modificar<span class="sr-only"> acreditación</span></button>'
|
|
204
204
|
}
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
207
|
"name": "incompleto",
|
|
208
208
|
"data": {
|
|
209
|
-
"id": "incompleto",
|
|
209
|
+
"id": "incompleto-status-item",
|
|
210
210
|
"items": [
|
|
211
211
|
{
|
|
212
212
|
"term": {
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
"type": "alert"
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
|
-
"caller": '<button class="c-button c-button--transparent"
|
|
242
|
+
"caller": '<button class="c-button c-button--transparent">Rellenar<span class="sr-only"> datos adicionales del solicitante</span></button>',
|
|
243
243
|
"classes": "border-l-4 border-alert-base"
|
|
244
244
|
}
|
|
245
245
|
}
|
|
@@ -61,6 +61,81 @@
|
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
+
{
|
|
65
|
+
"name": "tabla con tfoot",
|
|
66
|
+
"data": {
|
|
67
|
+
"caption": "Caption de la tabla",
|
|
68
|
+
"captionClasses": "sr-only mb-base font-bold text-left text-lg",
|
|
69
|
+
"head": [
|
|
70
|
+
{
|
|
71
|
+
"text": "Mes de pago"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"text": "Primer pago",
|
|
75
|
+
"classes": "text-right"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"text": "Segundo pago",
|
|
79
|
+
"classes": "text-right"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"rows": [
|
|
83
|
+
[
|
|
84
|
+
{
|
|
85
|
+
"text": "Enero"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"text": "85€",
|
|
89
|
+
"classes": "text-right"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"text": "95€",
|
|
93
|
+
"classes": "text-right"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
[
|
|
97
|
+
{
|
|
98
|
+
"text": "Febrero"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"text": "75€",
|
|
102
|
+
"classes": "text-right"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"text": "55€",
|
|
106
|
+
"classes": "text-right"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
[
|
|
110
|
+
{
|
|
111
|
+
"text": "Marzo"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"text": "165€",
|
|
115
|
+
"classes": "text-right"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"text": "125€",
|
|
119
|
+
"classes": "text-right"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
],
|
|
123
|
+
"foot": [
|
|
124
|
+
{
|
|
125
|
+
"text": "Suma",
|
|
126
|
+
"classes": "uppercase"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"text": "325€",
|
|
130
|
+
"classes": "text-right"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"text": "275€",
|
|
134
|
+
"classes": "text-right"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
},
|
|
64
139
|
{
|
|
65
140
|
"name": "tabla con caption visible",
|
|
66
141
|
"data": {
|
|
@@ -39,6 +39,17 @@
|
|
|
39
39
|
{% endif %}
|
|
40
40
|
{% endfor %}
|
|
41
41
|
</tbody>
|
|
42
|
+
{% if params.foot %}
|
|
43
|
+
<tfoot>
|
|
44
|
+
<tr class="border-t-2 border-b border-neutral-base">
|
|
45
|
+
{% for item in params.foot %}
|
|
46
|
+
<td scope="col" class="px-base py-sm {%- if item.classes %} {{ item.classes }}{% endif %}"
|
|
47
|
+
{%- if item.colspan %} colspan="{{ item.colspan }}"{% endif %}
|
|
48
|
+
{%- if item.rowspan %} rowspan="{{ item.rowspan }}"{% endif %}{% for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>{{ item.html |safe if item.html else item.text }}</td>
|
|
49
|
+
{% endfor %}
|
|
50
|
+
</tr>
|
|
51
|
+
</tfoot>
|
|
52
|
+
{% endif %}
|
|
42
53
|
</table>
|
|
43
54
|
{% endset %}
|
|
44
55
|
|
|
@@ -57,6 +57,35 @@ params:
|
|
|
57
57
|
type: object
|
|
58
58
|
required: false
|
|
59
59
|
description: HTML attributes (for example data attributes) to add to the table cell.
|
|
60
|
+
- name: foot
|
|
61
|
+
type: array
|
|
62
|
+
required: false
|
|
63
|
+
description: Array of table tfoot cells.
|
|
64
|
+
params:
|
|
65
|
+
- name: text
|
|
66
|
+
type: string
|
|
67
|
+
required: false
|
|
68
|
+
description: If `html` is set, this is not required. Text for table tfoot cells. If `html` is provided, the `text` argument will be ignored.
|
|
69
|
+
- name: html
|
|
70
|
+
type: string
|
|
71
|
+
required: false
|
|
72
|
+
description: If `text` is set, this is not required. HTML for table tfoot cells. If `html` is provided, the `text` argument will be ignore
|
|
73
|
+
- name: classes
|
|
74
|
+
type: string
|
|
75
|
+
required: false
|
|
76
|
+
description: Classes to add to the table tfoot cell.
|
|
77
|
+
- name: colspan
|
|
78
|
+
type: integer
|
|
79
|
+
required: false
|
|
80
|
+
description: Specify how many columns a cell extends.
|
|
81
|
+
- name: rowspan
|
|
82
|
+
type: integer
|
|
83
|
+
required: false
|
|
84
|
+
description: Specify how many rows a cell extends.
|
|
85
|
+
- name: attributes
|
|
86
|
+
type: object
|
|
87
|
+
required: false
|
|
88
|
+
description: HTML attributes (for example data attributes) to add to the table cell.
|
|
60
89
|
- name: caption
|
|
61
90
|
type: string
|
|
62
91
|
required: false
|
|
@@ -63,6 +63,85 @@
|
|
|
63
63
|
"classes": "min-w-full"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
+
{
|
|
67
|
+
"name": "tabla con tfoot",
|
|
68
|
+
"data": {
|
|
69
|
+
"idPrefix": "table-default",
|
|
70
|
+
"caption": "Caption de la tabla",
|
|
71
|
+
"captionClasses": "sr-only mb-base font-bold text-left text-lg",
|
|
72
|
+
"head": [
|
|
73
|
+
{
|
|
74
|
+
"text": "Mes de pago"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"text": "Primer pago",
|
|
78
|
+
"classes": "text-right"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"text": "Segundo pago",
|
|
82
|
+
"classes": "text-right"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"rows": [
|
|
86
|
+
[
|
|
87
|
+
{
|
|
88
|
+
"text": "Enero"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"text": "85€",
|
|
92
|
+
"classes": "text-right"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"text": "95€",
|
|
96
|
+
"classes": "text-right"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
[
|
|
100
|
+
{
|
|
101
|
+
"text": "Febrero"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"text": "75€",
|
|
105
|
+
"classes": "text-right"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"text": "55€",
|
|
109
|
+
"classes": "text-right"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
{
|
|
114
|
+
"text": "Marzo"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"text": "165€",
|
|
118
|
+
"classes": "text-right"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"text": "125€",
|
|
122
|
+
"classes": "text-right"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
],
|
|
126
|
+
"foot": [
|
|
127
|
+
[
|
|
128
|
+
{
|
|
129
|
+
"text": "Suma",
|
|
130
|
+
"classes": "uppercase"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"text": "325€",
|
|
134
|
+
"classes": "text-right"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"text": "275€",
|
|
138
|
+
"classes": "text-right"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
],
|
|
142
|
+
"classes": "min-w-full"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
66
145
|
{
|
|
67
146
|
"name": "tabla con caption visible",
|
|
68
147
|
"description": 'También con <code>"firstCellIsHeader": true</code>',
|
|
@@ -190,6 +269,22 @@
|
|
|
190
269
|
}
|
|
191
270
|
]
|
|
192
271
|
],
|
|
272
|
+
"foot": [
|
|
273
|
+
[
|
|
274
|
+
{
|
|
275
|
+
"text": "Suma",
|
|
276
|
+
"classes": "uppercase"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"text": "325€",
|
|
280
|
+
"classes": "text-right"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"text": "275€",
|
|
284
|
+
"classes": "text-right"
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
],
|
|
193
288
|
"classes": "min-w-full"
|
|
194
289
|
}
|
|
195
290
|
},
|
|
@@ -575,6 +670,25 @@
|
|
|
575
670
|
}
|
|
576
671
|
]
|
|
577
672
|
],
|
|
673
|
+
"foot": [
|
|
674
|
+
[
|
|
675
|
+
{
|
|
676
|
+
"text": "Suma",
|
|
677
|
+
"classes": "uppercase"
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"text": ""
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"text": "325€",
|
|
684
|
+
"classes": "text-right"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"text": "275€",
|
|
688
|
+
"classes": "text-right"
|
|
689
|
+
}
|
|
690
|
+
]
|
|
691
|
+
],
|
|
578
692
|
"classes": "min-w-full"
|
|
579
693
|
}
|
|
580
694
|
},
|
|
@@ -588,7 +702,7 @@
|
|
|
588
702
|
"firstCellIsHeader": true,
|
|
589
703
|
"head": [
|
|
590
704
|
{
|
|
591
|
-
"text": "
|
|
705
|
+
"text": "Número de fila",
|
|
592
706
|
"classes": "sticky left-16 z-10 w-60 bg-white"
|
|
593
707
|
},
|
|
594
708
|
{
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
{% if item.select %}
|
|
74
74
|
{{ componentSelect({
|
|
75
75
|
"formGroup": {
|
|
76
|
-
"classes": "mb-0"
|
|
76
|
+
"classes": "-mt-sm mb-0"
|
|
77
77
|
},
|
|
78
78
|
"label": {
|
|
79
79
|
"text": "Filtrar por esta columna",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"items": item.select.items,
|
|
85
85
|
"describedBy": idHeader,
|
|
86
86
|
"disabled": item.select.disabled,
|
|
87
|
-
"classes": item.select.classes if item.select.classes else "c-select--sm w-full
|
|
87
|
+
"classes": item.select.classes if item.select.classes else "c-select--sm w-full",
|
|
88
88
|
"attributes": item.select.attributes
|
|
89
89
|
}) | indent(10) }}
|
|
90
90
|
{% endif %}
|
|
@@ -153,6 +153,46 @@
|
|
|
153
153
|
{% endif %}
|
|
154
154
|
{% endfor %}
|
|
155
155
|
</tbody>
|
|
156
|
+
<tfoot>
|
|
157
|
+
{% for row in params.foot %}
|
|
158
|
+
{%- set idCheckbox = idPrefix + "-checkbox-" + loop.index0 -%}
|
|
159
|
+
{% if row %}
|
|
160
|
+
<tr class="border-t-2 border-b border-neutral-base hover:bg-neutral-lighter">
|
|
161
|
+
{% if params.hasCheckboxes %}
|
|
162
|
+
<td class="px-base py-sm {%- if params.checkboxesClasses %} {{ params.checkboxesClasses }}{% endif %}" tabindex="-1">
|
|
163
|
+
<div class="c-checkboxes c-checkboxes--sm">
|
|
164
|
+
<div>
|
|
165
|
+
<div class="relative flex items-start">
|
|
166
|
+
<div class="flex items-center mx-sm">
|
|
167
|
+
<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">
|
|
168
|
+
</div>
|
|
169
|
+
<div class="pt-0.5 leading-5">
|
|
170
|
+
<label class="sr-only block text-sm -mt-1" for="{{ idCheckbox }}">Selecciona fila {{ loop.index + 1 }}</label>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</td>
|
|
176
|
+
{% endif %}
|
|
177
|
+
{% for cell in row %}
|
|
178
|
+
{% set commonAttributes %}
|
|
179
|
+
{%- if cell.colspan %} colspan="{{ cell.colspan }}"{% endif %}
|
|
180
|
+
{%- if cell.rowspan %} rowspan="{{ cell.rowspan }}"{% endif %}{% for attribute, value in cell.attributes %} {{ attribute }}="{{ value }}"{% endfor %}
|
|
181
|
+
{% endset %}
|
|
182
|
+
{% if loop.first and params.firstCellIsHeader %}
|
|
183
|
+
<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 %}"
|
|
184
|
+
{{- commonAttributes | safe -}}
|
|
185
|
+
>{{ cell.html | safe if cell.html else cell.text }}</th>
|
|
186
|
+
{% else %}
|
|
187
|
+
<td tabindex="-1" class="px-base py-sm {%- if cell.classes %} {{ cell.classes }}{% endif %}"
|
|
188
|
+
{{- commonAttributes | safe -}}
|
|
189
|
+
>{{ cell.html | safe if cell.html else cell.text }}</td>
|
|
190
|
+
{% endif %}
|
|
191
|
+
{% endfor %}
|
|
192
|
+
</tr>
|
|
193
|
+
{% endif %}
|
|
194
|
+
{% endfor %}
|
|
195
|
+
</tfoot>
|
|
156
196
|
</table>
|
|
157
197
|
{% endset %}
|
|
158
198
|
|
|
@@ -74,6 +74,39 @@ params:
|
|
|
74
74
|
type: object
|
|
75
75
|
required: false
|
|
76
76
|
description: HTML attributes (for example data attributes) to add to the table cell.
|
|
77
|
+
- name: foot
|
|
78
|
+
type: array
|
|
79
|
+
required: false
|
|
80
|
+
description: Array of table tfoot cells.
|
|
81
|
+
params:
|
|
82
|
+
- name: text
|
|
83
|
+
type: string
|
|
84
|
+
required: false
|
|
85
|
+
description: If `html` is set, this is not required. Text for table tfoot cells. If `html` is provided, the `text` argument will be ignored.
|
|
86
|
+
- name: html
|
|
87
|
+
type: string
|
|
88
|
+
required: false
|
|
89
|
+
description: If `text` is set, this is not required. HTML for table tfoot cells. If `html` is provided, the `text` argument will be ignore
|
|
90
|
+
- name: classes
|
|
91
|
+
type: string
|
|
92
|
+
required: false
|
|
93
|
+
description: Classes to add to the table tfoot cell.
|
|
94
|
+
- name: colspan
|
|
95
|
+
type: integer
|
|
96
|
+
required: false
|
|
97
|
+
description: Specify how many columns a cell extends.
|
|
98
|
+
- name: rowspan
|
|
99
|
+
type: integer
|
|
100
|
+
required: false
|
|
101
|
+
description: Specify how many rows a cell extends.
|
|
102
|
+
- name: classes
|
|
103
|
+
type: string
|
|
104
|
+
required: false
|
|
105
|
+
description: Classes to add to the table tfoot cell.
|
|
106
|
+
- name: attributes
|
|
107
|
+
type: object
|
|
108
|
+
required: false
|
|
109
|
+
description: HTML attributes (for example data attributes) to add to the table cell.
|
|
77
110
|
- name: caption
|
|
78
111
|
type: string
|
|
79
112
|
required: false
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
<!-- /pageSpinnerBlock -->
|
|
13
13
|
<!-- headerBlock -->
|
|
14
14
|
{% block headerBlock %}
|
|
15
|
-
{% call componentHeader({
|
|
15
|
+
{% call componentHeader({,
|
|
16
|
+
"skipLink": {
|
|
17
|
+
"href": "#content"
|
|
18
|
+
},
|
|
16
19
|
"homepageUrl": "index.html",
|
|
17
20
|
"mobileTitle": {
|
|
18
21
|
"text": "desy-html-starter"
|