@ilo-org/twig 0.0.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/.browserslistrc +4 -0
- package/.editorconfig +12 -0
- package/.eslintignore +11 -0
- package/.eslintrc.js +66 -0
- package/.prettierignore +16 -0
- package/.prettierrc.js +13 -0
- package/.stylelintignore +9 -0
- package/.stylelintrc +23 -0
- package/.turbo/turbo-build.log +15313 -0
- package/LICENSE +201 -0
- package/README.md +23 -0
- package/apps/storybook/assets.js +5 -0
- package/apps/storybook/config/prefix.yml +1 -0
- package/apps/storybook/main.js +16 -0
- package/apps/storybook/manager.js +7 -0
- package/apps/storybook/patterns/colors.stories.mdx +18 -0
- package/apps/storybook/patterns/typeset.stories.mdx +28 -0
- package/apps/storybook/patterns/welcome.stories.mdx +24 -0
- package/apps/storybook/preview-body.html +4 -0
- package/apps/storybook/preview-head.html +11 -0
- package/apps/storybook/preview.js +38 -0
- package/apps/storybook/styles.scss +2 -0
- package/apps/storybook/theme.js +11 -0
- package/babel.config.js +16 -0
- package/contributing.md +5 -0
- package/importprefix.js +18 -0
- package/importsvgs.js +5 -0
- package/jest.config.js +18 -0
- package/outputtwigs.js +54 -0
- package/package.json +108 -0
- package/postcss.config.js +6 -0
- package/src/namespaces.js +14 -0
- package/src/patterns/components/accordion/accordion-item.twig +16 -0
- package/src/patterns/components/accordion/accordion-item.wingsuit.yml +30 -0
- package/src/patterns/components/accordion/accordion.behavior.js +14 -0
- package/src/patterns/components/accordion/accordion.js +178 -0
- package/src/patterns/components/accordion/accordion.stories.jsx +7 -0
- package/src/patterns/components/accordion/accordion.twig +17 -0
- package/src/patterns/components/accordion/accordion.wingsuit.yml +59 -0
- package/src/patterns/components/accordion/index.js +7 -0
- package/src/patterns/components/breadcrumb/breadcrumb.behavior.js +14 -0
- package/src/patterns/components/breadcrumb/breadcrumb.js +93 -0
- package/src/patterns/components/breadcrumb/breadcrumb.stories.jsx +7 -0
- package/src/patterns/components/breadcrumb/breadcrumb.twig +32 -0
- package/src/patterns/components/breadcrumb/breadcrumb.wingsuit.yml +35 -0
- package/src/patterns/components/breadcrumb/index.js +7 -0
- package/src/patterns/components/button/button.stories.jsx +7 -0
- package/src/patterns/components/button/button.twig +18 -0
- package/src/patterns/components/button/button.wingsuit.yml +104 -0
- package/src/patterns/components/button/index.js +6 -0
- package/src/patterns/components/callout/callout.behaviors.js +14 -0
- package/src/patterns/components/callout/callout.js +121 -0
- package/src/patterns/components/callout/callout.stories.jsx +7 -0
- package/src/patterns/components/callout/callout.twig +30 -0
- package/src/patterns/components/callout/callout.wingsuit.yml +66 -0
- package/src/patterns/components/callout/index.js +6 -0
- package/src/patterns/components/card/card.stories.jsx +7 -0
- package/src/patterns/components/card/card.twig +98 -0
- package/src/patterns/components/card/card.wingsuit.yml +300 -0
- package/src/patterns/components/card/index.js +6 -0
- package/src/patterns/components/cardgroup/cardgroup.stories.jsx +7 -0
- package/src/patterns/components/cardgroup/cardgroup.twig +30 -0
- package/src/patterns/components/cardgroup/cardgroup.wingsuit.yml +419 -0
- package/src/patterns/components/cardgroup/index.js +6 -0
- package/src/patterns/components/contextmenu/contextmenu.stories.jsx +7 -0
- package/src/patterns/components/contextmenu/contextmenu.twig +12 -0
- package/src/patterns/components/contextmenu/contextmenu.wingsuit.yml +23 -0
- package/src/patterns/components/contextmenu/index.js +6 -0
- package/src/patterns/components/dropdown/dropdown.stories.jsx +7 -0
- package/src/patterns/components/dropdown/dropdown.twig +20 -0
- package/src/patterns/components/dropdown/dropdown.wingsuit.yml +71 -0
- package/src/patterns/components/dropdown/index.js +6 -0
- package/src/patterns/components/fieldset/fieldset.twig +43 -0
- package/src/patterns/components/footer/footer.stories.jsx +7 -0
- package/src/patterns/components/footer/footer.twig +62 -0
- package/src/patterns/components/footer/footer.wingsuit.yml +104 -0
- package/src/patterns/components/footer/index.js +6 -0
- package/src/patterns/components/form/checkbox.twig +13 -0
- package/src/patterns/components/form/checkboxgroup.twig +5 -0
- package/src/patterns/components/form/datepicker.twig +32 -0
- package/src/patterns/components/form/file.twig +14 -0
- package/src/patterns/components/form/fileupload.behavior.js +14 -0
- package/src/patterns/components/form/fileupload.js +118 -0
- package/src/patterns/components/form/form.stories.jsx +7 -0
- package/src/patterns/components/form/form.twig +94 -0
- package/src/patterns/components/form/form.wingsuit.yml +973 -0
- package/src/patterns/components/form/index.js +7 -0
- package/src/patterns/components/form/input.twig +13 -0
- package/src/patterns/components/form/number.twig +13 -0
- package/src/patterns/components/form/radio.twig +4 -0
- package/src/patterns/components/form/textarea.twig +13 -0
- package/src/patterns/components/hero/hero.stories.jsx +7 -0
- package/src/patterns/components/hero/hero.twig +24 -0
- package/src/patterns/components/hero/hero.wingsuit.yml +56 -0
- package/src/patterns/components/hero/index.js +6 -0
- package/src/patterns/components/herocard/herocard.stories.jsx +7 -0
- package/src/patterns/components/herocard/herocard.twig +31 -0
- package/src/patterns/components/herocard/herocard.wingsuit.yml +43 -0
- package/src/patterns/components/herocard/index.js +6 -0
- package/src/patterns/components/icon/icon.twig +4 -0
- package/src/patterns/components/icon/index.js +6 -0
- package/src/patterns/components/image/image.stories.jsx +7 -0
- package/src/patterns/components/image/image.twig +19 -0
- package/src/patterns/components/image/image.wingsuit.yml +37 -0
- package/src/patterns/components/image/index.js +6 -0
- package/src/patterns/components/link/index.js +6 -0
- package/src/patterns/components/link/link.stories.jsx +7 -0
- package/src/patterns/components/link/link.twig +8 -0
- package/src/patterns/components/link/link.wingsuit.yml +35 -0
- package/src/patterns/components/linklist/index.js +6 -0
- package/src/patterns/components/linklist/linklist.stories.jsx +7 -0
- package/src/patterns/components/linklist/linklist.twig +26 -0
- package/src/patterns/components/linklist/linklist.wingsuit.yml +53 -0
- package/src/patterns/components/list/index.js +6 -0
- package/src/patterns/components/list/list-item.twig +6 -0
- package/src/patterns/components/list/list-item.wingsuit.yml +18 -0
- package/src/patterns/components/list/list.stories.jsx +7 -0
- package/src/patterns/components/list/list.twig +30 -0
- package/src/patterns/components/list/list.wingsuit.yml +48 -0
- package/src/patterns/components/loading/index.js +7 -0
- package/src/patterns/components/loading/loading.behavior.js +14 -0
- package/src/patterns/components/loading/loading.js +102 -0
- package/src/patterns/components/loading/loading.stories.jsx +7 -0
- package/src/patterns/components/loading/loading.twig +8 -0
- package/src/patterns/components/loading/loading.wingsuit.yml +37 -0
- package/src/patterns/components/modal/index.js +7 -0
- package/src/patterns/components/modal/modal.behavior.js +14 -0
- package/src/patterns/components/modal/modal.js +130 -0
- package/src/patterns/components/modal/modal.stories.jsx +7 -0
- package/src/patterns/components/modal/modal.twig +18 -0
- package/src/patterns/components/modal/modal.wingsuit.yml +54 -0
- package/src/patterns/components/notification/index.js +7 -0
- package/src/patterns/components/notification/notification.behavior.js +15 -0
- package/src/patterns/components/notification/notification.js +95 -0
- package/src/patterns/components/notification/notification.stories.jsx +7 -0
- package/src/patterns/components/notification/notification.twig +18 -0
- package/src/patterns/components/notification/notification.wingsuit.yml +58 -0
- package/src/patterns/components/pagination/Pagination.stories.jsx +7 -0
- package/src/patterns/components/pagination/index.js +6 -0
- package/src/patterns/components/pagination/pagination.twig +48 -0
- package/src/patterns/components/pagination/pagination.wingsuit.yml +72 -0
- package/src/patterns/components/polyfill/index.js +6 -0
- package/src/patterns/components/polyfill/polyfill.twig +10 -0
- package/src/patterns/components/profile/index.js +6 -0
- package/src/patterns/components/profile/profile.stories.jsx +7 -0
- package/src/patterns/components/profile/profile.twig +18 -0
- package/src/patterns/components/profile/profile.wingsuit.yml +35 -0
- package/src/patterns/components/readmore/index.js +7 -0
- package/src/patterns/components/readmore/readmore.behavior.js +14 -0
- package/src/patterns/components/readmore/readmore.js +119 -0
- package/src/patterns/components/readmore/readmore.stories.jsx +7 -0
- package/src/patterns/components/readmore/readmore.twig +16 -0
- package/src/patterns/components/readmore/readmore.wingsuit.yml +32 -0
- package/src/patterns/components/richtext/index.js +6 -0
- package/src/patterns/components/richtext/richtext.stories.jsx +7 -0
- package/src/patterns/components/richtext/richtext.twig +6 -0
- package/src/patterns/components/richtext/richtext.wingsuit.yml +12 -0
- package/src/patterns/components/searchfield/index.js +6 -0
- package/src/patterns/components/searchfield/searchfield.stories.jsx +7 -0
- package/src/patterns/components/searchfield/searchfield.twig +7 -0
- package/src/patterns/components/searchfield/searchfield.wingsuit.yml +22 -0
- package/src/patterns/components/table/index.js +7 -0
- package/src/patterns/components/table/table.behavior.js +14 -0
- package/src/patterns/components/table/table.js +279 -0
- package/src/patterns/components/table/table.stories.jsx +7 -0
- package/src/patterns/components/table/table.twig +36 -0
- package/src/patterns/components/table/table.wingsuit.yml +112 -0
- package/src/patterns/components/tableofcontents/index.js +6 -0
- package/src/patterns/components/tableofcontents/tableofcontents.stories.jsx +7 -0
- package/src/patterns/components/tableofcontents/tableofcontents.twig +14 -0
- package/src/patterns/components/tableofcontents/tableofcontents.wingsuit.yml +22 -0
- package/src/patterns/components/tabs/index.js +7 -0
- package/src/patterns/components/tabs/tabs.behavior.js +23 -0
- package/src/patterns/components/tabs/tabs.js +209 -0
- package/src/patterns/components/tabs/tabs.stories.jsx +7 -0
- package/src/patterns/components/tabs/tabs.twig +30 -0
- package/src/patterns/components/tabs/tabs.wingsuit.yml +168 -0
- package/src/patterns/components/tag/index.js +7 -0
- package/src/patterns/components/tag/tag-set.twig +15 -0
- package/src/patterns/components/tag/tag.behavior.js +14 -0
- package/src/patterns/components/tag/tag.stories.jsx +7 -0
- package/src/patterns/components/tag/tag.twig +24 -0
- package/src/patterns/components/tag/tag.wingsuit.yml +43 -0
- package/src/patterns/components/tag/tagset.js +160 -0
- package/src/patterns/components/tag/tagset.wingsuit.yml +43 -0
- package/src/patterns/components/tooltip/index.js +7 -0
- package/src/patterns/components/tooltip/tooltip.behavior.js +14 -0
- package/src/patterns/components/tooltip/tooltip.js +184 -0
- package/src/patterns/components/tooltip/tooltip.stories.jsx +7 -0
- package/src/patterns/components/tooltip/tooltip.twig +11 -0
- package/src/patterns/components/tooltip/tooltip.wingsuit.yml +30 -0
- package/src/patterns/components/video/index.js +7 -0
- package/src/patterns/components/video/video.behavior.js +14 -0
- package/src/patterns/components/video/video.js +114 -0
- package/src/patterns/components/video/video.stories.jsx +7 -0
- package/src/patterns/components/video/video.twig +17 -0
- package/src/patterns/components/video/video.wingsuit.yml +44 -0
- package/src/patterns/components/video/videoplayer.twig +10 -0
- package/src/tokens/exports/_colors.scss +7 -0
- package/src/tokens/exports/_font-families.scss +6 -0
- package/src/tokens/exports/_font-sizes-heading.scss +10 -0
- package/src/tokens/index.scss +7 -0
- package/src/vendorjs/lib.vendor.js +1 -0
- package/wingsuit.config.js +27 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{#
|
|
2
|
+
CARDGROUP COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
<div class="{{prefix}}--cardgroup {{prefix}}--cardgroup--{{cardcount}}">
|
|
5
|
+
<div class="{{prefix}}--cardgroup--inner">
|
|
6
|
+
{% for card in group %}
|
|
7
|
+
{% include "@components/card/card.twig" with {
|
|
8
|
+
title: card.title,
|
|
9
|
+
image: card.image,
|
|
10
|
+
intro: card.intro,
|
|
11
|
+
eyebrow: card.eyebrow,
|
|
12
|
+
date: card.date,
|
|
13
|
+
dataset: card.dataset,
|
|
14
|
+
link: card.link,
|
|
15
|
+
profile: card.profile,
|
|
16
|
+
eventdate: card.eventdate,
|
|
17
|
+
cta: card.cta,
|
|
18
|
+
source: card.source,
|
|
19
|
+
list: card.list,
|
|
20
|
+
linklist: card.linklist,
|
|
21
|
+
color: card.color,
|
|
22
|
+
prefix: prefix,
|
|
23
|
+
theme: settings.theme,
|
|
24
|
+
cornercut: settings.cornercut,
|
|
25
|
+
alignment: settings.alignment,
|
|
26
|
+
variant: settings.variant
|
|
27
|
+
} only %}
|
|
28
|
+
{% endfor %}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
cardgroup:
|
|
2
|
+
use: '@components/cardgroup/cardgroup.twig'
|
|
3
|
+
label: Card Group
|
|
4
|
+
description: The Card group
|
|
5
|
+
fields:
|
|
6
|
+
group:
|
|
7
|
+
type: object
|
|
8
|
+
label: Group of cards
|
|
9
|
+
description: The group of cards, object
|
|
10
|
+
preview:
|
|
11
|
+
settings:
|
|
12
|
+
type: object
|
|
13
|
+
label: Settings
|
|
14
|
+
description: Settings for the cards
|
|
15
|
+
variants:
|
|
16
|
+
default:
|
|
17
|
+
label: Multilink
|
|
18
|
+
description: multilink settings
|
|
19
|
+
fields:
|
|
20
|
+
group:
|
|
21
|
+
- title: "Multi-link card - first"
|
|
22
|
+
image: "http://placekitten.com/475/267"
|
|
23
|
+
intro: "Lorem ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas lacus."
|
|
24
|
+
eyebrow: ""
|
|
25
|
+
date: ""
|
|
26
|
+
link: ""
|
|
27
|
+
profile: ""
|
|
28
|
+
eventdetails: ""
|
|
29
|
+
cta: ""
|
|
30
|
+
source: ""
|
|
31
|
+
linklist:
|
|
32
|
+
headline: ""
|
|
33
|
+
linkgroup:
|
|
34
|
+
- headline: ""
|
|
35
|
+
links:
|
|
36
|
+
- label: Link One
|
|
37
|
+
url: 'http://www.google.com'
|
|
38
|
+
- label: Link Two
|
|
39
|
+
url: 'http://www.google.com'
|
|
40
|
+
- label: Link Three
|
|
41
|
+
url: 'http://www.google.com'
|
|
42
|
+
- title: "Multi-link card second - right aligned image, wide option"
|
|
43
|
+
image: "http://placekitten.com/475/267"
|
|
44
|
+
intro: "Lorem ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas lacus."
|
|
45
|
+
eyebrow: ""
|
|
46
|
+
date: ""
|
|
47
|
+
link: ""
|
|
48
|
+
profile: ""
|
|
49
|
+
eventdetails: ""
|
|
50
|
+
cta: ""
|
|
51
|
+
source: ""
|
|
52
|
+
linklist:
|
|
53
|
+
headline: ""
|
|
54
|
+
linkgroup:
|
|
55
|
+
- headline: ""
|
|
56
|
+
links:
|
|
57
|
+
- label: Link One
|
|
58
|
+
url: 'http://www.google.com'
|
|
59
|
+
- label: Link Two
|
|
60
|
+
url: 'http://www.google.com'
|
|
61
|
+
- label: Link Three
|
|
62
|
+
url: 'http://www.google.com'
|
|
63
|
+
- title: "Multi-link card - right aligned image, wide option"
|
|
64
|
+
image: "http://placekitten.com/475/267"
|
|
65
|
+
intro: "Lorem ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas lacus."
|
|
66
|
+
eyebrow: ""
|
|
67
|
+
date: ""
|
|
68
|
+
link: ""
|
|
69
|
+
profile: ""
|
|
70
|
+
eventdetails: ""
|
|
71
|
+
cta: ""
|
|
72
|
+
source: ""
|
|
73
|
+
linklist:
|
|
74
|
+
headline: ""
|
|
75
|
+
linkgroup:
|
|
76
|
+
- headline: ""
|
|
77
|
+
links:
|
|
78
|
+
- label: Link One
|
|
79
|
+
url: 'http://www.google.com'
|
|
80
|
+
- label: Link Two
|
|
81
|
+
url: 'http://www.google.com'
|
|
82
|
+
- label: Link Three
|
|
83
|
+
url: 'http://www.google.com'
|
|
84
|
+
settings:
|
|
85
|
+
theme: light
|
|
86
|
+
cornercut: cornercut
|
|
87
|
+
alignment: left
|
|
88
|
+
variant: multilink
|
|
89
|
+
settings:
|
|
90
|
+
cardcount: three
|
|
91
|
+
feature:
|
|
92
|
+
label: Feature
|
|
93
|
+
description: feature settings
|
|
94
|
+
fields:
|
|
95
|
+
group:
|
|
96
|
+
- title: "Vertical info card descriptive headline text"
|
|
97
|
+
image: "http://placekitten.com/475/267"
|
|
98
|
+
intro: ""
|
|
99
|
+
eyebrow: "Eyebrow title"
|
|
100
|
+
date:
|
|
101
|
+
human: "Date"
|
|
102
|
+
unix: 1670389200
|
|
103
|
+
link: "https://www.google.com/search?q=feature"
|
|
104
|
+
profile: ""
|
|
105
|
+
eventdetails: ""
|
|
106
|
+
cta: ""
|
|
107
|
+
source: ""
|
|
108
|
+
linklist: ""
|
|
109
|
+
list: ""
|
|
110
|
+
dataset: ""
|
|
111
|
+
color: ""
|
|
112
|
+
- title: "Vertical info card descriptive headline text"
|
|
113
|
+
image: "http://placekitten.com/475/267"
|
|
114
|
+
intro: ""
|
|
115
|
+
eyebrow: "Eyebrow title"
|
|
116
|
+
date:
|
|
117
|
+
human: "Date"
|
|
118
|
+
unix: 1670389200
|
|
119
|
+
link: "https://www.google.com/search?q=feature"
|
|
120
|
+
profile: ""
|
|
121
|
+
eventdetails: ""
|
|
122
|
+
cta: ""
|
|
123
|
+
source: ""
|
|
124
|
+
linklist: ""
|
|
125
|
+
list: ""
|
|
126
|
+
dataset: ""
|
|
127
|
+
color: ""
|
|
128
|
+
- title: "Vertical info card descriptive headline text Vertical info card descriptive headline text Vertical info card descriptive headline text"
|
|
129
|
+
image: "http://placekitten.com/475/267"
|
|
130
|
+
intro: ""
|
|
131
|
+
eyebrow: "Eyebrow title"
|
|
132
|
+
date:
|
|
133
|
+
human: "Date"
|
|
134
|
+
unix: 1670389200
|
|
135
|
+
link: "https://www.google.com/search?q=feature"
|
|
136
|
+
profile: ""
|
|
137
|
+
eventdetails: ""
|
|
138
|
+
cta: ""
|
|
139
|
+
source: ""
|
|
140
|
+
linklist: ""
|
|
141
|
+
list: ""
|
|
142
|
+
dataset: ""
|
|
143
|
+
color: ""
|
|
144
|
+
- title: "Vertical info card descriptive headline text"
|
|
145
|
+
image: "http://placekitten.com/475/267"
|
|
146
|
+
intro: ""
|
|
147
|
+
eyebrow: "Eyebrow title"
|
|
148
|
+
date:
|
|
149
|
+
human: "Date"
|
|
150
|
+
unix: 1670389200
|
|
151
|
+
link: "https://www.google.com/search?q=feature"
|
|
152
|
+
profile: ""
|
|
153
|
+
eventdetails: ""
|
|
154
|
+
cta: ""
|
|
155
|
+
source: ""
|
|
156
|
+
linklist: ""
|
|
157
|
+
list: ""
|
|
158
|
+
dataset: ""
|
|
159
|
+
color: ""
|
|
160
|
+
settings:
|
|
161
|
+
theme: light
|
|
162
|
+
cornercut: cornercut
|
|
163
|
+
alignment: left
|
|
164
|
+
variant: feature
|
|
165
|
+
settings:
|
|
166
|
+
cardcount: four
|
|
167
|
+
detail:
|
|
168
|
+
label: Detail
|
|
169
|
+
description: detail settings
|
|
170
|
+
fields:
|
|
171
|
+
group:
|
|
172
|
+
- title: "Horizontal info card descriptive headline text"
|
|
173
|
+
image: "http://placekitten.com/196/296"
|
|
174
|
+
intro: "This ILO flagship report details the effects of the COVID-19 crisis on the world of work. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eu auctor tusrpis, this is 200 characters."
|
|
175
|
+
eyebrow: "Eyebrow title"
|
|
176
|
+
date:
|
|
177
|
+
human: "00 month 0000"
|
|
178
|
+
unix: 1670389200
|
|
179
|
+
link: "https://www.google.com/search?q=detail"
|
|
180
|
+
profile: ""
|
|
181
|
+
eventdetails: "8 - 9 February 2022, 8:30 - 12:00 CET | Egypt"
|
|
182
|
+
cta: ""
|
|
183
|
+
source: ""
|
|
184
|
+
linklist: ""
|
|
185
|
+
list: ""
|
|
186
|
+
dataset: ""
|
|
187
|
+
color: ""
|
|
188
|
+
- title: "Horizontal info card descriptive headline text"
|
|
189
|
+
image: "https://www.ilo.org/wcmsp5/groups/public/---dgreports/---dcomm/documents/image/wcms_856513.jpg"
|
|
190
|
+
intro: "This ILO flagship report details the effects of the COVID-19 crisis on the world of work. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eu auctor tusrpis, this is 200 characters."
|
|
191
|
+
eyebrow: "Eyebrow title"
|
|
192
|
+
date:
|
|
193
|
+
human: "00 month 0000"
|
|
194
|
+
unix: 1670389200
|
|
195
|
+
link: "https://www.google.com/search?q=detail"
|
|
196
|
+
profile: ""
|
|
197
|
+
eventdetails: "8 - 9 February 2022, 8:30 - 12:00 CET | Egypt"
|
|
198
|
+
cta: ""
|
|
199
|
+
source: ""
|
|
200
|
+
linklist: ""
|
|
201
|
+
list: ""
|
|
202
|
+
dataset: ""
|
|
203
|
+
color: ""
|
|
204
|
+
settings:
|
|
205
|
+
theme: light
|
|
206
|
+
cornercut: cornercut
|
|
207
|
+
alignment: left
|
|
208
|
+
variant: detail
|
|
209
|
+
settings:
|
|
210
|
+
cardcount: one
|
|
211
|
+
graphicpromo:
|
|
212
|
+
label: Graphic Promo
|
|
213
|
+
description: graphic promo settings
|
|
214
|
+
fields:
|
|
215
|
+
group:
|
|
216
|
+
- title: "Brief title text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod"
|
|
217
|
+
image: ""
|
|
218
|
+
intro: "We advance social justice and promote decent work by setting labour standards, developing policies and devising programmes."
|
|
219
|
+
eyebrow: ""
|
|
220
|
+
date: ""
|
|
221
|
+
link: "https://www.google.com/search?q=graphic-promo"
|
|
222
|
+
profile: ""
|
|
223
|
+
eventdetails: ""
|
|
224
|
+
cta:
|
|
225
|
+
label: "Discover our unique mission"
|
|
226
|
+
url: "https://www.google.com/search?q=button"
|
|
227
|
+
source: ""
|
|
228
|
+
linklist: ""
|
|
229
|
+
list: ""
|
|
230
|
+
dataset: ""
|
|
231
|
+
settings:
|
|
232
|
+
theme: dark
|
|
233
|
+
cornercut: cornercut
|
|
234
|
+
alignment: left
|
|
235
|
+
variant: graphicpromo
|
|
236
|
+
settings:
|
|
237
|
+
cardcount: one
|
|
238
|
+
stat:
|
|
239
|
+
label: Stat cards
|
|
240
|
+
description: Stat settings
|
|
241
|
+
fields:
|
|
242
|
+
group:
|
|
243
|
+
- title: "Date headline"
|
|
244
|
+
image: ""
|
|
245
|
+
intro: "Data title - Lorem ipsum dolor sit amet consectetur"
|
|
246
|
+
eyebrow: ""
|
|
247
|
+
date: ""
|
|
248
|
+
link: ""
|
|
249
|
+
profile: ""
|
|
250
|
+
eventdetails: ""
|
|
251
|
+
cta: ""
|
|
252
|
+
source:
|
|
253
|
+
label: "Source: lorem ipsum dolor sit amet, 2020"
|
|
254
|
+
url: "https://www.google.com/search?q=stat"
|
|
255
|
+
color: blue
|
|
256
|
+
- title: "Date headline"
|
|
257
|
+
image: ""
|
|
258
|
+
intro: "Data title - Lorem ipsum dolor sit amet consectetur"
|
|
259
|
+
eyebrow: ""
|
|
260
|
+
date: ""
|
|
261
|
+
link: ""
|
|
262
|
+
profile: ""
|
|
263
|
+
eventdetails: ""
|
|
264
|
+
cta: ""
|
|
265
|
+
source:
|
|
266
|
+
label: "Source: lorem ipsum dolor sit amet, 2020"
|
|
267
|
+
url: "https://www.google.com/search?q=stat"
|
|
268
|
+
color: green
|
|
269
|
+
- title: "Date headline"
|
|
270
|
+
image: ""
|
|
271
|
+
intro: "Data title - Lorem ipsum dolor sit amet consectetur"
|
|
272
|
+
eyebrow: ""
|
|
273
|
+
date: ""
|
|
274
|
+
link: ""
|
|
275
|
+
profile: ""
|
|
276
|
+
eventdetails: ""
|
|
277
|
+
cta: ""
|
|
278
|
+
source:
|
|
279
|
+
label: "Source: lorem ipsum dolor sit amet, 2020"
|
|
280
|
+
url: "https://www.google.com/search?q=stat"
|
|
281
|
+
color: yellow
|
|
282
|
+
- title: "Date headline"
|
|
283
|
+
image: ""
|
|
284
|
+
intro: "Data title - Lorem ipsum dolor sit amet consectetur"
|
|
285
|
+
eyebrow: ""
|
|
286
|
+
date: ""
|
|
287
|
+
link: ""
|
|
288
|
+
profile: ""
|
|
289
|
+
eventdetails: ""
|
|
290
|
+
cta: ""
|
|
291
|
+
source:
|
|
292
|
+
label: "Source: lorem ipsum dolor sit amet, 2020"
|
|
293
|
+
url: "https://www.google.com/search?q=stat"
|
|
294
|
+
color: turquoise
|
|
295
|
+
settings:
|
|
296
|
+
theme: light
|
|
297
|
+
cornercut: cornercut
|
|
298
|
+
alignment: left
|
|
299
|
+
variant: stat
|
|
300
|
+
settings:
|
|
301
|
+
cardcount: two
|
|
302
|
+
graphic:
|
|
303
|
+
label: Graphic
|
|
304
|
+
description: graphic settings
|
|
305
|
+
fields:
|
|
306
|
+
group:
|
|
307
|
+
- title: "Brief title text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod"
|
|
308
|
+
image: ""
|
|
309
|
+
intro: ""
|
|
310
|
+
eyebrow: "Eyebrow title"
|
|
311
|
+
date:
|
|
312
|
+
human: "date"
|
|
313
|
+
unix: 1670389200
|
|
314
|
+
link: "https://www.google.com/search?q=graphic"
|
|
315
|
+
profile: ""
|
|
316
|
+
eventdetails: ""
|
|
317
|
+
cta: ""
|
|
318
|
+
source: ""
|
|
319
|
+
linklist: ""
|
|
320
|
+
list: ""
|
|
321
|
+
dataset: ""
|
|
322
|
+
settings:
|
|
323
|
+
theme: light
|
|
324
|
+
cornercut: cornercut
|
|
325
|
+
alignment: left
|
|
326
|
+
variant: graphic
|
|
327
|
+
settings:
|
|
328
|
+
cardcount: one
|
|
329
|
+
factlist:
|
|
330
|
+
label: Factlist
|
|
331
|
+
description: Factlist settings
|
|
332
|
+
fields:
|
|
333
|
+
group:
|
|
334
|
+
- title: "Title of fast fact list"
|
|
335
|
+
intro: ""
|
|
336
|
+
eyebrow: ""
|
|
337
|
+
date: ""
|
|
338
|
+
link: ""
|
|
339
|
+
image: ""
|
|
340
|
+
profile: ""
|
|
341
|
+
eventdetails: ""
|
|
342
|
+
cta: ""
|
|
343
|
+
list:
|
|
344
|
+
title: ""
|
|
345
|
+
settings:
|
|
346
|
+
- ordered: unordered
|
|
347
|
+
- alignment: default
|
|
348
|
+
items:
|
|
349
|
+
- content: "Wipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor."
|
|
350
|
+
id: "list1"
|
|
351
|
+
- content: "Nut labore et dolore magna sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
|
352
|
+
id: "list2"
|
|
353
|
+
settings:
|
|
354
|
+
theme: light
|
|
355
|
+
cornercut: cornercut
|
|
356
|
+
alignment: left
|
|
357
|
+
variant: factlist
|
|
358
|
+
settings:
|
|
359
|
+
cardcount: one
|
|
360
|
+
data:
|
|
361
|
+
label: Data
|
|
362
|
+
description: Data settings
|
|
363
|
+
fields:
|
|
364
|
+
group:
|
|
365
|
+
- title: ""
|
|
366
|
+
image: ""
|
|
367
|
+
# image: "https://placekitten.com/205/179"
|
|
368
|
+
intro: ""
|
|
369
|
+
eyebrow: "Event details"
|
|
370
|
+
date: ""
|
|
371
|
+
link: ""
|
|
372
|
+
profile: ""
|
|
373
|
+
eventdetails: ""
|
|
374
|
+
cta: ""
|
|
375
|
+
dataset:
|
|
376
|
+
content:
|
|
377
|
+
items:
|
|
378
|
+
- label: Date
|
|
379
|
+
copy: Publication date
|
|
380
|
+
- label: Event type
|
|
381
|
+
copy: Event location
|
|
382
|
+
files:
|
|
383
|
+
headline: Files
|
|
384
|
+
items:
|
|
385
|
+
- label: File/size MB 1
|
|
386
|
+
url: "https://www.google.com/search?q=file1"
|
|
387
|
+
- label: File/size MB 2
|
|
388
|
+
url: "https://www.google.com/search?q=file2"
|
|
389
|
+
- label: File/size MB 3
|
|
390
|
+
url: "https://www.google.com/search?q=file3"
|
|
391
|
+
links:
|
|
392
|
+
headline: Languages
|
|
393
|
+
items:
|
|
394
|
+
- label: Language link 1
|
|
395
|
+
url: "https://www.google.com/search?q=link"
|
|
396
|
+
- label: Language link 2
|
|
397
|
+
url: "https://www.google.com/search?q=hyperlink"
|
|
398
|
+
- label: Language link 3
|
|
399
|
+
url: "https://www.google.com/search?q=url"
|
|
400
|
+
settings:
|
|
401
|
+
theme: light
|
|
402
|
+
cornercut: cornercut
|
|
403
|
+
alignment: left
|
|
404
|
+
variant: data
|
|
405
|
+
settings:
|
|
406
|
+
cardcount: one
|
|
407
|
+
settings:
|
|
408
|
+
cardcount:
|
|
409
|
+
type: select
|
|
410
|
+
label: Card Count
|
|
411
|
+
description: Number of cards within a group
|
|
412
|
+
required: true
|
|
413
|
+
preview: 'two'
|
|
414
|
+
options:
|
|
415
|
+
one: One
|
|
416
|
+
two: Two
|
|
417
|
+
three: Three
|
|
418
|
+
four: Four
|
|
419
|
+
visibility: storybook
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{#
|
|
2
|
+
CONTEXT MENU COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
<ul class="{{prefix}}--context-menu">
|
|
5
|
+
{% for link in links %}
|
|
6
|
+
<li class="{{prefix}}--context-menu--item{% if link.endsection == 'true' %} endsection{% endif %}">
|
|
7
|
+
<a href="{{link.url}}" class="{{prefix}}--context-menu--link">
|
|
8
|
+
<span class="{{prefix}}--context-menu--label">{{link.label}}</span>
|
|
9
|
+
</a>
|
|
10
|
+
</li>
|
|
11
|
+
{% endfor %}
|
|
12
|
+
</ul>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
contextmenu:
|
|
2
|
+
use: '@components/contextmenu/contextmenu.twig'
|
|
3
|
+
label: Context Menu
|
|
4
|
+
description: The ContextMenu receives a list of urls with labels and an optional prop indicating if this link is at the end of a 'section.'
|
|
5
|
+
fields:
|
|
6
|
+
links:
|
|
7
|
+
type: object
|
|
8
|
+
label: Links
|
|
9
|
+
description: The context menu item items.
|
|
10
|
+
required: true
|
|
11
|
+
preview:
|
|
12
|
+
- label: Link One
|
|
13
|
+
url: 'http://www.google.com'
|
|
14
|
+
- label: Link Two
|
|
15
|
+
url: 'http://www.google.com'
|
|
16
|
+
- endsection: 'true'
|
|
17
|
+
label: Link Three Ends A Section
|
|
18
|
+
url: 'http://www.google.com'
|
|
19
|
+
- label: Link Four
|
|
20
|
+
url: 'http://www.google.com'
|
|
21
|
+
- label: Link Five Is Slightly Longer
|
|
22
|
+
url: 'http://www.google.com'
|
|
23
|
+
visibility: storybook
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{#
|
|
2
|
+
DROPDOWN COMPONENT
|
|
3
|
+
|
|
4
|
+
Like all form fields, extends the FIELDSET components, and passes it some variables
|
|
5
|
+
#}
|
|
6
|
+
{% extends '@components/fieldset/fieldset.twig' %}
|
|
7
|
+
{% set fsinputid = id ? id : name %}
|
|
8
|
+
{% set fslabel = label %}
|
|
9
|
+
{% set fshelper = helper %}
|
|
10
|
+
{% set fserror = error %}
|
|
11
|
+
|
|
12
|
+
{% block formfield %}
|
|
13
|
+
<div class="{{prefix}}--dropdown--wrapper">
|
|
14
|
+
<select id="{% if id %}{{id}}{% else %}{{name}}{% endif %}" {% if autocomplete is defined %}autocomplete="{{autocomplete}}"{% endif %} name="dropdown" class="{{prefix}}--dropdown{% if error %} error{% endif %}" {% if disabled is defined and disabled == 'true' %}disabled{% endif %}>
|
|
15
|
+
{% for option in options %}
|
|
16
|
+
<option label="{{option.label}}" value="{{option.value}}" {% if defaultValue is defined and defaultValue == option.value %}selected{% endif %} {% if option.disabled is defined and option.disabled == 'true' %}disabled{% endif %}></option>
|
|
17
|
+
{% endfor %}
|
|
18
|
+
</select>
|
|
19
|
+
</div>
|
|
20
|
+
{% endblock %}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
dropdown:
|
|
2
|
+
use: '@components/dropdown/dropdown.twig'
|
|
3
|
+
label: Dropdown
|
|
4
|
+
description: The Dropdown displays a select element with options, and is most
|
|
5
|
+
commonly used in forms.
|
|
6
|
+
fields:
|
|
7
|
+
autocomplete:
|
|
8
|
+
type: string
|
|
9
|
+
label: autocomplete
|
|
10
|
+
description: Should this field autocomplete
|
|
11
|
+
preview: false
|
|
12
|
+
required: false
|
|
13
|
+
defaultValue:
|
|
14
|
+
type: string
|
|
15
|
+
label: defaultValue
|
|
16
|
+
description: The default value of the select
|
|
17
|
+
preview: "option one"
|
|
18
|
+
required: true
|
|
19
|
+
disabled:
|
|
20
|
+
type: boolean
|
|
21
|
+
label: disabled
|
|
22
|
+
description: Is this field disabled?
|
|
23
|
+
preview: false
|
|
24
|
+
required: false
|
|
25
|
+
error:
|
|
26
|
+
type: string
|
|
27
|
+
label: error
|
|
28
|
+
description: Does this have an error? If so, the error message
|
|
29
|
+
preview: false
|
|
30
|
+
required: false
|
|
31
|
+
helper:
|
|
32
|
+
type: string
|
|
33
|
+
label: helper
|
|
34
|
+
description: Does this have helper text? If so, the helper text
|
|
35
|
+
preview: "My helper text"
|
|
36
|
+
required: false
|
|
37
|
+
id:
|
|
38
|
+
type: string
|
|
39
|
+
label: id
|
|
40
|
+
description: the id of the form field
|
|
41
|
+
preview: "dropdown"
|
|
42
|
+
required: true
|
|
43
|
+
label:
|
|
44
|
+
type: string
|
|
45
|
+
label: label
|
|
46
|
+
description: the label of the form field
|
|
47
|
+
preview: "Dropdown Label"
|
|
48
|
+
required: true
|
|
49
|
+
name:
|
|
50
|
+
type: string
|
|
51
|
+
label: name
|
|
52
|
+
description: the name attribute of the form field
|
|
53
|
+
preview: "dropdown"
|
|
54
|
+
required: true
|
|
55
|
+
options:
|
|
56
|
+
type: object
|
|
57
|
+
label: Options
|
|
58
|
+
description: The options for this dropdown
|
|
59
|
+
required: true
|
|
60
|
+
preview:
|
|
61
|
+
- label: "Option One"
|
|
62
|
+
value: "option one"
|
|
63
|
+
- label: "Option Two"
|
|
64
|
+
value: "option two"
|
|
65
|
+
- label: "Option Three"
|
|
66
|
+
value: "option three"
|
|
67
|
+
- label: "Option Four"
|
|
68
|
+
value: "four"
|
|
69
|
+
- label: "Option Five"
|
|
70
|
+
value: "the fifth"
|
|
71
|
+
visibility: storybook
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{#
|
|
2
|
+
FIELDSET COMPONENT
|
|
3
|
+
This component by itself does nothing, but is used to wrap form labels and inputs as well as provide their helper text and error messaging
|
|
4
|
+
|
|
5
|
+
it takes four params:
|
|
6
|
+
|
|
7
|
+
fsinputid: a string, the id of the form field it contains
|
|
8
|
+
fslabel: a string, the label of the form field
|
|
9
|
+
fshelper: a string, helper text, if any
|
|
10
|
+
fserror: a string, error message, if any
|
|
11
|
+
fstype: a string, the type of field
|
|
12
|
+
fsclass: a string, any additional classnames
|
|
13
|
+
#}
|
|
14
|
+
<fieldset id="{{fsinputid}}--fieldset" class="{{prefix}}--fieldset{% if fsclass %} {{fsclass}}{% endif %}" {% if fshelper %}data-helper="{{fshelper}}"{% endif %} {% if fserror %}data-error="{{fserror}}"{% endif %}>
|
|
15
|
+
{% if legend %}
|
|
16
|
+
<legend class="ilo--fieldset--legend">{{legend}}
|
|
17
|
+
{% if grouptooltip %}
|
|
18
|
+
{% include '@components/tooltip/tooltip.twig' with {label: grouptooltip.label, icon: grouptooltip.icon, theme: grouptooltip.theme, className: "ilo--fieldset--legend--tooltip"} %}
|
|
19
|
+
{% endif %}
|
|
20
|
+
</legend>
|
|
21
|
+
{% endif %}
|
|
22
|
+
{% if grouphelper and not grouperror %}
|
|
23
|
+
<span class="ilo--fieldset--helper">{{grouphelper}}</span>
|
|
24
|
+
{% endif %}
|
|
25
|
+
{% if grouperror %}
|
|
26
|
+
<span class="ilo--fieldset--error">{{grouperror}}</span>
|
|
27
|
+
{% endif %}
|
|
28
|
+
<div class="ilo--fieldset--input--{{fstype}}">
|
|
29
|
+
<label class="{{prefix}}--fieldset--label" for="{{fsinputid}}">
|
|
30
|
+
{{fslabel}}
|
|
31
|
+
{% if tooltip %}
|
|
32
|
+
{% include '@components/tooltip/tooltip.twig' with tooltip %}
|
|
33
|
+
{% endif %}
|
|
34
|
+
</label>
|
|
35
|
+
{% block formfield %}
|
|
36
|
+
{% endblock %}
|
|
37
|
+
{% if fshelper and not fserror %}
|
|
38
|
+
<span class="{{prefix}}--fieldset--helper">{{fshelper}}</span>
|
|
39
|
+
{% endif %}
|
|
40
|
+
{% if fserror %}
|
|
41
|
+
<span class="{{prefix}}--fieldset--error">{{fserror}}</span>
|
|
42
|
+
{% endif %}
|
|
43
|
+
</fieldset>
|