@momentum-design/components 0.122.5 → 0.122.6
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/dist/browser/index.js +3 -3
- package/dist/browser/index.js.map +2 -2
- package/dist/components/popover/popover.component.d.ts +7 -0
- package/dist/components/popover/popover.component.js +13 -0
- package/dist/components/popover/popover.constants.d.ts +1 -0
- package/dist/components/popover/popover.constants.js +1 -0
- package/dist/custom-elements.json +1540 -1408
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.js +5 -5
- package/package.json +1 -1
|
@@ -323,6 +323,13 @@ declare class Popover extends Popover_base {
|
|
|
323
323
|
* Useful for scenarios where both a popover and a tooltip are linked to the same trigger element.
|
|
324
324
|
*/
|
|
325
325
|
keepConnectedTooltipOpen: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Whether to update the position of the Popover on every animation frame if required.
|
|
328
|
+
* While optimized for performance, it should be used sparingly and with caution.
|
|
329
|
+
*
|
|
330
|
+
* @default false
|
|
331
|
+
*/
|
|
332
|
+
animationFrame: boolean;
|
|
326
333
|
arrowElement: HTMLElement | null;
|
|
327
334
|
/** @internal */
|
|
328
335
|
private hoverTimer;
|
|
@@ -337,6 +337,13 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
337
337
|
* Useful for scenarios where both a popover and a tooltip are linked to the same trigger element.
|
|
338
338
|
*/
|
|
339
339
|
this.keepConnectedTooltipOpen = DEFAULTS.KEEP_CONNECTED_TOOLTIP_OPEN;
|
|
340
|
+
/**
|
|
341
|
+
* Whether to update the position of the Popover on every animation frame if required.
|
|
342
|
+
* While optimized for performance, it should be used sparingly and with caution.
|
|
343
|
+
*
|
|
344
|
+
* @default false
|
|
345
|
+
*/
|
|
346
|
+
this.animationFrame = DEFAULTS.ANIMATION_FRAME;
|
|
340
347
|
this.arrowElement = null;
|
|
341
348
|
/** @internal */
|
|
342
349
|
this.hoverTimer = null;
|
|
@@ -661,6 +668,8 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
661
668
|
if (this.trigger.includes('mouseenter')) {
|
|
662
669
|
this.utils.setupHoverBridge(placement);
|
|
663
670
|
}
|
|
671
|
+
}, {
|
|
672
|
+
animationFrame: this.animationFrame,
|
|
664
673
|
});
|
|
665
674
|
};
|
|
666
675
|
this.utils = new PopoverUtils(this);
|
|
@@ -1057,4 +1066,8 @@ __decorate([
|
|
|
1057
1066
|
property({ type: Boolean, reflect: true, attribute: 'keep-connected-tooltip-open' }),
|
|
1058
1067
|
__metadata("design:type", Boolean)
|
|
1059
1068
|
], Popover.prototype, "keepConnectedTooltipOpen", void 0);
|
|
1069
|
+
__decorate([
|
|
1070
|
+
property({ type: Boolean, reflect: true, attribute: 'animation-frame' }),
|
|
1071
|
+
__metadata("design:type", Boolean)
|
|
1072
|
+
], Popover.prototype, "animationFrame", void 0);
|
|
1060
1073
|
export default Popover;
|
|
@@ -56,5 +56,6 @@ declare const DEFAULTS: {
|
|
|
56
56
|
readonly PROPAGATE_EVENT_ON_ESCAPE: false;
|
|
57
57
|
readonly KEEP_CONNECTED_TOOLTIP_OPEN: false;
|
|
58
58
|
readonly IS_BACKDROP_INVISIBLE: true;
|
|
59
|
+
readonly ANIMATION_FRAME: false;
|
|
59
60
|
};
|
|
60
61
|
export { TAG_NAME, POPOVER_PLACEMENT, COLOR, STRATEGY, TRIGGER, DEFAULTS };
|