@pnx-mixtape/mxds 0.0.28 → 0.0.30
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/build/accordion.css +1 -1
- package/dist/build/base.css +1 -1
- package/dist/build/breadcrumb.css +1 -1
- package/dist/build/button.css +1 -1
- package/dist/build/callout.css +1 -1
- package/dist/build/card.css +1 -1
- package/dist/build/carousel.css +1 -1
- package/dist/build/chunks/{DropMenu-LnJEp-sg.js → DropMenu-BckyZaZM.js} +1 -1
- package/dist/build/chunks/{Popover-C4gisyxr.js → Popover-hTv4lVea.js} +2 -2
- package/dist/build/chunks/polyfills-QW1VbwlO.js +562 -0
- package/dist/build/chunks/popover-Dk48Vm_U.js +407 -0
- package/dist/build/constants.css +1 -1
- package/dist/build/container-grid.css +1 -1
- package/dist/build/content-block.css +1 -1
- package/dist/build/dialog.css +1 -1
- package/dist/build/drop-menu.css +1 -1
- package/dist/build/drop-menu.entry.js +2 -2
- package/dist/build/drupal.css +1 -1
- package/dist/build/filters.css +1 -1
- package/dist/build/footer.css +1 -1
- package/dist/build/form.css +1 -1
- package/dist/build/global-alert.css +1 -1
- package/dist/build/grid.css +1 -1
- package/dist/build/header.css +1 -1
- package/dist/build/header.entry.js +524 -379
- package/dist/build/hero-banner.css +1 -1
- package/dist/build/icon.css +1 -1
- package/dist/build/in-page-alert.css +1 -1
- package/dist/build/in-page-navigation.css +1 -1
- package/dist/build/in-page-navigation.entry.js +23 -11
- package/dist/build/link-list.css +1 -1
- package/dist/build/list-item.css +1 -1
- package/dist/build/masthead.css +1 -1
- package/dist/build/navigation.css +1 -1
- package/dist/build/page.css +1 -1
- package/dist/build/pagination.css +1 -1
- package/dist/build/popover.css +1 -1
- package/dist/build/popover.entry.js +1 -1
- package/dist/build/results-bar.css +1 -1
- package/dist/build/section.css +1 -1
- package/dist/build/side-navigation.css +1 -1
- package/dist/build/sidebar.css +1 -1
- package/dist/build/social-links.css +1 -1
- package/dist/build/steps.css +1 -1
- package/dist/build/sticky.css +1 -1
- package/dist/build/tabs.css +1 -1
- package/dist/build/tabs.entry.js +2 -2
- package/dist/build/tag.css +1 -1
- package/dist/build/utilities.css +1 -1
- package/dist/build/utility-list.css +1 -1
- package/package.json +22 -21
- package/src/Atom/Background/_background.css +1 -0
- package/src/Atom/Image/_image.css +1 -0
- package/src/Atom/Media/_media.css +0 -6
- package/src/Atom/Spacing/_mixins.css +22 -0
- package/src/Atom/Spacing/_spacing.css +33 -0
- package/src/Atom/Table/Table.stories.ts +17 -7
- package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +16 -8
- package/src/Atom/Table/__snapshots__/TableResponsive.stories.ts.snap +1 -1
- package/src/Atom/Table/_table.css +26 -1
- package/src/Atom/Table/table-responsive.twig +1 -1
- package/src/Atom/Table/table.twig +9 -1
- package/src/Atom/_flow.css +1 -5
- package/src/Component/Card/Card.stories.ts +19 -0
- package/src/Component/Card/__snapshots__/Card.stories.ts.snap +40 -9
- package/src/Component/Card/card.css +60 -12
- package/src/Component/Card/card.twig +5 -2
- package/src/Component/Carousel/Elements/Carousel.ts +8 -3
- package/src/Component/Carousel/__snapshots__/Carousel.stories.ts.snap +52 -52
- package/src/Component/Carousel/carousel.css +14 -35
- package/src/Component/Carousel/carousel.twig +0 -1
- package/src/Component/GlobalAlert/global-alert.css +8 -4
- package/src/Component/InPageAlert/in-page-alert.css +1 -0
- package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +12 -7
- package/src/Component/InPageNavigation/InPageNavigation.stories.ts +28 -12
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +30 -49
- package/src/Component/InPageNavigation/in-page-navigation.css +8 -4
- package/src/Component/InPageNavigation/in-page-navigation.twig +9 -6
- package/src/Component/InPageNavigation/twig/content-example.twig +1 -1
- package/src/Component/InPageNavigation/twig/in-page-navigation-selector.twig +4 -0
- package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +9 -9
- package/src/Component/ListItem/list-item.css +14 -1
- package/src/Component/ListItem/list-item.twig +6 -2
- package/src/Component/Pagination/Pagination.stories.ts +1 -1
- package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +2 -2
- package/src/Component/ResultsBar/results-bar.css +4 -0
- package/src/Form/FormItem/FormItem.stories.ts +14 -0
- package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +19 -0
- package/src/Form/form.css +11 -3
- package/src/Layout/Grid/Grid.stories.ts +7 -7
- package/src/Layout/Grid/GridItem.stories.ts +1 -2
- package/src/Layout/Section/section.css +8 -0
- package/src/_custom-media.css +2 -0
- package/src/constants.css +16 -4
- package/src/enums.ts +1 -1
- package/src/tokens.js +1 -0
- package/dist/build/chunks/polyfills-Du4RTZDf.js +0 -511
- package/dist/build/chunks/popover-Bd5oQ1Ic.js +0 -407
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
var ToggleEvent = class extends Event {
|
|
2
|
-
oldState;
|
|
3
|
-
newState;
|
|
4
|
-
constructor(s, { oldState: j = "", newState: M = "", ...N } = {}) {
|
|
5
|
-
super(s, N), this.oldState = String(j || ""), this.newState = String(M || "");
|
|
6
|
-
}
|
|
7
|
-
}, popoverToggleTaskQueue = /* @__PURE__ */ new WeakMap();
|
|
8
|
-
function queuePopoverToggleEventTask(M, N, P) {
|
|
9
|
-
popoverToggleTaskQueue.set(M, setTimeout(() => {
|
|
10
|
-
popoverToggleTaskQueue.has(M) && M.dispatchEvent(new ToggleEvent("toggle", {
|
|
11
|
-
cancelable: !1,
|
|
12
|
-
oldState: N,
|
|
13
|
-
newState: P
|
|
14
|
-
}));
|
|
15
|
-
}, 0));
|
|
16
|
-
}
|
|
17
|
-
var ShadowRoot = globalThis.ShadowRoot || function() {}, HTMLDialogElement = globalThis.HTMLDialogElement || function() {}, topLayerElements = /* @__PURE__ */ new WeakMap(), autoPopoverList = /* @__PURE__ */ new WeakMap(), hintPopoverList = /* @__PURE__ */ new WeakMap(), visibilityState = /* @__PURE__ */ new WeakMap();
|
|
18
|
-
function getPopoverVisibilityState(s) {
|
|
19
|
-
return visibilityState.get(s) || "hidden";
|
|
20
|
-
}
|
|
21
|
-
var popoverInvoker = /* @__PURE__ */ new WeakMap();
|
|
22
|
-
function lastSetElement(s) {
|
|
23
|
-
return [...s].pop();
|
|
24
|
-
}
|
|
25
|
-
function popoverTargetAttributeActivationBehavior(s) {
|
|
26
|
-
let j = s.popoverTargetElement;
|
|
27
|
-
if (!(j instanceof HTMLElement)) return;
|
|
28
|
-
let M = getPopoverVisibilityState(j);
|
|
29
|
-
s.popoverTargetAction === "show" && M === "showing" || s.popoverTargetAction === "hide" && M === "hidden" || (M === "showing" ? hidePopover(j, !0, !0) : checkPopoverValidity(j, !1) && (popoverInvoker.set(j, s), showPopover(j)));
|
|
30
|
-
}
|
|
31
|
-
function checkPopoverValidity(s, j) {
|
|
32
|
-
return !(s.popover !== "auto" && s.popover !== "manual" && s.popover !== "hint" || !s.isConnected || j && getPopoverVisibilityState(s) !== "showing" || !j && getPopoverVisibilityState(s) !== "hidden" || s instanceof HTMLDialogElement && s.hasAttribute("open") || document.fullscreenElement === s);
|
|
33
|
-
}
|
|
34
|
-
function getStackPosition(s) {
|
|
35
|
-
if (!s) return 0;
|
|
36
|
-
let j = autoPopoverList.get(document) || /* @__PURE__ */ new Set(), M = hintPopoverList.get(document) || /* @__PURE__ */ new Set();
|
|
37
|
-
return M.has(s) ? [...M].indexOf(s) + j.size + 1 : j.has(s) ? [...j].indexOf(s) + 1 : 0;
|
|
38
|
-
}
|
|
39
|
-
function topMostClickedPopover(s) {
|
|
40
|
-
let j = nearestInclusiveOpenPopover(s), M = nearestInclusiveTargetPopoverForInvoker(s);
|
|
41
|
-
return getStackPosition(j) > getStackPosition(M) ? j : M;
|
|
42
|
-
}
|
|
43
|
-
function topmostAutoOrHintPopover(s) {
|
|
44
|
-
let j, M = hintPopoverList.get(s) || /* @__PURE__ */ new Set(), N = autoPopoverList.get(s) || /* @__PURE__ */ new Set(), P = M.size > 0 ? M : N.size > 0 ? N : null;
|
|
45
|
-
return P ? (j = lastSetElement(P), j.isConnected ? j : (P.delete(j), topmostAutoOrHintPopover(s))) : null;
|
|
46
|
-
}
|
|
47
|
-
function topMostPopoverInList(s) {
|
|
48
|
-
for (let j of s || []) if (!j.isConnected) s.delete(j);
|
|
49
|
-
else return j;
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
function getRootNode(s) {
|
|
53
|
-
return typeof s.getRootNode == "function" ? s.getRootNode() : s.parentNode ? getRootNode(s.parentNode) : s;
|
|
54
|
-
}
|
|
55
|
-
function nearestInclusiveOpenPopover(s) {
|
|
56
|
-
for (; s;) {
|
|
57
|
-
if (s instanceof HTMLElement && s.popover === "auto" && visibilityState.get(s) === "showing") return s;
|
|
58
|
-
if (s = s instanceof Element && s.assignedSlot || s.parentElement || getRootNode(s), s instanceof ShadowRoot && (s = s.host), s instanceof Document) return;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function nearestInclusiveTargetPopoverForInvoker(s) {
|
|
62
|
-
for (; s;) {
|
|
63
|
-
let j = s.popoverTargetElement;
|
|
64
|
-
if (j instanceof HTMLElement) return j;
|
|
65
|
-
if (s = s.parentElement || getRootNode(s), s instanceof ShadowRoot && (s = s.host), s instanceof Document) return;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function topMostPopoverAncestor(s, j) {
|
|
69
|
-
let M = /* @__PURE__ */ new Map(), N = 0;
|
|
70
|
-
for (let s of j || []) M.set(s, N), N += 1;
|
|
71
|
-
M.set(s, N), N += 1;
|
|
72
|
-
let P = null;
|
|
73
|
-
function F(j) {
|
|
74
|
-
if (!j) return;
|
|
75
|
-
let N = !1, F = null, I = null;
|
|
76
|
-
for (; !N;) {
|
|
77
|
-
if (F = nearestInclusiveOpenPopover(j) || null, F === null || !M.has(F)) return;
|
|
78
|
-
(s.popover === "hint" || F.popover === "auto") && (N = !0), N || (j = F.parentElement);
|
|
79
|
-
}
|
|
80
|
-
I = M.get(F), (P === null || M.get(P) < I) && (P = F);
|
|
81
|
-
}
|
|
82
|
-
return F(s.parentElement || getRootNode(s)), P;
|
|
83
|
-
}
|
|
84
|
-
function isFocusable(s) {
|
|
85
|
-
return s.hidden || s instanceof ShadowRoot || (s instanceof HTMLButtonElement || s instanceof HTMLInputElement || s instanceof HTMLSelectElement || s instanceof HTMLTextAreaElement || s instanceof HTMLOptGroupElement || s instanceof HTMLOptionElement || s instanceof HTMLFieldSetElement) && s.disabled || s instanceof HTMLInputElement && s.type === "hidden" || s instanceof HTMLAnchorElement && s.href === "" ? !1 : typeof s.tabIndex == "number" && s.tabIndex !== -1;
|
|
86
|
-
}
|
|
87
|
-
function focusDelegate(s) {
|
|
88
|
-
if (s.shadowRoot && s.shadowRoot.delegatesFocus !== !0) return null;
|
|
89
|
-
let j = s;
|
|
90
|
-
j.shadowRoot && (j = j.shadowRoot);
|
|
91
|
-
let M = j.querySelector("[autofocus]");
|
|
92
|
-
if (M) return M;
|
|
93
|
-
{
|
|
94
|
-
let s = j.querySelectorAll("slot");
|
|
95
|
-
for (let j of s) {
|
|
96
|
-
let s = j.assignedElements({ flatten: !0 });
|
|
97
|
-
for (let j of s) if (j.hasAttribute("autofocus")) return j;
|
|
98
|
-
else if (M = j.querySelector("[autofocus]"), M) return M;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
let N = s.ownerDocument.createTreeWalker(j, NodeFilter.SHOW_ELEMENT), P = N.currentNode;
|
|
102
|
-
for (; P;) {
|
|
103
|
-
if (isFocusable(P)) return P;
|
|
104
|
-
P = N.nextNode();
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
function popoverFocusingSteps(s) {
|
|
108
|
-
var j;
|
|
109
|
-
(j = focusDelegate(s)) == null || j.focus();
|
|
110
|
-
}
|
|
111
|
-
var previouslyFocusedElements = /* @__PURE__ */ new WeakMap();
|
|
112
|
-
function showPopover(j) {
|
|
113
|
-
if (!checkPopoverValidity(j, !1)) return;
|
|
114
|
-
let N = j.ownerDocument;
|
|
115
|
-
if (!j.dispatchEvent(new ToggleEvent("beforetoggle", {
|
|
116
|
-
cancelable: !0,
|
|
117
|
-
oldState: "closed",
|
|
118
|
-
newState: "open"
|
|
119
|
-
})) || !checkPopoverValidity(j, !1)) return;
|
|
120
|
-
let P = !1, R = j.popover, z = null, B = topMostPopoverAncestor(j, autoPopoverList.get(N) || /* @__PURE__ */ new Set()), V = topMostPopoverAncestor(j, hintPopoverList.get(N) || /* @__PURE__ */ new Set());
|
|
121
|
-
if (R === "auto" && (closeAllOpenPopoversInList(hintPopoverList.get(N) || /* @__PURE__ */ new Set(), P, !0), hideAllPopoversUntil(B || N, P, !0), z = "auto"), R === "hint" && (V ? (hideAllPopoversUntil(V, P, !0), z = "hint") : (closeAllOpenPopoversInList(hintPopoverList.get(N) || /* @__PURE__ */ new Set(), P, !0), B ? (hideAllPopoversUntil(B, P, !0), z = "auto") : z = "hint")), R === "auto" || R === "hint") {
|
|
122
|
-
if (R !== j.popover || !checkPopoverValidity(j, !1)) return;
|
|
123
|
-
topmostAutoOrHintPopover(N) || (P = !0), z === "auto" ? (autoPopoverList.has(N) || autoPopoverList.set(N, /* @__PURE__ */ new Set()), autoPopoverList.get(N).add(j)) : z === "hint" && (hintPopoverList.has(N) || hintPopoverList.set(N, /* @__PURE__ */ new Set()), hintPopoverList.get(N).add(j));
|
|
124
|
-
}
|
|
125
|
-
previouslyFocusedElements.delete(j);
|
|
126
|
-
let H = N.activeElement;
|
|
127
|
-
j.classList.add(":popover-open"), visibilityState.set(j, "showing"), topLayerElements.has(N) || topLayerElements.set(N, /* @__PURE__ */ new Set()), topLayerElements.get(N).add(j), setInvokerAriaExpanded(popoverInvoker.get(j), !0), popoverFocusingSteps(j), P && H && j.popover === "auto" && previouslyFocusedElements.set(j, H), queuePopoverToggleEventTask(j, "closed", "open");
|
|
128
|
-
}
|
|
129
|
-
function hidePopover(j, N = !1, P = !1) {
|
|
130
|
-
var R, B;
|
|
131
|
-
if (!checkPopoverValidity(j, !0)) return;
|
|
132
|
-
let V = j.ownerDocument;
|
|
133
|
-
if (["auto", "hint"].includes(j.popover) && (hideAllPopoversUntil(j, N, P), !checkPopoverValidity(j, !0))) return;
|
|
134
|
-
let H = autoPopoverList.get(V) || /* @__PURE__ */ new Set(), U = H.has(j) && lastSetElement(H) === j;
|
|
135
|
-
if (setInvokerAriaExpanded(popoverInvoker.get(j), !1), popoverInvoker.delete(j), P && (j.dispatchEvent(new ToggleEvent("beforetoggle", {
|
|
136
|
-
oldState: "open",
|
|
137
|
-
newState: "closed"
|
|
138
|
-
})), U && lastSetElement(H) !== j && hideAllPopoversUntil(j, N, P), !checkPopoverValidity(j, !0))) return;
|
|
139
|
-
(R = topLayerElements.get(V)) == null || R.delete(j), H.delete(j), (B = hintPopoverList.get(V)) == null || B.delete(j), j.classList.remove(":popover-open"), visibilityState.set(j, "hidden"), P && queuePopoverToggleEventTask(j, "open", "closed");
|
|
140
|
-
let W = previouslyFocusedElements.get(j);
|
|
141
|
-
W && (previouslyFocusedElements.delete(j), N && W.focus());
|
|
142
|
-
}
|
|
143
|
-
function closeAllOpenPopovers(s, j = !1, M = !1) {
|
|
144
|
-
let N = topmostAutoOrHintPopover(s);
|
|
145
|
-
for (; N;) hidePopover(N, j, M), N = topmostAutoOrHintPopover(s);
|
|
146
|
-
}
|
|
147
|
-
function closeAllOpenPopoversInList(s, j = !1, M = !1) {
|
|
148
|
-
let N = topMostPopoverInList(s);
|
|
149
|
-
for (; N;) hidePopover(N, j, M), N = topMostPopoverInList(s);
|
|
150
|
-
}
|
|
151
|
-
function hidePopoverStackUntil(s, j, M, N) {
|
|
152
|
-
let P = !1, F = !1;
|
|
153
|
-
for (; P || !F;) {
|
|
154
|
-
F = !0;
|
|
155
|
-
let I = null, L = !1;
|
|
156
|
-
for (let M of j) if (M === s) L = !0;
|
|
157
|
-
else if (L) {
|
|
158
|
-
I = M;
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
if (!I) return;
|
|
162
|
-
for (; getPopoverVisibilityState(I) === "showing" && j.size;) hidePopover(lastSetElement(j), M, N);
|
|
163
|
-
j.has(s) && lastSetElement(j) !== s && (P = !0), P && (N = !1);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function hideAllPopoversUntil(s, j, M) {
|
|
167
|
-
let N = s.ownerDocument || s;
|
|
168
|
-
if (s instanceof Document) return closeAllOpenPopovers(N, j, M);
|
|
169
|
-
if (hintPopoverList.get(N)?.has(s)) {
|
|
170
|
-
hidePopoverStackUntil(s, hintPopoverList.get(N), j, M);
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
closeAllOpenPopoversInList(hintPopoverList.get(N) || /* @__PURE__ */ new Set(), j, M), autoPopoverList.get(N)?.has(s) && hidePopoverStackUntil(s, autoPopoverList.get(N), j, M);
|
|
174
|
-
}
|
|
175
|
-
var popoverPointerDownTargets = /* @__PURE__ */ new WeakMap();
|
|
176
|
-
function lightDismissOpenPopovers(s) {
|
|
177
|
-
if (!s.isTrusted) return;
|
|
178
|
-
let j = s.composedPath()[0];
|
|
179
|
-
if (!j) return;
|
|
180
|
-
let M = j.ownerDocument;
|
|
181
|
-
if (!topmostAutoOrHintPopover(M)) return;
|
|
182
|
-
let N = topMostClickedPopover(j);
|
|
183
|
-
if (N && s.type === "pointerdown") popoverPointerDownTargets.set(M, N);
|
|
184
|
-
else if (s.type === "pointerup") {
|
|
185
|
-
let s = popoverPointerDownTargets.get(M) === N;
|
|
186
|
-
popoverPointerDownTargets.delete(M), s && hideAllPopoversUntil(N || M, !1, !0);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
var initialAriaExpandedValue = /* @__PURE__ */ new WeakMap();
|
|
190
|
-
function setInvokerAriaExpanded(s, j = !1) {
|
|
191
|
-
if (!s) return;
|
|
192
|
-
initialAriaExpandedValue.has(s) || initialAriaExpandedValue.set(s, s.getAttribute("aria-expanded"));
|
|
193
|
-
let M = s.popoverTargetElement;
|
|
194
|
-
if (M instanceof HTMLElement && M.popover === "auto") s.setAttribute("aria-expanded", String(j));
|
|
195
|
-
else {
|
|
196
|
-
let j = initialAriaExpandedValue.get(s);
|
|
197
|
-
j ? s.setAttribute("aria-expanded", j) : s.removeAttribute("aria-expanded");
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
var ShadowRoot2 = globalThis.ShadowRoot || function() {};
|
|
201
|
-
function isSupported() {
|
|
202
|
-
return typeof HTMLElement < "u" && typeof HTMLElement.prototype == "object" && "popover" in HTMLElement.prototype;
|
|
203
|
-
}
|
|
204
|
-
function patchSelectorFn(s, j, M) {
|
|
205
|
-
let N = s[j];
|
|
206
|
-
Object.defineProperty(s, j, { value(s) {
|
|
207
|
-
return N.call(this, M(s));
|
|
208
|
-
} });
|
|
209
|
-
}
|
|
210
|
-
var nonEscapedPopoverSelector = /(^|[^\\]):popover-open\b/g;
|
|
211
|
-
function hasLayerSupport() {
|
|
212
|
-
return typeof globalThis.CSSLayerBlockRule == "function";
|
|
213
|
-
}
|
|
214
|
-
function getStyles() {
|
|
215
|
-
let s = hasLayerSupport();
|
|
216
|
-
return `
|
|
217
|
-
${s ? "@layer popover-polyfill {" : ""}
|
|
218
|
-
:where([popover]) {
|
|
219
|
-
position: fixed;
|
|
220
|
-
z-index: 2147483647;
|
|
221
|
-
inset: 0;
|
|
222
|
-
padding: 0.25em;
|
|
223
|
-
width: fit-content;
|
|
224
|
-
height: fit-content;
|
|
225
|
-
border-width: initial;
|
|
226
|
-
border-color: initial;
|
|
227
|
-
border-image: initial;
|
|
228
|
-
border-style: solid;
|
|
229
|
-
background-color: canvas;
|
|
230
|
-
color: canvastext;
|
|
231
|
-
overflow: auto;
|
|
232
|
-
margin: auto;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
:where([popover]:not(.\\:popover-open)) {
|
|
236
|
-
display: none;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
:where(dialog[popover].\\:popover-open) {
|
|
240
|
-
display: block;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
:where(dialog[popover][open]) {
|
|
244
|
-
display: revert;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
:where([anchor].\\:popover-open) {
|
|
248
|
-
inset: auto;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
:where([anchor]:popover-open) {
|
|
252
|
-
inset: auto;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
@supports not (background-color: canvas) {
|
|
256
|
-
:where([popover]) {
|
|
257
|
-
background-color: white;
|
|
258
|
-
color: black;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
@supports (width: -moz-fit-content) {
|
|
263
|
-
:where([popover]) {
|
|
264
|
-
width: -moz-fit-content;
|
|
265
|
-
height: -moz-fit-content;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
@supports not (inset: 0) {
|
|
270
|
-
:where([popover]) {
|
|
271
|
-
top: 0;
|
|
272
|
-
left: 0;
|
|
273
|
-
right: 0;
|
|
274
|
-
bottom: 0;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
${s ? "}" : ""}
|
|
278
|
-
`;
|
|
279
|
-
}
|
|
280
|
-
var popoverStyleSheet = null;
|
|
281
|
-
function injectStyles(s) {
|
|
282
|
-
let j = getStyles();
|
|
283
|
-
if (popoverStyleSheet === null) try {
|
|
284
|
-
popoverStyleSheet = new CSSStyleSheet(), popoverStyleSheet.replaceSync(j);
|
|
285
|
-
} catch {
|
|
286
|
-
popoverStyleSheet = !1;
|
|
287
|
-
}
|
|
288
|
-
if (popoverStyleSheet === !1) {
|
|
289
|
-
let M = document.createElement("style");
|
|
290
|
-
M.textContent = j, s instanceof Document ? s.head.prepend(M) : s.prepend(M);
|
|
291
|
-
} else s.adoptedStyleSheets = [popoverStyleSheet, ...s.adoptedStyleSheets];
|
|
292
|
-
}
|
|
293
|
-
function apply() {
|
|
294
|
-
if (typeof window > "u") return;
|
|
295
|
-
window.ToggleEvent = window.ToggleEvent || ToggleEvent;
|
|
296
|
-
function j(s) {
|
|
297
|
-
return s?.includes(":popover-open") && (s = s.replace(nonEscapedPopoverSelector, "$1.\\:popover-open")), s;
|
|
298
|
-
}
|
|
299
|
-
patchSelectorFn(Document.prototype, "querySelector", j), patchSelectorFn(Document.prototype, "querySelectorAll", j), patchSelectorFn(Element.prototype, "querySelector", j), patchSelectorFn(Element.prototype, "querySelectorAll", j), patchSelectorFn(Element.prototype, "matches", j), patchSelectorFn(Element.prototype, "closest", j), patchSelectorFn(DocumentFragment.prototype, "querySelectorAll", j), Object.defineProperties(HTMLElement.prototype, {
|
|
300
|
-
popover: {
|
|
301
|
-
enumerable: !0,
|
|
302
|
-
configurable: !0,
|
|
303
|
-
get() {
|
|
304
|
-
if (!this.hasAttribute("popover")) return null;
|
|
305
|
-
let s = (this.getAttribute("popover") || "").toLowerCase();
|
|
306
|
-
return s === "" || s == "auto" ? "auto" : s == "hint" ? "hint" : "manual";
|
|
307
|
-
},
|
|
308
|
-
set(s) {
|
|
309
|
-
s === null ? this.removeAttribute("popover") : this.setAttribute("popover", s);
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
showPopover: {
|
|
313
|
-
enumerable: !0,
|
|
314
|
-
configurable: !0,
|
|
315
|
-
value(s = {}) {
|
|
316
|
-
showPopover(this);
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
hidePopover: {
|
|
320
|
-
enumerable: !0,
|
|
321
|
-
configurable: !0,
|
|
322
|
-
value() {
|
|
323
|
-
hidePopover(this, !0, !0);
|
|
324
|
-
}
|
|
325
|
-
},
|
|
326
|
-
togglePopover: {
|
|
327
|
-
enumerable: !0,
|
|
328
|
-
configurable: !0,
|
|
329
|
-
value(s = {}) {
|
|
330
|
-
return typeof s == "boolean" && (s = { force: s }), visibilityState.get(this) === "showing" && s.force === void 0 || s.force === !1 ? hidePopover(this, !0, !0) : (s.force === void 0 || s.force === !0) && showPopover(this), visibilityState.get(this) === "showing";
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
let M = Element.prototype.attachShadow;
|
|
335
|
-
M && Object.defineProperties(Element.prototype, { attachShadow: {
|
|
336
|
-
enumerable: !0,
|
|
337
|
-
configurable: !0,
|
|
338
|
-
writable: !0,
|
|
339
|
-
value(s) {
|
|
340
|
-
let j = M.call(this, s);
|
|
341
|
-
return injectStyles(j), j;
|
|
342
|
-
}
|
|
343
|
-
} });
|
|
344
|
-
let N = HTMLElement.prototype.attachInternals;
|
|
345
|
-
N && Object.defineProperties(HTMLElement.prototype, { attachInternals: {
|
|
346
|
-
enumerable: !0,
|
|
347
|
-
configurable: !0,
|
|
348
|
-
writable: !0,
|
|
349
|
-
value() {
|
|
350
|
-
let s = N.call(this);
|
|
351
|
-
return s.shadowRoot && injectStyles(s.shadowRoot), s;
|
|
352
|
-
}
|
|
353
|
-
} });
|
|
354
|
-
let P = /* @__PURE__ */ new WeakMap();
|
|
355
|
-
function F(s) {
|
|
356
|
-
Object.defineProperties(s.prototype, {
|
|
357
|
-
popoverTargetElement: {
|
|
358
|
-
enumerable: !0,
|
|
359
|
-
configurable: !0,
|
|
360
|
-
set(s) {
|
|
361
|
-
if (s === null) this.removeAttribute("popovertarget"), P.delete(this);
|
|
362
|
-
else if (s instanceof Element) this.setAttribute("popovertarget", ""), P.set(this, s);
|
|
363
|
-
else throw TypeError("popoverTargetElement must be an element or null");
|
|
364
|
-
},
|
|
365
|
-
get() {
|
|
366
|
-
if (this.localName !== "button" && this.localName !== "input" || this.localName === "input" && this.type !== "reset" && this.type !== "image" && this.type !== "button" || this.disabled || this.form && this.type === "submit") return null;
|
|
367
|
-
let s = P.get(this);
|
|
368
|
-
if (s && s.isConnected) return s;
|
|
369
|
-
if (s && !s.isConnected) return P.delete(this), null;
|
|
370
|
-
let j = getRootNode(this), M = this.getAttribute("popovertarget");
|
|
371
|
-
return (j instanceof Document || j instanceof ShadowRoot2) && M && j.getElementById(M) || null;
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
popoverTargetAction: {
|
|
375
|
-
enumerable: !0,
|
|
376
|
-
configurable: !0,
|
|
377
|
-
get() {
|
|
378
|
-
let s = (this.getAttribute("popovertargetaction") || "").toLowerCase();
|
|
379
|
-
return s === "show" || s === "hide" ? s : "toggle";
|
|
380
|
-
},
|
|
381
|
-
set(s) {
|
|
382
|
-
this.setAttribute("popovertargetaction", s);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
F(HTMLButtonElement), F(HTMLInputElement);
|
|
388
|
-
let I = (s) => {
|
|
389
|
-
if (s.defaultPrevented) return;
|
|
390
|
-
let j = s.composedPath(), M = j[0];
|
|
391
|
-
if (!(M instanceof Element) || M?.shadowRoot) return;
|
|
392
|
-
let N = getRootNode(M);
|
|
393
|
-
if (!(N instanceof ShadowRoot2 || N instanceof Document)) return;
|
|
394
|
-
let P = j.find((s) => s.matches?.call(s, "[popovertargetaction],[popovertarget]"));
|
|
395
|
-
if (P) {
|
|
396
|
-
popoverTargetAttributeActivationBehavior(P), s.preventDefault();
|
|
397
|
-
return;
|
|
398
|
-
}
|
|
399
|
-
}, L = (s) => {
|
|
400
|
-
let j = s.key, M = s.target;
|
|
401
|
-
!s.defaultPrevented && M && (j === "Escape" || j === "Esc") && hideAllPopoversUntil(M.ownerDocument, !0, !0);
|
|
402
|
-
};
|
|
403
|
-
((s) => {
|
|
404
|
-
s.addEventListener("click", I), s.addEventListener("keydown", L), s.addEventListener("pointerdown", lightDismissOpenPopovers), s.addEventListener("pointerup", lightDismissOpenPopovers);
|
|
405
|
-
})(document), injectStyles(document);
|
|
406
|
-
}
|
|
407
|
-
isSupported() || apply();
|