@rijkshuisstijl-community/components-twig 1.1.0 → 1.1.1

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/dist/Heading.twig CHANGED
@@ -1,7 +1,10 @@
1
- {%- if appearance is not empty -%}
2
- {% set attributes = attributes|merge({'appearance': appearance}) %}
3
- {%- endif -%}
4
1
  {%- if level is empty -%}
5
- {% set level = 1 %}
2
+ {%- set level = 1 -%}
3
+ {%- endif -%}
4
+ {%- set classes = ['nl-heading'] -%}
5
+ {%- if appearance is not empty -%}
6
+ {%- set classes = classes|merge(['nl-heading--level-' ~ appearance]) -%}
7
+ {%- else -%}
8
+ {%- set classes = classes|merge(['nl-heading--level-' ~ level]) -%}
6
9
  {%- endif -%}
7
- <h{{ level }}{{ attributes }}>{{ children }}</h{{ level }}>
10
+ <h{{ level }}{{ attributes.addClass(classes) }}>{{ children }}</h{{ level }}>
package/dist/Icon.twig CHANGED
@@ -1,21 +1,7 @@
1
- {%- set attributes = attributes|default({'class': []})|merge({
2
- 'class': attributes.class|default(['utrecht-icon']),
3
- 'role': 'presentation',
4
- 'aria-hidden': 'true'
5
- }) -%}
6
- {%- set svg_attributes = svg_attributes|default({
7
- 'class':['icon','icon-tabler','icon-tabler-' ~ icon],
8
- 'xmlns':'http://www.w3.org/2000/svg',
9
- 'width': 24,
10
- 'height': 24,
11
- 'viewBox': '0 0 24 24',
12
- 'fill': 'none',
13
- 'stroke': 'currentColor',
14
- 'stroke-width': 2,
15
- 'stroke-linecap': 'round',
16
- 'stroke-linejoin': 'round'
17
- })
18
- -%}
1
+ {%- set attributes = attributes.addClass('utrecht-icon') -%}
2
+ {%- set attributes = attributes.setAttribute('role', 'presentation') -%}
3
+ {%- set attributes = attributes.setAttribute('aria-hidden', 'true') -%}
4
+ {%- set svg_attributes = svg_attributes.addClass('icon-tabler-' ~ icon) -%}
19
5
  <span{{ attributes }}>
20
6
  <svg{{ svg_attributes }}>
21
7
  <use xlink:href="node_modules/@tabler/icons-sprite/dist/tabler-sprite.svg#tabler-{{ icon }}" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rijkshuisstijl-community/components-twig",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "author": "Community for NL Design System",
5
5
  "description": "Twig component library for the Rijkshuisstijl Community repository, based on the NL Design System architecture",
6
6
  "license": "EUPL-1.2",