desy-html 5.2.2 → 6.1.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 +11 -21
- package/docs/_include.template-header.njk +16 -0
- package/docs/_macro.example-render.njk +16 -0
- package/docs/componentes.html +12 -0
- package/docs/ds/_ds.example.accordion.njk +61 -0
- package/docs/ds/_ds.example.footer.njk +7 -128
- package/docs/ds/_ds.example.header.njk +118 -0
- package/docs/ds/_ds.example.layout.njk +16 -6
- package/docs/ds/_ds.example.menu-navigation.njk +494 -0
- package/docs/ds/_ds.example.searchbar.njk +39 -0
- package/docs/ds/_ds.example.table.njk +432 -0
- package/docs/ds/_ds.example.toggle.njk +55 -35
- package/docs/ds/_ds.section.layout.njk +12 -12
- package/docs/ds/_ds.section.navigation.njk +5 -0
- package/docs/ds/_ds.section.textos.njk +27 -0
- package/docs/examples-accordion-history.html +5 -0
- package/docs/examples-header-advanced.html +5 -0
- package/docs/examples-header-mini.html +5 -0
- package/docs/examples-menu-navigation.html +5 -0
- package/docs/index.html +51 -0
- package/gulpfile.js +7 -6
- package/package.json +6 -7
- package/src/css/base.css +4 -0
- package/src/css/styles.css +1 -0
- package/src/js/aria/accordion.js +16 -5
- package/src/js/aria/disclosureMenu.js +153 -0
- package/src/js/desy-html.js +15 -0
- package/src/js/index.js +2 -0
- package/src/templates/components/accordion/_examples.accordion.njk +70 -2
- package/src/templates/components/accordion/_template.accordion.njk +18 -8
- package/src/templates/components/accordion/params.accordion.yaml +38 -0
- package/src/templates/components/accordion-history/_examples.accordion-history.njk +356 -0
- package/src/templates/components/accordion-history/_macro.accordion-history.njk +3 -0
- package/src/templates/components/accordion-history/_template.accordion-history.njk +209 -0
- package/src/templates/components/accordion-history/params.accordion-history.yaml +125 -0
- package/src/templates/components/button/_examples.button.njk +7 -0
- package/src/templates/components/button/_styles.button.css +27 -0
- package/src/templates/components/button/_template.button.njk +1 -1
- package/src/templates/components/button-loader/_template.button-loader.njk +6 -6
- package/src/templates/components/dropdown/_styles.dropdown.css +5 -4
- package/src/templates/components/file-upload/_examples.file-upload.njk +11 -5
- package/src/templates/components/file-upload/_template.file-upload.njk +1 -1
- package/src/templates/components/footer/_examples.footer.njk +46 -136
- package/src/templates/components/footer/_template.footer.njk +35 -28
- package/src/templates/components/footer/params.footer.yaml +18 -0
- package/src/templates/components/header/_examples.header.njk +167 -1
- package/src/templates/components/header/_template.header.header__navigation.njk +3 -3
- package/src/templates/components/header/_template.header.header__offcanvasButton.njk +1 -1
- package/src/templates/components/header/_template.header.header__subnav.njk +2 -2
- package/src/templates/components/header/_template.header.njk +8 -9
- package/src/templates/components/header/params.header.yaml +24 -0
- package/src/templates/components/header-advanced/_examples.header-advanced.njk +851 -0
- package/src/templates/components/header-advanced/_macro.header-advanced.njk +3 -0
- package/src/templates/components/header-advanced/_template.header-advanced.njk +146 -0
- package/src/templates/components/header-advanced/params.header-advanced.yaml +298 -0
- package/src/templates/components/header-mini/_examples.header-mini.njk +30 -0
- package/src/templates/components/header-mini/_macro.header-mini.njk +3 -0
- package/src/templates/components/header-mini/_template.header-mini.njk +14 -0
- package/src/templates/components/header-mini/params.header-mini.yaml +25 -0
- package/src/templates/components/input-group/_template.input-group.njk +2 -0
- package/src/templates/components/input-group/params.input-group.yaml +13 -5
- package/src/templates/components/item/_examples.item.njk +1 -1
- package/src/templates/components/item/_template.item.njk +3 -3
- package/src/templates/components/listbox/_styles.listbox.css +7 -4
- package/src/templates/components/menu-horizontal/_examples.menu-horizontal.njk +25 -0
- package/src/templates/components/menu-horizontal/_styles.menu-horizontal.css +26 -0
- package/src/templates/components/menu-horizontal/_template.menu-horizontal.njk +1 -1
- package/src/templates/components/menu-navigation/_examples.menu-navigation.njk +1080 -0
- package/src/templates/components/menu-navigation/_macro.menu-navigation.njk +3 -0
- package/src/templates/components/menu-navigation/_styles.menu-navigation.css +217 -0
- package/src/templates/components/menu-navigation/_template.menu-navigation.njk +116 -0
- package/src/templates/components/menu-navigation/params.menu-navigation.yaml +93 -0
- package/src/templates/components/menubar/_examples.menubar.njk +1 -170
- package/src/templates/components/menubar/_styles.menubar.css +26 -5
- package/src/templates/components/menubar/_template.menubar.njk +1 -1
- package/src/templates/components/modal/_examples.modal.njk +62 -0
- package/src/templates/components/modal/_template.modal.njk +21 -4
- package/src/templates/components/modal/params.modal.yaml +2 -2
- package/src/templates/components/searchbar/_examples.searchbar.njk +12 -1
- package/src/templates/components/searchbar/_template.searchbar.njk +9 -9
- package/src/templates/components/spinner/_styles.spinner.css +1 -0
- package/src/templates/components/spinner/_template.spinner.njk +4 -4
- package/src/templates/components/table-advanced/_examples.table-advanced.njk +182 -5
- package/src/templates/components/table-advanced/_template.table-advanced.njk +26 -2
- package/src/templates/components/table-advanced/params.table-advanced.yaml +5 -0
- package/src/templates/components/toggle/_examples.toggle.njk +33 -11
- package/src/templates/components/toggle/_template.toggle.njk +3 -1
- package/src/templates/components/toggle/params.toggle.yaml +4 -0
- package/src/templates/components/tree/_examples.tree.njk +580 -32
- package/src/templates/components/tree/_template.tree.njk +1 -1
- package/config/clean-css.js +0 -25
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
{% if params.icon.html %}
|
|
17
17
|
{{ params.icon.html | safe }}
|
|
18
18
|
{% elseif params.icon.type == 'document' %}
|
|
19
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
19
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-8 h-8 text-neutral-dark" aria-label="Icono de documento" focusable="false" role="img"><path d="m15.32 2.15 4.53 4.53A.49.49 0 0 1 20 7v14.5a.5.5 0 0 1-.5.5h-15a.5.5 0 0 1-.5-.5v-19a.5.5 0 0 1 .5-.5H15a.49.49 0 0 1 .32.15ZM15.59 0H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.41a1 1 0 0 0-.29-.7L16.29.29a1 1 0 0 0-.7-.29Z" fill="currentColor" transform="scale(2)"/><path d="M16 11H7a1 1 0 0 1 0-2h9a1 1 0 0 1 0 2ZM16 15H7a1 1 0 0 1 0-2h9a1 1 0 0 1 0 2ZM11.5 19H7a1 1 0 0 1 0-2h4.5a1 1 0 0 1 0 2Z" fill="currentColor" transform="scale(2)"/></svg>
|
|
20
20
|
{% elseif params.icon.type == 'link' %}
|
|
21
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
21
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-8 h-8 text-neutral-dark" aria-label="Icono de enlace" focusable="false" role="img"><path d="M12.41 14.91a1 1 0 0 0-.55 1.3 1 1 0 0 1-.21 1.09l-2.83 2.83a2 2 0 0 1-2.83 0L3.87 18a2 2 0 0 1 0-2.83l2.83-2.82a1 1 0 0 1 1.09-.21 1 1 0 0 0 .76-1.85 3 3 0 0 0-3.27.65l-2.83 2.83a4 4 0 0 0 0 5.65l2.13 2.13a4 4 0 0 0 5.65 0l2.83-2.83a3 3 0 0 0 .65-3.27 1 1 0 0 0-1.3-.54Z" fill="currentColor" transform="scale(2)"/><path d="M7.76 16.24a1 1 0 0 0 1.41 0L17 8.46a1 1 0 0 0-1.41-1.41l-7.83 7.78a1 1 0 0 0 0 1.41Z" fill="currentColor" transform="scale(2)"/><path d="m21.55 4.57-2.13-2.12a4 4 0 0 0-5.65 0l-2.83 2.83a3 3 0 0 0-.88 2.12 3 3 0 0 0 .23 1.15 1 1 0 0 0 1.85-.76 1 1 0 0 1-.08-.39 1 1 0 0 1 .29-.7l2.83-2.83a2 2 0 0 1 2.83 0L20.13 6a2 2 0 0 1 0 2.83l-2.83 2.81a1 1 0 0 1-1.09.22 1 1 0 0 0-1.3.54 1 1 0 0 0 .54 1.31 3 3 0 0 0 3.27-.65l2.83-2.83a4 4 0 0 0 0-5.66Z" fill="currentColor" transform="scale(2)"/></svg>
|
|
22
22
|
{% elseif params.icon.type == 'clipboard' %}
|
|
23
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
23
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="1em" height="1em" class="w-8 h-8 text-neutral-dark" aria-label="Icono de datos" focusable="false" role="img"><path d="M16.5 9h-9a.75.75 0 0 0 0 1.5h9a.75.75 0 0 0 0-1.5ZM17.25 13.25a.76.76 0 0 0-.75-.75h-9a.75.75 0 0 0 0 1.5h9a.76.76 0 0 0 .75-.75ZM10 6.5h4a1 1 0 0 0 1-1V3A3 3 0 0 0 13.82.62 3 3 0 0 0 9 3.09V5.5a1 1 0 0 0 1 1Zm1.25-3.75a.75.75 0 1 1 .75.75.76.76 0 0 1-.75-.75Z" fill="currentColor" transform="scale(2)"/><path d="M19.5 3h-2.75a.25.25 0 0 0-.25.25v1.5a.25.25 0 0 0 .25.25H19a.5.5 0 0 1 .5.5v12.79a.51.51 0 0 1-.15.36l-3.2 3.2a.49.49 0 0 1-.36.15H5a.5.5 0 0 1-.5-.5v-16A.5.5 0 0 1 5 5h2.25a.25.25 0 0 0 .25-.25v-1.5A.25.25 0 0 0 7.25 3H4.5a2 2 0 0 0-2 2v17a2 2 0 0 0 2 2h15a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2Z" fill="currentColor" transform="scale(2)"/><path d="M7.5 16a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5Z" fill="currentColor" transform="scale(2)"/></svg>
|
|
24
24
|
{% endif %}
|
|
25
25
|
</div>
|
|
26
26
|
{% endif %}
|
|
@@ -80,11 +80,14 @@
|
|
|
80
80
|
@apply font-bold;
|
|
81
81
|
|
|
82
82
|
&::before {
|
|
83
|
-
|
|
83
|
+
@apply bg-center bg-no-repeat bg-cover;
|
|
84
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg transform='matrix(3.4285714285714284,0,0,3.4285714285714284,0,0)'%3E%3Cpath d='M4,12.5a2,2,0,0,1-1.55-.78L.25,9.23A1,1,0,0,1,.34,7.81a1,1,0,0,1,1.41.1l2.06,2.33a.21.21,0,0,0,.18.09.23.23,0,0,0,.18-.08l8.11-8.44a1,1,0,0,1,1.44,1.38l-8.2,8.63A1.94,1.94,0,0,1,4,12.5Z' style='fill: %23000000'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
|
|
85
|
+
content: '';
|
|
86
|
+
@apply w-3;
|
|
87
|
+
@apply h-3;
|
|
84
88
|
@apply absolute;
|
|
85
|
-
@apply top-
|
|
86
|
-
@apply left-
|
|
87
|
-
@apply p-sm;
|
|
89
|
+
@apply top-3;
|
|
90
|
+
@apply left-2;
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
93
|
}
|
|
@@ -161,6 +161,31 @@
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
},
|
|
164
|
+
{
|
|
165
|
+
"name": "with classes applied: tabs in mobile",
|
|
166
|
+
"description": "Modifier class applied: .c-menu-horizontal--tabs-mobile",
|
|
167
|
+
"data": {
|
|
168
|
+
"classes": "c-menu-horizontal--tabs-mobile",
|
|
169
|
+
"items": [
|
|
170
|
+
{
|
|
171
|
+
"href": "#",
|
|
172
|
+
"html": '<span class="flex flex-col items-center"><span class="block"><svg class="w-6 h-6 mb-xs" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" aria-hidden="true" focusable="false" width="1em" height="1em"><g transform="scale(2)"><circle cx="2.5" cy="4" r="2.5" fill="currentColor"/><path d="M8.5 5H23a1 1 0 0 0 0-2H8.5a1 1 0 0 0 0 2Z" fill="currentColor"/><circle cx="2.5" cy="12" r="2.5" fill="currentColor"/><path d="M23 11H8.5a1 1 0 0 0 0 2H23a1 1 0 0 0 0-2Z" fill="currentColor"/><circle cx="2.5" cy="20" r="2.5" fill="currentColor"/><path d="M23 19H8.5a1 1 0 0 0 0 2H23a1 1 0 0 0 0-2Z" fill="currentColor"/></g></svg></span><span class="block text-sm">Seguimiento</span></span>'
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"href": "#",
|
|
176
|
+
"html": '<span class="flex flex-col items-center"><span class="block"><svg class="w-6 h-6 mb-xs" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" aria-hidden="true" focusable="false" width="1em" height="1em"><path d="M11 8h3.5a1 1 0 0 0 0-2H11a1 1 0 0 0 0 2ZM11 12h7.5a1 1 0 0 0 0-2H11a1 1 0 0 0 0 2Z" fill="currentColor" transform="scale(2)"/><path d="M23.71 5.71 18.29.29a1 1 0 0 0-.7-.29H8a2 2 0 0 0-2 2v11.17c0 .19.1.33.25.33h1.5a.25.25 0 0 0 .25-.25v-11A.25.25 0 0 1 8.25 2h8.82a.31.31 0 0 1 .18.07l4.68 4.68a.31.31 0 0 1 .07.18v12.82a.25.25 0 0 1-.25.25h-6a.25.25 0 0 0-.25.25v1.5a.25.25 0 0 0 .25.25H22a2 2 0 0 0 2-2V6.41a1 1 0 0 0-.29-.7Z" fill="currentColor" transform="scale(2)"/><path d="M13 15H6a1 1 0 0 1-.8-.4l-.9-1.2a1 1 0 0 0-.8-.4H1a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-7a1 1 0 0 0-1-1Z" fill="currentColor" transform="scale(2)"/></svg></span><span class="block text-sm">Documentos</span></span>',
|
|
177
|
+
"active": true
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"href": "#",
|
|
181
|
+
"html": '<span class="flex flex-col items-center"><span class="block"><svg class="w-6 h-6 mb-xs" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" aria-hidden="true" focusable="false" width="1em" height="1em"><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-.7ZM19.5 22h-15a.5.5 0 0 1-.5-.5v-19a.5.5 0 0 1 .5-.5h1.75a.25.25 0 0 1 .25.25V13a.5.5 0 0 0 .31.46.47.47 0 0 0 .54-.11l2-2a.27.27 0 0 1 .36 0l2 2a.47.47 0 0 0 .35.15.43.43 0 0 0 .19 0 .5.5 0 0 0 .25-.5V2.25a.25.25 0 0 1 .25-.25H15a.49.49 0 0 1 .36.15l4.53 4.53A.49.49 0 0 1 20 7v14.5a.5.5 0 0 1-.5.5Z" fill="currentColor" transform="scale(2)"/></svg></span><span class="block text-sm">Notificaciones</span></span>'
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"attributes": {
|
|
185
|
+
"aria-label": "Menu horizontal"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
164
189
|
{
|
|
165
190
|
"name": "with idPrefix",
|
|
166
191
|
"description": "See code to display the idPrefix applied",
|
|
@@ -20,6 +20,32 @@
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
.c-menu-horizontal--tabs-mobile {
|
|
24
|
+
@apply w-full;
|
|
25
|
+
@apply border-b;
|
|
26
|
+
@apply border-neutral-dark;
|
|
27
|
+
|
|
28
|
+
.c-menu-horizontal__list {
|
|
29
|
+
@apply flex;
|
|
30
|
+
@apply -mb-0.5;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.c-menu-horizontal__active {
|
|
34
|
+
@apply px-base;
|
|
35
|
+
@apply py-base;
|
|
36
|
+
@apply bg-white;
|
|
37
|
+
@apply border-neutral-base;
|
|
38
|
+
@apply border-b-0;
|
|
39
|
+
@apply rounded-t;
|
|
40
|
+
@apply no-underline;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.c-menu-horizontal__link {
|
|
44
|
+
@apply px-base;
|
|
45
|
+
@apply py-base;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
23
49
|
.c-menu-horizontal__link {
|
|
24
50
|
&:focus span{
|
|
25
51
|
@apply bg-warning-base;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</span>
|
|
27
27
|
{% else %}
|
|
28
28
|
<a {%- if id %} id="{{ id }}"{% endif %} href="{{ item.href }}" class="c-menu-horizontal__link relative flex items-center py-sm lg:px-lg lg:py-base border border-transparent text-black hover:text-primary-base underline truncate focus:outline-none
|
|
29
|
-
{%- if item.disabled %} no-underline pointer-events-none{% endif -%}" {%- if item.title %} title="{{ item.title }}"{% endif -%} {%- if item.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
29
|
+
{%- if item.disabled %} no-underline pointer-events-none{% endif -%} {%- if item.classes %} {{ item.classes }}{% endif -%}" {%- if item.title %} title="{{ item.title }}"{% endif -%} {%- if item.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
30
30
|
<span class="flex items-center pointer-events-none">
|
|
31
31
|
{{ item.html | safe if item.html else item.text }}
|
|
32
32
|
</span>
|