@maggioli-design-system/mds-modal 4.4.0 → 4.4.2
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/cjs/{index-0ac65212.js → index-7b67ecdb.js} +117 -22
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-modal.cjs.entry.js +4 -4
- package/dist/cjs/mds-modal.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/aria.js +9 -1
- package/dist/collection/common/keyboard-manager.js +2 -2
- package/dist/collection/components/mds-modal/mds-modal.css +37 -39
- package/dist/collection/components/mds-modal/test/mds-modal.e2e.js +1 -1
- package/dist/components/mds-modal.js +7 -4
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-6f346db2.js → index-5f4fd73d.js} +117 -22
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mds-modal.entry.js +4 -4
- package/dist/esm/mds-modal.js +4 -4
- package/dist/esm-es5/index-5f4fd73d.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-modal.entry.js +1 -1
- package/dist/esm-es5/mds-modal.js +1 -1
- package/dist/mds-modal/mds-modal.esm.js +1 -1
- package/dist/mds-modal/mds-modal.js +1 -1
- package/dist/mds-modal/p-3289100c.system.js +1 -0
- package/dist/mds-modal/p-b327d4c0.js +2 -0
- package/dist/mds-modal/p-bc48f1e8.system.js +2 -0
- package/dist/mds-modal/p-e441efd8.entry.js +1 -0
- package/dist/mds-modal/p-ff89867f.system.entry.js +1 -0
- package/dist/stats.json +32 -30
- package/dist/types/common/aria.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +19 -0
- package/documentation.json +15 -5
- package/package.json +4 -4
- package/readme.md +3 -1
- package/src/common/aria.ts +12 -0
- package/src/common/keyboard-manager.ts +2 -2
- package/src/components/mds-modal/css/mds-modal-animate-bottom.css +2 -1
- package/src/components/mds-modal/css/mds-modal-animate-center.css +2 -1
- package/src/components/mds-modal/css/mds-modal-animate-left.css +1 -1
- package/src/components/mds-modal/css/mds-modal-animate-right.css +1 -1
- package/src/components/mds-modal/css/mds-modal-animate-top.css +2 -1
- package/src/components/mds-modal/mds-modal.css +18 -21
- package/src/components/mds-modal/readme.md +1 -1
- package/src/components/mds-modal/test/mds-modal.e2e.ts +1 -1
- package/src/components/mds-modal/test/mds-modal.stories.mdx +1 -3
- package/src/fixtures/icons.json +2 -0
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/mds-modal.js +1 -1
- package/www/build/p-3289100c.system.js +1 -0
- package/www/build/p-b327d4c0.js +2 -0
- package/www/build/p-bc48f1e8.system.js +2 -0
- package/www/build/p-e441efd8.entry.js +1 -0
- package/www/build/p-ff89867f.system.entry.js +1 -0
- package/dist/esm-es5/index-6f346db2.js +0 -2
- package/dist/mds-modal/p-3bcc29b0.js +0 -2
- package/dist/mds-modal/p-5561703a.system.js +0 -1
- package/dist/mds-modal/p-5c4c27fb.entry.js +0 -1
- package/dist/mds-modal/p-7a7afece.system.entry.js +0 -1
- package/dist/mds-modal/p-d94af3e0.system.js +0 -2
- package/www/build/p-3bcc29b0.js +0 -2
- package/www/build/p-5561703a.system.js +0 -1
- package/www/build/p-5c4c27fb.entry.js +0 -1
- package/www/build/p-7a7afece.system.entry.js +0 -1
- package/www/build/p-d94af3e0.system.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-6f346db2.js";function r(t){var o,e,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(o=0;o<t.length;o++)t[o]&&(e=r(t[o]))&&(i&&(i+=" "),i+=e);else for(o in t)t[o]&&(i&&(i+=" "),i+=o);return i}function clsx(){for(var t,o,e=0,i="";e<arguments.length;)(t=arguments[e++])&&(o=r(t))&&(i&&(i+=" "),i+=o);return i}var miBaselineClose='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>';var KeyboardManager=function(){function t(){var t=this;this.elements=[];this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Space"||t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(o){if(o.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(o,e){if(e===void 0){e="element"}t.elements[e]=o};this.attachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].addEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.detachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.attachEscapeBehavior=function(o){t.escapeCallback=o;if(typeof window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=function(){return};if(typeof window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();var mdsModalCss='@tailwind components; @tailwind utilities; .focus-off,.focusable,.focusable-light,.focusable-light-off{-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);outline-offset:var(--magma-outline-blur-offset);outline:var(--magma-outline-blur);-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform}.focus-on,.focusable-light:focus-visible,.focusable:focus-visible{--magma-outline-blur-offset:var(--magma-outline-focus-offset);--magma-outline-blur:var(--magma-outline-focus)}.focus-light-on,.focusable-light:focus-visible{--magma-outline-blur:2px solid rgb(var(--tone-neutral))}.svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1 / 1;height:100%;width:100%}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.fixed{position:fixed}.absolute{position:absolute}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.ml-auto{margin-left:auto}.flex{display:-ms-flexbox;display:flex}.w-16{width:4rem}.min-w-0{min-width:0px}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.items-center{-ms-flex-align:center;align-items:center}.gap-4{gap:1rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgba(var(--tone-neutral-09), var(--tw-border-opacity))}.bg-transparent{background-color:transparent}.p-4{padding:1rem}.p-8{padding:2rem}.text-tone-neutral-02{--tw-text-opacity:1;color:rgba(var(--tone-neutral-02), var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgba(var(--tone-neutral-04), var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-overflow:auto;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);pointer-events:none;position:fixed;inset:0px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);background-color:rgba(var(--mds-modal-overlay-color) / 0);fill:rgb(var(--tone-neutral));-webkit-perspective:600px;perspective:600px;z-index:var(--mds-modal-z-index, 1000)}:host([position=top]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=bottom]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host(.to-bottom-opened),:host(.to-center-opened),:host(.to-left-opened),:host(.to-right-opened),:host(.to-top-opened){pointer-events:auto;-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity))}.close{position:absolute;top:0px;height:2.25rem;width:2.25rem;-webkit-transform-origin:center;transform-origin:center;cursor:pointer;border-radius:9999px;font-size:2.25rem;line-height:2.5rem;opacity:0;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);fill:inherit;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, transform;transition-property:opacity, outline, outline-offset, transform, -webkit-transform}.window{display:grid;height:100%;gap:0px;background-color:var(--mds-modal-window-background);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);grid-template-rows:1fr;max-width:calc(100vw - 80px);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.to-bottom){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}:host(.to-bottom) .window,:host(.to-bottom)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-bottom-intro) .window,:host(.to-bottom-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-bottom-opened.to-bottom-outro) .window,:host(.to-bottom-opened.to-bottom-outro)>::slotted([slot="window"]),:host(.to-bottom-opened) .window,:host(.to-bottom-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-bottom-outro) .window,:host(.to-bottom-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-center){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}:host(.to-center) .window,:host(.to-center)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-center-intro) .window,:host(.to-center-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-center-opened.to-center-outro) .window,:host(.to-center-opened.to-center-outro)>::slotted([slot="window"]),:host(.to-center-opened) .window,:host(.to-center-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-center-outro) .window,:host(.to-center-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-left){-ms-flex-pack:start;justify-content:flex-start}:host(.to-left) .window,:host(.to-left)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-left-intro) .window,:host(.to-left-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-opened.to-left-outro) .window,:host(.to-left-opened.to-left-outro)>::slotted([slot="window"]),:host(.to-left-opened) .window,:host(.to-left-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-left-opened) .close,:host(.to-left-opened.to-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.to-left-outro) .window,:host(.to-left-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .close{right:0px;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.to-right){-ms-flex-pack:end;justify-content:flex-end}:host(.to-right) .window,:host(.to-right)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-right-intro) .window,:host(.to-right-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-opened.to-right-outro) .window,:host(.to-right-opened.to-right-outro)>::slotted([slot="window"]),:host(.to-right-opened) .window,:host(.to-right-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-right-opened) .close,:host(.to-right-opened.to-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.to-right-outro) .window,:host(.to-right-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .close{left:0px;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.to-top){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}:host(.to-top) .window,:host(.to-top)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-top-intro) .window,:host(.to-top-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-top-opened.to-top-outro) .window,:host(.to-top-opened.to-top-outro)>::slotted([slot="window"]),:host(.to-top-opened) .window,:host(.to-top-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-top-outro) .window,:host(.to-top-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}@media (max-width: 767px){.mobile\\:w-12{width:3rem}}';var MdsModal=function(){function t(t){var o=this;registerInstance(this,t);this.closeEvent=createEvent(this,"mdsModalClose",7);this.window=false;this.top=false;this.bottom=false;this.animationState="intro";this.km=new KeyboardManager;this.componentDidLoad=function(){var t;o.km.addElement(o.host,"host");var e=(t=o.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".close");if(e)o.km.addElement(e,"close");o.km.attachEscapeBehavior((function(){return o.closeEvent.emit()}));o.km.attachClickBehavior("close")};this.animationName=function(t,e){if(t===void 0){t=""}if(e===void 0){e=""}return"to-".concat(e!==""?e:o.position).concat(t!==""?"-"+t:"")};this.closeModal=function(t){var e;if(((e=t.target)===null||e===void 0?void 0:e.localName)!=="mds-modal"){return}o.opened=t.target!==t.currentTarget;if(!o.opened){o.closeEvent.emit()}};this.stateOpened=undefined;this.opened=false;this.position="center"}t.prototype.componentWillLoad=function(){var t;this.bottom=this.host.querySelector('[slot="bottom"]')!==null;this.top=this.host.querySelector('[slot="top"]')!==null;this.window=this.host.querySelector('[slot="window"]')!==null;this.stateOpened=this.opened;if(!this.window){this.position="right"}if(this.window){(t=this.host.querySelector('[slot="window"]'))===null||t===void 0?void 0:t.setAttribute("role","modal")}};t.prototype.componentWillRender=function(){this.animationState=this.opened?"intro":"outro";this.host.classList.add(this.animationName())};t.prototype.componentDidRender=function(){var t=this;this.animationDeelay=window.setTimeout((function(){t.animationState=t.animationState==="intro"?"outro":"intro";t.host.classList.remove(t.animationName(t.animationState==="intro"?"outro":"intro"));t.host.classList.add(t.animationName(t.animationState));window.clearTimeout(t.animationDeelay)}),500)};t.prototype.disconnectedCallback=function(){this.km.detachEscapeBehavior();this.km.detachClickBehavior("close")};t.prototype.positionChange=function(t,o){window.clearTimeout(this.animationDeelay);this.host.classList.remove(this.animationName("",o));this.host.classList.remove(this.animationName("intro",o));this.host.classList.remove(this.animationName("outro",o))};t.prototype.openedChange=function(t){this.stateOpened=t;window.clearTimeout(this.animationDeelay)};t.prototype.onModalCloseListener=function(){this.opened=false};t.prototype.onBannerCloseListener=function(){this.opened=false};t.prototype.render=function(){var t=this;return h(Host,{"aria-modal":clsx(this.opened?"true":"false"),class:clsx(this.stateOpened&&this.animationName("opened")),onClick:function(o){t.closeModal(o)}},this.window?h("slot",{name:"window"}):h("div",{class:clsx("window",(this.top||this.bottom)&&"window-".concat(this.top?"-top":"").concat(this.bottom?"-bottom":"")),role:"dialog",part:"window"},this.top&&h("slot",{name:"top"}),h("slot",null),this.bottom&&h("slot",{name:"bottom"})),!this.window&&h("i",{innerHTML:miBaselineClose,tabindex:"0",onClick:function(o){t.closeModal(o)},class:"svg close focusable-light"}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{position:["positionChange"],opened:["openedChange"]}},enumerable:false,configurable:true});return t}();MdsModal.style=mdsModalCss;export{MdsModal as mds_modal};
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-5f4fd73d.js";function r(t){var o,i,e="";if("string"==typeof t||"number"==typeof t)e+=t;else if("object"==typeof t)if(Array.isArray(t))for(o=0;o<t.length;o++)t[o]&&(i=r(t[o]))&&(e&&(e+=" "),e+=i);else for(o in t)t[o]&&(e&&(e+=" "),e+=o);return e}function clsx(){for(var t,o,i=0,e="";i<arguments.length;)(t=arguments[i++])&&(o=r(t))&&(e&&(e+=" "),e+=o);return e}var miBaselineClose='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>';var KeyboardManager=function(){function t(){var t=this;this.elements=[];this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Space"||t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(o){if(o.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(o,i){if(i===void 0){i="element"}t.elements[i]=o};this.attachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].addEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.detachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.attachEscapeBehavior=function(o){t.escapeCallback=o;if(window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=function(){return};if(window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();var mdsModalCss='@tailwind components; @tailwind utilities; .focus-off,.focusable,.focusable-light,.focusable-light-off{-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);outline-offset:var(--magma-outline-blur-offset);outline:var(--magma-outline-blur);-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform}.focus-on,.focusable-light:focus-visible,.focusable:focus-visible{--magma-outline-blur-offset:var(--magma-outline-focus-offset);--magma-outline-blur:var(--magma-outline-focus)}.focus-light-on,.focusable-light:focus-visible{--magma-outline-blur:2px solid rgb(var(--tone-neutral))}.svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1 / 1;height:100%;width:100%}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.fixed{position:fixed}.absolute{position:absolute}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.ml-auto{margin-left:auto}.flex{display:-ms-flexbox;display:flex}.w-16{width:4rem}.min-w-0{min-width:0px}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.items-center{-ms-flex-align:center;align-items:center}.gap-4{gap:1rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgba(var(--tone-neutral-09), var(--tw-border-opacity))}.bg-transparent{background-color:transparent}.p-4{padding:1rem}.p-8{padding:2rem}.text-tone-neutral-02{--tw-text-opacity:1;color:rgba(var(--tone-neutral-02), var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgba(var(--tone-neutral-04), var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-overflow:auto;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;z-index:var(--mds-modal-z-index, 1000)}:host([position=top]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=bottom]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host(.to-bottom-opened),:host(.to-center-opened),:host(.to-left-opened),:host(.to-right-opened),:host(.to-top-opened){-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}.close{top:0px;height:2.25rem;width:2.25rem;border-radius:9999px;font-size:2.25rem;line-height:2.5rem;opacity:0;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);cursor:pointer;fill:inherit;position:absolute;-webkit-transform-origin:center;transform-origin:center;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, transform;transition-property:opacity, outline, outline-offset, transform, -webkit-transform}.window{height:100%;gap:0px;background-color:var(--mds-modal-window-background);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;max-width:calc(100vw - 80px);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.to-bottom){padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}:host(.to-bottom){-ms-flex-pack:center;justify-content:center}:host(.to-bottom) .window,:host(.to-bottom)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-bottom-intro) .window,:host(.to-bottom-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-bottom-opened.to-bottom-outro) .window,:host(.to-bottom-opened.to-bottom-outro)>::slotted([slot="window"]),:host(.to-bottom-opened) .window,:host(.to-bottom-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-bottom-outro) .window,:host(.to-bottom-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-center){padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}:host(.to-center){-ms-flex-pack:center;justify-content:center}:host(.to-center) .window,:host(.to-center)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-center-intro) .window,:host(.to-center-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-center-opened.to-center-outro) .window,:host(.to-center-opened.to-center-outro)>::slotted([slot="window"]),:host(.to-center-opened) .window,:host(.to-center-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-center-outro) .window,:host(.to-center-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-left){-ms-flex-pack:start;justify-content:flex-start}:host(.to-left) .window,:host(.to-left)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-left-intro) .window,:host(.to-left-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-opened.to-left-outro) .window,:host(.to-left-opened.to-left-outro)>::slotted([slot="window"]),:host(.to-left-opened) .window,:host(.to-left-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-left-opened) .close,:host(.to-left-opened.to-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.to-left-outro) .window,:host(.to-left-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .close{right:0px;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.to-right){-ms-flex-pack:end;justify-content:flex-end}:host(.to-right) .window,:host(.to-right)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-right-intro) .window,:host(.to-right-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-opened.to-right-outro) .window,:host(.to-right-opened.to-right-outro)>::slotted([slot="window"]),:host(.to-right-opened) .window,:host(.to-right-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-right-opened) .close,:host(.to-right-opened.to-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.to-right-outro) .window,:host(.to-right-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .close{left:0px;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.to-top){padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}:host(.to-top){-ms-flex-pack:center;justify-content:center}:host(.to-top) .window,:host(.to-top)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-top-intro) .window,:host(.to-top-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-top-opened.to-top-outro) .window,:host(.to-top-opened.to-top-outro)>::slotted([slot="window"]),:host(.to-top-opened) .window,:host(.to-top-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-top-outro) .window,:host(.to-top-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}@media (max-width: 767px){.mobile\\:w-12{width:3rem}}';var MdsModal=function(){function t(t){var o=this;registerInstance(this,t);this.closeEvent=createEvent(this,"mdsModalClose",7);this.window=false;this.top=false;this.bottom=false;this.animationState="intro";this.km=new KeyboardManager;this.componentDidLoad=function(){var t;o.km.addElement(o.host,"host");var i=(t=o.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".close");if(i)o.km.addElement(i,"close");o.km.attachEscapeBehavior((function(){return o.closeEvent.emit()}));o.km.attachClickBehavior("close")};this.animationName=function(t,i){if(t===void 0){t=""}if(i===void 0){i=""}return"to-".concat(i!==""?i:o.position).concat(t!==""?"-"+t:"")};this.closeModal=function(t){var i;if(((i=t.target)===null||i===void 0?void 0:i.localName)!=="mds-modal"){return}o.opened=t.target!==t.currentTarget;if(!o.opened){o.closeEvent.emit()}};this.stateOpened=undefined;this.opened=false;this.position="center"}t.prototype.componentWillLoad=function(){var t;this.bottom=this.host.querySelector('[slot="bottom"]')!==null;this.top=this.host.querySelector('[slot="top"]')!==null;this.window=this.host.querySelector('[slot="window"]')!==null;this.stateOpened=this.opened;if(!this.window){this.position="right"}if(this.window){(t=this.host.querySelector('[slot="window"]'))===null||t===void 0?void 0:t.setAttribute("role","modal")}};t.prototype.componentWillRender=function(){this.animationState=this.opened?"intro":"outro";this.host.classList.add(this.animationName())};t.prototype.componentDidRender=function(){var t=this;this.animationDeelay=window.setTimeout((function(){t.animationState=t.animationState==="intro"?"outro":"intro";t.host.classList.remove(t.animationName(t.animationState==="intro"?"outro":"intro"));t.host.classList.add(t.animationName(t.animationState));window.clearTimeout(t.animationDeelay)}),500)};t.prototype.disconnectedCallback=function(){this.km.detachEscapeBehavior();this.km.detachClickBehavior("close")};t.prototype.positionChange=function(t,o){window.clearTimeout(this.animationDeelay);this.host.classList.remove(this.animationName("",o));this.host.classList.remove(this.animationName("intro",o));this.host.classList.remove(this.animationName("outro",o))};t.prototype.openedChange=function(t){this.stateOpened=t;window.clearTimeout(this.animationDeelay)};t.prototype.onModalCloseListener=function(){this.opened=false};t.prototype.onBannerCloseListener=function(){this.opened=false};t.prototype.render=function(){var t=this;return h(Host,{"aria-modal":clsx(this.opened?"true":"false"),class:clsx(this.stateOpened&&this.animationName("opened")),onClick:function(o){t.closeModal(o)}},this.window?h("slot",{name:"window"}):h("div",{class:clsx("window",(this.top||this.bottom)&&"window-".concat(this.top?"-top":"").concat(this.bottom?"-bottom":"")),role:"dialog",part:"window"},this.top&&h("slot",{name:"top"}),h("slot",null),this.bottom&&h("slot",{name:"bottom"})),!this.window&&h("i",{innerHTML:miBaselineClose,tabindex:"0",onClick:function(o){t.closeModal(o)},class:"svg close focusable-light"}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{position:["positionChange"],opened:["openedChange"]}},enumerable:false,configurable:true});return t}();MdsModal.style=mdsModalCss;export{MdsModal as mds_modal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-5f4fd73d.js";export{s as setNonce}from"./index-5f4fd73d.js";var patchBrowser=function(){var e=import.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return promiseResolve(o)};patchBrowser().then((function(e){return bootstrapLazy([["mds-modal",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{position:["positionChange"],opened:["openedChange"]}]]]],e)}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-b327d4c0.js";export{s as setNonce}from"./p-b327d4c0.js";(()=>{const o=import.meta.url,n={};return""!==o&&(n.resourcesUrl=new URL(".",o).href),e(n)})().then((e=>o([["p-e441efd8",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{position:["positionChange"],opened:["openedChange"]}]]]],e)));
|
|
@@ -115,7 +115,7 @@ DOMTokenList
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
117
|
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
118
|
-
var url = new URL('./p-
|
|
118
|
+
var url = new URL('./p-3289100c.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
119
119
|
System.import(url.href);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-bc48f1e8.system.js"],(function(e,n){"use strict";var o,s;return{setters:[function(n){o=n.p;s=n.b;e("setNonce",n.s)}],execute:function(){var e=function(){var e=n.meta.url;var s={};if(e!==""){s.resourcesUrl=new URL(".",e).href}return o(s)};e().then((function(e){return s([["p-ff89867f.system",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{position:["positionChange"],opened:["openedChange"]}]]]],e)}))}}}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let n,t,e=!1;const l={},o=n=>"object"==(n=typeof n)||"function"===n;function s(n){var t,e,l;return null!==(l=null===(e=null===(t=n.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===e?void 0:e.getAttribute("content"))&&void 0!==l?l:void 0}const c=(n,t,...e)=>{let l=null,s=!1,c=!1;const r=[],u=t=>{for(let e=0;e<t.length;e++)l=t[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof n&&!o(l))&&(l+=""),s&&c?r[r.length-1].t+=l:r.push(s?i(null,l):l),c=s)};if(u(e),t){const n=t.className||t.class;n&&(t.class="object"!=typeof n?n:Object.keys(n).filter((t=>n[t])).join(" "))}const a=i(n,null);return a.l=t,r.length>0&&(a.o=r),a},i=(n,t)=>({i:0,u:n,t,m:null,o:null,l:null}),r={},u=n=>_(n).$hostElement$,a=(n,t,e)=>{const l=u(n);return{emit:n=>f(l,t,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:n})}},f=(n,t,e)=>{const l=Z.ce(t,e);return n.dispatchEvent(l),l},d=new WeakMap,y=n=>"sc-"+n.h,m=(n,t,e,l,s,c)=>{if(e!==l){let i=G(n,t),r=t.toLowerCase();if("class"===t){const t=n.classList,o=p(e),s=p(l);t.remove(...o.filter((n=>n&&!s.includes(n)))),t.add(...s.filter((n=>n&&!o.includes(n))))}else if(i||"o"!==t[0]||"n"!==t[1]){const r=o(l);if((i||r&&null!==l)&&!s)try{if(n.tagName.includes("-"))n[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=e&&n[t]==o||(n[t]=o)}}catch(n){}null==l||!1===l?!1===l&&""!==n.getAttribute(t)||n.removeAttribute(t):(!i||4&c||s)&&!r&&n.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):G(X,r)?r.slice(2):r[2]+t.slice(3),e&&Z.rel(n,t,e,!1),l&&Z.ael(n,t,l,!1)}},h=/\s/,p=n=>n?n.split(h):[],$=(n,t,e,o)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,c=n&&n.l||l,i=t.l||l;for(o in c)o in i||m(s,o,c[o],void 0,e,t.i);for(o in i)m(s,o,c[o],i[o],e,t.i)},v=(t,e,l)=>{const o=e.o[l];let s,c,i=0;if(null!==o.t)s=o.m=Y.createTextNode(o.t);else if(s=o.m=Y.createElement(o.u),$(null,o,!1),null!=n&&s["s-si"]!==n&&s.classList.add(s["s-si"]=n),o.o)for(i=0;i<o.o.length;++i)c=v(t,o,i),c&&s.appendChild(c);return s},b=(n,e,l,o,s,c)=>{let i,r=n;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);s<=c;++s)o[s]&&(i=v(null,l,s),i&&(o[s].m=i,r.insertBefore(i,e)))},w=(n,t,e)=>{for(let l=t;l<=e;++l){const t=n[l];if(t){const n=t.m;n&&n.remove()}}},S=(n,t)=>n.u===t.u,g=(n,t)=>{const e=t.m=n.m,l=n.o,o=t.o,s=t.t;null===s?("slot"===t.u||$(n,t,!1),null!==l&&null!==o?((n,t,e,l)=>{let o,s=0,c=0,i=t.length-1,r=t[0],u=t[i],a=l.length-1,f=l[0],d=l[a];for(;s<=i&&c<=a;)null==r?r=t[++s]:null==u?u=t[--i]:null==f?f=l[++c]:null==d?d=l[--a]:S(r,f)?(g(r,f),r=t[++s],f=l[++c]):S(u,d)?(g(u,d),u=t[--i],d=l[--a]):S(r,d)?(g(r,d),n.insertBefore(r.m,u.m.nextSibling),r=t[++s],d=l[--a]):S(u,f)?(g(u,f),n.insertBefore(u.m,r.m),u=t[--i],f=l[++c]):(o=v(t&&t[c],e,c),f=l[++c],o&&r.m.parentNode.insertBefore(o,r.m));s>i?b(n,null==l[a+1]?null:l[a+1].m,e,l,c,a):c>a&&w(t,s,i)})(e,l,t,o):null!==o?(null!==n.t&&(e.textContent=""),b(e,null,t,o,0,o.length-1)):null!==l&&w(l,0,l.length-1)):n.t!==s&&(e.data=s)},j=(n,t)=>{t&&!n.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>n.p=t)))},k=(n,t)=>{if(n.i|=16,!(4&n.i))return j(n,n.$),un((()=>M(n,t)));n.i|=512},M=(n,t)=>{const e=n.v;let l;return t&&(n.i|=256,n.S&&(n.S.map((([n,t])=>A(e,n,t))),n.S=void 0),l=A(e,"componentWillLoad")),l=O(l,(()=>A(e,"componentWillRender"))),O(l,(()=>P(n,e,t)))},O=(n,t)=>C(n)?n.then(t):t(),C=n=>n instanceof Promise||n&&n.then&&"function"==typeof n.then,P=async(n,t,e)=>{var l;const o=n.$hostElement$,c=o["s-rc"];e&&(n=>{const t=n.j,e=n.$hostElement$,l=t.i,o=((n,t)=>{var e;const l=y(t),o=Q.get(l);if(n=11===n.nodeType?n:Y,o)if("string"==typeof o){let t,c=d.get(n=n.head||n);if(c||d.set(n,c=new Set),!c.has(l)){{t=Y.createElement("style"),t.innerHTML=o;const l=null!==(e=Z.k)&&void 0!==e?e:s(Y);null!=l&&t.setAttribute("nonce",l),n.insertBefore(t,n.querySelector("link"))}c&&c.add(l)}}else n.adoptedStyleSheets.includes(o)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,o]);return l})(e.shadowRoot?e.shadowRoot:e.getRootNode(),t);10&l&&(e["s-sc"]=o,e.classList.add(o+"-h"))})(n);R(n,t,o,e),c&&(c.map((n=>n())),o["s-rc"]=void 0);{const t=null!==(l=o["s-p"])&&void 0!==l?l:[],e=()=>W(n);0===t.length?e():(Promise.all(t).then(e),n.i|=4,t.length=0)}},R=(e,l,o,s)=>{try{l=l.render(),e.i&=-17,e.i|=2,((e,l,o=!1)=>{const s=e.$hostElement$,u=e.j,a=e.M||i(null,null),f=(n=>n&&n.u===r)(l)?l:c(null,null,l);if(t=s.tagName,u.O&&(f.l=f.l||{},u.O.map((([n,t])=>f.l[t]=s[n]))),o&&f.l)for(const n of Object.keys(f.l))s.hasAttribute(n)&&!["key","ref","style","class"].includes(n)&&(f.l[n]=s[n]);f.u=null,f.i|=4,e.M=f,f.m=a.m=s.shadowRoot||s,n=s["s-sc"],g(a,f)})(e,l,s)}catch(n){I(n,e.$hostElement$)}return null},W=n=>{const t=n.$hostElement$,e=n.$;A(n.v,"componentDidRender"),64&n.i||(n.i|=64,E(t),n.C(t),e||x()),n.p&&(n.p(),n.p=void 0),512&n.i&&rn((()=>k(n,!1))),n.i&=-517},x=()=>{E(Y.documentElement),rn((()=>f(X,"appload",{detail:{namespace:"mds-modal"}})))},A=(n,t,e)=>{if(n&&n[t])try{return n[t](e)}catch(n){I(n)}},E=n=>n.setAttribute("hydrated",""),L=(n,t,e)=>{var l;if(t.P){n.watchers&&(t.R=n.watchers);const s=Object.entries(t.P),c=n.prototype;if(s.map((([n,[l]])=>{(31&l||2&e&&32&l)&&Object.defineProperty(c,n,{get(){return((n,t)=>_(this).W.get(t))(0,n)},set(e){((n,t,e,l)=>{const s=_(n),c=s.$hostElement$,i=s.W.get(t),r=s.i,u=s.v;if(e=((n,t)=>null==n||o(n)?n:4&t?"false"!==n&&(""===n||!!n):1&t?n+"":n)(e,l.P[t][0]),(!(8&r)||void 0===i)&&e!==i&&(!Number.isNaN(i)||!Number.isNaN(e))&&(s.W.set(t,e),u)){if(l.R&&128&r){const n=l.R[t];n&&n.map((n=>{try{u[n](e,i,t)}catch(n){I(n,c)}}))}2==(18&r)&&k(s,!1)}})(this,n,e,t)},configurable:!0,enumerable:!0})})),1&e){const e=new Map;c.attributeChangedCallback=function(n,l,o){Z.jmp((()=>{const s=e.get(n);if(this.hasOwnProperty(s))o=this[s],delete this[s];else{if(c.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==o)return;if(null==s){const e=_(this),s=null==e?void 0:e.i;if(!(8&s)&&128&s&&o!==l){const s=e.v,c=t.R[n];null==c||c.forEach((t=>{null!=s[t]&&s[t].call(s,o,l,n)}))}return}}this[s]=(null!==o||"boolean"!=typeof this[s])&&o}))},n.observedAttributes=Array.from(new Set([...Object.keys(null!==(l=t.R)&&void 0!==l?l:{}),...s.filter((([n,t])=>15&t[0])).map((([n,l])=>{const o=l[1]||n;return e.set(o,n),512&l[0]&&t.O.push([n,o]),o}))]))}}return n},N=n=>{A(n,"disconnectedCallback")},T=(n,t={})=>{var e;const l=[],o=t.exclude||[],c=X.customElements,i=Y.head,r=i.querySelector("meta[charset]"),u=Y.createElement("style"),a=[];let f,d=!0;Object.assign(Z,t),Z.A=new URL(t.resourcesUrl||"./",Y.baseURI).href,n.map((n=>{n[1].map((t=>{var e;const s={i:t[0],h:t[1],P:t[2],L:t[3]};s.P=t[2],s.L=t[3],s.O=[],s.R=null!==(e=t[4])&&void 0!==e?e:{};const i=s.h,r=class extends HTMLElement{constructor(n){super(n),B(n=this,s),1&s.i&&n.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):Z.jmp((()=>(n=>{if(0==(1&Z.i)){const t=_(n),e=t.j,l=()=>{};if(1&t.i)H(n,t,e.L),(null==t?void 0:t.v)||(null==t?void 0:t.N)&&t.N.then((()=>{}));else{t.i|=1;{let e=n;for(;e=e.parentNode||e.host;)if(e["s-p"]){j(t,t.$=e);break}}e.P&&Object.entries(e.P).map((([t,[e]])=>{if(31&e&&n.hasOwnProperty(t)){const e=n[t];delete n[t],n[t]=e}})),(async(n,t,e)=>{let l;if(0==(32&t.i)){t.i|=32;{if(l=K(e),l.then){const n=()=>{};l=await l,n()}l.isProxied||(e.R=l.watchers,L(l,e,2),l.isProxied=!0);const n=()=>{};t.i|=8;try{new l(t)}catch(n){I(n)}t.i&=-9,t.i|=128,n()}if(l.style){let n=l.style;const t=y(e);if(!Q.has(t)){const l=()=>{};((n,t,e)=>{let l=Q.get(n);tn&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,Q.set(n,l)})(t,n,!!(1&e.i)),l()}}}const o=t.$,s=()=>k(t,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(0,t,e)}l()}})(this)))}disconnectedCallback(){Z.jmp((()=>(async()=>{if(0==(1&Z.i)){const n=_(this);n.T&&(n.T.map((n=>n())),n.T=void 0),(null==n?void 0:n.v)?N(n.v):(null==n?void 0:n.N)&&n.N.then((()=>N(n.v)))}})()))}componentOnReady(){return _(this).N}};s.H=n[0],o.includes(i)||c.get(i)||(l.push(i),c.define(i,L(r,s,1)))}))}));{u.innerHTML=l+"{visibility:hidden}[hydrated]{visibility:inherit}",u.setAttribute("data-styles","");const n=null!==(e=Z.k)&&void 0!==e?e:s(Y);null!=n&&u.setAttribute("nonce",n),i.insertBefore(u,r?r.nextSibling:i.firstChild)}d=!1,a.length?a.map((n=>n.connectedCallback())):Z.jmp((()=>f=setTimeout(x,30)))},H=(n,t,e)=>{e&&e.map((([e,l,o])=>{const s=q(n,e),c=U(t,o),i=D(e);Z.ael(s,l,c,i),(t.T=t.T||[]).push((()=>Z.rel(s,l,c,i)))}))},U=(n,t)=>e=>{try{256&n.i?n.v[t](e):(n.S=n.S||[]).push([t,e])}catch(n){I(n)}},q=(n,t)=>4&t?Y:n,D=n=>0!=(2&n),F=n=>Z.k=n,V=new WeakMap,_=n=>V.get(n),z=(n,t)=>V.set(t.v=n,t),B=(n,t)=>{const e={i:0,$hostElement$:n,j:t,W:new Map};return e.N=new Promise((n=>e.C=n)),n["s-p"]=[],n["s-rc"]=[],H(n,e,t.L),V.set(n,e)},G=(n,t)=>t in n,I=(n,t)=>(0,console.error)(n,t),J=new Map,K=n=>{const t=n.h.replace(/-/g,"_"),e=n.H,l=J.get(e);return l?l[t]:import(`./${e}.entry.js`).then((n=>(J.set(e,n),n[t])),I)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},Q=new Map,X="undefined"!=typeof window?window:{},Y=X.document||{head:{}},Z={i:0,A:"",jmp:n=>n(),raf:n=>requestAnimationFrame(n),ael:(n,t,e,l)=>n.addEventListener(t,e,l),rel:(n,t,e,l)=>n.removeEventListener(t,e,l),ce:(n,t)=>new CustomEvent(n,t)},nn=n=>Promise.resolve(n),tn=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(n){}return!1})(),en=[],ln=[],on=(n,t)=>l=>{n.push(l),e||(e=!0,t&&4&Z.i?rn(cn):Z.raf(cn))},sn=n=>{for(let t=0;t<n.length;t++)try{n[t](performance.now())}catch(n){I(n)}n.length=0},cn=()=>{sn(en),sn(ln),(e=en.length>0)&&Z.raf(cn)},rn=n=>nn().then(n),un=on(ln,!0);export{r as H,T as b,a as c,u as g,c as h,nn as p,z as r,F as s}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var n=function(r,e){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var e in r)if(Object.prototype.hasOwnProperty.call(r,e))n[e]=r[e]};return n(r,e)};return function(r,e){if(typeof e!=="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(n,r,e,t){function i(n){return n instanceof e?n:new e((function(r){r(n)}))}return new(e||(e=Promise))((function(e,u){function a(n){try{o(t.next(n))}catch(n){u(n)}}function f(n){try{o(t["throw"](n))}catch(n){u(n)}}function o(n){n.done?e(n.value):i(n.value).then(a,f)}o((t=t.apply(n,r||[])).next())}))};var __generator=this&&this.__generator||function(n,r){var e={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},t,i,u,a;return a={next:f(0),throw:f(1),return:f(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function f(n){return function(r){return o([n,r])}}function o(f){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,f[0]&&(e=0)),e)try{if(t=1,i&&(u=f[0]&2?i["return"]:f[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,f[1])).done)return u;if(i=0,u)f=[f[0]&2,u.value];switch(f[0]){case 0:case 1:u=f;break;case 4:e.label++;return{value:f[1],done:false};case 5:e.label++;i=f[1];f=[0];continue;case 7:f=e.ops.pop();e.trys.pop();continue;default:if(!(u=e.trys,u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){e=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]<u[3])){e.label=f[1];break}if(f[0]===6&&e.label<u[1]){e.label=u[1];u=f;break}if(u&&e.label<u[2]){e.label=u[2];e.ops.push(f);break}if(u[2])e.ops.pop();e.trys.pop();continue}f=r.call(n,e)}catch(n){f=[6,n];i=0}finally{t=u=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(n,r,e){if(e||arguments.length===2)for(var t=0,i=r.length,u;t<i;t++){if(u||!(t in r)){if(!u)u=Array.prototype.slice.call(r,0,t);u[t]=r[t]}}return n.concat(u||Array.prototype.slice.call(r))};System.register([],(function(n,r){"use strict";return{execute:function(){var e=this;var t="mds-modal";var i;var u;var a=false;var f=false;var o=function(n,r){if(r===void 0){r=""}{return function(){return}}};var v=function(n,r){{return function(){return}}};var c="{visibility:hidden}[hydrated]{visibility:inherit}";var l={};var s=function(n){return n!=null};var d=function(n){n=typeof n;return n==="object"||n==="function"};function h(n){var r,e,t;return(t=(e=(r=n.head)===null||r===void 0?void 0:r.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content"))!==null&&t!==void 0?t:undefined}var y=n("h",(function(n,r){var e=[];for(var t=2;t<arguments.length;t++){e[t-2]=arguments[t]}var i=null;var u=false;var a=false;var f=[];var o=function(r){for(var e=0;e<r.length;e++){i=r[e];if(Array.isArray(i)){o(i)}else if(i!=null&&typeof i!=="boolean"){if(u=typeof n!=="function"&&!d(i)){i=String(i)}if(u&&a){f[f.length-1].t+=i}else{f.push(u?p(null,i):i)}a=u}}};o(e);if(r){{var v=r.className||r.class;if(v){r.class=typeof v!=="object"?v:Object.keys(v).filter((function(n){return v[n]})).join(" ")}}}var c=p(n,null);c.i=r;if(f.length>0){c.u=f}return c}));var p=function(n,r){var e={o:0,v:n,t:r,l:null,u:null};{e.i=null}return e};var m=n("H",{});var w=function(n){return n&&n.v===m};var b=function(n,r){if(n!=null&&!d(n)){if(r&4){return n==="false"?false:n===""||!!n}if(r&1){return String(n)}return n}return n};var _=n("g",(function(n){return sn(n).$hostElement$}));var $=n("c",(function(n,r,e){var t=_(n);return{emit:function(n){return S(t,r,{bubbles:!!(e&4),composed:!!(e&2),cancelable:!!(e&1),detail:n})}}}));var S=function(n,r,e){var t=Sn.ce(r,e);n.dispatchEvent(t);return t};var g=new WeakMap;var j=function(n,r,e){var t=bn.get(n);if(jn&&e){t=t||new CSSStyleSheet;if(typeof t==="string"){t=r}else{t.replaceSync(r)}}else{t=r}bn.set(n,t)};var k=function(n,r,e){var t;var i=O(r);var u=bn.get(i);n=n.nodeType===11?n:$n;if(u){if(typeof u==="string"){n=n.head||n;var a=g.get(n);var f=void 0;if(!a){g.set(n,a=new Set)}if(!a.has(i)){{f=$n.createElement("style");f.innerHTML=u;var o=(t=Sn.h)!==null&&t!==void 0?t:h($n);if(o!=null){f.setAttribute("nonce",o)}n.insertBefore(f,n.querySelector("link"))}if(a){a.add(i)}}}else if(!n.adoptedStyleSheets.includes(u)){n.adoptedStyleSheets=__spreadArray(__spreadArray([],n.adoptedStyleSheets,true),[u],false)}}return i};var A=function(n){var r=n.p;var e=n.$hostElement$;var t=r.o;var i=o("attachStyles",r.m);var u=k(e.shadowRoot?e.shadowRoot:e.getRootNode(),r);if(t&10){e["s-sc"]=u;e.classList.add(u+"-h")}i()};var O=function(n,r){return"sc-"+n.m};var M=function(n,r,e,t,i,u){if(e!==t){var a=yn(n,r);var f=r.toLowerCase();if(r==="class"){var o=n.classList;var v=C(e);var c=C(t);o.remove.apply(o,v.filter((function(n){return n&&!c.includes(n)})));o.add.apply(o,c.filter((function(n){return n&&!v.includes(n)})))}else if(!a&&r[0]==="o"&&r[1]==="n"){if(r[2]==="-"){r=r.slice(3)}else if(yn(_n,f)){r=f.slice(2)}else{r=f[2]+r.slice(3)}if(e){Sn.rel(n,r,e,false)}if(t){Sn.ael(n,r,t,false)}}else{var l=d(t);if((a||l&&t!==null)&&!i){try{if(!n.tagName.includes("-")){var s=t==null?"":t;if(r==="list"){a=false}else if(e==null||n[r]!=s){n[r]=s}}else{n[r]=t}}catch(n){}}if(t==null||t===false){if(t!==false||n.getAttribute(r)===""){{n.removeAttribute(r)}}}else if((!a||u&4||i)&&!l){t=t===true?"":t;{n.setAttribute(r,t)}}}}};var x=/\s/;var C=function(n){return!n?[]:n.split(x)};var P=function(n,r,e,t){var i=r.l.nodeType===11&&r.l.host?r.l.host:r.l;var u=n&&n.i||l;var a=r.i||l;{for(t in u){if(!(t in a)){M(i,t,u[t],undefined,e,r.o)}}}for(t in a){M(i,t,u[t],a[t],e,r.o)}};var E=function(n,r,e,t){var u=r.u[e];var f=0;var o;var v;if(u.t!==null){o=u.l=$n.createTextNode(u.t)}else{o=u.l=$n.createElement(u.v);{P(null,u,a)}if(s(i)&&o["s-si"]!==i){o.classList.add(o["s-si"]=i)}if(u.u){for(f=0;f<u.u.length;++f){v=E(n,u,f);if(v){o.appendChild(v)}}}}return o};var T=function(n,r,e,t,i,a){var f=n;var o;if(f.shadowRoot&&f.tagName===u){f=f.shadowRoot}for(;i<=a;++i){if(t[i]){o=E(null,e,i);if(o){t[i].l=o;f.insertBefore(o,r)}}}};var U=function(n,r,e){for(var t=r;t<=e;++t){var i=n[t];if(i){var u=i.l;if(u){u.remove()}}}};var W=function(n,r,e,t){var i=0;var u=0;var a=r.length-1;var f=r[0];var o=r[a];var v=t.length-1;var c=t[0];var l=t[v];var s;while(i<=a&&u<=v){if(f==null){f=r[++i]}else if(o==null){o=r[--a]}else if(c==null){c=t[++u]}else if(l==null){l=t[--v]}else if(L(f,c)){N(f,c);f=r[++i];c=t[++u]}else if(L(o,l)){N(o,l);o=r[--a];l=t[--v]}else if(L(f,l)){N(f,l);n.insertBefore(f.l,o.l.nextSibling);f=r[++i];l=t[--v]}else if(L(o,c)){N(o,c);n.insertBefore(o.l,f.l);o=r[--a];c=t[++u]}else{{s=E(r&&r[u],e,u);c=t[++u]}if(s){{f.l.parentNode.insertBefore(s,f.l)}}}}if(i>a){T(n,t[v+1]==null?null:t[v+1].l,e,t,u,v)}else if(u>v){U(r,i,a)}};var L=function(n,r){if(n.v===r.v){return true}return false};var N=function(n,r){var e=r.l=n.l;var t=n.u;var i=r.u;var u=r.v;var f=r.t;if(f===null){{if(u==="slot");else{P(n,r,a)}}if(t!==null&&i!==null){W(e,t,r,i)}else if(i!==null){if(n.t!==null){e.textContent=""}T(e,null,r,i,0,i.length-1)}else if(t!==null){U(t,0,t.length-1)}}else if(n.t!==f){e.data=f}};var R=function(n,r,e){if(e===void 0){e=false}var t=n.$hostElement$;var a=n.p;var f=n._||p(null,null);var o=w(r)?r:y(null,null,r);u=t.tagName;if(a.$){o.i=o.i||{};a.$.map((function(n){var r=n[0],e=n[1];return o.i[e]=t[r]}))}if(e&&o.i){for(var v=0,c=Object.keys(o.i);v<c.length;v++){var l=c[v];if(t.hasAttribute(l)&&!["key","ref","style","class"].includes(l)){o.i[l]=t[l]}}}o.v=null;o.o|=4;n._=o;o.l=f.l=t.shadowRoot||t;{i=t["s-sc"]}N(f,o)};var H=function(n,r){if(r&&!n.S&&r["s-p"]){r["s-p"].push(new Promise((function(r){return n.S=r})))}};var q=function(n,r){{n.o|=16}if(n.o&4){n.o|=512;return}H(n,n.j);var e=function(){return D(n,r)};return Pn(e)};var D=function(n,r){var e=o("scheduleUpdate",n.p.m);var t=n.k;var i;if(r){{n.o|=256;if(n.A){n.A.map((function(n){var r=n[0],e=n[1];return J(t,r,e)}));n.A=undefined}}{i=J(t,"componentWillLoad")}}{i=F(i,(function(){return J(t,"componentWillRender")}))}e();return F(i,(function(){return I(n,t,r)}))};var F=function(n,r){return G(n)?n.then(r):r()};var G=function(n){return n instanceof Promise||n&&n.then&&typeof n.then==="function"};var I=function(n,r,t){return __awaiter(e,void 0,void 0,(function(){var e,i,u,a,f,v,c;return __generator(this,(function(l){i=n.$hostElement$;u=o("update",n.p.m);a=i["s-rc"];if(t){A(n)}f=o("render",n.p.m);{V(n,r,i,t)}if(a){a.map((function(n){return n()}));i["s-rc"]=undefined}f();u();{v=(e=i["s-p"])!==null&&e!==void 0?e:[];c=function(){return z(n)};if(v.length===0){c()}else{Promise.all(v).then(c);n.o|=4;v.length=0}}return[2]}))}))};var V=function(n,r,e,t){try{r=r.render();{n.o&=~16}{n.o|=2}{{{R(n,r,t)}}}}catch(r){pn(r,n.$hostElement$)}return null};var z=function(n){var r=n.p.m;var e=n.$hostElement$;var t=o("postUpdate",r);var i=n.k;var u=n.j;{J(i,"componentDidRender")}if(!(n.o&64)){n.o|=64;{K(e)}t();{n.O(e);if(!u){B()}}}else{t()}{if(n.S){n.S();n.S=undefined}if(n.o&512){Cn((function(){return q(n,false)}))}n.o&=~(4|512)}};var B=function(n){{K($n.documentElement)}Cn((function(){return S(_n,"appload",{detail:{namespace:t}})}))};var J=function(n,r,e){if(n&&n[r]){try{return n[r](e)}catch(n){pn(n)}}return undefined};var K=function(n){return n.setAttribute("hydrated","")};var Q=function(n,r){return sn(n).M.get(r)};var X=function(n,r,e,t){var i=sn(n);var u=i.$hostElement$;var a=i.M.get(r);var f=i.o;var o=i.k;e=b(e,t.C[r][0]);var v=Number.isNaN(a)&&Number.isNaN(e);var c=e!==a&&!v;if((!(f&8)||a===undefined)&&c){i.M.set(r,e);if(o){if(t.P&&f&128){var l=t.P[r];if(l){l.map((function(n){try{o[n](e,a,r)}catch(n){pn(n,u)}}))}}if((f&(2|16))===2){q(i,false)}}}};var Y=function(n,r,e){var t;if(r.C){if(n.watchers){r.P=n.watchers}var i=Object.entries(r.C);var u=n.prototype;i.map((function(n){var t=n[0],i=n[1][0];if(i&31||e&2&&i&32){Object.defineProperty(u,t,{get:function(){return Q(this,t)},set:function(n){X(this,t,n,r)},configurable:true,enumerable:true})}}));if(e&1){var a=new Map;u.attributeChangedCallback=function(n,e,t){var i=this;Sn.jmp((function(){var f=a.get(n);if(i.hasOwnProperty(f)){t=i[f];delete i[f]}else if(u.hasOwnProperty(f)&&typeof i[f]==="number"&&i[f]==t){return}else if(f==null){var o=sn(i);var v=o===null||o===void 0?void 0:o.o;if(!(v&8)&&v&128&&t!==e){var c=o.k;var l=r.P[n];l===null||l===void 0?void 0:l.forEach((function(r){if(c[r]!=null){c[r].call(c,t,e,n)}}))}return}i[f]=t===null&&typeof i[f]==="boolean"?false:t}))};n.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=r.P)!==null&&t!==void 0?t:{}),true),i.filter((function(n){var r=n[0],e=n[1];return e[0]&15})).map((function(n){var e=n[0],t=n[1];var i=t[1]||e;a.set(i,e);if(t[0]&512){r.$.push([e,i])}return i})),true)))}}return n};var Z=function(n,r,t,i){return __awaiter(e,void 0,void 0,(function(){var n,e,i,u,a,f,c,l;return __generator(this,(function(s){switch(s.label){case 0:if(!((r.o&32)===0))return[3,3];r.o|=32;n=wn(t);if(!n.then)return[3,2];e=v();return[4,n];case 1:n=s.sent();e();s.label=2;case 2:if(!n.isProxied){{t.P=n.watchers}Y(n,t,2);n.isProxied=true}i=o("createInstance",t.m);{r.o|=8}try{new n(r)}catch(n){pn(n)}{r.o&=~8}{r.o|=128}i();if(n.style){u=n.style;a=O(t);if(!bn.has(a)){f=o("registerStyles",t.m);j(a,u,!!(t.o&1));f()}}s.label=3;case 3:c=r.j;l=function(){return q(r,true)};if(c&&c["s-rc"]){c["s-rc"].push(l)}else{l()}return[2]}}))}))};var nn=function(n){};var rn=function(n){if((Sn.o&1)===0){var r=sn(n);var e=r.p;var t=o("connectedCallback",e.m);if(!(r.o&1)){r.o|=1;{var i=n;while(i=i.parentNode||i.host){if(i["s-p"]){H(r,r.j=i);break}}}if(e.C){Object.entries(e.C).map((function(r){var e=r[0],t=r[1][0];if(t&31&&n.hasOwnProperty(e)){var i=n[e];delete n[e];n[e]=i}}))}{Z(n,r,e)}}else{an(n,r,e.T);if(r===null||r===void 0?void 0:r.k);else if(r===null||r===void 0?void 0:r.U){r.U.then((function(){return nn()}))}}t()}};var en=function(n){{J(n,"disconnectedCallback")}};var tn=function(n){return __awaiter(e,void 0,void 0,(function(){var r;return __generator(this,(function(e){if((Sn.o&1)===0){r=sn(n);{if(r.W){r.W.map((function(n){return n()}));r.W=undefined}}if(r===null||r===void 0?void 0:r.k){en(r.k)}else if(r===null||r===void 0?void 0:r.U){r.U.then((function(){return en(r.k)}))}}return[2]}))}))};var un=n("b",(function(n,r){if(r===void 0){r={}}var e;var t=o();var i=[];var u=r.exclude||[];var a=_n.customElements;var f=$n.head;var v=f.querySelector("meta[charset]");var l=$n.createElement("style");var s=[];var d;var y=true;Object.assign(Sn,r);Sn.L=new URL(r.resourcesUrl||"./",$n.baseURI).href;n.map((function(n){n[1].map((function(r){var e;var t={o:r[0],m:r[1],C:r[2],T:r[3]};{t.C=r[2]}{t.T=r[3]}{t.$=[]}{t.P=(e=r[4])!==null&&e!==void 0?e:{}}var f=t.m;var o=function(n){__extends(r,n);function r(r){var e=n.call(this,r)||this;r=e;hn(r,t);if(t.o&1){{{r.attachShadow({mode:"open"})}}}return e}r.prototype.connectedCallback=function(){var n=this;if(d){clearTimeout(d);d=null}if(y){s.push(this)}else{Sn.jmp((function(){return rn(n)}))}};r.prototype.disconnectedCallback=function(){var n=this;Sn.jmp((function(){return tn(n)}))};r.prototype.componentOnReady=function(){return sn(this).U};return r}(HTMLElement);t.N=n[0];if(!u.includes(f)&&!a.get(f)){i.push(f);a.define(f,Y(o,t,1))}}))}));{l.innerHTML=i+c;l.setAttribute("data-styles","");var p=(e=Sn.h)!==null&&e!==void 0?e:h($n);if(p!=null){l.setAttribute("nonce",p)}f.insertBefore(l,v?v.nextSibling:f.firstChild)}y=false;if(s.length){s.map((function(n){return n.connectedCallback()}))}else{{Sn.jmp((function(){return d=setTimeout(B,30)}))}}t()}));var an=function(n,r,e,t){if(e){e.map((function(e){var t=e[0],i=e[1],u=e[2];var a=on(n,t);var f=fn(r,u);var o=vn(t);Sn.ael(a,i,f,o);(r.W=r.W||[]).push((function(){return Sn.rel(a,i,f,o)}))}))}};var fn=function(n,r){return function(e){try{{if(n.o&256){n.k[r](e)}else{(n.A=n.A||[]).push([r,e])}}}catch(n){pn(n)}}};var on=function(n,r){if(r&4)return $n;return n};var vn=function(n){return(n&2)!==0};var cn=n("s",(function(n){return Sn.h=n}));var ln=new WeakMap;var sn=function(n){return ln.get(n)};var dn=n("r",(function(n,r){return ln.set(r.k=n,r)}));var hn=function(n,r){var e={o:0,$hostElement$:n,p:r,M:new Map};{e.U=new Promise((function(n){return e.O=n}));n["s-p"]=[];n["s-rc"]=[]}an(n,e,r.T);return ln.set(n,e)};var yn=function(n,r){return r in n};var pn=function(n,r){return(0,console.error)(n,r)};var mn=new Map;var wn=function(n,e,t){var i=n.m.replace(/-/g,"_");var u=n.N;var a=mn.get(u);if(a){return a[i]}
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return r.import("./".concat(u,".entry.js").concat("")).then((function(n){{mn.set(u,n)}return n[i]}),pn)};var bn=new Map;var _n=typeof window!=="undefined"?window:{};var $n=_n.document||{head:{}};var Sn={o:0,L:"",jmp:function(n){return n()},raf:function(n){return requestAnimationFrame(n)},ael:function(n,r,e,t){return n.addEventListener(r,e,t)},rel:function(n,r,e,t){return n.removeEventListener(r,e,t)},ce:function(n,r){return new CustomEvent(n,r)}};var gn=n("p",(function(n){return Promise.resolve(n)}));var jn=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(n){}return false}();var kn=[];var An=[];var On=function(n,r){return function(e){n.push(e);if(!f){f=true;if(r&&Sn.o&4){Cn(xn)}else{Sn.raf(xn)}}}};var Mn=function(n){for(var r=0;r<n.length;r++){try{n[r](performance.now())}catch(n){pn(n)}}n.length=0};var xn=function(){Mn(kn);{Mn(An);if(f=kn.length>0){Sn.raf(xn)}}};var Cn=function(n){return gn().then(n)};var Pn=On(An,true)}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as i,H as r,g as e}from"./p-b327d4c0.js";function n(t){var o,i,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(o=0;o<t.length;o++)t[o]&&(i=n(t[o]))&&(r&&(r+=" "),r+=i);else for(o in t)t[o]&&(r&&(r+=" "),r+=o);return r}function a(){for(var t,o,i=0,r="";i<arguments.length;)(t=arguments[i++])&&(o=n(t))&&(r&&(r+=" "),r+=o);return r}class s{constructor(){this.elements=[],this.handleClickBehaviorDispatchEvent=t=>{"Space"!==t.code&&"Enter"!==t.code&&"NumpadEnter"!==t.code||t.target.click()},this.handleEscapeBehaviorDispatchEvent=t=>{"Escape"===t.code&&this.escapeCallback&&this.escapeCallback()},this.addElement=(t,o="element")=>{this.elements[o]=t},this.attachClickBehavior=(t="element")=>{this.elements[t]&&this.elements[t].addEventListener("keydown",this.handleClickBehaviorDispatchEvent)},this.detachClickBehavior=(t="element")=>{this.elements[t]&&this.elements[t].removeEventListener("keydown",this.handleClickBehaviorDispatchEvent)},this.attachEscapeBehavior=t=>{this.escapeCallback=t,void 0!==window&&window.addEventListener("keydown",this.handleEscapeBehaviorDispatchEvent.bind(this))},this.detachEscapeBehavior=()=>{this.escapeCallback=()=>{},void 0!==window&&window.removeEventListener("keydown",this.handleEscapeBehaviorDispatchEvent.bind(this))}}}const l=class{constructor(i){t(this,i),this.closeEvent=o(this,"mdsModalClose",7),this.window=!1,this.top=!1,this.bottom=!1,this.animationState="intro",this.km=new s,this.componentDidLoad=()=>{var t;this.km.addElement(this.host,"host");const o=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".close");o&&this.km.addElement(o,"close"),this.km.attachEscapeBehavior((()=>this.closeEvent.emit())),this.km.attachClickBehavior("close")},this.animationName=(t="",o="")=>`to-${""!==o?o:this.position}${""!==t?"-"+t:""}`,this.closeModal=t=>{var o;"mds-modal"===(null===(o=t.target)||void 0===o?void 0:o.localName)&&(this.opened=t.target!==t.currentTarget,this.opened||this.closeEvent.emit())},this.stateOpened=void 0,this.opened=!1,this.position="center"}componentWillLoad(){var t;this.bottom=null!==this.host.querySelector('[slot="bottom"]'),this.top=null!==this.host.querySelector('[slot="top"]'),this.window=null!==this.host.querySelector('[slot="window"]'),this.stateOpened=this.opened,this.window||(this.position="right"),this.window&&(null===(t=this.host.querySelector('[slot="window"]'))||void 0===t||t.setAttribute("role","modal"))}componentWillRender(){this.animationState=this.opened?"intro":"outro",this.host.classList.add(this.animationName())}componentDidRender(){this.animationDeelay=window.setTimeout((()=>{this.animationState="intro"===this.animationState?"outro":"intro",this.host.classList.remove(this.animationName("intro"===this.animationState?"outro":"intro")),this.host.classList.add(this.animationName(this.animationState)),window.clearTimeout(this.animationDeelay)}),500)}disconnectedCallback(){this.km.detachEscapeBehavior(),this.km.detachClickBehavior("close")}positionChange(t,o){window.clearTimeout(this.animationDeelay),this.host.classList.remove(this.animationName("",o)),this.host.classList.remove(this.animationName("intro",o)),this.host.classList.remove(this.animationName("outro",o))}openedChange(t){this.stateOpened=t,window.clearTimeout(this.animationDeelay)}onModalCloseListener(){this.opened=!1}onBannerCloseListener(){this.opened=!1}render(){return i(r,{"aria-modal":a(this.opened?"true":"false"),class:a(this.stateOpened&&this.animationName("opened")),onClick:t=>{this.closeModal(t)}},this.window?i("slot",{name:"window"}):i("div",{class:a("window",(this.top||this.bottom)&&`window-${this.top?"-top":""}${this.bottom?"-bottom":""}`),role:"dialog",part:"window"},this.top&&i("slot",{name:"top"}),i("slot",null),this.bottom&&i("slot",{name:"bottom"})),!this.window&&i("i",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>',tabindex:"0",onClick:t=>{this.closeModal(t)},class:"svg close focusable-light"}))}get host(){return e(this)}static get watchers(){return{position:["positionChange"],opened:["openedChange"]}}};l.style='@tailwind components; @tailwind utilities; .focus-off,.focusable,.focusable-light,.focusable-light-off{-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);outline-offset:var(--magma-outline-blur-offset);outline:var(--magma-outline-blur);-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform}.focus-on,.focusable-light:focus-visible,.focusable:focus-visible{--magma-outline-blur-offset:var(--magma-outline-focus-offset);--magma-outline-blur:var(--magma-outline-focus)}.focus-light-on,.focusable-light:focus-visible{--magma-outline-blur:2px solid rgb(var(--tone-neutral))}.svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1 / 1;height:100%;width:100%}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.fixed{position:fixed}.absolute{position:absolute}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.ml-auto{margin-left:auto}.flex{display:-ms-flexbox;display:flex}.w-16{width:4rem}.min-w-0{min-width:0px}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.items-center{-ms-flex-align:center;align-items:center}.gap-4{gap:1rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgba(var(--tone-neutral-09), var(--tw-border-opacity))}.bg-transparent{background-color:transparent}.p-4{padding:1rem}.p-8{padding:2rem}.text-tone-neutral-02{--tw-text-opacity:1;color:rgba(var(--tone-neutral-02), var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgba(var(--tone-neutral-04), var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-overflow:auto;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;z-index:var(--mds-modal-z-index, 1000)}:host([position=top]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=bottom]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host(.to-bottom-opened),:host(.to-center-opened),:host(.to-left-opened),:host(.to-right-opened),:host(.to-top-opened){-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}.close{top:0px;height:2.25rem;width:2.25rem;border-radius:9999px;font-size:2.25rem;line-height:2.5rem;opacity:0;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);cursor:pointer;fill:inherit;position:absolute;-webkit-transform-origin:center;transform-origin:center;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, transform;transition-property:opacity, outline, outline-offset, transform, -webkit-transform}.window{height:100%;gap:0px;background-color:var(--mds-modal-window-background);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;max-width:calc(100vw - 80px);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.to-bottom){padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}:host(.to-bottom){-ms-flex-pack:center;justify-content:center}:host(.to-bottom) .window,:host(.to-bottom)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-bottom-intro) .window,:host(.to-bottom-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-bottom-opened.to-bottom-outro) .window,:host(.to-bottom-opened.to-bottom-outro)>::slotted([slot="window"]),:host(.to-bottom-opened) .window,:host(.to-bottom-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-bottom-outro) .window,:host(.to-bottom-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-center){padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}:host(.to-center){-ms-flex-pack:center;justify-content:center}:host(.to-center) .window,:host(.to-center)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-center-intro) .window,:host(.to-center-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-center-opened.to-center-outro) .window,:host(.to-center-opened.to-center-outro)>::slotted([slot="window"]),:host(.to-center-opened) .window,:host(.to-center-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-center-outro) .window,:host(.to-center-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-left){-ms-flex-pack:start;justify-content:flex-start}:host(.to-left) .window,:host(.to-left)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-left-intro) .window,:host(.to-left-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-opened.to-left-outro) .window,:host(.to-left-opened.to-left-outro)>::slotted([slot="window"]),:host(.to-left-opened) .window,:host(.to-left-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-left-opened) .close,:host(.to-left-opened.to-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.to-left-outro) .window,:host(.to-left-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .close{right:0px;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.to-right){-ms-flex-pack:end;justify-content:flex-end}:host(.to-right) .window,:host(.to-right)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-right-intro) .window,:host(.to-right-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-opened.to-right-outro) .window,:host(.to-right-opened.to-right-outro)>::slotted([slot="window"]),:host(.to-right-opened) .window,:host(.to-right-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-right-opened) .close,:host(.to-right-opened.to-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.to-right-outro) .window,:host(.to-right-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .close{left:0px;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.to-top){padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}:host(.to-top){-ms-flex-pack:center;justify-content:center}:host(.to-top) .window,:host(.to-top)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-top-intro) .window,:host(.to-top-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-top-opened.to-top-outro) .window,:host(.to-top-opened.to-top-outro)>::slotted([slot="window"]),:host(.to-top-opened) .window,:host(.to-top-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-top-outro) .window,:host(.to-top-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}@media (max-width: 767px){.mobile\\:w-12{width:3rem}}';export{l as mds_modal}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-bc48f1e8.system.js"],(function(t){"use strict";var o,i,r,n,e;return{setters:[function(t){o=t.r;i=t.c;r=t.h;n=t.H;e=t.g}],execute:function(){function a(t){var o,i,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(o=0;o<t.length;o++)t[o]&&(i=a(t[o]))&&(r&&(r+=" "),r+=i);else for(o in t)t[o]&&(r&&(r+=" "),r+=o);return r}function s(){for(var t,o,i=0,r="";i<arguments.length;)(t=arguments[i++])&&(o=a(t))&&(r&&(r+=" "),r+=o);return r}var l='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>';var d=function(){function t(){var t=this;this.elements=[];this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Space"||t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(o){if(o.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(o,i){if(i===void 0){i="element"}t.elements[i]=o};this.attachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].addEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.detachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.attachEscapeBehavior=function(o){t.escapeCallback=o;if(window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=function(){return};if(window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();var c='@tailwind components; @tailwind utilities; .focus-off,.focusable,.focusable-light,.focusable-light-off{-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);outline-offset:var(--magma-outline-blur-offset);outline:var(--magma-outline-blur);-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform}.focus-on,.focusable-light:focus-visible,.focusable:focus-visible{--magma-outline-blur-offset:var(--magma-outline-focus-offset);--magma-outline-blur:var(--magma-outline-focus)}.focus-light-on,.focusable-light:focus-visible{--magma-outline-blur:2px solid rgb(var(--tone-neutral))}.svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1 / 1;height:100%;width:100%}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.fixed{position:fixed}.absolute{position:absolute}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.ml-auto{margin-left:auto}.flex{display:-ms-flexbox;display:flex}.w-16{width:4rem}.min-w-0{min-width:0px}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.items-center{-ms-flex-align:center;align-items:center}.gap-4{gap:1rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgba(var(--tone-neutral-09), var(--tw-border-opacity))}.bg-transparent{background-color:transparent}.p-4{padding:1rem}.p-8{padding:2rem}.text-tone-neutral-02{--tw-text-opacity:1;color:rgba(var(--tone-neutral-02), var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgba(var(--tone-neutral-04), var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-overflow:auto;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;z-index:var(--mds-modal-z-index, 1000)}:host([position=top]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=bottom]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host(.to-bottom-opened),:host(.to-center-opened),:host(.to-left-opened),:host(.to-right-opened),:host(.to-top-opened){-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}.close{top:0px;height:2.25rem;width:2.25rem;border-radius:9999px;font-size:2.25rem;line-height:2.5rem;opacity:0;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);cursor:pointer;fill:inherit;position:absolute;-webkit-transform-origin:center;transform-origin:center;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, transform;transition-property:opacity, outline, outline-offset, transform, -webkit-transform}.window{height:100%;gap:0px;background-color:var(--mds-modal-window-background);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;max-width:calc(100vw - 80px);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.to-bottom){padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}:host(.to-bottom){-ms-flex-pack:center;justify-content:center}:host(.to-bottom) .window,:host(.to-bottom)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-bottom-intro) .window,:host(.to-bottom-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-bottom-opened.to-bottom-outro) .window,:host(.to-bottom-opened.to-bottom-outro)>::slotted([slot="window"]),:host(.to-bottom-opened) .window,:host(.to-bottom-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-bottom-outro) .window,:host(.to-bottom-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-center){padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}:host(.to-center){-ms-flex-pack:center;justify-content:center}:host(.to-center) .window,:host(.to-center)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-center-intro) .window,:host(.to-center-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-center-opened.to-center-outro) .window,:host(.to-center-opened.to-center-outro)>::slotted([slot="window"]),:host(.to-center-opened) .window,:host(.to-center-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-center-outro) .window,:host(.to-center-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-left){-ms-flex-pack:start;justify-content:flex-start}:host(.to-left) .window,:host(.to-left)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-left-intro) .window,:host(.to-left-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-opened.to-left-outro) .window,:host(.to-left-opened.to-left-outro)>::slotted([slot="window"]),:host(.to-left-opened) .window,:host(.to-left-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-left-opened) .close,:host(.to-left-opened.to-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.to-left-outro) .window,:host(.to-left-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .close{right:0px;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.to-right){-ms-flex-pack:end;justify-content:flex-end}:host(.to-right) .window,:host(.to-right)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-right-intro) .window,:host(.to-right-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-opened.to-right-outro) .window,:host(.to-right-opened.to-right-outro)>::slotted([slot="window"]),:host(.to-right-opened) .window,:host(.to-right-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-right-opened) .close,:host(.to-right-opened.to-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.to-right-outro) .window,:host(.to-right-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .close{left:0px;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.to-top){padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}:host(.to-top){-ms-flex-pack:center;justify-content:center}:host(.to-top) .window,:host(.to-top)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-top-intro) .window,:host(.to-top-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-top-opened.to-top-outro) .window,:host(.to-top-opened.to-top-outro)>::slotted([slot="window"]),:host(.to-top-opened) .window,:host(.to-top-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-top-outro) .window,:host(.to-top-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}@media (max-width: 767px){.mobile\\:w-12{width:3rem}}';var w=t("mds_modal",function(){function t(t){var r=this;o(this,t);this.closeEvent=i(this,"mdsModalClose",7);this.window=false;this.top=false;this.bottom=false;this.animationState="intro";this.km=new d;this.componentDidLoad=function(){var t;r.km.addElement(r.host,"host");var o=(t=r.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".close");if(o)r.km.addElement(o,"close");r.km.attachEscapeBehavior((function(){return r.closeEvent.emit()}));r.km.attachClickBehavior("close")};this.animationName=function(t,o){if(t===void 0){t=""}if(o===void 0){o=""}return"to-".concat(o!==""?o:r.position).concat(t!==""?"-"+t:"")};this.closeModal=function(t){var o;if(((o=t.target)===null||o===void 0?void 0:o.localName)!=="mds-modal"){return}r.opened=t.target!==t.currentTarget;if(!r.opened){r.closeEvent.emit()}};this.stateOpened=undefined;this.opened=false;this.position="center"}t.prototype.componentWillLoad=function(){var t;this.bottom=this.host.querySelector('[slot="bottom"]')!==null;this.top=this.host.querySelector('[slot="top"]')!==null;this.window=this.host.querySelector('[slot="window"]')!==null;this.stateOpened=this.opened;if(!this.window){this.position="right"}if(this.window){(t=this.host.querySelector('[slot="window"]'))===null||t===void 0?void 0:t.setAttribute("role","modal")}};t.prototype.componentWillRender=function(){this.animationState=this.opened?"intro":"outro";this.host.classList.add(this.animationName())};t.prototype.componentDidRender=function(){var t=this;this.animationDeelay=window.setTimeout((function(){t.animationState=t.animationState==="intro"?"outro":"intro";t.host.classList.remove(t.animationName(t.animationState==="intro"?"outro":"intro"));t.host.classList.add(t.animationName(t.animationState));window.clearTimeout(t.animationDeelay)}),500)};t.prototype.disconnectedCallback=function(){this.km.detachEscapeBehavior();this.km.detachClickBehavior("close")};t.prototype.positionChange=function(t,o){window.clearTimeout(this.animationDeelay);this.host.classList.remove(this.animationName("",o));this.host.classList.remove(this.animationName("intro",o));this.host.classList.remove(this.animationName("outro",o))};t.prototype.openedChange=function(t){this.stateOpened=t;window.clearTimeout(this.animationDeelay)};t.prototype.onModalCloseListener=function(){this.opened=false};t.prototype.onBannerCloseListener=function(){this.opened=false};t.prototype.render=function(){var t=this;return r(n,{"aria-modal":s(this.opened?"true":"false"),class:s(this.stateOpened&&this.animationName("opened")),onClick:function(o){t.closeModal(o)}},this.window?r("slot",{name:"window"}):r("div",{class:s("window",(this.top||this.bottom)&&"window-".concat(this.top?"-top":"").concat(this.bottom?"-bottom":"")),role:"dialog",part:"window"},this.top&&r("slot",{name:"top"}),r("slot",null),this.bottom&&r("slot",{name:"bottom"})),!this.window&&r("i",{innerHTML:l,tabindex:"0",onClick:function(o){t.closeModal(o)},class:"svg close focusable-light"}))};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{position:["positionChange"],opened:["openedChange"]}},enumerable:false,configurable:true});return t}());w.style=c}}}));
|
package/dist/stats.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2023-
|
|
2
|
+
"timestamp": "2023-10-19T09:55:11",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "node",
|
|
5
|
-
"version": "18.
|
|
5
|
+
"version": "18.16.1"
|
|
6
6
|
},
|
|
7
7
|
"app": {
|
|
8
8
|
"namespace": "MdsModal",
|
|
@@ -59,17 +59,17 @@
|
|
|
59
59
|
"name": "dist-lazy",
|
|
60
60
|
"files": 35,
|
|
61
61
|
"generatedFiles": [
|
|
62
|
-
"./dist/cjs/index-
|
|
62
|
+
"./dist/cjs/index-7b67ecdb.js",
|
|
63
63
|
"./dist/cjs/index.cjs.js",
|
|
64
64
|
"./dist/cjs/loader.cjs.js",
|
|
65
65
|
"./dist/cjs/mds-modal.cjs.entry.js",
|
|
66
66
|
"./dist/cjs/mds-modal.cjs.js",
|
|
67
|
-
"./dist/esm-es5/index-
|
|
67
|
+
"./dist/esm-es5/index-5f4fd73d.js",
|
|
68
68
|
"./dist/esm-es5/index.js",
|
|
69
69
|
"./dist/esm-es5/loader.js",
|
|
70
70
|
"./dist/esm-es5/mds-modal.entry.js",
|
|
71
71
|
"./dist/esm-es5/mds-modal.js",
|
|
72
|
-
"./dist/esm/index-
|
|
72
|
+
"./dist/esm/index-5f4fd73d.js",
|
|
73
73
|
"./dist/esm/index.js",
|
|
74
74
|
"./dist/esm/loader.js",
|
|
75
75
|
"./dist/esm/mds-modal.entry.js",
|
|
@@ -79,21 +79,21 @@
|
|
|
79
79
|
"./dist/mds-modal/index.esm.js",
|
|
80
80
|
"./dist/mds-modal/mds-modal.esm.js",
|
|
81
81
|
"./dist/mds-modal/mds-modal.js",
|
|
82
|
-
"./dist/mds-modal/p-
|
|
82
|
+
"./dist/mds-modal/p-3289100c.system.js",
|
|
83
83
|
"./dist/mds-modal/p-50ea2036.system.js",
|
|
84
|
-
"./dist/mds-modal/p-
|
|
85
|
-
"./dist/mds-modal/p-
|
|
86
|
-
"./dist/mds-modal/p-
|
|
87
|
-
"./dist/mds-modal/p-
|
|
84
|
+
"./dist/mds-modal/p-b327d4c0.js",
|
|
85
|
+
"./dist/mds-modal/p-bc48f1e8.system.js",
|
|
86
|
+
"./dist/mds-modal/p-e441efd8.entry.js",
|
|
87
|
+
"./dist/mds-modal/p-ff89867f.system.entry.js",
|
|
88
88
|
"./www/build/index.esm.js",
|
|
89
89
|
"./www/build/mds-modal.esm.js",
|
|
90
90
|
"./www/build/mds-modal.js",
|
|
91
|
-
"./www/build/p-
|
|
91
|
+
"./www/build/p-3289100c.system.js",
|
|
92
92
|
"./www/build/p-50ea2036.system.js",
|
|
93
|
-
"./www/build/p-
|
|
94
|
-
"./www/build/p-
|
|
95
|
-
"./www/build/p-
|
|
96
|
-
"./www/build/p-
|
|
93
|
+
"./www/build/p-b327d4c0.js",
|
|
94
|
+
"./www/build/p-bc48f1e8.system.js",
|
|
95
|
+
"./www/build/p-e441efd8.entry.js",
|
|
96
|
+
"./www/build/p-ff89867f.system.entry.js"
|
|
97
97
|
]
|
|
98
98
|
},
|
|
99
99
|
{
|
|
@@ -126,12 +126,12 @@
|
|
|
126
126
|
"components": [
|
|
127
127
|
"mds-modal"
|
|
128
128
|
],
|
|
129
|
-
"bundleId": "p-
|
|
130
|
-
"fileName": "p-
|
|
129
|
+
"bundleId": "p-e441efd8",
|
|
130
|
+
"fileName": "p-e441efd8.entry.js",
|
|
131
131
|
"imports": [
|
|
132
|
-
"p-
|
|
132
|
+
"p-b327d4c0.js"
|
|
133
133
|
],
|
|
134
|
-
"originalByteSize":
|
|
134
|
+
"originalByteSize": 20822
|
|
135
135
|
}
|
|
136
136
|
],
|
|
137
137
|
"esm": [
|
|
@@ -143,9 +143,9 @@
|
|
|
143
143
|
"bundleId": "mds-modal",
|
|
144
144
|
"fileName": "mds-modal.entry.js",
|
|
145
145
|
"imports": [
|
|
146
|
-
"index-
|
|
146
|
+
"index-5f4fd73d.js"
|
|
147
147
|
],
|
|
148
|
-
"originalByteSize":
|
|
148
|
+
"originalByteSize": 20826
|
|
149
149
|
}
|
|
150
150
|
],
|
|
151
151
|
"es5": [
|
|
@@ -157,9 +157,9 @@
|
|
|
157
157
|
"bundleId": "mds-modal",
|
|
158
158
|
"fileName": "mds-modal.entry.js",
|
|
159
159
|
"imports": [
|
|
160
|
-
"index-
|
|
160
|
+
"index-5f4fd73d.js"
|
|
161
161
|
],
|
|
162
|
-
"originalByteSize":
|
|
162
|
+
"originalByteSize": 20826
|
|
163
163
|
}
|
|
164
164
|
],
|
|
165
165
|
"system": [
|
|
@@ -168,12 +168,12 @@
|
|
|
168
168
|
"components": [
|
|
169
169
|
"mds-modal"
|
|
170
170
|
],
|
|
171
|
-
"bundleId": "p-
|
|
172
|
-
"fileName": "p-
|
|
171
|
+
"bundleId": "p-ff89867f.system",
|
|
172
|
+
"fileName": "p-ff89867f.system.entry.js",
|
|
173
173
|
"imports": [
|
|
174
|
-
"p-
|
|
174
|
+
"p-bc48f1e8.system.js"
|
|
175
175
|
],
|
|
176
|
-
"originalByteSize":
|
|
176
|
+
"originalByteSize": 21897
|
|
177
177
|
}
|
|
178
178
|
],
|
|
179
179
|
"commonjs": [
|
|
@@ -185,9 +185,9 @@
|
|
|
185
185
|
"bundleId": "mds-modal.cjs",
|
|
186
186
|
"fileName": "mds-modal.cjs.entry.js",
|
|
187
187
|
"imports": [
|
|
188
|
-
"index-
|
|
188
|
+
"index-7b67ecdb.js"
|
|
189
189
|
],
|
|
190
|
-
"originalByteSize":
|
|
190
|
+
"originalByteSize": 20903
|
|
191
191
|
}
|
|
192
192
|
]
|
|
193
193
|
},
|
|
@@ -324,6 +324,8 @@
|
|
|
324
324
|
{
|
|
325
325
|
"cmps": [
|
|
326
326
|
{
|
|
327
|
+
"attachInternalsMemberName": null,
|
|
328
|
+
"formAssociated": false,
|
|
327
329
|
"tagName": "mds-modal",
|
|
328
330
|
"excludeFromCollection": false,
|
|
329
331
|
"isCollectionDependency": false,
|
|
@@ -581,7 +583,7 @@
|
|
|
581
583
|
],
|
|
582
584
|
"componentGraph": {
|
|
583
585
|
"sc-mds-modal": [
|
|
584
|
-
"p-
|
|
586
|
+
"p-b327d4c0.js"
|
|
585
587
|
]
|
|
586
588
|
},
|
|
587
589
|
"sourceGraph": {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const unslugName: (name: string) => string;
|
|
2
2
|
declare const setAttributeIfEmpty: (element: HTMLElement, attribute: string, value: string) => string;
|
|
3
3
|
declare const hashValue: (value: string) => string;
|
|
4
|
-
|
|
4
|
+
declare const hashRandomValue: (value?: string) => string;
|
|
5
|
+
export { unslugName, setAttributeIfEmpty, hashRandomValue, hashValue, };
|
|
@@ -3,6 +3,16 @@ export interface ComponentDecorator {
|
|
|
3
3
|
(opts?: ComponentOptions): ClassDecorator;
|
|
4
4
|
}
|
|
5
5
|
export interface ComponentOptions {
|
|
6
|
+
/**
|
|
7
|
+
* When set to `true` this component will be form-associated. See
|
|
8
|
+
* https://stenciljs.com/docs/next/form-associated documentation on how to
|
|
9
|
+
* build form-associated Stencil components that integrate into forms like
|
|
10
|
+
* native browser elements such as `<input>` and `<textarea>`.
|
|
11
|
+
*
|
|
12
|
+
* The {@link AttachInternals} decorator allows for access to the
|
|
13
|
+
* `ElementInternals` object to modify the associated form.
|
|
14
|
+
*/
|
|
15
|
+
formAssociated?: boolean;
|
|
6
16
|
/**
|
|
7
17
|
* Tag name of the web component. Ideally, the tag name must be globally unique,
|
|
8
18
|
* so it's recommended to choose an unique prefix for all your components within the same collection.
|
|
@@ -107,6 +117,9 @@ export interface EventOptions {
|
|
|
107
117
|
*/
|
|
108
118
|
composed?: boolean;
|
|
109
119
|
}
|
|
120
|
+
export interface AttachInternalsDecorator {
|
|
121
|
+
(): PropertyDecorator;
|
|
122
|
+
}
|
|
110
123
|
export interface ListenDecorator {
|
|
111
124
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
112
125
|
}
|
|
@@ -175,6 +188,12 @@ export declare const Element: ElementDecorator;
|
|
|
175
188
|
* https://stenciljs.com/docs/events
|
|
176
189
|
*/
|
|
177
190
|
export declare const Event: EventDecorator;
|
|
191
|
+
/**
|
|
192
|
+
* If the `formAssociated` option is set in options passed to the
|
|
193
|
+
* `@Component()` decorator then this decorator may be used to get access to the
|
|
194
|
+
* `ElementInternals` instance associated with the component.
|
|
195
|
+
*/
|
|
196
|
+
export declare const AttachInternals: AttachInternalsDecorator;
|
|
178
197
|
/**
|
|
179
198
|
* The `Listen()` decorator is for listening DOM events, including the ones
|
|
180
199
|
* dispatched from `@Events()`.
|
package/documentation.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2023-
|
|
2
|
+
"timestamp": "2023-10-19T09:23:19",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
|
-
"version": "4.
|
|
6
|
-
"typescriptVersion": "5.
|
|
5
|
+
"version": "4.5.0",
|
|
6
|
+
"typescriptVersion": "5.2.2"
|
|
7
7
|
},
|
|
8
8
|
"components": [
|
|
9
9
|
{
|
|
10
10
|
"filePath": "src/components/mds-modal/mds-modal.tsx",
|
|
11
11
|
"encapsulation": "shadow",
|
|
12
12
|
"tag": "mds-modal",
|
|
13
|
-
"readme": "# mds-modal\n\n\n",
|
|
14
|
-
"docs": "",
|
|
13
|
+
"readme": "# mds-modal\n\n\n\nThis is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScirpt framework you are using.\n",
|
|
14
|
+
"docs": "This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScirpt framework you are using.",
|
|
15
15
|
"docsTags": [
|
|
16
16
|
{
|
|
17
17
|
"name": "slot",
|
|
@@ -367,6 +367,11 @@
|
|
|
367
367
|
"docstring": "",
|
|
368
368
|
"path": "src/components/mds-form/meta/types.ts"
|
|
369
369
|
},
|
|
370
|
+
"src/components/mds-header-bar/meta/types.ts::MenuType": {
|
|
371
|
+
"declaration": "export type MenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
|
|
372
|
+
"docstring": "",
|
|
373
|
+
"path": "src/components/mds-header-bar/meta/types.ts"
|
|
374
|
+
},
|
|
370
375
|
"src/components/mds-header/meta/event-detail.ts::MdsHeaderEventDetail": {
|
|
371
376
|
"declaration": "export interface MdsHeaderEventDetail {\n bar: HTMLMdsHeaderBarElement\n}",
|
|
372
377
|
"docstring": "",
|
|
@@ -472,6 +477,11 @@
|
|
|
472
477
|
"docstring": "",
|
|
473
478
|
"path": "src/components/mds-paginator/meta/event-detail.ts"
|
|
474
479
|
},
|
|
480
|
+
"src/components/mds-price-table-features-cell/meta/types.ts::PriceTableFeaturesCellType": {
|
|
481
|
+
"declaration": "export type PriceTableFeaturesCellType =\n | 'custom'\n | 'label'\n | 'supported'\n | 'text'\n | 'unsupported'",
|
|
482
|
+
"docstring": "",
|
|
483
|
+
"path": "src/components/mds-price-table-features-cell/meta/types.ts"
|
|
484
|
+
},
|
|
475
485
|
"src/components/mds-progress/meta/types.ts::DirectionType": {
|
|
476
486
|
"declaration": "export type DirectionType =\n | 'horizontal'\n | 'vertical'",
|
|
477
487
|
"docstring": "",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maggioli-design-system/mds-modal",
|
|
3
|
-
"version": "4.4.
|
|
4
|
-
"description": "mds-modal is a web-component from
|
|
3
|
+
"version": "4.4.2",
|
|
4
|
+
"description": "mds-modal is a web-component from Magma Design System, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScirpt framework you are using.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"es2015": "dist/esm/index.mjs",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@maggioli-design-system/styles": "^11.7.0",
|
|
28
|
-
"@stencil/core": "^4.
|
|
29
|
-
"clsx": "^
|
|
28
|
+
"@stencil/core": "^4.3.0",
|
|
29
|
+
"clsx": "^2.0.0"
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"author": {
|
package/readme.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScirpt framework you are using.
|
|
6
|
+
|
|
5
7
|
<!-- Auto Generated Below -->
|
|
6
8
|
|
|
7
9
|
|
|
@@ -64,4 +66,4 @@ graph TD;
|
|
|
64
66
|
|
|
65
67
|
----------------------------------------------
|
|
66
68
|
|
|
67
|
-
Built with love @
|
|
69
|
+
Built with love @ [Gruppo Maggioli](https://www.maggioli.com) from [R&D Department](https://www.maggioli.com/it-it/chi-siamo/ricerca-sviluppo)
|
package/src/common/aria.ts
CHANGED
|
@@ -6,6 +6,8 @@ const hash = (s: string): string => {
|
|
|
6
6
|
return h.toString()
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
const randomInt = (max: number): number => Math.floor(Math.random() * max)
|
|
10
|
+
|
|
9
11
|
const unslugName = (name: string): string => {
|
|
10
12
|
return name.split('/')?.slice(-1).pop()?.replace(/-/g, ' ') ?? name
|
|
11
13
|
}
|
|
@@ -20,8 +22,18 @@ const setAttributeIfEmpty = (element: HTMLElement, attribute: string, value: str
|
|
|
20
22
|
|
|
21
23
|
const hashValue = (value: string): string => `${value}-${hash(value)}`
|
|
22
24
|
|
|
25
|
+
const hashRandomValue = (value?: string): string => {
|
|
26
|
+
const randomValue = randomInt(1000000)
|
|
27
|
+
if (value) {
|
|
28
|
+
return `${value}-${hash(randomValue.toString())}`
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return hash(randomValue.toString())
|
|
32
|
+
}
|
|
33
|
+
|
|
23
34
|
export {
|
|
24
35
|
unslugName,
|
|
25
36
|
setAttributeIfEmpty,
|
|
37
|
+
hashRandomValue,
|
|
26
38
|
hashValue,
|
|
27
39
|
}
|