desy-html 7.1.1 → 7.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/_global.foot.njk +9 -9
- package/docs/_global.head.njk +1 -1
- package/docs/_macro.example-render.njk +177 -147
- package/docs/_macro.render-caller.njk +1 -1
- package/docs/ds/_ds.example.border.njk +1 -1
- package/docs/ds/_ds.example.color-de-interaccion.njk +5 -5
- package/docs/ds/_ds.example.colores-cabecera.njk +7 -7
- package/docs/ds/_ds.example.colores-de-soporte.njk +72 -5
- package/docs/ds/_ds.example.colores-neutros.njk +12 -12
- package/docs/ds/_ds.example.layout.njk +2 -2
- package/docs/ds/_ds.example.typography.njk +1 -1
- package/docs/ds/_ds.macro.code-snippet.njk +28 -9
- package/docs/ds/_ds.section.color.njk +7 -65
- package/docs/ds/_ds.section.espaciado.njk +4 -295
- package/docs/ds/_ds.section.layout.njk +5 -5
- package/docs/ds/_ds.section.textos.njk +40 -50
- package/docs/ds/_ds.section.typography.njk +239 -236
- package/docs/index.html +12 -0
- package/package.json +1 -1
- package/src/css/component.text.css +11 -0
- package/src/js/aria/dataGrid.js +21 -6
- package/src/js/index.js +0 -7
- package/src/js/popper.min.js +6 -0
- package/src/js/prism/clipboard.min.js +7 -0
- package/src/js/prism/prism-copy-to-clipboard.min.js +1 -0
- package/src/js/prism/prism-normalize-whitespace.min.js +1 -0
- package/src/js/prism/prism-toolbar.min.js +1 -0
- package/src/js/prism/prism-twig.min.js +1 -0
- package/src/js/prism/prism-yaml.min.js +1 -0
- package/src/js/prism/prism.min.js +1 -0
- package/src/js/tippy-bundle.umd.min.js +2 -0
- package/src/templates/components/accordion/_template.accordion.njk +95 -84
- package/src/templates/components/accordion-history/_template.accordion-history.njk +134 -123
- package/src/templates/components/alert/_template.alert.njk +6 -6
- package/src/templates/components/breadcrumbs/_template.breadcrumbs.njk +15 -30
- package/src/templates/components/button/_template.button.njk +4 -0
- package/src/templates/components/button-loader/_template.button-loader.njk +11 -7
- package/src/templates/components/card/_examples.card.njk +76 -76
- package/src/templates/components/card/_template.card.njk +14 -14
- package/src/templates/components/character-count/_template.character-count.njk +3 -6
- package/src/templates/components/checkboxes/_examples.checkboxes.njk +49 -10
- package/src/templates/components/checkboxes/_template.checkboxes.njk +17 -11
- package/src/templates/components/collapsible/_template.collapsible.njk +4 -4
- package/src/templates/components/date-input/_template.date-input.njk +46 -40
- package/src/templates/components/dialog/_template.dialog.njk +2 -2
- package/src/templates/components/error-message/_template.error-message.njk +3 -3
- package/src/templates/components/error-summary/_template.error-summary.njk +18 -6
- package/src/templates/components/fieldset/_examples.fieldset.njk +32 -6
- package/src/templates/components/fieldset/_template.fieldset.njk +28 -16
- package/src/templates/components/footer/_examples.footer.njk +14 -9
- package/src/templates/components/footer/_template.footer.njk +62 -66
- package/src/templates/components/footer/params.footer.yaml +4 -26
- package/src/templates/components/header/_examples.header.njk +6 -4
- package/src/templates/components/header/_template.header.header__dropdown.njk +27 -22
- package/src/templates/components/header/_template.header.header__navigation.njk +4 -1
- package/src/templates/components/header/_template.header.header__offcanvas.njk +18 -16
- package/src/templates/components/header/_template.header.header__offcanvasButton.njk +2 -1
- package/src/templates/components/header/_template.header.header__subnav.njk +33 -29
- package/src/templates/components/header/_template.header.njk +70 -60
- package/src/templates/components/header-advanced/_examples.header-advanced.njk +46 -32
- package/src/templates/components/header-advanced/_template.header-advanced.njk +93 -90
- package/src/templates/components/header-mini/_examples.header-mini.njk +1 -1
- package/src/templates/components/hint/_examples.hint.njk +2 -2
- package/src/templates/components/hint/_template.hint.njk +1 -3
- package/src/templates/components/input-group/_template.input-group.njk +72 -68
- package/src/templates/components/item/_template.item.njk +23 -23
- package/src/templates/components/label/_template.label.njk +25 -14
- package/src/templates/components/links-list/_examples.links-list.njk +10 -12
- package/src/templates/components/links-list/_template.links-list.njk +35 -37
- package/src/templates/components/listbox/_template.listbox.njk +11 -11
- package/src/templates/components/menu-navigation/_template.menu-navigation.njk +62 -63
- package/src/templates/components/menu-vertical/_template.menu-vertical.njk +41 -41
- package/src/templates/components/menubar/_template.menubar.njk +91 -91
- package/src/templates/components/modal/_template.modal.njk +63 -53
- package/src/templates/components/nav/_template.nav.njk +13 -13
- package/src/templates/components/notification/_examples.notification.njk +0 -9
- package/src/templates/components/notification/_template.notification.njk +54 -44
- package/src/templates/components/pagination/_template.pagination.njk +37 -42
- package/src/templates/components/radios/_examples.radios.njk +49 -12
- package/src/templates/components/radios/_template.radios.njk +90 -84
- package/src/templates/components/searchbar/_template.searchbar.njk +6 -6
- package/src/templates/components/select/_template.select.njk +12 -12
- package/src/templates/components/status-item/_template.status-item.njk +23 -25
- package/src/templates/components/table/_template.table.njk +4 -4
- package/src/templates/components/table-advanced/_examples.table-advanced.njk +9 -9
- package/src/templates/components/table-advanced/_styles.table-advanced.css +3 -3
- package/src/templates/components/table-advanced/_template.table-advanced.njk +85 -83
- package/src/templates/components/tabs/_template.tabs.njk +39 -39
- package/src/templates/components/toggle/_template.toggle.njk +1 -2
- package/src/templates/components/tooltip/_template.tooltip.njk +19 -19
- package/src/templates/components/tree/_template.tree.njk +46 -42
|
@@ -3,92 +3,92 @@
|
|
|
3
3
|
{% from "components/button/_macro.button.njk" import componentButton %}
|
|
4
4
|
|
|
5
5
|
{% set defaultContent %}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
<h3 class="c-h3"><a href="#" class="c-link">Título card</a></h3>
|
|
7
|
+
<div class="prose max-w-none">
|
|
8
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
|
|
9
|
+
</div>
|
|
10
10
|
{% endset %}
|
|
11
11
|
|
|
12
12
|
{% set linksContent %}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
<h2 class="c-h1">Tus datos médicos e información personal</h2>
|
|
14
|
+
<ul class="text-lg">
|
|
15
|
+
<li class="mb-base"><a href="#" class="c-link">Cambiar tus datos de contacto</a></li>
|
|
16
|
+
<li class="mb-base"><a href="#" class="c-link">Dónde y cómo solicitar tu PIN Salud</a></li>
|
|
17
|
+
<li class="mb-base"><a href="#" class="c-link">Cómo solicitar un cambio de centro de salud</a></li>
|
|
18
|
+
<li class="mb-base"><a href="#" class="c-link">Historia Clínica e informes médicos</a></li>
|
|
19
|
+
<li class="mb-base"><a href="#" class="c-link">Derechos de protección de datos</a></li>
|
|
20
|
+
</ul>
|
|
21
21
|
{% endset %}
|
|
22
22
|
|
|
23
23
|
{% set verButton %}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
{{ componentButton({
|
|
25
|
+
"html": "Más <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" class=\"self-center ml-2\" 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>",
|
|
26
|
+
"classes": "c-button--transparent",
|
|
27
|
+
"href": "#",
|
|
28
|
+
"attributes": {
|
|
29
|
+
"id": "boton-card-1",
|
|
30
|
+
"aria-labelledby": "boton-card-1 titulo-card-1"
|
|
31
|
+
}
|
|
32
|
+
}) }}
|
|
33
33
|
{% endset %}
|
|
34
34
|
|
|
35
35
|
{% set verDetalleButton %}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
{{ componentButton({
|
|
37
|
+
"html": "Ver detalle <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" class=\"self-center ml-2\" 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>",
|
|
38
|
+
"classes": "c-button--transparent",
|
|
39
|
+
"href": "#",
|
|
40
|
+
"attributes": {
|
|
41
|
+
"id": "boton-card-1",
|
|
42
|
+
"aria-labelledby": "boton-card-1 titulo-card-1"
|
|
43
|
+
}
|
|
44
|
+
}) }}
|
|
45
45
|
{% endset %}
|
|
46
46
|
|
|
47
47
|
{% set withIconContent %}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-6 h-6 lg:w-9 lg:h-9 mt-base mb-lg" aria-hidden="true" focusable="false"><g transform="scale(2)"><path d="M21.71 5.71 16.29.29a1 1 0 0 0-.7-.29H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.41a1 1 0 0 0-.29-.7ZM20 21.5a.5.5 0 0 1-.5.5h-15a.5.5 0 0 1-.5-.5v-19a.5.5 0 0 1 .5-.5h10.25a.25.25 0 0 1 .25.25V5a2 2 0 0 0 2 2h2.75a.25.25 0 0 1 .25.25Z" fill="currentColor"></path><rect x="6.5" y="10.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="14" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="17.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="10.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="14" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="17.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect></g></svg>
|
|
49
|
+
<h3 id="titulo-card-1" class="c-h3">Título card</h3>
|
|
50
|
+
<div class="prose max-w-none mb-base">
|
|
51
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
|
|
52
|
+
</div>
|
|
53
|
+
{{ verButton | safe }}
|
|
54
54
|
{% endset %}
|
|
55
55
|
|
|
56
56
|
{% set withButton %}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
<h3 id="titulo-card-1" class="c-h3">Título card</h3>
|
|
58
|
+
<div class="prose max-w-none mb-base">
|
|
59
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
|
|
60
|
+
</div>
|
|
61
|
+
{{ verButton | safe }}
|
|
62
62
|
{% endset %}
|
|
63
63
|
|
|
64
64
|
{% set areaPersonalContent %}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
65
|
+
<h2 class="c-h1"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="inline-block align-middle lg:w-9 lg:h-9 mr-base" aria-hidden="true" focusable="false"><g transform="scale(2)"><path d="M21.71 5.71 16.29.29a1 1 0 0 0-.7-.29H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.41a1 1 0 0 0-.29-.7ZM20 21.5a.5.5 0 0 1-.5.5h-15a.5.5 0 0 1-.5-.5v-19a.5.5 0 0 1 .5-.5h10.25a.25.25 0 0 1 .25.25V5a2 2 0 0 0 2 2h2.75a.25.25 0 0 1 .25.25Z" fill="currentColor"></path><rect x="6.5" y="10.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="14" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="6.5" y="17.5" width="3" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="10.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="14" width="6.5" height="2" rx=".5" fill="currentColor"></rect><rect x="11" y="17.5" width="6.5" height="2" rx=".5" fill="currentColor"></rect></g></svg>Tu área personal</h2>
|
|
66
|
+
<p class="c-paragraph-base mb-lg">En tu área personal puedes pedir cita con tu médico/a, consultar tu historia clínica y encontrar una selección de contenidos y servicios de salud para ti. Accede de forma segura desde cualquier lugar y en cualquier momento, desde tu móvil u ordenador.</p>
|
|
67
|
+
<ul class="flex flex-wrap gap-base">
|
|
68
|
+
<li>
|
|
69
|
+
{{ componentButton({
|
|
70
|
+
"text": "Acceder a Tu área personal",
|
|
71
|
+
"classes": "c-button--primary"
|
|
72
|
+
}) }}
|
|
73
|
+
</li>
|
|
74
|
+
<li>
|
|
75
|
+
{{ componentButton({
|
|
76
|
+
"text": "Descargar la app"
|
|
77
|
+
}) }}
|
|
78
|
+
</li>
|
|
79
|
+
</ul>
|
|
80
80
|
{% endset %}
|
|
81
81
|
|
|
82
82
|
{% set postContent %}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
83
|
+
<p class="c-paragraph-sm mb-base">
|
|
84
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="1em" width="1em" class="inline-block align-middle w-6 h-6 mr-xs"><g><path d="M7.5,10.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M12.5,10.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M17.5,10.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M7.5,14.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M12.5,14.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M17.5,14.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M7.5,18.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M12.5,18.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M17.5,18.5h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Z" fill="currentColor"></path><path d="M21.5,3H18.75a.25.25,0,0,1-.25-.25V1a1,1,0,0,0-2,0V5.75a.75.75,0,0,1-1.5,0V3.5a.5.5,0,0,0-.5-.5H8.25A.25.25,0,0,1,8,2.75V1A1,1,0,0,0,6,1V5.75a.75.75,0,0,1-1.5,0V3.5A.5.5,0,0,0,4,3H2.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h19a2,2,0,0,0,2-2V5A2,2,0,0,0,21.5,3Zm0,18.5a.5.5,0,0,1-.5.5H3a.5.5,0,0,1-.5-.5V9.5A.5.5,0,0,1,3,9H21a.5.5,0,0,1,.5.5Z" fill="currentColor"></path></g></svg>
|
|
85
|
+
<strong>18 octubre 2022</strong>
|
|
86
|
+
</p>
|
|
87
|
+
<h3 id="titulo-card-1" class="c-h3">Título de noticia</h3>
|
|
88
|
+
<div class="prose max-w-none mb-base">
|
|
89
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit mollitia non deleniti illum iure pariatur vel eligendi praesentium in. Velit amet distinctio minima libero dolorem tempora non aliquid? Corporis.</p>
|
|
90
|
+
</div>
|
|
91
|
+
{{ verDetalleButton | safe }}
|
|
92
92
|
{% endset %}
|
|
93
93
|
|
|
94
94
|
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"data": {
|
|
100
100
|
"classes": "lg:w-1/3",
|
|
101
101
|
"containerClasses": "p-base border border-neutral-base rounded",
|
|
102
|
-
"caller": defaultContent
|
|
102
|
+
"caller": defaultContent | indent(4)
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
{
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"data": {
|
|
108
108
|
"classes": "lg:w-1/3",
|
|
109
109
|
"containerClasses": "p-base border border-neutral-base rounded",
|
|
110
|
-
"caller": withIconContent
|
|
110
|
+
"caller": withIconContent | indent(4)
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
{
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"data": {
|
|
116
116
|
"classes": "lg:w-1/3",
|
|
117
117
|
"containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
118
|
-
"caller": withButton
|
|
118
|
+
"caller": withButton | indent(4)
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
{
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"data": {
|
|
124
124
|
"classes": "lg:w-1/3",
|
|
125
125
|
"containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
126
|
-
"caller": withButton,
|
|
126
|
+
"caller": withButton | indent(4),
|
|
127
127
|
"super": {
|
|
128
128
|
"backgroundFullColor": "transparent",
|
|
129
129
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"data": {
|
|
141
141
|
"classes": "lg:w-1/3",
|
|
142
142
|
"containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
143
|
-
"caller": withButton,
|
|
143
|
+
"caller": withButton | indent(4),
|
|
144
144
|
"sub": {
|
|
145
145
|
"backgroundFullColor": "transparent",
|
|
146
146
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"data": {
|
|
159
159
|
"classes": "lg:w-2/3",
|
|
160
160
|
"containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
161
|
-
"caller": withButton,
|
|
161
|
+
"caller": withButton | indent(4),
|
|
162
162
|
"super": {
|
|
163
163
|
"backgroundFullColor": "transparent",
|
|
164
164
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"data": {
|
|
186
186
|
"classes": "lg:w-2/3",
|
|
187
187
|
"containerClasses": "p-base bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
188
|
-
"caller": withButton,
|
|
188
|
+
"caller": withButton | indent(4),
|
|
189
189
|
"super": {
|
|
190
190
|
"backgroundFullColor": "transparent",
|
|
191
191
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
@@ -211,14 +211,14 @@
|
|
|
211
211
|
"data": {
|
|
212
212
|
"classes": "lg:w-1/2",
|
|
213
213
|
"containerClasses": "py-lg border-t-8 border-neutral-dark",
|
|
214
|
-
"caller": linksContent
|
|
214
|
+
"caller": linksContent | indent(4)
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
"name": "home block with buttons",
|
|
219
219
|
"data": {
|
|
220
220
|
"containerClasses": "p-lg bg-neutral-lighter border-t-8 border-neutral-dark",
|
|
221
|
-
"caller": areaPersonalContent,
|
|
221
|
+
"caller": areaPersonalContent | indent(4),
|
|
222
222
|
"super": {
|
|
223
223
|
"backgroundFullColor": "transparent",
|
|
224
224
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.png&text=Imagen",
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
"data": {
|
|
246
246
|
"classes": "lg:w-3/4",
|
|
247
247
|
"containerClasses": "p-lg bg-neutral-lighter",
|
|
248
|
-
"caller": postContent,
|
|
248
|
+
"caller": postContent | indent(4),
|
|
249
249
|
"super": {
|
|
250
250
|
"backgroundFullColor": "transparent",
|
|
251
251
|
"backgroundFullUrl": "https://dummyimage.com/320x240/92949b/fff.jpg&text=Imagen",
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
"data": {
|
|
272
272
|
"classes": "lg:w-1/4",
|
|
273
273
|
"containerClasses": "p-base bg-neutral-lighter",
|
|
274
|
-
"caller": withIconContent
|
|
274
|
+
"caller": withIconContent | indent(4)
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
] %}
|
|
@@ -2,33 +2,33 @@
|
|
|
2
2
|
<div {%- if params.classes %} class="{{ params.classes }}"{% endif %} {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
3
3
|
<div {%- if params.containerClasses %} class="{{ params.containerClasses }}"{% endif %}>
|
|
4
4
|
{% if params.super %}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
<div class="{% if params.super.classes %}{{ params.super.classes }}{% else-%} h-32 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.super.backgroundFullColor }}; {% if params.super.backgroundFullUrl %} background-image: url('{{ params.super.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.super.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
6
|
+
{{ params.super.html | safe if params.super.html}}
|
|
7
|
+
</div>
|
|
8
8
|
{% endif %}
|
|
9
9
|
<div class="flex">
|
|
10
10
|
{% if params.left %}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
<div class="{% if params.left.classes %}{{ params.left.classes }}{% else-%} w-1/2 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.left.backgroundFullColor }}; {% if params.left.backgroundFullUrl %} background-image: url('{{ params.left.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.left.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
12
|
+
{{ params.left.html | safe if params.left.html}}
|
|
13
|
+
</div>
|
|
14
14
|
{% endif %}
|
|
15
15
|
<div {%- if params.left or params.right %} class="flex-1"{% endif %}>
|
|
16
16
|
{% if caller %}
|
|
17
|
-
{{ caller() }} {#- if statement allows usage of `call` to be optional -#}
|
|
17
|
+
{{ caller() | indent(4) }} {#- if statement allows usage of `call` to be optional -#}
|
|
18
18
|
{% elseif params.caller %}
|
|
19
|
-
{{ params.caller | safe }}
|
|
19
|
+
{{ params.caller | safe | indent(4) }}
|
|
20
20
|
{% endif %}
|
|
21
21
|
</div>
|
|
22
22
|
{% if params.right %}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
<div class="{% if params.right.classes %}{{ params.right.classes }}{% else-%} w-1/2 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.right.backgroundFullColor }}; {% if params.right.backgroundFullUrl %} background-image: url('{{ params.right.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.right.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
24
|
+
{{ params.right.html | safe if params.right.html}}
|
|
25
|
+
</div>
|
|
26
26
|
{% endif %}
|
|
27
27
|
</div>
|
|
28
28
|
{% if params.sub %}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
<div class="{% if params.sub.classes %}{{ params.sub.classes }}{% else-%} h-32 bg-cover bg-center bg-no-repeat overflow-hidden{% endif %}" style="background-color: {{ params.sub.backgroundFullColor }}; {% if params.sub.backgroundFullUrl %} background-image: url('{{ params.sub.backgroundFullUrl }}'){% endif %}" {%- for attribute, value in params.sub.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
30
|
+
{{ params.sub.html | safe if params.sub.html}}
|
|
31
|
+
</div>
|
|
32
32
|
{% endif %}
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
{% from "../hint/_macro.hint.njk" import componentHint %}
|
|
3
3
|
|
|
4
4
|
<!-- character-count -->
|
|
5
|
-
<div
|
|
6
|
-
{%- if params.maxlength %} data-maxlength="{{ params.maxlength }}"{% endif %}
|
|
7
|
-
{%- if params.threshold %} data-threshold="{{ params.threshold }}"{% endif %}
|
|
8
|
-
{%- if params.maxwords %} data-maxwords="{{ params.maxwords }}"{% endif %}>
|
|
5
|
+
<div {%- if params.maxlength %} data-maxlength="{{ params.maxlength }}"{% endif %} {%- if params.threshold %} data-threshold="{{ params.threshold }}"{% endif %} {%- if params.maxwords %} data-maxwords="{{ params.maxwords }}"{% endif %}>
|
|
9
6
|
{{ componentTextarea({
|
|
10
7
|
id: params.id,
|
|
11
8
|
name: params.name,
|
|
@@ -29,7 +26,7 @@
|
|
|
29
26
|
disabled: params.disabled,
|
|
30
27
|
errorMessage: params.errorMessage,
|
|
31
28
|
attributes: params.attributes
|
|
32
|
-
}) }}
|
|
29
|
+
}) | indent(2) }}
|
|
33
30
|
{{ componentHint({
|
|
34
31
|
text: 'Puedes escribir hasta ' + (params.maxlength or params.maxwords) + (' palabras' if params.maxwords else ' caracteres'),
|
|
35
32
|
id: params.id + '-info',
|
|
@@ -37,6 +34,6 @@
|
|
|
37
34
|
attributes: {
|
|
38
35
|
'aria-live': 'polite'
|
|
39
36
|
}
|
|
40
|
-
}) }}
|
|
37
|
+
}) | indent(2) }}
|
|
41
38
|
</div>
|
|
42
39
|
<!-- /character-count -->
|
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
{% from "components/input/_macro.input.njk" import componentInput %}
|
|
2
|
+
|
|
3
|
+
{% set telefonoContent %}
|
|
4
|
+
{{ componentInput({
|
|
5
|
+
"label": {
|
|
6
|
+
"text": "Número de teléfono"
|
|
7
|
+
},
|
|
8
|
+
"id": "telefono-a",
|
|
9
|
+
"name": "telefono-name"
|
|
10
|
+
}) }}
|
|
11
|
+
{% endset %}
|
|
12
|
+
|
|
13
|
+
{% set mobileContent %}
|
|
14
|
+
{{ componentInput({
|
|
15
|
+
"label": {
|
|
16
|
+
"text": "Número de teléfono móvil"
|
|
17
|
+
},
|
|
18
|
+
"id": "mobile-a",
|
|
19
|
+
"name": "mobile-name"
|
|
20
|
+
}) }}
|
|
21
|
+
{% endset %}
|
|
22
|
+
|
|
23
|
+
{% set mobileErrorContent %}
|
|
24
|
+
{{ componentInput({
|
|
25
|
+
"label": {
|
|
26
|
+
"text": "Número de teléfono móvil"
|
|
27
|
+
},
|
|
28
|
+
"id": "input-with-error-message-a",
|
|
29
|
+
"name": "test-name",
|
|
30
|
+
"errorMessage": {
|
|
31
|
+
"text": "Error: Este campo no puede estar vacío"
|
|
32
|
+
}
|
|
33
|
+
}) }}
|
|
34
|
+
{% endset %}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
1
40
|
{% set exampleComponent = "checkboxes" %}
|
|
2
41
|
{% set examples = [{
|
|
3
42
|
"name": "default",
|
|
@@ -125,7 +164,7 @@
|
|
|
125
164
|
"text": "Verify with Phone",
|
|
126
165
|
"checked": true,
|
|
127
166
|
"conditional": {
|
|
128
|
-
"html":
|
|
167
|
+
"html": telefonoContent
|
|
129
168
|
}
|
|
130
169
|
},
|
|
131
170
|
{
|
|
@@ -461,21 +500,21 @@
|
|
|
461
500
|
"value": "email",
|
|
462
501
|
"text": "Email",
|
|
463
502
|
"conditional": {
|
|
464
|
-
"html":
|
|
503
|
+
"html": mobileContent
|
|
465
504
|
}
|
|
466
505
|
},
|
|
467
506
|
{
|
|
468
507
|
"value": "phone",
|
|
469
508
|
"text": "Phone",
|
|
470
509
|
"conditional": {
|
|
471
|
-
"html":
|
|
510
|
+
"html": telefonoContent
|
|
472
511
|
}
|
|
473
512
|
},
|
|
474
513
|
{
|
|
475
514
|
"value": "text",
|
|
476
515
|
"text": "Text message",
|
|
477
516
|
"conditional": {
|
|
478
|
-
"html":
|
|
517
|
+
"html": mobileContent
|
|
479
518
|
}
|
|
480
519
|
}
|
|
481
520
|
]
|
|
@@ -496,7 +535,7 @@
|
|
|
496
535
|
"value": "email",
|
|
497
536
|
"text": "Email",
|
|
498
537
|
"conditional": {
|
|
499
|
-
"html":
|
|
538
|
+
"html": mobileContent
|
|
500
539
|
}
|
|
501
540
|
},
|
|
502
541
|
{
|
|
@@ -504,14 +543,14 @@
|
|
|
504
543
|
"text": "Phone",
|
|
505
544
|
"checked": true,
|
|
506
545
|
"conditional": {
|
|
507
|
-
"html":
|
|
546
|
+
"html": telefonoContent
|
|
508
547
|
}
|
|
509
548
|
},
|
|
510
549
|
{
|
|
511
550
|
"value": "text",
|
|
512
551
|
"text": "Text message",
|
|
513
552
|
"conditional": {
|
|
514
|
-
"html":
|
|
553
|
+
"html": mobileContent
|
|
515
554
|
}
|
|
516
555
|
}
|
|
517
556
|
]
|
|
@@ -535,7 +574,7 @@
|
|
|
535
574
|
"value": "email",
|
|
536
575
|
"text": "Email",
|
|
537
576
|
"conditional": {
|
|
538
|
-
"html":
|
|
577
|
+
"html": mobileContent
|
|
539
578
|
}
|
|
540
579
|
},
|
|
541
580
|
{
|
|
@@ -543,14 +582,14 @@
|
|
|
543
582
|
"text": "Phone",
|
|
544
583
|
"checked": true,
|
|
545
584
|
"conditional": {
|
|
546
|
-
"html":
|
|
585
|
+
"html": mobileErrorContent
|
|
547
586
|
}
|
|
548
587
|
},
|
|
549
588
|
{
|
|
550
589
|
"value": "text",
|
|
551
590
|
"text": "Text message",
|
|
552
591
|
"conditional": {
|
|
553
|
-
"html":
|
|
592
|
+
"html": mobileContent
|
|
554
593
|
}
|
|
555
594
|
}
|
|
556
595
|
]
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
{% if params.hint %}
|
|
30
30
|
{% set hintId = idPrefix + '-hint' %}
|
|
31
31
|
{% set describedBy = describedBy + ' ' + hintId if describedBy else hintId %}
|
|
32
|
+
|
|
32
33
|
{{ componentHint({
|
|
33
34
|
id: hintId,
|
|
34
35
|
classes: params.hint.classes,
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
text: params.hint.text
|
|
38
39
|
}) | indent(2) | trim }}
|
|
39
40
|
{% endif %}
|
|
41
|
+
|
|
40
42
|
{% if params.errorMessage %}
|
|
41
43
|
{% set errorId = idPrefix + '-error' %}
|
|
42
44
|
{% set describedBy = describedBy + ' ' + errorId if describedBy else errorId %}
|
|
@@ -69,8 +71,8 @@
|
|
|
69
71
|
{% set hasHint = true if item.hint.text or item.hint.html %}
|
|
70
72
|
{% set itemHintId = id + "-item-hint" if hasHint else "" %}
|
|
71
73
|
{% set itemDescribedBy = describedBy if not hasFieldset else "" %}
|
|
72
|
-
{% set itemDescribedBy = (itemDescribedBy + " " + itemHintId)
|
|
73
|
-
<div class="{%- if params.hasDividers %} border-t border-b border-neutral-base -mb-px{% endif %} {%- if item.classes %} {{ item.classes }}{% endif %} {%- if item.conditional.html %} c-checkboxes__conditional{% endif %} {%- if item.checked %} c-checkboxes__conditional-active {% else %} c-checkboxes__conditional-hidden
|
|
74
|
+
{% set itemDescribedBy = (itemDescribedBy + " " + itemHintId) %}
|
|
75
|
+
<div class="{%- if params.hasDividers %} border-t border-b border-neutral-base -mb-px{% endif %} {%- if item.classes %} {{ item.classes }}{% endif %} {%- if item.conditional.html %} c-checkboxes__conditional{% endif %} {%- if item.checked %} c-checkboxes__conditional-active {% else %} c-checkboxes__conditional-hidden{% endif %}">
|
|
74
76
|
<div class="relative flex items-start py-base">
|
|
75
77
|
<div class="flex items-center mx-sm">
|
|
76
78
|
<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-base disabled:border-neutral-base text-primary-base" id="{{ id }}" name="{{ name }}" type="checkbox" value="{{ item.value }}"
|
|
@@ -89,7 +91,7 @@
|
|
|
89
91
|
classes: (item.label.classes if item.label.classes),
|
|
90
92
|
attributes: item.label.attributes,
|
|
91
93
|
for: id
|
|
92
|
-
}) | indent(
|
|
94
|
+
}) | indent(10) | trim }}
|
|
93
95
|
{% if hasHint %}
|
|
94
96
|
{{ componentHint({
|
|
95
97
|
id: itemHintId,
|
|
@@ -97,14 +99,14 @@
|
|
|
97
99
|
attributes: item.hint.attributes,
|
|
98
100
|
html: item.hint.html,
|
|
99
101
|
text: item.hint.text
|
|
100
|
-
}) | indent(
|
|
102
|
+
}) | indent(10) | trim }}
|
|
101
103
|
{% endif %}
|
|
102
104
|
</div>
|
|
103
105
|
</div>
|
|
104
106
|
{% if item.conditional.html %}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
<div class="mb-base ml-5 py-sm pl-6 origin-top-left border-l-2 border-primary-base c-checkboxes__conditional-item" id="{{ conditionalId }}">
|
|
108
|
+
{{ item.conditional.html | safe | indent(10) }}
|
|
109
|
+
</div>
|
|
108
110
|
{% endif %}
|
|
109
111
|
{% endif %}
|
|
110
112
|
</div>
|
|
@@ -112,8 +114,7 @@
|
|
|
112
114
|
</div>
|
|
113
115
|
{% endset -%}
|
|
114
116
|
|
|
115
|
-
|
|
116
|
-
<div class="c-form-group {%- if params.errorMessage %} c-form-group--error{% endif %} {%- if params.formGroup.classes %} {{ params.formGroup.classes }}{% endif %}">
|
|
117
|
+
{% set checkboxesContent %}
|
|
117
118
|
{% if params.fieldset %}
|
|
118
119
|
{% call componentFieldset({
|
|
119
120
|
describedBy: describedBy,
|
|
@@ -123,10 +124,15 @@
|
|
|
123
124
|
legend: params.fieldset.legend,
|
|
124
125
|
headingLevel: params.fieldset.headingLevel
|
|
125
126
|
}) %}
|
|
126
|
-
{{ innerHtml |
|
|
127
|
+
{{ innerHtml | safe }}
|
|
127
128
|
{% endcall %}
|
|
128
129
|
{% else %}
|
|
129
|
-
{{ innerHtml |
|
|
130
|
+
{{ innerHtml | safe }}
|
|
130
131
|
{% endif %}
|
|
132
|
+
{% endset %}
|
|
133
|
+
|
|
134
|
+
<!-- checkboxes -->
|
|
135
|
+
<div class="c-form-group {%- if params.errorMessage %} c-form-group--error{% endif %} {%- if params.formGroup.classes %} {{ params.formGroup.classes }}{% endif %}">
|
|
136
|
+
{{ checkboxesContent | safe |indent(2) | trim }}
|
|
131
137
|
</div>
|
|
132
138
|
<!-- /checkboxes -->
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- collapsible -->
|
|
2
2
|
<div class="{%- if params.classes %} {{ params.classes }}{% else -%} -my-px py-sm border-t border-b border-neutral-base{% endif %} c-collapsible" {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %} {% if params.open %} data-expanded="true" {% endif %} data-module="c-collapsible">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<button aria-expanded="false" {%- if params.id %} id="{{params.id}}-title"{% endif %} class="group relative w-full py-sm font-semibold text-left cursor-pointer focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black" {%- if params.id %} aria-controls="{{params.id}}"{% endif %}>{{ params.headerHtml | safe if params.headerHtml else params.headerText }}
|
|
4
|
+
<span class="c-collapsible__show absolute inset-y-0 right-0 py-sm font-normal text-sm text-neutral-dark underline group-focus:text-black pointer-events-none " aria-hidden="false">Mostrar</span>
|
|
5
|
+
<span class="c-collapsible__hide absolute inset-y-0 right-0 py-sm font-normal text-sm text-neutral-dark underline group-focus:text-black pointer-events-none hidden" aria-hidden="true">Ocultar</span>
|
|
6
6
|
</button>
|
|
7
7
|
<div aria-hidden="true" class="c-collapsible__content hidden py-sm" {%- if params.id %} id="{{params.id}}"{% endif %}>
|
|
8
8
|
{% if params.html %}
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
{% endif %}
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
|
-
<!-- /collapsible -->
|
|
17
|
+
<!-- /collapsible -->
|