@pnx-mixtape/mxds 0.0.27 → 0.0.29

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 (101) hide show
  1. package/dist/build/accordion.css +1 -1
  2. package/dist/build/base.css +1 -1
  3. package/dist/build/breadcrumb.css +1 -1
  4. package/dist/build/button.css +1 -1
  5. package/dist/build/callout.css +1 -1
  6. package/dist/build/card.css +1 -1
  7. package/dist/build/carousel.css +1 -1
  8. package/dist/build/chunks/{DropMenu-LnJEp-sg.js → DropMenu-BckyZaZM.js} +1 -1
  9. package/dist/build/chunks/{Popover-C4gisyxr.js → Popover-hTv4lVea.js} +2 -2
  10. package/dist/build/chunks/polyfills-QW1VbwlO.js +562 -0
  11. package/dist/build/chunks/popover-Dk48Vm_U.js +407 -0
  12. package/dist/build/constants.css +1 -1
  13. package/dist/build/container-grid.css +1 -1
  14. package/dist/build/content-block.css +1 -1
  15. package/dist/build/dialog.css +1 -1
  16. package/dist/build/drop-menu.css +1 -1
  17. package/dist/build/drop-menu.entry.js +2 -2
  18. package/dist/build/drupal.css +1 -1
  19. package/dist/build/filters.css +1 -1
  20. package/dist/build/footer.css +1 -1
  21. package/dist/build/form.css +1 -1
  22. package/dist/build/global-alert.css +1 -1
  23. package/dist/build/grid.css +1 -1
  24. package/dist/build/header.css +1 -1
  25. package/dist/build/header.entry.js +524 -379
  26. package/dist/build/hero-banner.css +1 -1
  27. package/dist/build/icon.css +1 -1
  28. package/dist/build/in-page-alert.css +1 -1
  29. package/dist/build/in-page-navigation.css +1 -1
  30. package/dist/build/in-page-navigation.entry.js +23 -11
  31. package/dist/build/link-list.css +1 -1
  32. package/dist/build/list-item.css +1 -1
  33. package/dist/build/masthead.css +1 -1
  34. package/dist/build/navigation.css +1 -1
  35. package/dist/build/page.css +1 -1
  36. package/dist/build/pagination.css +1 -1
  37. package/dist/build/popover.css +1 -1
  38. package/dist/build/popover.entry.js +1 -1
  39. package/dist/build/results-bar.css +1 -1
  40. package/dist/build/section.css +1 -1
  41. package/dist/build/side-navigation.css +1 -1
  42. package/dist/build/sidebar.css +1 -1
  43. package/dist/build/social-links.css +1 -1
  44. package/dist/build/steps.css +1 -1
  45. package/dist/build/sticky.css +1 -1
  46. package/dist/build/tabs.css +1 -1
  47. package/dist/build/tabs.entry.js +2 -2
  48. package/dist/build/tag.css +1 -1
  49. package/dist/build/utilities.css +1 -1
  50. package/dist/build/utility-list.css +1 -1
  51. package/package.json +22 -21
  52. package/src/Atom/Background/_background.css +1 -0
  53. package/src/Atom/Image/_image.css +1 -0
  54. package/src/Atom/Media/_media.css +0 -6
  55. package/src/Atom/Spacing/_mixins.css +22 -0
  56. package/src/Atom/Spacing/_spacing.css +33 -0
  57. package/src/Atom/Table/Table.stories.ts +17 -7
  58. package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +16 -8
  59. package/src/Atom/Table/__snapshots__/TableResponsive.stories.ts.snap +1 -1
  60. package/src/Atom/Table/_table.css +26 -1
  61. package/src/Atom/Table/table-responsive.twig +1 -1
  62. package/src/Atom/Table/table.twig +9 -1
  63. package/src/Atom/_flow.css +1 -5
  64. package/src/Component/Accordion/accordion.css +4 -0
  65. package/src/Component/Card/Card.stories.ts +19 -0
  66. package/src/Component/Card/__snapshots__/Card.stories.ts.snap +40 -9
  67. package/src/Component/Card/card.css +60 -12
  68. package/src/Component/Card/card.twig +5 -2
  69. package/src/Component/Carousel/Elements/Carousel.ts +8 -3
  70. package/src/Component/Carousel/__snapshots__/Carousel.stories.ts.snap +52 -52
  71. package/src/Component/Carousel/carousel.css +14 -35
  72. package/src/Component/Carousel/carousel.twig +0 -1
  73. package/src/Component/GlobalAlert/global-alert.css +8 -4
  74. package/src/Component/InPageAlert/in-page-alert.css +1 -0
  75. package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +12 -7
  76. package/src/Component/InPageNavigation/InPageNavigation.stories.ts +28 -12
  77. package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +30 -49
  78. package/src/Component/InPageNavigation/in-page-navigation.css +8 -4
  79. package/src/Component/InPageNavigation/in-page-navigation.twig +9 -6
  80. package/src/Component/InPageNavigation/twig/content-example.twig +1 -1
  81. package/src/Component/InPageNavigation/twig/in-page-navigation-selector.twig +4 -0
  82. package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +9 -9
  83. package/src/Component/ListItem/list-item.css +14 -1
  84. package/src/Component/ListItem/list-item.twig +6 -2
  85. package/src/Component/Pagination/Pagination.stories.ts +1 -1
  86. package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +2 -2
  87. package/src/Component/ResultsBar/results-bar.css +4 -0
  88. package/src/Form/FormItem/FormItem.stories.ts +14 -0
  89. package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +19 -0
  90. package/src/Form/form.css +11 -3
  91. package/src/Layout/Grid/Grid.stories.ts +7 -7
  92. package/src/Layout/Grid/GridItem.stories.ts +1 -2
  93. package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +5 -5
  94. package/src/Layout/Section/section.css +8 -0
  95. package/src/Layout/Section/section.twig +2 -1
  96. package/src/_custom-media.css +2 -0
  97. package/src/constants.css +16 -4
  98. package/src/enums.ts +1 -1
  99. package/src/tokens.js +1 -0
  100. package/dist/build/chunks/polyfills-Du4RTZDf.js +0 -511
  101. package/dist/build/chunks/popover-Bd5oQ1Ic.js +0 -407
