@ilo-org/twig 0.2.3 → 0.2.5

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.
Files changed (31) hide show
  1. package/.turbo/turbo-build.log +14023 -14010
  2. package/CHANGELOG.md +40 -0
  3. package/README.md +203 -2
  4. package/apps/storybook/manager-head.html +2 -0
  5. package/apps/storybook/patterns/intro.stories.mdx +311 -0
  6. package/apps/storybook/patterns/welcome.stories.mdx +61 -16
  7. package/apps/storybook/preview-head.html +0 -6
  8. package/apps/storybook/preview.js +9 -11
  9. package/images/favicon.ico +0 -0
  10. package/package.json +6 -6
  11. package/src/patterns/components/accordion/accordion.wingsuit.yml +18 -36
  12. package/src/patterns/components/button/button.wingsuit.yml +34 -33
  13. package/src/patterns/components/callout/callout.wingsuit.yml +2 -2
  14. package/src/patterns/components/card/card.twig +3 -3
  15. package/src/patterns/components/card/card.wingsuit.yml +44 -26
  16. package/src/patterns/components/cardgroup/cardgroup.wingsuit.yml +0 -4
  17. package/src/patterns/components/dropdown/dropdown.wingsuit.yml +20 -13
  18. package/src/patterns/components/hero/hero.twig +7 -1
  19. package/src/patterns/components/hero/hero.wingsuit.yml +21 -2
  20. package/src/patterns/components/herocard/herocard.wingsuit.yml +14 -9
  21. package/src/patterns/components/linklist/linklist.stories.jsx +5 -0
  22. package/src/patterns/components/linklist/linklist.wingsuit.yml +3 -2
  23. package/src/patterns/components/list/list.wingsuit.yml +4 -4
  24. package/src/patterns/components/navigation/navigation.wingsuit.yml +2 -2
  25. package/src/patterns/components/notification/notification.wingsuit.yml +11 -11
  26. package/src/patterns/components/pagination/pagination.wingsuit.yml +2 -2
  27. package/src/patterns/components/readmore/readmore.wingsuit.yml +5 -1
  28. package/src/patterns/components/tags/tag.wingsuit.yml +5 -5
  29. package/src/patterns/components/tags/tags.wingsuit.yml +2 -2
  30. package/src/patterns/components/tooltip/tooltip.js +5 -1
  31. 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",
3
+ "version": "0.2.5",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Twig components for the ILO's Design System",
6
6
  "main": "",
@@ -21,10 +21,10 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "@ilo-org/fonts": "0.0.2",
24
- "@ilo-org/icons": "0.1.8",
25
- "@ilo-org/styles": "0.1.8",
26
- "@ilo-org/themes": "0.1.8",
27
- "@ilo-org/utils": "0.0.4",
24
+ "@ilo-org/icons": "0.1.10",
25
+ "@ilo-org/styles": "0.1.10",
26
+ "@ilo-org/themes": "0.1.10",
27
+ "@ilo-org/utils": "0.0.6",
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
- variants:
38
- default:
39
- label: Default
40
- description: the default settings for the Accordion
41
- expanded:
42
- label: Expanded
43
- description: The Accordion with panels opened on page load
44
- fields:
45
- items:
46
- - label: label 1
47
- content: "<p>Content of Item 1</p><p>Content of Item 1</p><p>Content of Item 1</p><p>Content of Item 1</p><p>Content of Item 1</p>"
48
- id: item1
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: The Accordion set to allow multiple panels to be expanded at once
57
- fields:
58
- allowMultipleExpanded: 'true'
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
- fields:
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
- fields:
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
- fields:
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 %}">
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 %}
@@ -67,7 +67,7 @@
67
67
  {% include "@components/linklist/linklist.twig" with {
68
68
  headline: linklist.headline,
69
69
  linkgroup: linklist.linkgroup,
70
- prefix: prefix,
70
+ prefix: prefix
71
71
  } only %}
72
72
  {% endif %}
73
73
  {% if dataset %}
