@ilo-org/twig 0.2.6 → 0.2.7
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 +10640 -10640
- package/CHANGELOG.md +26 -0
- package/package.json +6 -6
- package/src/patterns/components/cardgroup/cardgroup.twig +1 -1
- package/src/patterns/components/hero/hero.twig +1 -3
- package/src/patterns/components/hero/hero.wingsuit.yml +3 -5
- package/src/patterns/components/localnav/localnav.twig +5 -0
- package/src/patterns/components/localnav/localnav.wingsuit.yml +7 -0
- package/src/patterns/components/navigation/navigation.js +20 -16
- package/src/patterns/components/tooltip/tooltip.twig +4 -1
- package/src/patterns/components/tooltip/tooltip.wingsuit.yml +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @ilo-org/twig
|
|
2
2
|
|
|
3
|
+
## 0.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 94bd642d9: ILOUAT-16: Clicking on the page should close subnav menu
|
|
8
|
+
ILOUAT-26: mobile hamburger click shouldn't auto navigate to inside link
|
|
9
|
+
ILOUAT-27: Menu take over on mobile should be the whole page without the ability to scroll past it
|
|
10
|
+
ILOUAT-37: Subnav pane should properly open when subnav items are focused
|
|
11
|
+
- a167b7405: - Border radius for context menu
|
|
12
|
+
- Mobile nav disappear on breakpoint instead of any resize event
|
|
13
|
+
- More List spacing fixes (title item)
|
|
14
|
+
- Breadcrumb on mobile in heroes
|
|
15
|
+
- Bugfixes for feature card on wide mode with list item
|
|
16
|
+
- Add in "Back to main site" link for local nav
|
|
17
|
+
- 79e17c5d3: Bufdixes to multiple components
|
|
18
|
+
- 7b3813bb1: Bugfixes to multiple components
|
|
19
|
+
- Updated dependencies [94bd642d9]
|
|
20
|
+
- Updated dependencies [a167b7405]
|
|
21
|
+
- Updated dependencies [79e17c5d3]
|
|
22
|
+
- Updated dependencies [7b3813bb1]
|
|
23
|
+
- @ilo-org/fonts@0.0.4
|
|
24
|
+
- @ilo-org/icons@0.1.12
|
|
25
|
+
- @ilo-org/styles@0.1.12
|
|
26
|
+
- @ilo-org/themes@0.1.12
|
|
27
|
+
- @ilo-org/utils@0.0.8
|
|
28
|
+
|
|
3
29
|
## 0.2.6
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/twig",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
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.4",
|
|
24
|
+
"@ilo-org/icons": "0.1.12",
|
|
25
|
+
"@ilo-org/styles": "0.1.12",
|
|
26
|
+
"@ilo-org/themes": "0.1.12",
|
|
27
|
+
"@ilo-org/utils": "0.0.8",
|
|
28
28
|
"@wingsuit-designsystem/preset-scss": "^1.2.3",
|
|
29
29
|
"video.js": "^7.19.2"
|
|
30
30
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
{% if cta %}
|
|
33
33
|
<div class="{{prefix}}--cardgroup--button-wrap">
|
|
34
34
|
<a
|
|
35
|
-
class="{{prefix}}--button {{prefix}}--button--
|
|
35
|
+
class="{{prefix}}--button {{prefix}}--button--large {{prefix}}--button--secondary"
|
|
36
36
|
href="{{cta.url}}"
|
|
37
37
|
>
|
|
38
38
|
<span class="button__label">{{ cta.label }}</span>
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
{% else %}
|
|
14
14
|
{% include "@components/image/image.twig" with {
|
|
15
15
|
alt: image.alt,
|
|
16
|
-
caption: image.caption,
|
|
17
|
-
credit: image.credit,
|
|
18
16
|
prefix: prefix,
|
|
19
17
|
url: image.url,
|
|
20
18
|
} only %}
|
|
@@ -30,4 +28,4 @@
|
|
|
30
28
|
title: herocard.title,
|
|
31
29
|
types: types
|
|
32
30
|
} only %}
|
|
33
|
-
</div>
|
|
31
|
+
</div>
|
|
@@ -26,9 +26,7 @@ hero:
|
|
|
26
26
|
type: object
|
|
27
27
|
preview:
|
|
28
28
|
alt: Lorem ipsum
|
|
29
|
-
|
|
30
|
-
credit: ""
|
|
31
|
-
url:
|
|
29
|
+
url:
|
|
32
30
|
- breakpoint: 0
|
|
33
31
|
src: "https://placekitten.com/1920/800"
|
|
34
32
|
- breakpoint: 768
|
|
@@ -36,12 +34,12 @@ hero:
|
|
|
36
34
|
herocard:
|
|
37
35
|
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.
|
|
38
36
|
type: object
|
|
39
|
-
preview:
|
|
37
|
+
preview:
|
|
40
38
|
alignment: left
|
|
41
39
|
datecopy: 11 February 2022
|
|
42
40
|
eyebrow: Eyebrow
|
|
43
41
|
intro: "Brief intro text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
|
44
|
-
socials:
|
|
42
|
+
socials:
|
|
45
43
|
- label: "Facebook"
|
|
46
44
|
url: "https://www.facebook.com/"
|
|
47
45
|
icon: "facebook"
|
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
</nav>
|
|
21
21
|
<div class="{{prefix}}--language-switcher">
|
|
22
22
|
<div class="{{prefix}}--language-switcher--wrap">
|
|
23
|
+
{% if mainlink is defined %}
|
|
24
|
+
<span class="{{prefix}}--language-switcher--link--wrap">
|
|
25
|
+
<a href="{{mainlink.url}}" class="{{prefix}}--language-switcher--link">{{mainlink.label}}</a>
|
|
26
|
+
</span>
|
|
27
|
+
{% endif %}
|
|
23
28
|
<button class="{{prefix}}--language-switcher--button" type="button">
|
|
24
29
|
{{languagelabel}}
|
|
25
30
|
</button>
|
|
@@ -52,6 +52,13 @@ localnav:
|
|
|
52
52
|
label: Menu Item 4
|
|
53
53
|
- link: "https://www.google.com/search?q=menu5"
|
|
54
54
|
label: Menu Item 5
|
|
55
|
+
mainlink:
|
|
56
|
+
type: object
|
|
57
|
+
label: Main link object
|
|
58
|
+
description: Link object for back to main site link
|
|
59
|
+
preview:
|
|
60
|
+
url: 'https://www.google.com/'
|
|
61
|
+
label: 'Go to main ILO website'
|
|
55
62
|
languagelabel:
|
|
56
63
|
type: string
|
|
57
64
|
label: Language Label
|
|
@@ -112,8 +112,8 @@ export default class Navigation {
|
|
|
112
112
|
// subnavBack
|
|
113
113
|
if (this.subnavBack.length > 0) {
|
|
114
114
|
this.subnavBack.forEach((button, i) => {
|
|
115
|
-
button.addEventListener(EVENTS.CLICK, () => this.subnavBackClick(
|
|
116
|
-
button.addEventListener(EVENTS.TOUCH_START, () => this.subnavBackClick(
|
|
115
|
+
button.addEventListener(EVENTS.CLICK, (e) => this.subnavBackClick(e));
|
|
116
|
+
button.addEventListener(EVENTS.TOUCH_START, (e) => this.subnavBackClick(e));
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -132,8 +132,8 @@ export default class Navigation {
|
|
|
132
132
|
|
|
133
133
|
// menuOpen
|
|
134
134
|
if (this.menuOpen) {
|
|
135
|
-
this.menuOpen.addEventListener(EVENTS.CLICK, () => this.menuOpenClick());
|
|
136
|
-
this.menuOpen.addEventListener(EVENTS.TOUCH_START, () => this.menuOpenClick());
|
|
135
|
+
this.menuOpen.addEventListener(EVENTS.CLICK, (e) => this.menuOpenClick(e));
|
|
136
|
+
this.menuOpen.addEventListener(EVENTS.TOUCH_START, (e) => this.menuOpenClick(e));
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
// contextButton
|
|
@@ -164,7 +164,11 @@ export default class Navigation {
|
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
window.addEventListener(EVENTS.RESIZE, (e) =>
|
|
167
|
+
window.addEventListener(EVENTS.RESIZE, (e) => {
|
|
168
|
+
if (window.innerWidth >= 1024) {
|
|
169
|
+
this.onResize(e);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
168
172
|
|
|
169
173
|
return this;
|
|
170
174
|
}
|
|
@@ -209,9 +213,6 @@ export default class Navigation {
|
|
|
209
213
|
*/
|
|
210
214
|
handleKeyPress(e, callback) {
|
|
211
215
|
if (e.key === 'Escape') {
|
|
212
|
-
// this.element.classList.remove(`${this.prefix}--context--open`);
|
|
213
|
-
// this.element.classList.remove(`${this.prefix}--subnav--open`);
|
|
214
|
-
// this.element.classList.remove(`${this.prefix}--search--open`);
|
|
215
216
|
callback(e);
|
|
216
217
|
}
|
|
217
218
|
|
|
@@ -238,7 +239,6 @@ export default class Navigation {
|
|
|
238
239
|
*/
|
|
239
240
|
handleContextButtonClickOn(e) {
|
|
240
241
|
e.stopImmediatePropagation();
|
|
241
|
-
// e.stopPropagation();
|
|
242
242
|
this.element.classList.add(`${this.prefix}--context--open`);
|
|
243
243
|
window.addEventListener(
|
|
244
244
|
EVENTS.KEY_DOWN,
|
|
@@ -258,7 +258,6 @@ export default class Navigation {
|
|
|
258
258
|
*/
|
|
259
259
|
handleContextButtonClickOff(e) {
|
|
260
260
|
e.stopImmediatePropagation();
|
|
261
|
-
// e.stopPropagation();
|
|
262
261
|
this.element.classList.remove(`${this.prefix}--context--open`);
|
|
263
262
|
window.removeEventListener(
|
|
264
263
|
EVENTS.KEY_DOWN,
|
|
@@ -317,7 +316,6 @@ export default class Navigation {
|
|
|
317
316
|
*/
|
|
318
317
|
handleSearchButtonClickOff(e) {
|
|
319
318
|
e.stopImmediatePropagation();
|
|
320
|
-
// e.stopPropagation();
|
|
321
319
|
this.element.classList.remove(`${this.prefix}--search--open`);
|
|
322
320
|
window.removeEventListener(
|
|
323
321
|
EVENTS.KEY_DOWN,
|
|
@@ -335,7 +333,6 @@ export default class Navigation {
|
|
|
335
333
|
* @chainable
|
|
336
334
|
*/
|
|
337
335
|
handleSearchButtonClick(e) {
|
|
338
|
-
// this.element.classList.toggle(`${this.prefix}--search--open`);
|
|
339
336
|
this.element.classList.remove(`${this.prefix}--subnav--open`);
|
|
340
337
|
|
|
341
338
|
if (this.element.classList.contains(`${this.prefix}--search--open`)) {
|
|
@@ -353,8 +350,10 @@ export default class Navigation {
|
|
|
353
350
|
* @return {Object} Navigation A reference to the instance of the class
|
|
354
351
|
* @chainable
|
|
355
352
|
*/
|
|
356
|
-
handleMenuOpenClick() {
|
|
353
|
+
handleMenuOpenClick(e) {
|
|
354
|
+
e.stopImmediatePropagation();
|
|
357
355
|
this.element.classList.add(`${this.prefix}--mobile--open`);
|
|
356
|
+
this.body.classList.add(`${this.prefix}--menu--open`);
|
|
358
357
|
|
|
359
358
|
return this;
|
|
360
359
|
}
|
|
@@ -367,10 +366,12 @@ export default class Navigation {
|
|
|
367
366
|
*/
|
|
368
367
|
handleSubnavClickOn(e) {
|
|
369
368
|
e.stopImmediatePropagation();
|
|
370
|
-
// e.stopPropagation();
|
|
371
369
|
this.element.classList.add(`${this.prefix}--subnav--open`);
|
|
372
370
|
window.addEventListener(EVENTS.KEY_DOWN, (ev) => this.keyPress(ev, this.subnavClickOff), false);
|
|
373
371
|
|
|
372
|
+
if (window.innerWidth >= 1024) {
|
|
373
|
+
this.body.addEventListener(EVENTS.CLICK, (ev) => this.handleSubnavClickOff(ev), false);
|
|
374
|
+
}
|
|
374
375
|
return this;
|
|
375
376
|
}
|
|
376
377
|
|
|
@@ -382,7 +383,6 @@ export default class Navigation {
|
|
|
382
383
|
*/
|
|
383
384
|
handleSubnavClickOff(e) {
|
|
384
385
|
e.stopImmediatePropagation();
|
|
385
|
-
// e.stopPropagation();
|
|
386
386
|
this.element.classList.remove(`${this.prefix}--subnav--open`);
|
|
387
387
|
window.removeEventListener(
|
|
388
388
|
EVENTS.KEY_DOWN,
|
|
@@ -390,6 +390,8 @@ export default class Navigation {
|
|
|
390
390
|
false
|
|
391
391
|
);
|
|
392
392
|
|
|
393
|
+
this.body.removeEventListener(EVENTS.CLICK, (ev) => this.handleSubnavClickOff(ev), false);
|
|
394
|
+
|
|
393
395
|
return this;
|
|
394
396
|
}
|
|
395
397
|
|
|
@@ -417,7 +419,7 @@ export default class Navigation {
|
|
|
417
419
|
* @return {Object} Navigation A reference to the instance of the class
|
|
418
420
|
* @chainable
|
|
419
421
|
*/
|
|
420
|
-
handleSubnavBackClick() {
|
|
422
|
+
handleSubnavBackClick(e) {
|
|
421
423
|
// this.element.classList.remove(`${this.prefix}--subnav--open`);
|
|
422
424
|
this.subnavClickOff(e);
|
|
423
425
|
this.element.classList.remove(`${this.prefix}--select--open`);
|
|
@@ -435,6 +437,8 @@ export default class Navigation {
|
|
|
435
437
|
this.element.classList.remove(`${this.prefix}--mobile--open`);
|
|
436
438
|
this.element.classList.remove(`${this.prefix}--subnav--open`);
|
|
437
439
|
|
|
440
|
+
this.body.classList.remove(`${this.prefix}--menu--open`);
|
|
441
|
+
|
|
438
442
|
return this;
|
|
439
443
|
}
|
|
440
444
|
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
TOOLTIP COMPONENT
|
|
3
3
|
#}
|
|
4
4
|
<div
|
|
5
|
-
class="{{prefix}}--tooltip--wrapper{% if icon %} has-icon{% endif %}" role="status" aria-live="polite" aria-relevant="additions" data-loadcomponent="Tooltip" data-prefix="{{prefix}}"
|
|
5
|
+
class="{{prefix}}--tooltip--wrapper{% if icon and icon != 'false' %} has-icon{% endif %}" role="status" aria-live="polite" aria-relevant="additions" data-loadcomponent="Tooltip" data-prefix="{{prefix}}"
|
|
6
6
|
>
|
|
7
|
+
{% if not icon or icon == 'false' %}
|
|
8
|
+
{{ children|raw }}
|
|
9
|
+
{% endif %}
|
|
7
10
|
<span class="{{prefix}}--tooltip {{prefix}}--tooltip--{{theme}}" data-alignment="left">
|
|
8
11
|
<span class="{{prefix}}--tooltip--arrow {{prefix}}--tooltip--arrow--placement-negative" data-placement="negative" role="presentation"></span>
|
|
9
12
|
{{label}}
|
|
@@ -9,6 +9,12 @@ tooltip:
|
|
|
9
9
|
description: label shown on the tooltip
|
|
10
10
|
required: true
|
|
11
11
|
preview: 'Tooltip text'
|
|
12
|
+
children:
|
|
13
|
+
type: string
|
|
14
|
+
label: children
|
|
15
|
+
description: html to pass in to be wrapped by the tooltip
|
|
16
|
+
required: false
|
|
17
|
+
preview: "<a href='https://www.google.com/'>This is testing for the tooltip</a>"
|
|
12
18
|
settings:
|
|
13
19
|
icon:
|
|
14
20
|
type: select
|