@@ -1,511 +0,0 @@
1
- var min = Math.min, max = Math.max, round = Math.round, createCoords = (a) => ({
2
- x: a,
3
- y: a
4
- });
5
- function getSide(a) {
6
- return a.split("-")[0];
7
- }
8
- function getAlignment(a) {
9
- return a.split("-")[1];
10
- }
11
- function getOppositeAxis(a) {
12
- return a === "x" ? "y" : "x";
13
- }
14
- function getAxisLength(a) {
15
- return a === "y" ? "height" : "width";
16
- }
17
- var yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
18
- function getSideAxis(a) {
19
- return yAxisSides.has(getSide(a)) ? "y" : "x";
20
- }
21
- function getAlignmentAxis(a) {
22
- return getOppositeAxis(getSideAxis(a));
23
- }
24
- function rectToClientRect(a) {
25
- let { x: P, y: F, width: I, height: L } = a;
26
- return {
27
- width: I,
28
- height: L,
29
- top: F,
30
- left: P,
31
- right: P + I,
32
- bottom: F + L,
33
- x: P,
34
- y: F
35
- };
36
- }
37
- function computeCoordsFromPlacement(a, P, F) {
38
- let { reference: I, floating: z } = a, V = getSideAxis(P), W = getAlignmentAxis(P), G = getAxisLength(W), K = getSide(P), q = V === "y", J = I.x + I.width / 2 - z.width / 2, Y = I.y + I.height / 2 - z.height / 2, X = I[G] / 2 - z[G] / 2, Z;
39
- switch (K) {
40
- case "top":
41
- Z = {
42
- x: J,
43
- y: I.y - z.height
44
- };
45
- break;
46
- case "bottom":
47
- Z = {
48
- x: J,
49
- y: I.y + I.height
50
- };
51
- break;
52
- case "right":
53
- Z = {
54
- x: I.x + I.width,
55
- y: Y
56
- };
57
- break;
58
- case "left":
59
- Z = {
60
- x: I.x - z.width,
61
- y: Y
62
- };
63
- break;
64
- default: Z = {
65
- x: I.x,
66
- y: I.y
67
- };
68
- }
69
- switch (getAlignment(P)) {
70
- case "start":
71
- Z[W] -= X * (F && q ? -1 : 1);
72
- break;
73
- case "end":
74
- Z[W] += X * (F && q ? -1 : 1);
75
- break;
76
- }
77
- return Z;
78
- }
79
- var computePosition$1 = async (a, P, F) => {
80
- let { placement: I = "bottom", strategy: L = "absolute", middleware: R = [], platform: z } = F, B = R.filter(Boolean), V = await (z.isRTL == null ? void 0 : z.isRTL(P)), H = await z.getElementRects({
81
- reference: a,
82
- floating: P,
83
- strategy: L
84
- }), { x: U, y: W } = computeCoordsFromPlacement(H, I, V), K = I, q = {}, J = 0;
85
- for (let F = 0; F < B.length; F++) {
86
- let { name: R, fn: Y } = B[F], { x: X, y: Z, data: Q, reset: $ } = await Y({
87
- x: U,
88
- y: W,
89
- initialPlacement: I,
90
- placement: K,
91
- strategy: L,
92
- middlewareData: q,
93
- rects: H,
94
- platform: z,
95
- elements: {
96
- reference: a,
97
- floating: P
98
- }
99
- });
100
- U = X ?? U, W = Z ?? W, q = {
101
- ...q,
102
- [R]: {
103
- ...q[R],
104
- ...Q
105
- }
106
- }, $ && J <= 50 && (J++, typeof $ == "object" && ($.placement && (K = $.placement), $.rects && (H = $.rects === !0 ? await z.getElementRects({
107
- reference: a,
108
- floating: P,
109
- strategy: L
110
- }) : $.rects), {x: U, y: W} = computeCoordsFromPlacement(H, K, V)), F = -1);
111
- }
112
- return {
113
- x: U,
114
- y: W,
115
- placement: K,
116
- strategy: L,
117
- middlewareData: q
118
- };
119
- };
120
- function hasWindow() {
121
- return typeof window < "u";
122
- }
123
- function getNodeName(a) {
124
- return isNode(a) ? (a.nodeName || "").toLowerCase() : "#document";
125
- }
126
- function getWindow(a) {
127
- var P;
128
- return (a == null || (P = a.ownerDocument) == null ? void 0 : P.defaultView) || window;
129
- }
130
- function getDocumentElement(a) {
131
- return ((isNode(a) ? a.ownerDocument : a.document) || window.document)?.documentElement;
132
- }
133
- function isNode(a) {
134
- return hasWindow() ? a instanceof Node || a instanceof getWindow(a).Node : !1;
135
- }
136
- function isElement(a) {
137
- return hasWindow() ? a instanceof Element || a instanceof getWindow(a).Element : !1;
138
- }
139
- function isHTMLElement(a) {
140
- return hasWindow() ? a instanceof HTMLElement || a instanceof getWindow(a).HTMLElement : !1;
141
- }
142
- function isShadowRoot(a) {
143
- return !hasWindow() || typeof ShadowRoot > "u" ? !1 : a instanceof ShadowRoot || a instanceof getWindow(a).ShadowRoot;
144
- }
145
- var invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
146
- function isOverflowElement(a) {
147
- let { overflow: P, overflowX: F, overflowY: I, display: L } = getComputedStyle$1(a);
148
- return /auto|scroll|overlay|hidden|clip/.test(P + I + F) && !invalidOverflowDisplayValues.has(L);
149
- }
150
- var tableElements = /* @__PURE__ */ new Set([
151
- "table",
152
- "td",
153
- "th"
154
- ]);
155
- function isTableElement(a) {
156
- return tableElements.has(getNodeName(a));
157
- }
158
- var topLayerSelectors = [":popover-open", ":modal"];
159
- function isTopLayer(a) {
160
- return topLayerSelectors.some((P) => {
161
- try {
162
- return a.matches(P);
163
- } catch {
164
- return !1;
165
- }
166
- });
167
- }
168
- var transformProperties = [
169
- "transform",
170
- "translate",
171
- "scale",
172
- "rotate",
173
- "perspective"
174
- ], willChangeValues = [
175
- "transform",
176
- "translate",
177
- "scale",
178
- "rotate",
179
- "perspective",
180
- "filter"
181
- ], containValues = [
182
- "paint",
183
- "layout",
184
- "strict",
185
- "content"
186
- ];
187
- function isContainingBlock(a) {
188
- let P = isWebKit(), F = isElement(a) ? getComputedStyle$1(a) : a;
189
- return transformProperties.some((a) => F[a] ? F[a] !== "none" : !1) || (F.containerType ? F.containerType !== "normal" : !1) || !P && (F.backdropFilter ? F.backdropFilter !== "none" : !1) || !P && (F.filter ? F.filter !== "none" : !1) || willChangeValues.some((a) => (F.willChange || "").includes(a)) || containValues.some((a) => (F.contain || "").includes(a));
190
- }
191
- function getContainingBlock(a) {
192
- let P = getParentNode(a);
193
- for (; isHTMLElement(P) && !isLastTraversableNode(P);) {
194
- if (isContainingBlock(P)) return P;
195
- if (isTopLayer(P)) return null;
196
- P = getParentNode(P);
197
- }
198
- return null;
199
- }
200
- function isWebKit() {
201
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
202
- }
203
- var lastTraversableNodeNames = /* @__PURE__ */ new Set([
204
- "html",
205
- "body",
206
- "#document"
207
- ]);
208
- function isLastTraversableNode(a) {
209
- return lastTraversableNodeNames.has(getNodeName(a));
210
- }
211
- function getComputedStyle$1(a) {
212
- return getWindow(a).getComputedStyle(a);
213
- }
214
- function getNodeScroll(a) {
215
- return isElement(a) ? {
216
- scrollLeft: a.scrollLeft,
217
- scrollTop: a.scrollTop
218
- } : {
219
- scrollLeft: a.scrollX,
220
- scrollTop: a.scrollY
221
- };
222
- }
223
- function getParentNode(a) {
224
- if (getNodeName(a) === "html") return a;
225
- let P = a.assignedSlot || a.parentNode || isShadowRoot(a) && a.host || getDocumentElement(a);
226
- return isShadowRoot(P) ? P.host : P;
227
- }
228
- function getNearestOverflowAncestor(a) {
229
- let P = getParentNode(a);
230
- return isLastTraversableNode(P) ? a.ownerDocument ? a.ownerDocument.body : a.body : isHTMLElement(P) && isOverflowElement(P) ? P : getNearestOverflowAncestor(P);
231
- }
232
- function getOverflowAncestors(a, P, F) {
233
- P === void 0 && (P = []), F === void 0 && (F = !0);
234
- let I = getNearestOverflowAncestor(a), L = I === a.ownerDocument?.body, R = getWindow(I);
235
- if (L) {
236
- let a = getFrameElement(R);
237
- return P.concat(R, R.visualViewport || [], isOverflowElement(I) ? I : [], a && F ? getOverflowAncestors(a) : []);
238
- }
239
- return P.concat(I, getOverflowAncestors(I, [], F));
240
- }
241
- function getFrameElement(a) {
242
- return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
243
- }
244
- function getCssDimensions(a) {
245
- let P = getComputedStyle$1(a), I = parseFloat(P.width) || 0, L = parseFloat(P.height) || 0, R = isHTMLElement(a), z = R ? a.offsetWidth : I, B = R ? a.offsetHeight : L, V = round(I) !== z || round(L) !== B;
246
- return V && (I = z, L = B), {
247
- width: I,
248
- height: L,
249
- $: V
250
- };
251
- }
252
- function unwrapElement(a) {
253
- return isElement(a) ? a : a.contextElement;
254
- }
255
- function getScale(a) {
256
- let P = unwrapElement(a);
257
- if (!isHTMLElement(P)) return createCoords(1);
258
- let L = P.getBoundingClientRect(), { width: R, height: z, $: B } = getCssDimensions(P), V = (B ? round(L.width) : L.width) / R, H = (B ? round(L.height) : L.height) / z;
259
- return (!V || !Number.isFinite(V)) && (V = 1), (!H || !Number.isFinite(H)) && (H = 1), {
260
- x: V,
261
- y: H
262
- };
263
- }
264
- var noOffsets = /* @__PURE__ */ createCoords(0);
265
- function getVisualOffsets(a) {
266
- let P = getWindow(a);
267
- return !isWebKit() || !P.visualViewport ? noOffsets : {
268
- x: P.visualViewport.offsetLeft,
269
- y: P.visualViewport.offsetTop
270
- };
271
- }
272
- function shouldAddVisualOffsets(a, P, F) {
273
- return P === void 0 && (P = !1), !F || P && F !== getWindow(a) ? !1 : P;
274
- }
275
- function getBoundingClientRect(a, P, F, L) {
276
- P === void 0 && (P = !1), F === void 0 && (F = !1);
277
- let R = a.getBoundingClientRect(), z = unwrapElement(a), B = createCoords(1);
278
- P && (L ? isElement(L) && (B = getScale(L)) : B = getScale(a));
279
- let V = shouldAddVisualOffsets(z, F, L) ? getVisualOffsets(z) : createCoords(0), H = (R.left + V.x) / B.x, U = (R.top + V.y) / B.y, G = R.width / B.x, K = R.height / B.y;
280
- if (z) {
281
- let a = getWindow(z), P = L && isElement(L) ? getWindow(L) : L, F = a, I = getFrameElement(F);
282
- for (; I && L && P !== F;) {
283
- let a = getScale(I), P = I.getBoundingClientRect(), L = getComputedStyle$1(I), R = P.left + (I.clientLeft + parseFloat(L.paddingLeft)) * a.x, z = P.top + (I.clientTop + parseFloat(L.paddingTop)) * a.y;
284
- H *= a.x, U *= a.y, G *= a.x, K *= a.y, H += R, U += z, F = getWindow(I), I = getFrameElement(F);
285
- }
286
- }
287
- return rectToClientRect({
288
- width: G,
289
- height: K,
290
- x: H,
291
- y: U
292
- });
293
- }
294
- function getWindowScrollBarX(a, P) {
295
- let F = getNodeScroll(a).scrollLeft;
296
- return P ? P.left + F : getBoundingClientRect(getDocumentElement(a)).left + F;
297
- }
298
- function getHTMLOffset(a, P) {
299
- let F = a.getBoundingClientRect();
300
- return {
301
- x: F.left + P.scrollLeft - getWindowScrollBarX(a, F),
302
- y: F.top + P.scrollTop
303
- };
304
- }
305
- function convertOffsetParentRelativeRectToViewportRelativeRect(a) {
306
- let { elements: P, rect: F, offsetParent: L, strategy: R } = a, z = R === "fixed", B = getDocumentElement(L), V = P ? isTopLayer(P.floating) : !1;
307
- if (L === B || V && z) return F;
308
- let H = {
309
- scrollLeft: 0,
310
- scrollTop: 0
311
- }, U = createCoords(1), W = createCoords(0), G = isHTMLElement(L);
312
- if ((G || !G && !z) && ((getNodeName(L) !== "body" || isOverflowElement(B)) && (H = getNodeScroll(L)), isHTMLElement(L))) {
313
- let a = getBoundingClientRect(L);
314
- U = getScale(L), W.x = a.x + L.clientLeft, W.y = a.y + L.clientTop;
315
- }
316
- let K = B && !G && !z ? getHTMLOffset(B, H) : createCoords(0);
317
- return {
318
- width: F.width * U.x,
319
- height: F.height * U.y,
320
- x: F.x * U.x - H.scrollLeft * U.x + W.x + K.x,
321
- y: F.y * U.y - H.scrollTop * U.y + W.y + K.y
322
- };
323
- }
324
- function getClientRects(a) {
325
- return Array.from(a.getClientRects());
326
- }
327
- function getDocumentRect(a) {
328
- let F = getDocumentElement(a), I = getNodeScroll(a), L = a.ownerDocument.body, R = max(F.scrollWidth, F.clientWidth, L.scrollWidth, L.clientWidth), z = max(F.scrollHeight, F.clientHeight, L.scrollHeight, L.clientHeight), B = -I.scrollLeft + getWindowScrollBarX(a), V = -I.scrollTop;
329
- return getComputedStyle$1(L).direction === "rtl" && (B += max(F.clientWidth, L.clientWidth) - R), {
330
- width: R,
331
- height: z,
332
- x: B,
333
- y: V
334
- };
335
- }
336
- var SCROLLBAR_MAX = 25;
337
- function getViewportRect(a, P) {
338
- let F = getWindow(a), I = getDocumentElement(a), L = F.visualViewport, R = I.clientWidth, z = I.clientHeight, B = 0, V = 0;
339
- if (L) {
340
- R = L.width, z = L.height;
341
- let a = isWebKit();
342
- (!a || a && P === "fixed") && (B = L.offsetLeft, V = L.offsetTop);
343
- }
344
- let H = getWindowScrollBarX(I);
345
- if (H <= 0) {
346
- let a = I.ownerDocument, P = a.body, F = getComputedStyle(P), L = a.compatMode === "CSS1Compat" && parseFloat(F.marginLeft) + parseFloat(F.marginRight) || 0, z = Math.abs(I.clientWidth - P.clientWidth - L);
347
- z <= SCROLLBAR_MAX && (R -= z);
348
- } else H <= SCROLLBAR_MAX && (R += H);
349
- return {
350
- width: R,
351
- height: z,
352
- x: B,
353
- y: V
354
- };
355
- }
356
- var absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
357
- function getInnerBoundingClientRect(a, P) {
358
- let F = getBoundingClientRect(a, !0, P === "fixed"), L = F.top + a.clientTop, R = F.left + a.clientLeft, z = isHTMLElement(a) ? getScale(a) : createCoords(1);
359
- return {
360
- width: a.clientWidth * z.x,
361
- height: a.clientHeight * z.y,
362
- x: R * z.x,
363
- y: L * z.y
364
- };
365
- }
366
- function getClientRectFromClippingAncestor(a, P, F) {
367
- let I;
368
- if (P === "viewport") I = getViewportRect(a, F);
369
- else if (P === "document") I = getDocumentRect(getDocumentElement(a));
370
- else if (isElement(P)) I = getInnerBoundingClientRect(P, F);
371
- else {
372
- let F = getVisualOffsets(a);
373
- I = {
374
- x: P.x - F.x,
375
- y: P.y - F.y,
376
- width: P.width,
377
- height: P.height
378
- };
379
- }
380
- return rectToClientRect(I);
381
- }
382
- function hasFixedPositionAncestor(a, P) {
383
- let F = getParentNode(a);
384
- return F === P || !isElement(F) || isLastTraversableNode(F) ? !1 : getComputedStyle$1(F).position === "fixed" || hasFixedPositionAncestor(F, P);
385
- }
386
- function getClippingElementAncestors(a, P) {
387
- let F = P.get(a);
388
- if (F) return F;
389
- let I = getOverflowAncestors(a, [], !1).filter((a) => isElement(a) && getNodeName(a) !== "body"), L = null, R = getComputedStyle$1(a).position === "fixed", z = R ? getParentNode(a) : a;
390
- for (; isElement(z) && !isLastTraversableNode(z);) {
391
- let P = getComputedStyle$1(z), F = isContainingBlock(z);
392
- !F && P.position === "fixed" && (L = null), (R ? !F && !L : !F && P.position === "static" && L && absoluteOrFixed.has(L.position) || isOverflowElement(z) && !F && hasFixedPositionAncestor(a, z)) ? I = I.filter((a) => a !== z) : L = P, z = getParentNode(z);
393
- }
394
- return P.set(a, I), I;
395
- }
396
- function getClippingRect(F) {
397
- let { element: I, boundary: L, rootBoundary: R, strategy: z } = F, B = [...L === "clippingAncestors" ? isTopLayer(I) ? [] : getClippingElementAncestors(I, this._c) : [].concat(L), R], V = B[0], H = B.reduce((F, L) => {
398
- let R = getClientRectFromClippingAncestor(I, L, z);
399
- return F.top = max(R.top, F.top), F.right = min(R.right, F.right), F.bottom = min(R.bottom, F.bottom), F.left = max(R.left, F.left), F;
400
- }, getClientRectFromClippingAncestor(I, V, z));
401
- return {
402
- width: H.right - H.left,
403
- height: H.bottom - H.top,
404
- x: H.left,
405
- y: H.top
406
- };
407
- }
408
- function getDimensions(a) {
409
- let { width: P, height: F } = getCssDimensions(a);
410
- return {
411
- width: P,
412
- height: F
413
- };
414
- }
415
- function getRectRelativeToOffsetParent(a, P, F) {
416
- let L = isHTMLElement(P), R = getDocumentElement(P), z = F === "fixed", B = getBoundingClientRect(a, !0, z, P), V = {
417
- scrollLeft: 0,
418
- scrollTop: 0
419
- }, H = createCoords(0);
420
- function U() {
421
- H.x = getWindowScrollBarX(R);
422
- }
423
- if (L || !L && !z) if ((getNodeName(P) !== "body" || isOverflowElement(R)) && (V = getNodeScroll(P)), L) {
424
- let a = getBoundingClientRect(P, !0, z, P);
425
- H.x = a.x + P.clientLeft, H.y = a.y + P.clientTop;
426
- } else R && U();
427
- z && !L && R && U();
428
- let W = R && !L && !z ? getHTMLOffset(R, V) : createCoords(0);
429
- return {
430
- x: B.left + V.scrollLeft - H.x - W.x,
431
- y: B.top + V.scrollTop - H.y - W.y,
432
- width: B.width,
433
- height: B.height
434
- };
435
- }
436
- function isStaticPositioned(a) {
437
- return getComputedStyle$1(a).position === "static";
438
- }
439
- function getTrueOffsetParent(a, P) {
440
- if (!isHTMLElement(a) || getComputedStyle$1(a).position === "fixed") return null;
441
- if (P) return P(a);
442
- let F = a.offsetParent;
443
- return getDocumentElement(a) === F && (F = F.ownerDocument.body), F;
444
- }
445
- function getOffsetParent(a, P) {
446
- let F = getWindow(a);
447
- if (isTopLayer(a)) return F;
448
- if (!isHTMLElement(a)) {
449
- let P = getParentNode(a);
450
- for (; P && !isLastTraversableNode(P);) {
451
- if (isElement(P) && !isStaticPositioned(P)) return P;
452
- P = getParentNode(P);
453
- }
454
- return F;
455
- }
456
- let I = getTrueOffsetParent(a, P);
457
- for (; I && isTableElement(I) && isStaticPositioned(I);) I = getTrueOffsetParent(I, P);
458
- return I && isLastTraversableNode(I) && isStaticPositioned(I) && !isContainingBlock(I) ? F : I || getContainingBlock(a) || F;
459
- }
460
- var getElementRects = async function(a) {
461
- let P = this.getOffsetParent || getOffsetParent, F = this.getDimensions, I = await F(a.floating);
462
- return {
463
- reference: getRectRelativeToOffsetParent(a.reference, await P(a.floating), a.strategy),
464
- floating: {
465
- x: 0,
466
- y: 0,
467
- width: I.width,
468
- height: I.height
469
- }
470
- };
471
- };
472
- function isRTL(a) {
473
- return getComputedStyle$1(a).direction === "rtl";
474
- }
475
- var platform = {
476
- convertOffsetParentRelativeRectToViewportRelativeRect,
477
- getDocumentElement,
478
- getClippingRect,
479
- getOffsetParent,
480
- getElementRects,
481
- getClientRects,
482
- getDimensions,
483
- getScale,
484
- isElement,
485
- isRTL
486
- }, computePosition = (a, P, F) => {
487
- let I = /* @__PURE__ */ new Map(), L = {
488
- platform,
489
- ...F
490
- }, R = {
491
- ...L.platform,
492
- _c: I
493
- };
494
- return computePosition$1(a, P, {
495
- ...L,
496
- platform: R
497
- });
498
- }, Polyfills = class {
499
- constructor(a) {
500
- this.popover = a, this.trigger = document.querySelector(`[popovertarget="${a.getAttribute("id")}"`), this.positionPopover = this.positionPopover.bind(this), this.popover.addEventListener("toggle", this.positionPopover);
501
- }
502
- positionPopover = ({ newState: a }) => {
503
- a === "open" && computePosition(this.trigger, this.popover, { placement: this.placement || "bottom-start" }).then(({ x: a, y: P }) => {
504
- this.popover.style.insetInlineStart = `${a}px`, this.popover.style.insetBlockStart = `${P}px`;
505
- });
506
- };
507
- get placement() {
508
- return this.popover.getAttribute("data-placement");
509
- }
510
- };
511
- export { Polyfills as default };