@vonage/vivid 3.24.0 → 3.26.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/accordion/index.js +0 -1
- package/accordion-item/index.js +0 -1
- package/alert/index.js +0 -1
- package/avatar/index.js +0 -1
- package/badge/index.js +0 -1
- package/banner/index.js +0 -1
- package/breadcrumb-item/index.js +0 -1
- package/button/index.js +0 -1
- package/card/index.js +0 -1
- package/checkbox/index.js +0 -1
- package/combobox/index.js +0 -1
- package/custom-elements.json +82 -10
- package/data-grid/index.js +7 -2
- package/dialog/index.js +0 -1
- package/empty-state/index.js +0 -1
- package/fab/index.js +0 -1
- package/icon/index.js +0 -1
- package/index.js +27 -29
- package/lib/action-group/action-group.d.ts +1 -1
- package/lib/avatar/avatar.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +0 -1
- package/lib/components.d.ts +0 -2
- package/lib/data-grid/data-grid-cell.d.ts +14 -1
- package/lib/data-grid/data-grid.d.ts +4 -0
- package/lib/data-grid/data-grid.options.d.ts +7 -0
- package/lib/dialog/dialog.d.ts +1 -0
- package/lib/listbox/listbox.d.ts +1 -1
- package/lib/menu/menu.d.ts +0 -1
- package/lib/menu-item/menu-item.d.ts +6 -0
- package/lib/menu-item/menu-item.template.d.ts +2 -3
- package/lib/number-field/number-field.d.ts +1 -1
- package/lib/select/select.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/listbox/index.js +56 -11
- package/menu/index.js +2 -3
- package/menu-item/index.js +2 -2
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +1 -2
- package/nav-item/index.js +1 -2
- package/note/index.js +1 -2
- package/number-field/index.js +1 -2
- package/option/index.js +0 -1
- package/package.json +1 -1
- package/pagination/index.js +1 -2
- package/popup/index.js +0 -1
- package/progress/index.js +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.js +1 -1
- package/select/index.js +1 -2
- package/shared/definition.js +1 -1
- package/shared/definition10.js +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition12.js +1 -1
- package/shared/definition14.js +1 -1
- package/shared/definition15.js +1 -1
- package/shared/definition16.js +2 -2
- package/shared/definition17.js +1 -1
- package/shared/definition18.js +1 -1
- package/shared/definition19.js +1 -1
- package/shared/definition2.js +1 -1
- package/shared/definition21.js +1 -1
- package/shared/definition22.js +76 -21
- package/shared/definition23.js +5 -4
- package/shared/definition24.js +1 -1
- package/shared/definition25.js +1 -1
- package/shared/definition26.js +1 -1
- package/shared/definition27.js +1 -1
- package/shared/definition29.js +368 -48
- package/shared/definition30.js +301 -298
- package/shared/definition31.js +14 -366
- package/shared/definition32.js +70 -13
- package/shared/definition33.js +25 -64
- package/shared/definition34.js +39 -27
- package/shared/definition35.js +431 -31
- package/shared/definition36.js +214 -430
- package/shared/definition37.js +70 -209
- package/shared/definition38.js +33 -81
- package/shared/definition39.js +423 -32
- package/shared/definition4.js +1 -1
- package/shared/definition40.js +586 -358
- package/shared/definition41.js +73 -648
- package/shared/definition42.js +584 -70
- package/shared/definition43.js +81 -538
- package/shared/definition44.js +52 -127
- package/shared/definition45.js +16 -56
- package/shared/definition46.js +485 -17
- package/shared/definition47.js +99 -477
- package/shared/definition48.js +19 -114
- package/shared/definition49.js +276 -19
- package/shared/definition5.js +1 -1
- package/shared/definition50.js +89 -245
- package/shared/definition51.js +629 -109
- package/shared/definition52.js +86 -601
- package/shared/definition53.js +68 -112
- package/shared/definition54.js +294 -69
- package/shared/definition6.js +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.js +2 -2
- package/shared/definition9.js +1 -1
- package/shared/es.object.assign.js +1 -1
- package/shared/es.regexp.to-string.js +1 -1
- package/shared/es.string.includes.js +1 -1
- package/shared/form-elements.js +1 -1
- package/shared/icon.js +17 -13
- package/shared/index.js +1 -1
- package/shared/patterns/form-elements/form-elements.d.ts +4 -4
- package/shared/string-trim.js +1 -1
- package/shared/text-field.js +1 -1
- package/shared/to-string.js +1 -1
- package/side-drawer/index.js +1 -1
- package/slider/index.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/switch/index.js +1 -2
- package/tab/index.js +1 -2
- package/tab-panel/index.js +1 -1
- package/tabs/index.js +3 -4
- package/tag/index.js +1 -2
- package/tag-group/index.js +1 -1
- package/text-anchor/index.js +0 -1
- package/text-area/index.js +1 -2
- package/text-field/index.js +3 -2
- package/toggletip/index.js +1 -2
- package/tooltip/index.js +1 -2
- package/tree-item/index.js +1 -2
- package/tree-view/index.js +1 -1
- package/vivid.api.json +19 -210
- package/shared/definition55.js +0 -305
- package/shared/engine-is-node.js +0 -8
package/shared/definition52.js
CHANGED
|
@@ -1,639 +1,124 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as FoundationElement, W as __classPrivateFieldSet, V as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
2
|
import { P as Popup, p as popupRegistries } from './definition20.js';
|
|
3
|
-
import { r as regexpFlags$1 } from './es.regexp.to-string.js';
|
|
4
|
-
import { t as toString$3 } from './to-string.js';
|
|
5
|
-
import { f as functionUncurryThisClause, a as functionApply } from './icon.js';
|
|
6
|
-
import { w as when } from './when.js';
|
|
7
3
|
import { c as classNames } from './class-names.js';
|
|
8
4
|
|
|
9
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
5
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 25 Jul 2023 07:38:24 GMT\n */\n.control {\n pointer-events: none;\n}\n\n.tooltip {\n width: var(--tooltip-inline-size, auto);\n}\n.tooltip-text {\n padding: 8px 12px;\n color: var(--vvd-color-canvas-text);\n font: var(--vvd-typography-base-bold);\n}";
|
|
10
6
|
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
15
|
-
var $RegExp$2 = global$2.RegExp;
|
|
16
|
-
|
|
17
|
-
var UNSUPPORTED_Y$1 = fails$4(function () {
|
|
18
|
-
var re = $RegExp$2('a', 'y');
|
|
19
|
-
re.lastIndex = 2;
|
|
20
|
-
return re.exec('abcd') != null;
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
// UC Browser bug
|
|
24
|
-
// https://github.com/zloirock/core-js/issues/1008
|
|
25
|
-
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
|
|
26
|
-
return !$RegExp$2('a', 'y').sticky;
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
|
|
30
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
31
|
-
var re = $RegExp$2('^r', 'gy');
|
|
32
|
-
re.lastIndex = 2;
|
|
33
|
-
return re.exec('str') != null;
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
var regexpStickyHelpers = {
|
|
37
|
-
BROKEN_CARET: BROKEN_CARET,
|
|
38
|
-
MISSED_STICKY: MISSED_STICKY,
|
|
39
|
-
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
var fails$3 = fails$5;
|
|
43
|
-
var global$1 = global$3;
|
|
44
|
-
|
|
45
|
-
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
46
|
-
var $RegExp$1 = global$1.RegExp;
|
|
47
|
-
|
|
48
|
-
var regexpUnsupportedDotAll = fails$3(function () {
|
|
49
|
-
var re = $RegExp$1('.', 's');
|
|
50
|
-
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
var fails$2 = fails$5;
|
|
54
|
-
var global = global$3;
|
|
55
|
-
|
|
56
|
-
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
57
|
-
var $RegExp = global.RegExp;
|
|
58
|
-
|
|
59
|
-
var regexpUnsupportedNcg = fails$2(function () {
|
|
60
|
-
var re = $RegExp('(?<a>b)', 'g');
|
|
61
|
-
return re.exec('b').groups.a !== 'b' ||
|
|
62
|
-
'b'.replace(re, '$<a>c') !== 'bc';
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
66
|
-
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
67
|
-
var call$2 = functionCall;
|
|
68
|
-
var uncurryThis$4 = functionUncurryThis;
|
|
69
|
-
var toString$2 = toString$3;
|
|
70
|
-
var regexpFlags = regexpFlags$1;
|
|
71
|
-
var stickyHelpers = regexpStickyHelpers;
|
|
72
|
-
var shared = shared$1.exports;
|
|
73
|
-
var create = objectCreate;
|
|
74
|
-
var getInternalState = internalState.get;
|
|
75
|
-
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
76
|
-
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
77
|
-
|
|
78
|
-
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
79
|
-
var nativeExec = RegExp.prototype.exec;
|
|
80
|
-
var patchedExec = nativeExec;
|
|
81
|
-
var charAt$3 = uncurryThis$4(''.charAt);
|
|
82
|
-
var indexOf = uncurryThis$4(''.indexOf);
|
|
83
|
-
var replace$1 = uncurryThis$4(''.replace);
|
|
84
|
-
var stringSlice$3 = uncurryThis$4(''.slice);
|
|
85
|
-
|
|
86
|
-
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
87
|
-
var re1 = /a/;
|
|
88
|
-
var re2 = /b*/g;
|
|
89
|
-
call$2(nativeExec, re1, 'a');
|
|
90
|
-
call$2(nativeExec, re2, 'a');
|
|
91
|
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
92
|
-
})();
|
|
93
|
-
|
|
94
|
-
var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
|
|
95
|
-
|
|
96
|
-
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
97
|
-
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
98
|
-
|
|
99
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
100
|
-
|
|
101
|
-
if (PATCH) {
|
|
102
|
-
patchedExec = function exec(string) {
|
|
103
|
-
var re = this;
|
|
104
|
-
var state = getInternalState(re);
|
|
105
|
-
var str = toString$2(string);
|
|
106
|
-
var raw = state.raw;
|
|
107
|
-
var result, reCopy, lastIndex, match, i, object, group;
|
|
108
|
-
|
|
109
|
-
if (raw) {
|
|
110
|
-
raw.lastIndex = re.lastIndex;
|
|
111
|
-
result = call$2(patchedExec, raw, str);
|
|
112
|
-
re.lastIndex = raw.lastIndex;
|
|
113
|
-
return result;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
var groups = state.groups;
|
|
117
|
-
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
118
|
-
var flags = call$2(regexpFlags, re);
|
|
119
|
-
var source = re.source;
|
|
120
|
-
var charsAdded = 0;
|
|
121
|
-
var strCopy = str;
|
|
122
|
-
|
|
123
|
-
if (sticky) {
|
|
124
|
-
flags = replace$1(flags, 'y', '');
|
|
125
|
-
if (indexOf(flags, 'g') === -1) {
|
|
126
|
-
flags += 'g';
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
strCopy = stringSlice$3(str, re.lastIndex);
|
|
130
|
-
// Support anchored sticky behavior.
|
|
131
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
|
|
132
|
-
source = '(?: ' + source + ')';
|
|
133
|
-
strCopy = ' ' + strCopy;
|
|
134
|
-
charsAdded++;
|
|
135
|
-
}
|
|
136
|
-
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
|
137
|
-
// simulate the 'y' flag.
|
|
138
|
-
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (NPCG_INCLUDED) {
|
|
142
|
-
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
|
143
|
-
}
|
|
144
|
-
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
145
|
-
|
|
146
|
-
match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
|
|
147
|
-
|
|
148
|
-
if (sticky) {
|
|
149
|
-
if (match) {
|
|
150
|
-
match.input = stringSlice$3(match.input, charsAdded);
|
|
151
|
-
match[0] = stringSlice$3(match[0], charsAdded);
|
|
152
|
-
match.index = re.lastIndex;
|
|
153
|
-
re.lastIndex += match[0].length;
|
|
154
|
-
} else re.lastIndex = 0;
|
|
155
|
-
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
156
|
-
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
157
|
-
}
|
|
158
|
-
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
159
|
-
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
160
|
-
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
161
|
-
call$2(nativeReplace, match[0], reCopy, function () {
|
|
162
|
-
for (i = 1; i < arguments.length - 2; i++) {
|
|
163
|
-
if (arguments[i] === undefined) match[i] = undefined;
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
if (match && groups) {
|
|
169
|
-
match.groups = object = create(null);
|
|
170
|
-
for (i = 0; i < groups.length; i++) {
|
|
171
|
-
group = groups[i];
|
|
172
|
-
object[group[0]] = match[group[1]];
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return match;
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
var regexpExec$2 = patchedExec;
|
|
181
|
-
|
|
182
|
-
var $ = _export;
|
|
183
|
-
var exec = regexpExec$2;
|
|
184
|
-
|
|
185
|
-
// `RegExp.prototype.exec` method
|
|
186
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
187
|
-
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
|
188
|
-
exec: exec
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
192
|
-
|
|
193
|
-
var uncurryThis$3 = functionUncurryThisClause;
|
|
194
|
-
var defineBuiltIn = defineBuiltIn$1;
|
|
195
|
-
var regexpExec$1 = regexpExec$2;
|
|
196
|
-
var fails$1 = fails$5;
|
|
197
|
-
var wellKnownSymbol$1 = wellKnownSymbol$2;
|
|
198
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$1;
|
|
199
|
-
|
|
200
|
-
var SPECIES = wellKnownSymbol$1('species');
|
|
201
|
-
var RegExpPrototype = RegExp.prototype;
|
|
202
|
-
|
|
203
|
-
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
204
|
-
var SYMBOL = wellKnownSymbol$1(KEY);
|
|
205
|
-
|
|
206
|
-
var DELEGATES_TO_SYMBOL = !fails$1(function () {
|
|
207
|
-
// String methods call symbol-named RegEp methods
|
|
208
|
-
var O = {};
|
|
209
|
-
O[SYMBOL] = function () { return 7; };
|
|
210
|
-
return ''[KEY](O) != 7;
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
|
|
214
|
-
// Symbol-named RegExp methods call .exec
|
|
215
|
-
var execCalled = false;
|
|
216
|
-
var re = /a/;
|
|
217
|
-
|
|
218
|
-
if (KEY === 'split') {
|
|
219
|
-
// We can't use real regex here since it causes deoptimization
|
|
220
|
-
// and serious performance degradation in V8
|
|
221
|
-
// https://github.com/zloirock/core-js/issues/306
|
|
222
|
-
re = {};
|
|
223
|
-
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
224
|
-
// a new one. We need to return the patched regex when creating the new one.
|
|
225
|
-
re.constructor = {};
|
|
226
|
-
re.constructor[SPECIES] = function () { return re; };
|
|
227
|
-
re.flags = '';
|
|
228
|
-
re[SYMBOL] = /./[SYMBOL];
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
re.exec = function () { execCalled = true; return null; };
|
|
232
|
-
|
|
233
|
-
re[SYMBOL]('');
|
|
234
|
-
return !execCalled;
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
if (
|
|
238
|
-
!DELEGATES_TO_SYMBOL ||
|
|
239
|
-
!DELEGATES_TO_EXEC ||
|
|
240
|
-
FORCED
|
|
241
|
-
) {
|
|
242
|
-
var uncurriedNativeRegExpMethod = uncurryThis$3(/./[SYMBOL]);
|
|
243
|
-
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
244
|
-
var uncurriedNativeMethod = uncurryThis$3(nativeMethod);
|
|
245
|
-
var $exec = regexp.exec;
|
|
246
|
-
if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
|
|
247
|
-
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
248
|
-
// The native String method already delegates to @@method (this
|
|
249
|
-
// polyfilled function), leasing to infinite recursion.
|
|
250
|
-
// We avoid it by directly calling the native @@method method.
|
|
251
|
-
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
|
|
252
|
-
}
|
|
253
|
-
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
|
|
254
|
-
}
|
|
255
|
-
return { done: false };
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
defineBuiltIn(String.prototype, KEY, methods[0]);
|
|
259
|
-
defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
var uncurryThis$2 = functionUncurryThis;
|
|
266
|
-
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
267
|
-
var toString$1 = toString$3;
|
|
268
|
-
var requireObjectCoercible$1 = requireObjectCoercible$2;
|
|
269
|
-
|
|
270
|
-
var charAt$2 = uncurryThis$2(''.charAt);
|
|
271
|
-
var charCodeAt = uncurryThis$2(''.charCodeAt);
|
|
272
|
-
var stringSlice$2 = uncurryThis$2(''.slice);
|
|
273
|
-
|
|
274
|
-
var createMethod = function (CONVERT_TO_STRING) {
|
|
275
|
-
return function ($this, pos) {
|
|
276
|
-
var S = toString$1(requireObjectCoercible$1($this));
|
|
277
|
-
var position = toIntegerOrInfinity$1(pos);
|
|
278
|
-
var size = S.length;
|
|
279
|
-
var first, second;
|
|
280
|
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
281
|
-
first = charCodeAt(S, position);
|
|
282
|
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
283
|
-
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
|
284
|
-
? CONVERT_TO_STRING
|
|
285
|
-
? charAt$2(S, position)
|
|
286
|
-
: first
|
|
287
|
-
: CONVERT_TO_STRING
|
|
288
|
-
? stringSlice$2(S, position, position + 2)
|
|
289
|
-
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
var stringMultibyte = {
|
|
294
|
-
// `String.prototype.codePointAt` method
|
|
295
|
-
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
296
|
-
codeAt: createMethod(false),
|
|
297
|
-
// `String.prototype.at` method
|
|
298
|
-
// https://github.com/mathiasbynens/String.prototype.at
|
|
299
|
-
charAt: createMethod(true)
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
var charAt$1 = stringMultibyte.charAt;
|
|
303
|
-
|
|
304
|
-
// `AdvanceStringIndex` abstract operation
|
|
305
|
-
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
306
|
-
var advanceStringIndex$1 = function (S, index, unicode) {
|
|
307
|
-
return index + (unicode ? charAt$1(S, index).length : 1);
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
var uncurryThis$1 = functionUncurryThis;
|
|
311
|
-
var toObject = toObject$1;
|
|
312
|
-
|
|
313
|
-
var floor = Math.floor;
|
|
314
|
-
var charAt = uncurryThis$1(''.charAt);
|
|
315
|
-
var replace = uncurryThis$1(''.replace);
|
|
316
|
-
var stringSlice$1 = uncurryThis$1(''.slice);
|
|
317
|
-
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
318
|
-
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
319
|
-
|
|
320
|
-
// `GetSubstitution` abstract operation
|
|
321
|
-
// https://tc39.es/ecma262/#sec-getsubstitution
|
|
322
|
-
var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
|
|
323
|
-
var tailPos = position + matched.length;
|
|
324
|
-
var m = captures.length;
|
|
325
|
-
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
326
|
-
if (namedCaptures !== undefined) {
|
|
327
|
-
namedCaptures = toObject(namedCaptures);
|
|
328
|
-
symbols = SUBSTITUTION_SYMBOLS;
|
|
329
|
-
}
|
|
330
|
-
return replace(replacement, symbols, function (match, ch) {
|
|
331
|
-
var capture;
|
|
332
|
-
switch (charAt(ch, 0)) {
|
|
333
|
-
case '$': return '$';
|
|
334
|
-
case '&': return matched;
|
|
335
|
-
case '`': return stringSlice$1(str, 0, position);
|
|
336
|
-
case "'": return stringSlice$1(str, tailPos);
|
|
337
|
-
case '<':
|
|
338
|
-
capture = namedCaptures[stringSlice$1(ch, 1, -1)];
|
|
339
|
-
break;
|
|
340
|
-
default: // \d\d?
|
|
341
|
-
var n = +ch;
|
|
342
|
-
if (n === 0) return match;
|
|
343
|
-
if (n > m) {
|
|
344
|
-
var f = floor(n / 10);
|
|
345
|
-
if (f === 0) return match;
|
|
346
|
-
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
|
347
|
-
return match;
|
|
348
|
-
}
|
|
349
|
-
capture = captures[n - 1];
|
|
350
|
-
}
|
|
351
|
-
return capture === undefined ? '' : capture;
|
|
352
|
-
});
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
var call$1 = functionCall;
|
|
356
|
-
var anObject$1 = anObject$2;
|
|
357
|
-
var isCallable$1 = isCallable$2;
|
|
358
|
-
var classof = classofRaw;
|
|
359
|
-
var regexpExec = regexpExec$2;
|
|
360
|
-
|
|
361
|
-
var $TypeError = TypeError;
|
|
362
|
-
|
|
363
|
-
// `RegExpExec` abstract operation
|
|
364
|
-
// https://tc39.es/ecma262/#sec-regexpexec
|
|
365
|
-
var regexpExecAbstract = function (R, S) {
|
|
366
|
-
var exec = R.exec;
|
|
367
|
-
if (isCallable$1(exec)) {
|
|
368
|
-
var result = call$1(exec, R, S);
|
|
369
|
-
if (result !== null) anObject$1(result);
|
|
370
|
-
return result;
|
|
371
|
-
}
|
|
372
|
-
if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
|
|
373
|
-
throw $TypeError('RegExp#exec called on incompatible receiver');
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
var apply = functionApply;
|
|
377
|
-
var call = functionCall;
|
|
378
|
-
var uncurryThis = functionUncurryThis;
|
|
379
|
-
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
380
|
-
var fails = fails$5;
|
|
381
|
-
var anObject = anObject$2;
|
|
382
|
-
var isCallable = isCallable$2;
|
|
383
|
-
var isNullOrUndefined = isNullOrUndefined$1;
|
|
384
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
385
|
-
var toLength = toLength$1;
|
|
386
|
-
var toString = toString$3;
|
|
387
|
-
var requireObjectCoercible = requireObjectCoercible$2;
|
|
388
|
-
var advanceStringIndex = advanceStringIndex$1;
|
|
389
|
-
var getMethod = getMethod$1;
|
|
390
|
-
var getSubstitution = getSubstitution$1;
|
|
391
|
-
var regExpExec = regexpExecAbstract;
|
|
392
|
-
var wellKnownSymbol = wellKnownSymbol$2;
|
|
393
|
-
|
|
394
|
-
var REPLACE = wellKnownSymbol('replace');
|
|
395
|
-
var max = Math.max;
|
|
396
|
-
var min = Math.min;
|
|
397
|
-
var concat = uncurryThis([].concat);
|
|
398
|
-
var push = uncurryThis([].push);
|
|
399
|
-
var stringIndexOf = uncurryThis(''.indexOf);
|
|
400
|
-
var stringSlice = uncurryThis(''.slice);
|
|
401
|
-
|
|
402
|
-
var maybeToString = function (it) {
|
|
403
|
-
return it === undefined ? it : String(it);
|
|
404
|
-
};
|
|
405
|
-
|
|
406
|
-
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
|
407
|
-
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
408
|
-
var REPLACE_KEEPS_$0 = (function () {
|
|
409
|
-
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
|
410
|
-
return 'a'.replace(/./, '$0') === '$0';
|
|
411
|
-
})();
|
|
412
|
-
|
|
413
|
-
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
414
|
-
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
415
|
-
if (/./[REPLACE]) {
|
|
416
|
-
return /./[REPLACE]('a', '$0') === '';
|
|
417
|
-
}
|
|
418
|
-
return false;
|
|
419
|
-
})();
|
|
420
|
-
|
|
421
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
422
|
-
var re = /./;
|
|
423
|
-
re.exec = function () {
|
|
424
|
-
var result = [];
|
|
425
|
-
result.groups = { a: '7' };
|
|
426
|
-
return result;
|
|
427
|
-
};
|
|
428
|
-
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
|
429
|
-
return ''.replace(re, '$<a>') !== '7';
|
|
430
|
-
});
|
|
431
|
-
|
|
432
|
-
// @@replace logic
|
|
433
|
-
fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
|
|
434
|
-
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
|
435
|
-
|
|
436
|
-
return [
|
|
437
|
-
// `String.prototype.replace` method
|
|
438
|
-
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
439
|
-
function replace(searchValue, replaceValue) {
|
|
440
|
-
var O = requireObjectCoercible(this);
|
|
441
|
-
var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
|
|
442
|
-
return replacer
|
|
443
|
-
? call(replacer, searchValue, O, replaceValue)
|
|
444
|
-
: call(nativeReplace, toString(O), searchValue, replaceValue);
|
|
445
|
-
},
|
|
446
|
-
// `RegExp.prototype[@@replace]` method
|
|
447
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
448
|
-
function (string, replaceValue) {
|
|
449
|
-
var rx = anObject(this);
|
|
450
|
-
var S = toString(string);
|
|
451
|
-
|
|
452
|
-
if (
|
|
453
|
-
typeof replaceValue == 'string' &&
|
|
454
|
-
stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
|
455
|
-
stringIndexOf(replaceValue, '$<') === -1
|
|
456
|
-
) {
|
|
457
|
-
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
|
458
|
-
if (res.done) return res.value;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
var functionalReplace = isCallable(replaceValue);
|
|
462
|
-
if (!functionalReplace) replaceValue = toString(replaceValue);
|
|
463
|
-
|
|
464
|
-
var global = rx.global;
|
|
465
|
-
if (global) {
|
|
466
|
-
var fullUnicode = rx.unicode;
|
|
467
|
-
rx.lastIndex = 0;
|
|
468
|
-
}
|
|
469
|
-
var results = [];
|
|
470
|
-
while (true) {
|
|
471
|
-
var result = regExpExec(rx, S);
|
|
472
|
-
if (result === null) break;
|
|
473
|
-
|
|
474
|
-
push(results, result);
|
|
475
|
-
if (!global) break;
|
|
476
|
-
|
|
477
|
-
var matchStr = toString(result[0]);
|
|
478
|
-
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
var accumulatedResult = '';
|
|
482
|
-
var nextSourcePosition = 0;
|
|
483
|
-
for (var i = 0; i < results.length; i++) {
|
|
484
|
-
result = results[i];
|
|
485
|
-
|
|
486
|
-
var matched = toString(result[0]);
|
|
487
|
-
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
488
|
-
var captures = [];
|
|
489
|
-
// NOTE: This is equivalent to
|
|
490
|
-
// captures = result.slice(1).map(maybeToString)
|
|
491
|
-
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
492
|
-
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
493
|
-
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
494
|
-
for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
|
|
495
|
-
var namedCaptures = result.groups;
|
|
496
|
-
if (functionalReplace) {
|
|
497
|
-
var replacerArgs = concat([matched], captures, position, S);
|
|
498
|
-
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
499
|
-
var replacement = toString(apply(replaceValue, undefined, replacerArgs));
|
|
500
|
-
} else {
|
|
501
|
-
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
502
|
-
}
|
|
503
|
-
if (position >= nextSourcePosition) {
|
|
504
|
-
accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
|
|
505
|
-
nextSourcePosition = position + matched.length;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
return accumulatedResult + stringSlice(S, nextSourcePosition);
|
|
509
|
-
}
|
|
510
|
-
];
|
|
511
|
-
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
512
|
-
|
|
513
|
-
var _Toggletip_instances, _Toggletip_observer, _Toggletip_anchorEl, _Toggletip_observeMissingAnchor, _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX, _Toggletip_setupAnchor, _Toggletip_cleanupAnchor, _Toggletip_openIfClosed, _Toggletip_closeOnClickOutside, _Toggletip_closeOnEscape;
|
|
514
|
-
class Toggletip extends FoundationElement {
|
|
7
|
+
var _Tooltip_instances, _Tooltip_anchorEl, _Tooltip_observer, _Tooltip_observeMissingAnchor, _Tooltip_anchorUpdated, _Tooltip_addEventListener, _Tooltip_removeEventListener, _Tooltip_show, _Tooltip_hide, _Tooltip_closeOnEscape;
|
|
8
|
+
class Tooltip extends FoundationElement {
|
|
515
9
|
constructor() {
|
|
516
10
|
super(...arguments);
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
11
|
+
_Tooltip_instances.add(this);
|
|
12
|
+
_Tooltip_anchorEl.set(this, null);
|
|
13
|
+
this.open = false;
|
|
14
|
+
_Tooltip_observer.set(this, void 0);
|
|
15
|
+
_Tooltip_observeMissingAnchor.set(this, anchorId => {
|
|
16
|
+
__classPrivateFieldSet(this, _Tooltip_observer, new MutationObserver(() => {
|
|
522
17
|
const anchor = document.getElementById(anchorId);
|
|
523
18
|
if (anchor) {
|
|
524
|
-
__classPrivateFieldSet(this,
|
|
525
|
-
__classPrivateFieldGet(this,
|
|
526
|
-
__classPrivateFieldGet(this,
|
|
527
|
-
__classPrivateFieldSet(this,
|
|
19
|
+
__classPrivateFieldSet(this, _Tooltip_anchorEl, anchor, "f");
|
|
20
|
+
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_anchorUpdated).call(this);
|
|
21
|
+
__classPrivateFieldGet(this, _Tooltip_observer, "f").disconnect();
|
|
22
|
+
__classPrivateFieldSet(this, _Tooltip_observer, undefined, "f");
|
|
528
23
|
}
|
|
529
24
|
}), "f");
|
|
530
|
-
__classPrivateFieldGet(this,
|
|
25
|
+
__classPrivateFieldGet(this, _Tooltip_observer, "f").observe(document.body, {
|
|
531
26
|
childList: true,
|
|
532
27
|
subtree: true
|
|
533
28
|
});
|
|
534
29
|
});
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
this.placement = 'right';
|
|
538
|
-
this.anchor = '';
|
|
539
|
-
this.open = false;
|
|
540
|
-
_Toggletip_openIfClosed.set(this, () => {
|
|
541
|
-
if (!this.open) DOM.queueUpdate(() => this.open = true);
|
|
30
|
+
_Tooltip_show.set(this, () => {
|
|
31
|
+
this.open = true;
|
|
542
32
|
});
|
|
543
|
-
|
|
544
|
-
|
|
33
|
+
_Tooltip_hide.set(this, () => {
|
|
34
|
+
this.open = false;
|
|
545
35
|
});
|
|
546
|
-
|
|
547
|
-
if (e.key === 'Escape') this
|
|
36
|
+
_Tooltip_closeOnEscape.set(this, e => {
|
|
37
|
+
if (e.key === 'Escape') __classPrivateFieldGet(this, _Tooltip_hide, "f").call(this);
|
|
548
38
|
});
|
|
549
39
|
}
|
|
550
40
|
anchorChanged(_, newValue) {
|
|
551
41
|
var _a;
|
|
552
|
-
if (__classPrivateFieldGet(this,
|
|
553
|
-
(_a = __classPrivateFieldGet(this,
|
|
554
|
-
__classPrivateFieldSet(this,
|
|
555
|
-
if (__classPrivateFieldGet(this,
|
|
556
|
-
__classPrivateFieldGet(this,
|
|
42
|
+
if (__classPrivateFieldGet(this, _Tooltip_anchorEl, "f")) __classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_removeEventListener).call(this);
|
|
43
|
+
(_a = __classPrivateFieldGet(this, _Tooltip_observer, "f")) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
44
|
+
__classPrivateFieldSet(this, _Tooltip_anchorEl, newValue instanceof HTMLElement ? newValue : document.getElementById(newValue), "f");
|
|
45
|
+
if (__classPrivateFieldGet(this, _Tooltip_anchorEl, "f")) {
|
|
46
|
+
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_anchorUpdated).call(this);
|
|
557
47
|
} else {
|
|
558
|
-
__classPrivateFieldGet(this,
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
openChanged(oldValue, newValue) {
|
|
562
|
-
if (oldValue === undefined) return;
|
|
563
|
-
if (newValue) {
|
|
564
|
-
document.addEventListener('click', __classPrivateFieldGet(this, _Toggletip_closeOnClickOutside, "f"));
|
|
565
|
-
document.addEventListener('keydown', __classPrivateFieldGet(this, _Toggletip_closeOnEscape, "f"));
|
|
566
|
-
this.setAttribute('role', 'status');
|
|
567
|
-
} else {
|
|
568
|
-
document.removeEventListener('click', __classPrivateFieldGet(this, _Toggletip_closeOnClickOutside, "f"));
|
|
569
|
-
document.removeEventListener('keydown', __classPrivateFieldGet(this, _Toggletip_closeOnEscape, "f"));
|
|
570
|
-
this.removeAttribute('role');
|
|
571
|
-
}
|
|
572
|
-
if (__classPrivateFieldGet(this, _Toggletip_anchorEl, "f")) {
|
|
573
|
-
__classPrivateFieldGet(this, _Toggletip_anchorEl, "f").ariaExpanded = this.open.toString();
|
|
48
|
+
__classPrivateFieldGet(this, _Tooltip_observeMissingAnchor, "f").call(this, newValue);
|
|
574
49
|
}
|
|
575
50
|
}
|
|
576
51
|
disconnectedCallback() {
|
|
577
52
|
var _a;
|
|
578
53
|
super.disconnectedCallback();
|
|
579
|
-
|
|
580
|
-
(_a = __classPrivateFieldGet(this,
|
|
581
|
-
document.removeEventListener('keydown', __classPrivateFieldGet(this,
|
|
54
|
+
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_removeEventListener).call(this);
|
|
55
|
+
(_a = __classPrivateFieldGet(this, _Tooltip_observer, "f")) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
56
|
+
document.removeEventListener('keydown', __classPrivateFieldGet(this, _Tooltip_closeOnEscape, "f"));
|
|
57
|
+
}
|
|
58
|
+
openChanged(_, newValue) {
|
|
59
|
+
if (_ === undefined) return;
|
|
60
|
+
if (newValue) {
|
|
61
|
+
document.addEventListener('keydown', __classPrivateFieldGet(this, _Tooltip_closeOnEscape, "f"));
|
|
62
|
+
} else {
|
|
63
|
+
document.removeEventListener('keydown', __classPrivateFieldGet(this, _Tooltip_closeOnEscape, "f"));
|
|
64
|
+
}
|
|
582
65
|
}
|
|
583
66
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
67
|
+
_Tooltip_anchorEl = new WeakMap(), _Tooltip_observer = new WeakMap(), _Tooltip_observeMissingAnchor = new WeakMap(), _Tooltip_show = new WeakMap(), _Tooltip_hide = new WeakMap(), _Tooltip_closeOnEscape = new WeakMap(), _Tooltip_instances = new WeakSet(), _Tooltip_anchorUpdated = function _Tooltip_anchorUpdated() {
|
|
68
|
+
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_removeEventListener).call(this);
|
|
69
|
+
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_addEventListener).call(this);
|
|
70
|
+
}, _Tooltip_addEventListener = function _Tooltip_addEventListener() {
|
|
71
|
+
if (__classPrivateFieldGet(this, _Tooltip_anchorEl, "f")) {
|
|
72
|
+
__classPrivateFieldGet(this, _Tooltip_anchorEl, "f").addEventListener('mouseover', __classPrivateFieldGet(this, _Tooltip_show, "f"));
|
|
73
|
+
__classPrivateFieldGet(this, _Tooltip_anchorEl, "f").addEventListener('mouseout', __classPrivateFieldGet(this, _Tooltip_hide, "f"));
|
|
74
|
+
__classPrivateFieldGet(this, _Tooltip_anchorEl, "f").addEventListener('focusin', __classPrivateFieldGet(this, _Tooltip_show, "f"));
|
|
75
|
+
__classPrivateFieldGet(this, _Tooltip_anchorEl, "f").addEventListener('focusout', __classPrivateFieldGet(this, _Tooltip_hide, "f"));
|
|
76
|
+
}
|
|
77
|
+
}, _Tooltip_removeEventListener = function _Tooltip_removeEventListener() {
|
|
78
|
+
var _a, _b, _c, _d;
|
|
79
|
+
(_a = __classPrivateFieldGet(this, _Tooltip_anchorEl, "f")) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseover', __classPrivateFieldGet(this, _Tooltip_show, "f"));
|
|
80
|
+
(_b = __classPrivateFieldGet(this, _Tooltip_anchorEl, "f")) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseout', __classPrivateFieldGet(this, _Tooltip_hide, "f"));
|
|
81
|
+
(_c = __classPrivateFieldGet(this, _Tooltip_anchorEl, "f")) === null || _c === void 0 ? void 0 : _c.removeEventListener('focusin', __classPrivateFieldGet(this, _Tooltip_show, "f"));
|
|
82
|
+
(_d = __classPrivateFieldGet(this, _Tooltip_anchorEl, "f")) === null || _d === void 0 ? void 0 : _d.removeEventListener('focusout', __classPrivateFieldGet(this, _Tooltip_hide, "f"));
|
|
591
83
|
};
|
|
592
|
-
__decorate([attr, __metadata("design:type", String)],
|
|
593
|
-
__decorate([attr({
|
|
594
|
-
mode: 'boolean'
|
|
595
|
-
}), __metadata("design:type", Object)], Toggletip.prototype, "alternate", void 0);
|
|
596
|
-
__decorate([attr({
|
|
597
|
-
mode: 'fromView'
|
|
598
|
-
}), __metadata("design:type", String)], Toggletip.prototype, "placement", void 0);
|
|
84
|
+
__decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "text", void 0);
|
|
599
85
|
__decorate([attr({
|
|
600
86
|
mode: 'fromView'
|
|
601
|
-
}), __metadata("design:type",
|
|
87
|
+
}), __metadata("design:type", String)], Tooltip.prototype, "placement", void 0);
|
|
602
88
|
__decorate([attr({
|
|
603
89
|
mode: 'boolean'
|
|
604
|
-
}), __metadata("design:type", Object)],
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
`), popup, getClasses, x => x.anchor, x => x.open, x => !x.alternate, x => x.placement, when(x => x.headline, html(_t2 || (_t2 = _2`<header class="headline">${0}</header>`), x => x.headline)), popup);
|
|
90
|
+
}), __metadata("design:type", Object)], Tooltip.prototype, "open", void 0);
|
|
91
|
+
__decorate([attr({
|
|
92
|
+
mode: 'fromView'
|
|
93
|
+
}), __metadata("design:type", Object)], Tooltip.prototype, "anchor", void 0);
|
|
94
|
+
|
|
95
|
+
let _ = t => t,
|
|
96
|
+
_t;
|
|
97
|
+
const getClasses = ({
|
|
98
|
+
open
|
|
99
|
+
}) => classNames('control', ['open', Boolean(open)]);
|
|
100
|
+
const TooltipTemplate = context => {
|
|
101
|
+
const popupTag = context.tagFor(Popup);
|
|
102
|
+
return html(_t || (_t = _`
|
|
103
|
+
<${0} class="${0}" arrow alternate
|
|
104
|
+
:placement=${0}
|
|
105
|
+
:anchor="${0}"
|
|
106
|
+
:open=${0}
|
|
107
|
+
exportparts="vvd-theme-alternate">
|
|
108
|
+
<div class="tooltip" role="tooltip">
|
|
109
|
+
<header part="vvd-theme-alternate" class="tooltip-header">
|
|
110
|
+
<div class="tooltip-text">${0}</div>
|
|
111
|
+
</header>
|
|
112
|
+
</div>
|
|
113
|
+
</${0}>`), popupTag, getClasses, x => x.placement, x => x.anchor, x => x.open, x => x.text, popupTag);
|
|
629
114
|
};
|
|
630
115
|
|
|
631
|
-
const
|
|
632
|
-
baseName: '
|
|
633
|
-
template:
|
|
116
|
+
const tooltipDefinition = Tooltip.compose({
|
|
117
|
+
baseName: 'tooltip',
|
|
118
|
+
template: TooltipTemplate,
|
|
634
119
|
styles: css_248z
|
|
635
120
|
});
|
|
636
|
-
const
|
|
637
|
-
const
|
|
121
|
+
const tooltipRegistries = [tooltipDefinition(), ...popupRegistries];
|
|
122
|
+
const registerTooltip = registerFactory(tooltipRegistries);
|
|
638
123
|
|
|
639
|
-
export {
|
|
124
|
+
export { tooltipRegistries as a, registerTooltip as r, tooltipDefinition as t };
|