@studiometa/ui 0.2.50 → 0.2.52

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.
@@ -41,5 +41,17 @@
41
41
  {% endif %}
42
42
 
43
43
  {% if twic_placeholder is defined %}
44
- {% set placeholder = src.withQueryParameter('twic', '%s/output=%s'|format(twic_param, twic_placeholder)) %}
44
+ {% if twic_placeholder in ['preview', 'meancolor', 'maincolor', 'blurhash', 'blank'] %}
45
+ {% set placeholder = src.withQueryParameter('twic', '%s/output=%s'|format(twic_param, twic_placeholder)) %}
46
+ {% else %}
47
+ {% set formatted_placeholder_transform = [] %}
48
+ {% for key, value in twic_placeholder %}
49
+ {% set key = key|replace({ _: '-' }) %}
50
+ {% set formatted_placeholder_transform = formatted_placeholder_transform|merge(['%s=%s'|format(key, value)]) %}
51
+ {% endfor %}
52
+ {% set formatted_placeholder_transform = formatted_placeholder_transform|join('/') %}
53
+
54
+ {% set placeholder = src.withQueryParameter('twic', '%s/%s'|format(twic_param, formatted_placeholder_transform)) %}
55
+ {% endif %}
45
56
  {% endif %}
57
+
@@ -40,7 +40,7 @@
40
40
  {% set icon_attributes = merge_html_attributes(icon_attr ?? null, { attr: { class: 'inline-block mb-2 s:mb-8' }, name: item.icon }) %}
41
41
  <div {{ html_attributes(item_attributes) }}>
42
42
  {% block icon %}
43
- {% if icon %}
43
+ {% if item.icon %}
44
44
  {% include '@ui/atoms/Icon/IconInlineImg.twig' with icon_attributes only %}
45
45
  {% endif %}
46
46
  {% endblock %}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studiometa/ui",
3
- "version": "0.2.50",
3
+ "version": "0.2.52",
4
4
  "description": "A set of opiniated, unstyled and accessible components",
5
5
  "publishConfig": {
6
6
  "access": "public"