@brightspace-ui/core 3.143.1 → 3.144.0
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/components/tooltip/demo/tooltip.html +40 -1
- package/components/tooltip/tooltip.js +1378 -837
- package/custom-elements.json +5 -3
- package/package.json +1 -1
@@ -5,6 +5,11 @@
|
|
5
5
|
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
6
6
|
<meta charset="UTF-8">
|
7
7
|
<link rel="stylesheet" href="../../demo/styles.css" type="text/css">
|
8
|
+
<script type="module">
|
9
|
+
import { mockFlag } from '../../../helpers/flags.js';
|
10
|
+
const urlParams = new URLSearchParams(window.location.search);
|
11
|
+
mockFlag('GAUD-7355-tooltip-popover', urlParams.get('popover') === 'true');
|
12
|
+
</script>
|
8
13
|
<script type="module">
|
9
14
|
import '../../button/button.js';
|
10
15
|
import '../../colors/colors.js';
|
@@ -97,6 +102,40 @@
|
|
97
102
|
</template>
|
98
103
|
</d2l-demo-snippet>
|
99
104
|
|
105
|
+
<h2>Tooltip (position)</h2>
|
106
|
+
<d2l-demo-snippet>
|
107
|
+
<template>
|
108
|
+
<div>
|
109
|
+
<select id="position">
|
110
|
+
<option value="bottom" selected>bottom</option>
|
111
|
+
<option value="left">left</option>
|
112
|
+
<option value="right">right</option>
|
113
|
+
<option value="top">top</option>
|
114
|
+
</select>
|
115
|
+
<select id="align">
|
116
|
+
<option value="center" selected>center</option>
|
117
|
+
<option value="start">start</option>
|
118
|
+
<option value="end">end</option>
|
119
|
+
</select>
|
120
|
+
</div>
|
121
|
+
<div style="text-align: center;">
|
122
|
+
<d2l-button id="tooltip-position">Tooltip Position</d2l-button>
|
123
|
+
<d2l-tooltip for="tooltip-position">
|
124
|
+
This tooltip will be positioned according to the above selections for location and alignment.
|
125
|
+
</d2l-tooltip>
|
126
|
+
</div>
|
127
|
+
<script data-demo-hide>
|
128
|
+
const demo = document.currentScript.parentNode;
|
129
|
+
demo.querySelector('#position').addEventListener('change', e => {
|
130
|
+
demo.querySelector('d2l-tooltip').position = e.target.value;
|
131
|
+
});
|
132
|
+
demo.querySelector('#align').addEventListener('change', e => {
|
133
|
+
demo.querySelector('d2l-tooltip').align = (e.target.value !== 'center' ? e.target.value : undefined);
|
134
|
+
});
|
135
|
+
</script>
|
136
|
+
</template>
|
137
|
+
</d2l-demo-snippet>
|
138
|
+
|
100
139
|
<h2>Tooltip (boundary)</h2>
|
101
140
|
<d2l-demo-snippet>
|
102
141
|
<template>
|
@@ -146,7 +185,7 @@
|
|
146
185
|
<div class="bounded">
|
147
186
|
<d2l-button id="tooltip-bounded">Bounded Tooltip</d2l-button>
|
148
187
|
<d2l-tooltip for="tooltip-bounded">
|
149
|
-
A
|
188
|
+
A tooltip message inside of a container that hides overflow.
|
150
189
|
</d2l-tooltip>
|
151
190
|
</div>
|
152
191
|
</template>
|