@vonage/vivid 5.7.0 → 5.9.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/bundled/data-grid.options.cjs +1 -0
- package/bundled/data-grid.options.js +29 -0
- package/bundled/definition19.cjs +3 -4
- package/bundled/definition19.js +35 -52
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +1 -1
- package/bundled/definition9.cjs +9 -9
- package/bundled/definition9.js +113 -1342
- package/bundled/feature.cjs +4 -0
- package/bundled/feature.js +2886 -0
- package/bundled/floating-ui.dom.cjs +1 -0
- package/bundled/floating-ui.dom.js +1242 -0
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +49 -22
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +15 -13
- package/bundled/vivid-element.cjs +3 -3
- package/bundled/vivid-element.js +89 -69
- package/checkbox/definition.cjs +1 -1
- package/checkbox/definition.js +1 -1
- package/combobox/definition.cjs +14 -15
- package/combobox/definition.js +15 -16
- package/combobox/index.cjs +4 -4
- package/combobox/index.js +82 -87
- package/contextual-help/definition.cjs +1 -0
- package/contextual-help/definition.js +1 -1
- package/custom-elements.json +5145 -3781
- package/data-grid/definition.cjs +23 -49
- package/data-grid/definition.js +1 -27
- package/data-grid/index.cjs +27 -27
- package/data-grid/index.js +44 -64
- package/data-table/definition.cjs +204 -0
- package/data-table/definition.js +188 -0
- package/data-table/index.cjs +37 -0
- package/data-table/index.js +143 -0
- package/file-picker/definition.cjs +10 -8
- package/file-picker/definition.js +10 -8
- package/file-picker/index.cjs +5 -5
- package/file-picker/index.js +12 -12
- package/icon/definition.cjs +1 -1
- package/icon/definition.js +1 -1
- package/index.cjs +26 -0
- package/index.js +4 -0
- package/lib/components.d.ts +4 -0
- package/lib/contextual-help/definition.d.ts +2 -0
- package/lib/data-table/definition.d.ts +8 -0
- package/lib/data-table/table-body.d.ts +3 -0
- package/lib/data-table/table-body.template.d.ts +3 -0
- package/lib/data-table/table-cell.d.ts +381 -0
- package/lib/data-table/table-cell.template.d.ts +3 -0
- package/lib/data-table/table-head.d.ts +3 -0
- package/lib/data-table/table-head.template.d.ts +3 -0
- package/lib/data-table/table-header-cell.d.ts +381 -0
- package/lib/data-table/table-header-cell.template.d.ts +3 -0
- package/lib/data-table/table-row.d.ts +381 -0
- package/lib/data-table/table-row.template.d.ts +3 -0
- package/lib/data-table/table.d.ts +3 -0
- package/lib/data-table/table.template.d.ts +3 -0
- package/lib/popover/definition.d.ts +4 -0
- package/lib/popover/locale.d.ts +3 -0
- package/lib/popover/popover.d.ts +781 -0
- package/lib/popover/popover.template.d.ts +3 -0
- package/lib/rich-text-editor/locale.d.ts +0 -1
- package/lib/rich-text-editor/rte/config.d.ts +3 -0
- package/lib/rich-text-editor/rte/document.d.ts +2 -0
- package/lib/rich-text-editor/rte/exports.d.ts +1 -0
- package/lib/rich-text-editor/rte/view.d.ts +30 -0
- package/lib/rich-text-view/definition.d.ts +4 -0
- package/lib/rich-text-view/rich-text-view.d.ts +15 -0
- package/lib/rich-text-view/rich-text-view.template.d.ts +3 -0
- package/lib/tag-name-map.d.ts +10 -1
- package/locales/de-DE.cjs +3 -1
- package/locales/de-DE.js +3 -1
- package/locales/en-GB.cjs +3 -1
- package/locales/en-GB.js +3 -1
- package/locales/en-US.cjs +3 -1
- package/locales/en-US.js +3 -1
- package/locales/ja-JP.cjs +3 -1
- package/locales/ja-JP.js +3 -1
- package/locales/zh-CN.cjs +3 -1
- package/locales/zh-CN.js +3 -1
- package/package.json +8 -12
- package/popover/definition.cjs +363 -0
- package/popover/definition.js +357 -0
- package/popover/index.cjs +27 -0
- package/popover/index.js +263 -0
- package/rich-text-editor/definition.cjs +328 -3882
- package/rich-text-editor/definition.js +143 -3697
- package/rich-text-editor/index.cjs +12 -15
- package/rich-text-editor/index.js +3489 -6291
- package/rich-text-view/definition.cjs +159 -0
- package/rich-text-view/definition.js +153 -0
- package/rich-text-view/index.cjs +1 -0
- package/rich-text-view/index.js +95 -0
- package/select/definition.cjs +27 -15
- package/select/definition.js +27 -15
- package/shared/foundation/listbox/listbox.d.ts +0 -1
- package/shared/localization/Locale.d.ts +2 -0
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/unbundled/_commonjsHelpers.cjs +26 -0
- package/unbundled/_commonjsHelpers.js +26 -1
- package/unbundled/data-grid.options.cjs +34 -0
- package/unbundled/data-grid.options.js +28 -0
- package/unbundled/definition.cjs +1 -1
- package/unbundled/definition.js +1 -1
- package/unbundled/feature.cjs +3678 -0
- package/unbundled/feature.js +3662 -0
- package/unbundled/listbox.cjs +29 -2
- package/unbundled/listbox.js +29 -2
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +11 -1
- package/video-player/definition.js +12 -2
- package/video-player/index.cjs +30 -30
- package/video-player/index.js +705 -702
- package/vivid.api.json +1478 -39
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const elevation_definition = require('../unbundled/definition6.cjs');
|
|
6
|
+
const vividElement = require('../unbundled/vivid-element.cjs');
|
|
7
|
+
const fastElement = require('@microsoft/fast-element');
|
|
8
|
+
const dom = require('@floating-ui/dom');
|
|
9
|
+
const delegatesAria = require('../unbundled/delegates-aria.cjs');
|
|
10
|
+
const localized = require('../unbundled/localized.cjs');
|
|
11
|
+
const fastWebUtilities = require('@microsoft/fast-web-utilities');
|
|
12
|
+
const icon_definition = require('../icon/definition.cjs');
|
|
13
|
+
const button_definition = require('../unbundled/definition.cjs');
|
|
14
|
+
|
|
15
|
+
const styles = ":host{display:inline-block}.base{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.base{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.base ::-webkit-scrollbar{width:4px}.base ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.base ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.base{position:fixed;overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content;min-inline-size:fit-content}.base:focus-visible{outline:none}.base::backdrop{background-color:var(--popover-backdrop-bg, transparent)}.control{display:flex;flex-direction:column;padding:var(--popover-padding, 24px);border-radius:inherit;background:var(--vvd-color-surface-4dp);color:var(--vvd-color-canvas-text);gap:var(--popover-gap, 24px)}.control:not(.open){display:none}.control.condensed{--popover-padding: 12px;--popover-gap: 12px}.control.manual{padding-block-start:40px}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismiss-button{position:absolute;inset-block-start:4px;inset-inline-end:4px}";
|
|
16
|
+
|
|
17
|
+
var __defProp = Object.defineProperty;
|
|
18
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
19
|
+
var result = void 0 ;
|
|
20
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
21
|
+
if (decorator = decorators[i])
|
|
22
|
+
result = (decorator(target, key, result) ) || result;
|
|
23
|
+
if (result) __defProp(target, key, result);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
class Popover extends localized.Localized(delegatesAria.DelegatesAria(vividElement.VividElement)) {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this.placement = "bottom";
|
|
30
|
+
this.manual = false;
|
|
31
|
+
this.layout = "default";
|
|
32
|
+
this.offset = 8;
|
|
33
|
+
this.alternate = false;
|
|
34
|
+
this.dismissButtonAriaLabel = null;
|
|
35
|
+
this.arrow = false;
|
|
36
|
+
this.open = false;
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
this.#currentAnchor = null;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
this.#manualToggle = () => {
|
|
45
|
+
this._popoverEl.togglePopover();
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
this.#autoUpdateCallback = () => {
|
|
51
|
+
this.#lastPositionUpdate = this.updatePosition();
|
|
52
|
+
};
|
|
53
|
+
// --- Lifecycle & Events ---
|
|
54
|
+
/**
|
|
55
|
+
* Syncs native toggle state (Esc key, light dismiss) back to the 'open' attribute.
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
this.#handleNativeToggle = (e) => {
|
|
59
|
+
const isOpen = e.newState ? e.newState === "open" : this._popoverEl.matches(":popover-open");
|
|
60
|
+
if (this.open !== isOpen) {
|
|
61
|
+
this.open = isOpen;
|
|
62
|
+
}
|
|
63
|
+
this.$emit(isOpen ? "open" : "close", void 0, { bubbles: false });
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
placementChanged() {
|
|
67
|
+
this.#updateAutoUpdate();
|
|
68
|
+
}
|
|
69
|
+
arrowChanged() {
|
|
70
|
+
this.#updateAutoUpdate();
|
|
71
|
+
}
|
|
72
|
+
openChanged(_oldValue, newValue) {
|
|
73
|
+
if (!this._popoverEl) return;
|
|
74
|
+
const isOpen = this._popoverEl.matches(":popover-open");
|
|
75
|
+
if (newValue && !isOpen) {
|
|
76
|
+
this._popoverEl.showPopover();
|
|
77
|
+
} else if (!newValue && isOpen) {
|
|
78
|
+
this._popoverEl.hidePopover();
|
|
79
|
+
}
|
|
80
|
+
this.#updateAutoUpdate();
|
|
81
|
+
}
|
|
82
|
+
anchorChanged() {
|
|
83
|
+
this.#updateAnchor();
|
|
84
|
+
}
|
|
85
|
+
_slottedAnchorChanged() {
|
|
86
|
+
this.#updateAnchor();
|
|
87
|
+
}
|
|
88
|
+
#currentAnchor;
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
#updateAnchor() {
|
|
93
|
+
if (!this._popoverEl) return;
|
|
94
|
+
const newAnchor = this.anchor || this._slottedAnchor?.[0] || null;
|
|
95
|
+
if (this.#currentAnchor === newAnchor) return;
|
|
96
|
+
if (this.#currentAnchor) {
|
|
97
|
+
this.#unbindTrigger(this.#currentAnchor);
|
|
98
|
+
}
|
|
99
|
+
this.#currentAnchor = newAnchor;
|
|
100
|
+
if (this.#currentAnchor && this._popoverEl) {
|
|
101
|
+
this.#bindTrigger(this.#currentAnchor);
|
|
102
|
+
this.#updateAutoUpdate();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
#bindTrigger(anchor) {
|
|
109
|
+
anchor.setAttribute("aria-haspopup", "dialog");
|
|
110
|
+
if (anchor instanceof HTMLButtonElement || anchor instanceof HTMLInputElement) {
|
|
111
|
+
anchor.popoverTargetElement = this._popoverEl;
|
|
112
|
+
} else {
|
|
113
|
+
anchor.addEventListener("click", this.#manualToggle);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
119
|
+
#unbindTrigger(anchor) {
|
|
120
|
+
anchor.removeAttribute("aria-haspopup");
|
|
121
|
+
if (anchor instanceof HTMLButtonElement || anchor instanceof HTMLInputElement) {
|
|
122
|
+
anchor.popoverTargetElement = null;
|
|
123
|
+
} else {
|
|
124
|
+
anchor.removeEventListener("click", this.#manualToggle);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
#manualToggle;
|
|
128
|
+
// --- Floating UI Logic ---
|
|
129
|
+
/**
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
get #middleware() {
|
|
133
|
+
let middleware = [dom.inline(), dom.flip(), dom.shift(), dom.hide()];
|
|
134
|
+
/* v8 ignore next -- @preserve */
|
|
135
|
+
let offsetValue = this.offset ?? 0;
|
|
136
|
+
if (this.arrow && this._arrowEl) {
|
|
137
|
+
offsetValue = 12;
|
|
138
|
+
middleware = [
|
|
139
|
+
...middleware,
|
|
140
|
+
dom.arrow({ element: this._arrowEl, padding: 10 })
|
|
141
|
+
];
|
|
142
|
+
}
|
|
143
|
+
/* v8 ignore else -- @preserve */
|
|
144
|
+
if (offsetValue > 0) {
|
|
145
|
+
middleware.unshift(dom.offset(offsetValue));
|
|
146
|
+
}
|
|
147
|
+
return middleware;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
*/
|
|
152
|
+
#cleanup;
|
|
153
|
+
/**
|
|
154
|
+
* @internal
|
|
155
|
+
*/
|
|
156
|
+
#updateAutoUpdate() {
|
|
157
|
+
this.#cleanup?.();
|
|
158
|
+
if (this.open && this.#currentAnchor && this._popoverEl) {
|
|
159
|
+
this.#cleanup = dom.autoUpdate(
|
|
160
|
+
this.#currentAnchor,
|
|
161
|
+
this._popoverEl,
|
|
162
|
+
this.#autoUpdateCallback
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Tracks the promise of the last position update.
|
|
168
|
+
* @internal
|
|
169
|
+
*/
|
|
170
|
+
#lastPositionUpdate;
|
|
171
|
+
#autoUpdateCallback;
|
|
172
|
+
/**
|
|
173
|
+
* Updates the position of the popover
|
|
174
|
+
* @public
|
|
175
|
+
*/
|
|
176
|
+
async updatePosition() {
|
|
177
|
+
/* v8 ignore if -- @preserve */
|
|
178
|
+
if (!this.open || !this.#currentAnchor || !this._popoverEl) return;
|
|
179
|
+
const positionData = await dom.computePosition(
|
|
180
|
+
this.#currentAnchor,
|
|
181
|
+
this._popoverEl,
|
|
182
|
+
{
|
|
183
|
+
placement: this.placement,
|
|
184
|
+
strategy: "fixed",
|
|
185
|
+
middleware: this.#middleware
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
/* v8 ignore if -- @preserve */
|
|
189
|
+
if (!this.open) return;
|
|
190
|
+
this.#assignPopoverPosition(positionData);
|
|
191
|
+
if (this.arrow && this._arrowEl) {
|
|
192
|
+
this.#assignArrowPosition(positionData);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* @internal
|
|
197
|
+
*/
|
|
198
|
+
#assignPopoverPosition(data) {
|
|
199
|
+
const { x, y } = data;
|
|
200
|
+
Object.assign(this._popoverEl.style, {
|
|
201
|
+
left: `${x}px`,
|
|
202
|
+
top: `${y}px`,
|
|
203
|
+
visibility: data.middlewareData.hide?.referenceHidden ? "hidden" : "visible"
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
#assignArrowPosition(data) {
|
|
210
|
+
/* v8 ignore if -- @preserve */
|
|
211
|
+
if (!this._arrowEl) return;
|
|
212
|
+
const { x: arrowX, y: arrowY } = data.middlewareData.arrow;
|
|
213
|
+
const styles = {
|
|
214
|
+
left: "calc(100% - 4px)",
|
|
215
|
+
right: "-4px",
|
|
216
|
+
top: "calc(100% - 4px)",
|
|
217
|
+
bottom: "-4px"
|
|
218
|
+
};
|
|
219
|
+
const staticAxis = data.placement.split("-")[0];
|
|
220
|
+
Object.assign(this._arrowEl.style, {
|
|
221
|
+
left: arrowX ? `${arrowX}px` : styles[staticAxis],
|
|
222
|
+
top: arrowY ? `${arrowY}px` : styles[staticAxis]
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
#handleNativeToggle;
|
|
226
|
+
connectedCallback() {
|
|
227
|
+
super.connectedCallback();
|
|
228
|
+
this.#updateAnchor();
|
|
229
|
+
/* v8 ignore else -- @preserve */
|
|
230
|
+
if (this._popoverEl) {
|
|
231
|
+
this._popoverEl.addEventListener("toggle", this.#handleNativeToggle);
|
|
232
|
+
if (this.open && !this._popoverEl.matches(":popover-open")) {
|
|
233
|
+
this._popoverEl.showPopover();
|
|
234
|
+
this.#updateAutoUpdate();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
disconnectedCallback() {
|
|
239
|
+
super.disconnectedCallback();
|
|
240
|
+
this.#cleanup?.();
|
|
241
|
+
if (this.#currentAnchor) {
|
|
242
|
+
this.#unbindTrigger(this.#currentAnchor);
|
|
243
|
+
this.#currentAnchor = null;
|
|
244
|
+
}
|
|
245
|
+
/* v8 ignore else -- @preserve */
|
|
246
|
+
if (this._popoverEl) {
|
|
247
|
+
this._popoverEl.removeEventListener("toggle", this.#handleNativeToggle);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
// --- Methods ---
|
|
251
|
+
show() {
|
|
252
|
+
this.open = true;
|
|
253
|
+
return this.#lastPositionUpdate ?? Promise.resolve();
|
|
254
|
+
}
|
|
255
|
+
hide() {
|
|
256
|
+
this.open = false;
|
|
257
|
+
}
|
|
258
|
+
toggle() {
|
|
259
|
+
this.open = !this.open;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
__decorateClass([
|
|
263
|
+
fastElement.attr({ mode: "fromView" })
|
|
264
|
+
], Popover.prototype, "placement");
|
|
265
|
+
__decorateClass([
|
|
266
|
+
fastElement.attr({ mode: "boolean" })
|
|
267
|
+
], Popover.prototype, "manual");
|
|
268
|
+
__decorateClass([
|
|
269
|
+
fastElement.attr({ mode: "fromView" })
|
|
270
|
+
], Popover.prototype, "layout");
|
|
271
|
+
__decorateClass([
|
|
272
|
+
fastElement.attr({
|
|
273
|
+
attribute: "offset",
|
|
274
|
+
mode: "fromView",
|
|
275
|
+
converter: fastElement.nullableNumberConverter
|
|
276
|
+
})
|
|
277
|
+
], Popover.prototype, "offset");
|
|
278
|
+
__decorateClass([
|
|
279
|
+
fastElement.attr({
|
|
280
|
+
mode: "boolean"
|
|
281
|
+
})
|
|
282
|
+
], Popover.prototype, "alternate");
|
|
283
|
+
__decorateClass([
|
|
284
|
+
fastElement.attr({ attribute: "dismiss-button-aria-label" })
|
|
285
|
+
], Popover.prototype, "dismissButtonAriaLabel");
|
|
286
|
+
__decorateClass([
|
|
287
|
+
fastElement.attr({ mode: "boolean" })
|
|
288
|
+
], Popover.prototype, "arrow");
|
|
289
|
+
__decorateClass([
|
|
290
|
+
fastElement.attr({ mode: "boolean" })
|
|
291
|
+
], Popover.prototype, "open");
|
|
292
|
+
__decorateClass([
|
|
293
|
+
fastElement.observable
|
|
294
|
+
], Popover.prototype, "anchor");
|
|
295
|
+
__decorateClass([
|
|
296
|
+
fastElement.observable
|
|
297
|
+
], Popover.prototype, "_slottedAnchor");
|
|
298
|
+
|
|
299
|
+
const getClasses = ({ open, manual, layout }) => fastWebUtilities.classNames(
|
|
300
|
+
"control",
|
|
301
|
+
["open", Boolean(open)],
|
|
302
|
+
["manual", Boolean(manual)],
|
|
303
|
+
["condensed", layout === "condensed"]
|
|
304
|
+
);
|
|
305
|
+
const popoverTemplate = (context) => {
|
|
306
|
+
const elevationTag = context.tagFor(elevation_definition.Elevation);
|
|
307
|
+
const buttonTag = context.tagFor(button_definition.Button);
|
|
308
|
+
const iconTag = context.tagFor(icon_definition.VwcIconElement);
|
|
309
|
+
return fastElement.html`
|
|
310
|
+
<slot name="anchor" ${fastElement.slotted("_slottedAnchor")}></slot>
|
|
311
|
+
<${elevationTag}>
|
|
312
|
+
<div class="base"
|
|
313
|
+
${fastElement.ref("_popoverEl")}
|
|
314
|
+
popover="${(x) => x.manual ? "manual" : "auto"}"
|
|
315
|
+
tabindex="-1"
|
|
316
|
+
autofocus
|
|
317
|
+
${delegatesAria.delegateAria({
|
|
318
|
+
role: "dialog",
|
|
319
|
+
ariaModal: "false"
|
|
320
|
+
})}
|
|
321
|
+
>
|
|
322
|
+
<div class="${getClasses}"
|
|
323
|
+
part="${(x) => x.alternate ? "vvd-theme-alternate" : ""}">
|
|
324
|
+
<slot></slot>
|
|
325
|
+
<slot name="footer"></slot>
|
|
326
|
+
${fastElement.when(
|
|
327
|
+
(x) => x.manual,
|
|
328
|
+
fastElement.html`<${buttonTag}
|
|
329
|
+
aria-label="${(x) => x.dismissButtonAriaLabel || x.locale.popover.dismissButtonLabel}"
|
|
330
|
+
type="button"
|
|
331
|
+
size="condensed"
|
|
332
|
+
class="dismiss-button"
|
|
333
|
+
@click="${(x) => x.hide()}">
|
|
334
|
+
<${iconTag} name="close-line" slot="icon"></${iconTag}>
|
|
335
|
+
</${buttonTag}>`
|
|
336
|
+
)}
|
|
337
|
+
${fastElement.when(
|
|
338
|
+
(x) => x.arrow,
|
|
339
|
+
fastElement.html`<div class="arrow" ${fastElement.ref("_arrowEl")}></div>`
|
|
340
|
+
)}
|
|
341
|
+
</div>
|
|
342
|
+
</div>
|
|
343
|
+
</${elevationTag}>
|
|
344
|
+
`;
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
const popoverDefinition = vividElement.defineVividComponent(
|
|
348
|
+
"popover",
|
|
349
|
+
Popover,
|
|
350
|
+
popoverTemplate,
|
|
351
|
+
[button_definition.buttonDefinition, icon_definition.iconDefinition, elevation_definition.elevationDefinition],
|
|
352
|
+
{
|
|
353
|
+
styles,
|
|
354
|
+
shadowOptions: {
|
|
355
|
+
delegatesFocus: true
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
const registerPopover = vividElement.createRegisterFunction(popoverDefinition);
|
|
360
|
+
|
|
361
|
+
exports.VwcPopoverElement = Popover;
|
|
362
|
+
exports.popoverDefinition = popoverDefinition;
|
|
363
|
+
exports.registerPopover = registerPopover;
|