desy-html 7.1.2 → 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 +32 -54
- package/docs/ds/_ds.section.typography.njk +239 -236
- package/docs/index.html +8 -0
- package/package.json +1 -1
- 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
|
@@ -13,94 +13,94 @@
|
|
|
13
13
|
{% set innerHtml %}
|
|
14
14
|
<ul data-module="c-menubar" id="{{ params.id }}-menubar" class="lg:flex lg:flex-wrap" role="menubar" aria-label="{{ params.ariaLabel }}" {%- if params.label %} aria-describedby="{{ params.id }}-label"{% endif %}>
|
|
15
15
|
{% for item in params.items %}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{%- endif -%}
|
|
16
|
+
{% if item %}
|
|
17
|
+
{#- If the user explicitly sets an id, use this instead of the regular idPrefix -#}
|
|
18
|
+
{%- if item.id -%}
|
|
19
|
+
{%- set id = item.id -%}
|
|
20
|
+
{%- else -%}
|
|
21
|
+
{#- The first id should not have a number suffix so it's easy to link to from the error summary component -#}
|
|
22
|
+
{%- if loop.first -%}
|
|
23
|
+
{%- set id = idPrefix %}
|
|
24
|
+
{% else %}
|
|
25
|
+
{%- set id = idPrefix + "-" + loop.index -%}
|
|
27
26
|
{%- endif -%}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
27
|
+
{%- endif -%}
|
|
28
|
+
{% set subId = "sub-" + id %}
|
|
29
|
+
<li class="relative" role="none">
|
|
30
|
+
{% if item.sub %}
|
|
31
|
+
<a href="#" role="menuitem" aria-haspopup="true" aria-expanded="false" class="c-menubar__button {%- if item.classes %} {{ item.classes }}{% endif %} {%- if item.disabled %} c-menubar__button--disabled{% endif %} {%- if item.active %} c-menubar__button--primary{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %} {% if item.disabled %} aria-disabled="true" tabindex="-1"{% endif %} id="{{ id }}"
|
|
32
|
+
{%- if item.sub.html %} data-aria-controls="{{ subId }}"{% endif %}
|
|
33
|
+
{%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
34
|
+
<span class="inline-flex self-center max-w-xs align-middle truncate">{{ item.html | safe if item.html else item.text }}</span>
|
|
35
|
+
{# Indentation is intentional to output HTML nicely #}
|
|
36
|
+
{{- iconHtml | safe | trim if iconHtml -}}
|
|
37
|
+
</a>
|
|
38
|
+
{% endif %}
|
|
39
|
+
{% if item.href and not item.sub %}
|
|
40
|
+
<a role="menuitem" {%- if id %} id="{{ id }}"{% endif %} {%- if item.href %} href="{{ item.href }}"{% endif %} class="c-menubar__button {%- if item.classes %} {{ item.classes }}{% endif %} {%- if item.disabled %} c-menubar__button--disabled{% endif %} {%- if item.active %} c-menubar__button--primary{% 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 -%}>
|
|
41
|
+
{{ item.html | safe if item.html else item.text }}
|
|
42
|
+
</a>
|
|
43
|
+
{% endif %}
|
|
44
|
+
{% if item.sub.items %}
|
|
45
|
+
<ul role="menu" class="c-menubar__tooltip w-max max-w-64 hidden border border-neutral-base shadow-md bg-white text-sm {%- if item.sub.classes %} {{ item.sub.classes }}{% endif %}" aria-label="{{ item.ariaLabel }}" {%- for attribute, value in item.sub.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
46
|
+
{% for subitem in item.sub.items %}
|
|
47
|
+
{% if subitem %}
|
|
48
|
+
{#- If the user explicitly sets an id, use this instead of the regular idPrefix -#}
|
|
49
|
+
{%- if subitem.id -%}
|
|
50
|
+
{%- set subId = subitem.id -%}
|
|
51
|
+
{%- else -%}
|
|
52
|
+
{#- The first id should not have a number suffix so it's easy to link to from the error summary component -#}
|
|
53
|
+
{%- if loop.first -%}
|
|
54
|
+
{%- set subId = "sub-" + id %}
|
|
55
|
+
{% else %}
|
|
56
|
+
{%- set subId = "sub-" + id + "-" + loop.index -%}
|
|
57
|
+
{%- endif -%}
|
|
58
|
+
{%- endif %}
|
|
59
|
+
{% if subitem.role == 'none' %}
|
|
60
|
+
<li role="none" id="{{ subId }}" data-option="{{ subId }}">
|
|
61
|
+
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
62
|
+
</li>
|
|
63
|
+
{% elseif subitem.role == 'group' %}
|
|
64
|
+
<li role="none">
|
|
65
|
+
<ul role="group" id="{{ subId }}" data-option="{{ subId }}" {%- if subitem.ariaLabel %} aria-label="{{ subitem.ariaLabel }}"{% endif %}>
|
|
66
|
+
{% for subsubitem in subitem.items %}
|
|
67
|
+
{% if subsubitem %}
|
|
68
|
+
{#- If the user explicitly sets an id, use this instead of the regular idPrefix -#}
|
|
69
|
+
{%- if subsubitem.id -%}
|
|
70
|
+
{%- set subsubId = subsubitem.id -%}
|
|
71
|
+
{%- else -%}
|
|
72
|
+
{#- The first id should not have a number suffix so it's easy to link to from the error summary component -#}
|
|
73
|
+
{%- if loop.first -%}
|
|
74
|
+
{%- set subsubId = "sub-" + subId %}
|
|
55
75
|
{% else %}
|
|
56
|
-
{%- set
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
{%- if subsubitem.id -%}
|
|
70
|
-
{%- set subsubId = subsubitem.id -%}
|
|
71
|
-
{%- else -%}
|
|
72
|
-
{#- The first id should not have a number suffix so it's easy to link to from the error summary component -#}
|
|
73
|
-
{%- if loop.first -%}
|
|
74
|
-
{%- set subsubId = "sub-" + subId %}
|
|
75
|
-
{% else %}
|
|
76
|
-
{%- set subsubId = "sub-" + subId + "-" + loop.index -%}
|
|
77
|
-
{%- endif -%}
|
|
78
|
-
{%- endif %}
|
|
79
|
-
<li {%- if subsubitem.role %} role="{{ subsubitem.role}}"{% endif %}{% if subsubitem.role == 'menuitemcheckbox' or subsubitem.role == 'menuitemradio' %} aria-checked="{% if subsubitem.checked %}{{ subsubitem.checked }}{% else %}false{% endif %}"{% endif %} class="flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white" id="{{ subsubId }}" data-option="{{ subsubId }}">
|
|
80
|
-
{{ subsubitem.html | safe if subsubitem.html else subsubitem.text }}
|
|
81
|
-
</li>
|
|
82
|
-
{% endif %}
|
|
83
|
-
{% endfor %}
|
|
84
|
-
</ul>
|
|
85
|
-
</li>
|
|
86
|
-
{% elseif subitem.role == 'menuitem' %}
|
|
87
|
-
<li role="menuitem" id="{{ subId }}" data-option="{{ subId }}" class="flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white focus:bg-primary-base focus:text-white focus:outline-none" >
|
|
88
|
-
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
89
|
-
</li>
|
|
90
|
-
{% elseif subitem.role == 'menuitemcheckbox' %}
|
|
91
|
-
<li role="menuitemcheckbox" aria-checked="{% if subitem.checked %}{{ subitem.checked }}{% else %}false{% endif %}" class="flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white" id="{{ subId }}" data-option="{{ subId }}">
|
|
92
|
-
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
93
|
-
</li>
|
|
94
|
-
{% elseif subitem.role == 'separator' %}
|
|
95
|
-
<li role="separator" id="{{ subId }}" class="my-sm border-b border-neutral-base">
|
|
96
|
-
</li>
|
|
97
|
-
{% endif %}
|
|
98
|
-
{% endif %}
|
|
99
|
-
{% endfor %}
|
|
100
|
-
</ul>
|
|
101
|
-
{% endif %}
|
|
76
|
+
{%- set subsubId = "sub-" + subId + "-" + loop.index -%}
|
|
77
|
+
{%- endif -%}
|
|
78
|
+
{%- endif %}
|
|
79
|
+
<li {%- if subsubitem.role %} role="{{ subsubitem.role}}"{% endif %}{% if subsubitem.role == 'menuitemcheckbox' or subsubitem.role == 'menuitemradio' %} aria-checked="{% if subsubitem.checked %}{{ subsubitem.checked }}{% else %}false{% endif %}"{% endif %} class="flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white" id="{{ subsubId }}" data-option="{{ subsubId }}">
|
|
80
|
+
{{ subsubitem.html | safe if subsubitem.html else subsubitem.text }}
|
|
81
|
+
</li>
|
|
82
|
+
{% endif %}
|
|
83
|
+
{% endfor %}
|
|
84
|
+
</ul>
|
|
85
|
+
</li>
|
|
86
|
+
{% elseif subitem.role == 'menuitem' %}
|
|
87
|
+
<li role="menuitem" id="{{ subId }}" data-option="{{ subId }}" class="flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white focus:bg-primary-base focus:text-white focus:outline-none" >
|
|
88
|
+
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
102
89
|
</li>
|
|
90
|
+
{% elseif subitem.role == 'menuitemcheckbox' %}
|
|
91
|
+
<li role="menuitemcheckbox" aria-checked="{% if subitem.checked %}{{ subitem.checked }}{% else %}false{% endif %}" class="flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white" id="{{ subId }}" data-option="{{ subId }}">
|
|
92
|
+
{{ subitem.html | safe if subitem.html else subitem.text }}
|
|
93
|
+
</li>
|
|
94
|
+
{% elseif subitem.role == 'separator' %}
|
|
95
|
+
<li role="separator" id="{{ subId }}" class="my-sm border-b border-neutral-base">
|
|
96
|
+
</li>
|
|
97
|
+
{% endif %}
|
|
98
|
+
{% endif %}
|
|
99
|
+
{% endfor %}
|
|
100
|
+
</ul>
|
|
103
101
|
{% endif %}
|
|
102
|
+
</li>
|
|
103
|
+
{% endif %}
|
|
104
104
|
{% endfor %}
|
|
105
105
|
</ul>
|
|
106
106
|
{% endset -%}
|
|
@@ -108,13 +108,13 @@
|
|
|
108
108
|
<!-- menubar -->
|
|
109
109
|
<div id="{{ params.id }}" class="c-menubar {%- if params.classes %} {{ params.classes }}{% endif %}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
|
110
110
|
{% if params.label %}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
<div id="{{ params.id }}-label" class="mb-sm {%- if params.label.classes %} {{ params.label.classes }}{% endif %}">
|
|
112
|
+
{% if params.label.html %}
|
|
113
|
+
{{ params.label.html | safe}}
|
|
114
|
+
{% else %}
|
|
115
|
+
<p>{{ params.label.text }}</p>
|
|
116
|
+
{% endif %}
|
|
117
|
+
</div>
|
|
118
118
|
{% endif %}
|
|
119
119
|
{{ innerHtml | trim | safe }}
|
|
120
120
|
</div>
|
|
@@ -23,97 +23,107 @@
|
|
|
23
23
|
{% endif %}
|
|
24
24
|
</div>
|
|
25
25
|
{% endif %}
|
|
26
|
-
{% set titleAttributes %}
|
|
27
|
-
id="{{ labelledId }}" class="{% if params.title.classes %}{{ params.title.classes }}{% else %}c-h2 px-base text-center focus:outline-none focus:underline{% endif %}" tabindex="-1"
|
|
28
|
-
{% endset %}
|
|
26
|
+
{% set titleAttributes %}id="{{ labelledId }}" class="{% if params.title.classes %}{{ params.title.classes }}{% else %}c-h2 px-base text-center focus:outline-none focus:underline{% endif %}" tabindex="-1"{% endset %}
|
|
29
27
|
{% if params.headingLevel == "1" %}
|
|
30
|
-
|
|
28
|
+
<h1 {{ titleAttributes | safe }}>
|
|
29
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
30
|
+
</h1>
|
|
31
31
|
{% elseif params.headingLevel == "2" %}
|
|
32
|
-
|
|
32
|
+
<h2 {{ titleAttributes | safe }}>
|
|
33
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
34
|
+
</h2>
|
|
33
35
|
{% elseif params.headingLevel == "3" %}
|
|
34
|
-
|
|
36
|
+
<h3 {{ titleAttributes | safe }}>
|
|
37
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
38
|
+
</h3>
|
|
35
39
|
{% elseif params.headingLevel == "4" %}
|
|
36
|
-
|
|
40
|
+
<h4 {{ titleAttributes | safe }}>
|
|
41
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
42
|
+
</h4>
|
|
37
43
|
{% elseif params.headingLevel == "5" %}
|
|
38
|
-
|
|
44
|
+
<h5 {{ titleAttributes | safe }}>
|
|
45
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
46
|
+
</h5>
|
|
39
47
|
{% else %}
|
|
40
|
-
|
|
48
|
+
<h2 {{ titleAttributes | safe }}>
|
|
49
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
50
|
+
</h2>
|
|
41
51
|
{% endif %}
|
|
42
52
|
{% if params.description.text %}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
<p class="{% if params.description.classes %}{{ params.description.classes }}{% else %}c-p my-base text-center{% endif %}">
|
|
54
|
+
{{ params.description.text }}
|
|
55
|
+
</p>
|
|
46
56
|
{% elseif params.description.html %}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
<div class="{% if params.description.classes %}{{ params.description.classes }}{% else %}c-paragraph-base my-base text-center{% endif %}">
|
|
58
|
+
{{ params.description.html | safe }}
|
|
59
|
+
</div>
|
|
50
60
|
{% endif %}
|
|
51
61
|
{% if caller %}
|
|
52
62
|
{% set myCaller = caller() %}
|
|
53
63
|
{% if myCaller | string != '' %}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
64
|
+
<div class="p-base">
|
|
65
|
+
{{ myCaller }}
|
|
66
|
+
</div>
|
|
57
67
|
{% endif %}
|
|
58
68
|
{% elseif params.caller %}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
<div class="p-base">
|
|
70
|
+
{{ params.caller | safe }}
|
|
71
|
+
</div>
|
|
62
72
|
{% endif %}
|
|
63
73
|
<div class="flex flex-wrap gap-sm w-full {% if params.itemsPrimary and params.itemsSecondary %}justify-between{% else %}justify-center{% endif %}">
|
|
64
74
|
{% if params.itemsPrimary %}
|
|
65
75
|
{% if params.itemsPrimary.length > 1 %}
|
|
66
|
-
|
|
76
|
+
<ul class="flex flex-wrap gap-sm">
|
|
67
77
|
{% for item in params.itemsPrimary %}
|
|
68
|
-
|
|
78
|
+
<li>
|
|
69
79
|
{% if item.isButtonLoader %}
|
|
70
|
-
|
|
80
|
+
{{ componentButtonLoader(item) | indent(8) }}
|
|
71
81
|
{% else %}
|
|
72
|
-
|
|
82
|
+
{{ componentButton(item) | indent(8) }}
|
|
73
83
|
{% endif %}
|
|
74
|
-
|
|
84
|
+
</li>
|
|
75
85
|
{% endfor %}
|
|
76
|
-
|
|
86
|
+
</ul>
|
|
77
87
|
{% else %}
|
|
78
|
-
|
|
88
|
+
<div class="mt-sm">
|
|
79
89
|
{% if params.itemsPrimary[0].isButtonLoader %}
|
|
80
|
-
|
|
90
|
+
{{ componentButtonLoader(params.itemsPrimary[0]) | indent(6) }}
|
|
81
91
|
{% else %}
|
|
82
|
-
|
|
92
|
+
{{ componentButton(params.itemsPrimary[0]) | indent(6) }}
|
|
83
93
|
{% endif %}
|
|
84
|
-
|
|
94
|
+
</div>
|
|
85
95
|
{% endif %}
|
|
86
96
|
{% endif %}
|
|
87
97
|
{% if params.itemsSecondary %}
|
|
88
98
|
{% if params.itemsSecondary.length > 1 %}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{% else %}
|
|
95
|
-
{{ componentButton(item) }}
|
|
96
|
-
{% endif %}
|
|
97
|
-
</li>
|
|
98
|
-
{% endfor %}
|
|
99
|
-
</ul>
|
|
100
|
-
{% else %}
|
|
101
|
-
<div class="mt-sm">
|
|
102
|
-
{% if params.itemsSecondary[0].isButtonLoader %}
|
|
103
|
-
{{ componentButtonLoader(params.itemsSecondary[0]) }}
|
|
99
|
+
<ul class="flex flex-wrap gap-sm">
|
|
100
|
+
{% for item in params.itemsSecondary %}
|
|
101
|
+
<li>
|
|
102
|
+
{% if item.isButtonLoader %}
|
|
103
|
+
{{ componentButtonLoader(item) | indent(8) }}
|
|
104
104
|
{% else %}
|
|
105
|
-
|
|
105
|
+
{{ componentButton(item) | indent(8) }}
|
|
106
106
|
{% endif %}
|
|
107
|
-
|
|
107
|
+
</li>
|
|
108
|
+
{% endfor %}
|
|
109
|
+
</ul>
|
|
110
|
+
{% else %}
|
|
111
|
+
<div class="mt-sm">
|
|
112
|
+
{% if params.itemsSecondary[0].isButtonLoader %}
|
|
113
|
+
{{ componentButtonLoader(params.itemsSecondary[0]) | indent(6) }}
|
|
114
|
+
{% else %}
|
|
115
|
+
{{ componentButton(params.itemsSecondary[0]) | indent(6) }}
|
|
116
|
+
{% endif %}
|
|
117
|
+
</div>
|
|
108
118
|
{% endif %}
|
|
109
119
|
{% endif %}
|
|
110
120
|
</div>
|
|
111
121
|
{% if params.isDismissible %}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
122
|
+
<div class="absolute top-0 right-0 p-sm lg:p-base">
|
|
123
|
+
<button onclick="closeDialog(this)" class="p-sm focus:bg-warning-base focus:border-warning-base focus:shadow-outline-black focus:text-black focus:outline-none" aria-label="X: Cerrar la ventana emergente">
|
|
124
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" class="w-4 h-4" aria-hidden="true" role="presentation"><path 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" fill="currentColor"/></svg>
|
|
125
|
+
</button>
|
|
126
|
+
</div>
|
|
117
127
|
{% endif %}
|
|
118
128
|
</div>
|
|
119
129
|
<!-- /modal -->
|
|
@@ -23,24 +23,24 @@
|
|
|
23
23
|
{% endif %}
|
|
24
24
|
{% endif %}
|
|
25
25
|
{% set commonItemAttributes %}{% if id %} id="{{ id }}"{% endif %} {%- if item.title %} title="{{ item.title }}"{% endif %} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}{% endset %}
|
|
26
|
-
|
|
26
|
+
<li>
|
|
27
27
|
{% if item.active %}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
<span class="flex items-center px-base py-sm font-semibold {%- if item.classes %} {{ item.classes }}{% endif -%}" {% if params.isMenu %} aria-current="true" {% else %} aria-current="page" {% endif %} {{- commonItemAttributes | safe }}>
|
|
29
|
+
<strong>{{ item.html | safe if item.html else item.text }}</strong>
|
|
30
|
+
</span>
|
|
31
31
|
{% else %}
|
|
32
|
-
|
|
32
|
+
<a href="{{ item.href }}" class="flex items-center px-base py-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black{%- if item.classes %} {{ item.classes }}{% endif -%} {%- if item.disabled %} pointer-events-none{% endif -%}" {%- if item.disabled %} aria-disabled="true" tabindex="-1"{% endif -%} {%- if item.target %} target="{{ item.target }}"{% endif %} {{- commonItemAttributes | safe }}>
|
|
33
33
|
{{ item.html | safe if item.html else item.text }}
|
|
34
34
|
{% if item.disabled %}
|
|
35
|
-
|
|
35
|
+
<svg viewBox="0 0 140 140" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="inline-block align-middle ml-sm text-neutral-base fill-current" aria-hidden="true" focusable="false" ><path d="M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zM20 70a50 50 0 0174.8-43.4 2.51 2.51 0 011.23 1.84 2.48 2.48 0 01-.71 2.1L30.54 95.32a2.51 2.51 0 01-3.94-.52A49.63 49.63 0 0120 70zm100 0a50 50 0 01-74.8 43.4 2.51 2.51 0 01-1.23-1.84 2.48 2.48 0 01.71-2.1l64.78-64.78a2.51 2.51 0 013.94.52A49.63 49.63 0 01120 70z"/></svg>
|
|
36
36
|
{% endif %}
|
|
37
|
-
|
|
37
|
+
</a>
|
|
38
38
|
{% endif %}
|
|
39
|
-
|
|
39
|
+
</li>
|
|
40
40
|
{% if item.divider %}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
<li class="my-sm border-b border-neutral-base" aria-hidden="true">
|
|
42
|
+
<div class="sr-only">Separador</div>
|
|
43
|
+
</li>
|
|
44
44
|
{% endif %}
|
|
45
45
|
{% endif %}
|
|
46
46
|
{% endfor %}
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
<!-- nav -->
|
|
50
50
|
{% if params.hasNav == false %}
|
|
51
51
|
<ul {{- commonAttributes | safe }}>
|
|
52
|
-
{{ innerHtml |
|
|
52
|
+
{{ innerHtml | safe | indent(2) }}
|
|
53
53
|
</ul>
|
|
54
54
|
{% else %}
|
|
55
55
|
<nav {{- commonAttributes | safe }}>
|
|
56
56
|
<ul>
|
|
57
|
-
{{ innerHtml |
|
|
57
|
+
{{ innerHtml | safe | indent(4) }}
|
|
58
58
|
</ul>
|
|
59
59
|
</nav>
|
|
60
60
|
{% endif %}
|
|
@@ -137,15 +137,6 @@
|
|
|
137
137
|
"id": "headinglevel"
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
|
-
{
|
|
141
|
-
"name": "default with html",
|
|
142
|
-
"data": {
|
|
143
|
-
"title":{
|
|
144
|
-
"html": "Las <a href=\" # \" class=\" c-link \">entidades beneficiarias</a> deberán tener: su sede y actividad principal en Aragón."
|
|
145
|
-
},
|
|
146
|
-
"id": "default-with-html"
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
140
|
{
|
|
150
141
|
"name": "with mixed params",
|
|
151
142
|
"data": {
|
|
@@ -16,52 +16,62 @@
|
|
|
16
16
|
{% endif %}
|
|
17
17
|
<div class="lg:flex flex-1 self-center">
|
|
18
18
|
<div class="lg:flex-1 lg:self-center">
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
19
|
+
{% set titleAttributes %}id="{{ params.id }}-title" class="font-bold pr-base focus:outline-none focus:underline {%- if params.title.classes %} {{ params.title.classes }}{% endif %}" tabindex="-1"{% endset %}
|
|
20
|
+
{% if params.headingLevel == "1" %}
|
|
21
|
+
<h1 {{ titleAttributes | safe }}>
|
|
22
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
23
|
+
</h1>
|
|
24
|
+
{% elseif params.headingLevel == "2" %}
|
|
25
|
+
<h2 {{ titleAttributes | safe }}>
|
|
26
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
27
|
+
</h2>
|
|
28
|
+
{% elseif params.headingLevel == "3" %}
|
|
29
|
+
<h3 {{ titleAttributes | safe }}>
|
|
30
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
31
|
+
</h3>
|
|
32
|
+
{% elseif params.headingLevel == "4" %}
|
|
33
|
+
<h4 {{ titleAttributes | safe }}>
|
|
34
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
35
|
+
</h4>
|
|
36
|
+
{% elseif params.headingLevel == "5" %}
|
|
37
|
+
<h5 {{ titleAttributes | safe }}>
|
|
38
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
39
|
+
</h5>
|
|
40
|
+
{% else %}
|
|
41
|
+
<p {{ titleAttributes | safe }}>
|
|
42
|
+
{{ params.title.html | safe if params.title.html else params.title.text }}
|
|
43
|
+
</p>
|
|
44
|
+
{% endif %}
|
|
45
|
+
{% if params.description %}
|
|
46
|
+
<p {%- if params.description.classes %} class="{{ params.description.classes }}"{% endif %}>
|
|
47
|
+
{{ params.description.html | safe if params.description.html else params.description.text }}
|
|
48
|
+
</p>
|
|
49
|
+
{% endif %}
|
|
50
|
+
{% if params.items %}
|
|
51
|
+
<ul>
|
|
52
|
+
{% for item in params.items %}
|
|
53
|
+
<li>
|
|
54
|
+
{% if item.href %}
|
|
55
|
+
<a href="{{ item.href }}" class="c-link {% if params.type == "alert" %} c-link--alert{% endif %}" {%- for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ item.html | safe if item.html else item.text }}</a>
|
|
56
|
+
{% else %}
|
|
57
|
+
{{ item.html | safe if item.html else item.text }}
|
|
58
|
+
{% endif %}
|
|
59
|
+
</li>
|
|
60
|
+
{% endfor %}
|
|
61
|
+
</ul>
|
|
62
|
+
{% endif %}
|
|
63
|
+
{% if params.content %}
|
|
64
|
+
<p class="text-sm {%- if params.content.classes %} {{ params.content.classes }}{% endif %}">
|
|
65
|
+
{{ params.content.html | safe if params.content.html else params.content.text }}
|
|
66
|
+
</p>
|
|
67
|
+
{% endif %}
|
|
58
68
|
</div>
|
|
59
69
|
{% if params.isDismissible %}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
<div class="absolute top-0 right-0 p-sm">
|
|
71
|
+
<button class="c-notification-button__close p-sm focus:bg-warning-base focus:border-warning-base focus:shadow-outline-black focus:text-black focus:outline-none" aria-label="X: Cerrar notificación">
|
|
72
|
+
<svg class="w-4 h-4 pointer-events-none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" width="1em" height="1em" aria-hidden="true" role="presentation"><path 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" fill="currentColor"/></svg>
|
|
73
|
+
</button>
|
|
74
|
+
</div>
|
|
65
75
|
{% endif %}
|
|
66
76
|
</div>
|
|
67
77
|
</div>
|