desy-html 6.4.1 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/tailwind.config.js +32 -2
- package/docs/_global.head.njk +2 -0
- package/docs/_include.template-header.njk +8 -0
- package/docs/_macro.example-render.njk +8 -0
- package/docs/catalogo.html +2 -0
- package/docs/componentes.html +6 -0
- package/docs/ds/_ds.example.card.njk +199 -0
- package/docs/ds/_ds.example.checkboxes.njk +4 -4
- package/docs/ds/_ds.example.header-advanced.njk +0 -75
- package/docs/ds/_ds.example.links-list.njk +171 -0
- package/docs/ds/_ds.example.pills.njk +1 -1
- package/docs/ds/_ds.example.textos.njk +3 -1
- package/docs/ds/_ds.section.informacion.njk +13 -0
- package/docs/ds/_ds.section.navigation.njk +4 -0
- package/docs/ds/_ds.section.textos.njk +44 -20
- package/docs/examples-card.html +5 -0
- package/docs/examples-links-list.html +5 -0
- package/docs/index.html +17 -3
- package/gulpfile.js +3 -2
- package/package.json +6 -3
- package/src/css/component.text.css +14 -0
- package/src/js/aria/tabs.js +3 -1
- package/src/templates/components/button-loader/_template.button-loader.njk +3 -15
- package/src/templates/components/card/_examples.card.njk +277 -0
- package/src/templates/components/card/_macro.card.njk +3 -0
- package/src/templates/components/card/_template.card.njk +35 -0
- package/src/templates/components/card/params.card.yaml +113 -0
- package/src/templates/components/collapsible/_template.collapsible.njk +1 -1
- package/src/templates/components/header/_template.header.njk +1 -1
- package/src/templates/components/header-advanced/_examples.header-advanced.njk +101 -14
- package/src/templates/components/header-advanced/_template.header-advanced.njk +3 -3
- package/src/templates/components/links-list/_examples.links-list.njk +504 -0
- package/src/templates/components/links-list/_macro.links-list.njk +3 -0
- package/src/templates/components/links-list/_template.links-list.njk +92 -0
- package/src/templates/components/links-list/params.links-list.yaml +82 -0
- package/src/templates/components/menu-vertical/params.menu-vertical.yaml +0 -4
- package/src/templates/components/table/_examples.table.njk +4 -48
- package/src/templates/components/table-advanced/_examples.table-advanced.njk +6 -51
- package/docs/examples-header-advanced-2.html +0 -5
- package/src/templates/components/header-advanced/_examples.header-advanced-2.njk +0 -911
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
{% from "components/links-list/_macro.links-list.njk" import componentLinksList %}
|
|
2
|
+
|
|
3
|
+
<div class="grid lg:grid-cols-3 gap-xl mb-lg">
|
|
4
|
+
<div>
|
|
5
|
+
{{ componentLinksList({
|
|
6
|
+
"idPrefix": "default",
|
|
7
|
+
"items": [
|
|
8
|
+
{
|
|
9
|
+
"href": "#",
|
|
10
|
+
"text": "Item 1"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"href": "#",
|
|
14
|
+
"text": "Item 2"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"href": "#",
|
|
18
|
+
"text": "Item 3"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"attributes": {
|
|
22
|
+
"aria-label": "Menu destacado"
|
|
23
|
+
}
|
|
24
|
+
}) }}
|
|
25
|
+
</div>
|
|
26
|
+
<div>
|
|
27
|
+
{{ componentLinksList({
|
|
28
|
+
"idPrefix": "with-icon",
|
|
29
|
+
"items": [
|
|
30
|
+
{
|
|
31
|
+
"href": "#",
|
|
32
|
+
"text": "Item 1",
|
|
33
|
+
"icon": {
|
|
34
|
+
"html": '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" height=\"1em\" width=\"1em\" class=\"inline-block align-middle\"><path d=\"M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z\" fill=\"currentColor\"></path></svg>'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"href": "#",
|
|
39
|
+
"text": "Item 2",
|
|
40
|
+
"icon": {
|
|
41
|
+
"html": '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" height=\"1em\" width=\"1em\" class=\"inline-block align-middle\"><path d=\"M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z\" fill=\"currentColor\"></path></svg>'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"href": "#",
|
|
46
|
+
"text": "Item 3",
|
|
47
|
+
"icon": {
|
|
48
|
+
"html": '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" height=\"1em\" width=\"1em\" class=\"inline-block align-middle\"><path d=\"M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z\" fill=\"currentColor\"></path></svg>'
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"attributes": {
|
|
53
|
+
"aria-label": "Menu destacado"
|
|
54
|
+
}
|
|
55
|
+
}) }}
|
|
56
|
+
</div>
|
|
57
|
+
<div>
|
|
58
|
+
{{ componentLinksList({
|
|
59
|
+
"idPrefix": "with-containerclasses",
|
|
60
|
+
"items": [
|
|
61
|
+
{
|
|
62
|
+
"href": "#",
|
|
63
|
+
"text": "Item 1",
|
|
64
|
+
"containerClasses": "px-base border border-neutral-base my-sm",
|
|
65
|
+
"icon": {
|
|
66
|
+
"html": '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" height=\"1em\" width=\"1em\" class=\"inline-block align-middle\"><path d=\"M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z\" fill=\"currentColor\"></path></svg>'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"href": "#",
|
|
71
|
+
"text": "Item 2",
|
|
72
|
+
"containerClasses": "my-base px-base border border-neutral-base rounded",
|
|
73
|
+
"icon": {
|
|
74
|
+
"html": '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" height=\"1em\" width=\"1em\" class=\"inline-block align-middle\"><path d=\"M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z\" fill=\"currentColor\"></path></svg>'
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"href": "#",
|
|
79
|
+
"text": "Item 3",
|
|
80
|
+
"containerClasses": "px-base border border-neutral-base my-sm",
|
|
81
|
+
"icon": {
|
|
82
|
+
"html": '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" height=\"1em\" width=\"1em\" class=\"inline-block align-middle\"><path d=\"M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z\" fill=\"currentColor\"></path></svg>'
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"attributes": {
|
|
87
|
+
"aria-label": "Menu destacado"
|
|
88
|
+
}
|
|
89
|
+
}) }}
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="grid lg:grid-cols-2 gap-xl mb-lg">
|
|
93
|
+
<div>
|
|
94
|
+
{{ componentLinksList({
|
|
95
|
+
"idPrefix": "with-classes-applied",
|
|
96
|
+
"items": [
|
|
97
|
+
{
|
|
98
|
+
"href": "#",
|
|
99
|
+
"text": "Item grande con icono",
|
|
100
|
+
"classes": "flex justify-between items-center py-base text-2xl",
|
|
101
|
+
"icon": {
|
|
102
|
+
"html": '<div class=\"flex items-center justify-center p-sm -ml-sm bg-neutral-lighter rounded-full text-4xl\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" height=\"1em\" width=\"1em\" class=\"inline-block align-middle\"><path d=\"M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z\" fill=\"currentColor\"></path></svg>\n </div>\n'
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"href": "#",
|
|
107
|
+
"text": "Item grande con icono",
|
|
108
|
+
"classes": "flex justify-between items-center py-base text-2xl",
|
|
109
|
+
"icon": {
|
|
110
|
+
"html": '<div class=\"flex items-center justify-center p-sm -ml-sm bg-neutral-lighter rounded-full text-4xl\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" height=\"1em\" width=\"1em\" class=\"inline-block align-middle\"><path d=\"M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z\" fill=\"currentColor\"></path></svg>\n </div>\n'
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"href": "#",
|
|
115
|
+
"text": "Item grande con icono",
|
|
116
|
+
"classes": "flex justify-between items-center py-base text-2xl",
|
|
117
|
+
"icon": {
|
|
118
|
+
"html": '<div class=\"flex items-center justify-center p-sm -ml-sm bg-neutral-lighter rounded-full text-4xl\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" height=\"1em\" width=\"1em\" class=\"inline-block align-middle\"><path d=\"M19.71,20H4.29A2.28,2.28,0,0,1,2,17.71V6.29A2.28,2.28,0,0,1,4.29,4H7.72a2,2,0,0,1,1.44.61l1.19,1.24a.51.51,0,0,0,.36.15H20a2,2,0,0,1,2,2v9.71A2.28,2.28,0,0,1,19.71,20ZM4.29,6A.29.29,0,0,0,4,6.29V17.71a.29.29,0,0,0,.29.29H19.71a.29.29,0,0,0,.29-.29V8.5a.5.5,0,0,0-.5-.5h-9a2,2,0,0,1-1.44-.61L7.87,6.15A.55.55,0,0,0,7.51,6Z\" fill=\"currentColor\"></path></svg>\n </div>\n'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"attributes": {
|
|
123
|
+
"aria-label": "Menu destacado"
|
|
124
|
+
}
|
|
125
|
+
}) }}
|
|
126
|
+
</div>
|
|
127
|
+
<div>
|
|
128
|
+
{{ componentLinksList({
|
|
129
|
+
"idPrefix": "mixed-example",
|
|
130
|
+
"items": [
|
|
131
|
+
{
|
|
132
|
+
"href": "#",
|
|
133
|
+
"html": "<strong>Deudas</strong>",
|
|
134
|
+
"classes": "flex justify-between items-center py-base text-lg",
|
|
135
|
+
"sub": {
|
|
136
|
+
"html": "<p class=\"c-paragraph-base mb-0\">Tienes <span class=\"text-alert-base\">deudas fuera de plazo</span></p>"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"href": "#",
|
|
141
|
+
"html": "<strong>Historial de pagos</strong>",
|
|
142
|
+
"classes": "flex justify-between items-center py-base text-lg"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"href": "#",
|
|
146
|
+
"html": "<strong>Certificado de corriente de pago</strong>",
|
|
147
|
+
"classes": "flex justify-between items-center py-base text-lg",
|
|
148
|
+
"sub": {
|
|
149
|
+
"html": "<p class=\"c-paragraph-base mb-0\">Tienes <strong>1 certificado disponible</strong>.</p>"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"href": "#",
|
|
154
|
+
"html": "<strong>Valoraciones de inmuebles</strong>",
|
|
155
|
+
"classes": "flex justify-between items-center py-base text-lg"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"href": "#",
|
|
159
|
+
"html": "<strong>Aplazamiento y fraccionamiento</strong>",
|
|
160
|
+
"classes": "flex justify-between items-center py-base text-lg",
|
|
161
|
+
"sub": {
|
|
162
|
+
"html": "<p class=\"c-paragraph-base mb-0\">Tienes 1 deuda fraccionada, has pagado <strong>2 fracciones</strong> de 5.</p>"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"attributes": {
|
|
167
|
+
"aria-label": "Menu destacado"
|
|
168
|
+
}
|
|
169
|
+
}) }}
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</div>
|
|
12
12
|
<div>
|
|
13
13
|
{{ componentPill({
|
|
14
|
-
"html": "Icono dcha <svg viewBox=\"0 0 140 140\" class=\" self-center ml-2 \" aria-hidden=\"true\" width=\" .75em \" height=\" .75em \"><path fill=\"currentColor\" d=\"M85.91 71.77a2.5 2.5 0 010-3.54l46.16-46.16a10 10 0 10-14.14-14.14L71.77 54.09a2.5 2.5 0 01-3.54 0L22.07 7.93A10 10 0 007.93 22.07l46.16 46.16a2.5 2.5 0 010 3.54L7.93 117.93a10 10 0 0014.14 14.14l46.16-46.16a2.5 2.5 0 013.54 0l46.16 46.16a10 10 0 0014.14-14.14z\"
|
|
14
|
+
"html": "Icono dcha <svg viewBox=\"0 0 140 140\" class=\" self-center ml-2 \" aria-hidden=\"true\" width=\" .75em \" height=\" .75em \"><path fill=\"currentColor\" d=\"M85.91 71.77a2.5 2.5 0 010-3.54l46.16-46.16a10 10 0 10-14.14-14.14L71.77 54.09a2.5 2.5 0 01-3.54 0L22.07 7.93A10 10 0 007.93 22.07l46.16 46.16a2.5 2.5 0 010 3.54L7.93 117.93a10 10 0 0014.14 14.14l46.16-46.16a2.5 2.5 0 013.54 0l46.16 46.16a10 10 0 0014.14-14.14z\"/></svg>"
|
|
15
15
|
}) }}
|
|
16
16
|
</div>
|
|
17
17
|
<div>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
<h1 class="c-h0">Título 0</h1>
|
|
1
2
|
<h1 class="c-h1">Título 1</h1>
|
|
2
3
|
<h2 class="c-h2">Título 2</h2>
|
|
3
|
-
<
|
|
4
|
+
<h3 class="c-h3">Título 3</h3>
|
|
5
|
+
<h4 class="c-h4">Título 4</h4>
|
|
4
6
|
<p>Esto es un <a href="#" class="c-link">link</a> en un texto</p>
|
|
5
7
|
<p>Esto es un <a href="#" class="c-link c-link--alert">link</a> en una notificación de error</p>
|
|
6
8
|
<p class="c-paragraph-lg">Párrafo destacados</p>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{% from "ds/_ds.macro.section-title.njk" import DSSectionTitle %}
|
|
2
|
+
{% from "ds/_ds.macro.subsection-title.njk" import DSSubsectionTitle %}
|
|
3
|
+
|
|
4
|
+
<div class="container mx-auto">
|
|
5
|
+
{{ DSSectionTitle({
|
|
6
|
+
title: "Información"
|
|
7
|
+
}) }}
|
|
8
|
+
<div class="pb-xl"></div>
|
|
9
|
+
{{ DSSubsectionTitle({
|
|
10
|
+
title: "Cards"
|
|
11
|
+
}) }}
|
|
12
|
+
{% include "ds/_ds.example.card.njk" %}
|
|
13
|
+
</div>
|
|
@@ -40,6 +40,10 @@
|
|
|
40
40
|
title: "Menu vertical"
|
|
41
41
|
}) }}
|
|
42
42
|
{% include "ds/_ds.example.menu-vertical.njk" %}
|
|
43
|
+
{{ DSSubsectionTitle({
|
|
44
|
+
title: "Links list"
|
|
45
|
+
}) }}
|
|
46
|
+
{% include "ds/_ds.example.links-list.njk" %}
|
|
43
47
|
<div class="pb-lg"></div>
|
|
44
48
|
{{ DSSubsectionTitle({
|
|
45
49
|
title: "Paginación"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{{ DSSubsectionTitle({
|
|
12
12
|
title: "Fuentes"
|
|
13
13
|
}) }}
|
|
14
|
-
<p>La tipografía principal es <a class="c-link" href="https://fonts.google.com/specimen/Open+Sans?sidebar.open&selection.family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700">Open Sans</a> en sus pesos Bold, Semibold y Regular.</p>
|
|
14
|
+
<p>La tipografía principal es <a class="c-link" href="https://fonts.google.com/specimen/Open+Sans?sidebar.open&selection.family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700">Open Sans</a> en sus pesos Bold, Semibold y Regular. Utilizar en la medida de lo posible, el código que ofrece Google Fonts para integrarlo.</p>
|
|
15
15
|
<div class="pb-lg"></div>
|
|
16
16
|
{{ DSSubsectionTitle({
|
|
17
17
|
title: "Estilos de base"
|
|
@@ -42,46 +42,70 @@
|
|
|
42
42
|
</div>
|
|
43
43
|
{% from "ds/_ds.macro.subsection-title.njk" import DSSubsectionTitle %}
|
|
44
44
|
{{ DSSubsectionTitle({
|
|
45
|
-
title: "
|
|
45
|
+
title: "Encabezados"
|
|
46
46
|
}) }}
|
|
47
|
-
<div class="flex items-center mb-8">
|
|
48
|
-
<div class="w-1/
|
|
49
|
-
<h1 class="c-
|
|
47
|
+
<div class="flex flex-wrap items-center mb-8">
|
|
48
|
+
<div class="lg:w-1/3 lg:mr-8">
|
|
49
|
+
<h1 class="c-h0">Encabezado 0 (h1)</h1>
|
|
50
50
|
</div>
|
|
51
|
-
<div>
|
|
51
|
+
<div class="lg:flex-1">
|
|
52
|
+
<p class="text-neutral-dark text-sm"><code>.c-h0</code> - <code>bold</code> - <code>black</code> - font-size: <code>2.5rem</code> - <code>40px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>40px</code> - margin-bottom: <code>.mb-xl</code> - <code>2.5</code> - <code>40px</code></p>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="flex flex-wrap items-center mb-8">
|
|
56
|
+
<div class="lg:w-1/3 lg:mr-8">
|
|
57
|
+
<h1 class="c-h1">Encabezado 1 (h1)</h1>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="lg:flex-1">
|
|
52
60
|
<p class="text-neutral-dark text-sm"><code>.c-h1</code> - <code>bold</code> - <code>black</code> - font-size: <code>.text-3xl</code> - <code>1.875rem</code> - <code>30px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>20px</code> - margin-bottom: <code>.mb-lg</code> - <code>1.75</code> - <code>28px</code></p>
|
|
53
61
|
</div>
|
|
54
62
|
</div>
|
|
55
|
-
<div class="flex items-center mb-8">
|
|
56
|
-
<div class="w-1/
|
|
57
|
-
<h2 class="c-h2">
|
|
63
|
+
<div class="flex flex-wrap items-center mb-8">
|
|
64
|
+
<div class="lg:w-1/3 lg:mr-8">
|
|
65
|
+
<h2 class="c-h2">Encabezado 2 (h2)</h2>
|
|
58
66
|
</div>
|
|
59
|
-
<div>
|
|
67
|
+
<div class="lg:flex-1">
|
|
60
68
|
<p class="text-neutral-dark text-sm"><code>.c-h2</code> - <code>bold</code> - <code>black</code> - font-size: <code>.text-2xl</code> - <code>1.5rem</code> - <code>24px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>20px</code> - margin-bottom: <code>.mb-base</code> - <code>1</code> - <code>16px</code></p>
|
|
61
69
|
</div>
|
|
62
70
|
</div>
|
|
63
|
-
<div class="flex items-center mb-8">
|
|
64
|
-
<div class="w-1/
|
|
65
|
-
<h3 class="c-h3">
|
|
71
|
+
<div class="flex flex-wrap items-center mb-8">
|
|
72
|
+
<div class="lg:w-1/3 lg:mr-8">
|
|
73
|
+
<h3 class="c-h3">Encabezado 3 (h3)</h3>
|
|
66
74
|
</div>
|
|
67
|
-
<div>
|
|
75
|
+
<div class="lg:flex-1">
|
|
68
76
|
<p class="text-neutral-dark text-sm"><code>.c-h3</code> - <code>bold</code> - <code>black</code> - font-size: <code>.text-lg</code> - <code>1.125rem</code> - <code>18px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>20px</code> - margin-bottom: <code>.mb-sm</code> - <code>0.5</code> - <code>8px</code></p>
|
|
69
77
|
</div>
|
|
70
78
|
</div>
|
|
79
|
+
<div class="flex flex-wrap items-center mb-8">
|
|
80
|
+
<div class="lg:w-1/3 lg:mr-8">
|
|
81
|
+
<h3 class="c-h4">Encabezado 4 (h4)</h3>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="lg:flex-1">
|
|
84
|
+
<p class="text-neutral-dark text-sm"><code>.c-h4</code> - <code>bold</code> - <code>black</code> - font-size: <code>.text-base</code> - <code>1rem</code> - <code>16px</code> - line-height: <code>.leading-tight</code> - <code>1.25</code> - <code>20px</code> - margin-bottom: <code>.mb-sm</code> - <code>0.5</code> - <code>8px</code></p>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
71
87
|
{{ DSSubsectionTitle({
|
|
72
88
|
title: "Enlaces"
|
|
73
89
|
}) }}
|
|
74
|
-
<div class="flex items-center mb-8">
|
|
75
|
-
<div class="w-1/
|
|
76
|
-
<p>Esto es un <a href="#" class="c-link">
|
|
90
|
+
<div class="flex flex-wrap items-center mb-8">
|
|
91
|
+
<div class="w-1/3 mr-8">
|
|
92
|
+
<p>Esto es un <a href="#" class="c-link">enlace</a> en un texto.</p>
|
|
77
93
|
</div>
|
|
78
94
|
<div>
|
|
79
95
|
<p class="text-neutral-dark text-sm"><code>.c-link</code> - <code>normal</code> - <code>underline</code> - <code>primary-base</code> - hover: <code>primary-dark</code></p>
|
|
80
96
|
</div>
|
|
81
97
|
</div>
|
|
82
|
-
<div class="flex items-center mb-8">
|
|
83
|
-
<div class="w-1/
|
|
84
|
-
<p>Esto es un <a href="#" class="c-link
|
|
98
|
+
<div class="flex flex-wrap items-center mb-8">
|
|
99
|
+
<div class="w-1/3 mr-8">
|
|
100
|
+
<p>Esto es un <a href="#" class="c-link" title="Se abre en ventana nueva" target="_blank">enlace en ventana nueva<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="0.8em" width="0.8em" class="inline-block mx-xs no-underline align-baseline" aria-hidden="true" focusable="false" role="img"><g><path d="M23.25,0h-8a.74.74,0,0,0-.69.47.74.74,0,0,0,.16.81L18,4.51l-9.45,9.3a1,1,0,0,0,0,1.41,1,1,0,0,0,.71.3,1,1,0,0,0,.7-.28l9.48-9.33,3.29,3.24a.74.74,0,0,0,.53.22.72.72,0,0,0,.29-.06A.74.74,0,0,0,24,8.62V.75A.76.76,0,0,0,23.25,0Z" fill="currentColor"></path><path d="M18.5,10.62a1,1,0,0,0-1,1V22H2V6.5H12.37a1,1,0,0,0,0-2H1.87A1.87,1.87,0,0,0,0,6.37V22.12A1.88,1.88,0,0,0,1.87,24H17.62a1.88,1.88,0,0,0,1.88-1.88V11.62A1,1,0,0,0,18.5,10.62Z" fill="currentColor"></path></g></svg></a> en un texto.</p>
|
|
101
|
+
</div>
|
|
102
|
+
<div>
|
|
103
|
+
<p class="text-neutral-dark text-sm"><code>.c-link</code> - <code>normal</code> - <code>underline</code> - <code>primary-base</code> - hover: <code>primary-dark</code>. Con un <code>title</code>, <code>svg</code> y <code>target</code></p>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="flex flex-wrap items-center mb-8">
|
|
107
|
+
<div class="w-1/3 mr-8">
|
|
108
|
+
<p>Esto es un <a href="#" class="c-link c-link--alert">enlace</a> en una notificación de error.</p>
|
|
85
109
|
</div>
|
|
86
110
|
<div>
|
|
87
111
|
<p class="text-neutral-dark text-sm"><code>.c-link.c-link--alert</code> - <code>normal</code> - <code>underline</code> - <code>alert-base</code> - hover: <code>alert-dark</code></p>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{% set title = "Links list. Componente, parámetros y ejemplos. Documentación de desy-html. Gobierno de Aragón" %}
|
|
2
|
+
{% extends "_template.examples.njk" %}
|
|
3
|
+
{% block contentBlock %}
|
|
4
|
+
{% import "components/links-list/_examples.links-list.njk" as exampleData %}
|
|
5
|
+
{% endblock %}
|
package/docs/index.html
CHANGED
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
<h2>¿Cómo comenzar?</h2>
|
|
15
15
|
<ul>
|
|
16
16
|
<li>Ejecuta primero <code>npm install</code></li>
|
|
17
|
-
<li>
|
|
18
|
-
<li>Usa <code>npm run prod</code> para generar el CSS
|
|
19
|
-
<li>Dependencias: Node.js v12.18.3, Tailwind CSS
|
|
17
|
+
<li>Ejecuta <code>npm run dev</code> para escuchar cambios en los archivos njk, css y html, para renderizarlos y recargar el servidor local con browser-sync.</li>
|
|
18
|
+
<li>Usa <code>npm run prod</code> para generar el CSS y minificarlo.</li>
|
|
19
|
+
<li>Dependencias: Node.js v12.18.3, Tailwind CSS y AutoPrefixer configurado en PostCSS. Versión y lista de dependencias completa en: <a href="package.json">Ver package.json</a></li>
|
|
20
20
|
</ul>
|
|
21
21
|
|
|
22
22
|
<h2>¿Cómo comienzo un proyecto que usa los componentes de desy-html?</h2>
|
|
@@ -38,6 +38,20 @@
|
|
|
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.6.6.0</h3>
|
|
42
|
+
<ul class="text-sm">
|
|
43
|
+
<li>Removed Backstop.js visual regression testing library to make the library lighter. We will use it only in test branch.</li>
|
|
44
|
+
<li>Added Card component.</li>
|
|
45
|
+
<li>Added Links list component.</li>
|
|
46
|
+
<li>Added a bigger c-h0 heading style. A smaller c-h4 style and prose improvements.</li>
|
|
47
|
+
<li>Docs improvements.</li>
|
|
48
|
+
<li>Bug fixes.</li>
|
|
49
|
+
</ul>
|
|
50
|
+
<h3>v.6.5.0</h3>
|
|
51
|
+
<ul class="text-sm">
|
|
52
|
+
<li>Added Backstop.js visual regression testing library.</li>
|
|
53
|
+
<li>Improved documentation.</li>
|
|
54
|
+
</ul>
|
|
41
55
|
<h3>v.6.4.1</h3>
|
|
42
56
|
<ul class="text-sm">
|
|
43
57
|
<li>Fixed notification close.</li>
|
package/gulpfile.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "desy-html",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.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)",
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"main": "src/js/index.js",
|
|
27
27
|
"scripts": {
|
|
28
|
-
"dev": "gulp",
|
|
29
|
-
"prod": "NODE_ENV=production gulp prod"
|
|
28
|
+
"dev": "gulp --no-notify",
|
|
29
|
+
"prod": "NODE_ENV=production gulp prod",
|
|
30
|
+
"backstop-test:approve": "backstop approve --config=test/backstop_config/backstop.config.js",
|
|
31
|
+
"backstop-test:reference": "backstop reference --config=test/backstop_config/backstop.config.js",
|
|
32
|
+
"backstop-test:test": "backstop test --config=test/backstop_config/backstop.config.js"
|
|
30
33
|
},
|
|
31
34
|
"dependencies": {
|
|
32
35
|
"@tailwindcss/aspect-ratio": "^0.4.0",
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
========================================================================== */
|
|
4
4
|
|
|
5
5
|
@layer components {
|
|
6
|
+
.c-h0 {
|
|
7
|
+
@apply mb-8;
|
|
8
|
+
font-size: 2.5rem;
|
|
9
|
+
@apply font-bold;
|
|
10
|
+
@apply leading-tight;
|
|
11
|
+
}
|
|
12
|
+
|
|
6
13
|
.c-h1 {
|
|
7
14
|
@apply mb-lg;
|
|
8
15
|
@apply text-3xl;
|
|
@@ -24,6 +31,13 @@
|
|
|
24
31
|
@apply leading-tight;
|
|
25
32
|
}
|
|
26
33
|
|
|
34
|
+
.c-h4 {
|
|
35
|
+
@apply mb-sm;
|
|
36
|
+
@apply text-base;
|
|
37
|
+
@apply font-bold;
|
|
38
|
+
@apply leading-tight;
|
|
39
|
+
}
|
|
40
|
+
|
|
27
41
|
.c-link {
|
|
28
42
|
@apply text-primary-base;
|
|
29
43
|
@apply underline;
|
package/src/js/aria/tabs.js
CHANGED
|
@@ -176,7 +176,9 @@ export function tabs(aria) {
|
|
|
176
176
|
|
|
177
177
|
// Activates any given tab panel
|
|
178
178
|
function activateTab (tab, setFocus) {
|
|
179
|
-
setFocus
|
|
179
|
+
if(setFocus === undefined){
|
|
180
|
+
setFocus = true
|
|
181
|
+
}
|
|
180
182
|
// Deactivate all other tabs
|
|
181
183
|
deactivateTabs();
|
|
182
184
|
|
|
@@ -26,10 +26,7 @@
|
|
|
26
26
|
<span class="c-button-loader__spinner flex items-center justify-center absolute inset-0">
|
|
27
27
|
{{ componentSpinner({
|
|
28
28
|
text: params.loader.text if params.loader.text else 'Acción en curso',
|
|
29
|
-
classes: params.loader.classes
|
|
30
|
-
attributes: {
|
|
31
|
-
"x-ref": "spinnerText"
|
|
32
|
-
}
|
|
29
|
+
classes: params.loader.classes
|
|
33
30
|
}) }}
|
|
34
31
|
</span>
|
|
35
32
|
{% endset %}
|
|
@@ -37,7 +34,7 @@
|
|
|
37
34
|
{# Set success icon html #}
|
|
38
35
|
{% set iconSuccess %}
|
|
39
36
|
<span class="c-button-loader__success flex items-center justify-center absolute inset-0">
|
|
40
|
-
<span
|
|
37
|
+
<span class="sr-only" role="alert" aria-live="assertive">
|
|
41
38
|
</span>
|
|
42
39
|
<span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" aria-hidden="true" width="1em" height="1em"><path d="M13.714 42.857A6.857 6.857 0 0 1 8.4 40.183L.857 31.646a3.429 3.429 0 0 1 .309-4.869A3.429 3.429 0 0 1 6 27.12l7.063 7.989a.72.72 0 0 0 .617.308.789.789 0 0 0 .617-.274L42.103 6.206a3.429 3.429 0 0 1 4.937 4.731L18.926 40.526a6.651 6.651 0 0 1-5.212 2.331Z" fill="currentColor"></path></svg></span>
|
|
43
40
|
</span>
|
|
@@ -45,16 +42,7 @@
|
|
|
45
42
|
|
|
46
43
|
{#- Define common attributes that we can use across all element types #}
|
|
47
44
|
|
|
48
|
-
{%- set commonAttributes %}
|
|
49
|
-
x-init="() => {
|
|
50
|
-
if (state == 'is-loading'){
|
|
51
|
-
$refs.spinnerText.querySelector('[role=alert]').innerText = '{{ params.loader.text if params.loader.text else "Acción en curso"}}';
|
|
52
|
-
} else if (state == 'is-success'){
|
|
53
|
-
$refs.successText.innerText = '{{ params.success.text if params.success.text else "Acción realizada con éxito"}}';
|
|
54
|
-
}
|
|
55
|
-
}"
|
|
56
|
-
class="{{ classNames }}"
|
|
57
|
-
data-module="c-button-loader"{% for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}{% endset %}
|
|
45
|
+
{%- set commonAttributes %} class="{{ classNames }}" data-module="c-button-loader"{% for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}{% endset %}
|
|
58
46
|
|
|
59
47
|
{#- Define common attributes we can use for both button and input types #}
|
|
60
48
|
|