@ilo-org/twig 0.2.6 → 0.2.8
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 +10826 -10826
- package/CHANGELOG.md +42 -0
- package/package.json +6 -6
- package/src/patterns/components/breadcrumb/breadcrumb.twig +0 -1
- package/src/patterns/components/cardgroup/cardgroup.twig +1 -1
- package/src/patterns/components/hero/hero.twig +2 -3
- package/src/patterns/components/hero/hero.wingsuit.yml +11 -5
- package/src/patterns/components/herocard/herocard.twig +2 -2
- package/src/patterns/components/herocard/herocard.wingsuit.yml +8 -0
- package/src/patterns/components/image/image.twig +7 -5
- package/src/patterns/components/image/image.wingsuit.yml +10 -0
- 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 +26 -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,47 @@
|
|
|
1
1
|
# @ilo-org/twig
|
|
2
2
|
|
|
3
|
+
## 0.2.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 62c3c624e: Bugfixes in multiple components
|
|
8
|
+
- 1b29018f0: Adds better React Storybook experience
|
|
9
|
+
- 43c2b0026: Cornercut changes to make more consistent across sizes and breakpoints for hero and cards
|
|
10
|
+
- Updated dependencies [62c3c624e]
|
|
11
|
+
- Updated dependencies [1b29018f0]
|
|
12
|
+
- Updated dependencies [43c2b0026]
|
|
13
|
+
- @ilo-org/fonts@0.0.5
|
|
14
|
+
- @ilo-org/icons@0.1.13
|
|
15
|
+
- @ilo-org/styles@0.1.13
|
|
16
|
+
- @ilo-org/themes@0.1.13
|
|
17
|
+
- @ilo-org/utils@0.0.9
|
|
18
|
+
|
|
19
|
+
## 0.2.7
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 94bd642d9: ILOUAT-16: Clicking on the page should close subnav menu
|
|
24
|
+
ILOUAT-26: mobile hamburger click shouldn't auto navigate to inside link
|
|
25
|
+
ILOUAT-27: Menu take over on mobile should be the whole page without the ability to scroll past it
|
|
26
|
+
ILOUAT-37: Subnav pane should properly open when subnav items are focused
|
|
27
|
+
- a167b7405: - Border radius for context menu
|
|
28
|
+
- Mobile nav disappear on breakpoint instead of any resize event
|
|
29
|
+
- More List spacing fixes (title item)
|
|
30
|
+
- Breadcrumb on mobile in heroes
|
|
31
|
+
- Bugfixes for feature card on wide mode with list item
|
|
32
|
+
- Add in "Back to main site" link for local nav
|
|
33
|
+
- 79e17c5d3: Bufdixes to multiple components
|
|
34
|
+
- 7b3813bb1: Bugfixes to multiple components
|
|
35
|
+
- Updated dependencies [94bd642d9]
|
|
36
|
+
- Updated dependencies [a167b7405]
|
|
37
|
+
- Updated dependencies [79e17c5d3]
|
|
38
|
+
- Updated dependencies [7b3813bb1]
|
|
39
|
+
- @ilo-org/fonts@0.0.4
|
|
40
|
+
- @ilo-org/icons@0.1.12
|
|
41
|
+
- @ilo-org/styles@0.1.12
|
|
42
|
+
- @ilo-org/themes@0.1.12
|
|
43
|
+
- @ilo-org/utils@0.0.8
|
|
44
|
+
|
|
3
45
|
## 0.2.6
|
|
4
46
|
|
|
5
47
|
### 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.8",
|
|
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.5",
|
|
24
|
+
"@ilo-org/icons": "0.1.13",
|
|
25
|
+
"@ilo-org/styles": "0.1.13",
|
|
26
|
+
"@ilo-org/themes": "0.1.13",
|
|
27
|
+
"@ilo-org/utils": "0.0.9",
|
|
28
28
|
"@wingsuit-designsystem/preset-scss": "^1.2.3",
|
|
29
29
|
"video.js": "^7.19.2"
|
|
30
30
|
},
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
BREADCRUMB COMPONENT
|
|
3
3
|
#}
|
|
4
4
|
{% set lastlink = links|last %}
|
|
5
|
-
|
|
6
5
|
<nav class="{{prefix}}--breadcrumb{% if className %} {{className}}{% endif %}" data-prefix="{{prefix}}" data-loadcomponent="Breadcrumb">
|
|
7
6
|
<ol class="{{prefix}}--breadcrumb--items">
|
|
8
7
|
<li class="{{prefix}}--breadcrumb--item home">
|
|
@@ -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 %}
|
|
@@ -23,6 +21,7 @@
|
|
|
23
21
|
alignment: herocard.alignment,
|
|
24
22
|
eyebrow: herocard.eyebrow,
|
|
25
23
|
datecopy: herocard.datecopy,
|
|
24
|
+
hasbackground: hasbackground,
|
|
26
25
|
intro: herocard.intro,
|
|
27
26
|
prefix: prefix,
|
|
28
27
|
socials: herocard.socials,
|
|
@@ -30,4 +29,4 @@
|
|
|
30
29
|
title: herocard.title,
|
|
31
30
|
types: types
|
|
32
31
|
} only %}
|
|
33
|
-
</div>
|
|
32
|
+
</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"
|
|
@@ -70,6 +68,14 @@ hero:
|
|
|
70
68
|
options:
|
|
71
69
|
dark: Dark
|
|
72
70
|
light: Light
|
|
71
|
+
hasbackground:
|
|
72
|
+
type: select
|
|
73
|
+
label: Has Background
|
|
74
|
+
description: does the hero card have a background? (Defaults to true, only applied to Home Hero)
|
|
75
|
+
options:
|
|
76
|
+
true: true
|
|
77
|
+
false: 'false'
|
|
78
|
+
preview: true
|
|
73
79
|
types:
|
|
74
80
|
type: select
|
|
75
81
|
label: Types
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{#
|
|
2
2
|
HEROCARD COMPONENT
|
|
3
3
|
#}
|
|
4
|
-
<div class="{{prefix}}--hero-card {{prefix}}--hero-card--{{alignment}} {{prefix}}--hero-card--{{theme}} {{prefix}}--hero-card--{{types}}">
|
|
4
|
+
<div class="{{prefix}}--hero-card {{prefix}}--hero-card--{{alignment}} {{prefix}}--hero-card--{{theme}} {{prefix}}--hero-card--{{types}}{% if not hasbackground or hasbackground == 'false' %} {{prefix}}--hero-card--nobackground{% endif %}">
|
|
5
5
|
{% if eyebrow %}
|
|
6
6
|
<p class="{{ prefix }}--hero-card--eyebrow">{{ eyebrow }}</p>
|
|
7
7
|
{% endif %}
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
</li>
|
|
29
29
|
{% endfor %}
|
|
30
30
|
</ul>
|
|
31
|
-
</div>
|
|
31
|
+
</div>
|
|
@@ -45,4 +45,12 @@ herocard:
|
|
|
45
45
|
center: 'center'
|
|
46
46
|
right: 'right'
|
|
47
47
|
preview: "center"
|
|
48
|
+
hasbackground:
|
|
49
|
+
type: select
|
|
50
|
+
label: Has Background
|
|
51
|
+
description: does the hero card have a background? (Defaults to true, only applied to Home Hero)
|
|
52
|
+
options:
|
|
53
|
+
true: true
|
|
54
|
+
false: 'false'
|
|
55
|
+
preview: true
|
|
48
56
|
visibility: storybook
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#}
|
|
4
4
|
<figure class="{{prefix}}--image" data-prefix="{{prefix}}">
|
|
5
5
|
<div class="image {{prefix}}--image--wrapper">
|
|
6
|
-
<picture class="{{prefix}}--image--img">
|
|
6
|
+
<picture class="{{prefix}}--image--img" {% if credit and ishero and ishero != 'false' %}title="{{credit}}"{% endif %}>
|
|
7
7
|
{% for img in url|reverse %}
|
|
8
8
|
{% if loop.last == false %}
|
|
9
9
|
<source srcset="{{img.src}}" media="(min-width: {{img.breakpoint}}px)">
|
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
{% endfor %}
|
|
12
12
|
<img src="{{url|reverse|last.src}}" alt="{{alt}}">
|
|
13
13
|
</picture>
|
|
14
|
-
{% if
|
|
15
|
-
|
|
16
|
-
<span class="{{prefix}}--credit
|
|
17
|
-
|
|
14
|
+
{% if not ishero or ishero =='false' %}
|
|
15
|
+
{% if credit %}
|
|
16
|
+
<span class="{{prefix}}--credit">
|
|
17
|
+
<span class="{{prefix}}--credit--label">{{credit}}</span>
|
|
18
|
+
</span>
|
|
19
|
+
{% endif %}
|
|
18
20
|
{% endif %}
|
|
19
21
|
</div>
|
|
20
22
|
{% if caption %}
|
|
@@ -34,4 +34,14 @@ image:
|
|
|
34
34
|
src: 'https://place-hold.it/1200x900?text=LargeBreakpointImage'
|
|
35
35
|
- breakpoint: 1440
|
|
36
36
|
src: 'https://place-hold.it/1600x1200?text=LargestBreakpointImage'
|
|
37
|
+
settings:
|
|
38
|
+
ishero:
|
|
39
|
+
type: select
|
|
40
|
+
label: Is Hero
|
|
41
|
+
description: Is this image in a hero? If true, and credit exists, will display credit in a title attribute
|
|
42
|
+
preview: false
|
|
43
|
+
required: false
|
|
44
|
+
options:
|
|
45
|
+
True: true
|
|
46
|
+
False: 'false'
|
|
37
47
|
visibility: storybook
|
|
@@ -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,
|
|
@@ -306,6 +305,10 @@ export default class Navigation {
|
|
|
306
305
|
false
|
|
307
306
|
);
|
|
308
307
|
|
|
308
|
+
if (window.innerWidth >= 1024) {
|
|
309
|
+
this.body.addEventListener(EVENTS.CLICK, (ev) => this.handleSearchButtonClickOff(ev), false);
|
|
310
|
+
}
|
|
311
|
+
|
|
309
312
|
return this;
|
|
310
313
|
}
|
|
311
314
|
|
|
@@ -317,7 +320,6 @@ export default class Navigation {
|
|
|
317
320
|
*/
|
|
318
321
|
handleSearchButtonClickOff(e) {
|
|
319
322
|
e.stopImmediatePropagation();
|
|
320
|
-
// e.stopPropagation();
|
|
321
323
|
this.element.classList.remove(`${this.prefix}--search--open`);
|
|
322
324
|
window.removeEventListener(
|
|
323
325
|
EVENTS.KEY_DOWN,
|
|
@@ -325,6 +327,8 @@ export default class Navigation {
|
|
|
325
327
|
false
|
|
326
328
|
);
|
|
327
329
|
|
|
330
|
+
this.body.removeEventListener(EVENTS.CLICK, (ev) => this.handleSearchButtonClickOff(ev), false);
|
|
331
|
+
|
|
328
332
|
return this;
|
|
329
333
|
}
|
|
330
334
|
|
|
@@ -335,7 +339,6 @@ export default class Navigation {
|
|
|
335
339
|
* @chainable
|
|
336
340
|
*/
|
|
337
341
|
handleSearchButtonClick(e) {
|
|
338
|
-
// this.element.classList.toggle(`${this.prefix}--search--open`);
|
|
339
342
|
this.element.classList.remove(`${this.prefix}--subnav--open`);
|
|
340
343
|
|
|
341
344
|
if (this.element.classList.contains(`${this.prefix}--search--open`)) {
|
|
@@ -353,8 +356,10 @@ export default class Navigation {
|
|
|
353
356
|
* @return {Object} Navigation A reference to the instance of the class
|
|
354
357
|
* @chainable
|
|
355
358
|
*/
|
|
356
|
-
handleMenuOpenClick() {
|
|
359
|
+
handleMenuOpenClick(e) {
|
|
360
|
+
e.stopImmediatePropagation();
|
|
357
361
|
this.element.classList.add(`${this.prefix}--mobile--open`);
|
|
362
|
+
this.body.classList.add(`${this.prefix}--menu--open`);
|
|
358
363
|
|
|
359
364
|
return this;
|
|
360
365
|
}
|
|
@@ -367,10 +372,12 @@ export default class Navigation {
|
|
|
367
372
|
*/
|
|
368
373
|
handleSubnavClickOn(e) {
|
|
369
374
|
e.stopImmediatePropagation();
|
|
370
|
-
// e.stopPropagation();
|
|
371
375
|
this.element.classList.add(`${this.prefix}--subnav--open`);
|
|
372
376
|
window.addEventListener(EVENTS.KEY_DOWN, (ev) => this.keyPress(ev, this.subnavClickOff), false);
|
|
373
377
|
|
|
378
|
+
if (window.innerWidth >= 1024) {
|
|
379
|
+
this.body.addEventListener(EVENTS.CLICK, (ev) => this.handleSubnavClickOff(ev), false);
|
|
380
|
+
}
|
|
374
381
|
return this;
|
|
375
382
|
}
|
|
376
383
|
|
|
@@ -382,7 +389,6 @@ export default class Navigation {
|
|
|
382
389
|
*/
|
|
383
390
|
handleSubnavClickOff(e) {
|
|
384
391
|
e.stopImmediatePropagation();
|
|
385
|
-
// e.stopPropagation();
|
|
386
392
|
this.element.classList.remove(`${this.prefix}--subnav--open`);
|
|
387
393
|
window.removeEventListener(
|
|
388
394
|
EVENTS.KEY_DOWN,
|
|
@@ -390,6 +396,8 @@ export default class Navigation {
|
|
|
390
396
|
false
|
|
391
397
|
);
|
|
392
398
|
|
|
399
|
+
this.body.removeEventListener(EVENTS.CLICK, (ev) => this.handleSubnavClickOff(ev), false);
|
|
400
|
+
|
|
393
401
|
return this;
|
|
394
402
|
}
|
|
395
403
|
|
|
@@ -417,7 +425,7 @@ export default class Navigation {
|
|
|
417
425
|
* @return {Object} Navigation A reference to the instance of the class
|
|
418
426
|
* @chainable
|
|
419
427
|
*/
|
|
420
|
-
handleSubnavBackClick() {
|
|
428
|
+
handleSubnavBackClick(e) {
|
|
421
429
|
// this.element.classList.remove(`${this.prefix}--subnav--open`);
|
|
422
430
|
this.subnavClickOff(e);
|
|
423
431
|
this.element.classList.remove(`${this.prefix}--select--open`);
|
|
@@ -435,6 +443,8 @@ export default class Navigation {
|
|
|
435
443
|
this.element.classList.remove(`${this.prefix}--mobile--open`);
|
|
436
444
|
this.element.classList.remove(`${this.prefix}--subnav--open`);
|
|
437
445
|
|
|
446
|
+
this.body.classList.remove(`${this.prefix}--menu--open`);
|
|
447
|
+
|
|
438
448
|
return this;
|
|
439
449
|
}
|
|
440
450
|
|
|
@@ -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
|