@momentum-ui/web-components 2.22.16 → 2.23.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/dist/1323.js +2 -2
- package/dist/1439.js +1 -1
- package/dist/3135.js +1 -1
- package/dist/3820.js +1 -0
- package/dist/587.js +1 -1
- package/dist/6015.js +1 -1
- package/dist/6652.js +1 -1
- package/dist/6677.js +1 -1
- package/dist/754.js +1 -1
- package/dist/8004.js +1 -0
- package/dist/8612.js +3 -3
- package/dist/9058.js +1 -1
- package/dist/9130.js +1 -1
- package/dist/assets/icons/svg/voxon-horizontal.svg +1 -0
- package/dist/assets/icons/svg/voxon-mark.svg +1 -0
- package/dist/chunks/{md-7044.js → md-4663.js} +1 -1
- package/dist/comp/md-card-ai-entry.js +1 -1
- package/dist/comp/md-card-entry.js +1 -1
- package/dist/comp/md-card.js +1 -1
- package/dist/comp/md-coachmark-popover-entry.js +37 -41
- package/dist/comp/md-coachmark-popover.js +1 -1
- package/dist/comp/md-combobox-entry.js +1 -1
- package/dist/comp/md-combobox.js +1 -1
- package/dist/comp/md-date-range-picker-entry.js +1 -1
- package/dist/comp/md-date-range-picker.js +1 -1
- package/dist/comp/md-date-time-picker-entry.js +1 -1
- package/dist/comp/md-date-time-picker.js +1 -1
- package/dist/comp/md-datepicker-entry.js +1 -1
- package/dist/comp/md-datepicker.js +1 -1
- package/dist/comp/md-draggable-entry.js +1 -1
- package/dist/comp/md-draggable.js +1 -1
- package/dist/comp/md-floating-modal-entry.js +3 -3
- package/dist/comp/md-floating-modal.js +1 -1
- package/dist/comp/md-menu-overlay-entry.js +2 -2
- package/dist/comp/md-phone-input-entry.js +1 -1
- package/dist/comp/md-phone-input.js +1 -1
- package/dist/comp/md-popover-entry.js +17 -26
- package/dist/comp/md-popover.js +1 -1
- package/dist/comp/md-tabs-entry.js +1 -1
- package/dist/comp/md-task-item-entry.js +19 -17
- package/dist/comp/md-timepicker-entry.js +1 -1
- package/dist/comp/md-timepicker.js +1 -1
- package/dist/index-entry.js +58 -60
- package/dist/index.js +1 -1
- package/dist/types/components/coachmark-popover/CoachmarkPopover.d.ts +1 -0
- package/dist/types/components/combobox/ComboBox.d.ts +1 -1
- package/dist/types/components/floating-modal/FloatingModal.d.ts +1 -0
- package/dist/types/components/menu-overlay/MenuOverlay.d.ts +0 -1
- package/dist/types/components/popover/Popover.constants.d.ts +53 -0
- package/dist/types/components/popover/Popover.d.ts +288 -192
- package/dist/types/components/popover/Popover.events.d.ts +34 -0
- package/dist/types/components/popover/Popover.stack.d.ts +45 -0
- package/dist/types/components/popover/Popover.types.d.ts +13 -1
- package/dist/types/components/popover/Popover.utils.d.ts +63 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/helpers.d.ts +2 -0
- package/package.json +2 -1
- package/dist/4663.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require("./7678"),require("./7103"),require("./1890"),require("./6272"),require("./6325"),require("./6283"),require("./9217"),require("./5830"),require("./8889"),require("./8210"),require("./3135"),require("./1598"),require("./4977"),require("./1572"),require("./6366"),require("./7251"),require("./4974"),require("./2243"),require("./7919"),require("./3553"),require("./6700"),require("./528"),require("./4548"),require("./6795"),require("./76"),require("./1392"),require("./9164"),require("./
|
|
1
|
+
require("./7678"),require("./7103"),require("./1890"),require("./6272"),require("./6325"),require("./6283"),require("./9217"),require("./5830"),require("./8889"),require("./8210"),require("./3135"),require("./1598"),require("./4977"),require("./1572"),require("./6366"),require("./7251"),require("./4974"),require("./2243"),require("./7919"),require("./3553"),require("./6700"),require("./528"),require("./4548"),require("./6795"),require("./76"),require("./1392"),require("./9164"),require("./8004"),require("./1214"),require("./1625"),require("./3625"),require("./6067"),require("./8841"),require("./3112"),require("./3866"),require("./1107"),require("./7330"),require("./7092"),require("./9719"),require("./6979"),require("./9130"),require("./6273"),require("./8612"),require("./9618"),require("./8521"),require("./2019"),require("./779"),require("./573"),require("./5801"),require("./2043"),require("./8171"),require("./2798"),require("./5467"),require("./2984"),require("./1869"),require("./2215"),require("./4392"),require("./630"),require("./3604"),require("./7833"),require("./8728"),require("./8227"),require("./1250"),require("./1705"),require("./7997"),require("./7875"),require("./6400"),require("./587"),require("./6441"),require("./6015"),require("./3663"),module.exports=require("./index-entry");
|
|
@@ -27,6 +27,7 @@ export declare namespace CoachmarkPopover {
|
|
|
27
27
|
* @type {PlacementType}
|
|
28
28
|
*/
|
|
29
29
|
placement: PlacementType;
|
|
30
|
+
triggerID: string;
|
|
30
31
|
/**
|
|
31
32
|
* The name of the icon to be displayed before the title in the header.
|
|
32
33
|
* If set, the specified icon will be rendered before the title.
|
|
@@ -204,7 +204,7 @@ export declare namespace ComboBox {
|
|
|
204
204
|
checkForVirtualScroll(): boolean;
|
|
205
205
|
rangeChanged(): void;
|
|
206
206
|
getCustomErrorContent(): DocumentFragment;
|
|
207
|
-
getCustomContent(option: string | OptionMember):
|
|
207
|
+
getCustomContent(option: string | OptionMember): TemplateResult | DocumentFragment;
|
|
208
208
|
renderGroupLabelHeader(option: OptionMember, optionIndex: number): TemplateResult;
|
|
209
209
|
renderWithoutVirtualScroll(): import("lit-html").DirectiveFn;
|
|
210
210
|
highlightingSearchedText(option: OptionMember | string): TemplateResult[];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
declare const POPOVER_PLACEMENT: {
|
|
2
|
+
readonly LEFT_START: "left-start";
|
|
3
|
+
readonly LEFT: "left";
|
|
4
|
+
readonly LEFT_END: "left-end";
|
|
5
|
+
readonly RIGHT_START: "right-start";
|
|
6
|
+
readonly RIGHT: "right";
|
|
7
|
+
readonly RIGHT_END: "right-end";
|
|
8
|
+
readonly TOP_START: "top-start";
|
|
9
|
+
readonly TOP: "top";
|
|
10
|
+
readonly TOP_END: "top-end";
|
|
11
|
+
readonly BOTTOM_START: "bottom-start";
|
|
12
|
+
readonly BOTTOM: "bottom";
|
|
13
|
+
readonly BOTTOM_END: "bottom-end";
|
|
14
|
+
};
|
|
15
|
+
declare const POPOVER_STRATEGY: {
|
|
16
|
+
readonly FIXED: "fixed";
|
|
17
|
+
readonly ABSOLUTE: "absolute";
|
|
18
|
+
};
|
|
19
|
+
declare const TRIGGER: {
|
|
20
|
+
readonly CLICK: "click";
|
|
21
|
+
readonly MOUSEENTER: "mouseenter";
|
|
22
|
+
readonly FOCUSIN: "focusin";
|
|
23
|
+
readonly MANUAL: "manual";
|
|
24
|
+
};
|
|
25
|
+
declare const COLOR: {
|
|
26
|
+
readonly TONAL: "tonal";
|
|
27
|
+
readonly CONTRAST: "contrast";
|
|
28
|
+
};
|
|
29
|
+
declare const DEFAULTS: {
|
|
30
|
+
readonly PLACEMENT: "bottom";
|
|
31
|
+
readonly STRATEGY: "absolute";
|
|
32
|
+
readonly TRIGGER: "click";
|
|
33
|
+
readonly COLOR: "tonal";
|
|
34
|
+
readonly OFFSET: 4;
|
|
35
|
+
readonly VISIBLE: false;
|
|
36
|
+
readonly ARROW: false;
|
|
37
|
+
readonly CLOSE_BUTTON: false;
|
|
38
|
+
readonly FOCUS_TRAP: false;
|
|
39
|
+
readonly INTERACTIVE: false;
|
|
40
|
+
readonly PREVENT_SCROLL: false;
|
|
41
|
+
readonly HIDE_ON_ESCAPE: false;
|
|
42
|
+
readonly HIDE_ON_BLUR: false;
|
|
43
|
+
readonly HIDE_ON_CLICK_OUTSIDE: false;
|
|
44
|
+
readonly FOCUS_BACK: false;
|
|
45
|
+
readonly BACKDROP: false;
|
|
46
|
+
readonly FLIP: true;
|
|
47
|
+
readonly SIZE: false;
|
|
48
|
+
readonly DELAY: "0,0";
|
|
49
|
+
readonly ROLE: "dialog";
|
|
50
|
+
readonly Z_INDEX: 1000;
|
|
51
|
+
readonly DISABLE_ARIA_EXPANDED: false;
|
|
52
|
+
};
|
|
53
|
+
export { COLOR, DEFAULTS, POPOVER_PLACEMENT, POPOVER_STRATEGY, TRIGGER };
|
|
@@ -8,200 +8,296 @@
|
|
|
8
8
|
import "@/components/button/Button";
|
|
9
9
|
import "@/components/icon/Icon";
|
|
10
10
|
import { LitElement, PropertyValues } from "lit-element";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
+
*/
|
|
274
|
+
showPopover: () => void;
|
|
275
|
+
/**
|
|
276
|
+
* Hides the popover.
|
|
277
|
+
*/
|
|
278
|
+
hidePopover: () => void;
|
|
279
|
+
/**
|
|
280
|
+
* Toggles the popover visibility.
|
|
281
|
+
*/
|
|
282
|
+
togglePopoverVisible: () => void;
|
|
283
|
+
private onTriggerClick;
|
|
284
|
+
private isMouseOverTrigger;
|
|
285
|
+
/**
|
|
286
|
+
* Sets the focusable elements inside the popover.
|
|
287
|
+
*/
|
|
288
|
+
private handleCreatePopoverFirstUpdate;
|
|
289
|
+
/**
|
|
290
|
+
* Positions the popover based on the trigger element.
|
|
291
|
+
* It also handles the flip, size and arrow placement.
|
|
292
|
+
* It uses the floating-ui/dom library to calculate the position.
|
|
293
|
+
*/
|
|
294
|
+
private positionPopover;
|
|
295
|
+
render(): import("lit-element").TemplateResult;
|
|
296
|
+
static get styles(): import("lit-element").CSSResult[];
|
|
202
297
|
}
|
|
203
298
|
declare global {
|
|
204
299
|
interface HTMLElementTagNameMap {
|
|
205
|
-
"md-popover": Popover
|
|
300
|
+
"md-popover": Popover;
|
|
206
301
|
}
|
|
207
302
|
}
|
|
303
|
+
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
|
+
}
|