Skip to content

Commit a944b20

Browse files
committed
temp
1 parent 6f189d2 commit a944b20

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

src/bundle/Resources/views/themes/standard/design-system/partials/base_input.html.twig

Whitespace-only changes.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{% import ids_get('design-system/macros/html') as html %}
2+
3+
{% set size = size|default('medium') %}
4+
{% set type = type|default('default') %}
5+
{% set title = title|default('') %}
6+
{% set attr = attr|default({}) %}
7+
8+
{% set ICONS_TYPE_MAP = {
9+
default: 'info-circle',
10+
error: 'alert-error',
11+
info: 'message-bubble-info',
12+
success: 'check-circle',
13+
warning: 'alert-warning',
14+
} %}
15+
{% set ICONS_SIZE_MAP = {
16+
medium: 'small',
17+
small: 'tiny-small',
18+
} %}
19+
20+
{% set classes =
21+
ids_create_css_class(
22+
{
23+
'ids-helper-text': true,
24+
('ids-helper-text--' ~ size): true,
25+
('ids-helper-text--' ~ type): true,
26+
},
27+
attr
28+
)
29+
%}
30+
{% set attr =
31+
attr|merge({
32+
class: classes,
33+
title: title,
34+
})
35+
%}
36+
37+
<div {{ html.attributes(attr) }}>
38+
{% block icon_wrapper %}
39+
<div class="ids-helper-text__icon-wrapper">
40+
{% block icon_content %}
41+
{{ include(ids_get('design-system/components/icon') , {
42+
attr: {
43+
class: 'ids-icon ids-helper-text__icon',
44+
},
45+
name: ICONS_TYPE_MAP[type],
46+
size: ICONS_SIZE_MAP[size],
47+
}) }}
48+
{% endblock %}
49+
</div>
50+
{% endblock %}
51+
{% block content_wrapper %}
52+
<div class="ids-helper-text__content-wrapper">
53+
{{ content|raw }}
54+
</div>
55+
{% endblock %}
56+
</div>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{% import ids_get('design-system/macros/html') as html %}
2+
3+
{% set error = error|default(false) %}
4+
{% set required = required|default(false) %}
5+
{% set title = title|default('') %}
6+
{% set attr = attr|default({}) %}
7+
8+
{% set classes =
9+
ids_create_css_class(
10+
{
11+
'ids-label': true,
12+
'ids-label--error': error,
13+
'ids-label--required': required,
14+
},
15+
attr
16+
)
17+
%}
18+
{% set attr =
19+
attr|merge({
20+
class: classes,
21+
'html-for': html_for,
22+
title: title,
23+
})
24+
%}
25+
26+
<label {{ html.attributes(attr) }}>
27+
{{ content|raw }}
28+
</label>

0 commit comments

Comments
 (0)