@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,13 @@
|
|
|
1
|
+
{#
|
|
2
|
+
INPUT COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
{% extends '@components/fieldset/fieldset.twig' %}
|
|
5
|
+
{% set fsinputid = id ? id : name %}
|
|
6
|
+
{% set fslabel = label %}
|
|
7
|
+
{% set fshelper = helper %}
|
|
8
|
+
{% set fserror = error %}
|
|
9
|
+
{% set fstype = type %}
|
|
10
|
+
|
|
11
|
+
{% block formfield %}
|
|
12
|
+
<input name="{{name}}" type="{{type}}" class="{{prefix}}--input{% if error %} error{% endif %}" {% if placeholder %}placeholder="{{placeholder}}"{% endif %} {% if disabled %}disabled{% endif %} {% if required %}required{% endif %} id="{% if id %}{{id}}{% else %}{{name}}{% endif %}" />
|
|
13
|
+
{% endblock %}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{#
|
|
2
|
+
NUMBER COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
{% extends '@components/fieldset/fieldset.twig' %}
|
|
5
|
+
{% set fsinputid = id ? id : name %}
|
|
6
|
+
{% set fslabel = label %}
|
|
7
|
+
{% set fshelper = helper %}
|
|
8
|
+
{% set fserror = error %}
|
|
9
|
+
{% set fstype = "number" %}
|
|
10
|
+
|
|
11
|
+
{% block formfield %}
|
|
12
|
+
<input name="{{name}}" type="text" class="{{prefix}}--numberpicker {{prefix}}--input{% if error %} error{% endif %}" {% if placeholder %}placeholder="{{placeholder}}"{% endif %} {% if required %}required{% endif %} {% if disabled %}disabled{% endif %} id="{% if id %}{{id}}{% else %}{{name}}{% endif %}" pattern="[0-9]*" inputmode="numeric" />
|
|
13
|
+
{% endblock %}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{#
|
|
2
|
+
TEXTAREA COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
{% extends '@components/fieldset/fieldset.twig' %}
|
|
5
|
+
{% set fsinputid = id ? id : name %}
|
|
6
|
+
{% set fslabel = label %}
|
|
7
|
+
{% set fshelper = helper %}
|
|
8
|
+
{% set fserror = error %}
|
|
9
|
+
{% set fstype = "textarea" %}
|
|
10
|
+
|
|
11
|
+
{% block formfield %}
|
|
12
|
+
<textarea name="textarea" {% if placeholder %}placeholder="{{placeholder}}"{% endif %} {% if required %}required{% endif %} {% if disabled %}disabled{% endif %} class="{{prefix}}--textarea" id="{% if id %}{{id}}{% else %}{{name}}{% endif %}" spellcheck="false"></textarea>
|
|
13
|
+
{% endblock %}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{#
|
|
2
|
+
HERO COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
|
|
5
|
+
<div class="{{prefix}}--hero {{prefix}}--hero--{{theme}} {{prefix}}--hero--{{types}} {% if image %}{{prefix}}--hero--image{% endif %}">
|
|
6
|
+
{% include "@components/image/image.twig" with {
|
|
7
|
+
alt: image.alt,
|
|
8
|
+
caption: image.caption,
|
|
9
|
+
credit: image.credit,
|
|
10
|
+
prefix: prefix,
|
|
11
|
+
url: image.url,
|
|
12
|
+
} only %}
|
|
13
|
+
{% include "@components/herocard/herocard.twig" with {
|
|
14
|
+
alignment: herocard.alignment,
|
|
15
|
+
eyebrow: herocard.eyebrow,
|
|
16
|
+
datecopy: herocard.datecopy,
|
|
17
|
+
intro: herocard.intro,
|
|
18
|
+
prefix: prefix,
|
|
19
|
+
socials: herocard.socials,
|
|
20
|
+
theme: theme,
|
|
21
|
+
title: herocard.title,
|
|
22
|
+
types: types
|
|
23
|
+
} only %}
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
hero:
|
|
2
|
+
use: '@components/hero/hero.twig'
|
|
3
|
+
label: Hero
|
|
4
|
+
description: The Hero presents an image banner.
|
|
5
|
+
fields:
|
|
6
|
+
image:
|
|
7
|
+
type: object
|
|
8
|
+
preview:
|
|
9
|
+
alt: Lorem ipsum
|
|
10
|
+
caption: ""
|
|
11
|
+
credit: ""
|
|
12
|
+
url:
|
|
13
|
+
- breakpoint: 0
|
|
14
|
+
src: "https://placekitten.com/1920/800"
|
|
15
|
+
- breakpoint: 768
|
|
16
|
+
src: "https://placekitten.com/1920/800"
|
|
17
|
+
herocard:
|
|
18
|
+
label: herocard
|
|
19
|
+
type: object
|
|
20
|
+
preview:
|
|
21
|
+
alignment: left
|
|
22
|
+
datecopy: 11 February 2022
|
|
23
|
+
eyebrow: Eyebrow
|
|
24
|
+
intro: "Brief intro text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
|
25
|
+
socials:
|
|
26
|
+
- label: "Facebook"
|
|
27
|
+
url: "https://www.facebook.com/"
|
|
28
|
+
icon: "facebook"
|
|
29
|
+
- label: "Linkedin"
|
|
30
|
+
url: "https://www.linkedin.com/"
|
|
31
|
+
icon: "linkedin"
|
|
32
|
+
title: "This is an left aligned article headline that is more than two lines long"
|
|
33
|
+
settings:
|
|
34
|
+
theme:
|
|
35
|
+
type: select
|
|
36
|
+
label: Theme
|
|
37
|
+
description: The theme type for the hero
|
|
38
|
+
required: false
|
|
39
|
+
preview: 'dark'
|
|
40
|
+
options:
|
|
41
|
+
dark: Dark
|
|
42
|
+
light: Light
|
|
43
|
+
types:
|
|
44
|
+
type: select
|
|
45
|
+
label: Types
|
|
46
|
+
description: The type of hero
|
|
47
|
+
required: false
|
|
48
|
+
preview: 'publication'
|
|
49
|
+
options:
|
|
50
|
+
home: Home
|
|
51
|
+
publication: Publication
|
|
52
|
+
graphic: Graphic
|
|
53
|
+
project: Project
|
|
54
|
+
article: Article
|
|
55
|
+
portal: Portal
|
|
56
|
+
visibility: storybook
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{#
|
|
2
|
+
HEROCARD COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
<div class="{{prefix}}--hero-card {{prefix}}--hero-card--{{alignment}} {{prefix}}--hero-card--{{theme}} {{prefix}}--hero-card--{{types}}">
|
|
5
|
+
{% if eyebrow %}
|
|
6
|
+
<p class="{{ prefix }}--hero-card--eyebrow">{{ eyebrow }}</p>
|
|
7
|
+
{% endif %}
|
|
8
|
+
{% if title %}
|
|
9
|
+
<h2 class="{{ prefix }}--hero-card--title">{{ title }}</h2>
|
|
10
|
+
{% endif %}
|
|
11
|
+
{% if datecopy %}
|
|
12
|
+
<p class="{{ prefix }}--hero-card--datecopy">{{ datecopy }}</p>
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% if intro %}
|
|
15
|
+
<p class="{{ prefix }}--hero-card--intro">{{ intro }}</p>
|
|
16
|
+
{% endif %}
|
|
17
|
+
|
|
18
|
+
<ul class="{{ prefix }}--hero-card--list">
|
|
19
|
+
{% for item in socials %}
|
|
20
|
+
<li class="{{ prefix }}--hero-card--list--item">
|
|
21
|
+
<a
|
|
22
|
+
class="{{ prefix }}--hero-card--link icon icon--{{ item.icon }}"
|
|
23
|
+
href={{ item.url }}
|
|
24
|
+
title={{ item.label }}
|
|
25
|
+
>
|
|
26
|
+
{{ item.label }}
|
|
27
|
+
</a>
|
|
28
|
+
</li>
|
|
29
|
+
{% endfor %}
|
|
30
|
+
</ul>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
herocard:
|
|
2
|
+
use: '@components/herocard/herocard.twig'
|
|
3
|
+
label: Hero Card
|
|
4
|
+
description: The Hero card
|
|
5
|
+
id: herocard
|
|
6
|
+
fields:
|
|
7
|
+
alignment:
|
|
8
|
+
type: string
|
|
9
|
+
label: Alignment
|
|
10
|
+
description: alignment for card
|
|
11
|
+
preview: "center"
|
|
12
|
+
datecopy:
|
|
13
|
+
type: string
|
|
14
|
+
label: Date copy
|
|
15
|
+
description: Date byline copy
|
|
16
|
+
preview: "11 February 2021"
|
|
17
|
+
eyebrow:
|
|
18
|
+
type: string
|
|
19
|
+
label: Date copy
|
|
20
|
+
description: Date byline copy
|
|
21
|
+
preview: "11 February 2021"
|
|
22
|
+
intro:
|
|
23
|
+
type: string
|
|
24
|
+
label: Intro
|
|
25
|
+
description: Intro text for the hero
|
|
26
|
+
preview: "Brief intro text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
|
27
|
+
socials:
|
|
28
|
+
type: object
|
|
29
|
+
label: Social links
|
|
30
|
+
description: The social links to include in the hero
|
|
31
|
+
preview:
|
|
32
|
+
- label: "Facebook"
|
|
33
|
+
url: "https://www.facebook.com/"
|
|
34
|
+
icon: "facebook"
|
|
35
|
+
- label: "Linkedin"
|
|
36
|
+
url: "https://www.linkedin.com/"
|
|
37
|
+
icon: "linkedin"
|
|
38
|
+
title:
|
|
39
|
+
type: string
|
|
40
|
+
label: Title
|
|
41
|
+
description: This is the title for the hero card
|
|
42
|
+
preview: "This is an centered aligned article headline that is more than two lines long"
|
|
43
|
+
visibility: storybook
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{#
|
|
2
|
+
IMAGE COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
<figure class="{{prefix}}--image" data-prefix="{{prefix}}">
|
|
5
|
+
<div class="image {{prefix}}--image--wrapper">
|
|
6
|
+
<picture class="{{prefix}}--image--img">
|
|
7
|
+
{% for img in url|reverse|slice(0,-1) %}
|
|
8
|
+
<source srcset="{{img.src}}" media="(min-width: {{img.breakpoint}}px)">
|
|
9
|
+
{% endfor %}
|
|
10
|
+
<img src="{{url|reverse|last.src}}" alt="{{alt}}">
|
|
11
|
+
</picture>
|
|
12
|
+
{% if credit %}
|
|
13
|
+
<span class="{{prefix}}--credit">
|
|
14
|
+
<span class="{{prefix}}--credit--label">{{credit}}</span>
|
|
15
|
+
</span>
|
|
16
|
+
{% endif %}
|
|
17
|
+
</div>
|
|
18
|
+
<figcaption class="{{prefix}}--image--caption">{{caption}}</figcaption>
|
|
19
|
+
</figure>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
image:
|
|
2
|
+
use: '@components/image/image.twig'
|
|
3
|
+
label: Image
|
|
4
|
+
description: A component for displaying an image.
|
|
5
|
+
fields:
|
|
6
|
+
alt:
|
|
7
|
+
type: string
|
|
8
|
+
label: Alt
|
|
9
|
+
description: alt text for the image
|
|
10
|
+
required: true
|
|
11
|
+
preview: 'My alt text'
|
|
12
|
+
caption:
|
|
13
|
+
type: string
|
|
14
|
+
label: Caption
|
|
15
|
+
description: string
|
|
16
|
+
preview: 'my image caption'
|
|
17
|
+
credit:
|
|
18
|
+
type: string
|
|
19
|
+
label: Credit
|
|
20
|
+
description: string
|
|
21
|
+
preview: 'Photo: copyright 2022 Person S. Name'
|
|
22
|
+
required: true
|
|
23
|
+
url:
|
|
24
|
+
type: object
|
|
25
|
+
label: URL
|
|
26
|
+
description: The image url(s), and at which breakpoint each should be displayed.
|
|
27
|
+
required: true
|
|
28
|
+
preview:
|
|
29
|
+
- breakpoint: 0
|
|
30
|
+
src: 'https://place-hold.it/400x300?text=SmallBreakpointImage'
|
|
31
|
+
- breakpoint: 800
|
|
32
|
+
src: 'https://place-hold.it/800x600?text=MediumBreakpointImage'
|
|
33
|
+
- breakpoint: 1200
|
|
34
|
+
src: 'https://place-hold.it/1200x900?text=LargeBreakpointImage'
|
|
35
|
+
- breakpoint: 1440
|
|
36
|
+
src: 'https://place-hold.it/1600x1200?text=LargestBreakpointImage'
|
|
37
|
+
visibility: storybook
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{#
|
|
2
|
+
LINK COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
<a class="{{prefix}}--link {{prefix}}--link--{{theme}}" href="{{url}}"{% if target %} target={{target}}{% endif %}{% if target == "_blank" %} rel="noopener noreferrer"{% endif %}>
|
|
5
|
+
{% if label %}
|
|
6
|
+
<span className="link__label">{{label}}</span>
|
|
7
|
+
{% endif %}
|
|
8
|
+
</a>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
link:
|
|
2
|
+
use: '@components/link/link.twig'
|
|
3
|
+
label: Link
|
|
4
|
+
description: A component for displaying a link.
|
|
5
|
+
fields:
|
|
6
|
+
url:
|
|
7
|
+
type: string
|
|
8
|
+
label: URL
|
|
9
|
+
description: A string to be used as a url
|
|
10
|
+
preview: "http://www.ilo.org"
|
|
11
|
+
required: true
|
|
12
|
+
target:
|
|
13
|
+
type: string
|
|
14
|
+
label: target
|
|
15
|
+
description: If we want to set the target attribute, the string to use
|
|
16
|
+
preview: "_blank"
|
|
17
|
+
required: false
|
|
18
|
+
label:
|
|
19
|
+
type: string
|
|
20
|
+
label: label
|
|
21
|
+
description: Optional link label
|
|
22
|
+
preview: "Link"
|
|
23
|
+
required: false
|
|
24
|
+
settings:
|
|
25
|
+
theme:
|
|
26
|
+
type: select
|
|
27
|
+
label: Theme
|
|
28
|
+
description: The theme for the link styles
|
|
29
|
+
required: false
|
|
30
|
+
options:
|
|
31
|
+
light: Light
|
|
32
|
+
dark: Dark
|
|
33
|
+
footer: Footer
|
|
34
|
+
preview: 'light'
|
|
35
|
+
visibility: storybook
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{#
|
|
2
|
+
LINK LIST COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
<div class="{{prefix}}--link-list {{prefix}}--link-list--{{theme}}">
|
|
5
|
+
{% if headline %}
|
|
6
|
+
<h3 class="{{prefix}}--link-list--headline">{{headline}}</h3>
|
|
7
|
+
{% endif %}
|
|
8
|
+
<ul class="{{prefix}}--link-list--linkgroups">
|
|
9
|
+
{% for group in linkgroup %}
|
|
10
|
+
<li class="{{prefix}}--link-list--linkgroups-item">
|
|
11
|
+
{% if group.headline is not empty %}
|
|
12
|
+
<h4 class="{{prefix}}--link-list--links--headline">{{group.headline}}</h4>
|
|
13
|
+
{% endif %}
|
|
14
|
+
<ul class="{{prefix}}--link-list--links">
|
|
15
|
+
{% for link in group.links %}
|
|
16
|
+
<li class="{{prefix}}--link-list--links--item{% if link.indented == 'true' %} indented{% endif %}">
|
|
17
|
+
<a href="{{link.url}}" class="{{prefix}}--link-list--link">
|
|
18
|
+
<span class="{{prefix}}--link-list--label">{{link.label}}</span>
|
|
19
|
+
</a>
|
|
20
|
+
</li>
|
|
21
|
+
{% endfor %}
|
|
22
|
+
</ul>
|
|
23
|
+
</li>
|
|
24
|
+
{% endfor %}
|
|
25
|
+
</ul>
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
linklist:
|
|
2
|
+
use: '@components/linklist/linklist.twig'
|
|
3
|
+
label: Link List
|
|
4
|
+
description: The Link List 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
|
+
headline:
|
|
7
|
+
type: string
|
|
8
|
+
label: Headline
|
|
9
|
+
description: Link List's Headline
|
|
10
|
+
preview: Link List Headling
|
|
11
|
+
linkgroup:
|
|
12
|
+
type: object
|
|
13
|
+
label: Link Group
|
|
14
|
+
description: A group of links
|
|
15
|
+
required: true
|
|
16
|
+
preview:
|
|
17
|
+
- headline: Section Headline
|
|
18
|
+
links:
|
|
19
|
+
- label: Link One
|
|
20
|
+
url: 'http://www.google.com'
|
|
21
|
+
- label: Link Two
|
|
22
|
+
url: 'http://www.google.com'
|
|
23
|
+
- label: Link Three
|
|
24
|
+
url: 'http://www.google.com'
|
|
25
|
+
- label: Link Four
|
|
26
|
+
url: 'http://www.google.com'
|
|
27
|
+
- label: Link Five Is Slightly Longer
|
|
28
|
+
url: 'http://www.google.com'
|
|
29
|
+
- headline: Section 2 (With Indents)
|
|
30
|
+
links:
|
|
31
|
+
- label: Section 2 Link One
|
|
32
|
+
url: 'http://www.google.com'
|
|
33
|
+
- indented: 'true'
|
|
34
|
+
label: Section 2 Link Two
|
|
35
|
+
url: 'http://www.google.com'
|
|
36
|
+
- indented: 'true'
|
|
37
|
+
label: Section 2 Link Three
|
|
38
|
+
url: 'http://www.google.com'
|
|
39
|
+
- indented: 'true'
|
|
40
|
+
label: Section 2 Link Four
|
|
41
|
+
url: 'http://www.google.com'
|
|
42
|
+
- label: Section 2 Link Five Is Slightly Longer
|
|
43
|
+
url: 'http://www.google.com'
|
|
44
|
+
theme:
|
|
45
|
+
type: select
|
|
46
|
+
label: Theme
|
|
47
|
+
description: Is this link list on a light or dark background?
|
|
48
|
+
required: true
|
|
49
|
+
options:
|
|
50
|
+
primary: Light
|
|
51
|
+
secondary: Dark
|
|
52
|
+
preview: 'light'
|
|
53
|
+
visibility: storybook
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
list:
|
|
2
|
+
use: '@components/list/list-item.twig'
|
|
3
|
+
label: List Item
|
|
4
|
+
description: A list item.
|
|
5
|
+
fields:
|
|
6
|
+
content:
|
|
7
|
+
type: text
|
|
8
|
+
label: Content
|
|
9
|
+
description: The list item's collapsed content.
|
|
10
|
+
preview:
|
|
11
|
+
faker: lorem.word
|
|
12
|
+
id:
|
|
13
|
+
type: text
|
|
14
|
+
label: ID
|
|
15
|
+
description: The list item's id.
|
|
16
|
+
preview:
|
|
17
|
+
faker: lorem.word
|
|
18
|
+
visibility: storybook
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{#
|
|
2
|
+
LIST COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
{% if ordered == "ordered" %}
|
|
5
|
+
<ol class="ilo--list ilo--list--{{ ordered|default('ordered') }}" data-loadcomponent="List">
|
|
6
|
+
{% if title %}
|
|
7
|
+
<h5 class="ilo--list__title">{{ title }}</h5>
|
|
8
|
+
{% endif %}
|
|
9
|
+
{% for item in items %}
|
|
10
|
+
{% include "@components/list/list-item.twig" with {
|
|
11
|
+
label: item.label,
|
|
12
|
+
content: item.content,
|
|
13
|
+
id: item.id,
|
|
14
|
+
} only %}
|
|
15
|
+
{% endfor %}
|
|
16
|
+
</ol>
|
|
17
|
+
{% else %}
|
|
18
|
+
<ul class="ilo--list ilo--list--{{ ordered|default('unordered') }} ilo--list--{{ alignment|default('') }}" data-loadcomponent="List">
|
|
19
|
+
{% if title %}
|
|
20
|
+
<h5 class="ilo--list__title">{{ title }}</h5>
|
|
21
|
+
{% endif %}
|
|
22
|
+
{% for item in items %}
|
|
23
|
+
{% include "@components/list/list-item.twig" with {
|
|
24
|
+
label: item.label,
|
|
25
|
+
content: item.content,
|
|
26
|
+
id: item.id,
|
|
27
|
+
} only %}
|
|
28
|
+
{% endfor %}
|
|
29
|
+
</ul>
|
|
30
|
+
{% endif %}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
list:
|
|
2
|
+
use: '@components/list/list.twig'
|
|
3
|
+
label: List
|
|
4
|
+
description: A list.
|
|
5
|
+
fields:
|
|
6
|
+
title:
|
|
7
|
+
type: text
|
|
8
|
+
label: Label
|
|
9
|
+
description: The list item's heading.
|
|
10
|
+
preview:
|
|
11
|
+
faker: lorem.word
|
|
12
|
+
items:
|
|
13
|
+
type: object
|
|
14
|
+
label: Items
|
|
15
|
+
description: The list items.
|
|
16
|
+
required: true
|
|
17
|
+
preview:
|
|
18
|
+
- content: Arabica. Arabica is the most popular type of coffee, hands down.
|
|
19
|
+
id: item1
|
|
20
|
+
- content: Robusta. While Arabica is the most popular, Robusta is cheaper and stronger.
|
|
21
|
+
id: item2
|
|
22
|
+
- content: Black coffee is as simple as it gets with ground coffee beans steeped in hot water, served warm.
|
|
23
|
+
id: item3
|
|
24
|
+
- content: Latte. Made with espresso and hot steamed milk, milkier than a cappuccino.
|
|
25
|
+
id: item4
|
|
26
|
+
- content: Cappuccino. Made with espresso and milk that has been frothed up with pressurized steam.
|
|
27
|
+
id: item5
|
|
28
|
+
settings:
|
|
29
|
+
ordered:
|
|
30
|
+
type: select
|
|
31
|
+
label: Ordered
|
|
32
|
+
description: The order for the list.
|
|
33
|
+
required: false
|
|
34
|
+
options:
|
|
35
|
+
ordered: Ordered
|
|
36
|
+
unordered: Unordered
|
|
37
|
+
unstyled: Unstyled
|
|
38
|
+
preview: 'unstyled'
|
|
39
|
+
alignment:
|
|
40
|
+
type: select
|
|
41
|
+
label: Alignment
|
|
42
|
+
description: Is the list displayed horizontally?
|
|
43
|
+
options:
|
|
44
|
+
default: Default
|
|
45
|
+
horizontal: Horizontal
|
|
46
|
+
preview: 'default'
|
|
47
|
+
required: false
|
|
48
|
+
visibility: storybook
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Loading from './loading';
|
|
2
|
+
|
|
3
|
+
Drupal.behaviors.loading = {
|
|
4
|
+
attach() {
|
|
5
|
+
Array.prototype.forEach.call(
|
|
6
|
+
document.querySelectorAll(`[data-loadcomponent="Loading"]`),
|
|
7
|
+
(element) => {
|
|
8
|
+
// eslint-disable-next-line no-console
|
|
9
|
+
console.log('loading Loading component....');
|
|
10
|
+
new Loading(element);
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
},
|
|
14
|
+
};
|