@momentum-design/components 0.129.41 → 0.129.43
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 +108 -108
- package/dist/browser/index.js.map +3 -3
- package/dist/components/coachmark/coachmark.component.d.ts +14 -1
- package/dist/components/coachmark/coachmark.component.js +14 -1
- package/dist/components/coachmark/index.d.ts +0 -1
- package/dist/components/coachmark/index.js +0 -1
- package/dist/components/popover/popover.component.d.ts +26 -14
- package/dist/components/popover/popover.component.js +35 -12
- package/dist/components/popover/popover.constants.d.ts +5 -1
- package/dist/components/popover/popover.constants.js +6 -2
- package/dist/components/popover/popover.types.d.ts +3 -2
- package/dist/custom-elements.json +79 -823
- package/dist/react/coachmark/index.d.ts +14 -1
- package/dist/react/coachmark/index.js +14 -1
- package/package.json +1 -1
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import Popover from '../popover/popover.component';
|
|
2
2
|
import type { PopoverTrigger } from '../popover/popover.types';
|
|
3
3
|
/**
|
|
4
|
+
* A Coachmark is a contextual guidance component used to highlight a specific UI element and explain its purpose or functionality.
|
|
5
|
+
* It is typically shown as part of onboarding, feature discovery, or progressive education within the product.
|
|
6
|
+
*
|
|
4
7
|
* Coachmark component based on top of the popover component,
|
|
5
8
|
* with the default value of certain properties changed.
|
|
9
|
+
* Coachmark component will always have an arrow attached to it.
|
|
10
|
+
* The color of the coachmark is contrast.
|
|
11
|
+
*
|
|
12
|
+
* ## When to use
|
|
13
|
+
* - Introducing a new or complex feature to users.
|
|
14
|
+
* - Drawing attention to a UI element that might otherwise be missed.
|
|
15
|
+
* - Providing step-by-step guidance in an onboarding or walkthrough flow.
|
|
16
|
+
*
|
|
17
|
+
* ## Accessibility
|
|
18
|
+
* - The default role of coachmark is `"dialog"`, which can be changed via the `role` attribute.
|
|
19
|
+
* - aria-label or aria-labelledby can be provided to give the coachmark an accessible name.
|
|
6
20
|
*
|
|
7
21
|
* @dependency mdc-popover
|
|
8
22
|
*
|
|
@@ -24,7 +38,6 @@ import type { PopoverTrigger } from '../popover/popover.types';
|
|
|
24
38
|
* @cssproperty --mdc-popover-elevation-3 - elevation of the popover
|
|
25
39
|
*
|
|
26
40
|
* @slot - Default slot for modal container
|
|
27
|
-
*
|
|
28
41
|
*/
|
|
29
42
|
declare class Coachmark extends Popover {
|
|
30
43
|
/**
|
|
@@ -11,8 +11,22 @@ import { property } from 'lit/decorators.js';
|
|
|
11
11
|
import Popover from '../popover/popover.component';
|
|
12
12
|
import { DEFAULTS } from './coachmark.constants';
|
|
13
13
|
/**
|
|
14
|
+
* A Coachmark is a contextual guidance component used to highlight a specific UI element and explain its purpose or functionality.
|
|
15
|
+
* It is typically shown as part of onboarding, feature discovery, or progressive education within the product.
|
|
16
|
+
*
|
|
14
17
|
* Coachmark component based on top of the popover component,
|
|
15
18
|
* with the default value of certain properties changed.
|
|
19
|
+
* Coachmark component will always have an arrow attached to it.
|
|
20
|
+
* The color of the coachmark is contrast.
|
|
21
|
+
*
|
|
22
|
+
* ## When to use
|
|
23
|
+
* - Introducing a new or complex feature to users.
|
|
24
|
+
* - Drawing attention to a UI element that might otherwise be missed.
|
|
25
|
+
* - Providing step-by-step guidance in an onboarding or walkthrough flow.
|
|
26
|
+
*
|
|
27
|
+
* ## Accessibility
|
|
28
|
+
* - The default role of coachmark is `"dialog"`, which can be changed via the `role` attribute.
|
|
29
|
+
* - aria-label or aria-labelledby can be provided to give the coachmark an accessible name.
|
|
16
30
|
*
|
|
17
31
|
* @dependency mdc-popover
|
|
18
32
|
*
|
|
@@ -34,7 +48,6 @@ import { DEFAULTS } from './coachmark.constants';
|
|
|
34
48
|
* @cssproperty --mdc-popover-elevation-3 - elevation of the popover
|
|
35
49
|
*
|
|
36
50
|
* @slot - Default slot for modal container
|
|
37
|
-
*
|
|
38
51
|
*/
|
|
39
52
|
class Coachmark extends Popover {
|
|
40
53
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSResult, PropertyValues } from 'lit';
|
|
2
2
|
import { Component } from '../../models';
|
|
3
|
-
import type { PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger } from './popover.types';
|
|
3
|
+
import type { PopoverBoundaryRoot, PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger } from './popover.types';
|
|
4
4
|
declare const Popover_base: import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/BackdropMixin").BackdropMixinInterface> & import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/PreventScrollMixin").PreventScrollMixinInterface> & import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/FocusTrapMixin").FocusTrapClassInterface> & typeof Component;
|
|
5
5
|
/**
|
|
6
6
|
* Popover is generic overlay which can be triggered by any actionable element.
|
|
@@ -156,7 +156,7 @@ declare class Popover extends Popover_base {
|
|
|
156
156
|
*
|
|
157
157
|
* @see [Floating UI - rootBoundary](https://floating-ui.com/docs/detectOverflow#rootboundary)
|
|
158
158
|
*/
|
|
159
|
-
boundaryRoot:
|
|
159
|
+
boundaryRoot: PopoverBoundaryRoot;
|
|
160
160
|
/**
|
|
161
161
|
* Virtual padding around the boundary to check for overflow.
|
|
162
162
|
* So the popover will not be placed on top of the edge of the boundary.
|
|
@@ -374,12 +374,12 @@ declare class Popover extends Popover_base {
|
|
|
374
374
|
/**
|
|
375
375
|
* Get trigger element on-demand
|
|
376
376
|
* It is necessary because trigger might appear later in the DOM, or it could be replaced completely.
|
|
377
|
-
*
|
|
378
|
-
* @internal
|
|
379
377
|
*/
|
|
380
378
|
get triggerElement(): HTMLElement | null;
|
|
379
|
+
/** @internal */
|
|
381
380
|
private timers;
|
|
382
381
|
constructor();
|
|
382
|
+
/** @internal */
|
|
383
383
|
private parseTrigger;
|
|
384
384
|
protected firstUpdated(changedProperties: PropertyValues): Promise<void>;
|
|
385
385
|
connectedCallback(): void;
|
|
@@ -390,14 +390,17 @@ declare class Popover extends Popover_base {
|
|
|
390
390
|
*
|
|
391
391
|
* We are using capture phase for to make sure we capture trigger events even when they are not propagated during the
|
|
392
392
|
* bubble phase (e.g.: buttons in list item)
|
|
393
|
+
* @internal
|
|
393
394
|
*/
|
|
394
395
|
private setupTriggerListeners;
|
|
395
396
|
/**
|
|
396
397
|
* Removes the trigger related event listeners.
|
|
398
|
+
* @internal
|
|
397
399
|
*/
|
|
398
400
|
private removeTriggerListeners;
|
|
399
401
|
/**
|
|
400
402
|
* Removes all event listeners related to the popover.
|
|
403
|
+
* @internal
|
|
401
404
|
*/
|
|
402
405
|
private removeAllListeners;
|
|
403
406
|
protected updated(changedProperties: PropertyValues): Promise<void>;
|
|
@@ -405,6 +408,7 @@ declare class Popover extends Popover_base {
|
|
|
405
408
|
* Handles the outside click event to close the popover.
|
|
406
409
|
*
|
|
407
410
|
* @param event - The mouse event.
|
|
411
|
+
* @internal
|
|
408
412
|
*/
|
|
409
413
|
protected onOutsidePopoverClick: (event: MouseEvent) => void;
|
|
410
414
|
/**
|
|
@@ -413,12 +417,14 @@ declare class Popover extends Popover_base {
|
|
|
413
417
|
* This method is attached to the document.
|
|
414
418
|
*
|
|
415
419
|
* @param event - The keyboard event.
|
|
420
|
+
* @internal
|
|
416
421
|
*/
|
|
417
422
|
private onEscapeKeydown;
|
|
418
423
|
/**
|
|
419
424
|
* Handles the popover focus out event.
|
|
420
425
|
*
|
|
421
426
|
* @param event - The focus event.
|
|
427
|
+
* @internal
|
|
422
428
|
*/
|
|
423
429
|
private onPopoverFocusOut;
|
|
424
430
|
/**
|
|
@@ -430,38 +436,43 @@ declare class Popover extends Popover_base {
|
|
|
430
436
|
*/
|
|
431
437
|
protected isOpenUpdated(oldValue: boolean, newValue: boolean): Promise<void>;
|
|
432
438
|
/**
|
|
433
|
-
*
|
|
434
|
-
*
|
|
439
|
+
* Handles mouse enter event on the trigger element.
|
|
440
|
+
* This method sets the `isHovered` flag to true and shows the popover
|
|
441
|
+
* @internal
|
|
435
442
|
*/
|
|
436
443
|
private handleMouseEnter;
|
|
437
444
|
/**
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
445
|
+
* Handles mouse leave event on the trigger element.
|
|
446
|
+
* This method sets the `isHovered` flag to false and starts the close delay
|
|
447
|
+
* timer to hide the popover.
|
|
448
|
+
* @internal
|
|
441
449
|
*/
|
|
442
450
|
private handleMouseLeave;
|
|
443
451
|
/**
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* If the popover is hovered, it will not hide the popover.
|
|
452
|
+
* Closes based on hideOnBlur property or hover state.
|
|
453
|
+
* @internal
|
|
447
454
|
*/
|
|
448
455
|
private handleFocusOut;
|
|
449
456
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
457
|
+
* Handles focus in event on the trigger element.
|
|
458
|
+
* This method checks if the trigger element has visible focus or is being hovered.
|
|
459
|
+
* @internal
|
|
452
460
|
*/
|
|
453
461
|
private handleFocusIn;
|
|
454
462
|
/**
|
|
455
463
|
* Cancels the open delay timer.
|
|
464
|
+
* @internal
|
|
456
465
|
*/
|
|
457
466
|
private cancelOpenDelay;
|
|
458
467
|
/**
|
|
459
468
|
* Starts the close delay timer.
|
|
460
469
|
* If the popover is not interactive, it will close the popover after the delay.
|
|
470
|
+
* @internal
|
|
461
471
|
*/
|
|
462
472
|
private startCloseDelay;
|
|
463
473
|
/**
|
|
464
474
|
* Cancels the close delay timer.
|
|
475
|
+
* @internal
|
|
465
476
|
*/
|
|
466
477
|
private cancelCloseDelay;
|
|
467
478
|
/**
|
|
@@ -480,6 +491,7 @@ declare class Popover extends Popover_base {
|
|
|
480
491
|
* Positions the popover based on the trigger element.
|
|
481
492
|
* It also handles the flip, size and arrow placement.
|
|
482
493
|
* It uses the floating-ui/dom library to calculate the position.
|
|
494
|
+
* @internal
|
|
483
495
|
*/
|
|
484
496
|
private positionPopover;
|
|
485
497
|
protected isEventFromTrigger(event: Event): boolean;
|
|
@@ -129,8 +129,6 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
129
129
|
/**
|
|
130
130
|
* Get trigger element on-demand
|
|
131
131
|
* It is necessary because trigger might appear later in the DOM, or it could be replaced completely.
|
|
132
|
-
*
|
|
133
|
-
* @internal
|
|
134
132
|
*/
|
|
135
133
|
get triggerElement() {
|
|
136
134
|
return this.getRootNode().querySelector(`[id="${this.triggerID}"]`);
|
|
@@ -384,7 +382,9 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
384
382
|
* @internal
|
|
385
383
|
*/
|
|
386
384
|
this.popoverDepth = 0;
|
|
385
|
+
/** @internal */
|
|
387
386
|
this.timers = new Timers(this);
|
|
387
|
+
/** @internal */
|
|
388
388
|
this.parseTrigger = () => {
|
|
389
389
|
var _a;
|
|
390
390
|
const triggers = ((_a = this.trigger) === null || _a === void 0 ? void 0 : _a.split(' ')) || [];
|
|
@@ -411,10 +411,14 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
411
411
|
*
|
|
412
412
|
* We are using capture phase for to make sure we capture trigger events even when they are not propagated during the
|
|
413
413
|
* bubble phase (e.g.: buttons in list item)
|
|
414
|
+
* @internal
|
|
414
415
|
*/
|
|
415
416
|
this.setupTriggerListeners = () => {
|
|
416
417
|
if (this.trigger.includes('click')) {
|
|
417
418
|
document.addEventListener('click', this.togglePopoverVisible, { capture: true });
|
|
419
|
+
if (this.hideOnBlur) {
|
|
420
|
+
document.addEventListener('focusout', this.handleFocusOut, { capture: true });
|
|
421
|
+
}
|
|
418
422
|
}
|
|
419
423
|
if (this.trigger.includes('mouseenter')) {
|
|
420
424
|
const hoverBridge = this.renderRoot.querySelector('div[part="popover-hover-bridge"]');
|
|
@@ -433,6 +437,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
433
437
|
};
|
|
434
438
|
/**
|
|
435
439
|
* Removes the trigger related event listeners.
|
|
440
|
+
* @internal
|
|
436
441
|
*/
|
|
437
442
|
this.removeTriggerListeners = () => {
|
|
438
443
|
// click trigger
|
|
@@ -450,6 +455,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
450
455
|
};
|
|
451
456
|
/**
|
|
452
457
|
* Removes all event listeners related to the popover.
|
|
458
|
+
* @internal
|
|
453
459
|
*/
|
|
454
460
|
this.removeAllListeners = () => {
|
|
455
461
|
this.removeTriggerListeners();
|
|
@@ -468,6 +474,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
468
474
|
* Handles the outside click event to close the popover.
|
|
469
475
|
*
|
|
470
476
|
* @param event - The mouse event.
|
|
477
|
+
* @internal
|
|
471
478
|
*/
|
|
472
479
|
this.onOutsidePopoverClick = (event) => {
|
|
473
480
|
if (popoverStack.peek() !== this)
|
|
@@ -486,6 +493,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
486
493
|
* This method is attached to the document.
|
|
487
494
|
*
|
|
488
495
|
* @param event - The keyboard event.
|
|
496
|
+
* @internal
|
|
489
497
|
*/
|
|
490
498
|
this.onEscapeKeydown = (event) => {
|
|
491
499
|
if (!this.visible || event.code !== 'Escape') {
|
|
@@ -503,6 +511,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
503
511
|
* Handles the popover focus out event.
|
|
504
512
|
*
|
|
505
513
|
* @param event - The focus event.
|
|
514
|
+
* @internal
|
|
506
515
|
*/
|
|
507
516
|
this.onPopoverFocusOut = (event) => {
|
|
508
517
|
if (!this.contains(event.relatedTarget)) {
|
|
@@ -510,8 +519,9 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
510
519
|
}
|
|
511
520
|
};
|
|
512
521
|
/**
|
|
513
|
-
*
|
|
514
|
-
*
|
|
522
|
+
* Handles mouse enter event on the trigger element.
|
|
523
|
+
* This method sets the `isHovered` flag to true and shows the popover
|
|
524
|
+
* @internal
|
|
515
525
|
*/
|
|
516
526
|
this.handleMouseEnter = (event) => {
|
|
517
527
|
if (!this.isEventFromTrigger(event))
|
|
@@ -520,9 +530,10 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
520
530
|
this.show();
|
|
521
531
|
};
|
|
522
532
|
/**
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
*
|
|
533
|
+
* Handles mouse leave event on the trigger element.
|
|
534
|
+
* This method sets the `isHovered` flag to false and starts the close delay
|
|
535
|
+
* timer to hide the popover.
|
|
536
|
+
* @internal
|
|
526
537
|
*/
|
|
527
538
|
this.handleMouseLeave = (event) => {
|
|
528
539
|
if (!this.isEventFromTrigger(event))
|
|
@@ -531,20 +542,28 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
531
542
|
this.startCloseDelay();
|
|
532
543
|
};
|
|
533
544
|
/**
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
* If the popover is hovered, it will not hide the popover.
|
|
545
|
+
* Closes based on hideOnBlur property or hover state.
|
|
546
|
+
* @internal
|
|
537
547
|
*/
|
|
538
548
|
this.handleFocusOut = (event) => {
|
|
539
549
|
if (!this.isEventFromTrigger(event))
|
|
540
550
|
return;
|
|
551
|
+
if (this.hideOnBlur) {
|
|
552
|
+
const { relatedTarget } = event;
|
|
553
|
+
// Don't hide if focus moves within the component
|
|
554
|
+
if (!this.contains(relatedTarget)) {
|
|
555
|
+
this.hide();
|
|
556
|
+
}
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
541
559
|
if (!this.isHovered) {
|
|
542
560
|
this.hide();
|
|
543
561
|
}
|
|
544
562
|
};
|
|
545
563
|
/**
|
|
546
|
-
*
|
|
547
|
-
*
|
|
564
|
+
* Handles focus in event on the trigger element.
|
|
565
|
+
* This method checks if the trigger element has visible focus or is being hovered.
|
|
566
|
+
* @internal
|
|
548
567
|
*/
|
|
549
568
|
this.handleFocusIn = (event) => {
|
|
550
569
|
var _a, _b, _c, _d;
|
|
@@ -558,6 +577,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
558
577
|
};
|
|
559
578
|
/**
|
|
560
579
|
* Cancels the open delay timer.
|
|
580
|
+
* @internal
|
|
561
581
|
*/
|
|
562
582
|
this.cancelOpenDelay = () => {
|
|
563
583
|
this.timers.clearTimeout(TIMEOUTS.OPEN);
|
|
@@ -565,6 +585,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
565
585
|
/**
|
|
566
586
|
* Starts the close delay timer.
|
|
567
587
|
* If the popover is not interactive, it will close the popover after the delay.
|
|
588
|
+
* @internal
|
|
568
589
|
*/
|
|
569
590
|
this.startCloseDelay = () => {
|
|
570
591
|
this.cancelOpenDelay();
|
|
@@ -586,6 +607,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
586
607
|
};
|
|
587
608
|
/**
|
|
588
609
|
* Cancels the close delay timer.
|
|
610
|
+
* @internal
|
|
589
611
|
*/
|
|
590
612
|
this.cancelCloseDelay = () => {
|
|
591
613
|
this.timers.clearTimeout(TIMEOUTS.HOVER);
|
|
@@ -646,6 +668,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
646
668
|
* Positions the popover based on the trigger element.
|
|
647
669
|
* It also handles the flip, size and arrow placement.
|
|
648
670
|
* It uses the floating-ui/dom library to calculate the position.
|
|
671
|
+
* @internal
|
|
649
672
|
*/
|
|
650
673
|
this.positionPopover = () => {
|
|
651
674
|
const { triggerElement } = this;
|
|
@@ -27,6 +27,10 @@ declare const STRATEGY: {
|
|
|
27
27
|
readonly ABSOLUTE: "absolute";
|
|
28
28
|
readonly FIXED: "fixed";
|
|
29
29
|
};
|
|
30
|
+
declare const BOUNDARY_ROOT: {
|
|
31
|
+
readonly VIEWPORT: "viewport";
|
|
32
|
+
readonly DOCUMENT: "document";
|
|
33
|
+
};
|
|
30
34
|
declare const DEFAULTS: {
|
|
31
35
|
readonly PLACEMENT: "bottom";
|
|
32
36
|
readonly TRIGGER: "click";
|
|
@@ -63,4 +67,4 @@ declare const TIMEOUTS: {
|
|
|
63
67
|
readonly HOVER: "hover";
|
|
64
68
|
readonly CLOSE: "close";
|
|
65
69
|
};
|
|
66
|
-
export { TAG_NAME, POPOVER_PLACEMENT, COLOR, STRATEGY, TRIGGER, DEFAULTS, TIMEOUTS };
|
|
70
|
+
export { TAG_NAME, POPOVER_PLACEMENT, COLOR, STRATEGY, TRIGGER, BOUNDARY_ROOT, DEFAULTS, TIMEOUTS };
|
|
@@ -29,6 +29,10 @@ const STRATEGY = {
|
|
|
29
29
|
ABSOLUTE: 'absolute',
|
|
30
30
|
FIXED: 'fixed',
|
|
31
31
|
};
|
|
32
|
+
const BOUNDARY_ROOT = {
|
|
33
|
+
VIEWPORT: 'viewport',
|
|
34
|
+
DOCUMENT: 'document',
|
|
35
|
+
};
|
|
32
36
|
const DEFAULTS = {
|
|
33
37
|
PLACEMENT: POPOVER_PLACEMENT.BOTTOM,
|
|
34
38
|
TRIGGER: TRIGGER.CLICK,
|
|
@@ -36,7 +40,7 @@ const DEFAULTS = {
|
|
|
36
40
|
STRATEGY: STRATEGY.ABSOLUTE,
|
|
37
41
|
OFFSET: 4,
|
|
38
42
|
BOUNDARY: 'clippingAncestors',
|
|
39
|
-
BOUNDARY_ROOT:
|
|
43
|
+
BOUNDARY_ROOT: BOUNDARY_ROOT.VIEWPORT,
|
|
40
44
|
BOUNDARY_PADDING: 0,
|
|
41
45
|
VISIBLE: false,
|
|
42
46
|
ARROW: false,
|
|
@@ -65,4 +69,4 @@ const TIMEOUTS = {
|
|
|
65
69
|
HOVER: 'hover',
|
|
66
70
|
CLOSE: 'close',
|
|
67
71
|
};
|
|
68
|
-
export { TAG_NAME, POPOVER_PLACEMENT, COLOR, STRATEGY, TRIGGER, DEFAULTS, TIMEOUTS };
|
|
72
|
+
export { TAG_NAME, POPOVER_PLACEMENT, COLOR, STRATEGY, TRIGGER, BOUNDARY_ROOT, DEFAULTS, TIMEOUTS };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ValueOf, TypedCustomEvent } from '../../utils/types';
|
|
2
2
|
import type Popover from './popover.component';
|
|
3
|
-
import { POPOVER_PLACEMENT, TRIGGER, COLOR, STRATEGY } from './popover.constants';
|
|
3
|
+
import { POPOVER_PLACEMENT, TRIGGER, COLOR, STRATEGY, BOUNDARY_ROOT } from './popover.constants';
|
|
4
4
|
type PopoverPlacement = ValueOf<typeof POPOVER_PLACEMENT>;
|
|
5
5
|
type PopoverColor = ValueOf<typeof COLOR>;
|
|
6
6
|
type PopoverStrategy = ValueOf<typeof STRATEGY>;
|
|
7
|
+
type PopoverBoundaryRoot = ValueOf<typeof BOUNDARY_ROOT>;
|
|
7
8
|
type PopoverTrigger = ValueOf<typeof TRIGGER> | `${ValueOf<typeof TRIGGER>} ${ValueOf<typeof TRIGGER>}`;
|
|
8
9
|
type PopoverShownEvent = TypedCustomEvent<Popover, {
|
|
9
10
|
show: boolean;
|
|
@@ -23,4 +24,4 @@ interface Events {
|
|
|
23
24
|
onCreatedEvent: PopoverCreatedEvent;
|
|
24
25
|
onDestroyedEvent: PopoverDestroyedEvent;
|
|
25
26
|
}
|
|
26
|
-
export type { PopoverPlacement, PopoverColor, PopoverStrategy, PopoverTrigger, Events, PopoverShownEvent, PopoverHiddenEvent, };
|
|
27
|
+
export type { PopoverPlacement, PopoverColor, PopoverStrategy, PopoverBoundaryRoot, PopoverTrigger, Events, PopoverShownEvent, PopoverHiddenEvent, };
|