@ilo-org/twig 0.2.11 → 0.2.13

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 (162) hide show
  1. package/.eslintrc.js +37 -49
  2. package/.stylelintrc +2 -6
  3. package/.turbo/turbo-build:lib.log +2 -2
  4. package/CHANGELOG.md +20 -0
  5. package/apps/storybook/assets.js +5 -0
  6. package/apps/storybook/main.js +17 -8
  7. package/apps/storybook/manager-head.html +1 -1
  8. package/apps/storybook/manager.js +2 -2
  9. package/apps/storybook/patterns/colors.stories.mdx +9 -4
  10. package/apps/storybook/patterns/intro.stories.mdx +47 -42
  11. package/apps/storybook/patterns/typeset.stories.mdx +10 -6
  12. package/apps/storybook/patterns/welcome.stories.mdx +21 -16
  13. package/apps/storybook/preview-body.html +1 -1
  14. package/apps/storybook/preview.js +16 -16
  15. package/apps/storybook/styles.scss +1 -1
  16. package/apps/storybook/theme.js +5 -5
  17. package/babel.config.js +3 -3
  18. package/importprefix.js +5 -5
  19. package/importsvgs.js +3 -3
  20. package/jest.config.js +8 -8
  21. package/outputtwigs.js +16 -13
  22. package/package.json +47 -56
  23. package/postcss.config.js +2 -2
  24. package/src/namespaces.js +5 -5
  25. package/src/patterns/components/accordion/accordion-item.wingsuit.yml +1 -1
  26. package/src/patterns/components/accordion/accordion.behavior.js +2 -2
  27. package/src/patterns/components/accordion/accordion.js +31 -21
  28. package/src/patterns/components/accordion/accordion.stories.jsx +4 -2
  29. package/src/patterns/components/accordion/accordion.wingsuit.yml +4 -3
  30. package/src/patterns/components/accordion/index.js +3 -3
  31. package/src/patterns/components/breadcrumb/breadcrumb.behavior.js +2 -2
  32. package/src/patterns/components/breadcrumb/breadcrumb.js +14 -12
  33. package/src/patterns/components/breadcrumb/breadcrumb.stories.jsx +4 -2
  34. package/src/patterns/components/breadcrumb/breadcrumb.wingsuit.yml +1 -1
  35. package/src/patterns/components/breadcrumb/index.js +3 -3
  36. package/src/patterns/components/button/button.stories.jsx +4 -2
  37. package/src/patterns/components/button/button.wingsuit.yml +12 -12
  38. package/src/patterns/components/button/index.js +2 -2
  39. package/src/patterns/components/callout/callout.behavior.js +2 -2
  40. package/src/patterns/components/callout/callout.js +18 -13
  41. package/src/patterns/components/callout/callout.stories.jsx +4 -2
  42. package/src/patterns/components/callout/callout.wingsuit.yml +2 -2
  43. package/src/patterns/components/callout/index.js +3 -3
  44. package/src/patterns/components/card/card.stories.jsx +4 -2
  45. package/src/patterns/components/card/card.wingsuit.yml +8 -8
  46. package/src/patterns/components/card/index.js +2 -2
  47. package/src/patterns/components/cardgroup/cardgroup.stories.jsx +4 -2
  48. package/src/patterns/components/cardgroup/cardgroup.wingsuit.yml +31 -31
  49. package/src/patterns/components/cardgroup/index.js +2 -2
  50. package/src/patterns/components/contextmenu/contextmenu.stories.jsx +4 -2
  51. package/src/patterns/components/contextmenu/contextmenu.wingsuit.yml +7 -7
  52. package/src/patterns/components/contextmenu/index.js +2 -2
  53. package/src/patterns/components/dropdown/dropdown.stories.jsx +4 -2
  54. package/src/patterns/components/dropdown/dropdown.wingsuit.yml +4 -4
  55. package/src/patterns/components/dropdown/index.js +2 -2
  56. package/src/patterns/components/footer/footer.stories.jsx +4 -2
  57. package/src/patterns/components/footer/footer.wingsuit.yml +1 -1
  58. package/src/patterns/components/footer/index.js +2 -2
  59. package/src/patterns/components/form/fileupload.behavior.js +2 -2
  60. package/src/patterns/components/form/fileupload.js +6 -5
  61. package/src/patterns/components/form/form.stories.jsx +4 -2
  62. package/src/patterns/components/form/form.wingsuit.yml +92 -92
  63. package/src/patterns/components/form/index.js +3 -3
  64. package/src/patterns/components/hero/hero.stories.jsx +4 -2
  65. package/src/patterns/components/hero/hero.wingsuit.yml +4 -4
  66. package/src/patterns/components/hero/index.js +2 -2
  67. package/src/patterns/components/herocard/herocard.stories.jsx +4 -2
  68. package/src/patterns/components/herocard/herocard.wingsuit.yml +5 -5
  69. package/src/patterns/components/herocard/index.js +2 -2
  70. package/src/patterns/components/icon/index.js +2 -2
  71. package/src/patterns/components/image/image.stories.jsx +4 -2
  72. package/src/patterns/components/image/image.wingsuit.yml +9 -9
  73. package/src/patterns/components/image/index.js +2 -2
  74. package/src/patterns/components/link/index.js +2 -2
  75. package/src/patterns/components/link/link.stories.jsx +4 -2
  76. package/src/patterns/components/link/link.wingsuit.yml +3 -3
  77. package/src/patterns/components/linklist/index.js +2 -2
  78. package/src/patterns/components/linklist/linklist.stories.jsx +4 -2
  79. package/src/patterns/components/linklist/linklist.wingsuit.yml +15 -15
  80. package/src/patterns/components/list/index.js +2 -2
  81. package/src/patterns/components/list/list-item.wingsuit.yml +1 -1
  82. package/src/patterns/components/list/list.stories.jsx +4 -2
  83. package/src/patterns/components/list/list.wingsuit.yml +4 -4
  84. package/src/patterns/components/loading/index.js +3 -3
  85. package/src/patterns/components/loading/loading.behavior.js +2 -2
  86. package/src/patterns/components/loading/loading.js +2 -2
  87. package/src/patterns/components/loading/loading.stories.jsx +4 -2
  88. package/src/patterns/components/loading/loading.wingsuit.yml +5 -5
  89. package/src/patterns/components/localnav/index.js +3 -3
  90. package/src/patterns/components/localnav/localnav.stories.jsx +4 -2
  91. package/src/patterns/components/localnav/localnav.twig +3 -1
  92. package/src/patterns/components/localnav/localnav.wingsuit.yml +17 -19
  93. package/src/patterns/components/modal/index.js +3 -3
  94. package/src/patterns/components/modal/modal.behavior.js +2 -2
  95. package/src/patterns/components/modal/modal.js +9 -7
  96. package/src/patterns/components/modal/modal.stories.jsx +5 -2
  97. package/src/patterns/components/modal/modal.wingsuit.yml +20 -20
  98. package/src/patterns/components/navigation/index.js +3 -3
  99. package/src/patterns/components/navigation/navigation.behavior.js +2 -2
  100. package/src/patterns/components/navigation/navigation.js +110 -37
  101. package/src/patterns/components/navigation/navigation.stories.jsx +5 -2
  102. package/src/patterns/components/navigation/navigation.wingsuit.yml +7 -7
  103. package/src/patterns/components/notification/index.js +3 -3
  104. package/src/patterns/components/notification/notification.behavior.js +3 -3
  105. package/src/patterns/components/notification/notification.js +4 -2
  106. package/src/patterns/components/notification/notification.stories.jsx +5 -2
  107. package/src/patterns/components/notification/notification.wingsuit.yml +7 -7
  108. package/src/patterns/components/pagination/Pagination.stories.jsx +4 -2
  109. package/src/patterns/components/pagination/index.js +2 -2
  110. package/src/patterns/components/pagination/pagination.wingsuit.yml +12 -12
  111. package/src/patterns/components/polyfill/index.js +2 -2
  112. package/src/patterns/components/profile/index.js +2 -2
  113. package/src/patterns/components/profile/profile.stories.jsx +5 -2
  114. package/src/patterns/components/profile/profile.wingsuit.yml +3 -3
  115. package/src/patterns/components/readmore/index.js +3 -3
  116. package/src/patterns/components/readmore/readmore.behavior.js +2 -2
  117. package/src/patterns/components/readmore/readmore.js +4 -2
  118. package/src/patterns/components/readmore/readmore.stories.jsx +5 -2
  119. package/src/patterns/components/readmore/readmore.wingsuit.yml +4 -4
  120. package/src/patterns/components/richtext/index.js +2 -2
  121. package/src/patterns/components/richtext/richtext.stories.jsx +5 -2
  122. package/src/patterns/components/richtext/richtext.wingsuit.yml +1 -1
  123. package/src/patterns/components/searchfield/index.js +2 -2
  124. package/src/patterns/components/searchfield/searchfield.stories.jsx +5 -2
  125. package/src/patterns/components/searchfield/searchfield.wingsuit.yml +1 -1
  126. package/src/patterns/components/table/index.js +3 -3
  127. package/src/patterns/components/table/table.behavior.js +2 -2
  128. package/src/patterns/components/table/table.js +66 -44
  129. package/src/patterns/components/table/table.stories.jsx +5 -2
  130. package/src/patterns/components/table/table.wingsuit.yml +11 -21
  131. package/src/patterns/components/tableofcontents/index.js +3 -3
  132. package/src/patterns/components/tableofcontents/tableofcontents.behavior.js +2 -2
  133. package/src/patterns/components/tableofcontents/tableofcontents.js +27 -19
  134. package/src/patterns/components/tableofcontents/tableofcontents.stories.jsx +5 -2
  135. package/src/patterns/components/tableofcontents/tableofcontents.wingsuit.yml +14 -14
  136. package/src/patterns/components/tabs/index.js +3 -3
  137. package/src/patterns/components/tabs/tabs.behavior.js +4 -4
  138. package/src/patterns/components/tabs/tabs.js +12 -8
  139. package/src/patterns/components/tabs/tabs.stories.jsx +5 -2
  140. package/src/patterns/components/tabs/tabs.wingsuit.yml +120 -120
  141. package/src/patterns/components/tags/index.js +3 -3
  142. package/src/patterns/components/tags/tag.behavior.js +2 -2
  143. package/src/patterns/components/tags/tag.js +12 -12
  144. package/src/patterns/components/tags/tag.stories.jsx +5 -2
  145. package/src/patterns/components/tags/tag.wingsuit.yml +3 -3
  146. package/src/patterns/components/tags/tags.wingsuit.yml +1 -1
  147. package/src/patterns/components/tooltip/index.js +3 -3
  148. package/src/patterns/components/tooltip/tooltip.behavior.js +2 -2
  149. package/src/patterns/components/tooltip/tooltip.js +35 -25
  150. package/src/patterns/components/tooltip/tooltip.stories.jsx +5 -2
  151. package/src/patterns/components/tooltip/tooltip.wingsuit.yml +4 -4
  152. package/src/patterns/components/video/index.js +3 -3
  153. package/src/patterns/components/video/video.behavior.js +2 -2
  154. package/src/patterns/components/video/video.js +6 -5
  155. package/src/patterns/components/video/video.stories.jsx +5 -2
  156. package/src/patterns/components/video/video.wingsuit.yml +11 -11
  157. package/src/vendorjs/lib.vendor.js +1 -1
  158. package/wingsuit.config.js +14 -13
  159. package/.editorconfig +0 -12
  160. package/.eslintignore +0 -11
  161. package/.prettierignore +0 -16
  162. package/.prettierrc.js +0 -13
@@ -1,5 +1,5 @@
1
1
  linklist:
2
- use: '@components/linklist/linklist.twig'
2
+ use: "@components/linklist/linklist.twig"
3
3
  label: Link List
4
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
5
  fields:
@@ -17,30 +17,30 @@ linklist:
17
17
  - headline: Section Headline
18
18
  links:
19
19
  - label: Link One
20
- url: 'http://www.google.com'
20
+ url: "http://www.google.com"
21
21
  - label: Link Two
22
- url: 'http://www.google.com'
22
+ url: "http://www.google.com"
23
23
  - label: Link Three
24
- url: 'http://www.google.com'
24
+ url: "http://www.google.com"
25
25
  - label: Link Four
26
- url: 'http://www.google.com'
26
+ url: "http://www.google.com"
27
27
  - label: Link Five Is Slightly Longer
28
- url: 'http://www.google.com'
28
+ url: "http://www.google.com"
29
29
  - headline: Section 2 (With Indents)
30
30
  links:
31
31
  - label: Section 2 Link One
32
- url: 'http://www.google.com'
33
- - indented: 'true'
32
+ url: "http://www.google.com"
33
+ - indented: "true"
34
34
  label: Section 2 Link Two
35
- url: 'http://www.google.com'
36
- - indented: 'true'
35
+ url: "http://www.google.com"
36
+ - indented: "true"
37
37
  label: Section 2 Link Three
38
- url: 'http://www.google.com'
39
- - indented: 'true'
38
+ url: "http://www.google.com"
39
+ - indented: "true"
40
40
  label: Section 2 Link Four
41
- url: 'http://www.google.com'
41
+ url: "http://www.google.com"
42
42
  - label: Section 2 Link Five Is Slightly Longer
43
- url: 'http://www.google.com'
43
+ url: "http://www.google.com"
44
44
  settings:
45
45
  theme:
46
46
  type: select
@@ -50,5 +50,5 @@ linklist:
50
50
  options:
51
51
  light: Light
52
52
  dark: Dark
53
- preview: 'light'
53
+ preview: "light"
54
54
  visibility: storybook
@@ -2,5 +2,5 @@
2
2
  * accordion
3
3
  */
4
4
  // Module template
5
- import './list.twig';
6
- import './list.wingsuit.yml';
5
+ import "./list.twig";
6
+ import "./list.wingsuit.yml";
@@ -1,5 +1,5 @@
1
1
  list:
2
- use: '@components/list/list-item.twig'
2
+ use: "@components/list/list-item.twig"
3
3
  label: List Item
4
4
  description: A list item.
5
5
  fields:
@@ -1,7 +1,9 @@
1
- import './index';
1
+ import "./index";
2
2
 