@@ -92,7 +92,7 @@
92
92
  {% include "@components/link/link.twig" with {
93
93
  url: item.url,
94
94
  label: item.label,
95
- prefix: prefix,
95
+ prefix: prefix
96
96
  } %} <span>&nbsp;</span>
97
97
  {% endfor %}
98
98
  </div>
@@ -6,7 +6,7 @@ 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
11
  intro:
12
12
  type: string
@@ -16,79 +16,84 @@ card:
16
16
  eyebrow:
17
17
  type: string
18
18
  label: Eyebrow
19
- description: Eyebrow copy text
19
+ description: Eyebrow copy
20
20
  preview: "Eyebrow"
21
21
  date:
22
22
  type: object
23
23
  label: Date
24
- description: Date copy text
24
+ description: Date copy (human and Unix)
25
25
  preview:
26
26
  human: 20 September 2022
27
27
  unix: 1670389200
28
28
  eventdetails:
29
29
  type: string
30
30
  label: Eyebrow
31
- description: Eyebrow copy text
31
+ description: Event details for `Detail` card
32
32
  preview: ""
33
33
  profile:
34
34
  type: object
35
35
  label: Profile
36
- description: Profile to embed in the card
36
+ description: Profile to embed in the card for `Graphic Text`
37
37
  preview:
38
38
  list:
39
39
  type: object
40
40
  label: List
41
- description: List to embed in the card
41
+ description: List to embed in the card, specifically used for `Factlist`
42
42
  preview:
43
43
  link:
44
44
  type: string
45
45
  label: Link
46
- description: Link for clickable cards
46
+ description: Link for clickable cards. Do no use on `Multilink`, `Factlist`, `Data`, or `Stat` cards.
47
47
  preview: "https://www.google.com/"
48
48
  cta:
49
49
  type: object
50
50
  label: CTA
51
- description: Items for clickable CTA button
51
+ description: Items for clickable CTA button. Button used for `Graphic Promo` card.
52
52
  preview:
53
53
  image:
54
54
  type: string
55
55
  label: Image
56
- description: The image for the card
57
- preview: "https://placekitten.com/600/300"
56
+ description: The image for the card. Images should be avoided on `Graphic Promo`, `Graphic Text`, `Factlist`, and `Stat` card.
57
+ preview: ""
58
58
  source:
59
59
  type: object
60
60
  label: Source
61
- description: Source link for stat cards
61
+ description: Source link for `Stat` cards
62
62
  preview:
63
63
  linklist:
64
64
  type: object
65
65
  label: Link List
66
- description: Multi-link list
66
+ description: Implementation of the LinkList component. Appears at the bottom of `Multilink` or `Feature` card.
67
67
  preview:
68
68
  dataset:
69
69
  type: object
70
- label: Data set
71
- description: This is a series of items, headline and copy, to include on the card
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)
72
72
  preview:
73
+ settings:
73
74
  color:
74
- type: string
75
+ type: select
75
76
  label: Color
76
- description: Color of the stat cards, options are turquoise, green, yellow, or blue
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
77
83
  preview: 'blue'
78
- settings:
79
84
  theme:
80
85
  type: select
81
86
  label: Theme
82
- description: The theme type for the hero
87
+ description: The theme type for the card. Theme choice doesn't apply to these card types - `Multilink`, `Data`, `Stat` and `Detail`
83
88
  required: false
84
- preview: 'dark'
89
+ preview: 'light'
85
90
  options:
86
91
  dark: Dark
87
92
  light: Light
88
93
  size:
89
94
  type: select
90
95
  label: Size
91
- 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.
92
97
  preview: 'standard'
93
98
  options:
94
99
  wide: Wide
@@ -97,7 +102,7 @@ card:
97
102
  cornercut:
98
103
  type: select
99
104
  label: Corner cut
