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.
Files changed (57) hide show
  1. package/docs/_macro.example-render.njk +1 -1
  2. package/docs/index.html +4 -0
  3. package/package.json +1 -1
  4. package/src/templates/components/accordion/_examples.accordion.njk +108 -104
  5. package/src/templates/components/accordion-history/_examples.accordion-history.njk +116 -112
  6. package/src/templates/components/alert/_examples.alert.njk +10 -6
  7. package/src/templates/components/breadcrumbs/_examples.breadcrumbs.njk +52 -52
  8. package/src/templates/components/button/_examples.button.njk +71 -71
  9. package/src/templates/components/button-loader/_examples.button-loader.njk +72 -72
  10. package/src/templates/components/card/_examples.card.njk +43 -43
  11. package/src/templates/components/character-count/_examples.character-count.njk +35 -33
  12. package/src/templates/components/checkboxes/_examples.checkboxes.njk +200 -201
  13. package/src/templates/components/collapsible/_examples.collapsible.njk +24 -9
  14. package/src/templates/components/date-input/_examples.date-input.njk +14 -14
  15. package/src/templates/components/description-list/_examples.description-list.njk +45 -44
  16. package/src/templates/components/details/_examples.details.njk +17 -16
  17. package/src/templates/components/dialog/_examples.dialog.njk +5 -6
  18. package/src/templates/components/dropdown/_examples.dropdown.njk +34 -35
  19. package/src/templates/components/error-message/_examples.error-message.njk +8 -2
  20. package/src/templates/components/error-summary/_examples.error-summary.njk +19 -19
  21. package/src/templates/components/fieldset/_examples.fieldset.njk +27 -25
  22. package/src/templates/components/file-upload/_examples.file-upload.njk +7 -7
  23. package/src/templates/components/footer/_examples.footer.njk +24 -24
  24. package/src/templates/components/header/_examples.header.njk +12 -12
  25. package/src/templates/components/header-mini/_examples.header-mini.njk +5 -5
  26. package/src/templates/components/hint/_examples.hint.njk +4 -4
  27. package/src/templates/components/input/_examples.input.njk +66 -64
  28. package/src/templates/components/input-group/_examples.input-group.njk +15 -17
  29. package/src/templates/components/item/_examples.item.njk +21 -20
  30. package/src/templates/components/label/_examples.label.njk +11 -9
  31. package/src/templates/components/links-list/_examples.links-list.njk +34 -34
  32. package/src/templates/components/listbox/_examples.listbox.njk +146 -146
  33. package/src/templates/components/media-object/_examples.media-object.njk +7 -7
  34. package/src/templates/components/menu-horizontal/_examples.menu-horizontal.njk +54 -54
  35. package/src/templates/components/menu-navigation/_examples.menu-navigation.njk +65 -66
  36. package/src/templates/components/menu-vertical/_examples.menu-vertical.njk +71 -71
  37. package/src/templates/components/menubar/_examples.menubar.njk +42 -42
  38. package/src/templates/components/modal/_examples.modal.njk +21 -15
  39. package/src/templates/components/modal/_template.modal.njk +5 -5
  40. package/src/templates/components/nav/_examples.nav.njk +66 -66
  41. package/src/templates/components/notification/_examples.notification.njk +14 -13
  42. package/src/templates/components/pagination/_examples.pagination.njk +7 -6
  43. package/src/templates/components/pill/_examples.pill.njk +29 -29
  44. package/src/templates/components/radios/_examples.radios.njk +153 -142
  45. package/src/templates/components/searchbar/_examples.searchbar.njk +11 -11
  46. package/src/templates/components/select/_examples.select.njk +63 -63
  47. package/src/templates/components/skip-link/_examples.skip-link.njk +4 -4
  48. package/src/templates/components/spinner/_examples.spinner.njk +11 -11
  49. package/src/templates/components/status/_examples.status.njk +4 -4
  50. package/src/templates/components/status-item/_examples.status-item.njk +21 -21
  51. package/src/templates/components/table/_examples.table.njk +58 -56
  52. package/src/templates/components/table-advanced/_examples.table-advanced.njk +83 -83
  53. package/src/templates/components/tabs/_examples.tabs.njk +30 -29
  54. package/src/templates/components/textarea/_examples.textarea.njk +28 -27
  55. package/src/templates/components/toggle/_examples.toggle.njk +10 -11
  56. package/src/templates/components/tooltip/_examples.tooltip.njk +9 -9
  57. 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.1",
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": "default",
5
- "description": "Assumes allowMultiple and allowToggle are both false",
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": "Accordion Item 1",
12
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 2",
16
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 3",
20
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Allow multiple",
27
- "description": "allowMultiple = true. Assumes allowToggle is true",
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": "Accordion Item 1",
35
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 2",
39
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 3",
43
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Allow toggle",
50
- "description": "allowToggle = true. Assumes allowMultiple is false",
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": "Accordion Item 1",
58
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 2",
62
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 3",
66
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "With one item opened",
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": "Accordion Item 1",
80
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 2",
84
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "Accordion Item 3",
89
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "With 2 items opened",
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": "Accordion Item 1",
103
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "Accordion Item 2",
108
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 3",
112
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "disabled and allowToggle and allowMultiple",
120
- "description": "will hide the show/hide info and disable click in items",
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": "Accordion Item not disabled",
129
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item disabled",
133
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "Accordion Item disabled and open",
138
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "With heading",
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>&lt;h3&gt;</code>.',
147
150
  "data": {
148
151
  "idPrefix": "heading-example",
149
152
  "headingLevel": 3,
150
153
  "heading": {
151
- "text": "Accordion example"
154
+ "text": "Encabezado de acordeón"
152
155
  },
153
156
  "items": [
154
157
  {
155
- "headerText": "Accordion Item 1",
156
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 2",
160
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 3",
164
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "With heading level 4",
171
- "description": "headingLevel is 4 in this example. The headings in this component start with h4 in this example. h4 for the heading and h5 inside the buttons.",
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>&lt;h4&gt;</code> y los botones interiores tendrán los siguientes niveles de encabezado para conservar la jerarquía de encabezados correspondiente: en este caso <code>&lt;h5&gt;</code>.',
172
175
  "data": {
173
176
  "idPrefix": "accordion-heading-level-example",
174
177
  "headingLevel": 4,
175
178
  "heading": {
176
- "text": "This header starts with h4"
179
+ "text": "Este encabezado con <h4>"
177
180
  },
178
181
  "items": [
179
182
  {
180
- "headerText": "This is Item 1 with h5",
181
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "This is Item 2 with h5",
185
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "This is Item 3 with h5",
189
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "With heading and show controls",
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": "Accordion example"
204
+ "text": "Encabezado de acordeón"
201
205
  },
202
206
  "showControl": true,
203
207
  "allowMultiple": true,
204
208
  "items": [
205
209
  {
206
- "headerText": "Accordion Item 1",
207
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 2",
211
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "Accordion Item 3",
216
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "with custom show/hide info",
223
- "description": "The last item has empty strings to don't show any info",
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": "Accordion Item 1",
231
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "Accordion Item 2",
241
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "Accordion Item 3",
251
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "with html in headers",
264
- "description": "To avoid event problems, use pointer-events-none class in subelements",
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">Accordion Item 1</span><span class="block pointer-events-none font-normal">Subelement also receives events</span>',
271
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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">Accordion Item 2</span><span class="block pointer-events-none font-normal">Subelement also receives events</span>',
275
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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">Accordion Item 3</span><span class="block pointer-events-none font-normal">Subelement also receives events</span>',
279
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "With classes applied",
286
- "description": "Show code to display the classes applied in html",
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": "Accordion Item 1",
298
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "Accordion Item 2",
302
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
303
- "classes": "py-sm bg-neutral-light border border-neutral-base rounded-lg",
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": "Accordion Item 3",
308
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>"
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": "With attributes applied",
315
- "description": "Show code to display the attributes applied in html",
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": "Accordion Item 1",
325
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "Accordion Item 2",
332
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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": "Accordion Item 3",
339
- "html": "<div class=\" w-48 p-2 \"><div class=\" border-4 border-dashed border-gray-200 rounded-lg h-40 \"></div></div>",
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
  }