@maggioli-design-system/mds-modal 4.7.2 → 4.8.0
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-95c329c0.js → index-b3e2062a.js} +22 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-modal.cjs.entry.js +4 -4
- package/dist/cjs/mds-modal.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/file.js +48 -0
- package/dist/collection/common/icon.js +15 -0
- package/dist/collection/common/unit.js +15 -3
- package/dist/collection/common/yugop/core.js +16 -0
- package/dist/collection/common/yugop/index.js +3 -0
- package/dist/collection/common/yugop/random-text.js +59 -0
- package/dist/collection/common/yugop/utils/math.js +11 -0
- package/dist/collection/common/yugop/utils/noop.js +1 -0
- package/dist/collection/common/yugop/utils/prng.js +21 -0
- package/dist/collection/common/yugop/utils/string.js +2 -0
- package/dist/collection/components/mds-modal/mds-modal.css +151 -27
- package/dist/collection/components/mds-modal/mds-modal.js +1 -1
- package/dist/collection/components/mds-modal/test/mds-modal.e2e.js +1 -21
- package/dist/collection/components/mds-modal/test/mds-modal.stories.js +1 -1
- package/dist/collection/dictionary/file-extensions.js +64 -0
- package/dist/collection/dictionary/icon.js +6 -1
- package/dist/collection/dictionary/text.js +6 -0
- package/dist/collection/dictionary/variant.js +18 -1
- package/dist/collection/fixtures/filenames.js +57 -0
- package/dist/collection/type/file-types.js +1 -0
- package/dist/collection/type/text.js +1 -0
- package/dist/collection/type/variant-file-format.js +111 -0
- package/dist/components/mds-modal.js +3 -3
- package/dist/documentation.d.ts +1 -21
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-2bd481c0.js → index-fd30d325.js} +22 -14
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-modal.entry.js +4 -4
- package/dist/esm/mds-modal.js +3 -3
- package/dist/esm-es5/index-fd30d325.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-14f0bf74.system.js +2 -0
- package/dist/mds-modal/p-444a6a47.system.entry.js +1 -0
- package/dist/mds-modal/{p-969424eb.system.js → p-5cf75b06.system.js} +1 -1
- package/dist/mds-modal/p-83ebb238.entry.js +1 -0
- package/dist/mds-modal/p-aff993b4.js +2 -0
- package/dist/stats.json +85 -40
- package/dist/types/common/file.d.ts +12 -0
- package/dist/types/common/icon.d.ts +5 -0
- package/dist/types/common/unit.d.ts +2 -1
- package/dist/types/common/yugop/core.d.ts +10 -0
- package/dist/types/common/yugop/index.d.ts +1 -0
- package/dist/types/common/yugop/random-text.d.ts +31 -0
- package/dist/types/common/yugop/utils/math.d.ts +3 -0
- package/dist/types/common/yugop/utils/noop.d.ts +1 -0
- package/dist/types/common/yugop/utils/prng.d.ts +8 -0
- package/dist/types/common/yugop/utils/string.d.ts +1 -0
- package/dist/types/dictionary/file-extensions.d.ts +11 -0
- package/dist/types/dictionary/icon.d.ts +2 -1
- package/dist/types/dictionary/text.d.ts +2 -0
- package/dist/types/dictionary/variant.d.ts +2 -1
- package/dist/types/fixtures/filenames.d.ts +2 -0
- package/dist/types/type/file-types.d.ts +1 -0
- package/dist/types/type/text.d.ts +1 -0
- package/dist/types/type/variant-file-format.d.ts +11 -0
- package/dist/types/type/variant.d.ts +1 -0
- package/documentation.json +58 -13
- package/package.json +5 -4
- package/readme.md +8 -0
- package/src/common/file.ts +63 -0
- package/src/common/icon.ts +25 -0
- package/src/common/unit.ts +21 -2
- package/src/common/yugop/core.ts +47 -0
- package/src/common/yugop/index.ts +4 -0
- package/src/common/yugop/random-text.ts +95 -0
- package/src/common/yugop/utils/math.ts +21 -0
- package/src/common/yugop/utils/noop.ts +1 -0
- package/src/common/yugop/utils/prng.ts +35 -0
- package/src/common/yugop/utils/string.ts +4 -0
- package/src/components/mds-modal/css/mds-modal-animate-left.css +4 -4
- package/src/components/mds-modal/css/mds-modal-animate-right.css +4 -4
- package/src/components/mds-modal/mds-modal.css +12 -7
- package/src/components/mds-modal/mds-modal.tsx +1 -1
- package/src/components/mds-modal/test/mds-modal.e2e.ts +1 -23
- package/src/components/mds-modal/test/mds-modal.stories.tsx +9 -9
- package/src/dictionary/file-extensions.ts +81 -0
- package/src/dictionary/icon.ts +6 -0
- package/src/dictionary/text.ts +9 -0
- package/src/dictionary/variant.ts +19 -0
- package/src/fixtures/filenames.ts +60 -0
- package/src/fixtures/icons.json +10 -0
- package/src/fixtures/iconsauce.json +3 -0
- package/src/type/file-types.ts +55 -0
- package/src/type/text.ts +4 -0
- package/src/type/variant-file-format.ts +128 -0
- package/src/type/variant.ts +17 -0
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/mds-modal.js +1 -1
- package/www/build/p-14f0bf74.system.js +2 -0
- package/www/build/p-444a6a47.system.entry.js +1 -0
- package/www/build/{p-969424eb.system.js → p-5cf75b06.system.js} +1 -1
- package/www/build/p-83ebb238.entry.js +1 -0
- package/www/build/p-aff993b4.js +2 -0
- package/dist/esm-es5/index-2bd481c0.js +0 -1
- package/dist/mds-modal/p-0a4de21e.system.js +0 -2
- package/dist/mds-modal/p-2f9a631d.js +0 -2
- package/dist/mds-modal/p-68c3fe7d.system.entry.js +0 -1
- package/dist/mds-modal/p-fe6df5e2.entry.js +0 -1
- package/www/build/p-0a4de21e.system.js +0 -2
- package/www/build/p-2f9a631d.js +0 -2
- package/www/build/p-68c3fe7d.system.entry.js +0 -1
- package/www/build/p-fe6df5e2.entry.js +0 -1
|
@@ -521,6 +521,9 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
+
// This needs to always happen so we can hide nodes that are projected
|
|
525
|
+
// to another component but don't end up in a slot
|
|
526
|
+
elm['s-hn'] = hostTagName;
|
|
524
527
|
return elm;
|
|
525
528
|
};
|
|
526
529
|
/**
|
|
@@ -644,8 +647,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
644
647
|
* @param oldCh the old children of the parent node
|
|
645
648
|
* @param newVNode the new VNode which will replace the parent
|
|
646
649
|
* @param newCh the new children of the parent node
|
|
650
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
647
651
|
*/
|
|
648
|
-
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
652
|
+
const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
|
|
649
653
|
let oldStartIdx = 0;
|
|
650
654
|
let newStartIdx = 0;
|
|
651
655
|
let oldEndIdx = oldCh.length - 1;
|
|
@@ -669,25 +673,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
669
673
|
else if (newEndVnode == null) {
|
|
670
674
|
newEndVnode = newCh[--newEndIdx];
|
|
671
675
|
}
|
|
672
|
-
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
676
|
+
else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
673
677
|
// if the start nodes are the same then we should patch the new VNode
|
|
674
678
|
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
675
679
|
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
676
680
|
// since things are matched up in order.
|
|
677
|
-
patch(oldStartVnode, newStartVnode);
|
|
681
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
678
682
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
679
683
|
newStartVnode = newCh[++newStartIdx];
|
|
680
684
|
}
|
|
681
|
-
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
685
|
+
else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
682
686
|
// likewise, if the end nodes are the same we patch new onto old and
|
|
683
687
|
// decrement our end indices, and also likewise in this case we don't
|
|
684
688
|
// need to move any DOM Nodes.
|
|
685
|
-
patch(oldEndVnode, newEndVnode);
|
|
689
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
686
690
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
687
691
|
newEndVnode = newCh[--newEndIdx];
|
|
688
692
|
}
|
|
689
|
-
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
690
|
-
patch(oldStartVnode, newEndVnode);
|
|
693
|
+
else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
694
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
691
695
|
// We need to move the element for `oldStartVnode` into a position which
|
|
692
696
|
// will be appropriate for `newEndVnode`. For this we can use
|
|
693
697
|
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
@@ -709,8 +713,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
709
713
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
710
714
|
newEndVnode = newCh[--newEndIdx];
|
|
711
715
|
}
|
|
712
|
-
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
713
|
-
patch(oldEndVnode, newStartVnode);
|
|
716
|
+
else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
717
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
714
718
|
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
715
719
|
// the same node, so since we're here we know that they are not. Thus we
|
|
716
720
|
// can move the element for `oldEndVnode` _before_ the element for
|
|
@@ -764,9 +768,10 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
764
768
|
*
|
|
765
769
|
* @param leftVNode the first VNode to check
|
|
766
770
|
* @param rightVNode the second VNode to check
|
|
771
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
767
772
|
* @returns whether they're equal or not
|
|
768
773
|
*/
|
|
769
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
774
|
+
const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
770
775
|
// compare if two vnode to see if they're "technically" the same
|
|
771
776
|
// need to have the same element tag, and same key to be the same
|
|
772
777
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
@@ -781,8 +786,9 @@ const isSameVnode = (leftVNode, rightVNode) => {
|
|
|
781
786
|
*
|
|
782
787
|
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
783
788
|
* @param newVNode a new VNode representing an updated version of the old one
|
|
789
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
784
790
|
*/
|
|
785
|
-
const patch = (oldVNode, newVNode) => {
|
|
791
|
+
const patch = (oldVNode, newVNode, isInitialRender = false) => {
|
|
786
792
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
787
793
|
const oldChildren = oldVNode.$children$;
|
|
788
794
|
const newChildren = newVNode.$children$;
|
|
@@ -802,7 +808,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
802
808
|
if (oldChildren !== null && newChildren !== null) {
|
|
803
809
|
// looks like there's child vnodes for both the old and new vnodes
|
|
804
810
|
// so we need to call `updateChildren` to reconcile them
|
|
805
|
-
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
811
|
+
updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
|
|
806
812
|
}
|
|
807
813
|
else if (newChildren !== null) {
|
|
808
814
|
// no old child vnodes, but there are new child vnodes to add
|
|
@@ -881,7 +887,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
881
887
|
scopeId = hostElm['s-sc'];
|
|
882
888
|
}
|
|
883
889
|
// synchronous patch
|
|
884
|
-
patch(oldVNode, rootVnode);
|
|
890
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
885
891
|
};
|
|
886
892
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
887
893
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
@@ -1584,12 +1590,14 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1584
1590
|
// If we have styles, add them to the DOM
|
|
1585
1591
|
if (dataStyles.innerHTML.length) {
|
|
1586
1592
|
dataStyles.setAttribute('data-styles', '');
|
|
1587
|
-
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1588
1593
|
// Apply CSP nonce to the style tag if it exists
|
|
1589
1594
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1590
1595
|
if (nonce != null) {
|
|
1591
1596
|
dataStyles.setAttribute('nonce', nonce);
|
|
1592
1597
|
}
|
|
1598
|
+
// Insert the styles into the document head
|
|
1599
|
+
// NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
|
|
1600
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1593
1601
|
}
|
|
1594
1602
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1595
1603
|
isBootstrapping = false;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-b3e2062a.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-b3e2062a.js');
|
|
6
6
|
|
|
7
|
-
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<
|
|
7
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
8
8
|
|
|
9
9
|
const 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>`;
|
|
10
10
|
|
|
@@ -49,7 +49,7 @@ class KeyboardManager {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
const mdsModalCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset)}50%{outline-offset:var(--magma-outline-blur-offset)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset)}50%{outline-offset:var(--magma-outline-blur-offset)}}@tailwind components; @tailwind utilities; .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}.ml-auto{margin-left:auto}.flex{display:-ms-flexbox;display:flex}.min-w-0{min-width:0rem}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.items-center{-ms-flex-align:center;align-items:center}.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:rgb(var(--tone-neutral-09) / var(--tw-border-opacity))}.bg-transparent{background-color:transparent}.text{font-size:1rem}.text-tone-neutral-02{--tw-text-opacity:1;color:rgb(var(--tone-neutral-02) / var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgb(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:0rem;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:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transform-origin:center;transform-origin:center;-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:0rem;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:0rem;-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:0rem;-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%)}";
|
|
52
|
+
const mdsModalCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; @tailwind utilities; .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))}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.flex{display:-ms-flexbox;display:flex}.w-1600{width:4rem}.min-w-0{min-width:0rem}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.flex-grow{-ms-flex-positive:1;flex-grow:1}.items-center{-ms-flex-align:center;align-items:center}.gap-400{gap:1rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border{border-width:1px}.border-0{border-width:0rem}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgb(var(--tone-neutral-09) / var(--tw-border-opacity))}.bg-label-amaranth-10{--tw-bg-opacity:1;background-color:rgb(var(--label-amaranth-10) / var(--tw-bg-opacity))}.bg-label-aqua-10{--tw-bg-opacity:1;background-color:rgb(var(--label-aqua-10) / var(--tw-bg-opacity))}.bg-label-blue-10{--tw-bg-opacity:1;background-color:rgb(var(--label-blue-10) / var(--tw-bg-opacity))}.bg-label-green-10{--tw-bg-opacity:1;background-color:rgb(var(--label-green-10) / var(--tw-bg-opacity))}.bg-label-lime-10{--tw-bg-opacity:1;background-color:rgb(var(--label-lime-10) / var(--tw-bg-opacity))}.bg-label-orange-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orange-10) / var(--tw-bg-opacity))}.bg-label-orchid-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orchid-10) / var(--tw-bg-opacity))}.bg-label-violet-10{--tw-bg-opacity:1;background-color:rgb(var(--label-violet-10) / var(--tw-bg-opacity))}.bg-label-yellow-10{--tw-bg-opacity:1;background-color:rgb(var(--label-yellow-10) / var(--tw-bg-opacity))}.bg-tone-neutral-10{--tw-bg-opacity:1;background-color:rgb(var(--tone-neutral-10) / var(--tw-bg-opacity))}.fill-label-amaranth-04{fill:rgb(var(--label-amaranth-04))}.fill-label-aqua-04{fill:rgb(var(--label-aqua-04))}.fill-label-blue-04{fill:rgb(var(--label-blue-04))}.fill-label-green-04{fill:rgb(var(--label-green-04))}.fill-label-lime-04{fill:rgb(var(--label-lime-04))}.fill-label-orange-04{fill:rgb(var(--label-orange-04))}.fill-label-orchid-04{fill:rgb(var(--label-orchid-04))}.fill-label-violet-04{fill:rgb(var(--label-violet-04))}.fill-label-yellow-04{fill:rgb(var(--label-yellow-04))}.fill-tone-neutral-04{fill:rgb(var(--tone-neutral-04))}.p-800{padding:2rem}.text-label-amaranth-04{--tw-text-opacity:1;color:rgb(var(--label-amaranth-04) / var(--tw-text-opacity))}.text-label-aqua-04{--tw-text-opacity:1;color:rgb(var(--label-aqua-04) / var(--tw-text-opacity))}.text-label-blue-04{--tw-text-opacity:1;color:rgb(var(--label-blue-04) / var(--tw-text-opacity))}.text-label-green-04{--tw-text-opacity:1;color:rgb(var(--label-green-04) / var(--tw-text-opacity))}.text-label-lime-04{--tw-text-opacity:1;color:rgb(var(--label-lime-04) / var(--tw-text-opacity))}.text-label-orange-04{--tw-text-opacity:1;color:rgb(var(--label-orange-04) / var(--tw-text-opacity))}.text-label-orchid-04{--tw-text-opacity:1;color:rgb(var(--label-orchid-04) / var(--tw-text-opacity))}.text-label-violet-04{--tw-text-opacity:1;color:rgb(var(--label-violet-04) / var(--tw-text-opacity))}.text-label-yellow-04{--tw-text-opacity:1;color:rgb(var(--label-yellow-04) / var(--tw-text-opacity))}.text-tone-neutral-02{--tw-text-opacity:1;color:rgb(var(--tone-neutral-02) / var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgb(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}.button-close{top:0rem;border-radius:9999px;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);--mds-button-icon-color:rgb(var(--tone-neutral));--mds-button-background:transparent;height:auto;position:absolute;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transform-origin:center;transform-origin:center;-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}.button-close::part(icon){height:2.25rem;width:2.25rem}.window{height:100%;gap:0rem;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) .button-close,:host(.to-left-opened.to-left-outro) .button-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) .button-close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .button-close{right:0rem;-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) .button-close,:host(.to-right-opened.to-right-outro) .button-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) .button-close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .button-close{left:0rem;-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-1200{width:3rem}}";
|
|
53
53
|
|
|
54
54
|
const MdsModal = class {
|
|
55
55
|
constructor(hostRef) {
|
|
@@ -136,7 +136,7 @@ const MdsModal = class {
|
|
|
136
136
|
? index.h("slot", { name: "window" })
|
|
137
137
|
: index.h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), role: "dialog", part: "window" }, this.top &&
|
|
138
138
|
index.h("slot", { name: "top" }), index.h("slot", null), this.bottom &&
|
|
139
|
-
index.h("slot", { name: "bottom" })), !this.window && index.h("
|
|
139
|
+
index.h("slot", { name: "bottom" })), !this.window && index.h("mds-button", { icon: miBaselineClose, onClick: (e) => { this.closeModal(e); }, class: "button-close" })));
|
|
140
140
|
}
|
|
141
141
|
get host() { return index.getElement(this); }
|
|
142
142
|
static get watchers() { return {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-b3e2062a.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.
|
|
8
|
+
Stencil Client Patch Browser v4.10.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchBrowser = () => {
|
|
11
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-modal.cjs.js', document.baseURI).href));
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { fileExtensionsDictionary } from "../dictionary/file-extensions";
|
|
2
|
+
import { fileFormatsVariant } from "../type/variant-file-format";
|
|
3
|
+
const sanitizeFilename = (filename, error = 'Attribute "filename" is undefined.') => {
|
|
4
|
+
var _a;
|
|
5
|
+
if (filename === undefined) {
|
|
6
|
+
throw console.error(error);
|
|
7
|
+
}
|
|
8
|
+
if (filename.includes('/')) {
|
|
9
|
+
return (_a = filename.split('/').pop()) !== null && _a !== void 0 ? _a : '';
|
|
10
|
+
}
|
|
11
|
+
return filename;
|
|
12
|
+
};
|
|
13
|
+
const sanitizeSuffix = (rawFilename) => {
|
|
14
|
+
var _a;
|
|
15
|
+
const filename = sanitizeFilename(rawFilename);
|
|
16
|
+
if (filename.includes('.')) {
|
|
17
|
+
return (_a = filename.split('.').pop()) !== null && _a !== void 0 ? _a : '';
|
|
18
|
+
}
|
|
19
|
+
return filename;
|
|
20
|
+
};
|
|
21
|
+
const getName = (rawFilename) => {
|
|
22
|
+
var _a;
|
|
23
|
+
const filename = sanitizeFilename(rawFilename);
|
|
24
|
+
if (filename.includes('.')) {
|
|
25
|
+
return (_a = filename.split('.')[0]) !== null && _a !== void 0 ? _a : '';
|
|
26
|
+
}
|
|
27
|
+
return filename;
|
|
28
|
+
};
|
|
29
|
+
const getSuffix = (rawFilename, suffixOverride) => {
|
|
30
|
+
const suffix = sanitizeSuffix(rawFilename);
|
|
31
|
+
const filename = sanitizeFilename(rawFilename);
|
|
32
|
+
if (suffixOverride !== null && suffixOverride !== undefined) {
|
|
33
|
+
return suffixOverride.toLowerCase();
|
|
34
|
+
}
|
|
35
|
+
if (suffix !== filename) {
|
|
36
|
+
return suffix;
|
|
37
|
+
}
|
|
38
|
+
return 'default';
|
|
39
|
+
};
|
|
40
|
+
const getExtensionInfos = (rawFilename, suffixOverride) => {
|
|
41
|
+
var _a;
|
|
42
|
+
const suffix = getSuffix(rawFilename, suffixOverride).toLocaleLowerCase();
|
|
43
|
+
return (_a = fileExtensionsDictionary[suffix]) !== null && _a !== void 0 ? _a : fileExtensionsDictionary.default;
|
|
44
|
+
};
|
|
45
|
+
const getFormatsVariant = (rawFilename, suffixOverride) => {
|
|
46
|
+
return fileFormatsVariant[getExtensionInfos(rawFilename, suffixOverride).format];
|
|
47
|
+
};
|
|
48
|
+
export { getExtensionInfos, getFormatsVariant, getSuffix, getName, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const BASE64_SVG_ICON = 'data:image/svg+xml;base64,';
|
|
2
|
+
const MARKUP_SVG_ICON = '<svg ';
|
|
3
|
+
const isIconFormatIsBase64 = (icon) => {
|
|
4
|
+
if (!icon) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
return icon.startsWith(BASE64_SVG_ICON);
|
|
8
|
+
};
|
|
9
|
+
const isIconFormatIsSVG = (icon) => {
|
|
10
|
+
if (!icon) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
return icon.startsWith(MARKUP_SVG_ICON);
|
|
14
|
+
};
|
|
15
|
+
export { isIconFormatIsBase64, isIconFormatIsSVG, BASE64_SVG_ICON, MARKUP_SVG_ICON, };
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
|
|
2
|
+
if (duration.includes('ms')) {
|
|
3
|
+
return Number(duration.replace('ms', ''));
|
|
4
|
+
}
|
|
2
5
|
if (duration.includes('s')) {
|
|
3
6
|
return Number(duration.replace('s', '')) * 1000;
|
|
4
7
|
}
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
return defaultValue;
|
|
9
|
+
};
|
|
10
|
+
const cssSizeToNumber = (size, defaultValue = 0) => {
|
|
11
|
+
if (size.includes('px')) {
|
|
12
|
+
return Number(size.replace('px', ''));
|
|
13
|
+
}
|
|
14
|
+
if (size.includes('rem')) {
|
|
15
|
+
return Number(size.replace('rem', '')) * 16;
|
|
16
|
+
}
|
|
17
|
+
if (size.includes('em')) {
|
|
18
|
+
return Number(size.replace('em', '')) * 16;
|
|
7
19
|
}
|
|
8
20
|
return defaultValue;
|
|
9
21
|
};
|
|
10
|
-
export { cssDurationToMilliseconds, };
|
|
22
|
+
export { cssDurationToMilliseconds, cssSizeToNumber, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { generator } from "./utils/prng";
|
|
2
|
+
import { strToCharCodeArray } from "./utils/string";
|
|
3
|
+
import { randomSign, minMaxLooped } from "./utils/math";
|
|
4
|
+
const rand = generator();
|
|
5
|
+
const random = (base, offset) => () => (base + rand.range(0, offset)) * randomSign();
|
|
6
|
+
export const generateRandomCharCodeArray = (base, offset) => str => strToCharCodeArray(str).map(random(base, offset));
|
|
7
|
+
export const charCodeArrayToString = ({ str, minCharCode, maxCharCode, placeholderChar, charStep, }) => charCodes => charCodes.reduce((acc, item, index) => {
|
|
8
|
+
if (item !== 0) {
|
|
9
|
+
if (Math.abs(item) > charStep) {
|
|
10
|
+
return acc + placeholderChar;
|
|
11
|
+
}
|
|
12
|
+
return (acc +
|
|
13
|
+
String.fromCharCode(minMaxLooped(minCharCode, maxCharCode)(str.charCodeAt(index) + item)));
|
|
14
|
+
}
|
|
15
|
+
return acc + str.charAt(index);
|
|
16
|
+
}, '');
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { generateRandomCharCodeArray, charCodeArrayToString } from "./core";
|
|
2
|
+
import { noop } from "./utils/noop";
|
|
3
|
+
class RandomText {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
this.start = () => {
|
|
6
|
+
const { frameOffset, charOffset, str, speed } = this;
|
|
7
|
+
const randoms = generateRandomCharCodeArray(frameOffset, charOffset)(str);
|
|
8
|
+
this.stop();
|
|
9
|
+
this.rafId = requestAnimationFrame(() => {
|
|
10
|
+
this.step(randoms, speed, speed);
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
Object.assign(this, Object.assign(Object.assign({}, RandomText.defaults), options));
|
|
14
|
+
}
|
|
15
|
+
stop() {
|
|
16
|
+
cancelAnimationFrame(this.rafId);
|
|
17
|
+
}
|
|
18
|
+
step(randoms, stepCount, speed) {
|
|
19
|
+
const { str, charStep, minCharCode, maxCharCode, placeholderChar, onProgress, onComplete, } = this;
|
|
20
|
+
const stepArray = randoms.slice(0, stepCount);
|
|
21
|
+
const steppedArray = stepArray.map(item => {
|
|
22
|
+
if (item > 0)
|
|
23
|
+
return item - 1;
|
|
24
|
+
if (item < 0)
|
|
25
|
+
return item + 1;
|
|
26
|
+
return 0;
|
|
27
|
+
});
|
|
28
|
+
const output = charCodeArrayToString({
|
|
29
|
+
str,
|
|
30
|
+
minCharCode,
|
|
31
|
+
maxCharCode,
|
|
32
|
+
placeholderChar,
|
|
33
|
+
charStep,
|
|
34
|
+
})(steppedArray);
|
|
35
|
+
const updatedRandoms = [...steppedArray, ...randoms.slice(stepCount)];
|
|
36
|
+
onProgress(output);
|
|
37
|
+
if (output !== str) {
|
|
38
|
+
this.rafId = requestAnimationFrame(() => {
|
|
39
|
+
this.step(updatedRandoms, stepCount + speed, speed);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
onComplete(output);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
RandomText.defaults = {
|
|
48
|
+
str: '',
|
|
49
|
+
speed: 2,
|
|
50
|
+
placeholderChar: '_',
|
|
51
|
+
frameOffset: 30,
|
|
52
|
+
charOffset: 20,
|
|
53
|
+
charStep: 10,
|
|
54
|
+
minCharCode: 32,
|
|
55
|
+
maxCharCode: 122,
|
|
56
|
+
onProgress: noop,
|
|
57
|
+
onComplete: noop,
|
|
58
|
+
};
|
|
59
|
+
export default RandomText;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { generator } from "./prng";
|
|
2
|
+
const rand = generator();
|
|
3
|
+
export const randomSign = () => (Math.round(Math.random()) - 0.5) * 2;
|
|
4
|
+
export const generateRandomNumbers = base => charOffset => length => [...Array(length)].map(() => (base + rand.range(0, charOffset)) * randomSign());
|
|
5
|
+
export const minMaxLooped = (min, max) => value => {
|
|
6
|
+
if (value > max)
|
|
7
|
+
return min + (value - max);
|
|
8
|
+
if (value < min)
|
|
9
|
+
return max + (value - min);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const noop = () => { };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const int32 = 2147483647;
|
|
2
|
+
const gen = v => (v * 16807) % int32;
|
|
3
|
+
const randomFloat = v => gen(v) / int32;
|
|
4
|
+
const randomInt = v => gen(v);
|
|
5
|
+
export const generator = (seed = 1) => {
|
|
6
|
+
let value = seed < 1 ? 1 : seed;
|
|
7
|
+
const next = () => {
|
|
8
|
+
value = randomInt(value);
|
|
9
|
+
return value;
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
random: () => next(),
|
|
13
|
+
randomFloat: () => randomFloat(next()),
|
|
14
|
+
range: (min, max) => {
|
|
15
|
+
const minimum = min - 0.4999;
|
|
16
|
+
const maximum = max + 0.4999;
|
|
17
|
+
return Math.round(minimum + (maximum - minimum) * randomFloat(next()));
|
|
18
|
+
},
|
|
19
|
+
rangeFloat: (min, max) => min + (max - min) * randomFloat(next()),
|
|
20
|
+
};
|
|
21
|
+
};
|