100
- 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`.
101
106
  preview: cornercut
102
107
  options:
103
108
  cornercut: Corner cut
@@ -105,15 +110,20 @@ card:
105
110
  alignment:
106
111
  type: select
107
112
  label: Alignment
108
- description: Set whether card (multilink) image is right aligned or left aligned
113
+ description: Set whether card image is right aligned or left aligned for `Multilink` cards.
109
114
  preview: left
110
115
  options:
111
116
  left: Left
112
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
113
126
  variants:
114
- default:
115
- label: Default
116
- description: the default settings for the Card
117
127
  graphic:
118
128
  label: Graphic Text Card
119
129
  description: The graphic Card
@@ -123,6 +133,7 @@ card:
123
133
  date:
124
134
  human: 20 September 2022
125
135
  unix: 1670389200
136
+ image: ""
126
137
  link: "https://www.google.com/search?q=graphic"
127
138
  profile:
128
139
  avatar: "https://placekitten.com/128/128"
@@ -183,6 +194,13 @@ card:
183
194
  unix: 1670389200
184
195
  link: "https://www.google.com/search?q=graphic"
185
196
  image: "https://placekitten.com/412/232"
197
+ linklist:
198
+ headline: ""
199
+ linkgroup:
200
+ - headline: ""
201
+ links:
202
+ - label: Link One
203
+ url: 'http://www.google.com'
186
204
  detail:
187
205
  label: Detail Card
188
206
  description: The Detail Card
@@ -194,7 +212,6 @@ card:
194
212
  human: 00 month 0000
195
213
  unix: 1670389200
196
214
  link: "https://www.google.com/search?q=detail"
197
- # image: "https://placekitten.com/296/196"
198
215
  image: "https://www.ilo.org/wcmsp5/groups/public/---dgreports/---dcomm/documents/image/wcms_856513.jpg"
199
216
  profile:
200
217
  eventdetails: "8 - 9 February 2022, 8:30 - 12:00 CET | Egypt"
@@ -203,6 +220,7 @@ card:
203
220
  description: The Fact List Card
204
221
  fields:
205
222
  title: "Title of fast fact list"
223
+ image: ""
206
224
  list:
207
225
  settings:
208
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: false
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
@@ -2,7 +2,13 @@
2
2
  HERO COMPONENT
3
3
  #}
4
4
  <div class="{{prefix}}--hero {{prefix}}--hero--{{theme}} {{prefix}}--hero--{{types}} {% if image %}{{prefix}}--hero--image{% endif %}">
5
-
5
+ {% if breadcrumb is defined %}
6
+ {% include "@components/breadcrumb/breadcrumb.twig" with {
7
+ home: breadcrumb.home,
8
+ links: breadcrumb.links,
9
+ prefix: prefix,
10
+ } only %}
11
+ {% endif %}
6
12
  {% if not image %}
7
13
  {% else %}
8
14
  {% include "@components/image/image.twig" with {
@@ -3,7 +3,26 @@ hero:
3
3
  label: Hero
4
4
  description: The Hero presents an image banner.
5
5
  fields:
6
+ breadcrumb:
7
+ label: Implementation of Breadcrumb component. See Breadcrumb for more details
8
+ type: object
9
+ preview:
10
+ home:
11
+ label: "Home"
12
+ url: "/"
13
+ links:
14
+ - label: "Link One"
15
+ url: "/linkone"
16
+ - label: "Link Two"
17
+ url: "/linktwo"
18
+ - label: "Link Three"
19
+ url: "/linkthree"
20
+ - label: "Link Four"
21
+ url: "/linkfour"
22
+ - label: "Link Five"
23
+ url: "/linkfive"
6
24
  image:
25
+ label: Implementation of Image component. See Image for more details
7
26
  type: object
8
27
  preview:
9
28
  alt: Lorem ipsum
@@ -15,7 +34,7 @@ hero:
15
34
  - breakpoint: 768
16
35
  src: "https://placekitten.com/1920/800"
17
36
  herocard:
18
- label: herocard
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.
19
38
  type: object
20
39
  preview:
21
40
  alignment: left
@@ -32,7 +51,7 @@ hero:
32
51
  title: "This is an left aligned article headline that is more than two lines long"
33
52
  variants:
34
53
  default:
35
- lable: Default
54
+ label: Default
36
55
  article:
37
56
  label: Article
38
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: Date copy
20
- description: Date byline copy
21
- preview: "11 February 2021"
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