@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,4 +1,4 @@
1
- import { EVENTS, ARIA } from '@ilo-org/utils';
1
+ import { EVENTS, ARIA } from "@ilo-org/utils";
2
2
 
3
3
  /**
4
4
  * The Tabs module which handles rendering field labels inline on a form.
@@ -52,7 +52,9 @@ export default class Tabs {
52
52
  * The button for toggling Read More state
53
53
  * @type {Object}
54
54
  */
55
- this.tabButtons = this.element.querySelectorAll(`.${this.prefix}--tabs--selection--button`);
55
+ this.tabButtons = this.element.querySelectorAll(
56
+ `.${this.prefix}--tabs--selection--button`
57
+ );
56
58
  this.tabPanels = this.element.querySelectorAll('[role="tabpanel"]');
57
59
  this.firstTab;
58
60
 
@@ -81,7 +83,7 @@ export default class Tabs {
81
83
  * @chainable
82
84
  */
83
85
  enable() {
84
- this.element.classList.add('tabs--js');
86
+ this.element.classList.add("tabs--js");
85
87
 
86
88
  Array.from(this.tabButtons).forEach((button) => {
87
89
  button.addEventListener(EVENTS.CLICK, (e) => this.OnClickHandler(e));
@@ -122,22 +124,22 @@ export default class Tabs {
122
124
  console.log(e.key);
123
125
 
124
126
  switch (e.key) {
125
- case 'ArrowLeft':
127
+ case "ArrowLeft":
126
128
  this.setSelectedToPreviousTab(tabid);
127
129
  flag = true;
128
130
  break;
129
131
 
130
- case 'ArrowRight':
132
+ case "ArrowRight":
131
133
  this.setSelectedToNextTab(tabid);
132
134
  flag = true;
133
135
  break;
134
136
 
135
- case 'Home':
137
+ case "Home":
136
138
  this.selectTab(this.firstTab.id);
137
139
  flag = true;
138
140
  break;
139
141
 
140
- case 'End':
142
+ case "End":
141
143
  this.selectTab(this.lastTab.id);
142
144
  flag = true;
143
145
  break;
@@ -161,7 +163,9 @@ export default class Tabs {
161
163
  * @chainable
162
164
  */
163
165
  selectTab(tabid) {
164
- const selectedTab = this.element.querySelector(`[${ARIA.CONTROLS}="${tabid}"]`);
166
+ const selectedTab = this.element.querySelector(
167
+ `[${ARIA.CONTROLS}="${tabid}"]`
168
+ );
165
169
  Array.from(this.tabPanels).forEach((panel) => {
166
170
  panel.setAttribute(ARIA.EXPANDED, false);
167
171
  });
@@ -1,7 +1,10 @@
1
- import './index';
1
+ import "./index";
2
2
 
3
- const patternDefinition = require('./tabs.wingsuit.yml');
3
+ export default {};
4
+ const patternDefinition = require("./tabs.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
  tabs:
2
- use: '@components/tabs/tabs.twig'
2
+ use: "@components/tabs/tabs.twig"
3
3
  label: Tabs
4
4
  description: The Tabs component displays content that is subdivided into sections, providing an interface for toggling visually between sections
5
5
  fields:
@@ -8,23 +8,23 @@ tabs:
8
8
  label: Items
9
9
  description: The items and labels for each tab
10
10
  preview:
11
- - label: 'Tab Label With A Really Really Lenghty Title Even Though We Do Not Recommend Such A Lengthy Title'
12
- component: 'image'
11
+ - label: "Tab Label With A Really Really Lenghty Title Even Though We Do Not Recommend Such A Lengthy Title"
12
+ component: "image"
13
13
  componentdata:
14
- alt: 'My alt text'
15
- caption: 'my image caption'
16
- credit: 'Photo: copyright 2022 Person S. Name'
14
+ alt: "My alt text"
15
+ caption: "my image caption"
16
+ credit: "Photo: copyright 2022 Person S. Name"
17
17
  url:
18
- - breakpoint: 0
19
- src: 'https://place-hold.it/400x300?text=SmallBreakpointImage'
20
- - breakpoint: 800
21
- src: 'https://place-hold.it/800x600?text=MediumBreakpointImage'
22
- - breakpoint: 1200
23
- src: 'https://place-hold.it/1200x900?text=LargeBreakpointImage'
24
- - breakpoint: 1440
25
- src: 'https://place-hold.it/1600x1200?text=LargestBreakpointImage'
26
- - label: 'Tab Label 2'
27
- component: 'richtext'
18
+ - breakpoint: 0
19
+ src: "https://place-hold.it/400x300?text=SmallBreakpointImage"
20
+ - breakpoint: 800
21
+ src: "https://place-hold.it/800x600?text=MediumBreakpointImage"
22
+ - breakpoint: 1200
23
+ src: "https://place-hold.it/1200x900?text=LargeBreakpointImage"
24
+ - breakpoint: 1440
25
+ src: "https://place-hold.it/1600x1200?text=LargestBreakpointImage"
26
+ - label: "Tab Label 2"
27
+ component: "richtext"
28
28
  componentdata:
29
29
  content: "<h1>Apollo 11</h1><p><strong>Apollo 11</strong> was the spaceflight that landed the first humans, Americans <a href='http://en.wikipedia.org/wiki/Neil_Armstrong'>Neil Armstrong</a> and <a href='http://en.wikipedia.org/wiki/Buzz_Aldrin'>Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p><p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission, <a href='http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)'>Michael Collins</a>, piloted the <a href='http://en.wikipedia.org/wiki/Apollo_Command/Service_Module'>command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth. <figure><img alt='placeholder image' class='right' src='https://place-hold.it/400x300?text=Placeholder Image'><figcaption>The caption for this image</figcaption></figure></p><h2>Broadcasting and <em>quotes</em> <a id='quotes' name='quotes'></a></h2><p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p><blockquote><p>One small step for [a] man, one giant leap for mankind</p><cite>Neil Armstrong</cite></blockquote><h2>Technical details <a id='tech-details' name='tech-details'></a></h2><p>Launched by a <strong>Saturn V</strong> rocket from <a href='http://en.wikipedia.org/wiki/Kennedy_Space_Center'>Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href='http://en.wikipedia.org/wiki/NASA'>NASA</a>&#39;s Apollo program. The Apollo spacecraft had three parts:</p><ol><li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li><li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li><li><strong>Lunar Module</strong> for landing on the Moon.</li></ol><p>After being sent to the Moon by the Saturn V&#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the <a href='http://en.wikipedia.org/wiki/Mare_Tranquillitatis'>Sea of Tranquility</a>. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the <a href='http://en.wikipedia.org/wiki/Pacific_Ocean'>Pacific Ocean</a> on July 24.</p><hr><p><small>Source: <a href='http://en.wikipedia.org/wiki/Apollo_11'>Wikipedia.org</a></small></p>"
30
30
  required: true
@@ -37,132 +37,132 @@ tabs:
37
37
  description: Tabs with Icons
38
38
  fields:
39
39
  items:
40
- - label: 'Tab One'
41
- component: 'image'
40
+ - label: "Tab One"
41
+ component: "image"
42
42
  componentdata:
43
- alt: 'My alt text'
44
- caption: 'my image caption'
45
- credit: 'Photo: copyright 2022 Person S. Name'
43
+ alt: "My alt text"
44
+ caption: "my image caption"
45
+ credit: "Photo: copyright 2022 Person S. Name"
46
46
  url:
47
- - breakpoint: 0
48
- src: 'https://place-hold.it/400x300?text=Tab One Image'
49
- - breakpoint: 800
50
- src: 'https://place-hold.it/800x600?text=Tab One tImage'
51
- - breakpoint: 1200
52
- src: 'https://place-hold.it/1200x900?text=Tab One Image'
53
- - breakpoint: 1440
54
- src: 'https://place-hold.it/1600x1200?text=Tab One Image'
47
+ - breakpoint: 0
48
+ src: "https://place-hold.it/400x300?text=Tab One Image"
49
+ - breakpoint: 800
50
+ src: "https://place-hold.it/800x600?text=Tab One tImage"
51
+ - breakpoint: 1200
52
+ src: "https://place-hold.it/1200x900?text=Tab One Image"
53
+ - breakpoint: 1440
54
+ src: "https://place-hold.it/1600x1200?text=Tab One Image"
55
55
  icon: error
56
- - label: 'Tab Two'
57
- component: 'image'
56
+ - label: "Tab Two"
57
+ component: "image"
58
58
  componentdata:
59
- alt: 'My alt text'
60
- caption: 'my image caption'
61
- credit: 'Photo: copyright 2022 Person S. Name'
59
+ alt: "My alt text"
60
+ caption: "my image caption"
61
+ credit: "Photo: copyright 2022 Person S. Name"
62
62
  url:
63
- - breakpoint: 0
64
- src: 'https://place-hold.it/400x300?text=Tab Two Image'
65
- - breakpoint: 800
66
- src: 'https://place-hold.it/800x600?text=Tab Two Image'
67
- - breakpoint: 1200
68
- src: 'https://place-hold.it/1200x900?text=Tab Two Image'
69
- - breakpoint: 1440
70
- src: 'https://place-hold.it/1600x1200?text=Tab Two Image'
63
+ - breakpoint: 0
64
+ src: "https://place-hold.it/400x300?text=Tab Two Image"
65
+ - breakpoint: 800
66
+ src: "https://place-hold.it/800x600?text=Tab Two Image"
67
+ - breakpoint: 1200
68
+ src: "https://place-hold.it/1200x900?text=Tab Two Image"
69
+ - breakpoint: 1440
70
+ src: "https://place-hold.it/1600x1200?text=Tab Two Image"
71
71
  icon: error
72
- - label: 'Tab Three'
73
- component: 'image'
72
+ - label: "Tab Three"
73
+ component: "image"
74
74
  componentdata:
75
- alt: 'My alt text'
76
- caption: 'my image caption'
77
- credit: 'Photo: copyright 2022 Person S. Name'
75
+ alt: "My alt text"
76
+ caption: "my image caption"
77
+ credit: "Photo: copyright 2022 Person S. Name"
78
78
  url:
79
- - breakpoint: 0
80
- src: 'https://place-hold.it/400x300?text=Tab Three Image'
81
- - breakpoint: 800
82
- src: 'https://place-hold.it/800x600?text=Tab Three Image'
83
- - breakpoint: 1200
84
- src: 'https://place-hold.it/1200x900?text=Tab Three Image'
85
- - breakpoint: 1440
86
- src: 'https://place-hold.it/1600x1200?text=Tab Three Image'
79
+ - breakpoint: 0
80
+ src: "https://place-hold.it/400x300?text=Tab Three Image"
81
+ - breakpoint: 800
82
+ src: "https://place-hold.it/800x600?text=Tab Three Image"
83
+ - breakpoint: 1200
84
+ src: "https://place-hold.it/1200x900?text=Tab Three Image"
85
+ - breakpoint: 1440
86
+ src: "https://place-hold.it/1600x1200?text=Tab Three Image"
87
87
  icon: error
88
88
  fiveitems:
89
89
  label: Five Items
90
90
  description: Tab component with five items
91
91
  fields:
92
92
  items:
93
- - label: 'Tab One'
94
- component: 'image'
93
+ - label: "Tab One"
94
+ component: "image"
95
95
  componentdata:
96
- alt: 'My alt text'
97
- caption: 'my image caption'
98
- credit: 'Photo: copyright 2022 Person S. Name'
96
+ alt: "My alt text"
97
+ caption: "my image caption"
98
+ credit: "Photo: copyright 2022 Person S. Name"
99
99
  url:
100
- - breakpoint: 0
101
- src: 'https://place-hold.it/400x300?text=Tab One Image'
102
- - breakpoint: 800
103
- src: 'https://place-hold.it/800x600?text=Tab One tImage'
104
- - breakpoint: 1200
105
- src: 'https://place-hold.it/1200x900?text=Tab One Image'
106
- - breakpoint: 1440
107
- src: 'https://place-hold.it/1600x1200?text=Tab One Image'
108
- - label: 'Tab Two'
109
- component: 'image'
100
+ - breakpoint: 0
101
+ src: "https://place-hold.it/400x300?text=Tab One Image"
102
+ - breakpoint: 800
103
+ src: "https://place-hold.it/800x600?text=Tab One tImage"
104
+ - breakpoint: 1200
105
+ src: "https://place-hold.it/1200x900?text=Tab One Image"
106
+ - breakpoint: 1440
107
+ src: "https://place-hold.it/1600x1200?text=Tab One Image"
108
+ - label: "Tab Two"
109
+ component: "image"
110
110
  componentdata:
111
- alt: 'My alt text'
112
- caption: 'my image caption'
113
- credit: 'Photo: copyright 2022 Person S. Name'
111
+ alt: "My alt text"
112
+ caption: "my image caption"
113
+ credit: "Photo: copyright 2022 Person S. Name"
114
114
  url:
115
- - breakpoint: 0
116
- src: 'https://place-hold.it/400x300?text=Tab Two Image'
117
- - breakpoint: 800
118
- src: 'https://place-hold.it/800x600?text=Tab Two Image'
119
- - breakpoint: 1200
120
- src: 'https://place-hold.it/1200x900?text=Tab Two Image'
121
- - breakpoint: 1440
122
- src: 'https://place-hold.it/1600x1200?text=Tab Two Image'
123
- - label: 'Tab Three'
124
- component: 'image'
115
+ - breakpoint: 0
116
+ src: "https://place-hold.it/400x300?text=Tab Two Image"
117
+ - breakpoint: 800
118
+ src: "https://place-hold.it/800x600?text=Tab Two Image"
119
+ - breakpoint: 1200
120
+ src: "https://place-hold.it/1200x900?text=Tab Two Image"
121
+ - breakpoint: 1440
122
+ src: "https://place-hold.it/1600x1200?text=Tab Two Image"
123
+ - label: "Tab Three"
124
+ component: "image"
125
125
  componentdata:
126
- alt: 'My alt text'
127
- caption: 'my image caption'
128
- credit: 'Photo: copyright 2022 Person S. Name'
126
+ alt: "My alt text"
127
+ caption: "my image caption"
128
+ credit: "Photo: copyright 2022 Person S. Name"
129
129
  url:
130
- - breakpoint: 0
131
- src: 'https://place-hold.it/400x300?text=Tab Three Image'
132
- - breakpoint: 800
133
- src: 'https://place-hold.it/800x600?text=Tab Three Image'
134
- - breakpoint: 1200
135
- src: 'https://place-hold.it/1200x900?text=Tab Three Image'
136
- - breakpoint: 1440
137
- src: 'https://place-hold.it/1600x1200?text=Tab Three Image'
138
- - label: 'Tab Four Has A Really Lenghthy Title Which Might Get Truncated'
139
- component: 'image'
130
+ - breakpoint: 0
131
+ src: "https://place-hold.it/400x300?text=Tab Three Image"
132
+ - breakpoint: 800
133
+ src: "https://place-hold.it/800x600?text=Tab Three Image"
134
+ - breakpoint: 1200
135
+ src: "https://place-hold.it/1200x900?text=Tab Three Image"
136
+ - breakpoint: 1440
137
+ src: "https://place-hold.it/1600x1200?text=Tab Three Image"
138
+ - label: "Tab Four Has A Really Lenghthy Title Which Might Get Truncated"
139
+ component: "image"
140
140
  componentdata:
141
- alt: 'My alt text'
142
- caption: 'my image caption'
143
- credit: 'Photo: copyright 2022 Person S. Name'
141
+ alt: "My alt text"
142
+ caption: "my image caption"
143
+ credit: "Photo: copyright 2022 Person S. Name"
144
144
  url:
145
- - breakpoint: 0
146
- src: 'https://place-hold.it/400x300?text=Tab Four Image'
147
- - breakpoint: 800
148
- src: 'https://place-hold.it/800x600?text=Tab Four Image'
149
- - breakpoint: 1200
150
- src: 'https://place-hold.it/1200x900?text=Tab Four Image'
151
- - breakpoint: 1440
152
- src: 'https://place-hold.it/1600x1200?text=Tab Four Image'
153
- - label: 'Tab Five'
154
- component: 'image'
145
+ - breakpoint: 0
146
+ src: "https://place-hold.it/400x300?text=Tab Four Image"
147
+ - breakpoint: 800
148
+ src: "https://place-hold.it/800x600?text=Tab Four Image"
149
+ - breakpoint: 1200
150
+ src: "https://place-hold.it/1200x900?text=Tab Four Image"
151
+ - breakpoint: 1440
152
+ src: "https://place-hold.it/1600x1200?text=Tab Four Image"
153
+ - label: "Tab Five"
154
+ component: "image"
155
155
  componentdata:
156
- alt: 'My alt text'
157
- caption: 'my image caption'
158
- credit: 'Photo: copyright 2022 Person S. Name'
156
+ alt: "My alt text"
157
+ caption: "my image caption"
158
+ credit: "Photo: copyright 2022 Person S. Name"
159
159
  url:
160
- - breakpoint: 0
161
- src: 'https://place-hold.it/400x300?text=Tab Five Image'
162
- - breakpoint: 800
163
- src: 'https://place-hold.it/800x600?text=Tab Five Image'
164
- - breakpoint: 1200
165
- src: 'https://place-hold.it/1200x900?text=Tab Five Image'
166
- - breakpoint: 1440
167
- src: 'https://place-hold.it/1600x1200?text=Tab Five Image'
160
+ - breakpoint: 0
161
+ src: "https://place-hold.it/400x300?text=Tab Five Image"
162
+ - breakpoint: 800
163
+ src: "https://place-hold.it/800x600?text=Tab Five Image"
164
+ - breakpoint: 1200
165
+ src: "https://place-hold.it/1200x900?text=Tab Five Image"
166
+ - breakpoint: 1440
167
+ src: "https://place-hold.it/1600x1200?text=Tab Five Image"
168
168
  visibility: storybook
@@ -2,6 +2,6 @@
2
2
  * tag
3
3
  */
4
4
  // Module template
5
- import './tags.twig';
6
- import './tags.wingsuit.yml';
7
- import './tag.behavior';
5
+ import "./tags.twig";
6
+ import "./tags.wingsuit.yml";
7
+ import "./tag.behavior";
@@ -1,4 +1,4 @@
1
- import Tag from './tag';
1
+ import Tag from "./tag";
2
2
 
3
3
  Drupal.behaviors.tag = {
4
4
  attach() {
@@ -6,7 +6,7 @@ Drupal.behaviors.tag = {
6
6
  document.querySelectorAll(`[data-loadcomponent="Tag"]`),
7
7
  (element) => {
8
8
  // eslint-disable-next-line no-console
9
- console.log('loading Tag component....');
9
+ console.log("loading Tag component....");
10
10
  new Tag(element);
11
11
  }
12
12
  );
@@ -1,4 +1,4 @@
1
- import { getUpdatedItems, EVENTS, ARIA } from '@ilo-org/utils';
1
+ import { getUpdatedItems, EVENTS } from "@ilo-org/utils";
2
2
 
3
3
  /**
4
4
  * The Tag module which handles rendering field labels inline on a form.
@@ -50,13 +50,13 @@ export default class Tag {
50
50
  * The field that a user interacts with on a form
51
51
  * @type {Object}
52
52
  */
53
- this.buttonTags = this.element.querySelectorAll('.ilo--tag--button');
54
- this.multipleActive = this.element.getAttribute('data-multipleactive');
53
+ this.buttonTags = this.element.querySelectorAll(".ilo--tag--button");
54
+ this.multipleActive = this.element.getAttribute("data-multipleactive");
55
55
 
56
56
  this.buttonTags.forEach((button, i) => {
57
- const expanded = button.dataset['active'];
58
- const id = this.buttonTags[i].getAttribute('id');
59
- if (expanded === 'true') {
57
+ const expanded = button.dataset["active"];
58
+ const id = this.buttonTags[i].getAttribute("id");
59
+ if (expanded === "true") {
60
60
  this.itemStatuses = getUpdatedItems({
61
61
  id,
62
62
  itemStatuses: this.itemStatuses,
@@ -104,7 +104,7 @@ export default class Tag {
104
104
  * @chainable
105
105
  */
106
106
  onClick(i) {
107
- const id = this.buttonTags[i].getAttribute('id');
107
+ const id = this.buttonTags[i].getAttribute("id");
108
108
 
109
109
  this.itemStatuses = getUpdatedItems({
110
110
  id,
@@ -144,14 +144,14 @@ export default class Tag {
144
144
  */
145
145
  updateTagItems() {
146
146
  this.tags.forEach((item, i) => {
147
- const id = item.getAttribute('id');
147
+ const id = item.getAttribute("id");
148
148
  const open = this.itemStatuses.indexOf(id) > -1;
149
149
  if (open) {
150
- this.tags[i].classList.add('ilo--tag--active');
151
- this.tags[i].setAttribute('data-active', 'true');
150
+ this.tags[i].classList.add("ilo--tag--active");
151
+ this.tags[i].setAttribute("data-active", "true");
152
152
  } else {
153
- this.tags[i].classList.remove('ilo--tag--active');
154
- this.tags[i].setAttribute('data-active', 'true');
153
+ this.tags[i].classList.remove("ilo--tag--active");
154
+ this.tags[i].setAttribute("data-active", "true");
155
155
  }
156
156
  });
157
157
 
@@ -1,7 +1,10 @@
1
- import './index';
1
+ import "./index";
2
2
 
3
- const patternDefinition = require('./tags.wingsuit.yml');
3
+ export default {};
4
+ const patternDefinition = require("./tags.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
  tag:
2
- use: '@components/tags/tag.twig'
2
+ use: "@components/tags/tag.twig"
3
3
  label: Tag
4
4
  description: A display or interactable tag
5
5
  fields:
@@ -18,10 +18,10 @@ tag:
18
18
  url:
19
19
  type: text
20
20
  label: URL
21
- description: The tag's url reference
21
+ description: The tag's url reference
22
22
  preview:
23
23
  faker: https://www.google.com/
24
- settings:
24
+ settings:
25
25
  defaultActive:
26
26
  type: select
27
27
  label: Default Active
@@ -1,5 +1,5 @@
1
1
  tags:
2
- use: '@components/tags/tags.twig'
2
+ use: "@components/tags/tags.twig"
3
3
  label: Tags
4
4
  description: A group of tags
5
5
  fields:
@@ -2,6 +2,6 @@
2
2
  * Tooltip
3
3
  */
4
4
  // Module template
5
- import './tooltip.twig';
6
- import './tooltip.wingsuit.yml';
7
- import './tooltip.behavior';
5
+ import "./tooltip.twig";
6
+ import "./tooltip.wingsuit.yml";
7
+ import "./tooltip.behavior";
@@ -1,4 +1,4 @@
1
- import Tooltip from './tooltip';
1
+ import Tooltip from "./tooltip";
2
2
 
3
3
  Drupal.behaviors.tooltip = {
4
4
  attach() {
@@ -6,7 +6,7 @@ Drupal.behaviors.tooltip = {
6
6
  document.querySelectorAll(`[data-loadcomponent="Tooltip"]`),
7
7
  (element) => {
8
8
  // eslint-disable-next-line no-console
9
- console.log('loading Tooltip component....');
9
+ console.log("loading Tooltip component....");
10
10
  new Tooltip(element);
11
11
  }
12
12
  );