3
- const patternDefinition = require('./list.wingsuit.yml');
3
+ export default {};
4
+ const patternDefinition = require("./list.wingsuit.yml");
4
5
 
6
+ /* eslint-disable-next-line */
5
7
  export const wingsuit = {
6
8
  patternDefinition,
7
9
  };
@@ -1,5 +1,5 @@
1
1
  list:
2
- use: '@components/list/list.twig'
2
+ use: "@components/list/list.twig"
3
3
  label: List
4
4
  description: The list component
5
5
  fields:
@@ -25,7 +25,7 @@ list:
25
25
  id: item4
26
26
  - content: Cappuccino. Made with espresso and milk that has been frothed up with pressurized steam.
27
27
  id: item5
28
- settings:
28
+ settings:
29
29
  ordered:
30
30
  type: select
31
31
  label: Ordered
@@ -35,7 +35,7 @@ list:
35
35
  ordered: Ordered
36
36
  unordered: Unordered
37
37
  unstyled: Unstyled
38
- preview: 'unstyled'
38
+ preview: "unstyled"
39
39
  alignment:
40
40
  type: select
41
41
  label: Alignment
@@ -43,6 +43,6 @@ list:
43
43
  options:
44
44
  default: Default
45
45
  horizontal: Horizontal
46
- preview: 'default'
46
+ preview: "default"
47
47
  required: false
