desy-html 7.3.1 → 7.4.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/docs/_macro.example-render.njk +1 -1
- package/docs/index.html +4 -0
- package/package.json +1 -1
- package/src/templates/components/accordion/_examples.accordion.njk +108 -104
- package/src/templates/components/accordion-history/_examples.accordion-history.njk +116 -112
- package/src/templates/components/alert/_examples.alert.njk +10 -6
- package/src/templates/components/breadcrumbs/_examples.breadcrumbs.njk +52 -52
- package/src/templates/components/button/_examples.button.njk +71 -71
- package/src/templates/components/button-loader/_examples.button-loader.njk +72 -72
- package/src/templates/components/card/_examples.card.njk +43 -43
- package/src/templates/components/character-count/_examples.character-count.njk +35 -33
- package/src/templates/components/checkboxes/_examples.checkboxes.njk +200 -201
- package/src/templates/components/collapsible/_examples.collapsible.njk +24 -9
- package/src/templates/components/date-input/_examples.date-input.njk +14 -14
- package/src/templates/components/description-list/_examples.description-list.njk +45 -44
- package/src/templates/components/details/_examples.details.njk +17 -16
- package/src/templates/components/dialog/_examples.dialog.njk +5 -6
- package/src/templates/components/dropdown/_examples.dropdown.njk +34 -35
- package/src/templates/components/error-message/_examples.error-message.njk +8 -2
- package/src/templates/components/error-summary/_examples.error-summary.njk +19 -19
- package/src/templates/components/fieldset/_examples.fieldset.njk +27 -25
- package/src/templates/components/file-upload/_examples.file-upload.njk +7 -7
- package/src/templates/components/footer/_examples.footer.njk +24 -24
- package/src/templates/components/header/_examples.header.njk +12 -12
- package/src/templates/components/header-mini/_examples.header-mini.njk +5 -5
- package/src/templates/components/hint/_examples.hint.njk +4 -4
- package/src/templates/components/input/_examples.input.njk +66 -64
- package/src/templates/components/input-group/_examples.input-group.njk +15 -17
- package/src/templates/components/item/_examples.item.njk +21 -20
- package/src/templates/components/label/_examples.label.njk +11 -9
- package/src/templates/components/links-list/_examples.links-list.njk +34 -34
- package/src/templates/components/listbox/_examples.listbox.njk +146 -146
- package/src/templates/components/media-object/_examples.media-object.njk +7 -7
- package/src/templates/components/menu-horizontal/_examples.menu-horizontal.njk +54 -54
- package/src/templates/components/menu-navigation/_examples.menu-navigation.njk +65 -66
- package/src/templates/components/menu-vertical/_examples.menu-vertical.njk +71 -71
- package/src/templates/components/menubar/_examples.menubar.njk +42 -42
- package/src/templates/components/modal/_examples.modal.njk +21 -15
- package/src/templates/components/modal/_template.modal.njk +5 -5
- package/src/templates/components/nav/_examples.nav.njk +66 -66
- package/src/templates/components/notification/_examples.notification.njk +14 -13
- package/src/templates/components/pagination/_examples.pagination.njk +7 -6
- package/src/templates/components/pill/_examples.pill.njk +29 -29
- package/src/templates/components/radios/_examples.radios.njk +153 -142
- package/src/templates/components/searchbar/_examples.searchbar.njk +11 -11
- package/src/templates/components/select/_examples.select.njk +63 -63
- package/src/templates/components/skip-link/_examples.skip-link.njk +4 -4
- package/src/templates/components/spinner/_examples.spinner.njk +11 -11
- package/src/templates/components/status/_examples.status.njk +4 -4
- package/src/templates/components/status-item/_examples.status-item.njk +21 -21
- package/src/templates/components/table/_examples.table.njk +58 -56
- package/src/templates/components/table-advanced/_examples.table-advanced.njk +83 -83
- package/src/templates/components/tabs/_examples.tabs.njk +30 -29
- package/src/templates/components/textarea/_examples.textarea.njk +28 -27
- package/src/templates/components/toggle/_examples.toggle.njk +10 -11
- package/src/templates/components/tooltip/_examples.tooltip.njk +9 -9
- package/src/templates/components/tree/_examples.tree.njk +58 -57
|
@@ -136,7 +136,7 @@ import componentTree %}
|
|
|
136
136
|
<div class="grid grid-cols-1 gap-x-xl mt-xl">
|
|
137
137
|
<div class="pt-xl">
|
|
138
138
|
<h3 id="example-title-{{ loop.index }}" class="c-h3 group">{{ example.name | capitalize }} <a href="#{{ example.name | capitalize | urlencode }}" class="hidden font-semibold text-neutral-base underline group-hover:inline-block">#</a></h3>
|
|
139
|
-
<p class="c-paragraph-base mb-0">{{ example.description }}</p>
|
|
139
|
+
<p class="c-paragraph-base mb-0">{{ example.description | safe }}</p>
|
|
140
140
|
</div>
|
|
141
141
|
<div class="pt-base lg:pt-lg">
|
|
142
142
|
<div class="p-base border border-neutral-base">
|
package/docs/index.html
CHANGED
|
@@ -38,6 +38,10 @@
|
|
|
38
38
|
|
|
39
39
|
<h2>Changelog (English)</h2>
|
|
40
40
|
<p>What's new in the latest version of desy-html</p>
|
|
41
|
+
<h3>v.7.4.0</h3>
|
|
42
|
+
<ul class="text-sm">
|
|
43
|
+
<li>Translated examples to español.</li>
|
|
44
|
+
</ul>
|
|
41
45
|
<h3>v.7.3.1</h3>
|
|
42
46
|
<ul class="text-sm">
|
|
43
47
|
<li>Added source code links to Plantillas pages.</li>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "desy-html",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"description": "desy-html contains the code you need to start building a user interface for Gobierno de Aragón government webapps.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Desy (SDA Servicios Digitales de Aragón)",
|
|
@@ -1,123 +1,125 @@
|
|
|
1
1
|
{% set exampleComponent = "accordion" %}
|
|
2
2
|
{% set examples = [
|
|
3
3
|
{
|
|
4
|
-
"name": "
|
|
5
|
-
"description":
|
|
4
|
+
"name": "Por defecto",
|
|
5
|
+
"description": 'Si abres uno, se cierran el resto. Una vez que abres un item, se mantiene al menos un item abierto. Asume que <code>allowmultiple: false</code> y <code>allowToggle: false</code> aunque no se defina expresamente.',
|
|
6
6
|
"data": {
|
|
7
7
|
"idPrefix": "accordion-example",
|
|
8
8
|
"headingLevel": 3,
|
|
9
9
|
"items": [
|
|
10
10
|
{
|
|
11
|
-
"headerText": "
|
|
12
|
-
"html":
|
|
11
|
+
"headerText": "Item de acordeón 1",
|
|
12
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
"headerText": "
|
|
16
|
-
"html":
|
|
15
|
+
"headerText": "Item de acordeón 2",
|
|
16
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
"headerText": "
|
|
20
|
-
"html":
|
|
19
|
+
"headerText": "Item de acordeón 3",
|
|
20
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
21
21
|
}
|
|
22
22
|
]
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
"name": "
|
|
27
|
-
"description":
|
|
26
|
+
"name": "Permite múltiples",
|
|
27
|
+
"description": 'Permite tener abiertos varios items a la vez sin cerrar automáticamente ninguno. Define <code>allowmultiple: true</code> y asume que <code>allowToggle: true</code>.',
|
|
28
28
|
"data": {
|
|
29
29
|
"idPrefix": "allowmultiple-example",
|
|
30
30
|
"headingLevel": 3,
|
|
31
31
|
"allowMultiple": true,
|
|
32
32
|
"items": [
|
|
33
33
|
{
|
|
34
|
-
"headerText": "
|
|
35
|
-
"html":
|
|
34
|
+
"headerText": "Item de acordeón 1",
|
|
35
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
"headerText": "
|
|
39
|
-
"html":
|
|
38
|
+
"headerText": "Item de acordeón 2",
|
|
39
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
"headerText": "
|
|
43
|
-
"html":
|
|
42
|
+
"headerText": "Item de acordeón 3",
|
|
43
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
44
44
|
}
|
|
45
45
|
]
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
"name": "
|
|
50
|
-
"description":
|
|
49
|
+
"name": "Permite cerrar",
|
|
50
|
+
"description": 'Si abres uno, se cierran el resto. Permite que cierres el que está abierto para que queden todos cerrados. Define <code>allowToggle: true</code> y asume que <code>allowMultiple: false</code>.',
|
|
51
51
|
"data": {
|
|
52
52
|
"idPrefix": "allowtoggle-example",
|
|
53
53
|
"headingLevel": 3,
|
|
54
54
|
"allowToggle": true,
|
|
55
55
|
"items": [
|
|
56
56
|
{
|
|
57
|
-
"headerText": "
|
|
58
|
-
"html":
|
|
57
|
+
"headerText": "Item de acordeón 1",
|
|
58
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
"headerText": "
|
|
62
|
-
"html":
|
|
61
|
+
"headerText": "Item de acordeón 2",
|
|
62
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
|
-
"headerText": "
|
|
66
|
-
"html":
|
|
65
|
+
"headerText": "Item de acordeón 3",
|
|
66
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
67
67
|
}
|
|
68
68
|
]
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
"name": "
|
|
72
|
+
"name": "Con un item abierto",
|
|
73
|
+
"description": 'Podemos abrir inicialmente un item si le añadimos el parámetro <code>"open": true</code>.',
|
|
73
74
|
"data": {
|
|
74
75
|
"idPrefix": "with-one-item-opened-example",
|
|
75
76
|
"headingLevel": 3,
|
|
76
77
|
"allowToggle": true,
|
|
77
78
|
"items": [
|
|
78
79
|
{
|
|
79
|
-
"headerText": "
|
|
80
|
-
"html":
|
|
80
|
+
"headerText": "Item de acordeón 1",
|
|
81
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
81
82
|
},
|
|
82
83
|
{
|
|
83
|
-
"headerText": "
|
|
84
|
-
"html":
|
|
84
|
+
"headerText": "Item de acordeón 2",
|
|
85
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
85
86
|
"open": true
|
|
86
87
|
},
|
|
87
88
|
{
|
|
88
|
-
"headerText": "
|
|
89
|
-
"html":
|
|
89
|
+
"headerText": "Item de acordeón 3",
|
|
90
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
90
91
|
}
|
|
91
92
|
]
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
{
|
|
95
|
-
"name": "
|
|
96
|
+
"name": "Con 2 items abiertos",
|
|
97
|
+
"description": 'Podemos abrir inicialmente items si les añadimos el parámetro <code>"open": true</code>.',
|
|
96
98
|
"data": {
|
|
97
99
|
"idPrefix": "with-2-items-opened-example",
|
|
98
100
|
"headingLevel": 3,
|
|
99
101
|
"allowMultiple": true,
|
|
100
102
|
"items": [
|
|
101
103
|
{
|
|
102
|
-
"headerText": "
|
|
103
|
-
"html":
|
|
104
|
+
"headerText": "Item de acordeón 1",
|
|
105
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
104
106
|
"open": true
|
|
105
107
|
},
|
|
106
108
|
{
|
|
107
|
-
"headerText": "
|
|
108
|
-
"html":
|
|
109
|
+
"headerText": "Item de acordeón 2",
|
|
110
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
109
111
|
},
|
|
110
112
|
{
|
|
111
|
-
"headerText": "
|
|
112
|
-
"html":
|
|
113
|
+
"headerText": "Item de acordeón 3",
|
|
114
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
113
115
|
"open": true
|
|
114
116
|
}
|
|
115
117
|
]
|
|
116
118
|
}
|
|
117
119
|
},
|
|
118
120
|
{
|
|
119
|
-
"name": "
|
|
120
|
-
"description":
|
|
121
|
+
"name": "Deshabilitados con allowToggle y allowMultiple",
|
|
122
|
+
"description": 'Ocultará la infomación de mostrar/ocultar y deshabilitará el item para no poder ser clicado. Usando el parámetro <code>"disabled": true</code>.',
|
|
121
123
|
"data": {
|
|
122
124
|
"idPrefix": "accordion-disabled",
|
|
123
125
|
"headingLevel": 3,
|
|
@@ -125,17 +127,17 @@
|
|
|
125
127
|
"allowMultiple": true,
|
|
126
128
|
"items": [
|
|
127
129
|
{
|
|
128
|
-
"headerText": "
|
|
129
|
-
"html":
|
|
130
|
+
"headerText": "Item de acordeón no deshabilitado",
|
|
131
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
130
132
|
},
|
|
131
133
|
{
|
|
132
|
-
"headerText": "
|
|
133
|
-
"html":
|
|
134
|
+
"headerText": "Item de acordeón deshabilitado",
|
|
135
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
134
136
|
"disabled": true
|
|
135
137
|
},
|
|
136
138
|
{
|
|
137
|
-
"headerText": "
|
|
138
|
-
"html":
|
|
139
|
+
"headerText": "Item de acordeón deshabilitado y abierto",
|
|
140
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
139
141
|
"disabled": true,
|
|
140
142
|
"open": true
|
|
141
143
|
}
|
|
@@ -143,92 +145,94 @@
|
|
|
143
145
|
}
|
|
144
146
|
},
|
|
145
147
|
{
|
|
146
|
-
"name": "
|
|
148
|
+
"name": "Con encabezado",
|
|
149
|
+
"description": 'Usa el parámetro <code>"heading"</code> para añadir un encabezado asociado al componente. Usa el parámetro <code>"headingLevel"</code> para establecer el nivel del encabezado. Por ejemplo: <code>"headingLevel": 3</code> creará un encabezado <code><h3></code>.',
|
|
147
150
|
"data": {
|
|
148
151
|
"idPrefix": "heading-example",
|
|
149
152
|
"headingLevel": 3,
|
|
150
153
|
"heading": {
|
|
151
|
-
"text": "
|
|
154
|
+
"text": "Encabezado de acordeón"
|
|
152
155
|
},
|
|
153
156
|
"items": [
|
|
154
157
|
{
|
|
155
|
-
"headerText": "
|
|
156
|
-
"html":
|
|
158
|
+
"headerText": "Item de acordeón 1",
|
|
159
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
157
160
|
},
|
|
158
161
|
{
|
|
159
|
-
"headerText": "
|
|
160
|
-
"html":
|
|
162
|
+
"headerText": "Item de acordeón 2",
|
|
163
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
161
164
|
},
|
|
162
165
|
{
|
|
163
|
-
"headerText": "
|
|
164
|
-
"html":
|
|
166
|
+
"headerText": "Item de acordeón 3",
|
|
167
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
165
168
|
}
|
|
166
169
|
]
|
|
167
170
|
}
|
|
168
171
|
},
|
|
169
172
|
{
|
|
170
|
-
"name": "
|
|
171
|
-
"description": "headingLevel
|
|
173
|
+
"name": "Con encabezado de nivel 4",
|
|
174
|
+
"description": 'Usa el parámetro <code>"heading"</code> para añadir un encabezado asociado al componente. Usa el parámetro <code>"headingLevel"</code> para establecer el nivel del encabezado. En este ejemplo: <code>"headingLevel": 4</code> creará un encabezado de componente <code><h4></code> y los botones interiores tendrán los siguientes niveles de encabezado para conservar la jerarquía de encabezados correspondiente: en este caso <code><h5></code>.',
|
|
172
175
|
"data": {
|
|
173
176
|
"idPrefix": "accordion-heading-level-example",
|
|
174
177
|
"headingLevel": 4,
|
|
175
178
|
"heading": {
|
|
176
|
-
"text": "
|
|
179
|
+
"text": "Este encabezado con <h4>"
|
|
177
180
|
},
|
|
178
181
|
"items": [
|
|
179
182
|
{
|
|
180
|
-
"headerText": "
|
|
181
|
-
"html":
|
|
183
|
+
"headerText": "Este Item 1 con <h5>",
|
|
184
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
182
185
|
},
|
|
183
186
|
{
|
|
184
|
-
"headerText": "
|
|
185
|
-
"html":
|
|
187
|
+
"headerText": "Este Item 2 con <h5>",
|
|
188
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
186
189
|
},
|
|
187
190
|
{
|
|
188
|
-
"headerText": "
|
|
189
|
-
"html":
|
|
191
|
+
"headerText": "Este Item 3 con <h5>",
|
|
192
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
190
193
|
}
|
|
191
194
|
]
|
|
192
195
|
}
|
|
193
196
|
},
|
|
194
197
|
{
|
|
195
|
-
"name": "
|
|
198
|
+
"name": "Con encabezado y controles de Mostrar todo",
|
|
199
|
+
"description": 'Usa el parámetro <code>"showControl": true</code> para mostrar un controlador que permite mostrar/ocultar todos los items de una vez.',
|
|
196
200
|
"data": {
|
|
197
201
|
"idPrefix": "heading-and-show-controls-example",
|
|
198
202
|
"headingLevel": 3,
|
|
199
203
|
"heading": {
|
|
200
|
-
"text": "
|
|
204
|
+
"text": "Encabezado de acordeón"
|
|
201
205
|
},
|
|
202
206
|
"showControl": true,
|
|
203
207
|
"allowMultiple": true,
|
|
204
208
|
"items": [
|
|
205
209
|
{
|
|
206
|
-
"headerText": "
|
|
207
|
-
"html":
|
|
210
|
+
"headerText": "Item de acordeón 1",
|
|
211
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
208
212
|
},
|
|
209
213
|
{
|
|
210
|
-
"headerText": "
|
|
211
|
-
"html":
|
|
214
|
+
"headerText": "Item de acordeón 2",
|
|
215
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
212
216
|
"open": true
|
|
213
217
|
},
|
|
214
218
|
{
|
|
215
|
-
"headerText": "
|
|
216
|
-
"html":
|
|
219
|
+
"headerText": "Item de acordeón 3",
|
|
220
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
217
221
|
}
|
|
218
222
|
]
|
|
219
223
|
}
|
|
220
224
|
},
|
|
221
225
|
{
|
|
222
|
-
"name": "
|
|
223
|
-
"description": "
|
|
226
|
+
"name": "Con controles personalizados para mostrar/ocultar",
|
|
227
|
+
"description": 'Usa los parámetros <code>"show"</code> y <code>"hide"</code> para personalizar los controles que permiten abrir cada item. El último item de este ejemplo no muestra ningún controlador visible.',
|
|
224
228
|
"data": {
|
|
225
229
|
"idPrefix": "accordion-show-hide",
|
|
226
230
|
"headingLevel": 3,
|
|
227
231
|
"allowMultiple": true,
|
|
228
232
|
"items": [
|
|
229
233
|
{
|
|
230
|
-
"headerText": "
|
|
231
|
-
"html":
|
|
234
|
+
"headerText": "Item de acordeón 1",
|
|
235
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
232
236
|
"show": {
|
|
233
237
|
"text": "Expandir detalles"
|
|
234
238
|
},
|
|
@@ -237,8 +241,8 @@
|
|
|
237
241
|
}
|
|
238
242
|
},
|
|
239
243
|
{
|
|
240
|
-
"headerText": "
|
|
241
|
-
"html":
|
|
244
|
+
"headerText": "Item de acordeón 2",
|
|
245
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
242
246
|
"show": {
|
|
243
247
|
"html": '<svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path d="M14 7a1 1 0 0 0-1-1H8.25A.25.25 0 0 1 8 5.75V1a1 1 0 0 0-2 0v4.75a.25.25 0 0 1-.25.25H1a1 1 0 0 0 0 2h4.75a.25.25 0 0 1 .25.25V13a1 1 0 0 0 2 0V8.25A.25.25 0 0 1 8.25 8H13a1 1 0 0 0 1-1Z" fill="currentColor" transform="scale(3.42857)"/></svg>'
|
|
244
248
|
},
|
|
@@ -247,8 +251,8 @@
|
|
|
247
251
|
}
|
|
248
252
|
},
|
|
249
253
|
{
|
|
250
|
-
"headerText": "
|
|
251
|
-
"html":
|
|
254
|
+
"headerText": "Item de acordeón 3",
|
|
255
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
252
256
|
"show": {
|
|
253
257
|
"text": ""
|
|
254
258
|
},
|
|
@@ -260,30 +264,30 @@
|
|
|
260
264
|
}
|
|
261
265
|
},
|
|
262
266
|
{
|
|
263
|
-
"name": "
|
|
264
|
-
"description":
|
|
267
|
+
"name": "Con HTML en las cabeceras de los items",
|
|
268
|
+
"description": 'Podemos añadir texto adicional bajo las cabeceras de los items. Para evitar problemas de eventos el el click, usamos la clase <code>pointer-events-none</code> en los subelementos.',
|
|
265
269
|
"data": {
|
|
266
270
|
"idPrefix": "accordion-example-pointer-events-none",
|
|
267
271
|
"headingLevel": 3,
|
|
268
272
|
"items": [
|
|
269
273
|
{
|
|
270
|
-
"headerHtml": '<span class="block pointer-events-none">
|
|
271
|
-
"html":
|
|
274
|
+
"headerHtml": '<span class="block pointer-events-none">Item de acordeón 1</span><span class="block pointer-events-none font-normal">El subelemento también recibe eventos</span>',
|
|
275
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
272
276
|
},
|
|
273
277
|
{
|
|
274
|
-
"headerHtml": '<span class="block pointer-events-none">
|
|
275
|
-
"html":
|
|
278
|
+
"headerHtml": '<span class="block pointer-events-none">Item de acordeón 2</span><span class="block pointer-events-none font-normal">El subelemento también recibe eventos</span>',
|
|
279
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
276
280
|
},
|
|
277
281
|
{
|
|
278
|
-
"headerHtml": '<span class="block pointer-events-none">
|
|
279
|
-
"html":
|
|
282
|
+
"headerHtml": '<span class="block pointer-events-none">Item de acordeón 3</span><span class="block pointer-events-none font-normal">El subelemento también recibe eventos</span>',
|
|
283
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
280
284
|
}
|
|
281
285
|
]
|
|
282
286
|
}
|
|
283
287
|
},
|
|
284
288
|
{
|
|
285
|
-
"name": "
|
|
286
|
-
"description":
|
|
289
|
+
"name": "Con clases de CSS aplicadas",
|
|
290
|
+
"description": 'Los parámetros <code>classes</code> nos permiten aplicar clases de Tailwind CSS a nuestro componente.',
|
|
287
291
|
"data": {
|
|
288
292
|
"idPrefix": "classes-example",
|
|
289
293
|
"headingLevel": 3,
|
|
@@ -294,25 +298,25 @@
|
|
|
294
298
|
},
|
|
295
299
|
"items": [
|
|
296
300
|
{
|
|
297
|
-
"headerText": "
|
|
298
|
-
"html":
|
|
301
|
+
"headerText": "Item de acordeón 1",
|
|
302
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
299
303
|
},
|
|
300
304
|
{
|
|
301
|
-
"headerText": "
|
|
302
|
-
"html":
|
|
303
|
-
"classes": "
|
|
305
|
+
"headerText": "Item de acordeón 2",
|
|
306
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-white rounded-lg h-40"></div></div>',
|
|
307
|
+
"classes": "p-sm bg-primary-light",
|
|
304
308
|
"open": true
|
|
305
309
|
},
|
|
306
310
|
{
|
|
307
|
-
"headerText": "
|
|
308
|
-
"html":
|
|
311
|
+
"headerText": "Item de acordeón 3",
|
|
312
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>'
|
|
309
313
|
}
|
|
310
314
|
]
|
|
311
315
|
}
|
|
312
316
|
},
|
|
313
317
|
{
|
|
314
|
-
"name": "
|
|
315
|
-
"description":
|
|
318
|
+
"name": "Con atributos aplicados",
|
|
319
|
+
"description": 'Los parámetros <code>attributes</code> nos permiten aplicar atributos de HTML a nuestro componente, como por ejemplo <code>id</code> o etiquetas ARIA como <code>aria-label</code>. Mira el código para ver los atributos aplicados.',
|
|
316
320
|
"data": {
|
|
317
321
|
"idPrefix": "attributes-example",
|
|
318
322
|
"headingLevel": 3,
|
|
@@ -321,22 +325,22 @@
|
|
|
321
325
|
},
|
|
322
326
|
"items": [
|
|
323
327
|
{
|
|
324
|
-
"headerText": "
|
|
325
|
-
"html":
|
|
328
|
+
"headerText": "Item de acordeón 1",
|
|
329
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
326
330
|
"attributes": {
|
|
327
331
|
"data-attr": "accordion-item-test-a"
|
|
328
332
|
}
|
|
329
333
|
},
|
|
330
334
|
{
|
|
331
|
-
"headerText": "
|
|
332
|
-
"html":
|
|
335
|
+
"headerText": "Item de acordeón 2",
|
|
336
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
333
337
|
"attributes": {
|
|
334
338
|
"data-attr": "accordion-item-test-b"
|
|
335
339
|
}
|
|
336
340
|
},
|
|
337
341
|
{
|
|
338
|
-
"headerText": "
|
|
339
|
-
"html":
|
|
342
|
+
"headerText": "Item de acordeón 3",
|
|
343
|
+
"html": '<div class="w-48 p-2"><div class="border-4 border-dashed border-neutral-light rounded-lg h-40"></div></div>',
|
|
340
344
|
"attributes": {
|
|
341
345
|
"data-attr": "accordion-item-test-c"
|
|
342
346
|
}
|