@sankhyalabs/ezui 5.22.0-dev.96 → 5.22.0-dev.97

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 (55) hide show
  1. package/dist/cjs/ez-card-item_2.cjs.entry.js +1416 -7
  2. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-popover-plus_3.cjs.entry.js +198 -0
  4. package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-search.cjs.entry.js +28 -158
  6. package/dist/cjs/ezui.cjs.js +1 -1
  7. package/dist/cjs/index-a7b0c73d.js +4 -4
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/searchFormatters-b7e1ed1e.js +23 -0
  10. package/dist/collection/collection-manifest.json +2 -1
  11. package/dist/collection/components/ez-card-item/ez-card-item.css +1 -3
  12. package/dist/collection/components/ez-chip/ez-chip.css +5 -1
  13. package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +49 -2
  14. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +2 -2
  15. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +72 -12
  16. package/dist/collection/components/ez-scroller/ez-scroller.css +3 -0
  17. package/dist/collection/components/ez-search/ez-search.css +0 -219
  18. package/dist/collection/components/ez-search/ez-search.js +28 -167
  19. package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css +227 -0
  20. package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js +289 -0
  21. package/dist/collection/components/ez-search/utils/searchFormatters.js +18 -0
  22. package/dist/custom-elements/index.d.ts +6 -0
  23. package/dist/custom-elements/index.js +169 -177
  24. package/dist/esm/ez-card-item_2.entry.js +1416 -7
  25. package/dist/esm/ez-chip.entry.js +1 -1
  26. package/dist/esm/ez-popover-plus_3.entry.js +192 -0
  27. package/dist/esm/ez-scroller_2.entry.js +1 -1
  28. package/dist/esm/ez-search.entry.js +29 -159
  29. package/dist/esm/ezui.js +1 -1
  30. package/dist/esm/index-baa5e267.js +4 -4
  31. package/dist/esm/loader.js +1 -1
  32. package/dist/esm/searchFormatters-8229207e.js +20 -0
  33. package/dist/ezui/ezui.esm.js +1 -1
  34. package/dist/ezui/p-288631d1.entry.js +1 -0
  35. package/dist/ezui/p-31da1b57.entry.js +1 -0
  36. package/dist/ezui/p-40a60148.js +1 -0
  37. package/dist/ezui/p-5aca7386.entry.js +1 -0
  38. package/dist/ezui/p-b7706b43.entry.js +1 -0
  39. package/dist/ezui/{p-17be134a.entry.js → p-e06a9886.entry.js} +1 -1
  40. package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +9 -1
  41. package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +12 -2
  42. package/dist/types/components/ez-search/ez-search.d.ts +3 -13
  43. package/dist/types/components/ez-search/subcomponent/search-list/search-list.d.ts +23 -0
  44. package/dist/types/components/ez-search/utils/searchFormatters.d.ts +2 -0
  45. package/dist/types/components.d.ts +72 -4
  46. package/package.json +1 -1
  47. package/react/components.d.ts +1 -0
  48. package/react/components.js +1 -0
  49. package/react/components.js.map +1 -1
  50. package/dist/cjs/ez-popover-core_2.cjs.entry.js +0 -1504
  51. package/dist/esm/ez-popover-core_2.entry.js +0 -1499
  52. package/dist/ezui/p-58783dcf.entry.js +0 -1
  53. package/dist/ezui/p-65f471bc.entry.js +0 -1
  54. package/dist/ezui/p-7bd15498.entry.js +0 -1
  55. package/dist/ezui/p-990b4318.entry.js +0 -1
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
 
8
- const ezCardItemCss = ":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--detail-label--font-weight: var(--text-weight--large, 400);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item__detail{\n display: inline-block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: var(--opacity--soft);\n}\n\n\n\n.card-item__expanded {\n padding: var(--space--medium);\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail{\n cursor: pointer;\n}\n\n.card-item__detail-default:not(:last-child) {\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--detail-label--font-weight);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container_default{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n/* Modo compacto */\n.card-item__compacted {\n padding: var(--space--medium);\n padding-bottom: 0px;\n padding-right: 0px;\n}\n\n.card-item__detail-label-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__detail-value-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__title-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__details-container__left-compacted{\n width: 100%;\n}\n\n.card-item__details-container__right-compacted {\n width: 100%;\n}\n\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";
8
+ const ezCardItemCss = ":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--detail-label--font-weight: var(--text-weight--large, 400);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item__detail{\n display: inline-block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: var(--opacity--soft);\n}\n\n\n\n.card-item__expanded {\n padding: var(--space--medium);\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail{\n cursor: pointer;\n}\n\n.card-item__detail-default:not(:last-child) {\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--detail-label--font-weight);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container_default{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n/* Modo compacto */\n.card-item__compacted {\n padding: var(--space--2xs) var(--space--small);\n}\n\n.card-item__detail-label-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__detail-value-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__title-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__details-container__left-compacted{\n width: 100%;\n}\n\n.card-item__details-container__right-compacted {\n width: 100%;\n}\n\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";
9
9
 
