@momentum-ui/web-components 2.22.17 → 2.23.1

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.
Files changed (69) hide show
  1. package/dist/1439.js +1 -1
  2. package/dist/3135.js +1 -1
  3. package/dist/3820.js +1 -0
  4. package/dist/587.js +1 -1
  5. package/dist/6015.js +1 -1
  6. package/dist/6652.js +1 -1
  7. package/dist/6677.js +1 -1
  8. package/dist/6953.js +1 -0
  9. package/dist/754.js +1 -1
  10. package/dist/7833.js +1 -1
  11. package/dist/7997.js +1 -1
  12. package/dist/8004.js +1 -0
  13. package/dist/9058.js +1 -1
  14. package/dist/9130.js +1 -1
  15. package/dist/9217.js +1 -1
  16. package/dist/chunks/{md-7044.js → md-4663.js} +1 -1
  17. package/dist/comp/md-card-entry.js +1 -1
  18. package/dist/comp/md-card-v2-entry.js +8 -8
  19. package/dist/comp/md-card.js +1 -1
  20. package/dist/comp/md-coachmark-entry.js +1 -1
  21. package/dist/comp/md-coachmark-popover-entry.js +37 -41
  22. package/dist/comp/md-coachmark-popover.js +1 -1
  23. package/dist/comp/md-coachmark.js +1 -1
  24. package/dist/comp/md-combobox-entry.js +1 -1
  25. package/dist/comp/md-combobox.js +1 -1
  26. package/dist/comp/md-country-code-picker-entry.js +50 -0
  27. package/dist/comp/md-country-code-picker.js +1 -0
  28. package/dist/comp/md-date-range-picker-entry.js +1 -1
  29. package/dist/comp/md-date-range-picker.js +1 -1
  30. package/dist/comp/md-date-time-picker-entry.js +1 -1
  31. package/dist/comp/md-date-time-picker.js +1 -1
  32. package/dist/comp/md-datepicker-entry.js +1 -1
  33. package/dist/comp/md-datepicker.js +1 -1
  34. package/dist/comp/md-draggable-entry.js +1 -1
  35. package/dist/comp/md-draggable.js +1 -1
  36. package/dist/comp/md-editable-field-entry.js +1 -1
  37. package/dist/comp/md-editable-field.js +1 -1
  38. package/dist/comp/md-floating-modal-entry.js +1 -1
  39. package/dist/comp/md-floating-modal.js +1 -1
  40. package/dist/comp/md-input-entry.js +1 -1
  41. package/dist/comp/md-input.js +1 -1
  42. package/dist/comp/md-modal-entry.js +1 -1
  43. package/dist/comp/md-modal.js +1 -1
  44. package/dist/comp/md-phone-input-entry.js +14 -47
  45. package/dist/comp/md-phone-input.js +1 -1
  46. package/dist/comp/md-popover-entry.js +17 -26
  47. package/dist/comp/md-popover.js +1 -1
  48. package/dist/comp/md-tabs-entry.js +1 -1
  49. package/dist/comp/md-theme-entry.js +2 -2
  50. package/dist/comp/md-timepicker-entry.js +1 -1
  51. package/dist/comp/md-timepicker.js +1 -1
  52. package/dist/index-entry.js +119 -107
  53. package/dist/index.js +1 -1
  54. package/dist/types/components/card-v2/CardV2.d.ts +1 -0
  55. package/dist/types/components/coachmark-popover/CoachmarkPopover.d.ts +1 -0
  56. package/dist/types/components/country-code-picker/CountryCodePicker.d.ts +54 -0
  57. package/dist/types/components/grabber/Grabber.d.ts +1 -1
  58. package/dist/types/components/phone-input/PhoneInput.d.ts +1 -19
  59. package/dist/types/components/popover/Popover.constants.d.ts +53 -0
  60. package/dist/types/components/popover/Popover.d.ts +294 -191
  61. package/dist/types/components/popover/Popover.events.d.ts +34 -0
  62. package/dist/types/components/popover/Popover.stack.d.ts +45 -0
  63. package/dist/types/components/popover/Popover.types.d.ts +13 -1
  64. package/dist/types/components/popover/Popover.utils.d.ts +63 -0
  65. package/dist/types/components/theme/Theme.d.ts +1 -0
  66. package/dist/types/index.d.ts +2 -0
  67. package/dist/types/utils/helpers.d.ts +2 -0
  68. package/package.json +2 -1
  69. package/dist/4663.js +0 -1
