desy-html 8.1.6 → 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/_macro.example-render.njk +13 -13
- package/docs/_macro.load-component-template.njk +1 -1
- package/docs/_macro.render-caller.njk +1 -1
- package/docs/index.html +12 -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
|
@@ -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"
|