@openeuropa/bcl-form-input 0.4230.202512021730 → 0.4360.202601141610

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.
@@ -26,7 +26,7 @@
26
26
  - attributes (drupal attrs)
27
27
  #}
28
28
 
29
- {% set _id = id|default('') %}
29
+ {%- set _id = id|default('') %}
30
30
  {% set _input_type = input_type|default('text') %}
31
31
  {% set _label = label|default('') %}
32
32
  {% set _required = required ?? false %}
@@ -50,70 +50,70 @@
50
50
  {% set _toggle_variant = toggle_variant|default('primary') %}
51
51
  {% set _remove_wrapper = remove_wrapper ?? false %}
52
52
 
53
- {% set _label_block = false %}
53
+ {%- set _label_block = false %}
54
54
  {% set _label_class = 'form-label' %}
55
55
  {% set _classes = ['form-control'] %}
56
56
 
57
- {% if input_type == 'range' %}
58
- {% set _classes = ['form-range'] %}
57
+ {%- if input_type == 'range' %}
58
+ {%- set _classes = ['form-range'] %}
59
59
  {% endif %}
60
60
  {% if _input_type == 'checkbox' or _input_type == 'radio' %}
61
- {% set _classes = ['form-check-input'] %}
62
- {% set _label_class = 'form-check-label' %}
61
+ {%- set _classes = ['form-check-input'] %}
62
+ {%- set _label_class = 'form-check-label' %}
63
63
  {% endif %}
64
64
  {% if _invalid is not empty %}
65
- {% set _classes = _classes|merge(['is-invalid']) %}
65
+ {%- set _classes = _classes|merge(['is-invalid']) %}
66
66
  {% endif %}
67
67
  {% if _valid is not empty %}
68
- {% set _classes = _classes|merge(['is-valid']) %}
68
+ {%- set _classes = _classes|merge(['is-valid']) %}
69
69
  {% endif %}
70
70
  {% if _horizontal %}
71
- {% set _label_class = 'col-form-label ' ~ _horizontal_label_class %}
71
+ {%- set _label_class = 'col-form-label ' ~ _horizontal_label_class %}
72
72
  {% endif %}
73
73
  {% if _hidden_label %}
74
- {% set _label_class = _label_class ~ ' visually-hidden' %}
74
+ {%- set _label_class = _label_class ~ ' visually-hidden' %}
75
75
  {% endif %}
76
76
  {% if _toggle %}
77
- {% set _label_class = _label_class ~ ' btn btn-' ~ _toggle_variant %}
78
- {% set _classes = _classes|merge(['btn-check']) %}
77
+ {%- set _label_class = _label_class ~ ' btn btn-' ~ _toggle_variant %}
78
+ {%- set _classes = _classes|merge(['btn-check']) %}
79
79
  {% endif %}
80
80
 
81
- {% if attributes is empty %}
82
- {% set attributes = create_attribute() %}
81
+ {%- if attributes is empty %}
82
+ {%- set attributes = create_attribute() %}
83
83
  {% endif %}
84
84
 
85
- {% set attributes = attributes.addClass(_classes).setAttribute('type', _input_type) %}
85
+ {%- set attributes = attributes.addClass(_classes).setAttribute('type', _input_type) %}
86
86
 
87
- {% if _id %}
88
- {% set attributes = attributes.setAttribute('id', _id) %}
87
+ {%- if _id %}
88
+ {%- set attributes = attributes.setAttribute('id', _id) %}
89
89
  {% endif %}
90
90
 
91
- {% if _required %}
92
- {% set attributes = attributes.setAttribute('required', true) %}
91
+ {%- if _required %}
92
+ {%- set attributes = attributes.setAttribute('required', true) %}
93
93
  {% endif %}
94
94
 
95
- {% if _disabled %}
96
- {% set attributes = attributes.setAttribute('disabled', true) %}
95
+ {%- if _disabled %}
96
+ {%- set attributes = attributes.setAttribute('disabled', true) %}
97
97
  {% endif %}
98
98
 
99
- {% if _readonly %}
100
- {% set attributes = attributes.setAttribute('readonly', true) %}
99
+ {%- if _readonly %}
100
+ {%- set attributes = attributes.setAttribute('readonly', true) %}
101
101
  {% endif %}
102
102
 
103
- {% if _checked %}
104
- {% set attributes = attributes.setAttribute('checked', true) %}
103
+ {%- if _checked %}
104
+ {%- set attributes = attributes.setAttribute('checked', true) %}
105
105
  {% endif %}
106
106
 
107
- {% if _placeholder is not empty %}
108
- {% set attributes = attributes.setAttribute('placeholder', _placeholder) %}
107
+ {%- if _placeholder is not empty %}
108
+ {%- set attributes = attributes.setAttribute('placeholder', _placeholder) %}
109
109
  {% endif %}