@@ -8,199 +8,302 @@
8
8
  import "@/components/button/Button";
9
9
  import "@/components/icon/Icon";
10
10
  import { LitElement, PropertyValues } from "lit-element";
11
- import { PlacementType, PopoverRoleType, StrategyType } from "./Popover.types";
12
- export declare namespace Popover {
13
- const ELEMENT_base: typeof LitElement & import("@/mixins/FocusTrapMixin").AnyConstructor<import("@/mixins/FocusTrapMixin").FocusTrapClass & import("@/mixins/FocusTrapMixin").FocusTrapInterface & import("../../mixins/FocusMixin").FocusClass>;
14
- /**
15
- * @fires popover-open-changed - Fired when the popover is opened or closed.
16
- */
17
- export class ELEMENT extends ELEMENT_base {
18
- /**
19
- * The placement of the popover relative to the trigger element.
20
- *
21
- * This property specifies where the popover should appear in relation to the trigger element.
22
- * The default placement is "bottom", but it can be customized to other positions such as "top", "left", or "right".
23
- *
24
- * @type {PlacementType}
25
- */
26
- placement: PlacementType;
27
- /**
28
- * The positioning strategy for the popover.
29
- *
30
- * This property specifies how the popover is positioned relative to the trigger element.
31
- * It accepts two values:
32
- * - `"absolute"`: The popover is positioned relative to the nearest positioned ancestor.
33
- * - `"fixed"`: The popover is positioned relative to the viewport, allowing it to escape parent containers with `overflow: hidden` or `overflow: auto`.
34
- *
35
- * By default, the positioning strategy is `"absolute"`. Use `"fixed"` if the popover needs to escape parent boundaries.
36
- *
37
- * @type {StrategyType}
38
- */
39
- positioningStrategy?: StrategyType;
40
- /**
41
- * Indicates whether the popover is open.
42
- *
43
- * This property controls the visibility of the popover. When set to true, the popover is displayed.
44
- * When set to false, the popover is hidden.
45
- *
46
- * @type {boolean}
47
- */
48
- isOpen: boolean;
49
- /**
50
- * Indicates whether the arrow should be shown on the popover.
51
- *
52
- * This property controls the visibility of the arrow on the popover. When set to true, the arrow is displayed.
53
- * When set to false, the arrow is hidden.
54
- *
55
- * @type {boolean}
56
- */
57
- showArrow: boolean;
58
- /**
59
- * Indicates whether the close button should be shown on the popover.
60
- *
61
- * This property controls the visibility of the close button on the popover. When set to true, the close button is displayed.
62
- * When set to false, the close button is hidden.
63
- *
64
- * @type {boolean}
65
- */
66
- showClose?: boolean | undefined;
67
- /**
68
- * Indicates whether the popover is interactive.
69
- *
70
- * When set to true, the popover will allow user interactions within it.
71
- * This property is used to determine if the popover should trap focus.
72
- *
73
- * @type {boolean}
74
- */
75
- interactive: boolean;
76
- /**
77
- * The role attribute for the popover.
78
- *
79
- * This property specifies the `role` attribute for the popover, which defines its role in the accessibility tree.
80
- * The default role is "dialog", but it can be customized to "dialog", "menu" or "tooltip.
81
- *
82
- * @type {PopoverRoleType}
83
- */
84
- role: PopoverRoleType;
85
- /**
86
- * The accessible label for the popover.
87
- *
88
- * This property specifies the `aria-label` attribute for the popover, which provides an accessible name for the popover element.
89
- * It is used by screen readers to announce the purpose of the popover to users with visual impairments.
90
- *
91
- * @type {string | null}
92
- */
93
- ariaLabel: string | null;
94
- /**
95
- * The offset distance (in pixels) from the trigger element.
96
- *
97
- * This property specifies the distance between the trigger element and the popover.
98
- * It is used to control the spacing between the trigger element and the popover when the popover is displayed.
99
- *
100
- * @type {number}
101
- */
102
- offsetDistance: number;
103
- /**
104
- * The slot element that contains the trigger element for the popover.
105
- *
106
- * This property is used to query the slot with the name "triggerElement" and store a reference to it.
107
- * The trigger element is the element that, when interacted with, will open or close the popover.
108
- *
109
- * @type {HTMLSlotElement}
110
- */
111
- triggerSlot: HTMLSlotElement;
112
- /**
113
- * The popover container element.
114
- *
115
- * This property is used to query the popover container element in the DOM.
116
- * The popover container is the main element that contains the popover content.
117
- *
118
- * @type {HTMLDivElement}
119
- */
120
- popoverContainer: HTMLDivElement;
121
- /**
122
- * The popover arrow element.
123
- *
124
- * This property is used to query the popover arrow element in the DOM.
125
- * The popover arrow is the element that visually connects the popover to the trigger element.
126
- *
127
- * @type {HTMLDivElement}
128
- */
129
- popoverArrow: HTMLDivElement;
130
- /**
131
- * The event that triggers the popover.
132
- *
133
- * This property specifies the event that will trigger the popover to open or close.
134
- * The default event is "click", but it can be customized to other events such as "mouseenter" or "focus".
135
- *
136
- * @type {string}
137
- */
138
- trigger?: string;
139
- /**
140
- * Indicates whether the popover should use an inverted color scheme.
141
- *
142
- * When set to `true`, the popover will invert its background color and text color.
143
- *
144
- * @type {boolean}
145
- */
146
- inverted: boolean;
147
- /**
148
- * The trigger element for the popover.
149
- *
150
- * This property holds a reference to the trigger element that, when interacted with, will open or close the popover.
151
- *
152
- * @type {HTMLElement | null}
153
- */
154
- private triggerElement;
155
- /**
156
- * The Popper.js instance used to manage the positioning of the popover.
157
- *
158
- * This instance is created when the popover is opened and destroyed when the popover is closed.
159
- * It is used to handle the positioning and alignment of the popover relative to the trigger element.
160
- */
161
- private popperInstance;
162
- /**
163
- * If mouse is over the trigger element or popover container.
164
- *
165
- * This property is used when both focus and mouse triggers are present
166
- * When focus leaves the trigger element if mouse is hovering we should not close the popover
167
- */
168
- private isMouseOver;
169
- static get styles(): import("lit-element").CSSResult[];
170
- connectedCallback(): void;
171
- disconnectedCallback(): void;
172
- private setupTriggerEvents;
173
- onOutsideOverlayClick: (event: MouseEvent) => void;
174
- onWindowBlurEvent: () => void;
175
- onOutsideOverlayKeydown: (event: KeyboardEvent) => Promise<void>;
176
- private handleTriggerElementSlotChange;
177
- private onContentSlotChanged;
178
- onTriggerElementClicked: () => void;
179
- onTriggerElementKeydown: (event: KeyboardEvent) => Promise<void>;
180
- onFocusInTrigger: () => void;
181
- onFocusOutTrigger: () => void;
182
- onMouseEnteredTriggerOrPopup: (_event: MouseEvent) => void;
183
- onMouseLeaveTriggerOrPopup: (_event: MouseEvent) => void;
184
- private shouldStayOpenOnTriggerFocus;
185
- private readonly setIsOpenDebounced;
186
- protected firstUpdated(changedProperties: PropertyValues): void;
187
- private focusInsideOverlay;
188
- private focusOnTrigger;
189
- private toggleOverlay;
190
- private handleCreatePopperFirstUpdate;
191
- private createInstance;
192
- private destroyInstance;
193
- protected updated(changedProperties: PropertyValues): void;
194
- private isOpenUpdated;
195
- private dispatchPopoverIsOpenChanged;
196
- private get popoverClassMap();
197
- private get renderPopoverTemplate();
198
- render(): import("lit-element").TemplateResult;
199
- }
200
- export {};
11
+ import { PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger } from "./Popover.types";
12
+ declare const Popover_base: typeof LitElement & import("@/mixins/FocusTrapMixin").AnyConstructor<import("@/mixins/FocusTrapMixin").FocusTrapClass & import("@/mixins/FocusTrapMixin").FocusTrapInterface & import("../../mixins/FocusMixin").FocusClass>;
13
+ /**
14
+ * Popover component is a lightweight floating UI element that displays additional content when triggered.
15
+ * It can be used for tooltips, dropdowns, or contextual menus.
16
+ * The popover automatically positions itself based on available space and
17
+ * supports dynamic height adjustments with scrollable content when needed。
18
+ *
19
+ * @dependency md-button
20
+ * @dependency md-icon
21
+ *
22
+ * @tagname md-popover
23
+ *
24
+ * @event shown - This event is dispatched when the popover is shown
25
+ * @event hidden - This event is dispatched when the popover is hidden
26
+ * @event created - This event is dispatched when the popover is created (added to the DOM)
27
+ * @event destroyed - This event is dispatched when the popover is destroyed (removed from the DOM)
28
+ *
29
+ * @cssproperty --md-popover-arrow-border-radius - radius of the arrow border
30
+ * @cssproperty --md-popover-arrow-border - border of the arrow
31
+ * @cssproperty --popover-bg-color - primary background color of the popover
32
+ * @cssproperty --popover-border-color - border color of the popover
33
+ * @cssproperty --popover-text-color - text color of the popover
34
+ * @cssproperty --popover-inverted-bg-color - inverted background color of the popover
35
+ * @cssproperty --popover-inverted-border-color - inverted border color of the popover
36
+ * @cssproperty --popover-inverted-text-color - inverted text color of the popover
37
+ * @cssproperty --md-popover-elevation-3 - elevation of the popover
38
+ * @cssproperty --md-popover-max-width - max width of the popover
39
+ * @cssproperty --md-popover-max-height - max height of the popover
40
+ *
41
+ * @slot - Default slot for the popover content
42
+ *
43
+ */
44
+ export declare class Popover extends Popover_base {
45
+ /**
46
+ * The unique ID of the popover.
47
+ */
48
+ id: string;
49
+ /**
50
+ * The ID of the element that triggers the popover.
51
+ * This attribute is required for the popover to work.
52
+ */
53
+ triggerID: string;
54
+ /**
55
+ * Determines the events that cause the Popover to show.
56
+ * Multiple event names should be separated by spaces.
57
+ * For example to allow both click and hover, use 'click mouseenter' as the trigger.
58
+ * - **click**
59
+ * - **mouseenter**
60
+ * - **focusin**
61
+ * - **manual**
62
+ * @default click
63
+ */
64
+ trigger: PopoverTrigger;
65
+ /**
66
+ * The placement of the popover.
67
+ * - **top**
68
+ * - **top-start**
69
+ * - **top-end**
70
+ * - **bottom**
71
+ * - **bottom-start**
72
+ * - **bottom-end**
73
+ * - **left**
74
+ * - **left-start**
75
+ * - **left-end**
76
+ * - **right**
77
+ * - **right-start**
78
+ * - **right-end**
79
+ * @default bottom
80
+ */
81
+ placement: PopoverPlacement;
82
+ /**
83
+ * The positioning strategy for the popover.
84
+ * - **absolute** - Position relative to closest positioned ancestor or the document body
85
+ * - **fixed** - Position relative to the viewport
86
+ * @default absolute
87
+ */
88
+ strategy: PopoverStrategy;
89
+ /**
90
+ * Color of the popover
91
+ * - **tonal**
92
+ * - **contrast**
93
+ * @default tonal
94
+ */
95
+ color: PopoverColor;
96
+ /**
97
+ * The visibility of the popover.
98
+ * @default false
99
+ */
100
+ visible: boolean;
101
+ /**
102
+ * The offset of the popover.
103
+ * @default 4
104
+ */
105
+ offset: number;
106
+ /**
107
+ * Determines whether the focus trap is enabled.
108
+ * If true, focus will be restricted to the content within this component.
109
+ * @default false
110
+ */
111
+ focusTrap: boolean;
112
+ /**
113
+ * Prevent outside scrolling when popover show.
114
+ * @default false
115
+ */
116
+ preventScroll: boolean;
117
+ /**
118
+ * The arrow visibility of the popover.
119
+ * @default false
120
+ */
121
+ showArrow: boolean;
122
+ /**
123
+ * The close button visibility of the popover.
124
+ * @default false
125
+ */
126
+ closeButton: boolean;
127
+ /**
128
+ * Determines whether the popover is interactive。
129
+ * @default false
130
+ */
131
+ interactive: boolean;
132
+ /**
133
+ * The delay of the show/hide popover.
134
+ * @default 0,0
135
+ */
136
+ delay: string;
137
+ /**
138
+ * Hide popover on escape key press.
139
+ * @default false
140
+ */
141
+ hideOnEscape: boolean;
142
+ /**
143
+ * Hide popover on blur.
144
+ * @default false
145
+ */
146
+ hideOnBlur: boolean;
147
+ /**
148
+ * Hide on outside click of the popover.
149
+ * @default false
150
+ */
151
+ hideOnOutsideClick: boolean;
152
+ /**
153
+ * The focus back to trigger after the popover hide.
154
+ * @default false
155
+ */
156
+ focusBackToTrigger: boolean;
157
+ /**
158
+ * Determines whether the popover with backdrop.
159
+ * Other than popover and trigger element, the rest of the screen will be covered with a backdrop.
160
+ * @default false
161
+ */
162
+ backdrop: boolean;
163
+ /**
164
+ * Changes the placement of popover to keep it in view when scrolling.
165
+ * @default true
166
+ */
167
+ flip: boolean;
168
+ /**
169
+ * Changes the size of popover to keep it in view when scrolling.
170
+ * @default false
171
+ */
172
+ size: boolean;
173
+ /**
174
+ * The z-index of the popover.
175
+ * @default 1000
176
+ */
177
+ zIndex: number;
178
+ /**
179
+ * Element ID that the popover append to.
180
+ * @default ''
181
+ */
182
+ appendTo: string;
183
+ /**
184
+ * aria-label attribute to be set for close button accessibility.
185
+ * @default null
186
+ */
187
+ closeButtonAriaLabel: string | null;
188
+ /**
189
+ * Role of the popover
190
+ * @default dialog
191
+ */
192
+ role: HTMLElement["role"];
193
+ /**
194
+ * aria-labelledby for an interactive popover only, defaults to the trigger component id.
195
+ * Used in nested cases where the triggerComponent isn't the actual button.
196
+ */
197
+ ariaLabelledby: string | null;
198
+ /**
199
+ * aria-describedby of the popover.
200
+ */
201
+ ariaDescribedby: string | null;
202
+ /**
203
+ * Disable aria-expanded attribute on trigger element.
204
+ * Make sure to set this to false when the popover is interactive.
205
+ * @default false
206
+ */
207
+ disableAriaExpanded: boolean;
208
+ arrowElement: HTMLElement | null;
209
+ triggerElement: HTMLElement | null;
210
+ /** @internal */
211
+ private hoverTimer;
212
+ /** @internal */
213
+ private isTriggerClicked;
214
+ /** @internal */
215
+ private openDelay;
216
+ /** @internal */
217
+ private closeDelay;
218
+ /** @internal */
219
+ private readonly utils;
220
+ /** @internal */
221
+ backdropElement: HTMLElement | null;
222
+ useLegacyFindFocusable: () => boolean;
223
+ constructor();
224
+ protected firstUpdated(changedProperties: PropertyValues): Promise<void>;
225
+ disconnectedCallback(): Promise<void>;
226
+ /**
227
+ * Sets up the trigger event listeners based on the trigger type.
228
+ */
229
+ setupTriggerListener(): void;
230
+ /**
231
+ * Removes the trigger event listeners.
232
+ */
233
+ removeEventListeners(): void;
234
+ protected updated(changedProperties: PropertyValues): Promise<void>;
235
+ /**
236
+ * Handles the outside click event to close the popover.
237
+ * Uses event.composedPath() to handle clicks across Shadow DOM boundaries.
238
+ *
239
+ * @param event - The mouse event.
240
+ */
241
+ private readonly onOutsidePopoverClick;
242
+ /**
243
+ * Handles the escape keydown event to close the popover.
244
+ *
245
+ * @param event - The keyboard event.
246
+ */
247
+ private readonly onEscapeKeydown;
248
+ /**
249
+ * Handles the popover focus out event.
250
+ *
251
+ * @param event - The focus event.
252
+ */
253
+ private readonly onPopoverFocusOut;
254
+ /**
255
+ * Handles the popover visibility change and position the popover.
256
+ * Handles the exit event to close the popover.
257
+ *
258
+ * @param oldValue - The old value of the visible property.
259
+ * @param newValue - The new value of the visible property.
260
+ */
261
+ private isOpenUpdated;
262
+ /**
263
+ * Starts the close delay timer.
264
+ * If the popover is not interactive, it will close the popover after the delay.
265
+ */
266
+ private readonly startCloseDelay;
267
+ /**
268
+ * Cancels the close delay timer.
269
+ */
270
+ readonly cancelCloseDelay: () => void;
271
+ /**
272
+ * Shows the popover.
273
+ * By default (`useOpenDelay = false`), or if `openDelay` is 0 or less, the popover opens immediately.
274
+ * If `useOpenDelay` is true and `openDelay` is greater than 0, the `openDelay` will be applied before showing the popover.
275
+ * This allows programmatic calls (e.g., for `trigger="manual"`) to optionally use the `openDelay`.
276
+ * @param {boolean} [useOpenDelay=false] - Indicates if the `openDelay` should be applied.
277
+ */
278
+ showPopover: (useOpenDelay?: boolean) => void;
279
+ /**
280
+ * Hides the popover.
281
+ */
282
+ hidePopover: () => void;
283
+ /**
284
+ * Toggles the popover visibility.
285
+ */
286
+ togglePopoverVisible: () => void;
287
+ private readonly onMouseEnterTrigger;
288
+ private readonly onFocusInTrigger;
289
+ private readonly onTriggerClick;
290
+ private isMouseOverTrigger;
291
+ /**
292
+ * Sets the focusable elements inside the popover.
293
+ */
294
+ private handleCreatePopoverFirstUpdate;
295
+ /**
296
+ * Positions the popover based on the trigger element.
297
+ * It also handles the flip, size and arrow placement.
298
+ * It uses the floating-ui/dom library to calculate the position.
299
+ */
300
+ private positionPopover;
301
+ render(): import("lit-element").TemplateResult;
302
+ static get styles(): import("lit-element").CSSResult[];
201
303
  }
202
304
  declare global {
203
305
  interface HTMLElementTagNameMap {
204
- "md-popover": Popover.ELEMENT;
306
+ "md-popover": Popover;
205
307
  }
206
308
  }
309
+ export {};
@@ -0,0 +1,34 @@
1
+ import { type Popover } from "./Popover";
2
+ export declare class PopoverEventManager {
3
+ /**
4
+ * Dispatches a custom event for the popover.
5
+ *
6
+ * @param eventName - The name of the event.
7
+ * @param instance - The popover instance.
8
+ */
9
+ static dispatchPopoverEvent(eventName: string, instance: Popover): void;
10
+ /**
11
+ * Custom event that is fired when the popover is shown.
12
+ *
13
+ * @param instance - The popover instance.
14
+ */
15
+ static onShowPopover(instance: Popover): void;
16
+ /**
17
+ * Custom event that is fired when the popover is hidden.
18
+ *
19
+ * @param instance - The popover instance.
20
+ */
21
+ static onHidePopover(instance: Popover): void;
22
+ /**
23
+ * Custom event that is fired when the popover is created.
24
+ *
25
+ * @param instance - The popover instance.
26
+ */
27
+ static onCreatedPopover(instance: Popover): void;
28
+ /**
29
+ * Custom event that is fired when the popover is destroyed.
30
+ *
31
+ * @param instance - The popover instance.
32
+ */
33
+ static onDestroyedPopover(instance: Popover): void;
34
+ }
@@ -0,0 +1,45 @@
1
+ import { type Popover } from "./Popover";
2
+ /**
3
+ * Manages a stack of popovers to control their order and lifecycle.
4
+ * This class allows adding, removing, and retrieving popovers
5
+ * while maintaining their stacking behavior.
6
+ *
7
+ */
8
+ declare class PopoverStack {
9
+ /**
10
+ * Stack to maintain the order of popovers
11
+ * @internal
12
+ */
13
+ private stack;
14
+ /**
15
+ * Adds a popover to the stack
16
+ *
17
+ * @param popover - Popover instance
18
+ */
19
+ push(popover: Popover): void;
20
+ /**
21
+ * Removes the last popover from the stack
22
+ *
23
+ * @returns The last popover in the stack
24
+ */
25
+ pop(): Popover | undefined;
26
+ /**
27
+ * Returns the last popover in the stack
28
+ * without removing it
29
+ *
30
+ * @returns The last popover in the stack
31
+ */
32
+ peek(): Popover | undefined;
33
+ /**
34
+ * Removes a popover from the stack
35
+ *
36
+ * @param popover - Popover instance
37
+ */
38
+ remove(popover: Popover): void;
39
+ /**
40
+ * Clears the stack
41
+ */
42
+ clear(): void;
43
+ }
44
+ export declare const popoverStack: PopoverStack;
45
+ export {};
@@ -1,8 +1,20 @@
1
+ import { COLOR, POPOVER_PLACEMENT, POPOVER_STRATEGY, TRIGGER } from "./Popover.constants";
2
+ export type ValueOf<T> = T[keyof T];
3
+ type PopoverPlacement = ValueOf<typeof POPOVER_PLACEMENT>;
4
+ type PopoverColor = ValueOf<typeof COLOR>;
5
+ type PopoverTrigger = ValueOf<typeof TRIGGER> | `${ValueOf<typeof TRIGGER>} ${ValueOf<typeof TRIGGER>}`;
6
+ type PopoverStrategy = ValueOf<typeof POPOVER_STRATEGY>;
1
7
  export declare const Placement: readonly ["auto", "auto-start", "auto-end", "left-start", "left", "left-end", "right-start", "right", "right-end", "top-start", "top", "top-end", "bottom-start", "bottom", "bottom-end"];
2
- export declare const ARROW_HEIGHT = 16;
8
+ interface Events {
9
+ onShownEvent: Event;
10
+ onHiddenEvent: Event;
11
+ onCreatedEvent: Event;
12
+ onDestroyedEvent: Event;
13
+ }
3
14
  export declare const Strategy: readonly ["fixed", "absolute"];
4
15
  export declare const PopoverRole: readonly ["dialog", "menu", "tooltip"];
5
16
  export declare const Triggers: readonly ["click", "mouseenter", "manual"];
6
17
  export type PlacementType = (typeof Placement)[number];
7
18
  export type StrategyType = (typeof Strategy)[number];
8
19
  export type PopoverRoleType = (typeof PopoverRole)[number];
20
+ export type { Events, PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger };