@ilo-org/twig 0.2.4 → 0.2.6
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.log +14009 -13996
- package/CHANGELOG.md +42 -0
- package/README.md +203 -2
- package/apps/storybook/manager-head.html +2 -0
- package/apps/storybook/patterns/intro.stories.mdx +311 -0
- package/apps/storybook/patterns/welcome.stories.mdx +61 -16
- package/apps/storybook/preview-head.html +0 -6
- package/apps/storybook/preview.js +9 -11
- package/apps/storybook/styles.scss +0 -1
- package/images/favicon.ico +0 -0
- package/package.json +7 -7
- package/src/patterns/components/accordion/accordion.wingsuit.yml +18 -36
- package/src/patterns/components/button/button.wingsuit.yml +34 -33
- package/src/patterns/components/callout/callout.wingsuit.yml +2 -2
- package/src/patterns/components/card/card.twig +1 -1
- package/src/patterns/components/card/card.wingsuit.yml +37 -40
- package/src/patterns/components/cardgroup/cardgroup.wingsuit.yml +0 -4
- package/src/patterns/components/dropdown/dropdown.wingsuit.yml +20 -13
- package/src/patterns/components/hero/hero.wingsuit.yml +4 -3
- package/src/patterns/components/herocard/herocard.wingsuit.yml +14 -9
- package/src/patterns/components/linklist/linklist.stories.jsx +5 -0
- package/src/patterns/components/linklist/linklist.wingsuit.yml +3 -2
- package/src/patterns/components/list/list.wingsuit.yml +4 -4
- package/src/patterns/components/localnav/localnav.twig +58 -4
- package/src/patterns/components/navigation/navigation.twig +0 -1
- package/src/patterns/components/navigation/navigation.wingsuit.yml +2 -2
- package/src/patterns/components/notification/notification.wingsuit.yml +11 -11
- package/src/patterns/components/pagination/pagination.wingsuit.yml +2 -2
- package/src/patterns/components/readmore/readmore.wingsuit.yml +5 -1
- package/src/patterns/components/tags/tag.wingsuit.yml +5 -5
- package/src/patterns/components/tags/tags.wingsuit.yml +2 -2
- package/src/patterns/components/tooltip/tooltip.js +5 -4
- package/src/patterns/components/tooltip/tooltip.wingsuit.yml +4 -3
|
@@ -7,20 +7,18 @@ const namespaces = require('../../src/namespaces');
|
|
|
7
7
|
initJsBehaviors('Drupal');
|
|
8
8
|
|
|
9
9
|
addParameters({
|
|
10
|
+
viewMode: 'docs',
|
|
11
|
+
previewTabs: {
|
|
12
|
+
'storybook/docs/panel': {
|
|
13
|
+
index: 1,
|
|
14
|
+
title: 'Documentation',
|
|
15
|
+
},
|
|
16
|
+
canvas: { title: 'Canvas', hidden: false },
|
|
17
|
+
},
|
|
10
18
|
options: {
|
|
11
19
|
storySort: {
|
|
12
20
|
method: 'alphabetical',
|
|
13
|
-
order: [
|
|
14
|
-
'Welcome',
|
|
15
|
-
'Layout',
|
|
16
|
-
'Tokens',
|
|
17
|
-
['Colors', 'Typography', 'Scales'],
|
|
18
|
-
'Atoms',
|
|
19
|
-
'Molecules',
|
|
20
|
-
'Organisms',
|
|
21
|
-
'Templates',
|
|
22
|
-
'Pages',
|
|
23
|
-
],
|
|
21
|
+
order: ['Welcome', 'Intro', 'Tokens', ['Colors', 'Typography']],
|
|
24
22
|
locales: 'en-US',
|
|
25
23
|
},
|
|
26
24
|
},
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/twig",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Twig components for the ILO's Design System",
|
|
6
6
|
"main": "",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"components"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@ilo-org/fonts": "0.0.
|
|
24
|
-
"@ilo-org/icons": "0.1.
|
|
25
|
-
"@ilo-org/styles": "0.1.
|
|
26
|
-
"@ilo-org/themes": "0.1.
|
|
27
|
-
"@ilo-org/utils": "0.0.
|
|
23
|
+
"@ilo-org/fonts": "0.0.3",
|
|
24
|
+
"@ilo-org/icons": "0.1.11",
|
|
25
|
+
"@ilo-org/styles": "0.1.11",
|
|
26
|
+
"@ilo-org/themes": "0.1.11",
|
|
27
|
+
"@ilo-org/utils": "0.0.7",
|
|
28
28
|
"@wingsuit-designsystem/preset-scss": "^1.2.3",
|
|
29
29
|
"video.js": "^7.19.2"
|
|
30
30
|
},
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"output": "node outputtwigs.js",
|
|
104
104
|
"release": ""
|
|
105
105
|
},
|
|
106
|
-
"readme": "# ILO Design System - Twig Package\n\nThis package provides the implementation of the Design System using [Twig](https://twig.symfony.com/doc/). It also includes a [Storybook](https://storybook.js.org/) project for documentation and development of Twig components, using [Wingsuit](https://wingsuit-designsystem.github.io/).\n\n#### PNPM\n\nTo start storybook\n\n```bash\npnpm storybook\n```\n\nTo build storybook\n\n```bash\npnpm build:storybook\n```\n\nTo build Twigs to be used in a CMS like Drupal (this will output Twigs and necessary JavaScript to a `/dist` folder.)\n\n```bash\npnpm output\n```\n"
|
|
106
|
+
"readme": "# ILO Design System - Twig Package\n\nThis package provides the implementation of the Design System using [Twig](https://twig.symfony.com/doc/). It also includes a [Storybook](https://storybook.js.org/) project for documentation and development of Twig components, using [Wingsuit](https://wingsuit-designsystem.github.io/). Wingsuit uses [Twing](https://www.npmjs.com/package/twing), a Node port of Twig, to compile Twigs to HTML. It has dependencies on the following other @ilo-org packages:\n\n- [@ilo-org/themes](./packages/themes)\n- [@ilo-org/fonts](./packages/fonts)\n- [@ilo-org/styles](./packages/styles)\n- [@ilo-org/utils](./packages/utils)\n- [@ilo-org/icons](./packages/icons)\n\n#### Architecture\n\nBecause this is a modified version of Storybook which compliles and displays Twigs instead of React components, there are some notable differences between this and vanilla versions of Storybook. One prominent difference is in directory structure. Each component folder, located in `src/patterns/components`, contains the following files:\n\n```\ncomponent.stories.jsx\ncomponent.twig\ncomponent.wingsuit.yml\nindex.js\n```\n\nand potentially, if Javascript interactivity exists, also the following:\n\n```\ncomponent.behavior.js\ncomponent.js\n```\n\nWingsuit consumes the `component.wingsuit.yml` file, which is a [UI Pattern YAML](https://wingsuit-designsystem.github.io/components/wingsuit/) borrowed from [Drupal](https://www.drupal.org/project/ui_patterns_settings), and uses this to populate and format the Storybook story for each components. **As such, one is limited in how much one can customize the Storybook experience.**\n\n#### Javascript\n\nIn this package, Javascript is vanilla, with each component that requires Javascript functionality loading an [ES class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) named after the component, scoped and bound to the component's outermost element. Wingsuit is configured to instantiate view classes via a function that looks for a [data attribute](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes) that calls the view name provided in that attribute. On page load, the app looks for elements with the data attribute `data-loadcomponent` and loads whatever modules have corresponding names, passing a reference to the `HTMLElement` containing the data attribute. All the JS is bundled by Webpack into one file, meaning the JS file can be cached and only has to be downloaded from the server once per session.\n\nThe JS is well-documented in comments, so poke around and you'll get the gist of how it works.\n\nHere's an example of HTML component markup that will automatically call some Javascript. Given the following HTML:\n\n```\n<section class=\"component componentname\" data-loadcomponent=\"ComponentName\">\n <!-- component HTML goes here -->\n</section>\n```\n\nJavascript will look in the `ComponentMap` Class for a JS Class called `ComponentName` and then create a new instance of that class and call it. If you've added a new JS Class specific to the module you've built, you'll need to import the JS file to `ComponenetMap` and add it to `ComponenteMap`'s exports. If you've created a new Class, you'll need to make sure to pass the param `element` into the constructor - this is a reference to the DOM element with the `data-loadcomponent` attribute on it. This allows you to scope your JS to each instance of an HTML module.\n\n#### Installation and PNPM Commands\n\nTo install\n\n```bash\nnpm i @ilo-org/twig\n```\n\nTo start storybook\n\n```bash\npnpm storybook\n```\n\nTo build storybook\n\n```bash\npnpm build:storybook\n```\n\nTo build and start storybook\n\n```bash\npnpm build\n```\n\nTo build Twigs to be used in a CMS like Drupal (this will output Twigs and necessary JavaScript to a `/dist` folder.)\n\n```bash\npnpm output\n```\n\nThis package imports the `prefix` from the `themes` package; to manually import it, run\n\n```bash\npnpm import:prefix\n```\n\nThis package imports icon svgs from the `icons` package; to manually import them, run\n\n```bash\npnpm import:svgs\n```\n\n## Questions and Feedback\n\n(TBD)\n\n## Accessibility Standards\n\n(TBD)\n\n## Contributing\n\nILO Design System is an open-source project and we welcome your contributions! Before submitting a pull request, please take a moment to review the following guidelines.\n\n### Branches\n\n| Branch | Purpose |\n| --------- | ---------------------------------- |\n| `main` | The latest version of all packages |\n| `develop` | The next release of all packages |\n\n### Contribution workflow\n\n1. Fork and clone the repo\n2. Create a new branch from the `develop` branch\n3. Make your changes and [add a changeset](#versioning) identifying the changes and affected packages\n4. Push your branch to the forked version of the repo\n5. Open a pull request back to the `develop` branch of the main repo\n\n### Versioning\n\nThe project uses [changesets](https://github.com/changesets/changesets) to manage package versioning. All pull requests that will affect the project's semantic versioning must include a changest.\n\nSee more information on [how to add a changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)\n\n### Conventions\n\nContributions should respect the following conventions for branch names, commit messages and pull request descriptions\n\n#### Commits\n\nCommits should follow [Angular Commit Message Guidelines](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#commit).\n\n```\n<type>(<scope>): <subject>\n```\n\nExamples:\n\n```\nfix(react): change button color on hover\nfeat(twig): add button component\nci(github): add release workflow\nperf(react): improve modal animations\n```\n\n#### Types\n\n- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)\n- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)\n- docs: Documentation only changes\n- feat: A new feature\n- fix: A bug fix\n- perf: A code change that improves performance\n- refactor: A code change that neither fixes a bug nor adds a feature\n- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)\n- test: Adding missing tests or correcting existing tests\n\n#### Scopes\n\nThis should be a package name or an aspect of the project's configuration.\n\n### Branches\n\nBranch names should broadly mirror the same convention as commits.\n\nExamples:\n\n```\nfeat/react/modal-wrapper\nfix/twig/modal-wrapper\n```\n\n### Pull requests\n\nPull requests should include a descriptive name and detailed explanation of what merging the pull request will accomplish. Authors should make sure to reference Github issues that the the pull request will fix or affect.\n\n## Building the project\n\nUse [nvm](https://github.com/nvm-sh/nvm) to make sure you have the correct version of node installed.\n\n```bash\nnvm use\n```\n\nInstall [pnpm](https://pnpm.io/).\n\n```bash\nnpm i -g pnpm\n```\n\nInstall dependencies\n\n```bash\npnpm recursive install\n```\n\nBuild all packages.\n\n```bash\npnpm build:all\n```\n\nStart React storybook\n\n```bash\npnpm start:react-storybook\n```\n\nStart Twig storybook\n\n```bash\npnpm start:twig-storybook\n```\n\nCheck types\n\n```bash\npnpm check:types\n```\n\nRun all tests\n\n```bash\npnpm test:all\n```\n"
|
|
107
107
|
}
|
|
@@ -5,21 +5,6 @@ accordion:
|
|
|
5
5
|
related content on a page. Click the accordions below to
|
|
6
6
|
expand/collapse the accordion content.
|
|
7
7
|
fields:
|
|
8
|
-
size:
|
|
9
|
-
type: select
|
|
10
|
-
label: Size
|
|
11
|
-
description: The size of the accordion.
|
|
12
|
-
required: false
|
|
13
|
-
options:
|
|
14
|
-
small: Small
|
|
15
|
-
large: Large
|
|
16
|
-
preview: small
|
|
17
|
-
allowMultipleExpanded:
|
|
18
|
-
type: string
|
|
19
|
-
label: Allow Multiple Expanded
|
|
20
|
-
description: Allow mutiple accordion items to be expandable at once.
|
|
21
|
-
preview: 'true'
|
|
22
|
-
required: false
|
|
23
8
|
items:
|
|
24
9
|
type: object
|
|
25
10
|
label: Items
|
|
@@ -34,26 +19,23 @@ accordion:
|
|
|
34
19
|
content: "<p>Content of Item 2</p><p>Content of Item 2</p><p>Content of Item 2</p><p>Content of Item 2</p><p>Content of Item 2</p>"
|
|
35
20
|
id: item2
|
|
36
21
|
defaultExpanded: false
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
defaultExpanded: 'true'
|
|
50
|
-
- label: label 2
|
|
51
|
-
content: "<p>Content of Item 2</p><p>Content of Item 2</p><p>Content of Item 2</p><p>Content of Item 2</p><p>Content of Item 2</p>"
|
|
52
|
-
id: item2
|
|
53
|
-
defaultExpanded: 'true'
|
|
54
|
-
multiple:
|
|
22
|
+
settings:
|
|
23
|
+
size:
|
|
24
|
+
type: select
|
|
25
|
+
label: Size
|
|
26
|
+
description: The size of the accordion.
|
|
27
|
+
required: false
|
|
28
|
+
options:
|
|
29
|
+
small: Small
|
|
30
|
+
large: Large
|
|
31
|
+
preview: small
|
|
32
|
+
allowMultipleExpanded:
|
|
33
|
+
type: select
|
|
55
34
|
label: Allow Multiple Expanded
|
|
56
|
-
description:
|
|
57
|
-
|
|
58
|
-
|
|
35
|
+
description: Allow mutiple accordion items to be expandable at once.
|
|
36
|
+
options:
|
|
37
|
+
true: True
|
|
38
|
+
false: False
|
|
39
|
+
preview: 'true'
|
|
40
|
+
required: false
|
|
59
41
|
visibility: storybook
|
|
@@ -3,6 +3,37 @@ button:
|
|
|
3
3
|
label: Button
|
|
4
4
|
description: A button or a link styled like a button.
|
|
5
5
|
fields:
|
|
6
|
+
label:
|
|
7
|
+
type: string
|
|
8
|
+
label: Label
|
|
9
|
+
description: The label for the button
|
|
10
|
+
preview: 'Button'
|
|
11
|
+
required: true
|
|
12
|
+
url:
|
|
13
|
+
type: string
|
|
14
|
+
label: url
|
|
15
|
+
description: The url for the button if it's a link
|
|
16
|
+
preview: ''
|
|
17
|
+
required: false
|
|
18
|
+
target:
|
|
19
|
+
type: string
|
|
20
|
+
label: target
|
|
21
|
+
description: Should the button open in a new tab? If so, include the name of the tab. Only evaluated if the url field is populated.
|
|
22
|
+
preview: 'true'
|
|
23
|
+
required: false
|
|
24
|
+
icon:
|
|
25
|
+
type: string
|
|
26
|
+
label: Icon
|
|
27
|
+
description: optional icon to include in button
|
|
28
|
+
preview: false
|
|
29
|
+
required: false
|
|
30
|
+
className:
|
|
31
|
+
type: string
|
|
32
|
+
label: Class name
|
|
33
|
+
description: optional class name
|
|
34
|
+
preview: 'optionalclass'
|
|
35
|
+
required: false
|
|
36
|
+
settings:
|
|
6
37
|
size:
|
|
7
38
|
type: select
|
|
8
39
|
label: Size
|
|
@@ -34,24 +65,6 @@ button:
|
|
|
34
65
|
true: 'true'
|
|
35
66
|
false: false
|
|
36
67
|
preview: 'false'
|
|
37
|
-
label:
|
|
38
|
-
type: string
|
|
39
|
-
label: Label
|
|
40
|
-
description: The label for the button
|
|
41
|
-
preview: 'Button'
|
|
42
|
-
required: true
|
|
43
|
-
url:
|
|
44
|
-
type: string
|
|
45
|
-
label: url
|
|
46
|
-
description: The url for the button if it's a link
|
|
47
|
-
preview: ''
|
|
48
|
-
required: false
|
|
49
|
-
target:
|
|
50
|
-
type: string
|
|
51
|
-
label: target
|
|
52
|
-
description: Should the button open in a new tab? If so, include the name of the tab. Only evaluated if the url field is populated.
|
|
53
|
-
preview: 'true'
|
|
54
|
-
required: false
|
|
55
68
|
kind:
|
|
56
69
|
type: select
|
|
57
70
|
label: Kind
|
|
@@ -62,17 +75,11 @@ button:
|
|
|
62
75
|
reset: reset
|
|
63
76
|
submit: submit
|
|
64
77
|
preview: 'button'
|
|
65
|
-
icon:
|
|
66
|
-
type: string
|
|
67
|
-
label: Icon
|
|
68
|
-
description: optional icon to include in button
|
|
69
|
-
preview: false
|
|
70
|
-
required: false
|
|
71
78
|
iconPosition:
|
|
72
79
|
type: select
|
|
73
80
|
label: Icon Position
|
|
74
81
|
description: if there's an icon, where is it in the button?
|
|
75
|
-
|
|
82
|
+
options:
|
|
76
83
|
left: left
|
|
77
84
|
right: right
|
|
78
85
|
preview: left
|
|
@@ -81,22 +88,16 @@ button:
|
|
|
81
88
|
type: select
|
|
82
89
|
label: Icon Only
|
|
83
90
|
description: Is this an icon-only button?
|
|
84
|
-
|
|
91
|
+
options:
|
|
85
92
|
true: 'true'
|
|
86
93
|
false: false
|
|
87
94
|
preview: false
|
|
88
95
|
required: false
|
|
89
|
-
className:
|
|
90
|
-
type: string
|
|
91
|
-
label: Class name
|
|
92
|
-
description: optional class name
|
|
93
|
-
preview: 'optionalclass'
|
|
94
|
-
required: false
|
|
95
96
|
opensmodal:
|
|
96
97
|
type: select
|
|
97
98
|
label: Opens Modal
|
|
98
99
|
description: Does this button trigger open a modal?
|
|
99
|
-
|
|
100
|
+
options:
|
|
100
101
|
true: 'true'
|
|
101
102
|
false: false
|
|
102
103
|
preview: false
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
callout:
|
|
2
2
|
use: '@components/callout/callout.twig'
|
|
3
3
|
label: Callout
|
|
4
|
-
description: A callout alert
|
|
4
|
+
description: A callout alert section with a few different types
|
|
5
5
|
fields:
|
|
6
6
|
buttonLabel:
|
|
7
7
|
type: string
|
|
@@ -57,7 +57,7 @@ callout:
|
|
|
57
57
|
isOpen:
|
|
58
58
|
type: select
|
|
59
59
|
label: Is Open
|
|
60
|
-
description: Whether or not a collapsible callout is open on page load
|
|
60
|
+
description: Whether or not a collapsible callout is open on page load. If callout is not collapsible then the callout will be open always.
|
|
61
61
|
required: false
|
|
62
62
|
options:
|
|
63
63
|
true: True
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
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
5
|
{% if type == "" %}
|
|
6
6
|
{% set type = variant %}
|
|
7
7
|
{% endif %}
|
|
@@ -6,13 +6,8 @@ card:
|
|
|
6
6
|
title:
|
|
7
7
|
type: string
|
|
8
8
|
label: Title
|
|
9
|
-
description: Title field
|
|
9
|
+
description: Title field for the card
|
|
10
10
|
preview: Lorem ipsum
|
|
11
|
-
isvideo:
|
|
12
|
-
type: string
|
|
13
|
-
label: Is a Video
|
|
14
|
-
description: Whether the card should display a video icon
|
|
15
|
-
preview: False
|
|
16
11
|
intro:
|
|
17
12
|
type: string
|
|
18
13
|
label: Intro
|
|
@@ -21,84 +16,84 @@ card:
|
|
|
21
16
|
eyebrow:
|
|
22
17
|
type: string
|
|
23
18
|
label: Eyebrow
|
|
24
|
-
description: Eyebrow copy
|
|
19
|
+
description: Eyebrow copy
|
|
25
20
|
preview: "Eyebrow"
|
|
26
21
|
date:
|
|
27
22
|
type: object
|
|
28
23
|
label: Date
|
|
29
|
-
description: Date copy
|
|
24
|
+
description: Date copy (human and Unix)
|
|
30
25
|
preview:
|
|
31
26
|
human: 20 September 2022
|
|
32
27
|
unix: 1670389200
|
|
33
28
|
eventdetails:
|
|
34
29
|
type: string
|
|
35
30
|
label: Eyebrow
|
|
36
|
-
description:
|
|
31
|
+
description: Event details for `Detail` card
|
|
37
32
|
preview: ""
|
|
38
33
|
profile:
|
|
39
34
|
type: object
|
|
40
35
|
label: Profile
|
|
41
|
-
description: Profile to embed in the card
|
|
36
|
+
description: Profile to embed in the card for `Graphic Text`
|
|
42
37
|
preview:
|
|
43
38
|
list:
|
|
44
39
|
type: object
|
|
45
40
|
label: List
|
|
46
|
-
description: List to embed in the card
|
|
41
|
+
description: List to embed in the card, specifically used for `Factlist`
|
|
47
42
|
preview:
|
|
48
43
|
link:
|
|
49
44
|
type: string
|
|
50
45
|
label: Link
|
|
51
|
-
description: Link for clickable cards
|
|
46
|
+
description: Link for clickable cards. Do no use on `Multilink`, `Factlist`, `Data`, or `Stat` cards.
|
|
52
47
|
preview: "https://www.google.com/"
|
|
53
48
|
cta:
|
|
54
49
|
type: object
|
|
55
50
|
label: CTA
|
|
56
|
-
description: Items for clickable CTA button
|
|
51
|
+
description: Items for clickable CTA button. Button used for `Graphic Promo` card.
|
|
57
52
|
preview:
|
|
58
53
|
image:
|
|
59
54
|
type: string
|
|
60
55
|
label: Image
|
|
61
|
-
description: The image for the card
|
|
62
|
-
preview: "
|
|
56
|
+
description: The image for the card. Images should be avoided on `Graphic Promo`, `Graphic Text`, `Factlist`, and `Stat` card.
|
|
57
|
+
preview: ""
|
|
63
58
|
source:
|
|
64
59
|
type: object
|
|
65
60
|
label: Source
|
|
66
|
-
description: Source link for
|
|
61
|
+
description: Source link for `Stat` cards
|
|
67
62
|
preview:
|
|
68
63
|
linklist:
|
|
69
64
|
type: object
|
|
70
65
|
label: Link List
|
|
71
|
-
description:
|
|
72
|
-
preview:
|
|
73
|
-
externallink:
|
|
74
|
-
type: object
|
|
75
|
-
label: External Link
|
|
76
|
-
description: External link
|
|
66
|
+
description: Implementation of the LinkList component. Appears at the bottom of `Multilink` or `Feature` card.
|
|
77
67
|
preview:
|
|
78
68
|
dataset:
|
|
79
69
|
type: object
|
|
80
|
-
label:
|
|
81
|
-
description:
|
|
70
|
+
label: Dataset object
|
|
71
|
+
description: Dataset object for the `Data` card. Array of Content (label, copy), Files object (optional headline, array of items with label and url) and Links object (optional headline, array of items with label and url)
|
|
82
72
|
preview:
|
|
73
|
+
settings:
|
|
83
74
|
color:
|
|
84
|
-
type:
|
|
75
|
+
type: select
|
|
85
76
|
label: Color
|
|
86
|
-
description: Color of the stat cards, options are turquoise
|
|
77
|
+
description: Color of the stat cards, options are `turquoise`, `green`, `yellow`, or `blue`. Only use for stat cards.
|
|
78
|
+
options:
|
|
79
|
+
turquoise: turquoise
|
|
80
|
+
green: green
|
|
81
|
+
yellow: yellow
|
|
82
|
+
blue: blue
|
|
87
83
|
preview: 'blue'
|
|
88
|
-
settings:
|
|
89
84
|
theme:
|
|
90
85
|
type: select
|
|
91
86
|
label: Theme
|
|
92
|
-
description: The theme type for the
|
|
87
|
+
description: The theme type for the card. Theme choice doesn't apply to these card types - `Multilink`, `Data`, `Stat` and `Detail`
|
|
93
88
|
required: false
|
|
94
|
-
preview: '
|
|
89
|
+
preview: 'light'
|
|
95
90
|
options:
|
|
96
91
|
dark: Dark
|
|
97
92
|
light: Light
|
|
98
93
|
size:
|
|
99
94
|
type: select
|
|
100
95
|
label: Size
|
|
101
|
-
description: Size of the cards (usually reduces padding)
|
|
96
|
+
description: Size of the cards (usually reduces padding). `Wide` on Multilink and Feature cause a two column structure above a desktop breakpoint.
|
|
102
97
|
preview: 'standard'
|
|
103
98
|
options:
|
|
104
99
|
wide: Wide
|
|
@@ -107,7 +102,7 @@ card:
|
|
|
107
102
|
cornercut:
|
|
108
103
|
type: select
|
|
109
104
|
label: Corner cut
|
|
110
|
-
description: Setting for whether the card has a cut corner
|
|
105
|
+
description: Setting for whether the card has a cut corner. The only cards that use this setting are `Graphic Promo` and `Factlist`.
|
|
111
106
|
preview: cornercut
|
|
112
107
|
options:
|
|
113
108
|
cornercut: Corner cut
|
|
@@ -115,15 +110,20 @@ card:
|
|
|
115
110
|
alignment:
|
|
116
111
|
type: select
|
|
117
112
|
label: Alignment
|
|
118
|
-
description: Set whether card
|
|
113
|
+
description: Set whether card image is right aligned or left aligned for `Multilink` cards.
|
|
119
114
|
preview: left
|
|
120
115
|
options:
|
|
121
116
|
left: Left
|
|
122
117
|
right: right
|
|
118
|
+
isvideo:
|
|
119
|
+
type: select
|
|
120
|
+
label: Is a Video
|
|
121
|
+
description: Whether the card should display a video icon (for Feature card)
|
|
122
|
+
preview: false
|
|
123
|
+
options:
|
|
124
|
+
true: True
|
|
125
|
+
false: False
|
|
123
126
|
variants:
|
|
124
|
-
default:
|
|
125
|
-
label: Default
|
|
126
|
-
description: the default settings for the Card
|
|
127
127
|
graphic:
|
|
128
128
|
label: Graphic Text Card
|
|
129
129
|
description: The graphic Card
|
|
@@ -133,6 +133,7 @@ card:
|
|
|
133
133
|
date:
|
|
134
134
|
human: 20 September 2022
|
|
135
135
|
unix: 1670389200
|
|
136
|
+
image: ""
|
|
136
137
|
link: "https://www.google.com/search?q=graphic"
|
|
137
138
|
profile:
|
|
138
139
|
avatar: "https://placekitten.com/128/128"
|
|
@@ -186,7 +187,6 @@ card:
|
|
|
186
187
|
label: Feature Card
|
|
187
188
|
description: The Feature Card
|
|
188
189
|
fields:
|
|
189
|
-
isvideo: true
|
|
190
190
|
title: "Vertical info card descriptive headline text"
|
|
191
191
|
eyebrow: Eyebrow title
|
|
192
192
|
date:
|
|
@@ -201,9 +201,6 @@ card:
|
|
|
201
201
|
links:
|
|
202
202
|
- label: Link One
|
|
203
203
|
url: 'http://www.google.com'
|
|
204
|
-
# externallink:
|
|
205
|
-
# label: Link One
|
|
206
|
-
# url: 'https://www.google.com'
|
|
207
204
|
detail:
|
|
208
205
|
label: Detail Card
|
|
209
206
|
description: The Detail Card
|
|
@@ -215,7 +212,6 @@ card:
|
|
|
215
212
|
human: 00 month 0000
|
|
216
213
|
unix: 1670389200
|
|
217
214
|
link: "https://www.google.com/search?q=detail"
|
|
218
|
-
# image: "https://placekitten.com/296/196"
|
|
219
215
|
image: "https://www.ilo.org/wcmsp5/groups/public/---dgreports/---dcomm/documents/image/wcms_856513.jpg"
|
|
220
216
|
profile:
|
|
221
217
|
eventdetails: "8 - 9 February 2022, 8:30 - 12:00 CET | Egypt"
|
|
@@ -224,6 +220,7 @@ card:
|
|
|
224
220
|
description: The Fact List Card
|
|
225
221
|
fields:
|
|
226
222
|
title: "Title of fast fact list"
|
|
223
|
+
image: ""
|
|
227
224
|
list:
|
|
228
225
|
settings:
|
|
229
226
|
- ordered: unordered
|
|
@@ -104,7 +104,6 @@ cardgroup:
|
|
|
104
104
|
eventdetails: ""
|
|
105
105
|
cta: ""
|
|
106
106
|
source: ""
|
|
107
|
-
linklist: ""
|
|
108
107
|
list: ""
|
|
109
108
|
dataset: ""
|
|
110
109
|
color: ""
|
|
@@ -120,7 +119,6 @@ cardgroup:
|
|
|
120
119
|
eventdetails: ""
|
|
121
120
|
cta: ""
|
|
122
121
|
source: ""
|
|
123
|
-
linklist: ""
|
|
124
122
|
list: ""
|
|
125
123
|
dataset: ""
|
|
126
124
|
color: ""
|
|
@@ -136,7 +134,6 @@ cardgroup:
|
|
|
136
134
|
eventdetails: ""
|
|
137
135
|
cta: ""
|
|
138
136
|
source: ""
|
|
139
|
-
linklist: ""
|
|
140
137
|
list: ""
|
|
141
138
|
dataset: ""
|
|
142
139
|
color: ""
|
|
@@ -152,7 +149,6 @@ cardgroup:
|
|
|
152
149
|
eventdetails: ""
|
|
153
150
|
cta: ""
|
|
154
151
|
source: ""
|
|
155
|
-
linklist: ""
|
|
156
152
|
list: ""
|
|
157
153
|
dataset: ""
|
|
158
154
|
color: ""
|
|
@@ -4,29 +4,17 @@ dropdown:
|
|
|
4
4
|
description: The Dropdown displays a select element with options, and is most
|
|
5
5
|
commonly used in forms.
|
|
6
6
|
fields:
|
|
7
|
-
autocomplete:
|
|
8
|
-
type: string
|
|
9
|
-
label: autocomplete
|
|
10
|
-
description: Should this field autocomplete
|
|
11
|
-
preview: false
|
|
12
|
-
required: false
|
|
13
7
|
defaultValue:
|
|
14
8
|
type: string
|
|
15
9
|
label: defaultValue
|
|
16
10
|
description: The default value of the select
|
|
17
11
|
preview: "option one"
|
|
18
12
|
required: true
|
|
19
|
-
disabled:
|
|
20
|
-
type: boolean
|
|
21
|
-
label: disabled
|
|
22
|
-
description: Is this field disabled?
|
|
23
|
-
preview: false
|
|
24
|
-
required: false
|
|
25
13
|
error:
|
|
26
14
|
type: string
|
|
27
15
|
label: error
|
|
28
16
|
description: Does this have an error? If so, the error message
|
|
29
|
-
preview:
|
|
17
|
+
preview: ''
|
|
30
18
|
required: false
|
|
31
19
|
helper:
|
|
32
20
|
type: string
|
|
@@ -68,4 +56,23 @@ dropdown:
|
|
|
68
56
|
value: "four"
|
|
69
57
|
- label: "Option Five"
|
|
70
58
|
value: "the fifth"
|
|
59
|
+
settings:
|
|
60
|
+
autocomplete:
|
|
61
|
+
type: select
|
|
62
|
+
label: autocomplete
|
|
63
|
+
description: Should this field autocomplete
|
|
64
|
+
options:
|
|
65
|
+
true: 'true'
|
|
66
|
+
false: false
|
|
67
|
+
preview: false
|
|
68
|
+
required: false
|
|
69
|
+
disabled:
|
|
70
|
+
type: select
|
|
71
|
+
label: disabled
|
|
72
|
+
description: Is this field disabled?
|
|
73
|
+
options:
|
|
74
|
+
true: 'true'
|
|
75
|
+
false: false
|
|
76
|
+
preview: false
|
|
77
|
+
required: false
|
|
71
78
|
visibility: storybook
|
|
@@ -4,7 +4,7 @@ hero:
|
|
|
4
4
|
description: The Hero presents an image banner.
|
|
5
5
|
fields:
|
|
6
6
|
breadcrumb:
|
|
7
|
-
label:
|
|
7
|
+
label: Implementation of Breadcrumb component. See Breadcrumb for more details
|
|
8
8
|
type: object
|
|
9
9
|
preview:
|
|
10
10
|
home:
|
|
@@ -22,6 +22,7 @@ hero:
|
|
|
22
22
|
- label: "Link Five"
|
|
23
23
|
url: "/linkfive"
|
|
24
24
|
image:
|
|
25
|
+
label: Implementation of Image component. See Image for more details
|
|
25
26
|
type: object
|
|
26
27
|
preview:
|
|
27
28
|
alt: Lorem ipsum
|
|
@@ -33,7 +34,7 @@ hero:
|
|
|
33
34
|
- breakpoint: 768
|
|
34
35
|
src: "https://placekitten.com/1920/800"
|
|
35
36
|
herocard:
|
|
36
|
-
label:
|
|
37
|
+
label: Part of the hero that displays text on top of image (or if no image on a background color). There are light and dark versions and all text parts are optional.
|
|
37
38
|
type: object
|
|
38
39
|
preview:
|
|
39
40
|
alignment: left
|
|
@@ -50,7 +51,7 @@ hero:
|
|
|
50
51
|
title: "This is an left aligned article headline that is more than two lines long"
|
|
51
52
|
variants:
|
|
52
53
|
default:
|
|
53
|
-
|
|
54
|
+
label: Default
|
|
54
55
|
article:
|
|
55
56
|
label: Article
|
|
56
57
|
description: article settings
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
herocard:
|
|
2
2
|
use: '@components/herocard/herocard.twig'
|
|
3
3
|
label: Hero Card
|
|
4
|
-
description: The Hero card
|
|
4
|
+
description: The Hero card, a subcomponent of the hero
|
|
5
5
|
id: herocard
|
|
6
6
|
fields:
|
|
7
|
-
alignment:
|
|
8
|
-
type: string
|
|
9
|
-
label: Alignment
|
|
10
|
-
description: alignment for card
|
|
11
|
-
preview: "center"
|
|
12
7
|
datecopy:
|
|
13
8
|
type: string
|
|
14
9
|
label: Date copy
|
|
@@ -16,9 +11,9 @@ herocard:
|
|
|
16
11
|
preview: "11 February 2021"
|
|
17
12
|
eyebrow:
|
|
18
13
|
type: string
|
|
19
|
-
label:
|
|
20
|
-
description:
|
|
21
|
-
preview: "
|
|
14
|
+
label: Eyebrow
|
|
15
|
+
description: Copy for the eyebrow of the card
|
|
16
|
+
preview: "Eyebrow"
|
|
22
17
|
intro:
|
|
23
18
|
type: string
|
|
24
19
|
label: Intro
|
|
@@ -40,4 +35,14 @@ herocard:
|
|
|
40
35
|
label: Title
|
|
41
36
|
description: This is the title for the hero card
|
|
42
37
|
preview: "This is an centered aligned article headline that is more than two lines long"
|
|
38
|
+
settings:
|
|
39
|
+
alignment:
|
|
40
|
+
type: select
|
|
41
|
+
label: Alignment
|
|
42
|
+
description: alignment for card
|
|
43
|
+
options:
|
|
44
|
+
left: 'left'
|
|
45
|
+
center: 'center'
|
|
46
|
+
right: 'right'
|
|
47
|
+
preview: "center"
|
|
43
48
|
visibility: storybook
|
|
@@ -41,13 +41,14 @@ linklist:
|
|
|
41
41
|
url: 'http://www.google.com'
|
|
42
42
|
- label: Section 2 Link Five Is Slightly Longer
|
|
43
43
|
url: 'http://www.google.com'
|
|
44
|
+
settings:
|
|
44
45
|
theme:
|
|
45
46
|
type: select
|
|
46
47
|
label: Theme
|
|
47
48
|
description: Is this link list on a light or dark background?
|
|
48
49
|
required: true
|
|
49
50
|
options:
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
light: Light
|
|
52
|
+
dark: Dark
|
|
52
53
|
preview: 'light'
|
|
53
54
|
visibility: storybook
|