110
110
 
111
- {% if _helper_text_id is not empty %}
112
- {% set attributes = attributes.setAttribute('aria-describedby', _helper_text_id) %}
111
+ {%- if _helper_text_id is not empty %}
112
+ {%- set attributes = attributes.setAttribute('aria-describedby', _helper_text_id) %}
113
113
  {% endif %}
114
114
 
115
- {% if _label is not empty %}
116
- {% set _label_block %}
115
+ {%- if _label is not empty %}
116
+ {%- set _label_block -%}
117
117
  <label
118
118
  {% if _id %}
119
119
  for="{{ _id }}"
@@ -122,50 +122,50 @@
122
122
  >
123
123
  {{- label -}}
124
124
  </label>
125
- {% endset %}
125
+ {%- endset %}
126
126
  {% endif %}
127
127
 
128
- {% if (_floating or _horizontal or _input_type == 'checkbox' or _input_type == 'radio') and
128
+ {%- if (_floating or _horizontal or _input_type == 'checkbox' or _input_type == 'radio') and
129
129
  not _toggle and
130
130
  not _remove_wrapper
131
131
  %}
132
- {% set _wrapper_class = _floating ? 'form-floating' : '' %}
132
+ {%- set _wrapper_class = _floating ? 'form-floating' : '' %}
133
133
  {% if (_input_type == 'checkbox' or _input_type == 'radio') %}
134
- {% set _wrapper_class = 'form-check' %}
135
- {% if _switch %}
136
- {% set _wrapper_class = _wrapper_class ~ ' form-switch' %}
137
- {% endif %}
134
+ {%- set _wrapper_class = 'form-check' %}
135
+ {%- if _switch %}
136
+ {%- set _wrapper_class = _wrapper_class ~ ' form-switch' %}
137
+ {%- endif %}
138
138
  {% endif %}
139
- {% if _wrapper_class is not empty %}
139
+ {% if _wrapper_class is not empty -%}
140
140
  <div class="{{ _wrapper_class }}">
141
- {% endif %}
141
+ {%- endif %}
142
142
  {% endif %}
143
143
  {% if _label_block and _floating == false and _input_type != 'checkbox' and _input_type != 'radio' %}
144
- {{ _label_block|raw }}
145
- {% endif %}
146
- {% if _horizontal and floating == false %}
144
+ {{- _label_block|raw }}
145
+ {%- endif %}
146
+ {% if _horizontal and floating == false -%}
147
147
  <div class="{{ _horizontal_class }}">
148
- {% endif %}
148
+ {%- endif -%}
149
149
  <input
150
150
  {{ attributes }}
151
151
  >
152
- {% if _horizontal and floating == false %}
152
+ {%- if _horizontal and floating == false -%}
153
153
  </div>
154
- {% endif %}
155
- {% if _label_block and (_floating or _input_type == 'checkbox' or _input_type == 'radio') %}
156
- {{ _label_block|raw }}
157
- {% endif %}
158
- {% if _invalid_feedback is not empty %}
154
+ {%- endif %}
155
+ {% if _label_block and (_floating or _input_type == 'checkbox' or _input_type == 'radio') %}
156
+ {{- _label_block|raw }}
157
+ {%- endif %}
158
+ {% if _invalid_feedback is not empty -%}
159
159
  <div class="invalid-feedback">
160
160
  {{- _invalid_feedback -}}
161
161
  </div>
162
- {% endif %}
163
- {% if _valid_feedback is not empty %}
162
+ {%- endif %}
163
+ {% if _valid_feedback is not empty -%}
164
164
  <div class="valid-feedback">
165
165
  {{- _valid_feedback -}}
166
166
  </div>
167
- {% endif %}
168
- {% if _helper_text is not empty %}
167
+ {%- endif %}
168
+ {% if _helper_text is not empty -%}
169
169
  <div
170
170
  class="form-text"
171
171
  {%- if _helper_text_id is not empty -%}
@@ -173,8 +173,7 @@
173
173
  {%- endif -%}>
174
174
  {{- _helper_text -}}
175
175
  </div>
176
- {% endif %}
177
- {% if _wrapper_class is not empty %}
176
+ {%- endif %}
177
+ {% if _wrapper_class is not empty -%}
178
178
  </div>
179
- {% endif %}
180
-
179
+ {%- endif -%}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@openeuropa/bcl-form-input",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.4230.202512021730",
5
+ "version": "0.4360.202601141610",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
@@ -21,5 +21,5 @@
21
21
  "design-system",
22
22
  "twig"
23
23
  ],
24
- "gitHead": "19735e328b2b53ccefbcc6829e2aaf149a2c438c"
24
+ "gitHead": "2caf9255f88587416f6e83e572a1f20e4cf206f5"
25
25
  }