@pnx-mixtape/mxds 0.1.0-rc.4 → 0.1.0-rc.6
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/.claude/skills/create-mxds-component/SKILL.md +77 -0
- package/DESIGN.md +595 -0
- package/README.md +2 -3
- package/dist/build/accordion.entry.js +2 -1
- package/dist/build/autocomplete.entry.js +1 -1
- package/dist/build/back-to-top.css +1 -0
- package/dist/build/back-to-top.entry.js +1 -0
- package/dist/build/base.css +1 -1
- package/dist/build/button.css +1 -1
- package/dist/build/card.css +1 -1
- package/dist/build/chunks/Accordion-Bqe8vTNR.js +44 -0
- package/dist/build/chunks/AccordionGroup-BYtoAFxg.js +47 -0
- package/dist/build/chunks/AccordionMobile-D517oXYZ.js +26 -0
- package/dist/build/chunks/Autocomplete-kRo8RNbC.js +135 -0
- package/dist/build/chunks/BackToTop-4M-Wl7z3.js +64 -0
- package/dist/build/chunks/ClosableAlert-CZ114JsL.js +55 -0
- package/dist/build/chunks/CookieConsent-wd8gQ2Oe.js +18 -0
- package/dist/build/chunks/Dialog-DoYcGqhW.js +48 -0
- package/dist/build/chunks/DropMenu-CSTZq0Zt.js +68 -0
- package/dist/build/chunks/FeedbackForm-BsL7fv8s.js +64 -0
- package/dist/build/chunks/Gallery-DqJPujX5.js +165 -0
- package/dist/build/chunks/GlobalToggle-7H3F1Wvc.js +82 -0
- package/dist/build/chunks/InPageNavigation-D7m3IN89.js +86 -0
- package/dist/build/chunks/Navigation-CRModT40.js +142 -0
- package/dist/build/chunks/Popover-CiTAftNU.js +30 -0
- package/dist/build/chunks/Sticky-C1H8MNqK.js +51 -0
- package/dist/build/chunks/Tabs-BJD3kABL.js +160 -0
- package/dist/build/chunks/Translate-yAgySwet.js +46 -0
- package/dist/build/chunks/cookie-compliance-CG6x-TcV.js +119 -0
- package/dist/build/chunks/enums-BrHxPZZ_.js +36 -0
- package/dist/build/chunks/polyfills-D-qh1a_2.js +33 -0
- package/dist/build/chunks/utilities-B9mNRs7V.js +255 -0
- package/dist/build/content-block.css +1 -1
- package/dist/build/cookie-consent.entry.js +1 -1
- package/dist/build/dialog.entry.js +1 -1
- package/dist/build/drop-menu.entry.js +1 -1
- package/dist/build/elements.js +147 -1
- package/dist/build/feedback-form.css +1 -0
- package/dist/build/feedback-form.entry.js +1 -0
- package/dist/build/filters.entry.js +145 -1
- package/dist/build/form.css +1 -1
- package/dist/build/gallery.entry.js +1 -1
- package/dist/build/global-alert.entry.js +1 -1
- package/dist/build/header.css +1 -1
- package/dist/build/header.entry.js +1 -1
- package/dist/build/icon.css +1 -1
- package/dist/build/in-page-navigation.entry.js +1 -1
- package/dist/build/navigation.css +1 -1
- package/dist/build/navigation.entry.js +1 -1
- package/dist/build/pagination.css +1 -1
- package/dist/build/popover.entry.js +1 -1
- package/dist/build/react.js +2291 -1
- package/dist/build/side-navigation.css +1 -1
- package/dist/build/sidebar.css +1 -1
- package/dist/build/sticky.entry.js +1 -1
- package/dist/build/tabs.entry.js +1 -1
- package/dist/build/translate.css +1 -0
- package/dist/build/translate.entry.js +1 -0
- package/dist/build/utility-list.entry.js +53 -1
- package/dist/types/Component/BackToTop/BackToTop.d.ts +20 -0
- package/dist/types/Component/BackToTop/BackToTop.d.ts.map +1 -0
- package/dist/types/Component/BackToTop/Elements/BackToTop.d.ts +27 -0
- package/dist/types/Component/BackToTop/Elements/BackToTop.d.ts.map +1 -0
- package/dist/types/Component/BackToTop/back-to-top.entry.d.ts +2 -0
- package/dist/types/Component/BackToTop/back-to-top.entry.d.ts.map +1 -0
- package/dist/types/Component/DropMenu/DropMenu.d.ts +2 -1
- package/dist/types/Component/DropMenu/DropMenu.d.ts.map +1 -1
- package/dist/types/Component/Navigation/Elements/Navigation.d.ts +2 -3
- package/dist/types/Component/Navigation/Elements/Navigation.d.ts.map +1 -1
- package/dist/types/Component/SideNavigation/Components/SideNavigationTree.d.ts +3 -3
- package/dist/types/Component/SideNavigation/Components/SideNavigationTree.d.ts.map +1 -1
- package/dist/types/Component/SideNavigation/SideNavigation.d.ts +3 -1
- package/dist/types/Component/SideNavigation/SideNavigation.d.ts.map +1 -1
- package/dist/types/Component/Tabs/Components/TabDropMenu.d.ts.map +1 -1
- package/dist/types/Component/Tabs/Elements/Tabs.d.ts.map +1 -1
- package/dist/types/Component/Translate/Elements/Translate.d.ts +23 -0
- package/dist/types/Component/Translate/Elements/Translate.d.ts.map +1 -0
- package/dist/types/Component/Translate/Translate.d.ts +37 -0
- package/dist/types/Component/Translate/Translate.d.ts.map +1 -0
- package/dist/types/Component/Translate/languages.d.ts +11 -0
- package/dist/types/Component/Translate/languages.d.ts.map +1 -0
- package/dist/types/Component/Translate/translate.entry.d.ts +2 -0
- package/dist/types/Component/Translate/translate.entry.d.ts.map +1 -0
- package/dist/types/Form/FeedbackForm/Elements/FeedbackForm.d.ts +37 -0
- package/dist/types/Form/FeedbackForm/Elements/FeedbackForm.d.ts.map +1 -0
- package/dist/types/Form/FeedbackForm/FeedbackForm.d.ts +36 -0
- package/dist/types/Form/FeedbackForm/FeedbackForm.d.ts.map +1 -0
- package/dist/types/Form/FeedbackForm/feedback-form.entry.d.ts +2 -0
- package/dist/types/Form/FeedbackForm/feedback-form.entry.d.ts.map +1 -0
- package/dist/types/Utility/Elements/google-translate-widget.d.ts +91 -0
- package/dist/types/Utility/Elements/google-translate-widget.d.ts.map +1 -0
- package/dist/types/Utility/utilities.d.ts +2 -0
- package/dist/types/Utility/utilities.d.ts.map +1 -1
- package/dist/types/elements.d.ts +3 -0
- package/dist/types/elements.d.ts.map +1 -1
- package/dist/types/enums.d.ts +3 -1
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/react.d.ts +3 -0
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/tokens.d.ts +1 -0
- package/dist/types/tokens.d.ts.map +1 -1
- package/docs/API.md +1215 -0
- package/docs/CSSGuidelines.md +893 -0
- package/docs/CodeQuality.md +940 -0
- package/docs/ComponentArchitecture.md +714 -0
- package/docs/Contributing.md +626 -0
- package/docs/MemoryManagement.md +598 -0
- package/docs/Migrations.md +6 -0
- package/docs/README.md +100 -0
- package/docs/Security.md +444 -0
- package/docs/Testing.md +739 -0
- package/docs/Troubleshooting.md +674 -0
- package/package.json +9 -6
- package/src/Atom/Button/Button.tsx +1 -1
- package/src/Atom/Button/__snapshots__/Button.stories.tsx.snap +2 -2
- package/src/Atom/Button/_buttons.css +1 -0
- package/src/Atom/Icon/README.md +1 -1
- package/src/Atom/Icon/_icon.css +1 -0
- package/src/Atom/Icon/images/thumb.svg +1 -0
- package/src/Atom/Link/_links.css +1 -0
- package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +4 -9
- package/src/Atom/Media/media.twig +4 -5
- package/src/Component/BackToTop/BackToTop.stories.ts +127 -0
- package/src/Component/BackToTop/BackToTop.stories.tsx +53 -0
- package/src/Component/BackToTop/BackToTop.tsx +120 -0
- package/src/Component/BackToTop/Elements/BackToTop.ts +119 -0
- package/src/Component/BackToTop/README.md +164 -0
- package/src/Component/BackToTop/__snapshots__/BackToTop.stories.ts.snap +24 -0
- package/src/Component/BackToTop/__snapshots__/BackToTop.stories.tsx.snap +3 -0
- package/src/Component/BackToTop/back-to-top.css +70 -0
- package/src/Component/BackToTop/back-to-top.entry.js +1 -0
- package/src/Component/BackToTop/back-to-top.twig +26 -0
- package/src/Component/Card/Components/CardContent.tsx +1 -1
- package/src/Component/Card/Components/CardMedia.tsx +1 -1
- package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +3 -3
- package/src/Component/Card/card.css +1 -1
- package/src/Component/Carousel/Carousel.stories.ts +66 -36
- package/src/Component/Carousel/__snapshots__/Carousel.stories.tsx.snap +5 -5
- package/src/Component/ContentBlock/Components/ContentBlockMedia.tsx +1 -1
- package/src/Component/ContentBlock/content-block.css +1 -1
- package/src/Component/DropMenu/DropMenu.stories.ts +21 -2
- package/src/Component/DropMenu/DropMenu.tsx +14 -4
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +3 -3
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +2 -2
- package/src/Component/DropMenu/drop-menu.twig +7 -1
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.tsx.snap +1 -1
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +48 -13
- package/src/Component/InPageNavigation/in-page-navigation.twig +4 -6
- package/src/Component/ListItem/Components/ListItemMedia.tsx +1 -1
- package/src/Component/Navigation/Elements/Navigation.ts +25 -29
- package/src/Component/Navigation/README.md +11 -10
- package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +8 -8
- package/src/Component/Navigation/_navigation-dropdown.css +9 -11
- package/src/Component/Navigation/_navigation-mega.css +5 -11
- package/src/Component/Navigation/_navigation.css +5 -3
- package/src/Component/Navigation/menu.twig +1 -1
- package/src/Component/Navigation/navigation.twig +0 -1
- package/src/Component/Pagination/Pagination.stories.ts +57 -27
- package/src/Component/Pagination/pagination.css +16 -7
- package/src/Component/Popover/__snapshots__/Popover.stories.tsx.snap +3 -3
- package/src/Component/SideNavigation/Components/SideNavigationTree.tsx +68 -24
- package/src/Component/SideNavigation/README.md +78 -32
- package/src/Component/SideNavigation/SideNavigation.stories.ts +41 -2
- package/src/Component/SideNavigation/SideNavigation.stories.tsx +31 -0
- package/src/Component/SideNavigation/SideNavigation.tsx +13 -3
- package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.ts.snap +87 -3
- package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.tsx.snap +2 -0
- package/src/Component/SideNavigation/side-navigation.css +3 -3
- package/src/Component/SideNavigation/side-navigation.twig +10 -3
- package/src/Component/Tabs/Components/TabDropMenu.tsx +7 -1
- package/src/Component/Tabs/Elements/Tabs.ts +13 -3
- package/src/Component/Tabs/Tabs.stories.ts +33 -12
- package/src/Component/Tabs/Tabs.stories.tsx +28 -14
- package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +3 -3
- package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +2 -2
- package/src/Component/Translate/Elements/Translate.ts +76 -0
- package/src/Component/Translate/README.md +285 -0
- package/src/Component/Translate/Translate.stories.ts +87 -0
- package/src/Component/Translate/Translate.stories.tsx +77 -0
- package/src/Component/Translate/Translate.tsx +213 -0
- package/src/Component/Translate/__snapshots__/Translate.stories.ts.snap +18 -0
- package/src/Component/Translate/__snapshots__/Translate.stories.tsx.snap +3 -0
- package/src/Component/Translate/languages.ts +39 -0
- package/src/Component/Translate/translate.css +62 -0
- package/src/Component/Translate/translate.entry.js +1 -0
- package/src/Component/Translate/translate.twig +44 -0
- package/src/Form/Autocomplete/Autocomplete.stories.tsx +2 -1
- package/src/Form/FeedbackForm/Elements/FeedbackForm.ts +122 -0
- package/src/Form/FeedbackForm/FeedbackForm.stories.ts +99 -0
- package/src/Form/FeedbackForm/FeedbackForm.stories.tsx +73 -0
- package/src/Form/FeedbackForm/FeedbackForm.tsx +196 -0
- package/src/Form/FeedbackForm/README.md +233 -0
- package/src/Form/FeedbackForm/__snapshots__/FeedbackForm.stories.ts.snap +125 -0
- package/src/Form/FeedbackForm/__snapshots__/FeedbackForm.stories.tsx.snap +5 -0
- package/src/Form/FeedbackForm/feedback-form.css +74 -0
- package/src/Form/FeedbackForm/feedback-form.entry.js +1 -0
- package/src/Form/FeedbackForm/feedback-form.twig +80 -0
- package/src/Form/form.css +17 -19
- package/src/Introduction.mdx +1 -1
- package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +3 -3
- package/src/Layout/Header/Components/GlobalToggle.tsx +1 -1
- package/src/Layout/Header/Header.stories.ts +53 -48
- package/src/Layout/Header/Header.stories.tsx +35 -22
- package/src/Layout/Header/Header.tsx +2 -2
- package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +18 -14
- package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +2 -2
- package/src/Layout/Header/_toggles.css +7 -7
- package/src/Layout/Page/__snapshots__/Page.stories.tsx.snap +1 -1
- package/src/Layout/Sidebar/sidebar.css +10 -3
- package/src/Utility/Elements/google-translate-widget.ts +293 -0
- package/src/Utility/global.d.ts +4 -0
- package/src/Utility/utilities.ts +2 -0
- package/src/_custom-media.css +2 -0
- package/src/elements.ts +3 -0
- package/src/enums.ts +2 -0
- package/src/react.ts +3 -0
- package/src/tokens.js +1 -0
- package/dist/build/chunks/Accordion-GN0sME4W.js +0 -1
- package/dist/build/chunks/AccordionGroup-Bzqp5__q.js +0 -1
- package/dist/build/chunks/AccordionMobile-DG5jSe8Q.js +0 -1
- package/dist/build/chunks/Autocomplete-B4RtkAyh.js +0 -1
- package/dist/build/chunks/ClosableAlert-DEhj8Nxm.js +0 -1
- package/dist/build/chunks/CookieConsent-BkCMRVST.js +0 -1
- package/dist/build/chunks/Dialog-Haahn-Yn.js +0 -1
- package/dist/build/chunks/DropMenu-1baQc8Yc.js +0 -1
- package/dist/build/chunks/Gallery-D8NGXy2Q.js +0 -1
- package/dist/build/chunks/GlobalToggle-B52fdBQu.js +0 -1
- package/dist/build/chunks/InPageNavigation-Dyn2TR-N.js +0 -1
- package/dist/build/chunks/Navigation-hOrfLq7h.js +0 -1
- package/dist/build/chunks/Popover-Cxg-s5Jn.js +0 -1
- package/dist/build/chunks/Sticky-BGCuuEJK.js +0 -1
- package/dist/build/chunks/Tabs-DYy1YTdU.js +0 -15
- package/dist/build/chunks/cookie-compliance-Bbm-0vpj.js +0 -1
- package/dist/build/chunks/enums-DLV_1NAf.js +0 -1
- package/dist/build/chunks/polyfills-C7pRt54M.js +0 -1
- package/dist/build/chunks/utilities-_Bq3TxAQ.js +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { t as e } from "./utilities-B9mNRs7V.js";
|
|
2
|
+
//#region src/Component/Sticky/Elements/Sticky.ts
|
|
3
|
+
var t = class extends HTMLElement {
|
|
4
|
+
internals_;
|
|
5
|
+
iO;
|
|
6
|
+
rO;
|
|
7
|
+
offsetPropName;
|
|
8
|
+
root = null;
|
|
9
|
+
rootMargin = "0px 0px 0px 0px";
|
|
10
|
+
thresholds = [0];
|
|
11
|
+
constructor() {
|
|
12
|
+
super(), this.internals_ = this.attachInternals();
|
|
13
|
+
}
|
|
14
|
+
connectedCallback() {
|
|
15
|
+
this.offsetPropName = this.getAttribute("offsetpropname") || "--sticky-offset";
|
|
16
|
+
let e = {
|
|
17
|
+
root: this.root,
|
|
18
|
+
rootMargin: this.rootMargin,
|
|
19
|
+
thresholds: this.thresholds
|
|
20
|
+
};
|
|
21
|
+
this.iO = new IntersectionObserver(([{ boundingClientRect: t }]) => {
|
|
22
|
+
let n = t.y < 0;
|
|
23
|
+
this.classList.toggle("is-stuck", n);
|
|
24
|
+
let r = new CustomEvent("sticky-toggle", {
|
|
25
|
+
bubbles: !0,
|
|
26
|
+
cancelable: !0,
|
|
27
|
+
detail: {
|
|
28
|
+
isSticky: n,
|
|
29
|
+
options: e,
|
|
30
|
+
target: this
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
this.dispatchEvent(r);
|
|
34
|
+
}, e), this.iO.observe(this.trigger), this.offsetPropName && (this.rO = new ResizeObserver((e) => {
|
|
35
|
+
e.forEach(({ borderBoxSize: e }) => {
|
|
36
|
+
let [{ blockSize: t }] = e;
|
|
37
|
+
document.body.style.setProperty(this.offsetPropName, `${t.toFixed(1)}px`);
|
|
38
|
+
});
|
|
39
|
+
}), this.rO.observe(this));
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
this.iO.disconnect(), this.rO?.disconnect();
|
|
43
|
+
}
|
|
44
|
+
get trigger() {
|
|
45
|
+
let t = this.querySelector(".mx-sticky__trigger");
|
|
46
|
+
return t || (t = e("<div class=\"mx-sticky__trigger\"></div>"), this.insertAdjacentElement("beforebegin", t)), t;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
customElements.get("mx-sticky") || customElements.define("mx-sticky", t);
|
|
50
|
+
//#endregion
|
|
51
|
+
export { t };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { s as e, t } from "./utilities-B9mNRs7V.js";
|
|
2
|
+
import { t as n } from "./DropMenu-CSTZq0Zt.js";
|
|
3
|
+
import { PopoverPlacementModifier as r } from "@pnx-mixtape/ids-shape";
|
|
4
|
+
//#region src/Component/Tabs/Elements/Tabs.ts
|
|
5
|
+
var i = class extends HTMLElement {
|
|
6
|
+
internals_;
|
|
7
|
+
controller;
|
|
8
|
+
tabs;
|
|
9
|
+
mq;
|
|
10
|
+
locationHash;
|
|
11
|
+
tabFocus = 0;
|
|
12
|
+
tabListClasses;
|
|
13
|
+
dropTriggerClasses;
|
|
14
|
+
dropMenuId;
|
|
15
|
+
constructor() {
|
|
16
|
+
super(), this.internals_ = this.attachInternals(), this.controller = new AbortController(), this.mq = this.getAttribute("mq") || "(max-width: 720px)";
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
if (!this.panels) return;
|
|
20
|
+
this.locationHash = window.location.hash, this.tabFocus = 0, this.tabs = /* @__PURE__ */ new Map(), this.panels.forEach((e) => {
|
|
21
|
+
let n = e.id, r = `<button type="button" role="tab" aria-controls="${n}" aria-selected="false">${e.getAttribute("aria-label")}</button>`, i = t(r);
|
|
22
|
+
this.tabList.appendChild(i);
|
|
23
|
+
let a = t(r);
|
|
24
|
+
this.dropMenuMenu.appendChild(a), n && e && a && this.tabs.set(n, {
|
|
25
|
+
panel: e,
|
|
26
|
+
tab: i,
|
|
27
|
+
button: a
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
let { signal: e } = this.controller;
|
|
31
|
+
this.handleBreakpoint(this.breakpoint), this.breakpoint.addEventListener("change", this.handleBreakpoint, { signal: e });
|
|
32
|
+
let n = this.locationHash ? this.querySelector(this.locationHash) : null;
|
|
33
|
+
n ? this.active = n.id : this.active ||= this.panels[0].id;
|
|
34
|
+
}
|
|
35
|
+
disconnectedCallback() {
|
|
36
|
+
this.controller.abort();
|
|
37
|
+
}
|
|
38
|
+
handleBreakpoint = ({ matches: e }) => {
|
|
39
|
+
let { signal: t } = this.controller;
|
|
40
|
+
this.dropMenuTrigger.toggleAttribute("hidden", !e), this.tabList.toggleAttribute("hidden", e), e ? (this.dropMenuMenu.addEventListener("drop-menu-select", this.handleDropMenuSelect, { signal: t }), this.tabList.removeEventListener("click", this.handleClick), this.tabList.removeEventListener("keydown", this.handleKeydown)) : (this.tabList.addEventListener("click", this.handleClick, { signal: t }), this.tabList.addEventListener("keydown", this.handleKeydown, { signal: t }), this.dropMenuMenu.removeEventListener("drop-menu-select", this.handleDropMenuSelect));
|
|
41
|
+
};
|
|
42
|
+
handleKeydown = (e) => {
|
|
43
|
+
let { key: t, target: n } = e, r = [...this.triggers], i = r.indexOf(n);
|
|
44
|
+
if (i === -1) return;
|
|
45
|
+
let a = 0;
|
|
46
|
+
switch (t) {
|
|
47
|
+
case "ArrowRight":
|
|
48
|
+
a = (i + 1) % r.length;
|
|
49
|
+
break;
|
|
50
|
+
case "ArrowLeft":
|
|
51
|
+
a = (i - 1 + r.length) % r.length;
|
|
52
|
+
break;
|
|
53
|
+
case "Home":
|
|
54
|
+
a = 0;
|
|
55
|
+
break;
|
|
56
|
+
case "End":
|
|
57
|
+
a = r.length - 1;
|
|
58
|
+
break;
|
|
59
|
+
default: return;
|
|
60
|
+
}
|
|
61
|
+
e.preventDefault(), e.stopPropagation(), r[a].focus();
|
|
62
|
+
};
|
|
63
|
+
handleClick = (e) => {
|
|
64
|
+
let t = e.target;
|
|
65
|
+
if (!(t instanceof HTMLButtonElement)) return;
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
let n = t.getAttribute("aria-controls");
|
|
68
|
+
this.handleTabChange(n);
|
|
69
|
+
};
|
|
70
|
+
handleDropMenuSelect = (e) => {
|
|
71
|
+
let t = e.detail.target;
|
|
72
|
+
if (!(t instanceof HTMLButtonElement)) return;
|
|
73
|
+
let n = t.getAttribute("aria-controls");
|
|
74
|
+
this.handleTabChange(n);
|
|
75
|
+
};
|
|
76
|
+
handleTabChange = (e) => {
|
|
77
|
+
this.active = e, this.handleUrlParams(e);
|
|
78
|
+
let { panel: t, tab: n, button: r } = this.tabs.get(e);
|
|
79
|
+
t.focus({ preventScroll: !0 });
|
|
80
|
+
let i = new CustomEvent("tab-toggle", {
|
|
81
|
+
bubbles: !0,
|
|
82
|
+
cancelable: !0,
|
|
83
|
+
detail: {
|
|
84
|
+
id: e,
|
|
85
|
+
tab: n,
|
|
86
|
+
button: r,
|
|
87
|
+
panel: t
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
this.dispatchEvent(i);
|
|
91
|
+
};
|
|
92
|
+
get dropMenu() {
|
|
93
|
+
let i = this.querySelector("mx-dropmenu");
|
|
94
|
+
if (i) return i;
|
|
95
|
+
this.dropTriggerClasses = this.getAttribute("dropTriggerClasses") || "mx-button mx-icon mx-icon--chevron-down mx-icon--end", this.dropMenuId = this.id ? `${this.id}-drop-menu` : e("tab-drop-menu");
|
|
96
|
+
let a = `${this.dropMenuId}-target`, o = `${a}-description`, s = `${this.dropMenuId}-description`, c = new n();
|
|
97
|
+
c.setAttribute("closeOnClick", "true");
|
|
98
|
+
let l = t(`<button
|
|
99
|
+
id="${a}"
|
|
100
|
+
class="mx-popover__trigger ${this.dropTriggerClasses}"
|
|
101
|
+
popovertarget="${this.dropMenuId}"
|
|
102
|
+
style="anchor-name: --${this.dropMenuId}"
|
|
103
|
+
aria-describedby="${o}"
|
|
104
|
+
hidden
|
|
105
|
+
></button>`), u = t(`<span id="${o}" class="sr-only" aria-hidden="true">Select a tab</span>`), d = t(`<span id="${s}" class="sr-only" aria-hidden="true">Selecting a tab updates the content below. Press escape to close.</span>`), f = t(`<div
|
|
106
|
+
class="mx-popover mx-drop-menu"
|
|
107
|
+
id="${this.dropMenuId}"
|
|
108
|
+
aria-labelledby="${a}"
|
|
109
|
+
aria-describedby="${s}"
|
|
110
|
+
style="position-anchor: --${this.dropMenuId}"
|
|
111
|
+
data-placement="${r.BOTTOM_START}"
|
|
112
|
+
popover
|
|
113
|
+
role="tablist"
|
|
114
|
+
></div>`);
|
|
115
|
+
return c.append(l, u, d, f), this.prepend(c), c;
|
|
116
|
+
}
|
|
117
|
+
get dropMenuMenu() {
|
|
118
|
+
return this.dropMenu.querySelector("[popover][role=\"tablist\"]");
|
|
119
|
+
}
|
|
120
|
+
get dropMenuTrigger() {
|
|
121
|
+
return this.dropMenu.querySelector("[popovertarget]");
|
|
122
|
+
}
|
|
123
|
+
get tabList() {
|
|
124
|
+
this.tabListClasses = this.getAttribute("tabListClasses") || "mx-tabs__list";
|
|
125
|
+
let e = this.querySelector("[role=\"tablist\"]:not([popover])");
|
|
126
|
+
if (e) return e;
|
|
127
|
+
let n = t(`<div class="${this.tabListClasses}" role="tablist" hidden></div>`);
|
|
128
|
+
return this.prepend(n), n;
|
|
129
|
+
}
|
|
130
|
+
get triggers() {
|
|
131
|
+
let e = this.tabList.querySelectorAll("[role=\"tab\"]");
|
|
132
|
+
if (!e.length) throw Error(`${this.localName} must contain [role="tab"]`);
|
|
133
|
+
return e;
|
|
134
|
+
}
|
|
135
|
+
get panels() {
|
|
136
|
+
let e = this.querySelectorAll("[data-tab]");
|
|
137
|
+
if (!e.length) throw Error(`${this.localName} must contain [data-tab]`);
|
|
138
|
+
return e.forEach((e) => {
|
|
139
|
+
e.setAttribute("role", "tabpanel"), e.setAttribute("tabindex", "-1"), e.setAttribute("aria-label", e.getAttribute("data-tab"));
|
|
140
|
+
}), e;
|
|
141
|
+
}
|
|
142
|
+
get active() {
|
|
143
|
+
return this.querySelector("[aria-selected=\"true\"]");
|
|
144
|
+
}
|
|
145
|
+
get breakpoint() {
|
|
146
|
+
return window.matchMedia(this.mq);
|
|
147
|
+
}
|
|
148
|
+
set active(e) {
|
|
149
|
+
this.tabs.forEach(({ tab: t, button: n, panel: r }, i) => {
|
|
150
|
+
i === e ? (t.setAttribute("aria-selected", "true"), n.setAttribute("aria-selected", "true"), t.setAttribute("tabindex", "0"), r.removeAttribute("inert"), this.dropMenuTrigger.textContent = t.textContent) : (t.setAttribute("aria-selected", "false"), n.setAttribute("aria-selected", "false"), t.setAttribute("tabindex", "-1"), r.setAttribute("inert", ""));
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
handleUrlParams = (e) => {
|
|
154
|
+
let t = new URLSearchParams(window.location.search);
|
|
155
|
+
t.get("tab") !== e && (t.set("tab", e), window.history.replaceState({}, "", `${window.location.pathname}?${t.toString()}`));
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
customElements.get("mx-tabs") || customElements.define("mx-tabs", i);
|
|
159
|
+
//#endregion
|
|
160
|
+
export { i as t };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { l as e } from "./utilities-B9mNRs7V.js";
|
|
2
|
+
import { t } from "./DropMenu-CSTZq0Zt.js";
|
|
3
|
+
//#region src/Component/Translate/Elements/Translate.ts
|
|
4
|
+
var n = class extends t {
|
|
5
|
+
widget;
|
|
6
|
+
async connectedCallback() {
|
|
7
|
+
if (await super.connectedCallback(), !this.container) return;
|
|
8
|
+
this.widget = new e(this, {
|
|
9
|
+
defaultLanguage: this.dataset.defaultLanguage || "en",
|
|
10
|
+
blockedPaths: (this.dataset.blockedPaths || "").split(",").map((e) => e.trim()).filter(Boolean),
|
|
11
|
+
scriptUrl: this.dataset.scriptUrl,
|
|
12
|
+
storageKey: this.dataset.storageKey,
|
|
13
|
+
updateTriggerLabel: this.dataset.updateTriggerLabel !== "false",
|
|
14
|
+
notice: this.dataset.noticeContent ? {
|
|
15
|
+
content: this.dataset.noticeContent,
|
|
16
|
+
blockedContent: this.dataset.noticeBlockedContent,
|
|
17
|
+
anchorSelector: this.dataset.noticeAnchor,
|
|
18
|
+
position: this.dataset.noticePosition
|
|
19
|
+
} : void 0,
|
|
20
|
+
onLanguageChange: (e) => this.dispatchLifecycleEvent("translate-language-change", e)
|
|
21
|
+
}), this.widget.init();
|
|
22
|
+
let { signal: t } = this.controller;
|
|
23
|
+
this.container.addEventListener("drop-menu-select", this.handleLanguageSelect, { signal: t }), this.container.addEventListener("toggle", (e) => {
|
|
24
|
+
let { newState: t } = e;
|
|
25
|
+
this.dispatchLifecycleEvent(t === "open" ? "translate-open" : "translate-close");
|
|
26
|
+
}, { signal: t });
|
|
27
|
+
}
|
|
28
|
+
disconnectedCallback() {
|
|
29
|
+
super.disconnectedCallback(), this.widget?.destroy();
|
|
30
|
+
}
|
|
31
|
+
handleLanguageSelect = (e) => {
|
|
32
|
+
let { target: t } = e.detail;
|
|
33
|
+
if (!(t instanceof HTMLAnchorElement)) return;
|
|
34
|
+
let n = t.dataset.language;
|
|
35
|
+
n && this.widget?.setLanguage(n);
|
|
36
|
+
};
|
|
37
|
+
dispatchLifecycleEvent(e, t) {
|
|
38
|
+
this.dispatchEvent(new CustomEvent(e, {
|
|
39
|
+
bubbles: !0,
|
|
40
|
+
detail: t ? { code: t } : {}
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
customElements.get("mx-translate") || customElements.define("mx-translate", n);
|
|
45
|
+
//#endregion
|
|
46
|
+
export { n as t };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import e from "js-cookie";
|
|
2
|
+
//#region src/Utility/Elements/validators.ts
|
|
3
|
+
var t = {
|
|
4
|
+
url: (e, t = ["http:", "https:"]) => {
|
|
5
|
+
try {
|
|
6
|
+
let n = new URL(e);
|
|
7
|
+
return t.includes(n.protocol);
|
|
8
|
+
} catch {
|
|
9
|
+
return !1;
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
email: (e) => typeof e == "string" && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),
|
|
13
|
+
number: (e, t, n) => {
|
|
14
|
+
let r = Number(e);
|
|
15
|
+
return !(isNaN(r) || t !== void 0 && r < t || n !== void 0 && r > n);
|
|
16
|
+
},
|
|
17
|
+
integer: (e, t, n) => {
|
|
18
|
+
let r = Number(e);
|
|
19
|
+
return !(isNaN(r) || !Number.isInteger(r) || t !== void 0 && r < t || n !== void 0 && r > n);
|
|
20
|
+
},
|
|
21
|
+
string: (e, t, n) => !(typeof e != "string" || t !== void 0 && e.length < t || n !== void 0 && e.length > n),
|
|
22
|
+
notEmpty: (e) => typeof e == "string" && e.trim().length > 0,
|
|
23
|
+
pattern: (e, t) => typeof e == "string" && (t.lastIndex = 0, t.test(e)),
|
|
24
|
+
oneOf: (e, t) => t.includes(e),
|
|
25
|
+
array: (e, t, n) => !(!Array.isArray(e) || t !== void 0 && e.length < t || n !== void 0 && e.length > n),
|
|
26
|
+
json: (e) => {
|
|
27
|
+
if (typeof e != "string") return !1;
|
|
28
|
+
try {
|
|
29
|
+
return JSON.parse(e), !0;
|
|
30
|
+
} catch {
|
|
31
|
+
return !1;
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
date: (e, t, n) => {
|
|
35
|
+
let r = e instanceof Date ? e : new Date(e);
|
|
36
|
+
return !(isNaN(r.getTime()) || t && r < t || n && r > n);
|
|
37
|
+
},
|
|
38
|
+
hexColor: (e) => typeof e == "string" && /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)
|
|
39
|
+
}, n = class n {
|
|
40
|
+
banner;
|
|
41
|
+
acceptBtn;
|
|
42
|
+
moreBtn;
|
|
43
|
+
rejectBtn;
|
|
44
|
+
controller;
|
|
45
|
+
bots;
|
|
46
|
+
cookieName;
|
|
47
|
+
waitRemove;
|
|
48
|
+
trackingCookiesNames;
|
|
49
|
+
hostname;
|
|
50
|
+
timeout;
|
|
51
|
+
defaultCookieSettings;
|
|
52
|
+
constructor(e) {
|
|
53
|
+
this.banner = e, this.acceptBtn = e.querySelector("[data-cookie-accept]"), this.moreBtn = e.querySelector("[data-cookie-more]"), this.rejectBtn = e.querySelector("[data-cookie-reject]"), this.controller = new AbortController(), this.bots = /bot|crawler|spider|crawling/i, this.cookieName = "has-cookie-consent";
|
|
54
|
+
let n = this.banner.dataset.waitRemove;
|
|
55
|
+
this.waitRemove = n && t.integer(n, 0) ? parseInt(n, 10) : 0, this.trackingCookiesNames = [
|
|
56
|
+
"__utma",
|
|
57
|
+
"__utmb",
|
|
58
|
+
"__utmc",
|
|
59
|
+
"__utmt",
|
|
60
|
+
"__utmv",
|
|
61
|
+
"__utmz",
|
|
62
|
+
"_ga",
|
|
63
|
+
"_gat",
|
|
64
|
+
"_gid"
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
init = () => {
|
|
68
|
+
this.hostname = document.location.hostname.replace(/^www\./, ""), this.defaultCookieSettings = {
|
|
69
|
+
path: "/",
|
|
70
|
+
expires: 365,
|
|
71
|
+
sameSite: "Lax"
|
|
72
|
+
};
|
|
73
|
+
let e = this.bots.test(navigator.userAgent), t = navigator.doNotTrack || navigator.msDoNotTrack || window.doNotTrack;
|
|
74
|
+
e || !(t == null || t && t !== "yes" && t !== 1 && t !== "1") || this.hasConsent() === !1 ? this.removeBanner(0) : this.hasConsent() !== !0 && this.showBanner();
|
|
75
|
+
};
|
|
76
|
+
showBanner = () => {
|
|
77
|
+
let { signal: e } = this.controller;
|
|
78
|
+
this.banner.removeAttribute("inert"), this.moreBtn && this.moreBtn.addEventListener("click", () => this.deleteCookie(), { signal: e }), this.acceptBtn && this.acceptBtn.addEventListener("click", this.accept, { signal: e }), this.rejectBtn && this.rejectBtn.addEventListener("click", this.reject, { signal: e }), window.CookieCompliance = this;
|
|
79
|
+
};
|
|
80
|
+
reject = () => {
|
|
81
|
+
this.removeBanner(this.waitRemove), this.setCookie("false"), this.trackingCookiesNames.forEach((e) => this.deleteCookie(e));
|
|
82
|
+
};
|
|
83
|
+
accept = () => {
|
|
84
|
+
this.removeBanner(this.waitRemove), this.setCookie("true");
|
|
85
|
+
};
|
|
86
|
+
hasConsent = () => {
|
|
87
|
+
let t = e.get(this.cookieName);
|
|
88
|
+
return t === "true" || t !== "false" && null;
|
|
89
|
+
};
|
|
90
|
+
setCookie = (t) => {
|
|
91
|
+
e.set(this.cookieName, t, this.defaultCookieSettings), e.set(this.cookieName, t, {
|
|
92
|
+
domain: `.${this.hostname}`,
|
|
93
|
+
...this.defaultCookieSettings
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
deleteCookie = (t = this.cookieName) => {
|
|
97
|
+
e.remove(t, this.defaultCookieSettings), e.remove(t, {
|
|
98
|
+
domain: `.${this.hostname}`,
|
|
99
|
+
...this.defaultCookieSettings
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
removeBanner = (e) => {
|
|
103
|
+
this.timeout = setTimeout(() => {
|
|
104
|
+
this.banner && this.banner.parentNode && (this.banner.parentNode.removeChild(this.banner), this.destroy());
|
|
105
|
+
}, e);
|
|
106
|
+
};
|
|
107
|
+
destroy() {
|
|
108
|
+
clearTimeout(this.timeout), this.controller.abort(), this.controller = new AbortController(), window.CookieCompliance === this && (window.CookieCompliance = void 0);
|
|
109
|
+
}
|
|
110
|
+
static create({ context: e = null } = {}) {
|
|
111
|
+
let [t] = window.once("cookie-compliance", "#cookie-compliance", e || document);
|
|
112
|
+
if (t) {
|
|
113
|
+
let e = new n(t);
|
|
114
|
+
e.init(), window.CookieCompliance = e;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
//#endregion
|
|
119
|
+
export { t as n, n as t };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/enums.ts
|
|
2
|
+
var e = [], t = 400, n = /* @__PURE__ */ function(e) {
|
|
3
|
+
return e.LEFT = "left", e.RIGHT = "right", e;
|
|
4
|
+
}({}), r = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.DIV = "div", e.LI = "li", e.ARTICLE = "article", e.ASIDE = "aside", e.SECTION = "section", e;
|
|
6
|
+
}({}), i = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.P = "p", e.DIV = "div", e.STRONG = "strong", e.ITALIC = "em", e;
|
|
8
|
+
}({}), a = /* @__PURE__ */ function(e) {
|
|
9
|
+
return e.HEADLINE = "mx-headline", e.EYEBROW = "mx-text--eyebrow", e.EMBELLISHED = "mx-text--embellished", e.RESET = "mx-spacing--reset", e.RESETTOP = "mx-spacing--top-reset", e.RESETBOTTOM = "mx-spacing--bottom-reset", e;
|
|
10
|
+
}({}), o = /* @__PURE__ */ function(e) {
|
|
11
|
+
return e.SECTION = "mx-text--eyebrow", e.EMBELLISHED = "mx-text--embellished", e.XXXL = "mx-text--xxxl", e.XXL = "mx-text--xxl", e.XL = "mx-text--xl", e.L = "mx-text--l", e.M = "mx-text--m", e.S = "mx-text--s", e.XS = "mx-text--xs", e.LEDE = "mx-text--lede", e.META = "mx-text--meta", e.PRIMARY = "mx-text--primary", e.ACCENT = "mx-text--accent", e.ALT = "mx-text--alt", e;
|
|
12
|
+
}({}), s = /* @__PURE__ */ function(e) {
|
|
13
|
+
return e.NOTES = "mx-list--notes", e.REFS = "mx-list--refs", e.STATS = "mx-list--stats", e.COLUMNS = "mx-list--columns", e.SUMMARY = "mx-list--summary", e;
|
|
14
|
+
}({}), c = /* @__PURE__ */ function(e) {
|
|
15
|
+
return e.ARROW_DOWN = "arrow-down", e.ARROW_LEFT = "arrow-left", e.ARROW_UP = "arrow-up", e.ARROW_RIGHT = "arrow-right", e.CHEVRON_DOWN = "chevron-down", e.CHEVRON_LEFT = "chevron-left", e.CHEVRON_RIGHT = "chevron-right", e.CHEVRON_UP = "chevron-up", e.BLUESKY = "bluesky", e.CLOSE = "close", e.COLLAPSE = "collapse", e.DOWNLOAD = "download", e.DRUPAL = "drupal", e.ERROR = "error", e.EXPAND = "expand", e.EXTERNAL = "external-link", e.FACEBOOK = "facebook", e.GOOGLE = "google", e.INFO = "info", e.FILE = "file", e.INSTAGRAM = "instagram", e.LINKEDIN = "linkedin", e.MASTODON = "mastodon", e.MENU = "menu", e.SEARCH = "search", e.SUCCESS = "success", e.TWITTER = "twitter", e.WARNING = "warning", e.YOUTUBE = "youtube", e.EMAIL = "email", e.HEART = "heart-selected", e.EMPTY_HEART = "heart-unselected", e.LINK = "link", e.LOCK = "lock", e.LOGIN = "login", e.MORE = "more", e.EDIT = "pencil", e.PHONE = "phone", e.PIN = "pin", e.PRINT = "print", e.RESTART = "restart", e.STAR = "star-selected", e.EMPTY_STAR = "star-unselected", e.TICK = "tick", e.TRASH = "trash", e.USER = "user", e.SHARE = "share", e.QUESTION = "question", e.THUMB = "thumb", e.GLOBE = "globe", e;
|
|
16
|
+
}({}), l = /* @__PURE__ */ function(e) {
|
|
17
|
+
return e.NARROW = "narrow", e.FEATURE = "feature", e.FULL = "full", e;
|
|
18
|
+
}({}), u = /* @__PURE__ */ function(e) {
|
|
19
|
+
return e.FLOW = "flow", e.GROUP = "group", e;
|
|
20
|
+
}({}), d = /* @__PURE__ */ function(e) {
|
|
21
|
+
return e.DEFAULT = "", e.REVERSE = "sidebar-rev", e.REVERSE_L = "sidebar-rev-lg", e;
|
|
22
|
+
}({}), f = /* @__PURE__ */ function(e) {
|
|
23
|
+
return e.PRIMARY = "primary", e.ACCENT = "accent", e.ALT = "alt", e.REVERSE = "reverse", e.RESET = "reset", e.BOX = "box", e.IMAGE = "image", e;
|
|
24
|
+
}({}), p = /* @__PURE__ */ function(e) {
|
|
25
|
+
return e.FLUSH = "flush", e.STRIPED = "striped", e.SMALL = "small", e.BORDERED = "bordered", e;
|
|
26
|
+
}({}), m = /* @__PURE__ */ function(e) {
|
|
27
|
+
return e.DEFAULT = "default", e.VALID = "valid", e.INVALID = "invalid", e;
|
|
28
|
+
}({}), h = /* @__PURE__ */ function(e) {
|
|
29
|
+
return e.INFO = "info", e.SUCCESS = "success", e.WARNING = "warning", e.ERROR = "error", e.FEATURED = "featured", e;
|
|
30
|
+
}({}), g = /* @__PURE__ */ function(e) {
|
|
31
|
+
return e.DEFAULT = "default", e.CENTERED = "centered", e.LINED = "lined", e;
|
|
32
|
+
}({}), _ = /* @__PURE__ */ function(e) {
|
|
33
|
+
return e.TWITTER = "twitter", e.FACEBOOK = "facebook", e.LINKEDIN = "linkedin", e;
|
|
34
|
+
}({});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { o as _, e as a, c, u as d, d as f, h as g, p as h, t as i, s as l, g as m, r as n, m as o, _ as p, f as r, a as s, n as t, l as u, i as v };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/Component/Popover/polyfills.js
|
|
2
|
+
var e, t = class {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
this.popover = e, this.trigger = document.querySelector(`[popovertarget="${e.getAttribute("id")}"]`), this.init();
|
|
5
|
+
}
|
|
6
|
+
init = async () => {
|
|
7
|
+
this.trigger && this.popover && (this.supportsPopover() || await this.ensurePopoverPolyfill(), this.supportsAnchor() || (this.controller = new AbortController(), this.popover.addEventListener("toggle", this.positionPopover, { signal: this.controller.signal })));
|
|
8
|
+
};
|
|
9
|
+
supportsAnchor = () => "anchorName" in document.documentElement.style;
|
|
10
|
+
supportsPopover = () => "popover" in HTMLElement.prototype;
|
|
11
|
+
ensurePopoverPolyfill = () => (e ||= import("@oddbird/popover-polyfill"), e);
|
|
12
|
+
positionPopover = async ({ newState: e }) => {
|
|
13
|
+
if (e === "open") {
|
|
14
|
+
let { computePosition: e, flip: t, shift: n } = await import("@floating-ui/dom");
|
|
15
|
+
requestAnimationFrame(() => {
|
|
16
|
+
e(this.trigger, this.popover, {
|
|
17
|
+
placement: this.placement || "top",
|
|
18
|
+
middleware: [t({ padding: 10 }), n({ padding: 10 })]
|
|
19
|
+
}).then(({ x: e, y: t }) => {
|
|
20
|
+
this.popover.style.insetInlineStart = `${e}px`, this.popover.style.insetBlockStart = `${t}px`;
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
destroy() {
|
|
26
|
+
this.controller.abort();
|
|
27
|
+
}
|
|
28
|
+
get placement() {
|
|
29
|
+
return this.popover.getAttribute("data-placement");
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { t as default };
|