48
48
  visibility: storybook
@@ -2,6 +2,6 @@
2
2
  * loading
3
3
  */
4
4
  // Module template
5
- import './loading.twig';
6
- import './loading.wingsuit.yml';
7
- import './loading.behavior';
5
+ import "./loading.twig";
6
+ import "./loading.wingsuit.yml";
7
+ import "./loading.behavior";
@@ -1,4 +1,4 @@
1
- import Loading from './loading';
1
+ import Loading from "./loading";
2
2
 
3
3
  Drupal.behaviors.loading = {
4
4
  attach() {
@@ -6,7 +6,7 @@ Drupal.behaviors.loading = {
6
6
  document.querySelectorAll(`[data-loadcomponent="Loading"]`),
7
7
  (element) => {
8
8
  // eslint-disable-next-line no-console
9
- console.log('loading Loading component....');
9
+ console.log("loading Loading component....");
10
10
  new Loading(element);
11
11
  }
12
12
  );
@@ -1,4 +1,4 @@
1
- import { EVENTS, ARIA } from '@ilo-org/utils';
1
+ import { EVENTS } from "@ilo-org/utils";
2
2
 
3
3
  /**
4
4
  * The Loading module which handles rendering field labels inline on a form.
@@ -26,7 +26,7 @@ export default class Loading {
26
26
  this.prefix = `${this.element.dataset.prefix}--loading`;
27
27
 
28
28
  // set some values
29
- this.status = 'idle';
29
+ this.status = "idle";
30
30
 
31
31
  // Initialize the view
32
32
  this.init();
@@ -1,7 +1,9 @@
1
- import './index';
1
+ import "./index";
2
2
 
3
- const patternDefinition = require('./loading.wingsuit.yml');
3
+ export default {};
4
+ const patternDefinition = require("./loading.wingsuit.yml");
4
5
 
6
+ /* eslint-disable-next-line */
5
7
  export const wingsuit = {
6
8
  patternDefinition,
7
9
  };
@@ -1,5 +1,5 @@
1
1
  loading:
2
- use: '@components/loading/loading.twig'
2
+ use: "@components/loading/loading.twig"
3
3
  label: Loading
4
4
  description: The Loading component displays a loading state. (See Javascript comments in loading.js for how to use this with vanilla JS).
5
5
  fields:
@@ -7,13 +7,13 @@ loading:
7
7
  type: string
8
8
  label: Message
9
9
  description: The loading message
10
- preview: 'Submitting'
10
+ preview: "Submitting"
11
11
  required: true
12
12
  loadedmessage:
13
13
  type: string
14
14
  label: LOaded Message
15
15
  description: The loaded message
16
- preview: 'Completed'
16
+ preview: "Completed"
17
17
  required: true
18
18
  settings:
19
19
  size:
@@ -24,7 +24,7 @@ loading:
24
24
  options:
25
25
  small: Small
26
26
  large: Large
27
- preview: 'large'
27
+ preview: "large"
28
28
  status:
29
29
  type: select
30
30
  label: Status
@@ -34,5 +34,5 @@ loading:
34
34
  idle: Idle
35
35
  loading: Loading
36
36
  loaded: Loaded
37
- preview: 'loading'
37
+ preview: "loading"
38
38
  visibility: storybook
@@ -2,6 +2,6 @@
2
2
  * Localnav
3
3
  */
4
4
  // Module template
5
- import './localnav.twig';
6
- import './localnav.wingsuit.yml';
7
- import '../navigation/navigation.behavior';
5
+ import "./localnav.twig";
6
+ import "./localnav.wingsuit.yml";
7
+ import "../navigation/navigation.behavior";
@@ -1,7 +1,9 @@
1
- import './index';
1
+ import "./index";
2
2
 
3
- const patternDefinition = require('./localnav.wingsuit.yml');
3
+ export default {};
4
+ const patternDefinition = require("./localnav.wingsuit.yml");
4
5
 
6
+ /* eslint-disable-next-line */
5
7
  export const wingsuit = {
6
8
  patternDefinition,
7
9
  };
@@ -13,7 +13,9 @@
13
13
  <ul class="{{prefix}}--nav--local--set">
14
14
  {% for item in primarynav.items %}
15
15
  <li class="{{prefix}}--nav--local--item">
16
- <a href="{{item.link}}" class="{{prefix}}--nav--local--link">{{item.label}}</a>
16
+ <a href="{{item.link}}" class="{{prefix}}--nav--local--link">
17
+ <span>{{item.label}}</span>
18
+ </a>
17
19
  </li>
18
20
  {% endfor %}
19
21
  </ul>
@@ -1,5 +1,5 @@
1
1
  localnav:
2
- use: '@components/localnav/localnav.twig'
2
+ use: "@components/localnav/localnav.twig"
3
3
  label: Local nav
4
4
  description: The Local nav component
5
5
  fields:
@@ -7,21 +7,21 @@ localnav:
7
7
  type: string
8
8
  label: Background
9
9
  description: Override color for the background
10
- preview: "#960A55"
10
+ preview: "#1E2DBE"
11
11
  logo:
12
12
  type: object
13
13
  label: Logo
14
14
  description: Logo for the nav
15
15
  required: true
16
16
  preview:
17
- image: "https://placekitten.com/g/148/38"
17
+ image: "/brand-assets/logo_en_horizontal_white.svg"
18
18
  alt: Logo
19
19
  siteurl:
20
20
  type: string
21
21
  label: Site url
22
22
  description: home url for the website
23
23
  required: true
24
- preview: "https://www.google.com/"
24
+ preview: "https://www.ilo.org/"
25
25
  tagline:
26
26
  type: object
27
27
  label: Site tagline
@@ -47,23 +47,21 @@ localnav:
47
47
  navlabel: Primary Local nav
48
48
  mobilecloselabel: Close
49
49
  items:
50
- - link: "https://www.google.com/search?q=menu1"
50
+ - link: "https://www.ilo.org"
51
51
  label: Menu Item 1
52
- - link: "https://www.google.com/search?q=menu2"
52
+ - link: "https://www.ilo.org"
53
53
  label: Menu Item 2
54
- - link: "https://www.google.com/search?q=menu3"
54
+ - link: "https://www.ilo.org"
55
55
  label: Menu Item 3
56
- - link: "https://www.google.com/search?q=menu4"
56
+ - link: "https://www.ilo.org"
57
57
  label: Menu Item 4
58
- - link: "https://www.google.com/search?q=menu5"
59
- label: Menu Item 5
60
58
  mainlink:
61
59
  type: object
62
60
  label: Main link object
63
61
  description: Link object for back to main site link
64
- preview:
65
- url: 'https://www.google.com/'
66
- label: 'Go to main ILO website'
62
+ preview:
63
+ url: "https://www.ilo.org/"
64
+ label: "Go to main website"
67
65
  languagelabel:
68
66
  type: string
69
67
  label: Language Label
@@ -76,14 +74,14 @@ localnav:
76
74
  preview:
77
75
  links:
78
76
  - label: Link One
79
- url: 'http://www.google.com'
77
+ url: "http://www.google.com"
80
78
  - label: Link Two
81
- url: 'http://www.google.com'
82
- - endsection: 'true'
79
+ url: "http://www.google.com"
80
+ - endsection: "true"
83
81
  label: Link Three Ends A Section
84
- url: 'http://www.google.com'
82
+ url: "http://www.google.com"
85
83
  - label: Link Four
86
- url: 'http://www.google.com'
84
+ url: "http://www.google.com"
87
85
  - label: Link Five Is Slightly Longer
88
- url: 'http://www.google.com'
86
+ url: "http://www.google.com"
89
87
  visibility: storybook
@@ -2,6 +2,6 @@
2
2
  * Modal
3
3
  */
4
4
  // Module template
5
- import './modal.twig';
6
- import './modal.wingsuit.yml';
7
- import './modal.behavior.js';
5
+ import "./modal.twig";
6
+ import "./modal.wingsuit.yml";
7
+ import "./modal.behavior.js";
@@ -1,4 +1,4 @@
1
- import Modal from './modal';
1
+ import Modal from "./modal";
2
2
 
3
3
  Drupal.behaviors.modal = {
4
4
  attach() {
@@ -6,7 +6,7 @@ Drupal.behaviors.modal = {
6
6
  document.querySelectorAll(`[data-loadcomponent="Modal"]`),
7
7
  (element) => {
8
8
  // eslint-disable-next-line no-console
9
- console.log('loading Modal component....');
9
+ console.log("loading Modal component....");
10
10
  new Modal(element);
11
11
  }
12
12
  );
@@ -1,4 +1,4 @@
1
- import { EVENTS } from '@ilo-org/utils';
1
+ import { EVENTS } from "@ilo-org/utils";
2
2
 
3
3
  /**
4
4
  * The Modal module which handles control and display of a modal dialog
@@ -76,7 +76,9 @@ export default class Modal {
76
76
  * @chainable
77
77
  */
78
78
  enable() {
79
- this.OpenButton.addEventListener(EVENTS.CLICK, () => this.OpenButtonHandler());
79
+ this.OpenButton.addEventListener(EVENTS.CLICK, () =>
80
+ this.OpenButtonHandler()
81
+ );
80
82
  this.CloseButton.addEventListener(EVENTS.CLICK, () => this.CloseHandler());
81
83
 
82
84
  return this;
@@ -89,9 +91,9 @@ export default class Modal {
89
91
  * @chainable
90
92
  */
91
93
  openButtonClick() {
92
- this.element.classList.add('show');
94
+ this.element.classList.add("show");
93
95
  setTimeout(() => {
94
- this.element.classList.add('fadein');
96
+ this.element.classList.add("fadein");
95
97
  }, 125);
96
98
  window.addEventListener(EVENTS.KEY_DOWN, (e) => this.KeyPressHandler(e));
97
99
 
@@ -105,9 +107,9 @@ export default class Modal {
105
107
  * @chainable
106
108
  */
107
109
  closeButtonClick() {
108
- this.element.classList.remove('fadein');
110
+ this.element.classList.remove("fadein");
109
111
  setTimeout(() => {
110
- this.element.classList.remove('show');
112
+ this.element.classList.remove("show");
111
113
  }, 125);
112
114
  window.removeEventListener(EVENTS.KEY_DOWN, (e) => this.KeyPressHandler(e));
113
115
 
@@ -121,7 +123,7 @@ export default class Modal {
121
123
  * @chainable
122
124
  */
123
125
  keyPress(e) {
124
- if (e.key === 'Escape') {
126
+ if (e.key === "Escape") {
125
127
  this.closeButtonClick();
126
128
  }
127
129
 
@@ -1,7 +1,10 @@
1
- import './index';
1
+ import "./index";
2
2
 
3
- const patternDefinition = require('./modal.wingsuit.yml');
3
+ export default {};
4
+ const patternDefinition = require("./modal.wingsuit.yml");
4
5
 
6
+ /* eslint-disable-next-line */
7
+ /* eslint-disable-next-line */
5
8
  export const wingsuit = {
6
9
  patternDefinition,
7
10
  };
@@ -1,5 +1,5 @@
1
1
  modal:
2
- use: '@components/modal/modal.twig'
2
+ use: "@components/modal/modal.twig"
3
3
  label: Modal
4
4
  description: The Modal displays a div containing a button which is visible on page load. On click of this button, a modal dialog is opened which displays a semitransparent fixed-position background and the contents of the chosen component.
5
5
  fields:
@@ -8,13 +8,13 @@ modal:
8
8
  label: Closee Button
9
9
  description: Label and settings for the "close" button
10
10
  preview:
11
- size: 'medium'
12
- type: 'tertiary'
13
- label: 'Close Button'
11
+ size: "medium"
12
+ type: "tertiary"
13
+ label: "Close Button"
14
14
  icon: close
15
15
  iconPos: center
16
16
  icononly: true
17
- className: 'modal--close'
17
+ className: "modal--close"
18
18
  required: true
19
19
  component:
20
20
  type: string
@@ -27,28 +27,28 @@ modal:
27
27
  label: Modal Data
28
28
  description: The fields needed to populate the component being displayed by the modal
29
29
  preview:
30
- alt: 'My alt text'
31
- caption: 'my image caption'
32
- credit: 'Photo: copyright 2022 Person S. Name'
30
+ alt: "My alt text"
31
+ caption: "my image caption"
32
+ credit: "Photo: copyright 2022 Person S. Name"
33
33
  url:
34
- - breakpoint: 0
35
- src: 'https://place-hold.it/400x300?text=SmallBreakpointImage'
36
- - breakpoint: 800
37
- src: 'https://place-hold.it/800x600?text=MediumBreakpointImage'
38
- - breakpoint: 1200
39
- src: 'https://place-hold.it/1200x900?text=LargeBreakpointImage'
40
- - breakpoint: 1440
41
- src: 'https://place-hold.it/1600x1200?text=LargestBreakpointImage'
34
+ - breakpoint: 0
35
+ src: "https://place-hold.it/400x300?text=SmallBreakpointImage"
36
+ - breakpoint: 800
37
+ src: "https://place-hold.it/800x600?text=MediumBreakpointImage"
38
+ - breakpoint: 1200
39
+ src: "https://place-hold.it/1200x900?text=LargeBreakpointImage"
40
+ - breakpoint: 1440
41
+ src: "https://place-hold.it/1600x1200?text=LargestBreakpointImage"
42
42
  required: true
43
43
  openbutton:
44
44
  type: object
45
45
  label: Open Button
46
46
  description: The label and settings for the button that will open the modal
47
47
  preview:
48
- size: 'large'
49
- type: 'primary'
50
- label: 'Open Button'
51
- className: 'modal--open'
48
+ size: "large"
49
+ type: "primary"
50
+ label: "Open Button"
51
+ className: "modal--open"
52
52
  opensmodal: true
53
53
  required: true
54
54
  visibility: storybook
@@ -2,6 +2,6 @@
2
2
  * Navigation
3
3
  */
4
4
  // Module template
5
- import './navigation.twig';
6
- import './navigation.wingsuit.yml';
7
- import './navigation.behavior';
5
+ import "./navigation.twig";
6
+ import "./navigation.wingsuit.yml";
7
+ import "./navigation.behavior";
@@ -1,4 +1,4 @@
1
- import Navigation from './navigation';
1
+ import Navigation from "./navigation";
2
2
 
3
3
  Drupal.behaviors.navigation = {
4
4
  attach() {
@@ -6,7 +6,7 @@ Drupal.behaviors.navigation = {
6
6
  document.querySelectorAll(`[data-loadcomponent="Navigation"]`),
7
7
  (element) => {
8
8
  // eslint-disable-next-line no-console
9
- console.log('loading Navigation component....');
9
+ console.log("loading Navigation component....");
10
10
  new Navigation(element);
11
11
  }
12
12
  );