desy-html 11.1.2 → 11.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/docs/ds/_ds.example.botones-primary-lg.njk +265 -0
- package/docs/ds/_ds.example.dropdowns-variaciones.njk +37 -0
- package/docs/ds/_ds.example.listbox-variaciones.njk +137 -0
- package/docs/ds/_ds.example.tabs.njk +44 -0
- package/docs/ds/_ds.example.textos.njk +5 -0
- package/docs/ds/_ds.section.botones.njk +5 -0
- package/docs/ds/_ds.section.textos.njk +11 -1
- package/docs/index.html +9 -0
- package/package.json +2 -2
- package/src/css/component.text.css +34 -26
- package/src/js/aria/linksList.js +42 -0
- package/src/js/aria/treeitem.js +9 -2
- package/src/js/desy-html.js +10 -0
- package/src/js/index.js +2 -0
- package/src/templates/components/button/_examples.button.njk +9 -2
- package/src/templates/components/button/_styles.button.css +7 -0
- package/src/templates/components/button-loader/_examples.button-loader.njk +8 -1
- package/src/templates/components/button-loader/_styles.button-loader.css +6 -0
- package/src/templates/components/dropdown/_examples.dropdown.njk +8 -0
- package/src/templates/components/dropdown/_styles.dropdown.css +7 -0
- package/src/templates/components/links-list/_examples.links-list.njk +28 -5
- package/src/templates/components/links-list/_template.links-list.njk +4 -4
- package/src/templates/components/listbox/_examples.listbox.njk +36 -1
- package/src/templates/components/listbox/_styles.listbox.css +7 -0
- package/src/templates/components/listbox/_template.listbox.njk +2 -2
- package/src/templates/components/menu-navigation/_examples.menu-navigation.njk +87 -3
- package/src/templates/components/menu-navigation/_styles.menu-navigation.css +7 -0
- package/src/templates/components/menubar/_examples.menubar.njk +154 -0
- package/src/templates/components/menubar/_styles.menubar.css +8 -1
- package/src/templates/components/table-advanced/_examples.table-advanced.njk +90 -0
- package/src/templates/components/table-advanced/_template.table-advanced.njk +3 -3
- package/src/templates/components/table-advanced/params.table-advanced.yaml +4 -0
- package/src/templates/components/tabs/_examples.tabs.njk +43 -0
- package/src/templates/components/tabs/_styles.tabs.css +30 -7
- package/src/templates/components/tabs/_template.tabs.njk +1 -1
- package/src/templates/components/tabs/params.tabs.yaml +4 -0
- package/src/templates/components/tree/_examples.tree.njk +113 -0
- package/src/templates/components/tree/_template.tree.njk +2 -2
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
}
|
|
157
157
|
],
|
|
158
158
|
"attributes": {
|
|
159
|
-
"aria-labelledby": "active-sub-item-example-
|
|
159
|
+
"aria-labelledby": "active-sub-item-example-1"
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
},
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
}
|
|
180
180
|
],
|
|
181
181
|
"attributes": {
|
|
182
|
-
"aria-labelledby": "active-sub-item-example-
|
|
182
|
+
"aria-labelledby": "active-sub-item-example-2"
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
},
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
}
|
|
203
203
|
],
|
|
204
204
|
"attributes": {
|
|
205
|
-
"aria-labelledby": "active-sub-item-example-
|
|
205
|
+
"aria-labelledby": "active-sub-item-example-3"
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
}
|
|
@@ -298,6 +298,90 @@
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
},
|
|
301
|
+
{
|
|
302
|
+
"name": "grande",
|
|
303
|
+
"description": "Usando clases para mostrar los items grandes.",
|
|
304
|
+
"data": {
|
|
305
|
+
"idPrefix": "large-example",
|
|
306
|
+
"items": [
|
|
307
|
+
{
|
|
308
|
+
"text": "Item 1",
|
|
309
|
+
"id": "large-example-item-1",
|
|
310
|
+
"classes": "c-menu-navigation__button--lg -mr-sm",
|
|
311
|
+
"sub": {
|
|
312
|
+
"items": [
|
|
313
|
+
{
|
|
314
|
+
"href": "#",
|
|
315
|
+
"text": "Subitem 1"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"href": "#",
|
|
319
|
+
"text": "Subitem 2"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"href": "#",
|
|
323
|
+
"text": "Subitem 3"
|
|
324
|
+
}
|
|
325
|
+
],
|
|
326
|
+
"attributes": {
|
|
327
|
+
"aria-labelledby": "large-example-item-1"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"text": "Item 2",
|
|
333
|
+
"id": "large-example-item-2",
|
|
334
|
+
"classes": "c-menu-navigation__button--lg -mr-sm",
|
|
335
|
+
"sub": {
|
|
336
|
+
"items": [
|
|
337
|
+
{
|
|
338
|
+
"href": "#",
|
|
339
|
+
"text": "Subitem 1"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"href": "#",
|
|
343
|
+
"text": "Subitem 2"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"href": "#",
|
|
347
|
+
"text": "Subitem 3"
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"attributes": {
|
|
351
|
+
"aria-labelledby": "large-example-item-2"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"text": "Item 3",
|
|
357
|
+
"id": "large-example-item-3",
|
|
358
|
+
"classes": "c-menu-navigation__button--lg -mr-sm",
|
|
359
|
+
"sub": {
|
|
360
|
+
"items": [
|
|
361
|
+
{
|
|
362
|
+
"href": "#",
|
|
363
|
+
"text": "Subitem 1"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"href": "#",
|
|
367
|
+
"text": "Subitem 2"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"href": "#",
|
|
371
|
+
"text": "Subitem 3"
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
"attributes": {
|
|
375
|
+
"aria-labelledby": "large-example-item-3"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"attributes": {
|
|
381
|
+
"aria-label": "Menu navigation"
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
301
385
|
{
|
|
302
386
|
"name": "peque",
|
|
303
387
|
"description": "Usando clases para mostrar los items pequeños.",
|
|
@@ -767,6 +767,160 @@
|
|
|
767
767
|
]
|
|
768
768
|
}
|
|
769
769
|
},
|
|
770
|
+
{
|
|
771
|
+
"name": "grande",
|
|
772
|
+
"description": "Usando clases modificadoras en los items.",
|
|
773
|
+
"data": {
|
|
774
|
+
"id": "large-items",
|
|
775
|
+
"idPrefix": "large-example",
|
|
776
|
+
"ariaLabel":"Menubar descrición",
|
|
777
|
+
"items": [
|
|
778
|
+
{
|
|
779
|
+
"text": "Menuitem",
|
|
780
|
+
"ariaLabel": "Menuitem",
|
|
781
|
+
"id": "large-example-item-1",
|
|
782
|
+
"sub": {
|
|
783
|
+
"items": [
|
|
784
|
+
{
|
|
785
|
+
"role": "menuitem",
|
|
786
|
+
"text": "Subitem 1"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"role": "menuitem",
|
|
790
|
+
"text": "Subitem 2"
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
"role": "menuitem",
|
|
794
|
+
"text": "Subitem 3"
|
|
795
|
+
}
|
|
796
|
+
]
|
|
797
|
+
},
|
|
798
|
+
"classes": "c-menubar__button--lg mb-sm mr-sm"
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"text": "Menuitemcheckbox",
|
|
802
|
+
"ariaLabel": "Menuitemcheckbox",
|
|
803
|
+
"id": "large-example-item-2",
|
|
804
|
+
"classes": "c-menubar__button--lg mb-sm mr-sm",
|
|
805
|
+
"sub": {
|
|
806
|
+
"items": [
|
|
807
|
+
{
|
|
808
|
+
"role": "menuitemcheckbox",
|
|
809
|
+
"text": "Subitem 1"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"role": "menuitemcheckbox",
|
|
813
|
+
"text": "Subitem 2",
|
|
814
|
+
"checked": true
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"role": "menuitemcheckbox",
|
|
818
|
+
"text": "Subitem 3"
|
|
819
|
+
}
|
|
820
|
+
]
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"text": "Menuitemradio",
|
|
825
|
+
"ariaLabel": "Menuitemradio",
|
|
826
|
+
"id": "large-example-item-3",
|
|
827
|
+
"sub": {
|
|
828
|
+
"items": [
|
|
829
|
+
{
|
|
830
|
+
"role": "group",
|
|
831
|
+
"ariaLabel": "group label",
|
|
832
|
+
"items": [
|
|
833
|
+
{
|
|
834
|
+
"role": "menuitemradio",
|
|
835
|
+
"text": "Radio 1"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"role": "menuitemradio",
|
|
839
|
+
"text": "Radio 2",
|
|
840
|
+
"checked": true
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"role": "menuitemradio",
|
|
844
|
+
"text": "Radio 3"
|
|
845
|
+
}
|
|
846
|
+
]
|
|
847
|
+
}
|
|
848
|
+
]
|
|
849
|
+
},
|
|
850
|
+
"classes": "c-menubar__button--lg mb-sm mr-sm"
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
"text": "Items mixtos",
|
|
854
|
+
"ariaLabel": "Items mixtos",
|
|
855
|
+
"id": "large-example-item-4",
|
|
856
|
+
"sub": {
|
|
857
|
+
"items": [
|
|
858
|
+
{
|
|
859
|
+
"role": "group",
|
|
860
|
+
"ariaLabel": "Tamaño de letra",
|
|
861
|
+
"items": [
|
|
862
|
+
{
|
|
863
|
+
"role": "menuitem",
|
|
864
|
+
"text": "Tamaño mayor"
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"role": "menuitem",
|
|
868
|
+
"text": "Tamaño menor"
|
|
869
|
+
}
|
|
870
|
+
]
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"role": "separator"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"role": "group",
|
|
877
|
+
"ariaLabel": "Estilo de letra",
|
|
878
|
+
"items": [
|
|
879
|
+
{
|
|
880
|
+
"role": "menuitemcheckbox",
|
|
881
|
+
"text": "Negritas"
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"role": "menuitemcheckbox",
|
|
885
|
+
"text": "Itálicas"
|
|
886
|
+
}
|
|
887
|
+
]
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"role": "separator"
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"role": "group",
|
|
894
|
+
"ariaLabel": "Estilo de texto",
|
|
895
|
+
"items": [
|
|
896
|
+
{
|
|
897
|
+
"role": "menuitemradio",
|
|
898
|
+
"text": "Ninguno"
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
"role": "menuitemradio",
|
|
902
|
+
"text": "Tachado"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"role": "menuitemradio",
|
|
906
|
+
"text": "Subrayado"
|
|
907
|
+
}
|
|
908
|
+
]
|
|
909
|
+
}
|
|
910
|
+
]
|
|
911
|
+
},
|
|
912
|
+
"classes": "c-menubar__button--lg mb-sm mr-sm"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"text": "Menuitem solo",
|
|
916
|
+
"ariaLabel": "Menuitem solo",
|
|
917
|
+
"id": "large-example-item-6",
|
|
918
|
+
"classes": "c-menubar__button--transparent c-menubar__button--lg mb-sm mr-sm",
|
|
919
|
+
"href": "#"
|
|
920
|
+
}
|
|
921
|
+
]
|
|
922
|
+
}
|
|
923
|
+
},
|
|
770
924
|
{
|
|
771
925
|
"name": "peque",
|
|
772
926
|
"description": "Usando clases modificadoras en los items.",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
|
|
74
74
|
.c-menubar__tooltip {
|
|
75
75
|
@apply hidden;
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
[role="menuitem"],
|
|
78
78
|
[role="menuitemcheckbox"],
|
|
79
79
|
[role="menuitemradio"] {
|
|
@@ -138,6 +138,13 @@
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
|
|
141
|
+
.c-menubar__button--lg {
|
|
142
|
+
@apply px-4;
|
|
143
|
+
@apply py-3;
|
|
144
|
+
@apply text-lg;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
141
148
|
.c-menubar__button--sm {
|
|
142
149
|
@apply px-2;
|
|
143
150
|
@apply py-1;
|
|
@@ -353,6 +353,96 @@
|
|
|
353
353
|
"classes": "min-w-full"
|
|
354
354
|
}
|
|
355
355
|
},
|
|
356
|
+
{
|
|
357
|
+
"name": "tabla con head y filtros con texto personalizado",
|
|
358
|
+
"description": 'Con <code>"hasFilter": true</code>, con parámetro <code>"filterText"</code> personalizado y clases <code>text-right</code> en columnas numéricas.',
|
|
359
|
+
"data": {
|
|
360
|
+
"idPrefix": "table-with-head-and-filters-personalized",
|
|
361
|
+
"head": [
|
|
362
|
+
{
|
|
363
|
+
"text": "Mes de pago",
|
|
364
|
+
"select": {
|
|
365
|
+
"items": [
|
|
366
|
+
{
|
|
367
|
+
"value": "",
|
|
368
|
+
"text": "Selecciona mes...",
|
|
369
|
+
"disabled": true,
|
|
370
|
+
"selected": true,
|
|
371
|
+
"hidden": true
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"value": 1,
|
|
375
|
+
"text": "Enero"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"value": 2,
|
|
379
|
+
"text": "Febrero"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"value": 3,
|
|
383
|
+
"text": "Marzo"
|
|
384
|
+
}
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
"filterText": "Filtrar por mes"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"text": "Primer pago",
|
|
391
|
+
"classes": "text-right",
|
|
392
|
+
"hasFilter": true,
|
|
393
|
+
"filterText": "Filtrar por pago en esta columna"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"text": "Segundo pago",
|
|
397
|
+
"classes": "text-right",
|
|
398
|
+
"hasFilter": true,
|
|
399
|
+
"filterText": "Filtrar por pago en esta columna"
|
|
400
|
+
}
|
|
401
|
+
],
|
|
402
|
+
"rows": [
|
|
403
|
+
[
|
|
404
|
+
{
|
|
405
|
+
"text": "Enero"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"text": "85€",
|
|
409
|
+
"classes": "text-right"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"text": "95€",
|
|
413
|
+
"classes": "text-right"
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
[
|
|
417
|
+
{
|
|
418
|
+
"text": "Febrero"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"text": "75€",
|
|
422
|
+
"classes": "text-right"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"text": "55€",
|
|
426
|
+
"classes": "text-right"
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
[
|
|
430
|
+
{
|
|
431
|
+
"text": "Marzo"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"text": "165€",
|
|
435
|
+
"classes": "text-right"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"text": "125€",
|
|
439
|
+
"classes": "text-right"
|
|
440
|
+
}
|
|
441
|
+
]
|
|
442
|
+
],
|
|
443
|
+
"classes": "min-w-full"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
356
446
|
{
|
|
357
447
|
"name": "tabla con head y selectores",
|
|
358
448
|
"description": 'Selectores y clases de <code>text-right</code> en columnas numéricas.',
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"classes": "-mt-sm mb-0"
|
|
77
77
|
},
|
|
78
78
|
"label": {
|
|
79
|
-
"text": "Filtrar
|
|
79
|
+
"text": item.filterText if item.filterText else "Filtrar en esta columna",
|
|
80
80
|
"classes": "sr-only"
|
|
81
81
|
},
|
|
82
82
|
"id": item.select.id if item.select.id else idSelect,
|
|
@@ -97,12 +97,12 @@
|
|
|
97
97
|
"classes": "mb-0"
|
|
98
98
|
},
|
|
99
99
|
"label": {
|
|
100
|
-
"text": "
|
|
100
|
+
"text": item.filterText if item.filterText else "Filtrar en esta columna",
|
|
101
101
|
"classes": "sr-only"
|
|
102
102
|
},
|
|
103
103
|
"id": idFilter,
|
|
104
104
|
"name": idFilter,
|
|
105
|
-
"placeholder": "
|
|
105
|
+
"placeholder": item.filterText if item.filterText else "Filtrar",
|
|
106
106
|
"classes": "c-input--sm " + item.filterClasses if item.filterClasses else "c-input--sm",
|
|
107
107
|
"buttonClasses": "m-xs p-0.5 text-xs",
|
|
108
108
|
"attributes": {
|
|
@@ -57,6 +57,10 @@ params:
|
|
|
57
57
|
type: boolean
|
|
58
58
|
required: false
|
|
59
59
|
description: If `true`, shows a filter input in head cell.
|
|
60
|
+
- name: filterText
|
|
61
|
+
type: string
|
|
62
|
+
required: false
|
|
63
|
+
description: Text for sr-only labels and placeholder for filter input in head cell.
|
|
60
64
|
- name: filterClasses
|
|
61
65
|
type: string
|
|
62
66
|
required: false
|
|
@@ -409,6 +409,49 @@
|
|
|
409
409
|
}
|
|
410
410
|
]
|
|
411
411
|
}
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "Con aspecto de Links list",
|
|
415
|
+
"description": 'Usa la clase <code>.tabs--reset</code> para quitar los estilos por defecto de los tabs. Luego añade una clase modificadora propia de tu proyecto, o bien, esta de este ejemplo llamada <code>.tabs--list</code> para dar estilo a los elementos. Añade estilos adicionales con los parámetros <code>tablistClasses</code> y <code>panel.classes</code> para posicionar y tener mayor control del estilo de los elementos.',
|
|
416
|
+
"data": {
|
|
417
|
+
"tablistClasses": "flex flex-col col-span-2 lg:col-span-1 lg:divide-y lg:divide-neutral-base mb-base lg:mb-0",
|
|
418
|
+
"tablistAriaLabel": "Ejemplo de tab con aspecto de links list dispuesto en horizontal",
|
|
419
|
+
"idPrefix": "tab-links-list",
|
|
420
|
+
"items": [
|
|
421
|
+
{
|
|
422
|
+
"html": '<div class="flex gap-base justify-between items-center flex-1 c-link">Tab 1</div><div class="self-center h-full text-primary-base"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" class="hidden lg:block self-center" aria-hidden="true" focusable="false" width="1em" height="1em"><path d="M102.07 27.93l35 35a10 10 0 010 14.14l-35 35a10 10 0 01-14.14-14.14l13.66-13.66A2.5 2.5 0 0099.82 80H10a10 10 0 010-20h89.82a2.5 2.5 0 001.77-4.27L87.93 42.07a10 10 0 0114.14-14.14z" fill="currentColor"></path></svg></div>',
|
|
423
|
+
"panel": {
|
|
424
|
+
"html": "<p><strong>Panel 1</strong>. Lorem ipsum dolor sit, amet, consectetur adipisicing elit. Est quis exercitationem, nesciunt nulla quisquam temporibus. Provident animi dolor veniam, et quas consequuntur. Reiciendis eius in, nostrum porro? Quaerat, temporibus, optio?</p>",
|
|
425
|
+
"classes": "col-span-2 lg:col-span-2 lg:p-base focus:outline-none focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base"
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"html": '<div class="flex gap-base justify-between items-center flex-1 c-link">Tab 2</div><div class="self-center h-full text-primary-base"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" class="hidden lg:block self-center" aria-hidden="true" focusable="false" width="1em" height="1em"><path d="M102.07 27.93l35 35a10 10 0 010 14.14l-35 35a10 10 0 01-14.14-14.14l13.66-13.66A2.5 2.5 0 0099.82 80H10a10 10 0 010-20h89.82a2.5 2.5 0 001.77-4.27L87.93 42.07a10 10 0 0114.14-14.14z" fill="currentColor"></path></svg></div>',
|
|
430
|
+
"panel": {
|
|
431
|
+
"html": "<p><strong>Panel 2</strong>. Est quis exercitationem, nesciunt nulla quisquam temporibus. Provident animi dolor veniam, et quas consequuntur. Reiciendis eius in, nostrum porro? Quaerat, temporibus, optio? Lorem ipsum dolor sit, amet, consectetur adipisicing elit. Est quis exercitationem, nesciunt nulla quisquam temporibus. Provident animi dolor veniam, et quas consequuntur.</p>",
|
|
432
|
+
"classes": "col-span-2 lg:col-span-2 lg:p-base focus:outline-none focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base"
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"html": '<div class="flex gap-base justify-between items-center flex-1 c-link">Tab 3</div><div class="self-center h-full text-primary-base"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" class="hidden lg:block self-center" aria-hidden="true" focusable="false" width="1em" height="1em"><path d="M102.07 27.93l35 35a10 10 0 010 14.14l-35 35a10 10 0 01-14.14-14.14l13.66-13.66A2.5 2.5 0 0099.82 80H10a10 10 0 010-20h89.82a2.5 2.5 0 001.77-4.27L87.93 42.07a10 10 0 0114.14-14.14z" fill="currentColor"></path></svg></div>',
|
|
437
|
+
"panel": {
|
|
438
|
+
"html": "<p><strong>Panel 3</strong>. Provident animi dolor veniam, et quas consequuntur. Reiciendis eius in, nostrum porro? Quaerat, temporibus, optio? Lorem ipsum dolor sit, amet, consectetur adipisicing elit. Est quis exercitationem, nesciunt nulla quisquam temporibus. Provident animi dolor veniam, et quas consequuntur.</p>",
|
|
439
|
+
"classes": "col-span-2 lg:col-span-2 lg:p-base focus:outline-none focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base"
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"html": '<div class="flex gap-base justify-between items-center flex-1 c-link">Tab 4</div><div class="self-center h-full text-primary-base"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" class="hidden lg:block self-center" aria-hidden="true" focusable="false" width="1em" height="1em"><path d="M102.07 27.93l35 35a10 10 0 010 14.14l-35 35a10 10 0 01-14.14-14.14l13.66-13.66A2.5 2.5 0 0099.82 80H10a10 10 0 010-20h89.82a2.5 2.5 0 001.77-4.27L87.93 42.07a10 10 0 0114.14-14.14z" fill="currentColor"></path></svg></div>',
|
|
444
|
+
"panel": {
|
|
445
|
+
"html": "<p><strong>Panel 4</strong>. Reiciendis eius in, nostrum porro? Quaerat, temporibus, optio? Lorem ipsum dolor sit, amet, consectetur adipisicing elit. Est quis exercitationem, nesciunt nulla quisquam temporibus. Provident animi dolor veniam, et quas consequuntur.</p>",
|
|
446
|
+
"classes": "col-span-2 lg:col-span-2 lg:p-base focus:outline-none focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base"
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
"classes": "c-tabs--reset c-tabs--list grid grid-cols-2 lg:grid-cols-4 lg:gap-lg",
|
|
451
|
+
"attributes": {
|
|
452
|
+
"id": "tabs-list"
|
|
453
|
+
}
|
|
454
|
+
}
|
|
412
455
|
},
|
|
413
456
|
{
|
|
414
457
|
"name": "con ids individuales",
|
|
@@ -3,31 +3,31 @@
|
|
|
3
3
|
========================================================================== */
|
|
4
4
|
|
|
5
5
|
@layer components {
|
|
6
|
-
.c-tabs__heading {
|
|
6
|
+
.c-tabs:not(.c-tabs--reset) .c-tabs__heading {
|
|
7
7
|
@apply lg:sr-only mb-sm text-sm;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.c-tabs__tabs {
|
|
10
|
+
.c-tabs:not(.c-tabs--reset) .c-tabs__tabs {
|
|
11
11
|
@apply lg:relative lg:w-full lg:flex lg:snap-x lg:overflow-x-auto lg:-mb-0.5;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.c-tabs__link {
|
|
14
|
+
.c-tabs:not(.c-tabs--reset) .c-tabs__link {
|
|
15
15
|
@apply relative flex-none flex items-center py-sm lg:px-base lg:py-base border text-black hover:text-primary-base underline truncate focus:outline-none border-transparent lg:snap-start;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.c-tabs__link--is-active {
|
|
18
|
+
.c-tabs:not(.c-tabs--reset) .c-tabs__link--is-active {
|
|
19
19
|
@apply lg:bg-white lg:border-neutral-base lg:border-b-0 lg:rounded-t no-underline;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.c-tabs__panel {
|
|
22
|
+
.c-tabs:not(.c-tabs--reset) .c-tabs__panel {
|
|
23
23
|
@apply p-base mt-base lg:mt-px border border-neutral-base focus:outline-none focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.c-tabs__panel-heading {
|
|
26
|
+
.c-tabs:not(.c-tabs--reset) .c-tabs__panel-heading {
|
|
27
27
|
@apply lg:sr-only;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.c-tabs--scroll {
|
|
30
|
+
.c-tabs:not(.c-tabs--reset) .c-tabs--scroll {
|
|
31
31
|
.c-tabs__heading {
|
|
32
32
|
@apply sr-only;
|
|
33
33
|
}
|
|
@@ -52,4 +52,27 @@
|
|
|
52
52
|
@apply sr-only;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
|
|
56
|
+
.c-tabs--list {
|
|
57
|
+
.c-tabs__heading {
|
|
58
|
+
@apply lg:sr-only mb-sm text-sm;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.c-tabs__link {
|
|
62
|
+
@apply relative lg:px-base focus:outline-none;
|
|
63
|
+
|
|
64
|
+
& > span,
|
|
65
|
+
& > strong {
|
|
66
|
+
@apply flex items-center flex-1 py-sm lg:py-base;
|
|
67
|
+
|
|
68
|
+
& > span {
|
|
69
|
+
@apply w-full;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.c-tabs__panel-heading {
|
|
75
|
+
@apply sr-only;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
55
78
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
{% endif %}
|
|
21
21
|
</div>
|
|
22
22
|
{% if(params.items | length) %}
|
|
23
|
-
<div class="c-tabs__tabs" role="tablist" aria-label="{{ params.tablistAriaLabel }}">
|
|
23
|
+
<div class="c-tabs__tabs {%- if params.tablistClasses %} {{ params.tablistClasses }}{% endif %}" role="tablist" aria-label="{{ params.tablistAriaLabel }}">
|
|
24
24
|
{% for item in params.items %}
|
|
25
25
|
{% if item %}
|
|
26
26
|
{% set id = item.id if item.id else idPrefix + "-" + loop.index %}
|
|
@@ -15,6 +15,10 @@ params:
|
|
|
15
15
|
type: number
|
|
16
16
|
required: false
|
|
17
17
|
description: If headingLevel is 1, the parent heading tag needed inside this component will be a h1, if 2 will be a h2, and so on.
|
|
18
|
+
- name: tablistClasses
|
|
19
|
+
type: string
|
|
20
|
+
required: false
|
|
21
|
+
description: Classes to add to the role=tablist element
|
|
18
22
|
- name: tablistAriaLabel
|
|
19
23
|
type: string
|
|
20
24
|
required: true
|