@ilo-org/twig 0.7.0 → 0.8.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/.turbo/turbo-build:lib.log +2 -2
- package/CHANGELOG.md +43 -0
- package/package.json +2 -2
- package/src/patterns/components/card/card.twig +18 -119
- package/src/patterns/components/card/card.wingsuit.yml +162 -223
- package/src/patterns/components/card_data/card_data.stories.jsx +9 -0
- package/src/patterns/components/card_data/card_data.twig +49 -0
- package/src/patterns/components/card_data/card_data.wingsuit.yml +73 -0
- package/src/patterns/components/card_data/index.js +9 -0
- package/src/patterns/components/card_detail/card_detail.stories.jsx +9 -0
- package/src/patterns/components/card_detail/card_detail.twig +37 -0
- package/src/patterns/components/card_detail/card_detail.wingsuit.yml +73 -0
- package/src/patterns/components/card_detail/index.js +9 -0
- package/src/patterns/components/card_factlist/card_factlist.stories.jsx +9 -0
- package/src/patterns/components/card_factlist/card_factlist.twig +21 -0
- package/src/patterns/components/card_factlist/card_factlist.wingsuit.yml +49 -0
- package/src/patterns/components/card_factlist/index.js +9 -0
- package/src/patterns/components/card_feature/card_feature.stories.jsx +9 -0
- package/src/patterns/components/card_feature/card_feature.twig +39 -0
- package/src/patterns/components/card_feature/card_feature.wingsuit.yml +82 -0
- package/src/patterns/components/card_feature/index.js +9 -0
- package/src/patterns/components/card_multilink/card_multilink.stories.jsx +9 -0
- package/src/patterns/components/card_multilink/card_multilink.twig +42 -0
- package/src/patterns/components/card_multilink/card_multilink.wingsuit.yml +88 -0
- package/src/patterns/components/card_multilink/index.js +9 -0
- package/src/patterns/components/card_promo/card_promo.stories.jsx +9 -0
- package/src/patterns/components/card_promo/card_promo.twig +35 -0
- package/src/patterns/components/card_promo/card_promo.wingsuit.yml +73 -0
- package/src/patterns/components/card_promo/index.js +9 -0
- package/src/patterns/components/card_stat/card_stat.stories.jsx +9 -0
- package/src/patterns/components/card_stat/card_stat.twig +22 -0
- package/src/patterns/components/card_stat/card_stat.wingsuit.yml +48 -0
- package/src/patterns/components/card_stat/index.js +9 -0
- package/src/patterns/components/card_text/card_text.stories.jsx +9 -0
- package/src/patterns/components/card_text/card_text.twig +35 -0
- package/src/patterns/components/card_text/card_text.wingsuit.yml +59 -0
- package/src/patterns/components/card_text/index.js +9 -0
- package/src/patterns/components/cardgroup/cardgroup.twig +15 -20
- package/src/patterns/components/cardgroup/cardgroup.wingsuit.yml +69 -449
- package/src/patterns/components/hero/hero.twig +1 -1
- package/src/patterns/components/picture/index.js +6 -0
- package/src/patterns/components/picture/picture.twig +21 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @ilo-org/twig@0.
|
|
2
|
+
> @ilo-org/twig@0.8.0 build:lib /home/runner/work/designsystem/designsystem/packages/twig
|
|
3
3
|
> node importprefix.js && node importsvgs.js && pnpm output
|
|
4
4
|
|
|
5
5
|
theme prefix added
|
|
6
6
|
|
|
7
|
-
> @ilo-org/twig@0.
|
|
7
|
+
> @ilo-org/twig@0.8.0 output /home/runner/work/designsystem/designsystem/packages/twig
|
|
8
8
|
> node outputtwigs.js
|
|
9
9
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @ilo-org/twig
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- bdeca8720: Refactor the Card Group in line with changes made to the Cards.
|
|
8
|
+
|
|
9
|
+
- Width of the cards in the card group are set via a new `size` property that uses the `size` property of the cards in the group.
|
|
10
|
+
- A new `collapsed` property optionally removes the space between the cards so they are touching.
|
|
11
|
+
- A new `justify` property allows the user to horizontally align the cards to the beginning or center, or to the left and right edges of the container.
|
|
12
|
+
|
|
13
|
+
- ba46a3a7d: Complete refactor of the Card component. Exposes each individual card as a separate template that can be imported individually or via the `Card` component using the `type` property.
|
|
14
|
+
|
|
15
|
+
Settings for the `Card` component change as follows:
|
|
16
|
+
|
|
17
|
+
- `cornercut` is deprecated for all cards except the Promo Card. For the others, it’s determined automatically by the type of card.
|
|
18
|
+
- `alignment` is deprecated for all cards except the Multilink Card, where it determines where the image should be placed, when size is set to wide.
|
|
19
|
+
- `size` has the following options: `narrow`, `wide`, `standard` and `fluid`. When a component only has two sizes, the options are `narrow`, `wide` and `fluid` and the default is `narrow`. When it has three options, all of the options are available and the default is `standard`. `fluid` is a new option which sets the card to be as wide as its container.
|
|
20
|
+
- `eventDetails` becomes `dateExtra`
|
|
21
|
+
- `imageAlt` is moved to `image.alt`
|
|
22
|
+
- `loading` is moved to `image.loading`
|
|
23
|
+
|
|
24
|
+
The following options for the Card's `type` setting have changed as follows:
|
|
25
|
+
|
|
26
|
+
- `graphic` becomes `text`
|
|
27
|
+
- `graphicpromo` becomes `promo`
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- ee2889916: Cards are not clickable if they are passed a cta prop, only the cta is clickable
|
|
32
|
+
- 8b12345cb: Remove alignment prop from Card component, which didn't do anything
|
|
33
|
+
- ba46a3a7d: Create new picture component to be used internally where responsive images are needed without captions.
|
|
34
|
+
- 8b12345cb: In Card, change cornercut options to be boolean `true` or `false`
|
|
35
|
+
- Updated dependencies [ba46a3a7d]
|
|
36
|
+
- Updated dependencies [bdeca8720]
|
|
37
|
+
- Updated dependencies [bbd9262d1]
|
|
38
|
+
- Updated dependencies [ee14cd3d3]
|
|
39
|
+
- Updated dependencies [b56d55cfd]
|
|
40
|
+
- Updated dependencies [5022dfc4c]
|
|
41
|
+
- Updated dependencies [bacc0bba7]
|
|
42
|
+
- Updated dependencies [ba46a3a7d]
|
|
43
|
+
- Updated dependencies [652966ab7]
|
|
44
|
+
- @ilo-org/styles@0.7.0
|
|
45
|
+
|
|
3
46
|
## 0.7.0
|
|
4
47
|
|
|
5
48
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/twig",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Twig components for the ILO's Design System",
|
|
6
6
|
"main": "",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@ilo-org/brand-assets": "0.1.0",
|
|
26
26
|
"@ilo-org/fonts": "0.1.0",
|
|
27
27
|
"@ilo-org/icons": "0.2.1",
|
|
28
|
-
"@ilo-org/styles": "0.
|
|
28
|
+
"@ilo-org/styles": "0.7.0",
|
|
29
29
|
"@ilo-org/themes": "0.2.0",
|
|
30
30
|
"@ilo-org/utils": "0.0.11"
|
|
31
31
|
},
|
|
@@ -1,125 +1,24 @@
|
|
|
1
1
|
{#
|
|
2
2
|
CARD COMPONENT
|
|
3
3
|
#}
|
|
4
|
-
<div class="{{prefix}}--card {{prefix}}--card--{{theme}} {{prefix}}--card--{{variant}}{% if cornercut %} {{prefix}}--card--{{cornercut}}{% endif %}{% if color %} {{prefix}}--card--{{color}}{% endif %}{% if alignment %} {{prefix}}--card--{{alignment}}{% endif %}{% if link %} {{prefix}}--card--action{% endif %}{% if type %} {{prefix}}--card--{{type}}{% endif %}{% if size %} {{prefix}}--card--{{size}}{% endif %}{% if isvideo %} {{prefix}}--card--isvideo{% endif %}{% if linklist %} {{prefix}}--card--linklist{% endif %}">
|
|
5
4
|
{% if type == "" %}
|
|
6
5
|
{% set type = variant %}
|
|
7
6
|
{% endif %}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{%
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<img class="{{prefix}}--card--image" src="{{image|reverse|last.src}}" alt="{{imageAlt}}" {% if loading %} loading="{{ loading }}" {% endif %}>
|
|
27
|
-
</picture>
|
|
28
|
-
{% else %}
|
|
29
|
-
<picture>
|
|
30
|
-
<img class="{{prefix}}--card--image" src="{{image}}" alt="{{imageAlt}}" {% if loading %} loading="{{ loading }}" {% endif %}>
|
|
31
|
-
</picture>
|
|
32
|
-
{% endif %}
|
|
33
|
-
</div>
|
|
34
|
-
{% endblock %}
|
|
35
|
-
{% endif %}
|
|
36
|
-
<div class="{{prefix}}--card--content">
|
|
37
|
-
{% if eyebrow %}
|
|
38
|
-
<p class="{{prefix}}--card--eyebrow">{{eyebrow}}</p>
|
|
39
|
-
{% endif %}
|
|
40
|
-
{% if title %}
|
|
41
|
-
<h5 class="{{prefix}}--card--title">{{title}}</h5>
|
|
42
|
-
{% endif %}
|
|
43
|
-
{% if type == "multilink" or type == "data" and image %}
|
|
44
|
-
{{ block("card_image") }}
|
|
45
|
-
{% endif %}
|
|
46
|
-
{% if intro %}
|
|
47
|
-
<p class="{{prefix}}--card--intro">{{intro}}</p>
|
|
48
|
-
{% endif %}
|
|
49
|
-
{% if date and type != "stat" and type != "data" and type != "graphicpromo" and type != "stat" and type != "factlist" %}
|
|
50
|
-
<time class="{{prefix}}--card--date" datetime="{{date.unix}}">{{date.human}}</time>
|
|
51
|
-
{% endif %}
|
|
52
|
-
{% if eventdetails %}
|
|
53
|
-
<p class="{{prefix}}--card--event-date">{{eventdetails}}</p>
|
|
54
|
-
{% endif %}
|
|
55
|
-
{% if profile %}
|
|
56
|
-
{% include "@components/profile/profile.twig" with {
|
|
57
|
-
avatar: profile.avatar,
|
|
58
|
-
description: profile.description,
|
|
59
|
-
link: profile.link,
|
|
60
|
-
name: profile.name,
|
|
61
|
-
role: profile.role,
|
|
62
|
-
prefix: prefix,
|
|
63
|
-
theme: theme,
|
|
64
|
-
} only %}
|
|
65
|
-
{% endif %}
|
|
66
|
-
{% if list %}
|
|
67
|
-
{% include "@components/list/list.twig" with {
|
|
68
|
-
title: list.title,
|
|
69
|
-
ordered: list.ordered,
|
|
70
|
-
alignment: list.alignment,
|
|
71
|
-
items: list.items,
|
|
72
|
-
prefix: prefix,
|
|
73
|
-
} only %}
|
|
74
|
-
{% endif %}
|
|
75
|
-
{% if cta %}
|
|
76
|
-
<a class="{{prefix}}--card--cta {{prefix}}--button {{prefix}}--button--medium {{prefix}}--button--primary" href="{{cta.url}}">
|
|
77
|
-
<span class="link__label">{{cta.label}}</span>
|
|
78
|
-
</a>
|
|
79
|
-
{% endif %}
|
|
80
|
-
{% if source %}
|
|
81
|
-
{% include "@components/link/link.twig" with {
|
|
82
|
-
theme: theme,
|
|
83
|
-
url: source.url,
|
|
84
|
-
label: source.label,
|
|
85
|
-
prefix: prefix
|
|
86
|
-
} %}
|
|
87
|
-
{% endif %}
|
|
88
|
-
{% if linklist %}
|
|
89
|
-
{% include "@components/linklist/linklist.twig" with {
|
|
90
|
-
headline: linklist.headline,
|
|
91
|
-
linkgroup: linklist.linkgroup,
|
|
92
|
-
prefix: prefix
|
|
93
|
-
} only %}
|
|
94
|
-
{% endif %}
|
|
95
|
-
{% if dataset %}
|
|
96
|
-
{% if dataset.content %}
|
|
97
|
-
{% for item in dataset.content.items %}
|
|
98
|
-
<p class="{{prefix}}--card--data--content-label">{{ item.label }}</p>
|
|
99
|
-
<p class="{{prefix}}--card--data--content-copy">{{ item.copy }}</p>
|
|
100
|
-
{% endfor %}
|
|
101
|
-
{% endif %}
|
|
102
|
-
{% if dataset.files %}
|
|
103
|
-
<div class="{{prefix}}--card--data--content-files">
|
|
104
|
-
<p class="{{prefix}}--card--data--content-label">{{ dataset.files.headline }}</p>
|
|
105
|
-
{% for item in dataset.files.items %}
|
|
106
|
-
<a class="{{prefix}}--card--data--file {{prefix}}--button {{prefix}}--button--primary {{prefix}}--button--small" href="{{item.url}}"><span class="button__label" download>{{ item.label }}</span></a>
|
|
107
|
-
{% endfor %}
|
|
108
|
-
</div>
|
|
109
|
-
{% endif %}
|
|
110
|
-
{% if dataset.links %}
|
|
111
|
-
<div class="{{prefix}}--card--data--content-links">
|
|
112
|
-
<p class="{{prefix}}--card--data--content-label">{{ dataset.links.headline }}</p>
|
|
113
|
-
{% for item in dataset.links.items %}
|
|
114
|
-
{% include "@components/link/link.twig" with {
|
|
115
|
-
url: item.url,
|
|
116
|
-
label: item.label,
|
|
117
|
-
prefix: prefix
|
|
118
|
-
} %} <span> </span>
|
|
119
|
-
{% endfor %}
|
|
120
|
-
</div>
|
|
121
|
-
{% endif %}
|
|
122
|
-
{% endif %}
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
7
|
+
|
|
8
|
+
{% if type == "data" %}
|
|
9
|
+
{% include "@components/card_data/card_data.twig" %}
|
|
10
|
+
{% elseif type == "detail" %}
|
|
11
|
+
{% include "@components/card_detail/card_detail.twig" %}
|
|
12
|
+
{% elseif type == "factlist" %}
|
|
13
|
+
{% include "@components/card_factlist/card_factlist.twig" %}
|
|
14
|
+
{% elseif type == "feature" %}
|
|
15
|
+
{% include "@components/card_feature/card_feature.twig" %}
|
|
16
|
+
{% elseif type == "multilink" %}
|
|
17
|
+
{% include "@components/card_multilink/card_multilink.twig" %}
|
|
18
|
+
{% elseif type == "promo" %}
|
|
19
|
+
{% include "@components/card_promo/card_promo.twig" %}
|
|
20
|
+
{% elseif type == "stat" %}
|
|
21
|
+
{% include "@components/card_stat/card_stat.twig" %}
|
|
22
|
+
{% elseif type == "text" %}
|
|
23
|
+
{% include "@components/card_text/card_text.twig" %}
|
|
24
|
+
{% endif %}
|