10
10
  const EzCardItem = class {
11
11
  constructor(hostRef) {
@@ -59,18 +59,1427 @@ const EzCardItem = class {
59
59
  };
60
60
  EzCardItem.style = ezCardItemCss;
61
61
 
62
- const multiSelectionBoxMessageCss = ".multi-selection__message{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:320px;text-align:center}.multi-selection__text-message{margin-top:-30px;font-family:var(--font-pattern);font-size:var(--text--meduim);padding:var(--space-xs);color:var(--text--primary)}";
62
+ /**
63
+ * Custom positioning reference element.
64
+ * @see https://floating-ui.com/docs/virtual-elements
65
+ */
66
+ const min = Math.min;
67
+ const max = Math.max;
68
+ const round = Math.round;
69
+ const createCoords = v => ({
70
+ x: v,
71
+ y: v
72
+ });
73
+ const oppositeSideMap = {
74
+ left: 'right',
75
+ right: 'left',
76
+ bottom: 'top',
77
+ top: 'bottom'
78
+ };
79
+ const oppositeAlignmentMap = {
80
+ start: 'end',
81
+ end: 'start'
82
+ };
83
+ function clamp(start, value, end) {
84
+ return max(start, min(value, end));
85
+ }
86
+ function evaluate(value, param) {
87
+ return typeof value === 'function' ? value(param) : value;
88
+ }
89
+ function getSide(placement) {
90
+ return placement.split('-')[0];
91
+ }
92
+ function getAlignment(placement) {
93
+ return placement.split('-')[1];
94
+ }
95
+ function getOppositeAxis(axis) {
96
+ return axis === 'x' ? 'y' : 'x';
97
+ }
98
+ function getAxisLength(axis) {
99
+ return axis === 'y' ? 'height' : 'width';
100
+ }
101
+ function getSideAxis(placement) {
102
+ return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
103
+ }
104
+ function getAlignmentAxis(placement) {
105
+ return getOppositeAxis(getSideAxis(placement));
106
+ }
107
+ function getAlignmentSides(placement, rects, rtl) {
108
+ if (rtl === void 0) {
109
+ rtl = false;
110
+ }
111
+ const alignment = getAlignment(placement);
112
+ const alignmentAxis = getAlignmentAxis(placement);
113
+ const length = getAxisLength(alignmentAxis);
114
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
115
+ if (rects.reference[length] > rects.floating[length]) {
116
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
117
+ }
118
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
119
+ }
120
+ function getExpandedPlacements(placement) {
121
+ const oppositePlacement = getOppositePlacement(placement);
122
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
123
+ }
124
+ function getOppositeAlignmentPlacement(placement) {
125
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
126
+ }
127
+ function getSideList(side, isStart, rtl) {
128
+ const lr = ['left', 'right'];
129
+ const rl = ['right', 'left'];
130
+ const tb = ['top', 'bottom'];
131
+ const bt = ['bottom', 'top'];
132
+ switch (side) {
133
+ case 'top':
134
+ case 'bottom':
135
+ if (rtl) return isStart ? rl : lr;
136
+ return isStart ? lr : rl;
137
+ case 'left':
138
+ case 'right':
139
+ return isStart ? tb : bt;
140
+ default:
141
+ return [];
142
+ }
143
+ }
144
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
145
+ const alignment = getAlignment(placement);
146
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
147
+ if (alignment) {
148
+ list = list.map(side => side + "-" + alignment);
149
+ if (flipAlignment) {
150
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
151
+ }
152
+ }
153
+ return list;
154
+ }
155
+ function getOppositePlacement(placement) {
156
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
157
+ }
158
+ function expandPaddingObject(padding) {
159
+ return {
160
+ top: 0,
161
+ right: 0,
162
+ bottom: 0,
163
+ left: 0,
164
+ ...padding
165
+ };
166
+ }
167
+ function getPaddingObject(padding) {
168
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
169
+ top: padding,
170
+ right: padding,
171
+ bottom: padding,
172
+ left: padding
173
+ };
174
+ }
175
+ function rectToClientRect(rect) {
176
+ const {
177
+ x,
178
+ y,
179
+ width,
180
+ height
181
+ } = rect;
182
+ return {
183
+ width,
184
+ height,
185
+ top: y,
186
+ left: x,
187
+ right: x + width,
188
+ bottom: y + height,
189
+ x,
190
+ y
191
+ };
192
+ }
193
+
194
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
195
+ let {
196
+ reference,
197
+ floating
198
+ } = _ref;
199
+ const sideAxis = getSideAxis(placement);
200
+ const alignmentAxis = getAlignmentAxis(placement);
201
+ const alignLength = getAxisLength(alignmentAxis);
202
+ const side = getSide(placement);
203
+ const isVertical = sideAxis === 'y';
204
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
205
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
206
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
207
+ let coords;
208
+ switch (side) {
209
+ case 'top':
210
+ coords = {
211
+ x: commonX,
212
+ y: reference.y - floating.height
213
+ };
214
+ break;
215
+ case 'bottom':
216
+ coords = {
217
+ x: commonX,
218
+ y: reference.y + reference.height
219
+ };
220
+ break;
221
+ case 'right':
222
+ coords = {
223
+ x: reference.x + reference.width,
224
+ y: commonY
225
+ };
226
+ break;
227
+ case 'left':
228
+ coords = {
229
+ x: reference.x - floating.width,
230
+ y: commonY
231
+ };
232
+ break;
233
+ default:
234
+ coords = {
235
+ x: reference.x,
236
+ y: reference.y
237
+ };
238
+ }
239
+ switch (getAlignment(placement)) {
240
+ case 'start':
241
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
242
+ break;
243
+ case 'end':
244
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
245
+ break;
246
+ }
247
+ return coords;
248
+ }
249
+
250
+ /**
251
+ * Computes the `x` and `y` coordinates that will place the floating element
252
+ * next to a given reference element.
253
+ *
254
+ * This export does not have any `platform` interface logic. You will need to
255
+ * write one for the platform you are using Floating UI with.
256
+ */
257
+ const computePosition$1 = async (reference, floating, config) => {
258
+ const {
259
+ placement = 'bottom',
260
+ strategy = 'absolute',
261
+ middleware = [],
262
+ platform
263
+ } = config;
264
+ const validMiddleware = middleware.filter(Boolean);
265
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
266
+ let rects = await platform.getElementRects({
267
+ reference,
268
+ floating,
269
+ strategy
270
+ });
271
+ let {
272
+ x,
273
+ y
274
+ } = computeCoordsFromPlacement(rects, placement, rtl);
275
+ let statefulPlacement = placement;
276
+ let middlewareData = {};
277
+ let resetCount = 0;
278
+ for (let i = 0; i < validMiddleware.length; i++) {
279
+ const {
280
+ name,
281
+ fn
282
+ } = validMiddleware[i];
283
+ const {
284
+ x: nextX,
285
+ y: nextY,
286
+ data,
287
+ reset
288
+ } = await fn({
289
+ x,
290
+ y,
291
+ initialPlacement: placement,
292
+ placement: statefulPlacement,
293
+ strategy,
294
+ middlewareData,
295
+ rects,
296
+ platform,
297
+ elements: {
298
+ reference,
299
+ floating
300
+ }
301
+ });
302
+ x = nextX != null ? nextX : x;
303
+ y = nextY != null ? nextY : y;
304
+ middlewareData = {
305
+ ...middlewareData,
306
+ [name]: {
307
+ ...middlewareData[name],
308
+ ...data
309
+ }
310
+ };
311
+ if (reset && resetCount <= 50) {
312
+ resetCount++;
313
+ if (typeof reset === 'object') {
314
+ if (reset.placement) {
315
+ statefulPlacement = reset.placement;
316
+ }
317
+ if (reset.rects) {
318
+ rects = reset.rects === true ? await platform.getElementRects({
319
+ reference,
320
+ floating,
321
+ strategy
322
+ }) : reset.rects;
323
+ }
324
+ ({
325
+ x,
326
+ y
327
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
328
+ }
329
+ i = -1;
330
+ }
331
+ }
332
+ return {
333
+ x,
334
+ y,
335
+ placement: statefulPlacement,
336
+ strategy,
337
+ middlewareData
338
+ };
339
+ };
340
+
341
+ /**
342
+ * Resolves with an object of overflow side offsets that determine how much the
343
+ * element is overflowing a given clipping boundary on each side.
344
+ * - positive = overflowing the boundary by that number of pixels
345
+ * - negative = how many pixels left before it will overflow
346
+ * - 0 = lies flush with the boundary
347
+ * @see https://floating-ui.com/docs/detectOverflow
348
+ */
349
+ async function detectOverflow(state, options) {
350
+ var _await$platform$isEle;
351
+ if (options === void 0) {
352
+ options = {};
353
+ }
354
+ const {
355
+ x,
356
+ y,
357
+ platform,
358
+ rects,
359
+ elements,
360
+ strategy
361
+ } = state;
362
+ const {
363
+ boundary = 'clippingAncestors',
364
+ rootBoundary = 'viewport',
365
+ elementContext = 'floating',
366
+ altBoundary = false,
367
+ padding = 0
368
+ } = evaluate(options, state);
369
+ const paddingObject = getPaddingObject(padding);
370
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
371
+ const element = elements[altBoundary ? altContext : elementContext];
372
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
373
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
374
+ boundary,
375
+ rootBoundary,
376
+ strategy
377
+ }));
378
+ const rect = elementContext === 'floating' ? {
379
+ x,
380
+ y,
381
+ width: rects.floating.width,
382
+ height: rects.floating.height
383
+ } : rects.reference;
384
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
385
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
386
+ x: 1,
387
+ y: 1
388
+ } : {
389
+ x: 1,
390
+ y: 1
391
+ };
392
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
393
+ elements,
394
+ rect,
395
+ offsetParent,
396
+ strategy
397
+ }) : rect);
398
+ return {
399
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
400
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
401
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
402
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
403
+ };
404
+ }
405
+
406
+ /**
407
+ * Optimizes the visibility of the floating element by flipping the `placement`
408
+ * in order to keep it in view when the preferred placement(s) will overflow the
409
+ * clipping boundary. Alternative to `autoPlacement`.
410
+ * @see https://floating-ui.com/docs/flip
411
+ */
412
+ const flip$1 = function (options) {
413
+ if (options === void 0) {
414
+ options = {};
415
+ }
416
+ return {
417
+ name: 'flip',
418
+ options,
419
+ async fn(state) {
420
+ var _middlewareData$arrow, _middlewareData$flip;
421
+ const {
422
+ placement,
423
+ middlewareData,
424
+ rects,
425
+ initialPlacement,
426
+ platform,
427
+ elements
428
+ } = state;
429
+ const {
430
+ mainAxis: checkMainAxis = true,
431
+ crossAxis: checkCrossAxis = true,
432
+ fallbackPlacements: specifiedFallbackPlacements,
433
+ fallbackStrategy = 'bestFit',
434
+ fallbackAxisSideDirection = 'none',
435
+ flipAlignment = true,
436
+ ...detectOverflowOptions
437
+ } = evaluate(options, state);
438
+
439
+ // If a reset by the arrow was caused due to an alignment offset being
440
+ // added, we should skip any logic now since `flip()` has already done its
441
+ // work.
442
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
443
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
444
+ return {};
445
+ }
446
+ const side = getSide(placement);
447
+ const initialSideAxis = getSideAxis(initialPlacement);
448
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
449
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
450
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
451
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
452
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
453
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
454
+ }
455
+ const placements = [initialPlacement, ...fallbackPlacements];
456
+ const overflow = await detectOverflow(state, detectOverflowOptions);
457
+ const overflows = [];
458
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
459
+ if (checkMainAxis) {
460
+ overflows.push(overflow[side]);
461
+ }
462
+ if (checkCrossAxis) {
463
+ const sides = getAlignmentSides(placement, rects, rtl);
464
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
465
+ }
466
+ overflowsData = [...overflowsData, {
467
+ placement,
468
+ overflows
469
+ }];
470
+
471
+ // One or more sides is overflowing.
472
+ if (!overflows.every(side => side <= 0)) {
473
+ var _middlewareData$flip2, _overflowsData$filter;
474
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
475
+ const nextPlacement = placements[nextIndex];
476
+ if (nextPlacement) {
477
+ // Try next placement and re-run the lifecycle.
478
+ return {
479
+ data: {
480
+ index: nextIndex,
481
+ overflows: overflowsData
482
+ },
483
+ reset: {
484
+ placement: nextPlacement
485
+ }
486
+ };
487
+ }
488
+
489
+ // First, find the candidates that fit on the mainAxis side of overflow,
490
+ // then find the placement that fits the best on the main crossAxis side.
491
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
492
+
493
+ // Otherwise fallback.
494
+ if (!resetPlacement) {
495
+ switch (fallbackStrategy) {
496
+ case 'bestFit':
497
+ {
498
+ var _overflowsData$filter2;
499
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
500
+ if (hasFallbackAxisSideDirection) {
501
+ const currentSideAxis = getSideAxis(d.placement);
502
+ return currentSideAxis === initialSideAxis ||
503
+ // Create a bias to the `y` side axis due to horizontal
504
+ // reading directions favoring greater width.
505
+ currentSideAxis === 'y';
506
+ }
507
+ return true;
508
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
509
+ if (placement) {
510
+ resetPlacement = placement;
511
+ }
512
+ break;
513
+ }
514
+ case 'initialPlacement':
515
+ resetPlacement = initialPlacement;
516
+ break;
517
+ }
518
+ }
519
+ if (placement !== resetPlacement) {
520
+ return {
521
+ reset: {
522
+ placement: resetPlacement
523
+ }
524
+ };
525
+ }
526
+ }
527
+ return {};
528
+ }
529
+ };
530
+ };
531
+
532
+ /**
533
+ * Optimizes the visibility of the floating element by shifting it in order to
534
+ * keep it in view when it will overflow the clipping boundary.
535
+ * @see https://floating-ui.com/docs/shift
536
+ */
537
+ const shift$1 = function (options) {
538
+ if (options === void 0) {
539
+ options = {};
540
+ }
541
+ return {
542
+ name: 'shift',
543
+ options,
544
+ async fn(state) {
545
+ const {
546
+ x,
547
+ y,
548
+ placement
549
+ } = state;
550
+ const {
551
+ mainAxis: checkMainAxis = true,
552
+ crossAxis: checkCrossAxis = false,
553
+ limiter = {
554
+ fn: _ref => {
555
+ let {
556
+ x,
557
+ y
558
+ } = _ref;
559
+ return {
560
+ x,
561
+ y
562
+ };
563
+ }
564
+ },
565
+ ...detectOverflowOptions
566
+ } = evaluate(options, state);
567
+ const coords = {
568
+ x,
569
+ y
570
+ };
571
+ const overflow = await detectOverflow(state, detectOverflowOptions);
572
+ const crossAxis = getSideAxis(getSide(placement));
573
+ const mainAxis = getOppositeAxis(crossAxis);
574
+ let mainAxisCoord = coords[mainAxis];
575
+ let crossAxisCoord = coords[crossAxis];
576
+ if (checkMainAxis) {
577
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
578
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
579
+ const min = mainAxisCoord + overflow[minSide];
580
+ const max = mainAxisCoord - overflow[maxSide];
581
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
582
+ }
583
+ if (checkCrossAxis) {
584
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
585
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
586
+ const min = crossAxisCoord + overflow[minSide];
587
+ const max = crossAxisCoord - overflow[maxSide];
588
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
589
+ }
590
+ const limitedCoords = limiter.fn({
591
+ ...state,
592
+ [mainAxis]: mainAxisCoord,
593
+ [crossAxis]: crossAxisCoord
594
+ });
595
+ return {
596
+ ...limitedCoords,
597
+ data: {
598
+ x: limitedCoords.x - x,
599
+ y: limitedCoords.y - y,
600
+ enabled: {
601
+ [mainAxis]: checkMainAxis,
602
+ [crossAxis]: checkCrossAxis
603
+ }
604
+ }
605
+ };
606
+ }
607
+ };
608
+ };
609
+
610
+ function hasWindow() {
611
+ return typeof window !== 'undefined';
612
+ }
613
+ function getNodeName(node) {
614
+ if (isNode(node)) {
615
+ return (node.nodeName || '').toLowerCase();
616
+ }
617
+ // Mocked nodes in testing environments may not be instances of Node. By
618
+ // returning `#document` an infinite loop won't occur.
619
+ // https://github.com/floating-ui/floating-ui/issues/2317
620
+ return '#document';
621
+ }
622
+ function getWindow(node) {
623
+ var _node$ownerDocument;
624
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
625
+ }
626
+ function getDocumentElement(node) {
627
+ var _ref;
628
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
629
+ }
630
+ function isNode(value) {
631
+ if (!hasWindow()) {
632
+ return false;
633
+ }
634
+ return value instanceof Node || value instanceof getWindow(value).Node;
635
+ }
636
+ function isElement(value) {
637
+ if (!hasWindow()) {
638
+ return false;
639
+ }
640
+ return value instanceof Element || value instanceof getWindow(value).Element;
641
+ }
642
+ function isHTMLElement(value) {
643
+ if (!hasWindow()) {
644
+ return false;
645
+ }
646
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
647
+ }
648
+ function isShadowRoot(value) {
649
+ if (!hasWindow() || typeof ShadowRoot === 'undefined') {
650
+ return false;
651
+ }
652
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
653
+ }
654
+ function isOverflowElement(element) {
655
+ const {
656
+ overflow,
657
+ overflowX,
658
+ overflowY,
659
+ display
660
+ } = getComputedStyle(element);
661
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
662
+ }
663
+ function isTableElement(element) {
664
+ return ['table', 'td', 'th'].includes(getNodeName(element));
665
+ }
666
+ function isTopLayer(element) {
667
+ return [':popover-open', ':modal'].some(selector => {
668
+ try {
669
+ return element.matches(selector);
670
+ } catch (e) {
671
+ return false;
672
+ }
673
+ });
674
+ }
675
+ function isContainingBlock(elementOrCss) {
676
+ const webkit = isWebKit();
677
+ const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
63
678
 
64
- const MultiSelectionBoxMessage = class {
679
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
680
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
681
+ return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
682
+ }
683
+ function getContainingBlock(element) {
684
+ let currentNode = getParentNode(element);
685
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
686
+ if (isContainingBlock(currentNode)) {
687
+ return currentNode;
688
+ } else if (isTopLayer(currentNode)) {
689
+ return null;
690
+ }
691
+ currentNode = getParentNode(currentNode);
692
+ }
693
+ return null;
694
+ }
695
+ function isWebKit() {
696
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
697
+ return CSS.supports('-webkit-backdrop-filter', 'none');
698
+ }
699
+ function isLastTraversableNode(node) {
700
+ return ['html', 'body', '#document'].includes(getNodeName(node));
701
+ }
702
+ function getComputedStyle(element) {
703
+ return getWindow(element).getComputedStyle(element);
704
+ }
705
+ function getNodeScroll(element) {
706
+ if (isElement(element)) {
707
+ return {
708
+ scrollLeft: element.scrollLeft,
709
+ scrollTop: element.scrollTop
710
+ };
711
+ }
712
+ return {
713
+ scrollLeft: element.scrollX,
714
+ scrollTop: element.scrollY
715
+ };
716
+ }
717
+ function getParentNode(node) {
718
+ if (getNodeName(node) === 'html') {
719
+ return node;
720
+ }
721
+ const result =
722
+ // Step into the shadow DOM of the parent of a slotted node.
723
+ node.assignedSlot ||
724
+ // DOM Element detected.
725
+ node.parentNode ||
726
+ // ShadowRoot detected.
727
+ isShadowRoot(node) && node.host ||
728
+ // Fallback.
729
+ getDocumentElement(node);
730
+ return isShadowRoot(result) ? result.host : result;
731
+ }
732
+ function getNearestOverflowAncestor(node) {
733
+ const parentNode = getParentNode(node);
734
+ if (isLastTraversableNode(parentNode)) {
735
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
736
+ }
737
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
738
+ return parentNode;
739
+ }
740
+ return getNearestOverflowAncestor(parentNode);
741
+ }
742
+ function getOverflowAncestors(node, list, traverseIframes) {
743
+ var _node$ownerDocument2;
744
+ if (list === void 0) {
745
+ list = [];
746
+ }
747
+ if (traverseIframes === void 0) {
748
+ traverseIframes = true;
749
+ }
750
+ const scrollableAncestor = getNearestOverflowAncestor(node);
751
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
752
+ const win = getWindow(scrollableAncestor);
753
+ if (isBody) {
754
+ const frameElement = getFrameElement(win);
755
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
756
+ }
757
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
758
+ }
759
+ function getFrameElement(win) {
760
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
761
+ }
762
+
763
+ function getCssDimensions(element) {
764
+ const css = getComputedStyle(element);
765
+ // In testing environments, the `width` and `height` properties are empty
766
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
767
+ let width = parseFloat(css.width) || 0;
768
+ let height = parseFloat(css.height) || 0;
769
+ const hasOffset = isHTMLElement(element);
770
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
771
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
772
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
773
+ if (shouldFallback) {
774
+ width = offsetWidth;
775
+ height = offsetHeight;
776
+ }
777
+ return {
778
+ width,
779
+ height,
780
+ $: shouldFallback
781
+ };
782
+ }
783
+
784
+ function unwrapElement(element) {
785
+ return !isElement(element) ? element.contextElement : element;
786
+ }
787
+
788
+ function getScale(element) {
789
+ const domElement = unwrapElement(element);
790
+ if (!isHTMLElement(domElement)) {
791
+ return createCoords(1);
792
+ }
793
+ const rect = domElement.getBoundingClientRect();
794
+ const {
795
+ width,
796
+ height,
797
+ $
798
+ } = getCssDimensions(domElement);
799
+ let x = ($ ? round(rect.width) : rect.width) / width;
800
+ let y = ($ ? round(rect.height) : rect.height) / height;
801
+
802
+ // 0, NaN, or Infinity should always fallback to 1.
803
+
804
+ if (!x || !Number.isFinite(x)) {
805
+ x = 1;
806
+ }
807
+ if (!y || !Number.isFinite(y)) {
808
+ y = 1;
809
+ }
810
+ return {
811
+ x,
812
+ y
813
+ };
814
+ }
815
+
816
+ const noOffsets = /*#__PURE__*/createCoords(0);
817
+ function getVisualOffsets(element) {
818
+ const win = getWindow(element);
819
+ if (!isWebKit() || !win.visualViewport) {
820
+ return noOffsets;
821
+ }
822
+ return {
823
+ x: win.visualViewport.offsetLeft,
824
+ y: win.visualViewport.offsetTop
825
+ };
826
+ }
827
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
828
+ if (isFixed === void 0) {
829
+ isFixed = false;
830
+ }
831
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
832
+ return false;
833
+ }
834
+ return isFixed;
835
+ }
836
+
837
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
838
+ if (includeScale === void 0) {
839
+ includeScale = false;
840
+ }
841
+ if (isFixedStrategy === void 0) {
842
+ isFixedStrategy = false;
843
+ }
844
+ const clientRect = element.getBoundingClientRect();
845
+ const domElement = unwrapElement(element);
846
+ let scale = createCoords(1);
847
+ if (includeScale) {
848
+ if (offsetParent) {
849
+ if (isElement(offsetParent)) {
850
+ scale = getScale(offsetParent);
851
+ }
852
+ } else {
853
+ scale = getScale(element);
854
+ }
855
+ }
856
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
857
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
858
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
859
+ let width = clientRect.width / scale.x;
860
+ let height = clientRect.height / scale.y;
861
+ if (domElement) {
862
+ const win = getWindow(domElement);
863
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
864
+ let currentWin = win;
865
+ let currentIFrame = getFrameElement(currentWin);
866
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
867
+ const iframeScale = getScale(currentIFrame);
868
+ const iframeRect = currentIFrame.getBoundingClientRect();
869
+ const css = getComputedStyle(currentIFrame);
870
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
871
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
872
+ x *= iframeScale.x;
873
+ y *= iframeScale.y;
874
+ width *= iframeScale.x;
875
+ height *= iframeScale.y;
876
+ x += left;
877
+ y += top;
878
+ currentWin = getWindow(currentIFrame);
879
+ currentIFrame = getFrameElement(currentWin);
880
+ }
881
+ }
882
+ return rectToClientRect({
883
+ width,
884
+ height,
885
+ x,
886
+ y
887
+ });
888
+ }
889
+
890
+ // If <html> has a CSS width greater than the viewport, then this will be
891
+ // incorrect for RTL.
892
+ function getWindowScrollBarX(element, rect) {
893
+ const leftScroll = getNodeScroll(element).scrollLeft;
894
+ if (!rect) {
895
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
896
+ }
897
+ return rect.left + leftScroll;
898
+ }
899
+
900
+ function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
901
+ if (ignoreScrollbarX === void 0) {
902
+ ignoreScrollbarX = false;
903
+ }
904
+ const htmlRect = documentElement.getBoundingClientRect();
905
+ const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
906
+ // RTL <body> scrollbar.
907
+ getWindowScrollBarX(documentElement, htmlRect));
908
+ const y = htmlRect.top + scroll.scrollTop;
909
+ return {
910
+ x,
911
+ y
912
+ };
913
+ }
914
+
915
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
916
+ let {
917
+ elements,
918
+ rect,
919
+ offsetParent,
920
+ strategy
921
+ } = _ref;
922
+ const isFixed = strategy === 'fixed';
923
+ const documentElement = getDocumentElement(offsetParent);
924
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
925
+ if (offsetParent === documentElement || topLayer && isFixed) {
926
+ return rect;
927
+ }
928
+ let scroll = {
929
+ scrollLeft: 0,
930
+ scrollTop: 0
931
+ };
932
+ let scale = createCoords(1);
933
+ const offsets = createCoords(0);
934
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
935
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
936
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
937
+ scroll = getNodeScroll(offsetParent);
938
+ }
939
+ if (isHTMLElement(offsetParent)) {
940
+ const offsetRect = getBoundingClientRect(offsetParent);
941
+ scale = getScale(offsetParent);
942
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
943
+ offsets.y = offsetRect.y + offsetParent.clientTop;
944
+ }
945
+ }
946
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
947
+ return {
948
+ width: rect.width * scale.x,
949
+ height: rect.height * scale.y,
950
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
951
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
952
+ };
953
+ }
954
+
955
+ function getClientRects(element) {
956
+ return Array.from(element.getClientRects());
957
+ }
958
+
959
+ // Gets the entire size of the scrollable document area, even extending outside
960
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
961
+ function getDocumentRect(element) {
962
+ const html = getDocumentElement(element);
963
+ const scroll = getNodeScroll(element);
964
+ const body = element.ownerDocument.body;
965
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
966
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
967
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
968
+ const y = -scroll.scrollTop;
969
+ if (getComputedStyle(body).direction === 'rtl') {
970
+ x += max(html.clientWidth, body.clientWidth) - width;
971
+ }
972
+ return {
973
+ width,
974
+ height,
975
+ x,
976
+ y
977
+ };
978
+ }
979
+
980
+ function getViewportRect(element, strategy) {
981
+ const win = getWindow(element);
982
+ const html = getDocumentElement(element);
983
+ const visualViewport = win.visualViewport;
984
+ let width = html.clientWidth;
985
+ let height = html.clientHeight;
986
+ let x = 0;
987
+ let y = 0;
988
+ if (visualViewport) {
989
+ width = visualViewport.width;
990
+ height = visualViewport.height;
991
+ const visualViewportBased = isWebKit();
992
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
993
+ x = visualViewport.offsetLeft;
994
+ y = visualViewport.offsetTop;
995
+ }
996
+ }
997
+ return {
998
+ width,
999
+ height,
1000
+ x,
1001
+ y
1002
+ };
1003
+ }
1004
+
1005
+ // Returns the inner client rect, subtracting scrollbars if present.
1006
+ function getInnerBoundingClientRect(element, strategy) {
1007
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
1008
+ const top = clientRect.top + element.clientTop;
1009
+ const left = clientRect.left + element.clientLeft;
1010
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
1011
+ const width = element.clientWidth * scale.x;
1012
+ const height = element.clientHeight * scale.y;
1013
+ const x = left * scale.x;
1014
+ const y = top * scale.y;
1015
+ return {
1016
+ width,
1017
+ height,
1018
+ x,
1019
+ y
1020
+ };
1021
+ }
1022
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1023
+ let rect;
1024
+ if (clippingAncestor === 'viewport') {
1025
+ rect = getViewportRect(element, strategy);
1026
+ } else if (clippingAncestor === 'document') {
1027
+ rect = getDocumentRect(getDocumentElement(element));
1028
+ } else if (isElement(clippingAncestor)) {
1029
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1030
+ } else {
1031
+ const visualOffsets = getVisualOffsets(element);
1032
+ rect = {
1033
+ x: clippingAncestor.x - visualOffsets.x,
1034
+ y: clippingAncestor.y - visualOffsets.y,
1035
+ width: clippingAncestor.width,
1036
+ height: clippingAncestor.height
1037
+ };
1038
+ }
1039
+ return rectToClientRect(rect);
1040
+ }
1041
+ function hasFixedPositionAncestor(element, stopNode) {
1042
+ const parentNode = getParentNode(element);
1043
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1044
+ return false;
1045
+ }
1046
+ return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1047
+ }
1048
+
1049
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
1050
+ // clipping (or hiding) child elements. This returns all clipping ancestors
1051
+ // of the given element up the tree.
1052
+ function getClippingElementAncestors(element, cache) {
1053
+ const cachedResult = cache.get(element);
1054
+ if (cachedResult) {
1055
+ return cachedResult;
1056
+ }
1057
+ let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1058
+ let currentContainingBlockComputedStyle = null;
1059
+ const elementIsFixed = getComputedStyle(element).position === 'fixed';
1060
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1061
+
1062
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1063
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1064
+ const computedStyle = getComputedStyle(currentNode);
1065
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1066
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
1067
+ currentContainingBlockComputedStyle = null;
1068
+ }
1069
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1070
+ if (shouldDropCurrentNode) {
1071
+ // Drop non-containing blocks.
1072
+ result = result.filter(ancestor => ancestor !== currentNode);
1073
+ } else {
1074
+ // Record last containing block for next iteration.
1075
+ currentContainingBlockComputedStyle = computedStyle;
1076
+ }
1077
+ currentNode = getParentNode(currentNode);
1078
+ }
1079
+ cache.set(element, result);
1080
+ return result;
1081
+ }
1082
+
1083
+ // Gets the maximum area that the element is visible in due to any number of
1084
+ // clipping ancestors.
1085
+ function getClippingRect(_ref) {
1086
+ let {
1087
+ element,
1088
+ boundary,
1089
+ rootBoundary,
1090
+ strategy
1091
+ } = _ref;
1092
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
1093
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1094
+ const firstClippingAncestor = clippingAncestors[0];
1095
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1096
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1097
+ accRect.top = max(rect.top, accRect.top);
1098
+ accRect.right = min(rect.right, accRect.right);
1099
+ accRect.bottom = min(rect.bottom, accRect.bottom);
1100
+ accRect.left = max(rect.left, accRect.left);
1101
+ return accRect;
1102
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1103
+ return {
1104
+ width: clippingRect.right - clippingRect.left,
1105
+ height: clippingRect.bottom - clippingRect.top,
1106
+ x: clippingRect.left,
1107
+ y: clippingRect.top
1108
+ };
1109
+ }
1110
+
1111
+ function getDimensions(element) {
1112
+ const {
1113
+ width,
1114
+ height
1115
+ } = getCssDimensions(element);
1116
+ return {
1117
+ width,
1118
+ height
1119
+ };
1120
+ }
1121
+
1122
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1123
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1124
+ const documentElement = getDocumentElement(offsetParent);
1125
+ const isFixed = strategy === 'fixed';
1126
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1127
+ let scroll = {
1128
+ scrollLeft: 0,
1129
+ scrollTop: 0
1130
+ };
1131
+ const offsets = createCoords(0);
1132
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1133
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1134
+ scroll = getNodeScroll(offsetParent);
1135
+ }
1136
+ if (isOffsetParentAnElement) {
1137
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1138
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1139
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1140
+ } else if (documentElement) {
1141
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1142
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1143
+ offsets.x = getWindowScrollBarX(documentElement);
1144
+ }
1145
+ }
1146
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1147
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1148
+ const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
1149
+ return {
1150
+ x,
1151
+ y,
1152
+ width: rect.width,
1153
+ height: rect.height
1154
+ };
1155
+ }
1156
+
1157
+ function isStaticPositioned(element) {
1158
+ return getComputedStyle(element).position === 'static';
1159
+ }
1160
+
1161
+ function getTrueOffsetParent(element, polyfill) {
1162
+ if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
1163
+ return null;
1164
+ }
1165
+ if (polyfill) {
1166
+ return polyfill(element);
1167
+ }
1168
+ let rawOffsetParent = element.offsetParent;
1169
+
1170
+ // Firefox returns the <html> element as the offsetParent if it's non-static,
1171
+ // while Chrome and Safari return the <body> element. The <body> element must
1172
+ // be used to perform the correct calculations even if the <html> element is
1173
+ // non-static.
1174
+ if (getDocumentElement(element) === rawOffsetParent) {
1175
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
1176
+ }
1177
+ return rawOffsetParent;
1178
+ }
1179
+
1180
+ // Gets the closest ancestor positioned element. Handles some edge cases,
1181
+ // such as table ancestors and cross browser bugs.
1182
+ function getOffsetParent(element, polyfill) {
1183
+ const win = getWindow(element);
1184
+ if (isTopLayer(element)) {
1185
+ return win;
1186
+ }
1187
+ if (!isHTMLElement(element)) {
1188
+ let svgOffsetParent = getParentNode(element);
1189
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
1190
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
1191
+ return svgOffsetParent;
1192
+ }
1193
+ svgOffsetParent = getParentNode(svgOffsetParent);
1194
+ }
1195
+ return win;
1196
+ }
1197
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1198
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
1199
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1200
+ }
1201
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
1202
+ return win;
1203
+ }
1204
+ return offsetParent || getContainingBlock(element) || win;
1205
+ }
1206
+
1207
+ const getElementRects = async function (data) {
1208
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1209
+ const getDimensionsFn = this.getDimensions;
1210
+ const floatingDimensions = await getDimensionsFn(data.floating);
1211
+ return {
1212
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
1213
+ floating: {
1214
+ x: 0,
1215
+ y: 0,
1216
+ width: floatingDimensions.width,
1217
+ height: floatingDimensions.height
1218
+ }
1219
+ };
1220
+ };
1221
+
1222
+ function isRTL(element) {
1223
+ return getComputedStyle(element).direction === 'rtl';
1224
+ }
1225
+
1226
+ const platform = {
1227
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1228
+ getDocumentElement,
1229
+ getClippingRect,
1230
+ getOffsetParent,
1231
+ getElementRects,
1232
+ getClientRects,
1233
+ getDimensions,
1234
+ getScale,
1235
+ isElement,
1236
+ isRTL
1237
+ };
1238
+
1239
+ /**
1240
+ * Optimizes the visibility of the floating element by shifting it in order to
1241
+ * keep it in view when it will overflow the clipping boundary.
1242
+ * @see https://floating-ui.com/docs/shift
1243
+ */
1244
+ const shift = shift$1;
1245
+
1246
+ /**
1247
+ * Optimizes the visibility of the floating element by flipping the `placement`
1248
+ * in order to keep it in view when the preferred placement(s) will overflow the
1249
+ * clipping boundary. Alternative to `autoPlacement`.
1250
+ * @see https://floating-ui.com/docs/flip
1251
+ */
1252
+ const flip = flip$1;
1253
+
1254
+ /**
1255
+ * Computes the `x` and `y` coordinates that will place the floating element
1256
+ * next to a given reference element.
1257
+ */
1258
+ const computePosition = (reference, floating, options) => {
1259
+ // This caches the expensive `getClippingElementAncestors` function so that
1260
+ // multiple lifecycle resets re-use the same result. It only lives for a
1261
+ // single call. If other functions become expensive, we can add them as well.
1262
+ const cache = new Map();
1263
+ const mergedOptions = {
1264
+ platform,
1265
+ ...options
1266
+ };
1267
+ const platformWithCache = {
1268
+ ...mergedOptions.platform,
1269
+ _c: cache
1270
+ };
1271
+ return computePosition$1(reference, floating, {
1272
+ ...mergedOptions,
1273
+ platform: platformWithCache
1274
+ });
1275
+ };
1276
+
1277
+ const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--20, 20);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--elevation--16, 16)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";
1278
+
1279
+ const EzPopoverCore = class {
65
1280
  constructor(hostRef) {
66
1281
  index.registerInstance(this, hostRef);
67
- this.message = undefined;
1282
+ this.ezVisibilityChange = index.createEvent(this, "ezVisibilityChange", 7);
1283
+ this.TIME_DEBOUNCE = 500;
1284
+ this.autoClose = true;
1285
+ this.boxWidth = "fit-content";
1286
+ this.opened = false;
1287
+ this.overlayType = "light";
1288
+ this.anchorElement = undefined;
1289
+ this.options = { horizontalGap: 0, verticalGap: 0, fromRight: false };
1290
+ this.useAnchorSize = false;
1291
+ this.minWidth = 150;
1292
+ }
1293
+ observeOpened(newValue, oldValue) {
1294
+ if (newValue === oldValue) {
1295
+ return;
1296
+ }
1297
+ if (newValue) {
1298
+ this.openPopover();
1299
+ }
1300
+ else {
1301
+ this.hidePopover();
1302
+ }
1303
+ }
1304
+ /**
1305
+ * Atualiza a posição do popover.
1306
+ */
1307
+ async updatePosition(top, left) {
1308
+ this.updateOptionPosition(top, left);
1309
+ await this.updatePositionPopover();
1310
+ }
1311
+ /**
1312
+ * Exibe o ez-popover.
1313
+ */
1314
+ async show(top, left) {
1315
+ this.updateOptionPosition(top, left);
1316
+ this.opened = true;
1317
+ }
1318
+ /**
1319
+ * Ancora a exibição do popOver a um elemento HTML.
1320
+ */
1321
+ async showUnder(element, options) {
1322
+ if (options) {
1323
+ this.options = options;
1324
+ }
1325
+ this.anchorElement = element;
1326
+ this.opened = true;
1327
+ }
1328
+ /**
1329
+ * Oculta o ez-popover.
1330
+ */
1331
+ async hide() {
1332
+ this.opened = false;
1333
+ }
1334
+ /**
1335
+ * Altera as opções.
1336
+ */
1337
+ async setOptions(options) {
1338
+ Object.assign(this.options, options);
1339
+ }
1340
+ /**
1341
+ * Altera o elemento de ancoragem.
1342
+ */
1343
+ async setAnchorElement(anchor) {
1344
+ this.anchorElement = anchor;
1345
+ }
1346
+ parseSizePixel(sizePixel, defaultValue) {
1347
+ if (!sizePixel) {
1348
+ return defaultValue !== null && defaultValue !== void 0 ? defaultValue : 0;
1349
+ }
1350
+ if (typeof sizePixel === "string") {
1351
+ return Number(sizePixel.replace("px", ""));
1352
+ }
1353
+ return sizePixel !== null && sizePixel !== void 0 ? sizePixel : 0;
1354
+ }
1355
+ updateOptionPosition(top, left) {
1356
+ Object.assign(this.options, {
1357
+ horizontalGap: this.parseSizePixel(left, this.options.horizontalGap),
1358
+ verticalGap: this.parseSizePixel(top, this.options.verticalGap),
1359
+ });
1360
+ }
1361
+ getElement(element) {
1362
+ if (typeof element === 'string') {
1363
+ return document.getElementById(element);
1364
+ }
1365
+ return element;
1366
+ }
1367
+ getAnchorElement() {
1368
+ if (!this.anchorElement) {
1369
+ return this._host;
1370
+ }
1371
+ if (Array.isArray(this.anchorElement)) {
1372
+ for (const element of this.anchorElement) {
1373
+ const htmlElement = this.getElement(element);
1374
+ if (htmlElement) {
1375
+ return htmlElement;
1376
+ }
1377
+ }
1378
+ }
1379
+ return this.getElement(this.anchorElement);
1380
+ }
1381
+ async updatePositionPopover() {
1382
+ if (!this._box || !this.opened) {
1383
+ return;
1384
+ }
1385
+ const currentAnchorElement = this.getAnchorElement();
1386
+ if (this.useAnchorSize) {
1387
+ const anchorSize = currentAnchorElement.getBoundingClientRect().width;
1388
+ const width = anchorSize < this.minWidth ? this.minWidth : anchorSize;
1389
+ this._box.style.width = `${width}px`;
1390
+ }
1391
+ await computePosition(currentAnchorElement, this._box, {
1392
+ placement: this.options.fromRight ? 'bottom-end' : 'bottom-start',
1393
+ middleware: [flip(), shift({ padding: 5 })],
1394
+ strategy: 'fixed',
1395
+ }).then(({ x, y, placement }) => {
1396
+ const newTop = placement.includes("bottom") ? y + this.options.verticalGap : y - this.options.verticalGap;
1397
+ const newLeft = placement.includes("start") ? x + this.options.horizontalGap : x - this.options.horizontalGap;
1398
+ Object.assign(this._box.style, {
1399
+ top: `${newTop}px`,
1400
+ left: `${newLeft}px`,
1401
+ });
1402
+ });
1403
+ }
1404
+ hidePopover() {
1405
+ if (!this._box) {
1406
+ return;
1407
+ }
1408
+ this._box.style.display = '';
1409
+ this.hideOverlay();
1410
+ this.ezVisibilityChange.emit(false);
1411
+ }
1412
+ async openPopover() {
1413
+ if (!this._box) {
1414
+ return;
1415
+ }
1416
+ if (this.opened) {
1417
+ this._box.style.display = 'flex';
1418
+ this._box.style.visibility = 'hidden';
1419
+ await this.updatePositionPopover();
1420
+ this.openOverlay();
1421
+ this.ezVisibilityChange.emit(true);
1422
+ this._box.style.visibility = 'visible';
1423
+ }
1424
+ }
1425
+ openOverlay() {
1426
+ if (!this._overlay || !this._overlayIsActive) {
1427
+ return;
1428
+ }
1429
+ this._overlay.style.display = 'block';
1430
+ }
1431
+ hideOverlay() {
1432
+ if (!this._overlay) {
1433
+ return;
1434
+ }
1435
+ this._overlay.style.display = 'none';
1436
+ }
1437
+ checkStatusOverlay() {
1438
+ if (this.overlayType !== "none") {
1439
+ return true;
1440
+ }
1441
+ if (this.overlayType === "none" && this.autoClose) {
1442
+ return true;
1443
+ }
1444
+ return false;
1445
+ }
1446
+ updatePositionDebounce() {
1447
+ if (!this.opened) {
1448
+ return;
1449
+ }
1450
+ clearTimeout(this._timeoutDebounce);
1451
+ this._timeoutDebounce = setTimeout(() => {
1452
+ this.updatePositionPopover();
1453
+ }, this.TIME_DEBOUNCE);
1454
+ }
1455
+ componentWillLoad() {
1456
+ window.addEventListener('scroll', this.updatePositionDebounce.bind(this), true);
1457
+ window.addEventListener('resize', this.updatePositionDebounce.bind(this), true);
1458
+ }
1459
+ componentDidLoad() {
1460
+ this._overlayIsActive = this.checkStatusOverlay();
1461
+ this._resizeObserver = new ResizeObserver(this.updatePositionPopover.bind(this));
1462
+ this._resizeObserver.observe(this._box);
1463
+ this.openPopover();
1464
+ }
1465
+ disconnectedCallback() {
1466
+ window.removeEventListener('scroll', this.updatePositionDebounce.bind(this), true);
1467
+ window.removeEventListener('resize', this.updatePositionDebounce.bind(this), true);
1468
+ this._resizeObserver.disconnect();
68
1469
  }
69
1470
  render() {
70
- return (index.h("div", { class: "multi-selection__message" }, index.h("span", { class: "multi-selection__text-message" }, this.message)));
1471
+ return (index.h(index.Host, null, index.h("div", { ref: el => this._overlay = el, onClick: () => this.hide(), class: `popover__overlay popover__overlay--${this.overlayType}` }), index.h("section", { ref: el => this._box = el, class: {
1472
+ "popover__box": true,
1473
+ "popover__box--fit-content": this.boxWidth === "fit-content",
1474
+ "popover__box--full-width": this.boxWidth !== "fit-content",
1475
+ } }, index.h("slot", null))));
71
1476
  }
1477
+ get _host() { return index.getElement(this); }
1478
+ static get watchers() { return {
1479
+ "opened": ["observeOpened"]
1480
+ }; }
72
1481
  };
73
- MultiSelectionBoxMessage.style = multiSelectionBoxMessageCss;
1482
+ EzPopoverCore.style = ezPopoverCoreCss;
74
1483
 
75
1484
  exports.ez_card_item = EzCardItem;
76
- exports.multi_selection_box_message = MultiSelectionBoxMessage;
1485
+ exports.ez_popover_core = EzPopoverCore;